@rig-c/play 1.29.0 → 1.30.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/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { b, D, R, h, d, l, n, i, j, k } from "./_play-runtime.js";
1
+ import { b, D, R, i, d, l, n, j, k, m } from "./_play-runtime.js";
2
2
  export {
3
3
  b as CanvasRenderer,
4
4
  D as DomRenderer,
5
5
  R as RigPlayer,
6
- h as createAtlasRegions,
6
+ i as createAtlasRegions,
7
7
  d as discoverTurnDials,
8
8
  l as loadModel,
9
9
  n as normalizedDial,
10
- i as readSetupMesh,
11
- j as revokeRegions,
12
- k as unpackRegions
10
+ j as readSetupMesh,
11
+ k as revokeRegions,
12
+ m as unpackRegions
13
13
  };
14
14
  //# sourceMappingURL=index.js.map
package/docs/REFERENCE.md CHANGED
@@ -545,13 +545,14 @@ a skeletal clip shared by planes with different shifts uses a polygon moved
545
545
  with each distinct shift. Omitting the report, supplying report /1, or
546
546
  selecting an unkeyed /2 take uses the existing fixed-stage path.
547
547
 
548
- On a looping, digest-bound keyed take in Parallax, a Parts `scene_driven`
549
- declaration can give the view and the listed numeric bone timelines their
550
- own phase. The pointer eases their playback rate to zero over
548
+ On a looping, digest-bound keyed take, a Parts `scene_driven` declaration
549
+ can give the view and the listed numeric bone timelines their own phase.
550
+ Parallax enables this by default. Set `hoverHold: true` to enable it in Fixed
551
+ with zero pointer displacement. The pointer eases their playback rate to zero over
551
552
  `transitionMs`, holds the continuous phase reached at the end of that
552
553
  transition, then eases back to full rate from that phase on leave. Life
553
554
  timelines, events and physics keep their existing clocks. Pointer turn
554
- continues to blend each bound axis toward the pointer. A scene-keyed dial
555
+ in Parallax continues to blend each bound axis toward the pointer. A scene-keyed dial
555
556
  blends back toward its scene sample, and a character-keyed dial toward its
556
557
  live sample. Set `pointerTurn: false` to keep each dial on its authored phase.
557
558
  Touch leaves the scene clock automatic.
@@ -560,11 +561,11 @@ Touch leaves the scene clock automatic.
560
561
  | --- | --- |
561
562
  | `player.pause()` and `player.resume()` | The scene phase and player track time freeze in place and resume with the same offset. |
562
563
  | `player.seek()`, replay, or a take change | Both phases start from the resulting player track time. With the pointer inside, the scene holds immediately at that phase. |
563
- | Camera mode change | The scene phase starts from the current player track time when returning to Parallax. With the pointer inside, it holds immediately. Fixed and Pan follow the live pose and view. |
564
+ | Camera mode change | A mode with scene hold starts its scene phase from the current player track time. With the pointer inside, it holds immediately. A mode without scene hold follows the live pose and view. |
564
565
 
565
566
  `sceneHandoff` on the mount reports `behavior: 'hold'` with the unwrapped
566
- compiled `phase`, or `'additive'` with a null phase. With a declaration
567
- outside this mode's scope it reports `'refused'`, a null phase, and a
567
+ compiled `phase`, or `'additive'` with a null phase. If the scene hold
568
+ binding is refused during playback it reports `'refused'`, a null phase, and a
568
569
  `reason` naming the address or backdrop dependency when applicable. Refusals
569
570
  retain the existing camera behavior. The hold accepts numeric bone properties
570
571
  only, and the backdrop must depend on the scene phase alone. One-shots,
@@ -622,6 +623,7 @@ pixels.
622
623
  | `transitionMs` | 120 ms in each direction. |
623
624
  | `autoSweep` | Omitted. Automatic sweep is opt-in. The demo's **Automatic and pointer** setting uses a 12-second period and `{ x: 24, y: 0 }` CSS px before gains. |
624
625
  | `pointerTurn` | Enabled. Set `false` for camera-only control. |
626
+ | `hoverHold` | Enabled in Parallax, disabled in Fixed and Pan. Set `false` to disable Parallax hold. Set `true` in Fixed to require a valid scene hold binding. Pan refuses `true`. |
625
627
 
626
628
  Use `take.setCamera()` with `'fixed'`, `'pan'` or `'parallax'`. Fixed plays
627
629
  the authored pose with the camera at rest. Pan uses gain 1 on each plane.
@@ -687,6 +689,8 @@ successful `setCamera()` clears that status.
687
689
  | `COMPOSED_BACKDROP_COVERAGE` | Invalid plate geometry, inadequate stage coverage or unavailable opacity readback on the fixed-stage path, or insufficient sampled margin for extra displacement on a keyed take |
688
690
  | `COMPOSED_INVALID_DISPLACEMENT` | Invalid excursion, sweep period, transition duration or gain |
689
691
  | `COMPOSED_INVALID_CAMERA` | Unrecognized mode |
692
+ | `COMPOSED_HOVER_HOLD_UNSUPPORTED_MODE` | `hoverHold: true` with Pan |
693
+ | `COMPOSED_HOVER_HOLD_UNAVAILABLE` | Selecting Fixed with `hoverHold: true` and a missing or refused scene hold binding |
690
694
  | `COMPOSED_PLATE_TRACK` | Unsupported plate track or gain binding, or a sweep combined with baked travel |
691
695
  | `SCENE_CAMERA_REPORT_INVALID` | Missing, unreadable or malformed declared scene report or camera data |
692
696
  | `SCENE_CAMERA_REPORT_TOO_LARGE` | Raw UTF-8 report exceeds the consumer byte budget |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rig-c/play",
3
- "version": "1.29.0",
3
+ "version": "1.30.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",
@@ -89,6 +89,9 @@
89
89
  "prebuild": "bash scripts/fetch-assets.sh",
90
90
  "build": "tsc --noEmit && vite build",
91
91
  "build:lib": "rm -rf dist && node scripts/build-lib.mjs dist",
92
+ "hooks": "([ -e .git ] && [ -f .githooks/pre-commit ] && [ \"$(git config --get core.hooksPath 2>/dev/null)\" != .githooks ] && git rev-parse --git-dir >/dev/null 2>&1 && git config core.hooksPath .githooks >/dev/null 2>&1 || true)",
93
+ "typecheck": "bun run hooks && tsc --noEmit",
94
+ "lint": "bun run hooks && eslint .",
92
95
  "prepublishOnly": "node -e \"console.error('Publish the release tarball produced by scripts/pack-release.mjs. See RELEASING.md.'); process.exit(1)\"",
93
96
  "preview": "vite preview",
94
97
  "test": "playwright test",
@@ -100,10 +103,12 @@
100
103
  "devDependencies": {
101
104
  "@esotericsoftware/spine-webgl": "4.3.13",
102
105
  "@playwright/test": "1.62.1",
103
- "@rig-c/core": "3.7.0",
104
- "@rig-c/parts": "2.37.0",
106
+ "@rig-c/core": "3.12.0",
107
+ "@rig-c/parts": "2.70.0",
105
108
  "@types/node": "^22",
109
+ "eslint": "10.16.0",
106
110
  "typescript": "^5.6.0",
111
+ "typescript-eslint": "8.74.0",
107
112
  "vite": "^6.0.0"
108
113
  }
109
114
  }