@bendyline/molen-client 0.0.12 → 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.
@@ -1,4 +1,4 @@
1
- import { n as CameraPose } from "./renderer-DAk7C8jH.mjs";
1
+ import { n as CameraPose } from "./renderer-4kSVioiH.mjs";
2
2
 
3
3
  //#region src/camera-track.d.ts
4
4
  interface CameraTrackKeyframe {
package/dist/glass.mjs CHANGED
@@ -110,7 +110,8 @@ function createGlassVisual(model, data) {
110
110
  transparent: true,
111
111
  opacity: .36,
112
112
  depthWrite: false,
113
- side: THREE.DoubleSide
113
+ side: THREE.DoubleSide,
114
+ forceSinglePass: true
114
115
  });
115
116
  const { geometry, centers, edges } = cells(spec);
116
117
  const mesh = new THREE.Mesh(geometry, material);
package/dist/index.d.mts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { a as readModelSignals, n as ModelSignals, r as createModelSignalVisual, t as ModelSignalVisual } from "./model-signals-BpeXhsim.mjs";
2
2
  import { a as createUrlAssetProvider, i as UrlAssetProviderOptions, n as AssetProvider, r as LoadedGltf, t as AssetCache } from "./assets-IbO4GJpF.mjs";
3
- import { A as SkyReflectionState, C as defaultSkyPalette, D as skyTimeMs, E as evaluateEarthSky, F as AdmissionSample, I as FrameAdmissionOptions, L as FrameAdmissionQueue, M as createWebGlSkyReflectionFilter, N as reflectionStateFromLights, O as starDirection, P as AdmissionOptions, R as SceneAdmission, S as SkyVisualOptions, T as EarthSkyState, _ as WeatherVisualOptions, a as RendererBackendPreference, b as SkyStar, c as TopDownOrtho, d as ShadowFocus, f as ShadowQuality, g as WeatherVisual, h as createGpuFrameTimer, i as RendererBackend, j as SkyReflections, k as SkyReflectionFilter, l as nextWorldOrigin, m as GpuFrameTimerOptions, n as CameraPose, o as RendererOptions, p as GpuFrameTimer, r as Renderer, s as ThreeRenderer, t as AutoWorldOriginOptions, u as orthoFrustum, v as CloudQuality, w as CelestialPosition, x as SkyVisual, y as SkyFrame } from "./renderer-DAk7C8jH.mjs";
3
+ import { A as SkyReflectionFilter, C as SkyVisualOptions, D as evaluateEarthSky, E as EarthSkyState, F as AdmissionOptions, I as AdmissionSample, L as FrameAdmissionOptions, M as SkyReflections, N as createWebGlSkyReflectionFilter, O as skyTimeMs, P as reflectionStateFromLights, R as FrameAdmissionQueue, S as SkyVisual, T as CelestialPosition, _ as WeatherVisual, a as RendererBackendPreference, b as SkyFrame, c as TopDownOrtho, d as ShadowFocus, f as ShadowQuality, g as FarShadowInfo, h as createGpuFrameTimer, i as RendererBackend, j as SkyReflectionState, k as starDirection, l as nextWorldOrigin, m as GpuFrameTimerOptions, n as CameraPose, o as RendererOptions, p as GpuFrameTimer, r as Renderer, s as ThreeRenderer, t as AutoWorldOriginOptions, u as orthoFrustum, v as WeatherVisualOptions, w as defaultSkyPalette, x as SkyStar, y as CloudQuality, z as SceneAdmission } from "./renderer-4kSVioiH.mjs";
4
4
  import { a as normalizeInputAxis, i as InputMapOptions, n as InputGamepad, o as resolveAction, r as InputMap, t as InputBindings } from "./input-Ckev_Kvj.mjs";
5
+ import { a as isInstanceBatch, i as InstanceMatrixAttribute, n as INSTANCE_BATCH_MATRIX_COLUMNS, o as isInstanceBatchGeometry, r as InstanceBatch, t as INSTANCE_BATCH_COLOR } from "./instance-batch-CO4YD6rd.mjs";
5
6
  import { CloudType, Command, ControlAction, CustomSkyData, Delta, DiagMessage, EarthObserver, EarthSkyData, EngineEvent, EntityId, GlassData, GlassStateData, JsonObject, JsonValue, Keyframe, LiveryData, LiveryGraphic, MessageLink, ModelSignalSpec, Quat, ResolvedWeather, SceneCamera, SceneInput, SceneManifest, SkyAppearance, SkyBodyData, SkyData, SkyData as SkyData$1, SkyPalette, SkyTime, Vec3, WeatherData, WeatherProfile, resolveWeather, weatherProfile } from "@bendyline/molen-schema";
