@bendyline/molen-client 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/README.md +1 -0
- package/dist/aircraft.d.mts +9 -31
- package/dist/aircraft.mjs +279 -219
- package/dist/audio.d.mts +10 -1
- package/dist/audio.mjs +131 -6
- package/dist/camera-track.d.mts +1 -1
- package/dist/clouds-DmASLVoe.mjs +862 -0
- package/dist/glass.d.mts +19 -0
- package/dist/glass.mjs +250 -0
- package/dist/index.d.mts +14 -3
- package/dist/index.mjs +577 -147
- package/dist/{livery-C0abgthY.mjs → livery-qcDLzbU9.mjs} +7 -2
- package/dist/navigation.d.mts +19 -6
- package/dist/navigation.mjs +133 -83
- package/dist/{renderer-Dzus24ZF.d.mts → renderer-DAk7C8jH.d.mts} +234 -17
- package/dist/vehicle-interior-B8TpzTAx.d.mts +56 -0
- package/dist/vehicle-interior-DJ4cXTsQ.mjs +468 -0
- package/dist/vehicles.d.mts +25 -20
- package/dist/vehicles.mjs +271 -66
- package/dist/webgpu-clouds-H03g7ID1.mjs +186 -0
- package/package.json +7 -3
- package/dist/vehicle-interior-BgcC750p.d.mts +0 -31
- package/dist/vehicle-interior-DfpZwWEh.mjs +0 -15
|
@@ -11,9 +11,11 @@ interface AdmissionOptions {
|
|
|
11
11
|
/**
|
|
12
12
|
* Background jobs run only in frame budget that no normal job is waiting for. Urgent jobs run
|
|
13
13
|
* before normal ones, in their own order: small work the view is visibly waiting on, such as
|
|
14
|
-
* terrain ground
|
|
14
|
+
* terrain ground. Sustained urgent traffic shares service with waiting normal work.
|
|
15
15
|
*/
|
|
16
16
|
priority?: "urgent" | "normal" | "background";
|
|
17
|
+
/** Live order within normal work, lower first. Unordered work still receives regular service. */
|
|
18
|
+
order?: () => number;
|
|
17
19
|
}
|
|
18
20
|
interface AdmissionSample {
|
|
19
21
|
label: string;
|
|
@@ -42,11 +44,14 @@ declare class FrameAdmissionQueue implements SceneAdmission {
|
|
|
42
44
|
private readonly queuedBackground;
|
|
43
45
|
private scheduled;
|
|
44
46
|
private disposed;
|
|
47
|
+
private paused;
|
|
45
48
|
private readonly clock;
|
|
46
49
|
private readonly schedule;
|
|
47
50
|
private maxMs;
|
|
48
51
|
private maxBytes;
|
|
49
52
|
private maxJobs;
|
|
53
|
+
private urgentStreak;
|
|
54
|
+
private orderedStreak;
|
|
50
55
|
/** Recent work time per label (ms, smoothed): what the next job of that kind will likely take. */
|
|
51
56
|
private readonly expected;
|
|
52
57
|
constructor(options?: FrameAdmissionOptions);
|
|
@@ -70,6 +75,8 @@ declare class FrameAdmissionQueue implements SceneAdmission {
|
|
|
70
75
|
front?: boolean;
|
|
71
76
|
}): void;
|
|
72
77
|
get pending(): number;
|
|
78
|
+
/** Hold queued uploads/preparation while the view is inactive; keep resources for resume. */
|
|
79
|
+
setPaused(paused: boolean): void;
|
|
73
80
|
private request;
|
|
74
81
|
/** One frame's budget. Exposed for hosts with a manual frame loop and deterministic tests. */
|
|
75
82
|
flush(): void;
|
|
@@ -207,6 +214,7 @@ declare class SkyVisual {
|
|
|
207
214
|
private drawnDome;
|
|
208
215
|
private drawnStars;
|
|
209
216
|
private cloudAttenuation;
|
|
217
|
+
private directCloudAttenuation;
|
|
210
218
|
private currentFrame;
|
|
211
219
|
private currentReflections;
|
|
212
220
|
private disposed;
|
|
@@ -214,8 +222,12 @@ declare class SkyVisual {
|
|
|
214
222
|
get frame(): SkyFrame;
|
|
215
223
|
/** Sky radiance for the viewer's shared PBR environment, sampled with the celestial frame. */
|
|
216
224
|
get reflectionState(): SkyReflectionState;
|
|
217
|
-
/**
|
|
218
|
-
|
|
225
|
+
/**
|
|
226
|
+
* Diffuse cloud lighting; actual celestial occlusion comes from the cloud layer geometry.
|
|
227
|
+
* `direct` dims the sun and moon (default `value`); with spatial cloud shadows it is 0, since
|
|
228
|
+
* the shadows themselves take light away where clouds cover the sun.
|
|
229
|
+
*/
|
|
230
|
+
setCloudAttenuation(value: number, direct?: number): void;
|
|
219
231
|
/** Move an Earth observer without rebuilding the dome, bodies or star catalog. */
|
|
220
232
|
setObserver(observer: EarthObserver): void;
|
|
221
233
|
/** Seek in simulation seconds. Earth render samples use a stable one-second UTC grid. */
|
|
@@ -234,21 +246,177 @@ declare class SkyVisual {
|
|
|
234
246
|
dispose(): void;
|
|
235
247
|
}
|
|
236
248
|
//#endregion
|
|
249
|
+
//#region src/weather/cloud-shadows.d.ts
|
|
250
|
+
interface CloudShadowUniforms {
|
|
251
|
+
/** The deck's weather map, blurred for soft shadow edges (CloudTextures.shadow). */
|
|
252
|
+
molenCloudMap: {
|
|
253
|
+
value: THREE.Texture;
|
|
254
|
+
};
|
|
255
|
+
/** Strength (0 off), and the base and top of the layer (rendered Y). */
|
|
256
|
+
molenCloudShadow: {
|
|
257
|
+
value: THREE.Vector4;
|
|
258
|
+
};
|
|
259
|
+
/** The deck's field: texels per meter, wrapped UV offset, coverage. */
|
|
260
|
+
molenCloudField: {
|
|
261
|
+
value: THREE.Vector4;
|
|
262
|
+
};
|
|
263
|
+
molenCloudMix: {
|
|
264
|
+
value: THREE.Vector4;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Coverage softness, opacity of a fully cloudy column, height fraction it is cast from, and
|
|
268
|
+
* how much thinner (so lighter) a column is where the field is weak.
|
|
269
|
+
*/
|
|
270
|
+
molenCloudFit: {
|
|
271
|
+
value: THREE.Vector4;
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
//#endregion
|
|
275
|
+
//#region src/weather/noise.d.ts
|
|
276
|
+
type NoiseName = "weather" | "shape" | "detail" | "cirrus";
|
|
277
|
+
/** The page's cloud noise, filled in as `build` is given time. */
|
|
278
|
+
declare class CloudNoise {
|
|
279
|
+
readonly weather: Uint8Array;
|
|
280
|
+
readonly shape: Uint8Array;
|
|
281
|
+
readonly detail: Uint8Array;
|
|
282
|
+
readonly cirrus: Uint8Array;
|
|
283
|
+
private readonly ready;
|
|
284
|
+
private readonly jobs;
|
|
285
|
+
has(name: NoiseName): boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Work on `wanted`, in order, for about `budgetMs` (Infinity finishes them). Returns whether all
|
|
288
|
+
* of them are ready.
|
|
289
|
+
*/
|
|
290
|
+
build(wanted: readonly NoiseName[], budgetMs: number): boolean;
|
|
291
|
+
}
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region src/weather/clouds.d.ts
|
|
294
|
+
/**
|
|
295
|
+
* How much work the cloud renderer does per pixel: ray-march steps, light samples, erosion
|
|
296
|
+
* detail and, from 'high', cloud shadows on lit surfaces. Changing it never rebuilds a shader.
|
|
297
|
+
*/
|
|
298
|
+
type CloudQuality = "low" | "medium" | "high" | "ultra";
|
|
299
|
+
/**
|
|
300
|
+
* GPU textures over the page's shared noise arrays (see noise.ts). One set per renderer: the
|
|
301
|
+
* cloud-shadow uniforms of every lit shader keep the weather map for the renderer's lifetime.
|
|
302
|
+
*/
|
|
303
|
+
declare class CloudTextures {
|
|
304
|
+
readonly noise: CloudNoise;
|
|
305
|
+
readonly weather: THREE.DataTexture;
|
|
306
|
+
/**
|
|
307
|
+
* The weather map at a sixteenth of its texels (about 250 m each at the default scale), for
|
|
308
|
+
* cloud shadows: plain bilinear filtering of it gives their soft edges with one lookup.
|
|
309
|
+
*/
|
|
310
|
+
readonly shadow: THREE.DataTexture;
|
|
311
|
+
readonly shape: THREE.Data3DTexture;
|
|
312
|
+
readonly detail: THREE.Data3DTexture;
|
|
313
|
+
/** Cirrus RGBA; its alpha is rewritten for each coverage (see WeatherVisual). */
|
|
314
|
+
readonly cirrus: THREE.DataTexture;
|
|
315
|
+
private uploaded;
|
|
316
|
+
constructor(noise: CloudNoise);
|
|
317
|
+
/** Upload each field once its noise is complete. Returns whether the deck can draw. */
|
|
318
|
+
sync(): boolean;
|
|
319
|
+
dispose(): void;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* The deck's uniform values, shared by reference with both backends' materials. Every
|
|
323
|
+
* position is in rendered (floating-origin) coordinates; offsets into the tiling textures are
|
|
324
|
+
* wrapped on the CPU in double precision, so the GPU never sees a large world coordinate.
|
|
325
|
+
*/
|
|
326
|
+
declare class CloudUniforms {
|
|
327
|
+
/** Base, top and 1 / thickness (rendered Y), and the draw distance. */
|
|
328
|
+
readonly slab: THREE.Vector4;
|
|
329
|
+
/** Weather-map texels per meter, its wrapped UV offset, and coverage. */
|
|
330
|
+
readonly field: THREE.Vector4;
|
|
331
|
+
readonly mix: THREE.Vector4;
|
|
332
|
+
/** Shortest column, base rise, top softness, anvil. */
|
|
333
|
+
readonly form: THREE.Vector4;
|
|
334
|
+
/** Shape erosion, detail erosion (0 skips the detail lookup), coverage softness. */
|
|
335
|
+
readonly erode: THREE.Vector4;
|
|
336
|
+
/** Field relief, taper, and the blurred weather level and lift that spread an anvil. */
|
|
337
|
+
readonly relief: THREE.Vector4;
|
|
338
|
+
/** Billow noise repeats per meter and wrapped offset, in texture units. */
|
|
339
|
+
readonly shape: THREE.Vector4;
|
|
340
|
+
readonly detail: THREE.Vector4;
|
|
341
|
+
/** Steps, light steps, longest marched path (m), extinction per meter at full density. */
|
|
342
|
+
readonly march: THREE.Vector4;
|
|
343
|
+
/** Direction toward the light, and the farthest a light ray is marched, meters. */
|
|
344
|
+
readonly sun: THREE.Vector4;
|
|
345
|
+
readonly sunColor: THREE.Vector3;
|
|
346
|
+
readonly ambientTop: THREE.Vector3;
|
|
347
|
+
readonly ambientBottom: THREE.Vector3;
|
|
348
|
+
/** Forward and back scattering asymmetry, back-lobe weight, edge fade start (of distance). */
|
|
349
|
+
readonly phase: THREE.Vector4;
|
|
350
|
+
/** The scene's fog for clouds: near, far, density and kind (0 none, 1 linear, 2 exp2). */
|
|
351
|
+
readonly fog: THREE.Vector4;
|
|
352
|
+
/** Fog color, and how far haze also fades a cloud out (see setFog). */
|
|
353
|
+
readonly fogColor: THREE.Vector4;
|
|
354
|
+
/** Shadow opacity of a fully cloudy column: -ln of the sunlight it lets through. */
|
|
355
|
+
shadowDepth: number;
|
|
356
|
+
private readonly sunWarm;
|
|
357
|
+
private readonly sunLow;
|
|
358
|
+
private readonly moon;
|
|
359
|
+
private readonly skyDay;
|
|
360
|
+
private readonly skyDusk;
|
|
361
|
+
private readonly skyNight;
|
|
362
|
+
private readonly groundDay;
|
|
363
|
+
private readonly groundNight;
|
|
364
|
+
private readonly scratch;
|
|
365
|
+
/**
|
|
366
|
+
* Fog the clouds as the scene's `fog` fogs everything else (thinner looking up). Haze also
|
|
367
|
+
* fades a cloud out by `fade` (0–1), so that a fully hazed cloud shows the sky's own horizon
|
|
368
|
+
* behind it, whichever color space the backend fogs in; a closed deck (`fade` 0) has no sky
|
|
369
|
+
* behind it to show and turns the fog's grey instead.
|
|
370
|
+
*/
|
|
371
|
+
setFog(fog: THREE.Fog | THREE.FogExp2 | null, fade: number): void;
|
|
372
|
+
/** Recompute for one frame. `far` bounds the draw distance. */
|
|
373
|
+
update(weather: ResolvedWeather, seconds: number, origin: Vec3, far: number, quality: CloudQuality, sky: SkyFrame | undefined): void;
|
|
374
|
+
}
|
|
375
|
+
//#endregion
|
|
237
376
|
//#region src/weather/visual.d.ts
|
|
377
|
+
interface WeatherVisualOptions {
|
|
378
|
+
/** Cloud textures to draw with. A renderer passes its own; by default the visual makes some. */
|
|
379
|
+
textures?: CloudTextures;
|
|
380
|
+
/** The cloud deck's material for the renderer's backend; the WebGL material by default. */
|
|
381
|
+
createCloudMaterial?: (uniforms: CloudUniforms, textures: CloudTextures) => THREE.Material;
|
|
382
|
+
/** Per-pixel cloud work; default 'medium'. See `setCloudQuality`. */
|
|
383
|
+
quality?: CloudQuality;
|
|
384
|
+
/**
|
|
385
|
+
* Milliseconds of cloud noise generation per `update` until it is complete (default 3); the
|
|
386
|
+
* clouds appear once it is. Infinity builds it all in the first update. Built once per page.
|
|
387
|
+
*/
|
|
388
|
+
noiseBudgetMs?: number;
|
|
389
|
+
/**
|
|
390
|
+
* The renderer's backend, which decides how the sky veil matches its fog (three fogs WebGL
|
|
391
|
+
* materials after tone mapping, WebGPU's before). Default 'webgl'.
|
|
392
|
+
*/
|
|
393
|
+
backend?: "webgl" | "webgpu";
|
|
394
|
+
}
|
|
238
395
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
396
|
+
* Volumetric clouds, a high cirrus layer and local precipitation on both graphics backends.
|
|
397
|
+
* Patterns are seeded and sampled at absolute simulation time, not integrated frames. Cloud
|
|
398
|
+
* layers use absolute world altitudes; particles are visual and do not accumulate or collide.
|
|
242
399
|
*/
|
|
243
400
|
declare class WeatherVisual {
|
|
244
401
|
readonly object: THREE.Group;
|
|
245
402
|
readonly fog: THREE.Fog;
|
|
246
403
|
private state;
|
|
247
|
-
private
|
|
248
|
-
private
|
|
249
|
-
private readonly
|
|
250
|
-
private
|
|
251
|
-
private
|
|
404
|
+
private readonly textures;
|
|
405
|
+
private readonly ownsTextures;
|
|
406
|
+
private readonly createCloudMaterial;
|
|
407
|
+
private readonly noiseBudgetMs;
|
|
408
|
+
private readonly uniforms;
|
|
409
|
+
private quality;
|
|
410
|
+
private cloudMaterial;
|
|
411
|
+
private deck;
|
|
412
|
+
private shells;
|
|
413
|
+
private deckReady;
|
|
414
|
+
private cirrus;
|
|
415
|
+
private cirrusCoverage;
|
|
416
|
+
private readonly backend;
|
|
417
|
+
/** Murk over the sky in poor visibility; see updateVeil. */
|
|
418
|
+
private veil;
|
|
419
|
+
private veilVisibility;
|
|
252
420
|
private particles;
|
|
253
421
|
private particleTexture;
|
|
254
422
|
private readonly cameraPosition;
|
|
@@ -256,22 +424,50 @@ declare class WeatherVisual {
|
|
|
256
424
|
private readonly up;
|
|
257
425
|
private readonly color;
|
|
258
426
|
private disposed;
|
|
259
|
-
constructor(data: WeatherData);
|
|
427
|
+
constructor(data: WeatherData, options?: WeatherVisualOptions);
|
|
260
428
|
/** Resolved copy; editing it does not change the visual. */
|
|
261
429
|
get data(): ResolvedWeather;
|
|
262
430
|
/** Replace weather while retaining geometry, particles and cached noise. */
|
|
263
431
|
setData(data: WeatherData): void;
|
|
264
432
|
get cloudAttenuation(): number;
|
|
433
|
+
/** Per-pixel cloud work. Uniform-driven: changing it rebuilds nothing. */
|
|
434
|
+
setCloudQuality(quality: CloudQuality): void;
|
|
435
|
+
get cloudQuality(): CloudQuality;
|
|
436
|
+
/**
|
|
437
|
+
* Whether lit surfaces get spatial cloud shadows this frame: from 'high' quality, once the
|
|
438
|
+
* clouds have appeared. While they do, direct light needs no uniform cloud dimming.
|
|
439
|
+
*/
|
|
440
|
+
get shadowsActive(): boolean;
|
|
441
|
+
/** Write this frame's cloud shadow into a renderer's lit-shader uniforms. */
|
|
442
|
+
writeShadows(uniforms: CloudShadowUniforms, active?: boolean): void;
|
|
443
|
+
/** Cloud layers drawn (the volumetric layer and cirrus) and precipitation particles. */
|
|
265
444
|
get stats(): {
|
|
266
445
|
cloudLayers: number;
|
|
267
446
|
particles: number;
|
|
268
447
|
};
|
|
269
448
|
/** Update camera-relative geometry using the renderer's absolute floating origin. */
|
|
270
449
|
update(seconds: number, camera: THREE.Camera, origin: Vec3, sky?: SkyFrame): void;
|
|
271
|
-
/**
|
|
450
|
+
/**
|
|
451
|
+
* Combine weather visibility with an authored/streaming fog limit without mutating it. The
|
|
452
|
+
* clouds are fogged with the result (see CloudUniforms.setFog).
|
|
453
|
+
*/
|
|
272
454
|
fogFor(base: THREE.Fog | THREE.FogExp2 | null, sky?: SkyFrame): THREE.Fog | THREE.FogExp2;
|
|
273
|
-
private
|
|
455
|
+
private limitFog;
|
|
456
|
+
private deckVisible;
|
|
457
|
+
private buildDeck;
|
|
274
458
|
private updateClouds;
|
|
459
|
+
/**
|
|
460
|
+
* In fog, rain or snow the murk hides the sky too, not only the ground: a camera-centred
|
|
461
|
+
* dome in the fog color, behind everything nearer, opaque toward the horizon and thinner
|
|
462
|
+
* overhead, where a view crosses less hazy air. Clouds draw over it, and a fully hazed cloud
|
|
463
|
+
* shows it. Absent in clear air (visibility from 20 km).
|
|
464
|
+
*/
|
|
465
|
+
private updateVeil;
|
|
466
|
+
/**
|
|
467
|
+
* Cirrus are thin ice streaks combed out by the jet stream, so this layer is a flat sheet: a
|
|
468
|
+
* stretched texture turned to lie along the wind, at the cirrus altitude.
|
|
469
|
+
*/
|
|
470
|
+
private updateCirrus;
|
|
275
471
|
private buildParticles;
|
|
276
472
|
private updateParticles;
|
|
277
473
|
dispose(): void;
|
|
@@ -305,7 +501,7 @@ type ShadowQuality = "off" | "low" | "medium" | "high";
|
|
|
305
501
|
interface ShadowFocus {
|
|
306
502
|
/** Focus point in absolute world coordinates (before any floating-origin rebase). */
|
|
307
503
|
center: readonly [number, number, number];
|
|
308
|
-
/**
|
|
504
|
+
/** Minimum half-width of the shadowed square, meters. Rounded up for a stable texel grid. */
|
|
309
505
|
radius: number;
|
|
310
506
|
}
|
|
311
507
|
//#endregion
|
|
@@ -365,11 +561,17 @@ declare class WebGpuSceneOptimizer {
|
|
|
365
561
|
type RendererBackend = "webgl" | "webgpu";
|
|
366
562
|
type RendererBackendPreference = "auto" | RendererBackend;
|
|
367
563
|
type ThreeRenderer = THREE.WebGLRenderer | WebGPURenderer;
|
|
564
|
+
/** The backend's cloud deck material and lit-shader cloud shadows (WebGPU: webgpu-clouds.ts). */
|
|
565
|
+
interface CloudBackend {
|
|
566
|
+
material(uniforms: CloudUniforms, textures: CloudTextures): THREE.Material;
|
|
567
|
+
installShadows(uniforms: CloudShadowUniforms): void;
|
|
568
|
+
}
|
|
368
569
|
interface InitializedRenderer {
|
|
369
570
|
three: ThreeRenderer;
|
|
370
571
|
backend: RendererBackend;
|
|
371
572
|
optimizer?: WebGpuSceneOptimizer;
|
|
372
573
|
reflectionFilter?: SkyReflectionFilter;
|
|
574
|
+
clouds?: CloudBackend;
|
|
373
575
|
}
|
|
374
576
|
interface RendererOptions {
|
|
375
577
|
/** Shared procedural sky/ground reflections for PBR materials. Default false; Earth viewers enable it. */
|
|
@@ -524,6 +726,13 @@ declare class Renderer {
|
|
|
524
726
|
private starCatalog;
|
|
525
727
|
private activeWeather;
|
|
526
728
|
private weatherTimeOverride;
|
|
729
|
+
/** Cloud textures and the cloud-shadow uniforms every lit shader reads, for the renderer's life. */
|
|
730
|
+
private readonly cloudTextures;
|
|
731
|
+
private readonly cloudShadows;
|
|
732
|
+
private readonly cloudBackend;
|
|
733
|
+
private releaseCloudShadows;
|
|
734
|
+
private cloudQualityLevel;
|
|
735
|
+
private cloudShadowMapVersion;
|
|
527
736
|
private readonly weatherLightIntensities;
|
|
528
737
|
/** The hemisphere the sky reflection map stands in for, and its authored visibility. */
|
|
529
738
|
private hiddenAmbient;
|
|
@@ -536,7 +745,7 @@ declare class Renderer {
|
|
|
536
745
|
/** Active clear-sky visual and sampled ephemeris, when environment.sky is configured. */
|
|
537
746
|
get sky(): SkyVisual | undefined;
|
|
538
747
|
/**
|
|
539
|
-
* Aim the sun's shadow at a focus (absolute world coordinates) covering ±`radius` meters, or
|
|
748
|
+
* Aim the sun's shadow at a focus (absolute world coordinates) covering at least ±`radius` meters, or
|
|
540
749
|
* `undefined` for the environment's own fixed box. Call whenever what the camera frames
|
|
541
750
|
* moves: an orbit target, a walker, a car. Shadows must be on (`setShadowQuality`).
|
|
542
751
|
*/
|
|
@@ -555,6 +764,13 @@ declare class Renderer {
|
|
|
555
764
|
private applyShadowFocus;
|
|
556
765
|
/** Active weather effects; physical weather data is also available in the simulation component. */
|
|
557
766
|
get weather(): WeatherVisual | undefined;
|
|
767
|
+
/**
|
|
768
|
+
* Per-pixel cloud work, default 'medium': ray-march steps and light samples, erosion detail
|
|
769
|
+
* from 'high', and from 'high' also cloud shadows on every lit surface. Takes effect on the
|
|
770
|
+
* next frame without rebuilding any shader, so adaptive quality tiers may change it freely.
|
|
771
|
+
*/
|
|
772
|
+
setCloudQuality(quality: CloudQuality): void;
|
|
773
|
+
get cloudQuality(): CloudQuality;
|
|
558
774
|
/** Apply the singleton weather component without rebuilding the sky or moving the camera. */
|
|
559
775
|
setWeather(data: WeatherData | undefined): void;
|
|
560
776
|
/** Standalone weather preview clock. Undefined follows simulation time, independently of sky seeks. */
|
|
@@ -609,6 +825,7 @@ declare class Renderer {
|
|
|
609
825
|
*
|
|
610
826
|
* `root.userData.admissionPriority` admits the root's own work as `'urgent'` (ahead of normal
|
|
611
827
|
* work) or `'background'` (only in budget normal work leaves: content nobody waits on yet).
|
|
828
|
+
* `root.userData.admissionOrder` supplies live normal-lane order (lower first).
|
|
612
829
|
*/
|
|
613
830
|
prepareObject(root: THREE.Object3D, signal?: AbortSignal, parent?: THREE.Object3D): Promise<void>;
|
|
614
831
|
/**
|
|
@@ -728,4 +945,4 @@ declare class Renderer {
|
|
|
728
945
|
dispose(): void;
|
|
729
946
|
}
|
|
730
947
|
//#endregion
|
|
731
|
-
export {
|
|
948
|
+
export { SkyReflectionState as A, defaultSkyPalette as C, skyTimeMs as D, evaluateEarthSky as E, AdmissionSample as F, FrameAdmissionOptions as I, FrameAdmissionQueue as L, createWebGlSkyReflectionFilter as M, reflectionStateFromLights as N, starDirection as O, AdmissionOptions as P, SceneAdmission as R, SkyVisualOptions as S, EarthSkyState as T, WeatherVisualOptions as _, RendererBackendPreference as a, SkyStar as b, TopDownOrtho as c, ShadowFocus as d, ShadowQuality as f, WeatherVisual as g, createGpuFrameTimer as h, RendererBackend as i, SkyReflections as j, SkyReflectionFilter as k, nextWorldOrigin as l, GpuFrameTimerOptions as m, CameraPose as n, RendererOptions as o, GpuFrameTimer as p, Renderer as r, ThreeRenderer as s, AutoWorldOriginOptions as t, orthoFrustum as u, CloudQuality as v, CelestialPosition as w, SkyVisual as x, SkyFrame as y };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { n as ModelSignals, t as ModelSignalVisual } from "./model-signals-BpeXhsim.mjs";
|
|
2
|
+
import { AircraftCollisionProbe, AircraftContact, VehicleInteriorSpec, VehicleSpec } from "@bendyline/molen-schema";
|
|
3
|
+
import * as THREE from "three";
|
|
4
|
+
import { Object3D } from "three";
|
|
5
|
+
|
|
6
|
+
//#region src/aircraft-collision.d.ts
|
|
7
|
+
interface AircraftObstacleScene {
|
|
8
|
+
/** Collision tree origin and query, e.g. WalkCollision. */
|
|
9
|
+
origin: THREE.Vector3;
|
|
10
|
+
octree: {
|
|
11
|
+
sphereIntersect(sphere: THREE.Sphere): false | {
|
|
12
|
+
normal: THREE.Vector3;
|
|
13
|
+
depth: number;
|
|
14
|
+
};
|
|
15
|
+
getSphereTriangles?(sphere: THREE.Sphere, triangles: THREE.Triangle[]): unknown;
|
|
16
|
+
};
|
|
17
|
+
cars: ReadonlyArray<{
|
|
18
|
+
transform: {
|
|
19
|
+
pos: [number, number, number];
|
|
20
|
+
rot: [number, number, number, number];
|
|
21
|
+
};
|
|
22
|
+
spec: Pick<VehicleSpec, "width" | "height" | "length">;
|
|
23
|
+
}>;
|
|
24
|
+
/** Other aircraft body centers. The host excludes the queried aircraft. */
|
|
25
|
+
aircraft: ReadonlyArray<[number, number, number]>;
|
|
26
|
+
}
|
|
27
|
+
/** Contact normals from streamed geometry and nearby parked vehicles, in absolute coordinates. */
|
|
28
|
+
declare function aircraftObstacleContacts(probes: readonly AircraftCollisionProbe[], scene: AircraftObstacleScene): AircraftContact[];
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/vehicle-camera.d.ts
|
|
31
|
+
interface VehicleCameraOptions {
|
|
32
|
+
view: "cockpit" | "chase";
|
|
33
|
+
lookYaw?: number;
|
|
34
|
+
lookPitch?: number;
|
|
35
|
+
/** Distance to the first static obstruction between two absolute world points. */
|
|
36
|
+
obstructionDistance?: (from: [number, number, number], to: [number, number, number]) => number | undefined;
|
|
37
|
+
}
|
|
38
|
+
interface VehicleCameraPose {
|
|
39
|
+
position: [number, number, number];
|
|
40
|
+
lookAt: [number, number, number];
|
|
41
|
+
yaw: number;
|
|
42
|
+
pitch: number;
|
|
43
|
+
}
|
|
44
|
+
/** Seat-space cockpit and collision-shortened chase views for any vehicle host. */
|
|
45
|
+
declare function vehicleCameraPose(transform: {
|
|
46
|
+
pos: [number, number, number];
|
|
47
|
+
rot: [number, number, number, number];
|
|
48
|
+
}, spec: Pick<VehicleSpec, "driverEye" | "length">, options: VehicleCameraOptions): VehicleCameraPose;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/vehicle-interior.d.ts
|
|
51
|
+
type VehicleInteriorSignals = ModelSignals;
|
|
52
|
+
type VehicleInteriorVisual = ModelSignalVisual;
|
|
53
|
+
/** Vehicle convenience wrapper around the platform's model-signal binding system. */
|
|
54
|
+
declare function createVehicleInteriorVisual(model: Object3D, spec: VehicleInteriorSpec): VehicleInteriorVisual;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { VehicleCameraPose as a, aircraftObstacleContacts as c, VehicleCameraOptions as i, VehicleInteriorVisual as n, vehicleCameraPose as o, createVehicleInteriorVisual as r, AircraftObstacleScene as s, VehicleInteriorSignals as t };
|