xxxxxxxxxx
68
let width = 7000;
let height = 7000;
let jet;
let size = 0;
let rry = [];
function setup() {
createCanvas(width , height);
// translate(size,size);
size=width * 0.1;
let counter = 0;
let angle = 0;
let x_inc = 0.08;
let r = 200//floor(random(360));
let r_ = 15//floor(random(360));
for(let x =-size; x < width + size; x+=size * 0.8){
let even = 0;
for(let y=-size; y < height + size; y+=size * 0.78){
if(even % 2 == 0){
angle = 47;
}else{
angle = 227;
}
jet = new Jet(x,y,size,angle,counter,r,r_);
rry.push(jet);
x+=(even % 2 == 0 ? size * x_inc : size * x_inc * -1);
counter++;
even++;
}
}
}
function draw(){
for(let i=0; i<rry.length; i++){
rry[i].chora();
}
noLoop();
}
function mouseClicked() {
saveCanvas(document.title+random(0,200000), 'png');
}