xxxxxxxxxx
97
let sunSpin = 0;
let spin2 = 0;
let spin3 = 0;
let spin4 = 0;
let backSpin = 0;
let roff = 0;
let goff = 0;
let boff = 0;
function setup() {
createCanvas(600, 400);
background(0);
}
function draw() {
// background(10,2);
strokeWeight(0.5)
let r = noise(roff) * 400;
let g = noise(goff) * 255;
let b = noise(boff) * 255;
// push();
// translate(width / 2, height / 2);
// translate(0, 0);
// rotate(sunSpin);
// rectMode(CENTER);
// noStroke();
// fill(0, 3);
// ellipse(0, 0, 800, 100);
// sunSpin += 0.01;
// pop();
// push();
// translate(width / 2, height / 2);
// translate(0, 0);
// rotate(backSpin);
// rectMode(CENTER);
// noStroke();
// fill(100, 3);
// ellipse(0, 0, 800, 100);
// backSpin -= 0.02;
// pop();
push();
translate(width / 2, height / 2);
translate(0, 0);
rotate(sunSpin);
rectMode(CENTER);
fill(255, 255, 0, 5);
ellipse(0, 0, 50, 50);
fill(r, 0, 0,10);
stroke(r,0,0,10);
rect(0, 0, 50, 1);
sunSpin += 0.01;
pop();
push();
fill(r, g, 0);
stroke(r-20, g-20, 0);
translate(width / 2, height / 2);
rotate(spin2);
rect(30, 30, 20, 20);
spin2 += 0.04;
pop();
push();
fill(0, g, b);
stroke(0,g-100,b-100);
translate(width / 2, height / 2);
rotate(spin3);
rect(90, 90, 50, 50);
spin3 += 0.01;
pop();
push();
fill(r, g, b);
stroke(r-20,g-20,b-20);
translate(width / 2, height / 2);
rotate(spin4);
circle(70, 70, 20);
spin4 += random(-0.1, 0.1);
pop();
roff += 0.01;
goff += 0.02;
boff += 0.03;
}