xxxxxxxxxx
29
let panna = [];
let creepy =[];
let speed;
let s;
function setup() {
createCanvas(640, 360,WEBGL);
setAttributes('antialias', true);
s = 11;
for (let i = 0; i < 250; i++) {
panna.push(new Panna(random(-width, width),random(-height, height),random(width),s));
}
for(let i = 0;i<50;i++){
creepy.push(new Creepy(random(-width, width),random(-height, height),random(width),s));
}
}
function draw() {
orbitControl();
background(0);
for (let i = 0; i < panna.length; i++) {
panna[i].update();
panna[i].show();
}
for (let i = 0; i < creepy.length; i++) {
creepy[i].update();
creepy[i].show();
}
}