@bendyline/molen-tooling 0.0.11 → 0.0.13
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 +682 -293
- package/dist/capture/worldgen-preview.js +396 -298
- package/dist/cli.mjs +2 -2
- package/dist/docs-src/guide/3d-art-guidelines.md +34 -10
- package/dist/docs-src/guide/3d-model-assets.md +27 -2
- package/dist/docs-src/guide/adaptive-performance.md +42 -7
- package/dist/docs-src/guide/aircraft.md +249 -27
- package/dist/docs-src/guide/ambient-life.md +28 -5
- package/dist/docs-src/guide/audio.md +19 -5
- package/dist/docs-src/guide/boats.md +9 -4
- package/dist/docs-src/guide/boost-mode.md +64 -0
- package/dist/docs-src/guide/building-interiors.md +7 -2
- package/dist/docs-src/guide/determinism.md +1 -1
- package/dist/docs-src/guide/dioramas.md +17 -4
- package/dist/docs-src/guide/earth-view.md +225 -24
- package/dist/docs-src/guide/entities.md +87 -5
- package/dist/docs-src/guide/figures.md +31 -7
- package/dist/docs-src/guide/graphics-performance.md +203 -24
- package/dist/docs-src/guide/input.md +34 -1
- package/dist/docs-src/guide/liveries.md +167 -0
- package/dist/docs-src/guide/livery-catalog.md +2659 -0
- package/dist/docs-src/guide/livery-gallery.md +2684 -0
- package/dist/docs-src/guide/medium-fi.md +279 -27
- package/dist/docs-src/guide/navigation.md +5 -2
- package/dist/docs-src/guide/night-lighting.md +96 -0
- package/dist/docs-src/guide/project.md +6 -1
- package/dist/docs-src/guide/recognizable-places.md +6 -0
- package/dist/docs-src/guide/regional-fleets.md +94 -0
- package/dist/docs-src/guide/regional-world.md +19 -6
- package/dist/docs-src/guide/rendering-backends.md +6 -2
- package/dist/docs-src/guide/sky.md +36 -3
- package/dist/docs-src/guide/structure-library.md +4 -1
- package/dist/docs-src/guide/surface-rendering.md +276 -2
- package/dist/docs-src/guide/terrain.md +43 -0
- package/dist/docs-src/guide/typography.md +105 -0
- package/dist/docs-src/guide/vehicle-interiors.md +169 -9
- package/dist/docs-src/guide/vehicles.md +26 -3
- package/dist/docs-src/guide/weather.md +15 -8
- package/dist/docs-src/guide/worldgen.md +100 -13
- package/dist/docs-src/llms.txt +9 -1
- package/dist/docs-src/schemas/README.md +3 -0
- package/dist/docs-src/schemas/archstyle.md +65 -0
- package/dist/docs-src/schemas/components.md +2009 -213
- package/dist/docs-src/schemas/fleet-catalog.md +113 -0
- package/dist/docs-src/schemas/landmark.md +10 -0
- package/dist/docs-src/schemas/matgraph.md +11 -1
- package/dist/docs-src/schemas/pack-source.md +11 -1
- package/dist/docs-src/schemas/pack.md +1 -1
- package/dist/docs-src/schemas/project.md +1 -1
- package/dist/docs-src/schemas/regional-catalog.md +39 -0
- package/dist/docs-src/schemas/scatter.md +36 -0
- package/dist/docs-src/schemas/structure-placement-data.md +753 -0
- package/dist/docs-src/schemas/structure-placement-index.md +87 -0
- package/dist/docs-src/schemas/structure-placements.md +274 -0
- package/dist/docs-src/schemas/transport-network.md +8 -0
- package/dist/docs-src/schemas/types.md +1 -1
- package/dist/docs-src/schemas/worldgen-batch.md +145 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{mcp-BbxqqnD1.mjs → mcp-BXaK46X-.mjs} +1 -1
- package/dist/{ops-b4Pag8U-.mjs → ops-Cm7WNvb9.mjs} +55 -22
- package/dist/templates/city-courier/gen/molen-types.ts +240 -17
- package/dist/templates/city-courier/scripts/molen-scripts.d.ts +240 -17
- package/dist/templates/figures-gallery/test/headless.test.ts +2 -1
- package/dist/templates/index.json +17 -17
- package/dist/templates/skybound/gen/molen-types.ts +240 -17
- package/dist/templates/skybound/scripts/molen-scripts.d.ts +240 -17
- package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +240 -17
- package/dist/templates/top-down-arena/src/gen/molen-types.ts +240 -17
- package/package.json +13 -13
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
composes:
|
|
5
5
|
|
|
6
6
|
- streamed terrain from a `molen/terrain-package@1`;
|
|
7
|
-
- worldgen buildings, street surfaces, trees and parked cars from content packs;
|
|
7
|
+
- worldgen buildings, seeded infill for streets with missing outlines, street surfaces, trees and parked cars from content packs;
|
|
8
8
|
- traffic, pedestrians, trains and aircraft that come and go around the viewer;
|
|
9
9
|
- orbit, walk, drive and fly navigation, with cars and aircraft the host can put the viewer in;
|
|
10
10
|
- markers placed by latitude/longitude;
|
|
@@ -12,6 +12,13 @@ composes:
|
|
|
12
12
|
|
|
13
13
|
You speak latitude and longitude; the view keeps its metric world frame internally.
|
|
14
14
|
|
|
15
|
+
[Night lighting](night-lighting.md) follows the sky’s Sun position: occupied windows and street
|
|
16
|
+
lamps fade in through dusk. Existing model glass can opt in with material lighting metadata.
|
|
17
|
+
|
|
18
|
+
[Boost mode](boost-mode.md) makes walking, driving and flying four times faster: press **T**, or
|
|
19
|
+
call `view.setBoostMode(true)`. Pass `boostMode: true` at mount to start enabled; read
|
|
20
|
+
`view.boostMode` and listen for `boostchange` to keep a host's toggle in sync.
|
|
21
|
+
|
|
15
22
|
```ts
|
|
16
23
|
import {
|
|
17
24
|
loadEarthContent,
|
|
@@ -44,8 +51,10 @@ creditsElement.textContent = view.credits.map((credit) => credit.label).join('
|
|
|
44
51
|
```
|
|
45
52
|
|
|
46
53
|
Each worker file is one line, for example `import '@bendyline/molen-earth/workers/elevation';`.
|
|
47
|
-
There are entries for `elevation`, `landcover`, `surface`, `worldgen` and `
|
|
48
|
-
|
|
54
|
+
There are entries for `elevation`, `landcover`, `surface`, `worldgen`, `material` and `semantic`
|
|
55
|
+
(map tiles decoded off the main thread, where a town tile took 10-18 ms of a frame; hosts using
|
|
56
|
+
`createProfiledTerrainPackageSemanticLayers` directly pass such a worker as `decoderWorker`). Any
|
|
57
|
+
worker you omit does its work on the main thread instead.
|
|
49
58
|
|
|
50
59
|
Buildings appear with vertex colors while shared material textures bake in the background.
|
|
51
60
|
Completed textures update the existing materials without regenerating buildings. Terrain detail
|
|
@@ -57,14 +66,19 @@ Pass `reflections: false` for the legacy light-only appearance. A host-assigned
|
|
|
57
66
|
`view.viewer.renderer.scene.environment` takes precedence if you supply your own HDR environment.
|
|
58
67
|
|
|
59
68
|
Without a `style`, the view uses the shared medium-fi look: a strong warm sun over a sky fill,
|
|
60
|
-
|
|
69
|
+
ACES filmic tone mapping, and haze in the sky's horizon color. Its values are exported as
|
|
61
70
|
`EARTH_SKY_PALETTE`, `EARTH_LIGHTING`, `EARTH_TONE_MAPPING`, `EARTH_EXPOSURE` and
|
|
62
71
|
`EARTH_WATER_COLOR`, so a host that builds its own viewer can match it. `earthHazeColor` converts
|
|
63
72
|
a sky color into the fog color for the backend. Terrain and landcover share one ground material
|
|
64
73
|
from `createTerrainGroundMaterialAsync` (`@bendyline/molen-terrain/client`) with world-space
|
|
65
74
|
variation; a custom host passes it to the terrain stream's `material` and to `createEarthWorldgen`
|
|
66
|
-
as `groundMaterial`, and calls `setTerrainGroundOrigin` with the world origin each frame.
|
|
67
|
-
|
|
75
|
+
as `groundMaterial`, and calls `setTerrainGroundOrigin` with the world origin each frame. Roads,
|
|
76
|
+
sidewalks and lots take `createTerrainPavementMaterialAsync` through the surface renderer's
|
|
77
|
+
`setMaterial`, with the same origin call. Trees, shrubs and props take
|
|
78
|
+
`createScatterMaterialAsync` (`@bendyline/molen-worldgen/client`) as `createEarthWorldgen`'s
|
|
79
|
+
`modelMaterial`, and generated buildings `createBuildingWeatheringAsync` as its
|
|
80
|
+
`buildingDecorator`. The [medium-fi style guide](medium-fi.md) explains the look and the rules
|
|
81
|
+
models follow inside it.
|
|
68
82
|
|
|
69
83
|
`style` sets the look: `sky.sunElevation` and `sky.sunAzimuth` (degrees; the azimuth is a
|
|
70
84
|
compass bearing, 0 north and clockwise) place the sun, and unless `environment.sun.direction` is
|
|
@@ -78,7 +92,14 @@ neutral olive.
|
|
|
78
92
|
Buildings, trees and landmarks cast sun shadows onto everything around what the camera frames:
|
|
79
93
|
the orbit target (sized to the view), or a little ahead of the walker, car or aircraft. The
|
|
80
94
|
shadow map follows that focus in whole texels, so edges hold still as it moves. Adaptive quality
|
|
81
|
-
turns shadows off at its two lowest levels; `shadows: false` turns them off entirely.
|
|
95
|
+
turns shadows off at its two lowest levels; `shadows: false` turns them off entirely. Only layer
|
|
96
|
+
parts taller than `EARTH_SHADOW_CASTER_HEIGHT` (3.5 m) cast: shrubs, brambles and saplings stay
|
|
97
|
+
out of the shadow pass, where their shadows would mostly fall inside the canopy's.
|
|
98
|
+
|
|
99
|
+
In flight the shadow footprint widens with height above the local ground: its half-width is
|
|
100
|
+
four times that height, capped at 5 km, with a tighter footprint near the ground. This pushes
|
|
101
|
+
the shadow boundary farther into the distance in aerial views, trading some shadow sharpness
|
|
102
|
+
for coverage at the same map resolution. Walking and driving keep their tighter footprints.
|
|
82
103
|
|
|
83
104
|
`touchJoystickContainer` adds an on-screen movement stick while walking, driving or flying. By default it
|
|
84
105
|
appears only on touch devices; pass `touchJoystick: 'always'` to show it everywhere.
|
|
@@ -121,7 +142,9 @@ added.
|
|
|
121
142
|
`view.vehicleStatus()` describes the car or aircraft the viewer is in for a HUD: speed and
|
|
122
143
|
heading for a car; airspeed, altitude and height above ground, vertical speed, attitude, load
|
|
123
144
|
factor (g), sideslip, power, engine, gear, flaps and stall/impact flags for an aircraft (SI units,
|
|
124
|
-
compass radians).
|
|
145
|
+
compass radians). Both carry the type's `label` and, where the type declares them, its name-free
|
|
146
|
+
`genericLabel` (`Full-size pickup`) and `bodyStyle`, so a HUD that must not show a real
|
|
147
|
+
manufacturer or model name has something to show instead. An airplane started in flight is trimmed for level flight at its launch speed.
|
|
125
148
|
`view.setThrottle(power)` sets an aircraft's throttle or collective from an on-screen lever.
|
|
126
149
|
|
|
127
150
|
Listen for `modechange`. The input profile, clip planes and touch stick follow the mode
|
|
@@ -396,7 +419,22 @@ for `terrainchange` to refresh an attribution panel when the package changes. Di
|
|
|
396
419
|
completed flights resolve the destination immediately; manual panning rechecks the host source
|
|
397
420
|
after about five kilometers. A second jump while a region is loading follows the latest target.
|
|
398
421
|
|
|
399
|
-
##
|
|
422
|
+
## Tile preparation, byte cache and prefetch
|
|
423
|
+
|
|
424
|
+
During flight and fast driving, nearby terrain is prepared ahead of travel automatically, even
|
|
425
|
+
without a byte cache. The view predicts camera positions 2, 4, 8 and 12 seconds ahead (up to 4 km),
|
|
426
|
+
following the measured turn rate through a bank as well as straight travel,
|
|
427
|
+
selects their tiles at the current detail budget, and builds terrain, enabled layers and GPU
|
|
428
|
+
resources into the hidden resident cache. Arrival reuses that work. Predictions reset after
|
|
429
|
+
teleports, re-anchoring and camera-entry animations, and follow turns with a short velocity filter.
|
|
430
|
+
|
|
431
|
+
Preparation is bounded to the larger of 16 tiles or a quarter of the selected-tile budget,
|
|
432
|
+
limited by spare residency, and shares the existing tile,
|
|
433
|
+
layer and memory limits. With three or more load slots, up to half can advance the predicted route
|
|
434
|
+
while visible work remains queued; smaller budgets use spare slots. Displayed coverage takes
|
|
435
|
+
priority under memory pressure. `view.stats()` reports `preloadingTiles` and `preloadedTiles` counts.
|
|
436
|
+
This reduces late detail but cannot guarantee readiness when downloads or generation take longer
|
|
437
|
+
than the available lead time. The separate byte prefetch below warms a longer route.
|
|
400
438
|
|
|
401
439
|
Terrain, landcover, feature and building tiles, content packs and the small documents that name
|
|
402
440
|
them can persist across visits in a byte cache from `@bendyline/molen-pack/cache`. Ground a viewer
|
|
@@ -506,16 +544,25 @@ world/geographic conversion) and ticked on their sync.
|
|
|
506
544
|
|
|
507
545
|
## Geographic structures and regional styles
|
|
508
546
|
|
|
509
|
-
The Earth pack may provide a `molen/structure-
|
|
547
|
+
The Earth pack may provide a regional `molen/structure-placement-index@1` directory, or a
|
|
548
|
+
legacy flat `molen/structure-placements@1` document. Each placement binds a
|
|
510
549
|
WGS84 `[longitude, latitude]` anchor to an asset ID from the style pack, with an optional
|
|
511
550
|
heading, scale, terrain or sea-level datum, and minimum tile level. The Earth viewer loads the
|
|
512
|
-
|
|
551
|
+
regional directory with the packs, then reads compact `molen/structure-placement-data@1`
|
|
552
|
+
regions as terrain tiles need them. Flat catalogs still load eagerly. Resident placements
|
|
553
|
+
are indexed by three-character geohash, and the viewer draws each `preview` model
|
|
513
554
|
in the terrain tile containing its anchor. `draft` records remain queryable but are not drawn.
|
|
514
555
|
Long structures may supply `bounds: [west, south, east, north]`. Their extent is indexed across
|
|
515
556
|
geohash cells and geometry is clipped to each resident tile, so a bridge end stays visible when
|
|
516
557
|
its center is outside the view. Extended structures use either `datum: 'sea-level'` with an
|
|
517
558
|
absolute `elevation`, or a `terrainReference` with the host sampler described below. Every
|
|
518
559
|
tile must resolve the same model origin, avoiding inconsistent ground samples between tiles.
|
|
560
|
+
|
|
561
|
+
Models with `groundCutout` stay whole in each intersecting resident tile. Their floors and
|
|
562
|
+
openings therefore remain together while adjacent tiles load, including when the anchor tile
|
|
563
|
+
is absent. These instances share the library's geometry and textures and release with their
|
|
564
|
+
tiles. Ordinary extended bridges continue to use clipped geometry.
|
|
565
|
+
|
|
519
566
|
`replaceRoads: { length, width, deckHeight?, deckHeights? }` describes a model-local rectangle along +X:
|
|
520
567
|
mapped parallel bridge lines inside it are replaced only after the model loads successfully.
|
|
521
568
|
Outside approach fragments remain procedural. `deckHeight` joins those approaches to the
|
|
@@ -533,13 +580,84 @@ footprint polygon. It replaces the rectangle for suppression, including concave
|
|
|
533
580
|
parallel road segments outside it remain intact. Connection stations use the outline's outer
|
|
534
581
|
intersections with native Z=0, ordered negative to positive X. Without an intersecting outline,
|
|
535
582
|
they fall back to X=-length/2 and X=+length/2. `deckHeights` keeps that endpoint order.
|
|
583
|
+
When a curved crossing's actual ends lie away from native Z=0, supply
|
|
584
|
+
`replaceRoads.deckEndpoints: [[negativeEndX, negativeEndZ], [positiveEndX, positiveEndZ]]`.
|
|
585
|
+
These native coordinates override the inferred connection stations and follow the model's
|
|
586
|
+
heading and X/Z scale. They require `deckHeight` or `deckHeights`, with the same endpoint order.
|
|
587
|
+
For side connections on a sloping or curved deck, add `deckProfile: [[x, y, z], ...]` in
|
|
588
|
+
increasing X order. Remaining bridge fragments join at their actual outline cut using the
|
|
589
|
+
nearest profile segment's interpolated height. The model's scale and resolved datum apply.
|
|
590
|
+
`includeTransverseBridges: true` also replaces bridge-tagged side connectors that terminate
|
|
591
|
+
inside the exact outline, such as paths covered by viewing pods. It requires an outline;
|
|
592
|
+
untagged ground crossings, tunnels, through crossings with both endpoints outside the model,
|
|
593
|
+
and bridge segments outside the outline remain independent.
|
|
536
594
|
If the asset includes its retaining walls and approach pavement, set
|
|
537
595
|
`replaceRoads.includeConnectedApproaches: true`. A grade road is then clipped inside the outline
|
|
538
596
|
only if it shares a covered endpoint with a mapped bridge and continues outward along the bridge
|
|
539
597
|
axis. The remaining grade fragment receives a 20 m terrain blend. Nearby roads, transverse paths
|
|
540
598
|
and tunnels remain intact. This requires the source tile to retain the shared bridge/approach
|
|
541
599
|
endpoint; disconnected or generalized map geometry is left in place.
|
|
542
|
-
|
|
600
|
+
For this opted-in mode, a retained mapped bridge tail up to 32 m can carry its deck height
|
|
601
|
+
to the connected street, including through one covered gateway up to 8 m long. The gateway
|
|
602
|
+
itself stays unchanged. Raised ground approaches receive retaining side and end faces down
|
|
603
|
+
to the original terrain; their paving supplies the top. These supports follow the model's
|
|
604
|
+
load and unload lifetime. They provide approximate continuity where coarse elevation data
|
|
605
|
+
misses a bank or quay; they do not establish surveyed ground levels.
|
|
606
|
+
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.
|
|
607
|
+
|
|
608
|
+
Bridge openings can set `groundCutout.minHeight` to a native model Y threshold. Only ground
|
|
609
|
+
above that threshold is removed inside the outlines and capped at the threshold; lower dry
|
|
610
|
+
riverbanks remain visible. This explicitly reconstructs a bounded rendered bank without changing
|
|
611
|
+
source height samples. It must be supported by the model's site-fit evidence.
|
|
612
|
+
When `preservePaving` is set, `groundCutout.pavingOutlines` can still name smaller explicit
|
|
613
|
+
paving areas that need the same treatment, such as a river walk passing below a bridge.
|
|
614
|
+
Approach roads outside those paving outlines retain their deck-connection heights and geometry.
|
|
615
|
+
Custom owners pass `{ minHeight }` as the fourth argument to `setTerrainGroundCutouts`.
|
|
616
|
+
The threshold follows the owner's vertical translation and scale, like the existing ceiling.
|
|
617
|
+
|
|
618
|
+
Bridge landings can set `groundCutout.preservePaving: true` to open coarse terrain and
|
|
619
|
+
generated shoreline walls while retaining native approach roads and sidewalks. The default
|
|
620
|
+
also removes covered paving, as required by sunken buildings. Custom paving adapters use
|
|
621
|
+
`markTerrainPavementSurface`; custom owners pass `{ preservePaving: true }` as the fourth
|
|
622
|
+
argument to `setTerrainGroundCutouts`. Water and source elevation samples remain independent.
|
|
623
|
+
|
|
624
|
+
For separated parts, `groundCutout.outlines` supplies the complete set of up to 64 simple polygons
|
|
625
|
+
and supersedes the single `outline`. Keep `outline` as the primary boundary for compatibility.
|
|
626
|
+
Each ring follows the same model pose and lifetime; ground in the gaps stays visible. This lets
|
|
627
|
+
a structure cover a main building and a detached component without clearing the ground between them.
|
|
628
|
+
For an extended structure, each resident tile clips these openings to its own rendered model
|
|
629
|
+
piece. Terrain outside that tile stays intact until the corresponding model piece loads.
|
|
630
|
+
|
|
631
|
+
A landmark that authors a lake or basin can separately declare
|
|
632
|
+
`waterCutout: { outlines: [[[x, z], ...], ...], basis: 'source evidence' }` with geographic
|
|
633
|
+
`bounds`. Up to 16 simple native model polygons replace only the covered native water. The
|
|
634
|
+
viewer keeps other polygons from the same map feature, and clips replacement to resident model
|
|
635
|
+
tiles. Native water returns when the model is hidden or evicted; failed or cancelled loads
|
|
636
|
+
leave it intact. Ground openings and water openings are independent, so a bridge's ground
|
|
637
|
+
opening does not remove the river underneath it. Custom water adapters can register their mesh
|
|
638
|
+
with `markTerrainWaterSurface`; `TerrainGroundCutoutController` coordinates both surface kinds.
|
|
639
|
+
|
|
640
|
+
When a map merges a landmark with neighboring buildings, declare
|
|
641
|
+
`buildingCutout: { outline: [[x, z], ...], basis: 'source evidence' }` and geographic `bounds`.
|
|
642
|
+
This simple native model polygon follows the placement's heading and scale. While the model is
|
|
643
|
+
loaded, the viewer subtracts only that area from mapped buildings and preserves their remaining
|
|
644
|
+
polygons, holes, heights and other attributes. It takes precedence over `replaceFootprint` for
|
|
645
|
+
that placement. Bounds ensure every overlapping tile receives the mask. Failed loads leave the
|
|
646
|
+
mapped buildings intact; eviction restores the original source data. This affects procedural
|
|
647
|
+
building geometry; use `groundCutout` separately when the model also covers the terrain opening.
|
|
648
|
+
For separated buildings or precincts, `buildingCutout.outlines` provides up to 64 independent
|
|
649
|
+
simple masks and supersedes `outline`. Keep the primary `outline` for compatibility. Separate
|
|
650
|
+
masks preserve intervening buildings without inventing connecting structure geometry.
|
|
651
|
+
|
|
652
|
+
For a whole landmark whose source footprint slightly overlaps a neighboring building, set
|
|
653
|
+
`buildingCutout.minimumCoverage` to a fraction in `(0, 1]`, for example `0.995`. This changes
|
|
654
|
+
the mask to whole-building replacement: a mapped feature goes only when the union of that
|
|
655
|
+
placement's masks covers at least that fraction of its occupied area. The calculation includes
|
|
656
|
+
all components and subtracts holes; overlapping masks do not count twice. Lower-coverage
|
|
657
|
+
neighbors keep their original polygons and attributes intact. Separate placements make separate
|
|
658
|
+
coverage decisions. Generalized tiles fall back to area subtraction so a coarse merged block
|
|
659
|
+
can retain the surrounding complex while the landmark occupies its part. Use ordinary
|
|
660
|
+
subtraction when only part of a precise map building should go.
|
|
543
661
|
|
|
544
662
|
### Bridge elevations and terrain fit
|
|
545
663
|
|
|
@@ -619,6 +737,14 @@ each document may contain `rules` for deliberately generic assets. The shipped
|
|
|
619
737
|
`structures/map-rules.json` recognizes windmills and wind turbines from class, subclass, or
|
|
620
738
|
explicit map tags. Unique named landmarks never become arbitrary category replacements.
|
|
621
739
|
|
|
740
|
+
Regional types can set `bounds: [west, south, east, north]` in WGS84 degrees. An optional
|
|
741
|
+
`match.names` array accepts exact category labels such as “Svan tower”; it requires regional
|
|
742
|
+
bounds and a class, subclass or explicit tag match. Partial names and business names do not
|
|
743
|
+
establish a type. Bounds use half-open east/north edges. With `fit: "footprint"`, an explicitly
|
|
744
|
+
typed point can use its sole complete containing building for size and the undirected longest
|
|
745
|
+
axis; the matcher never chooses the nearest house. Generalized, clipped or ambiguous footprints
|
|
746
|
+
do not establish that fit. A footprint axis alone does not establish the entrance's facing.
|
|
747
|
+
|
|
622
748
|
```json
|
|
623
749
|
{
|
|
624
750
|
"id": "generic.windmill",
|
|
@@ -653,10 +779,33 @@ eviction. Rules require source classification evidence: a cafe with “Windmill
|
|
|
653
779
|
not a windmill. Providers that omit POIs, classifications, or structure tags cannot imply that
|
|
654
780
|
object. The semantic decoder preserves public structure tags and Wikidata IDs when supplied.
|
|
655
781
|
|
|
656
|
-
`content.worldgen.structures.query([west, south, east, north])` returns preview
|
|
657
|
-
geographic rectangle. Pass `true` as the second argument to include drafts.
|
|
658
|
-
|
|
659
|
-
|
|
782
|
+
`content.worldgen.structures.query([west, south, east, north])` returns resident preview
|
|
783
|
+
placements in a geographic rectangle. Pass `true` as the second argument to include drafts.
|
|
784
|
+
For a regional catalog, `isLoaded(bounds)` distinguishes complete coverage from an unloaded
|
|
785
|
+
region. Use `await structures.queryAsync(bounds, { signal, viewingDate, includeDraft })` to
|
|
786
|
+
load and query complete coverage; flat indexes expose only the synchronous query. Async
|
|
787
|
+
results remain valid even when a large query exceeds the retained cache budget. Terrain
|
|
788
|
+
renderers await coverage before replacing buildings, roads, water or ground. Parking avoids
|
|
789
|
+
unloaded landmark coverage until nearby terrain has loaded it.
|
|
790
|
+
|
|
791
|
+
Regional reads share in-flight requests, run at most four requests at once, and retain at most
|
|
792
|
+
32 parsed regions or 4 MiB of serialized data (JavaScript object overhead is additional).
|
|
793
|
+
Cancelling one query does not cancel another query sharing its read. `dispose()` on the
|
|
794
|
+
regional stream cancels its reads and drops the cache. Directory coverage includes complete
|
|
795
|
+
structure extents and mapped identity search neighborhoods across region boundaries and the
|
|
796
|
+
antimeridian. Regions whose minimum tile level exceeds the requested level are skipped.
|
|
797
|
+
|
|
798
|
+
In the engine repository, authoritative placements and their source notes live in individual
|
|
799
|
+
`content/earth/source/placements/<gh2>/<gh3>/<placement-id>.json` files. A deterministic build
|
|
800
|
+
produces the ignored `content/earth/structures/placements/index.json` and `cells/*.json` files.
|
|
801
|
+
Runtime data retains titles and source URLs, all placement numbers, cutouts, statuses and
|
|
802
|
+
historical dates, while omitting `note` and `basis` explanations. Detailed map evidence stays
|
|
803
|
+
in the source; only `wikidata`, `names` and `maxDistance` are runtime matching fields.
|
|
804
|
+
The compiler starts with geohash2 regions and subdivides regions over 192 KiB when possible.
|
|
805
|
+
The pack keeps these files independently readable rather than combining them in solid blocks.
|
|
806
|
+
The generated `authoring.json` aggregate supports local review fixtures and is excluded from packs.
|
|
807
|
+
|
|
808
|
+
Named model sources and previews live in
|
|
660
809
|
`content/worldgen/source/places/<gh2>/<gh3>/<source-key>/`; imported runtime bundles mirror
|
|
661
810
|
that organization under `content/worldgen/assets/places/<gh2>/<gh3>/<source-key>/`.
|
|
662
811
|
Each runtime bundle contains `asset.json`, `model.glb`, and any collision data. Reusable models
|
|
@@ -853,7 +1002,8 @@ These regional forms are visual priors, not surveyed attributes of individual bu
|
|
|
853
1002
|
switch to the high preset, which rebuilds them across the view). Where the browser can time the GPU (`renderer.createGpuTimer()`), the view
|
|
854
1003
|
reports GPU and CPU work per frame, so slow frames while tiles stream in lower the level only
|
|
855
1004
|
when rendering itself is the cost; without GPU timing it goes by frame times alone. The view
|
|
856
|
-
first calibrates quickly, so a slow device settles within seconds
|
|
1005
|
+
first calibrates quickly, so a slow device settles within seconds (it lowers detail after 2.5 s
|
|
1006
|
+
of overload, not one burst of streaming as a takeoff reveals the view). Once a level has held for
|
|
857
1007
|
12 s it turns sticky, because a level change swaps resolution and detail across the view: down
|
|
858
1008
|
after 2.5 s of sustained overload, up after 20 s of headroom, at least 6 s apart. Any change
|
|
859
1009
|
waits until the camera has been still for 0.6 s (at most 4 s); memory pressure above 1.25
|
|
@@ -874,11 +1024,15 @@ These regional forms are visual priors, not surveyed attributes of individual bu
|
|
|
874
1024
|
|
|
875
1025
|
## Sound
|
|
876
1026
|
|
|
877
|
-
With the `molen.sounds` pack in `content`, the view plays
|
|
878
|
-
|
|
879
|
-
|
|
1027
|
+
With the `molen.sounds` pack in `content`, the view plays 100 contextual sounds: 88 recorded
|
|
1028
|
+
ambience beds and 12 walking surfaces, alongside vehicle engines and music. Rain and wind
|
|
1029
|
+
follow weather, morning birds and warm-night crickets/frogs follow the rendered sky clock,
|
|
1030
|
+
and broad regional palettes follow geographic location. Surf fades away from mapped ocean
|
|
1031
|
+
shores; rivers and traffic follow nearby watercourses and streets. Enclosed cockpits smoothly
|
|
1032
|
+
reduce outdoor ambience to 18%; open boats and exterior cameras retain outside sound.
|
|
1033
|
+
Mapped ground materials, rain and snow select walking sounds. Birds, crickets and traffic come from
|
|
880
1034
|
the ground, so they fade as the view rises above the terrain and are gone a few hundred meters
|
|
881
|
-
up. Traffic also fades with distance from the nearest street. Sound starts on the first click or
|
|
1035
|
+
up. Unknown terrain height silences ground ambience. Traffic also fades with distance from the nearest street. Sound starts on the first click or
|
|
882
1036
|
key press. The `audioready` event fires once it has loaded, and then `view.audio` sets volume,
|
|
883
1037
|
mute and bus gains (`view.audio.setBusGain('music', 0)` turns music off).
|
|
884
1038
|
|
|
@@ -888,9 +1042,19 @@ view.on('audioready', () => view.audio?.setMuted(localStorage.getItem('muted') =
|
|
|
888
1042
|
```
|
|
889
1043
|
|
|
890
1044
|
Pass `audio: false` to keep the view silent, or `audio: { environment }` to replace the rules.
|
|
891
|
-
The default rules are exported as `EARTH_AUDIO_ENVIRONMENT
|
|
892
|
-
|
|
893
|
-
|
|
1045
|
+
The legacy/default rules are exported as `EARTH_AUDIO_ENVIRONMENT`; `createEarthAudio` extends
|
|
1046
|
+
them using bank tags `earth:category:*` and `earth:region:*` unless given a custom environment.
|
|
1047
|
+
A composing host passes `location`, `solarHour`, `terrain`, and `inVehicle` to `update`.
|
|
1048
|
+
`EarthAudioTerrain.observer` can wrap water, landcover and features renderers with
|
|
1049
|
+
`observeSemanticTiles`; sample it at about 4 Hz for coast/river/street distances and ground
|
|
1050
|
+
material. `surface` overrides the mapped walking material, and `indoors` attenuates outdoor
|
|
1051
|
+
ambience for a host that detects interiors. Missing mapped data uses conservative fallbacks;
|
|
1052
|
+
lakes do not produce surf, and wildlife rendering density does not mute regional ambience.
|
|
1053
|
+
A pack's `birdsong` catalog replaces broad bird palettes with curated recordings selected by
|
|
1054
|
+
geography, habitat, season and sunlight; uncovered places stay quiet. The default pack includes
|
|
1055
|
+
eight such recordings. Hosts pass the sky's `utcMs` and `sunAltitudeDeg` in `location`, along with
|
|
1056
|
+
`regionalAmbience.habitat` and habitat levels. Curated birds fade out inside enclosed vehicles.
|
|
1057
|
+
See [Sound and music](audio.md) for the rule format.
|
|
894
1058
|
|
|
895
1059
|
The composing pieces are exported too, for hosts that build their own view: `createEarthWorldgen`,
|
|
896
1060
|
`EarthVehicles`, `EarthAmbient` with `observeSemanticTiles`, `createEarthSky`/`createEarthFog`,
|
|
@@ -911,3 +1075,40 @@ pieces such as a football game, apron traffic or a market. Each geographic place
|
|
|
911
1075
|
a lazy scene loader, optional calendar policy, and entry/exit distances. It waits for terrain,
|
|
912
1076
|
plays nearby, and releases its local world when out of range. See [Dioramas](dioramas.md) for
|
|
913
1077
|
the full contract and current prototype limits.
|
|
1078
|
+
|
|
1079
|
+
## Airport layouts
|
|
1080
|
+
|
|
1081
|
+
The `molen.earth` content pack supplies a lazy worldwide runway catalog and a detailed Boeing
|
|
1082
|
+
Field layout. Both Earth hosts use measured runway endpoints and widths, draw runway numbers,
|
|
1083
|
+
thresholds and centre lines, and keep airport pavement visible from flight altitude. Mapped
|
|
1084
|
+
taxiways and aprons have airport markings; airside areas do not become car parks or city streets.
|
|
1085
|
+
The airport overlay also supplies mapped hangar/building footprints and suppresses inferred
|
|
1086
|
+
vegetation and buildings on the airfield. Aircraft traffic uses the runway approach/departure
|
|
1087
|
+
corridors and remains simulated, rather than live aviation tracking.
|
|
1088
|
+
|
|
1089
|
+
The runway snapshot covers 10,746 airports with complete endpoint and width records. Detailed
|
|
1090
|
+
aprons, taxiways and hangars are currently bundled for Boeing Field; elsewhere these depend on
|
|
1091
|
+
the map's coverage. Building heights and untagged taxiway widths are interpreted. Runways with
|
|
1092
|
+
missing endpoints, closed runways and water runways are omitted. Supplemental airports also
|
|
1093
|
+
render when the basemap has no tile (Boeing Field lies south of the bundled Seattle street-detail
|
|
1094
|
+
coverage). No airport data is fetched without a supplied pack. Hosts composing their own
|
|
1095
|
+
terrain renderer can use `withEarthAirports`
|
|
1096
|
+
around semantic renderers and observers, passing `content.airports` from `loadEarthContent`.
|
|
1097
|
+
|
|
1098
|
+
Mapped layouts also populate their aprons with boardable aircraft. Fleet profiles distinguish
|
|
1099
|
+
general aviation, regional service, airline hubs and mixed operations; Boeing Field uses a mix
|
|
1100
|
+
of light aircraft, business aircraft and larger jets. Aircraft are fitted inside apron polygons
|
|
1101
|
+
with clearance from buildings, taxiways, runways, other aircraft and reserved diorama areas.
|
|
1102
|
+
The fleet and parking positions are simulated, not live aircraft tracking or exact stand assignments.
|
|
1103
|
+
|
|
1104
|
+
Walk to an aircraft's door and press **E** to board, **I** to start, and **Shift/Ctrl** to adjust
|
|
1105
|
+
power. The same aircraft taxis and flies away; its original stand remains empty for the session.
|
|
1106
|
+
Land, stop and shut down before exiting. Automatic parking keeps at most twelve unclaimed
|
|
1107
|
+
aircraft within 1.8 km; claimed aircraft remain owned vehicles across terrain re-anchors.
|
|
1108
|
+
Set `airportTraffic: false` on `mountEarthView`, or `?airportTraffic=0` in World Explorer, to
|
|
1109
|
+
disable automatic parking. Hosts composing their own loop can use `planAirportApron` and
|
|
1110
|
+
`EarthAirportPopulation` with callbacks into their aircraft world.
|
|
1111
|
+
|
|
1112
|
+
Detailed apron population currently ships for Boeing Field. Runway-only catalog records do
|
|
1113
|
+
not invent parking ground. The **Living places** picker also offers flight-school briefing and
|
|
1114
|
+
cargo handling there; these ground scenes reserve space beside the boardable fleet.
|
|
@@ -4,6 +4,9 @@ The `molen.entities` content pack is Molen's curated entity collection. It build
|
|
|
4
4
|
`renderable.kind: "gltf"`, `molen/asset@1`, `molen/types@1`, and `molen/project@1` contracts;
|
|
5
5
|
there is no second entity or asset runtime.
|
|
6
6
|
|
|
7
|
+
The [livery gallery](livery-gallery.md) compares vehicle paint and marking choices. The
|
|
8
|
+
[complete livery catalog](livery-catalog.md) lists their ids and reference evidence.
|
|
9
|
+
|
|
7
10
|
The initial nature collection contains pine, fir, oak, birch, shrub, and boulder models under the
|
|
8
11
|
stable `molen.entities.*` namespace. Every model is a deterministic texture-free GLB with a
|
|
9
12
|
hash-verified sidecar, meter-scale bounds, a conservative collision hull, and a type definition.
|
|
@@ -57,21 +60,96 @@ sidecar, types document, project, or gallery scene is stale.
|
|
|
57
60
|
helicopter, including GLBs, flight components and pilot seats. The pack's asset provider
|
|
58
61
|
serves them like any other model. See [Aircraft](aircraft.md) for world-view controls, physics and integration.
|
|
59
62
|
|
|
60
|
-
##
|
|
63
|
+
## Bendy transit and background traffic
|
|
61
64
|
|
|
62
65
|
`molen.entities.transit.bus` is a 12 m city bus, `molen.entities.transit.lightrail` a 27 m
|
|
63
|
-
two-section light-rail car, and `molen.entities.aircraft.airliner` a narrow-body airliner.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
two-section light-rail car, and `molen.entities.aircraft.airliner` a narrow-body airliner. Their
|
|
67
|
+
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.
|
|
73
|
+
[Ambient life](ambient-life.md) also spawns them through their `ambientRole` component.
|
|
66
74
|
In the engine repository, `content/entities/scenes/transit.scene.json` shows them side by side.
|
|
67
75
|
|
|
68
76
|
## Road, cycle and water fleets
|
|
69
77
|
|
|
70
|
-
The road fleet has eleven mountable models. Alongside compact, sedan, SUV, pickup and van,
|
|
78
|
+
The Bendy road fleet has eleven mountable models. Alongside compact, sedan, SUV, pickup and van,
|
|
71
79
|
`molen.entities.vehicle.*` includes `sports_coupe`, `station_wagon`, `electric_hatchback`,
|
|
72
80
|
`taxi`, `offroad` and `box_truck`. They expose the usual wheel pivots, paint material, driver
|
|
73
81
|
seat and vehicle tuning, and join the ambient car pool.
|
|
74
82
|
|
|
83
|
+
All generic road, cycle, water and transit display names use the **Bendy** house brand.
|
|
84
|
+
Asset/type IDs remain stable. P-51D Mustang and OH-6 retain their real identities. Models follow
|
|
85
|
+
the [close-view vehicle detail standard](medium-fi.md#controllable-vehicles-close-view-fidelity).
|
|
86
|
+
|
|
87
|
+
Forty additional U.S. market reference vehicles retain their manufacturer/model/year identities,
|
|
88
|
+
including `molen.entities.vehicle.ford_f_150_2025`, `molen.entities.vehicle.toyota_prius_2024`,
|
|
89
|
+
`molen.entities.vehicle.tesla_model_3_2025` and `molen.entities.vehicle.ford_mustang_2024`.
|
|
90
|
+
`MOLEN_US_VEHICLE_ENTITY_IDS` enumerates this collection; it is also included in
|
|
91
|
+
`MOLEN_VEHICLE_ENTITY_IDS` and `MOLEN_ENTITY_IDS`. All forty support the same boarding,
|
|
92
|
+
steering, braking, reversing and exiting API as the Bendy cars. They provide named wheel and
|
|
93
|
+
steering pivots, driving cabins and ambient car roles.
|
|
94
|
+
|
|
95
|
+
These are polygonal interpretations with rounded authoring dimensions and simplified trim,
|
|
96
|
+
not manufacturer CAD reproductions. Handling is tuned for play; digital display graphics are
|
|
97
|
+
illustrative, while the driving HUD supplies live telemetry and analog speed needles are bound
|
|
98
|
+
where present. The 2024 Model Y represents the original body, not the later refresh.
|
|
99
|
+
See the repository's [complete roster](https://github.com/bendyline/molen/blob/main/content/entities/US-VEHICLES.md).
|
|
100
|
+
`content/entities/scenes/us-vehicles.scene.json` places all forty in a showroom. Their recipes
|
|
101
|
+
live beside the Bendy recipes and use the same targeted generation/import/capture workflow.
|
|
102
|
+
|
|
103
|
+
> [!NOTE]
|
|
104
|
+
> The reference vehicles, the Winnebago View and the P-51D and OH-6 are identified by their real
|
|
105
|
+
> manufacturer, model and year names so you know what each interpretation depicts. The names are
|
|
106
|
+
> identification only: the geometry carries no maker emblem, wordmark, model lettering or
|
|
107
|
+
> logo-shaped grille (a plain chrome badge and a fictional `MLN` plate stand in), and the pack's
|
|
108
|
+
> MIT license grants no trademark rights. The names are their owners' marks, used without
|
|
109
|
+
> affiliation or endorsement; whether a descriptive use here stays descriptive in your product is
|
|
110
|
+
> your own call. Every mountable type's spec therefore carries a name-free `genericLabel`
|
|
111
|
+
> (`Full-size pickup`, `Light observation helicopter`) and, for wheeled vehicles, a generic
|
|
112
|
+
> `bodyStyle` (`pickup`, `suv`, `motorhome`, `bicycle`, …), and `view.vehicleStatus()` reports
|
|
113
|
+
> both, so a host can show, filter or relabel the fleet without any real name. The pack's
|
|
114
|
+
> `NOTICE.md` and the repository
|
|
115
|
+
> [NOTICE](https://github.com/bendyline/molen/blob/main/NOTICE.md) record the details.
|
|
116
|
+
|
|
117
|
+
A second collection adds forty varied vehicles from **2005–2024**, with two models from each
|
|
118
|
+
year: city cars, retro hatchbacks, wagons, roadsters, coupes, sedans, cargo vans, pickups and
|
|
119
|
+
off-road vehicles. `MOLEN_VARIETY_VEHICLE_ENTITY_IDS` enumerates these IDs, also present in
|
|
120
|
+
the main vehicle/entity helpers. Examples include `molen.entities.vehicle.smart_fortwo_2009`,
|
|
121
|
+
`molen.entities.vehicle.mazda_mx_5_miata_2016` and
|
|
122
|
+
`molen.entities.vehicle.mercedes_benz_sprinter_2019`. All forty use the same driving API.
|
|
123
|
+
The [variety roster](https://github.com/bendyline/molen/blob/main/content/entities/VARIETY-VEHICLES.md)
|
|
124
|
+
records each selected year and body configuration; `content/entities/scenes/variety-vehicles.scene.json`
|
|
125
|
+
is its showroom. Open-top models have fixed lowered roofs, and cargo vans have enclosed load
|
|
126
|
+
compartments. Doors and roofs do not animate. The same reference-model limitations above apply.
|
|
127
|
+
|
|
128
|
+
The regional expansion adds 24 drivable reference vehicles for China, Japan, Korea, Europe,
|
|
129
|
+
South America and Africa, exposed by `MOLEN_REGIONAL_VEHICLE_ENTITY_IDS`. Most are model year
|
|
130
|
+
2024; the four-door Wuling Hongguang MINI EV is 2025. They share the same vehicle API, and
|
|
131
|
+
`content/entities/scenes/regional-vehicles.scene.json` displays the collection. The pack provides
|
|
132
|
+
the small regional fleet catalog used by Earth traffic and parking. See
|
|
133
|
+
[Regional vehicle fleets](regional-fleets.md) for selection, downloads, memory budgets and coverage.
|
|
134
|
+
|
|
135
|
+
Two additional reference vehicles are the white **2012 MINI Cooper Countryman**
|
|
136
|
+
(`molen.entities.vehicle.mini_cooper_countryman_2012`) and dark gray **2019 Acura MDX**
|
|
137
|
+
(`molen.entities.vehicle.acura_mdx_2019`). Their default and ambient paint palettes preserve
|
|
138
|
+
those colors. They share the driving API and appear in the main vehicle/entity helpers.
|
|
139
|
+
`content/entities/scenes/mini-acura.scene.json` displays them beside the existing green
|
|
140
|
+
2013 MINI Cooper (`molen.entities.vehicle.mini_cooper_2013`). See the
|
|
141
|
+
[MINI and Acura roster](https://github.com/bendyline/molen/blob/main/content/entities/MINI-ACURA.md).
|
|
142
|
+
|
|
143
|
+
Six motorhomes add two Class Cs, three Class As and one Class B. The **2022 Winnebago View 24D**
|
|
144
|
+
uses `molen.entities.vehicle.winnebago_view_2022`; the other five are Bendy designs.
|
|
145
|
+
`MOLEN_RV_ENTITY_IDS` enumerates them, also included in the main vehicle/entity helpers.
|
|
146
|
+
They share the driving API, with longer wheelbases, driver-eye cabins, detailed coach fittings,
|
|
147
|
+
and wheel/steering/instrument bindings. The largest Class A has an additional tag axle.
|
|
148
|
+
Their low-frequency `bus` ambient role selects large road traffic and excludes ordinary
|
|
149
|
+
curbside parking. Furnishings are visual geometry; doors, awnings and slideouts stay closed
|
|
150
|
+
in a touring configuration. The [RV roster](https://github.com/bendyline/molen/blob/main/content/entities/RVS.md)
|
|
151
|
+
records IDs and dimensions; `content/entities/scenes/rvs.scene.json` is the repository showroom.
|
|
152
|
+
|
|
75
153
|
`molen.entities.cycle.*` contains `standard_motorcycle`, `cruiser_motorcycle`, `motor_scooter`,
|
|
76
154
|
`city_bicycle`, `road_bicycle` and `cargo_bicycle`. These are rideable through the same vehicle/mount API as cars, with self-balancing
|
|
77
155
|
handling, saddle poses, animated steering and bicycle pedals. See [Riding cycles](vehicles.md#riding-cycles).
|
|
@@ -95,3 +173,7 @@ ferries. Each new bundle has an editable `models/recipe.json`; the shared author
|
|
|
95
173
|
models. It preserves an artist-edited master that no longer matches its generator pin.
|
|
96
174
|
After importing, `node packages/entities/scripts/capture-fleet.mjs` renders four views of each
|
|
97
175
|
model and both demo scenes; `--ids=sports-coupe,tugboat` narrows the review to selected models.
|
|
176
|
+
Those captures stay local. `node packages/entities/scripts/preview-fleet.mjs` then composes the
|
|
177
|
+
tracked summary artifacts from them: a `preview.png` beside each source bundle (exterior and
|
|
178
|
+
operator view, linked from its README) and the per-collection contact sheets under
|
|
179
|
+
`content/entities/`, such as `us-vehicles-preview.png`.
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
(`/kernel`: descriptors and presets, canonical rigs and sockets, deterministic gait and pose
|
|
5
5
|
evaluation, locomotion state, attachments) and a **client half** (`/client`: the `figure`
|
|
6
6
|
renderable kind that generates a skinned body from the descriptor and poses it every frame).
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
Humans use modeled facial relief (jaw, cheeks, nose, lips, eyelids and ears), shaped palms
|
|
8
|
+
and fingers, fitted clothing with collars, pockets and buttons, and rounded shoes. The
|
|
9
|
+
target is the readable polygonal realism of early open-world games. Surfaces share one
|
|
10
|
+
vertex-color material; no external texture downloads are required. See the figure rules in
|
|
11
|
+
[3D art guidelines](3d-art-guidelines.md).
|
|
10
12
|
|
|
11
13
|
Naming note: this is **not** `@bendyline/molen-kernel/kinematics` (the 2.5D collision layer) and
|
|
12
14
|
not `/character` (the gravity/jump mover). Figures sit on top of whatever moves an entity.
|
|
@@ -94,8 +96,29 @@ figure` prints the full shape (the `molen/figure@1` file format wraps the same f
|
|
|
94
96
|
| `seed` | detail jitter only (symmetry-safe) |
|
|
95
97
|
|
|
96
98
|
Every rig stands with its feet at y = 0 and its reference point exactly at `height`, whatever
|
|
97
|
-
the overrides. Bodies come in three detail tiers
|
|
98
|
-
and
|
|
99
|
+
the overrides. Bodies come in three detail tiers. Humans use roughly 7,400 triangles near, 2,200 at medium
|
|
100
|
+
distance and 1,100 for the rigid distant tier. The six animal presets use about 4,100–6,500 near,
|
|
101
|
+
2,100–2,900 medium and 1,100–1,500 distant triangles. The client
|
|
102
|
+
picks a tier by camera distance unless `lod` pins one. Near humans include separate fingers
|
|
103
|
+
with the default `hands: "fingers"`; `hands: "mitten"` keeps a joined finger silhouette. Medium
|
|
104
|
+
and distant hands merge the fingers while retaining the thumb. Facial details and clothing
|
|
105
|
+
use the canonical joint hierarchy, so gait, IK and attachment APIs are unchanged. The biped
|
|
106
|
+
rest pose holds the arms five degrees from vertical; idle adds a slight elbow bend, leaving
|
|
107
|
+
the hands beside the thighs. Idle rotates each forearm along the elbow-to-wrist axis so the
|
|
108
|
+
back of the hand angles forward, with small wrist flexion and gently curled fingers. Walking,
|
|
109
|
+
running and sitting use smaller forearm rotations. The rigid distant mesh retains the resting
|
|
110
|
+
hand orientation; fingers remain a fixed curved shape on the hand joint. Shared shoulder vertices and blended skin weights connect the
|
|
111
|
+
torso to the sleeves without separate shoulder caps.
|
|
112
|
+
|
|
113
|
+
Quadrupeds have species-shaped ribcages, tucked or full bellies, muscular shoulders and haunches,
|
|
114
|
+
and shaped joints. Dogs and cats have rounded paws with separate near/medium toes; horses have
|
|
115
|
+
single hooves, while cows, deer and sheep have split hooves. Continuous skull/muzzle surfaces,
|
|
116
|
+
eyelids, nostrils, lips and cupped ears replace the primitive heads. Cats have forward-facing eyes
|
|
117
|
+
and near-tier whiskers; horses have a crest mane and hanging hair tail; cows have surface coat
|
|
118
|
+
patches and a tufted tail; deer have branching antlers; sheep have a lightly rippled fleece.
|
|
119
|
+
Palette and feature overrides still apply. The same 27-joint hierarchy drives all animal tiers;
|
|
120
|
+
the distant tier is rigid and removes the small facial, toe and hair details. Animal proportions
|
|
121
|
+
now give the torso more depth while keeping the withers at `height` and soles at ground level.
|
|
99
122
|
|
|
100
123
|
## Locomotion
|
|
101
124
|
|
|
@@ -165,8 +188,9 @@ interpolated render tick reaches the tick a state changed on, so poses and trans
|
|
|
165
188
|
|
|
166
189
|
## Limits
|
|
167
190
|
|
|
168
|
-
-
|
|
169
|
-
|
|
191
|
+
- Fingers share the hand joint; individual finger articulation and facial expressions are not
|
|
192
|
+
implemented. Hair is a solid modeled surface attached to the head, with no strand physics.
|
|
193
|
+
- Clothing and skin use palette colors, without scanned skin textures or cloth simulation.
|
|
170
194
|
- Foot planting on uneven ground and quadruped IK are not evaluated yet.
|
|
171
195
|
- Imported skinned glTF figures and `molen figure bake` (skinned GLB export) are later phases.
|
|
172
196
|
- Accessories follow kernel-evaluated sockets at tick rate; fast hand swings can lag a few
|