@bendyline/molen-tooling 0.0.14 → 0.0.16
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.
- package/dist/capture/harness.js +736 -400
- package/dist/capture/worldgen-preview.js +409 -298
- package/dist/docs-src/guide/3d-art-guidelines.md +5 -2
- package/dist/docs-src/guide/adaptive-performance.md +50 -23
- package/dist/docs-src/guide/aircraft.md +275 -31
- package/dist/docs-src/guide/ambient-life.md +36 -9
- package/dist/docs-src/guide/building-interiors.md +92 -8
- package/dist/docs-src/guide/determinism.md +1 -1
- package/dist/docs-src/guide/dioramas.md +7 -0
- package/dist/docs-src/guide/earth-view.md +198 -16
- package/dist/docs-src/guide/entities.md +38 -7
- package/dist/docs-src/guide/figures.md +32 -4
- package/dist/docs-src/guide/graphics-performance.md +62 -19
- package/dist/docs-src/guide/livery-catalog.md +137 -1
- package/dist/docs-src/guide/livery-gallery.md +136 -1
- package/dist/docs-src/guide/medium-fi.md +194 -10
- package/dist/docs-src/guide/night-lighting.md +10 -0
- package/dist/docs-src/guide/regional-fleets.md +27 -5
- package/dist/docs-src/guide/regional-world.md +19 -1
- package/dist/docs-src/guide/rendering-backends.md +23 -2
- package/dist/docs-src/guide/sky.md +28 -2
- package/dist/docs-src/guide/snow.md +231 -0
- package/dist/docs-src/guide/surface-rendering.md +324 -9
- package/dist/docs-src/guide/terrain.md +84 -9
- package/dist/docs-src/guide/vehicle-interiors.md +6 -0
- package/dist/docs-src/guide/vehicles.md +368 -45
- package/dist/docs-src/guide/weather.md +7 -1
- package/dist/docs-src/guide/worldgen.md +82 -3
- package/dist/docs-src/llms.txt +3 -2
- package/dist/docs-src/schemas/README.md +1 -0
- package/dist/docs-src/schemas/components.md +749 -12
- package/dist/docs-src/schemas/figure.md +30 -4
- package/dist/docs-src/schemas/interior-catalog.md +56 -3
- package/dist/docs-src/schemas/map-overrides.md +658 -0
- package/dist/docs-src/schemas/structure-placement-data.md +195 -0
- package/dist/docs-src/schemas/structure-placements.md +195 -0
- package/dist/docs-src/schemas/worldgen-batch.md +54 -0
- package/dist/templates/city-courier/gen/molen-types.ts +113 -4
- package/dist/templates/city-courier/scripts/molen-scripts.d.ts +112 -3
- package/dist/templates/figures-gallery/test/headless.test.ts +3 -2
- package/dist/templates/index.json +17 -17
- package/dist/templates/skybound/gen/molen-types.ts +113 -4
- package/dist/templates/skybound/scripts/molen-scripts.d.ts +112 -3
- package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +112 -3
- package/dist/templates/top-down-arena/src/gen/molen-types.ts +113 -4
- package/package.json +12 -12
|
@@ -141,16 +141,22 @@ do not change residency behavior. HTTP 404 is a stable missing tile; call `retry
|
|
|
141
141
|
the backing data has changed. A *thrown* error is not: a dropped range request, a 503, or a CORS
|
|
142
142
|
failure is retried with bounded exponential backoff (`maxRetries`, `retryDelayMs`,
|
|
143
143
|
`maxRetryDelayMs`) before the tile is abandoned, and every request carries a `requestTimeoutMs`
|
|
144
|
-
deadline so a stalled connection cannot hold a concurrent load slot.
|
|
145
|
-
`
|
|
146
|
-
|
|
144
|
+
deadline so a stalled connection cannot hold a concurrent load slot. An abandoned tile is set aside,
|
|
145
|
+
not dropped: after `failedRetryDelayMs` (15000 ms by default, doubling with each further failure up
|
|
146
|
+
to eight times as long) the first `update()` that still wants it tries again, so an outage longer
|
|
147
|
+
than the quick retries leaves no permanent holes once it is over. Set it to 0 or Infinity to keep
|
|
148
|
+
abandoned tiles until `retryFailed()`. `stats()` counts `missing` and `retrying` separately from
|
|
149
|
+
`failed`, and `tileFailures()` reports each tile's state, attempts, and next attempt time, so a host
|
|
150
|
+
can tell a user "still retrying" rather than "gave up".
|
|
147
151
|
|
|
148
152
|
The pyramid streamer applies the same retry policy to semantic layer generation and GPU
|
|
149
153
|
preparation, with a separate `layerTimeoutMs` deadline (120000 ms by default; 0 or Infinity disables
|
|
150
154
|
it). This allows CPU-heavy generation and software shader compilation more time than height
|
|
151
155
|
requests. A stalled layer releases its load slot, and late cancelled results are disposed.
|
|
152
156
|
`stats().retryingLayers` and `stats().failedLayers` report those failures independently from height
|
|
153
|
-
tiles
|
|
157
|
+
tiles. An abandoned layer is tried again after the same `failedRetryDelayMs`, so a lake whose water
|
|
158
|
+
failed to load fills in on its own; `retryFailed()` retries tiles and layers at once. Disabling a
|
|
159
|
+
layer or evicting its tile clears its failure state.
|
|
154
160
|
|
|
155
161
|
Adjacent tiles share their border heights, and the streamer keeps their border *normals* continuous
|
|
156
162
|
too: each side recomputes its edge from the neighbouring tile's heights once that neighbour is
|
|
@@ -177,8 +183,13 @@ movement trigger coherent grid-snapped rebases for every engine-owned object aut
|
|
|
177
183
|
`terrainStreamBudgetForQuality('economy' | 'balanced' | 'high')` returns portable residency and
|
|
178
184
|
concurrency budgets. `stream.stats()` reports decoded samples, geometry bytes, triangles, draw
|
|
179
185
|
calls, instances, loading/failure counts, and evictions for live quality diagnostics. It walks
|
|
180
|
-
|
|
181
|
-
`stream.loading()` (tiles and layers loading now) and `stream.pressure()` are constant-time.
|
|
186
|
+
the displayed tiles' objects to count them, so call it for diagnostics, not every frame:
|
|
187
|
+
`stream.loading()` (tiles and layers loading now) and `stream.pressure()` are constant-time. On the
|
|
188
|
+
pyramid stream, `stats()` also counts `builtTiles`/`builtLayers` and how many of those repeated an
|
|
189
|
+
earlier build (`rebuiltTiles`/`rebuiltLayers`), which is the cache missing. `stream.viewCoverage`
|
|
190
|
+
reports how finished the view is by distance, a tile count per band of tiles `complete`, drawn from
|
|
191
|
+
another level (`stale`), drawn with layers missing (`bare`) and undrawn (`empty`), and the
|
|
192
|
+
`onLayerTiming` option reports where each layer's build time went.
|
|
182
193
|
|
|
183
194
|
## 4. Screenshot it headlessly
|
|
184
195
|
|
|
@@ -381,8 +392,41 @@ detail (`peripheralDetail`, default 0.4, weighs their error), with hydrology pre
|
|
|
381
392
|
turning the camera reveals ground and mapped water that are already there. Buildings and vegetation
|
|
382
393
|
build once the tile is in view. In-flight surface
|
|
383
394
|
requests finish into a bounded warm cache instead of being restarted on every small camera turn;
|
|
384
|
-
hidden cached tiles are evicted only when capacity is needed
|
|
385
|
-
|
|
395
|
+
hidden cached tiles are evicted only when capacity is needed, farthest first in tile widths from
|
|
396
|
+
the camera rather than least recently used, because a circling camera returns to the ground it saw
|
|
397
|
+
longest ago. A hidden tile leaves the scene graph as well as the draw list, so a large cache costs
|
|
398
|
+
memory and no frame time. Sparse descendants also share a bounded decoded-ancestor cache, avoiding
|
|
399
|
+
repeated PNG decode/resample work while panning.
|
|
400
|
+
|
|
401
|
+
Refinement measures a tile's distance from the ground it holds. Until a tile or an ancestor has
|
|
402
|
+
loaded it can reach anywhere in the package's height range, and a camera inside that range has no
|
|
403
|
+
height above it; `tileHeight` on `selectTerrainPyramidTiles` supplies the same knowledge to your
|
|
404
|
+
own selection.
|
|
405
|
+
|
|
406
|
+
A camera that travels gets its tiles before it arrives. The stream follows the track of the
|
|
407
|
+
positions passed to `update`, as a speed and a turn rate, so an aircraft in a steady turn is
|
|
408
|
+
predicted along its arc. No host wiring is needed, and it works for whatever moves the camera.
|
|
409
|
+
|
|
410
|
+
- Work is ordered for where the camera will be when it finishes, so a fast camera does not spend
|
|
411
|
+
its capacity on the ground beneath it. Ground with no layers on it comes before more detail for
|
|
412
|
+
ground that has some.
|
|
413
|
+
- Tiles the track reaches within `lookAhead.seconds` (default 3, 6, 12 and 20) are built hidden
|
|
414
|
+
from spare capacity, with one layer slot kept free and only while the frame queue has no backlog.
|
|
415
|
+
They appear finished when selected, and are the first thing given up under memory pressure.
|
|
416
|
+
- Levels whose tiles the camera crosses in under `lookAhead.minTileSeconds` (default 5) refine
|
|
417
|
+
only near the camera. Each takes `lookAhead.fastDetail` (default 0.25) of the work of a level
|
|
418
|
+
built across the whole view, so the faster the camera, the nearer its finest detail stops.
|
|
419
|
+
Refining the whole view at speed starts far more tiles than the stream can finish, and it then
|
|
420
|
+
finishes little of any. This limits only what is built: finer ground already built stays as
|
|
421
|
+
long as the view would show it at rest, so speeding up or turning does not take detail off the
|
|
422
|
+
screen. `fastDetail: 0` builds none of those levels. Detail spreads out again when the camera
|
|
423
|
+
slows.
|
|
424
|
+
|
|
425
|
+
`lookAhead: false` turns all of this off. A camera has to hold a track for most of a second before
|
|
426
|
+
any of it applies. A teleport starts the track over, and so does a second without an `update`, so a
|
|
427
|
+
host that updates only while the camera moves still gets full detail when it stops. `stats()` reports `aheadTiles`, `aheadReady`,
|
|
428
|
+
`cameraSpeed` and `speedLevel`, and counts ground in view that changed level: `refinedInView` as
|
|
429
|
+
detail arrives, `coarsenedInView` as it is given up, which reads as popping.
|
|
386
430
|
|
|
387
431
|
With `shadows: true` every tile surface and layer mesh receives sun shadows, and layer meshes
|
|
388
432
|
taller than `shadowCasterHeight` (default 1.5 m: buildings, trees, landmarks) cast them. A layer
|
|
@@ -422,7 +466,9 @@ per-tile feature/point limits for other MVT producers.
|
|
|
422
466
|
trees inside forest polygons, combined terrain-draped road ribbons, combined footprint extrusions,
|
|
423
467
|
flat polygonal water, and draped linear waterways. `createTerrainWaterMaterial` provides an opaque
|
|
424
468
|
physical material with optional world-space animation; call `setTerrainWaterTime` each frame to
|
|
425
|
-
advance its highlights without discontinuities across floating-origin shifts.
|
|
469
|
+
advance its highlights without discontinuities across floating-origin shifts. It folds the origin
|
|
470
|
+
into the ripples in double precision, so water stays sharp at planet-scale coordinates. Ripples a
|
|
471
|
+
pixel cannot resolve fade into a broader highlight instead of shimmering. Opaque coverage
|
|
426
472
|
avoids dark overlap seams while adjacent or parent/child water tiles refine. Expensive semantics
|
|
427
473
|
can be level-bounded, toggled without re-decoding resident objects, and disposed with the elevation
|
|
428
474
|
tile. Applications may replace the decoder, renderer, materials, or model geometry independently.
|
|
@@ -567,6 +613,16 @@ Circa 1910 changes the surface treatment of the present-day map; it does not rec
|
|
|
567
613
|
|
|
568
614
|
See [Surface styles and parameterized line features](surface-rendering.md) for the shared rendering API, parking inference rules, budgets, and rail/utility profile examples.
|
|
569
615
|
|
|
616
|
+
Railways are surfaces too: ballasted track beds whose sleepers and rails the pavement material
|
|
617
|
+
draws (so a yard reads as parallel tracks from the air), rails in 3D close up, level crossings
|
|
618
|
+
with their panels, crossbucks, lights and gates, switch stands, color-light signals at mapped
|
|
619
|
+
signal points, lineside signs, platforms and overhead catenary. Which tracks are wired is the
|
|
620
|
+
surface style's `railElectrification`: `'light'` by default (light rail, trams and open-air
|
|
621
|
+
subways), `'all'` where main lines are electrified too, or `'none'`; `railGauge` sets the main
|
|
622
|
+
lines' gauge where it is not standard. World explorer wires Kyoto, Sydney and New Delhi
|
|
623
|
+
throughout, with Kyoto's lines at 1.067 m and New Delhi's at 1.676 m. See
|
|
624
|
+
[Railways](surface-rendering.md#railways).
|
|
625
|
+
|
|
570
626
|
The explorer plans adaptive streaming at 10 Hz, independently of rendering and movement. Covered
|
|
571
627
|
ancestors that were evicted under memory pressure are not reloaded while finer resident tiles
|
|
572
628
|
supply their coverage; coarse coverage remains warm for camera turns. The HUD reports actual
|
|
@@ -577,6 +633,25 @@ Land-cover draping can run off-thread with `createTerrainLandcoverWorkerBridge(w
|
|
|
577
633
|
bridge through `landcoverGenerator`; the caller disposes it after its tiles are disposed. It
|
|
578
634
|
preserves source height samples, terrain triangle alignment, colors, holes, and material settings.
|
|
579
635
|
|
|
636
|
+
Distant tiles can draw land cover as one texture each instead: pass `landcoverRaster` in the
|
|
637
|
+
semantic mesh options (`TerrainLandcoverRasterOptions`) and a shared
|
|
638
|
+
`createTerrainGroundTextureMaterialAsync({}, renderer.backend)` as `materials.landcoverRaster`
|
|
639
|
+
(`createTerrainGroundTextureMaterial()` is its synchronous WebGL form; keep the material's origin
|
|
640
|
+
current with `setTerrainGroundOrigin`, as for the ground). Tiles at least `minDepth`
|
|
641
|
+
levels coarser than the pyramid's finest (default 2) then paint their classes into a `size`
|
|
642
|
+
texture (default 256 texels across) and draw it on a copy of the tile's own terrain grid, cut by
|
|
643
|
+
shorelines and model openings like the draped mesh. Each class takes the color the draped mesh
|
|
644
|
+
settles to with distance: crop rows and shrub crowns at their mean. The tile's mapped roads and
|
|
645
|
+
building footprints are painted over the classes (`features`, default on), each texel by the
|
|
646
|
+
share of it they cover, so a town past the range of road and building geometry still reads as
|
|
647
|
+
one; `canopy` tints wooded classes on tiles past the range a host places trees in. The draped
|
|
648
|
+
mesh clips every polygon to the terrain grid and carries 88 bytes a vertex for crop rows, class
|
|
649
|
+
blends and ground detail, none of which shows from kilometers away: over Bellevue at Balanced
|
|
650
|
+
detail it was 1.9 of a view's 4.8 million triangles and 208 of its 671 MiB of visible geometry,
|
|
651
|
+
and its slowest layer to build. With the texture on tiles from two levels down, the same view
|
|
652
|
+
draws 2.5 million triangles and holds 276 MiB, and a flight that had filled its 2 GiB cache and
|
|
653
|
+
evicted 79 tiles stayed at 1.2 GiB and evicted none. The worker bridge builds either form.
|
|
654
|
+
|
|
580
655
|
|
|
581
656
|
Runtime quality controllers can call `stream.setBudget(partialBudget)` with measured screen-space
|
|
582
657
|
error, view distance, selected/resident tile ceilings, concurrency, and optional `maxResidentBytes`.
|
|
@@ -89,6 +89,12 @@ before adding labels and small switches. Record calibration and differences, inc
|
|
|
89
89
|
depths or variant mismatches. If suitable interior references cannot be found, document the
|
|
90
90
|
search and mark the affected geometry as approximate; do not infer approval from exterior QA.
|
|
91
91
|
|
|
92
|
+
Measure each aircraft from the seat as well. `node packages/entities/scripts/cockpit-sweep.mjs
|
|
93
|
+
--ids=<slug>` casts rays from `pilotEye` and reports head clearance, where the seat sits under the
|
|
94
|
+
eye, the view over the nose, and whether the attitude display is in frame. Then look at a seat
|
|
95
|
+
render: world-explorer enters the cockpit 10.3 degrees below level, and Earth view enters level, so
|
|
96
|
+
check the frame the pilot gets. `content/entities/PROPORTION-REVIEW.md` lists each column and limit.
|
|
97
|
+
|
|
92
98
|
Aircraft generators accept `--out /path/to/candidate.glb` for reviewing changes without
|
|
93
99
|
overwriting the master or baseline. Import an approved master with `molen asset import`, update
|
|
94
100
|
the source manifest hash, and run the entity package's `generate` command for aggregate types.
|