babylonjs-addons 9.14.0 → 9.16.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/babylonjs.addons.d.ts
CHANGED
|
@@ -2551,6 +2551,33 @@ declare namespace ADDONS {
|
|
|
2551
2551
|
* @override
|
|
2552
2552
|
*/
|
|
2553
2553
|
isReadyForSubMesh(): boolean;
|
|
2554
|
+
/**
|
|
2555
|
+
* Ensures the shader includes for this material's shader language are registered, kicking off a lazy
|
|
2556
|
+
* load if needed. Registration from a previously created material (or an explicit preload) is detected
|
|
2557
|
+
* synchronously via the ShaderStore, so only the very first atmosphere material can incur a load delay.
|
|
2558
|
+
* @returns True when the includes are registered and the plugin can proceed.
|
|
2559
|
+
*/
|
|
2560
|
+
private _ensureShaderIncludesLoaded;
|
|
2561
|
+
/**
|
|
2562
|
+
* Fire-and-forget load of the shader includes used from isReadyForSubMesh. Backs off after a failure and
|
|
2563
|
+
* logs so a missing registration doesn't silently stall rendering forever; a retry still recovers from
|
|
2564
|
+
* transient failures such as a dropped network request.
|
|
2565
|
+
* @param shaderLanguage - The shader language whose includes to load.
|
|
2566
|
+
* @param state - The shared load state for that language.
|
|
2567
|
+
*/
|
|
2568
|
+
private _tryLoadShaderIncludesAsync;
|
|
2569
|
+
/**
|
|
2570
|
+
* Preloads (and registers into the ShaderStore) the atmosphere shader includes for the given shader
|
|
2571
|
+
* language, ahead of creating any atmosphere-enabled material. Await this before creating meshes when
|
|
2572
|
+
* they must render in their creation frame with zero delay. Safe to call multiple times; concurrent
|
|
2573
|
+
* calls coalesce onto a single load.
|
|
2574
|
+
*
|
|
2575
|
+
* As an alternative, `Material.forceCompilationAsync(mesh)` (or `Scene.whenReadyAsync`) also awaits the
|
|
2576
|
+
* includes, because readiness is gated through `isReadyForSubMesh`.
|
|
2577
|
+
* @param shaderLanguage - The shader language to preload includes for (defaults to GLSL). Pass `ShaderLanguage.WGSL` for WebGPU.
|
|
2578
|
+
* @returns A promise that resolves once the includes are registered.
|
|
2579
|
+
*/
|
|
2580
|
+
static PreloadShaderIncludesAsync(shaderLanguage?: BABYLON.ShaderLanguage): Promise<void>;
|
|
2554
2581
|
/**
|
|
2555
2582
|
* @override
|
|
2556
2583
|
*/
|
|
@@ -2981,6 +3008,22 @@ declare namespace ADDONS {
|
|
|
2981
3008
|
* @param options - The options used to create the atmosphere.
|
|
2982
3009
|
*/
|
|
2983
3010
|
constructor(name: string, scene: BABYLON.Scene, lights: BABYLON.DirectionalLight[], options?: IAtmosphereOptions);
|
|
3011
|
+
/**
|
|
3012
|
+
* Fire-and-forget wrapper around {@link preloadMaterialPluginShaderIncludesAsync} used during construction.
|
|
3013
|
+
* Swallows failures so a rejected preload does not surface as an unhandled promise rejection; the plugin's
|
|
3014
|
+
* `isReadyForSubMesh` already retries and logs on failure.
|
|
3015
|
+
* @returns A promise that always resolves.
|
|
3016
|
+
*/
|
|
3017
|
+
private _eagerlyPreloadMaterialPluginShaderIncludesAsync;
|
|
3018
|
+
/**
|
|
3019
|
+
* Preloads the shader includes used by the atmosphere PBR material plugin so that atmosphere-enabled
|
|
3020
|
+
* materials can render in their creation frame with no delay. The plugin registers these includes lazily
|
|
3021
|
+
* (to keep the module tree-shakeable), so without a preload the very first atmosphere material may skip a
|
|
3022
|
+
* frame while they load. Await this before creating meshes that must render immediately. Safe to call
|
|
3023
|
+
* multiple times.
|
|
3024
|
+
* @returns A promise that resolves once the includes are registered.
|
|
3025
|
+
*/
|
|
3026
|
+
preloadMaterialPluginShaderIncludesAsync(): Promise<void>;
|
|
2984
3027
|
/**
|
|
2985
3028
|
* @override
|
|
2986
3029
|
*/
|