babylonjs-loaders 8.5.0 → 8.6.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.
@@ -139,7 +139,7 @@ export interface IGLTFLoaderData {
139
139
  /**
140
140
  * The object that represents the glTF JSON.
141
141
  */
142
- json: Object;
142
+ json: object;
143
143
  /**
144
144
  * The BIN chunk of a binary glTF.
145
145
  */
@@ -525,7 +525,7 @@ export class GLTFFileLoader extends GLTFLoaderOptions implements IDisposable, IS
525
525
  /**
526
526
  * @internal
527
527
  */
528
- directLoad(scene: Scene, data: string): Promise<Object>;
528
+ directLoad(scene: Scene, data: string): Promise<object>;
529
529
  /**
530
530
  * The callback that allows custom handling of the root url based on the response url.
531
531
  * @param rootUrl the original root url
@@ -1946,7 +1946,7 @@ export class MSFT_sRGBFactors implements IGLTFLoaderExtension {
1946
1946
  constructor(loader: GLTFLoader);
1947
1947
  /** @internal */
1948
1948
  dispose(): void;
1949
- /** @internal */
1949
+ /** @internal*/
1950
1950
  loadMaterialPropertiesAsync(context: string, material: IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
1951
1951
  }
1952
1952
 
@@ -4257,7 +4257,7 @@ export interface IGLTFProperty {
4257
4257
  extensions?: {
4258
4258
  [key: string]: any;
4259
4259
  };
4260
- extras?: Object;
4260
+ extras?: object;
4261
4261
  }
4262
4262
  /** @internal */
4263
4263
  export interface IGLTFChildRootProperty extends IGLTFProperty {
@@ -4313,7 +4313,7 @@ export interface IGLTFTechniqueParameter {
4313
4313
  /** @internal */
4314
4314
  export interface IGLTFTechniqueCommonProfile {
4315
4315
  lightingModel: string;
4316
- texcoordBindings: Object;
4316
+ texcoordBindings: object;
4317
4317
  parameters?: Array<any>;
4318
4318
  }
4319
4319
  /** @internal */
@@ -4539,7 +4539,7 @@ export interface IGLTFRuntime {
4539
4539
  skins: {
4540
4540
  [key: string]: IGLTFSkins;
4541
4541
  };
4542
- currentScene?: Object;
4542
+ currentScene?: object;
4543
4543
  scenes: {
4544
4544
  [key: string]: IGLTFScene;
4545
4545
  };
@@ -4929,8 +4929,8 @@ export class SPLATFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPlu
4929
4929
  importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
4930
4930
  private static _BuildPointCloud;
4931
4931
  private static _BuildMesh;
4932
- private _parseSPZ;
4933
- private _parse;
4932
+ private _parseSPZAsync;
4933
+ private _parseAsync;
4934
4934
  /**
4935
4935
  * Load into an asset container.
4936
4936
  * @param scene The scene to load into
@@ -5332,7 +5332,7 @@ export class OBJFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPlugi
5332
5332
  * @param rootUrl defines the path to the folder
5333
5333
  * @returns the list of loaded meshes
5334
5334
  */
5335
- private _parseSolid;
5335
+ private _parseSolidAsync;
5336
5336
  }
5337
5337
 
5338
5338
  }
@@ -5386,6 +5386,116 @@ export * from "babylonjs-loaders/OBJ/objLoadingOptions";
5386
5386
  export * from "babylonjs-loaders/OBJ/solidParser";
5387
5387
  export * from "babylonjs-loaders/OBJ/objFileLoader";
5388
5388
 
5389
+ }
5390
+ declare module "babylonjs-loaders/BVH/index" {
5391
+ export * from "babylonjs-loaders/BVH/bvhLoader";
5392
+
5393
+ }
5394
+ declare module "babylonjs-loaders/BVH/bvhLoadingOptions" {
5395
+ /**
5396
+ * Options for loading BVH files
5397
+ */
5398
+ export type BVHLoadingOptions = {
5399
+ /**
5400
+ * Defines the loop mode of the animation to load.
5401
+ */
5402
+ loopMode: number;
5403
+ };
5404
+
5405
+ }
5406
+ declare module "babylonjs-loaders/BVH/bvhLoader" {
5407
+ import { Skeleton } from "babylonjs/Bones/skeleton";
5408
+ import { Scene } from "babylonjs/scene";
5409
+ import { BVHLoadingOptions } from "babylonjs-loaders/BVH/bvhLoadingOptions";
5410
+ /**
5411
+ * Reads a BVH file, returns a skeleton
5412
+ * @param text - The BVH file content
5413
+ * @param scene - The scene to add the skeleton to
5414
+ * @param loadingOptions - The loading options
5415
+ * @returns The skeleton
5416
+ */
5417
+ export function ReadBvh(text: string, scene: Scene, loadingOptions: BVHLoadingOptions): Skeleton;
5418
+
5419
+ }
5420
+ declare module "babylonjs-loaders/BVH/bvhFileLoader.metadata" {
5421
+ export const BVHFileLoaderMetadata: {
5422
+ readonly name: "bvh";
5423
+ readonly extensions: {
5424
+ readonly ".bvh": {
5425
+ readonly isBinary: false;
5426
+ };
5427
+ };
5428
+ };
5429
+
5430
+ }
5431
+ declare module "babylonjs-loaders/BVH/bvhFileLoader" {
5432
+ import { ISceneLoaderPluginAsync, ISceneLoaderPluginFactory, ISceneLoaderAsyncResult, SceneLoaderPluginOptions } from "babylonjs/Loading/sceneLoader";
5433
+ import { AssetContainer } from "babylonjs/assetContainer";
5434
+ import { Scene } from "babylonjs/scene";
5435
+ import { BVHLoadingOptions } from "babylonjs-loaders/BVH/bvhLoadingOptions";
5436
+ import { BVHFileLoaderMetadata } from "babylonjs-loaders/BVH/bvhFileLoader.metadata";
5437
+ module "babylonjs/Loading/sceneLoader" {
5438
+ interface SceneLoaderPluginOptions {
5439
+ /**
5440
+ * Defines options for the bvh loader.
5441
+ */
5442
+ [BVHFileLoaderMetadata.name]: Partial<BVHLoadingOptions>;
5443
+ }
5444
+ }
5445
+ /**
5446
+ * @experimental
5447
+ * BVH file type loader.
5448
+ * This is a babylon scene loader plugin.
5449
+ */
5450
+ export class BVHFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
5451
+ /**
5452
+ * Name of the loader ("bvh")
5453
+ */
5454
+ readonly name: "bvh";
5455
+ /** @internal */
5456
+ readonly extensions: {
5457
+ readonly ".bvh": {
5458
+ readonly isBinary: false;
5459
+ };
5460
+ };
5461
+ private readonly _loadingOptions;
5462
+ /**
5463
+ * Creates loader for bvh motion files
5464
+ * @param loadingOptions - Options for the bvh loader
5465
+ */
5466
+ constructor(loadingOptions?: Partial<Readonly<BVHLoadingOptions>>);
5467
+ private static get _DefaultLoadingOptions();
5468
+ /** @internal */
5469
+ createPlugin(options: SceneLoaderPluginOptions): ISceneLoaderPluginAsync;
5470
+ /**
5471
+ * If the data string can be loaded directly.
5472
+ * @returns if the data can be loaded directly
5473
+ */
5474
+ canDirectLoad(): boolean;
5475
+ /**
5476
+ * Imports from the loaded gaussian splatting data and adds them to the scene
5477
+ * @param _meshesNames a string or array of strings of the mesh names that should be loaded from the file
5478
+ * @param scene the scene the meshes should be added to
5479
+ * @param data the bvh data to load
5480
+ * @returns a promise containing the loaded skeletons and animations
5481
+ */
5482
+ importMeshAsync(_meshesNames: string | readonly string[] | null | undefined, scene: Scene, data: unknown): Promise<ISceneLoaderAsyncResult>;
5483
+ /**
5484
+ * Imports all objects from the loaded bvh data and adds them to the scene
5485
+ * @param scene the scene the objects should be added to
5486
+ * @param data the bvh data to load
5487
+ * @returns a promise which completes when objects have been loaded to the scene
5488
+ */
5489
+ loadAsync(scene: Scene, data: unknown): Promise<void>;
5490
+ /**
5491
+ * Load into an asset container.
5492
+ * @param scene The scene to load into
5493
+ * @param data The data to import
5494
+ * @returns The loaded asset container
5495
+ */
5496
+ loadAssetContainerAsync(scene: Scene, data: unknown): Promise<AssetContainer>;
5497
+ }
5498
+
5389
5499
  }
