@bendyline/molen-tooling 0.0.17 → 0.0.19

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.
@@ -0,0 +1,158 @@
1
+ # Vehicle console
2
+
3
+ The vehicle console gives phones and tablets on-screen controls drawn as the vehicle's own. Flying
4
+ a P-51, the stick under your left thumb is the P-51's stick, copied out of its cockpit model and
5
+ tilting as you push; its rudder pedals sit beside it, its throttle at the right edge with a gear
6
+ handle and a flap lever beside that, and its own airspeed and altitude dials between. A car shows
7
+ its steering wheel and pedals, a motorcycle its handlebars, a boat its helm. On foot the console is
8
+ the plain two-circle stick with jump and use buttons.
9
+
10
+ Every part is drawn see-through at rest so the view stays clear, and goes solid under a thumb. The
11
+ controls work through the same navigation actions as keys and gamepads, and through the aircraft's
12
+ control session for levers, so a touch flies exactly as a keyboard does.
13
+
14
+ ## Add it to an Earth view
15
+
16
+ Pass `console` to `mountEarthView` with the element around the canvas. It shows on touch devices
17
+ (any pointer that is coarse, which includes touchscreen laptops) and switches with the mode: the
18
+ flown aircraft, the driven vehicle, on foot, and nothing in orbit.
19
+
20
+ ```ts
21
+ import { mountEarthView } from '@bendyline/molen-earth/client';
22
+
23
+ const view = await mountEarthView({
24
+ canvas,
25
+ // ...content, workers
26
+ console: { container: stage }, // `touch: 'always'` shows it on every device
27
+ });
28
+ view.console?.layout; // where everything went
29
+ ```
30
+
31
+ Where the console shows, it takes the place of `touchJoystickContainer`'s plain stick. The flown
32
+ aircraft's dials appear in the chase view only, since the cockpit view has its own; pass
33
+ `gauges: false` to leave them out. `handed: 'left'` mirrors the console, stick on the right.
34
+
35
+ ## Use it with your own renderer
36
+
37
+ `@bendyline/molen-client/console` works with any host that has a `NavigationInputSource` and the
38
+ vehicle's visual. Tell it what the viewer is in with `setSubject`, and call `update` once per frame
39
+ after the frame renders (the dials copy the cockpit's posed meshes):
40
+
41
+ ```ts
42
+ import { createVehicleConsole } from '@bendyline/molen-client/console';
43
+
44
+ const vehicleConsole = createVehicleConsole(stage, { input: input.map, focusTarget: canvas });
45
+ vehicleConsole.setSubject({
46
+ kind: 'aircraft',
47
+ visual, // from createAircraftVisual, posed by you each frame
48
+ spec,
49
+ session: () => cockpitSession(), // the pilot's controls: change({ control, value })
50
+ gauges: view === 'chase',
51
+ });
52
+
53
+ function frame(now: number) {
54
+ // ...simulate, pose the visual, render
55
+ vehicleConsole.update(now);
56
+ }
57
+ ```
58
+
59
+ The subject is an aircraft (`visual`, `spec`, a `session` that applies `applyAircraftControl`), a
60
+ vehicle (`visual` from `createVehicleVisual` and the vehicle's or boat's data), `{ kind: 'walk' }`
61
+ or `{ kind: 'free' }` (a free camera with up and down buttons), or `undefined` to hide it. Calling
62
+ `setSubject` every frame is cheap: the same vehicle keeps its parts.
63
+
64
+ ## What each vehicle shows
65
+
66
+ Each control is drawn from the best source the vehicle has:
67
+
68
+ 1. **Its own part.** The console copies the control out of the model (`AircraftVisual.cockpit`
69
+ lists an aircraft's modeled controls), shares its geometry and materials, and moves the copy
70
+ with the same bindings and readings as the cockpit (`AircraftVisual.signals`,
71
+ `VehicleVisual.signals`). Where a cockpit has two seats, the controls nearest the pilot's eye
72
+ are used.
73
+ 2. **A kit part.** Where the model has no part of its own, or only a placeholder from the bolted-on
74
+ control module, the console draws a generic one: a gear handle with a wheel for a knob and
75
+ gear lamps, a flap lever with a wing-shaped knob and notches, a throttle lever, an engine
76
+ switch, a parking brake, car pedals and a handbrake.
77
+ 3. **The plain stick and buttons.** On foot, on boards and skis, and for anything without a lever.
78
+
79
+ | Vehicle | Left | Right | Middle |
80
+ | --- | --- | --- | --- |
81
+ | Airplane | stick or yoke, rudder pedals | throttle, gear, flaps, engine, brakes, parking brake; mixture, propeller, speed brake and nozzle behind the drawer on a phone | airspeed and altitude dials in a chase view |
82
+ | Helicopter | cyclic, pedals | collective, engine | dials in a chase view |
83
+ | Car | steering wheel, pedals | handbrake | |
84
+ | Motorcycle, bicycle, snowmobile | handlebars | brake | |
85
+ | Boat | helm | anchor | |
86
+ | On foot | plain stick | jump, use | |
87
+
88
+ Mounted, two buttons at the top corner change the view and leave the vehicle.
89
+
90
+ ## Controls
91
+
92
+ - **Stick, wheel and handlebars** are the touch stick (`createTouchJoystick`, drawn invisible
93
+ under the vehicle's part): `nav-forward`, `nav-back`, `nav-left`, `nav-right`.
94
+ - **Levers** follow the thumb's travel from where it landed, so touching one never makes it jump.
95
+ The throttle stays where it is left, and moves every engine's lever together.
96
+ - **The gear handle** is a throw: drag it past halfway. On the ground the aircraft refuses it, and
97
+ the handle shakes.
98
+ - **Flaps** settle on up, half and full.
99
+ - **Rudder pedals** slide sideways and center when the thumb lifts (`nav-yaw-left`,
100
+ `nav-yaw-right`).
101
+ - **Switches** (engine, parking brake) toggle on a tap. **Brakes**, the car's pedals, the
102
+ handbrake and the anchor work while held (`nav-jump`, `nav-sprint`).
103
+
104
+ Each control captures its own pointer, so the stick and the throttle work at the same time. The
105
+ zones refocus the canvas when touched, so keys keep working on a device with both.
106
+
107
+ ## Layout
108
+
109
+ The console fills its container and passes touches through between controls. It places controls
110
+ by importance:
111
+
112
+ - **The bottom row.** The stick goes in the bottom-left corner (its touch box keeps the plain
113
+ stick's size and place, 144 pixels at 24 pixels in), and the throttle goes at the right edge,
114
+ with the handles in from it.
115
+ - **The dials** go between, when they fit.
116
+ - **A landscape phone** keeps one row. What does not fit waits behind a "more controls" button at
117
+ the top.
118
+ - **A portrait phone or a tablet** (shorter side 600 pixels or more, parts a quarter larger) takes
119
+ a second row.
120
+
121
+ It publishes the room it takes as CSS custom properties on the container, so a page can lay out
122
+ around it:
123
+
124
+ | Property | Meaning |
125
+ | --- | --- |
126
+ | `--molen-console-height` | height of the strip from the bottom edge |
127
+ | `--molen-console-left`, `--molen-console-right` | width it takes along the bottom from each side |
128
+ | `--molen-console-buttons` | width of the button cluster in the top corner |
129
+
130
+ ```css
131
+ #help { bottom: calc(26px + var(--molen-console-height, 0px)); }
132
+ ```
133
+
134
+ To keep clear of a phone's notch and home indicator, set `--molen-console-inset-left`, `-right`,
135
+ `-top` and `-bottom` on the container, for example to `env(safe-area-inset-left)`.
136
+
137
+ ## Drawing and cost
138
+
139
+ All parts draw into one transparent canvas along the bottom edge through one small WebGL context of
140
+ its own, not the main renderer. It draws only when something moved, faded or changed size, and
141
+ the dials at most 20 times a second; a console nobody touches costs no draws. Each part is a small
142
+ scene with its own camera: the throttle, handles and switches face you head-on from the
143
+ operator's seat, a little from above so a lever's travel shows (the kit's panels slope back to
144
+ face you square, the gear knob a wheel and the flap knob a wing toward you); the stick from the
145
+ seat behind it; pedals from the seat, low enough that their pads face you. A thin dark outline keeps parts readable over bright sky and
146
+ snow. `prefers-reduced-motion` turns off the fades.
147
+
148
+ Without WebGL the controls still work, drawn as labelled outlines, with the two-circle stick.
149
+
150
+ ## Gotchas
151
+
152
+ - Call `update` after the frame renders: the dials copy world matrices the render poses.
153
+ - A copied part starts from the pose its bindings move it from, recorded when the visual was
154
+ created, so it is right even if the live part has moved since.
155
+ - A stick, yoke or pair of pedals always moves the way the thumb does: forward for nose down,
156
+ the right pedal forward for right rudder. The console measures each copy against the
157
+ convention in the [vehicle interiors guide](vehicle-interiors.md) and reverses a channel a model
158
+ binds the other way, so the console can move where a model's own cockpit does not.
@@ -605,6 +605,24 @@ and `dispose()`. `signals` feeds the interior and `vehicle.visual.animation` bin
605
605
  them keep the wheels planted. The camera helper accepts a transform, `vehicle.spec`, view, look offsets, and an
606
606
  optional obstruction-distance callback.
607
607
 
608
+ The driven vehicle casts its sun shadow from a map of its own, which travels with it: hosts pass
609
+ `EarthVehicles.shadowSubject` (the mounted vehicle's model and its measured sphere, `undefined`
610
+ on foot) to `renderer.setShadowSubject` each frame. The sun's main map is fixed to the ground, and
611
+ a car at speed lands on different texels of it every frame, so its shadow on the road changed
612
+ shape as it drove; from its own map the shadow holds still, in the chase view and in the cabin.
613
+ See [the sky guide](sky.md) for the map itself. WebGL only: `setShadowSubject` returns false on
614
+ WebGPU, and the rule below applies there instead.
615
+
616
+ Without that map, while the view is from a vehicle's own seat (the cockpit view), hosts pass
617
+ `renderer.shadowTexelSize` to that vehicle's `visual.updateShadows(texel)` each frame, and
618
+ `undefined` for every other vehicle and view. From the seat the dashboard is under a meter away,
619
+ and the vehicle's roof, pillars and doors shaded it in blocks that jumped as it drove across the
620
+ sun shadow map's texel grid (a driving view's map spans hundreds of meters, 0.14 m texels on
621
+ High). Coarser than 0.027 m, the vehicle casts no sun shadow; at 0.025 m or finer it casts
622
+ again. It still receives shadows from terrain, buildings, trees, other vehicles and clouds.
623
+ `EarthVehicles` does this for the mounted vehicle from its `shadowTexel` field, which the Earth
624
+ view and the world explorer set each frame (to `undefined` while the vehicle has its own map).
625
+
608
626
  Surface objects expose `userData.vehicles: VehiclePlacement[]`; each record has an `id`, external
609
627
  type `kind`, `color`, resolved `spec`, absolute metric `position`, and `yaw`, with optional
610
628
  terrain-alignment `pitch` and `roll`. IDs derive from world-space bay positions rather
@@ -130,6 +130,16 @@ pinpoint errors with did-you-mean hints for palette names. The sections:
130
130
  square plans). Roofs are built per wing: an L becomes two gable wings meeting in a valley.
131
131
  Outlines that do not decompose, cut pieces at tile edges, and anything beyond `maxWingSpan` fall
132
132
  back to flat (with a parapet when the choice has one) or, for small irregular plans, a skillion.
133
+ A parapet is drawn no taller than 0.9 m (`MAX_PARAPET_HEIGHT`) whatever the choice asks for, so
134
+ a walker who lands on a flat roof can jump onto it and over; under a mapped `height` the wall
135
+ below keeps whatever the parapet gives up. With `fallback: 'hipped'` a footprint the chosen
136
+ pitched form cannot cover (an irregular plan, a block round a courtyard, a hall wider than
137
+ `maxWingSpan`) takes slopes rising from every wall to a level deck instead of going flat, and
138
+ under a `mansard` choice the slopes are the steep lower pitch. A plan too thin to inset keeps
139
+ the flat or skillion roof. `partyRidge` turns the ridge of a building that shares walls with
140
+ its neighbours (a request's `partyEdges`): `between` runs it from party wall to party wall,
141
+ eaves to the street, and `along` runs it along them, a gable to the street. Such a roof is
142
+ gabled, since a hip would slope down onto the neighbours.
133
143
  - `facade`: bay widths, window rhythm, base bands, and cornice. Windows and trim are generated
134
144
  geometry with cell UVs for glass and metric UVs for solid materials.
135
145
  - `materials` and `palettes`: one weighted material choice per part (wall, roof, trim, foundation,
@@ -155,7 +165,9 @@ default pack asserts a mean luminance of at least 0.55 for every tinted material
155
165
 
156
166
  A material choice may name its own `palette`, which replaces the part's palette when that choice
157
167
  is picked. The material and the color are otherwise independent picks, so without it a brick wall
158
- can draw a concrete grey and a concrete panel can draw brick red. `materials.flatRoof` is an
168
+ can draw a concrete grey and a concrete panel can draw brick red. A choice may also carry its own
169
+ `uvScale`, so a style that mixes brick, render and boarding draws each at its own course and
170
+ board size instead of stretching all three to the part's scale. `materials.flatRoof` is an
159
171
  optional roof material used only when the style resolves a flat roof (a flat choice or the
160
172
  wide-footprint fallback). A pitched style keeps shingles or tile on its slopes and puts light
161
173
  membrane or gravel on its flat tops. Tile-edge cuts and dropped roof shapes keep `roof`, so a
@@ -172,6 +184,20 @@ storefront mullions, and projecting bands with exposed upper and lower faces. St
172
184
  frames remain open at every tier; simplified frames omit depth and hidden faces to conserve the
173
185
  geometry budget. Shared linear-filtered worldgen textures use mipmaps and anisotropic filtering.
174
186
 
187
+ `facade.details` adds near-detail ornament fitted to the live outline: an `entrance`, `shutters`,
188
+ `cornerBoards`, `balconies`, `framing`, `awnings`, a `veranda`, and a `porch` (a step in front of
189
+ the entrance under a small canopy on two posts, 44 vertices, on the seeded `probability` share of
190
+ the style's buildings). `paint` lists the colors a building paints its shutters and door leaf,
191
+ one drawn per building; without it they take the trim darkened.
192
+
193
+ A request's `partyEdges` names the outline edges it shares with a neighbouring building. The
194
+ walls are built, since neighbours differ in height, but take no windows, bands, ornament,
195
+ storefront or entrance, and no interior opening. A request's `crown` adds what a building is
196
+ known by from a distance, in the style's own wall and roof materials: a square tower under a
197
+ `spire` or a low-capped `belfry` at one end of the long axis, a `dome` on a drum over the middle,
198
+ a `minaret` at a corner, or a stepped `shikhara`. A crown is sized from the footprint, stands
199
+ inside it, and is omitted on one narrower than 3.5 m.
200
+
175
201
  `props` attach pack or builtin models: `roof-ridge` walks the ridge of the dominant wing
176
202
  (chimneys), `roof-flat` fills a flat roof with `margin` from every edge (rooftop units),
177
203
  `roof-edge` lines the outer edges at the parapet (canales), and `ground-any` sets models on the
@@ -253,7 +279,13 @@ tussock) and `builtin:groundcover.fern`, each under 70 triangles, plus small shr
253
279
  A rule joins it with `"layer": "groundcover"`, which gives it its own instance and model budget
254
280
  (`maxGroundCoverInstances`, `maxGroundCoverModels`), so thousands of clumps never thin the trees
255
281
  or take their model slots. Ground cover models draw only at the near level; the medium and far
256
- levels are empty, so the clumps fade out about 400 meters away instead of shimmering. The Earth
282
+ levels are empty, so the clumps stop drawing at 65% of the distance a shrub would hand over to
283
+ its medium level (about 165 meters from a batch's edge at High on a 1080-line view) instead of
284
+ shimmering. `"layer": "understory"` and `"layer": "garden"` are two more pools with budgets of
285
+ their own (`maxUnderstoryInstances`, `maxGardenInstances` and their `…Models`): shoulder-height
286
+ wild brush, and planted ground such as yards and park borders. The garden pool keeps models by
287
+ role, each rule's commonest species first, and chooses them separately in each quarter of the
288
+ batch, which is how a host draws them. The Earth
257
289
  adapter labels land that no map polygon covers `open_ground` (the `OPEN_GROUND_LABEL` export), as a
258
290
  tile-wide polygon that every mapped polygon paints over, so verges and unmapped meadows can carry
259
291
  ground cover too. The default packs place it in meadows, parks, yards, forest floors and open
@@ -323,6 +355,80 @@ styles prefer pitched roofs through three floors and flat roofs from four upward
323
355
  style also allows flat roofs on low buildings. Wide, clipped, or unsuitable footprints can still
324
356
  require a flat roof for geometric reasons.
325
357
 
358
+ ### Rows, shops and places of worship
359
+
360
+ A map draws a terrace or an old town's block as footprints that touch, and nothing in it says so.
361
+ The adapter probes every outline edge of a ground-standing mapped building: an edge whose far
362
+ side, 0.6 m out at three points along it, lies inside another building's footprint is a party
363
+ wall. Those edges become the request's `partyEdges`. A building of at least 40 m² that gives
364
+ 22% of its outline to neighbours (the end house of a terrace gives a quarter, a house with a
365
+ garage against it a seventh) also gains the `attached` label (`ATTACHED_LABEL`), which the
366
+ regional rules send to their row-house styles. A mapped part and what remains of its building
367
+ are one building, not each other's neighbours; generalized footprints, a host's buildings and
368
+ inferred ones take no part. `associatePartyWalls(pieces, tileSize)` and `isAttached` are
369
+ exported for other pipelines.
370
+
371
+ A recognized business gives its building a frontage and a sign. Whether it also replaces the
372
+ building depends on the region. A regional profile with a style rule for the class `shop_shell`
373
+ (`SHOP_SHELL_CLASS`; the default catalog's North American, Southwest and neutral profiles) builds
374
+ every low building with a business as a store, as an arterial strip is. Elsewhere the building
375
+ stays its region's unless it is purpose-built: free-standing on retail or commercial land, a
376
+ catalog chain's own building, or a single footprint of 600 m² or more. A shop in a row or under
377
+ flats keeps its walls and roof.
378
+
379
+ A POI that names a whole building (a hotel, a museum, a library, a theatre, a civic office)
380
+ changes its inside at any size and its outside only from the size of one: 900 m² or a mapped
381
+ 15 m for a lodging, 400–500 m² for the others. A guest house in a town house stays a town house.
382
+ Size alone is not enough in an old town, where a hotel, a school or a museum occupies a building
383
+ of the street: a footprint that is one of a row with no height mapped keeps its region's
384
+ exterior, and so does one that holds four other businesses or a second institution, since old
385
+ centers are often mapped a block to an outline (`BuildingUseEvidence.shared`).
386
+
387
+ ### How tall an unmeasured building is
388
+
389
+ A basemap carries a height or a level count for about one building in ten, and in many towns
390
+ for none (of 37 town tiles surveyed in November 2026, 21 had heights on 2% of their buildings or
391
+ fewer). Storeys therefore come from four places, in this order:
392
+
393
+ 1. **A mapped height.** The wall and roof fill it exactly; the style's storey height decides how
394
+ many rows of windows that is, and the rows are stretched to fit.
395
+ 2. **Mapped levels.** That many rows, at the style's storey height.
396
+ 3. **A dense-district prior** (`districtLevels`): an unmeasured block of 250 m² or more on ground
397
+ that footprints cover by a third or more, on commercial land or none, rises from 3 toward 10
398
+ levels as the cover does.
399
+ 4. **The style's fallback** (`massing.heightFallback`).
400
+
401
+ The last two are guesses, and a guess is bounded by its surroundings. `measuredStoreys(tile,
402
+ size)` reads how tall a place is built from its own map: the storeys four in five of its
403
+ measured buildings stay within, once at least eight footprints of 60 m² or more carry a height
404
+ or a level count (a smaller one is a mast or a minaret). `guessCeiling` is that figure or the
405
+ region's ordinary block of flats, whichever is greater: the upper end of the fallback of the
406
+ style the region's rules give a block of flats, three storeys in the Cyclades and five in
407
+ Naples. The district prior stops at the ceiling, and every mapped building with neither a height
408
+ nor levels carries it as the request's `fallbackLevelsMax`, which the recipe applies to a
409
+ fallback in levels (a hall's fallback in meters is one tall room and is left alone). A use says
410
+ what a building is for, not how tall it is: the hotel style's own fallback is five to twelve
411
+ storeys, and without the ceiling five lodgings in Mykonos were drawn seven storeys or taller
412
+ and one in Chefchaouen twelve.
413
+ Dense ground alone is not a downtown either; a medina covers as much of its ground at two
414
+ storeys. Where a core's towers are measured, its unmeasured blocks still rise with them.
415
+
416
+ A mapped height is the wall's height, not always a count of floors. `shaftLevels(height, area)`
417
+ recognizes a shaft: a whole building of under 250 m² (the plate a regional profile asks of its
418
+ tower style) standing 20 m or more and five and a half times its footprint's side, as a bell
419
+ tower, a tower house, a minaret, a chimney or a lighthouse does. It is drawn with a tier of
420
+ openings every 11 m in its region's masonry. Divided into storeys, the Torre del Mangia (102 m
421
+ on 21 m²) was 29 floors of flats. A slender part of a larger tower is that tower's and keeps
422
+ its storeys, and so does a building whose levels the map counts.
423
+
424
+ A place of worship takes its region's `worship` style and a crown from its religion, which the
425
+ basemap carries as the POI's `kind_detail`: `worshipCrowns(religion, regionId, areaM2)` returns a
426
+ dome for Orthodox and Oriental churches (by region), a spire or a belfry for Western ones, a dome
427
+ and a minaret for a mosque, a stepped tower for a Hindu or Jain temple, and nothing for
428
+ traditions told by their roof and walls alone. A footprint from 25 m² is recognized when it
429
+ carries the POI's id or holds its point alone; a hall up to 3,000 m² when the point is the only
430
+ business in it. These are the commonest forms for a region, not a record of the building.
431
+
326
432
  ### Inferred buildings where outlines are missing
327
433
 
328
434
  Earth views enable neighborhood building infill by default. `mountEarthView` and
@@ -359,6 +465,19 @@ edges: 650 meters of road in the full window, or 300 meters with explicit suitab
359
465
  Highways, paths, service roads, bridges and tunnels do not establish demand. Mapped buildings keep
360
466
  priority in the shared rendering budgets.
361
467
 
468
+ A house in a yard is one street pattern among several. The regional house style's optional
469
+ `lots` says how the lots it invents line a street: `rows` is the share of blocks built as rows,
470
+ fronts wall to wall at the back of the footway; `units` how many fronts stand to each 16 m of
471
+ frontage (three is a 5.3 m tube house, one a 16 m front); `setback`, `depth` and `levels` their
472
+ ranges; `gap` the share of frontages left open; and `compact` fills a detached lot's frontage
473
+ close to the street. A block of 128 m is rows or yards as a whole, so one street keeps one
474
+ pattern, and within a row the storeys and rear walls step from house to house while the fronts
475
+ hold the street line. Each front is its own building with its own door and path, its side walls
476
+ are party walls (`partyEdges`), and its style is the one the region's rules give the label
477
+ `terrace`. The default catalog builds rows in most of the world: a Moroccan medina, a British
478
+ terrace, Hanoi's tube houses and a Mexican street of continuous fronts are not suburbs. North
479
+ America, Australia and the Pacific keep houses in yards.
480
+
362
481
  The regional style's optional `lotPlans` weights select reusable, resizable plans: `cottage`
363
482
  (recessed porch), `ranch` (L-shaped), `front-garage`, `side-garage`, `courtyard`, `compact`, and
364
483
  `shopfront`. `createLotBuildingPlan(shape, width, depth)` is exported by worldgen's kernel for
@@ -493,7 +612,15 @@ plants on it unless a pack names its class.
493
612
  numbers are sized for real footprints: a zoom-15 suburb puts 800 to 1,600 houses in a zoom-14
494
613
  tile, and a downtown about 1,700 footprints and parts.
495
614
 
496
- A batch spends its budget in priority order, largest footprints first. First every building gets
615
+ A batch spends its budget in priority order, largest footprints first. That suits a view from the
616
+ air; for someone on the ground the buildings that matter are the nearest. `WorldgenBatchInput.focus`
617
+ (`{ x, z, radius }` in the buildings' frame) queues the buildings within `radius` of a viewer
618
+ nearest first, ahead of every other, so the same budget details and opens the doors of what the
619
+ viewer can walk up to. The Earth renderers set it themselves: once the position passed to
620
+ `updateInteriors` is down among the buildings and moving at a walk, the finest tiles within 90 m
621
+ are regenerated round it, and again each 36 m it moves (never while it is inside a building, and
622
+ the tile shown stays until its replacement is ready). In a dense Seattle tile of 1,091 buildings,
623
+ where the largest 75 were detailed, that details the nearest 148, out to 140 m. First every building gets
497
624
  walls and its roof shape (the style's coarsest tier); only when even that does not fit does a
498
625
  building become an instanced stand-in. Then buildings gain a simplified facade while it fits, then
499
626
  the largest (`detailedCount`) gain full detail. The simplified facade preserves the authored
@@ -539,7 +666,9 @@ cells draw only their active LOD; keep `maxPropModels` small because each model
539
666
  visible cell. The per-tile placement budgets still bound the resident instance data. Balanced quality
540
667
  allows 6,000 nearby placements, 2,400 one level below, and 800 two levels below. Economy uses
541
668
  2,200 / 800 / 200; high uses 9,000 / 3,600 / 1,200. Ground cover has its own budget on the finest
542
- level only: 5,000 placements and 3 models at Balanced, 8,000 and 4 at High, none at Economy.
669
+ level only: 6,500 placements and 7 models at Balanced, 10,000 and 10 at High, none at Economy.
670
+ Planted ground (the `garden` layer) has 5,000 placements and 9 models at Balanced and 9,000 and
671
+ 14 at High on the finest level, a few hundred one level below, and 700 and 3 at Economy.
543
672
  The forest rules fill nearby crowns while
544
673
  understory is limited to the finest tier; parks and yards retain lower densities and all
545
674
  placements retain road, building, and water clearances.
@@ -603,8 +732,10 @@ more triangles a frame, and 1.9 ms more main thread, so it is off unless a host
603
732
  optional fourth, horizon model (`ModelLibrary.prepare(ref, 'horizon')`): a conifer's far level
604
733
  keeps three plain skirts, so a stand of firs is not a field of cones from a few hundred meters,
605
734
  and hands over to the one-cone horizon model where 2.5 m of error fits the budget (about 930 m
606
- at 2.5 pixels on a 1080-line view). For every other model the horizon model is the far model
607
- and adds no level. That handover reads the policy's `horizonPixelError` (default
735
+ at 2.5 pixels on a 1080-line view). A broadleaf or mangrove tree in leaf, 2.5 m or taller, has
736
+ one too: its far crown with fewer faces and no trunk (30 triangles for 56), reaching a little
737
+ further and a little lighter so that a wood keeps its cover and tone where the two levels meet.
738
+ For every other model the horizon model is the far model and adds no level. That handover reads the policy's `horizonPixelError` (default
608
739
  `maxPixelError`): a host that relaxes `maxPixelError` with camera height, to shed leaf cards,
609
740
  keeps `horizonPixelError` at its base value, or every conifer under an aircraft is the cone. A
610
741
  batch within a quarter of a handover's distance asks for the material across it, so its shaders
@@ -639,7 +770,12 @@ changes and disposing when the entity goes away.
639
770
  - Protomaps business identity comes from optional POIs at the finest detail level. Buildings mostly carry `kind: building`; rules lean on footprint metrics, height
640
771
  presence, and the surrounding land use. Context is available when land use and buildings share
641
772
  one archive (the Sammamish package does).
642
- - Roofs of clipped tile-edge pieces are flat; secondary wings share the main eave height.
773
+ - Roofs of clipped tile-edge pieces are flat; secondary wings share the main eave height. The
774
+ hipped fallback ends in a level deck, not ridges: there is no straight skeleton.
775
+ - Party walls are found between separately mapped footprints. A terrace mapped as one long
776
+ outline is still one building under one roof.
777
+ - Crowns are five forms, placed by rule (a tower at one end, a dome over the middle), not where
778
+ the real building has them.
643
779
  - Windows are surface quads, not openings; dormers and setbacks are declared in the format but not
644
780
  built yet; the `wall-any` prop anchor places nothing yet. `ground-any` props do not know where
645
781
  driveways and paths run, so on a lot that is paved to the wall one can stand on the paving.
@@ -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.12. 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.13. 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
 
@@ -33,6 +33,7 @@ downloads them into a project and pins them in project.json.
33
33
  - [Browser mount](guide/browser-mount.md): `buildWorld` in a Worker + `await mountExperience` on the page; events and state for HUDs.
34
34
  - [Input profiles and joysticks](guide/input.md): keyboard/controller remapping, raw axes, walking/driving/flying profiles, analog commands, and optional React controls.
35
35
  - [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.
36
+ - [Vehicle console](guide/vehicle-console.md): touch controls drawn as the vehicle's own (the P-51's stick, rudder pedals and throttle, kit gear and flap handles, the aircraft's dials; a car's wheel and pedals) in one see-through strip; `createVehicleConsole` and the Earth view's `console` option, subjects, layout and the CSS properties to lay out around it.
36
37
  - [World markers](guide/markers.md): screen-sized photo pins and labels pinned to world positions, ground-snapped, occluded, faded, budgeted and pickable.
37
38
  - [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; `overrides` replace a rectangle of the mapped world (a landmark, a block) with the host's own buildings, models, props, people, vehicles and scene, at mount or while the view runs.
38
39
  - [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.