approachState

function approachState
observer.ts:358
approachState(current: ObserverState, desired: ObserverState, dt: number, tau: number) → ObserverState

Ease one observer state toward another, frame-rate independent.

Exponential approach rather than a fixed lerp: 1 - exp(-dt/tau) is the same curve at 30 fps and 144 fps, where lerp(a, b, 0.1) is a different time constant on every machine. tau is the time to close 63% of the gap.

Distance eases in log space and azimuth takes the short way round; both are the difference between a transition that reads as a move and one that reads as a cut. A fly-to from Earth to Proxima is fourteen decades of distance, and a linear ease spends the whole second still in the Solar System.

currentObserverState
Undocumented
desiredObserverState
Undocumented
dtnumber
Undocumented
taunumber
Undocumented