Animations ​Contract 2.0.0 · package sha256
a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e· generated fromconfigurator-runtime.d.tsbyservices/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.
Interface · import type { Animations } from '@holostep-configurators/runtime-client/contract'; · stable · since 2.0.0 · section 14. Animations
Clip writes are look-only and not in the write queue: outside a transaction each starts at once,
so plays called in the same task start in the same frame. Autocommit: play resolves when the clip
ends or holds its last frame; with loop: true it is open-ended and resolves once it has started
(idle() and capture() ignore it). Through a tx: play and pause resolve 'deferred' and
start when the commit is shown; stop and reset are staged, so worldPose, bounds() and
connectors() read frame 0 at once and the screen shows it at the commit.
target is a ModelNode nodeId, or the root Part of a collection model item
(collection(name).part(key), or the Part load() resolved with). The Part target is
experimental: check supports('animations.items') (one app so far; spec 3.1).
Clips of one model (a ModelNode's GLB or a model item's) that animate a common node or joint
are exclusive: play first stops every other such clip of that model at frame 0 (its next
toggle plays forward; its pending play resolves) and fires 'animation:stopped' for one that
was playing or paused. Clips on disjoint nodes play together (1.x animation.controller.ts:503-545).
Each run of a clip fires one 'animation:started' and then one 'animation:stopped' or
'animation:finished' (see Events).
| Member | Kind | Summary |
|---|---|---|
list |
method | Authored read: the clips of target, or of every loaded node and collection model item. |
play |
method | Plays a clip (look-only; a newer play of the same clip on that part takes it over). |
pause |
method | Pauses a playing clip where it is. |
stop |
method | The clip back to its first frame, stopped; its next toggle plays forward. |
reset |
method | Every clip of target (or of all nodes and items) back to its first frame, stopped; each one's next toggle plays forward. |
export interface Animations<C extends object = NoCommitOptions> {
list(target?: string | Part): ClipInfo[];
play(target: string | Part, clip: string, options?: C & PlayOptions): Promise<Report>;
pause(target: string | Part, clip: string, options?: C & SignalOption): Promise<Report>;
stop(target: string | Part, clip: string, options?: C & SignalOption): Promise<Report>;
reset(target?: string | Part, options?: C & SignalOption): Promise<Report>;
}
| Rule | Result |
|---|---|
| 1. Neutral name | pass: Animations names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | pass: 21 apps (fleet cross-check: app-04c2774145, app-0c773a4ee3, app-37356bf09f, app-4762caacdc, app-4fd23bc869, app-822bb9d6aa, app-8675b3225c, app-b362a81c85 and 13 more) |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |