babylonjs-loaders 9.9.0 → 9.9.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.js.map +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.js.map +1 -1
- package/babylon.glTFFileLoader.min.js +1 -1
- package/babylon.glTFFileLoader.min.js.map +1 -1
- package/babylonjs.loaders.d.ts +57 -1
- package/babylonjs.loaders.js +1 -1
- package/babylonjs.loaders.js.map +1 -1
- package/babylonjs.loaders.min.js +1 -1
- package/babylonjs.loaders.min.js.map +1 -1
- package/babylonjs.loaders.module.d.ts +115 -2
- package/package.json +3 -3
package/babylonjs.loaders.d.ts
CHANGED
|
@@ -1420,7 +1420,7 @@ declare namespace BABYLON.GLTF2 {
|
|
|
1420
1420
|
set useAlphaFromBaseColorTexture(value: boolean);
|
|
1421
1421
|
/**
|
|
1422
1422
|
* Gets whether alpha is used from the base color texture.
|
|
1423
|
-
* @returns
|
|
1423
|
+
* @returns True if alpha is used from the base color texture
|
|
1424
1424
|
*/
|
|
1425
1425
|
get useAlphaFromBaseColorTexture(): boolean;
|
|
1426
1426
|
/**
|
|
@@ -7112,6 +7112,12 @@ declare namespace BABYLON {
|
|
|
7112
7112
|
* Required for IBL shadows to work if keepInRam is false.
|
|
7113
7113
|
*/
|
|
7114
7114
|
needsRotationScaleTextures?: boolean;
|
|
7115
|
+
/**
|
|
7116
|
+
* Load SOG files as raw GPU textures and dequantize in the shader.
|
|
7117
|
+
* Skips the CPU decode pass and yields much faster load times.
|
|
7118
|
+
* Requires WebGL2 / WebGPU. Defaults to false (CPU decode).
|
|
7119
|
+
*/
|
|
7120
|
+
useSogTextures?: boolean;
|
|
7115
7121
|
/**
|
|
7116
7122
|
* URL to load the spz WASM ES module from (e.g. the \@adobe/spz package).
|
|
7117
7123
|
* When provided, the WASM-based SPZ loader is used, which supports extra features
|
|
@@ -7252,6 +7258,45 @@ declare namespace BABYLON {
|
|
|
7252
7258
|
Mesh = 2,
|
|
7253
7259
|
Reject = 3
|
|
7254
7260
|
}
|
|
7261
|
+
/**
|
|
7262
|
+
* SOG (Self-Organized Gaussians) raw texture set + decoding parameters.
|
|
7263
|
+
* Used when SOG webp textures are fed directly to the GPU and dequantized in the shader.
|
|
7264
|
+
*/
|
|
7265
|
+
export interface ISogTexturePack {
|
|
7266
|
+
/** SOG file version (1 or 2). */
|
|
7267
|
+
version: 1 | 2;
|
|
7268
|
+
/** Number of splats. */
|
|
7269
|
+
splatCount: number;
|
|
7270
|
+
/** SH degree (0..3+). */
|
|
7271
|
+
shDegree: number;
|
|
7272
|
+
/** Raw webp textures, all RGBA8 with nearest sampling. */
|
|
7273
|
+
meansTextureL: BaseTexture;
|
|
7274
|
+
meansTextureU: BaseTexture;
|
|
7275
|
+
scalesTexture: BaseTexture;
|
|
7276
|
+
quatsTexture: BaseTexture;
|
|
7277
|
+
sh0Texture: BaseTexture;
|
|
7278
|
+
shCentroidsTexture?: BaseTexture;
|
|
7279
|
+
shLabelsTexture?: BaseTexture;
|
|
7280
|
+
/** Optional codebook (v2) packed into a 1D R32F texture. Encoding:
|
|
7281
|
+
* - texels [0..255] : scales codebook
|
|
7282
|
+
* - texels [256..511] : sh0 codebook
|
|
7283
|
+
* - texels [512..767] : shN codebook
|
|
7284
|
+
*/
|
|
7285
|
+
codebookTexture?: BaseTexture;
|
|
7286
|
+
/** Mins/maxs (v1) used as uniforms. */
|
|
7287
|
+
meansMin: [number, number, number];
|
|
7288
|
+
meansMax: [number, number, number];
|
|
7289
|
+
scalesMin?: [number, number, number];
|
|
7290
|
+
scalesMax?: [number, number, number];
|
|
7291
|
+
sh0Min?: [number, number, number, number];
|
|
7292
|
+
sh0Max?: [number, number, number, number];
|
|
7293
|
+
shnMin?: number;
|
|
7294
|
+
shnMax?: number;
|
|
7295
|
+
/** SH layout info. */
|
|
7296
|
+
shCoeffCount: number;
|
|
7297
|
+
/** CPU-side decoded positions for the depth-sort worker. */
|
|
7298
|
+
positions: Float32Array;
|
|
7299
|
+
}
|
|
7255
7300
|
/**
|
|
7256
7301
|
* A parsed buffer and how to use it
|
|
7257
7302
|
*/
|
|
@@ -7269,6 +7314,8 @@ declare namespace BABYLON {
|
|
|
7269
7314
|
safeOrbitCameraElevationMinMax?: [number, number];
|
|
7270
7315
|
upAxis?: "X" | "Y" | "Z";
|
|
7271
7316
|
chirality?: "LeftHanded" | "RightHanded";
|
|
7317
|
+
/** When set, the splats are to be uploaded as raw SOG textures and dequantized in the shader. */
|
|
7318
|
+
sogTextures?: ISogTexturePack;
|
|
7272
7319
|
}
|
|
7273
7320
|
|
|
7274
7321
|
|
|
@@ -7354,6 +7401,15 @@ declare namespace BABYLON {
|
|
|
7354
7401
|
* @returns Parsed data
|
|
7355
7402
|
*/
|
|
7356
7403
|
export function ParseSogMeta(dataOrFiles: SOGRootData | Map<string, Uint8Array>, rootUrl: string, scene: Scene): Promise<IParsedSplat>;
|
|
7404
|
+
/**
|
|
7405
|
+
* Parse SOG data and produce a set of GPU textures + dequantization parameters.
|
|
7406
|
+
* The shader will sample these raw RGBA8 textures and reconstruct positions/scales/rotations/colors/SH on the GPU.
|
|
7407
|
+
* @param dataOrFiles Either the SOGRootData or a Map of filenames to Uint8Array file data (including meta.json)
|
|
7408
|
+
* @param rootUrl Base URL to load webp files from (if dataOrFiles is SOGRootData)
|
|
7409
|
+
* @param scene The Babylon.js scene
|
|
7410
|
+
* @returns Parsed splat info with `sogTextures` populated.
|
|
7411
|
+
*/
|
|
7412
|
+
export function ParseSogMetaAsTextures(dataOrFiles: SOGRootData | Map<string, Uint8Array>, rootUrl: string, scene: Scene): Promise<IParsedSplat>;
|
|
7357
7413
|
|
|
7358
7414
|
|
|
7359
7415
|
|