babylonjs-loaders 9.2.1 → 9.2.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 +1 -1
- package/babylon.glTF2FileLoader.min.js +1 -1
- package/babylon.glTF2FileLoader.min.js.map +1 -1
- package/babylon.glTFFileLoader.js +1 -1
- package/babylon.glTFFileLoader.min.js +1 -1
- package/babylon.glTFFileLoader.min.js.map +1 -1
- package/babylon.objFileLoader.js +1 -1
- package/babylon.objFileLoader.min.js +1 -1
- package/babylon.objFileLoader.min.js.map +1 -1
- package/babylonjs.loaders.d.ts +47 -3
- package/babylonjs.loaders.js +1 -1
- package/babylonjs.loaders.min.js +1 -1
- package/babylonjs.loaders.min.js.map +1 -1
- package/babylonjs.loaders.module.d.ts +96 -6
- package/package.json +3 -3
package/babylonjs.loaders.d.ts
CHANGED
|
@@ -6790,13 +6790,45 @@ declare namespace BABYLON {
|
|
|
6790
6790
|
|
|
6791
6791
|
|
|
6792
6792
|
/**
|
|
6793
|
-
* Parses SPZ data and returns a promise resolving to an
|
|
6793
|
+
* Parses SPZ data and returns a promise resolving to an IParsedSplat object.
|
|
6794
6794
|
* @param data The ArrayBuffer containing SPZ data.
|
|
6795
6795
|
* @param scene The Babylon.js scene.
|
|
6796
|
-
* @param
|
|
6796
|
+
* @param _loadingOptions Options for loading Gaussian Splatting files.
|
|
6797
6797
|
* @returns A promise resolving to the parsed SPZ data.
|
|
6798
6798
|
*/
|
|
6799
|
-
export function ParseSpz(data: ArrayBuffer, scene: Scene,
|
|
6799
|
+
export function ParseSpz(data: ArrayBuffer, scene: Scene, _loadingOptions: SPLATLoadingOptions): Promise<IParsedSplat>;
|
|
6800
|
+
/**
|
|
6801
|
+
* Returns the initialized spz WASM module loaded from the given URL, loading it on first call.
|
|
6802
|
+
* @param url URL to the spz WASM ES module (its default export should be a factory function)
|
|
6803
|
+
* @returns A promise resolving to the initialized spz WASM module
|
|
6804
|
+
*/
|
|
6805
|
+
export function GetSpzModule(url: string): Promise<SpzModule>;
|
|
6806
|
+
/**
|
|
6807
|
+
* Converts a GaussianCloud object (from the spz WASM module) into the packed 32-byte-per-splat
|
|
6808
|
+
* ArrayBuffer and SH texture arrays expected by GaussianSplattingMeshBase.updateData.
|
|
6809
|
+
*
|
|
6810
|
+
* Packed layout per splat (32 bytes):
|
|
6811
|
+
* [0-11] position xyz (float32 x3)
|
|
6812
|
+
* [12-23] scale xyz (float32 x3)
|
|
6813
|
+
* [24-27] color RGBA (uint8 x4, colors in [0,255], alpha in [0,255])
|
|
6814
|
+
* [28-31] quaternion wxyz (uint8 x4, encoded as q * 127.5 + 127.5)
|
|
6815
|
+
*
|
|
6816
|
+
* SH coefficients from the cloud (Float32, range ~[-1,1]) are encoded to bytes
|
|
6817
|
+
* using the SPZ convention (load-spz.cc unquantizeSH): byte = coeff * 128 + 128.
|
|
6818
|
+
*
|
|
6819
|
+
* @param cloud The GaussianCloud returned by spz.loadSpzFromBuffer
|
|
6820
|
+
* @param scene The Babylon.js scene (used to query maxTextureSize for SH textures)
|
|
6821
|
+
* @param useCoroutine If true, yields periodically to avoid blocking the main thread
|
|
6822
|
+
* @returns A coroutine returning an IParsedSplat ready to be passed to updateData
|
|
6823
|
+
*/
|
|
6824
|
+
export function ConvertSpzToSplat(cloud: GaussianCloud, scene: Scene, useCoroutine?: boolean): Coroutine<IParsedSplat>;
|
|
6825
|
+
/**
|
|
6826
|
+
* Async version of ConvertSpzToSplat that yields periodically to avoid blocking the main thread.
|
|
6827
|
+
* @param cloud The GaussianCloud returned by spz.loadSpzFromBuffer
|
|
6828
|
+
* @param scene The Babylon.js scene
|
|
6829
|
+
* @returns A promise resolving to an IParsedSplat
|
|
6830
|
+
*/
|
|
6831
|
+
export function ConvertSpzToSplatAsync(cloud: any, scene: Scene): Promise<IParsedSplat>;
|
|
6800
6832
|
|
|
6801
6833
|
|
|
6802
6834
|
/**
|
|
@@ -6830,6 +6862,17 @@ declare namespace BABYLON {
|
|
|
6830
6862
|
* Mesh that will be used to load data instead of creating a new one
|
|
6831
6863
|
*/
|
|
6832
6864
|
gaussianSplattingMesh?: GaussianSplattingMesh;
|
|
6865
|
+
/**
|
|
6866
|
+
* URL to load the spz WASM ES module from (e.g. the \@adobe/spz package).
|
|
6867
|
+
* When provided, the WASM-based SPZ loader is used, which supports extra features
|
|
6868
|
+
* such as antialiasing metadata, and vendor-specific extensions such as safe-orbit
|
|
6869
|
+
* camera limits.
|
|
6870
|
+
* Defaults to the \@adobe/spz unpkg URL when WebAssembly is supported, and undefined otherwise.
|
|
6871
|
+
* Set to undefined to force the built-in manual SPZ parser regardless of WebAssembly support.
|
|
6872
|
+
* @example Setting the URL directly on the loader options
|
|
6873
|
+
* spzLibraryUrl: "https://unpkg.com/\@adobe/spz\@0.2.0/dist/spz.js"
|
|
6874
|
+
*/
|
|
6875
|
+
spzLibraryUrl?: string;
|
|
6833
6876
|
};
|
|
6834
6877
|
|
|
6835
6878
|
|
|
@@ -6968,6 +7011,7 @@ declare namespace BABYLON {
|
|
|
6968
7011
|
faces?: number[];
|
|
6969
7012
|
hasVertexColors?: boolean;
|
|
6970
7013
|
sh?: Uint8Array[];
|
|
7014
|
+
shDegree?: number;
|
|
6971
7015
|
trainedWithAntialiasing?: boolean;
|
|
6972
7016
|
compressed?: boolean;
|
|
6973
7017
|
rawSplat?: boolean;
|