Skip to content

Commit f83b948

Browse files
committed
feat: graphic optimization
1 parent af8e5c8 commit f83b948

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sketch.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ function setup() {
1010

1111
network = new Network(windowWidth, windowHeight);
1212
aStarIterator = network.aStar();
13+
background(255);
1314
}
1415

1516
function draw() {
16-
background(255);
17-
1817
aStarIterator.next();
19-
20-
network.show(); // draw it
18+
// network.show(); // draw it
19+
if (aStarIterator.done) {
20+
noLoop();
21+
}
2122
}
2223

2324
function mousePressed(event) {

0 commit comments

Comments
 (0)