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
package/babylonjs.loaders.d.ts
CHANGED
|
@@ -847,6 +847,77 @@ declare module BABYLON.GLTF2.Loader.Extensions {
|
|
|
847
847
|
|
|
848
848
|
|
|
849
849
|
|
|
850
|
+
}
|
|
851
|
+
declare module BABYLON {
|
|
852
|
+
|
|
853
|
+
}
|
|
854
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
855
|
+
/**
|
|
856
|
+
* @internal
|
|
857
|
+
* Converts a glTF Interactivity Extension to a serialized flow graph.
|
|
858
|
+
* @param gltf the interactivity data
|
|
859
|
+
* @returns a serialized flow graph
|
|
860
|
+
*/
|
|
861
|
+
export function convertGLTFToSerializedFlowGraph(gltf: BABYLON.GLTF2.IKHRInteractivity): ISerializedFlowGraph;
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
}
|
|
866
|
+
declare module BABYLON {
|
|
867
|
+
|
|
868
|
+
}
|
|
869
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
870
|
+
export var camerasExtension: {
|
|
871
|
+
shouldProcess(path: FlowGraphPath): boolean;
|
|
872
|
+
processGet(path: FlowGraphPath, context: FlowGraphContext): any;
|
|
873
|
+
processSet(path: FlowGraphPath, context: FlowGraphContext, value: any): void;
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
}
|
|
879
|
+
declare module BABYLON {
|
|
880
|
+
|
|
881
|
+
}
|
|
882
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
883
|
+
export var interactivityPathExensions: IPathExtension[];
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
}
|
|
888
|
+
declare module BABYLON {
|
|
889
|
+
|
|
890
|
+
}
|
|
891
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
892
|
+
export var pbrMaterialExtension: {
|
|
893
|
+
shouldProcess(path: FlowGraphPath): boolean;
|
|
894
|
+
processGet(path: FlowGraphPath, context: FlowGraphContext): any;
|
|
895
|
+
processSet(path: FlowGraphPath, context: FlowGraphContext, value: any): void;
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
}
|
|
901
|
+
declare module BABYLON {
|
|
902
|
+
|
|
903
|
+
}
|
|
904
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
905
|
+
export var transformNodeExtension: IPathExtension;
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
}
|
|
910
|
+
declare module BABYLON {
|
|
911
|
+
|
|
912
|
+
}
|
|
913
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
914
|
+
export var gltfToFlowGraphTypeMap: {
|
|
915
|
+
[key: string]: string;
|
|
916
|
+
};
|
|
917
|
+
export var gltfTypeToBabylonType: any;
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
850
921
|
}
|
|
851
922
|
declare module BABYLON {
|
|
852
923
|
|
|
@@ -1091,6 +1162,35 @@ declare module BABYLON.GLTF2.Loader.Extensions {
|
|
|
1091
1162
|
|
|
1092
1163
|
|
|
1093
1164
|
|
|
1165
|
+
}
|
|
1166
|
+
declare module BABYLON {
|
|
1167
|
+
|
|
1168
|
+
}
|
|
1169
|
+
declare module BABYLON.GLTF2.Loader.Extensions {
|
|
1170
|
+
/**
|
|
1171
|
+
* Loader extension for KHR_interactivity
|
|
1172
|
+
*/
|
|
1173
|
+
export class KHR_interactivity implements BABYLON.GLTF2.IGLTFLoaderExtension {
|
|
1174
|
+
private _loader;
|
|
1175
|
+
/**
|
|
1176
|
+
* The name of this extension.
|
|
1177
|
+
*/
|
|
1178
|
+
readonly name = "KHR_interactivity";
|
|
1179
|
+
/**
|
|
1180
|
+
* Defines whether this extension is enabled.
|
|
1181
|
+
*/
|
|
1182
|
+
enabled: boolean;
|
|
1183
|
+
/**
|
|
1184
|
+
* @internal
|
|
1185
|
+
* @param _loader
|
|
1186
|
+
*/
|
|
1187
|
+
constructor(_loader: BABYLON.GLTF2.GLTFLoader);
|
|
1188
|
+
dispose(): void;
|
|
1189
|
+
onReady(): void;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1094
1194
|
}
|
|
1095
1195
|
declare module BABYLON {
|
|
1096
1196
|
|
|
@@ -3668,6 +3768,71 @@ declare module BABYLON {
|
|
|
3668
3768
|
|
|
3669
3769
|
|
|
3670
3770
|
|
|
3771
|
+
/**
|
|
3772
|
+
* @experimental
|
|
3773
|
+
* SPLAT file type loader.
|
|
3774
|
+
* This is a babylon scene loader plugin.
|
|
3775
|
+
*/
|
|
3776
|
+
export class SPLATFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPluginFactory {
|
|
3777
|
+
/**
|
|
3778
|
+
* Defines the name of the plugin.
|
|
3779
|
+
*/
|
|
3780
|
+
name: string;
|
|
3781
|
+
/**
|
|
3782
|
+
* Defines the extensions the splat loader is able to load.
|
|
3783
|
+
* force data to come in as an ArrayBuffer
|
|
3784
|
+
*/
|
|
3785
|
+
extensions: ISceneLoaderPluginExtensions;
|
|
3786
|
+
/**
|
|
3787
|
+
* Creates loader for gaussian splatting files
|
|
3788
|
+
*/
|
|
3789
|
+
constructor();
|
|
3790
|
+
/**
|
|
3791
|
+
* Instantiates a gaussian splatting file loader plugin.
|
|
3792
|
+
* @returns the created plugin
|
|
3793
|
+
*/
|
|
3794
|
+
createPlugin(): ISceneLoaderPluginAsync | ISceneLoaderPlugin;
|
|
3795
|
+
/**
|
|
3796
|
+
* If the data string can be loaded directly.
|
|
3797
|
+
* @returns if the data can be loaded directly
|
|
3798
|
+
*/
|
|
3799
|
+
canDirectLoad(): boolean;
|
|
3800
|
+
/**
|
|
3801
|
+
* Code from https://github.com/dylanebert/gsplat.js/blob/main/src/loaders/PLYLoader.ts Under MIT license
|
|
3802
|
+
* Loads a .ply from data array buffer
|
|
3803
|
+
* if data array buffer is not ply, returns the original buffer
|
|
3804
|
+
*/
|
|
3805
|
+
private _loadPLY;
|
|
3806
|
+
/**
|
|
3807
|
+
* Imports from the loaded gaussian splatting data and adds them to the scene
|
|
3808
|
+
* @param meshesNames a string or array of strings of the mesh names that should be loaded from the file
|
|
3809
|
+
* @param scene the scene the meshes should be added to
|
|
3810
|
+
* @param data the gaussian splatting data to load
|
|
3811
|
+
* @param rootUrl root url to load from
|
|
3812
|
+
* @returns a promise containing the loaded meshes, particles, skeletons and animations
|
|
3813
|
+
*/
|
|
3814
|
+
importMeshAsync(_meshesNames: any, scene: Scene, data: any, rootUrl: string): Promise<ISceneLoaderAsyncResult>;
|
|
3815
|
+
/**
|
|
3816
|
+
* Imports all objects from the loaded gaussian splatting data and adds them to the scene
|
|
3817
|
+
* @param scene the scene the objects should be added to
|
|
3818
|
+
* @param data the gaussian splatting data to load
|
|
3819
|
+
* @param rootUrl root url to load from
|
|
3820
|
+
* @returns a promise which completes when objects have been loaded to the scene
|
|
3821
|
+
*/
|
|
3822
|
+
loadAsync(scene: Scene, data: any, _rootUrl: string): Promise<void>;
|
|
3823
|
+
/**
|
|
3824
|
+
* Load into an asset container.
|
|
3825
|
+
* @param scene The scene to load into
|
|
3826
|
+
* @param data The data to import
|
|
3827
|
+
* @param rootUrl The root url for scene and resources
|
|
3828
|
+
* @returns The loaded asset container
|
|
3829
|
+
*/
|
|
3830
|
+
loadAssetContainerAsync(_scene: Scene, _data: string, _rootUrl: string): Promise<AssetContainer>;
|
|
3831
|
+
}
|
|
3832
|
+
|
|
3833
|
+
|
|
3834
|
+
|
|
3835
|
+
|
|
3671
3836
|
/**
|
|
3672
3837
|
* STL file type loader.
|
|
3673
3838
|
* This is a babylon scene loader plugin.
|