PShape mi_forma;
float ang;
void setup() {
size(1080, 720);
background(0);
mi_imagen = loadImage("imagen.png");
mi_forma = loadShape("forma.svg");
ang = 0;
}
void draw() {
noStroke();
fill(0, 80);
// rect(0, 0, width, height);
ang+=0.05;
imageMode(CENTER);
shapeMode(CENTER);
translate(mouseX,mouseY);
rotate(ang);
scale (map(cos(ang),-1,1,0.25,1));
tint(map(tan(-ang),-1,1,100,255), map(sin(ang), -1, 1, 0, 255), random(150));
image(mi_imagen, 0, 0);
//shape(mi_forma, 0,0);
}
No comments:
Post a Comment