Skip to content

Commit

Permalink
improve Example.substep comments
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Mar 17, 2024
1 parent 7206600 commit 8046341
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/substep.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ Example.substep = function() {

// create runner with higher precision timestep (requires >= v0.20.0 beta)
var runner = Runner.create({
delta: 1000 / (60 * 10), // 600Hz delta = 1.666ms = 10upf @ 60fps (10x default precision)
maxFrameTime: 1000 / 50 // performance budget
// 600Hz delta = 1.666ms = 10upf @ 60fps (i.e. 10x default precision)
delta: 1000 / (60 * 10),
// 50fps minimum performance target (i.e. budget allows up to ~20ms execution per frame)
maxFrameTime: 1000 / 50
});

Runner.run(runner, engine);
Expand Down

0 comments on commit 8046341

Please sign in to comment.