@bendyline/molen-tooling 0.0.3 → 0.0.4

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 (46) hide show
  1. package/README.md +4 -4
  2. package/dist/capture/harness.js +222 -222
  3. package/dist/capture/worldgen-preview.js +205 -205
  4. package/dist/cli.mjs +54 -2
  5. package/dist/docs-src/guide/aircraft.md +12 -0
  6. package/dist/docs-src/guide/ambient-life.md +389 -0
  7. package/dist/docs-src/guide/browser-mount.md +5 -0
  8. package/dist/docs-src/guide/capability-authoring.md +5 -0
  9. package/dist/docs-src/guide/determinism.md +24 -16
  10. package/dist/docs-src/guide/earth-view.md +60 -12
  11. package/dist/docs-src/guide/entities.md +8 -0
  12. package/dist/docs-src/guide/examples.md +4 -1
  13. package/dist/docs-src/guide/figures.md +3 -0
  14. package/dist/docs-src/guide/game-samples.md +1 -1
  15. package/dist/docs-src/guide/markers.md +4 -1
  16. package/dist/docs-src/guide/navigation.md +6 -0
  17. package/dist/docs-src/guide/surface-rendering.md +4 -3
  18. package/dist/docs-src/guide/terrain.md +7 -0
  19. package/dist/docs-src/guide/vehicles.md +14 -1
  20. package/dist/docs-src/llms.txt +7 -4
  21. package/dist/docs-src/schemas/README.md +1 -0
  22. package/dist/docs-src/schemas/components.md +530 -1
  23. package/dist/docs-src/schemas/scene.md +105 -0
  24. package/dist/docs-src/schemas/transport-network.md +351 -0
  25. package/dist/index.d.mts +44 -1
  26. package/dist/index.mjs +81 -4
  27. package/dist/{mcp-BTVwVKFb.mjs → mcp-BtuworIW.mjs} +22 -1
  28. package/dist/{ops-BPdHodFR.mjs → ops-DMGcWoL2.mjs} +290 -65
  29. package/dist/templates/city-courier/README.md +1 -1
  30. package/dist/templates/city-courier/delivery-run.replay.json +151 -151
  31. package/dist/templates/city-courier/gen/molen-types.ts +82 -2
  32. package/dist/templates/city-courier/package.json +1 -0
  33. package/dist/templates/city-courier/scene.json +99 -282
  34. package/dist/templates/city-courier/scripts/game.ts +2 -14
  35. package/dist/templates/city-courier/scripts/molen-scripts.d.ts +86 -13
  36. package/dist/templates/city-courier/src/worker.ts +3 -1
  37. package/dist/templates/city-courier/test/headless.test.ts +3 -2
  38. package/dist/templates/data-viz/README.md +1 -1
  39. package/dist/templates/index.json +19 -1
  40. package/dist/templates/skybound/gen/molen-types.ts +82 -2
  41. package/dist/templates/skybound/scripts/molen-scripts.d.ts +81 -1
  42. package/dist/templates/terrain-flyover/README.md +2 -2
  43. package/dist/templates/top-down-arena/README.md +1 -1
  44. package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +81 -1
  45. package/dist/templates/top-down-arena/src/gen/molen-types.ts +82 -2
  46. package/package.json +13 -12
@@ -5,7 +5,8 @@ composes:
5
5
 
6
6
  - streamed terrain from a `molen/terrain-package@1`;
7
7
  - worldgen buildings, street surfaces, trees and parked cars from content packs;
8
- - orbit, walk and drive navigation;
8
+ - traffic, pedestrians, trains and aircraft that come and go around the viewer;
9
+ - orbit, walk, drive and fly navigation, with cars and aircraft the host can put the viewer in;
9
10
  - markers placed by latitude/longitude;
10
11
  - sky, haze and adaptive quality.
11
12
 
@@ -55,7 +56,12 @@ reuses its filtered texture until lighting changes; camera movement does not reg
55
56
  Pass `reflections: false` for the legacy light-only appearance. A host-assigned
56
57
  `view.viewer.renderer.scene.environment` takes precedence if you supply your own HDR environment.
57
58
 
