xxxxxxxxxx
39
// VARIABLES
//----------------
let img;
let noiseScale;
let density;
// p5.disableFriendlyErrors = true; // disables FES
function preload() {
img = loadImage('https://images.unsplash.com/photo-1508138221679-760a23a2285b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80')
noiseScale = 10
density = 10;
}
function setup() {
createCanvas(720, 460);
imageMode(CORNER);
frameRate(30)
fill(0)
strokeWeight(density)
}
function draw() {
background(0)
stroke(255)
// Shapus maximus
// beginShape(POINTS)
for (let x=0; x<width; ){
for (let y=0; y<height; ){
// vertex(x,y);
ellipse(x, y, density)
y = y+density
}
x = x + density
}
// endShape()
noStroke()
let fps = frameRate();
text("FPS: " + fps.toFixed(2), 10, height - 10);
}