xxxxxxxxxx
76
let kk=0;
let k=0;
let emojis=["🐶","🐭","🐰","🐻","🐼","🐨"]
let col=['red','green','orange','yellow','blue','pink']
let canv,mcanv;
let canvs;
let start=true;
let rx=0;
let thetas=[];
function setup() {
createCanvas(400, 200);
background(255,255,255);
frameRate(10);
canv=createGraphics(100,100);
canv.background(255,255,255);
canv.translate(canv.width/2,canv.height/2);
canvs=createGraphics(200,200);
canvs.background(255,255,255);
//canvs.translate(canvs.width/2,canvs.height/2);
// noFill();
canv.strokeWeight(3);
canv.stroke(col[k]);
canv.circle(7,-4,60);
for (let i=0;i<emojis.length;i++){
canv.text(emojis[i],30*cos(2*PI*i/(emojis.length)),30*sin(2*PI*i/(emojis.length)));
}
image(canv,0,50);
}
function emojis_transform(){
}
function emojis_rotate(){
canv.background(255,255,255);
// noFill();
canv.strokeWeight(3);
canv.stroke(col[k%6]);
canv.circle(7,-4,60);
canv.noStroke();
canv.text("✂︎",25,-10);
for (var i=0;i<emojis.length;i++){
canv.text(emojis[i],30*cos(2*PI*i/emojis.length+2*PI*(-k)/(emojis.length*10)),30*sin(2*PI*i/emojis.length+2*PI*(-k)/(emojis.length*10)));
}
image(canv,0,50);
canvs.background(255,255,255);
for(let ks=0;ks<k/10;ks++){
for(let s=0;s<emojis.length;s++){
canvs.text(emojis[(s+ks)%emojis.length],s*15,30*ks+30);
}
}
image(canvs,200,0);
k=(k+1);
}
function draw() {
if(k<60){
if(k%10==0) frameRate(1);
else frameRate(30);
emojis_rotate();
}
else if(k>150){
canv.remove();
canvs.remove();
k=0;
setup();
}
else{
k=(k+1);
}
}