6
7
  import * as THREE from "three";
7
8
  import { Intersection, Object3D } from "three";
@@ -26,6 +27,19 @@ interface AdaptiveQualityOptions {
26
27
  cooldownMs?: number;
27
28
  /** An isolated longer interval is treated as a pause; repeated ones remain overload. */
28
29
  pauseFrameMs?: number;
30
+ /**
31
+ * A second isolated pause within this much measured time of the last one is a stall, not a
32
+ * tab resume, and lowers detail (default 60 s). The first is still ignored.
33
+ */
34
+ pauseRepeatMs?: number;
35
+ /**
36
+ * Measured frame work must stay under this share of the target before detail goes up
37
+ * (default 0.9). A step up costs more than the level it leaves, so a host whose levels differ
38
+ * a lot in cost sets it lower: at 0.9 a frame using 15 of its 16.7 ms counted as headroom.
39
+ */
40
+ upgradeWorkFraction?: number;
41
+ /** Sustained `strained` samples before stepping down (default 10 s). */
42
+ strainDelayMs?: number;
29
43
  }
30
44
  interface AdaptiveQualitySample {
31
45
  /** False while hidden, suspended, or deliberately not rendering. Resets measurement history. */
@@ -42,8 +56,16 @@ interface AdaptiveQualitySample {
42
56
  gpuFrameMs?: number;
43
57
  /** Estimated resident working set / memory budget. Values above one lower detail. */
44
58
  memoryPressure?: number;
59
+ /**
60
+ * The level asks for more than streaming can hold or deliver, by the host's own measure: tiles
61
+ * rebuilt after eviction, a view that crowds its cache. Frame times do not show this (the work
62
+ * runs outside the frame), so a level can look affordable while it never finishes loading.
63
+ * Blocks upgrades at once and lowers detail when sustained (`strainDelayMs`). Report only strain
64
+ * the level causes: a slow network strains every level alike, and stepping down would not help.
65
+ */
66
+ strained?: boolean;
45
67
  }
46
- type AdaptiveQualityReason = "frame-time" | "memory-pressure" | "headroom" | "manual";
68
+ type AdaptiveQualityReason = "frame-time" | "memory-pressure" | "streaming" | "headroom" | "manual";
47
69
  interface AdaptiveQualityChange {
48
70
  previousLevel: number;
49
71
  level: number;
@@ -78,6 +100,12 @@ declare class AdaptiveQualityController {
78
100
  private readonly increaseDelayMs;
79
101
  private readonly cooldownMs;
80
102
  private readonly pauseFrameMs;
103
+ private readonly pauseRepeatMs;
104
+ private readonly upgradeWorkFraction;
105
+ private readonly strainDelayMs;
106
+ private lastPauseMs;
107
+ private strained;
108
+ private strainMs;
81
109
  private readonly frames;
82
110
  private frameCursor;
83
111
  private clockMs;
@@ -881,4 +909,4 @@ declare const defaultEnvironment: EnvironmentData;
881
909
  */
882
910
  declare function applyEnvironment(renderer: Renderer, env: EnvironmentData): void;
883
911
  //#endregion
884
- export { type AdaptiveQualityChange, AdaptiveQualityController, type AdaptiveQualityOptions, type AdaptiveQualityReason, type AdaptiveQualitySample, type AdaptiveQualityStats, type AdmissionOptions, type AdmissionSample, AssetCache, type AssetOptions, type AssetProvider, type AutoWorldOriginOptions, type CameraPose, type CameraTarget, type CelestialPosition, type ClientCore, type ClientCoreOptions, type ClientDiagCode, type ClientError, type ClientOptions, type CloudQuality, type CloudType, type CustomSkyData, type DecoderConfig, type EarthObserver, type EarthSkyData, type EarthSkyState, type EnvironmentData, type FrameAdmissionOptions, FrameAdmissionQueue, type GpuFrameTimer, type GpuFrameTimerOptions, type InputBindings, type InputGamepad, InputMap, type InputMapOptions, type InputRuleOptions, type InterpTransform, InterpolationBuffer, type KindContext, type KindHandle, type KindView, type LightData, type LiveryVisual, type LoadedGltf, MaterialResolver, type MirrorReader, type ModelSignalVisual, type ModelSignals, type MolenClient, type MountExperienceOptions, type MountedExperience, type Renderable, type RenderableKind, Renderer, type RendererBackend, type RendererBackendPreference, type RendererOptions, type ResolvedWeather, type SceneAdmission, type SceneBackend, SceneMirror, type SceneOptimizationOptions, type ShadowFocus, type ShadowQuality, type SkyAppearance, type SkyBodyData, type SkyData, type SkyFrame, type SkyPalette, type SkyReflectionFilter, type SkyReflectionState, SkyReflections, type SkyStar, type SkyTime, SkyVisual, type SkyVisualOptions, type StarCatalogRow, type StaticBatchOptions, THREE, type ThreeRenderer, ThreeSceneBackend, type TopDownOrtho, type Unsubscribe, type UrlAssetProviderOptions, type WeatherData, type WeatherProfile, WeatherVisual, type WeatherVisualOptions, applyEnvironment, applyInputRules, applyLivery, applySceneCamera, computeClipTime, createClient, createClientCore, createGltfLoader, createGpuFrameTimer, createIndexedDbMaterialStore, createModelSignalVisual, createSnapshotViewer, createUrlAssetProvider, createViewer, createWebGlSkyReflectionFilter, decodeStarCatalog, decodeStarCatalogRows, defaultEnvironment, defaultSkyPalette, encodeStarCatalog, evaluateEarthSky, followCameraPose, lerp3, liveryGraphicTexture, localCommand, materialFromBaked, mountExperience, nextWorldOrigin, nlerp4, normalizeInputAxis, observePageActivity, orthoFrustum, readModelSignals, reflectionStateFromLights, resolveAction, resolveWeather, skyTimeMs, starDirection, weatherProfile };
912
+ export { type AdaptiveQualityChange, AdaptiveQualityController, type AdaptiveQualityOptions, type AdaptiveQualityReason, type AdaptiveQualitySample, type AdaptiveQualityStats, type AdmissionOptions, type AdmissionSample, AssetCache, type AssetOptions, type AssetProvider, type AutoWorldOriginOptions, type CameraPose, type CameraTarget, type CelestialPosition, type ClientCore, type ClientCoreOptions, type ClientDiagCode, type ClientError, type ClientOptions, type CloudQuality, type CloudType, type CustomSkyData, type DecoderConfig, type EarthObserver, type EarthSkyData, type EarthSkyState, type EnvironmentData, type FarShadowInfo, type FrameAdmissionOptions, FrameAdmissionQueue, type GpuFrameTimer, type GpuFrameTimerOptions, INSTANCE_BATCH_COLOR, INSTANCE_BATCH_MATRIX_COLUMNS, type InputBindings, type InputGamepad, InputMap, type InputMapOptions, type InputRuleOptions, InstanceBatch, InstanceMatrixAttribute, type InterpTransform, InterpolationBuffer, type KindContext, type KindHandle, type KindView, type LightData, type LiveryVisual, type LoadedGltf, MaterialResolver, type MirrorReader, type ModelSignalVisual, type ModelSignals, type MolenClient, type MountExperienceOptions, type MountedExperience, type Renderable, type RenderableKind, Renderer, type RendererBackend, type RendererBackendPreference, type RendererOptions, type ResolvedWeather, type SceneAdmission, type SceneBackend, SceneMirror, type SceneOptimizationOptions, type ShadowFocus, type ShadowQuality, type SkyAppearance, type SkyBodyData, type SkyData, type SkyFrame, type SkyPalette, type SkyReflectionFilter, type SkyReflectionState, SkyReflections, type SkyStar, type SkyTime, SkyVisual, type SkyVisualOptions, type StarCatalogRow, type StaticBatchOptions, THREE, type ThreeRenderer, ThreeSceneBackend, type TopDownOrtho, type Unsubscribe, type UrlAssetProviderOptions, type WeatherData, type WeatherProfile, WeatherVisual, type WeatherVisualOptions, applyEnvironment, applyInputRules, applyLivery, applySceneCamera, computeClipTime, createClient, createClientCore, createGltfLoader, createGpuFrameTimer, createIndexedDbMaterialStore, createModelSignalVisual, createSnapshotViewer, createUrlAssetProvider, createViewer, createWebGlSkyReflectionFilter, decodeStarCatalog, decodeStarCatalogRows, defaultEnvironment, defaultSkyPalette, encodeStarCatalog, evaluateEarthSky, followCameraPose, isInstanceBatch, isInstanceBatchGeometry, lerp3, liveryGraphicTexture, localCommand, materialFromBaked, mountExperience, nextWorldOrigin, nlerp4, normalizeInputAxis, observePageActivity, orthoFrustum, readModelSignals, reflectionStateFromLights, resolveAction, resolveWeather, skyTimeMs, starDirection, weatherProfile };