@rig-c/play 1.21.2 → 1.21.3
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 +17 -105
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/banner.svg" alt="@rig-c/play
|
|
2
|
+
<img src="https://raw.githubusercontent.com/rig-c/play/main/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">
|
|
@@ -39,65 +39,14 @@ links to either earlier name keep working.
|
|
|
39
39
|
|
|
40
40
|
### Measured
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
| scene | runtime | rig | clipped to | fps | pose ms | render ms | drawn players | triangles | draw calls | origin Δpx | live contexts |
|
|
52
|
-
| --- | --- | --- | --- | --: | --: | --: | --: | --: | --: | --: | --: |
|
|
53
|
-
| 1 meshed rig animating | dom | `portrait-packed` `turn` | pane | 59.99 | 0.17 | 0.16 | —/1 | 48 | — | 0.007 | —/1 |
|
|
54
|
-
| 1 meshed rig animating | canvas | `portrait-packed` `turn` | pane | 59.99 | 0.23 | 0.18 | —/1 | 0 | 0 | 0.007 | —/1 |
|
|
55
|
-
| 1 meshed rig animating | official | `portrait-packed` `turn` | pane | 60.00 | 0.05 | 0.13 | 1/1 | 88 | 1 | 0.000 | 1/1 |
|
|
56
|
-
| 4 meshed rigs animating | dom | `portrait-packed` `turn` | pane | 60.01 | 0.46 | 0.48 | —/4 | 96 | — | 0.009 | —/1 |
|
|
57
|
-
| 4 meshed rigs animating | canvas | `portrait-packed` `turn` | pane | 60.00 | 0.60 | 0.49 | —/4 | 176 | 2 | 0.009 | —/1 |
|
|
58
|
-
| 4 meshed rigs animating | official | `portrait-packed` `turn` | pane | 59.99 | 0.13 | 0.17 | 4/4 | 352 | 1 | 0.000 | 1/1 |
|
|
59
|
-
| 16 meshed rigs animating | dom | `portrait-packed` `turn` | pane | 60.00 | 0.66 | 0.74 | —/16 | 384 | — | 0.010 | —/1 |
|
|
60
|
-
| 16 meshed rigs animating | canvas | `portrait-packed` `turn` | pane | 59.87 | 0.84 | 0.50 | —/16 | 704 | 8 | 0.010 | —/1 |
|
|
61
|
-
| 16 meshed rigs animating | official | `portrait-packed` `turn` | pane | 60.00 | 0.21 | 0.30 | 16/16 | 1408 | 1 | 0.000 | 1/1 |
|
|
62
|
-
| 36 meshed rigs animating | dom | `portrait-packed` `turn` | pane | 48.28 | 1.24 | 1.42 | —/36 | 1104 | — | 0.010 | —/1 |
|
|
63
|
-
| 36 meshed rigs animating | canvas | `portrait-packed` `turn` | pane | 60.11 | 1.15 | 0.85 | —/36 | 1760 | 20 | 0.010 | —/1 |
|
|
64
|
-
| 36 meshed rigs animating | official | `portrait-packed` `turn` | pane | 60.00 | 0.43 | 0.49 | 36/36 | 3168 | 1 | 0.000 | 1/1 |
|
|
65
|
-
| 64 meshed rigs animating | dom | `portrait-packed` `turn` | pane | 29.07 | 2.13 | 2.69 | —/64 | 1824 | — | 0.010 | —/1 |
|
|
66
|
-
| 64 meshed rigs animating | canvas | `portrait-packed` `turn` | pane | 53.99 | 1.62 | 1.17 | —/64 | 3168 | 36 | 0.010 | —/1 |
|
|
67
|
-
| 64 meshed rigs animating | official | `portrait-packed` `turn` | pane | 59.99 | 0.42 | 0.54 | 64/64 | 5632 | 1 | 0.000 | 1/1 |
|
|
68
|
-
| 1 meshed rig animating (canvas2d) | dom | `portrait-packed` `turn` | pane | 60.00 | 0.18 | 0.28 | —/1 | 48 | — | 0.007 | —/0 |
|
|
69
|
-
| 1 meshed rig animating (canvas2d) | canvas | `portrait-packed` `turn` | pane | 60.00 | 0.20 | 0.18 | —/1 | 88 | 1 | 0.007 | —/1 |
|
|
70
|
-
| 1 meshed rig animating (canvas2d) | official | `portrait-packed` `turn` | pane | 59.99 | 0.06 | 0.14 | 1/1 | 88 | 1 | 0.000 | 1/1 |
|
|
71
|
-
| 16 meshed rigs animating (canvas2d) | dom | `portrait-packed` `turn` | pane | 59.89 | 0.65 | 0.99 | —/16 | 384 | — | 0.010 | —/0 |
|
|
72
|
-
| 16 meshed rigs animating (canvas2d) | canvas | `portrait-packed` `turn` | pane | 60.00 | 0.93 | 0.59 | —/16 | 792 | 9 | 0.010 | —/1 |
|
|
73
|
-
| 16 meshed rigs animating (canvas2d) | official | `portrait-packed` `turn` | pane | 60.00 | 0.18 | 0.31 | 16/16 | 1408 | 1 | 0.000 | 1/1 |
|
|
74
|
-
| 1 held pose | dom | `portrait-packed` `turn` | pane | 60.11 | 0.00 | 0.15 | —/1 | 0 | — | 0.007 | —/1 |
|
|
75
|
-
| 1 held pose | canvas | `portrait-packed` `turn` | pane | 60.02 | 0.01 | 0.11 | —/1 | 0 | 0 | 0.007 | —/1 |
|
|
76
|
-
| 1 held pose | official | `portrait-packed` `turn` | pane | 60.00 | 0.00 | 0.13 | 1/1 | 88 | 1 | 0.000 | 1/1 |
|
|
77
|
-
| 16 held poses | dom | `portrait-packed` `turn` | pane | 60.09 | 0.00 | 0.43 | —/16 | 0 | — | 0.010 | —/1 |
|
|
78
|
-
| 16 held poses | canvas | `portrait-packed` `turn` | pane | 59.99 | 0.01 | 0.55 | —/16 | 0 | 0 | 0.010 | —/1 |
|
|
79
|
-
| 16 held poses | official | `portrait-packed` `turn` | pane | 60.08 | 0.00 | 0.35 | 16/16 | 1408 | 1 | 0.000 | 1/1 |
|
|
80
|
-
| 64 held poses | dom | `portrait-packed` `turn` | pane | 59.99 | 0.02 | 2.43 | —/64 | 0 | — | 0.010 | —/1 |
|
|
81
|
-
| 64 held poses | canvas | `portrait-packed` `turn` | pane | 60.10 | 0.02 | 2.56 | —/64 | 0 | 0 | 0.010 | —/1 |
|
|
82
|
-
| 64 held poses | official | `portrait-packed` `turn` | pane | 60.10 | 0.00 | 0.90 | 64/64 | 5632 | 1 | 0.000 | 1/1 |
|
|
83
|
-
| 1 rigid rig animating | dom | `walk-packed` `walk` | pane | 59.99 | 0.30 | 0.15 | —/1 | 0 | — | 0.007 | —/1 |
|
|
84
|
-
| 1 rigid rig animating | canvas | `walk-packed` `walk` | pane | 59.99 | 0.33 | 0.21 | —/1 | 30 | 1 | 0.007 | —/1 |
|
|
85
|
-
| 1 rigid rig animating | official | `walk-packed` `walk` | pane | 60.00 | 0.04 | 0.16 | 1/1 | 30 | 1 | 0.000 | 1/1 |
|
|
86
|
-
| 16 rigid rigs animating | dom | `walk-packed` `walk` | pane | 60.00 | 0.77 | 0.65 | —/16 | 0 | — | 0.010 | —/1 |
|
|
87
|
-
| 16 rigid rigs animating | canvas | `walk-packed` `walk` | pane | 60.00 | 0.62 | 0.47 | —/16 | 480 | 16 | 0.010 | —/1 |
|
|
88
|
-
| 16 rigid rigs animating | official | `walk-packed` `walk` | pane | 60.00 | 0.15 | 0.22 | 16/16 | 480 | 1 | 0.000 | 1/1 |
|
|
89
|
-
| 64 rigid rigs animating | dom | `walk-packed` `walk` | pane | 59.89 | 1.58 | 1.63 | —/64 | 0 | — | 0.010 | —/1 |
|
|
90
|
-
| 64 rigid rigs animating | canvas | `walk-packed` `walk` | pane | 42.00 | 1.50 | 1.21 | —/64 | 1920 | 64 | 0.010 | —/1 |
|
|
91
|
-
| 64 rigid rigs animating | official | `walk-packed` `walk` | pane | 60.00 | 0.14 | 0.13 | 64/64 | 1920 | 1 | 0.000 | 1/1 |
|
|
92
|
-
| 8 small players | dom | `walk-packed` `walk` | cell | 60.00 | 0.24 | 0.18 | —/8 | 0 | — | 0.012 | —/1 |
|
|
93
|
-
| 8 small players | canvas | `walk-packed` `walk` | cell | 60.00 | 0.33 | 0.30 | —/8 | 240 | 8 | 0.012 | —/1 |
|
|
94
|
-
| 8 small players | official | `walk-packed` `walk` | cell | 60.00 | 0.09 | 0.24 | 8/8 | 240 | 8 | 0.007 | 8/8 |
|
|
95
|
-
| 20 small players | dom | `walk-packed` `walk` | cell | 60.00 | 1.03 | 0.84 | —/20 | 0 | — | 0.015 | —/1 |
|
|
96
|
-
| 20 small players | canvas | `walk-packed` `walk` | cell | 59.99 | 0.69 | 0.54 | —/20 | 600 | 20 | 0.015 | —/1 |
|
|
97
|
-
| 20 small players | official | `walk-packed` `walk` | cell | 60.00 | 0.13 | 0.24 | 16/20 | 480 | 16 | 0.006 | 16/20 |
|
|
98
|
-
|
|
99
|
-
Where each side wins and loses on that table, the Safari mesh-backend readings
|
|
100
|
-
and the 0.x numbers are in [docs/BENCHMARK.md](docs/BENCHMARK.md).
|
|
42
|
+
The [standing comparison and its conditions](https://github.com/rig-c/play/blob/main/docs/BENCHMARK.md#measured) record these tradeoffs:
|
|
43
|
+
|
|
44
|
+
| scene | observation in that comparison |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| High-count meshed grids | Batched official WebGL leads. |
|
|
47
|
+
| Held poses | DOM and canvas modes skip rasterization. |
|
|
48
|
+
| Rigid-heavy grids | DOM avoids per-player canvas blits. |
|
|
49
|
+
| Many independent players | DOM and canvas share a WebGL context across players. |
|
|
101
50
|
|
|
102
51
|
## Install
|
|
103
52
|
|
|
@@ -179,23 +128,23 @@ package built from this tree.
|
|
|
179
128
|
|
|
180
129
|
## Where to read next
|
|
181
130
|
|
|
182
|
-
- [docs/REFERENCE.md](docs/REFERENCE.md) — what the player does once it is on
|
|
131
|
+
- [docs/REFERENCE.md](https://github.com/rig-c/play/blob/main/docs/REFERENCE.md) — what the player does once it is on
|
|
183
132
|
the page: what ships and what is measured (*Status*), then every API section
|
|
184
133
|
from wind, gravity and dragging to the runtime knobs and what they cost.
|
|
185
134
|
`physicsMoved(scope, motion)` supplies apparent world movement to named bone,
|
|
186
135
|
subtree or constraint physics; `moved()` continues to report whole-rig motion.
|
|
187
136
|
See the reference for explicit pivots, units and evaluation/history limits.
|
|
188
|
-
- [docs/MIGRATION.md](docs/MIGRATION.md) — adding live-frame consumers, coming
|
|
137
|
+
- [docs/MIGRATION.md](https://github.com/rig-c/play/blob/main/docs/MIGRATION.md) — adding live-frame consumers, coming
|
|
189
138
|
from 1.8 (meshes draw through WebGL by default since 1.9) and from `spine-html`
|
|
190
139
|
0.8 (the 0.8 → 1.0 table, what has no counterpart, before and after).
|
|
191
|
-
- [docs/TESTING.md](docs/TESTING.md) — how the suite holds the picture: the two
|
|
140
|
+
- [docs/TESTING.md](https://github.com/rig-c/play/blob/main/docs/TESTING.md) — how the suite holds the picture: the two
|
|
192
141
|
render modes' parity, the clipping oracle, the loading harness, and the
|
|
193
142
|
independent official raster oracle.
|
|
194
|
-
- [docs/BENCHMARK.md](docs/BENCHMARK.md) — the readings behind *Measured*, and
|
|
143
|
+
- [docs/BENCHMARK.md](https://github.com/rig-c/play/blob/main/docs/BENCHMARK.md) — the readings behind *Measured*, and
|
|
195
144
|
the bench that produces them: scenes, framing, and what a headless number is
|
|
196
145
|
not evidence of.
|
|
197
|
-
- [CHANGELOG.md](CHANGELOG.md) — what each version changed;
|
|
198
|
-
[RELEASING.md](RELEASING.md) — how a version is cut.
|
|
146
|
+
- [CHANGELOG.md](https://github.com/rig-c/play/blob/main/CHANGELOG.md) — what each version changed;
|
|
147
|
+
[RELEASING.md](https://github.com/rig-c/play/blob/main/RELEASING.md) — how a version is cut.
|
|
199
148
|
|
|
200
149
|
## Demo (this repository)
|
|
201
150
|
|
|
@@ -232,13 +181,11 @@ operations outside that path's coverage use the `rig-c/core` oracle —
|
|
|
232
181
|
physics constraints stay on that oracle path. `player.poser` reports `"runtime"` or
|
|
233
182
|
`"oracle: <reason>"`; `poser: 'oracle'` selects the oracle explicitly. Posing
|
|
234
183
|
stays CPU-side and renderer-agnostic, advancing one `dt` at a time.
|
|
235
|
-
|
|
236
184
|
Both renderers accept a borrowed `LiveFrame` or a detached `PosedFrame`.
|
|
237
185
|
`player.posedFrame()` returns a snapshot that survives later pose mutations;
|
|
238
186
|
a live frame is valid only until the next pose mutation. See
|
|
239
|
-
[Borrowing a live frame](docs/REFERENCE.md#borrowing-a-live-frame) for the
|
|
187
|
+
[Borrowing a live frame](https://github.com/rig-c/play/blob/main/docs/REFERENCE.md#borrowing-a-live-frame) for the
|
|
240
188
|
buffer layout, lifetime and fallback policy.
|
|
241
|
-
|
|
242
189
|
At load time each region of the document's `pages` section is cut into its own
|
|
243
190
|
bitmap (rotation restored), one blob URL per region — except regions that
|
|
244
191
|
already cover their whole page, which are used as they are. Both frame forms
|
|
@@ -249,39 +196,4 @@ corners, write one `matrix()` string. That's the whole rigid render path.
|
|
|
249
196
|
|
|
250
197
|
## License
|
|
251
198
|
|
|
252
|
-
|
|
253
|
-
so here is what is true of this package and this repository, stated plainly:
|
|
254
|
-
|
|
255
|
-
1. The published package — `@rig-c/play`, and `rig-play` and `spine-html`, the same files — **links
|
|
256
|
-
nothing from Esoteric Software**. Its one module bundles the renderer and
|
|
257
|
-
`rig-c/core` and `rig-c/runtime` (MIT), which pose rigc's model document;
|
|
258
|
-
no part of the
|
|
259
|
-
[Spine Runtimes](https://github.com/EsotericSoftware/spine-runtimes) is in it or
|
|
260
|
-
required beside it.
|
|
261
|
-
2. Development tooling pins `@esotericsoftware/spine-webgl` 4.3.13 and its matching
|
|
262
|
-
spine-core dependency for the independent oracle and comparison/benchmark.
|
|
263
|
-
The [Spine Runtimes License Agreement](https://esotericsoftware.com/spine-runtimes-license)
|
|
264
|
-
covers those runtimes, not this project's MIT license. They remain outside
|
|
265
|
-
production source, the public API and the library package; package guards
|
|
266
|
-
and the library-only pack allowlist hold that boundary.
|
|
267
|
-
The optional load-profile harness keeps `spine-pixi-v8` 4.3.13 and PixiJS
|
|
268
|
-
in a separate private install under `bench/oracle`.
|
|
269
|
-
3. `rigc build`, which this repository runs to make its fixtures, also writes Spine
|
|
270
|
-
skeleton data (`skeleton.json` and `skeleton.atlas`) beside each model document.
|
|
271
|
-
Development tooling reads this paired export independently. Generated fixtures
|
|
272
|
-
remain gitignored and excluded from the library package. See [NOTICE.md](NOTICE.md).
|
|
273
|
-
4. A product that plays that Spine data with a Spine Runtime has integrated the Spine
|
|
274
|
-
Runtimes, whose licence permits it **under Section 2 of the
|
|
275
|
-
[Spine Editor License Agreement](https://esotericsoftware.com/spine-editor-license)**,
|
|
276
|
-
or otherwise on the condition that **each user of the product obtains their own
|
|
277
|
-
Spine Editor license** — the licence's own two routes, restated, not a term of
|
|
278
|
-
this project.
|
|
279
|
-
|
|
280
|
-
> **What a consumer does with rigc's Spine-format output is governed by Esoteric
|
|
281
|
-
> Software's terms**, not by this package — @rig-c/play neither adds those terms nor
|
|
282
|
-
> removes them.
|
|
283
|
-
|
|
284
|
-
The optional load-profile harness fetches checksum-pinned spineboy and raptor
|
|
285
|
-
example assets together with their upstream `license.txt`. These development
|
|
286
|
-
fixtures are gitignored and excluded from the library package. See
|
|
287
|
-
[NOTICE.md](NOTICE.md) for the full notice.
|
|
199
|
+
See [NOTICE.md](NOTICE.md) for licensing and third-party notices.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rig-c/play",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.3",
|
|
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",
|