@rig-c/play 1.26.0 → 1.28.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/README.md +29 -11
- package/dist/CanvasRenderer.d.ts.map +1 -1
- package/dist/MeshGlBlitter.d.ts.map +1 -1
- package/dist/_play-runtime.js +15079 -0
- package/dist/_play-runtime.js.map +1 -0
- package/dist/composed-camera.d.ts +30 -0
- package/dist/composed-camera.d.ts.map +1 -0
- package/dist/composed-take.d.ts +124 -0
- package/dist/composed-take.d.ts.map +1 -0
- package/dist/composed-take.js +1536 -0
- package/dist/composed-take.js.map +1 -0
- package/dist/index.js +11 -14975
- package/dist/index.js.map +1 -1
- package/dist/scene-camera.d.ts +28 -0
- package/dist/scene-camera.d.ts.map +1 -0
- package/docs/MIGRATION.md +201 -0
- package/docs/REFERENCE.md +1482 -0
- package/docs/STABILITY.md +56 -0
- package/package.json +18 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="
|
|
2
|
+
<img src="assets/banner.svg" alt="@rig-c/play — Plays rig-c's compiled model as plain DOM elements or one canvas" width="100%" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
@@ -17,8 +17,9 @@ DOM**: one absolutely-positioned `<img>` per rigid slot, posed with a single CSS
|
|
|
17
17
|
as **one canvas** per player. It poses through rigc's bundled `@rig-c/core/runtime`
|
|
18
18
|
and `@rig-c/core/core`, and links nothing from Esoteric Software.
|
|
19
19
|
`rig-play` is the convenience install name; `spine-html` is the legacy install name.
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
Compiler: [@rig-c/core](https://github.com/rig-c/core). Part generator:
|
|
21
|
+
[rig-c/parts](https://github.com/rig-c/parts). All six packages: the
|
|
22
|
+
[getting-started guide](https://github.com/rig-c/getting-started#the-whole-thing-in-one-glance).
|
|
22
23
|
|
|
23
24
|
## Why
|
|
24
25
|
|
|
@@ -41,7 +42,7 @@ links to either earlier name keep working.
|
|
|
41
42
|
|
|
42
43
|
### Measured
|
|
43
44
|
|
|
44
|
-
The [standing comparison and its conditions](
|
|
45
|
+
The [standing comparison and its conditions](docs/BENCHMARK.md#measured) record these tradeoffs:
|
|
45
46
|
|
|
46
47
|
| scene | observation in that comparison |
|
|
47
48
|
| --- | --- |
|
|
@@ -130,23 +131,40 @@ package built from this tree.
|
|
|
130
131
|
|
|
131
132
|
## Where to read next
|
|
132
133
|
|
|
133
|
-
- [docs/REFERENCE.md](
|
|
134
|
+
- [docs/REFERENCE.md](docs/REFERENCE.md) — what the player does once it is on
|
|
134
135
|
the page: what ships and what is measured (*Status*), then every API section
|
|
135
136
|
from wind, gravity and dragging to the runtime knobs and what they cost.
|
|
136
137
|
`physicsMoved(scope, motion)` supplies apparent world movement to named bone,
|
|
137
138
|
subtree or constraint physics; `moved()` continues to report whole-rig motion.
|
|
138
139
|
See the reference for explicit pivots, units and evaluation/history limits.
|
|
139
|
-
|
|
140
|
+
In the reference, by task:
|
|
141
|
+
- Blow wind on the rig's physics, change gravity, or tell it the page dragged
|
|
142
|
+
it: `environment()` and `moved()`, in
|
|
143
|
+
[Wind, gravity and dragging the rig](docs/REFERENCE.md#wind-gravity-and-dragging-the-rig).
|
|
144
|
+
- Jump to a time, with the wind and gravity that led up to it:
|
|
145
|
+
`seek(time, environmentAt)`, in the same section.
|
|
146
|
+
- Switch an outfit, an expression or a mouth shape by name: `setSet(name)`, in
|
|
147
|
+
[Attachment sets](docs/REFERENCE.md#attachment-sets-setsjson).
|
|
148
|
+
- Layer one animation over another, with a weight or additively: tracks, in
|
|
149
|
+
[Several tracks](docs/REFERENCE.md#several-tracks).
|
|
150
|
+
- Drive a bone yourself while an animation plays:
|
|
151
|
+
[Adjusting bones](docs/REFERENCE.md#adjusting-bones).
|
|
152
|
+
- Find out why a renderer is not drawing through WebGL:
|
|
153
|
+
`backendFallbackReason`, in
|
|
154
|
+
[Runtime knobs and what they cost](docs/REFERENCE.md#runtime-knobs-and-what-they-cost).
|
|
155
|
+
- Let the pointer move the camera over a composed take: `camera: 'parallax'`, in
|
|
156
|
+
[Pointer camera for a composed take](docs/REFERENCE.md#pointer-camera-for-a-composed-take).
|
|
157
|
+
- [docs/MIGRATION.md](docs/MIGRATION.md) — adding live-frame consumers, coming
|
|
140
158
|
from 1.8 (meshes draw through WebGL by default since 1.9) and from `spine-html`
|
|
141
159
|
0.8 (the 0.8 → 1.0 table, what has no counterpart, before and after).
|
|
142
|
-
- [docs/TESTING.md](
|
|
160
|
+
- [docs/TESTING.md](docs/TESTING.md) — how the suite holds the picture: the two
|
|
143
161
|
render modes' parity, the clipping oracle, the loading harness, and the
|
|
144
162
|
independent official raster oracle.
|
|
145
|
-
- [docs/BENCHMARK.md](
|
|
163
|
+
- [docs/BENCHMARK.md](docs/BENCHMARK.md) — the readings behind *Measured*, and
|
|
146
164
|
the bench that produces them: scenes, framing, and what a headless number is
|
|
147
165
|
not evidence of.
|
|
148
|
-
- [CHANGELOG.md](
|
|
149
|
-
[RELEASING.md](
|
|
166
|
+
- [CHANGELOG.md](CHANGELOG.md) — what each version changed;
|
|
167
|
+
[RELEASING.md](RELEASING.md) — how a version is cut.
|
|
150
168
|
- [`skills/rig-play/SKILL.md`](skills/rig-play/SKILL.md) — the agent skill that routes a web-page playback or live-frame request to the guides above.
|
|
151
169
|
|
|
152
170
|
## Demo (this repository)
|
|
@@ -187,7 +205,7 @@ stays CPU-side and renderer-agnostic, advancing one `dt` at a time.
|
|
|
187
205
|
Both renderers accept a borrowed `LiveFrame` or a detached `PosedFrame`.
|
|
188
206
|
`player.posedFrame()` returns a snapshot that survives later pose mutations;
|
|
189
207
|
a live frame is valid only until the next pose mutation. See
|
|
190
|
-
[Borrowing a live frame](
|
|
208
|
+
[Borrowing a live frame](docs/REFERENCE.md#borrowing-a-live-frame) for the
|
|
191
209
|
buffer layout, lifetime and fallback policy.
|
|
192
210
|
At load time each region of the document's `pages` section is cut into its own
|
|
193
211
|
bitmap (rotation restored), one blob URL per region — except regions that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasRenderer.d.ts","sourceRoot":"","sources":["../src/CanvasRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAA+C,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpG,OAAO,EAAgF,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5I,OAAO,KAAK,EAAwB,UAAU,EAAa,MAAM,iBAAiB,CAAC;AAEnF,+DAA+D;AAC/D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,CAAC;AAEjD,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"CanvasRenderer.d.ts","sourceRoot":"","sources":["../src/CanvasRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAA+C,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpG,OAAO,EAAgF,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5I,OAAO,KAAK,EAAwB,UAAU,EAAa,MAAM,iBAAiB,CAAC;AAEnF,+DAA+D;AAC/D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,CAAC;AAEjD,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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