From 804634144fe97e5a47996c907530755089b04550 Mon Sep 17 00:00:00 2001 From: liabru Date: Sun, 17 Mar 2024 23:04:56 +0000 Subject: [PATCH] improve Example.substep comments --- examples/substep.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/substep.js b/examples/substep.js index f9ef1ee..d19f153 100644 --- a/examples/substep.js +++ b/examples/substep.js @@ -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);