|
@@ -127,8 +127,8 @@ declare module BABYLON {
|
|
|
bin: Nullable<ArrayBufferView>;
|
|
|
}
|
|
|
interface IGLTFLoader extends IDisposable {
|
|
|
- importMeshAsync: (meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress?: (event: ProgressEvent) => void, onError?: (message: string, exception?: any) => void) => void;
|
|
|
- loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: () => void, onProgress?: (event: ProgressEvent) => void, onError?: (message: string, exception?: any) => void) => void;
|
|
|
+ importMeshAsync: (meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress?: (event: SceneLoaderProgressEvent) => void, onError?: (message: string, exception?: any) => void) => void;
|
|
|
+ loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: () => void, onProgress?: (event: SceneLoaderProgressEvent) => void, onError?: (message: string, exception?: any) => void) => void;
|
|
|
}
|
|
|
class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
|
|
|
static CreateGLTFLoaderV1: (parent: GLTFFileLoader) => IGLTFLoader;
|
|
@@ -186,8 +186,8 @@ declare module BABYLON {
|
|
|
* Disposes the loader, releases resources during load, and cancels any outstanding requests.
|
|
|
*/
|
|
|
dispose(): void;
|
|
|
- importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress?: (event: ProgressEvent) => void, onError?: (message: string, exception?: any) => void): void;
|
|
|
- loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onSuccess?: () => void, onProgress?: (event: ProgressEvent) => void, onError?: (message: string, exception?: any) => void): void;
|
|
|
+ importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress?: (event: SceneLoaderProgressEvent) => void, onError?: (message: string, exception?: any) => void): void;
|
|
|
+ loadAsync(scene: Scene, data: string | ArrayBuffer, rootUrl: string, onSuccess?: () => void, onProgress?: (event: SceneLoaderProgressEvent) => void, onError?: (message: string, exception?: any) => void): void;
|
|
|
canDirectLoad(data: string): boolean;
|
|
|
rewriteRootURL: (rootUrl: string, responseURL?: string) => string;
|
|
|
createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
|
|
@@ -596,8 +596,8 @@ declare module BABYLON.GLTF1 {
|
|
|
};
|
|
|
static RegisterExtension(extension: GLTFLoaderExtension): void;
|
|
|
dispose(): void;
|
|
|
- importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): boolean;
|
|
|
- loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onProgress: (event: ProgressEvent) => void, onError: (message: string) => void): void;
|
|
|
+ importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress: (event: SceneLoaderProgressEvent) => void, onError: (message: string) => void): boolean;
|
|
|
+ loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess: () => void, onProgress: (event: SceneLoaderProgressEvent) => void, onError: (message: string) => void): void;
|
|
|
private _loadShadersAsync(gltfRuntime, onload);
|
|
|
private _loadBuffersAsync(gltfRuntime, onLoad, onProgress?);
|
|
|
private _createNodes(gltfRuntime);
|
|
@@ -1024,11 +1024,10 @@ declare module BABYLON.GLTF2 {
|
|
|
[name: string]: GLTFLoaderExtension;
|
|
|
};
|
|
|
static RegisterExtension(extension: GLTFLoaderExtension): void;
|
|
|
- private static _createProgressEvent;
|
|
|
constructor(parent: GLTFFileLoader);
|
|
|
dispose(): void;
|
|
|
- importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress?: (event: ProgressEvent) => void, onError?: (message: string, exception?: any) => void): void;
|
|
|
- loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: () => void, onProgress?: (event: ProgressEvent) => void, onError?: (message: string, exception?: any) => void): void;
|
|
|
+ importMeshAsync(meshesNames: any, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onProgress?: (event: SceneLoaderProgressEvent) => void, onError?: (message: string, exception?: any) => void): void;
|
|
|
+ loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onSuccess?: () => void, onProgress?: (event: SceneLoaderProgressEvent) => void, onError?: (message: string, exception?: any) => void): void;
|
|
|
private _loadAsync(nodeNames, scene, data, rootUrl, onSuccess?, onProgress?, onError?);
|
|
|
private _onProgress();
|
|
|
_executeWhenRenderReady(func: () => void): void;
|