jueves, 23 de mayo de 2019

10 ENTRADA

DESAFÍO DIENTES DE CONEJO


Hemos usado las variables para cambiar respectivamente de tamaño los ojos y por separado los dientes.
Además hemos añadido color a los dientes.

CÓDIGO USADO:
--------------------------------------------------------------------------------------------------------------------------
var ojo;
ojo = 20;
var diente;
diente = 30;
ellipse(150, 70, 60, 120);  // left ear
ellipse(240, 70, 60, 120);  // right ear

ellipse(200, 170, 150, 150);    // face

fill(0, 0, 0);
ellipse(170, 150, ojo, ojo);  // left eye
ellipse(230, 150, ojo, ojo);  // right eye

line(150, 200, 250, 200);   // mouth

fill(255, 239, 59);
rect(185, 200, 15, diente); // left tooth
rect(200, 200, 15, diente); // right tooth
--------------------------------------------------------------------------------------------------------------------------

No hay comentarios:

Publicar un comentario