@babylonjs/core 7.19.1 → 7.20.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/Buffers/buffer.nonFloatVertexBuffers.js +1 -1
- package/Buffers/buffer.nonFloatVertexBuffers.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +8 -2
- package/Collisions/gpuPicker.js +41 -20
- package/Collisions/gpuPicker.js.map +1 -1
- package/Engines/Processors/shaderProcessor.d.ts +1 -0
- package/Engines/Processors/shaderProcessor.js +1 -0
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.rawTexture.js +1 -0
- package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessingContext.d.ts +1 -1
- package/Engines/WebGPU/webgpuShaderProcessingContext.js +4 -2
- package/Engines/WebGPU/webgpuShaderProcessingContext.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.d.ts +2 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +12 -5
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -4
- package/Engines/WebGPU/webgpuTextureManager.js +90 -75
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.d.ts +2 -2
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/nativeEngine.d.ts +1 -1
- package/Engines/nativeEngine.js +2 -1
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +1 -1
- package/Engines/thinEngine.functions.d.ts +1 -1
- package/Engines/thinEngine.functions.js +2 -1
- package/Engines/thinEngine.functions.js.map +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +9 -5
- package/Engines/webgpuEngine.js +35 -22
- package/Engines/webgpuEngine.js.map +1 -1
- package/Layers/effectLayer.d.ts +16 -1
- package/Layers/effectLayer.js +32 -2
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.d.ts +1 -2
- package/Layers/glowLayer.js +16 -3
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.d.ts +5 -4
- package/Layers/highlightLayer.js +36 -11
- package/Layers/highlightLayer.js.map +1 -1
- package/Layers/index.d.ts +10 -0
- package/Layers/index.js +12 -0
- package/Layers/index.js.map +1 -1
- package/Lights/Shadows/index.d.ts +8 -0
- package/Lights/Shadows/index.js +9 -0
- package/Lights/Shadows/index.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.d.ts +18 -5
- package/Lights/Shadows/shadowGenerator.js +44 -5
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Loading/sceneLoader.d.ts +155 -16
- package/Loading/sceneLoader.js +197 -99
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +8 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.js +1 -1
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/effect.functions.d.ts +1 -1
- package/Materials/effect.functions.js +6 -3
- package/Materials/effect.functions.js.map +1 -1
- package/Materials/effect.js +1 -1
- package/Materials/effect.js.map +1 -1
- package/Materials/standardMaterial.d.ts +1 -1
- package/Materials/standardMaterial.js +1 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.constants.d.ts +1 -2
- package/Maths/math.constants.js +1 -2
- package/Maths/math.constants.js.map +1 -1
- package/Maths/math.like.d.ts +9 -0
- package/Maths/math.like.js.map +1 -1
- package/Maths/math.vector.d.ts +23 -23
- package/Maths/math.vector.js +43 -11
- package/Maths/math.vector.js.map +1 -1
- package/Misc/index.d.ts +4 -0
- package/Misc/index.js +5 -0
- package/Misc/index.js.map +1 -1
- package/Misc/rgbdTextureTools.d.ts +1 -0
- package/Misc/rgbdTextureTools.js +15 -2
- package/Misc/rgbdTextureTools.js.map +1 -1
- package/PostProcesses/blurPostProcess.d.ts +6 -0
- package/PostProcesses/blurPostProcess.js +21 -2
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/index.d.ts +8 -0
- package/PostProcesses/index.js +10 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/passPostProcess.d.ts +2 -0
- package/PostProcesses/passPostProcess.js +26 -2
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.d.ts +11 -2
- package/PostProcesses/postProcess.js +17 -1
- package/PostProcesses/postProcess.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.js +17 -0
- package/ShadersWGSL/ShadersInclude/bayerDitherFunctions.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment.js +20 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.js +19 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurFragment2.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.js +9 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVaryingDeclaration.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVertex.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVertex.js +9 -0
- package/ShadersWGSL/ShadersInclude/kernelBlurVertex.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js +4 -4
- package/ShadersWGSL/ShadersInclude/morphTargetsVertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowMapFragment.js +5 -5
- package/ShadersWGSL/ShadersInclude/shadowMapFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.d.ts +7 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.js +26 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentExtraDeclaration.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js +12 -0
- package/ShadersWGSL/ShadersInclude/shadowMapFragmentSoftTransparentShadow.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.js +19 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexExtraDeclaration.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexMetric.js +4 -4
- package/ShadersWGSL/ShadersInclude/shadowMapVertexMetric.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.js +17 -0
- package/ShadersWGSL/ShadersInclude/shadowMapVertexNormalBias.js.map +1 -0
- package/ShadersWGSL/default.fragment.js +2 -2
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/depthBoxBlur.fragment.d.ts +5 -0
- package/ShadersWGSL/depthBoxBlur.fragment.js +14 -0
- package/ShadersWGSL/depthBoxBlur.fragment.js.map +1 -0
- package/ShadersWGSL/glowBlurPostProcess.fragment.d.ts +5 -0
- package/ShadersWGSL/glowBlurPostProcess.fragment.js +15 -0
- package/ShadersWGSL/glowBlurPostProcess.fragment.js.map +1 -0
- package/ShadersWGSL/glowMapGeneration.fragment.d.ts +8 -0
- package/ShadersWGSL/glowMapGeneration.fragment.js +74 -0
- package/ShadersWGSL/glowMapGeneration.fragment.js.map +1 -0
- package/ShadersWGSL/glowMapGeneration.vertex.d.ts +17 -0
- package/ShadersWGSL/glowMapGeneration.vertex.js +92 -0
- package/ShadersWGSL/glowMapGeneration.vertex.js.map +1 -0
- package/ShadersWGSL/glowMapMerge.fragment.d.ts +5 -0
- package/ShadersWGSL/glowMapMerge.fragment.js +32 -0
- package/ShadersWGSL/glowMapMerge.fragment.js.map +1 -0
- package/ShadersWGSL/glowMapMerge.vertex.d.ts +5 -0
- package/ShadersWGSL/glowMapMerge.vertex.js +16 -0
- package/ShadersWGSL/glowMapMerge.vertex.js.map +1 -0
- package/ShadersWGSL/kernelBlur.fragment.d.ts +9 -0
- package/ShadersWGSL/kernelBlur.fragment.js +48 -0
- package/ShadersWGSL/kernelBlur.fragment.js.map +1 -0
- package/ShadersWGSL/kernelBlur.vertex.d.ts +7 -0
- package/ShadersWGSL/kernelBlur.vertex.js +21 -0
- package/ShadersWGSL/kernelBlur.vertex.js.map +1 -0
- package/ShadersWGSL/pass.fragment.d.ts +5 -0
- package/ShadersWGSL/pass.fragment.js +12 -0
- package/ShadersWGSL/pass.fragment.js.map +1 -0
- package/ShadersWGSL/passCube.fragment.d.ts +5 -0
- package/ShadersWGSL/passCube.fragment.js +31 -0
- package/ShadersWGSL/passCube.fragment.js.map +1 -0
- package/ShadersWGSL/rgbdDecode.fragment.d.ts +6 -0
- package/ShadersWGSL/rgbdDecode.fragment.js +14 -0
- package/ShadersWGSL/rgbdDecode.fragment.js.map +1 -0
- package/ShadersWGSL/rgbdEncode.fragment.d.ts +6 -0
- package/ShadersWGSL/rgbdEncode.fragment.js +14 -0
- package/ShadersWGSL/rgbdEncode.fragment.js.map +1 -0
- package/ShadersWGSL/shadowMap.fragment.d.ts +9 -0
- package/ShadersWGSL/shadowMap.fragment.js +39 -0
- package/ShadersWGSL/shadowMap.fragment.js.map +1 -0
- package/ShadersWGSL/shadowMap.vertex.d.ts +22 -0
- package/ShadersWGSL/shadowMap.vertex.js +89 -0
- package/ShadersWGSL/shadowMap.vertex.js.map +1 -0
- package/package.json +1 -1
package/Loading/sceneLoader.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { TransformNode } from "../Meshes/transformNode";
|
|
|
13
13
|
import type { Geometry } from "../Meshes/geometry";
|
|
14
14
|
import type { Light } from "../Lights/light";
|
|
15
15
|
import type { ISpriteManager } from "../Sprites/spriteManager";
|
|
16
|
-
import
|
|
16
|
+
import { AbstractEngine } from "../Engines/abstractEngine";
|
|
17
17
|
/**
|
|
18
18
|
* Type used for the success callback of ImportMesh
|
|
19
19
|
*/
|
|
@@ -79,7 +79,7 @@ export interface ISceneLoaderPluginExtensions {
|
|
|
79
79
|
/**
|
|
80
80
|
* Defines the list of supported extensions
|
|
81
81
|
*/
|
|
82
|
-
[extension: string]: {
|
|
82
|
+
readonly [extension: string]: {
|
|
83
83
|
isBinary: boolean;
|
|
84
84
|
};
|
|
85
85
|
}
|
|
@@ -90,12 +90,13 @@ export interface ISceneLoaderPluginFactory {
|
|
|
90
90
|
/**
|
|
91
91
|
* Defines the name of the factory
|
|
92
92
|
*/
|
|
93
|
-
name: string;
|
|
93
|
+
readonly name: string;
|
|
94
94
|
/**
|
|
95
95
|
* Function called to create a new plugin
|
|
96
|
+
* @param options plugin options that were passed to the SceneLoader operation
|
|
96
97
|
* @returns the new plugin
|
|
97
98
|
*/
|
|
98
|
-
createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
99
|
+
createPlugin(options: SceneLoaderPluginOptions): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
99
100
|
/**
|
|
100
101
|
* The callback that returns true if the data can be directly loaded.
|
|
101
102
|
* @param data string containing the file data
|
|
@@ -110,11 +111,11 @@ export interface ISceneLoaderPluginBase {
|
|
|
110
111
|
/**
|
|
111
112
|
* The friendly name of this plugin.
|
|
112
113
|
*/
|
|
113
|
-
name: string;
|
|
114
|
+
readonly name: string;
|
|
114
115
|
/**
|
|
115
116
|
* The file extensions supported by this plugin.
|
|
116
117
|
*/
|
|
117
|
-
extensions: string | ISceneLoaderPluginExtensions;
|
|
118
|
+
readonly extensions: string | ISceneLoaderPluginExtensions;
|
|
118
119
|
/**
|
|
119
120
|
* The callback called when loading from a url.
|
|
120
121
|
* @param scene scene loading this url
|
|
@@ -264,6 +265,91 @@ interface IRegisteredPlugin {
|
|
|
264
265
|
*/
|
|
265
266
|
isBinary: boolean;
|
|
266
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Defines options for SceneLoader plugins. This interface is extended by specific plugins.
|
|
270
|
+
*/
|
|
271
|
+
export interface SceneLoaderPluginOptions extends Record<string, Record<string, unknown> | undefined> {
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Adds default/implicit options to plugin specific options.
|
|
275
|
+
*/
|
|
276
|
+
type DefaultPluginOptions<BasePluginOptions> = {
|
|
277
|
+
/**
|
|
278
|
+
* Defines if the plugin is enabled
|
|
279
|
+
*/
|
|
280
|
+
enabled?: boolean;
|
|
281
|
+
} & BasePluginOptions;
|
|
282
|
+
type SceneSource = string | File | ArrayBufferView;
|
|
283
|
+
/**
|
|
284
|
+
* Defines common options for loading operations performed by SceneLoader.
|
|
285
|
+
*/
|
|
286
|
+
interface SceneLoaderOptions {
|
|
287
|
+
/**
|
|
288
|
+
* A string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
289
|
+
*/
|
|
290
|
+
rootUrl?: string;
|
|
291
|
+
/**
|
|
292
|
+
* A callback with a progress event for each file being loaded
|
|
293
|
+
*/
|
|
294
|
+
onProgress?: (event: ISceneLoaderProgressEvent) => void;
|
|
295
|
+
/**
|
|
296
|
+
* The extension used to determine the plugin
|
|
297
|
+
*/
|
|
298
|
+
pluginExtension?: string;
|
|
299
|
+
/**
|
|
300
|
+
* Defines the filename, if the data is binary
|
|
301
|
+
*/
|
|
302
|
+
name?: string;
|
|
303
|
+
/**
|
|
304
|
+
* Defines options for the registered plugins
|
|
305
|
+
*/
|
|
306
|
+
pluginOptions?: {
|
|
307
|
+
[Plugin in keyof SceneLoaderPluginOptions]: {
|
|
308
|
+
[Option in keyof DefaultPluginOptions<SceneLoaderPluginOptions[Plugin]>]: DefaultPluginOptions<SceneLoaderPluginOptions[Plugin]>[Option];
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Defines options for ImportMeshAsync.
|
|
314
|
+
*/
|
|
315
|
+
export interface ImportMeshOptions extends SceneLoaderOptions {
|
|
316
|
+
/**
|
|
317
|
+
* An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
|
|
318
|
+
*/
|
|
319
|
+
meshNames?: string | readonly string[] | null | undefined;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Defines options for LoadAsync.
|
|
323
|
+
*/
|
|
324
|
+
export interface LoadOptions extends SceneLoaderOptions {
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Defines options for AppendAsync.
|
|
328
|
+
*/
|
|
329
|
+
export interface AppendOptions extends SceneLoaderOptions {
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Defines options for LoadAssetContainerAsync.
|
|
333
|
+
*/
|
|
334
|
+
export interface LoadAssetContainerOptions extends SceneLoaderOptions {
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Defines options for ImportAnimationsAsync.
|
|
338
|
+
*/
|
|
339
|
+
export interface ImportAnimationsOptions extends SceneLoaderOptions {
|
|
340
|
+
/**
|
|
341
|
+
* When true, animations are cleaned before importing new ones. Animations are appended otherwise
|
|
342
|
+
*/
|
|
343
|
+
overwriteAnimations?: boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Defines how to handle old animations groups before importing new ones
|
|
346
|
+
*/
|
|
347
|
+
animationGroupLoadingMode?: SceneLoaderAnimationGroupLoadingMode;
|
|
348
|
+
/**
|
|
349
|
+
* defines a function used to convert animation targets from loaded scene to current scene (default: search node by name)
|
|
350
|
+
*/
|
|
351
|
+
targetConverter?: Nullable<(target: unknown) => unknown>;
|
|
352
|
+
}
|
|
267
353
|
/**
|
|
268
354
|
* Class used to load scene from various file formats using registered plugins
|
|
269
355
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes
|
|
@@ -354,7 +440,17 @@ export declare class SceneLoader {
|
|
|
354
440
|
* @param name defines the name of the file, if the data is binary
|
|
355
441
|
* @returns The loaded plugin
|
|
356
442
|
*/
|
|
357
|
-
static ImportMesh(meshNames: string | readonly string[] | null | undefined, rootUrl: string, sceneFilename?:
|
|
443
|
+
static ImportMesh(meshNames: string | readonly string[] | null | undefined, rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onSuccess?: Nullable<SceneLoaderSuccessCallback>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): Nullable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
444
|
+
private static _ImportMesh;
|
|
445
|
+
/**
|
|
446
|
+
* Import meshes into a scene
|
|
447
|
+
* @experimental
|
|
448
|
+
* @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
|
|
449
|
+
* @param scene the instance of BABYLON.Scene to append to
|
|
450
|
+
* @param options an object that configures aspects of how the scene is loaded
|
|
451
|
+
* @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups
|
|
452
|
+
*/
|
|
453
|
+
static ImportMeshAsync(source: SceneSource, scene: Scene, options?: ImportMeshOptions): Promise<ISceneLoaderAsyncResult>;
|
|
358
454
|
/**
|
|
359
455
|
* Import meshes into a scene
|
|
360
456
|
* @param meshNames an array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
|
|
@@ -366,7 +462,7 @@ export declare class SceneLoader {
|
|
|
366
462
|
* @param name defines the name of the file
|
|
367
463
|
* @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups
|
|
368
464
|
*/
|
|
369
|
-
static ImportMeshAsync(meshNames: string | readonly string[] | null | undefined, rootUrl: string, sceneFilename?:
|
|
465
|
+
static ImportMeshAsync(meshNames: string | readonly string[] | null | undefined, rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<ISceneLoaderAsyncResult>;
|
|
370
466
|
/**
|
|
371
467
|
* Load a scene
|
|
372
468
|
* @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
@@ -379,7 +475,17 @@ export declare class SceneLoader {
|
|
|
379
475
|
* @param name defines the filename, if the data is binary
|
|
380
476
|
* @returns The loaded plugin
|
|
381
477
|
*/
|
|
382
|
-
static Load(rootUrl: string, sceneFilename?:
|
|
478
|
+
static Load(rootUrl: string, sceneFilename?: SceneSource, engine?: Nullable<AbstractEngine>, onSuccess?: Nullable<(scene: Scene) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): Nullable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
479
|
+
private static _Load;
|
|
480
|
+
/**
|
|
481
|
+
* Load a scene
|
|
482
|
+
* @experimental
|
|
483
|
+
* @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
|
|
484
|
+
* @param engine is the instance of BABYLON.Engine to use to create the scene
|
|
485
|
+
* @param options an object that configures aspects of how the scene is loaded
|
|
486
|
+
* @returns The loaded scene
|
|
487
|
+
*/
|
|
488
|
+
static LoadAsync(source: SceneSource, engine: AbstractEngine, options?: LoadOptions): Promise<Scene>;
|
|
383
489
|
/**
|
|
384
490
|
* Load a scene
|
|
385
491
|
* @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
@@ -390,7 +496,7 @@ export declare class SceneLoader {
|
|
|
390
496
|
* @param name defines the filename, if the data is binary
|
|
391
497
|
* @returns The loaded scene
|
|
392
498
|
*/
|
|
393
|
-
static LoadAsync(rootUrl: string, sceneFilename?:
|
|
499
|
+
static LoadAsync(rootUrl: string, sceneFilename?: SceneSource, engine?: Nullable<AbstractEngine>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<Scene>;
|
|
394
500
|
/**
|
|
395
501
|
* Append a scene
|
|
396
502
|
* @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
@@ -403,7 +509,17 @@ export declare class SceneLoader {
|
|
|
403
509
|
* @param name defines the name of the file, if the data is binary
|
|
404
510
|
* @returns The loaded plugin
|
|
405
511
|
*/
|
|
406
|
-
static Append(rootUrl: string, sceneFilename?:
|
|
512
|
+
static Append(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onSuccess?: Nullable<(scene: Scene) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): Nullable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
513
|
+
private static _Append;
|
|
514
|
+
/**
|
|
515
|
+
* Append a scene
|
|
516
|
+
* @experimental
|
|
517
|
+
* @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
|
|
518
|
+
* @param scene is the instance of BABYLON.Scene to append to
|
|
519
|
+
* @param options an object that configures aspects of how the scene is loaded
|
|
520
|
+
* @returns The given scene
|
|
521
|
+
*/
|
|
522
|
+
static AppendAsync(source: SceneSource, scene: Scene, options?: LoadAssetContainerOptions): Promise<Scene>;
|
|
407
523
|
/**
|
|
408
524
|
* Append a scene
|
|
409
525
|
* @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
@@ -414,7 +530,7 @@ export declare class SceneLoader {
|
|
|
414
530
|
* @param name defines the name of the file, if the data is binary
|
|
415
531
|
* @returns The given scene
|
|
416
532
|
*/
|
|
417
|
-
static AppendAsync(rootUrl: string, sceneFilename?:
|
|
533
|
+
static AppendAsync(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<Scene>;
|
|
418
534
|
/**
|
|
419
535
|
* Load a scene into an asset container
|
|
420
536
|
* @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
@@ -427,7 +543,17 @@ export declare class SceneLoader {
|
|
|
427
543
|
* @param name defines the filename, if the data is binary
|
|
428
544
|
* @returns The loaded plugin
|
|
429
545
|
*/
|
|
430
|
-
static LoadAssetContainer(rootUrl: string, sceneFilename?:
|
|
546
|
+
static LoadAssetContainer(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onSuccess?: Nullable<(assets: AssetContainer) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): Nullable<ISceneLoaderPlugin | ISceneLoaderPluginAsync>;
|
|
547
|
+
private static _LoadAssetContainer;
|
|
548
|
+
/**
|
|
549
|
+
* Load a scene into an asset container
|
|
550
|
+
* @experimental
|
|
551
|
+
* @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
|
|
552
|
+
* @param scene is the instance of Scene to append to
|
|
553
|
+
* @param options an object that configures aspects of how the scene is loaded
|
|
554
|
+
* @returns The loaded asset container
|
|
555
|
+
*/
|
|
556
|
+
static LoadAssetContainerAsync(source: SceneSource, scene: Scene, options?: LoadAssetContainerOptions): Promise<AssetContainer>;
|
|
431
557
|
/**
|
|
432
558
|
* Load a scene into an asset container
|
|
433
559
|
* @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
@@ -435,9 +561,10 @@ export declare class SceneLoader {
|
|
|
435
561
|
* @param scene is the instance of Scene to append to
|
|
436
562
|
* @param onProgress a callback with a progress event for each file being loaded
|
|
437
563
|
* @param pluginExtension the extension used to determine the plugin
|
|
564
|
+
* @param name defines the filename, if the data is binary
|
|
438
565
|
* @returns The loaded asset container
|
|
439
566
|
*/
|
|
440
|
-
static LoadAssetContainerAsync(rootUrl: string, sceneFilename?:
|
|
567
|
+
static LoadAssetContainerAsync(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<AssetContainer>;
|
|
441
568
|
/**
|
|
442
569
|
* Import animations from a file into a scene
|
|
443
570
|
* @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
@@ -450,8 +577,19 @@ export declare class SceneLoader {
|
|
|
450
577
|
* @param onProgress a callback with a progress event for each file being loaded
|
|
451
578
|
* @param onError a callback with the scene, a message, and possibly an exception when import fails
|
|
452
579
|
* @param pluginExtension the extension used to determine the plugin
|
|
580
|
+
* @param name defines the filename, if the data is binary
|
|
453
581
|
*/
|
|
454
|
-
static ImportAnimations(rootUrl: string, sceneFilename?:
|
|
582
|
+
static ImportAnimations(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, overwriteAnimations?: boolean, animationGroupLoadingMode?: SceneLoaderAnimationGroupLoadingMode, targetConverter?: Nullable<(target: any) => any>, onSuccess?: Nullable<(scene: Scene) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): void;
|
|
583
|
+
private static _ImportAnimations;
|
|
584
|
+
/**
|
|
585
|
+
* Import animations from a file into a scene
|
|
586
|
+
* @experimental
|
|
587
|
+
* @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
|
|
588
|
+
* @param scene is the instance of BABYLON.Scene to append to (default: last created scene)
|
|
589
|
+
* @param options an object that configures aspects of how the scene is loaded
|
|
590
|
+
* @returns The loaded asset container
|
|
591
|
+
*/
|
|
592
|
+
static ImportAnimationsAsync(source: SceneSource, scene: Scene, options?: ImportAnimationsOptions): Promise<Scene>;
|
|
455
593
|
/**
|
|
456
594
|
* Import animations from a file into a scene
|
|
457
595
|
* @param rootUrl a string that defines the root url for the scene and resources or the concatenation of rootURL and filename (e.g. http://example.com/test.glb)
|
|
@@ -464,8 +602,9 @@ export declare class SceneLoader {
|
|
|
464
602
|
* @param onProgress a callback with a progress event for each file being loaded
|
|
465
603
|
* @param onError a callback with the scene, a message, and possibly an exception when import fails
|
|
466
604
|
* @param pluginExtension the extension used to determine the plugin
|
|
605
|
+
* @param name defines the filename, if the data is binary
|
|
467
606
|
* @returns the updated scene with imported animations
|
|
468
607
|
*/
|
|
469
|
-
static ImportAnimationsAsync(rootUrl: string, sceneFilename?:
|
|
608
|
+
static ImportAnimationsAsync(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, overwriteAnimations?: boolean, animationGroupLoadingMode?: SceneLoaderAnimationGroupLoadingMode, targetConverter?: Nullable<(target: any) => any>, onSuccess?: Nullable<(scene: Scene) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<Scene>;
|
|
470
609
|
}
|
|
471
610
|
export {};
|