lineVelocity

function lineVelocity
cinematic.ts:986
lineVelocity(path: LinePath, frame: number) → Vec3

How fast the ship is going at frame, in camera axes — meters per frame, because the advance is meters and the parameter is frames.

Differentiated analytically: the advance is side · exp(u) for the log spline u, so dt/dframe is t · u′, and u′ is the same cubic's slope read off the same segment. Cheap, but that is not why. The alternative — a finite difference of the screen spline the hull is choreographed by — is precisely the failure this type exists to remove: a beat list read off tracked bounding boxes carries sub-pixel wobble, and a pixel of wobble at the range a pass ends at is a large angular velocity. Deriving an attitude from that is the sliding read, one level further in.

Zero outside the ends, matching the held position. The step from zero to flight speed at the first beat is a real discontinuity and a deliberate one: a hold is staging, not flight, and rounding it off would invent a deceleration the reference does not contain.

pathLinePath
Undocumented
framenumber
Undocumented
ReturnsVec3