babylonjs-toolkit 9.12.1101 → 9.15.0
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/lib/babylon.toolkit.d.ts +24 -4
- package/lib/babylon.toolkit.js +1 -1
- package/lib/index.d.ts +24 -4
- package/package.json +15 -15
package/lib/babylon.toolkit.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare namespace TOOLKIT {
|
|
|
7
7
|
* @class SceneManager - All rights reserved (c) 2024 Mackey Kinard
|
|
8
8
|
*/
|
|
9
9
|
class SceneManager {
|
|
10
|
-
/** Gets the toolkit framework version string (9.
|
|
10
|
+
/** Gets the toolkit framework version string (9.15.0 - R1) */
|
|
11
11
|
static get Version(): string;
|
|
12
12
|
/** Gets the toolkit framework copyright notice */
|
|
13
13
|
static get Copyright(): string;
|
|
@@ -35,8 +35,6 @@ declare namespace TOOLKIT {
|
|
|
35
35
|
static AutoUpdateProgress: boolean;
|
|
36
36
|
/** Set the capsule collider shape type */
|
|
37
37
|
static PhysicsCapsuleShape: number;
|
|
38
|
-
/** Set the support srgb buffers flag */
|
|
39
|
-
static SupportSRGBBuffers: boolean;
|
|
40
38
|
/** The animation start mode. Defaults to NONE. */
|
|
41
39
|
static AnimationStartMode: number;
|
|
42
40
|
/** When loading glTF animations, which are defined in seconds, target them to this FPS. Defaults to 60 for new behavior. Set to 1 for old behavior */
|
|
@@ -1152,7 +1150,7 @@ declare namespace TOOLKIT {
|
|
|
1152
1150
|
/** Delay in milliseconds to trigger the createScene function on the script component. Note: This is required to ensure the scene is fully initialized before createScene is called. Default is 1000 milliseconds. */
|
|
1153
1151
|
postCreateSceneDelayMs: number;
|
|
1154
1152
|
/** Prewarm the scene and optionally hide the splash screen after a delay. Note: This is required to trigger the createScene function on the script component. Default is 3000 milliseconds. */
|
|
1155
|
-
|
|
1153
|
+
scenePrewarmDurationMs: number;
|
|
1156
1154
|
/**
|
|
1157
1155
|
* @param transform The transform node associated with this scene controller.
|
|
1158
1156
|
* @param scene The Babylon.js scene instance.
|
|
@@ -2115,7 +2113,29 @@ declare namespace TOOLKIT {
|
|
|
2115
2113
|
_loadMeshPrimitiveAsync(context: string, name: string, node: BABYLON.GLTF2.INode, mesh: BABYLON.GLTF2.IMesh, primitive: any, assign: (babylonMesh: BABYLON.AbstractMesh) => void): Promise<BABYLON.AbstractMesh>;
|
|
2116
2114
|
private _setupBabylonMesh;
|
|
2117
2115
|
private _setupBabylonMultiMaterials;
|
|
2116
|
+
/**
|
|
2117
|
+
* Rebuilds Unity-style LOD switching from the per-node `lods`/`distances` metadata (this project does
|
|
2118
|
+
* not use MSFT_lod). Each `lods` entry is one LOD level and is either a single renderer name (a
|
|
2119
|
+
* `string`, `"*"` = the group root) or the names of every renderer in that level (a `string[]`); legacy
|
|
2120
|
+
* single-renderer metadata (all strings) parses unchanged. `distances[i]` is the far threshold of level
|
|
2121
|
+
* `i` and `distances[N-1]` doubles as the cull threshold.
|
|
2122
|
+
*
|
|
2123
|
+
* HYBRID strategy, decided per group after normalization:
|
|
2124
|
+
* - Native fast path (every level resolves to exactly one mesh): `master.addLODLevel(distances[i-1], mesh)`
|
|
2125
|
+
* for the detail levels plus a final `addLODLevel(cull, null)` band - identical perf/behavior to
|
|
2126
|
+
* legacy content. Native LOD cannot be used on an InstancedMesh master, so unused detail instances
|
|
2127
|
+
* are disposed as the legacy code did.
|
|
2128
|
+
* - Custom switcher (any level has >1 mesh): a single `onBeforeRenderObservable` handler that toggles
|
|
2129
|
+
* all meshes of a level together on band transitions, because native `addLODLevel` is strictly
|
|
2130
|
+
* 1 master -> 1 replacement and cannot express N renderers per level.
|
|
2131
|
+
*/
|
|
2118
2132
|
private _processLevelOfDetail;
|
|
2133
|
+
/**
|
|
2134
|
+
* Registers a single per-frame LOD switcher for a group that has at least one level with multiple
|
|
2135
|
+
* renderers (native `addLODLevel` cannot represent that structurally). Toggles every mesh of the active
|
|
2136
|
+
* level together, only on band transitions, and tears the observer down on scene/root dispose.
|
|
2137
|
+
*/
|
|
2138
|
+
private _setupLevelOfDetailSwitcher;
|
|
2119
2139
|
private _processShaderMaterials;
|
|
2120
2140
|
private preProcessSceneProperties;
|
|
2121
2141
|
private postProcessSceneProperties;
|