@bendyline/molen-tooling 0.0.10 → 0.0.12

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 (66) hide show
  1. package/dist/capture/harness.js +610 -271
  2. package/dist/capture/worldgen-preview.js +396 -298
  3. package/dist/cli.mjs +2 -2
  4. package/dist/docs-src/guide/3d-art-guidelines.md +34 -10
  5. package/dist/docs-src/guide/3d-model-assets.md +40 -2
  6. package/dist/docs-src/guide/adaptive-performance.md +12 -4
  7. package/dist/docs-src/guide/aircraft.md +126 -26
  8. package/dist/docs-src/guide/ambient-life.md +13 -4
  9. package/dist/docs-src/guide/audio.md +19 -5
  10. package/dist/docs-src/guide/building-interiors.md +7 -2
  11. package/dist/docs-src/guide/determinism.md +1 -1
  12. package/dist/docs-src/guide/dioramas.md +6 -0
  13. package/dist/docs-src/guide/earth-view.md +121 -20
  14. package/dist/docs-src/guide/entities.md +84 -5
  15. package/dist/docs-src/guide/figures.md +31 -7
  16. package/dist/docs-src/guide/graphics-performance.md +27 -12
  17. package/dist/docs-src/guide/medium-fi.md +269 -25
  18. package/dist/docs-src/guide/navigation.md +5 -2
  19. package/dist/docs-src/guide/project.md +5 -0
  20. package/dist/docs-src/guide/recognizable-places.md +6 -0
  21. package/dist/docs-src/guide/regional-fleets.md +94 -0
  22. package/dist/docs-src/guide/regional-world.md +398 -0
  23. package/dist/docs-src/guide/sky.md +36 -3
  24. package/dist/docs-src/guide/structure-library.md +4 -1
  25. package/dist/docs-src/guide/surface-rendering.md +264 -2
  26. package/dist/docs-src/guide/terrain.md +5 -0
  27. package/dist/docs-src/guide/typography.md +105 -0
  28. package/dist/docs-src/guide/vehicle-interiors.md +169 -9
  29. package/dist/docs-src/guide/vehicles.md +13 -2
  30. package/dist/docs-src/guide/weather.md +15 -8
  31. package/dist/docs-src/guide/worldgen.md +88 -10
  32. package/dist/docs-src/llms.txt +5 -1
  33. package/dist/docs-src/schemas/README.md +6 -0
  34. package/dist/docs-src/schemas/archstyle.md +66 -0
  35. package/dist/docs-src/schemas/components.md +1087 -66
  36. package/dist/docs-src/schemas/ecology-atlas.md +236 -0
  37. package/dist/docs-src/schemas/fleet-catalog.md +113 -0
  38. package/dist/docs-src/schemas/landmark.md +10 -0
  39. package/dist/docs-src/schemas/matgraph.md +11 -1
  40. package/dist/docs-src/schemas/pack-source.md +11 -1
  41. package/dist/docs-src/schemas/pack.md +1 -1
  42. package/dist/docs-src/schemas/project.md +1 -1
  43. package/dist/docs-src/schemas/region-atlas.md +6 -0
  44. package/dist/docs-src/schemas/regional-catalog.md +1436 -0
  45. package/dist/docs-src/schemas/scatter.md +110 -4
  46. package/dist/docs-src/schemas/structure-placement-data.md +662 -0
  47. package/dist/docs-src/schemas/structure-placement-index.md +87 -0
  48. package/dist/docs-src/schemas/structure-placements.md +183 -0
  49. package/dist/docs-src/schemas/terrain-package.md +41 -0
  50. package/dist/docs-src/schemas/transport-network.md +8 -0
  51. package/dist/docs-src/schemas/types.md +1 -1
  52. package/dist/docs-src/schemas/wildlife-ranges.md +251 -0
  53. package/dist/docs-src/schemas/worldgen-batch.md +61 -0
  54. package/dist/index.d.mts +2 -0
  55. package/dist/index.mjs +1 -1
  56. package/dist/{mcp-BbxqqnD1.mjs → mcp-BXaK46X-.mjs} +1 -1
  57. package/dist/{ops-b4Pag8U-.mjs → ops-Cm7WNvb9.mjs} +55 -22
  58. package/dist/templates/city-courier/gen/molen-types.ts +138 -17
  59. package/dist/templates/city-courier/scripts/molen-scripts.d.ts +138 -17
  60. package/dist/templates/figures-gallery/test/headless.test.ts +2 -1
  61. package/dist/templates/index.json +17 -17
  62. package/dist/templates/skybound/gen/molen-types.ts +138 -17
  63. package/dist/templates/skybound/scripts/molen-scripts.d.ts +138 -17
  64. package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +138 -17
  65. package/dist/templates/top-down-arena/src/gen/molen-types.ts +138 -17
  66. package/package.json +13 -13
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as formatPacked, A as inspectContentPack, B as searchDocs, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, F as previewFigure, H as describeOps, I as listFigurePresets, J as checkSoundbank, K as planAudio, L as exportFrames, M as bakeNetwork, N as generateTypes, O as extractContentPack, Q as formatBytes, R as driveScene, S as rasterizeMaterial, T as projectInfo, U as formatOp, V as OPS_CATALOG, W as checkScripts, X as stageAssets, Z as screenshotAsset, _ as loadComponentRegistry, b as diffSnapshots, c as validateAsset, d as runSimulation, dt as playExperience, et as packAsset, f as screenshotScene, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, it as importAsset, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, m as getSchemaOp, n as worldgenStats, nt as listAssets, p as getComponentOp, q as importSound, r as previewWorldgen, s as simWatch, t as formatWorldgenStats, tt as inspectAsset, u as testTypes, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates } from "./ops-b4Pag8U-.mjs";
2
+ import { $ as formatPacked, A as inspectContentPack, B as searchDocs, C as checkTypesOp, D as buildContentPack, E as reserveNamespace, F as previewFigure, H as describeOps, I as listFigurePresets, J as checkSoundbank, K as planAudio, L as exportFrames, M as bakeNetwork, N as generateTypes, O as extractContentPack, Q as formatBytes, R as driveScene, S as rasterizeMaterial, T as projectInfo, U as formatOp, V as OPS_CATALOG, W as checkScripts, X as stageAssets, Z as screenshotAsset, _ as loadComponentRegistry, b as diffSnapshots, c as validateAsset, d as runSimulation, dt as playExperience, et as packAsset, f as screenshotScene, g as listSchemasOp, h as listComponentsOp, i as bakeWorldgen, it as importAsset, j as verifyContentPack, k as fetchContentPack, l as applyUvPaintOp, m as getSchemaOp, n as worldgenStats, nt as listAssets, p as getComponentOp, q as importSound, r as previewWorldgen, s as simWatch, t as formatWorldgenStats, tt as inspectAsset, u as testTypes, v as scaffoldExperience, w as listTypes, x as runReplayFile, y as listTemplates } from "./ops-Cm7WNvb9.mjs";
3
3
  import { dirname, join } from "node:path";
