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

spool / NbtTrack

Class: NbtTrack โ€‹

Defined in: plugins/clip/track/nbt.ts:11

Animates any NBT path on any selector over keyframes. Always baked.

Implements โ€‹

Constructors โ€‹

Constructor โ€‹

new NbtTrack(selector, path, keys): NbtTrack

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

Parameters โ€‹

selector โ€‹

Selector

path โ€‹

string

keys โ€‹

readonly Keyframe<NbtValue>[]

Returns โ€‹

NbtTrack

Properties โ€‹

mode โ€‹

readonly mode: TrackMode = "frame"

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

Implementation of โ€‹

Track.mode

Methods โ€‹

emitFrame() โ€‹

emitFrame(ctx, f): void

Defined in: plugins/clip/track/nbt.ts:39

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

Parameters โ€‹

ctx โ€‹

FunctionContext

f โ€‹

number

Returns โ€‹

void

Implementation of โ€‹

Track.emitFrame


emitSmooth() โ€‹

emitSmooth(): void

Defined in: plugins/clip/track/nbt.ts:51

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

Returns โ€‹

void

Implementation of โ€‹

Track.emitSmooth


empty() โ€‹

empty(): boolean

Defined in: plugins/clip/track/nbt.ts:23

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

Returns โ€‹

boolean

Implementation of โ€‹

Track.empty


length() โ€‹

length(): number

Defined in: plugins/clip/track/nbt.ts:26

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

Returns โ€‹

number

Implementation of โ€‹

Track.length


period() โ€‹

period(duration): number

Defined in: plugins/clip/track/nbt.ts:29

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

Parameters โ€‹

duration โ€‹

number

Returns โ€‹

number

Implementation of โ€‹

Track.period


revolution() โ€‹

revolution(): undefined

Defined in: plugins/clip/track/nbt.ts:32

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

Returns โ€‹

undefined

Implementation of โ€‹

Track.revolution


stride() โ€‹

stride(): number

Defined in: plugins/clip/track/nbt.ts:35

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

Returns โ€‹

number

Implementation of โ€‹

Track.stride

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