xxxxxxxxxx
51
let xoff = 0.0;
let yoff = 0.0;
function setup() {
createCanvas(400, 400);
let x = random(width);
let y = random(height);
let points = [];
}
function draw() {
// background(220);
drawingContext.shadowOffsetX = 5;
drawingContext.shadowOffsetY = 5;
drawingContext.shadowBlur = 10;
drawingContext.shadowColor = 'black';
show();
}
function show(){
xoff = xoff + 0.005;
yoff = yoff + 0.005;
noiseSeed(1);
this.x = noise(xoff, yoff) * width * 3;
if(this.x > width){
this.x = 0 + (this.x - width);
}
noiseSeed(2);
this.y = noise(xoff, yoff) * height * 2.5;
if(this.y > height){
this.y = 0 + (this.y - height);
}
noiseSeed(3);
this.r = noise(xoff, yoff) * 255 * 2.5;
if(this.r > 255){
this.r = 0 + (this.r - 255);
}
if(this.r < 0) {
this.r = 255;
}
noiseSeed(4);
this.g = noise(xoff, yoff) * 255 + 100;
noiseSeed(5);
this.b = noise(xoff, yoff) * 255 + 100;
this.s = noise(xoff, yoff) * 40;
colorMode(HSB, 255);
stroke(this.r, this.g, this.b);
strokeWeight(this.s);
point(this.x, this.y);
}