Skip to content

Commit 76108f5

Browse files
committed
Reduce simulation framerate to avoid flickering.
1 parent 90ff8b9 commit 76108f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/data/examples/en/09_Simulate/04_GameOfLife.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ let columns;
1010
let rows;
1111
let board;
1212
let next;
13+
let framerate;
1314

1415
function setup() {
16+
// Set simulation framerate to 10 to avoid flickering
17+
framerate = 10;
18+
frameRate(framerate);
1519
createCanvas(720, 400);
1620
w = 20;
1721
// Calculate columns and rows

0 commit comments

Comments
 (0)