58
- `touchJoystickContainer` adds an on-screen movement stick while walking or driving. By default it
59
+ `style` sets the look: `sky.sunElevation` and `sky.sunAzimuth` (degrees; the azimuth is a
60
+ compass bearing, 0 north and clockwise) place the sun, and unless `environment.sun.direction` is
61
+ given the sunlight comes from the same point, so lit faces agree with the glow in the sky. `fog`,
62
+ `water`, `background` and the rest of `environment` (ambient light, tone mapping, exposure) follow.
63
+
64
+ `touchJoystickContainer` adds an on-screen movement stick while walking, driving or flying. By default it
59
65
  appears only on touch devices; pass `touchJoystick: 'always'` to show it everywhere.
60
66
 
61
67
  ## Modes
@@ -68,20 +74,44 @@ appears only on touch devices; pass `touchJoystick: 'always'` to show it everywh
68
74
  terrain, buildings and props, WASD or the touch stick to move, mouse-look with pointer lock, and
69
75
  Space to jump.
70
76
  - **drive**: while walking, press E (or `setMode('drive')`) next to a parked car to get in. W/S
71
- drive, A/D steer, Space brakes, V switches between cockpit and chase views, and E gets out. Cars
72
- come from the entities content pack. `message` events explain when entering or leaving is
73
- blocked, for example "Move closer to the door".
77
+ drive, A/D steer, Space brakes, V switches between cockpit and chase views, and E gets out. A car
78
+ at rest with no throttle holds itself, even on a slope. Cars come from the entities content
79
+ pack. `message` events explain when entering or leaving is blocked, for example "Move closer to
80
+ the door". From any mode, `setMode('drive', { vehicle: true })` puts the viewer in a car in the
81
+ nearest mapped road lane (or `vehicle: '<entity type id>'` for a particular car).
82
+ - **fly**: `setMode('fly')` starts an aircraft from the entities pack (the P-51D, or
83
+ `{ aircraft: 'molen.entities.aircraft.oh6' }` for the helicopter) already flying: engine
84
+ running, gear up, heading the way the view faced. From orbit it starts a little behind the view,
85
+ flying toward it, at a height matched to the orbit camera; `airborne: { altitude, speed }`
86
+ chooses meters above the ground and m/s, and `airborne: false` parks it on the ground with the
87
+ engine off. The `pilot` input profile flies it (see [navigation](navigation.md)); V switches
88
+ cockpit and chase views, R recovers after an impact (`view.recover()`), and E leaves once it
89
+ has landed, stopped and shut down. See [aircraft](aircraft.md) for the flight model.
90
+
91
+ Drive and fly need the ground under their start, and drive a road lane, so `setMode` switches at
92
+ once and boards when that has streamed in, keeping the orbit camera on the spot meanwhile. With no
93
+ lane after a few seconds the car takes the nearest open ground, never a roof, deck or catalogued
94
+ landmark. Leaving follows the vehicle's rules (stop, land, shut down); a host control such as a
95
+ mode menu passes `{ force: true }` to step out at once, which also removes a vehicle `setMode`
96
+ added.
97
+
98
+ `view.vehicleStatus()` describes the car or aircraft the viewer is in for a HUD: speed and
99
+ heading for a car; airspeed, altitude and height above ground, vertical speed, attitude, power,
100
+ engine, gear, flaps and stall/impact flags for an aircraft (SI units, compass radians).
101
+ `view.setThrottle(power)` sets an aircraft's throttle or collective from an on-screen lever.
74
102
 
75
103
  Listen for `modechange`. The input profile, clip planes and touch stick follow the mode
76
104
  automatically.
77
105
 
78
106
  ## Frames and long trips
79
107
 
80
- Heights stay in meters. Horizontal distances are exact at the frame latitude and drift by about
81
- 1–1.5% per degree away from it (see [terrain](terrain.md)). The view anchors its frame at the
82
- starting latitude. After a `flyTo` of more than about a degree north or south, or after panning
83
- that far, it re-anchors: it rebuilds the terrain stack in a new frame at the destination while
84
- keeping the viewer, input and markers. With `terrainSource`, a longitude-only trip also checks
108
+ Heights stay in meters. Horizontal distances are exact at the frame latitude and drift away from it
109
+ by about 1.75% × tan(latitude) per degree: 1% at 30°, 1.5% at 40°, 2% at Seattle's 47.6°, 3% at 60°
110
+ (see [terrain](terrain.md)). The view anchors its frame at the starting latitude. After a `flyTo`
111
+ of more than about a degree north or south, or after panning that far, it re-anchors: it rebuilds
112
+ the terrain stack in a new frame at the destination while keeping the viewer, input and markers.
113
+ Walking, driving and flying keep their frame, so a long flight north or south slowly stretches
114
+ distances by the same rule; return to orbit to re-anchor. With `terrainSource`, a longitude-only trip also checks
85
115
  the destination's terrain region. `stats().frameLatitude` reports the current anchor.
