rig-play 1.4.0 → 1.6.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.
package/dist/player.d.ts CHANGED
@@ -27,6 +27,8 @@ export interface RigPlayerOptions {
27
27
  skin?: string;
28
28
  /** The per-pose adjustment of bone locals (`player.adjust`), set from the first pose. */
29
29
  adjust?: BoneAdjust | null;
30
+ /** Which slots this player draws (`player.slots`); every slot when absent. */
31
+ slots?: SlotFilter | null;
30
32
  /** How the player draws (see `RenderMode`). Default `'dom'`. Can be changed later through `mode`. */
31
33
  mode?: RenderMode;
32
34
  /** The mesh tier's rasterizer (see `DomRenderer.meshBackend`) — the DOM mode only. */
@@ -46,6 +48,48 @@ export interface RigEvent {
46
48
  int: number;
47
49
  float: number;
48
50
  string: string | null;
51
+ /**
52
+ * The track whose current entry fired it. The core's pose lists a step's
53
+ * events in track order without naming the track, so the player attributes
54
+ * them by counting what each track's current entry fires over the step;
55
+ * when that count does not match the pose (an entry replaced inside the
56
+ * step), the step's events carry no track rather than a guessed one.
57
+ */
58
+ track?: number;
59
+ }
60
+ /** What `on('complete', …)` hands a listener: the entry that completed, and its track. */
61
+ export interface RigComplete {
62
+ animation: string;
63
+ track: number;
64
+ }
65
+ /** How `play` starts an entry, and `queue` queues one. */
66
+ export interface PlayOptions {
67
+ /** Loop; true by default. */
68
+ loop?: boolean;
69
+ /** The track; 0 by default. A base on 0, a layer over it on 1, a one-shot on 2. */
70
+ track?: number;
71
+ /** Seconds the entry this one replaces mixes out over; 0 (the default) cuts. */
72
+ mix?: number;
73
+ }
74
+ export interface QueueOptions extends PlayOptions {
75
+ /**
76
+ * At or below 0 (the default 0): the entry starts when the one before it
77
+ * completes, less this entry's `mix` — a one-shot then mixes into the next
78
+ * over its last `mix` seconds. Above 0: that many seconds after the entry
79
+ * before it starts.
80
+ */
81
+ delay?: number;
82
+ }
83
+ /** A track's current entry as the player reads it (`entry(track)`). */
84
+ export interface TrackEntry {
85
+ /** What it plays; null for the empty animation a `clear` left. */
86
+ animation: string | null;
87
+ loop: boolean;
88
+ /** The entry's own track time, from its start. */
89
+ trackTime: number;
90
+ /** The animation time it applies at now: the track time wrapped, or held at the duration. */
91
+ animationTime: number;
92
+ duration: number;
49
93
  }
50
94
  type Listener<T> = (payload: T) => void;
51
95
  /**
@@ -110,6 +154,13 @@ export interface BoneWorld {
110
154
  scaleX: number;
111
155
  scaleY: number;
112
156
  }
157
+ /**
158
+ * Which slots a player draws: an allow list of slot names, or a predicate
159
+ * over the name. The pose is the whole rig's whatever the filter — bones,
160
+ * constraints, physics, `bone()` and `adjust` are untouched — and only the
161
+ * draw is filtered. A clipping slot the filter leaves out does not clip.
162
+ */
163
+ export type SlotFilter = readonly string[] | ((slot: string) => boolean);
113
164
  /** A box in world units, Y up: `y` is the bottom edge. */
114
165
  export interface PoseBounds {
115
166
  x: number;
@@ -137,13 +188,34 @@ export declare class RigPlayer {
137
188
  private readonly read;
138
189
  private skinName;
139
190
  private readonly seekStep;
191
+ /**
192
+ * The single live track (`openTrack`): what a plain `play` on track 0 runs
193
+ * on, as every 1.x player did — one animation, every construct the core
194
+ * poses, `seek` and a skin change by reopening. Null once the player is
195
+ * composed.
196
+ */
140
197
  private track;
198
+ /**
199
+ * The live tracks (`openTracks`): opened by the first composing call — a
200
+ * `play` with a mix or on another track, a `queue`, a `clear` — from the
201
+ * single track's animation stepped to its time. The mixing is the Spine
202
+ * runtime's, which does not mix a constraint, sequence, draw-order or
203
+ * path-deform timeline, so such an animation is refused here and plays on
204
+ * the single track only.
205
+ */
206
+ private tracks;
207
+ /** Track 0's animation and loop as `play` last set them — what `seek` and a skin change reopen. */
141
208
  private animation;
142
209
  private loop;
210
+ /** One past the highest track touched — how many `current(track)` reads a step takes. */
211
+ private trackCount;
143
212
  private paused;
144
213
  private pose;
145
214
  private setup;
146
215
  private adjustFn;
216
+ private slotFilter;
217
+ /** `slotFilter` as a predicate; every slot when null. */
218
+ private draws;
147
219
  /** Handed to every track the player opens; reads the current `adjust` so setting it later needs no reopen. */
148
220
  private readonly adjustHook;
149
221
  private readonly listeners;
@@ -158,34 +230,81 @@ export declare class RigPlayer {
158
230
  get mode(): RenderMode;
159
231
  set mode(mode: RenderMode);
160
232
  private create;
161
- /** The animation the track is playing, or null before `play`. */
233
+ /** What track 0 plays, or null before `play` and after a `clear` of track 0 has mixed out. */
162
234
  get current(): string | null;
163
- /** The track time — the running sum of the steps since `play` (or the last `seek`). */
235
+ /** The player's time — the running sum of the steps since `play` (or the last `seek`). */
164
236
  get time(): number;
165
237
  /**
166
- * Opens `name` on the track at its first pose, the physics reset there. The
167
- * pose is drawn on the next `frame`.
238
+ * Plays `name` on a track — track 0 by default, which is what `play(name)`
239
+ * has always meant: the first `play` opens the tracks at their first pose
240
+ * with the physics reset there, and the pose is drawn on the next `frame`.
241
+ * Later calls replace what the track plays: the entry it replaces mixes out
242
+ * over `mix` seconds (0 cuts), and every entry queued on that track is
243
+ * dropped. The pose the player holds is re-posed at once, so a held player
244
+ * shows the change on its next `draw`. The mixing is the Spine runtime's,
245
+ * which rig-c holds at tolerance 0; an animation keying what the tracks do
246
+ * not mix — a constraint, a sequence, the draw order, a path's deform — is
247
+ * refused here, by name, in the core's words.
168
248
  */
169
- play(name: string, options?: {
170
- loop?: boolean;
249
+ play(name: string, options?: PlayOptions): void;
250
+ /**
251
+ * Queues `name` after the last entry on `track` (`QueueOptions`): with
252
+ * `delay` at or below 0 it starts when that entry completes less its own
253
+ * `mix`, so a one-shot hands over to it across a mix; on an empty track it
254
+ * is set. Before any `play`, the tracks are opened for it.
255
+ */
256
+ queue(name: string, options?: QueueOptions): void;
257
+ /**
258
+ * Mixes `track` out to nothing over `mix` seconds — the layer or one-shot
259
+ * gone and the tracks below showing through. Track 0 cleared shows the
260
+ * setup pose. The pose the player holds is re-posed at once.
261
+ */
262
+ clear(track?: number, options?: {
263
+ mix?: number;
264
+ }): void;
265
+ /**
266
+ * Queues a mix out to nothing after the last entry on `track`, over `mix`
267
+ * seconds; with `delay` 0 (the default) the mix ends as that entry
268
+ * completes, so a one-shot queued this way plays once and fades out over
269
+ * its last `mix` seconds.
270
+ */
271
+ queueClear(track?: number, options?: {
272
+ mix?: number;
273
+ delay?: number;
171
274
  }): void;
275
+ /** `track`'s current entry, or null where it plays nothing (and before `play`). */
276
+ entry(track?: number): TrackEntry | null;
277
+ /** Whether the player is composed: on the live tracks rather than the single track. */
278
+ get composed(): boolean;
279
+ /**
280
+ * The live tracks, opened by the first composing call. A single track in
281
+ * play is carried over by replay: track 0 set to its animation, pose 0 taken
282
+ * by `start()` (the player's — nothing steps before it) and the tracks
283
+ * stepped to the single track's time in `seekStep` increments, so a physics
284
+ * rig's history restarts there and nothing is fired on the way.
285
+ */
286
+ private compose;
172
287
  /** Stops stepping; `frame` keeps drawing the pose it holds. */
173
288
  pause(): void;
174
289
  /** Resumes stepping after `pause`. */
175
290
  resume(): void;
176
291
  /**
177
- * Moves the track to `time`: the animation is reopened and stepped forward
178
- * in `seekStep` increments (the last one shorter) until the track time
179
- * reaches `time`. Events and completes crossed on the way are not fired.
292
+ * Moves a single animation on track 0 to `time`: the tracks are reopened
293
+ * with that animation and stepped forward in `seekStep` increments (the
294
+ * last one shorter) until the time is reached. Events and completes crossed
295
+ * on the way are not fired. It has a meaning for one animation on one
296
+ * track only — the player cannot replay when a mix, a second track or a
297
+ * queue was asked for — so after any of those it refuses by name; step the
298
+ * player forward instead.
180
299
  */
181
300
  seek(time: number): void;
182
- /** Steps the freshly opened track forward to `time` in `seekStep` increments, the last one shorter. */
301
+ /** The single track opened again with track 0's animation as `play` last set it, at pose 0. */
302
+ private reopen;
303
+ /** Steps whatever is open forward to `time` in `seekStep` increments, the last one shorter. */
183
304
  private stepTo;
184
305
  /** Adds a listener; returns a function that removes it. */
185
306
  on(type: 'event', listener: Listener<RigEvent>): () => void;
186
- on(type: 'complete', listener: Listener<{
187
- animation: string;
188
- }>): () => void;
307
+ on(type: 'complete', listener: Listener<RigComplete>): () => void;
189
308
  /**
190
309
  * Advances the track by `dt × timeScale` seconds and draws the pose —
191
310
  * `advance(dt)` then `draw()`.
@@ -212,6 +331,15 @@ export declare class RigPlayer {
212
331
  */
213
332
  get skin(): string | undefined;
214
333
  set skin(name: string | undefined);
334
+ /**
335
+ * Which slots this player draws (`SlotFilter`), or null for every slot.
336
+ * Settable on a live player: the next `draw` shows it, and `bounds()` reads
337
+ * the drawn slots. An allow list naming a slot the document does not have
338
+ * is refused by name. The pose is the whole rig's: `bone()`, `adjust`, the
339
+ * events and the tracks see no filter.
340
+ */
341
+ get slots(): SlotFilter | null;
342
+ set slots(filter: SlotFilter | null);
215
343
  /**
216
344
  * The per-pose adjustment of bone locals (`BoneAdjust`), or null for none.
217
345
  * It is applied by every track the player opens — `play`, the reopen inside
@@ -249,20 +377,28 @@ export declare class RigPlayer {
249
377
  bounds(): PoseBounds | null;
250
378
  /** The pose the reads above see: the track's, or the setup pose before `play` (posed once). */
251
379
  private posed;
252
- /** The pose the player holds, as the frame record the renderer draws. */
253
- posedFrame(): PosedFrame;
380
+ /**
381
+ * The pose the player holds, as the frame record the renderer draws — under
382
+ * this player's `slots` filter, or under `slots` given here instead (a
383
+ * second renderer over the same assets drawing this player's pose on
384
+ * another root: `other.render(player.posedFrame(['hand_f']))`, the one rig
385
+ * posed once).
386
+ */
387
+ posedFrame(slots?: SlotFilter | null): PosedFrame;
254
388
  /** Removes the renderer's elements and hands its GPU pages back. The assets stay the caller's. */
255
389
  dispose(): void;
256
- private open;
390
+ /** The single track's step: its events (track 0) and its complete, as every 1.x player fired them. */
391
+ private dispatchSingle;
257
392
  /**
258
- * The step's events, then its complete. The core fires the keys
259
- * (`pose.events`, in the runtime's order across a wrap) and leaves
260
- * `complete` to the player, which derives it from the track time and the
261
- * duration: on a looping track, once on a step whose whole cycles rose past
262
- * 0 (rig-c `src/core/track.ts`, *Across the wrap*); on a held one, on the
263
- * step that reaches the duration. The runtime queues a looping complete
264
- * between the keys before the wrap and the keys after it; this player
265
- * dispatches it after all of the step's keys.
393
+ * The step's events, then its completes, each with its track. The core
394
+ * fires a track's keys from its current entry (`pose.events`, in track
395
+ * order and in the runtime's order across a wrap) — an entry mixing out
396
+ * fires none — and leaves `complete` to the player, which derives it per
397
+ * track from that track's current entry: on a looping entry, once on a step
398
+ * whose whole cycles rose; on a held one, on the step that reaches its
399
+ * duration. An entry replaced inside the step — by `play`, or by a queued
400
+ * entry starting at its completion less the mix — is no longer current and
401
+ * completes no more than it fires, which is the runtime's rule too.
266
402
  */
267
403
  private dispatch;
268
404
  }
@@ -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,KAAK,EAAE,MAAM,CAAC;IACd,M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AsB7B;;;;;;;;OAQG;IACH,MAAM,IAAI,UAAU,GAAG,IAAI;IA6B3B,+FAA+F;IAC/F,OAAO,CAAC,KAAK;IAMb;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU;IAMjD,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.4.0",
3
+ "version": "1.6.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
  }