@bendyline/molen-tooling 0.0.14 → 0.0.15
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 +76 -76
- package/dist/capture/worldgen-preview.js +1 -1
- package/dist/docs-src/guide/aircraft.md +13 -3
- package/dist/docs-src/guide/dioramas.md +7 -0
- package/dist/docs-src/guide/graphics-performance.md +18 -7
- package/dist/docs-src/guide/terrain.md +10 -4
- package/dist/templates/index.json +11 -11
- package/package.json +7 -7
|
@@ -201,7 +201,10 @@ Exposed airplane propellers fade from individual blades into a translucent, soft
|
|
|
201
201
|
between 20 and 60 rad/s (about 190–570 RPM). The disk follows actual shaft speed, including
|
|
202
202
|
independent engines and spool-down, so blades cannot appear frozen at normal operating RPM.
|
|
203
203
|
Its size and radial colors come from the blade geometry and materials; separate central hubs stay solid.
|
|
204
|
-
This render-only effect needs no model changes and works with WebGL and WebGPU.
|
|
204
|
+
This render-only effect needs no model changes and works with WebGL and WebGPU. Fading blades use
|
|
205
|
+
transparent copies of their materials, listed in `userData.materialVariants`: a preparing renderer
|
|
206
|
+
builds them on request, and the blades stay solid until they are built rather than stalling the
|
|
207
|
+
frame the engine starts. Helicopter
|
|
205
208
|
rotors and enclosed jet fans retain their existing animation.
|
|
206
209
|
|
|
207
210
|
For powered lift, declare `spec.poweredLift` with positive `transitTime`, `controlFadeSpeed`,
|
|
@@ -520,8 +523,15 @@ Hosts pass the camera to `visual.updateView(camera)` each frame (in the coordina
|
|
|
520
523
|
`visual.object.position`). The cabin, the interior's `nodes`, is drawn only within three times
|
|
521
524
|
the aircraft's length or span of it (at least 60 m): cockpits held most of an aircraft's draw calls
|
|
522
525
|
and as many again in the shadow pass, yet from farther away they are a few pixels behind the canopy.
|
|
523
|
-
Boarded and chase views are always near enough
|
|
524
|
-
|
|
526
|
+
Boarded and chase views are always near enough, but within the cabin a part too small to see from
|
|
527
|
+
the camera (an angular radius under 0.002 rad, a few pixels at 1080p) leaves the frame: from a chase
|
|
528
|
+
camera a P-51's 415 cockpit meshes were a quarter of a takeoff's draws. That culling uses the
|
|
529
|
+
part's render layers, so the `visible` that bindings and damage set is never overridden. A
|
|
530
|
+
`flight-controls` group (the generated cockpit controls) counts as cabin too. Earth views and the
|
|
531
|
+
world explorer also prepare an aircraft's shaders before its model joins the scene.
|
|
532
|
+
|
|
533
|
+
Double-sided transparent materials (canopies, windscreens, instrument covers) draw in one pass:
|
|
534
|
+
three otherwise draws each such pane twice and builds a program before each face, every frame.
|
|
525
535
|
|
|
526
536
|
`createAircraftVisual` exposes `cockpit`, a mesh picker and control inventory derived from the
|
|
527
537
|
interior's authored primary-input bindings and glTF node `extras.aircraftControl` metadata.
|
|
@@ -56,6 +56,8 @@ const director = new DioramaDirector({
|
|
|
56
56
|
// assets: a host-owned AssetCache, when the scene uses glTF refs
|
|
57
57
|
// A large streamed world keeps the diorama's own lights out (see below).
|
|
58
58
|
localLights: false,
|
|
59
|
+
// Build its shaders before it is shown.
|
|
60
|
+
prepare: (object, parent) => viewer.renderer.prepareObject(object, undefined, parent),
|
|
59
61
|
}),
|
|
60
62
|
onError: (error, id) => console.error(id, error),
|
|
61
63
|
});
|
|
@@ -82,6 +84,11 @@ A diorama's point and spot lights light the host scene by default. In a large st
|
|
|
82
84
|
`localLights: false` (Earth hosts do): three compiles the scene's lights into every lit shader, so a
|
|
83
85
|
light that arrives and leaves with a diorama rebuilds every object in view in one frame.
|
|
84
86
|
|
|
87
|
+
`prepare` builds a diorama's shaders before it joins `root`: its figures, models and static
|
|
88
|
+
batches otherwise build theirs in the first frame that draws them, and a flight school beside a
|
|
89
|
+
runway stalled a takeoff for a quarter of a second. `EarthDioramaOptions.prepareObject` is the same
|
|
90
|
+
hook for the Earth director; `mountEarthView` passes its renderer's.
|
|
91
|
+
|
|
85
92
|
The loader is a host callback: use an allowlisted dynamic import, HTTP URL or your pack reader.
|
|
86
93
|
The runtime never chooses content hosts. `loadDioramaScene` fetches the scene and relative `.js`
|
|
87
94
|
scripts with the supplied AbortSignal. For `.ts`, use `molenScripts()` with a lazy `?raw` import
|
|
@@ -176,8 +176,9 @@ shared with drawn meshes (every building's wall) reported its ready program whil
|
|
|
176
176
|
variant was still linking, and that variant's first draw waited for the link, 130 ms in flight.
|
|
177
177
|
Content that appears beside the viewer is prepared before it shows as well: building interiors
|
|
178
178
|
(`InteriorStreamingOptions.prepare`, which the Earth renderers pass their `prepareObject`; the
|
|
179
|
-
entrance covers stay until it settles), ambient pedestrians
|
|
180
|
-
their shaders are built
|
|
179
|
+
entrance covers stay until it settles), ambient pedestrians, ambient aircraft and wildlife (when
|
|
180
|
+
`EarthWildlife`'s `prepare` returns a promise) stay hidden until their shaders are built, and
|
|
181
|
+
dioramas are prepared before they join the scene (see [Dioramas](dioramas.md)).
|
|
181
182
|
|
|
182
183
|
Main-thread work that runs as tiles stream in beneath a fast aircraft is kept small. Ambient
|
|
183
184
|
aircraft parse and merge each type once into a template, in 3 ms slices, without the cabin (its
|
|
@@ -186,9 +187,12 @@ its glyph vertices (`MeshBufferBuilder.addFlatMesh`). The worldgen tile cache ke
|
|
|
186
187
|
by a fast hash of its JSON (the cache never leaves the session) rather than SHA-256, which spent up
|
|
187
188
|
to 20 ms on a dense town tile. Ground cutouts read positions straight from their arrays and pass
|
|
188
189
|
over triangles whose corners share a side outside every opening, or that one of a convex opening's
|
|
189
|
-
edges separates from it
|
|
190
|
-
|
|
191
|
-
found.
|
|
190
|
+
edges separates from it, and find the openings near a triangle without building and sorting a set
|
|
191
|
+
for it. Parked cars bake from their template arrays, and `EarthAudioTerrain.sample` skips map
|
|
192
|
+
features whose bounds cannot come nearer than the nearest found. An aircraft's ground probes (a
|
|
193
|
+
few hundred a tick) find airport pavement among meshes indexed by their bounds once per tagging,
|
|
194
|
+
not by walking every pavement mesh ever tagged; a tunnel query skips bores whose tile it is
|
|
195
|
+
outside before looking up their visibility.
|
|
192
196
|
|
|
193
197
|
For custom streamed geometry, call `await renderer.prepareObject(object, signal, parent)` before
|
|
194
198
|
publication. Connect the same queue to terrain, which passes each layer's tile group as `parent`:
|
|
@@ -203,6 +207,12 @@ const terrain = await createTerrainPackagePyramidStream(packageDescriptor, {
|
|
|
203
207
|
});
|
|
204
208
|
```
|
|
205
209
|
|
|
210
|
+
A `transformHeightfield` replacement (Earth's airport grading) is meshed by the same worker through
|
|
211
|
+
the source's `meshPrepared`; meshed on the main thread, each graded tile beside an airport was one
|
|
212
|
+
admitted job of up to 20 ms. The grading itself finds each sample row's polygon crossings and nearby
|
|
213
|
+
ground edges once, instead of testing every edge of an airport's grounds for every sample: a tenth
|
|
214
|
+
of a second a tile over Boeing Field.
|
|
215
|
+
|
|
206
216
|
The worker entry calls `installTerrainElevationWorker(self)`, exported from
|
|
207
217
|
`@bendyline/molen-terrain/client` (use the worker-scope type cast shown by World Explorer when
|
|
208
218
|
compiling with DOM rather than WebWorker types). The host reads archive bytes; the worker
|
|
@@ -308,8 +318,9 @@ behind that parent. Cached LODs reuse their prepared geometry.
|
|
|
308
318
|
|
|
309
319
|
Previously unvisited ground can show its base surface immediately; its enabled layers appear
|
|
310
320
|
together once settled. Empty layer results count as ready. Failed replacement layers preserve
|
|
311
|
-
the old tiles until `retryFailed()` succeeds or the
|
|
312
|
-
layers can still appear after another layer fails.
|
|
321
|
+
the old tiles until a later attempt (after `failedRetryDelayMs`, or `retryFailed()`) succeeds or the
|
|
322
|
+
layer is disabled; on cold ground, successful layers can still appear after another layer fails.
|
|
323
|
+
Hidden layers do not delay a handoff. This
|
|
313
324
|
stages scene geometry rather than rendering a second full-screen image, and retains old visual
|
|
314
325
|
coverage under residency pressure until its replacement can safely take over.
|
|
315
326
|
|
|
@@ -141,16 +141,22 @@ do not change residency behavior. HTTP 404 is a stable missing tile; call `retry
|
|
|
141
141
|
the backing data has changed. A *thrown* error is not: a dropped range request, a 503, or a CORS
|
|
142
142
|
failure is retried with bounded exponential backoff (`maxRetries`, `retryDelayMs`,
|
|
143
143
|
`maxRetryDelayMs`) before the tile is abandoned, and every request carries a `requestTimeoutMs`
|
|
144
|
-
deadline so a stalled connection cannot hold a concurrent load slot.
|
|
145
|
-
`
|
|
146
|
-
|
|
144
|
+
deadline so a stalled connection cannot hold a concurrent load slot. An abandoned tile is set aside,
|
|
145
|
+
not dropped: after `failedRetryDelayMs` (15000 ms by default, doubling with each further failure up
|
|
146
|
+
to eight times as long) the first `update()` that still wants it tries again, so an outage longer
|
|
147
|
+
than the quick retries leaves no permanent holes once it is over. Set it to 0 or Infinity to keep
|
|
148
|
+
abandoned tiles until `retryFailed()`. `stats()` counts `missing` and `retrying` separately from
|
|
149
|
+
`failed`, and `tileFailures()` reports each tile's state, attempts, and next attempt time, so a host
|
|
150
|
+
can tell a user "still retrying" rather than "gave up".
|
|
147
151
|
|
|
148
152
|
The pyramid streamer applies the same retry policy to semantic layer generation and GPU
|
|
149
153
|
preparation, with a separate `layerTimeoutMs` deadline (120000 ms by default; 0 or Infinity disables
|
|
150
154
|
it). This allows CPU-heavy generation and software shader compilation more time than height
|
|
151
155
|
requests. A stalled layer releases its load slot, and late cancelled results are disposed.
|
|
152
156
|
`stats().retryingLayers` and `stats().failedLayers` report those failures independently from height
|
|
153
|
-
tiles
|
|
157
|
+
tiles. An abandoned layer is tried again after the same `failedRetryDelayMs`, so a lake whose water
|
|
158
|
+
failed to load fills in on its own; `retryFailed()` retries tiles and layers at once. Disabling a
|
|
159
|
+
layer or evicting its tile clears its failure state.
|
|
154
160
|
|
|
155
161
|
Adjacent tiles share their border heights, and the streamer keeps their border *normals* continuous
|
|
156
162
|
too: each side recomputes its edge from the neighbouring tile's heights once that neighbour is
|
|
@@ -208,22 +208,22 @@
|
|
|
208
208
|
}
|
|
209
209
|
],
|
|
210
210
|
"versions": {
|
|
211
|
-
"@bendyline/molen-ambient": "0.0.
|
|
212
|
-
"@bendyline/molen-client": "0.0.
|
|
213
|
-
"@bendyline/molen-dioramas": "0.0.
|
|
214
|
-
"@bendyline/molen-earth": "0.0.
|
|
215
|
-
"@bendyline/molen-entities": "0.0.
|
|
216
|
-
"@bendyline/molen-figures": "0.0.
|
|
217
|
-
"@bendyline/molen-input-react": "0.0.
|
|
211
|
+
"@bendyline/molen-ambient": "0.0.15",
|
|
212
|
+
"@bendyline/molen-client": "0.0.13",
|
|
213
|
+
"@bendyline/molen-dioramas": "0.0.6",
|
|
214
|
+
"@bendyline/molen-earth": "0.0.15",
|
|
215
|
+
"@bendyline/molen-entities": "0.0.14",
|
|
216
|
+
"@bendyline/molen-figures": "0.0.13",
|
|
217
|
+
"@bendyline/molen-input-react": "0.0.13",
|
|
218
218
|
"@bendyline/molen-kernel": "0.0.10",
|
|
219
219
|
"@bendyline/molen-materials": "0.0.11",
|
|
220
220
|
"@bendyline/molen-pack": "0.0.11",
|
|
221
221
|
"@bendyline/molen-pathfinding": "0.0.10",
|
|
222
222
|
"@bendyline/molen-physics-rapier": "0.0.10",
|
|
223
223
|
"@bendyline/molen-schema": "0.0.10",
|
|
224
|
-
"@bendyline/molen-terrain": "0.0.
|
|
225
|
-
"@bendyline/molen-tooling": "0.0.
|
|
226
|
-
"@bendyline/molen-worldgen": "0.0.
|
|
227
|
-
"@bendyline/molen-worldgen-earth": "0.0.
|
|
224
|
+
"@bendyline/molen-terrain": "0.0.15",
|
|
225
|
+
"@bendyline/molen-tooling": "0.0.15",
|
|
226
|
+
"@bendyline/molen-worldgen": "0.0.14",
|
|
227
|
+
"@bendyline/molen-worldgen-earth": "0.0.15"
|
|
228
228
|
}
|
|
229
229
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/molen-tooling",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@bendyline/molen-ambient": "0.0.
|
|
53
|
-
"@bendyline/molen-client": "0.0.
|
|
54
|
-
"@bendyline/molen-figures": "0.0.
|
|
52
|
+
"@bendyline/molen-ambient": "0.0.15",
|
|
53
|
+
"@bendyline/molen-client": "0.0.13",
|
|
54
|
+
"@bendyline/molen-figures": "0.0.13",
|
|
55
55
|
"@bendyline/molen-kernel": "0.0.10",
|
|
56
56
|
"@bendyline/molen-materials": "0.0.11",
|
|
57
57
|
"@bendyline/molen-pack": "0.0.11",
|
|
58
58
|
"@bendyline/molen-physics-rapier": "0.0.10",
|
|
59
59
|
"@bendyline/molen-schema": "0.0.10",
|
|
60
|
-
"@bendyline/molen-terrain": "0.0.
|
|
61
|
-
"@bendyline/molen-worldgen": "0.0.
|
|
62
|
-
"@bendyline/molen-worldgen-earth": "0.0.
|
|
60
|
+
"@bendyline/molen-terrain": "0.0.15",
|
|
61
|
+
"@bendyline/molen-worldgen": "0.0.14",
|
|
62
|
+
"@bendyline/molen-worldgen-earth": "0.0.15",
|
|
63
63
|
"@gltf-transform/core": "4.2.1",
|
|
64
64
|
"@gltf-transform/extensions": "4.2.1",
|
|
65
65
|
"@gltf-transform/functions": "4.2.1",
|