@bendyline/molen-tooling 0.0.15 → 0.0.17

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 (48) hide show
  1. package/dist/capture/harness.js +755 -406
  2. package/dist/capture/worldgen-preview.js +409 -298
  3. package/dist/docs-src/guide/3d-art-guidelines.md +15 -9
  4. package/dist/docs-src/guide/adaptive-performance.md +50 -23
  5. package/dist/docs-src/guide/aircraft.md +263 -29
  6. package/dist/docs-src/guide/ambient-life.md +36 -9
  7. package/dist/docs-src/guide/building-interiors.md +92 -8
  8. package/dist/docs-src/guide/determinism.md +1 -1
  9. package/dist/docs-src/guide/earth-view.md +215 -16
  10. package/dist/docs-src/guide/entities.md +42 -8
  11. package/dist/docs-src/guide/figures.md +32 -4
  12. package/dist/docs-src/guide/graphics-performance.md +122 -18
  13. package/dist/docs-src/guide/livery-catalog.md +137 -1
  14. package/dist/docs-src/guide/livery-gallery.md +136 -1
  15. package/dist/docs-src/guide/medium-fi.md +197 -12
  16. package/dist/docs-src/guide/night-lighting.md +13 -0
  17. package/dist/docs-src/guide/recognizable-places.md +47 -4
  18. package/dist/docs-src/guide/regional-fleets.md +27 -5
  19. package/dist/docs-src/guide/regional-world.md +19 -1
  20. package/dist/docs-src/guide/rendering-backends.md +28 -4
  21. package/dist/docs-src/guide/sky.md +28 -2
  22. package/dist/docs-src/guide/snow.md +231 -0
  23. package/dist/docs-src/guide/surface-rendering.md +333 -11
  24. package/dist/docs-src/guide/terrain.md +74 -5
  25. package/dist/docs-src/guide/typography.md +36 -0
  26. package/dist/docs-src/guide/vehicle-interiors.md +6 -0
  27. package/dist/docs-src/guide/vehicles.md +374 -46
  28. package/dist/docs-src/guide/weather.md +7 -1
  29. package/dist/docs-src/guide/worldgen.md +82 -3
  30. package/dist/docs-src/llms.txt +3 -2
  31. package/dist/docs-src/schemas/README.md +2 -0
  32. package/dist/docs-src/schemas/components.md +835 -57
  33. package/dist/docs-src/schemas/figure.md +30 -4
  34. package/dist/docs-src/schemas/interior-catalog.md +56 -3
  35. package/dist/docs-src/schemas/map-overrides.md +658 -0
  36. package/dist/docs-src/schemas/sign-looks.md +174 -0
  37. package/dist/docs-src/schemas/structure-placement-data.md +195 -0
  38. package/dist/docs-src/schemas/structure-placements.md +195 -0
  39. package/dist/docs-src/schemas/worldgen-batch.md +95 -0
  40. package/dist/templates/city-courier/gen/molen-types.ts +121 -4
  41. package/dist/templates/city-courier/scripts/molen-scripts.d.ts +120 -3
  42. package/dist/templates/figures-gallery/test/headless.test.ts +3 -2
  43. package/dist/templates/index.json +17 -17
  44. package/dist/templates/skybound/gen/molen-types.ts +121 -4
  45. package/dist/templates/skybound/scripts/molen-scripts.d.ts +120 -3
  46. package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +120 -3
  47. package/dist/templates/top-down-arena/src/gen/molen-types.ts +121 -4
  48. package/package.json +12 -12
