xxxxxxxxxx
29
let colours = 40;
let xLoc;
let yLoc;
function setup() {
createCanvas(540, 540, WEBGL);
xLoc = 0
yLoc = -200
background(255);
}
function draw() {
translate(xLoc, yLoc);
for (let i = 0; i< 5; i++){
rotateY(millis() / 1000);
cone(30, 65, 16);
if (frameCount <= colours-1) {
fill(255, 209, 220);
}
if (frameCount % colours == 0) {
fill(random(0, 255), random(0, 255), random(0, 255));
translate(100, 100);
}
}
}