rig-play 1.8.0 → 1.8.1

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.
Files changed (3) hide show
  1. package/NOTICE.md +4 -4
  2. package/README.md +23 -19
  3. package/package.json +4 -4
package/NOTICE.md CHANGED
@@ -3,8 +3,8 @@
3
3
  ## Spine Runtimes
4
4
 
5
5
  **The published package links nothing from Esoteric Software.** An install of
6
- `rig-play` (or of `spine-html`, the same files under the name the package first
7
- shipped as) carries one JavaScript module, `dist/index.js`, plus type
6
+ `@rig-c/play` (or of `rig-play` or `spine-html`, the same files under the names the
7
+ package shipped as before) carries one JavaScript module, `dist/index.js`, plus type
8
8
  declarations, and that module bundles two things: the renderer, and
9
9
  `rig-c/core` (MIT), rigc's own posing core, which poses the compiled model
10
10
  document `rigc build` writes. No part of the
@@ -28,7 +28,7 @@ it, and it is neither committed nor published.
28
28
 
29
29
  ### What that means, as a chain of facts
30
30
 
31
- rig-play's own code is MIT (see `LICENSE`). The following is a restatement of
31
+ @rig-c/play's own code is MIT (see `LICENSE`). The following is a restatement of
32
32
  Esoteric Software's terms, not a licence term of this project:
33
33
 
34
34
  1. rigc writes two things side by side: the model document this package plays,
@@ -46,7 +46,7 @@ Esoteric Software's terms, not a licence term of this project:
46
46
  because the package links none.
47
47
 
48
48
  > **What a consumer does with rigc's Spine-format output is governed by
49
- > Esoteric Software's terms**, not by this package — rig-play neither adds those
49
+ > Esoteric Software's terms**, not by this package — @rig-c/play neither adds those
50
50
  > terms nor removes them.
51
51
 
52
52
  ## Example assets
package/README.md CHANGED
@@ -1,18 +1,21 @@
1
1
  <p align="center">
2
- <img src="assets/banner.svg" alt="rig-play - plays rigc's compiled model as DOM elements or one canvas" width="100%" />
2
+ <img src="assets/banner.svg" alt="@rig-c/play - plays rigc's compiled model as DOM elements or one canvas" width="100%" />
3
3
  </p>
4
4
 
5
5
  <p align="center">
6
- <a href="https://www.npmjs.com/package/rig-play"><img src="https://img.shields.io/npm/v/rig-play.svg?style=flat-square&color=FF6B4A" alt="npm version" /></a>
7
- <a href="https://www.npmjs.com/package/rig-play"><img src="https://img.shields.io/npm/dm/rig-play.svg?style=flat-square&color=EC4899" alt="npm downloads" /></a>
6
+ <a href="https://www.npmjs.com/package/@rig-c/play"><img src="https://img.shields.io/npm/v/@rig-c/play.svg?style=flat-square&color=FF6B4A" alt="npm version" /></a>
7
+ <a href="https://www.npmjs.com/package/@rig-c/play"><img src="https://img.shields.io/npm/dm/@rig-c/play.svg?style=flat-square&color=EC4899" alt="npm downloads" /></a>
8
8
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-38BDF8.svg?style=flat-square" alt="license" /></a>
9
9
  </p>
10
10
 
