spine-html 1.26.0 → 1.27.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 +26 -9
- package/dist/CanvasRenderer.d.ts.map +1 -1
- package/dist/_play-runtime.js +15022 -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 +74 -0
- package/dist/composed-take.d.ts.map +1 -0
- package/dist/composed-take.js +906 -0
- package/dist/composed-take.js.map +1 -0
- package/dist/index.js +11 -14975
- package/dist/index.js.map +1 -1
- package/docs/MIGRATION.md +201 -0
- package/docs/REFERENCE.md +1419 -0
- package/docs/STABILITY.md +31 -0
- package/package.json +16 -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">
|
|
@@ -41,7 +41,7 @@ links to either earlier name keep working.
|
|
|
41
41
|
|
|
42
42
|
### Measured
|
|
43
43
|
|
|
44
|
-
The [standing comparison and its conditions](
|
|
44
|
+
The [standing comparison and its conditions](docs/BENCHMARK.md#measured) record these tradeoffs:
|
|
45
45
|
|
|
46
46
|
| scene | observation in that comparison |
|
|
47
47
|
| --- | --- |
|
|
@@ -130,23 +130,40 @@ package built from this tree.
|
|
|
130
130
|
|
|
131
131
|
## Where to read next
|
|
132
132
|
|
|
133
|
-
- [docs/REFERENCE.md](
|
|
133
|
+
- [docs/REFERENCE.md](docs/REFERENCE.md) — what the player does once it is on
|
|
134
134
|
the page: what ships and what is measured (*Status*), then every API section
|
|
135
135
|
from wind, gravity and dragging to the runtime knobs and what they cost.
|
|
136
136
|
`physicsMoved(scope, motion)` supplies apparent world movement to named bone,
|
|
137
137
|
subtree or constraint physics; `moved()` continues to report whole-rig motion.
|
|
138
138
|
See the reference for explicit pivots, units and evaluation/history limits.
|
|
139
|
-
|
|
139
|
+
In the reference, by task:
|
|
140
|
+
- Blow wind on the rig's physics, change gravity, or tell it the page dragged
|
|
141
|
+
it: `environment()` and `moved()`, in
|
|
142
|
+
[Wind, gravity and dragging the rig](docs/REFERENCE.md#wind-gravity-and-dragging-the-rig).
|
|
143
|
+
- Jump to a time, with the wind and gravity that led up to it:
|
|
144
|
+
`seek(time, environmentAt)`, in the same section.
|
|
145
|
+
- Switch an outfit, an expression or a mouth shape by name: `setSet(name)`, in
|
|
146
|
+
[Attachment sets](docs/REFERENCE.md#attachment-sets-setsjson).
|
|
147
|
+
- Layer one animation over another, with a weight or additively: tracks, in
|
|
148
|
+
[Several tracks](docs/REFERENCE.md#several-tracks).
|
|
149
|
+
- Drive a bone yourself while an animation plays:
|
|
150
|
+
[Adjusting bones](docs/REFERENCE.md#adjusting-bones).
|
|
151
|
+
- Find out why a renderer is not drawing through WebGL:
|
|
152
|
+
`backendFallbackReason`, in
|
|
153
|
+
[Runtime knobs and what they cost](docs/REFERENCE.md#runtime-knobs-and-what-they-cost).
|
|
154
|
+
- Let the pointer move the camera over a composed take: `camera: 'parallax'`, in
|
|
155
|
+
[Pointer camera for a composed take](docs/REFERENCE.md#pointer-camera-for-a-composed-take).
|
|
156
|
+
- [docs/MIGRATION.md](docs/MIGRATION.md) — adding live-frame consumers, coming
|
|
140
157
|
from 1.8 (meshes draw through WebGL by default since 1.9) and from `spine-html`
|
|
141
158
|
0.8 (the 0.8 → 1.0 table, what has no counterpart, before and after).
|
|
142
|
-
- [docs/TESTING.md](
|
|
159
|
+
- [docs/TESTING.md](docs/TESTING.md) — how the suite holds the picture: the two
|
|
143
160
|
render modes' parity, the clipping oracle, the loading harness, and the
|
|
144
161
|
independent official raster oracle.
|
|
145
|
-
- [docs/BENCHMARK.md](
|
|
162
|
+
- [docs/BENCHMARK.md](docs/BENCHMARK.md) — the readings behind *Measured*, and
|
|
146
163
|
the bench that produces them: scenes, framing, and what a headless number is
|
|
147
164
|
not evidence of.
|
|
148
|
-
- [CHANGELOG.md](
|
|
149
|
-
[RELEASING.md](
|
|
165
|
+
- [CHANGELOG.md](CHANGELOG.md) — what each version changed;
|
|
166
|
+
[RELEASING.md](RELEASING.md) — how a version is cut.
|
|
150
167
|
- [`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
168
|
|
|
152
169
|
## Demo (this repository)
|
|
@@ -187,7 +204,7 @@ stays CPU-side and renderer-agnostic, advancing one `dt` at a time.
|
|
|
187
204
|
Both renderers accept a borrowed `LiveFrame` or a detached `PosedFrame`.
|
|
188
205
|
`player.posedFrame()` returns a snapshot that survives later pose mutations;
|
|
189
206
|
a live frame is valid only until the next pose mutation. See
|
|
190
|
-
[Borrowing a live frame](
|
|
207
|
+
[Borrowing a live frame](docs/REFERENCE.md#borrowing-a-live-frame) for the
|
|
191
208
|
buffer layout, lifetime and fallback policy.
|
|
192
209
|
At load time each region of the document's `pages` section is cut into its own
|
|
193
210
|
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,CAA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