@bendyline/molen-tooling 0.0.1

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 (84) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +15 -0
  3. package/README.md +91 -0
  4. package/dist/capture/THIRD-PARTY-NOTICES.md +223 -0
  5. package/dist/capture/basis/LICENSE.txt +55 -0
  6. package/dist/capture/basis/basis_transcoder.js +19 -0
  7. package/dist/capture/basis/basis_transcoder.wasm +0 -0
  8. package/dist/capture/capture.html +15 -0
  9. package/dist/capture/harness.js +4671 -0
  10. package/dist/capture/worldgen-preview.html +15 -0
  11. package/dist/capture/worldgen-preview.js +4617 -0
  12. package/dist/cli.d.mts +1 -0
  13. package/dist/cli.mjs +1276 -0
  14. package/dist/docs-src/guide/3d-art-guidelines.md +157 -0
  15. package/dist/docs-src/guide/3d-model-assets.md +286 -0
  16. package/dist/docs-src/guide/adaptive-performance.md +89 -0
  17. package/dist/docs-src/guide/agent-loop.md +156 -0
  18. package/dist/docs-src/guide/aircraft.md +225 -0
  19. package/dist/docs-src/guide/browser-mount.md +185 -0
  20. package/dist/docs-src/guide/building-interiors.md +175 -0
  21. package/dist/docs-src/guide/capability-authoring.md +69 -0
  22. package/dist/docs-src/guide/determinism.md +285 -0
  23. package/dist/docs-src/guide/entities.md +47 -0
  24. package/dist/docs-src/guide/examples.md +58 -0
  25. package/dist/docs-src/guide/experience-playback.md +57 -0
  26. package/dist/docs-src/guide/figures.md +164 -0
  27. package/dist/docs-src/guide/game-samples.md +100 -0
  28. package/dist/docs-src/guide/graphics-performance.md +167 -0
  29. package/dist/docs-src/guide/input.md +205 -0
  30. package/dist/docs-src/guide/materials.md +125 -0
  31. package/dist/docs-src/guide/project.md +157 -0
  32. package/dist/docs-src/guide/quickstart.md +63 -0
  33. package/dist/docs-src/guide/recognizable-places.md +158 -0
  34. package/dist/docs-src/guide/rendering-backends.md +231 -0
  35. package/dist/docs-src/guide/scripting.md +330 -0
  36. package/dist/docs-src/guide/sky.md +192 -0
  37. package/dist/docs-src/guide/source-bundles.md +42 -0
  38. package/dist/docs-src/guide/structure-library.md +114 -0
  39. package/dist/docs-src/guide/surface-rendering.md +203 -0
  40. package/dist/docs-src/guide/terrain.md +389 -0
  41. package/dist/docs-src/guide/three-surface.md +70 -0
  42. package/dist/docs-src/guide/vehicle-interiors.md +126 -0
  43. package/dist/docs-src/guide/vehicles.md +110 -0
  44. package/dist/docs-src/guide/weather.md +123 -0
  45. package/dist/docs-src/guide/worldgen.md +434 -0
  46. package/dist/docs-src/llms.txt +129 -0
  47. package/dist/docs-src/schemas/README.md +36 -0
  48. package/dist/docs-src/schemas/archstyle.md +2340 -0
  49. package/dist/docs-src/schemas/assert.md +169 -0
  50. package/dist/docs-src/schemas/asset.md +543 -0
  51. package/dist/docs-src/schemas/business-catalog.md +162 -0
  52. package/dist/docs-src/schemas/cameratrack.md +132 -0
  53. package/dist/docs-src/schemas/command.md +112 -0
  54. package/dist/docs-src/schemas/components.md +5826 -0
  55. package/dist/docs-src/schemas/delta.md +204 -0
  56. package/dist/docs-src/schemas/experience-play.md +452 -0
  57. package/dist/docs-src/schemas/figure.md +290 -0
  58. package/dist/docs-src/schemas/interior-catalog.md +230 -0
  59. package/dist/docs-src/schemas/keyframe.md +314 -0
  60. package/dist/docs-src/schemas/landmark-catalog.md +56 -0
  61. package/dist/docs-src/schemas/landmark.md +293 -0
  62. package/dist/docs-src/schemas/matgraph.md +1163 -0
  63. package/dist/docs-src/schemas/pack-index.md +82 -0
  64. package/dist/docs-src/schemas/pack-source.md +139 -0
  65. package/dist/docs-src/schemas/pack.md +225 -0
  66. package/dist/docs-src/schemas/pixelgrid.md +108 -0
  67. package/dist/docs-src/schemas/prefab.md +106 -0
  68. package/dist/docs-src/schemas/project.md +271 -0
  69. package/dist/docs-src/schemas/region-atlas.md +612 -0
  70. package/dist/docs-src/schemas/replay.md +807 -0
  71. package/dist/docs-src/schemas/scatter.md +541 -0
  72. package/dist/docs-src/schemas/scene.md +1152 -0
  73. package/dist/docs-src/schemas/source-bundle.md +266 -0
  74. package/dist/docs-src/schemas/stylepack.md +420 -0
  75. package/dist/docs-src/schemas/terrain-package.md +731 -0
  76. package/dist/docs-src/schemas/terrain.md +313 -0
  77. package/dist/docs-src/schemas/types.md +218 -0
  78. package/dist/docs-src/schemas/uvpaint.md +149 -0
  79. package/dist/docs-src/schemas/worldgen-batch.md +743 -0
  80. package/dist/index.d.mts +1271 -0
  81. package/dist/index.mjs +78 -0
  82. package/dist/mcp-BFnCWrg0.mjs +796 -0
  83. package/dist/ops-BGxhSP6w.mjs +7246 -0
  84. package/package.json +96 -0
