I'm new to coding and I have a question. I've made this simple code in processing and I was wondering if I could use it and how to do the same with an image inside a div. This is the code:
<i>int x, y;
PImage img;
void setup () {
size(800, 739);
img = loadImage("1.jpg");
}
void draw () {
for (int i=0; i < mouseX/10; i ++) {
int x = (int) random(width);
int y = (int) random(height);
color cor = img.get(x, y);
float t = random(5, 25);
fill(cor, 30);
noStroke ();
ellipse(x, y, t, t);
}
}
</i>