MCPcopy Index your code
hub / github.com/processing/p5.js / draw

Function draw

test/manual-test-examples/p5.Image/loadPixels.js:17–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17function draw() {
18 translate((width - img.width) / 2, (height - img.height) / 2);
19
20 img.loadPixels();
21
22 for (var i = 0; i < 3000; i++) {
23 var px = random(img.width);
24 var py = random(img.height);
25
26 fill(img.get(px, py));
27 ellipse(px, py, 3, 3);
28 }
29}
30
31function mouseClicked() {
32 img.loop();

Callers

nothing calls this directly

Calls 3

randomFunction · 0.50
loadPixelsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected