rig-play 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,19 @@ export interface LoadModelOptions {
28
28
  crossOrigin?: string;
29
29
  /** fetch implementation, for custom headers or a test double. */
30
30
  fetch?: typeof globalThis.fetch;
31
+ /**
32
+ * What the region cut produces — the rigid tier's per-region bitmaps, which
33
+ * only the DOM mode draws. `'blob'` (the default): `blob:` URLs the load
34
+ * owns and `dispose` frees. `'data'`: `data:` URLs, for a content policy or
35
+ * a snapshot that does not carry `blob:`; nothing to free. `'none'`: no cut
36
+ * at all, for a load that only ever draws in the canvas mode — the pages
37
+ * are loaded, `regionImages` is empty, and a DOM-mode player opened on the
38
+ * assets is refused by name.
39
+ */
40
+ regions?: RegionLoading;
31
41
  }
42
+ /** `LoadModelOptions.regions`: how, or whether, the regions are cut. */
43
+ export type RegionLoading = 'blob' | 'data' | 'none';
32
44
  /**
33
45
  * What `new RigPlayer(root, assets)` draws from. The caller owns it: one load
34
46
  * can back any number of players, and nothing a player does disposes it.
@@ -44,9 +56,15 @@ export interface ModelAssets {
44
56
  /** Every skin the document declares, in its order. */
45
57
  readonly skins: readonly string[];
46
58
  /**
47
- * The setup pose's box in world units (Y up) as the document states it —
48
- * the rig's own framing, for laying out a stage — or null where it states
49
- * none.
59
+ * The document's `stage` section, in world units (Y up): the stage the
60
+ * build declared — the rig's own framing, for laying out a stage — or null
61
+ * where the document has none. Where its value comes from is rigc's rule,
62
+ * not this package's (rigc `docs/AUTHORING.md`, *Where the rebuild's stage
63
+ * comes from*): a source that states a stage is written as stated, and a
64
+ * source that states none gets the setup pose's bounding box in its place.
65
+ * So one rig's `stage` is a declared frame and another's is a box, and the
66
+ * field does not say which. For the box of what a pose draws, read
67
+ * `player.bounds()`.
50
68
  */
51
69
  readonly stage: {
52
70
  readonly x: number;
@@ -54,7 +72,9 @@ export interface ModelAssets {
54
72
  readonly width: number;
55
73
  readonly height: number;
56
74
  } | null;
57
- /** Unpacked per-region bitmaps, keyed by region name — the rigid tier's. */
75
+ /** How the regions were cut (`LoadModelOptions.regions`): `'none'` means `regionImages` is empty and only the canvas mode can draw. */
76
+ readonly regions: RegionLoading;
77
+ /** Unpacked per-region bitmaps, keyed by region name — the rigid tier's. Empty on a `regions: 'none'` load. */
58
78
  readonly regionImages: Map<string, RegionImage>;
59
79
  /** Page images, keyed by the document's page names — the mesh tier's. */
60
80
  readonly pageImages: Map<string, HTMLImageElement>;
@@ -1 +1 @@
1
- {"version":3,"file":"loadModel.d.ts","sourceRoot":"","sources":["../src/loadModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAgC,MAAM,iBAAiB,CAAC;AAEjF;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7D;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzF,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC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G;AACH,MAAM,WAAW,WAAW;IAC1B,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzF,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACnH,uIAAuI;IACvI,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,+GAA+G;IAC/G,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAChD,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACnD;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC;;;;OAIG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAgED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,CA0C/E"}
package/dist/player.d.ts CHANGED
@@ -46,6 +46,48 @@ export interface RigEvent {
46
46
  int: number;
47
47
  float: number;
48
48
  string: string | null;
49
+ /**
50
+ * The track whose current entry fired it. The core's pose lists a step's
51
+ * events in track order without naming the track, so the player attributes
52
+ * them by counting what each track's current entry fires over the step;
53
+ * when that count does not match the pose (an entry replaced inside the
54
+ * step), the step's events carry no track rather than a guessed one.
55
+ */
56
+ track?: number;
57
+ }
58
+ /** What `on('complete', …)` hands a listener: the entry that completed, and its track. */
59
+ export interface RigComplete {
60
+ animation: string;
61
+ track: number;
62
+ }
63
+ /** How `play` starts an entry, and `queue` queues one. */
64
+ export interface PlayOptions {
65
+ /** Loop; true by default. */
66
+ loop?: boolean;
67
+ /** The track; 0 by default. A base on 0, a layer over it on 1, a one-shot on 2. */
68
+ track?: number;
69
+ /** Seconds the entry this one replaces mixes out over; 0 (the default) cuts. */
70
+ mix?: number;
71
+ }
72
+ export interface QueueOptions extends PlayOptions {
73
+ /**
74
+ * At or below 0 (the default 0): the entry starts when the one before it
75
+ * completes, less this entry's `mix` — a one-shot then mixes into the next
76
+ * over its last `mix` seconds. Above 0: that many seconds after the entry
77
+ * before it starts.
78
+ */
79
+ delay?: number;
80
+ }
81
+ /** A track's current entry as the player reads it (`entry(track)`). */
82
+ export interface TrackEntry {
83
+ /** What it plays; null for the empty animation a `clear` left. */
84
+ animation: string | null;
85
+ loop: boolean;
86
+ /** The entry's own track time, from its start. */
87
+ trackTime: number;
88
+ /** The animation time it applies at now: the track time wrapped, or held at the duration. */
89
+ animationTime: number;
90
+ duration: number;
49
91
  }
50
92
  type Listener<T> = (payload: T) => void;
51
93
  /**
@@ -132,12 +174,32 @@ export declare class RigPlayer {
132
174
  private readonly root;
133
175
  private readonly assets;
134
176
  private readonly meshBackend;
135
- private readonly view;
136
- private readonly source;
177
+ private view;
178
+ private source;
179
+ private readonly read;
180
+ private skinName;
137
181
  private readonly seekStep;
182
+ /**
183
+ * The single live track (`openTrack`): what a plain `play` on track 0 runs
184
+ * on, as every 1.x player did — one animation, every construct the core
185
+ * poses, `seek` and a skin change by reopening. Null once the player is
186
+ * composed.
187
+ */
138
188
  private track;
189
+ /**
190
+ * The live tracks (`openTracks`): opened by the first composing call — a
191
+ * `play` with a mix or on another track, a `queue`, a `clear` — from the
192
+ * single track's animation stepped to its time. The mixing is the Spine
193
+ * runtime's, which does not mix a constraint, sequence, draw-order or
194
+ * path-deform timeline, so such an animation is refused here and plays on
195
+ * the single track only.
196
+ */
197
+ private tracks;
198
+ /** Track 0's animation and loop as `play` last set them — what `seek` and a skin change reopen. */
139
199
  private animation;
140
200
  private loop;
201
+ /** One past the highest track touched — how many `current(track)` reads a step takes. */
202
+ private trackCount;
141
203
  private paused;
142
204
  private pose;
143
205
  private setup;
@@ -156,32 +218,81 @@ export declare class RigPlayer {
156
218
  get mode(): RenderMode;
157
219
  set mode(mode: RenderMode);
158
220
  private create;
159
- /** The animation the track is playing, or null before `play`. */
221
+ /** What track 0 plays, or null before `play` and after a `clear` of track 0 has mixed out. */
160
222
  get current(): string | null;
161
- /** The track time — the running sum of the steps since `play` (or the last `seek`). */
223
+ /** The player's time — the running sum of the steps since `play` (or the last `seek`). */
162
224
  get time(): number;
163
225
  /**
164
- * Opens `name` on the track at its first pose, the physics reset there. The
165
- * pose is drawn on the next `frame`.
226
+ * Plays `name` on a track — track 0 by default, which is what `play(name)`
227
+ * has always meant: the first `play` opens the tracks at their first pose
228
+ * with the physics reset there, and the pose is drawn on the next `frame`.
229
+ * Later calls replace what the track plays: the entry it replaces mixes out
230
+ * over `mix` seconds (0 cuts), and every entry queued on that track is
231
+ * dropped. The pose the player holds is re-posed at once, so a held player
232
+ * shows the change on its next `draw`. The mixing is the Spine runtime's,
233
+ * which rig-c holds at tolerance 0; an animation keying what the tracks do
234
+ * not mix — a constraint, a sequence, the draw order, a path's deform — is
235
+ * refused here, by name, in the core's words.
166
236
  */
167
- play(name: string, options?: {
168
- loop?: boolean;
237
+ play(name: string, options?: PlayOptions): void;
238
+ /**
239
+ * Queues `name` after the last entry on `track` (`QueueOptions`): with
240
+ * `delay` at or below 0 it starts when that entry completes less its own
241
+ * `mix`, so a one-shot hands over to it across a mix; on an empty track it
242
+ * is set. Before any `play`, the tracks are opened for it.
243
+ */
244
+ queue(name: string, options?: QueueOptions): void;
245
+ /**
246
+ * Mixes `track` out to nothing over `mix` seconds — the layer or one-shot
247
+ * gone and the tracks below showing through. Track 0 cleared shows the
248
+ * setup pose. The pose the player holds is re-posed at once.
249
+ */
250
+ clear(track?: number, options?: {
251
+ mix?: number;
252
+ }): void;
253
+ /**
254
+ * Queues a mix out to nothing after the last entry on `track`, over `mix`
255
+ * seconds; with `delay` 0 (the default) the mix ends as that entry
256
+ * completes, so a one-shot queued this way plays once and fades out over
257
+ * its last `mix` seconds.
258
+ */
259
+ queueClear(track?: number, options?: {
260
+ mix?: number;
261
+ delay?: number;
169
262
  }): void;
263
+ /** `track`'s current entry, or null where it plays nothing (and before `play`). */
264
+ entry(track?: number): TrackEntry | null;
265
+ /** Whether the player is composed: on the live tracks rather than the single track. */
266
+ get composed(): boolean;
267
+ /**
268
+ * The live tracks, opened by the first composing call. A single track in
269
+ * play is carried over by replay: track 0 set to its animation, pose 0 taken
270
+ * by `start()` (the player's — nothing steps before it) and the tracks
271
+ * stepped to the single track's time in `seekStep` increments, so a physics
272
+ * rig's history restarts there and nothing is fired on the way.
273
+ */
274
+ private compose;
170
275
  /** Stops stepping; `frame` keeps drawing the pose it holds. */
171
276
  pause(): void;
172
277
  /** Resumes stepping after `pause`. */
173
278
  resume(): void;
174
279
  /**
175
- * Moves the track to `time`: the animation is reopened and stepped forward
176
- * in `seekStep` increments (the last one shorter) until the track time
177
- * reaches `time`. Events and completes crossed on the way are not fired.
280
+ * Moves a single animation on track 0 to `time`: the tracks are reopened
281
+ * with that animation and stepped forward in `seekStep` increments (the
282
+ * last one shorter) until the time is reached. Events and completes crossed
283
+ * on the way are not fired. It has a meaning for one animation on one
284
+ * track only — the player cannot replay when a mix, a second track or a
285
+ * queue was asked for — so after any of those it refuses by name; step the
286
+ * player forward instead.
178
287
  */
179
288
  seek(time: number): void;
289
+ /** The single track opened again with track 0's animation as `play` last set it, at pose 0. */
290
+ private reopen;
291
+ /** Steps whatever is open forward to `time` in `seekStep` increments, the last one shorter. */
292
+ private stepTo;
180
293
  /** Adds a listener; returns a function that removes it. */
181
294
  on(type: 'event', listener: Listener<RigEvent>): () => void;
182
- on(type: 'complete', listener: Listener<{
183
- animation: string;
184
- }>): () => void;
295
+ on(type: 'complete', listener: Listener<RigComplete>): () => void;
185
296
  /**
186
297
  * Advances the track by `dt × timeScale` seconds and draws the pose —
187
298
  * `advance(dt)` then `draw()`.
@@ -196,6 +307,18 @@ export declare class RigPlayer {
196
307
  advance(dt: number): void;
197
308
  /** Draws the pose the player holds. */
198
309
  draw(): void;
310
+ /**
311
+ * The skin the rig is posed under — `RigPlayerOptions.skin`, or undefined
312
+ * for no skin set. Setting it re-resolves the pose under the new skin
313
+ * (which attachment each slot shows, which bones and constraints are
314
+ * active) and keeps the animation, its loop and its track time: the track
315
+ * is reopened under the new skin and stepped to the same time the way
316
+ * `seek` does, so a physics rig's history restarts there and nothing is
317
+ * fired on the way. The pose is drawn on the next `draw`/`frame`. An
318
+ * unknown skin is refused by name, and the player is left as it was.
319
+ */
320
+ get skin(): string | undefined;
321
+ set skin(name: string | undefined);
199
322
  /**
200
323
  * The per-pose adjustment of bone locals (`BoneAdjust`), or null for none.
201
324
  * It is applied by every track the player opens — `play`, the reopen inside
@@ -237,16 +360,18 @@ export declare class RigPlayer {
237
360
  posedFrame(): PosedFrame;
238
361
  /** Removes the renderer's elements and hands its GPU pages back. The assets stay the caller's. */
239
362
  dispose(): void;
240
- private open;
241
- /**
242
- * The step's events, then its complete. The core fires the keys
243
- * (`pose.events`, in the runtime's order across a wrap) and leaves
244
- * `complete` to the player, which derives it from the track time and the
245
- * duration: on a looping track, once on a step whose whole cycles rose past
246
- * 0 (rig-c `src/core/track.ts`, *Across the wrap*); on a held one, on the
247
- * step that reaches the duration. The runtime queues a looping complete
248
- * between the keys before the wrap and the keys after it; this player
249
- * dispatches it after all of the step's keys.
363
+ /** The single track's step: its events (track 0) and its complete, as every 1.x player fired them. */
364
+ private dispatchSingle;
365
+ /**
366
+ * The step's events, then its completes, each with its track. The core
367
+ * fires a track's keys from its current entry (`pose.events`, in track
368
+ * order and in the runtime's order across a wrap) — an entry mixing out
369
+ * fires none — and leaves `complete` to the player, which derives it per
370
+ * track from that track's current entry: on a looping entry, once on a step
371
+ * whose whole cycles rose; on a held one, on the step that reaches its
372
+ * duration. An entry replaced inside the step — by `play`, or by a queued
373
+ * entry starting at its completion less the mix — is no longer current and
374
+ * completes no more than it fires, which is the runtime's rule too.
250
375
  */
251
376
  private dispatch;
252
377
  }
@@ -1 +1 @@
1
- {"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../src/player.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAA0C,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE1F;;;;;;;;;GASG;AAEH;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE1C,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,qGAAqG;IACrG,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sFAAsF;IACtF,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,8EAA8E;AAC9E,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ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GAAG,MAAM,IAAI;IAC3D,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,MAAM,IAAI;IAOjE;;;OAGG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAKvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAmBzB,uCAAuC;IACvC,IAAI,IAAI,IAAI;IAKZ;;;;;;;;;OASG;IACH,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CAE7B;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAahC;IAED;;;;;;;OAOG;IACH,IAAI,MAAM,IAAI,UAAU,GAAG,IAAI,CAE9B;IAED,IAAI,MAAM,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,EAI/B;IAED;;;;;;OAMG;IACH,MAAM,IAAI,IAAI;IAMd;;;;;OAKG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS;IAsB7B;;;;;;;;OAQG;IACH,MAAM,IAAI,UAAU,GAAG,IAAI;IA6B3B,+FAA+F;IAC/F,OAAO,CAAC,KAAK;IAMb,yEAAyE;IACzE,UAAU,IAAI,UAAU;IAKxB,kGAAkG;IAClG,OAAO,IAAI,IAAI;IAOf,sGAAsG;IACtG,OAAO,CAAC,cAAc;IAmBtB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,QAAQ;CAsDjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rig-play",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Plays skeleton.model.json written by rigc build as plain DOM elements — rigid slots as <img> posed by CSS matrix, deform meshes on small per-part canvases — or as one canvas.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,7 +57,7 @@
57
57
  "devDependencies": {
58
58
  "@playwright/test": "1.62.1",
59
59
  "@types/node": "^22",
60
- "rig-c": "2.36.0",
60
+ "rig-c": "2.37.0",
61
61
  "typescript": "^5.6.0",
62
62
  "vite": "^6.0.0"
63
63
  }