@bendyline/molen-tooling 0.0.1 → 0.0.3

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 (158) hide show
  1. package/README.md +22 -4
  2. package/dist/capture/harness.js +216 -216
  3. package/dist/capture/worldgen-preview.js +288 -288
  4. package/dist/cli.mjs +134 -12
  5. package/dist/docs-src/guide/3d-art-guidelines.md +2 -2
  6. package/dist/docs-src/guide/3d-model-assets.md +49 -13
  7. package/dist/docs-src/guide/adaptive-performance.md +4 -0
  8. package/dist/docs-src/guide/agent-loop.md +6 -6
  9. package/dist/docs-src/guide/aircraft.md +25 -17
  10. package/dist/docs-src/guide/audio.md +247 -0
  11. package/dist/docs-src/guide/browser-mount.md +17 -1
  12. package/dist/docs-src/guide/building-interiors.md +7 -5
  13. package/dist/docs-src/guide/determinism.md +27 -22
  14. package/dist/docs-src/guide/earth-view.md +444 -0
  15. package/dist/docs-src/guide/entities.md +17 -6
  16. package/dist/docs-src/guide/examples.md +39 -23
  17. package/dist/docs-src/guide/experience-playback.md +2 -3
  18. package/dist/docs-src/guide/game-samples.md +50 -21
  19. package/dist/docs-src/guide/graphics-performance.md +40 -8
  20. package/dist/docs-src/guide/input.md +9 -0
  21. package/dist/docs-src/guide/markers.md +52 -0
  22. package/dist/docs-src/guide/materials.md +10 -3
  23. package/dist/docs-src/guide/navigation.md +144 -0
  24. package/dist/docs-src/guide/project.md +23 -3
  25. package/dist/docs-src/guide/quickstart.md +39 -30
  26. package/dist/docs-src/guide/recognizable-places.md +24 -17
  27. package/dist/docs-src/guide/rendering-backends.md +5 -4
  28. package/dist/docs-src/guide/scripting.md +8 -4
  29. package/dist/docs-src/guide/sky.md +26 -9
  30. package/dist/docs-src/guide/source-bundles.md +0 -1
  31. package/dist/docs-src/guide/structure-library.md +20 -10
  32. package/dist/docs-src/guide/terrain.md +51 -6
  33. package/dist/docs-src/guide/vehicles.md +27 -14
  34. package/dist/docs-src/guide/worldgen.md +34 -24
  35. package/dist/docs-src/llms.txt +35 -18
  36. package/dist/docs-src/schemas/README.md +4 -1
  37. package/dist/docs-src/schemas/archive-set.md +175 -0
  38. package/dist/docs-src/schemas/components.md +1104 -1
  39. package/dist/docs-src/schemas/matgraph.md +6 -0
  40. package/dist/docs-src/schemas/soundbank.md +251 -0
  41. package/dist/docs-src/schemas/structure-placements.md +496 -0
  42. package/dist/docs-src/schemas/terrain-package.md +120 -0
  43. package/dist/index.d.mts +31 -3
  44. package/dist/index.mjs +2 -2
  45. package/dist/{mcp-BFnCWrg0.mjs → mcp-BTVwVKFb.mjs} +78 -4
  46. package/dist/{ops-BGxhSP6w.mjs → ops-BPdHodFR.mjs} +1181 -61
  47. package/dist/templates/city-courier/README.md +66 -0
  48. package/dist/templates/city-courier/checks.json +20 -0
  49. package/dist/templates/city-courier/commands.json +32 -0
  50. package/dist/templates/city-courier/delivery-run.replay.json +214 -0
  51. package/dist/templates/city-courier/gen/molen-types.ts +1016 -0
  52. package/dist/templates/city-courier/index.html +2 -0
  53. package/dist/templates/city-courier/package.json +26 -0
  54. package/dist/templates/city-courier/project.json +8 -0
  55. package/dist/templates/city-courier/scene.json +3474 -0
  56. package/dist/templates/city-courier/scripts/game.ts +131 -0
  57. package/dist/templates/city-courier/scripts/molen-scripts.d.ts +1288 -0
  58. package/dist/templates/city-courier/scripts/tsconfig.json +16 -0
  59. package/dist/templates/city-courier/src/audio.ts +96 -0
  60. package/dist/templates/city-courier/src/game-shell.css +317 -0
  61. package/dist/templates/city-courier/src/main.ts +84 -0
  62. package/dist/templates/city-courier/src/scene.ts +17 -0
  63. package/dist/templates/city-courier/src/vite-env.d.ts +1 -0
  64. package/dist/templates/city-courier/src/worker.ts +5 -0
  65. package/dist/templates/city-courier/test/headless.test.ts +95 -0
  66. package/dist/templates/city-courier/test/playthrough.test.js +52 -0
  67. package/dist/templates/city-courier/test/replay.test.ts +22 -0
  68. package/dist/templates/city-courier/tsconfig.json +17 -0
  69. package/dist/templates/city-courier/vite.config.ts +19 -0
  70. package/dist/templates/cubes/README.md +51 -0
  71. package/dist/templates/cubes/index.html +16 -0
  72. package/dist/templates/cubes/package.json +24 -0
  73. package/dist/templates/cubes/scene.json +15 -0
  74. package/dist/templates/cubes/src/cubes.ts +100 -0
  75. package/dist/templates/cubes/src/main.ts +21 -0
  76. package/dist/templates/cubes/src/worker.ts +15 -0
  77. package/dist/templates/cubes/test/headless.test.ts +98 -0
  78. package/dist/templates/cubes/tsconfig.json +17 -0
  79. package/dist/templates/cubes/vite.config.ts +17 -0
  80. package/dist/templates/data-viz/README.md +47 -0
  81. package/dist/templates/data-viz/camera-track.json +12 -0
  82. package/dist/templates/data-viz/data.json +9 -0
  83. package/dist/templates/data-viz/index.html +16 -0
  84. package/dist/templates/data-viz/package.json +25 -0
  85. package/dist/templates/data-viz/scene.json +7 -0
  86. package/dist/templates/data-viz/src/main.ts +39 -0
  87. package/dist/templates/data-viz/src/viz.ts +91 -0
  88. package/dist/templates/data-viz/src/worker.ts +12 -0
  89. package/dist/templates/data-viz/test/headless.test.ts +75 -0
  90. package/dist/templates/data-viz/tsconfig.json +17 -0
  91. package/dist/templates/data-viz/vite.config.ts +16 -0
  92. package/dist/templates/figures-gallery/README.md +46 -0
  93. package/dist/templates/figures-gallery/index.html +16 -0
  94. package/dist/templates/figures-gallery/package.json +25 -0
  95. package/dist/templates/figures-gallery/scene.json +276 -0
  96. package/dist/templates/figures-gallery/src/main.ts +44 -0
  97. package/dist/templates/figures-gallery/src/worker.ts +17 -0
  98. package/dist/templates/figures-gallery/test/headless.test.ts +90 -0
  99. package/dist/templates/figures-gallery/tsconfig.json +17 -0
  100. package/dist/templates/figures-gallery/vite.config.ts +17 -0
  101. package/dist/templates/index.json +191 -0
  102. package/dist/templates/skybound/README.md +66 -0
  103. package/dist/templates/skybound/checks.json +24 -0
  104. package/dist/templates/skybound/commands.json +32 -0
  105. package/dist/templates/skybound/first-leap.replay.json +224 -0
  106. package/dist/templates/skybound/gen/molen-types.ts +1016 -0
  107. package/dist/templates/skybound/index.html +2 -0
  108. package/dist/templates/skybound/package.json +26 -0
  109. package/dist/templates/skybound/project.json +8 -0
  110. package/dist/templates/skybound/scene.json +1777 -0
  111. package/dist/templates/skybound/scripts/game.ts +122 -0
  112. package/dist/templates/skybound/scripts/molen-scripts.d.ts +1288 -0
  113. package/dist/templates/skybound/scripts/tsconfig.json +16 -0
  114. package/dist/templates/skybound/src/audio.ts +96 -0
  115. package/dist/templates/skybound/src/game-shell.css +317 -0
  116. package/dist/templates/skybound/src/main.ts +63 -0
  117. package/dist/templates/skybound/src/scene.ts +17 -0
  118. package/dist/templates/skybound/src/vite-env.d.ts +1 -0
  119. package/dist/templates/skybound/src/worker.ts +5 -0
  120. package/dist/templates/skybound/test/headless.test.ts +124 -0
  121. package/dist/templates/skybound/test/playthrough.test.js +38 -0
  122. package/dist/templates/skybound/test/replay.test.ts +22 -0
  123. package/dist/templates/skybound/tsconfig.json +17 -0
  124. package/dist/templates/skybound/vite.config.ts +19 -0
  125. package/dist/templates/terrain-flyover/README.md +46 -0
  126. package/dist/templates/terrain-flyover/index.html +16 -0
  127. package/dist/templates/terrain-flyover/package.json +26 -0
  128. package/dist/templates/terrain-flyover/src/flyover.ts +23 -0
  129. package/dist/templates/terrain-flyover/src/main.ts +93 -0
  130. package/dist/templates/terrain-flyover/terrain.json +15 -0
  131. package/dist/templates/terrain-flyover/test/headless.test.ts +72 -0
  132. package/dist/templates/terrain-flyover/tsconfig.json +17 -0
  133. package/dist/templates/terrain-flyover/vite.config.ts +15 -0
  134. package/dist/templates/top-down-arena/README.md +65 -0
  135. package/dist/templates/top-down-arena/arena-skirmish.replay.json +204 -0
  136. package/dist/templates/top-down-arena/index.html +16 -0
  137. package/dist/templates/top-down-arena/package.json +26 -0
  138. package/dist/templates/top-down-arena/project.json +10 -0
  139. package/dist/templates/top-down-arena/scene.json +182 -0
  140. package/dist/templates/top-down-arena/scripts/chase.ts +17 -0
  141. package/dist/templates/top-down-arena/scripts/combat.ts +13 -0
  142. package/dist/templates/top-down-arena/scripts/control.ts +8 -0
  143. package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +1258 -0
  144. package/dist/templates/top-down-arena/scripts/spawner.ts +11 -0
  145. package/dist/templates/top-down-arena/scripts/tsconfig.json +16 -0
  146. package/dist/templates/top-down-arena/src/arena.ts +8 -0
  147. package/dist/templates/top-down-arena/src/audio.ts +96 -0
  148. package/dist/templates/top-down-arena/src/gen/molen-types.ts +1020 -0
  149. package/dist/templates/top-down-arena/src/main.ts +34 -0
  150. package/dist/templates/top-down-arena/src/scene.ts +24 -0
  151. package/dist/templates/top-down-arena/src/vite-env.d.ts +1 -0
  152. package/dist/templates/top-down-arena/src/worker.ts +7 -0
  153. package/dist/templates/top-down-arena/test/headless.test.ts +87 -0
  154. package/dist/templates/top-down-arena/test/replay.test.ts +22 -0
  155. package/dist/templates/top-down-arena/tsconfig.json +17 -0
  156. package/dist/templates/top-down-arena/types/arena.types.json +54 -0
  157. package/dist/templates/top-down-arena/vite.config.ts +21 -0
  158. package/package.json +14 -14