5390
5500
  declare module "babylonjs-loaders/legacy/legacy" {
5391
5501
  export * from "babylonjs-loaders/index";
@@ -5548,7 +5658,7 @@ declare module BABYLON {
5548
5658
  /**
5549
5659
  * The object that represents the glTF JSON.
5550
5660
  */
5551
- json: Object;
5661
+ json: object;
5552
5662
  /**
5553
5663
  * The BIN chunk of a binary glTF.
5554
5664
  */
@@ -5934,7 +6044,7 @@ declare module BABYLON {
5934
6044
  /**
5935
6045
  * @internal
5936
6046
  */
5937
- directLoad(scene: Scene, data: string): Promise<Object>;
6047
+ directLoad(scene: Scene, data: string): Promise<object>;
5938
6048
  /**
5939
6049
  * The callback that allows custom handling of the root url based on the response url.
5940
6050
  * @param rootUrl the original root url
@@ -7282,7 +7392,7 @@ declare module BABYLON.GLTF2.Loader.Extensions {
7282
7392
  constructor(loader: BABYLON.GLTF2.GLTFLoader);
7283
7393
  /** @internal */
7284
7394
  dispose(): void;
7285
- /** @internal */
7395
+ /** @internal*/
7286
7396
  loadMaterialPropertiesAsync(context: string, material: BABYLON.GLTF2.Loader.IMaterial, babylonMaterial: Material): Nullable<Promise<void>>;
7287
7397
  }
7288
7398
 
@@ -9532,7 +9642,7 @@ declare module BABYLON.GLTF1 {
9532
9642
  extensions?: {
9533
9643
  [key: string]: any;
9534
9644
  };
9535
- extras?: Object;
9645
+ extras?: object;
9536
9646
  }
9537
9647
  /** @internal */
9538
9648
  export interface IGLTFChildRootProperty extends IGLTFProperty {
@@ -9588,7 +9698,7 @@ declare module BABYLON.GLTF1 {
9588
9698
  /** @internal */
9589
9699
  export interface IGLTFTechniqueCommonProfile {
9590
9700
  lightingModel: string;
9591
- texcoordBindings: Object;
9701
+ texcoordBindings: object;
9592
9702
  parameters?: Array<any>;
9593
9703
  }
9594
9704
  /** @internal */
@@ -9814,7 +9924,7 @@ declare module BABYLON.GLTF1 {
9814
9924
  skins: {
9815
9925
  [key: string]: IGLTFSkins;
9816
9926
  };
9817
- currentScene?: Object;
9927
+ currentScene?: object;
9818
9928
  scenes: {
9819
9929
  [key: string]: IGLTFScene;
9820
9930
  };
@@ -10185,8 +10295,8 @@ declare module BABYLON {
10185
10295
  importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, onProgress?: (event: ISceneLoaderProgressEvent) => void, fileName?: string): Promise<ISceneLoaderAsyncResult>;
10186
10296
  private static _BuildPointCloud;
10187
10297
  private static _BuildMesh;
10188
- private _parseSPZ;
10189
- private _parse;
10298
+ private _parseSPZAsync;
10299
+ private _parseAsync;
10190
10300
  /**
10191
10301
  * Load into an asset container.
10192
10302
  * @param scene The scene to load into
@@ -10567,7 +10677,7 @@ declare module BABYLON {
10567
10677
  * @param rootUrl defines the path to the folder
10568
10678
  * @returns the list of loaded meshes
10569
10679
  */
10570
- private _parseSolid;
10680
+ private _parseSolidAsync;
10571
10681
  }
10572
10682
 
10573
10683
 
@@ -10614,6 +10724,100 @@ declare module BABYLON {
10614
10724
 
10615
10725
 
10616
10726
 
10727
+ /**
10728
+ * Options for loading BVH files
10729
+ */
10730
+ export type BVHLoadingOptions = {
10731
+ /**
10732
+ * Defines the loop mode of the animation to load.
10733
+ */
10734
+ loopMode: number;
10735
+ };
10736
+
10737
+
10738
+ /**
10739
+ * Reads a BVH file, returns a skeleton
10740
+ * @param text - The BVH file content
10741
+ * @param scene - The scene to add the skeleton to
10742
+ * @param loadingOptions - The loading options
10743
+ * @returns The skeleton
10744
+ */
10745
+ export function ReadBvh(text: string, scene: Scene, loadingOptions: BVHLoadingOptions): Skeleton;
10746
+
10747
+
10748
+ export var BVHFileLoaderMetadata: {
10749
+ readonly name: "bvh";
10750
+ readonly extensions: {
10751
+ readonly ".bvh": {
10752
+ readonly isBinary: false;
10753
+ };
10754
+ };
10755
+ };
10756
+
10757
+
10758
+ interface SceneLoaderPluginOptions {
10759
+ /**
10760
+ * Defines options for the bvh loader.
10761
+ */
10762
+ [BVHFileLoaderMetadata.name]: Partial<BVHLoadingOptions>;
10763
+ }
10764
+ /**
10765
+ * @experimental
10766
+ * BVH file type loader.
10767
+ * This is a babylon scene loader plugin.
10768
+ */
10769
+ export class BVHFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
10770
+ /**
10771
+ * Name of the loader ("bvh")
10772
+ */
10773
+ readonly name: "bvh";
10774
+ /** @internal */
10775
+ readonly extensions: {
10776
+ readonly ".bvh": {
10777
+ readonly isBinary: false;
10778
+ };
10779
+ };
10780
+ private readonly _loadingOptions;
10781
+ /**
10782
+ * Creates loader for bvh motion files
10783
+ * @param loadingOptions - Options for the bvh loader
10784
+ */
10785
+ constructor(loadingOptions?: Partial<Readonly<BVHLoadingOptions>>);
10786
+ private static get _DefaultLoadingOptions();
10787
+ /** @internal */
10788
+ createPlugin(options: SceneLoaderPluginOptions): ISceneLoaderPluginAsync;
10789
+ /**
10790
+ * If the data string can be loaded directly.
10791
+ * @returns if the data can be loaded directly
10792
+ */
10793
+ canDirectLoad(): boolean;
10794
+ /**
10795
+ * Imports from the loaded gaussian splatting data and adds them to the scene
10796
+ * @param _meshesNames a string or array of strings of the mesh names that should be loaded from the file
10797
+ * @param scene the scene the meshes should be added to
10798
+ * @param data the bvh data to load
10799
+ * @returns a promise containing the loaded skeletons and animations
10800
+ */
10801
+ importMeshAsync(_meshesNames: string | readonly string[] | null | undefined, scene: Scene, data: unknown): Promise<ISceneLoaderAsyncResult>;
10802
+ /**
10803
+ * Imports all objects from the loaded bvh data and adds them to the scene
10804
+ * @param scene the scene the objects should be added to
10805
+ * @param data the bvh data to load
10806
+ * @returns a promise which completes when objects have been loaded to the scene
10807
+ */
10808
+ loadAsync(scene: Scene, data: unknown): Promise<void>;
10809
+ /**
10810
+ * Load into an asset container.
10811
+ * @param scene The scene to load into
10812
+ * @param data The data to import
10813
+ * @returns The loaded asset container
10814
+ */
10815
+ loadAssetContainerAsync(scene: Scene, data: unknown): Promise<AssetContainer>;
10816
+ }
10817
+
10818
+
10819
+
10820
+
10617
10821
 
10618
10822
 
10619
10823
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-loaders",
3
- "version": "8.5.0",
3
+ "version": "8.6.0",
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": "^8.5.0",
19
- "babylonjs-gltf2interface": "^8.5.0"
18
+ "babylonjs": "^8.6.0",
19
+ "babylonjs-gltf2interface": "^8.6.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@dev/build-tools": "1.0.0",