@nodetool-ai/game-runtime 0.8.19 → 0.8.21

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 (64) hide show
  1. package/dist/.nodetool-build-stamp +1 -1
  2. package/dist/adventure.d.ts +42 -0
  3. package/dist/adventure.d.ts.map +1 -0
  4. package/dist/adventure.js +733 -0
  5. package/dist/adventure.js.map +1 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/native-browser/assets.d.ts +19 -0
  11. package/dist/native-browser/assets.d.ts.map +1 -0
  12. package/dist/native-browser/assets.js +70 -0
  13. package/dist/native-browser/assets.js.map +1 -0
  14. package/dist/native-browser/index.d.ts +6 -0
  15. package/dist/native-browser/index.d.ts.map +1 -0
  16. package/dist/native-browser/index.js +5 -0
  17. package/dist/native-browser/index.js.map +1 -0
  18. package/dist/native-browser/input.d.ts +70 -0
  19. package/dist/native-browser/input.d.ts.map +1 -0
  20. package/dist/native-browser/input.js +298 -0
  21. package/dist/native-browser/input.js.map +1 -0
  22. package/dist/native-browser/saves.d.ts +37 -0
  23. package/dist/native-browser/saves.d.ts.map +1 -0
  24. package/dist/native-browser/saves.js +187 -0
  25. package/dist/native-browser/saves.js.map +1 -0
  26. package/dist/native-browser/session.d.ts +46 -0
  27. package/dist/native-browser/session.d.ts.map +1 -0
  28. package/dist/native-browser/session.js +206 -0
  29. package/dist/native-browser/session.js.map +1 -0
  30. package/dist/native-browser/wasm.d.ts +28 -0
  31. package/dist/native-browser/wasm.d.ts.map +1 -0
  32. package/dist/native-browser/wasm.js +68 -0
  33. package/dist/native-browser/wasm.js.map +1 -0
  34. package/dist/native-browser/worker.d.ts +8 -0
  35. package/dist/native-browser/worker.d.ts.map +1 -0
  36. package/dist/native-browser/worker.js +109 -0
  37. package/dist/native-browser/worker.js.map +1 -0
  38. package/dist/native-editor-client.d.ts +1283 -0
  39. package/dist/native-editor-client.d.ts.map +1 -0
  40. package/dist/native-editor-client.js +106 -0
  41. package/dist/native-editor-client.js.map +1 -0
  42. package/dist/native-game-export.mjs +112 -0
  43. package/dist/native-game-notices.txt +934 -0
  44. package/dist/native-game-web-export.mjs +125 -0
  45. package/dist/native-json-save-files.d.ts +8 -0
  46. package/dist/native-json-save-files.d.ts.map +1 -0
  47. package/dist/native-json-save-files.js +95 -0
  48. package/dist/native-json-save-files.js.map +1 -0
  49. package/dist/native-template.d.ts +14 -0
  50. package/dist/native-template.d.ts.map +1 -0
  51. package/dist/native-template.js +99 -0
  52. package/dist/native-template.js.map +1 -0
  53. package/dist/native-worker.d.ts +36 -0
  54. package/dist/native-worker.d.ts.map +1 -0
  55. package/dist/native-worker.js +158 -0
  56. package/dist/native-worker.js.map +1 -0
  57. package/dist/native.d.ts +49 -0
  58. package/dist/native.d.ts.map +1 -0
  59. package/dist/native.js +305 -0
  60. package/dist/native.js.map +1 -0
  61. package/dist/systems/presentation2d.d.ts.map +1 -1
  62. package/dist/systems/presentation2d.js +3 -1
  63. package/dist/systems/presentation2d.js.map +1 -1
  64. package/package.json +32 -7
@@ -1 +1 @@
1
- 2026-11-28T10:16:08.477Z
1
+ 2026-12-06T17:40:39.222Z
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The guided Game flow's top-down adventure: a generated dungeon built from a
3
+ * design's layout choices.
4
+ *
5
+ * {@link createAdventureGame} lays out rooms joined by corridors on a tile
6
+ * grid, then fills them: gems to collect, enemies that patrol or chase,
7
+ * hazards that hurt, and a sealed exit that opens once every gem is taken.
8
+ * The player has health, a hurt flash and knockback. Losing all health
9
+ * restarts the level and reaching the open exit wins it. Everything is pure
10
+ * and seeded, so one design always builds the same level.
11
+ *
12
+ * The document starts on the `builtin:` placeholders. Once the flow has drawn
13
+ * the art, {@link bindAdventureArt} reads the frame and tile rectangles the
14
+ * asset preparation wrote and points the sprites, animations and wall tiles
15
+ * at them, and adds the level music when a track was generated.
16
+ */
17
+ import { type GameDocument } from "@nodetool-ai/protocol";
18
+ export type AdventureSize = "small" | "medium" | "large";
19
+ export type AdventureDifficulty = "relaxed" | "normal" | "hard";
20
+ export interface AdventureOptions {
21
+ /** Shown on the HUD when the level starts. */
22
+ title?: string;
23
+ /** The level's seed. The same seed and layout build the same level. */
24
+ seed?: number;
25
+ size?: AdventureSize;
26
+ difficulty?: AdventureDifficulty;
27
+ }
28
+ /** The scene the adventure plays in. A lost run transitions back into it. */
29
+ export declare const ADVENTURE_SCENE_ID = "level";
30
+ /** Animations of each adventure spritesheet slot, in sheet row order. */
31
+ export declare const ADVENTURE_SHEETS: Readonly<Record<string, Readonly<Record<string, number>>>>;
32
+ /** A stable seed for a piece of text, such as the design's title. */
33
+ export declare function adventureSeed(text: string): number;
34
+ /** Build a playable top-down adventure. */
35
+ export declare function createAdventureGame(id: string, options?: AdventureOptions): GameDocument;
36
+ /**
37
+ * Point an adventure's sprites, animations and wall tiles at the art the flow
38
+ * generated, and play the level music when a track was generated. A slot that
39
+ * still holds its `builtin:` placeholder is left as it is.
40
+ */
41
+ export declare function bindAdventureArt(document: GameDocument): GameDocument;
42
+ //# sourceMappingURL=adventure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adventure.d.ts","sourceRoot":"","sources":["../src/adventure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAgB,KAAK,YAAY,EAAmB,MAAM,uBAAuB,CAAC;AAEzF,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAClC;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAMvF,CAAC;AAiCF,qEAAqE;AACrE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AA6VD,2CAA2C;AAC3C,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,YAAY,CAmS5F;AAaD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,CAmErE"}