@bendyline/molen-tooling 0.0.1 → 0.0.2

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 (137) hide show
  1. package/README.md +22 -4
  2. package/dist/cli.mjs +26 -4
  3. package/dist/docs-src/guide/3d-art-guidelines.md +2 -2
  4. package/dist/docs-src/guide/3d-model-assets.md +15 -11
  5. package/dist/docs-src/guide/aircraft.md +9 -10
  6. package/dist/docs-src/guide/browser-mount.md +14 -0
  7. package/dist/docs-src/guide/building-interiors.md +2 -1
  8. package/dist/docs-src/guide/determinism.md +16 -11
  9. package/dist/docs-src/guide/entities.md +16 -5
  10. package/dist/docs-src/guide/examples.md +38 -23
  11. package/dist/docs-src/guide/experience-playback.md +2 -3
  12. package/dist/docs-src/guide/game-samples.md +30 -18
  13. package/dist/docs-src/guide/project.md +22 -2
  14. package/dist/docs-src/guide/quickstart.md +37 -28
  15. package/dist/docs-src/guide/recognizable-places.md +21 -15
  16. package/dist/docs-src/guide/rendering-backends.md +5 -4
  17. package/dist/docs-src/guide/scripting.md +4 -2
  18. package/dist/docs-src/guide/sky.md +10 -9
  19. package/dist/docs-src/guide/structure-library.md +18 -8
  20. package/dist/docs-src/guide/terrain.md +6 -4
  21. package/dist/docs-src/guide/vehicles.md +9 -5
  22. package/dist/docs-src/guide/worldgen.md +31 -21
  23. package/dist/docs-src/llms.txt +26 -15
  24. package/dist/docs-src/schemas/README.md +1 -1
  25. package/dist/index.d.mts +26 -2
  26. package/dist/index.mjs +2 -2
  27. package/dist/{mcp-BFnCWrg0.mjs → mcp-AOfIp89b.mjs} +12 -2
  28. package/dist/{ops-BGxhSP6w.mjs → ops-C4BvDgP-.mjs} +267 -33
  29. package/dist/templates/city-courier/README.md +53 -0
  30. package/dist/templates/city-courier/checks.json +20 -0
  31. package/dist/templates/city-courier/commands.json +32 -0
  32. package/dist/templates/city-courier/delivery-run.replay.json +214 -0
  33. package/dist/templates/city-courier/gen/molen-types.ts +878 -0
  34. package/dist/templates/city-courier/index.html +2 -0
  35. package/dist/templates/city-courier/package.json +25 -0
  36. package/dist/templates/city-courier/project.json +8 -0
  37. package/dist/templates/city-courier/scene.json +3395 -0
  38. package/dist/templates/city-courier/scripts/game.ts +127 -0
  39. package/dist/templates/city-courier/scripts/molen-scripts.d.ts +1125 -0
  40. package/dist/templates/city-courier/scripts/tsconfig.json +16 -0
  41. package/dist/templates/city-courier/src/game-shell.css +309 -0
  42. package/dist/templates/city-courier/src/main.ts +81 -0
  43. package/dist/templates/city-courier/src/scene.ts +17 -0
  44. package/dist/templates/city-courier/src/vite-env.d.ts +1 -0
  45. package/dist/templates/city-courier/src/worker.ts +5 -0
  46. package/dist/templates/city-courier/test/headless.test.ts +95 -0
  47. package/dist/templates/city-courier/test/playthrough.test.js +52 -0
  48. package/dist/templates/city-courier/test/replay.test.ts +22 -0
  49. package/dist/templates/city-courier/tsconfig.json +17 -0
  50. package/dist/templates/city-courier/vite.config.ts +19 -0
  51. package/dist/templates/cubes/README.md +51 -0
  52. package/dist/templates/cubes/index.html +16 -0
  53. package/dist/templates/cubes/package.json +24 -0
  54. package/dist/templates/cubes/scene.json +15 -0
  55. package/dist/templates/cubes/src/cubes.ts +100 -0
  56. package/dist/templates/cubes/src/main.ts +21 -0
  57. package/dist/templates/cubes/src/worker.ts +15 -0
  58. package/dist/templates/cubes/test/headless.test.ts +98 -0
  59. package/dist/templates/cubes/tsconfig.json +17 -0
  60. package/dist/templates/cubes/vite.config.ts +17 -0
  61. package/dist/templates/data-viz/README.md +47 -0
  62. package/dist/templates/data-viz/camera-track.json +12 -0
  63. package/dist/templates/data-viz/data.json +9 -0
  64. package/dist/templates/data-viz/index.html +16 -0
  65. package/dist/templates/data-viz/package.json +25 -0
  66. package/dist/templates/data-viz/scene.json +7 -0
  67. package/dist/templates/data-viz/src/main.ts +39 -0
  68. package/dist/templates/data-viz/src/viz.ts +91 -0
  69. package/dist/templates/data-viz/src/worker.ts +12 -0
  70. package/dist/templates/data-viz/test/headless.test.ts +75 -0
  71. package/dist/templates/data-viz/tsconfig.json +17 -0
  72. package/dist/templates/data-viz/vite.config.ts +16 -0
  73. package/dist/templates/figures-gallery/README.md +46 -0
  74. package/dist/templates/figures-gallery/index.html +16 -0
  75. package/dist/templates/figures-gallery/package.json +25 -0
  76. package/dist/templates/figures-gallery/scene.json +276 -0
  77. package/dist/templates/figures-gallery/src/main.ts +44 -0
  78. package/dist/templates/figures-gallery/src/worker.ts +17 -0
  79. package/dist/templates/figures-gallery/test/headless.test.ts +90 -0
  80. package/dist/templates/figures-gallery/tsconfig.json +17 -0
  81. package/dist/templates/figures-gallery/vite.config.ts +17 -0
  82. package/dist/templates/index.json +188 -0
  83. package/dist/templates/skybound/README.md +53 -0
  84. package/dist/templates/skybound/checks.json +24 -0
  85. package/dist/templates/skybound/commands.json +32 -0
  86. package/dist/templates/skybound/first-leap.replay.json +224 -0
  87. package/dist/templates/skybound/gen/molen-types.ts +878 -0
  88. package/dist/templates/skybound/index.html +2 -0
  89. package/dist/templates/skybound/package.json +25 -0
  90. package/dist/templates/skybound/project.json +8 -0
  91. package/dist/templates/skybound/scene.json +1737 -0
  92. package/dist/templates/skybound/scripts/game.ts +119 -0
  93. package/dist/templates/skybound/scripts/molen-scripts.d.ts +1125 -0
  94. package/dist/templates/skybound/scripts/tsconfig.json +16 -0
  95. package/dist/templates/skybound/src/game-shell.css +309 -0
  96. package/dist/templates/skybound/src/main.ts +60 -0
  97. package/dist/templates/skybound/src/scene.ts +17 -0
  98. package/dist/templates/skybound/src/vite-env.d.ts +1 -0
  99. package/dist/templates/skybound/src/worker.ts +5 -0
  100. package/dist/templates/skybound/test/headless.test.ts +124 -0
  101. package/dist/templates/skybound/test/playthrough.test.js +38 -0
  102. package/dist/templates/skybound/test/replay.test.ts +22 -0
  103. package/dist/templates/skybound/tsconfig.json +17 -0
  104. package/dist/templates/skybound/vite.config.ts +19 -0
  105. package/dist/templates/terrain-flyover/README.md +46 -0
  106. package/dist/templates/terrain-flyover/index.html +16 -0
  107. package/dist/templates/terrain-flyover/package.json +26 -0
  108. package/dist/templates/terrain-flyover/src/flyover.ts +23 -0
  109. package/dist/templates/terrain-flyover/src/main.ts +93 -0
  110. package/dist/templates/terrain-flyover/terrain.json +15 -0
  111. package/dist/templates/terrain-flyover/test/headless.test.ts +72 -0
  112. package/dist/templates/terrain-flyover/tsconfig.json +17 -0
  113. package/dist/templates/terrain-flyover/vite.config.ts +15 -0
  114. package/dist/templates/top-down-arena/README.md +52 -0
  115. package/dist/templates/top-down-arena/arena-skirmish.replay.json +204 -0
  116. package/dist/templates/top-down-arena/index.html +16 -0
  117. package/dist/templates/top-down-arena/package.json +25 -0
  118. package/dist/templates/top-down-arena/project.json +10 -0
  119. package/dist/templates/top-down-arena/scene.json +162 -0
  120. package/dist/templates/top-down-arena/scripts/chase.ts +17 -0
  121. package/dist/templates/top-down-arena/scripts/combat.ts +12 -0
  122. package/dist/templates/top-down-arena/scripts/control.ts +8 -0
  123. package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +1095 -0
  124. package/dist/templates/top-down-arena/scripts/spawner.ts +11 -0
  125. package/dist/templates/top-down-arena/scripts/tsconfig.json +16 -0
  126. package/dist/templates/top-down-arena/src/arena.ts +8 -0
  127. package/dist/templates/top-down-arena/src/gen/molen-types.ts +882 -0
  128. package/dist/templates/top-down-arena/src/main.ts +31 -0
  129. package/dist/templates/top-down-arena/src/scene.ts +24 -0
  130. package/dist/templates/top-down-arena/src/vite-env.d.ts +1 -0
  131. package/dist/templates/top-down-arena/src/worker.ts +7 -0
  132. package/dist/templates/top-down-arena/test/headless.test.ts +87 -0
  133. package/dist/templates/top-down-arena/test/replay.test.ts +22 -0
  134. package/dist/templates/top-down-arena/tsconfig.json +17 -0
  135. package/dist/templates/top-down-arena/types/arena.types.json +54 -0
  136. package/dist/templates/top-down-arena/vite.config.ts +21 -0
  137. package/package.json +14 -14
