mirror of
https://github.com/dyne/FreeJ.git
synced 2026-02-06 04:59:16 +01:00
processing-js 0.4 has been merged in some relevant parts basic and topic scripts added for test color handling fixed, more scripts show up now
25 lines
378 B
Plaintext
25 lines
378 B
Plaintext
PImage a;
|
|
|
|
void setup()
|
|
{
|
|
a = loadImage("data/eames.jpg");
|
|
size(200,200);
|
|
noStroke();
|
|
background(255);
|
|
smooth();
|
|
}
|
|
|
|
|
|
void draw()
|
|
{
|
|
float pointillize = map(mouseX, 0, width, 2, 18);
|
|
int x = int(random(a.width));
|
|
int y = int(random(a.height));
|
|
|
|
if( a.loaded ){
|
|
color pix = a.get(x, y);
|
|
fill(pix, 126);
|
|
ellipse(x, y, pointillize, pointillize);
|
|
}
|
|
}
|