Core · type
TimeCurveKind
Re-timing a stretch of playback: how much source time one second of clip time is worth.
Explained in The loop.
type TimeCurveKind = 'linear' | 'hold' | 'ramp' | 'stutter' | 'reverse'import type { TimeCurveKind } from '@driftengine/core';In depth
A curve is a reparameterisation, not an animation. It answers exactly one
question — "given localSec into this segment, how far has the source
advanced?" — which is what lets a caller drive a fixed-timestep simulation, a
recorded stream or a video from the same maths.
Every curve is speed-neutral over its own segment: whatever it steals it
pays back, so curveSpanSec equals durationSec for every kind. That is the
property that keeps a re-timed clip the length it was asked for. A curve that
slowed time without catching up would quietly shorten the footage a fixed
clip length can cover, and the clip would stop before the thing it was cut
for.
Pure, closed-form and allocation-free: evaluated once per rendered frame.