@@ -0,0 +1,541 @@
1
+ # Scatter rules (`molen/scatter@1`)
2
+
3
+ Label-keyed deterministic prop placement (density, clustering, slope and clearance limits, weighted species with jitter, detail tiers) plus per-label surface colors.
4
+
5
+ ## Example
6
+
7
+ ```json
8
+ {
9
+ "format": "molen/scatter@1",
10
+ "id": "molen.worldgen.scatter.pnw",
11
+ "title": "Pacific Northwest vegetation",
12
+ "version": 1,
13
+ "surface": {
14
+ "default": "#6f7d64",
15
+ "colors": {
16
+ "forest": "#3f6347",
17
+ "wood": "#3a5f43",
18
+ "grassland": "#7d9562",
19
+ "grass": "#79915e",
20
+ "farmland": "#999866",
21
+ "scrub": "#6e8060",
22
+ "park": "#64845c",
23
+ "residential": "#8a8b7f",
24
+ "commercial": "#8d8a84",
25
+ "industrial": "#827c72",
26
+ "urban_area": "#85857d",
27
+ "beach": "#c0ae7d",
28
+ "sand": "#b6a777",
29
+ "glacier": "#d7e3e5",
30
+ "barren": "#8a806c",
31
+ "wetland": "#6e8a72"
32
+ }
33
+ },
34
+ "defaults": {
35
+ "avoid": {
36
+ "roads": 5,
37
+ "buildings": 3,
38
+ "water": 1.5
39
+ },
40
+ "slopeMax": 0.75,
41
+ "lod": {
42
+ "keepByTier": [
43
+ 1,
44
+ 0.45,
45
+ 0.18,
46
+ 0.06
47
+ ],
48
+ "maxInstancesPerBatch": 6000
49
+ }
50
+ },
51
+ "rules": [
52
+ {
53
+ "id": "conifer-forest",
54
+ "classes": [
55
+ "forest",
56
+ "wood"
57
+ ],
58
+ "densityPerHectare": 140,
59
+ "minSpacing": 3.2,
60
+ "clustering": {
61
+ "scale": 160,
62
+ "threshold": 0.35,
63
+ "contrast": 1.4,
64
+ "seedOffset": 0
65
+ },
66
+ "slopeMax": 0.8,
67
+ "altitude": {
68
+ "max": 1700
69
+ },
70
+ "populations": [
71
+ {
72
+ "model": "molen.entities.tree.conifer.fir",
73
+ "weight": 6,
74
+ "scale": {
75
+ "min": 0.85,
76
+ "max": 1.4
77
+ },
78
+ "yaw": "random",
79
+ "align": "up",
80
+ "tint": {
81
+ "hue": 0.02,
82
+ "saturation": 0.08,
83
+ "lightness": 0.08
84
+ }
85
+ },
86
+ {
87
+ "model": "molen.entities.tree.conifer.pine",
88
+ "weight": 3,
89
+ "scale": {
90
+ "min": 0.8,
91
+ "max": 1.3
92
+ },
93
+ "yaw": "random",
94
+ "align": "up"
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "id": "park-trees",
100
+ "classes": [
101
+ "park",
102
+ "garden",
103
+ "cemetery",
104
+ "grass",
105
+ "meadow"
106
+ ],
107
+ "densityPerHectare": 18,
108
+ "minSpacing": 6,
109
+ "populations": [
110
+ {
111
+ "model": "molen.entities.tree.deciduous.oak",
112
+ "weight": 3,
113
+ "scale": {
114
+ "min": 0.8,
115
+ "max": 1.2
116
+ },
117
+ "yaw": "random",
118
+ "align": "up"
119
+ }
120
+ ]
121
+ }
122
+ ]
123
+ }
124
+ ```
125
+
126
+ ## JSON Schema
127
+
128
+ ```json
129
+ {
130
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
131
+ "type": "object",
132
+ "properties": {
133
+ "format": {
134
+ "type": "string",
135
+ "const": "molen/scatter@1",
136
+ "description": "Format envelope; always 'molen/scatter@1'."
137
+ },
138
+ "id": {
139
+ "type": "string",
140
+ "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$",
141
+ "description": "Rule set id under the pack namespace, e.g. 'molen.worldgen.scatter.pnw'."
142
+ },
143
+ "title": {
144
+ "type": "string",
145
+ "minLength": 1,
146
+ "description": "Human title."
147
+ },
148
+ "doc": {
149
+ "type": "string"
150
+ },
151
+ "version": {
152
+ "default": 1,
153
+ "type": "integer",
154
+ "minimum": 1,
155
+ "maximum": 9007199254740991,
156
+ "description": "Bump to re-roll every placement."
157
+ },
158
+ "surface": {
159
+ "type": "object",
160
+ "properties": {
161
+ "default": {
162
+ "type": "string",
163
+ "pattern": "^#[0-9a-fA-F]{6}$",
164
+ "description": "Surface color for unlisted labels."
165
+ },
166
+ "colors": {
167
+ "default": {},
168
+ "type": "object",
169
+ "propertyNames": {
170
+ "type": "string"
171
+ },
172
+ "additionalProperties": {
173
+ "type": "string",
174
+ "pattern": "^#[0-9a-fA-F]{6}$"
175
+ },
176
+ "description": "Label pattern to '#rrggbb' surface color (exact, then word match)."
177
+ }
178
+ },
179
+ "required": [
180
+ "default"
181
+ ],
182
+ "additionalProperties": false
183
+ },
184
+ "defaults": {
185
+ "type": "object",
186
+ "properties": {
187
+ "avoid": {
188
+ "type": "object",
189
+ "properties": {
190
+ "roads": {
191
+ "type": "number",
192
+ "minimum": 0,
193
+ "description": "Clearance from road edges, meters."
194
+ },
195
+ "buildings": {
196
+ "type": "number",
197
+ "minimum": 0,
198
+ "description": "Clearance from building outlines, meters."
199
+ },
200
+ "water": {
201
+ "type": "number",
202
+ "minimum": 0,
203
+ "description": "Clearance from water, meters."
204
+ }
205
+ },
206
+ "required": [
207
+ "roads",
208
+ "buildings",
209
+ "water"
210
+ ],
211
+ "additionalProperties": false
212
+ },
213
+ "slopeMax": {
214
+ "default": 0.75,
215
+ "type": "number",
216
+ "minimum": 0,
217
+ "maximum": 1,
218
+ "description": "Default slope limit."
219
+ },
220
+ "lod": {
221
+ "type": "object",
222
+ "properties": {
223
+ "keepByTier": {
224
+ "minItems": 1,
225
+ "maxItems": 8,
226
+ "type": "array",
227
+ "items": {
228
+ "type": "number",
229
+ "minimum": 0,
230
+ "maximum": 1
231
+ },
232
+ "description": "Keep fraction per detail tier (index 0 = full detail); must be non-increasing."
233
+ },
234
+ "maxInstancesPerBatch": {
235
+ "type": "integer",
236
+ "exclusiveMinimum": 0,
237
+ "maximum": 9007199254740991,
238
+ "description": "Hard cap per batch for this rule."
239
+ }
240
+ },
241
+ "required": [
242
+ "keepByTier",
243
+ "maxInstancesPerBatch"
244
+ ],
245
+ "additionalProperties": false
246
+ }
247
+ },
248
+ "required": [
249
+ "avoid",
250
+ "lod"
251
+ ],
252
+ "additionalProperties": false
253
+ },
254
+ "rules": {
255
+ "default": [],
256
+ "type": "array",
257
+ "items": {
258
+ "type": "object",
259
+ "properties": {
260
+ "id": {
261
+ "type": "string",
262
+ "pattern": "^[a-z][a-z0-9_-]*$",
263
+ "description": "Rule id; part of every placement seed."
264
+ },
265
+ "classes": {
266
+ "minItems": 1,
267
+ "type": "array",
268
+ "items": {
269
+ "type": "string",
270
+ "minLength": 1
271
+ },
272
+ "description": "Labels this rule applies to (word match)."
273
+ },
274
+ "notClasses": {
275
+ "type": "array",
276
+ "items": {
277
+ "type": "string",
278
+ "minLength": 1
279
+ },
280
+ "description": "Labels that exclude the rule."
281
+ },
282
+ "densityPerHectare": {
283
+ "type": "number",
284
+ "minimum": 0,
285
+ "maximum": 20000,
286
+ "description": "Target instances per hectare before clustering and polygon density."
287
+ },
288
+ "minSpacing": {
289
+ "default": 2,
290
+ "type": "number",
291
+ "minimum": 0,
292
+ "description": "Minimum spacing hint in meters."
293
+ },
294
+ "clustering": {
295
+ "type": "object",
296
+ "properties": {
297
+ "scale": {
298
+ "type": "number",
299
+ "exclusiveMinimum": 0,
300
+ "description": "Noise wavelength in meters."
301
+ },
302
+ "threshold": {
303
+ "default": 0.35,
304
+ "type": "number",
305
+ "minimum": 0,
306
+ "maximum": 1,
307
+ "description": "Noise value below which density is zero."
308
+ },
309
+ "contrast": {
310
+ "default": 1.4,
311
+ "type": "number",
312
+ "exclusiveMinimum": 0,
313
+ "description": "Steepness of the density ramp."
314
+ },
315
+ "seedOffset": {
316
+ "default": 0,
317
+ "type": "integer",
318
+ "minimum": -9007199254740991,
319
+ "maximum": 9007199254740991,
320
+ "description": "Decorrelates rules sharing a class."
321
+ }
322
+ },
323
+ "required": [
324
+ "scale"
325
+ ],
326
+ "additionalProperties": false,
327
+ "description": "Noise-modulated density for natural clumps and clearings."
328
+ },
329
+ "slopeMax": {
330
+ "type": "number",
331
+ "minimum": 0,
332
+ "maximum": 1,
333
+ "description": "Slope limit for this rule (0 = flat, 1 = vertical)."
334
+ },
335
+ "altitude": {
336
+ "type": "object",
337
+ "properties": {
338
+ "min": {
339
+ "type": "number",
340
+ "description": "Lowest ground height in meters."
341
+ },
342
+ "max": {
343
+ "type": "number",
344
+ "description": "Highest ground height in meters."
345
+ }
346
+ },
347
+ "additionalProperties": false
348
+ },
349
+ "avoid": {
350
+ "type": "object",
351
+ "properties": {
352
+ "roads": {
353
+ "type": "number",
354
+ "minimum": 0
355
+ },
356
+ "buildings": {
357
+ "type": "number",
358
+ "minimum": 0
359
+ },
360
+ "water": {
361
+ "type": "number",
362
+ "minimum": 0
363
+ }
364
+ },
365
+ "additionalProperties": false,
366
+ "description": "Overrides of the default clearances, meters."
367
+ },
368
+ "populations": {
369
+ "minItems": 1,
370
+ "type": "array",
371
+ "items": {
372
+ "type": "object",
373
+ "properties": {
374
+ "model": {
375
+ "type": "string",
376
+ "pattern": "^(builtin:[a-z][a-z0-9_.]*|[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+)$",
377
+ "description": "Model: an asset id (e.g. 'molen.entities.tree.conifer.fir') or 'builtin:<name>'."
378
+ },
379
+ "weight": {
380
+ "type": "number",
381
+ "minimum": 0,
382
+ "maximum": 1000,
383
+ "description": "Relative weight among sibling entries; 0 disables the entry."
384
+ },
385
+ "scale": {
386
+ "type": "object",
387
+ "properties": {
388
+ "min": {
389
+ "type": "number",
390
+ "description": "Minimum uniform scale."
391
+ },
392
+ "max": {
393
+ "type": "number",
394
+ "description": "Maximum uniform scale (>= min)."
395
+ }
396
+ },
397
+ "required": [
398
+ "min",
399
+ "max"
400
+ ]
401
+ },
402
+ "widthScale": {
403
+ "type": "object",
404
+ "properties": {
405
+ "min": {
406
+ "type": "number",
407
+ "exclusiveMinimum": 0
408
+ },
409
+ "max": {
410
+ "type": "number",
411
+ "exclusiveMinimum": 0
412
+ }
413
+ },
414
+ "required": [
415
+ "min",
416
+ "max"
417
+ ],
418
+ "additionalProperties": false,
419
+ "description": "Independent X/Z scale multiplier for crown width/bushiness; omitted means 1."
420
+ },
421
+ "yaw": {
422
+ "default": "random",
423
+ "type": "string",
424
+ "enum": [
425
+ "random",
426
+ "none"
427
+ ],
428
+ "description": "Random heading or fixed."
429
+ },
430
+ "align": {
431
+ "default": "up",
432
+ "type": "string",
433
+ "enum": [
434
+ "up",
435
+ "normal"
436
+ ],
437
+ "description": "Upright, or tilted to the ground normal."
438
+ },
439
+ "tint": {
440
+ "type": "object",
441
+ "properties": {
442
+ "hue": {
443
+ "default": 0,
444
+ "type": "number",
445
+ "minimum": 0,
446
+ "maximum": 0.5,
447
+ "description": "Hue jitter ± (0..0.5)."
448
+ },
449
+ "saturation": {
450
+ "default": 0,
451
+ "type": "number",
452
+ "minimum": 0,
453
+ "maximum": 1,
454
+ "description": "Saturation jitter ± (0..1)."
455
+ },
456
+ "lightness": {
457
+ "default": 0,
458
+ "type": "number",
459
+ "minimum": 0,
460
+ "maximum": 1,
461
+ "description": "Lightness jitter ± (0..1)."
462
+ }
463
+ },
464
+ "additionalProperties": false,
465
+ "description": "Per-instance HSL jitter applied as instance color."
466
+ },
467
+ "slopeMax": {
468
+ "type": "number",
469
+ "minimum": 0,
470
+ "maximum": 1,
471
+ "description": "Species-specific slope limit (0 = flat, 1 = vertical)."
472
+ },
473
+ "altitude": {
474
+ "type": "object",
475
+ "properties": {
476
+ "min": {
477
+ "type": "number",
478
+ "description": "Lowest ground height in meters."
479
+ },
480
+ "max": {
481
+ "type": "number",
482
+ "description": "Highest ground height in meters."
483
+ }
484
+ },
485
+ "additionalProperties": false,
486
+ "description": "Species-specific ground height limits."
487
+ }
488
+ },
489
+ "required": [
490
+ "model",
491
+ "weight",
492
+ "scale"
493
+ ],
494
+ "additionalProperties": false
495
+ },
496
+ "description": "Weighted species."
497
+ },
498
+ "lod": {
499
+ "type": "object",
500
+ "properties": {
501
+ "keepByTier": {
502
+ "minItems": 1,
503
+ "maxItems": 8,
504
+ "type": "array",
505
+ "items": {
506
+ "type": "number",
507
+ "minimum": 0,
508
+ "maximum": 1
509
+ }
510
+ },
511
+ "maxInstancesPerBatch": {
512
+ "type": "integer",
513
+ "exclusiveMinimum": 0,
514
+ "maximum": 9007199254740991
515
+ }
516
+ },
517
+ "additionalProperties": false,
518
+ "description": "Overrides of the default detail policy."
519
+ }
520
+ },
521
+ "required": [
522
+ "id",
523
+ "classes",
524
+ "densityPerHectare",
525
+ "populations"
526
+ ],
527
+ "additionalProperties": false
528
+ },
529
+ "description": "Placement rules, all matching rules apply."
530
+ }
531
+ },
532
+ "required": [
533
+ "format",
534
+ "id",
535
+ "title",
536
+ "surface",
537
+ "defaults"
538
+ ],
539
+ "additionalProperties": false
540
+ }
541
+ ```