@@ -148,7 +148,9 @@ them pass:
148
148
  ```
149
149
 
150
150
  Without a template, vehicles get the `ambient-vehicle` renderable and pedestrians a procedural
151
- `figure`.
151
+ `figure` dressed from a built-in wardrobe: 20 adult, 6 elder and 5 child outfits that vary height,
152
+ build, skin tone, body form, hair style, facial hair, sleeves, and trousers, shorts or skirts.
153
+ Walkers share these bodies, so a crowd costs a bounded set of generated meshes.
152
154
 
153
155
  ## Components
154
156
 
@@ -194,8 +196,8 @@ few seconds instead of in one frame.
194
196
  stop for a vehicle someone is driving and for pedestrians on a crossing.
195
197
  - **Pedestrians** walk `path` ways and inferred sidewalks at 1.15 to 1.65 m/s, pause now and then,
196
198
  and cross roads only on a pedestrian phase or when no car is close.
197
- - **Trains** run `rail` ways as consists, two cars by default, that follow the lead around
198
- curves. They dwell at stations for the station's `dwell` or 20 to 40 s, and reverse at the end
199
+ - **Trains** run `rail` ways as consists, two cars by default or made up from a `consist`,
200
+ that follow the lead around curves. Yards, sidings, spurs and crossovers carry no ambient trains. They dwell at stations for the station's `dwell` or 20 to 40 s, and reverse at the end
199
201
  of the line.
200
202
  - **Aircraft** fly straight corridors a few hundred metres up, or the approach and departure of an
201
203
  aerodrome within 6 km.
@@ -334,11 +336,11 @@ The quality tier caps the numbers:
334
336
  | Tier | Cars | Pedestrians | Trains | Aircraft | Full-model cars | Activity radius |
335
337
  |---|---|---|---|---|---|---|
336
338
  | Minimum | 24 | 8 | 0 | 0 | 2 | 250 m |
337
- | Low | 48 | 16 | 0 | 1 | 4 | 350 m |
338
- | Medium | 96 | 32 | 1 | 1 | 6 | 450 m |
339
- | Balanced | 160 | 48 | 1 | 2 | 8 | 600 m |
340
- | High | 240 | 80 | 2 | 3 | 12 | 800 m |
341
- | Ultra | 320 | 120 | 2 | 4 | 16 | 1000 m |
339
+ | Low | 48 | 16 | 1 | 1 | 4 | 350 m |
340
+ | Medium | 96 | 32 | 2 | 1 | 6 | 450 m |
341
+ | Balanced | 160 | 48 | 3 | 2 | 8 | 600 m |
342
+ | High | 240 | 80 | 4 | 3 | 12 | 800 m |
343
+ | Ultra | 320 | 120 | 6 | 4 | 16 | 1000 m |
342
344
 
343
345
  Ambient cars share the view's vehicle world, so the car you drive stops against them and traffic
344
346
  waits for you, for the view's [actors](earth-view.md#actors-companions-and-npcs) on foot and for
@@ -413,7 +415,32 @@ component takes its dimensions and wheels from the vehicle spec, so its role can
413
415
  wheel, paint, rotor and landing-gear nodes. `weight` sets how often a type spawns within its pool,
414
416
  and `cars` how many cars a train has.
415
417
 
416
- The `molen.entities` pack gives roles to its eleven road vehicles, a city bus, a light-rail car, an airliner
418
+ Rail types take two more fields. `track` keeps a type on `light` lines (tram, light rail and
419
+ metro ways) or `heavy` ones (the rest); a type without it runs anywhere, and when no type suits
420
+ a line every type may run there. `consist` makes up a mixed train led by the type: `units` copies
421
+ of it, then `length` cars drawn from the `cars` pool, in blocks of `block` alike. Ranges are
422
+ inclusive `[min, max]`. Each car type comes from the same library and takes its size from its own
423
+ vehicle spec. A car can carry its own `colors`.
424
+
425
+ ```json
426
+ "ambientRole": {
427
+ "role": "rail",
428
+ "track": "heavy",
429
+ "consist": {
430
+ "units": [1, 3],
431
+ "length": [12, 24],
432
+ "block": [2, 5],
433
+ "cars": [
434
+ { "type": "my.pack.rail.covered_hopper", "weight": 3, "colors": ["#b9b7ad"] },
435
+ { "type": "my.pack.rail.tank_car", "weight": 2 }
436
+ ]
437
+ }
438
+ }
439
+ ```
440
+
441
+ The `molen.entities` pack's road and yard diesels lead mixed freight trains and its commuter
442
+ locomotive leads bilevel coaches, on heavy rail; its light-rail car keeps to light lines. It also
443
+ gives roles to its eleven road vehicles, a city bus, an airliner
417
444
  the P-51 and OH-6 aircraft, and eight watercraft. See [Reusable entities](entities.md). Near the
418
445
  camera the Earth view draws cars, trains and vessels with their full models, painted in the
419
446
  agent's colour. Their glazing (a transparent material named like `glass` or `glazing`) is tinted
@@ -58,27 +58,35 @@ cooperatively on the main thread; exterior generation continues through the exis
58
58
  `molen validate catalog.json`; discover its fields with `molen schema get interior-catalog`.
59
59
  The default style pack's `interiors/catalog.json` (in the `molen.worldgen.default` content pack,
60
60
  source [`content/worldgen/interiors/`](https://github.com/bendyline/molen/tree/main/content/worldgen/interiors)) is a complete
61
- editable starting catalog with 15 profiles:
61
+ editable starting catalog with 26 profiles:
62
62
 
63
63
  | Program | Algorithm and furnishings |
64
64
  | --- | --- |
65
65
  | Grocery | Long stocked shelf rows, 2.4 m aisles, front checkout |
66
66
  | Fast food, restaurant, cafe | Tables and chairs with an entrance-side service counter |
67
67
  | Pharmacy, retail, library | Smaller shelving modules and generous access strips |
68
+ | Mall | A galleria with a void, shops on every storey, escalators and an anchor store; see [Malls](#malls) |
68
69
  | House | Connected hallway, living room, kitchen, bathrooms, bedrooms, and stairs to an upper floor when it fits |
69
- | Apartments/hotel | Repeated room pods off circulation spaces |
70
- | Office | Desk and chair modules with clear routes |
71
- | School | Larger room pods with desks |
70
+ | Office, skyscraper, civic | Open-plan desk bays around a lift core, every storey; see [Towers and lifts](#towers-and-lifts) |
71
+ | Apartments, hotel | Rooms off corridors on every storey, with a lobby and lifts |
72
+ | School, hospital | Classrooms or wards off wide corridors, on every storey |
72
73
  | Clinic | Room pods with beds |
73
74
  | Warehouse | Tall storage racks and 3 m handling aisles |
75
+ | Parking garage | Drive aisles, stalls, ramps and parked cars on every deck; see [Car parks](#car-parks) |
76
+ | Theatre, cinema, place of worship | Rows down a central aisle, facing a screen or an altar |
77
+ | Museum | A central walk with galleries off it: a plinth and a picture in each |
78
+ | Sports hall | A marked court with hoops, and bleachers where there is room |
79
+ | Station | Ticket windows, a gate line and waiting benches |
80
+ | Fire station | Engines nose to the doors, and lockers along the back wall |
74
81
  | Assembly | Bench rows with a central aisle |
75
82
  | Generic | Furnished hall with seating |
76
83
 
77
84
  Each profile supplies an id/version, ordered label matches, algorithm family, furniture type,
78
85
  module dimensions, aisle width, placement density and floor/wall/wood/accent colors. Catalog
79
86
  validation rejects duplicate ids, missing fallbacks, invalid colors and unsafe metric ranges.
80
- The seven reusable layout families are `aisles`, `dining`, `rooms`, `workplace`, `storage`,
81
- `hall`, and `residential`.
87
+ The reusable layout families are `aisles`, `dining`, `rooms`, `workplace`, `storage`, `hall`,
88
+ `residential`, `parking`, `tower`, `atrium`, `auditorium`, `court`, `concourse`, `gallery` and
89
+ `apparatus`.
82
90
  Add or tune a profile in JSON to vary these families; extend the typed algorithm union and
83
91
  generator when a new topology is necessary. The optional `residential` profile settings control
84
92
  whether upstairs is allowed, clear stair width, run per meter of rise, and minimum room width.
@@ -112,6 +120,82 @@ the upper opening; the landing leads directly back to the hallway. Insufficient
112
120
  or headroom produces a single usable floor, rather than inaccessible upstairs rooms. Irregular
113
121
  wings retain conservative placement and can remain sparsely furnished.
114
122
 
123
+ ## Towers and lifts
124
+
125
+ A profile with `algorithm: "tower"` fills every storey the exterior shows. Its `tower` block picks a
126
+ `plate`: `open` for desk bays, or `guest`, `flat`, `ward` or `class` for partitioned rooms. It also
127
+ sets the number of `elevators`, and the depth of a ground-floor `lobby` kept free of rooms.
128
+ `moduleWidth` and `moduleDepth` size a room, and `aisleWidth` a corridor.
129
+
130
+ The plate is built from the door's frame: a spine straight in from the entrance, crossed by
131
+ corridors a double row of rooms apart, with lift cars beside the spine near the middle of the plate.
132
+ A plate too narrow to cross puts rooms on the spine. A plate with no room for a lift keeps only its
133
+ ground floor, since upper storeys could then be seen but never reached.
134
+
135
+ A tower is built around whoever is in it. `generateInteriorPlan(site, { focus })` covers the ground
136
+ floor and the storeys around `focus`, so a sixty-storey tower costs what a four-storey one does.
137
+ `plan.tower.levels` lists them, and `plan.storeys` holds the same storeys.
138
+
139
+ A lift is a host's to operate, because only the host can move a viewer:
140
+
141
+ ```ts
142
+ const stop = interiors.elevatorAt([x, y, z]);
143
+ if (stop) {
144
+ // Keep asking each frame. It stays false until that storey is built.
145
+ if (interiors.requestStorey(stop.identity, level)) feet.y = stop.floors[level];
146
+ }
147
+ ```
148
+
149
+ Upper-storey windows are in the interior's own walls. The exterior shell is single-sided, so from
150
+ inside it is simply not there, and the view out needs no holes in the facade. From outside, the
151
+ facade stays opaque above the ground floor.
152
+
153
+ ## Malls
154
+
155
+ A profile with `algorithm: "atrium"` lays a galleria straight in from the entrance, a cross galleria
156
+ where one fits, shops down both sides on every storey, and an anchor store closing the far end.
157
+ `aisleWidth` is the galleria's width, and `moduleWidth` and `moduleDepth` size a shop. Three storeys
158
+ at most are built.
159
+
160
+ Above the ground floor the middle of the galleria is a void. Escalators climb it in wells split by
161
+ bridges, because each run has to land on a floor and the next has to start from one.
162
+
163
+ ## Car parks
164
+
165
+ Set `parking: { levels, entrances }` on a `BuildingRequest` to model a multi-storey car park instead
166
+ of rooms. `levels` counts the storeys below the roof deck, which is parked on too. `entrances` are
167
+ mapped vehicle entrances near the footprint, in local meters. The building needs a flat-roofed style
168
+ and a catalog profile labeled `parking_garage` that uses the `parking` algorithm, whose
169
+ `moduleWidth`, `moduleDepth` and `aisleWidth` set the stall and aisle sizes and `density` the
170
+ occupancy of the ground deck.
171
+
172
+ The layout is plausible, not surveyed. It is decided with the exterior, because the top ramp comes
173
+ up through the roof: `generateBuilding` picks doors, aisles and a ramp position, and leaves the
174
+ stalls to the lazy plan.
175
+
176
+ - **Aisles** run along the longer side of the door's frame, with stalls either side, and link at
177
+ their ends. Every storey shares one plate.
178
+ - **Ramps** are a scissor. Each lane takes a stall row either side of one aisle, and climbs back the
179
+ way the last came, so a driver U-turns across the aisle at every level. Lanes climb one meter in
180
+ seven, or as steeply as one in five where the plate is tight.
181
+ - **Doors** sit on the walls with mapped entrances, or else the walls easiest to reach from the
182
+ ground. A door may line up with the first ramp lane, so a driver goes straight in and up.
183
+ - **Walls** open in bays between piers on every storey. Openings use the `open` kind, which has no
184
+ glass and no frame, and a dark cover stands in for them until the interior loads.
185
+ - **Cars** come from named coordinate draws, as `plan.parking.cars`, thinning with height. A stall
186
+ keeps its car however low `maxParkedCars` is set, up to 3,000 across a garage.
187
+
188
+ `InteriorStreamingOptions.furnish` receives each plan as it is published, which is how a host adds
189
+ content such as cars. The Earth view draws every car from one instanced mesh per body size and makes
190
+ only the 48 nearest real vehicles, so you can board one and drive it down the ramp. Vehicles sit on
191
+ the deck they are driving on because `groundHeight(x, z, y)` passes their height: see
192
+ [Vehicles](vehicles.md).
193
+
194
+ A footprint too small for a ramp and a turnaround at each end keeps its decks and cars, but they
195
+ cannot be reached. A plate under about 1,300 m² has room for a ramp or for stalls but hardly both,
196
+ and real ones that size use car lifts or sloped floors, which this does not model. Storeys are flat
197
+ and stacked, with no split levels, and footbridges mapped into a garage end at its wall.
198
+
115
199
  ## Streaming, rendering and collision
116
200
 
117
201
  `InteriorStreamer` from `@bendyline/molen-worldgen/client` accepts groups of sites and a metric
@@ -161,8 +245,8 @@ solid from either side. Doorways remain open without an interaction key or door
161
245
 
162
246
  ## Current limits and next extensions
163
247
 
164
- This release covers ground floors and a connected upper floor for suitable homes in complete,
165
- non-elevated polygon buildings that fit the
248
+ This release covers ground floors, a connected upper floor for suitable homes, every storey of a
249
+ tower or mall, and every deck of a car park, in complete, non-elevated polygon buildings that fit the
166
250
  exterior geometry budget and have room for human-scale access. It does not promise entry into
167
251
  every mapped fragment: clipped footprints, elevated parts, very low/narrow structures,
168
252
  budget-boxed and omitted buildings lack a site. Additional storeys, switchback stairs, elevators,
@@ -136,7 +136,7 @@ Two constants live in `packages/kernel/src/version.ts` and they do different job
136
136
 
137
137
  | Constant | Today | Role |
138
138
  |---|---|---|
139
- | `ENGINE_VERSION` | `0.0.10` | metadata. Written into a keyframe's `engine` field so a save says which build wrote it. **Never compared on load, never hashed.** |
139
+ | `ENGINE_VERSION` | `0.0.12` | metadata. Written into a keyframe's `engine` field so a save says which build wrote it. **Never compared on load, never hashed.** |
140
140
  | `STATE_FORMAT` | `1` | the gate. Written into a keyframe under the reserved `plugins.$format` key, compared by `applyKeyframeTo`, and folded into `stateHash` as `stateFormat`. |
141
141
 
142
142
  So a release — even one that moves every package — keeps your keyframes
@@ -5,6 +5,7 @@ composes:
5
5
 
6
6
  - streamed terrain from a `molen/terrain-package@1`;
7
7
  - worldgen buildings, seeded infill for streets with missing outlines, street surfaces, trees and parked cars from content packs;
8
+ - laid-out golf courses, cemetery headstones and marked sports pitches where the map names them (see [worldgen](worldgen.md#golf-courses-cemeteries-and-sports-pitches));
8
9
  - traffic, pedestrians, trains and aircraft that come and go around the viewer;
9
10
  - orbit, walk, drive and fly navigation, with cars and aircraft the host can put the viewer in;
10
11
  - markers placed by latitude/longitude;
@@ -76,7 +77,12 @@ ACES filmic tone mapping, and haze in the sky's horizon color. Its values are ex
76
77
  a sky color into the fog color for the backend. Terrain and landcover share one ground material
77
78
  from `createTerrainGroundMaterialAsync` (`@bendyline/molen-terrain/client`) with world-space
78
79
  variation; a custom host passes it to the terrain stream's `material` and to `createEarthWorldgen`
79
- as `groundMaterial`, and calls `setTerrainGroundOrigin` with the world origin each frame. Roads,
80
+ as `groundMaterial`, and calls `setTerrainGroundOrigin` with the world origin each frame (and
81
+ `setTerrainGroundSnow` with the weather's `snowCover`, where it draws [lying snow](snow.md)). The
82
+ view also draws distant land cover as one texture a tile (see [terrain](terrain.md)); a custom
83
+ host passes `farLandcover: { material: await createTerrainGroundTextureMaterialAsync({},
84
+ renderer.backend) }` to `createEarthWorldgen` and keeps that material's origin current the same
85
+ way. Roads,
80
86
  sidewalks and lots take `createTerrainPavementMaterialAsync` through the surface renderer's
81
87
  `setMaterial`, with the same origin call. Trees, shrubs and props take
82
88
  `createScatterMaterialAsync` (`@bendyline/molen-worldgen/client`) as `createEarthWorldgen`'s
@@ -109,6 +115,17 @@ to a stable size (and holds it through small changes). This pushes
109
115
  the shadow boundary farther into the distance in aerial views, trading some shadow sharpness
110
116
  for coverage at the same map resolution. Walking and driving keep their tighter footprints.
111
117
 
118
+ On WebGL a second, wider shadow map covers what lies past that footprint: around the camera
119
+ itself, four times the focused map's half-width and between 2 and 6 km. It is drawn from the
120
+ terrain stream's scenery only, about once a second, and surfaces beyond the focused map read
121
+ it, so buildings no longer gain their shadows in a ring around a low aircraft. Trees past
122
+ their near levels read no shadow map; their crowns are shaded as trees among neighbours
123
+ instead, so they match the shadowed trees near the camera. They cast no shadows of their own,
124
+ so from the air the ground carries tree shadows only around the aircraft: the LOD policy's
125
+ `distantShadows` extends them, at a cost the [worldgen guide](worldgen.md) gives. A custom
126
+ host gets the far map from `earthShadowFocus` (its `far` square) and
127
+ `renderer.setFarShadowCasters(stream.object)`.
128
+
112
129
  Earth viewers reserve a 4096-pixel sun map before preparing materials. WebGPU retains that
113
130
  allocation across quality changes, so High really uses 4096 pixels even after starting at a
114
131
  lower tier; WebGL can resize it with the tier. A chase camera 10 m above ground covers an
@@ -155,9 +172,11 @@ mode menu passes `{ force: true }` to step out at once, which also removes a veh
155
172
  added.
156
173
 
157
174
  `view.vehicleStatus()` describes the car or aircraft the viewer is in for a HUD: speed and
158
- heading for a car; airspeed, altitude and height above ground, vertical speed, attitude, load
159
- factor (g), sideslip, power, engine, gear, flaps and stall/impact flags for an aircraft (SI units,
160
- compass radians). Both carry the type's `label` and, where the type declares them, its name-free
175
+ heading for a car, with its gear, engine rev/min, traction or stability control at work
176
+ (`assist`) and the grip of the surface under it (`surfaceGrip`); airspeed, altitude and height
177
+ above ground, vertical speed, attitude, load factor (g), sideslip, power, engine, gear, flaps,
178
+ fuel remaining, stall buffet, the pilot's `greyout` and `redout` under g, and stall/impact flags
179
+ for an aircraft (SI units, compass radians). Both carry the type's `label` and, where the type declares them, its name-free
161
180
  `genericLabel` (`Full-size pickup`) and `bodyStyle`, so a HUD that must not show a real
162
181
  manufacturer or model name has something to show instead. An airplane started in flight is trimmed for level flight at its launch speed.
163
182
  `view.setThrottle(power)` sets an aircraft's throttle or collective from an on-screen lever.
@@ -348,6 +367,141 @@ viewer is in; otherwise `none`. A handler that calls `claim()` synchronously tak
348
367
  nothing else happens. Unclaimed, the view boards or leaves a vehicle as it always did (or explains
349
368
  why there is nothing to board), and does nothing for an actor or a pedestrian.
350
369
 
370
+ ### Overrides: replacing mapped places
371
+
372
+ ```ts
373
+ const warehouseYard: EarthOverride = {
374
+ id: 'needle-yard',
375
+ // The rectangle to replace: its center, and its width and depth in meters.
376
+ area: { center: [-122.3493, 47.62051], size: [150, 110], heading: 0 },
377
+ clear: { roads: false }, // what goes; see the table below
378
+ surface: 'plaza', // the ground left behind
379
+ buildings: [
380
+ { id: 'shed', rect: { center: [-40, -20], size: [56, 36] }, height: 10, use: 'warehouse' },
381
+ { id: 'office', outline: [[-59, 22], [-33, 22], [-33, 38], [-59, 38]], levels: 2, wall: '#d8d2c4' },
382
+ ],
383
+ models: [{ id: 'tank', asset: 'my.host.tank', position: [-40, 44] }],
384
+ props: [
385
+ { id: 'lamp', kind: 'street_lamp', position: [-70, -50] },
386
+ { id: 'oak', kind: 'tree', position: [20, 48], height: 11 },
387
+ ],
388
+ actors: [{ id: 'foreman', figure: { preset: 'human.adult' }, position: [-8, -6] }],
389
+ vehicles: [{ id: 'van', type: 'molen.entities.vehicle.sedan', position: [-22, 44], heading: Math.PI / 2 }],
390
+ scene: { load: (signal) => loadMyScene(signal), position: [40, 0] },
391
+ };
392
+
393
+ const view = await mountEarthView({
394
+ /* … */
395
+ overrides: [warehouseYard], // there from the first frame, or:
396
+ });
397
+ view.overrides.set(warehouseYard); // add it, or replace the one with this id
398
+ await view.overrides.whenApplied(); // the replacement is on screen
399
+ view.overrides.remove('needle-yard'); // the mapped place comes back
400
+ view.on('overridechange', ({ state, ids }) => { /* 'pending', then 'applied' */ });
401
+ ```
402
+
403
+ An override replaces one rectangle of the mapped world with a place of the host's own: the
404
+ rectangle is cleared, and the override's buildings, models and props stand there instead. Pass
405
+ overrides at mount, and add, change and remove them while the view runs with `view.overrides`
406
+ (`set`, `remove`, `get`, `list`, `clear`). They are geographic, so they stay through re-anchors.
407
+ `set` throws, changing nothing, when an override is invalid.
408
+
409
+ Everything inside an override is laid out in its own frame: meters from the rectangle's center,
410
+ `[x, z]` with +x east and +z south, turned by the area's `heading`. Every heading is a compass
411
+ heading in radians, clockwise seen from above, and each one inside the override adds to the
412
+ area's. `mapOverridePoint(frame, [x, z])` gives the `[longitude, latitude]` of a point of that
413
+ frame, for anything the host places beside the override itself. `area` may instead be
414
+ `{ bounds: [west, south, east, north] }`. A rectangle is 1 to 2000 m a side.
415
+
416
+ `clear` says what leaves the rectangle:
417
+
418
+ | Flag | Default | Removes |
419
+ |---|---|---|
420
+ | `buildings` | `true` | Mapped footprints at least half inside the rectangle. `'clip'` cuts every footprint at its edge instead. |
421
+ | `landmarks` | `true` | Catalogued landmark models anchored in it. |
422
+ | `vegetation` | `true` | Land cover, scattered plants and mapped trees. |
423
+ | `props` | `true` | Mapped street furniture. |
424
+ | `parking` | `true` | Parking lots, their aisles and driveways, and the cars parked there. |
425
+ | `roads` | `false` | Roads and paths whose center line is in it, cut at its edge. |
426
+
427
+ `surface` is the ground left behind: `ground` (the default), `grass`, `paved`, `plaza`, `gravel`,
428
+ `bare` or `sand`. With `vegetation: false` the mapped ground stays as it is.
429
+
430
+ What stands there:
431
+
432
+ - **`buildings`** are generated by the same generator as the mapped city, from a footprint
433
+ (`rect`, or an `outline` ring) and a `height` or a number of `levels`. They get the city's detail
434
+ levels, interiors and collision. `use` names what the building is as map data would
435
+ (`warehouse`, `school`, `house`) and picks a look; `style` names an architecture style of the
436
+ style pack outright; `wall` and `trim` are `#rrggbb` colors. At most 64 an override.
437
+ - **`models`** are placed whole. `asset` is either a structure asset id of the style pack (any
438
+ catalogued landmark, streamed with its detail levels) or a ref of the host's own. A ref the
439
+ packs do not carry is loaded as a GLB through the mount option `overrideAssets`
440
+ (`{ load(ref), loadText(ref) }`), or through `content` when the model is in a content pack the
441
+ host opened. A host's own model is drawn at one detail level, from tile level 13 by default: use
442
+ static meshes in meters, +Y up, the origin on the ground and the front toward +Z, without Draco,
443
+ meshopt or KTX2 compression, at most 32 MiB and 300,000 triangles. At most 16 an override.
444
+ - **`props`** are small things drawn many at a time: a `kind` (`tree`, `street_lamp`, `bench`,
445
+ `bike_rack`, `charger`) or a `model` ref with an optional `scale` and `color`. At most 256.
446
+
447
+ A change does not flash. The view goes on showing what stood there, emits `overridechange` with
448
+ `state: 'pending'`, builds the map tiles around the rectangle again, swaps them in, and emits
449
+ `applied`; `whenApplied()` resolves then. Ambient traffic on a rebuilt tile starts over, so its
450
+ cars are gone for a second. A walker who ends up inside a building that appeared is stood just
451
+ outside its nearest wall.
452
+
453
+ The bundles come and go with the override. `actors` become [actors](#actors-companions-and-npcs)
454
+ and `vehicles` become [owned vehicles](#owned-vehicles), each under the id
455
+ `<override id>/<its id>`, so `view.actors.setBehaviour('needle-yard/foreman', …)` and
456
+ `view.vehicles.board('needle-yard/van')` reach them. `scene` is registered as a
457
+ [diorama](dioramas.md) standing on the rectangle, as `<override id>/scene`. Setting an override
458
+ again keeps the entities whose declaration did not change as they are (a car that was driven off
459
+ stays where it is), replaces the changed ones, and replaces them all when the area moved or
460
+ turned.
461
+
462
+ `view.buildingAt({ latitude, longitude, radius })` answers "what building is here": the mapped
463
+ footprint or landmark at a place, or the nearest within `radius` meters (default 6), with its
464
+ outline, bounds, name and class. Use its `bounds` to size the rectangle that replaces it. It reads
465
+ map data, so call it on a key press, not every frame. A building an override placed comes back
466
+ with `override` set to that override's id.
467
+
468
+ Overrides are plain data apart from `scene.load`, and `molen/map-overrides@1` documents hold them:
469
+ `{ "format": "molen/map-overrides@1", "overrides": [ … ] }` validates with `molen validate` (see
470
+ the [schema](../schemas/map-overrides.md)).
471
+
472
+ Limits of this version:
473
+
474
+ - The terrain is not reshaped. Buildings are fitted to the ground as mapped ones are, and a model
475
+ stands on the ground at its origin.
476
+ - Cleared roads leave their grading: the ground stays leveled where the road ran. Bridges,
477
+ tunnels, railways and runways are never cut, and traffic turns around at the new dead ends.
478
+ - From high altitude a generated building is a plain block in a neutral color, as every building
479
+ is at that distance.
480
+ - Vehicles the host owns elsewhere are not moved out of the way of a building that appears.
481
+
482
+ A host composing its own view from the pieces uses the same parts:
483
+ `createMapOverrideSet` and `withMapOverrideStructures` from
484
+ `@bendyline/molen-worldgen-earth/kernel`, `withMapOverrides` from
485
+ `@bendyline/molen-worldgen-earth/client` around the land-cover and feature renderers (inside
486
+ `withEarthAirports`, outside whatever observes tiles), and `bindMapOverrides` and
487
+ `bindMapOverrideEntities` from `@bendyline/molen-earth/client` to rebuild tiles
488
+ (`stream.refreshLayers`) and to add the bundles when the set changes.
489
+
490
+ ## Weather and snow
491
+
492
+ `weather` at mount, and `view.setWeather(data)` afterwards, set the one
493
+ [`weather`](weather.md) component the whole view shares. The sky draws its clouds, precipitation
494
+ and haze; vehicles feel its wind and its wet or snowy grip; and its `snowCover` lays snow above a
495
+ snow line (in meters above sea level): the ground, roofs and trees whiten, the walker and the
496
+ host's actors wade more slowly, cars bog down, and skis glide. `view.weather` reads it back, and
497
+ `setWeather(undefined)` clears it. Nothing is rebuilt, so a host can change it every frame.
498
+
499
+ ```ts
500
+ view.setWeather({ ...weatherProfile('overcast'), snowCover: { level: 800 } });
501
+ ```
502
+
503
+ See [Snow cover](snow.md) for the snow line, the depth and what each does to movement.
504
+
351
505
  ## Frames and long trips
352
506
 
353
507
  Heights stay in meters. Horizontal distances are exact at the frame latitude and drift away from it
@@ -372,6 +526,23 @@ Entity types come from every opened pack that provides `types` documents, merged
372
526
  library with the entities pack first: pass your own pack's id in `ids` (for example
373
527
  `[...Object.values(EARTH_PACK_IDS), 'my.app']`) and its figure or prop types sit beside the stock
374
528
  cars and aircraft in `content.types`. A type id declared by two packs is an error that names both.
529
+ A type that fails its checks is left out, with any type that extends it, and reported through
530
+ `onWarning` (default `console.warn`); the rest still load.
531
+
532
+ Types are fully validated by default, which costs about half a second of main thread for the stock
533
+ aircraft and vehicles before a view can mount. A host that serves packs it built and validated
534
+ itself (`molen pack verify`, or `createTypeLibrary` in its build) can pass
535
+ `loadEarthContent(packs, { typeChecks: 'structure' })`: only what resolving relies on is checked,
536
+ and component fields this engine version does not know are kept instead of rejected.
537
+ `loadEarthContent` reads types, fonts, the style pack and the catalogs at once, so a large types
538
+ download does not hold up the rest.
539
+
540
+ Storefront signs show the names the map gives their places, set from the `molen.earth` pack's
541
+ glyph atlas; Japanese names need the Kyoto glyph pack, `molen.glyphs.kyoto`, opened beside it (pass
542
+ its id in `ids`). Other scripts, and names no open pack can set, fall back to the map's English
543
+ name, then to a generic descriptor such as `EATERY`. `signNames: 'generic'` on `mountEarthView`
544
+ shows the descriptors everywhere, with no business name. See
545
+ [Names on signs](recognizable-places.md#names-on-signs).
375
546
 
376
547
  `openPacksFromIndex(indexUrl, ids, fetchImpl)` accepts a host fetch implementation for the index,
377
548
  archive opening and subsequent asset requests. Landmark model bytes are loaded as nearby
@@ -496,8 +667,9 @@ offline.
496
667
  With a byte cache the view also prefetches. It follows the camera's own track, so it works for an
497
668
  orbit pan, a car and an aircraft alike. It places virtual views 20, 40 and 60 seconds ahead,
498
669
  selects their tiles the way the stream would, and reads those archive tiles into the cache. It
499
- reads bytes only and decodes nothing, two reads at a time, only while the stream has a free load
500
- slot, and pauses when the page is hidden, offline or on Save-Data. It waits out camera animations
670
+ reads bytes only and decodes nothing, two reads at a time, only while the stream has a free terrain
671
+ load slot, and pauses when the page is hidden, offline or on Save-Data. The stream itself builds
672
+ the tiles the next 20 seconds of the track reach (see the terrain guide's moving cameras). It waits out camera animations
501
673
  (a fly-to, getting into a vehicle), whose momentary speed is not travel, and never looks more than
502
674
  15 km ahead. Tune it with `prefetch` (`horizonSeconds`, `stepsSeconds`, `maxConcurrent`,
503
675
  `maxDistanceMeters`), or turn it off with `prefetch: false`. A host
@@ -579,6 +751,10 @@ its center is outside the view. Extended structures use either `datum: 'sea-leve
579
751
  absolute `elevation`, or a `terrainReference` with the host sampler described below. Every
580
752
  tile must resolve the same model origin, avoiding inconsistent ground samples between tiles.
581
753
 
754
+ These placements come with the content packs. A host that wants to take a landmark away, or put
755
+ its own buildings and models in a place, declares an
756
+ [override](#overrides-replacing-mapped-places) instead.
757
+
582
758
  Models with `groundCutout` stay whole in each intersecting resident tile. Their floors and
583
759
  openings therefore remain together while adjacent tiles load, including when the anchor tile
584
760
  is absent. These instances share the library's geometry and textures and release with their
@@ -612,6 +788,11 @@ nearest profile segment's interpolated height. The model's scale and resolved da
612
788
  inside the exact outline, such as paths covered by viewing pods. It requires an outline;
613
789
  untagged ground crossings, tunnels, through crossings with both endpoints outside the model,
614
790
  and bridge segments outside the outline remain independent.
791
+ Use `replaceRoads.bridgeFeatureIds` when other mapped overpasses cross or overlap the bridge
792
+ footprint. The selected IDs use the host tile decoder's feature IDs and constrain both bridge
793
+ replacement and approach matching. A model with separate carriageways can supply each deck's
794
+ outline, endpoints and heights in `replaceRoads.additionalDecks`. All decks use the same model
795
+ origin and orientation.
615
796
  If the asset includes its retaining walls and approach pavement, set
616
797
  `replaceRoads.includeConnectedApproaches: true`. A grade road is then clipped inside the outline
617
798
  only if it shares a covered endpoint with a mapped bridge and continues outward along the bridge
@@ -624,6 +805,9 @@ itself stays unchanged. Raised ground approaches receive retaining side and end
624
805
  to the original terrain; their paving supplies the top. These supports follow the model's
625
806
  load and unload lifetime. They provide approximate continuity where coarse elevation data
626
807
  misses a bank or quay; they do not establish surveyed ground levels.
808
+ If the map also draws the deck as a pedestrian plaza or paved area, list its mapped feature
809
+ IDs in `replaceRoads.pavingAreaIds`. The loaded landmark removes those areas from the road
810
+ surface pass. A failed load keeps the map paving, and nearby plazas stay in place.
627
811
  Sunken structures can declare `groundCutout: { outline: [[x, z], ...], basis: 'source evidence' }` on a placement. The simple polygon uses native model metres and follows the same heading and scale as the model. It should bound the ground opening covered by the authored concourse or rim. The terrain pyramid subtracts the polygon from actual elevation and draped ground triangles across tile and LOD boundaries, preserving interpolated heights and surface attributes along its edge. The cutout becomes active only when its successfully loaded structure is visible, and the original ground returns on layer hiding or eviction. Failed or cancelled models leave the ground intact. Heights remain available for anchoring; an opening does not itself author walkable floors or collision. Separate excavations can add `additionalOutlines: [[[x, z], ...], ...]` to the same object (up to 64 total polygons). Ground between those outlines stays intact; every opening needs matching model geometry. Client integrations can register the same set with `setTerrainGroundCutouts(object, outlines)`. The singular `setTerrainGroundCutout` remains available for one polygon.
628
812
 
629
813
  Bridge openings can set `groundCutout.minHeight` to a native model Y threshold. Only ground
@@ -729,18 +913,24 @@ neither capture set substitutes altered heights to make a bridge fit. These repo
729
913
  evidence and are excluded from the Earth runtime pack.
730
914
 
731
915
  If `replaceFootprint` is set, mapped buildings are suppressed only once the replacement model
732
- has loaded; failed models keep the procedural building. In exact data a polygon goes when the
733
- anchor falls inside it, when it lies wholly inside the loaded model's horizontal extent around the
734
- anchor, or when at least half of it stands on the model's own ground footprint (its triangles
735
- stamped on a 64-cell grid). The last two catch a landmark's off-centre mapped parts: a tower's
736
- legs and observation level, a grandstand, a ballpark's parked roof. The footprint also reaches
916
+ has loaded; failed models keep the procedural building. At any zoom a polygon goes when at least
917
+ half of it stands on the model's own ground footprint (its triangles stamped on a 64-cell grid).
918
+ In exact data it also goes when the anchor falls inside it, or, for a model with no geometry
919
+ footprint, when it lies wholly inside the loaded model's horizontal extent around the anchor.
920
+ The footprint and extent rules catch a landmark's off-centre mapped parts: a tower's
921
+ legs and observation level, a grandstand, a ballpark's parked roof, and the shafts of a tower
922
+ mapped as parts with no outline, where the anchor falls in only one. Whatever lies at least half
923
+ inside a replaced polygon goes with it: map sources draw a tower as an outline plus separate
924
+ parts (a shaft, a spire), and those parts go even where an off-centre model covers less than
925
+ half of them. Buildings in a replaced ring's courtyard stay. The footprint also reaches
737
926
  neighbouring tiles, so a stadium anchored near a tile edge clears its mapped stands there too.
738
927
  Those tiles regenerate their buildings when the landmark loads, and again when its tile is evicted.
739
928
  A ring polygon whose hole holds the anchor (a stadium bowl, a cloister) goes under the size rule
740
929
  below. Generalized sources (Protomaps below zoom 15, and tiles overzoomed from them) merge
741
- neighboring footprints, so there the polygon must contain or ring the anchor, and is suppressed
742
- only when neither side exceeds the loaded model's horizontal extent by more than 1.6 times plus
743
- 12 meters; a larger polygon is a merged block of other buildings and keeps its procedural shell.
930
+ neighboring footprints, so there a polygon the model covers less than half of must contain or
931
+ ring the anchor, and is suppressed only when neither side exceeds the loaded model's horizontal
932
+ extent by more than 1.6 times plus 12 meters; a larger polygon is a merged block of other
933
+ buildings and keeps its procedural shell. Neighbouring tiles' footprints apply in exact data only.
744
934
  An Earth pack without a placement document still loads.
745
935
 
746
936
  For unsurveyed orientation, `orientation: 'mapped'` requires an explicit
@@ -1037,7 +1227,8 @@ These regional forms are visual priors, not surveyed attributes of individual bu
1037
1227
  192–768 MiB, or 256 MiB on touch devices and 512 MiB elsewhere without a report. Above 1 the
1038
1228
  level steps down, and since stepping down selects fewer, coarser tiles, pressure falls rather
1039
1229
  than cascading to the minimum. The terrain cache keeps at least the budget, so ground just left
1040
- is still warm when the view pans back.
1230
+ is still warm when the view pans back. `earthTerrainBudget(tierBudget, memoryBudget)` and
1231
+ `earthWorldgenCacheBytes` give a host of its own the same limits.
1041
1232
  - `stats().worldgen` counts styled building generation since the current terrain stream started
1042
1233
  (with content packs): tiles generated, buildings drawn as geometry, and instanced stand-ins.
1043
1234
  - Window blur and hidden tabs automatically pause simulation, rendering, queued GPU preparation,
@@ -1099,7 +1290,8 @@ Use `dioramas: { maxActive, placements }` or `view.dioramas.add(...)` for bounde
1099
1290
  pieces such as a football game, apron traffic or a market. Each geographic placement supplies
1100
1291
  a lazy scene loader, optional calendar policy, and entry/exit distances. It waits for terrain,
1101
1292
  plays nearby, and releases its local world when out of range. See [Dioramas](dioramas.md) for
1102
- the full contract and current prototype limits.
1293
+ the full contract and current prototype limits. A diorama does not clear what the map shows
1294
+ under it; an [override](#overrides-replacing-mapped-places) does, and can carry a scene of its own.
1103
1295
 
1104
1296
  ## Airport layouts
1105
1297
 
@@ -1111,6 +1303,13 @@ samples are independent of camera detail and tile load order. Hosts composing a
1111
1303
  can pass `transformHeightfield: createAirportTerrainGrading(content.airports)` alongside their
1112
1304
  `withEarthAirports` semantic renderers.
1113
1305
 
1306
+ Roads are graded the same way, a step earlier: the ground is leveled under every road, and
1307
+ bridges are stacked clear of what they cross. `mountEarthView` does both by default;
1308
+ `roadGrading: { earthworks: false }` keeps the ground as surveyed and `roadGrading: false`
1309
+ turns both off. A host composing its own stream applies the road grading before the airport's
1310
+ with `composeEarthGroundGrading(semantic.roadGrading, airportGrading)`. See
1311
+ [Road grading](surface-rendering.md#road-grading).
1312
+
1114
1313
  The `molen.earth` content pack supplies a lazy worldwide runway catalog and a detailed Boeing
1115
1314
  Field layout. Both Earth hosts use measured runway endpoints and widths, draw runway numbers,
1116
1315
  thresholds and centre lines, and keep airport pavement visible from flight altitude. Mapped
@@ -48,7 +48,10 @@ The entity type id and renderable asset ref are identical, such as
48
48
  `molen.entities.tree.conifer.pine`. For the type definitions, list the pack in the project's
49
49
  `packs` (see [Projects & types](project.md)); the CLI then resolves every `molen.entities.*` type.
50
50
  In code, read the documents the manifest `provides` as `types` and pass them to
51
- `createTypeLibrary` from `@bendyline/molen-kernel/content`.
51
+ `createTypeLibrary` from `@bendyline/molen-kernel/content`. It validates every document against
52
+ the schema by default; `{ checks: 'structure' }` checks only what resolving needs (the envelope,
53
+ type shapes, namespaces, script sources and `extends` cycles), for content validated where it was
54
+ built, and `onSkip` leaves out a failing type, with any that extend it, instead of throwing.
52
55
 
53
56
  In the engine repository, run `molen asset list` in `content/entities`, `molen types check --project
54
57
  content/entities/project.json`, or render `content/entities/scenes/gallery.scene.json` with
@@ -65,11 +68,11 @@ serves them like any other model. See [Aircraft](aircraft.md) for world-view con
65
68
  `molen.entities.transit.bus` is a 12 m city bus, `molen.entities.transit.lightrail` a 27 m
66
69
  two-section light-rail car, and `molen.entities.aircraft.airliner` a narrow-body airliner. Their
67
70
  display names are **Bendy Bus**, **Bendy Light Rail** and **Bendy Small Airliner**. All three
68
- are mountable: the bus uses the road solver, light rail supports traction/braking/reversing
69
- on a straight track with steering locked, and the airliner uses the assisted twin-engine
70
- airplane solver with gear and flap controls. The airliner's thrust is an approximation, not
71
- a dedicated turbofan simulation. Player rail controls do not yet follow curved network routes;
72
- ambient rail consists retain their existing network following.
71
+ are mountable: the bus uses the road solver, light rail follows a host's track network (or,
72
+ with none under it, drives straight with steering locked), and the airliner uses the assisted
73
+ twin-engine airplane solver with gear and flap controls. The airliner's thrust is an
74
+ approximation, not a dedicated turbofan simulation. See
75
+ [Trains and track-guided vehicles](vehicles.md#trains-and-track-guided-vehicles).
73
76
  [Ambient life](ambient-life.md) also spawns them through their `ambientRole` component.
74
77
  In the engine repository, `content/entities/scenes/transit.scene.json` shows them side by side.
75
78
 
@@ -80,6 +83,20 @@ The Bendy road fleet has eleven mountable models. Alongside compact, sedan, SUV,
80
83
  `taxi`, `offroad` and `box_truck`. They expose the usual wheel pivots, paint material, driver
81
84
  seat and vehicle tuning, and join the ambient car pool.
82
85
 
86
+ Personal and regional vehicles complete it: `molen.entities.vehicle.auto_rickshaw` (Bendy Auto,
87
+ the three-wheeled taxi of South Asia, steered by handlebars) and, under `molen.entities.cycle.`,
88
+ an `underbone_moped` (Bendy Moped), an `electric_moped` (Bendy E-Moped), a shared electric
89
+ `kick_scooter` (Bendy Share Scooter), a push `skateboard` and an `electric_skateboard` (Bendy
90
+ E-Board), beside the motorcycles, scooter and bicycles. The auto-rickshaw and motor two-wheelers
91
+ appear in traffic and parking only where a regional fleet weights them; see
92
+ [riding cycles](vehicles.md#riding-cycles) and [regional fleets](regional-fleets.md).
93
+
94
+ Three ride on runners over lying snow: `molen.entities.cycle.skis` (Bendy Skis, a pair with
95
+ bindings and poles), `molen.entities.cycle.snowboard` (Bendy Snowboard) and
96
+ `molen.entities.vehicle.snowmobile` (Bendy Sled, a two-up trail sled). They slide on the
97
+ weather's snow cover and scrape on bare ground, and never park or join traffic; see
98
+ [Snow cover](snow.md#the-three-rides).
99
+
83
100
  All generic road, cycle, water and transit display names use the **Bendy** house brand.
84
101
  Asset/type IDs remain stable. P-51D Mustang and OH-6 retain their real identities. Models follow
85
102
  the [close-view vehicle detail standard](medium-fi.md#controllable-vehicles-close-view-fidelity).
@@ -163,8 +180,25 @@ for routing and terminal stops. Each type also supplies a powered `boat` and dri
163
180
  seats for [player boating](boats.md), swells, currents and dockside boarding. The sailboat uses
164
181
  its auxiliary motor.
165
182
 
166
- The id helpers `MOLEN_CYCLE_ENTITY_IDS` and `MOLEN_WATERCRAFT_ENTITY_IDS` enumerate the new
167
- collections. All are in `MOLEN_ENTITY_IDS` and the pack's type documents.
183
+ `molen.entities.rail.*` holds North American rolling stock for track-guided consists:
184
+ locomotives `ge_es44ac`, `emd_gp38_2` and `mpi_mp36ph_3c`; passenger cars
185
+ `bombardier_bilevel_coach` and `bombardier_bilevel_cab_car`; and freight cars `boxcar_50ft`,
186
+ `covered_hopper`, `tank_car_dot117`, `well_car_double_stack`, `autorack_enclosed`,
187
+ `gondola_52ft` and `centerbeam_flatcar`. Each `vehicle.spec` has a `rail` block (truck centres,
188
+ length over couplers, power at the rail, gauge) and a `bodyStyle` of `locomotive`,
189
+ `passenger-car` or `freight-car`. The model origin is on the track centreline at the top of
190
+ rail, midway between the trucks; `truck-front` and `truck-rear` pivot under each truck centre,
191
+ and wheelsets `axle-1` … `axle-n` spin about X. Locomotives and the cab car have a full cab with
192
+ live throttle and brake handles and seat a `driver` and a `conductor`; the coaches seat
193
+ passengers on both levels; freight cars have no seats. `vehicle.color` repaints
194
+ `rail-livery-body`, and the well car's two containers take `container-lower` and
195
+ `container-upper`. Names identify the real types; liveries are generic and the only lettering is
196
+ the fictional `MLN` / `MLNX` reporting mark. See the
197
+ [rail roster](https://github.com/bendyline/molen/blob/main/content/entities/RAIL.md).
198
+
199
+ The id helpers `MOLEN_CYCLE_ENTITY_IDS`, `MOLEN_WATERCRAFT_ENTITY_IDS` and
200
+ `MOLEN_RAIL_ENTITY_IDS` enumerate the new collections. All are in `MOLEN_ENTITY_IDS` and the
201
+ pack's type documents.
168
202
 
169
203
  In the engine repository, `content/entities/scenes/fleet.scene.json` displays the road and
170
204
  cycle models; `content/entities/scenes/harbor.scene.json` displays the water fleet with moving