babylonjs-loaders 6.33.0 → 6.33.2
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/babylon.glTF2FileLoader.js +695 -3
- package/babylon.glTF2FileLoader.min.js +1 -1
- package/babylon.glTF2FileLoader.min.js.map +1 -1
- package/babylon.glTFFileLoader.js +695 -3
- package/babylon.glTFFileLoader.min.js +1 -1
- package/babylon.glTFFileLoader.min.js.map +1 -1
- package/babylonjs.loaders.d.ts +165 -0
- package/babylonjs.loaders.js +943 -3
- package/babylonjs.loaders.min.js +1 -1
- package/babylonjs.loaders.min.js.map +1 -1
- package/babylonjs.loaders.module.d.ts +313 -0
- package/package.json +3 -3
|
@@ -877,8 +877,58 @@ export * from "babylonjs-loaders/glTF/2.0/Extensions/MSFT_audio_emitter";
|
|
|
877
877
|
export * from "babylonjs-loaders/glTF/2.0/Extensions/MSFT_lod";
|
|
878
878
|
export * from "babylonjs-loaders/glTF/2.0/Extensions/MSFT_minecraftMesh";
|
|
879
879
|
export * from "babylonjs-loaders/glTF/2.0/Extensions/MSFT_sRGBFactors";
|
|
880
|
+
export * from "babylonjs-loaders/glTF/2.0/Extensions/KHR_interactivity";
|
|
880
881
|
export * from "babylonjs-loaders/glTF/2.0/Extensions/ExtrasAsMetadata";
|
|
881
882
|
|
|
883
|
+
}
|
|
884
|
+
declare module "babylonjs-loaders/glTF/2.0/Extensions/interactivityFunctions" {
|
|
885
|
+
import { IKHRInteractivity } from "babylonjs-gltf2interface";
|
|
886
|
+
import { ISerializedFlowGraph } from "babylonjs/FlowGraph/typeDefinitions";
|
|
887
|
+
/**
|
|
888
|
+
* @internal
|
|
889
|
+
* Converts a glTF Interactivity Extension to a serialized flow graph.
|
|
890
|
+
* @param gltf the interactivity data
|
|
891
|
+
* @returns a serialized flow graph
|
|
892
|
+
*/
|
|
893
|
+
export function convertGLTFToSerializedFlowGraph(gltf: IKHRInteractivity): ISerializedFlowGraph;
|
|
894
|
+
|
|
895
|
+
}
|
|
896
|
+
declare module "babylonjs-loaders/glTF/2.0/Extensions/interactivityPathCameraExtensions" {
|
|
897
|
+
import { FlowGraphPath } from "babylonjs/FlowGraph/flowGraphPath";
|
|
898
|
+
import { FlowGraphContext } from "babylonjs/FlowGraph/flowGraphContext";
|
|
899
|
+
export const camerasExtension: {
|
|
900
|
+
shouldProcess(path: FlowGraphPath): boolean;
|
|
901
|
+
processGet(path: FlowGraphPath, context: FlowGraphContext): any;
|
|
902
|
+
processSet(path: FlowGraphPath, context: FlowGraphContext, value: any): void;
|
|
903
|
+
};
|
|
904
|
+
|
|
905
|
+
}
|
|
906
|
+
declare module "babylonjs-loaders/glTF/2.0/Extensions/interactivityPathExtensions" {
|
|
907
|
+
import { IPathExtension } from "babylonjs/FlowGraph/flowGraphPath";
|
|
908
|
+
export const interactivityPathExensions: IPathExtension[];
|
|
909
|
+
|
|
910
|
+
}
|
|
911
|
+
declare module "babylonjs-loaders/glTF/2.0/Extensions/interactivityPathMaterialExtensions" {
|
|
912
|
+
import { FlowGraphPath } from "babylonjs/FlowGraph/flowGraphPath";
|
|
913
|
+
import { FlowGraphContext } from "babylonjs/FlowGraph/flowGraphContext";
|
|
914
|
+
export const pbrMaterialExtension: {
|
|
915
|
+
shouldProcess(path: FlowGraphPath): boolean;
|
|
916
|
+
processGet(path: FlowGraphPath, context: FlowGraphContext): any;
|
|
917
|
+
processSet(path: FlowGraphPath, context: FlowGraphContext, value: any): void;
|
|
918
|
+
};
|
|
919
|
+
|
|
920
|
+
}
|
|
921
|
+
declare module "babylonjs-loaders/glTF/2.0/Extensions/interactivityPathTransformNodeExtensions" {
|
|
922
|
+
import { IPathExtension } from "babylonjs/FlowGraph/flowGraphPath";
|
|
923
|
+
export const transformNodeExtension: IPathExtension;
|
|
924
|
+
|
|
925
|
+
}
|
|
926
|
+
declare module "babylonjs-loaders/glTF/2.0/Extensions/interactivityUtils" {
|
|
927
|
+
export const gltfToFlowGraphTypeMap: {
|
|
928
|
+
[key: string]: string;
|
|
929
|
+
};
|
|
930
|
+
export const gltfTypeToBabylonType: any;
|
|
931
|
+
|
|
882
932
|
}
|
|
883
933
|
declare module "babylonjs-loaders/glTF/2.0/Extensions/KHR_animation_pointer" {
|
|
884
934
|
import { IGLTFLoaderExtension } from "babylonjs-loaders/glTF/2.0/glTFLoaderExtension";
|
|
@@ -1126,6 +1176,32 @@ export class KHR_draco_mesh_compression implements IGLTFLoaderExtension {
|
|
|
1126
1176
|
_loadVertexDataAsync(context: string, primitive: IMeshPrimitive, babylonMesh: Mesh): Nullable<Promise<Geometry>>;
|
|
1127
1177
|
}
|
|
1128
1178
|
|
|
1179
|
+
}
|
|
1180
|
+
declare module "babylonjs-loaders/glTF/2.0/Extensions/KHR_interactivity" {
|
|
1181
|
+
import { GLTFLoader } from "babylonjs-loaders/glTF/2.0/glTFLoader";
|
|
1182
|
+
import { IGLTFLoaderExtension } from "babylonjs-loaders/glTF/2.0/glTFLoaderExtension";
|
|
1183
|
+
/**
|
|
1184
|
+
* Loader extension for KHR_interactivity
|
|
1185
|
+
*/
|
|
1186
|
+
export class KHR_interactivity implements IGLTFLoaderExtension {
|
|
1187
|
+
private _loader;
|
|
1188
|
+
/**
|
|
1189
|
+
* The name of this extension.
|
|
1190
|
+
*/
|
|
1191
|
+
readonly name: string;
|
|
1192
|
+
/**
|
|
1193
|
+
* Defines whether this extension is enabled.
|
|
1194
|
+
*/
|
|
1195
|
+
enabled: boolean;
|
|
1196
|
+
/**
|
|
1197
|
+
* @internal
|
|
1198
|
+
* @param _loader
|
|
1199
|
+
*/
|
|
1200
|
+
constructor(_loader: GLTFLoader);
|
|
1201
|
+
dispose(): void;
|
|
1202
|
+
onReady(): void;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1129
1205
|
}
|
|
1130
1206
|
declare module "babylonjs-loaders/glTF/2.0/Extensions/KHR_lights_punctual" {
|
|
1131
1207
|
import { Nullable } from "babylonjs/types";
|
|
@@ -3392,6 +3468,7 @@ declare module "babylonjs-loaders/index" {
|
|
|
3392
3468
|
export * from "babylonjs-loaders/glTF/index";
|
|
3393
3469
|
export * from "babylonjs-loaders/OBJ/index";
|
|
3394
3470
|
export * from "babylonjs-loaders/STL/index";
|
|
3471
|
+
export * from "babylonjs-loaders/SPLAT/index";
|
|
3395
3472
|
|
|
3396
3473
|
}
|
|
3397
3474
|
declare module "babylonjs-loaders/OBJ/index" {
|
|
@@ -3782,6 +3859,77 @@ export class SolidParser {
|
|
|
3782
3859
|
parse(meshesNames: any, data: string, scene: Scene, assetContainer: Nullable<AssetContainer>, onFileToLoadFound: (fileToLoad: string) => void): void;
|
|
3783
3860
|
}
|
|
3784
3861
|
|
|
3862
|
+
}
|
|
3863
|
+
declare module "babylonjs-loaders/SPLAT/index" {
|
|
3864
|
+
export * from "babylonjs-loaders/SPLAT/splatFileLoader";
|
|
3865
|
+
|
|
3866
|
+
}
|
|
3867
|
+
declare module "babylonjs-loaders/SPLAT/splatFileLoader" {
|
|
3868
|
+
import { ISceneLoaderPluginAsync, ISceneLoaderPluginFactory, ISceneLoaderPlugin, ISceneLoaderAsyncResult, ISceneLoaderPluginExtensions } from "babylonjs/Loading/sceneLoader";
|
|
3869
|
+
import { AssetContainer } from "babylonjs/assetContainer";
|
|
3870
|
+
import { Scene } from "babylonjs/scene";
|
|
3871
|
+
/**
|
|
3872
|
+
* @experimental
|
|
3873
|
+
* SPLAT file type loader.
|
|
3874
|
+
* This is a babylon scene loader plugin.
|
|
3875
|
+
*/
|
|
3876
|
+
export class SPLATFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
|
|
3877
|
+
/**
|
|
3878
|
+
* Defines the name of the plugin.
|
|
3879
|
+
*/
|
|
3880
|
+
name: string;
|
|
3881
|
+
/**
|
|
3882
|
+
* Defines the extensions the splat loader is able to load.
|
|
3883
|
+
* force data to come in as an ArrayBuffer
|
|
3884
|
+
*/
|
|
3885
|
+
extensions: ISceneLoaderPluginExtensions;
|
|
3886
|
+
/**
|
|
3887
|
+
* Creates loader for gaussian splatting files
|
|
3888
|
+
*/
|
|
3889
|
+
constructor();
|
|
3890
|
+
/**
|
|
3891
|
+
* Instantiates a gaussian splatting file loader plugin.
|
|
3892
|
+
* @returns the created plugin
|
|
3893
|
+
*/
|
|
3894
|
+
createPlugin(): ISceneLoaderPluginAsync | ISceneLoaderPlugin;
|
|
3895
|
+
/**
|
|
3896
|
+
* If the data string can be loaded directly.
|
|
3897
|
+
* @returns if the data can be loaded directly
|
|
3898
|
+
*/
|
|
3899
|
+
canDirectLoad(): boolean;
|
|
3900
|
+
/**
|
|
3901
|
+
* Code from https://github.com/dylanebert/gsplat.js/blob/main/src/loaders/PLYLoader.ts Under MIT license
|
|
3902
|
+
* Loads a .ply from data array buffer
|
|
3903
|
+
* if data array buffer is not ply, returns the original buffer
|
|
3904
|
+
*/
|
|
3905
|
+
private _loadPLY;
|
|
3906
|
+
/**
|
|
3907
|
+
* Imports from the loaded gaussian splatting data and adds them to the scene
|
|
3908
|
+
* @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
|
|
3909
|
+
* @param scene the scene the meshes should be added to
|
|
3910
|
+
* @param data the gaussian splatting data to load
|
|
3911
|
+
* @param rootUrl root url to load from
|
|
3912
|
+
* @returns a promise containing the loaded meshes, particles, skeletons and animations
|
|
3913
|
+
*/
|
|
3914
|
+
importMeshAsync(_meshesNames: any, scene: Scene, data: any, rootUrl: string): Promise<ISceneLoaderAsyncResult>;
|
|
3915
|
+
/**
|
|
3916
|
+
* Imports all objects from the loaded gaussian splatting data and adds them to the scene
|
|
3917
|
+
* @param scene the scene the objects should be added to
|
|
3918
|
+
* @param data the gaussian splatting data to load
|
|
3919
|
+
* @param rootUrl root url to load from
|
|
3920
|
+
* @returns a promise which completes when objects have been loaded to the scene
|
|
3921
|
+
*/
|
|
3922
|
+
loadAsync(scene: Scene, data: any, _rootUrl: string): Promise<void>;
|
|
3923
|
+
/**
|
|
3924
|
+
* Load into an asset container.
|
|
3925
|
+
* @param scene The scene to load into
|
|
3926
|
+
* @param data The data to import
|
|
3927
|
+
* @param rootUrl The root url for scene and resources
|
|
3928
|
+
* @returns The loaded asset container
|
|
3929
|
+
*/
|
|
3930
|
+
loadAssetContainerAsync(_scene: Scene, _data: string, _rootUrl: string): Promise<AssetContainer>;
|
|
3931
|
+
}
|
|
3932
|
+
|
|
3785
3933
|
}
|
|
3786
3934
|
declare module "babylonjs-loaders/STL/index" {
|
|
3787
3935
|
export * from "babylonjs-loaders/STL/stlFileLoader";
|
|
@@ -4756,6 +4904,77 @@ declare module BABYLON.GLTF2.Loader.Extensions {
|
|
|
4756
4904
|
|
|
4757
4905
|
|
|
4758
4906
|
|
|
4907
|
+
}
|
|
4908
|
+
declare module BABYLON {
|
|
4909
|
+
|
|
4910
|
+
}
|
|
4911
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
4912
|
+
/**
|
|
4913
|
+
* @internal
|
|
4914
|
+
* Converts a glTF Interactivity Extension to a serialized flow graph.
|
|
4915
|
+
* @param gltf the interactivity data
|
|
4916
|
+
* @returns a serialized flow graph
|
|
4917
|
+
*/
|
|
4918
|
+
export function convertGLTFToSerializedFlowGraph(gltf: BABYLON.GLTF2.IKHRInteractivity): ISerializedFlowGraph;
|
|
4919
|
+
|
|
4920
|
+
|
|
4921
|
+
|
|
4922
|
+
}
|
|
4923
|
+
declare module BABYLON {
|
|
4924
|
+
|
|
4925
|
+
}
|
|
4926
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
4927
|
+
export var camerasExtension: {
|
|
4928
|
+
shouldProcess(path: FlowGraphPath): boolean;
|
|
4929
|
+
processGet(path: FlowGraphPath, context: FlowGraphContext): any;
|
|
4930
|
+
processSet(path: FlowGraphPath, context: FlowGraphContext, value: any): void;
|
|
4931
|
+
};
|
|
4932
|
+
|
|
4933
|
+
|
|
4934
|
+
|
|
4935
|
+
}
|
|
4936
|
+
declare module BABYLON {
|
|
4937
|
+
|
|
4938
|
+
}
|
|
4939
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
4940
|
+
export var interactivityPathExensions: IPathExtension[];
|
|
4941
|
+
|
|
4942
|
+
|
|
4943
|
+
|
|
4944
|
+
}
|
|
4945
|
+
declare module BABYLON {
|
|
4946
|
+
|
|
4947
|
+
}
|
|
4948
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
4949
|
+
export var pbrMaterialExtension: {
|
|
4950
|
+
shouldProcess(path: FlowGraphPath): boolean;
|
|
4951
|
+
processGet(path: FlowGraphPath, context: FlowGraphContext): any;
|
|
4952
|
+
processSet(path: FlowGraphPath, context: FlowGraphContext, value: any): void;
|
|
4953
|
+
};
|
|
4954
|
+
|
|
4955
|
+
|
|
4956
|
+
|
|
4957
|
+
}
|
|
4958
|
+
declare module BABYLON {
|
|
4959
|
+
|
|
4960
|
+
}
|
|
4961
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
4962
|
+
export var transformNodeExtension: IPathExtension;
|
|
4963
|
+
|
|
4964
|
+
|
|
4965
|
+
|
|
4966
|
+
}
|
|
4967
|
+
declare module BABYLON {
|
|
4968
|
+
|
|
4969
|
+
}
|
|
4970
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
4971
|
+
export var gltfToFlowGraphTypeMap: {
|
|
4972
|
+
[key: string]: string;
|
|
4973
|
+
};
|
|
4974
|
+
export var gltfTypeToBabylonType: any;
|
|
4975
|
+
|
|
4976
|
+
|
|
4977
|
+
|
|
4759
4978
|
}
|
|
4760
4979
|
declare module BABYLON {
|
|
4761
4980
|
|
|
@@ -5000,6 +5219,35 @@ declare module BABYLON.GLTF2.Loader.Extensions {
|
|
|
5000
5219
|
|
|
5001
5220
|
|
|
5002
5221
|
|
|
5222
|
+
}
|
|
5223
|
+
declare module BABYLON {
|
|
5224
|
+
|
|
5225
|
+
}
|
|
5226
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
5227
|
+
/**
|
|
5228
|
+
* Loader extension for KHR_interactivity
|
|
5229
|
+
*/
|
|
5230
|
+
export class KHR_interactivity implements BABYLON.GLTF2.IGLTFLoaderExtension {
|
|
5231
|
+
private _loader;
|
|
5232
|
+
/**
|
|
5233
|
+
* The name of this extension.
|
|
5234
|
+
*/
|
|
5235
|
+
readonly name = "KHR_interactivity";
|
|
5236
|
+
/**
|
|
5237
|
+
* Defines whether this extension is enabled.
|
|
5238
|
+
*/
|
|
5239
|
+
enabled: boolean;
|
|
5240
|
+
/**
|
|
5241
|
+
* @internal
|
|
5242
|
+
* @param _loader
|
|
5243
|
+
*/
|
|
5244
|
+
constructor(_loader: BABYLON.GLTF2.GLTFLoader);
|
|
5245
|
+
dispose(): void;
|
|
5246
|
+
onReady(): void;
|
|
5247
|
+
}
|
|
5248
|
+
|
|
5249
|
+
|
|
5250
|
+
|
|
5003
5251
|
}
|
|
5004
5252
|
declare module BABYLON {
|
|
5005
5253
|
|
|
@@ -7577,6 +7825,71 @@ declare module BABYLON {
|
|
|
7577
7825
|
|
|
7578
7826
|
|
|
7579
7827
|
|
|
7828
|
+
/**
|
|
7829
|
+
* @experimental
|
|
7830
|
+
* SPLAT file type loader.
|
|
7831
|
+
* This is a babylon scene loader plugin.
|
|
7832
|
+
*/
|
|
7833
|
+
export class SPLATFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
|
|
7834
|
+
/**
|
|
7835
|
+
* Defines the name of the plugin.
|
|
7836
|
+
*/
|
|
7837
|
+
name: string;
|
|
7838
|
+
/**
|
|
7839
|
+
* Defines the extensions the splat loader is able to load.
|
|
7840
|
+
* force data to come in as an ArrayBuffer
|
|
7841
|
+
*/
|
|
7842
|
+
extensions: ISceneLoaderPluginExtensions;
|
|
7843
|
+
/**
|
|
7844
|
+
* Creates loader for gaussian splatting files
|
|
7845
|
+
*/
|
|
7846
|
+
constructor();
|
|
7847
|
+
/**
|
|
7848
|
+
* Instantiates a gaussian splatting file loader plugin.
|
|
7849
|
+
* @returns the created plugin
|
|
7850
|
+
*/
|
|
7851
|
+
createPlugin(): ISceneLoaderPluginAsync | ISceneLoaderPlugin;
|
|
7852
|
+
/**
|
|
7853
|
+
* If the data string can be loaded directly.
|
|
7854
|
+
* @returns if the data can be loaded directly
|
|
7855
|
+
*/
|
|
7856
|
+
canDirectLoad(): boolean;
|
|
7857
|
+
/**
|
|
7858
|
+
* Code from https://github.com/dylanebert/gsplat.js/blob/main/src/loaders/PLYLoader.ts Under MIT license
|
|
7859
|
+
* Loads a .ply from data array buffer
|
|
7860
|
+
* if data array buffer is not ply, returns the original buffer
|
|
7861
|
+
*/
|
|
7862
|
+
private _loadPLY;
|
|
7863
|
+
/**
|
|
7864
|
+
* Imports from the loaded gaussian splatting data and adds them to the scene
|
|
7865
|
+
* @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
|
|
7866
|
+
* @param scene the scene the meshes should be added to
|
|
7867
|
+
* @param data the gaussian splatting data to load
|
|
7868
|
+
* @param rootUrl root url to load from
|
|
7869
|
+
* @returns a promise containing the loaded meshes, particles, skeletons and animations
|
|
7870
|
+
*/
|
|
7871
|
+
importMeshAsync(_meshesNames: any, scene: Scene, data: any, rootUrl: string): Promise<ISceneLoaderAsyncResult>;
|
|
7872
|
+
/**
|
|
7873
|
+
* Imports all objects from the loaded gaussian splatting data and adds them to the scene
|
|
7874
|
+
* @param scene the scene the objects should be added to
|
|
7875
|
+
* @param data the gaussian splatting data to load
|
|
7876
|
+
* @param rootUrl root url to load from
|
|
7877
|
+
* @returns a promise which completes when objects have been loaded to the scene
|
|
7878
|
+
*/
|
|
7879
|
+
loadAsync(scene: Scene, data: any, _rootUrl: string): Promise<void>;
|
|
7880
|
+
/**
|
|
7881
|
+
* Load into an asset container.
|
|
7882
|
+
* @param scene The scene to load into
|
|
7883
|
+
* @param data The data to import
|
|
7884
|
+
* @param rootUrl The root url for scene and resources
|
|
7885
|
+
* @returns The loaded asset container
|
|
7886
|
+
*/
|
|
7887
|
+
loadAssetContainerAsync(_scene: Scene, _data: string, _rootUrl: string): Promise<AssetContainer>;
|
|
7888
|
+
}
|
|
7889
|
+
|
|
7890
|
+
|
|
7891
|
+
|
|
7892
|
+
|
|
7580
7893
|
/**
|
|
7581
7894
|
* STL file type loader.
|
|
7582
7895
|
* This is a babylon scene loader plugin.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-loaders",
|
|
3
|
-
"version": "6.33.
|
|
3
|
+
"version": "6.33.2",
|
|
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": "^6.33.
|
|
19
|
-
"babylonjs-gltf2interface": "^6.33.
|
|
18
|
+
"babylonjs": "^6.33.2",
|
|
19
|
+
"babylonjs-gltf2interface": "^6.33.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@dev/build-tools": "1.0.0",
|