@typeonce/ritmo-pixi 0.15.0 → 0.16.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @typeonce/ritmo-pixi
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9b0379e: **Every JSDoc `@example` now compiles against the current API.** Examples are type-checked in CI as a game would import them, so they no longer cite exports that do not exist or call them with the wrong arguments. What changed in meaning:
|
|
8
|
+
|
|
9
|
+
- `Game.Runtime.make(...)` with a constructed resource (a `Clock.resource`, a `Descriptor.ConstructedResource`) returns a `Result` that may fail: the examples check `ok` instead of reading `.value`.
|
|
10
|
+
- A captured input resource is typed from its source: `Descriptor.TransientResource<InputCapture.SnapshotOf<typeof KeyboardInput>>()`, not `Keyboard.Snapshot<...>`.
|
|
11
|
+
- `Netcode.seats(...)` returns a `Result`: check it instead of `.value!`.
|
|
12
|
+
- `Lint.Target<typeof Game.schema, typeof Root>` takes the schema root second.
|
|
13
|
+
- `NodeRegistry.make` infers the node type from `attach`'s parameter, with no explicit generic.
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [9b0379e]
|
|
16
|
+
- @typeonce/ritmo-render@0.16.0
|
|
17
|
+
|
|
3
18
|
## 0.15.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
+
* import { Container, Sprite, Texture } from "pixi.js"
|
|
17
|
+
*
|
|
18
|
+
* declare const enemy: Entity.EntityId<typeof Game.schema>
|
|
19
|
+
* declare const despawned: Entity.EntityId<typeof Game.schema>
|
|
20
|
+
* // ---cut---
|
|
21
|
+
* const actorLayer = new Container()
|
|
16
22
|
* const sprites = PixiNodeRegistry.make(actorLayer)
|
|
17
|
-
* sprites.ensure(
|
|
18
|
-
* sprites.remove(
|
|
23
|
+
* sprites.ensure(enemy, () => new Sprite(Texture.WHITE))
|
|
24
|
+
* sprites.remove(despawned)
|
|
19
25
|
* sprites.clear()
|
|
20
26
|
* ```
|
|
21
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PixiNodeRegistry.d.ts","sourceRoot":"","sources":["../src/PixiNodeRegistry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PixiNodeRegistry.d.ts","sourceRoot":"","sources":["../src/PixiNodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAA;AAEnE;;;;GAIG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK;IAClC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;IAC/B,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAA;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACjC;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,IAAI,IAC5B;IAAC,IAAI;CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,GAChC,aAAa,CAAC,IAAI,CAAC,GACnB,oGAAoG,CAAA;AAE1G;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,GAAI,IAAI,SAAS,WAAW,aAAa,aAAa,CAAC,IAAI,CAAC,KAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CAY7G,CAAA"}
|
package/dist/PixiNodeRegistry.js
CHANGED
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
+
* import { Container, Sprite, Texture } from "pixi.js"
|
|
17
|
+
*
|
|
18
|
+
* declare const enemy: Entity.EntityId<typeof Game.schema>
|
|
19
|
+
* declare const despawned: Entity.EntityId<typeof Game.schema>
|
|
20
|
+
* // ---cut---
|
|
21
|
+
* const actorLayer = new Container()
|
|
16
22
|
* const sprites = PixiNodeRegistry.make(actorLayer)
|
|
17
|
-
* sprites.ensure(
|
|
18
|
-
* sprites.remove(
|
|
23
|
+
* sprites.ensure(enemy, () => new Sprite(Texture.WHITE))
|
|
24
|
+
* sprites.remove(despawned)
|
|
19
25
|
* sprites.clear()
|
|
20
26
|
* ```
|
|
21
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PixiNodeRegistry.js","sourceRoot":"","sources":["../src/PixiNodeRegistry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PixiNodeRegistry.js","sourceRoot":"","sources":["../src/PixiNodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,iJAAiJ;AACjJ,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAA;AA8BnE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAA2B,SAA8B,EAAmC,EAAE;IAChH,uEAAuE;IACvE,MAAM,IAAI,GAAG,SAAgC,CAAA;IAC7C,OAAO,YAAY,CAAC,IAAI,CAAO;QAC7B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;YACtB,CAAC,MAAM,IAAI,IAAI,CAAyB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;QAC1D,CAAC;QACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACf,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;YACtB,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;QAClC,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typeonce/ritmo-pixi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Pixi container adapter for Ritmo render-node registries",
|
|
5
5
|
"author": "Sandro Maglione",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"provenance": true
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@typeonce/ritmo-render": "^0.
|
|
51
|
+
"@typeonce/ritmo-render": "^0.16.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@typeonce/ritmo": "0.
|
|
54
|
+
"@typeonce/ritmo": "0.16.0"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=20"
|
package/src/PixiNodeRegistry.ts
CHANGED
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
+
* import { Container, Sprite, Texture } from "pixi.js"
|
|
17
|
+
*
|
|
18
|
+
* declare const enemy: Entity.EntityId<typeof Game.schema>
|
|
19
|
+
* declare const despawned: Entity.EntityId<typeof Game.schema>
|
|
20
|
+
* // ---cut---
|
|
21
|
+
* const actorLayer = new Container()
|
|
16
22
|
* const sprites = PixiNodeRegistry.make(actorLayer)
|
|
17
|
-
* sprites.ensure(
|
|
18
|
-
* sprites.remove(
|
|
23
|
+
* sprites.ensure(enemy, () => new Sprite(Texture.WHITE))
|
|
24
|
+
* sprites.remove(despawned)
|
|
19
25
|
* sprites.clear()
|
|
20
26
|
* ```
|
|
21
27
|
*/
|