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

spool / Clip

Class: Clip โ€‹

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

Extends โ€‹

  • ClipTimeline

Constructors โ€‹

Constructor โ€‹

new Clip(dp, label, primary?): Clip

Defined in: plugins/clip/timeline.ts:16

Parameters โ€‹

dp โ€‹

Datapack

label โ€‹

string

primary? โ€‹

DisplayValue

Returns โ€‹

Clip

Inherited from โ€‹

ClipTimeline.constructor

Properties โ€‹

s โ€‹

protected readonly s: ClipState

Defined in: plugins/clip/timeline.ts:13

Inherited from โ€‹

ClipTimeline.s

Methods โ€‹

at() โ€‹

at(tick, cb): this

Defined in: plugins/clip/timeline.ts:128

Run cb's commands at absolute tick tick (sound, particle, title, anything).

Parameters โ€‹

tick โ€‹

number

cb โ€‹

Emit

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.at


bake() โ€‹

bake(): this

Defined in: plugins/clip/timeline.ts:69

Force per-tick baked frames for the primary model.

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.bake


forSeconds() โ€‹

forSeconds(seconds): this

Defined in: plugins/clip/timeline.ts:114

Run for this many seconds.

Parameters โ€‹

seconds โ€‹

number

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.forSeconds


loop() โ€‹

loop(ctx): void

Defined in: plugins/clip/clip.ts:31

Start a continuous, tick-driven run (forever unless a duration was set).

Parameters โ€‹

ctx โ€‹

FunctionContext

Returns โ€‹

void


markForCutscene() โ€‹

markForCutscene(): void

Defined in: plugins/clip/clip.ts:52

Ensure the functions a Cutscene schedules get generated.

Returns โ€‹

void


move() โ€‹

move(delta): this

Defined in: plugins/clip/timeline.ts:49

Translate the primary model by delta over the clip duration.

Parameters โ€‹

delta โ€‹

Vec3

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.move


nbt() โ€‹

nbt(selector, path, keys): this

Defined in: plugins/clip/timeline.ts:87

Animate an arbitrary NBT path on selector over keyframes (baked).

Parameters โ€‹

selector โ€‹

Selector

path โ€‹

string

keys โ€‹

readonly Keyframe<NbtValue>[]

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.nbt


over() โ€‹

over(ticks): this

Defined in: plugins/clip/timeline.ts:107

Run for this many ticks.

Parameters โ€‹

ticks โ€‹

number

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.over


play() โ€‹

play(ctx, afterTicks?): void

Defined in: plugins/clip/clip.ts:21

Play the clip forward from a function body (afterTicks delays the start).

Parameters โ€‹

ctx โ€‹

FunctionContext

afterTicks? โ€‹

number = 0

Returns โ€‹

void


playLength() โ€‹

playLength(): number

Defined in: plugins/clip/clip.ts:47

Tick count play would schedule (for a Cutscene to offset).

Returns โ€‹

number


reverse() โ€‹

reverse(ctx, afterTicks?): void

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

Play the clip backward (door close; spin wind-back).

Parameters โ€‹

ctx โ€‹

FunctionContext

afterTicks? โ€‹

number = 0

Returns โ€‹

void


rotateTo() โ€‹

rotateTo(q): this

Defined in: plugins/clip/timeline.ts:64

Set the primary model's orientation to q over the clip duration.

Parameters โ€‹

q โ€‹

Quat

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.rotateTo


scaleTo() โ€‹

scaleTo(to): this

Defined in: plugins/clip/timeline.ts:59

Scale the primary model to to over the clip duration.

Parameters โ€‹

to โ€‹

Vec3

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.scaleTo


scheduleInto() โ€‹

scheduleInto(ctx, baseTick): void

Defined in: plugins/clip/clip.ts:57

Emits the whole timeline into ctx, offset by baseTick. Used by Cutscene.

Parameters โ€‹

ctx โ€‹

FunctionContext

baseTick โ€‹

number

Returns โ€‹

void


smooth() โ€‹

smooth(): this

Defined in: plugins/clip/timeline.ts:74

Force the native-interpolation path for the primary model.

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.smooth


snap() โ€‹

snap(degrees?): this

Defined in: plugins/clip/timeline.ts:121

Makes a spin stop on a multiple of degrees (default 90). Pure spins only; speed must divide degrees.

Parameters โ€‹

degrees? โ€‹

number = 90

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.snap


spin() โ€‹

spin(axis, degPerTick): this

Defined in: plugins/clip/timeline.ts:54

Spin the primary model about axis at degPerTick (negative reverses).

Parameters โ€‹

axis โ€‹

Axis

degPerTick โ€‹

number

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.spin


start() โ€‹

start(ctx, afterTicks?): void

Defined in: plugins/clip/clip.ts:36

Begin (or restart) a timed tick-driven run (afterTicks staggers it).

Parameters โ€‹

ctx โ€‹

FunctionContext

afterTicks? โ€‹

number = 0

Returns โ€‹

void


stop() โ€‹

stop(ctx): void

Defined in: plugins/clip/clip.ts:41

Halt a tick-driven run.

Parameters โ€‹

ctx โ€‹

FunctionContext

Returns โ€‹

void


tp() โ€‹

tp(selector, keys, glide?): this

Defined in: plugins/clip/timeline.ts:100

Teleports selector along keyframes. glide only teleports on keyframes and lets the client tween between them (display entities only): fewer commands and smoother.

Parameters โ€‹

selector โ€‹

Selector

keys โ€‹

readonly Keyframe<Vec3>[]

glide? โ€‹

boolean = false

Returns โ€‹

this

Inherited from โ€‹

ClipTimeline.tp


track() โ€‹

track(model): TransformTrack

Defined in: plugins/clip/timeline.ts:81

Add another display-model transform track (chain .move/.spin/... on it).

Parameters โ€‹

model โ€‹

DisplayValue

Returns โ€‹

TransformTrack

Inherited from โ€‹

ClipTimeline.track

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