Skip to content

Commit 93a75cd

Browse files
committed
Some optimisations.
1 parent 61894a1 commit 93a75cd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

demos/demos.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function step() {
8787
delayAvg += delay;
8888
lastFrameTime = currTime;
8989

90-
setTimeout('step()', (delay > 0) ? delay : 0);
90+
setTimeout(step, (delay > 0) ? delay : 0);
9191
}
9292

9393
/*

demos/draw_world.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
function drawWorld(world, context) {
2+
context.root().suspendRedraw(10000);
23
for (var j = world.m_jointList; j; j = j.m_next) {
34
drawJoint(j, context);
45
}
@@ -7,6 +8,7 @@ function drawWorld(world, context) {
78
drawShape(s, context, b);
89
}
910
}
11+
context.root().unsuspendRedrawAll();
1012
}
1113

1214
var uniqueJointId = 0;

0 commit comments

Comments
 (0)