Skip to content

Commit db426cb

Browse files
committed
edited text for clarity and moved reset() to top of draw()
1 parent b488e12 commit db426cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/data/examples/en/20_3D/12_simple_feedback.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ function setup() {
2020
}
2121

2222
function draw() {
23+
// clears and resets the p5.Graphics so that 3D objects draw correctly
24+
pg.reset();
25+
2326
// draw the previous frame
2427
pg.texture(swap);
2528
pg.noStroke();
2629
pg.plane(width, height);
2730

28-
// p5.Graphics sometimes requires us to use reset() before drawing
29-
pg.reset();
30-
3131
// draw our sphere on top
3232
pg.push();
3333
// slowly move the sphere in a circle

0 commit comments

Comments
 (0)