86
116
 
87
117
  ## Content and packages
@@ -157,6 +187,24 @@ for `terrainchange` to refresh an attribution panel when the package changes. Di
157
187
  completed flights resolve the destination immediately; manual panning rechecks the host source
158
188
  after about five kilometers. A second jump while a region is loading follows the latest target.
159
189
 
190
+ ## Ambient life
191
+
192
+ Cars drive the mapped roads, pedestrians walk the footways, trains run the railways and aircraft
193
+ pass overhead. They appear out of sight around the viewer and leave once it moves on. The layer is
194
+ on by default:
195
+
196
+ ```ts
197
+ const view = await mountEarthView({ canvas, terrain, content, camera, ambient: { density: 0.4 } });
198
+ view.setAmbientEnabled(false);
199
+ ```
200
+
201
+ `density` runs from 0 to 1 (default 0.6). `cars`, `pedestrians`, `rail` and `aircraft` switch a
202
+ class off, and `ambient: false` removes the layer. The quality tier caps how many agents run and
203
+ how many cars get full models. With the entities pack in `content`, vehicles use its car, bus,
204
+ light-rail and airliner models near the camera. The car you drive stops against ambient traffic,
205
+ and traffic waits for it. See [Ambient life](ambient-life.md) for the tier table and how the
206
+ simulation works.
207
+
160
208
  ## Geographic structures and regional styles
161
209
 
162
210
  The Earth pack may provide a `molen/structure-placements@1` document. Each record binds a