11
- Plays the rigs [rigc](https://github.com/firejune/rigc) builds — the compiled model
11
+ Plays the rigs [rigc](https://github.com/rig-c/core) builds — the compiled model
12
12
  document `rigc build` writes, `skeleton.model.json` — as **plain DOM**: one
13
13
  absolutely-positioned `<img>` per rigid slot, posed with a single CSS `matrix()` write
14
14
  per frame, deforming meshes on small per-part canvases; or as **one canvas** per player.
15
- `spine-html` is the same package under the name it first shipped as.
15
+ `rig-play` and `spine-html` are the same package under the names it shipped as before.
16
+ The toolchain lives under one organisation: the compiler [rig-c/core](https://github.com/rig-c/core)
17
+ (npm `rig-c`), the part generator [rig-c/parts](https://github.com/rig-c/parts)
18
+ (npm `@rig-c/parts`), and this player, [rig-c/play](https://github.com/rig-c/play).
16
19
 
17
20
  ## Why
18
21
 
@@ -29,8 +32,9 @@ At 1.0 it stopped being a Spine runtime. It plays the model document `rigc build
29
32
  poses it through `rig-c/core` — rigc's own posing core, bundled into the package — and
30
33
  links nothing from Esoteric Software; a Spine export is refused by name. It gained a
31
34
  second render mode that draws the whole frame into one canvas. And it took the name
32
- `rig-play`, which says what it is; `spine-html` keeps being published with the same
33
- files, so links to the old name keep working.
35
+ `rig-play`, which says what it is; after 1.8 it moved with the rest of the toolchain to
36
+ `@rig-c/play`. `rig-play` and `spine-html` keep being published with the same files, so
37
+ links to either earlier name keep working.
34
38
 
35
39
  ### Measured
36
40
 
@@ -159,11 +163,11 @@ default stays `dom`.
159
163
  ## Install
160
164
 
161
165
  ```bash
162
- npm i rig-play
163
- npm i -D rig-c # the build tool: `rigc build` writes the model rig-play loads
166
+ npm i @rig-c/play
167
+ npm i -D rig-c # the build tool: `rigc build` writes the model the player loads
164
168
  ```
165
169
 
166
- The package plays rigs built by [rigc](https://github.com/firejune/rigc):
170
+ The package plays rigs built by [rigc](https://github.com/rig-c/core):
167
171
  `rigc build` writes a compiled model document, `skeleton.model.json` (spec
168
172
  `rigc-compiled/3`), next to the Spine pair and the atlas pages. That document
169
173
  is what the player loads, and it states everything posing and drawing need —
@@ -173,7 +177,7 @@ the skeleton, the animations, and where every region sits on its page — so the
173
177
  is nothing else to install.
174
178
 
175
179
  ```ts
176
- import { loadModel, RigPlayer } from 'rig-play';
180
+ import { loadModel, RigPlayer } from '@rig-c/play';
177
181
 
178
182
  const assets = await loadModel({ modelUrl: '/rigs/walk/skeleton.model.json' });
179
183
 
@@ -212,7 +216,7 @@ else. A document whose `spec` is not one `rig-c/core` reads is refused with the
212
216
  core's own sentence plus "build it with `rigc build`", and so is a
213
217
  `rigc-compiled/1` document, which predates the `pages` section.
214
218
 
215
- `rig-play` is a third-party renderer and is not affiliated with or endorsed by
219
+ `@rig-c/play` is a third-party renderer and is not affiliated with or endorsed by
216
220
  Esoteric Software.
217
221
 
218
222
  ### Drawing your own frames
@@ -221,7 +225,7 @@ Esoteric Software.
221
225
  record, so anything that can produce one can draw through it:
222
226
 
223
227
  ```ts
224
- import { DomRenderer, type PosedFrame } from 'rig-play';
228
+ import { DomRenderer, type PosedFrame } from '@rig-c/play';
225
229
 
226
230
  const renderer = new DomRenderer(rootElement, assets.regionImages, assets.pageImages);
227
231
  renderer.render(frame); // frame: PosedFrame
@@ -653,9 +657,9 @@ name, and unloading is still elements first, bitmaps second.
653
657
 
654
658
  ### 0.8 → 1.0
655
659
 
656
- | 0.8.0 (`spine-html`) | 1.0.0 (`rig-play`) | Note |
660
+ | 0.8.0 (`spine-html`) | 1.x (`@rig-c/play`, formerly `rig-play`) | Note |
657
661
  | --- | --- | --- |
658
- | `npm i spine-html @esotericsoftware/spine-core` | `npm i rig-play`, and `npm i -D rig-c` for the build tool | 0.8 declared spine-core as a peer dependency (`>=4.0.0 <4.4.0`). 1.0.0 declares no dependencies and no peer dependencies. |
662
+ | `npm i spine-html @esotericsoftware/spine-core` | `npm i @rig-c/play`, and `npm i -D rig-c` for the build tool | 0.8 declared spine-core as a peer dependency (`>=4.0.0 <4.4.0`). 1.0.0 declares no dependencies and no peer dependencies. |
659
663
  | `loadSkeletonAssets(options)` | `loadModel(options)` | One URL instead of two. The `.atlas` and `skeleton.json` a build writes beside the document are not fetched. |
660
664
  | `LoadSkeletonAssetsOptions.atlasUrl`, `skeletonUrl` | `LoadModelOptions.modelUrl` | |
661
665
  | `resolvePage(pageName, atlasUrl)` | `resolvePage(pageName, modelUrl)` | The default now resolves a page name against the model URL's directory. |
@@ -761,7 +765,7 @@ renderer.dispose(); assets.dispose(); // on unload
761
765
  1.0.0:
762
766
 
763
767
  ```ts
764
- import { loadModel, RigPlayer } from 'rig-play';
768
+ import { loadModel, RigPlayer } from '@rig-c/play';
765
769
  const assets = await loadModel({ modelUrl: '/rigs/walk/skeleton.model.json' });
766
770
  const player = new RigPlayer(rootElement, assets);
767
771
  player.play('walk', { loop: true });
@@ -934,10 +938,10 @@ perf oracle is the demo's stats line on a real device.
934
938
 
935
939
  ## License
936
940
 
937
- rig-play's own code is MIT (see [LICENSE](LICENSE)). That says nothing about Spine,
941
+ @rig-c/play's own code is MIT (see [LICENSE](LICENSE)). That says nothing about Spine,
938
942
  so here is what is true of this package and this repository, stated plainly:
939
943
 
940
- 1. The published package — `rig-play`, and `spine-html`, the same files — **links
944
+ 1. The published package — `@rig-c/play`, and `rig-play` and `spine-html`, the same files — **links
941
945
  nothing from Esoteric Software**. Its one module bundles the renderer and
942
946
  `rig-c/core` (MIT), which poses rigc's model document; no part of the
943
947
  [Spine Runtimes](https://github.com/EsotericSoftware/spine-runtimes) is in it or
@@ -956,7 +960,7 @@ so here is what is true of this package and this repository, stated plainly:
956
960
  this project.
957
961
 
958
962
  > **What a consumer does with rigc's Spine-format output is governed by Esoteric
959
- > Software's terms**, not by this package — rig-play neither adds those terms nor
963
+ > Software's terms**, not by this package — @rig-c/play neither adds those terms nor
960
964
  > removes them.
961
965
 
962
966
  No example assets of Esoteric Software's are fetched or redistributed. See
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "rig-play",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
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",
7
7
  "author": "firejune",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/firejune/rig-play.git"
10
+ "url": "https://github.com/rig-c/play.git"
11
11
  },
12
- "homepage": "https://github.com/firejune/rig-play#readme",
12
+ "homepage": "https://github.com/rig-c/play#readme",
13
13
  "funding": {
14
14
  "type": "github",
15
15
  "url": "https://github.com/sponsors/firejune"
16
16
  },
17
- "bugs": "https://github.com/firejune/rig-play/issues",
17
+ "bugs": "https://github.com/rig-c/play/issues",
18
18
  "keywords": [
19
19
  "rigc",
20
20
  "rig-c",