xxxxxxxxxx
51
N = 50;
t = 0;
dt = 0.005;
var stuff;
function reset() {
stuff = [];
for (var i = 0 ; i < N; i ++) {
// not using random2D because it goes into negative
stuff.push(createVector(random(), random()))
}
}
function setup() {
createCanvas(64, 128);
colorMode(HSB)
textSize(6)
textAlign(CENTER)
reset()
createButton('record_as_gif').mousePressed(function(e) {
reset()
saveGif('regentfrake.gif', 3)
})
}
function draw() {
background(50, 23 , 34);
for (const [i,v] of stuff.entries()){
fill(v.x * 100, v.y * 100, 100);
text("FREEK IS EEN FREEK", v.x * width, v.y * height)
v.add(createVector(0, noise(t-i)).mult(0.07))
if (v.x < 0 || v.x > 1 || v.y < 0 || v.y > 1) {
v.x = random()
v.y = 0.01
}
}
t+=dt;
}