@@ -0,0 +1,11 @@
1
+ // Spawn a chaser on a random arena edge every `config.interval` ticks. The component map
2
+ // matches the arena.enemy registry type (types/arena.types.json).
3
+ molen.on('tick', () => {
4
+ if ((molen.tick + 1) % config.interval !== 0) return;
5
+ const half = config.size / 2 - 1;
6
+ const onX = molen.rng() < 0.5;
7
+ const a = (molen.rng() - 0.5) * 2 * half;
8
+ const b = molen.rng() < 0.5 ? -half : half;
9
+ const pos: [number, number, number] = onX ? [a, 0, b] : [b, 0, a];
10
+ molen.spawnType('arena.enemy', { transform: { pos } });
11
+ });
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "checkJs": true,
5
+ "noEmit": true,
6
+ "strict": true,
7
+ "erasableSyntaxOnly": true,
8
+ "target": "ES2023",
9
+ "module": "preserve",
10
+ "moduleResolution": "bundler",
11
+ "lib": ["ES2023"],
12
+ "types": [],
13
+ "skipLibCheck": true
14
+ },
15
+ "include": ["*.ts", "*.js"]
16
+ }
@@ -0,0 +1,8 @@
1
+ // A small complete top-down arena game built only on the engine's data layers. The world,
2
+ // the `move` command, the input rules, and the game logic (control / spawner / chaser / combat)
3
+ // all live in scene.json + scripts/*.ts; this module only holds the tunables the tests read.
4
+
5
+ /** Tunables the tests reference; the live values are the scripts' `config` in scene.json. */
6
+ export const ARENA = { size: 20, spawnInterval: 12, enemySpeed: 5, playerSpeed: 9 };
7
+
8
+ export { arenaProject, arenaScene } from './scene';