pixi-marrow 0.1.0-next.1 → 0.2.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.
Files changed (226) hide show
  1. package/AGENTS.md +161 -0
  2. package/CHANGELOG.md +298 -0
  3. package/README.md +132 -35
  4. package/bin/pixi-marrow.mjs +2 -2
  5. package/dist/api/asset-fetch.js +164 -0
  6. package/dist/api/asset-holds.js +64 -0
  7. package/dist/api/asset-load.js +219 -0
  8. package/dist/api/asset-options.d.ts +81 -0
  9. package/dist/api/asset.d.ts +76 -81
  10. package/dist/api/asset.js +119 -134
  11. package/dist/api/assets.d.ts +20 -3
  12. package/dist/api/assets.js +129 -67
  13. package/dist/api/bone.d.ts +0 -3
  14. package/dist/api/bone.js +6 -3
  15. package/dist/api/checks.js +84 -25
  16. package/dist/api/events.d.ts +13 -1
  17. package/dist/api/idle-cache.js +3 -3
  18. package/dist/api/idle-gate.js +56 -0
  19. package/dist/api/idle-image.js +66 -31
  20. package/dist/api/idle-place.js +1 -1
  21. package/dist/api/links.js +2 -2
  22. package/dist/api/no-effect.js +75 -0
  23. package/dist/api/options.d.ts +92 -17
  24. package/dist/api/outline-scan.js +196 -30
  25. package/dist/api/pacing.d.ts +4 -1
  26. package/dist/api/pacing.js +66 -13
  27. package/dist/api/perf-read.js +15 -4
  28. package/dist/api/play-fields.js +3 -23
  29. package/dist/api/presets.d.ts +28 -16
  30. package/dist/api/presets.js +18 -17
  31. package/dist/api/report-base.d.ts +11 -0
  32. package/dist/api/report-base.js +16 -1
  33. package/dist/api/report-cuts.js +7 -7
  34. package/dist/api/report-instancing.js +21 -1
  35. package/dist/api/report-motion.js +75 -0
  36. package/dist/api/report.js +106 -40
  37. package/dist/api/slot.d.ts +2 -4
  38. package/dist/api/slot.js +11 -7
  39. package/dist/api/spine-links.d.ts +37 -10
  40. package/dist/api/spine-links.js +33 -18
  41. package/dist/api/spine-perf.d.ts +19 -23
  42. package/dist/api/spine-perf.js +18 -1
  43. package/dist/api/spine-physics.d.ts +63 -3
  44. package/dist/api/spine-physics.js +105 -5
  45. package/dist/api/spine.d.ts +49 -37
  46. package/dist/api/spine.js +110 -82
  47. package/dist/api/textures.js +7 -118
  48. package/dist/api/track-book.js +22 -6
  49. package/dist/api/track.d.ts +18 -2
  50. package/dist/api/track.js +13 -9
  51. package/dist/api/values.js +67 -0
  52. package/dist/bake/bake.d.ts +18 -1
  53. package/dist/bake/bake.js +20 -1
  54. package/dist/bake/clip.d.ts +1 -1
  55. package/dist/bake/clip.js +1 -3
  56. package/dist/bake/later.js +35 -0
  57. package/dist/bake/playback.js +33 -11
  58. package/dist/bake/record.js +80 -33
  59. package/dist/bake/store.js +199 -28
  60. package/dist/bake.d.ts +2 -2
  61. package/dist/bake.js +2 -2
  62. package/dist/base/errors.d.ts +20 -4
  63. package/dist/base/errors.js +25 -2
  64. package/dist/base/names.js +5 -3
  65. package/dist/debug/overlay.js +1 -1
  66. package/dist/diagnose/devtools.d.ts +67 -0
  67. package/dist/diagnose/devtools.js +91 -0
  68. package/dist/diagnose/hits.d.ts +8 -0
  69. package/dist/diagnose/hits.js +80 -0
  70. package/dist/diagnose/inspect.d.ts +19 -0
  71. package/dist/diagnose/inspect.js +178 -0
  72. package/dist/diagnose/order.js +69 -0
  73. package/dist/diagnose/rules-data.d.ts +12 -0
  74. package/dist/diagnose/rules-data.js +393 -0
  75. package/dist/diagnose/skeleton-rules.js +137 -0
  76. package/dist/diagnose/static.d.ts +10 -0
  77. package/dist/diagnose/static.js +151 -0
  78. package/dist/diagnose/tree.d.ts +42 -0
  79. package/dist/diagnose/tree.js +143 -0
  80. package/dist/diagnose/types.d.ts +290 -0
  81. package/dist/diagnose/watch.d.ts +47 -0
  82. package/dist/diagnose/watch.js +221 -0
  83. package/dist/diagnose.d.ts +14 -0
  84. package/dist/diagnose.js +8 -0
  85. package/dist/formats/atlas.d.ts +1 -1
  86. package/dist/formats/atlas.js +2 -1
  87. package/dist/formats/binary42/index.js +3 -2
  88. package/dist/formats/binary42/skeleton.js +5 -3
  89. package/dist/formats/binary43/animations.js +2 -2
  90. package/dist/formats/binary43/attachments.js +7 -7
  91. package/dist/formats/binary43/constraints.js +3 -3
  92. package/dist/formats/binary43/index.js +3 -2
  93. package/dist/formats/binary43/reader.js +17 -1
  94. package/dist/formats/binary43/skeleton.js +7 -8
  95. package/dist/formats/binary43/skins.js +6 -6
  96. package/dist/formats/binary43/timelines-attachment.js +5 -5
  97. package/dist/formats/binary43/timelines-constraint.js +10 -10
  98. package/dist/formats/binary43/timelines-curve.js +3 -3
  99. package/dist/formats/binary43/timelines-order.js +6 -6
  100. package/dist/formats/binary43/timelines-slot-bone.js +5 -5
  101. package/dist/formats/import.d.ts +2 -2
  102. package/dist/formats/import.js +7 -4
  103. package/dist/formats/json42/attachments.js +2 -1
  104. package/dist/formats/json42/index.js +3 -2
  105. package/dist/formats/json42/skeleton.js +4 -4
  106. package/dist/formats/json42/values.js +1 -8
  107. package/dist/formats/json43/index.js +5 -3
  108. package/dist/formats/json43/skeleton.js +3 -0
  109. package/dist/formats/shared/binary-input.js +3 -0
  110. package/dist/formats/shared/checks.js +23 -0
  111. package/dist/formats/shared/hash.js +43 -0
  112. package/dist/formats/shared/limits.js +12 -0
  113. package/dist/formats/sniff.d.ts +6 -2
  114. package/dist/formats/sniff.js +42 -5
  115. package/dist/index.d.ts +12 -8
  116. package/dist/optimize/cli.d.ts +4 -1
  117. package/dist/optimize/cli.js +83 -6
  118. package/dist/perf/probe.js +2 -2
  119. package/dist/pose/engine.d.ts +36 -5
  120. package/dist/pose/engine.js +7 -0
  121. package/dist/pose/legacy/apply-timeline.js +3 -2
  122. package/dist/pose/legacy/apply.js +7 -5
  123. package/dist/pose/legacy/bones.js +3 -1
  124. package/dist/pose/legacy/curves.js +6 -2
  125. package/dist/pose/legacy/deform.js +26 -13
  126. package/dist/pose/legacy/entry.js +33 -39
  127. package/dist/pose/legacy/ik2.js +2 -2
  128. package/dist/pose/legacy/index.js +2 -2
  129. package/dist/pose/legacy/math.js +11 -5
  130. package/dist/pose/legacy/pass.js +27 -20
  131. package/dist/pose/legacy/player.js +9 -4
  132. package/dist/pose/legacy/rest.js +6 -48
  133. package/dist/pose/legacy/rig.js +1 -1
  134. package/dist/pose/legacy/skeleton.js +1 -1
  135. package/dist/pose/legacy/slots.js +1 -1
  136. package/dist/pose/legacy/world.js +9 -9
  137. package/dist/pose/shared/combine-skins.js +8 -4
  138. package/dist/pose/shared/configure.js +78 -0
  139. package/dist/pose/shared/deform-switch.js +11 -1
  140. package/dist/pose/shared/fired.js +9 -0
  141. package/dist/pose/shared/kept.js +64 -0
  142. package/dist/pose/shared/lookup.d.ts +9 -5
  143. package/dist/pose/shared/lookup.js +8 -5
  144. package/dist/pose/shared/search.js +48 -0
  145. package/dist/pose/shared/slot-writes.js +2 -2
  146. package/dist/pose/state.js +8 -2
  147. package/dist/pose/v43/advance.js +1 -1
  148. package/dist/pose/v43/apply-events.js +5 -5
  149. package/dist/pose/v43/apply.js +55 -59
  150. package/dist/pose/v43/configure.js +24 -41
  151. package/dist/pose/v43/curves.js +6 -2
  152. package/dist/pose/v43/ik-two.js +2 -2
  153. package/dist/pose/v43/index.js +19 -8
  154. package/dist/pose/v43/math.js +11 -5
  155. package/dist/pose/v43/player.js +15 -13
  156. package/dist/pose/v43/pose.js +2 -2
  157. package/dist/pose/v43/property-ids.js +17 -0
  158. package/dist/pose/v43/repeat.js +82 -0
  159. package/dist/pose/v43/rig.js +35 -20
  160. package/dist/pose/v43/solve-tight.js +3 -3
  161. package/dist/pose/v43/solve.js +3 -3
  162. package/dist/pose/v43/split.js +3 -2
  163. package/dist/pose/v43/timelines-deform.js +34 -21
  164. package/dist/pose/v43/timelines-misc.js +1 -1
  165. package/dist/pose/v43/timelines.js +3 -2
  166. package/dist/pose/v43/update.js +1 -0
  167. package/dist/pose/v43/world.js +5 -5
  168. package/dist/render/batch-body.d.ts +2 -1
  169. package/dist/render/batch-body.js +8 -1
  170. package/dist/render/batch-clip.js +30 -8
  171. package/dist/render/batch-element.d.ts +28 -51
  172. package/dist/render/batch-element.js +61 -17
  173. package/dist/render/batch-home.d.ts +57 -0
  174. package/dist/render/batch-pack.d.ts +3 -0
  175. package/dist/render/batch-pack.js +9 -1
  176. package/dist/render/batch-pipe.js +2 -6
  177. package/dist/render/batch-shader.js +67 -86
  178. package/dist/render/batch-upload.js +30 -61
  179. package/dist/render/batcher.js +7 -25
  180. package/dist/render/bounds.d.ts +29 -0
  181. package/dist/render/bounds.js +42 -1
  182. package/dist/render/clip-mask.js +3 -0
  183. package/dist/render/context-watch.js +18 -3
  184. package/dist/render/cover-search.d.ts +8 -1
  185. package/dist/render/cover-search.js +7 -3
  186. package/dist/render/cover.d.ts +5 -3
  187. package/dist/render/cover.js +4 -4
  188. package/dist/render/entry-pose.js +1 -1
  189. package/dist/render/inspect.js +6 -2
  190. package/dist/render/instance-id.js +4 -0
  191. package/dist/render/instance-layout.d.ts +18 -4
  192. package/dist/render/instance-layout.js +92 -14
  193. package/dist/render/instance-paint.d.ts +2 -1
  194. package/dist/render/instance-paint.js +5 -4
  195. package/dist/render/instance-part.d.ts +31 -12
  196. package/dist/render/instance-part.js +62 -10
  197. package/dist/render/instance-pipe.d.ts +7 -0
  198. package/dist/render/instance-pipe.js +26 -45
  199. package/dist/render/instance-pool.d.ts +3 -1
  200. package/dist/render/instance-pool.js +8 -1
  201. package/dist/render/layouts.js +37 -6
  202. package/dist/render/mesh-paint.d.ts +33 -7
  203. package/dist/render/mesh-paint.js +91 -25
  204. package/dist/render/mesh-uniforms.js +44 -12
  205. package/dist/render/mode.js +5 -1
  206. package/dist/render/paints.d.ts +2 -2
  207. package/dist/render/paints.js +2 -1
  208. package/dist/render/pose-pass.d.ts +7 -0
  209. package/dist/render/pose-pass.js +26 -5
  210. package/dist/render/range-mesh.d.ts +6 -2
  211. package/dist/render/range-mesh.js +89 -46
  212. package/dist/render/ranges.js +8 -8
  213. package/dist/render/sent.js +34 -0
  214. package/dist/render/skeleton-view.d.ts +7 -6
  215. package/dist/render/skeleton-view.js +22 -17
  216. package/dist/render/skin-layout.d.ts +5 -1
  217. package/dist/render/skin-layout.js +10 -2
  218. package/dist/render/skin-paint.js +25 -17
  219. package/dist/render/skin-pose.js +4 -3
  220. package/dist/render/skin-store.js +32 -4
  221. package/dist/render/stats.d.ts +55 -3
  222. package/dist/render/stats.js +12 -1
  223. package/dist/render/template.js +3 -3
  224. package/package.json +32 -9
  225. package/perf-rules.json +390 -0
  226. package/skills/pixi-marrow/SKILL.md +39 -0