4
4
  import { readFileSync } from "node:fs";
5
5
  import { formatIssues } from "@bendyline/molen-schema";
@@ -1254,7 +1254,7 @@ async function cmdWorldgen(args) {
1254
1254
  return 2;
1255
1255
  }
1256
1256
  async function cmdMcp() {
1257
- const { startMcpServer } = await import("./mcp-BbxqqnD1.mjs");
1257
+ const { startMcpServer } = await import("./mcp-BXaK46X-.mjs");
1258
1258
  await startMcpServer();
1259
1259
  return 0;
1260
1260
  }
@@ -10,6 +10,18 @@ These guidelines apply to imported static GLBs, built-in instanced props, and pa
10
10
  worldgen buildings. They are authoring targets, not new runtime hard limits. Use the existing
11
11
  [model asset workflow](3d-model-assets.md) for import, validation, hashes, hosting, and captures.
12
12
 
13
+ Controllable road, rail, air and water vehicles follow the
14
+ [close-view vehicle standard](medium-fi.md#controllable-vehicles-close-view-fidelity), above
15
+ the detail level of ordinary scenery. Preserve polygonal construction while adding the
16
+ panels, fasteners, markings, mechanical fittings and furnished operator views visible at
17
+ driving distance. Generic vehicle display names use the Bendy house brand; identified real
18
+ vehicles retain their actual names.
19
+
20
+ For all vehicle modeling, aim to verify both exterior and interior proportions with
21
+ [calibrated reference overlays](medium-fi.md#vehicle-reference-overlays). Compare during shape
22
+ construction, record independent landmark checks, and document unavailable views and uncertain
23
+ reconstructions. Surface detail does not compensate for incorrect body or cabin geometry.
24
+
13
25
  ## Recognition and shape
14
26
 
15
27
  Work from large to small: footprint and height, roof and massing, entrance and facade rhythm,
@@ -25,8 +37,10 @@ own an entire strip mall. Apply its facade locally and retain other tenants.
25
37
  Flat or gently faceted surfaces are the default. Use hard normals on architecture and metal
26
38
  edges; smooth normals only on deliberately round shapes. Curved identity marks should still
27
39
  read at low polygon counts. Avoid tiny bevels, microdisplacement, alpha-card foliage and surface
28
- noise that shimmer at street-view distance. Signs face +Z in their own frame and must read from
29
- the street; never mirror text to compensate for an incorrectly oriented facade.
40
+ noise that shimmer at street-view distance; generated tree crowns are the one exception, cut from
41
+ the scatter material's shared leaf atlas (see the [medium-fi style guide](medium-fi.md)). Signs
42
+ face +Z in their own frame and must read from the street; never mirror text to compensate for an
43
+ incorrectly oriented facade.
30
44
 
31
45
  ## Scale and pivots
32
46
 
@@ -65,7 +79,8 @@ model; scene and tile budgets still control total instances and building vertice
65
79
  | Ordinary tree | 300–2,000 triangles | Fewer crown clusters, then a faceted crown/cone |
66
80
  | Small static building | 1,000–8,000 triangles | Remove furniture and small facade details |
67
81
  | Procedural building | Budgeted per outline | Keep measured envelope, main roof and identity where feasible |
68
- | Figure (human or animal) | 1,000–4,000 triangles, one vertex-color material | 600–900 medium tier; 100–300 rigid distant tier |
82
+ | Human figure | About 7,400 triangles, one vertex-color material | About 2,200 medium tier; 1,100 rigid distant tier |
83
+ | Animal figure | About 4,100–6,500 triangles, one vertex-color material | About 2,100–2,900 medium; 1,100–1,500 rigid distant tier |
69
84
 
70
85
  Higher budgets need a visible reason and a distance fallback. Repeated street furniture and signs
71
86
  should be instanced by model reference. Prefer a shared vertex-color material; do not allocate
@@ -78,13 +93,22 @@ unseeded randomness, or locale-dependent sorting to generate geometry.
78
93
 
79
94
  ## Figures
80
95
 
81
- Figures ([guide](figures.md)) stay left of the uncanny valley on purpose: a head about one
82
- sixth of the height for adults and closer to a quarter for children, mitten hands, block shoes or
83
- hooves, disc eyes and brows with no mouth, nose or teeth, hair as a solid shell, and clothing as
84
- vertex-color blocks with hard edges at cuffs, hems and collars. Segments are smooth within
85
- themselves and low in ring count (eight to twelve sides), joints share rings with two bone
86
- influences, and each figure uses three to five intentional colors from its palette. Animals
87
- follow the same rules: a barrel body, cone ears, a snout, hooves or paws, and one marking color.
96
+ Human figures ([guide](figures.md)) target early open-world polygonal realism: a shaped jaw,
97
+ cheekbones and nose, inset almond eyes with lids, ears, lips, a shaped hairline, and recognizable
98
+ hands and shoes. Keep adult proportions believable and preserve the larger child head. Clothing
99
+ needs a waist, shoulders, cuffs, a crotch seam and clear garment boundaries; avoid disconnected
100
+ capsule limbs or overlapping pelvis shells. Near hands have four gently curled fingers and a
101
+ tucked thumb; lower levels merge the curved fingers. Resting forearms turn the backs of the
102
+ hands diagonally forward. All of this follows the existing 22-joint biped skeleton.
103
+
104
+ Use shared palette-driven surfaces, with geometric relief responding to scene lighting rather
105
+ than painted shadows. Keep surface normals and face winding outward. Reserve the extra near
106
+ triangles for features visible in close views and retain the cheaper medium and distant bodies.
107
+ Animals use species-shaped ribcages and bellies, shoulders and haunches that emerge from the
108
+ torso, continuous skull-to-muzzle surfaces, cupped ears, eyelids, rounded paws or split/single
109
+ hooves, and curved tails. Coat markings belong on visible surfaces. Keep eye and ear placement
110
+ readable from the front as well as the side. Strip whiskers, toe divisions and hair strands
111
+ before simplifying the silhouette at distance.
88
112
  Review every preset from the front, three-quarter, rear and gameplay distance
89
113
  (`molen figure preview --angles review`) beside a door and a bench before accepting a look.
90
114
 
@@ -57,6 +57,11 @@ Before making geometry, decide the points that affect the runtime result:
57
57
  Do not invent requirements that materially change the prompt. Record reasonable assumptions in
58
58
  the asset README or build report.
59
59
 
60
+ For any vehicle, plan exterior **and** interior reference comparisons before constructing
61
+ detail. The [vehicle overlay goal](medium-fi.md#vehicle-reference-overlays) applies to real
62
+ vehicles and generic Bendy designs: use calibrated drawings and matched-camera photographs
63
+ where available, and record missing references and reconstruction assumptions separately.
64
+
60
65
  ## 2. Keep source and runtime artifacts separate
61
66
 
62
67
  A practical project-local layout follows the [logical source bundle](source-bundles.md) contract:
@@ -116,6 +121,12 @@ reference contract, metric UV scale, tinting and shared texture lifetime. Keep u
116
121
  murals and facade art as their own materials. Inspect the model in the Earth renderer as well
117
122
  as its portable asset preview when it uses these bindings.
118
123
 
124
+ The textured `window` slot uses a precolored glass texture and deliberately ignores vertex
125
+ tints. A neutral shared graph such as `metal_painted` will therefore lose a dark palette tint
126
+ in that slot. Use the `trim` slot for tinted painted frames or closed dark inset panels, and
127
+ reserve `window` for a graph that already contains the intended glass color. Check the shared
128
+ material render during construction; the portable GLB preview does not exercise this behavior.
129
+
119
130
  Choose a continuous surface for individually modeled stones: `stone_limestone_raw` has subtle
120
131
  pores and mineral mottling with a 1.2 × 1.2 m repeat. `stone_limestone_weathered` uses the same
121
132
  scale with stronger mineral variation, dark patina and open pores for exposed ancient stones.
@@ -258,6 +269,12 @@ Look at every PNG. Check silhouette, scale, origin, camera clipping, UV seams, m
258
269
  normal direction, texture repetition, transparent edges, light balance, and cast/contact shadows.
259
270
  Iterate until the screenshot—not merely the command exit code—matches the brief.
260
271
 
272
+ For vehicles, include the [reference overlay review](medium-fi.md#vehicle-reference-overlays)
273
+ throughout shape iteration: exterior silhouettes, then cabin/panel volumes and the operator's
274
+ view. Inspect discrepancies before adding fine detail. Record calibration and independent
275
+ landmark checks; an attractive overlay with stretched proportions is not evidence of accuracy.
276
+ When a usable view is unavailable, document the gap and the fallback comparison actually made.
277
+
261
278
  ## 8. Host in a browser experience
262
279
 
263
280
  The default URL provider maps an id like `barn.weathered` to
@@ -313,15 +330,36 @@ release build; the app half is the normal Vite build.
313
330
 
314
331
  ## 9. Record evidence
315
332
 
333
+ Always render and inspect the affected model before recording visual acceptance. Bulk
334
+ turntables, detail shots and lighting variants are local working outputs: keep them under
335
+ ignored `shots/`, `medium-fi/` or `.artifacts/` directories. Retain one or two small summary
336
+ previews, plus the source inputs and concise review report, in version control. Source textures
337
+ and heightmaps are required inputs and must not be confused with disposable screenshots.
338
+
339
+ Record the source/model hashes, render commands, camera settings, inspected views, decision
340
+ and limitations. A report may retain paths and hashes for local captures after those images
341
+ are gone. Ordinary builds and CI do not download an image archive; model tests check geometry,
342
+ hashes, materials and budgets, and render tests generate their own views. A new visual review
343
+ still requires actually looking at current renders. In the engine repository, `pnpm source:check`
344
+ rejects tracked bulk captures while allowing required source images and summary previews.
345
+
316
346
  For a landmark collection whose buildings occupy separate sites, keep each building as an
317
- independent asset and geographic placement. The repository's next-1,000 catalog declares
318
- required members in `content/worldgen/source/next-1000/collections.json`; the authoring/import
347
+ independent asset and geographic placement. The repository's structure catalog catalog declares
348
+ required members in `content/worldgen/source/structure-catalog/collections.json`; the authoring/import
319
349
  commands expand a collection ID to its authored members, while readiness requires every
320
350
  declared member's own current source, import and inspected render/placement evidence. A
321
351
  collection never supplies a composite GLB or centroid placement. Reuse an existing exact
322
352
  building identity when one is already registered. Runtime spatial selection still operates on
323
353
  individual placements and fetches only the nearby models.
324
354
 
355
+ When the site has one shared Wikidata identity but its buildings have no separate Wikidata
356
+ items, a collection may use `identityKind: "osm-members"`. Declare each independent OSM node,
357
+ way or relation in the member's `featureId` and in the attributed membership evidence's
358
+ `featureIds`. Keep the shared site QID; do not invent member QIDs. Each source map frame must
359
+ identify its own declared feature. Placements that share this site QID must retain their
360
+ individual map anchors and disjoint map matching radii; an overlapping or repeated identity
361
+ is rejected. Readiness still requires every member's own model and review.
362
+
325
363
  Keep a concise README or machine-readable build report next to the source. Record:
326
364
 
327
365
  - the original asset prompt and all material-generation prompts;
@@ -34,9 +34,14 @@ ultrawide displays. CPU caches and resident geometry have separate limits:
34
34
 
35
35
  Each tier also names its sun shadow quality (`EarthPerformanceTier.shadows`): off at Minimum and
36
36
  Low, medium at Medium, and high from Balanced up. On WebGPU the main pass keeps its render bundles
37
- while shadows are on, but every bundled object refreshes each frame, because that refresh is what
38
- redraws the shadow map and keeps receivers in step with it; shadows therefore cost real CPU time
39
- on WebGPU, and the controller accounts for it like any other work. Bundles exist only inside
37
+ while shadows are on. In a replayed bundle that has not changed since it was recorded, only the
38
+ first object of each material refreshes in a render: that refresh redraws the shadow map and
39
+ updates the material's shared uniforms, and the snapshot of transforms and material properties
40
+ re-records the bundle when anything else changes. Node materials whose owners set `uniform()`
41
+ values each frame (terrain water's time, the ground's origin) still refresh every object. A node
42
+ material without such values sets `userData.bundleStatic` to refresh like the rest (the scatter
43
+ and building materials do); three.js would otherwise refresh every node-material object each
44
+ frame, about 1,500 refreshes a frame at street level. Bundles exist only inside
40
45
  the frame. Between frames, warm-up compiles run the sun's shadow pass over the scene, and there
41
46
  the groups draw normally, so a tile that an admission job swapped and disposed is never replayed
42
47
  from a stale bundle. Once a WebGPU shadow map
@@ -63,7 +68,10 @@ to preserve drape alignment; newly admitted terrain uses the current cap.
63
68
  viewport height, camera field of view/zoom, conservative spatial bounds and a configurable pixel
64
69
  error. The same mutable policy updates resident objects without generation or instance uploads.
65
70
  Perspective and orthographic cameras are supported, including parent scale and floating origins.
66
- Transitions have 15% hysteresis.
71
+ Transitions have 15% hysteresis. World Explorer scales the tier's pixel error with height above
72
+ the ground, from 100 m up (three times the budget at 300 m, at most four), so a flying camera
73
+ spends no GPU time on tree and building detail below a pixel; street and rooftop views keep the
74
+ tier's budget.
67
75
 
68
76
  Builtin vegetation uses three shared models in spatial cells; the far fir/conifer is 12 triangles
69
77
  and the far broadleaf crown is 20. Building cells use authored materials nearby, a single
@@ -1,17 +1,28 @@
1
1
  # Aircraft in the world explorer
2
2
 
3
- The world explorer includes a P-51D Mustang and OH-6 interpretation, each with an editable
4
- GLB, reusable entity type, flight physics, an instrumented cockpit and a chase camera.
5
-
6
- Use the **P-51 Mustang** or **OH-6** buttons to visit the practice airfield, then press **E** to
3
+ The world explorer includes 53 aircraft: the P-51D Mustang, OH-6 interpretation, Bendy Small Airliner
4
+ and fifty additional real-type interpretations. Each has an editable GLB, reusable entity type,
5
+ flight physics, an instrumented cockpit and a chase camera. The additions include ten helicopters,
6
+ ten general aviation aircraft, ten fighters, five cargo transports, the MV-22B Osprey, AV-8B Harrier
7
+ and thirteen utility, regional, historic and business aircraft. All use clean configurations without
8
+ external weapons.
9
+
10
+ Use the **P-51 Mustang**, **OH-6** or **Bendy Small Airliner** buttons to visit the practice airfield, then press **E** to
7
11
  board. The aircraft buttons also work from the example hub's world view. A direct link can use
8
- `?aircraft=p51d` or `?aircraft=oh6`. See [Vehicle interiors and instruments](vehicle-interiors.md)
12
+ `?aircraft=p51d`, `?aircraft=oh6` or `?aircraft=airliner`. The **Aircraft catalog** selector visits
13
+ the additional models; direct links also accept suffixes such as `?aircraft=uh_1h`,
14
+ `?aircraft=f_16b`, `?aircraft=c_17a` and `?aircraft=mv_22b`.
15
+ The three original practice models load initially. Additional GLBs load on selection, with one
16
+ additional request in flight and intermediate selections coalesced. Replacing a selection releases
17
+ its model and ECS entity; an occupied aircraft is retained. The host's content-pack byte cache
18
+ still follows its own cache budget. The catalog does not download all fifty new models on entry.
19
+ See [Vehicle interiors and instruments](vehicle-interiors.md)
9
20
  for cockpit source files, per-model instrument bindings and the shared exterior/seated GLB
10
21
  contract.
11
22
 
12
- The practice airfield is a raised 900-meter runway and helipad near the initial camera position.
23
+ The practice airfield is a raised 4,500-meter runway and helipad near the initial camera position.
13
24
  Its foundation clears streamed buildings; it is a fictional practice location, not a mapped airport.
14
- Both aircraft stay in the ECS and retain their position throughout the session, across terrain
25
+ The aircraft stay in the ECS and retain their position throughout the session, across terrain
15
26
  streaming and floating-origin changes. Reloading starts a fresh session.
16
27
 
17
28
  ## Controls
@@ -20,13 +31,14 @@ streaming and floating-origin changes. Reloading starts a fresh session.
20
31
  | --- | --- |
21
32
  | E | Board, or exit after landing, stopping and engine shutdown |
22
33
  | I | Start/stop engine; allow the propeller or rotor to spool |
23
- | Shift / Ctrl | Increase/decrease throttle (Mustang) or collective (OH-6); holds its setting on release |
34
+ | Shift / Ctrl | Increase/decrease throttle or helicopter collective; fighter afterburners engage above 85% throttle |
24
35
  | W / S | Nose down / nose up |
25
36
  | A / D | Bank left / right; helicopter cyclic |
26
37
  | Q / Z | Left / right rudder or anti-torque pedals; ground steering in the Mustang |
27
38
  | Space | Wheel brakes |
28
- | G | Retract/extend Mustang gear while airborne |
29
- | F | Toggle Mustang flaps |
39
+ | G | Retract/extend airplane gear while airborne |
40
+ | F | Toggle airplane flaps |
41
+ | J | Cycle powered-lift lever: forward, 22.5°, 45°, 67.5°, vertical; Osprey/Harrier only |
30
42
  | V | Cockpit / chase |
31
43
  | Mouse | Look around the cockpit |
32
44
  | R | Recover at the airfield after an impact |
@@ -56,9 +68,28 @@ cyclic inputs tilt rotor thrust to travel. Lower collective gently to land. Swit
56
68
  and wait for the rotor to stop before exiting. An aircraft cannot be exited or switched to free
57
69
  flight while airborne. After an impact, R resets its aircraft state and places it on the airfield.
58
70
 
71
+ Bendy Small Airliner: the generic 39-meter twin uses the same airplane controls, with slower
72
+ responses and a lower load-factor limit than the Mustang. Its two independently named engines
73
+ use the jet thrust model, calibrated to a representative Mach 0.78 cruise. It is a fictional
74
+ aircraft. The flight deck has an animated yoke; its display
75
+ markings are decorative, while live flight readings come from the HUD. Board at the forward
76
+ entry point. Its larger footprint needs substantially more runway and clearance.
77
+
78
+ Osprey and Harrier: use J to select vertical thrust (the parked Osprey starts there), allow the nacelles/nozzles to
79
+ reach 90°, start the engine and increase power smoothly. W/S, A/D and Q/Z provide powered pitch,
80
+ roll and yaw control in a hover. Transition toward forward thrust gradually while gaining airspeed;
81
+ the nacelles take 12 seconds for full travel and Harrier nozzles take 3. These are simplified
82
+ powered-lift dynamics, with finite travel, vertical thrust, engine-dependent hover authority and
83
+ airspeed blending. They do not simulate a real conversion corridor, transmission cross-shaft,
84
+ vortex-ring state, hot-gas ingestion or a certified nozzle schedule. Fixed landing gear remains
85
+ down regardless of G. Cargo aircraft have larger clearance and runway requirements.
86
+
59
87
  Cockpit needles show airspeed, altitude, heading, vertical speed and RPM; the artificial horizon
60
88
  banks with the aircraft. The HUD supplies precise knot/feet/feet-per-minute readings, AGL height,
61
- g load, power, engine/gear/flap state, stall alerts and terrain waiting status. Propellers, both helicopter
89
+ g load, power, engine/gear/flap state, stall alerts and terrain waiting status. It distinguishes
90
+ KTAS from equivalent airspeed (KEAS), shows local Mach and afterburner percentage, and flags
91
+ airframe/surface overspeed and developed departures. KEAS is not calibrated indicated airspeed.
92
+ Propellers, both helicopter
62
93
  rotors, controls, gear, flaps, ailerons, elevators and rudder animate from simulation state. The
63
94
  Mustang's gear takes 12 seconds: its inner wheel doors open, each main leg swings inboard into a
64
95
  well in the wing root, the tail wheel folds forward into the fuselage, and the doors close behind
@@ -66,11 +97,12 @@ them. Its flaps take 13 seconds to run down to 50°.
66
97
 
67
98
  ## Reuse in another experience
68
99
 
69
- Both aircraft ship in the `molen.entities` content pack, with their type documents and models.
100
+ All 53 aircraft are registered in the `molen.entities` content pack, with their type documents and models.
70
101
  `npx molen pack fetch https://molen.dev/packs/index.json molen.entities` downloads it and lists it
71
102
  in your project.json `packs`, and the CLI then resolves the types; in a browser, open it with `openPack` from `@bendyline/molen-pack` and pass
72
103
  `createPackSet([pack]).assetProvider()` as the client's asset provider. The entity type IDs and
73
- glTF refs are `molen.entities.aircraft.p51d` and `molen.entities.aircraft.oh6`. Fly both in
104
+ glTF refs are `molen.entities.aircraft.p51d`, `molen.entities.aircraft.oh6` and
105
+ `molen.entities.aircraft.airliner`. Fly them in
74
106
  [World Explorer](https://molen.dev/play/world-explorer/) to see the finished integration.
75
107
 
76
108
  These are not kernel presets. Each type document contains the concrete aircraft's mass and center
@@ -106,11 +138,20 @@ ownership of a loaded GLB and animates the nodes named by `spec.visual` from air
106
138
  exterior moving parts as [model-signal bindings](vehicle-interiors.md#exterior-animation), with
107
139
  keyframed curves so one gear position can sequence doors and legs.
108
140
 
141
+ For powered lift, declare `spec.poweredLift` with positive `transitTime`, `controlFadeSpeed`,
142
+ `pitchAuthority`, `rollAuthority`, `yawAuthority` and `damping`, and mark the participating
143
+ forward-facing engine installations `vectored: true`. `aircraftInput.thrustVector` is 0–1;
144
+ `aircraftState.thrustVectorPosition` is its actual actuator position. The model signal
145
+ `thrustVector` follows that position, so visuals and forces remain synchronized. Thrust rotates
146
+ from local +Z to +Y; off-center engines generate moments. Hover controls require available
147
+ engine thrust and fade with axial airspeed. `spec.airplane.fixedGear` keeps fixed undercarriage
148
+ extended independently of the pilot's selection.
149
+
109
150
  The deterministic airplane solver is a six-degree-of-freedom rigid body. The transform's
110
151
  quaternion is the attitude, with no pitch or bank stops, so loops, rolls, inverted flight and
111
152
  spins follow from the forces; `aircraftState.yaw`, `pitch` and `roll` report that attitude (roll
112
153
  is ±π inverted). Forces are lift, induced/profile/gear/flap drag, side force, propeller thrust
113
- and gravity at the center of mass, from wind-relative airflow and air density. Moments are
154
+ or jet thrust and gravity at the center of mass, from wind-relative airflow and air density. Moments are
114
155
  angle-of-attack (pitch) and weathercock (yaw) stability, roll, pitch and yaw damping, dihedral
115
156
  effect, roll from yaw rate, inertia coupling, asymmetric thrust, and, scaled by
116
157
  `propellerEffects`, propeller torque, P-factor and slipstream yaw, and gyroscopic precession.
@@ -120,7 +161,68 @@ Stall depends on wing incidence, including camber, rather than a fixed true-airs
120
161
  Separated flow progressively loses lift and control authority, adds drag, breaks the nose toward
121
162
  attached flow, and loses roll damping so yaw drops a wing. Lift remains perpendicular to airflow.
122
163
  Elevator and rudder retain limited propwash authority at low speed. Throttle controls shaft
123
- power with a transient RPM spool limit, avoiding a second steady power penalty from RPM.
164
+ power for propellers and dry/reheat thrust for jets, with a transient RPM spool limit.
165
+
166
+ ### Propulsion, altitude and performance
167
+
168
+ All 53 shipped aircraft have separate performance profiles. `engine.propulsion: 'propeller'`
169
+ uses shaft power, propeller efficiency and an altitude lapse, with `ratedDensityRatio` representing
170
+ supercharging or flat rating. `'jet'` uses `dryThrust` in newtons, density lapse and a Mach-dependent
171
+ ram term. `afterburnerThrust` is total augmented thrust per engine. The last 15% of throttle
172
+ commands reheat by default (`afterburnerDetent: 0.85`); it takes 0.6 seconds to light fully after
173
+ the engine reaches operating RPM. Engine failure or cutoff extinguishes it. Ordinary turbofans
174
+ and the Harrier have no afterburner. Omitting `propulsion` retains legacy constant-power behavior.
175
+
176
+ The atmosphere has standard temperature lapse layers, including the tropopause; sound speed
177
+ therefore changes with altitude. Wind-relative TAS drives forces; `equivalentAirspeed` is
178
+ `TAS * sqrt(density / 1.225)` and `mach` uses local sound speed. `criticalMach` and `waveDrag`
179
+ add a continuous transonic drag rise. Ground effect reduces induced drag near the surface.
180
+ `maxMach`, `maxEquivalentAirspeed`, `gearLimitSpeed` and `flapLimitSpeed` set overspeed alerts;
181
+ they do not impose a velocity cap or silently break the airframe. Surface limits are EAS
182
+ approximations, not exact POH calibrated-airspeed limits. Flap input can be a boolean or a
183
+ fraction from 0 to 1, allowing intermediate settings through commands.
184
+
185
+ The F-14 profile has an empirical high-alpha departure model: directional stability fades,
186
+ rudder/elevator authority is blanked, aileron response can reverse, and yaw autorotation can
187
+ sustain a flat spin. A symmetric stall does not receive an arbitrary spin direction. The
188
+ torque-free angular integrator preserves rotational energy through rapid rotations. NASA's
189
+ [F-14 model research](https://www.nasa.gov/pdf/601262main_ModelingFlight-ebook.pdf), especially
190
+ printed pages 126–127, supports these mechanisms; it does not supply a validated F-14D
191
+ coefficient set. This model does not reproduce the F-14A's TF30 compressor stalls, the later
192
+ digital flight-control system, or automatic variable wing sweep aerodynamics.
193
+
194
+ Helicopters retain assisted cyclic and collective controls. An actuator-disc power budget limits
195
+ lift by installed shaft power, induced power, rotor profile losses and parasitic drag power;
196
+ increasing payload cannot create extra engine power. Their calibrated parasitic drag,
197
+ density-dependent lift, ground effect and translational lift are supplemented by optional
198
+ vortex-ring lift loss in powered, slow descent and retreating-blade lift loss above an authored
199
+ equivalent speed. These are qualitative approximations, not blade-element models or an
200
+ autorotation training model. Powered-lift conversion has the separate limitations described above.
201
+
202
+ ### Headless fleet experiments
203
+
204
+ In the engine repository, build the packages before running the graphics-free harness:
205
+
206
+ ```sh
207
+ pnpm aircraft:bench --flight --check --out=.artifacts/aircraft-performance.json
208
+ pnpm aircraft:bench --id=f-14d --json
209
+ ```
210
+
211
+ The harness uses the production kernel. It solves steady lift/thrust/drag balance, sweeps five
212
+ altitudes, and runs three-minute controlled flights from 85% of each reference speed. It reports
213
+ multiple equilibrium branches rather than assuming a supersonic branch can always be reached.
214
+ The fleet unit suite also checks a withheld DA42 cruise point, F-22 dry supercruise, dirty
215
+ configuration, hot air, uniform-wind invariance and timestep convergence. Kernel tests exercise
216
+ spin symmetry, energy conservation, engine failures and reheat transients.
217
+
218
+ Reference conditions and provenance live in the
219
+ [performance ledger](https://github.com/bendyline/molen/blob/main/content/entities/source/aircraft-performance.json).
220
+ Published cruise, maximum and operating speeds are different quantities. Where a source does
221
+ not specify weight, altitude or throttle, the test condition is explicitly estimated. Some
222
+ aircraft still have engineering-estimate anchors. Passing a fitted anchor establishes internal
223
+ consistency, not independent real-world validation. All polar, lapse and high-alpha coefficients
224
+ remain approximations. Fuel burn, stores, changing mass/CG, detailed engine maps, icing,
225
+ structural failures and certified flight-control laws are not modeled.
124
226
 
125
227
  Flight assistance is limited to the pitch axis, so a keyboard can fly it. The stick moves an
126
228
  elevator (deflecting at `pitchResponse` per second and springing back four times faster) that
@@ -257,8 +359,8 @@ setAircraftEngineFailed(world, 'twin', 'left', false); // explicit repair
257
359
  `setAircraftEngineFailed` returns false for an unknown aircraft or engine. A failure immediately
258
360
  removes powered thrust and lets that propeller spool down; pilot throttle/switch input cannot
259
361
  repair it. Failure triggers belong to the experience (for example a damage or training command).
260
- The shipped world explorer still has its two single-engine aircraft and common controls; this
261
- API does not add a twin-engine model, failure key or automatic random failures.
362
+ The world explorer supplies common engine controls; failure scenarios are authored through
363
+ this API, without automatic random failures.
262
364
 
263
365
  `aircraftState.engines[id]` stores `rpm`, `rotorAngle`, `failed` and current `thrust` in newtons.
264
366
  The solver initializes missing engine state from the legacy RPM/phase, then the per-engine state
@@ -267,9 +369,9 @@ follows the first engine. Set `visual.rotors[].engine` to animate independent pr
267
369
  bindings retain the common phase. Body rates, trim, all engine state and input overrides survive
268
370
  keyframes/replay and pause at terrain gaps. Boarding and exit checks consider every engine.
269
371
 
270
- This extension models propeller thrust imbalance as a yaw moment. It does not add pitch or roll
271
- moments from the thrust line, feathering, windmilling drag or a calibrated minimum-control-speed
272
- envelope; propeller torque, P-factor and precession come from `propellerEffects` above. Helicopters continue to use
372
+ This extension models thrust imbalance and, for vectored engines, pitch and roll moments from
373
+ the thrust line. Feathering, windmilling drag and a calibrated minimum-control-speed envelope
374
+ are not included; propeller torque, P-factor and precession come from `propellerEffects` above. Helicopters continue to use
273
375
  one `engine` driving the shared rotor; multiple turbines feeding a common gearbox require a
274
376
  different shaft-power model and are not represented by independent propeller engines.
275
377
 
@@ -289,7 +391,7 @@ collides with terrain. Do not add a second physics body that also writes the air
289
391
 
290
392
  This is a game flight model with recognizable polygonal aircraft, not a full aircraft systems
291
393
  simulation or a calibrated replica of any airplane's handling. Rotor blade-element aerodynamics,
292
- autorotation, vortex-ring state, a calibrated spin model, fuel, automatic engine damage, detailed
394
+ autorotation, a quantitatively validated spin model, fuel, automatic engine damage, detailed
293
395
  avionics and weapons are outside this implementation. Cockpit switches and pedals are visual details; the listed input
294
396
  controls operate the simulated systems. Collision uses coarse airframe probes and resident world
295
397
  geometry; it does not model deformation or distant unloaded obstacles.
@@ -307,11 +409,9 @@ power, configuration drag, stall recovery from either bank direction, coordinate
307
409
  unpowered energy loss, wind equivalence and 30/60/120 Hz consistency.
308
410
  `packages/kernel/test/aircraft-dynamics.test.ts` covers full rolls, loops and the load-factor
309
411
  limit, flight-path hold, trimmed launches, propeller swing and crosswind on the takeoff roll,
310
- and turbulence that matches across host rates and keyframes. In calm air at 1,000 m,
311
- starting at 60 m/s and using a test pilot to hold altitude for 120 seconds, the tuned Mustang
312
- reaches approximately 311 knots at full throttle, 262 knots at 65% throttle, and 203 knots with
313
- gear and flaps extended. These are simulation regression targets, not a certified performance
314
- chart or an altitude-hold feature available to the player.
412
+ and turbulence that matches across host rates and keyframes. Current fleet calibration targets
413
+ and their evidence are recorded in the performance ledger above. The test pilot's altitude
414
+ hold is a harness feature, not a player control or a certified performance chart.
315
415
 
316
416
  `packages/kernel/test/aircraft-engines.test.ts` covers symmetric two/four-engine layouts,
317
417
  mirrored engine failures, counter-rudder, thrust moment arms, independent switches/spool,
@@ -70,14 +70,15 @@ is the road surface height.
70
70
  | `stations[]` | `id`, `at: [x, z]`, `kind` (`rail`, `bus` or `ferry`), `dwell` in seconds. Trains stop at the rail station nearest their track |
71
71
  | `signals[]` | `at: [x, z]` and `kind`. A `light` signalises the junction nearest the point. A `stop` or `yield` sign makes the arm it stands on give way |
72
72
  | `aerodromes[]` | `id`, `at: [x, z]`, `heading`, `length`. Some aircraft fly its approach and departure |
73
- | `drivingSide` | `right` (default) or `left` |
73
+ | `drivingSide` | `right` (default) or `left`; individual `ways[].drivingSide` can override it |
74
74
  | `sidewalks` | Infer walk lanes along streets that have no mapped path nearby (default false) |
75
75
 
76
76
  The network is built into a lane graph when it is added:
77
77
 
78
78
  - **Lanes.** A way carries `lanes` in total, split between directions (all forward when `oneway`).
79
79
  Without `lanes`, the count follows the width. Lanes sit to the right of travel for right-hand
80
- traffic.
80
+ traffic and to the left for left-hand traffic. One-way point order is unchanged; only lateral
81
+ lane order and turn permissions mirror. Mixed-side networks retain each road's rule on export.
81
82
  - **Junctions.** Ways that share a point, cross, or end on another way at the same `layer` are
82
83
  joined. Different layers, and bridges over roads, never connect mid-way. Each lane gets a curved
83
84
  connector to every exit it may take, and movements that cross each other take turns.
@@ -305,7 +306,13 @@ const view = await mountEarthView({
305
306
  trafficButton.onclick = () => view.setAmbientEnabled(!view.ambientEnabled);
306
307
  ```
307
308
 
308
- `density` scales how busy the streets are, from 0 to 1. `cars`, `pedestrians`, `rail`, `aircraft` and `boats` switch classes, and `drivingSide` sets the side of the road. `ambient: false` turns the
309
+ `density` scales how busy the streets are, from 0 to 1. `cars`, `pedestrians`, `rail`, `aircraft` and `boats` switch classes.
310
+ Earth resolves driving side from its road-sign country atlas at each terrain tile's centre,
311
+ including Japan, Australia and other left-driving regions. The same rule places road markings,
312
+ signals and signs. `drivingSide` explicitly overrides this selection; missing geographic content
313
+ defaults to right. Custom hosts pass `drivingSideAt` to `EarthAmbient`, or `drivingSide` on each
314
+ `AmbientTileInput` to a streamed network. Water traffic still keeps starboard.
315
+ `ambient: false` turns the
309
316
  layer off entirely. `stats().ambient` reports the counts on screen and the tiles in use.
310
317
 
311
318
  The quality tier caps the numbers:
@@ -384,7 +391,9 @@ and `cars` how many cars a train has.
384
391
  The `molen.entities` pack gives roles to its eleven road vehicles, a city bus, a light-rail car, an airliner
385
392
  the P-51 and OH-6 aircraft, and eight watercraft. See [Reusable entities](entities.md). Near the
386
393
  camera the Earth view draws cars, trains and vessels with their full models, painted in the
387
- agent's colour. Further
394
+ agent's colour. Their glazing (a transparent material named like `glass` or `glazing`) is tinted
395
+ dark and glossy, at least 62% opaque, so a passing car does not read as an open frame of pillars
396
+ and seats; a car the player drives keeps its authored glass. Further
388
397
  out, and without content, every vehicle is a proxy shape built from its dimensions.
389
398
 
390
399
  ## Water traffic
@@ -17,7 +17,7 @@ play without opening a browser.
17
17
  | `molen.audio.*` | scene scripts | `play`, `stop` and `music`, emitted as `audio.*` events |
18
18
  | `@bendyline/molen-client/audio` | the page | `createAudioLayer` loads banks and plays what the rules ask for |
19
19
 
20
- The `molen.sounds` content pack carries 63 CC0 sounds (ambience, vehicles, footsteps, impacts,
20
+ The `molen.sounds` content pack carries 165 CC0 sounds (ambience, vehicles, footsteps, impacts,
21
21
  foley, UI, stings and six music tracks). Fetch it into a project with:
22
22
 
23
23
  ```sh
@@ -203,10 +203,24 @@ Every game sample does exactly this in its `src/audio.ts`. Hosts without a Worke
203
203
  `setBusGain('music', 0)` drive a settings menu.
204
204
 
205
205
  `mountEarthView` plays the Earth soundscape on its own when its content includes the
206
- `molen.sounds` pack: weather and time-of-day ambience, footsteps in walk mode, traffic near
207
- streets, and engines on the cars and aircraft you board. Birds, crickets and traffic fade with
208
- height above the terrain, and traffic also fades with distance from the nearest street. Pass `audio: false` to turn it off, and
209
- use `view.audio` for volume. See [Earth view](earth-view.md).
206
+ `molen.sounds` pack: 88 recorded ambience beds and 12 walking surfaces, plus engines on the cars
207
+ and aircraft you board. Birds favor the morning; warm nights bring crickets/frogs and warm days
208
+ bring cicadas. Broad geographic palettes select local recordings. Wind and rain follow weather,
209
+ surf follows mapped ocean shores, rivers follow flowing water, and traffic follows streets.
210
+ Ground ambience requires a known terrain height and fades with altitude; enclosed cockpits attenuate the outdoors to 18%. Open
211
+ boats and exterior cameras retain outside ambience. Only one bed per category plays, with
212
+ staggered rotation and five-second crossfades. See [Earth view](earth-view.md) for host inputs.
213
+ Pass `audio: false` to turn it off, and use `view.audio` for volume.
214
+
215
+ Sound packs can also provide a `birdsong` document (`molen/earth-birdsong@1`). The default pack
216
+ contains eight CC0 regional recordings, selected by geography, observed habitat, calendar month
217
+ and local sunlight. Dawn choruses peak near sunrise, breeding songs quieten outside their authored
218
+ season, and uncovered places stay quiet. A catalog replaces broad bird palettes as well as the
219
+ legacy park chorus. Curated birds fade out inside enclosed vehicles. The catalog's bounds are
220
+ conservative playback areas,
221
+ not surveyed species ranges. Composing hosts pass `EarthAudioFrame.location` (latitude, longitude,
222
+ sky `utcMs` and `sunAltitudeDeg`) and `regionalAmbience.habitat`; the standard Earth view and
223
+ World Explorer supply these automatically, including changes to the sky date/time controls.
210
224
 
211
225
  ## Make your own sounds
212
226
 
@@ -145,9 +145,14 @@ and failures.
145
145
  Structure, furnishings and glass share materials across interiors. Four shared 256² detail maps
146
146
  supply wood grain/boards, ceramic grout, fabric weave and plaster grain, using metric UVs and
147
147
  mipmaps. These neutral maps combine with household vertex colors; no texture is allocated per
148
- building. Their fixed shared memory is separate from the resident geometry counter. Furniture is merged instead
148
+ building. Their fixed shared memory is separate from the resident geometry counter. Room surfaces
149
+ return under half the daylight that reaches them (a room sees only the sky its windows frame),
150
+ so from outside they read dimmer than the day, as real rooms do, not as pale smudges behind
151
+ the glass. Furniture is merged instead
149
152
  of spawning one scene object per shelf product. Ceilings use simple bright fixture geometry;
150
- there are no per-building dynamic lights or additional shadow maps. The walking octree uses
153
+ there are no per-building dynamic lights or additional shadow maps. Interior structure and the
154
+ opaque portal covers cast the sun's shadow like the walls around them (furniture and glass do
155
+ not), so a building's shadow stays solid where its windows line up. The walking octree uses
151
156
  the same published geometry, except that visible stair steps are skipped (`walkIgnore`) and
152
157
  a closed wedge supplies smooth stair collision. The published proxy is marked
153
158
  `walkCollisionOnly` and has rendering layers disabled. Hosts using the kernel buffers directly
@@ -135,7 +135,7 @@ Two constants live in `packages/kernel/src/version.ts` and they do different job
135
135
 
136
136
  | Constant | Today | Role |
137
137
  |---|---|---|
138
- | `ENGINE_VERSION` | `0.0.7` | metadata. Written into a keyframe's `engine` field so a save says which build wrote it. **Never compared on load, never hashed.** |
138
+ | `ENGINE_VERSION` | `0.0.8` | metadata. Written into a keyframe's `engine` field so a save says which build wrote it. **Never compared on load, never hashed.** |
139
139
  | `STATE_FORMAT` | `1` | the gate. Written into a keyframe under the reserved `plugins.$format` key, compared by `applyKeyframeTo`, and folded into `stateHash` as `stateFormat`. |
140
140
 
141
141
  So a release — even one that moves every package — keeps your keyframes
@@ -54,6 +54,8 @@ const director = new DioramaDirector({
54
54
  root: viewer.renderer.worldRoot,
55
55
  camera: viewer.renderer.camera,
56
56
  // assets: a host-owned AssetCache, when the scene uses glTF refs
57
+ // A large streamed world keeps the diorama's own lights out (see below).
58
+ localLights: false,
57
59
  }),
58
60
  onError: (error, id) => console.error(id, error),
59
61
  });
@@ -76,6 +78,10 @@ director.update(cameraPosition, elapsedSeconds, Date.now());
76
78
  director.dispose();
77
79
  ```
78
80
 
81
+ A diorama's point and spot lights light the host scene by default. In a large streamed world, pass
82
+ `localLights: false` (Earth hosts do): three compiles the scene's lights into every lit shader, so a
83
+ light that arrives and leaves with a diorama rebuilds every object in view in one frame.
84
+
79
85
  The loader is a host callback: use an allowlisted dynamic import, HTTP URL or your pack reader.
80
86
  The runtime never chooses content hosts. `loadDioramaScene` fetches the scene and relative `.js`
81
87
  scripts with the supplied AbortSignal. For `.ts`, use `molenScripts()` with a lazy `?raw` import