@typeonce/ritmo-render 0.9.0 → 0.11.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 +138 -0
- package/README.md +2 -4
- package/dist/NodeRegistry.d.ts +9 -0
- package/dist/NodeRegistry.d.ts.map +1 -1
- package/dist/NodeRegistry.js.map +1 -1
- package/dist/RenderSync.d.ts +12 -2
- package/dist/RenderSync.d.ts.map +1 -1
- package/dist/RenderSync.js +3 -1
- package/dist/RenderSync.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/src/NodeRegistry.ts +9 -0
- package/src/RenderSync.ts +12 -2
- package/src/index.ts +1 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# @typeonce/ritmo-render
|
|
2
|
+
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e46f284: **Documentation pass over every public module.** Every export has JSDoc saying what it is for and which neighbouring API to use instead; examples that no longer compiled (`Session.make` without `hostClock`, `Replay.session`, the `Pointer` rebind) are fixed; `Debug.Lint` lists every lint code the runtime emits. The `stale-target` lint's fix now names `queries.x.getHandle(handle)`.
|
|
8
|
+
- Updated dependencies [778301a]
|
|
9
|
+
- Updated dependencies [866bcff]
|
|
10
|
+
- Updated dependencies [e46f284]
|
|
11
|
+
- @typeonce/ritmo@0.11.0
|
|
12
|
+
|
|
13
|
+
## 0.10.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 7002f4d: **Everything a game's agent needs now ships with the packages, and `ritmo-devtools lint` reports simulation modules the lint rules miss.**
|
|
18
|
+
|
|
19
|
+
- **Breaking: `ritmo-devtools lint` fails on an uncovered simulation module.** Every module the entry loads that the `ritmo/keep-simulation-headless` override in `.oxlintrc.json` does not cover is reported as `uncovered-simulation-module`, and the command exits 1. Add the module (or its folder) to the simulation override's `"files"`, or stop importing values from it. Modules loaded only inside `lintTarget` are not checked. Requires Node 22.15 or newer (`engines.node` is now `>=22.15`).
|
|
20
|
+
- **An agent skill ships with `@typeonce/ritmo`** in `skills/ritmo/SKILL.md`, for every change: where the docs are, and principles for where a game's code and state belong. Link it into the folder the game's agent reads skills from, for example `ln -s ../../node_modules/@typeonce/ritmo/skills/ritmo .agents/skills/ritmo`. `SETUP.md` in `@typeonce/ritmo` is the one-time setup: the base packages and checks every game uses, the add-ons, and linking the skill.
|
|
21
|
+
- **Every package ships its `CHANGELOG.md`.** The upgrade notes for 0.8.0 and 0.9.0 are in the `@typeonce/ritmo` changelog.
|
|
22
|
+
- **JSDoc corrections.** Examples no longer provide randomness or time as services (use the `Random` resource and `Clock`), the `Command` module example declares its commands, inspector docs state that `added`/`changed` reads report records since the inspector's previous evaluation, and every example uses prefixed names (`"Game/Position"`). Guidance that lived only in the repository's guides (spawn order, `ReadonlyValue` helpers, re-entering a state, `thisTick` and plugin systems, service effects and rollback) is now in the JSDoc.
|
|
23
|
+
- Package READMEs link other packages' READMEs by GitHub URL, so the links work on npm.
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [7002f4d]
|
|
26
|
+
- Updated dependencies [388a696]
|
|
27
|
+
- @typeonce/ritmo@0.10.0
|
|
28
|
+
|
|
29
|
+
## 0.9.0
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 330246e: **Safety follow-ups from a second review.** Each closes a way a game could go wrong silently; see Upgrading under 0.9.0 in the `@typeonce/ritmo` CHANGELOG.md.
|
|
34
|
+
|
|
35
|
+
- **A `SpawnedId` is valid only in the run that spawned it.** Kept in a closure or resource and passed to `commands.despawn` / `commands.remove` in a later run, it could name an entity despawned meanwhile whose id was reused. Such a command is now skipped, traced as a `staleTarget` effect, and reported by the new `stale-target` lint (`Debug.StaleTarget`). Keep the entity id or a handle and resolve it through a query.
|
|
36
|
+
- **`any` and `never` are not descriptor values.** `Descriptor.Component<any>()`, `Resource`, `Event`, `Service`, and the transient variants fail at the constructor: `any` turned off every check on the descriptor, and `never` erased the fragment listing it.
|
|
37
|
+
- **A saved component cannot require a transient one.** `Schema.bind` rejects `Schema.requires(Ghost, Trail)` when only `Trail` is transient: a restore brought `Ghost` back without it. A transient requirer may still require a transient component.
|
|
38
|
+
- **Queries with `added` / `changed` filters have no lookups.** `get`, `getHandle`, `single`, `children`, and `descendants` failed with `QueryMismatch` whenever the target had not changed since the system's previous run; they no longer compile there. Declare a second query without filters to resolve entities. `each()` and `singleOptional()` are unchanged. The handle types are now `QueryIteration` and `QueryLookups` (`QueryHandle` combines them).
|
|
39
|
+
- **A transition's exit phase is one transaction.** When a system in `onExit` / `onTransition` fails, everything the phase did (component writes, resources, events, queued next states and commands, stream positions) is undone and the transition stays queued, so the retry starts from the same state instead of running the earlier exit systems twice. These schedules can no longer contain `applyDeferred()`.
|
|
40
|
+
- **A service or machine provided twice does not compile.** `Runtime.services` / `Runtime.machines` kept the last of two provisions; the second now fails, naming it.
|
|
41
|
+
- **`RenderSync` recovers from dropped removals.** After a pause longer than a stream keeps entries, the removals it missed left nodes on screen; when its removal stream reports `lagged()`, it now destroys every node whose entity no longer matches. Give each `RenderSync.system` its own registry.
|
|
42
|
+
- **New lint `stream-loss-unread`.** On a debug runtime, a reader of events, transition events, removed, despawned, or relation failures that lost entries without checking `lagged()` is a warning, and one reading under `pauseWhen` without checking it is noted (`Debug.StreamLoss`).
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [c2c32e0]
|
|
45
|
+
- Updated dependencies [9cca78b]
|
|
46
|
+
- Updated dependencies [6c09482]
|
|
47
|
+
- Updated dependencies [ecfd0f1]
|
|
48
|
+
- Updated dependencies [d47a4f9]
|
|
49
|
+
- Updated dependencies [330246e]
|
|
50
|
+
- Updated dependencies [7f2b2dd]
|
|
51
|
+
- @typeonce/ritmo@0.9.0
|
|
52
|
+
|
|
53
|
+
## 0.8.0
|
|
54
|
+
|
|
55
|
+
### Minor Changes
|
|
56
|
+
|
|
57
|
+
- a0fac0a: **`Game.Query.anyOf`.** `anyOf(...filters)` takes two or more `added` / `changed` filters and matches an entity once when any of them passes since the reading system's previous run, for example to redraw when either the position or the sprite changed. Filters listed side by side in `filters: [...]` still all have to pass. `anyOf` does not nest, and `Game.Condition.check` rejects it like every other change filter.
|
|
58
|
+
|
|
59
|
+
- `RenderSync.system` now builds one query per sync system (an `anyOf` of its added and changed filters) instead of one query per trigger plus deduplication.
|
|
60
|
+
- `Debug.QueryDescription` gains `anyOf` (one entry per `anyOf` filter, with its `added` and `changed` components); code that builds a `QueryDescription` by hand must add it. The text report prints it as `any of (...)`, and Monitor counts its components as reads.
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- Updated dependencies [0b22113]
|
|
65
|
+
- Updated dependencies [a0fac0a]
|
|
66
|
+
- Updated dependencies [0b22113]
|
|
67
|
+
- Updated dependencies [a0fac0a]
|
|
68
|
+
- Updated dependencies [a580c9c]
|
|
69
|
+
- Updated dependencies [a580c9c]
|
|
70
|
+
- @typeonce/ritmo@0.8.0
|
|
71
|
+
|
|
72
|
+
## 0.7.0
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- 358401a: Link the bevy-ts migration guide from each published package README.
|
|
77
|
+
- Updated dependencies [84eac37]
|
|
78
|
+
- Updated dependencies [7ebd9af]
|
|
79
|
+
- Updated dependencies [358401a]
|
|
80
|
+
- @typeonce/ritmo@0.7.0
|
|
81
|
+
|
|
82
|
+
## 0.6.0
|
|
83
|
+
|
|
84
|
+
### Minor Changes
|
|
85
|
+
|
|
86
|
+
- c20bbc0: `RenderSync.interpolate` takes a `blend` option for values beyond a 2D position (3D positions, angles, scales), and `place` receives what `blend` returns. Without `blend` only `x` and `y` are blended, so `blend` is now required when a component is not `{ x, y }` or holds other numbers: a `{ x, y, z }` position no longer type-checks while its `z` is silently left unblended.
|
|
87
|
+
- 130cb6e: Rename the package family from `@typeonce/bevy-ts*` to `@typeonce/ritmo*`.
|
|
88
|
+
Update imports, workspace dependencies, type identity markers, examples, and
|
|
89
|
+
documentation together. There are no compatibility aliases; use the matching
|
|
90
|
+
Ritmo package for each previous Bevy TS package. The separate release preparation
|
|
91
|
+
change coordinates the repository rename and retirement of the generated
|
|
92
|
+
documentation site.
|
|
93
|
+
Use "The agent-first type safe ECS runtime" in package metadata,
|
|
94
|
+
documentation, and brand assets.
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- a8e0473: Retire the generated documentation site and point package homepages, source links,
|
|
99
|
+
and issue links to the Ritmo repository in the Typeonce GitHub organization.
|
|
100
|
+
Keep source JSDoc and repository guides, including the Pixi walkthrough in its
|
|
101
|
+
example README.
|
|
102
|
+
- a1f18a8: Two fixes:
|
|
103
|
+
|
|
104
|
+
- **Snapshots keep entity scopes.** `snapshot()` now saves scope membership (`scopes`: per scope name, its members' ids) and `restore()` rebuilds it, so `despawnScope` finds restored entities. The format moves to version 2. Version 1 snapshots had no scopes and are rejected with `UnsupportedVersion` instead of being restored with every scoped entity loose. Invalid membership (an id that is not a saved entity, or one in two scopes) fails with `InvalidScope`.
|
|
105
|
+
- **RenderSync follows membership.** A node now exists exactly while its entity has the renderable, the transform, and every required `select` slot. It is created whichever of them arrives last, and destroyed when any of them is removed (before, only the renderable's arrival and removal counted). The redundant despawn read is gone, because despawns are recorded as removals.
|
|
106
|
+
|
|
107
|
+
- Updated dependencies [a8e0473]
|
|
108
|
+
- Updated dependencies [130cb6e]
|
|
109
|
+
- Updated dependencies [a1f18a8]
|
|
110
|
+
- @typeonce/ritmo@0.6.0
|
|
111
|
+
|
|
112
|
+
## 0.5.0
|
|
113
|
+
|
|
114
|
+
### Patch Changes
|
|
115
|
+
|
|
116
|
+
- @typeonce/bevy-ts@0.5.0
|
|
117
|
+
|
|
118
|
+
## 0.4.0
|
|
119
|
+
|
|
120
|
+
### Minor Changes
|
|
121
|
+
|
|
122
|
+
- e2b2275: New package `@typeonce/bevy-ts-render`: the renderer-agnostic part of `@typeonce/bevy-ts-pixi`, the entity-keyed node registry (`NodeRegistry.make`) and the render sync systems (`RenderSync.system`, `RenderSync.interpolate`), for games drawn with Three.js, the DOM, or any other renderer.
|
|
123
|
+
|
|
124
|
+
**Breaking:** import `NodeRegistry` and `RenderSync` from `@typeonce/bevy-ts-render`. Pixi exports only `PixiNodeRegistry`, with `make(container)` replacing `NodeRegistry.inContainer(container)`. The platform-prefixed adapter implements the generic registry contract and is provided through the existing typed runtime service API. The old Pixi modules and re-exports are removed immediately. Pixi depends only on the render package, dropping its unused browser and core dependencies.
|
|
125
|
+
|
|
126
|
+
This combines the four planned steps into one 0.4.0 release of the fixed package group.
|
|
127
|
+
|
|
128
|
+
- `Game.Schedule.pauseWhen` retains event-reader cursors during a pause. Ordinary `when` gates still discard messages across mode changes and take precedence over pause gates in either nesting order. Stream capacity bounds retention, and debug traces expose whether a skipped run held messages.
|
|
129
|
+
- A system's optional `local` factory owns scratch state per runtime, shared by gated copies. Locals are neither rolled back nor snapshotted and are rebuilt after successful restore. Debug descriptions show which systems declare them.
|
|
130
|
+
- Optional and conditional local factories preserve `undefined` in the callback type. Factories allocate fresh scratch state without side effects; mode changes preserve locals, and values needing cleanup belong in host-managed services.
|
|
131
|
+
- `runtime.send` immediately publishes a schema event from the host at a fresh tick. Calls during a tick or with unknown descriptors throw. Unread host messages survive restore without replaying to readers that already consumed them. Devtools trace sends and include external producers in event lints.
|
|
132
|
+
- **Breaking:** `EntityId` and `Handle` are branded numbers. Replace `id.value` and `handle.value` with `id` and `handle`. Handles now compare by numeric identity and work as `Set` keys without allocating objects. `decodeHandle` and `Decode.handle` accept only positive integer numbers. Object-shaped handles are rejected, including inside snapshots; snapshots write numbers.
|
|
133
|
+
- The guides cover fallible lookups, inspector machine reads, `Query.Cells`, shared access objects, simulation-owned time, and seeded random state. `Feature` remains supported and is documented in the package-authoring guide.
|
|
134
|
+
|
|
135
|
+
### Patch Changes
|
|
136
|
+
|
|
137
|
+
- Updated dependencies [e2b2275]
|
|
138
|
+
- @typeonce/bevy-ts@0.4.0
|
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# `@typeonce/ritmo-render`
|
|
2
2
|
|
|
3
|
-
Migrating from bevy-ts? See the [package migration guide](https://github.com/typeonce-dev/ritmo/blob/main/MIGRATION.md).
|
|
4
|
-
|
|
5
3
|
Renderer-agnostic entity-to-node mirroring for ritmo: a render-node registry keyed by entity (`NodeRegistry`), a system that creates, updates, and destroys renderer nodes from ECS entities (`RenderSync.system`), and a system that draws fixed-step movement smoothly between steps (`RenderSync.interpolate`).
|
|
6
4
|
|
|
7
5
|
```sh
|
|
@@ -35,8 +33,8 @@ const runtime = Game.Runtime.make({
|
|
|
35
33
|
}).value
|
|
36
34
|
```
|
|
37
35
|
|
|
38
|
-
For Pixi, [`@typeonce/ritmo-pixi`](https://
|
|
36
|
+
For Pixi, [`@typeonce/ritmo-pixi`](https://github.com/typeonce-dev/ritmo/blob/main/packages/pixi/README.md) provides `PixiNodeRegistry.make(container)`, an implementation of the same registry contract. The host provides it with `Game.Runtime.service`; render systems keep depending on the generic service descriptor.
|
|
39
37
|
|
|
40
|
-
Released together with [`@typeonce/ritmo`](https://
|
|
38
|
+
Released together with [`@typeonce/ritmo`](https://github.com/typeonce-dev/ritmo/blob/main/packages/core/README.md), always with the same version.
|
|
41
39
|
|
|
42
40
|
Source: https://github.com/typeonce-dev/ritmo
|
package/dist/NodeRegistry.d.ts
CHANGED
|
@@ -33,9 +33,16 @@
|
|
|
33
33
|
* (ids and handles are branded numbers).
|
|
34
34
|
*/
|
|
35
35
|
export type EntityKey = number;
|
|
36
|
+
/**
|
|
37
|
+
* One renderer node per entity, made with `make` (or a renderer adapter such
|
|
38
|
+
* as `PixiNodeRegistry.make`). Provide it as a runtime service and hand that
|
|
39
|
+
* service to `RenderSync.system`, which fills and empties it; host code reads
|
|
40
|
+
* it with `get`.
|
|
41
|
+
*/
|
|
36
42
|
export interface NodeRegistry<Node> {
|
|
37
43
|
/** Number of live nodes. */
|
|
38
44
|
readonly size: number;
|
|
45
|
+
/** The entity's node, or `undefined` when it has none. Use `ensure` to create one. */
|
|
39
46
|
get(entity: EntityKey): Node | undefined;
|
|
40
47
|
/**
|
|
41
48
|
* Returns the entity's node, creating and attaching it first when missing.
|
|
@@ -49,8 +56,10 @@ export interface NodeRegistry<Node> {
|
|
|
49
56
|
* Detaches and destroys every node.
|
|
50
57
|
*/
|
|
51
58
|
clear(): void;
|
|
59
|
+
/** The live nodes with their entity keys. */
|
|
52
60
|
entries(): IterableIterator<readonly [number, Node]>;
|
|
53
61
|
}
|
|
62
|
+
/** What attaching and detaching a node mean for one renderer; see `make`. */
|
|
54
63
|
export interface RegistryOptions<Node> {
|
|
55
64
|
/** Adds a newly created node to the scene. */
|
|
56
65
|
readonly attach: (node: Node) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeRegistry.d.ts","sourceRoot":"","sources":["../src/NodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B,MAAM,WAAW,YAAY,CAAC,IAAI;IAChC,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;IACxC;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,IAAI,GAAG,IAAI,CAAA;IACnD;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAA;IAClC;;OAEG;IACH,KAAK,IAAI,IAAI,CAAA;IACb,OAAO,IAAI,gBAAgB,C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DAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;CACtC;AAED;;;;;GAKG;AACH,eAAO,MAAM,IAAI,GAAI,IAAI,WAAW,eAAe,CAAC,IAAI,CAAC,KAAG,YAAY,CAAC,IAAI,CAsC5E,CAAA"}
|
package/dist/NodeRegistry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeRegistry.js","sourceRoot":"","sources":["../src/NodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;
|
|
1
|
+
{"version":3,"file":"NodeRegistry.js","sourceRoot":"","sources":["../src/NodeRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AA2CH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAO,OAA8B,EAAsB,EAAE;IAC/E,MAAM,KAAK,GAAG,IAAI,GAAG,EAAgB,CAAA;IACrC,OAAO;QACL,IAAI,IAAI;YACN,OAAO,KAAK,CAAC,IAAI,CAAA;QACnB,CAAC;QACD,GAAG,CAAC,MAAM;YACR,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC1B,CAAC;QACD,MAAM,CAAC,MAAM,EAAE,MAAM;YACnB,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YAClC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC3B,OAAO,QAAQ,CAAA;YACjB,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,EAAE,CAAA;YACrB,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACvB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;YACpB,OAAO,IAAI,CAAA;QACb,CAAC;QACD,MAAM,CAAC,MAAM;YACX,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YAC9B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,OAAO,KAAK,CAAA;YACd,CAAC;YACD,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;YACpB,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;YACpB,OAAO,IAAI,CAAA;QACb,CAAC;QACD,KAAK;YACH,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;gBAClC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;YACtB,CAAC;YACD,KAAK,CAAC,KAAK,EAAE,CAAA;QACf,CAAC;QACD,OAAO;YACL,OAAO,KAAK,CAAC,OAAO,EAAE,CAAA;QACxB,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
package/dist/RenderSync.d.ts
CHANGED
|
@@ -22,10 +22,13 @@
|
|
|
22
22
|
*
|
|
23
23
|
* `create` and `apply` receive one context: the renderable and transform
|
|
24
24
|
* values, the entity id, extra read-only slots declared in `select` (as query
|
|
25
|
-
* cells), resources declared in `resources` (as read cells), and extra
|
|
25
|
+
* cells in `data`), resources declared in `resources` (as read cells), and extra
|
|
26
26
|
* services declared in `services`. Those resources and services become
|
|
27
27
|
* runtime requirements like the registry itself.
|
|
28
28
|
*
|
|
29
|
+
* Its spec is erased, so it does not count as a writer for
|
|
30
|
+
* `Game.System.thisTick(...)` order checks.
|
|
31
|
+
*
|
|
29
32
|
* @module RenderSync
|
|
30
33
|
* @docGroup render
|
|
31
34
|
*
|
|
@@ -85,6 +88,7 @@ export interface NodeContext<S extends Schema.Any, Root, Renderable extends Sche
|
|
|
85
88
|
readonly resources: ResourceCells<Resources>;
|
|
86
89
|
readonly services: ServiceValues<Services>;
|
|
87
90
|
}
|
|
91
|
+
/** The options of `system`. */
|
|
88
92
|
export interface Options<S extends Schema.Any, Root, Renderable extends Schema.ComponentDescriptor<S>, Transform extends Schema.ComponentDescriptor<S> | undefined, Registry extends RegistryService, Select extends Selection<S>, Services extends Readonly<Record<string, ServiceDescriptor>>, Resources extends Readonly<Record<string, Schema.ResourceDescriptor<S>>> = {}, When extends ReadonlyArray<Condition> = readonly []> {
|
|
89
93
|
/** The system name. */
|
|
90
94
|
readonly name: string;
|
|
@@ -132,7 +136,9 @@ export interface Options<S extends Schema.Any, Root, Renderable extends Schema.C
|
|
|
132
136
|
*/
|
|
133
137
|
export type RenderSystem<S extends Schema.Any, Root, Needs extends ServiceDescriptor | ResourceDescriptor | ConditionNeedsFromConditions<ReadonlyArray<Condition>>> = Schema.BoundSystem<S, Root, any, never, string, Needs>;
|
|
134
138
|
/**
|
|
135
|
-
* Builds the render system for one renderable component
|
|
139
|
+
* Builds the render system for one renderable component: it creates,
|
|
140
|
+
* applies, and destroys that component's nodes. To place nodes between fixed
|
|
141
|
+
* steps every frame, add `interpolate` on the same registry after it.
|
|
136
142
|
*/
|
|
137
143
|
export declare const system: <S extends Schema.Any, Root, const Renderable extends Schema.ComponentDescriptor<S>, const Registry extends RegistryService, const Select extends Selection<S> = {}, const Services extends Readonly<Record<string, ServiceDescriptor>> = {}, const Resources extends Readonly<Record<string, Schema.ResourceDescriptor<S>>> = {}, const When extends ReadonlyArray<Condition<Root>> = readonly [], const Transform extends Schema.ComponentDescriptor<S> | undefined = undefined>(Game: Schema.Game<S, Root>, options: Options<S, Root, Renderable, Transform, Registry, Select, Services, Resources, When>) => RenderSystem<S, Root, Registry | Services[keyof Services] | Resources[keyof Resources] | ConditionNeedsFromConditions<When>>;
|
|
138
144
|
/** A 2D position, the value `interpolate` blends when no `blend` is given. */
|
|
@@ -170,6 +176,10 @@ export type BlendOption<From, To, Result> = [
|
|
|
170
176
|
} : {
|
|
171
177
|
readonly blend: Blend<From, To, Result>;
|
|
172
178
|
};
|
|
179
|
+
/**
|
|
180
|
+
* The options of `interpolate`: `blend` is required when the components hold
|
|
181
|
+
* numbers beyond `x` and `y` (see `BlendOption`).
|
|
182
|
+
*/
|
|
173
183
|
export type InterpolateOptions<S extends Schema.Any, Root, Previous extends Schema.ComponentDescriptor<S>, Current extends Schema.ComponentDescriptor<S>, Registry extends RegistryService, Clock extends ServiceDescriptor, When extends ReadonlyArray<Condition> = readonly [], Result = NoBlend> = InterpolateBase<S, Root, Previous, Current, Registry, Clock, When, Result> & BlendOption<Descriptor.Value<Previous>, Descriptor.Value<Current>, Result>;
|
|
174
184
|
interface InterpolateBase<S extends Schema.Any, Root, Previous extends Schema.ComponentDescriptor<S>, Current extends Schema.ComponentDescriptor<S>, Registry extends RegistryService, Clock extends ServiceDescriptor, When extends ReadonlyArray<Condition>, Result> {
|
|
175
185
|
/** The system name. */
|
package/dist/RenderSync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderSync.d.ts","sourceRoot":"","sources":["../src/RenderSync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"RenderSync.d.ts","sourceRoot":"","sources":["../src/RenderSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAA;AACtF,OAAO,KAAK,KAAK,MAAM,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACtH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,KAAK,eAAe,GAAG,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA;AACvE,KAAK,iB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AM,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,WACjB,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,KACrF,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,4BAA4B,CAAC,IAAI,CAAC,CAkC7E,CAAA"}
|
package/dist/RenderSync.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Builds the render system for one renderable component
|
|
2
|
+
* Builds the render system for one renderable component: it creates,
|
|
3
|
+
* applies, and destroys that component's nodes. To place nodes between fixed
|
|
4
|
+
* steps every frame, add `interpolate` on the same registry after it.
|
|
3
5
|
*/
|
|
4
6
|
export const system = (Game, options) => {
|
|
5
7
|
// Internally the generic descriptors are erased; the public result type
|
package/dist/RenderSync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderSync.js","sourceRoot":"","sources":["../src/RenderSync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RenderSync.js","sourceRoot":"","sources":["../src/RenderSync.ts"],"names":[],"mappings":"AA+KA;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAWpB,IAA0B,EAC1B,OAA6F,EACiC,EAAE;IAGhI,wEAAwE;IACxE,0EAA0E;IAC1E,MAAM,MAAM,GAAG,IAAI,CAAC,MAAyF,CAAA;IAC7G,MAAM,KAAK,GAAG,IAAI,CAAC,KAA4C,CAAA;IAC/D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAiE,CAAA;IAC1F,MAAM,SAAS,GAAG,OAAO,CAAC,SAAsD,CAAA;IAChF,MAAM,SAAS,GAAG;QAChB,GAAG,OAAO,CAAC,MAAM;QACjB,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU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;gBACxB,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;gBAC7E,SAAQ;YACV,CAAC;YACD,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAY,CAAA;YAC1C,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAY,CAAA;YACvC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,EAAoB,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;QACxH,CAAC;IACH,CAAC,CAAiF,CAAA;AACpF,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,5 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export * as NodeRegistry from "./NodeRegistry.ts";
|
|
11
11
|
export * as RenderSync from "./RenderSync.ts";
|
|
12
|
+
/** The package's name tag (`"render"`), for tests and tools that check which package they loaded. Games do not need it. */
|
|
12
13
|
export declare const packageTag: "render";
|
|
13
14
|
//# 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;;;;;;;;GAQG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C,eAAO,MAAM,UAAU,EAAG,QAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C,2HAA2H;AAC3H,eAAO,MAAM,UAAU,EAAG,QAAiB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -9,5 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export * as NodeRegistry from "./NodeRegistry.js";
|
|
11
11
|
export * as RenderSync from "./RenderSync.js";
|
|
12
|
+
/** The package's name tag (`"render"`), for tests and tools that check which package they loaded. Games do not need it. */
|
|
12
13
|
export const packageTag = "render";
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAE7C,2HAA2H;AAC3H,MAAM,CAAC,MAAM,UAAU,GAAG,QAAiB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typeonce/ritmo-render",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Renderer-agnostic entity-to-node mirroring for Ritmo",
|
|
5
5
|
"author": "Sandro Maglione",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"src/**/*.ts",
|
|
26
26
|
"dist",
|
|
27
27
|
"README.md",
|
|
28
|
+
"CHANGELOG.md",
|
|
28
29
|
"LICENSE"
|
|
29
30
|
],
|
|
30
31
|
"exports": {
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"provenance": true
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@typeonce/ritmo": "^0.
|
|
49
|
+
"@typeonce/ritmo": "^0.11.0"
|
|
49
50
|
},
|
|
50
51
|
"engines": {
|
|
51
52
|
"node": ">=20"
|
package/src/NodeRegistry.ts
CHANGED
|
@@ -35,9 +35,16 @@
|
|
|
35
35
|
*/
|
|
36
36
|
export type EntityKey = number
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* One renderer node per entity, made with `make` (or a renderer adapter such
|
|
40
|
+
* as `PixiNodeRegistry.make`). Provide it as a runtime service and hand that
|
|
41
|
+
* service to `RenderSync.system`, which fills and empties it; host code reads
|
|
42
|
+
* it with `get`.
|
|
43
|
+
*/
|
|
38
44
|
export interface NodeRegistry<Node> {
|
|
39
45
|
/** Number of live nodes. */
|
|
40
46
|
readonly size: number
|
|
47
|
+
/** The entity's node, or `undefined` when it has none. Use `ensure` to create one. */
|
|
41
48
|
get(entity: EntityKey): Node | undefined
|
|
42
49
|
/**
|
|
43
50
|
* Returns the entity's node, creating and attaching it first when missing.
|
|
@@ -51,9 +58,11 @@ export interface NodeRegistry<Node> {
|
|
|
51
58
|
* Detaches and destroys every node.
|
|
52
59
|
*/
|
|
53
60
|
clear(): void
|
|
61
|
+
/** The live nodes with their entity keys. */
|
|
54
62
|
entries(): IterableIterator<readonly [number, Node]>
|
|
55
63
|
}
|
|
56
64
|
|
|
65
|
+
/** What attaching and detaching a node mean for one renderer; see `make`. */
|
|
57
66
|
export interface RegistryOptions<Node> {
|
|
58
67
|
/** Adds a newly created node to the scene. */
|
|
59
68
|
readonly attach: (node: Node) => void
|
package/src/RenderSync.ts
CHANGED
|
@@ -22,10 +22,13 @@
|
|
|
22
22
|
*
|
|
23
23
|
* `create` and `apply` receive one context: the renderable and transform
|
|
24
24
|
* values, the entity id, extra read-only slots declared in `select` (as query
|
|
25
|
-
* cells), resources declared in `resources` (as read cells), and extra
|
|
25
|
+
* cells in `data`), resources declared in `resources` (as read cells), and extra
|
|
26
26
|
* services declared in `services`. Those resources and services become
|
|
27
27
|
* runtime requirements like the registry itself.
|
|
28
28
|
*
|
|
29
|
+
* Its spec is erased, so it does not count as a writer for
|
|
30
|
+
* `Game.System.thisTick(...)` order checks.
|
|
31
|
+
*
|
|
29
32
|
* @module RenderSync
|
|
30
33
|
* @docGroup render
|
|
31
34
|
*
|
|
@@ -110,6 +113,7 @@ export interface NodeContext<
|
|
|
110
113
|
readonly services: ServiceValues<Services>
|
|
111
114
|
}
|
|
112
115
|
|
|
116
|
+
/** The options of `system`. */
|
|
113
117
|
export interface Options<
|
|
114
118
|
S extends Schema.Any,
|
|
115
119
|
Root,
|
|
@@ -170,7 +174,9 @@ export type RenderSystem<S extends Schema.Any, Root, Needs extends ServiceDescri
|
|
|
170
174
|
Schema.BoundSystem<S, Root, any, never, string, Needs>
|
|
171
175
|
|
|
172
176
|
/**
|
|
173
|
-
* Builds the render system for one renderable component
|
|
177
|
+
* Builds the render system for one renderable component: it creates,
|
|
178
|
+
* applies, and destroys that component's nodes. To place nodes between fixed
|
|
179
|
+
* steps every frame, add `interpolate` on the same registry after it.
|
|
174
180
|
*/
|
|
175
181
|
export const system = <
|
|
176
182
|
S extends Schema.Any,
|
|
@@ -327,6 +333,10 @@ export type BlendOption<From, To, Result> =
|
|
|
327
333
|
? { readonly blend?: Blend<From, To, Result> }
|
|
328
334
|
: { readonly blend: Blend<From, To, Result> }
|
|
329
335
|
|
|
336
|
+
/**
|
|
337
|
+
* The options of `interpolate`: `blend` is required when the components hold
|
|
338
|
+
* numbers beyond `x` and `y` (see `BlendOption`).
|
|
339
|
+
*/
|
|
330
340
|
export type InterpolateOptions<
|
|
331
341
|
S extends Schema.Any,
|
|
332
342
|
Root,
|
package/src/index.ts
CHANGED
|
@@ -10,4 +10,5 @@
|
|
|
10
10
|
export * as NodeRegistry from "./NodeRegistry.ts"
|
|
11
11
|
export * as RenderSync from "./RenderSync.ts"
|
|
12
12
|
|
|
13
|
+
/** The package's name tag (`"render"`), for tests and tools that check which package they loaded. Games do not need it. */
|
|
13
14
|
export const packageTag = "render" as const
|