@typeonce/ritmo-browser 0.19.1 → 0.21.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,34 @@
1
1
  # @typeonce/ritmo-browser
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d1d864d: **Breaking: the packages require Node 22 or newer (Node 20 reached end of life on 2026-04-30).** `engines.node` is `>=22` for `@typeonce/ritmo`, `-browser`, `-render`, `-pixi`, `-math`, and `-netcode`; `>=22.12` for `@typeonce/oxlint-plugin-ritmo` (oxlint's own floor); `>=22.15` for `@typeonce/ritmo-devtools` (unchanged); and `>=22.19` for `@typeonce/ritmo-tools` (what `@effect/platform-node` needs). On Node 20, upgrade Node: `nvm install 22` (or 24), or `"node": ">=22"` in your CI's setup step.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [50597a8]
12
+ - Updated dependencies [15e5aa9]
13
+ - Updated dependencies [6b7df96]
14
+ - Updated dependencies [d1d864d]
15
+ - Updated dependencies [f30c9c6]
16
+ - Updated dependencies [d989c0b]
17
+ - Updated dependencies [027634b]
18
+ - Updated dependencies [87466e9]
19
+ - @typeonce/ritmo@0.21.0
20
+
21
+ ## 0.20.0
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies [b5f78e7]
26
+ - Updated dependencies [7b0dcd2]
27
+ - Updated dependencies [b101512]
28
+ - Updated dependencies [7853fea]
29
+ - Updated dependencies [72f2c40]
30
+ - @typeonce/ritmo@0.20.0
31
+
3
32
  ## 0.19.1
4
33
 
5
34
  ### Patch Changes
@@ -37,11 +37,12 @@
37
37
  * }, ({ queries, resources }) => {
38
38
  * const { dt } = resources.time.get()
39
39
  * const input = resources.input.get()
40
- * for (const { data } of queries.player.each()) {
41
- * const { x, y } = data.position.get()
40
+ * const { data } = queries.player
41
+ * for (const entity of queries.player.each()) {
42
+ * const { x, y } = data.position.get(entity)
42
43
  * // A button reads as `held` / `pressed` / `released`; `act` sends the square home.
43
- * if (input.actions.act.pressed) data.position.set({ x: 100, y: 100 })
44
- * else data.position.set({ x: x + input.vectors.move.x * 200 * dt, y: y + input.vectors.move.y * 200 * dt })
44
+ * if (input.actions.act.pressed) data.position.set(entity, { x: 100, y: 100 })
45
+ * else data.position.set(entity, { x: x + input.vectors.move.x * 200 * dt, y: y + input.vectors.move.y * 200 * dt })
45
46
  * }
46
47
  * })
47
48
  * const setup = Game.Schedule(Spawn, Game.Schedule.applyDeferred())
@@ -54,7 +55,7 @@
54
55
  * // What the page draws: plain data, read once per frame.
55
56
  * const ReadSquares = Game.Inspector("Toy/ReadSquares", {
56
57
  * queries: { squares: Game.Query({ selection: { position: Game.Query.read(Position) } }) }
57
- * }, ({ queries }) => queries.squares.each().map(({ data }) => data.position.get()))
58
+ * }, ({ queries }) => queries.squares.each().map((entity) => queries.squares.data.position.get(entity)))
58
59
  *
59
60
  * // The page
60
61
  * const keyboard = Keyboard.actions(window, keys)
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserTickSource.d.ts","sourceRoot":"","sources":["../src/BrowserTickSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AACH,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAA;AAEtD,6CAA6C;AAC7C,MAAM,WAAW,IAAI;IACnB,qBAAqB,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CAAA;IACpE,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3C;AAED,wFAAwF;AACxF,eAAO,MAAM,IAAI,SAAU,IAAI,KAAG,SAAS,CAAC,UA2B1C,CAAA"}
1
+ {"version":3,"file":"BrowserTickSource.d.ts","sourceRoot":"","sources":["../src/BrowserTickSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAA;AAEtD,6CAA6C;AAC7C,MAAM,WAAW,IAAI;IACnB,qBAAqB,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,CAAA;IACpE,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3C;AAED,wFAAwF;AACxF,eAAO,MAAM,IAAI,SAAU,IAAI,KAAG,SAAS,CAAC,UA2B1C,CAAA"}
@@ -37,11 +37,12 @@
37
37
  * }, ({ queries, resources }) => {
38
38
  * const { dt } = resources.time.get()
39
39
  * const input = resources.input.get()
40
- * for (const { data } of queries.player.each()) {
41
- * const { x, y } = data.position.get()
40
+ * const { data } = queries.player
41
+ * for (const entity of queries.player.each()) {
42
+ * const { x, y } = data.position.get(entity)
42
43
  * // A button reads as `held` / `pressed` / `released`; `act` sends the square home.
43
- * if (input.actions.act.pressed) data.position.set({ x: 100, y: 100 })
44
- * else data.position.set({ x: x + input.vectors.move.x * 200 * dt, y: y + input.vectors.move.y * 200 * dt })
44
+ * if (input.actions.act.pressed) data.position.set(entity, { x: 100, y: 100 })
45
+ * else data.position.set(entity, { x: x + input.vectors.move.x * 200 * dt, y: y + input.vectors.move.y * 200 * dt })
45
46
  * }
46
47
  * })
47
48
  * const setup = Game.Schedule(Spawn, Game.Schedule.applyDeferred())
@@ -54,7 +55,7 @@
54
55
  * // What the page draws: plain data, read once per frame.
