splineScalar

function splineScalar
cinematic.ts:532
splineScalar(frames: readonly number[], values: readonly number[], frame: number) → number

Non-uniform Catmull-Rom over one scalar channel, held outside the ends. The vector version's arithmetic, applied per channel.

Exported because a route is not always a route through space. A camera standing off a planet is measured as a standoff in radii, a phase angle and an elevation, and splining those three and building the position from them is a different curve from splining the position — smooth in the coordinate the measurement is in rather than in meters. Same argument as screenRoutePosition's log range, one level out.

framesreadonly number[]
Undocumented
valuesreadonly number[]
Undocumented
framenumber
Undocumented
Returnsnumber