xxxxxxxxxx
18
class Orb{
constructor(x, y, index){
this.x = x;
this.y = y;
this.index = index;
this.xoff = 0.01;
this.col = color(cols[this.index % cols.length]);
}
update(){
this.xoff = this.xoff + 0.001;
noStroke();
fill(this.col);
ellipse(this.x, this.y, -5 + noise(this.x / 100, this.y / 100, this.xoff) * 30);
this.x = (noise(this.index, this.xoff)) * width;
this.y = (noise(this.index / 100, this.xoff)) * height;
}
}