five-on-it / packages/net-client/src/predicted / blendSeconds
Function: blendSeconds()
blendSeconds(
gap,speed):number
Defined in: packages/net-client/src/predicted.ts:63
How long the blend between the two timelines takes (s) for an entity whose two poses lie gap metres apart and which moves at speed (m/s): PREDICTED_BLEND_SECONDS at the least, and the gap at a share of its pace when that is longer (BLEND_PACE_SHARE of its speed, BLEND_PACE_FLOOR at the least, as the remote buffer draws a guess away), so the blend adds no more than a third again to the entity's drawn motion: a 1.4 m gap at 12 m/s takes 0.35 s.
Parameters
gap
number
speed
number
Returns
number