xxxxxxxxxx
66
let img1, img2;
let h = 1
let v = 0;
let s = 1;
function preload(){
img1 = loadImage("bg good.png");
img2 = loadImage("green LED.png");
img3 = loadImage("blue LED.png");
img4 = loadImage("yellow LED.png");
}
function setup() {
createCanvas(800,500);
frameRate(15);
angleMode(DEGREES);
//imageMode(CENTER);
}
function draw() {
background(0);
image(img1,80,60,600,400);
for(let i=1; i<12; i++){
push();
noStroke();
fill(255,0,255);
circle(noise(h*i*0.5)*(width-20),
noise(v*i*0.5)*(height-20),
noise(s*i)*10);
fill(255,0,255,random(100));
circle(noise(h*i*0.5)*(width-20),
noise(v*i*0.5)*(height-20),
noise(s*i)*30);
pop();
}
h = h-0.005;
v = v+0.005;
s = s-0.005;
push();
translate(0,0);
rotate(30);
image(img2,0,60,250,10);
pop();
push();
translate(300,340);
rotate(10);
image(img3,300,0,250,10);
pop();
push();
translate(1100,-100);
rotate(150);
image(img4,300,0,290,10);
pop();
}