package/AGENTS.md ADDED
@@ -0,0 +1,161 @@
1
+ # pixi-marrow for coding agents
2
+
3
+ This file ships in the npm package `pixi-marrow`. It tells a coding agent how to use the package in a game, and how to find what costs time in a scene. The guide for work on the repo itself is the `AGENTS.md` in the GitHub repo.
4
+
5
+ ## What the package is
6
+
7
+ pixi-marrow is a Spine runtime for PixiJS v8. It plays skeletons that the Spine editor exported as 4.1, 4.2 or 4.3, on WebGL2 and WebGPU. `MarrowSpine` is a Pixi `Container`. The package needs `pixi.js` 8.23 or later and has no other dependency.
8
+
9
+ ```bash
10
+ npm install pixi-marrow pixi.js
11
+ ```
12
+
13
+ ## Entry points
14
+
15
+ | Import | Use it for |
16
+ |---|---|
17
+ | `pixi-marrow` | `MarrowSpine`, `MarrowAsset`, `Track`, `MarrowError`, `registerMarrowAssets` |
18
+ | `pixi-marrow/core` | Readers and pose engines without Pixi. Runs in Node |
19
+ | `pixi-marrow/optimize` | `generateNames`, `buildAtlasOutlines` and the command line tool |
20
+ | `pixi-marrow/bake` | Animations baked at build time or in the game |
21
+ | `pixi-marrow/debug` | `MarrowDebug`, overlays of bones, shapes and overdraw |
22
+ | `pixi-marrow/perf` | `createProbe`, which times the updates of one skeleton |
23
+ | `pixi-marrow/diagnose` | `diagnose`, `watch`, `inspect`, `serializeTree`, `installDevtools` |
24
+ | `pixi-marrow/perf-rules.json` | The performance rules as data |
25
+
26
+ ## Load
27
+
28
+ ```ts
29
+ import { MarrowSpine } from 'pixi-marrow';
30
+
31
+ const hero = await MarrowSpine.load({ skeleton: 'hero.skel', atlas: 'hero.atlas' });
32
+ app.stage.addChild(hero);
33
+ hero.position.set(400, 500);
34
+ // hero.destroy() also unloads the files when no other copy uses them
35
+ ```
36
+
37
+ Loads of the same files share one asset. For many copies, load the asset once with `MarrowAsset.load` and call `new MarrowSpine(asset)` for each copy. With Pixi `Assets`, call `registerMarrowAssets()` once, and then `MarrowSpine.from({ skeleton, atlas })` with the aliases.
38
+
39
+ ## Play
40
+
41
+ ```ts
42
+ hero.play('idle', { loop: true });
43
+ const shot = hero.play('shoot', { track: 1, mix: 0.1, speed: 1.5 });
44
+ const reason = await shot.finished; // 'complete', 'interrupted', 'stopped' or 'destroyed'
45
+ hero.stop({ track: 1, mix: 0.2 });
46
+ hero.setMix('idle', 'run', 0.2);
47
+ hero.timeScale = 0.5;
48
+ ```
49
+
50
+ ## Queue
51
+
52
+ ```ts
53
+ hero.play('jump');
54
+ hero.queue('land', { mix: 0.1 });
55
+ hero.queue('run', { loop: true, mix: 0.2, delay: 0.5 });
56
+ const last = hero.queue('idle', { loop: true });
57
+ console.log(last.animation);
58
+ await hero.play('win').finished;
59
+ ```
60
+
61
+ ## Events
62
+
63
+ ```ts
64
+ hero.on('event', (event, track) => console.log(event.name, track.animation));
65
+ hero.on('complete', (track) => console.log(track.animation, 'played to its end'));
66
+ hero.once('start', (track) => console.log(track.animation, 'started'));
67
+ hero.on('end', (track) => console.log(track.animation, 'will not be applied again'));
68
+ hero.off('complete');
69
+ // the names are start, interrupt, end, dispose, complete and event
70
+ ```
71
+
72
+ ## Typed names
73
+
74
+ The command line tool writes a type with every name of a skeleton. A wrong animation, skin, bone or slot name then does not compile.
75
+
76
+ ```bash
77
+ npx pixi-marrow typegen hero.skel --out hero.names.ts --name HeroNames
78
+ ```
79
+
80
+ ```ts
81
+ import type { HeroNames } from './hero.names';
82
+
83
+ const hero = await MarrowSpine.load<HeroNames>({ skeleton: 'hero.skel', atlas: 'hero.atlas' });
84
+ ```
85
+
86
+ ## Errors
87
+
88
+ The package throws one error type, `MarrowError`. Read `error.code`, `error.fix`, `error.closest` and `error.docs`. Do not parse the message. An unknown option key throws `invalid-option` with the closest name.
89
+
90
+ ## Options that cost something are opt-in
91
+
92
+ The default is exact. A skeleton looks and moves as in the official runtime, and the runtime does only work that changes no pixel. Do not add a performance option before a measurement or a rule asks for it.
93
+
94
+ - `perf: 'balanced'` or `perf: 'fast'` changes when a skeleton updates, and nothing else.
95
+ - `tightMesh: 'on'`, `bake`, `idleCache`, `lod`, `skinning: 'gpu'` and `instancing` each cost memory, vertices or exactness. Set each one by name.
96
+ - Outlines make the exact cuts of overdraw possible. Build them with `npx pixi-marrow outlines hero.atlas` and pass the file as `outlines`.
97
+ - `await hero.perf.report()` lists every decision of the runtime for one skeleton, with the reason.
98
+
99
+ ## Diagnose a scene
100
+
101
+ Add one line to the development build. The package registers nothing until that call.
102
+
103
+ ```ts
104
+ import { installDevtools } from 'pixi-marrow/diagnose';
105
+
106
+ installDevtools({ root: app.stage, renderer: app.renderer });
107
+ ```
108
+
109
+ Then run code in the page, through the console or a browser tool.
110
+
111
+ ```ts
112
+ __PIXI_MARROW__.diagnose(app.stage).hits; // the causes that one look finds
113
+ const watching = __PIXI_MARROW__.watch(app.stage); // note the counters
114
+ watching.report().hits; // after some frames: also the causes that show over time
115
+ __PIXI_MARROW__.inspect(); // each skeleton as plain data
116
+ JSON.stringify(__PIXI_MARROW__.tree()); // save it, then run: npx pixi-marrow diagnose tree.json
117
+ ```
118
+
119
+ Each hit has `id`, `node`, `cause`, `cost`, `measured`, `message`, `fix` and `docs`. `node` is the path of the skeleton in the tree, and `cause` is the path of the display object to change. Apply the `fix` to the `cause`, then call `report()` again to check that the hit is gone.
120
+
121
+ Without the hook, find skeletons by the field `isMarrowSpine` and read `hero.stats`. The functions `diagnose(root)` and `inspect(hero)` of `pixi-marrow/diagnose` do the same work as the hook.
122
+
123
+ ## Performance rules
124
+
125
+ <!-- rules:table -->
126
+ | Id | Cause | Fix |
127
+ | --- | --- | --- |
128
+ | [MARROW001](https://pixi-marrow.schmooky.dev/performance/rules/#marrow001) | A display object above a batched skeleton moves | Set `isRenderGroup: true` on the container that moves, or set `renderMode: 'mesh'` on the skeleton. |
129
+ | [MARROW002](https://pixi-marrow.schmooky.dev/performance/rules/#marrow002) | The alpha or the tint above a batched skeleton changes | Fade a container that has `isRenderGroup: true`, fade slots with `hero.slot(name).alpha`, or set `renderMode: 'mesh'`. |
130
+ | [MARROW003](https://pixi-marrow.schmooky.dev/performance/rules/#marrow003) | An alpha or a blend mode above the skeleton stops occlusion and the idle image | Keep the alpha at 1 and the blend mode at `normal` while the skeleton is at rest. Fade for a short time only. |
131
+ | [MARROW004](https://pixi-marrow.schmooky.dev/performance/rules/#marrow004) | Another display object draws between two batched skeletons | Put the skeletons into one container and the other objects into a container above or below it. |
132
+ | [MARROW005](https://pixi-marrow.schmooky.dev/performance/rules/#marrow005) | A sorted container mixes skeletons with other display objects | Give the skeletons one range of `zIndex` values, or put them into a layer of their own. |
133
+ | [MARROW006](https://pixi-marrow.schmooky.dev/performance/rules/#marrow006) | A blend mode splits the draws of a skeleton | Use additive slots where the art allows it. Put skeletons with the same blend mode next to each other in the draw order. |
134
+ | [MARROW007](https://pixi-marrow.schmooky.dev/performance/rules/#marrow007) | More atlas pages than one draw can sample | Pack the atlas into fewer pages, or share one atlas between the skeletons of a layer. |
135
+ | [MARROW008](https://pixi-marrow.schmooky.dev/performance/rules/#marrow008) | The device samples fewer textures than the skeleton needs in a batch | Pack the atlas into fewer pages than the device samples in one batch. |
136
+ | [MARROW009](https://pixi-marrow.schmooky.dev/performance/rules/#marrow009) | Many copies of a skeleton that is too large to batch | Set `skinning: 'gpu'` and `instancing: 'auto'`, or use a skeleton with fewer vertices. |
137
+ | [MARROW010](https://pixi-marrow.schmooky.dev/performance/rules/#marrow010) | A clipping attachment in the batched mode | Remove the clipping attachment in the Spine editor, or keep the clipped slots few and small. |
138
+ | [MARROW011](https://pixi-marrow.schmooky.dev/performance/rules/#marrow011) | A clipping attachment in the mesh mode | Remove the clipping attachment in the Spine editor, or set `renderMode: 'batched'` for a small skeleton. |
139
+ | [MARROW012](https://pixi-marrow.schmooky.dev/performance/rules/#marrow012) | A container attached to a slot | Use `hero.follow(bone, container)` where the container can draw above or below the whole skeleton. |
140
+ | [MARROW013](https://pixi-marrow.schmooky.dev/performance/rules/#marrow013) | A skeleton without dark colors draws before one with dark colors | Draw a skeleton with dark colors first in the layer, or keep the two kinds in separate layers. |
141
+ | [MARROW014](https://pixi-marrow.schmooky.dev/performance/rules/#marrow014) | Pixi builds the instructions of the render group again and again | Keep display objects in a pool and move them off the screen. Give a layer that changes often a render group of its own. |
142
+ | [MARROW015](https://pixi-marrow.schmooky.dev/performance/rules/#marrow015) | A skeleton that nobody sees still updates | Set `perf: 'balanced'` or `offscreen: 'pause'`, or stop the `update()` calls for a hidden skeleton. |
143
+ | [MARROW016](https://pixi-marrow.schmooky.dev/performance/rules/#marrow016) | The renderer turns the cuts of overdraw off | Turn `roundPixels` and `antialias` off, or accept the overdraw. |
144
+ | [MARROW017](https://pixi-marrow.schmooky.dev/performance/rules/#marrow017) | A filter or a mask above the skeleton | Put the filter or the mask on the smallest container that needs it, and remove it when its effect ends. |
145
+ | [MARROW018](https://pixi-marrow.schmooky.dev/performance/rules/#marrow018) | A playing skeleton below a container with `cacheAsTexture` | Cache only containers whose skeletons are at rest. For one skeleton at rest, use `idleCache: 'auto'`. |
146
+ | [MARROW019](https://pixi-marrow.schmooky.dev/performance/rules/#marrow019) | The idle cache draws and drops its image again and again | Set `idleCache: 'off'` for a skeleton that does not rest for seconds. |
147
+ | [MARROW020](https://pixi-marrow.schmooky.dev/performance/rules/#marrow020) | The asset has no outlines | Run `pixi-marrow outlines <atlas>` at build time and pass the file as the `outlines` option of the load. |
148
+ | [MARROW021](https://pixi-marrow.schmooky.dev/performance/rules/#marrow021) | A page texture blocks the cuts of overdraw | Load the page textures at the size of the atlas, with no mipmaps, no anisotropy and no repeat. |
149
+ | [MARROW022](https://pixi-marrow.schmooky.dev/performance/rules/#marrow022) | Physics constraints run in every update | Set `hero.physics = 'none'` for small or far skeletons, or set `lod: 'auto'`. |
150
+ | [MARROW023](https://pixi-marrow.schmooky.dev/performance/rules/#marrow023) | The runtime builds the vertex layout again and again | Set the skins once. To change one attachment, use `hero.slot(name).attachment`. |
151
+ | [MARROW024](https://pixi-marrow.schmooky.dev/performance/rules/#marrow024) | More mesh draws on WebGPU than the shared uniform buffer of Pixi holds | Use the batched mode for small skeletons, or `skinning: 'gpu'` with `instancing: 'auto'` for large ones. |
152
+ | [MARROW025](https://pixi-marrow.schmooky.dev/performance/rules/#marrow025) | A Spine 4.3 track changes its animation faster than the mix | Let a mix end before the next change, or change with `mix: 0`. |
153
+ <!-- /rules:table -->
154
+
155
+ ## Docs
156
+
157
+ - Site: https://pixi-marrow.schmooky.dev
158
+ - Rules: https://pixi-marrow.schmooky.dev/performance/rules/
159
+ - For language models, as an index: https://pixi-marrow.schmooky.dev/llms.txt
160
+ - For language models, in one file: https://pixi-marrow.schmooky.dev/llms-full.txt
161
+ - Each docs page as Markdown: the address of the page with `.md` in place of the last slash.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,303 @@
1
1
  # pixi-marrow
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#41](https://github.com/schmooky/pixi-marrow/pull/41) [`6b719df`](https://github.com/schmooky/pixi-marrow/commit/6b719dfd72820abc7c08940ec058f0e0cbec26fb) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - pixi-marrow needs pixi.js 8.23.0 or later. The peer range is `^8.23.0`. It was `^8.21.0`.
8
+
9
+ pixi.js 8.23 is the latest release. On 8.21 and 8.22, a WebGL buffer kept one stretch until Pixi bound it, and a data texture uploaded whole. The runtime had a second upload path for those versions, with its own tests and its own CI job. The library is a pre-release, so that path is not worth its cost.
10
+
11
+ - The upload path for pixi.js 8.21 and 8.22 is gone. Nothing changes on pixi.js 8.23.
12
+ - The rule `MARROW026` is retired, because no game can run the older versions. Its id stays reserved. The rules are `MARROW001` to `MARROW025`.
13
+ - The root import and the mesh mode are smaller.
14
+
15
+ - [#15](https://github.com/schmooky/pixi-marrow/pull/15) [`17eeba5`](https://github.com/schmooky/pixi-marrow/commit/17eeba5f683c9258afa7fef7bd9fcf02624b6ca2) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Baked animations: an animation can play from frames sampled once, in place of the timelines and the constraints.
16
+
17
+ - `bake: 'auto'` of a display object bakes an animation the first time it plays alone on track 0. No preset sets it, because a clip keeps 23 KB to 0.9 MB per animation and skin. The clip is kept per asset and skin, and every instance shares it. A list of names bakes those only. A name the skeleton lacks throws a `MarrowError` with the valid names.
18
+ - An update plays baked when one entry plays alone on track 0 at alpha 1 and nothing wrote the pose since the update before. The skin, the place of the skeleton and the physics mode must be those of the clip. Any other update is posed by the engine as before. A skeleton whose skins turn on a physics constraint or a slider is never baked.
19
+ - Events, loops, time scales, reverse and the `start` and `end` options stay exactly as without baking: the engine still runs the tracks and fires the events.
20
+ - A clip keeps the world transforms of the bones that move and the slot values that change, as 32-bit numbers, at 60 frames per second. At a sample time a frame equals the pose of the engine rounded to 32 bits. Between two samples the frame before is shown. The local pose of a bone shows the values of the last update the engine posed.
21
+ - The code loads on demand and adds 0.1 kB to the root import. A display object plays without baking until it is there.
22
+ - The clips of a combined skin go when the skin is freed. `addBakedClips` throws a `MarrowError` for a clip whose arrays do not fit together, and reading the bytes of a file throws on a big-endian host.
23
+ - The new entry `pixi-marrow/bake` bakes in Node at build time: `bakeAnimation`, `bakeAnimations`, `encodeBakedClips` and `decodeBakedClips`. `addBakedClips` hands clips to an asset, whose instances play them in place of baking.
24
+ - The pose engines of `pixi-marrow/core` gain `solo`, `advance`, `holdsSetup` and `source`, and a track entry shows `animationStart` and `animationEnd`.
25
+
26
+ - [#14](https://github.com/schmooky/pixi-marrow/pull/14) [`2d2c7dc`](https://github.com/schmooky/pixi-marrow/commit/2d2c7dc390ed09f224735ceb1b7f2755400c6360) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Debug overlays: the new entry `pixi-marrow/debug` and its `MarrowDebug` draw over a skeleton.
27
+
28
+ - Layers: bones, origin, regions, mesh hulls, mesh triangles, bounding boxes, clipping, paths, point attachments, event names and overdraw. Each can be turned on and off at run time, with its own color.
29
+ - The shapes equal what the official runtime computes. The overlay draws again only when the pose or a setting changed, and lines keep their width on the screen.
30
+ - The overdraw layer fills every triangle the skeleton draws, after the cuts of overdraw, with a color that adds up where the GPU paints a pixel more than once.
31
+ - The overlays draw with pixi-silk, now an optional peer dependency. A game that does not import `pixi-marrow/debug` needs neither it nor the overlay code.
32
+
33
+ - [#15](https://github.com/schmooky/pixi-marrow/pull/15) [`74d18f0`](https://github.com/schmooky/pixi-marrow/commit/74d18f06f72209170a1ebd31b8bab789bcd61036) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - GPU skinning: `skinning: 'gpu'` places the vertices of the mesh mode in the vertex shader, from the bone matrices of the pose.
34
+
35
+ - A moving skeleton uploads its bone matrices, 24 bytes a bone, in place of the positions of its vertices. Regions, region polygons and meshes are placed on the GPU, weighted meshes with any number of bones a vertex included.
36
+ - The CPU still places a mesh while it has a deform, and a region with a sequence. Both draw in the same draw call as the rest.
37
+ - The colors of the slots live in a palette texture, so a color key writes the 8 bytes of one slot and not the colors of its vertices. Additive slots, multiply, screen and the two color tint draw as before.
38
+ - `auto`, the default, stays `cpu` until phones are measured. The batched mode always places vertices on the CPU.
39
+ - Code that reads the positions on the CPU, such as the bounds and the debug overlays, gets them placed on demand. A layout with opaque rectangles for the cut of covered slots places every vertex on the CPU for that search, and uploads only what the CPU is in charge of.
40
+ - The code loads with the mesh mode, on demand. The root import does not grow.
41
+
42
+ - [#8](https://github.com/schmooky/pixi-marrow/pull/8) [`2a94aee`](https://github.com/schmooky/pixi-marrow/commit/2a94aeec08a98d9370c3be7f65fd665436a6b081) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Bone handles and containers in a skeleton. `hero.bone(name)` reads and writes the pose of a bone and reads its place in the skeleton. `hero.follow(bone, container)` moves a Pixi container with a bone. `hero.attach(slot, container)` draws a container at the place of a slot in the draw order and moves it with the bone of the slot, as `addSlotObject` of the official runtime does. `unfollow` and `detach` end it. The perf report has a row `links`.
43
+
44
+ Fixed: in a game whose bundle is tree-shaken and imports no Pixi `Mesh` of its own, the mesh mode threw when its code loaded after the renderer was created. It now gives the renderer the mesh pipe it lacks.
45
+
46
+ Fixed: the engine for Spine 4.1 and 4.2 lost a write to a bone from outside when `setSkin` was called with the skin that was set already, before the next update.
47
+
48
+ - [#15](https://github.com/schmooky/pixi-marrow/pull/15) [`a1d71c3`](https://github.com/schmooky/pixi-marrow/commit/a1d71c3ac56aa5a18565854a83792453d04c2ecf) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The idle cache: with `idleCache: 'auto'`, a skeleton at rest is drawn as one image. No preset sets it. Each image is a texture of its own, so many images take memory and split batches, and on a low-end phone small resting symbols drew slower with it. Set it by name where a skeleton is expensive to draw live.
49
+
50
+ - After 30 updates in which its pose, its layout and its render mode did not change, and two renders at the same place, the skeleton is drawn once into a render texture. The view is hidden and a sprite with that image shows in its place, as one quad in Pixi's batch.
51
+ - The image lies on the pixel grid of the target, so it shows the pixels of the live skeleton. The pixel check holds it to the live skeleton and to the official runtime in both render modes, on WebGL2 and WebGPU.
52
+ - Any change of the pose, the layout or the render mode drops the image in the same frame, and the skeleton draws live. So does a render that puts it elsewhere than whole pixels away, or with an alpha or a blend mode above it. An attached container, another renderer, a multisampled target and a WebGL context that came back drop it too.
53
+ - A skeleton that shows a slot that multiplies or screens, or that would need an image larger than 2048 pixels on a side, draws live. So does one drawn to a multisampled target.
54
+ - A tint above a skeleton with a dark color keeps it live, because the shaders tint the light color alone.
55
+ - An image takes 4 bytes per pixel of its box on the target. A dropped image lets go of its color pixels.
56
+ - The code is a chunk of 2.2 kB gzip that loads with the first display object that has the setting. The root import grows by about 0.1 kB.
57
+
58
+ - [#16](https://github.com/schmooky/pixi-marrow/pull/16) [`308e867`](https://github.com/schmooky/pixi-marrow/commit/308e8679449900788af13b151c201b07c496edd8) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Instanced draws: with `skinning: 'gpu'`, the skeletons of the mesh mode that follow each other in Pixi's render order and share a layout draw as one instanced draw.
59
+
60
+ - The new option `instancing: 'auto' | 'off'`, also a setting of `perf`, is `off` in every preset and is set by name. It acts on a skeleton in the mesh mode with `skinning: 'gpu'` and leaves every other one as it is. It pays for many copies of one rig next to each other, and not for a grid of different skeletons. The picture is the same to the bit as with `off`.
61
+ - A run of instances ends where Pixi draws anything else. Inside a run, instances with another layout, draw order, pages or blend mode start another draw, and Pixi builds no instructions again for that.
62
+ - The instances of a layout keep their bones, their slot colors and the vertices the CPU places in data textures they share. A frame uploads each of them once, the stretch that changed from pixi.js 8.23 on. A slot shows one of its attachments, so the vertex shader drops the vertices of the others.
63
+ - A skeleton draws alone while a clipping attachment cuts a visible slot, and while a container attached to a slot is drawn. It always draws alone when a slot multiplies or screens or the atlas has more than 8 pages.
64
+ - `perf.report()` has a row `instancing`: whether the instance draws instanced, in a run of how many and in how many draw calls, or why not. `perf.memory()` counts the slot of an instance in its bytes and the rest of the shared textures as shared.
65
+ - The code is in the chunk of the mesh mode, which loads on demand. Nothing registers with Pixi at import: the pipe goes into a renderer when it first draws an instanced skeleton.
66
+
67
+ - [#16](https://github.com/schmooky/pixi-marrow/pull/16) [`04c36b8`](https://github.com/schmooky/pixi-marrow/commit/04c36b89b404b3799e176aeff6a21683532b18bc) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - `lod: 'auto'` now leaves deform out too, below the same 96 pixels as physics. Every mesh of a skeleton drawn that small shows its setup vertices, and the deform timelines do not run. Both come back at 120 pixels.
68
+
69
+ - The pose engines have a new switch, `engine.deform`. Set to false, it keeps every deform aside and shows none. Set back to true, the deforms come back and the next update applies the deform timelines again, also for a pose at rest. A slot that showed another attachment meanwhile loses its deform, as in the official runtime.
70
+ - A deform switch or a physics mode `none` that the game set stays as the game set it.
71
+ - Baked playback writes no deform while the switch is off.
72
+ - `PacingStatus.physicsOff` is now `reduced`, because it covers deform as well. The `pacing` row of `perf.report()` says that physics and deform are left out.
73
+
74
+ - [#1](https://github.com/schmooky/pixi-marrow/pull/1) [`06a882c`](https://github.com/schmooky/pixi-marrow/commit/06a882ce98a230806a6e186c6db5ef078dc9be9a) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Import Spine 4.1, 4.2 and 4.3 skeletons (JSON and binary) and texture atlases into a model, with `importSkeleton` and `importAtlas` from `pixi-marrow/core`. Add `describeSkeleton`, and `generateNames` plus the `pixi-marrow` command line tool (`info`, `typegen`) in `pixi-marrow/optimize`.
75
+
76
+ - [#2](https://github.com/schmooky/pixi-marrow/pull/2) [`825fe74`](https://github.com/schmooky/pixi-marrow/commit/825fe7432730c4295c4c691afd4c353026f8835b) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Play skeletons without a renderer. `createPoseEngine` from `pixi-marrow/core` gives a pose engine for Spine 4.1, 4.2 and 4.3 with tracks, queue, mixing, skins and events. Its pose equals the official runtime exactly. Constraints are not solved yet. Add the geometry functions that turn a pose into vertex positions and texture coordinates. Setup values in the model are now 64-bit.
77
+
78
+ - [#3](https://github.com/schmooky/pixi-marrow/pull/3) [`46c686e`](https://github.com/schmooky/pixi-marrow/commit/46c686e930b3d8cabf2daa05bc7316f970e12f3c) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Draw skeletons in PixiJS v8. `MarrowSpine` from `pixi-marrow` loads a skeleton and its atlas, plays animations with `play`, `queue` and `stop`, and draws in one draw call for most skeletons, on WebGL2 and WebGPU. Additive slots share the draw call. Showing, hiding and reordering slots rewrites the index buffer only. Constraints and clipping are not solved yet.
79
+
80
+ - [#4](https://github.com/schmooky/pixi-marrow/pull/4) [`5673491`](https://github.com/schmooky/pixi-marrow/commit/567349174f6f974879b7ef1ab1c719c5f6ca2552) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Solve IK, transform and path constraints for Spine 4.1, 4.2 and 4.3, with the same pose as the official runtime, bit for bit. `constraints: 'ignore'` now skips physics and slider constraints only, and only those throw without it.
81
+
82
+ Clipping attachments clip, through a stencil mask. A skeleton without a clip pays nothing for it.
83
+
84
+ Cut overdraw. After a load the page images are read in idle time (`asset.optimized` resolves when that is done). A region without a visible pixel is then not drawn, and a slot behind the opaque part of a later slot is skipped, with the same picture. The new option `tightMesh: 'on'` also draws regions as polygons around their visible pixels. The new command `pixi-marrow outlines <atlas>` writes the outlines at build time, for the new load option `outlines`.
85
+
86
+ `stats` has new counters: `clips`, `maskDraws`, `maskUploads`, `maskRebuilds`, `tightRanges` and `coveredSlots`. `clippingIgnored` is gone.
87
+
88
+ - [#5](https://github.com/schmooky/pixi-marrow/pull/5) [`159e97f`](https://github.com/schmooky/pixi-marrow/commit/159e97f43754f95757cd030ac85cf99119b21374) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Solve physics constraints (Spine 4.2 and 4.3) and sliders (4.3), with the same pose as the official runtime, bit for bit. Every constraint of the three versions is solved now. The load option `constraints` and the option of `createPoseEngine` are gone: there is nothing left to ignore.
89
+
90
+ Physics control on the display object: `physics` (`update`, `pose`, `reset`, `none`), `resetPhysics()`, `physicsTranslate(x, y)` and `physicsRotate(x, y, degrees)`. On a pose engine: `physics`, `physicsTranslate`, `physicsRotate`, and in its state `yDown`, `windX`, `windY`, `gravityX` and `gravityY`.
91
+
92
+ More play options: `additive`, `start`, `end`, `shortestRotation`, `eventThreshold`, and `entry` for any other field of the official track entry by its official name. `Track` has `configure(fields)` and `additive`. Options are checked before anything plays.
93
+
94
+ `await spine.perf.report()` lists what the runtime decided for an instance and why. `await spine.perf.memory()` gives the bytes shared per asset, per instance and on the GPU. Both load their code at the first call.
95
+
96
+ The new entry `pixi-marrow/perf` has `createProbe(spine)`: it times the pose, geometry and event work of every update and counts what the renderer did.
97
+
98
+ - [#6](https://github.com/schmooky/pixi-marrow/pull/6) [`52cd049`](https://github.com/schmooky/pixi-marrow/commit/52cd049b127a560c53538b311bd0b52f69605923) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - A batched render mode: skeletons of one render group share draw calls. 200 instances of a small rig draw in one call, where each took one or more before. The new option and property `renderMode` is `auto` by default, which batches every skeleton of up to 1024 vertices. `mesh` and `batched` force one side. `stats.renderMode` and a row of `await spine.perf.report()` name the mode in use and the reason.
99
+
100
+ In batched mode a draw order, visibility, attachment or color change rewrites data in place. Pixi does not rebuild the instructions of the render group for it.
101
+
102
+ Clipping no longer stops batching. In batched mode a clip is cut on the CPU, with the same triangles as the official runtime, bit for bit. The code for it loads with an asset that has a clipping attachment. Mesh mode keeps its stencil mask.
103
+
104
+ Less memory per instance. The static part of a layout is shared between the instances of an asset, and one shader serves all views of the same pages. A batched instance holds no Pixi mesh, geometry or buffer of its own.
105
+
106
+ The clip polygon of a region without weights or deform is triangulated once per attachment, not on every update.
107
+
108
+ Fixed: 1200 instances of a rig with a clip no longer fail on WebGPU with `ubo batch got too big`. They draw in one call.
109
+
110
+ - [#7](https://github.com/schmooky/pixi-marrow/pull/7) [`eeb8673`](https://github.com/schmooky/pixi-marrow/commit/eeb867354245fce06b4c72ef84955fed9cd50f4f) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Work follows change. A skeleton at rest costs close to nothing: its update runs no timeline, poses no bone, places no vertex and uploads nothing. A skeleton that moves a little costs a little: only the bones whose inputs changed are posed, and only the slots that changed are placed, colored and uploaded.
111
+
112
+ A pose state carries what changed: `version`, `boneStamps`, `slotStamps` and `drawOrderStamp`, with `isNewer`, `nextVersion` and `touchPose` in `pixi-marrow/core`. Code that writes the arrays of a pose state itself now calls `touchPose(state)` or sets the stamps of what it wrote. The engines and the views skip their work otherwise.
113
+
114
+ The root import is smaller. The mesh mode, the clip code and the cuts of overdraw load when a skeleton needs them. The new load option `renderMode: 'mesh'` loads the mesh mode with the asset. An instance that asks for meshes before they are loaded draws in the batch until they arrive.
115
+
116
+ `await spine.perf.report()` has a row `motion`: how much of the skeleton moved in the last update and whether the view rested. `stats` has `skips`, `placedSlots` and `coloredSlots`, and the probe counts `skippedUpdates` and `placedSlots`.
117
+
118
+ Fixed: the mesh mode drew stale triangles on pixi.js before 8.20 after a skin change, or after two updates between two draws. Partial uploads are used from pixi.js 8.23 only: 8.20 to 8.22 lose all but the last one of a frame.
119
+
120
+ - [#19](https://github.com/schmooky/pixi-marrow/pull/19) [`1a53040`](https://github.com/schmooky/pixi-marrow/commit/1a53040438b8533779f739ad23e264ce402a8a7b) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Outlines are off by default. A load reads no page image any more unless it asks. Pass the file that `pixi-marrow outlines` writes at build time as `outlines`, or set `outlines: 'auto'` to read the page images in idle time after the load. That scan draws every page into a canvas, 32 MB for a page of 2048 by 2048 for a moment, which a phone with little memory can fail on. Without outlines every region stays a quad and every slot is drawn, so the picture is the same and only the cuts of overdraw are gone.
121
+
122
+ - [#15](https://github.com/schmooky/pixi-marrow/pull/15) [`0085abe`](https://github.com/schmooky/pixi-marrow/commit/0085abef1ac9f114150b26763308277f61141979) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Performance presets and pacing: `perf: 'exact' | 'balanced' | 'fast'` sets several options at once, and each one is an option of its own too.
123
+
124
+ - `exact` is the default and changes nothing. The presets set when a skeleton updates, and nothing else. `balanced` sets `offscreen: 'throttle'`. `fast` sets `offscreen: 'pause'` and `updateRate: 30` for batched skeletons. Baking, tight meshes, the idle cache, `lod` and instancing cost memory, vertices or draw calls in a way that depends on the device and the scene, so no preset sets them. Each is set by its own name.
125
+ - A `perf` object starts from its `preset` and changes the settings it names. An option given by name wins over both. A preset or a value that does not exist throws a `MarrowError` with the closest valid name.
126
+ - `offscreen: 'throttle'` updates a skeleton off the screen 4 times a second with the time that passed. `'pause'` stops its time until it is on the screen again. A skeleton is off the screen when its bounds lie outside the screen, or no render reached it for 2 updates and 0.1 seconds. `play`, `queue` and `stop` pose the gathered time first, so its events fire.
127
+ - `updateRate` poses a skeleton at most that many times a second, with the time of the updates in between.
128
+ - `lod: 'auto'` leaves physics out while a skeleton is drawn smaller than 96 pixels across, and resets physics when it grows to 120.
129
+ - `perfSettings` holds the settings in effect, and `pacingStatus()` says how often the skeleton updates right now and why. The first two rows of `perf.report()` say the same.
130
+ - The physics controls of `MarrowSpine` moved to a new base class, `SpinePhysics`. Nothing changes for a game that calls them.
131
+
132
+ - [#11](https://github.com/schmooky/pixi-marrow/pull/11) [`e3ee547`](https://github.com/schmooky/pixi-marrow/commit/e3ee547bc01a7bf8493878ceb594421ed77b19ab) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Load skeletons through Pixi `Assets`. `registerMarrowAssets()` adds parsers for `.skel` files, Spine `.json` files and `.atlas` files, so aliases, manifests and bundles load them, as AssetPack writes them. `MarrowSpine.from({ skeleton, atlas })` and `MarrowAsset.get` take the aliases and return at once. An atlas named like `hero@0.5x.webp.atlas` counts as resolution 0.5 in WebP for `texturePreference`. The `data` of an atlas takes `images` and `imageMetadata`, as in the official runtime. Unloading an atlas destroys the assets made from it.
133
+
134
+ - [#19](https://github.com/schmooky/pixi-marrow/pull/19) [`1a53040`](https://github.com/schmooky/pixi-marrow/commit/1a53040438b8533779f739ad23e264ce402a8a7b) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - pixi.js 8.21 or later is needed. The peer range of `pixi.js` is `^8.21.0`, and the checks no longer run on 8.16. The workarounds for the versions before 8.21 stay in the code for now, and nothing relies on them.
135
+
136
+ - [#13](https://github.com/schmooky/pixi-marrow/pull/13) [`b4c58c1`](https://github.com/schmooky/pixi-marrow/commit/b4c58c1a9ed4fecaf3fc924b1e08ba08cf960cae) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Several skins at once, a slot handle, the setup pose and point conversion on the display object.
137
+
138
+ - `hero.skins = ['skin-base', 'hair/pink']` makes a list of skins active as one, as `Skin.addSkin` does in the official runtime. The later skin wins where two store an attachment under one slot and name. Instances of an asset share the combined skin, and one that no instance shows is freed after the 8 newest such.
139
+ - `hero.slot(name)` gives a handle with `attachment`, `tint`, `alpha` and `darkTint`. A write stays until an animation keys the slot or the setup pose of the slots is set. Writing the value a slot has changes nothing, so a skeleton at rest stays at rest.
140
+ - `hero.setupPose()` resets the bones and the slots, `'bones'` or `'slots'` one half.
141
+ - `bone.localToWorld(point)` and `bone.worldToLocal(point)` take points between a bone and the skeleton.
142
+ - The pose engines of `pixi-marrow/core` gain `setSkins`, `skins`, `slotPose`, `setAttachment`, `setColor` and `setDarkColor`. A parity family checks all of them against the official cores of 4.1, 4.2 and 4.3.
143
+
144
+ ### Patch Changes
145
+
146
+ - [#39](https://github.com/schmooky/pixi-marrow/pull/39) [`7b81c32`](https://github.com/schmooky/pixi-marrow/commit/7b81c328b4d38a66354739bb5ddffef0d30ab615) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Fixes from an audit of pacing, lod, skins and baking.
147
+
148
+ - `MarrowAsset.get` and `MarrowSpine.from` read no page images unless `outlines` is `'auto'`, as `MarrowAsset.load` does. The Pixi `Assets` path scanned every page before, about 32 MB for a page of 2048 by 2048.
149
+ - A display object that sets `tightMesh` or `occlusion` by name on an asset without outlines warns once per asset, because those options do nothing then.
150
+ - `offscreen: 'pause'` and `'throttle'` count a skeleton as off the screen when it or a parent has `visible` or `renderable` false. Pixi still calls `onRender` for such a skeleton, so a hidden popup kept its skeletons updating.
151
+ - `lod: 'auto'`: a skeleton that shrinks while an animation with deforms mixes out, then grows again, shows the deform of a skeleton without lod. It showed the deform from before the mix.
152
+ - Setting `skin` or `skins` to the skins that are active changes nothing. It put the slots into their setup pose before, which reset tints and attachments set through slot handles. `skin` reads null while several skins are active, and null written back keeps them.
153
+ - A freed combined skin gives its index to the next one, so the count of skins stays bounded for a game that tries many lists.
154
+ - Baked playback shows the nearest frame. A tick of a 60 Hz screen lands on a sample, give or take its jitter. Playback of the frame at or before the time repeated a frame and skipped the next in most updates.
155
+ - `bake: 'auto'` bakes a clip in idle time, a frame of the animation or more per slice. The object plays live until the clip is there. The bake ran inside the update that first played the animation, a hitch on a phone. The clips are the same.
156
+ - `addBakedClips` refuses a clip whose duration is not that of the animation, which catches a stale clip of a JSON export without the editor hash. It also refuses a draw order that holds a slot twice.
157
+
158
+ - [#39](https://github.com/schmooky/pixi-marrow/pull/39) [`7b81c32`](https://github.com/schmooky/pixi-marrow/commit/7b81c328b4d38a66354739bb5ddffef0d30ab615) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Fixes of the render path and the idle cache, found in an audit.
159
+
160
+ - On WebGPU the uniform buffers that meshes of the mesh mode bind past the 256 places kept for the scene are static now. Pixi uploads one only when its transform, tint or rounding changed. Before, each draw wrote and uploaded it. When a private field of Pixi that this code reads is missing, the runtime reports it once in the console, with the version of pixi.js.
161
+ - On a renderer of WebGL1 no skeleton draws, and `console.warn` says so once. Every shader is GLSL 3.00, and Pixi uses WebGL1 where a browser has no WebGL2. The rest of the app goes on.
162
+ - `instancing: 'auto'` does not draw a layout instanced when its attachments have more than twice the vertices a pose shows. A pose shows the setup attachments, and the largest attachment of a slot that is empty in the setup pose. One such layout is speedy-ess, with 108 against 44. The perf report says so with both counts. The new value `instancing: 'on'` draws such a layout instanced anyway.
163
+ - The stats of an instance that draws instanced count no uploads of their own. The pool of its layout counts its uploads, and the row `uploads` of the perf report gives that count.
164
+ - The views of a layout with `skinning: 'gpu'` share one GPU buffer of skin data. Before, each view made a copy. The shared bytes of `perf.memory()` count it once.
165
+ - Instanced draws free the layouts, pools and shaders that they no longer draw with. The runtime frees the pools of a layout once no instance holds a place in them. So a burst of instances leaves no large textures.
166
+ - The idle cache drops an image when a page texture updates or takes another source. It keeps a skeleton live under a filter or a mask, and holds at most 64 MB of images in all. It no longer keeps the last captured skeleton alive.
167
+
168
+ - [#40](https://github.com/schmooky/pixi-marrow/pull/40) [`41728c3`](https://github.com/schmooky/pixi-marrow/commit/41728c3c8df3d3a599a0c9e1efc6e5534e0157a1) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The README on npmjs.com links to the files on GitHub. Its relative links pointed nowhere there. The description of the package names WebGL2 and WebGPU, and the keywords name what people search for.
169
+
170
+ - [#40](https://github.com/schmooky/pixi-marrow/pull/40) [`41728c3`](https://github.com/schmooky/pixi-marrow/commit/41728c3c8df3d3a599a0c9e1efc6e5534e0157a1) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - A coding agent or a person can now find every skeleton of a scene and name what costs time in it.
171
+
172
+ Additions:
173
+
174
+ - The entry `pixi-marrow/diagnose`. `diagnose(root)` walks a Pixi scene tree and returns the causes of cost that one look finds. Each hit has a stable rule id from `MARROW001` to `MARROW025`. It also has the path of the skeleton, the path of the cause, the numbers, a fix and a docs address.
175
+ - `watch(root)` notes the counters of every skeleton. Its `report()` adds the causes that show only over time, such as a parent that moves or fades.
176
+ - `inspect(hero)` reads one skeleton into plain data: counts, render mode, draw calls, cuts, uploads, pacing, physics and memory.
177
+ - `serializeTree(root)` writes the tree as JSON, and `diagnoseTree(json)` runs the static rules on it without Pixi.
178
+ - `installDevtools()` puts the hook `__PIXI_MARROW__` on `globalThis`. The package registers nothing until a game calls it. `installDevtools({ warn: true })` prints each hit once per rule and skeleton.
179
+ - The command line tool has two more commands: `pixi-marrow rules [--json]` and `pixi-marrow diagnose <tree.json> [--json]`.
180
+ - The tarball ships `AGENTS.md` for coding agents that use the package, `perf-rules.json` and `skills/pixi-marrow/SKILL.md`. `pixi-marrow/perf-rules.json` is an export.
181
+ - A row of `perf.report()` can carry `rule`, `docs` and `data`. `rule` is the id of the rule that names its cause, and `data` holds the facts of the row for a program.
182
+ - `MarrowError.docs` is set for the codes `unsupported-version`, `unknown-name`, `not-registered` and `not-loaded`.
183
+ - Each warning of the runtime ends with the address of its docs page.
184
+
185
+ Fixes:
186
+
187
+ - The row `motion` of `perf.report()` said "placed no vertex and uploaded nothing" for a pose at rest below a container that moved or faded. It now says what the batch wrote, with the bytes of the frame and the rule id.
188
+
189
+ - [#40](https://github.com/schmooky/pixi-marrow/pull/40) [`41728c3`](https://github.com/schmooky/pixi-marrow/commit/41728c3c8df3d3a599a0c9e1efc6e5534e0157a1) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Fixes from the second audit, in the display object, the pacing and the baked clips.
190
+
191
+ Breaking changes:
192
+
193
+ - `Track.finished` resolves with a reason: `'complete'`, `'interrupted'`, `'stopped'` or `'destroyed'`. It resolved with nothing before. It still never rejects.
194
+ - After `destroy()` a display object throws a `MarrowError` with the code `destroyed`. `play`, `queue`, `stop`, `setMix`, `bone`, `slot`, `skin`, `skins`, `setupPose`, `follow`, `attach` and `autoUpdate = true` throw. `update`, `destroy`, `unfollow` and `detach` do nothing.
195
+ - `new MarrowSpine`, `MarrowSpine.load` and `MarrowSpine.from` throw for a key that is no option, with the closest option. `scale`, `darkTint` and `boundsProvider` get a message that says what to use here. A wrong `occlusion` or `autoUpdate` value throws, and so does an unknown key of a `perf` object.
196
+ - `MarrowErrorCode` has five more codes: `invalid-option`, `not-found`, `not-registered`, `not-loaded` and `destroyed`. A wrong option, setter value or argument now has the code `invalid-option`. It had `invalid-data`, and an unknown key of the play options had `unknown-name`. A destroyed asset passed to `new MarrowSpine` has the code `destroyed`.
197
+ - `on`, `once` and `off` of a `MarrowSpine` are typed from `MarrowSpineEvents` and the Pixi container events. A wrong event name does not compile. For an event of your own, call `on` of the object as a Pixi `Container`.
198
+ - `offscreen: 'pause'` keeps the time of a hidden skeleton moving. Its tracks, its events and `Track.finished` go on, and nothing is posed or drawn. The time stood still before, so `await hero.play('win').finished` could wait for ever.
199
+ - An update from the ticker does not pose or draw a display object that Pixi does not draw. That is an object without a parent, or with `visible` or `renderable` false or an alpha of 0, on itself or on a parent. Its tracks, events and `Track.finished` go on. The render that shows it again poses it first. An `update` that you call yourself always poses.
200
+ - `timeScale`, `defaultMix` and the seconds of `setMix` throw for a value that is no finite number.
201
+ - `update(seconds)` throws for seconds that are no finite number. `update(Infinity)` never returned on a skeleton with physics.
202
+ - The messages of some errors changed, such as `speed got NaN.` for a wrong option value.
203
+
204
+ Fixes and additions:
205
+
206
+ - `updateRate` holds its rate. Rate 30 on a 60 Hz display gave 20 to 23 poses a second, because the time over a step was dropped. A step is now due in the frame nearest to it, and the rhythm is even on displays of 60, 90, 120 and 144 Hz.
207
+ - An update of more than 10 seconds starts the physics again, as `resetPhysics` does. An hour of physics in one update took 20 to 130 milliseconds.
208
+ - The `ticker` option names the ticker that updates the object. Pass `app.ticker` so that its `speed`, `maxFPS` and `stop()` reach the skeleton. The default stays `Ticker.shared`. `hero.ticker` reads it.
209
+ - Clips that a game bakes while it plays hold at most 4 MB per skeleton. The clip that played longest ago goes first, and a clip in use never goes. `setBakeBudget` of `pixi-marrow/bake` sets the limit. `perf.memory()` reports `baked` and `bakeBudget`.
210
+ - The idle cache draws at most 4 images per frame over all display objects. 200 symbols that came to rest together made 200 render passes in one frame.
211
+ - A display object warns once when an option has no effect: `instancing` without `skinning: 'gpu'`, and `skinning: 'gpu'` or `instancing` on a batched skeleton. The warning for options that need outlines has the same form now.
212
+ - `follow` warns once for a container that is no child of the display object.
213
+ - `play()` and `queue()` without a name say that the name is missing. The error for an unknown attachment of a slot reads as a sentence.
214
+ - A `MarrowSpine` has the Pixi label `MarrowSpine`, or the `label` option, and the field `isMarrowSpine`.
215
+ - `MarrowError` has an optional `docs` field for the address of a docs page.
216
+ - An update keeps no event that nobody listens for.
217
+ - The root exports the types `TrackEnd`, `ResolvedPerf`, `PacingStatus`, `DrawMode`, `PoseEngine`, `PoseEngineFactory`, `SkeletonModel`, `AtlasModel`, `SpineTicker`, `SpineEventName` and `SpineListener`. The constructors of `Bone`, `Slot` and `MarrowPerf` are internal.
218
+ - The JSDoc says where vertices are placed: on the CPU, or in the vertex shader with `skinning: 'gpu'`, meshes with weights too.
219
+
220
+ - [#40](https://github.com/schmooky/pixi-marrow/pull/40) [`41728c3`](https://github.com/schmooky/pixi-marrow/commit/41728c3c8df3d3a599a0c9e1efc6e5534e0157a1) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The JSDoc says what the code does in four places. `destroy` of a display object ends the asset when that object was its last holder. `stop` with a mix returns the track to what lower tracks give, or to the setup pose. `StopOptions.mix` says the same. `autoUpdate` says that a hidden object with a mix or several tracks is still posed, and that no vertex is placed.
221
+
222
+ - [#40](https://github.com/schmooky/pixi-marrow/pull/40) [`41728c3`](https://github.com/schmooky/pixi-marrow/commit/41728c3c8df3d3a599a0c9e1efc6e5534e0157a1) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The leftovers of the second audit.
223
+
224
+ - An asset has a name. `asset.name` is the `name` option of the load. Without that option, it is the file name of the skeleton URL without the extension. It is the empty string for a skeleton in memory. A display object without a `label` gets the label `MarrowSpine:<name>`.
225
+ - `MarrowAsset.fromData` makes an asset from data in memory. `MarrowAsset.from` is the older name and is deprecated. `MarrowAsset.fromCache` gets the asset of files that Pixi `Assets` loaded. `MarrowAsset.get` stays as its first name.
226
+ - More errors have a code of their own. A file or a page image that does not load throws `not-found`. A call before `registerMarrowAssets()` throws `not-registered`. An alias that Pixi `Assets` does not hold throws `not-loaded`. A wrong argument of an engine call, of `createProbe` and of `MarrowDebug` throws `invalid-option`. A destroyed view and a destroyed probe target throw `destroyed`.
227
+ - A baked clip of the JSON export fits the binary export of the same skeleton. The duration of the clip can differ from the animation by 0.0001 seconds.
228
+ - The pacing of `offscreen` and `lod` reads a box that can be 8 renders old. A skeleton with `skinning: 'gpu'` no longer places its vertices on the CPU in each frame. A move, a new scale and a new attachment still count at once.
229
+ - The mesh mode uploads the vertices that changed one time per frame, before the render. Thus `stats.uploadBytes` and `stats.frameBytes` count these bytes after the render.
230
+ - With `idleCache: 'auto'`, a skeleton whose animation ran while it was hidden no longer shows its old image for one frame.
231
+ - A second view of a model does not draft its first layout again.
232
+ - `pnpm build` loads its config as plain JavaScript. The build needs no Node that strips types.
233
+
234
+ - [#40](https://github.com/schmooky/pixi-marrow/pull/40) [`41728c3`](https://github.com/schmooky/pixi-marrow/commit/41728c3c8df3d3a599a0c9e1efc6e5534e0157a1) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Fixes from an audit of loading, assets and file readers.
235
+
236
+ - An asset counts its holders. Each `MarrowAsset.load` that returns it is one owner, and each live `MarrowSpine` holds it too. `asset.destroy()` lets one owner go. The asset unloads its textures only when no owner and no display object is left. Before, one `destroy` call took the textures from every display object, and the Pixi render crashed.
237
+ - `MarrowSpine.load` gives its hold on the asset to the display object. `hero.destroy()` then unloads the asset when no other holder is left. Before, the model and the textures stayed for the life of the page.
238
+ - Page images are held by absolute URL, in one map for `MarrowAsset.load` and for the `.atlas` parser of Pixi `Assets`. A relative and an absolute URL of one image give one texture. pixi-marrow never unloads an image that the game loaded through Pixi `Assets` itself.
239
+ - Unloading an atlas or a skeleton from Pixi `Assets` lets the assets made from it go. An asset with a display object on the stage keeps its pages until that object is destroyed. An asset of a skeleton that was loaded again no longer stays in memory.
240
+ - `MarrowAsset.load` sends every URL through the resolver of Pixi `Assets`. `basePath` and `defaultSearchParams` of `Assets.init` now apply to the skeleton, the atlas, the outlines file and the pages. Before, they applied to the pages only, and a page path could double.
241
+ - A JSON skeleton is told by its content, not by a `.json` suffix. URLs with a hash, a query or no extension work, and `blob:` URLs too. `importSkeleton` and `sniffSkeleton` take the bytes of a JSON file.
242
+ - When a server answers with an HTML page, the error says so and names the URL. Every load error names its URL. The parsers for Pixi `Assets` throw `MarrowError`.
243
+ - `outlines: 'auto'`: assets that draw from one page image share one scan of it. The scans read the pages one after the other through one WebGL context, and free it when no page waits. Before, 17 assets on one atlas opened 17 contexts. A scan works in slices of 4 ms. A page that fails warns once, with the cause.
244
+ - `MarrowAsset.get` and `MarrowSpine.from` take `outlines` as an object, or as the alias or URL of an outlines file that Pixi `Assets` loaded.
245
+ - `pixi-marrow outlines` has the option `--pages <dir>`. It reads the PNG sources of an atlas with WebP or AVIF pages from that folder, by base name. Without the option, the error for such an atlas names it.
246
+ - `model.hash` is the same for the `.json` and the `.skel` of one export: 16 hex digits. Clips baked from a `.skel` before this release need a new bake.
247
+ - The 4.3 binary reader checks every count against the file size, as the 4.2 reader does. All readers refuse more than 32,767 bones or slots.
248
+ - A dark color timeline on a slot without a dark color fails at the import, for all versions. Before, a 4.3 skeleton threw inside the ticker.
249
+ - A page image that the game loaded before in another alpha mode than its atlas page needs warns once, with the fix.
250
+
251
+ - [#40](https://github.com/schmooky/pixi-marrow/pull/40) [`41728c3`](https://github.com/schmooky/pixi-marrow/commit/41728c3c8df3d3a599a0c9e1efc6e5534e0157a1) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - A playing pose engine no longer allocates in an update that reports no event. Before, a walking spineboy allocated about 1,400 bytes in each update. An update that reports events allocates the list that `takeEvents` returns and one object for each event. A test now measures the heap of live engines of both kinds while their timelines play.
252
+
253
+ The 4.3 pose engine now rests in the same states as the 4.2 engine. These states are ended entries on two or more tracks, an ended entry below full alpha, and an ended entry on an upper track only. In these states an update runs no timeline, and `state.version` stays the same.
254
+
255
+ `configure` follows the same rules in both pose engines. The engine checks all fields before it writes one, so a call that throws changes nothing. A field of a different Spine version throws `unsupported-feature`. A name that no version has throws `unknown-name` with the closest field name. A value of the wrong type throws `invalid-data`. A field with the value `undefined` stays as it is.
256
+
257
+ The 4.3 engine prepares an animation when a call plays it for the first time. The first engine of a model with 1,500 animations took 70 ms and 38 MB. It now takes 17 ms and 1 MB. An animation that the engine cannot play now throws on its first play, not when you create the engine.
258
+
259
+ A timeline with more than 32 keys is searched by halves. The search finds the same key as the official search. In the 4.2 engine, an animation with 6,000 keys on each of 30 bones took 265 microseconds for each update. It now takes 22.
260
+
261
+ A slot without a deform shares one empty array with all other slots. One spineboy instance takes about 10 kB less memory. `engine.bytes` counts the data of the typed arrays. The JSDoc now gives the cost of the objects that it does not count.
262
+
263
+ The 4.3 engine keeps each entry that a track mixes from while the track changes its animation faster than the mix. The official 4.3.13 runtime does the same, and the pose must be equal to the official pose. A test now records this behavior.
264
+
265
+ The JSDoc of `takeEvents` and `createPoseEngine` now tells you to call `takeEvents` after each update. An engine keeps its events until that call.
266
+
267
+ - [#40](https://github.com/schmooky/pixi-marrow/pull/40) [`41728c3`](https://github.com/schmooky/pixi-marrow/commit/41728c3c8df3d3a599a0c9e1efc6e5534e0157a1) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The render path sends fewer bytes, and the stats count what a parent costs. These changes come from the second audit.
268
+
269
+ - A batch keeps 256 stretches per buffer, not 32. When more skeletons change, it uploads one stretch around all of them, not the whole buffer.
270
+ - A slot that changes only its color writes only its own vertices to the batch. Before, the batch uploaded the static data of the whole skeleton.
271
+ - A region whose slot changes only its color keeps its vertices. Before, the view placed them again and uploaded their positions.
272
+ - `stats.transformReplaces` counts the frames of the batched mode that placed each vertex again because a display object above the skeleton moved.
273
+ - `stats.tintRewrites` counts the frames that wrote the static data again because the tint or the alpha above the skeleton changed.
274
+ - `stats.instructionBuilds` counts how often Pixi built the instructions of the render group with the skeleton in a batch.
275
+ - `stats.uploadBytes` holds the bytes that the view sent to the GPU, as `positions`, `statics`, `indices`, `bones` and `masks`.
276
+ - `stats.frameBytes` holds the bytes of all kinds since the last update of the view began. It is 0 after a frame in which nothing moved.
277
+ - A skeleton in a batch that shows no slot stays in its batch and draws triangles without area. Before, Pixi built the instructions of the render group again each time the skeleton became empty or visible.
278
+ - The room of a batch for cut triangles grows by a factor of two when a pose needs more. A loop with a clip builds the instructions fewer times.
279
+ - A skeleton with a clip that rests below a display object that moves keeps its cut triangles. The batch places them again and cuts nothing.
280
+ - With `skinning: 'gpu'` and outlines, the CPU places the vertices only for a search for covered slots, one time in 4 to 64 updates. While a slot is covered, the CPU still follows each pose.
281
+ - With `skinning: 'gpu'` and no instancing, the textures of bones and colors upload one time per frame, before Pixi draws the view. A hidden view uploads nothing.
282
+ - On WebGPU the mesh mode finds the uniform buffer of Pixi one time per renderer, not for each mesh in each frame.
283
+ - A renderer that is not WebGL2 and not WebGPU, such as the Canvas renderer of Pixi, draws no skeleton. `console.warn` says so one time, and the view counts no draw call.
284
+
285
+ - [#39](https://github.com/schmooky/pixi-marrow/pull/39) [`7b81c32`](https://github.com/schmooky/pixi-marrow/commit/7b81c328b4d38a66354739bb5ddffef0d30ab615) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The optional peer pixi-silk is `^1.0.1` again. The debug overlays work on 1.0.1. The fix of 1.0.2 is for the transform gizmo of the playground of the site, and the site depends on 1.0.2 itself.
286
+
287
+ - [#11](https://github.com/schmooky/pixi-marrow/pull/11) [`e3ee547`](https://github.com/schmooky/pixi-marrow/commit/e3ee547bc01a7bf8493878ceb594421ed77b19ab) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - First pre-release on npm, under the Spine Runtimes License in `LICENSE`. The pose core is ported from the official Spine Runtimes. Each user of pixi-marrow needs their own Spine Editor licence, as for the official runtimes.
288
+
289
+ - [#16](https://github.com/schmooky/pixi-marrow/pull/16) [`2323edc`](https://github.com/schmooky/pixi-marrow/commit/2323edcf734f31ea2210c317ca4f5a108b12c040) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The idle cache draws its images in the batches of the batched mode, not as Pixi sprites. An image now shares a batch with the skeletons around it, so a grid where symbols at rest and in play take turns no longer breaks the batch at every image. In the reels of the site a frame of a win took 10 to 14 draw calls with the idle cache on, and now takes 3 or 4, as without it.
290
+
291
+ - [#10](https://github.com/schmooky/pixi-marrow/pull/10) [`140194e`](https://github.com/schmooky/pixi-marrow/commit/140194e07a08d66b878a13bfd3558617aeafe56c) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Fixed: a skeleton that was first drawn while the WebGL context was lost stayed invisible after the context came back. On pixi.js 8.16 it threw inside the render. A skeleton now draws nothing while the context of its renderer is lost, and draws again with the context that comes back. Skeletons that were drawn before the loss came back before this change and still do, at rest too.
292
+
293
+ The pixel check now loses and restores the context of a running game in both render modes, see `scripts/render/restore-check.mjs`.
294
+
295
+ - [#21](https://github.com/schmooky/pixi-marrow/pull/21) [`39a5b31`](https://github.com/schmooky/pixi-marrow/commit/39a5b31f8e5418b5969177366c1bc36da8a0e61a) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The optional peer pixi-silk is `^1.0.2`. The debug overlays draw as before. pixi-silk 1.0.2 ends a drag of its transform gizmo on the release wherever it happens, which the playground of the site relied on a workaround for.
296
+
297
+ - [#9](https://github.com/schmooky/pixi-marrow/pull/9) [`91de488`](https://github.com/schmooky/pixi-marrow/commit/91de488eb1da4d4aa4422e76b352c143230f8b68) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - Fixed: a display object whose asset was destroyed threw a `TypeError` from Pixi's shared ticker, which then stopped for every skeleton of the page. Its `update` now does nothing, and `autoUpdate` turns off. Destroy the display objects of an asset before the asset, as before.
298
+
299
+ - [#20](https://github.com/schmooky/pixi-marrow/pull/20) [`639d15e`](https://github.com/schmooky/pixi-marrow/commit/639d15e5005f4a8809d0d0f4f76892bfb2719b6e) Thanks [@igaming-bulochka](https://github.com/igaming-bulochka)! - The mesh mode draws more than about 2000 meshes in a frame on WebGPU. Pixi gives every mesh draw a slot of one uniform buffer per frame and threw once it was full, so 1200 instances of a rig with a clip failed. A mesh of pixi-marrow now takes a slot while the buffer has room for the rest of the scene, and binds a small uniform buffer of its own after that. That buffer is uploaded only when its transform, tint or rounding change. Other meshes are drawn by Pixi as before, and WebGL is unchanged.
300
+
3
301
  ## 0.1.0-next.1
4
302
 
5
303
  ### Minor Changes