beforeRender and afterRender events (from noa object) currently pass a dt argument equal to the number of ms elapsed since the last tick. This was done because the physics system needs that info, but general event consumers would expect dt to be the ms since the previous event.
As part of fix, add new noa.positionInCurrentTick property, which gets updated before each tick. That is, if noa.positionInCurrentTick is 0.25, then at the time of that render event the time since the last tick would be 1/4 of the noa._tickRate.
beforeRender
andafterRender
events (fromnoa
object) currently pass adt
argument equal to the number of ms elapsed since the last tick. This was done because the physics system needs that info, but general event consumers would expectdt
to be the ms since the previous event.As part of fix, add new
noa.positionInCurrentTick
property, which gets updated before each tick. That is, ifnoa.positionInCurrentTick
is0.25
, then at the time of that render event the time since the last tick would be 1/4 of thenoa._tickRate
.