xxxxxxxxxx
var knots;
var nknots;
var dlayer;
function setup() {
createCanvas(windowWidth, windowHeight);
colorMode(HSB,360,255,255);
frameRate(200);
dlayer=createGraphics(width,height);
dlayer.colorMode(HSB,360,255,255);
knots=[];
nknots=int(random(1,120));
for (var i=0; i<nknots; i++) {
knots.push(new Knot(createVector(random(width*.2, width*.8), random(height*.2, height*.8))));
}
background(35,100,200);
}
function draw() {
background(35,100,200);
for (var i=0; i<nknots; i++) {
knots[i].run();
}
image(dlayer,0,0);
}