Hi endel, thanks for your reply.
You're right but the delta time is computed for the tick of room.setSimulationInterval
, not clock.setInterval
if I understood that correctly.
e.g.
//clock.start() is called indirectly and ticking starts:
this.setSimulationInterval(deltaTime => {
[...] //let's say deltaTime is about 15
});
this.clock.setInterval(function() {
[...]
//the deltaTime of this closure should be about 2000
//but instead this.clock.deltaTime is about 15 since it's computed at the tick of setSimulationInterval
}, 2000);
So each setInterval
should have its own deltaTime since it has its own refresh rate.