spine-html 1.25.0 → 1.26.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/NOTICE.md +1 -1
- package/README.md +7 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +197 -117
- package/dist/index.js.map +1 -1
- package/dist/turnDials.d.ts +26 -0
- package/dist/turnDials.d.ts.map +1 -0
- package/package.json +3 -1
package/NOTICE.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
`@rig-c/play` (or of `rig-play` or `spine-html`, the same files under the names the
|
|
7
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
|
-
`rig-c/core` (MIT), rigc's own posing core, which poses the compiled model
|
|
9
|
+
`@rig-c/core/core` and `@rig-c/core/runtime` (MIT), rigc's own posing core, which poses the compiled model
|
|
10
10
|
document `rigc build` writes. No part of the
|
|
11
11
|
[Spine Runtimes](https://github.com/EsotericSoftware/spine-runtimes) is in it,
|
|
12
12
|
imported by it, or required beside it.
|
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
compiled model document `rigc build` writes, `skeleton.model.json` — as **plain
|
|
15
15
|
DOM**: one absolutely-positioned `<img>` per rigid slot, posed with a single CSS
|
|
16
16
|
`matrix()` write per frame, and deforming meshes on small per-part canvases; or
|
|
17
|
-
as **one canvas** per player. It poses through rigc's bundled
|
|
18
|
-
and
|
|
17
|
+
as **one canvas** per player. It poses through rigc's bundled `@rig-c/core/runtime`
|
|
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
20
|
The compiler is [@rig-c/core](https://github.com/rig-c/core) (npm `@rig-c/core`)
|
|
21
21
|
and the part generator [rig-c/parts](https://github.com/rig-c/parts).
|
|
@@ -32,7 +32,7 @@ the blockers named were meshes, clipping and DOM update overhead, and the 0.x li
|
|
|
32
32
|
answered each of them (per-part mesh canvases, element-level `clip-path`, dirty-skip).
|
|
33
33
|
|
|
34
34
|
At 1.0 it stopped being a Spine runtime. It plays the model document `rigc build` writes,
|
|
35
|
-
poses it through
|
|
35
|
+
poses it through `@rig-c/core/core` — rigc's own posing core, bundled into the package — and
|
|
36
36
|
links nothing from Esoteric Software; a Spine export is refused by name. It gained a
|
|
37
37
|
second render mode that draws the whole frame into one canvas. And it took the name
|
|
38
38
|
`rig-play`, which says what it is; after 1.8 it moved with the rest of the toolchain to
|
|
@@ -63,7 +63,7 @@ The package plays rigs built by [rigc](https://github.com/rig-c/core):
|
|
|
63
63
|
is what the player loads, and it states everything posing and drawing need —
|
|
64
64
|
the skeleton, the animations, and where every region sits on its page — so the
|
|
65
65
|
`.atlas` and `skeleton.json` beside it are not fetched. Poses are computed by
|
|
66
|
-
the bundled
|
|
66
|
+
the bundled `@rig-c/core/runtime` and `@rig-c/core/core`: there is nothing else to install.
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
69
|
import { loadModel, RigPlayer } from '@rig-c/play';
|
|
@@ -175,11 +175,11 @@ deterministic captures.
|
|
|
175
175
|
|
|
176
176
|
## How it works
|
|
177
177
|
|
|
178
|
-
`loadModel` reads the rig's compiled model document (
|
|
179
|
-
With the default `poser: 'auto'`, `RigPlayer` uses
|
|
178
|
+
`loadModel` reads the rig's compiled model document (`@rig-c/core/core`'s `readModel`).
|
|
179
|
+
With the default `poser: 'auto'`, `RigPlayer` uses `@rig-c/core/runtime`'s
|
|
180
180
|
`compileRuntime` and `RuntimePose` for covered models and animations, drawing
|
|
181
181
|
from a borrowed `LiveFrame` exposed by `player.liveFrame()`. Features and
|
|
182
|
-
operations outside that path's coverage use the
|
|
182
|
+
operations outside that path's coverage use the `@rig-c/core/core` oracle —
|
|
183
183
|
`openTrack` for a single track, `openTracks` for track composition. Models with
|
|
184
184
|
physics constraints stay on that oracle path. `player.poser` reports `"runtime"` or
|
|
185
185
|
`"oracle: <reason>"`; `poser: 'oracle'` selects the oracle explicitly. Posing
|
package/dist/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export { type LoadModelOptions, loadModel, type ModelAssets, type ModelDocument,
|
|
|
6
6
|
export { type AdjustableBones, type BoneAdjust, type BoneAdjustContext, type BoneLocals, type BoneWorld, type PhysicsMotion, type PhysicsMotionScope, type PhysicsParameters, type PhysicsParameterPatch, type PhysicsParameterRead, type PlayOptions, type PoseBounds, type QueueOptions, type RenderMode, type RigComplete, type RigEnvironment, type RigEnvironmentSchedule, type RigEvent, RigPlayer, type RigPlayerOptions, type SetActivationOptions, type SlotFilter, type SlotIdentity, type SlotIdentityReason, type SlotIdentitySnapshot, type TrackEntry } from './player.js';
|
|
7
7
|
export type { BlendMode, PosedClip, PosedFrame, PosedMesh, PosedRegion, PosedSlot, } from './posedFrame.js';
|
|
8
8
|
export type { LiveFrame, LiveNumbers, LiveAttachment, LiveClip } from './liveFrame.js';
|
|
9
|
+
export { discoverTurnDials, normalizedDial, type TurnAxis, type TurnDial } from './turnDials.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtF,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,WAAW,EAAE,kBAAkB,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,aAAa,EAAE,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