@@ -439,6 +487,6 @@ same soundscape for a host that composes its own view. See [Sound and music](aud
439
487
  rule format.
440
488
 
441
489
  The composing pieces are exported too, for hosts that build their own view: `createEarthWorldgen`,
442
- `EarthVehicles`, `createEarthSky`/`createEarthFog`, `createEarthAudio`, `earthPerformanceTier` and
443
- `earthCredits`.
490
+ `EarthVehicles`, `EarthAmbient` with `observeSemanticTiles`, `createEarthSky`/`createEarthFog`,
491
+ `createEarthAudio`, `earthPerformanceTier` and `earthCredits`.
444
492
  The [World Explorer](https://molen.dev/play/world-explorer/) sample is built from them.
@@ -56,3 +56,11 @@ sidecar, types document, project, or gallery scene is stale.
56
56
  `molen.entities.aircraft.p51d` and `molen.entities.aircraft.oh6` add the Mustang and OH-6
57
57
  helicopter, including GLBs, flight components and pilot seats. The pack's asset provider
58
58
  serves them like any other model. See [Aircraft](aircraft.md) for world-view controls, physics and integration.
59
+
60
+ ## Transit and background traffic
61
+
62
+ `molen.entities.transit.bus` is a 12 m city bus, `molen.entities.transit.lightrail` a 27 m
63
+ two-section light-rail car, and `molen.entities.aircraft.airliner` a narrow-body airliner. They are
64
+ models for background traffic, not mountable vehicles. [Ambient life](ambient-life.md) spawns them
65
+ through their `ambientRole` component, as it does the pack's five cars and the two aircraft above.
66
+ In the engine repository, `content/entities/scenes/transit.scene.json` shows them side by side.
@@ -5,7 +5,7 @@ meant to be copied. Three ways in, none of which needs a clone of the engine rep
5
5
 
6
6
  - **Play** any sample in the browser at [molen.dev/play](https://molen.dev/play/).
7
7
  - **Copy** a sample into your own npm project with `--template`. The templates ship inside
8
- `@bendyline/molen-tooling`, locked to the engine version you install, so they work offline:
8
+ `@bendyline/molen-tooling`, locked to the package versions released with that CLI, so they work offline:
9
9
 
10
10
  ```sh
11
11
  npx @bendyline/molen-tooling new my-game --template skybound
@@ -65,6 +65,9 @@ reference for streaming and for a glTF asset pipeline, so read them on GitHub.
65
65
  adapter and region atlas; `/client` terrain tile renderers.
66
66
  - **Figures** (`@bendyline/molen-figures`): `/kernel` descriptors, rigs, gaits, `figureState`,
67
67
  sockets and attachments; `/client` the `figure` renderable kind (procedural skinned bodies).
68
+ - **Ambient life** (`@bendyline/molen-ambient`): `/kernel` transport networks, the spawn ring and
69
+ NPC cars, pedestrians, trains and aircraft; `/client` instanced vehicle proxies, pooled models
70
+ and pedestrian figures. See [ambient life](ambient-life.md).
68
71
 
69
72
  ## Start from scratch
70
73
 
@@ -111,6 +111,9 @@ State is written only when something changes: speed is quantized to 0.05 m/s, th
111
111
  anchored to a tick, so a steadily walking figure sends no deltas. `figureIntent.mode` forces a
112
112
  mode; `lookAt` aims the head at a point or an entity.
113
113
 
114
+ Pedestrians in [ambient life](ambient-life.md) are figures moved this way: the ambient kernel
115
+ writes their transform along footways and `speedSource: 'transform'` animates the gait.
116
+
114
117
  ## Sockets and attachments
115
118
 
116
119
  Sockets are named points on the rig, evaluated under the current pose. An entity with
@@ -7,7 +7,7 @@ restart, and a tested win condition.
7
7
 
8
8
  | Sample | Play | Loop | Engine services |
9
9
  |---|---|---|---|
10
- | City Courier | [molen.dev/play/city-courier](https://molen.dev/play/city-courier/) | Five deliveries, traffic, damage and a time limit | XZ kinematics, hierarchy, follow camera |
10
+ | City Courier | [molen.dev/play/city-courier](https://molen.dev/play/city-courier/) | Five deliveries, traffic, damage and a time limit | XZ kinematics, hierarchy, follow camera, ambient traffic |
11
11
  | The Lantern Vault | [molen.dev/play/lantern-dungeon](https://molen.dev/play/lantern-dungeon/) | Key, melee combat, healing, gate and relic | XZ kinematics/raycast, seeded RNG, hierarchy, tween, local follow camera |
12
12
  | Skybound | [molen.dev/play/skybound](https://molen.dev/play/skybound/) | Islands, seeds, stomps, hazards, checkpoint and finish | XY platform controller, hierarchy, world follow camera |
13
13
 
@@ -3,7 +3,10 @@
3
3
  `@bendyline/molen-client/markers` draws screen-sized billboards pinned to world positions: photo
4
4
  pins, labels you render to images, waypoints. A marker keeps a constant on-screen size. It sits on
5
5
  the ground, re-snapping as finer terrain streams in, hides behind hills and buildings through the
6
- depth test, and can fade with distance. Markers are budgeted so the nearest or most important ones
6
+ depth test, and can fade with distance. With `declutter: true` a pin whose on-screen footprint
7
+ overlaps a more important one is hidden: higher `priority` first, then pins already on screen (so
8
+ they do not flicker as the camera moves), then the nearest. The Earth view declutters its markers. They ignore the scene's fog, so distance haze never washes a
9
+ pin into a blank card; the layer's own `fade` handles distance. Markers are budgeted so the nearest or most important ones
7
10
  draw, and `pick(x, y)` resolves a click or tap to a marker id.
8
11
 
9
12
  ```ts
@@ -114,6 +114,12 @@ Default profiles come from `navigationInputProfiles()`:
114
114
  |---|---|---|
115
115
  | `orbit`, `fly` | WASD/arrows move, Q/E down/up, Shift sprint | left stick move, right stick look, bumpers up/down |
116
116
  | `walk`, `drive` | WASD/arrows move, Space jump/brake, E or F interact, V view, Shift sprint | left stick move, right stick look, A jump, X interact, Y view |
117
+ | `pilot` | W/S or ↑/↓ nose down/up, A/D or ←/→ bank, Q/Z rudder, Shift/Ctrl (or +/−, Page Up/Down) power, I engine, G gear, F flaps, R recover, Space brake, V view, E exit | left stick pitch/bank, right stick look, triggers power, bumpers rudder, A brake, B engine, X exit, Y view |
118
+
119
+ In the `pilot` profile each `NavigationInput` also carries `pilot`: the held `throttle` and `yaw`
120
+ axes (-1..1) and edge-triggered `engine`, `gear`, `flaps` and `recover` presses. Pitch is
121
+ `-move.forward` and bank is `move.right`, so the touch stick flies too; hold-to-throttle buttons
122
+ can drive `NAVIGATION_ACTIONS.throttleUp`/`throttleDown` with `input.map.setVirtual(...)`.
117
123
 
118
124
  Call `input.setProfile(mode)` when navigation changes. The walk profile also turns on pointer lock
119
125
  for mouse-look, with drag-look as the fallback when pointer lock is declined. Replace any profile
@@ -144,7 +144,8 @@ and explicit `width`. Properties absent from the source use class-based defaults
144
144
  omitted; bridges and differing layers do not form surface junctions. Bridge ribbons retain the
145
145
  existing approximate terrain-relative elevation; this renderer does not build engineered bridge
146
146
  decks. Crossing paint, inferred sidewalks, signal placement and parking occupancy are decorative,
147
- not traffic-control or navigation data.
147
+ not traffic-control or navigation data. [Ambient life](ambient-life.md) builds its own lane graph
148
+ from the same features for NPC traffic.
148
149
 
149
150
  Ground surfaces render at all available semantic levels. Fine markings and fixtures default to
150
151
  the finest pyramid level; `detailLevelsBelowMax` extends them to coarser levels. Fixture/car and
@@ -199,5 +200,5 @@ For a utility corridor, use narrow elevated bands and widely spaced pole repeate
199
200
  width across the route, height, and length along it. Band `dash: [length, gap]` and `phase` use
200
201
  world units along the path; callers can carry phase across tile fragments when their source
201
202
  provides route chainage. `terrainLinePath` and `sampleTerrainLine` are exported for custom
202
- attachment/model placement. Railway switches, wire sag, traffic simulation, and route-level
203
- cross-tile topology are separate consumers of this foundation.
203
+ attachment/model placement. Railway switches, wire sag and route-level cross-tile topology are
204
+ separate consumers of this foundation, and traffic simulation is [ambient life](ambient-life.md).
@@ -345,6 +345,13 @@ they share one `features` PMTiles sidecar. When both sections reference one MVT
345
345
  renderer layers share one in-flight range read and full decode; decoded semantic documents are not
346
346
  retained as a second long-lived cache.
347
347
 
348
+ Polygonal water is flat: a lake's level is the lower quartile of the elevation inside it, so shore
349
+ samples cannot lift it onto its banks. For projected Earth, pass `seaLevel` in the mesh options
350
+ (the Earth view does): water whose floor reaches within 2 m of it is the sea, a harbor or a tidal
351
+ river, and draws at one level 1.5 m above sea level in every tile. Coastal elevation is noisy
352
+ around zero and bathymetry differs from tile to tile, so a sampled level would let the ground poke
353
+ through and step at tile seams.
354
+
348
355
  The opposite split works too: when the terrain refines past a sidecar's last level (a zoom-13 vector
349
356
  archive under zoom-14 elevation), the finer tiles overzoom the sidecar's finest tiles by default.
350
357
  `overzoomTerrainSemanticTile` rescales an ancestor's normalized geometry onto the descendant, clips
@@ -77,7 +77,9 @@ fixtures and buildings. Terrain gaps pause motion; abrupt steps and slopes above
77
77
  the car. Cockpit views use the full chassis quaternion; chase views shorten at obstructions.
78
78
 
79
79
  This is a grounded driving foundation. It does not implement rigid-body rollovers, crash deformation,
80
- traffic AI, passenger animation, multiplayer ownership, or disk persistence. Without collision hooks,
80
+ passenger animation, multiplayer ownership, or disk persistence. Background traffic is a separate
81
+ package: [ambient life](ambient-life.md) moves NPC cars along lanes without this solver, and they
82
+ stop for a car someone is driving. Without collision hooks,
81
83
  the reusable kernel solver supplies terrain driving only. Do not attach a second physics body to the
82
84
  same vehicle; the vehicle solver owns its transform.
83
85
 
@@ -85,6 +87,17 @@ All durable simulation state and mount relationships live in ECS components and
85
87
  and replay. Install the same systems/environment when restoring. Host streaming and render resources
86
88
  are separate from those checkpoints.
87
89
 
90
+ ## In an Earth view
91
+
92
+ `mountEarthView` drives the parked cars its street surfaces place, and can add one:
93
+ `view.setMode('drive', { vehicle: true })` puts the viewer in a car in the nearest mapped road
94
+ lane. `EarthVehicles` exposes the pieces for hosts that compose their own view: `spawn(kind,
95
+ position, yaw)` at an exact spot, `spawnNear(kind, x, z, yaw, { avoid })` on the nearest open
96
+ ground (under open sky, never a roof or deck), `board(id)` without walking to the door, and
97
+ `release()` to step out at once. A standing spawned car settles onto finer terrain as it streams
98
+ in. The entity's `vehicle.color`, when set, paints the model's `paintMaterial`; without one the
99
+ authored paint stays.
100
+
88
101
  ## Engine sound
89
102
 
90
103
  Every `molen.entities` vehicle type carries an `audioSource`: the compact, sedan and SUV run
@@ -4,7 +4,7 @@
4
4
  > three.js rendering client, authored through JSON schemas, a small typed API, and a headless
5
5
  > dev loop. This bundle is version-locked to the engine release.
6
6
 
7
- Engine version: 0.0.3. three.js peer range: >=0.184.0 <0.187.0 (developed against 0.184.0). Node ≥ 22.13, ESM only.
7
+ Engine version: 0.0.4. three.js peer range: >=0.184.0 <0.187.0 (developed against 0.184.0). Node ≥ 22.13, ESM only.
8
8
 
9
9
  ## Start here
10
10
 
@@ -29,7 +29,7 @@ downloads them into a project and pins them in project.json.
29
29
  - [Input profiles and joysticks](guide/input.md): keyboard/controller remapping, raw axes, walking/driving/flying profiles, analog commands, and optional React controls.
30
30
  - [Camera navigation](guide/navigation.md): orbit, fly, walk (capsule collision against streamed geometry) and follow cameras for `createViewer` hosts; one input model across keys, gamepad, pointer gestures and an on-screen touch stick.
31
31
  - [World markers](guide/markers.md): screen-sized photo pins and labels pinned to world positions, ground-snapped, occluded, faded, budgeted and pickable.
32
- - [Earth view](guide/earth-view.md): `mountEarthView` from `@bendyline/molen-earth` — real-world terrain, buildings, orbit/walk/drive, drivable cars, lat/lon markers, credits and adaptive quality in one call.
32
+ - [Earth view](guide/earth-view.md): `mountEarthView` from `@bendyline/molen-earth` — real-world terrain, buildings, landmarks, orbit/walk/drive/fly (cars on the nearest road, airborne P-51 or OH-6), a `vehicleStatus()` HUD feed, decluttered lat/lon markers, credits and adaptive quality in one call.
33
33
  - [WebGPU and WebGL](guide/rendering-backends.md): the `backend` option ('auto' | 'webgl' | 'webgpu') on the asynchronous client factories, legacy WebGL fallback, compatible materials, and world-explorer comparisons.
34
34
  - [Earth and authored skies](guide/sky.md): day/night cycles, geographic Sun/Moon positions and lunar phases, catalog stars, simulation clocks, custom-world palettes, and the sky observatory.
35
35
  - [Weather and physical atmosphere](guide/weather.md): independent clouds, precipitation and visibility; profiles, temperature/pressure/wind for simulation and aircraft physics; cloud/rain/snow rendering.
@@ -54,6 +54,7 @@ downloads them into a project and pins them in project.json.
54
54
  - [Aircraft](guide/aircraft.md): P-51D and OH-6 assets, flight physics, cockpit instruments, practice airfield and controls.
55
55
  - [Vehicle interiors and model signals](guide/vehicle-interiors.md): model-owned cabins, declarative simulation-to-GLB bindings, script-owned telemetry, and nearby detail loading.
56
56
  - [Figures](guide/figures.md): stylized humans, bipeds and quadrupeds: presets and descriptors, canonical rigs and sockets, deterministic gaits, `figureAttachment` accessories, riders, and `molen figure preview`.
57
+ - [Ambient life](guide/ambient-life.md): NPC cars, pedestrians, trains and aircraft that spawn around an observer on a transport network (the scene `ambient` block, `molen/transport-network@1`, `molen.ambient.*`, the Earth view's `ambient` option, `ambientRole` content).
57
58
  - [Complete game samples](guide/game-samples.md): city driving, first-person dungeon, and platformer; shared follow cameras and XY platform physics.
58
59
  - [Samples gallery](guide/examples.md): every sample with its molen.dev/play link and `--template` id, plus the capability layers (kinematics,
59
60
  character, pathfinding, physics-rapier, terrain) — copy-and-modify starting points.
@@ -87,7 +88,8 @@ All formats carry a `"format": "molen/<kind>@<n>"` (or `"kind"`) envelope and ar
87
88
  with `molen validate <file>`, which prints precise, fixable errors. The shipped specs (JSON
88
89
  Schema + example, generated from the registry) live in [schemas/](schemas/README.md):
89
90
 
90
- - [Scene manifest](schemas/scene.md) (`molen/scene@3`: entities, prefabs, `commands`, `components`, camera, input, physics, terrain)
91
+ - [Scene manifest](schemas/scene.md) (`molen/scene@3`: entities, prefabs, `commands`, `components`, camera, input, physics, terrain, ambient)
92
+ - [Transport network](schemas/transport-network.md) (`molen/transport-network@1`: roads, railways and paths for ambient traffic)
91
93
  - [Command envelope](schemas/command.md) · [Assertions](schemas/assert.md)
92
94
  - [Keyframe](schemas/keyframe.md) · [Delta](schemas/delta.md) · [Replay](schemas/replay.md)
93
95
  - [Components](schemas/components.md) — every component with units and axis conventions
@@ -124,6 +126,7 @@ Schema + example, generated from the registry) live in [schemas/](schemas/README
124
126
  - `molen docs search <query> [-k N] [--design]` · `molen describe [op]`
125
127
  - `molen worldgen preview [style.json] [--pack p] [--style id] [--batch f] [--angles N] --out p.png` — generate buildings and render them headlessly · `worldgen bake [batch.json] [--outline "x,z;…" --style id] --out <assets-dir> [--id id]` — bake to a glTF asset + sidecar · `worldgen stats <terrain-package.json> [--tile z/x/y | --auto] [--dump batch.json]` — generate one real tile and report
126
128
  - `molen figure preview [descriptor.figure.json] [--preset id[,id]] [--lineup humans|bodies|species|all] [--mode idle|walk|run|sit|jump|fall] [--angles N|review] --out p.png` — render figures headlessly · `figure presets [--json]` — list the shipped presets
129
+ - `molen network bake <terrain-package.json> (--tile z/x/y [--radius N] | --bbox w,s,e,n) --out network.json [--classes road,rail,path] [--heights]` — bake mapped roads, railways and paths into a transport network for ambient traffic
127
130
  - `molen mcp` — start the MCP server (stdio)
128
131
 
129
132
  ## MCP tools (the server mirrors the CLI 1:1; `molen describe` cross-references both)
@@ -134,7 +137,7 @@ Schema + example, generated from the registry) live in [schemas/](schemas/README
134
137
  `check_types`, `reserve_type`, `generate_types`, `import_asset`, `inspect_asset`, `pack_asset`, `stage_assets`,
135
138
  `list_assets`, `drive_scene` (returns frames as IMAGES), `play_experience` (plays a built browser app and returns frames as IMAGES), `screenshot_asset` (turntable images),
136
139
  `test_types`, `worldgen_preview` (generated buildings as IMAGES), `worldgen_bake`, `worldgen_stats`,
137
- `figure_preview` (figures as IMAGES), `list_figure_presets`, `plan_audio`, `import_sound`, `check_soundbank`. Call `describe_op` for I/O contracts.
140
+ `figure_preview` (figures as IMAGES), `list_figure_presets`, `network_bake`, `plan_audio`, `import_sound`, `check_soundbank`. Call `describe_op` for I/O contracts.
138
141
 
139
142
 
140
143
  ## Design reference (for deeper questions; the historical design plan, on GitHub)
@@ -34,6 +34,7 @@ Autogenerated from the schema registry `molen validate` checks against; `molen s
34
34
  - [Style pack manifest](stylepack.md) — `molen/stylepack@1`
35
35
  - [Terrain descriptor](terrain.md) — `molen/terrain@2`
36
36
  - [Terrain package manifest](terrain-package.md) — `molen/terrain-package@1`
37
+ - [Transport network](transport-network.md) — `molen/transport-network@1`
37
38
  - [Entity type registry](types.md) — `molen/types@1`
38
39
  - [UV paint sidecar](uvpaint.md) — `molen/uvpaint@1`
39
40
  - [Worldgen batch](worldgen-batch.md) — `molen/worldgen-batch@1`