@@ -62,6 +62,12 @@ A small node graph (noise, gradients, ramps, blends) CPU-rasterized to textures.
62
62
  "const": "molen/matgraph@1",
63
63
  "description": "Format envelope; always 'molen/matgraph@1'."
64
64
  },
65
+ "alphaTest": {
66
+ "description": "Optional alpha cutout threshold for baseColor RGBA. Omit for opaque materials; this does not enable blended transparency.",
67
+ "type": "number",
68
+ "minimum": 0,
69
+ "maximum": 1
70
+ },
65
71
  "size": {
66
72
  "default": [
67
73
  512,
@@ -0,0 +1,251 @@
1
+ # Sound bank (`molen/soundbank@1`)
2
+
3
+ Named sounds for the audio director: clip files (relative to the bank), loop points, gain, pitch range, bus, spatial defaults and required provenance. Content packs expose banks under provides.soundbank.
4
+
5
+ ## Example
6
+
7
+ ```json
8
+ {
9
+ "format": "molen/soundbank@1",
10
+ "id": "my.sounds",
11
+ "license": "CC0-1.0",
12
+ "sounds": {
13
+ "ambience.rain.medium": {
14
+ "clips": [
15
+ "ambience/rain-medium.mp3"
16
+ ],
17
+ "description": "Steady medium rain on foliage and pavement.",
18
+ "loop": true,
19
+ "loopStart": 0.05,
20
+ "loopEnd": 29.9,
21
+ "gain": 0.8,
22
+ "bus": "ambience",
23
+ "spatial": false,
24
+ "durationS": 30,
25
+ "source": {
26
+ "license": "CC0-1.0",
27
+ "site": "freesound",
28
+ "url": "https://freesound.org/s/000000/"
29
+ }
30
+ },
31
+ "footstep.grass": {
32
+ "clips": [
33
+ "footsteps/grass-1.mp3",
34
+ "footsteps/grass-2.mp3",
35
+ "footsteps/grass-3.mp3"
36
+ ],
37
+ "description": "Single footstep on short grass.",
38
+ "pitch": [
39
+ 0.94,
40
+ 1.06
41
+ ],
42
+ "gain": 0.6,
43
+ "bus": "sfx",
44
+ "source": {
45
+ "license": "CC0-1.0",
46
+ "site": "kenney",
47
+ "notes": "trimmed, normalized to -16 LUFS"
48
+ }
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## JSON Schema
55
+
56
+ ```json
57
+ {
58
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
59
+ "type": "object",
60
+ "properties": {
61
+ "format": {
62
+ "type": "string",
63
+ "const": "molen/soundbank@1",
64
+ "description": "Format envelope; always 'molen/soundbank@1'."
65
+ },
66
+ "id": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "description": "Bank id, usually the content pack id, e.g. \"molen.sounds\"."
70
+ },
71
+ "title": {
72
+ "description": "Human title.",
73
+ "type": "string"
74
+ },
75
+ "license": {
76
+ "description": "Bank-wide license policy. When set, every sound must carry exactly this source.license.",
77
+ "type": "string"
78
+ },
79
+ "sounds": {
80
+ "type": "object",
81
+ "propertyNames": {
82
+ "type": "string",
83
+ "pattern": "^[a-z0-9][a-z0-9_-]*(\\.[a-z0-9][a-z0-9_-]*)*$"
84
+ },
85
+ "additionalProperties": {
86
+ "type": "object",
87
+ "properties": {
88
+ "clips": {
89
+ "minItems": 1,
90
+ "type": "array",
91
+ "items": {
92
+ "type": "string",
93
+ "minLength": 1
94
+ },
95
+ "description": "Audio files relative to the bank document (MP3 plays in every browser). Several clips = variations picked per play."
96
+ },
97
+ "description": {
98
+ "description": "What it sounds like, for agents choosing sounds (\"steady medium rain on leaves\").",
99
+ "type": "string"
100
+ },
101
+ "tags": {
102
+ "description": "Search tags.",
103
+ "type": "array",
104
+ "items": {
105
+ "type": "string"
106
+ }
107
+ },
108
+ "loop": {
109
+ "description": "Loop the clip (ambience, engines); default false.",
110
+ "type": "boolean"
111
+ },
112
+ "loopStart": {
113
+ "description": "Loop start in seconds (trims encoder padding).",
114
+ "type": "number",
115
+ "minimum": 0
116
+ },
117
+ "loopEnd": {
118
+ "description": "Loop end in seconds; must exceed loopStart.",
119
+ "type": "number",
120
+ "minimum": 0
121
+ },
122
+ "gain": {
123
+ "description": "Linear base gain; default 1.",
124
+ "type": "number",
125
+ "minimum": 0,
126
+ "maximum": 4
127
+ },
128
+ "pitch": {
129
+ "description": "[min, max] playback-rate range; each play picks a value in it. Default [1, 1].",
130
+ "minItems": 2,
131
+ "maxItems": 2,
132
+ "type": "array",
133
+ "items": {
134
+ "type": "number",
135
+ "exclusiveMinimum": 0
136
+ }
137
+ },
138
+ "bus": {
139
+ "description": "Default bus; default sfx.",
140
+ "type": "string",
141
+ "pattern": "^[a-z][a-z0-9-]*$"
142
+ },
143
+ "spatial": {
144
+ "anyOf": [
145
+ {
146
+ "type": "boolean",
147
+ "const": false
148
+ },
149
+ {
150
+ "type": "object",
151
+ "properties": {
152
+ "refDistance": {
153
+ "description": "Distance in meters at which the sound plays at full gain; default 1.",
154
+ "type": "number",
155
+ "exclusiveMinimum": 0
156
+ },
157
+ "maxDistance": {
158
+ "description": "Distance in meters beyond which the sound is culled; default 60.",
159
+ "type": "number",
160
+ "exclusiveMinimum": 0
161
+ },
162
+ "rolloff": {
163
+ "description": "How fast gain falls off past refDistance; default 1.",
164
+ "type": "number",
165
+ "minimum": 0
166
+ },
167
+ "model": {
168
+ "description": "Distance attenuation model (Web Audio PannerNode.distanceModel); default inverse.",
169
+ "type": "string",
170
+ "enum": [
171
+ "linear",
172
+ "inverse",
173
+ "exponential"
174
+ ]
175
+ }
176
+ },
177
+ "additionalProperties": false
178
+ }
179
+ ],
180
+ "description": "false = non-positional (2D); an object = positional with these distance settings."
181
+ },
182
+ "durationS": {
183
+ "description": "Clip duration in seconds (written by molen audio import).",
184
+ "type": "number",
185
+ "minimum": 0
186
+ },
187
+ "hash": {
188
+ "description": "sha256 of the first clip, \"sha256:<hex>\".",
189
+ "type": "string"
190
+ },
191
+ "source": {
192
+ "type": "object",
193
+ "properties": {
194
+ "license": {
195
+ "type": "string",
196
+ "minLength": 1,
197
+ "description": "SPDX-style license of this recording, e.g. \"CC0-1.0\". Required provenance."
198
+ },
199
+ "site": {
200
+ "description": "Where it came from: freesound, kenney, opengameart, …",
201
+ "type": "string"
202
+ },
203
+ "url": {
204
+ "description": "Page of the original recording.",
205
+ "type": "string"
206
+ },
207
+ "author": {
208
+ "description": "Recordist or creator.",
209
+ "type": "string"
210
+ },
211
+ "title": {
212
+ "description": "Original title.",
213
+ "type": "string"
214
+ },
215
+ "prompt": {
216
+ "description": "Prompt text, when the clip was generated.",
217
+ "type": "string"
218
+ },
219
+ "generator": {
220
+ "description": "Generator/model name, when the clip was generated.",
221
+ "type": "string"
222
+ },
223
+ "notes": {
224
+ "description": "Edits made: trims, loudness normalization, loop points.",
225
+ "type": "string"
226
+ }
227
+ },
228
+ "required": [
229
+ "license"
230
+ ],
231
+ "additionalProperties": false,
232
+ "description": "Provenance: license plus origin or generation prompt."
233
+ }
234
+ },
235
+ "required": [
236
+ "clips",
237
+ "source"
238
+ ],
239
+ "additionalProperties": false
240
+ },
241
+ "description": "Sound id → entry. Later banks override earlier ones with the same id."
242
+ }
243
+ },
244
+ "required": [
245
+ "format",
246
+ "id",
247
+ "sounds"
248
+ ],
249
+ "additionalProperties": false
250
+ }
251
+ ```