xxxxxxxxxx
let running = 1;
let img;
let vScale = 4;
function preload() {
img = loadImage('ultraclub.jpg');
}
function setup() {
createCanvas(img.width,img.height);
background(10);
}
function draw() {
// translate(windowWidth / 2 - 932 / 2,windowHeight / 2 - 523 / 2);
background(0);
img.resize(width / vScale,height / vScale);
img.loadPixels();
loadPixels();
for(x = 0; x < img.width * vScale; x = x + 1){
for(y = 0; y < img.height * vScale; y = y + 1){
let index = (x + y * img.width) * 4;
let r = img.pixels[index + 0];
let g = img.pixels[index + 1];
let b = img.pixels[index + 2];
let bright = (r + g + b) / 3;
strokeWeight(1);
ellipse(x * vScale + vScale / 2, y * vScale + vScale / 2,vScale / 255 * bright,vScale / 255 * bright);
}
}
noLoop();
}