xxxxxxxxxx
59
let dot;
let pair;
function setup() {
createCanvas(1080, 1080);
angleMode(DEGREES);
colorMode(HSB, 360);
arr = [];
arr.push(new Pair(100, 50));
arr.push(new Pair(60, 30));
arr.push(new Pair());
}
function draw() {
translate(width/2, height/2);
background(0, 80);
noStroke();
rotate(frameCount);
fill(310, 360, 360);
//arr[0].show(200, 50);
for(i=0;i<3;i++) {
rotate(i*120-60);
translate(-200, 0);
rotate(frameCount);
fill(i*120, 360, 360);
arr[1].show(230, 30);
for(j=0;j<3;j++) {
rotate(j*120);
translate(230, 0);
rotate(0.5*frameCount);
fill((i*120+(j+1)*20)%360, 360, 180);
arr[0].show(150, 15);
rotate(-0.5*frameCount);
translate(-230, 0);
rotate(-j*120);
}
rotate(-frameCount);
translate(200, 0);
rotate(-i*120+60);
}
}
/*
for(i=0;i<arr.length; i++) {
}
*/