babylonjs-loaders 7.10.2 → 7.10.3

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.
@@ -2367,7 +2367,7 @@ export class ArrayItem {
2367
2367
  /** @internal */
2368
2368
  export interface IAnimationTargetInfo {
2369
2369
  /** @internal */
2370
- target: any;
2370
+ target: unknown;
2371
2371
  /** @internal */
2372
2372
  properties: Array<AnimationPropertyInfo>;
2373
2373
  }
@@ -2376,7 +2376,7 @@ export interface IAnimationTargetInfo {
2376
2376
  */
2377
2377
  export class GLTFLoader implements IGLTFLoader {
2378
2378
  /** @internal */
2379
- readonly _completePromises: Promise<any>[];
2379
+ readonly _completePromises: Promise<unknown>[];
2380
2380
  /** @internal */
2381
2381
  _assetContainer: Nullable<AssetContainer>;
2382
2382
  /** Storage */
@@ -2447,7 +2447,7 @@ export class GLTFLoader implements IGLTFLoader {
2447
2447
  /**
2448
2448
  * @internal
2449
2449
  */
2450
- importMeshAsync(meshesNames: any, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
2450
+ importMeshAsync(meshesNames: string | readonly string[] | null | undefined, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
2451
2451
  /**
2452
2452
  * @internal
2453
2453
  */
@@ -2630,7 +2630,7 @@ export class GLTFLoader implements IGLTFLoader {
2630
2630
  /**
2631
2631
  * @internal
2632
2632
  */
2633
- _createTextureAsync(context: string, sampler: ISampler, image: IImage, assign?: (babylonTexture: BaseTexture) => void, textureLoaderOptions?: any, useSRGBBuffer?: boolean): Promise<BaseTexture>;
2633
+ _createTextureAsync(context: string, sampler: ISampler, image: IImage, assign?: (babylonTexture: BaseTexture) => void, textureLoaderOptions?: unknown, useSRGBBuffer?: boolean): Promise<BaseTexture>;
2634
2634
  private _loadSampler;
2635
2635
  /**
2636
2636
  * Loads a glTF image.
@@ -2693,7 +2693,7 @@ export class GLTFLoader implements IGLTFLoader {
2693
2693
  * @param actionAsync The action to run
2694
2694
  * @returns The promise returned by actionAsync or null if the extension does not exist
2695
2695
  */
2696
- static LoadExtensionAsync<TExtension = any, TResult = void>(context: string, property: IProperty, extensionName: string, actionAsync: (extensionContext: string, extension: TExtension) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
2696
+ static LoadExtensionAsync<TExtension = unknown, TResult = void>(context: string, property: IProperty, extensionName: string, actionAsync: (extensionContext: string, extension: TExtension) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
2697
2697
  /**
2698
2698
  * Helper method called by a loader extension to load a glTF extra.
2699
2699
  * @param context The context when loading the asset
@@ -2702,7 +2702,7 @@ export class GLTFLoader implements IGLTFLoader {
2702
2702
  * @param actionAsync The action to run
2703
2703
  * @returns The promise returned by actionAsync or null if the extra does not exist
2704
2704
  */
2705
- static LoadExtraAsync<TExtra = any, TResult = void>(context: string, property: IProperty, extensionName: string, actionAsync: (extraContext: string, extra: TExtra) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
2705
+ static LoadExtraAsync<TExtra = unknown, TResult = void>(context: string, property: IProperty, extensionName: string, actionAsync: (extraContext: string, extra: TExtra) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
2706
2706
  /**
2707
2707
  * Checks for presence of an extension.
2708
2708
  * @param name The name of the extension to check
@@ -3215,7 +3215,7 @@ import { Camera } from "babylonjs/Cameras/camera";
3215
3215
  import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
3216
3216
  import { Material } from "babylonjs/Materials/material";
3217
3217
  import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
3218
- import { ISceneLoaderPluginFactory, ISceneLoaderPlugin, ISceneLoaderPluginAsync, ISceneLoaderProgressEvent, ISceneLoaderPluginExtensions, ISceneLoaderAsyncResult } from "babylonjs/Loading/sceneLoader";
3218
+ import { ISceneLoaderPluginFactory, ISceneLoaderPluginAsync, ISceneLoaderProgressEvent, ISceneLoaderPluginExtensions, ISceneLoaderAsyncResult } from "babylonjs/Loading/sceneLoader";
3219
3219
  import { AssetContainer } from "babylonjs/assetContainer";
3220
3220
  import { Scene, IDisposable } from "babylonjs/scene";
3221
3221
  import { WebRequest } from "babylonjs/Misc/webRequest";
@@ -3303,7 +3303,7 @@ export enum GLTFLoaderState {
3303
3303
  }
3304
3304
  /** @internal */
3305
3305
  export interface IGLTFLoader extends IDisposable {
3306
- importMeshAsync: (meshesNames: any, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string) => Promise<ISceneLoaderAsyncResult>;
3306
+ importMeshAsync: (meshesNames: string | readonly string[] | null | undefined, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string) => Promise<ISceneLoaderAsyncResult>;
3307
3307
  loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string) => Promise<void>;
3308
3308
  }
3309
3309
  /**
@@ -3542,20 +3542,20 @@ export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISc
3542
3542
  /**
3543
3543
  * @internal
3544
3544
  */
3545
- loadFile(scene: Scene, fileOrUrl: File | string | ArrayBufferView, rootUrl: string, onSuccess: (data: any, responseURL?: string) => void, onProgress?: (ev: ISceneLoaderProgressEvent) => void, useArrayBuffer?: boolean, onError?: (request?: WebRequest, exception?: LoadFileError) => void, name?: string): Nullable<IFileRequest>;
3545
+ loadFile(scene: Scene, fileOrUrl: File | string | ArrayBufferView, rootUrl: string, onSuccess: (data: unknown, responseURL?: string) => void, onProgress?: (ev: ISceneLoaderProgressEvent) => void, useArrayBuffer?: boolean, onError?: (request?: WebRequest, exception?: LoadFileError) => void, name?: string): Nullable<IFileRequest>;
3546
3546
  private _loadBinary;
3547
3547
  /**
3548
3548
  * @internal
3549
3549
  */
3550
- importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
3550
+ importMeshAsync(meshesNames: string | readonly string[] | null | undefined, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
3551
3551
  /**
3552
3552
  * @internal
3553
3553
  */
3554
- loadAsync(scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<void>;
3554
+ loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<void>;
3555
3555
  /**
3556
3556
  * @internal
3557
3557
  */
3558
- loadAssetContainerAsync(scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<AssetContainer>;
3558
+ loadAssetContainerAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<AssetContainer>;
3559
3559
  /**
3560
3560
  * @internal
3561
3561
  */
@@ -3563,7 +3563,7 @@ export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISc
3563
3563
  /**
3564
3564
  * @internal
3565
3565
  */
3566
- directLoad(scene: Scene, data: string): Promise<any>;
3566
+ directLoad(scene: Scene, data: string): Promise<Object>;
3567
3567
  /**
3568
3568
  * The callback that allows custom handling of the root url based on the response url.
3569
3569
  * @param rootUrl the original root url
@@ -3572,7 +3572,7 @@ export class GLTFFileLoader implements IDisposable, ISceneLoaderPluginAsync, ISc
3572
3572
  */
3573
3573
  rewriteRootURL?(rootUrl: string, responseURL?: string): string;
3574
3574
  /** @internal */
3575
- createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
3575
+ createPlugin(): ISceneLoaderPluginAsync;
3576
3576
  /**
3577
3577
  * The loader state or null if the loader is not active.
3578
3578
  */
@@ -6594,7 +6594,7 @@ declare module BABYLON.GLTF2 {
6594
6594
  /** @internal */
6595
6595
  export interface IAnimationTargetInfo {
6596
6596
  /** @internal */
6597
- target: any;
6597
+ target: unknown;
6598
6598
  /** @internal */
6599
6599
  properties: Array<BABYLON.GLTF2.AnimationPropertyInfo>;
6600
6600
  }
@@ -6603,7 +6603,7 @@ declare module BABYLON.GLTF2 {
6603
6603
  */
6604
6604
  export class GLTFLoader implements IGLTFLoader {
6605
6605
  /** @internal */
6606
- readonly _completePromises: Promise<any>[];
6606
+ readonly _completePromises: Promise<unknown>[];
6607
6607
  /** @internal */
6608
6608
  _assetContainer: Nullable<AssetContainer>;
6609
6609
  /** Storage */
@@ -6674,7 +6674,7 @@ declare module BABYLON.GLTF2 {
6674
6674
  /**
6675
6675
  * @internal
6676
6676
  */
6677
- importMeshAsync(meshesNames: any, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
6677
+ importMeshAsync(meshesNames: string | readonly string[] | null | undefined, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
6678
6678
  /**
6679
6679
  * @internal
6680
6680
  */
@@ -6857,7 +6857,7 @@ declare module BABYLON.GLTF2 {
6857
6857
  /**
6858
6858
  * @internal
6859
6859
  */
6860
- _createTextureAsync(context: string, sampler: BABYLON.GLTF2.Loader.ISampler, image: BABYLON.GLTF2.Loader.IImage, assign?: (babylonTexture: BaseTexture) => void, textureLoaderOptions?: any, useSRGBBuffer?: boolean): Promise<BaseTexture>;
6860
+ _createTextureAsync(context: string, sampler: BABYLON.GLTF2.Loader.ISampler, image: BABYLON.GLTF2.Loader.IImage, assign?: (babylonTexture: BaseTexture) => void, textureLoaderOptions?: unknown, useSRGBBuffer?: boolean): Promise<BaseTexture>;
6861
6861
  private _loadSampler;
6862
6862
  /**
6863
6863
  * Loads a glTF image.
@@ -6920,7 +6920,7 @@ declare module BABYLON.GLTF2 {
6920
6920
  * @param actionAsync The action to run
6921
6921
  * @returns The promise returned by actionAsync or null if the extension does not exist
6922
6922
  */
6923
- static LoadExtensionAsync<TExtension = any, TResult = void>(context: string, property: BABYLON.GLTF2.IProperty, extensionName: string, actionAsync: (extensionContext: string, extension: TExtension) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
6923
+ static LoadExtensionAsync<TExtension = unknown, TResult = void>(context: string, property: BABYLON.GLTF2.IProperty, extensionName: string, actionAsync: (extensionContext: string, extension: TExtension) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
6924
6924
  /**
6925
6925
  * Helper method called by a loader extension to load a glTF extra.
6926
6926
  * @param context The context when loading the asset
@@ -6929,7 +6929,7 @@ declare module BABYLON.GLTF2 {
6929
6929
  * @param actionAsync The action to run
6930
6930
  * @returns The promise returned by actionAsync or null if the extra does not exist
6931
6931
  */
6932
- static LoadExtraAsync<TExtra = any, TResult = void>(context: string, property: BABYLON.GLTF2.IProperty, extensionName: string, actionAsync: (extraContext: string, extra: TExtra) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
6932
+ static LoadExtraAsync<TExtra = unknown, TResult = void>(context: string, property: BABYLON.GLTF2.IProperty, extensionName: string, actionAsync: (extraContext: string, extra: TExtra) => Nullable<Promise<TResult>>): Nullable<Promise<TResult>>;
6933
6933
  /**
6934
6934
  * Checks for presence of an extension.
6935
6935
  * @param name The name of the extension to check
@@ -7503,7 +7503,7 @@ declare module BABYLON {
7503
7503
  }
7504
7504
  /** @internal */
7505
7505
  export interface IGLTFLoader extends IDisposable {
7506
- importMeshAsync: (meshesNames: any, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string) => Promise<ISceneLoaderAsyncResult>;
7506
+ importMeshAsync: (meshesNames: string | readonly string[] | null | undefined, scene: Scene, container: Nullable<AssetContainer>, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string) => Promise<ISceneLoaderAsyncResult>;
7507
7507
  loadAsync: (scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string) => Promise<void>;
7508
7508
  }
7509
7509
  /**
@@ -7742,20 +7742,20 @@ declare module BABYLON {
7742
7742
  /**
7743
7743
  * @internal
7744
7744
  */
7745
- loadFile(scene: Scene, fileOrUrl: File | string | ArrayBufferView, rootUrl: string, onSuccess: (data: any, responseURL?: string) => void, onProgress?: (ev: ISceneLoaderProgressEvent) => void, useArrayBuffer?: boolean, onError?: (request?: WebRequest, exception?: LoadFileError) => void, name?: string): Nullable<IFileRequest>;
7745
+ loadFile(scene: Scene, fileOrUrl: File | string | ArrayBufferView, rootUrl: string, onSuccess: (data: unknown, responseURL?: string) => void, onProgress?: (ev: ISceneLoaderProgressEvent) => void, useArrayBuffer?: boolean, onError?: (request?: WebRequest, exception?: LoadFileError) => void, name?: string): Nullable<IFileRequest>;
7746
7746
  private _loadBinary;
7747
7747
  /**
7748
7748
  * @internal
7749
7749
  */
7750
- importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
7750
+ importMeshAsync(meshesNames: string | readonly string[] | null | undefined, scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
7751
7751
  /**
7752
7752
  * @internal
7753
7753
  */
7754
- loadAsync(scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<void>;
7754
+ loadAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<void>;
7755
7755
  /**
7756
7756
  * @internal
7757
7757
  */
7758
- loadAssetContainerAsync(scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<AssetContainer>;
7758
+ loadAssetContainerAsync(scene: Scene, data: IGLTFLoaderData, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<AssetContainer>;
7759
7759
  /**
7760
7760
  * @internal
7761
7761
  */
@@ -7763,7 +7763,7 @@ declare module BABYLON {
7763
7763
  /**
7764
7764
  * @internal
7765
7765
  */
7766
- directLoad(scene: Scene, data: string): Promise<any>;
7766
+ directLoad(scene: Scene, data: string): Promise<Object>;
7767
7767
  /**
7768
7768
  * The callback that allows custom handling of the root url based on the response url.
7769
7769
  * @param rootUrl the original root url
@@ -7772,7 +7772,7 @@ declare module BABYLON {
7772
7772
  */
7773
7773
  rewriteRootURL?(rootUrl: string, responseURL?: string): string;
7774
7774
  /** @internal */
7775
- createPlugin(): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
7775
+ createPlugin(): ISceneLoaderPluginAsync;
7776
7776
  /**
7777
7777
  * The loader state or null if the loader is not active.
7778
7778
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-loaders",
3
- "version": "7.10.2",
3
+ "version": "7.10.3",
4
4
  "main": "babylonjs.loaders.js",
5
5
  "types": "babylonjs.loaders.module.d.ts",
6
6
  "files": [
@@ -15,8 +15,8 @@
15
15
  "test:escheck": "es-check es6 ./babylonjs.loaders.js"
16
16
  },
17
17
  "dependencies": {
18
- "babylonjs": "^7.10.2",
19
- "babylonjs-gltf2interface": "^7.10.2"
18
+ "babylonjs": "^7.10.3",
19
+ "babylonjs-gltf2interface": "^7.10.3"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@dev/build-tools": "1.0.0",