Skip to content

spool / NbtTrack

Class: NbtTrack

Defined in: plugins/clip/track.ts:192

Animates an arbitrary NBT path on an arbitrary selector over keyframes - e.g. a scoreboard-free way to drive any merge-able numeric field. Always baked.

Implements

Constructors

Constructor

new NbtTrack(selector, path, keys): NbtTrack

Defined in: plugins/clip/track.ts:195

Parameters

selector

Selector

path

string

keys

readonly Keyframe<NbtValue>[]

Returns

NbtTrack

Properties

mode

readonly mode: TrackMode = "frame"

Defined in: plugins/clip/track.ts:193

Implementation of

Track.mode

Methods

emitFrame()

emitFrame(ctx, f): void

Defined in: plugins/clip/track.ts:216

Frame mode: emit the commands for frame index f.

Parameters

ctx

FunctionContext

f

number

Returns

void

Implementation of

Track.emitFrame


emitSmooth()

emitSmooth(): void

Defined in: plugins/clip/track.ts:222

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.ts:203

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.ts:206

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.ts:209

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.ts:212

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

Returns

undefined

Implementation of

Track.revolution

Released under the MIT License · Credits