Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

spool / Track

Interface: Track โ€‹

Defined in: plugins/clip/track/types.ts:7

A compiled track the clip can drive.

Properties โ€‹

mode โ€‹

readonly mode: TrackMode

Defined in: plugins/clip/track/types.ts:8

Methods โ€‹

emitFrame() โ€‹

emitFrame(ctx, f, period, duration, interp): void

Defined in: plugins/clip/track/types.ts:20

Frame mode: emit the commands for frame index f, reached over interp ticks.

Parameters โ€‹

ctx โ€‹

FunctionContext

f โ€‹

number

period โ€‹

number

duration โ€‹

number

interp โ€‹

number

Returns โ€‹

void


emitSmooth() โ€‹

emitSmooth(ctx, duration, reverse): void

Defined in: plugins/clip/track/types.ts:28

Smooth mode: emit the one-shot native tween toward the end pose (or base if reverse).

Parameters โ€‹

ctx โ€‹

FunctionContext

duration โ€‹

number

reverse โ€‹

boolean

Returns โ€‹

void


empty() โ€‹

empty(): boolean

Defined in: plugins/clip/track/types.ts:10

A track with nothing to animate (an untouched primary model track); skipped.

Returns โ€‹

boolean


length() โ€‹

length(): number

Defined in: plugins/clip/track/types.ts:12

Highest absolute keyframe tick this track defines (0 if it spans the clip duration).

Returns โ€‹

number


period() โ€‹

period(duration): number

Defined in: plugins/clip/track/types.ts:14

Distinct frame count for frame mode (the clip cycles frame_(t % period)).

Parameters โ€‹

duration โ€‹

number

Returns โ€‹

number


revolution() โ€‹

revolution(): number | undefined

Defined in: plugins/clip/track/types.ts:16

If this track is a pure periodic spin, its revolution frame count (for snap).

Returns โ€‹

number | undefined


stride() โ€‹

stride(): number

Defined in: plugins/clip/track/types.ts:18

Most ticks one baked keyframe may span; native interpolation fills the gap.

Returns โ€‹

number

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.