@bendyline/molen-tooling 0.0.16 → 0.0.18
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 +466 -432
- package/dist/capture/worldgen-preview.js +405 -287
- package/dist/docs-src/guide/3d-art-guidelines.md +10 -7
- package/dist/docs-src/guide/building-interiors.md +59 -8
- package/dist/docs-src/guide/determinism.md +1 -1
- package/dist/docs-src/guide/earth-view.md +56 -11
- package/dist/docs-src/guide/entities.md +4 -1
- package/dist/docs-src/guide/graphics-performance.md +78 -6
- package/dist/docs-src/guide/medium-fi.md +40 -7
- package/dist/docs-src/guide/night-lighting.md +12 -2
- package/dist/docs-src/guide/recognizable-places.md +54 -5
- package/dist/docs-src/guide/regional-world.md +166 -36
- package/dist/docs-src/guide/rendering-backends.md +5 -2
- package/dist/docs-src/guide/sky.md +2 -1
- package/dist/docs-src/guide/surface-rendering.md +43 -6
- package/dist/docs-src/guide/typography.md +36 -0
- package/dist/docs-src/guide/vehicles.md +16 -1
- package/dist/docs-src/guide/worldgen.md +143 -7
- package/dist/docs-src/llms.txt +1 -1
- package/dist/docs-src/schemas/README.md +1 -0
- package/dist/docs-src/schemas/archstyle.md +209 -2
- package/dist/docs-src/schemas/components.md +41 -0
- package/dist/docs-src/schemas/region-atlas.md +2 -2
- package/dist/docs-src/schemas/regional-catalog.md +28 -2
- package/dist/docs-src/schemas/scatter.md +22 -2
- package/dist/docs-src/schemas/sign-looks.md +174 -0
- package/dist/docs-src/schemas/structure-placement-data.md +10 -0
- package/dist/docs-src/schemas/structure-placements.md +10 -0
- package/dist/docs-src/schemas/worldgen-batch.md +80 -0
- package/dist/templates/city-courier/gen/molen-types.ts +9 -1
- package/dist/templates/city-courier/scripts/molen-scripts.d.ts +8 -0
- package/dist/templates/index.json +17 -17
- package/dist/templates/skybound/gen/molen-types.ts +9 -1
- package/dist/templates/skybound/scripts/molen-scripts.d.ts +8 -0
- package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +8 -0
- package/dist/templates/top-down-arena/src/gen/molen-types.ts +9 -1
- package/package.json +12 -12
|
@@ -9,12 +9,38 @@ the archive's zoom-15 tiles.
|
|
|
9
9
|
## Identity library
|
|
10
10
|
|
|
11
11
|
The Earth catalog recognizes **44 mapped source businesses** by exact aliases and verified source
|
|
12
|
-
IDs. Each match selects a
|
|
13
|
-
Walmart maps to `sign.mart_store`, Taco Bell maps to `sign.taco_place`, Best Buy maps to
|
|
12
|
+
IDs. Each match selects a descriptor model, the sign a place shows when it has no name to show: for
|
|
13
|
+
example, Walmart maps to `sign.mart_store`, Taco Bell maps to `sign.taco_place`, Best Buy maps to
|
|
14
14
|
`sign.electronics_store`, and The Home Depot maps to `sign.hardware_store`. The
|
|
15
15
|
[retail catalog](https://github.com/bendyline/molen/blob/main/content/earth/businesses/README.md) documents the
|
|
16
16
|
source data and mapping policy.
|
|
17
17
|
|
|
18
|
+
## Names on signs
|
|
19
|
+
|
|
20
|
+
A storefront sign shows the name the map gives its place, so a street reads as its real
|
|
21
|
+
counterpart does: Thai Tom and Samir's Mediterranean Grill on Seattle's University Way, スターバックス
|
|
22
|
+
and 大垣書店 on Kyoto's Karasuma-dori.
|
|
23
|
+
|
|
24
|
+
- **One name per chain.** A business the catalog recognizes shows the same name on every branch:
|
|
25
|
+
its first alias, or the alias the map wrote in another script. Its plate, letters and accent band
|
|
26
|
+
take its descriptor sign's palette (white on red for Safeway, green for Starbucks), never a logo,
|
|
27
|
+
emblem, wordmark or brand typeface.
|
|
28
|
+
- **Its own name for everything else.** A place the catalog does not know shows its mapped name,
|
|
29
|
+
cleaned of store numbers, a trailing parenthesized branch (`(Downtown)`) and decorative symbols.
|
|
30
|
+
It takes a look from its category's family in the
|
|
31
|
+
[sign looks](https://github.com/bendyline/molen/blob/main/content/earth/businesses/sign-looks.json)
|
|
32
|
+
(`molen/sign-looks@1`), picked by the name, so every branch of a local chain matches.
|
|
33
|
+
- **Fallbacks.** A name the loaded faces cannot set falls back to the map's English name, then to
|
|
34
|
+
the descriptor sign. So does a place without a name, and every place when the host passes
|
|
35
|
+
`signNames: 'generic'`.
|
|
36
|
+
|
|
37
|
+
Names are set from glyph atlases (see [Fonts and lettering](typography.md#glyph-atlases)): the Earth
|
|
38
|
+
pack's Latin faces, plus any region pack that adds its scripts, such as the Kyoto pack's Japanese.
|
|
39
|
+
A tile's named signs are one mesh, two triangles a letter, drawn with one shared texture and
|
|
40
|
+
material: on Seattle's University Way the 149 storefronts of one tile are 5,322 triangles, where
|
|
41
|
+
their descriptor models were 59,233. Letters are drawn while they are a few pixels tall and plates
|
|
42
|
+
until they are under two, then neither.
|
|
43
|
+
|
|
18
44
|
Nine generic treatments cover grocery, restaurant, cafe, pharmacy, shop, department store, shopping
|
|
19
45
|
mall, outlet center and strip mall. These also support unnamed points with known categories.
|
|
20
46
|
Unknown identities keep the normal architectural fallback. This is a stylized descriptor library,
|
|
@@ -42,7 +68,13 @@ conservative tenancy heuristics, not surveyed lease boundaries.
|
|
|
42
68
|
A single business directly identified by its footprint can color the whole shell. Containment-only
|
|
43
69
|
matches and shared tenants color only their own fascia,
|
|
44
70
|
canopy and entry accents. Existing residential/civic/tall-building styles and floor counts survive
|
|
45
|
-
when a shop is a ground-floor tenant.
|
|
71
|
+
when a shop is a ground-floor tenant. Whether a low building with a business becomes a store
|
|
72
|
+
shell at all depends on its region: North American and Southwest profiles build shops as shells
|
|
73
|
+
wherever they stand, and elsewhere a shop in a row or under flats keeps its region's building
|
|
74
|
+
and gains a frontage, unless it is purpose-built (free-standing on retail land, a catalog chain's
|
|
75
|
+
own building, or 600 m² and more). See
|
|
76
|
+
[rows, shops and places of worship](worldgen.md#rows-shops-and-places-of-worship).
|
|
77
|
+
Measured footprints/heights remain authoritative. Frontage is estimated
|
|
46
78
|
from the POI and nearby access lines; exact entrance location, sign location and tenant width are
|
|
47
79
|
generally absent from the archive.
|
|
48
80
|
|
|
@@ -72,7 +104,8 @@ stores, enclosed malls, strip malls and outlet centers. Broad frontages raise an
|
|
|
72
104
|
fascia to remain readable on taller shells; source heights and floor counts still win. The building
|
|
73
105
|
generator adapts that treatment to a measured footprint; this is not a fixed building mesh.
|
|
74
106
|
Mapped-business descriptors use `symbol: "letters"` with initials derived from their generic
|
|
75
|
-
titles. Source recognition stays in the Earth catalog
|
|
107
|
+
titles. Source recognition stays in the Earth catalog and the descriptor models stay generic; the
|
|
108
|
+
names a sign shows come from the map, set as described in [Names on signs](#names-on-signs).
|
|
76
109
|
Furniture uses `generator: "boxes"` with ordered
|
|
77
110
|
metric parts and optional detail tiers (0 near, 1 medium, 2 distant).
|
|
78
111
|
|
|
@@ -85,6 +118,13 @@ only data crosses the Worker boundary. Without `places`, mapped businesses are n
|
|
|
85
118
|
no street furniture is placed. Rendering cache keys include both content hashes, so palette and
|
|
86
119
|
recipe changes invalidate cached terrain render output.
|
|
87
120
|
|
|
121
|
+
To show names, add `signLooks` (the Earth pack's `sign-looks` document) and `glyphs` (every open
|
|
122
|
+
pack's `glyph-atlas` documents, the Earth pack's first); `signNames: 'generic'` leaves them off.
|
|
123
|
+
The renderers then need a `signMaterial`: `createSignMaterialAsync(backend, texture,
|
|
124
|
+
range)` from `@bendyline/molen-worldgen/client`, over `createSignAtlasTexture` of the atlas pages.
|
|
125
|
+
`loadEarthContent` and the Earth view do all of this: the content's `signAtlas()` reads the pages,
|
|
126
|
+
and the view's `signNames` option turns names off.
|
|
127
|
+
|
|
88
128
|
Landmarks alone are `createLandmarkLibrary({ catalog, models })` from
|
|
89
129
|
`@bendyline/molen-worldgen/kernel`, or `resolveLandmarkCatalogDocuments(catalog, readDocument)` for
|
|
90
130
|
just the definitions; pass definitions to `generateLandmarkModel(id, definitions, tier)` or
|
|
@@ -120,7 +160,10 @@ The engine uses generic `BuildingRequest.appearance` and `storefronts` fields; g
|
|
|
120
160
|
and category matching stay in the Earth adapter. Custom scenes can supply those same fields through
|
|
121
161
|
`worldgenBuilding`. Each storefront supplies an identity, local anchor, accent, model reference,
|
|
122
162
|
optional native sign size, and desired width. Canonical signs are 4 × 1.35 m, front +Z, base Y=0.
|
|
123
|
-
Signs and outdoor objects use shared instanced geometry and a shared vertex-color material.
|
|
163
|
+
Signs and outdoor objects use shared instanced geometry and a shared vertex-color material. A
|
|
164
|
+
storefront may also carry a `sign` (text, plate, ink, optional band, font role, letter spacing):
|
|
165
|
+
with a glyph atlas set on the batch (`glyphs`), it is set as a name in the batch's sign mesh
|
|
166
|
+
(`WorldgenBatchOutput.signs`); without one, or when the atlas lacks a letter, the sign model shows.
|
|
124
167
|
|
|
125
168
|
## Mapped outdoor objects
|
|
126
169
|
|
|
@@ -131,6 +174,12 @@ are ground-fitted, deduplicated and budgeted before procedural scatter.
|
|
|
131
174
|
|
|
132
175
|
When the source supplies them, tree height/crown diameter/leaf type, lamp height, numeric direction,
|
|
133
176
|
and bike-parking capacity influence the model. Missing dimensions use conservative defaults.
|
|
177
|
+
Without a mapped direction, a lamp faces the nearest street within 18 m, even where a sidewalk
|
|
178
|
+
mapped as its own line runs closer (a lamp in the planting strip has that sidewalk behind it);
|
|
179
|
+
with no street in reach it faces the nearest path. Motorways, trunk and primary roads and roads
|
|
180
|
+
of four or more lanes keep the mast-arm `street_lamp`, reaching over their traffic; other
|
|
181
|
+
streets, paths and plazas get the post-top `street_lamp.post` where the library holds it. A
|
|
182
|
+
mapped lamp height scales the arm's 7.2 m pole or the post's 4.8 m.
|
|
134
183
|
A charging POI denotes a station, so the renderer places a representative pedestal rather than
|
|
135
184
|
inventing a surveyed bank of connectors. The library includes a red/white fast-charger variant.
|
|
136
185
|
|
|
@@ -22,7 +22,7 @@ catalogs across those packs, validates references, and passes plain documents to
|
|
|
22
22
|
An architecture-only catalog works without an ecological atlas. A catalog scoped to a different
|
|
23
23
|
style pack is omitted, so a custom style pack can retain the ecological content.
|
|
24
24
|
|
|
25
|
-
The ecological atlas and catalog total about
|
|
25
|
+
The ecological atlas and catalog total about 207 KB gzip (212 KB as a content pack). Its 546 procedural plant presets need no
|
|
26
26
|
GLB downloads. The architectural atlas is about 313 KB gzip; ordinary regional recipes are small
|
|
27
27
|
JSON files using the default pack's shared material graphs. Authored landmark GLBs continue to
|
|
28
28
|
use the existing geographically sharded, lazy model archives.
|
|
@@ -39,10 +39,16 @@ observations. Actual local land cover controls whether a plant can be placed.
|
|
|
39
39
|
Architectural envelopes derive from [Natural Earth 1:50m country outlines](https://www.naturalearthdata.com/downloads/50m-cultural-vectors/50m-admin-0-countries-2/),
|
|
40
40
|
which are [public domain](https://www.naturalearthdata.com/about/terms-of-use/). Exterior rings are
|
|
41
41
|
simplified at 0.02 degrees and coordinates rounded to 0.001 degrees. The shipped atlas groups 241
|
|
42
|
-
country/territory features into
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
country/territory features into 51 broad envelopes, with ten subregions above them where a
|
|
43
|
+
building tradition changes inside one country or runs across several: the Pacific Northwest, the
|
|
44
|
+
US Southwest, the North American Northeast, the Cyclades, Mediterranean France, the English
|
|
45
|
+
limestone belt (Bath and the Cotswolds), central Italy, the Rif, and the western and central
|
|
46
|
+
Sahel. Each is a rectangle masked by its parent envelope's land. Exact containment wins; a
|
|
47
|
+
nearest-outline fallback fills otherwise unclassified coastal gaps within 15 km in local world
|
|
48
|
+
coordinates. Simplified outlines cut estuaries, lagoons and inshore islands off (central Lisbon,
|
|
49
|
+
Venice, Mumbai's Fort, Cartagena, Cádiz, Miami Beach), and a building stands on land, so the
|
|
50
|
+
nearest outline is its region. These envelopes are visual priors, not building-style surveys or
|
|
51
|
+
a political boundary service.
|
|
46
52
|
|
|
47
53
|
Ecological lookup uses a separate grid, so a national border does not move a forest. Each plant
|
|
48
54
|
candidate and each building centroid resolves its own profile. Ground meshes sample regional
|
|
@@ -105,15 +111,15 @@ placement seeds stay tied to individual scatter IDs/versions rather than unrelat
|
|
|
105
111
|
## Plant and building selection
|
|
106
112
|
|
|
107
113
|
The plant families cover broadleaf, conifer, palm, cactus, succulent, bamboo, banana, grass, fern, reed,
|
|
108
|
-
mangrove, deadwood, shrub, thicket, forb, vine, mat,
|
|
109
|
-
parks, orchards, and wetlands. Regional refinements keep American cacti out of Old World wild
|
|
114
|
+
mangrove, deadwood, shrub, thicket, forb, vine, mat, fallen-wood, clipped hedge, and rock silhouettes. Habitats combine canopy, understory, ground cover, open land,
|
|
115
|
+
parks, yards, verges, orchards, and wetlands. Regional refinements keep American cacti out of Old World wild
|
|
110
116
|
desert profiles and avoid applying Australian eucalyptus profiles to New Zealand.
|
|
111
117
|
|
|
112
|
-
Each of the
|
|
118
|
+
Each of the 182 plant forms has a base, spreading, and slender preset, available in
|
|
113
119
|
every applicable habitat and crop rule. Optional `shapeSeed` varies branch/frond arrangements,
|
|
114
120
|
crown contours and stem profiles independently of the placement seed. Dimensions, crown height,
|
|
115
121
|
trunk lean and restrained foliage tones also vary; these are visual forms, not additional taxa.
|
|
116
|
-
All
|
|
122
|
+
All 21 procedural families share the existing near/medium/far triangle limits.
|
|
117
123
|
|
|
118
124
|
### Brush and ground coverage
|
|
119
125
|
|
|
@@ -125,7 +131,8 @@ trunk and hanging from their branches. They do not attach to arbitrary mapped tr
|
|
|
125
131
|
|
|
126
132
|
Natural forest, wood, scrub and heath receive an `understory` scatter layer. Open grassland and
|
|
127
133
|
savanna receive sparser brush. Cultivated polygons, parks, gardens and residential land do not
|
|
128
|
-
receive wild overgrowth from these rules
|
|
134
|
+
receive wild overgrowth from these rules; yards and parks are planted instead (see
|
|
135
|
+
[Yards, parks and verges](#yards-parks-and-verges)). Explicit wetland labels permit sedge patches; desert
|
|
129
136
|
profiles retain sparse dry forms and never acquire humid forest plants.
|
|
130
137
|
|
|
131
138
|
The optional clustering `sharedSeed` coordinates broad patches across vegetation layers while
|
|
@@ -136,11 +143,79 @@ building clearances than trees; road surfaces, buildings and water remain exclud
|
|
|
136
143
|
|
|
137
144
|
Earth tiles reserve `maxUnderstoryInstances` / `maxUnderstoryModels` separately from canopy and
|
|
138
145
|
groundcover. At the finest level, Economy allows 450 brush instances/two models, Balanced
|
|
139
|
-
1,
|
|
140
|
-
coarser levels omit brush.
|
|
141
|
-
0/
|
|
146
|
+
1,800/four, and High 2,800/six. One coarser level retains 80/250/400 instances respectively;
|
|
147
|
+
coarser levels omit brush. Groundcover instance caps are 0/6,500/10,000, with
|
|
148
|
+
0/seven/ten model slots. Economy keeps simplified shrub masses while omitting fine blades and
|
|
142
149
|
litter. These are per-tile limits, not whole-scene frame-rate guarantees.
|
|
143
150
|
|
|
151
|
+
A model slot is what a walker reads as variety: a tile draws only its commonest species in each
|
|
152
|
+
layer, and the rest take the place of their rule's commonest one. Ground cover and beds, which
|
|
153
|
+
have no distant form, stop drawing about 165 m from the edge of their quarter of the tile at
|
|
154
|
+
High on a 1080-line view (sooner at lower quality). That is nearer than before, and it is what
|
|
155
|
+
pays for the larger counts: a tuft a quarter of a kilometer off is a pixel or two.
|
|
156
|
+
|
|
157
|
+
### Yards, parks and verges
|
|
158
|
+
|
|
159
|
+
Planted ground has its own scatter layer, `garden`, with its own budget
|
|
160
|
+
(`maxGardenInstances` / `maxGardenModels`: 700/three at Economy, 5,000/nine at Balanced and
|
|
161
|
+
9,000/fourteen at High on the finest level), so a wood in the same tile cannot thin a
|
|
162
|
+
neighborhood's planting and the planting cannot thin the wood. Each habitat plants by role:
|
|
163
|
+
|
|
164
|
+
| Rule | Land | What it places |
|
|
165
|
+
| --- | --- | --- |
|
|
166
|
+
| `yard_shrubs`, `yard_beds` | Residential land and inferred yards | Garden shrubs and clipped globes, with flower beds, ornamental grasses, ferns and mulch gathered round them |
|
|
167
|
+
| `yard_ornamentals` | The same | Small flowering and red-leaved trees, columnar conifers, hedge runs |
|
|
168
|
+
| `lawn_flowers` | Yards and parks | Clover, daisies and other low flowers in mown grass |
|
|
169
|
+
| `park_shrubs`, `park_beds` | Parks, gardens, cemeteries, greens | Larger shrub borders and planted beds |
|
|
170
|
+
| `street_planting` | Commercial, retail, civic, school and hospital land | Sparse landscaping shrubs and hedges |
|
|
171
|
+
|
|
172
|
+
Shrubs and beds share one density field, so a yard is planted in pockets a few meters across
|
|
173
|
+
with lawn between them. Rough ground is separate and stays in the wild layers: `verge_grass` and
|
|
174
|
+
`verge_brush` put rank grass, weeds, wildflowers and pioneer brush on unmapped ground, `waste_ground`
|
|
175
|
+
puts weeds on industrial and railway land, and `outcrops` puts stones on open dry, cold and
|
|
176
|
+
desert ground.
|
|
177
|
+
|
|
178
|
+
The 83 forms added for this are regional lists, not a planting survey: rhododendron, hydrangea
|
|
179
|
+
and sword fern in Pacific Northwest yards, sheared azalea mounds and cloud-pruned pines in
|
|
180
|
+
Japan, oleander, lavender and pencil cypress round the Mediterranean, hibiscus and croton in the
|
|
181
|
+
tropics, bottlebrush in Australia. A preset's optional `bloom` color draws blossom as part of the
|
|
182
|
+
plant's own mesh, and small ornamental trees carry theirs as the spring color of their
|
|
183
|
+
`phenology`, so a cherry is pink in its spring months.
|
|
184
|
+
|
|
185
|
+
A tile draws each garden model once per quarter, so the layer chooses its models quarter by
|
|
186
|
+
quarter and by role: each rule's commonest species there first, then each rule's second. A street
|
|
187
|
+
therefore differs from the next, and the few trees and hedges are not crowded out by the beds.
|
|
188
|
+
Lists are nearly flat for the same reason.
|
|
189
|
+
|
|
190
|
+
Limits: hedge runs are placed like any other plant, at a random bearing, and do not follow a lot
|
|
191
|
+
line or a fence. Blossom on shrubs and beds does not follow the month. Planting follows mapped
|
|
192
|
+
land use, so a yard mapped as nothing in particular gets verge grass, not a garden.
|
|
193
|
+
|
|
194
|
+
### Shrubs on painted crowns
|
|
195
|
+
|
|
196
|
+
Dry ground paints its own shrubs. A scatter document's `surface.detail` gives each land class a
|
|
197
|
+
brush level, and the terrain ground material paints round shrub crowns at that level: one
|
|
198
|
+
candidate per 8 m cell, 2 to 5 m across, covering a tenth of the ground at full brush. Desert and
|
|
199
|
+
scrubland keep their speckle to the horizon without a model per shrub. Each crown is shaded as a
|
|
200
|
+
low dome, lit on the sun's side, with a leafy outline that resolves as the camera nears.
|
|
201
|
+
|
|
202
|
+
A rule with `crowns` stands a plant on each of those crowns. The plant sits at the crown's
|
|
203
|
+
center and is fitted to its width by the population's `width` (the model's crown width in meters
|
|
204
|
+
at scale 1); a wider crown also stands taller. Within about 25 to 60 m of the camera the painted
|
|
205
|
+
crown gives way to the plant, so the crown seen from the air is the shrub walked up to. The
|
|
206
|
+
regional catalog gives every habitat with ground detail a `ground_crowns` rule: creosote-like
|
|
207
|
+
resin bush, dryland shrubs and thorn thickets in deserts, and the habitat's own brush elsewhere.
|
|
208
|
+
|
|
209
|
+
Crowns are kept whole, because a crown left without its plant would vanish as it was reached.
|
|
210
|
+
`keepByTier` only switches the rule off (the catalog runs it on the finest tiles alone), a host's
|
|
211
|
+
quality keep does not thin it, and its plants sit outside their layer's instance cap, bounded by
|
|
212
|
+
the rule's own cap. A tile of open desert at Yuma, about a kilometer across, carries about 3,000.
|
|
213
|
+
The crown pattern is a host input (`ScatterSampleInput.crowns`): Earth tiles supply it, and
|
|
214
|
+
without it a `crowns` rule places nothing. Limits: the brush is matched by land class and
|
|
215
|
+
building coverage, so where two mapped land classes overlap and the ground and scatter pick
|
|
216
|
+
different ones, a crown at that edge can have no plant. Economy, which skips the finest
|
|
217
|
+
vegetation tier, shows the painted crowns only.
|
|
218
|
+
|
|
144
219
|
The brush milestone's 234 recipes produce 324 appearances including deciduous seasons. All geometry
|
|
145
220
|
is generated and shared by recipe and LOD; the brush expansion adds about 25 KB to the compressed
|
|
146
221
|
ecology pack and no GLB downloads. Reproduce comparison captures with
|
|
@@ -211,33 +286,71 @@ tree line at sea level comes from the ecological atlas's tundra, not from this.
|
|
|
211
286
|
own `altitude` limits still apply; pass `treeline` to the worldgen kernel's scatter sampler to
|
|
212
287
|
use the mechanism elsewhere.
|
|
213
288
|
|
|
214
|
-
The ordinary architectural catalog supplies
|
|
215
|
-
uses: detached homes, attached homes, apartments, commercial, civic, industrial,
|
|
216
|
-
buildings. Mapped use wins over neighborhood inference. Taller measured
|
|
217
|
-
select compatible apartment recipes; source footprint, height, and levels
|
|
218
|
-
generated geometry. Named precedents from the 120-entry structure library
|
|
219
|
-
explicitly. Without evidence of age, the ordinary catalog does not randomly
|
|
220
|
-
historic building type to an untyped home.
|
|
221
|
-
|
|
289
|
+
The ordinary architectural catalog supplies 608 recipes across 32 construction families and nine
|
|
290
|
+
uses: detached homes, attached homes, apartments, commercial, towers, civic, industrial, farm
|
|
291
|
+
buildings, and places of worship. Mapped use wins over neighborhood inference. Taller measured
|
|
292
|
+
residential buildings select compatible apartment recipes; source footprint, height, and levels
|
|
293
|
+
still control the generated geometry. Named precedents from the 120-entry structure library
|
|
294
|
+
remain available explicitly. Without evidence of age, the ordinary catalog does not randomly
|
|
295
|
+
assign an iconic historic building type to an untyped home.
|
|
296
|
+
|
|
297
|
+
A family is what an ordinary building in its regions is made of and roofed with: several wall
|
|
298
|
+
materials and roof coverings, each with its own palette and texture scale (brick colors stay on
|
|
299
|
+
brick), a roof pitch, the share of flat roofs, the colors shutters and doors are painted, and
|
|
300
|
+
which way a house in a row turns its ridge. Britain's is brick, render and sandstone under slate
|
|
301
|
+
with eaves to the street; the Low Countries' dark brick under pantiles with gables to it;
|
|
302
|
+
the Mediterranean's warm render and limestone under terracotta; the Cyclades' limewash under
|
|
303
|
+
flat roofs; the Maghreb's and South Asia's render under roof terraces; sub-Saharan Africa's and
|
|
304
|
+
the Pacific's under corrugated sheet. Where a town's larger buildings are built like its houses,
|
|
305
|
+
its flats, shops and civic buildings take the family's walls and keep a pitched roof through the
|
|
306
|
+
height those roofs were built to. They are also drawn as masonry blocks: storeys of 3.15–3.5 m
|
|
307
|
+
over a 3.7–4.3 m ground floor (so a mapped 21 m is five floors, not seven), windows taller than
|
|
308
|
+
wide over a low sill, a plinth, a string course to each floor and a cornice under a flat roof.
|
|
309
|
+
Elsewhere a block is rendered concrete under a flat roof, and one of its three facades is an
|
|
310
|
+
older building: brick in North America, Australia, the Pacific and South Africa, the family's
|
|
311
|
+
own wall materials in the rest, with the same tall windows, plinth and cornice. A town whose
|
|
312
|
+
blocks were all built in one decade reads as an office park.
|
|
313
|
+
|
|
314
|
+
A block of flats with no mapped height is guessed a storey taller than the family's row houses:
|
|
315
|
+
two to three floors in the Cyclades and the Sahel, three to five around the Mediterranean, four
|
|
316
|
+
to five in the North American Northeast. The upper figure is also the most the Earth binding
|
|
317
|
+
lets any unmeasured building of the region be guessed at; see
|
|
318
|
+
[how tall an unmeasured building is](worldgen.md#how-tall-an-unmeasured-building-is).
|
|
319
|
+
|
|
320
|
+
A building is its region's before it is anything else. The basemap does not keep a building's
|
|
321
|
+
type, and most towns have no land-use polygon, so each profile ends in rules for footprints
|
|
322
|
+
that are neither typed nor on labelled land: small ones are the family's houses, ones that share
|
|
323
|
+
their walls its row houses, large or tall ones its flats or commercial blocks. A footprint over
|
|
324
|
+
35 m takes the glass-and-panel tower recipe only with a floor plate of 250 m² (50 m where towns
|
|
325
|
+
are built in masonry): a slender shaft is a bell tower or a minaret. See
|
|
326
|
+
[rows, shops and places of worship](worldgen.md#rows-shops-and-places-of-worship) for how
|
|
327
|
+
party walls, businesses and religion are read from the map.
|
|
328
|
+
Homes, attached homes, apartments, commercial buildings and towers each have three weighted
|
|
329
|
+
recipes per family: base, compact facade, and open facade. Civic, industrial and farm buildings
|
|
330
|
+
and places of worship, which stand alone in a street, have one. Stable building
|
|
222
331
|
identity selects their window/bay rhythm, roof weighting, eaves, parapets and supported facade
|
|
223
332
|
details. The facade names do not resize the mapped building. Explicit original recipe IDs remain
|
|
224
333
|
available, and identity-free selection keeps the base recipe.
|
|
225
334
|
|
|
226
|
-
For inferred vacant lots,
|
|
227
|
-
|
|
335
|
+
For inferred vacant lots, the family's `lots` pattern first decides whether a block is rows at
|
|
336
|
+
the street or houses in yards (rows in most of the world, by a share and a rhythm per family;
|
|
337
|
+
yards in North America, Australia and the Pacific). In a block of yards, regional `lotPlans`
|
|
338
|
+
weights select cottages, L-shaped ranches, courtyards, compact homes, attached-garage plans or
|
|
339
|
+
commercial shopfronts. The US Southwest has
|
|
228
340
|
its own stucco-and-ceramic-tile family; Washington uses the North American siding-and-shingle
|
|
229
|
-
family. Each inferred lot reserves a path or driveway to its frontage street. Mapped land use
|
|
341
|
+
family, with a share of shingled and brick houses. Each inferred lot reserves a path or driveway to its frontage street. Mapped land use
|
|
230
342
|
selects residential versus commercial pools; see [building infill](worldgen.md#inferred-buildings-where-outlines-are-missing).
|
|
231
343
|
|
|
232
344
|
Near-detail ordinary facades include a bounded single, double, or service entrance. The inferred
|
|
233
345
|
entrance fits an eligible exterior wall, reserves a ground-floor window bay, and yields to known
|
|
234
346
|
structural openings, open ground floors, and raised buildings. It is a visual entrance; it does
|
|
235
|
-
not create a traversable opening or claim a surveyed door position.
|
|
347
|
+
not create a traversable opening or claim a surveyed door position. A building drawn with the
|
|
348
|
+
simplified facade a crowded tile falls back to keeps the same entrance as a bare door leaf. Industrial and farm recipes
|
|
236
349
|
also include high windows and larger service doors.
|
|
237
350
|
|
|
238
351
|
## Agricultural land use
|
|
239
352
|
|
|
240
|
-
All
|
|
353
|
+
All 38 habitat profiles supply an independent `agriculture` channel, refined by ten worldwide
|
|
241
354
|
agricultural overrides (including the Corn Belt, Cerrado/Pampas and Indus/Gangetic plains). It activates only on
|
|
242
355
|
mapped or retrieved farmland, cropland, orchards, vineyards, plantations and pasture. Climate
|
|
243
356
|
alone never turns natural habitat into a farm. Ordinary farmland receives agricultural
|
|
@@ -246,7 +359,7 @@ appearance from the ecology pack without another download.
|
|
|
246
359
|
The 22 crop recipes cover maize, soybean, small cereals, rice, cotton, sugarcane, sunflower,
|
|
247
360
|
rapeseed, root vegetables, sorghum; olive, fruit, date, coconut, oil-palm, coffee, tea, banana,
|
|
248
361
|
rubber and grape cultivation; and pasture/fallow surfaces. Ten annual forms each have three
|
|
249
|
-
procedural variants. The complete catalog now has
|
|
362
|
+
procedural variants. The complete catalog now has 546 plant recipes and 837 appearances with
|
|
250
363
|
crop stages and deciduous seasons. Several source tags share a visual recipe: wheat, barley
|
|
251
364
|
and rye use the small-cereal model. Preserve the source `crop` tag when presenting observations;
|
|
252
365
|
`cultivation.crop` identifies a rendering recipe.
|
|
@@ -340,12 +453,12 @@ different order does not change selection. Earth and World Explorer load it by d
|
|
|
340
453
|
is in the host's pack index. `ambient: { wildlife: false }` disables animals in `mountEarthView`;
|
|
341
454
|
World Explorer accepts `?wildlife=0`. Frozen captures retain the existing ambient opt-in rule.
|
|
342
455
|
|
|
343
|
-
The catalog has
|
|
344
|
-
functional
|
|
456
|
+
The catalog has 111 recipes: three adult body/coat forms for each of 21 named mammal taxa and of
|
|
457
|
+
sixteen functional groups (birds, reptiles, fish, insects, and an unnamed cat and rabbit). These are modest visual variations, not claims
|
|
345
458
|
about sex, age or subspecies. Each trio shares habitat/range/season gates and divides the previous
|
|
346
459
|
visual density equally; total expected abundance and population caps stay unchanged. Mammal country membership comes from Mammal Diversity Database v2.5 under
|
|
347
460
|
CC BY 4.0. A quarter-degree Natural Earth map-unit grid preserves overseas territory distinctions.
|
|
348
|
-
The range document compresses to about 30 KB; the recipe catalog adds about
|
|
461
|
+
The range document compresses to about 30 KB; the recipe catalog adds about 7.5 KB (41 KB as a content pack). No animal GLBs
|
|
349
462
|
are downloaded. Source hashes, transformations, licenses, and limitations ship in the pack.
|
|
350
463
|
|
|
351
464
|
Country membership is a coarse limit, not within-country occupancy. Named taxa require an
|
|
@@ -355,12 +468,26 @@ explicit mapped conservation habitat, and water-dependent animals require mapped
|
|
|
355
468
|
An uncovered range cell cannot authorize a named mammal. Unnamed functional groups deliberately
|
|
356
469
|
make no precise species claim. These choices and visual densities are authored priors, not a census.
|
|
357
470
|
|
|
358
|
-
|
|
359
|
-
|
|
471
|
+
Seven of the functional groups live in towns: small songbirds, a crow-sized dark bird, pigeons,
|
|
472
|
+
waterfowl grazing lawns within 60 m of mapped water, butterflies, cats and rabbits. They carry no
|
|
473
|
+
taxon and no range: habitat places them, within broad biome limits for the waterfowl and
|
|
474
|
+
butterflies and on temperate Nearctic and Palearctic ground for the rabbit. Their
|
|
475
|
+
visual densities are several times the wild groups', because roads and houses leave only part of
|
|
476
|
+
a block to stand on and a small bird is seen from tens of meters, not hundreds.
|
|
477
|
+
|
|
478
|
+
Wildlife reads the finest displayed land-cover and human-feature tiles. Residential land is the
|
|
479
|
+
`yard` habitat: its lawns and gardens are usable between the houses and streets, which keep their
|
|
480
|
+
buffers. Gardens, cemeteries, village greens, recreation grounds and golf courses count as `park`,
|
|
481
|
+
and a park, lawn or wood mapped on residential land is that habitat, in whichever order the map
|
|
482
|
+
lists them. Unknown terrain, commercial, industrial and other built-up land, roads, buildings,
|
|
483
|
+
water inappropriate to the animal, and steep slopes reject placement.
|
|
360
484
|
Island/courtyard holes remain usable. Swimming animals share the rendered water datum; flight
|
|
361
|
-
uses a bounded clearance
|
|
362
|
-
|
|
363
|
-
|
|
485
|
+
uses a bounded clearance, and a flying animal may cross a road on its way but never a building
|
|
486
|
+
(the habitat has no building heights). The 20 Hz kernel uses stable world-grid candidates,
|
|
487
|
+
independent seeds, plain restorable state, bounded wandering, and path substeps. Earth quality
|
|
488
|
+
sets the population, the nearest candidates first: 6, 8, 12, 16, 24 and 32 animals from Minimum
|
|
489
|
+
to Ultra (`earthPerformanceTier(level).ambient.animals`). Distance and pose caps follow quality
|
|
490
|
+
too. Models share recipe geometry, use one opaque skinned draw per animal, and
|
|
364
491
|
dispose with the terrain stream. Tiny animals disappear at short distances.
|
|
365
492
|
|
|
366
493
|
An explicit vegetation month also suppresses the generic insect/lizard groups in the coarse
|
|
@@ -373,7 +500,10 @@ priors, not a migration simulation. They are independent of the named visual mam
|
|
|
373
500
|
Crickets still use the generic recording gated by regional habitat and season. Both retain
|
|
374
501
|
weather, height and vehicle suppression. Composing hosts supply `EarthAudioFrame.location`
|
|
375
502
|
and `regionalAmbience` from `EarthWildlife.ambience`; older packs without a birdsong catalog
|
|
376
|
-
retain the generic bird soundscape.
|
|
503
|
+
retain the generic bird soundscape. A listener on a street or path hears the habitat the road
|
|
504
|
+
runs through; inside a building's footprint or on built-up land there is none. The habitat
|
|
505
|
+
reported in residential land is `yard`, so a birdsong profile is heard there only when its
|
|
506
|
+
`habitats` name it. See [Sound and music](audio.md).
|
|
377
507
|
|
|
378
508
|
## Authoring and verification in this repository
|
|
379
509
|
|
|
@@ -146,8 +146,11 @@ instance-matrix buffers; camera, material, animation and other uniforms continue
|
|
|
146
146
|
normally. Revalidate this adapter before widening the three peer range. Large instance buffers retain Three's vertex-attribute path.
|
|
147
147
|
|
|
148
148
|
Use `renderer.createRenderGroup()` for independent opaque terrain/content chunks. It returns
|
|
149
|
-
a managed WebGPU `BundleGroup`, or a normal Three `Group` on WebGL
|
|
150
|
-
|
|
149
|
+
a managed WebGPU `BundleGroup`, or a normal Three `Group` on WebGL, which the renderer leaves out
|
|
150
|
+
of the scene walks and shadow maps its stated bounds cannot reach (see
|
|
151
|
+
[graphics performance](graphics-performance.md#staged-preparation-and-admission)). The pyramid
|
|
152
|
+
terrain stream accepts `createTileGroup: () => renderer.createRenderGroup()` and keeps each
|
|
153
|
+
tile's bounds; World Explorer already uses it.
|
|
151
154
|
The renderer checks command state on every frame, updating LOD and re-recording when the
|
|
152
155
|
camera, hierarchy, visibility, transforms, draw counts, geometry, materials or lighting change.
|
|
153
156
|
During camera motion it uses normal draw submission and skips command snapshots, retaining
|
|
@@ -108,7 +108,8 @@ main thread each time it is drawn. `renderer.farShadowInfo` reports its radius,
|
|
|
108
108
|
been drawn and how long the last drawing took.
|
|
109
109
|
`renderer.shadowTexelSize` reports the meters one texel covers as of the last frame (`undefined`
|
|
110
110
|
while sun shadows are off), for hosts that keep a subject the map cannot resolve out of the
|
|
111
|
-
shadow pass (see `AircraftVisual.updateShadows` in the aircraft guide
|
|
111
|
+
shadow pass (see `AircraftVisual.updateShadows` in the aircraft guide and
|
|
112
|
+
`VehicleVisual.updateShadows` in the vehicles guide).
|
|
112
113
|
`sun.visible`/`moon.visible` control the disks independently of lighting. Use the corresponding
|
|
113
114
|
light intensity to disable illumination. `sun.size` and `moon.size` are visual multipliers;
|
|
114
115
|
the default 1 preserves real angular size. Larger values help stylized scenes and small displays.
|
|
@@ -107,7 +107,8 @@ setTerrainGroundOrigin(pavement, [worldOrigin[0], worldOrigin[2]]);
|
|
|
107
107
|
|
|
108
108
|
The material reads a `surfaceDetail` attribute the surface builder writes on every road, sidewalk,
|
|
109
109
|
curb, marking and lot: meters along the band, meters across it from its edge, the surface kind
|
|
110
|
-
and band width, and a road's lane width and wear grade
|
|
110
|
+
and band width, and a road's lane width and wear grade or the surface a marking is painted on.
|
|
111
|
+
Roads and lots get asphalt aggregate
|
|
111
112
|
(within a few meters, crisp pale chips and dark pits a few centimeters across), blotchy wear,
|
|
112
113
|
polished wheel tracks and an oil line in each lane, grit in the gutters, storm-drain grates,
|
|
113
114
|
manhole covers and the odd darker repaired section; asphalt and concrete both get hairline cracks.
|
|
@@ -117,7 +118,12 @@ on secondary and tertiary roads (1), more on residential streets (2) and most on
|
|
|
117
118
|
alleys (3). A band sets its grade with `wear` beside `lanes`; lots get oil
|
|
118
119
|
stains; sidewalks and footways get 1.5 m saw-cut slabs and curbs 3 m ones, each slab its own
|
|
119
120
|
tone, weathered with water stains and, close up, the odd spot of gum; plazas and pedestrian areas get a half-meter paver grid; markings wear through to the
|
|
120
|
-
asphalt.
|
|
121
|
+
asphalt. A marking narrower than a pixel fades into the color and shading of the
|
|
122
|
+
surface it lies on (`beneath` on a paint `TerrainLineBand`, a road's by default; a parking lot's
|
|
123
|
+
lines take on its oil stains), so from the air lines and rows of bays melt into the asphalt
|
|
124
|
+
instead of breaking into dashes that beat into moiré. A mark drawn with `surfaceSince` passes its
|
|
125
|
+
narrowest dimension as the width, which sets that fade.
|
|
126
|
+
Detail fades to the plain swatch with distance, so it never shimmers, and each layer's
|
|
121
127
|
noise is evaluated only where it still shows: distant pavement skips the fine layers, and only
|
|
122
128
|
fragments within 2 m of a frayed edge evaluate the fray. `setMaterial(undefined)` restores the plain material. Your own geometry can opt in with
|
|
123
129
|
`TerrainSurfaceMeshBuilder.surfaceSince(start, TERRAIN_SURFACE_KIND.road, …)`, or a
|
|
@@ -242,7 +248,8 @@ await surfaces.setOptions({
|
|
|
242
248
|
Mapped signal junctions and inferred crossings of two substantial arterials can receive curbside masts with bars over the incoming lanes,
|
|
243
249
|
yellow backplates, shaded round lenses, and one signal head per lane (up to three).
|
|
244
250
|
Red, amber and green lenses are self-lit, remaining visible at night. Instanced streetlights
|
|
245
|
-
occupy eligible corners outside road corridors, buildings, and water
|
|
251
|
+
occupy eligible corners outside road corridors, buildings, and water: mast arms where an
|
|
252
|
+
arterial meets the junction, post-top lanterns otherwise (see [night lighting](night-lighting.md)).
|
|
246
253
|
- Freeways receive wider paved shoulders, longer lane dashes, a yellow left edge on one-way
|
|
247
254
|
carriageways, and white ramp edges. Green overhead boards use mapped route references or
|
|
248
255
|
destinations. At a connected outgoing ramp, an advance gantry and roadside exit board use
|
|
@@ -259,6 +266,28 @@ await surfaces.setOptions({
|
|
|
259
266
|
`details.inferStopSigns` to retain only mapped stops, or `details.roadSigns` to hide all signs.
|
|
260
267
|
Historical and minimal styles omit signs. Sign faces and lettering are batched geometry with
|
|
261
268
|
host-supplied fonts and no per-sign textures; the worker produces the same geometry as the direct renderer.
|
|
269
|
+
- Street names come from the roads' mapped `name`, styled by the sign profile's `streetNames`.
|
|
270
|
+
Each junction names the two streets that form one of its corners; the corner varies from
|
|
271
|
+
junction to junction. With `mount: "post"` (the default) both names share one corner post,
|
|
272
|
+
each panel running along the street it names and lettered on both faces: narrow `blade`s as
|
|
273
|
+
in North America, or taller `plate`s as on German and Swiss posts. With `mount: "wall"` each
|
|
274
|
+
street gets a plate on the corner building's wall that runs along and faces it, as in Britain,
|
|
275
|
+
France and Italy; where no wall stands near the corner, the plate stands on a low two-legged
|
|
276
|
+
frame at the back of the footway. A style with `mastArms` also hangs a panel from each signal
|
|
277
|
+
mast arm naming the street its traffic is about to cross (the named arm most nearly
|
|
278
|
+
perpendicular to the approach), beside the signal heads or past them on a longer arm, and
|
|
279
|
+
leaves those junctions' corners bare. `letterCase: "upper"` letters names in capitals. The
|
|
280
|
+
style's abbreviations turn spelled-out map names into what signs post ("Northeast 45th
|
|
281
|
+
Street" becomes "NE 45th St"); a direction or street type that is the whole name stays
|
|
282
|
+
spelled out ("North Street" becomes "North St"). The content catalog's U.S. profiles use white
|
|
283
|
+
blades and mast panels on green; Britain and Italy black capitals on white wall plates, France
|
|
284
|
+
white on blue; Germany Zeichen 437 plates and Switzerland white-on-blue plates on posts; the
|
|
285
|
+
generic fallbacks neutral plates on posts. Unnamed roads, paths, ramps, freeways and compound
|
|
286
|
+
connector labels ("A Street & B Avenue") get no sign, nor does a name the host's sign font
|
|
287
|
+
cannot letter (a Japanese name in a Latin face), and junctions on bridges or in tunnels get no
|
|
288
|
+
corner name. Names are never invented. Street names are a separate `surface:street-names`
|
|
289
|
+
mesh drawn within 250 m of the tile, nearer than the other boards' 900 m, since their
|
|
290
|
+
lettering is a pixel or two tall beyond that.
|
|
262
291
|
- Parking, plazas, and pedestrian polygons are filled, with holes retained. Pedestrian polygons
|
|
263
292
|
and mapped paths use distinct heights above parking pavement, including inferred lots, so
|
|
264
293
|
overlapping sidewalk and asphalt fills remain stable at walking height. Land cover, paved
|
|
@@ -346,8 +375,11 @@ those tags. There are no live Overpass requests or extra network lookups during
|
|
|
346
375
|
Numeric OSM speeds without a unit are km/h; explicit `mph` stays mph. Variable, conditional and
|
|
347
376
|
country-code speed values are not interpreted. Road signs, gantry positions and sparse spacing
|
|
348
377
|
are visual approximations, using a right-hand-traffic layout, with a maximum of 48 signs per
|
|
349
|
-
detail tile inside its shared fixture budget.
|
|
350
|
-
|
|
378
|
+
detail tile inside its shared fixture budget. Street names sit outside both limits: 64 named
|
|
379
|
+
corners per tile, and one mast panel per signal mast, so names never crowd out signals or lights.
|
|
380
|
+
Labels fit uniformly within the panel (bounded to 80 characters); unsupported
|
|
381
|
+
glyphs use a question mark. `stats().roadSigns` counts the placed boards, and
|
|
382
|
+
`stats().streetNameSigns` how many of them are street names. Ambient traffic uses
|
|
351
383
|
the more conservative signal inference and treats mapped stop controls as give-way controls;
|
|
352
384
|
this change does not add a full-stop/dwell simulation for the decorative signs.
|
|
353
385
|
|
|
@@ -725,7 +757,9 @@ See [Fonts and lettering](typography.md) for the shared layout engine and custom
|
|
|
725
757
|
## Road sign pattern library
|
|
726
758
|
|
|
727
759
|
The world-explorer sample includes **Road sign library** (`road-signs.html`), linked from its
|
|
728
|
-
main view. It renders
|
|
760
|
+
main view. It renders twelve patterns in the United States and ten elsewhere (route markers and
|
|
761
|
+
mast-arm names are U.S. conventions; each region shows its own corner street names) from
|
|
762
|
+
synthetic semantic tiles through the production
|
|
729
763
|
detector, with country/state selectors, a 50-state route-marker collection, searchable cards,
|
|
730
764
|
rotatable 3D previews, and source-cue annotations. The samples
|
|
731
765
|
are demonstrations, not records of surveyed signs. All hardware positions are estimated.
|
|
@@ -742,6 +776,9 @@ are demonstrations, not records of surveyed signs. All hardware positions are es
|
|
|
742
776
|
| `attraction` | Ramp `destination` with aligned `destination:colour=brown` | Nearby tourism POIs alone do not establish an exit or driving distance |
|
|
743
777
|
| `route-guide` | Motorway `ref`/`shield_text`, name, or destination | Omit when labels are unknown |
|
|
744
778
|
| `route-marker` | Exact supported `network` plus `shield_text`/`ref`; explicit state reference; local `SR`/`SH` plus state geography | Omit ambiguous or unsupported networks; never invent a route number |
|
|
779
|
+
| `street-name-mast` | Signal junction plus a named cross street; a `streetNames` style with `mastArms` | No panel without a named cross street at 30 degrees or more |
|
|
780
|
+
| `street-name-blade` | Two differently named streets forming a corner (at signals too, unless mast arms carry the names) | No post for unnamed roads, ramps, paths, freeways or junctions on structures |
|
|
781
|
+
| `street-name-wall` | The same corner cues, a `mount: "wall"` style, and building footprints | A low frame where no wall runs along and faces the street near the corner |
|
|
745
782
|
|
|
746
783
|
The MVT decoder retains `destination:colour` as `destinationColour`. Semicolon entries align
|
|
747
784
|
with the destination list, including empty entries. A single brown colour applies to the
|
|
@@ -89,6 +89,42 @@ mesh; this is the same API used in the browser. Existing baked GLBs must be rege
|
|
|
89
89
|
change their lettering. Seven-segment electronic displays can retain their physical segments;
|
|
90
90
|
fixed captions around those displays should use font geometry.
|
|
91
91
|
|
|
92
|
+
## Glyph atlases
|
|
93
|
+
|
|
94
|
+
Storefront names use a second form of the same faces: a `molen/glyph-atlas@1` document of glyph
|
|
95
|
+
metrics and atlas rectangles, beside raw 8-bit pages of signed distances. A name is then two
|
|
96
|
+
triangles a letter, every sign in the world shares one texture, and a face can be an atlas only:
|
|
97
|
+
the Kyoto pack's Japanese face holds the 1,544 letters Kyoto's place names use, where a vector font
|
|
98
|
+
of them would run to tens of megabytes.
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
import { assembleGlyphAtlasPixels, createGlyphAtlasSet } from '@bendyline/molen-materials/text';
|
|
102
|
+
|
|
103
|
+
const set = createGlyphAtlasSet([latinDoc, kyotoDoc]); // metrics only; a worker can hold this
|
|
104
|
+
set.faceFor('大垣書店'); // 'sign.gothic.jp': the first face that holds every letter
|
|
105
|
+
const layout = set.layout('Samir’s Mediterranean Grill', {
|
|
106
|
+
font: 'serif',
|
|
107
|
+
maxWidth: 6,
|
|
108
|
+
maxHeight: 0.8,
|
|
109
|
+
maxLines: 2,
|
|
110
|
+
});
|
|
111
|
+
// layout.quads: x0, y0, x1, y1, u0, v0, u1, v1 per letter; layout.lines: the line break chosen
|
|
112
|
+
const pixels = await assembleGlyphAtlasPixels(set, (doc, path) => readPage(doc, path));
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`createGlyphAtlasSet` stacks the documents' pages into one texture, so every document in a set
|
|
116
|
+
shares one distance range. A name is set in the first candidate face that holds all of it: the
|
|
117
|
+
requested face or role in each document, then each document's default face. Layout is left to
|
|
118
|
+
right, with kerning, uniform fitting, and a second line where it sets the letters a tenth larger,
|
|
119
|
+
broken at a space or, in Japanese and Chinese, between letters (never before a closing mark or a
|
|
120
|
+
small kana). There is no per-letter fallback across faces and no shaping, so Arabic and Indic
|
|
121
|
+
names keep their category sign until a shaping stage exists.
|
|
122
|
+
|
|
123
|
+
In the engine repository, `node scripts/build-fonts.mjs` rasterizes the Earth atlas from the same
|
|
124
|
+
pinned TTFs as the vector fonts, and each region pack (`content/glyphs-*`) from its own pinned
|
|
125
|
+
font and the character set `scripts/build-glyph-charset.mjs` reads from the region's map extract.
|
|
126
|
+
The distance field is plain arithmetic, byte-identical on every machine; `--check` verifies it.
|
|
127
|
+
|
|
92
128
|
## Compiling another face
|
|
93
129
|
|
|
94
130
|
`compileVectorFont(typefaceJson, { id, characters, weight, style, curveSegments, kerning })`
|
|
@@ -370,7 +370,12 @@ Parked cars become simulation entities only within 300 m of the observer passed
|
|
|
370
370
|
approach, board and collide with; farther ones that nobody moved are reclaimed and stay part of
|
|
371
371
|
their tile's merged mesh. Under an aircraft a town's parked cars were otherwise thousands of
|
|
372
372
|
dormant entities, spawned as each tile streamed in and visited every tick. The `vehicles` system
|
|
373
|
-
also passes over a dormant car after one lookup until a write replaces its state.
|
|
373
|
+
also passes over a dormant car after one lookup until a write replaces its state. Height counts
|
|
374
|
+
against that distance: it shrinks to nothing 100 m above or below a car, so an aircraft crossing a
|
|
375
|
+
town at a few hundred meters makes entities of none, and one landing meets them as it comes down.
|
|
376
|
+
`sync` remembers its observer for the passes `EarthVehicles` runs itself (after `enter`, and when
|
|
377
|
+
a model loads), which had no observer and made an entity of every parked car in every loaded tile
|
|
378
|
+
each time a car's model arrived.
|
|
374
379
|
|
|
375
380
|
Passengers use the same mount contract. A `mountable` lists seats with a role: `driver` seats
|
|
376
381
|
drive, `passenger` seats ride. `mountEntity(world, actor, vehicle, 'passenger')` seats someone
|
|
@@ -600,6 +605,16 @@ and `dispose()`. `signals` feeds the interior and `vehicle.visual.animation` bin
|
|
|
600
605
|
them keep the wheels planted. The camera helper accepts a transform, `vehicle.spec`, view, look offsets, and an
|
|
601
606
|
optional obstruction-distance callback.
|
|
602
607
|
|
|
608
|
+
While the view is from a vehicle's own seat (the cockpit view), hosts pass
|
|
609
|
+
`renderer.shadowTexelSize` to that vehicle's `visual.updateShadows(texel)` each frame, and
|
|
610
|
+
`undefined` for every other vehicle and view. From the seat the dashboard is under a meter away,
|
|
611
|
+
and the vehicle's roof, pillars and doors shaded it in blocks that jumped as it drove across the
|
|
612
|
+
sun shadow map's texel grid (a driving view's map spans hundreds of meters, 0.14 m texels on
|
|
613
|
+
High). Coarser than 0.027 m, the vehicle casts no sun shadow; at 0.025 m or finer it casts
|
|
614
|
+
again. It still receives shadows from terrain, buildings, trees, other vehicles and clouds.
|
|
615
|
+
`EarthVehicles` does this for the mounted vehicle from its `shadowTexel` field, which the Earth
|
|
616
|
+
view and the world explorer set each frame.
|
|
617
|
+
|
|
603
618
|
Surface objects expose `userData.vehicles: VehiclePlacement[]`; each record has an `id`, external
|
|
604
619
|
type `kind`, `color`, resolved `spec`, absolute metric `position`, and `yaw`, with optional
|
|
605
620
|
terrain-alignment `pitch` and `roll`. IDs derive from world-space bay positions rather
|