Appearance
hm5-types (source format) / PlaybackAction
Type Alias: PlaybackAction
ts
type PlaybackAction =
| {
target: PlaybackTarget;
type: "target";
}
| {
type: "play";
}
| {
type: "stop";
}
| {
type: "togglePlay";
}
| {
type: "stopAll";
}
| {
scene: string;
then?: "play" | "stop";
type: "scene";
}
| {
frame: string;
section?: string;
then?: "play" | "stop";
type: "gotoNow";
}
| {
frame: string;
section?: string;
then?: "play" | "stop";
type: "gotoAfter";
}
| {
frame: string;
section?: string;
type: "playTo";
}
| {
type: "nextFrame";
}
| {
type: "prevFrame";
}
| {
type: "nextScene";
}
| {
type: "prevScene";
}
| object & PlaybackRamp
| object & PlaybackRamp
| {
type: "stopSounds";
}
| {
onEnd?: PlaybackAction[];
sound: string;
type: "playSound";
}
| {
sound: string;
type: "stopSound";
}
| {
type: "setVisible";
visible: boolean;
}
| {
input: string;
type: "setInput";
value: | float
| boolean
| string
| {
x: float;
y: float;
};
}
| {
frame: string;
section?: string;
times: uint;
type: "repeat";
}
| {
frames: string[];
range?: {
from: uint;
to: uint;
};
then?: "play" | "stop";
type: "gotoRandom";
}
| {
seconds: float;
type: "wait";
}
| {
backward: boolean;
type: "setDirection";
}
| {
args?: (float | string | boolean)[];
fn: string;
script: Id;
type: "call";
}
| {
name: string;
type: "emit";
value?: unknown;
}
| {
loop?: boolean;
parts?: string;
section: string;
type: "overlay";
}
| {
blank?: boolean;
type: "openUrl";
url: string;
}
| {
kind: string;
params?: Record<string, float | string | boolean>;
seconds: float;
type: "canned";
};Playback layer actions (the layer type is still "script" in files): a list of choices about playing, never real code (owner spec 2026-10-22, unlike Flash's ActionScript). Run IN ORDER as a CHAIN on entering the keyframe — or, on a symbol instance, when it is clicked / hovered (SymbolInstanceElement.on): a playTo or wait holds the rest of the list until it has arrived / waited (owner 2026-11-05); the chain is dropped (no error) when something else moves that playhead first. Frame references (FrameRef): 0-based numeric strings, label names or SECTION_START / SECTION_END, inside section when given.
play/stop/togglePlay;stopAll= stop the target AND every clip nested in it (own-clock ones; synced ones follow the stopped parent);scene— switch to another scene of the timeline: alone = to its first frame (thenas goto), right before a goto / playTo / repeat of the same target = that one looks in this scene (owner 2026-11-05: goto / playTo carry no scene of their own);gotoNow— jumps AT ONCE when its frame is entered (the frame itself is never shown);gotoAfter— the same jump, but only once the playhead would leave this frame (it is shown for its time first; anything else that moves the playhead meanwhile cancels it);then"play" = gotoAndPlay, "stop" = gotoAndStop, absent = keep playing or not; one argument = a label of the current section (else of the scene) or a frame number of the scene;section= a frame number counts from that section's start, labels are its own;playTo— play forward OR BACKWARD to that frame and stop there (frames passed on the way run no actions); never into another section (SECTION_END/SECTION_START= the ends of the one it is in);nextFrame/prevFrame(stop there),nextScene/prevScene;setFps/resetFps—scope"global" = every timeline without a speed of its own, "self" = the target only; optional ramp;stopSounds(every sound playing),playSound(a Library sound by id or name;onEnd= actions run when it finishes),stopSound;setVisible— show / hide the target;setInput— give Inputinput(Values panel, by name) of the target's timeline the valuevalue(a number, a switch, text / an option's name,{x, y}, a colour "#rrggbb");repeat— back toframe(playing)timestimes, then go on;gotoRandom— goto one offrames(or every frame fromrange.fromtorange.to, 0-based, both included) picked at random;wait— hold the playheadseconds, then play on;setDirection— the target plays backward (backward) or forward;emit— tell the GAME something happened (owner 2026-11-15): the players fireclip.on(name)with an optionalvalue;callstays for Behaviours;overlay— play a section on some parts only (bones / layers by name), the rest goes on (owner gap plan #15); "" stops it.
Validation (validatePlaybackActions): fields make sense. A gotoNow that would come back to a frame already visited in the same round is void (nothing moves, a console warning; players, LoopGuard) — that ends the loop and the clip plays on.
Union Members
Type Literal
ts
{
target: PlaybackTarget;
type: "target";
}TARGET STEP (owner 2026-11-26): the actions after it, up to the next target step that does not directly follow one, act on target; target steps in a row add up (A, B, stop = both stop). Before any = the timeline / object running the list.
Type Literal
ts
{
type: "play";
}Type Literal
ts
{
type: "stop";
}Type Literal
ts
{
type: "togglePlay";
}Type Literal
ts
{
type: "stopAll";
}Type Literal
ts
{
scene: string;
then?: "play" | "stop";
type: "scene";
}Type Literal
ts
{
frame: string;
section?: string;
then?: "play" | "stop";
type: "gotoNow";
}Type Literal
ts
{
frame: string;
section?: string;
then?: "play" | "stop";
type: "gotoAfter";
}Type Literal
ts
{
frame: string;
section?: string;
type: "playTo";
}Type Literal
ts
{
type: "nextFrame";
}Type Literal
ts
{
type: "prevFrame";
}Type Literal
ts
{
type: "nextScene";
}Type Literal
ts
{
type: "prevScene";
}object & PlaybackRamp
object & PlaybackRamp
Type Literal
ts
{
type: "stopSounds";
}Type Literal
ts
{
onEnd?: PlaybackAction[];
sound: string;
type: "playSound";
}Type Literal
ts
{
sound: string;
type: "stopSound";
}Type Literal
ts
{
type: "setVisible";
visible: boolean;
}Type Literal
ts
{
input: string;
type: "setInput";
value: | float
| boolean
| string
| {
x: float;
y: float;
};
}Type Literal
ts
{
frame: string;
section?: string;
times: uint;
type: "repeat";
}Type Literal
ts
{
frames: string[];
range?: {
from: uint;
to: uint;
};
then?: "play" | "stop";
type: "gotoRandom";
}Type Literal
ts
{
seconds: float;
type: "wait";
}Type Literal
ts
{
backward: boolean;
type: "setDirection";
}Type Literal
ts
{
args?: (float | string | boolean)[];
fn: string;
script: Id;
type: "call";
}calls fn(...args) of the target's script made from the script asset script (owner 2026-10-26: only the file and the function)
Type Literal
ts
{
name: string;
type: "emit";
value?: unknown;
}fires the event name on the target clip in the players, which BUBBLES up to the clips holding it (owner 2026-11-15: clip.on("footstep", e => …), e.frame / e.section / e.value). value is any plain JSON (unknown, like PluginData — a recursive type here breaks immer's drafts; document isJsonValue is the check).
Type Literal
ts
{
loop?: boolean;
parts?: string;
section: string;
type: "overlay";
}OVERLAY (owner gap plan 2026-11-22 #15): the players play section section of the target's own timeline on the parts parts (bone / layer names, "arm_R/*" = with everything under it, commas = several; absent = all) while its playhead goes on with the rest — pixi-hm05 clip.overlay. loop = until stopped, else once. section "" = stop the overlays on parts (absent = every overlay).
Type Literal
ts
{
blank?: boolean;
type: "openUrl";
url: string;
}CLICK lists only (owner 2026-11-26; a browser opens a page only from a click): opens url in this window, or a new one (blank)
Type Literal
ts
{
kind: string;
params?: Record<string, float | string | boolean>;
seconds: float;
type: "canned";
}plays canned motion kind (a CannedMotionKind of the catalogue @utils/pure/canned: no text, no 3D one — checked by the validator) on the target clip for seconds, on top of where its timeline puts it (owner 2026-11-26); a leaving motion holds its end unless params.hold is false