55
56
  * const ReadSquares = Game.Inspector("Toy/ReadSquares", {
56
57
  * queries: { squares: Game.Query({ selection: { position: Game.Query.read(Position) } }) }
57
- * }, ({ queries }) => queries.squares.each().map(({ data }) => data.position.get()))
58
+ * }, ({ queries }) => queries.squares.each().map((entity) => queries.squares.data.position.get(entity)))
58
59
  *
59
60
  * // The page
60
61
  * const keyboard = Keyboard.actions(window, keys)
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserTickSource.js","sourceRoot":"","sources":["../src/BrowserTickSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AACH,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAA;AAQtD,wFAAwF;AACxF,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,IAAU,EAAwB,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;IACpF,IAAI,OAAO,GAAG,KAAK,CAAA;IACnB,IAAI,MAAM,GAAG,CAAC,CAAA;IACd,IAAI,QAA4B,CAAA;IAEhC,MAAM,KAAK,GAAG,CAAC,SAAiB,EAAQ,EAAE;QACxC,IAAI,OAAO,EAAE,CAAC;YACZ,OAAM;QACR,CAAC;QACD,MAAM,OAAO,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,QAAQ,CAAA;QACjE,QAAQ,GAAG,SAAS,CAAA;QACpB,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QACnB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAA;QAC5C,CAAC;IACH,CAAC,CAAA;IAED,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAA;IAC1C,OAAO;QACL,IAAI;YACF,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAM;YACR,CAAC;YACD,OAAO,GAAG,IAAI,CAAA;YACd,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAA;QACnC,CAAC;KACF,CAAA;AACH,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"BrowserTickSource.js","sourceRoot":"","sources":["../src/BrowserTickSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAA;AAQtD,wFAAwF;AACxF,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,IAAU,EAAwB,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;IACpF,IAAI,OAAO,GAAG,KAAK,CAAA;IACnB,IAAI,MAAM,GAAG,CAAC,CAAA;IACd,IAAI,QAA4B,CAAA;IAEhC,MAAM,KAAK,GAAG,CAAC,SAAiB,EAAQ,EAAE;QACxC,IAAI,OAAO,EAAE,CAAC;YACZ,OAAM;QACR,CAAC;QACD,MAAM,OAAO,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,QAAQ,CAAA;QACjE,QAAQ,GAAG,SAAS,CAAA;QACpB,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QACnB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAA;QAC5C,CAAC;IACH,CAAC,CAAA;IAED,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAA;IAC1C,OAAO;QACL,IAAI;YACF,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAM;YACR,CAAC;YACD,OAAO,GAAG,IAAI,CAAA;YACd,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAA;QACnC,CAAC;KACF,CAAA;AACH,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeonce/ritmo-browser",
3
- "version": "0.19.1",
3
+ "version": "0.21.0",
4
4
  "description": "Browser fixed-step loop, keyboard, gamepad, pointer, and touch actions, merged input, local multiplayer, and input capture for Ritmo",
5
5
  "author": "Sandro Maglione",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/typeonce-dev/ritmo/issues"
14
14
  },
15
- "homepage": "https://github.com/typeonce-dev/ritmo#readme",
15
+ "homepage": "https://ritmo.typeonce.dev",
16
16
  "keywords": [
17
17
  "ecs",
18
18
  "gamedev",
@@ -49,10 +49,10 @@
49
49
  "provenance": true
50
50
  },
51
51
  "dependencies": {
52
- "@typeonce/ritmo": "^0.19.1"
52
+ "@typeonce/ritmo": "^0.21.0"
53
53
  },
54
54
  "engines": {
55
- "node": ">=20"
55
+ "node": ">=22"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsc -b tsconfig.json --pretty false",
@@ -37,11 +37,12 @@
37
37
  * }, ({ queries, resources }) => {
38
38
  * const { dt } = resources.time.get()
39
39
  * const input = resources.input.get()
40
- * for (const { data } of queries.player.each()) {
41
- * const { x, y } = data.position.get()
40
+ * const { data } = queries.player
41
+ * for (const entity of queries.player.each()) {
42
+ * const { x, y } = data.position.get(entity)
42
43
  * // A button reads as `held` / `pressed` / `released`; `act` sends the square home.
43
- * if (input.actions.act.pressed) data.position.set({ x: 100, y: 100 })
44
- * else data.position.set({ x: x + input.vectors.move.x * 200 * dt, y: y + input.vectors.move.y * 200 * dt })
44
+ * if (input.actions.act.pressed) data.position.set(entity, { x: 100, y: 100 })
45
+ * else data.position.set(entity, { x: x + input.vectors.move.x * 200 * dt, y: y + input.vectors.move.y * 200 * dt })
45
46
  * }
46
47
  * })
47
48
  * const setup = Game.Schedule(Spawn, Game.Schedule.applyDeferred())
@@ -54,7 +55,7 @@
54
55
  * // What the page draws: plain data, read once per frame.
55
56
  * const ReadSquares = Game.Inspector("Toy/ReadSquares", {
56
57
  * queries: { squares: Game.Query({ selection: { position: Game.Query.read(Position) } }) }
57
- * }, ({ queries }) => queries.squares.each().map(({ data }) => data.position.get()))
58
+ * }, ({ queries }) => queries.squares.each().map((entity) => queries.squares.data.position.get(entity)))
58
59
  *
59
60
  * // The page
60
61
  * const keyboard = Keyboard.actions(window, keys)