babylonjs-loaders 9.9.1 → 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
|
@@ -1501,7 +1501,7 @@ export class OpenPBRMaterialLoadingAdapter implements IMaterialLoadingAdapter {
|
|
|
1501
1501
|
set useAlphaFromBaseColorTexture(value: boolean);
|
|
1502
1502
|
/**
|
|
1503
1503
|
* Gets whether alpha is used from the base color texture.
|
|
1504
|
-
* @returns
|
|
1504
|
+
* @returns True if alpha is used from the base color texture
|
|
1505
1505
|
*/
|
|
1506
1506
|
get useAlphaFromBaseColorTexture(): boolean;
|
|
1507
1507
|
/**
|
|
@@ -7354,6 +7354,12 @@ export type SPLATLoadingOptions = {
|
|
|
7354
7354
|
* Required for IBL shadows to work if keepInRam is false.
|
|
7355
7355
|
*/
|
|
7356
7356
|
needsRotationScaleTextures?: boolean;
|
|
7357
|
+
/**
|
|
7358
|
+
* Load SOG files as raw GPU textures and dequantize in the shader.
|
|
7359
|
+
* Skips the CPU decode pass and yields much faster load times.
|
|
7360
|
+
* Requires WebGL2 / WebGPU. Defaults to false (CPU decode).
|
|
7361
|
+
*/
|
|
7362
|
+
useSogTextures?: boolean;
|
|
7357
7363
|
/**
|
|
7358
7364
|
* URL to load the spz WASM ES module from (e.g. the \@adobe/spz package).
|
|
7359
7365
|
* When provided, the WASM-based SPZ loader is used, which supports extra features
|
|
@@ -7495,6 +7501,7 @@ export class SPLATFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPlu
|
|
|
7495
7501
|
|
|
7496
7502
|
}
|
|
7497
7503
|
declare module "babylonjs-loaders/SPLAT/splatDefs" {
|
|
7504
|
+
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture.pure";
|
|
7498
7505
|
/**
|
|
7499
7506
|
* Indicator of the parsed ply buffer. A standard ready to use splat or an array of positions for a point cloud
|
|
7500
7507
|
*/
|
|
@@ -7504,6 +7511,45 @@ export enum Mode {
|
|
|
7504
7511
|
Mesh = 2,
|
|
7505
7512
|
Reject = 3
|
|
7506
7513
|
}
|
|
7514
|
+
/**
|
|
7515
|
+
* SOG (Self-Organized Gaussians) raw texture set + decoding parameters.
|
|
7516
|
+
* Used when SOG webp textures are fed directly to the GPU and dequantized in the shader.
|
|
7517
|
+
*/
|
|
7518
|
+
export interface ISogTexturePack {
|
|
7519
|
+
/** SOG file version (1 or 2). */
|
|
7520
|
+
version: 1 | 2;
|
|
7521
|
+
/** Number of splats. */
|
|
7522
|
+
splatCount: number;
|
|
7523
|
+
/** SH degree (0..3+). */
|
|
7524
|
+
shDegree: number;
|
|
7525
|
+
/** Raw webp textures, all RGBA8 with nearest sampling. */
|
|
7526
|
+
meansTextureL: BaseTexture;
|
|
7527
|
+
meansTextureU: BaseTexture;
|
|
7528
|
+
scalesTexture: BaseTexture;
|
|
7529
|
+
quatsTexture: BaseTexture;
|
|
7530
|
+
sh0Texture: BaseTexture;
|
|
7531
|
+
shCentroidsTexture?: BaseTexture;
|
|
7532
|
+
shLabelsTexture?: BaseTexture;
|
|
7533
|
+
/** Optional codebook (v2) packed into a 1D R32F texture. Encoding:
|
|
7534
|
+
* - texels [0..255] : scales codebook
|
|
7535
|
+
* - texels [256..511] : sh0 codebook
|
|
7536
|
+
* - texels [512..767] : shN codebook
|
|
7537
|
+
*/
|
|
7538
|
+
codebookTexture?: BaseTexture;
|
|
7539
|
+
/** Mins/maxs (v1) used as uniforms. */
|
|
7540
|
+
meansMin: [number, number, number];
|
|
7541
|
+
meansMax: [number, number, number];
|
|
7542
|
+
scalesMin?: [number, number, number];
|
|
7543
|
+
scalesMax?: [number, number, number];
|
|
7544
|
+
sh0Min?: [number, number, number, number];
|
|
7545
|
+
sh0Max?: [number, number, number, number];
|
|
7546
|
+
shnMin?: number;
|
|
7547
|
+
shnMax?: number;
|
|
7548
|
+
/** SH layout info. */
|
|
7549
|
+
shCoeffCount: number;
|
|
7550
|
+
/** CPU-side decoded positions for the depth-sort worker. */
|
|
7551
|
+
positions: Float32Array;
|
|
7552
|
+
}
|
|
7507
7553
|
/**
|
|
7508
7554
|
* A parsed buffer and how to use it
|
|
7509
7555
|
*/
|
|
@@ -7521,6 +7567,8 @@ export interface IParsedSplat {
|
|
|
7521
7567
|
safeOrbitCameraElevationMinMax?: [number, number];
|
|
7522
7568
|
upAxis?: "X" | "Y" | "Z";
|
|
7523
7569
|
chirality?: "LeftHanded" | "RightHanded";
|
|
7570
|
+
/** When set, the splats are to be uploaded as raw SOG textures and dequantized in the shader. */
|
|
7571
|
+
sogTextures?: ISogTexturePack;
|
|
7524
7572
|
}
|
|
7525
7573
|
|
|
7526
7574
|
}
|
|
@@ -7609,6 +7657,15 @@ export interface SOGRootData {
|
|
|
7609
7657
|
* @returns Parsed data
|
|
7610
7658
|
*/
|
|
7611
7659
|
export function ParseSogMeta(dataOrFiles: SOGRootData | Map<string, Uint8Array>, rootUrl: string, scene: Scene): Promise<IParsedSplat>;
|
|
7660
|
+
/**
|
|
7661
|
+
* Parse SOG data and produce a set of GPU textures + dequantization parameters.
|
|
7662
|
+
* The shader will sample these raw RGBA8 textures and reconstruct positions/scales/rotations/colors/SH on the GPU.
|
|
7663
|
+
* @param dataOrFiles Either the SOGRootData or a Map of filenames to Uint8Array file data (including meta.json)
|
|
7664
|
+
* @param rootUrl Base URL to load webp files from (if dataOrFiles is SOGRootData)
|
|
7665
|
+
* @param scene The Babylon.js scene
|
|
7666
|
+
* @returns Parsed splat info with `sogTextures` populated.
|
|
7667
|
+
*/
|
|
7668
|
+
export function ParseSogMetaAsTextures(dataOrFiles: SOGRootData | Map<string, Uint8Array>, rootUrl: string, scene: Scene): Promise<IParsedSplat>;
|
|
7612
7669
|
|
|
7613
7670
|
}
|
|
7614
7671
|
declare module "babylonjs-loaders/SPLAT/index" {
|
|
@@ -9585,7 +9642,7 @@ declare namespace BABYLON.GLTF2 {
|
|
|
9585
9642
|
set useAlphaFromBaseColorTexture(value: boolean);
|
|
9586
9643
|
/**
|
|
9587
9644
|
* Gets whether alpha is used from the base color texture.
|
|
9588
|
-
* @returns
|
|
9645
|
+
* @returns True if alpha is used from the base color texture
|
|
9589
9646
|
*/
|
|
9590
9647
|
get useAlphaFromBaseColorTexture(): boolean;
|
|
9591
9648
|
/**
|
|
@@ -15277,6 +15334,12 @@ declare namespace BABYLON {
|
|
|
15277
15334
|
* Required for IBL shadows to work if keepInRam is false.
|
|
15278
15335
|
*/
|
|
15279
15336
|
needsRotationScaleTextures?: boolean;
|
|
15337
|
+
/**
|
|
15338
|
+
* Load SOG files as raw GPU textures and dequantize in the shader.
|
|
15339
|
+
* Skips the CPU decode pass and yields much faster load times.
|
|
15340
|
+
* Requires WebGL2 / WebGPU. Defaults to false (CPU decode).
|
|
15341
|
+
*/
|
|
15342
|
+
useSogTextures?: boolean;
|
|
15280
15343
|
/**
|
|
15281
15344
|
* URL to load the spz WASM ES module from (e.g. the \@adobe/spz package).
|
|
15282
15345
|
* When provided, the WASM-based SPZ loader is used, which supports extra features
|
|
@@ -15417,6 +15480,45 @@ declare namespace BABYLON {
|
|
|
15417
15480
|
Mesh = 2,
|
|
15418
15481
|
Reject = 3
|
|
15419
15482
|
}
|
|
15483
|
+
/**
|
|
15484
|
+
* SOG (Self-Organized Gaussians) raw texture set + decoding parameters.
|
|
15485
|
+
* Used when SOG webp textures are fed directly to the GPU and dequantized in the shader.
|
|
15486
|
+
*/
|
|
15487
|
+
export interface ISogTexturePack {
|
|
15488
|
+
/** SOG file version (1 or 2). */
|
|
15489
|
+
version: 1 | 2;
|
|
15490
|
+
/** Number of splats. */
|
|
15491
|
+
splatCount: number;
|
|
15492
|
+
/** SH degree (0..3+). */
|
|
15493
|
+
shDegree: number;
|
|
15494
|
+
/** Raw webp textures, all RGBA8 with nearest sampling. */
|
|
15495
|
+
meansTextureL: BaseTexture;
|
|
15496
|
+
meansTextureU: BaseTexture;
|
|
15497
|
+
scalesTexture: BaseTexture;
|
|
15498
|
+
quatsTexture: BaseTexture;
|
|
15499
|
+
sh0Texture: BaseTexture;
|
|
15500
|
+
shCentroidsTexture?: BaseTexture;
|
|
15501
|
+
shLabelsTexture?: BaseTexture;
|
|
15502
|
+
/** Optional codebook (v2) packed into a 1D R32F texture. Encoding:
|
|
15503
|
+
* - texels [0..255] : scales codebook
|
|
15504
|
+
* - texels [256..511] : sh0 codebook
|
|
15505
|
+
* - texels [512..767] : shN codebook
|
|
15506
|
+
*/
|
|
15507
|
+
codebookTexture?: BaseTexture;
|
|
15508
|
+
/** Mins/maxs (v1) used as uniforms. */
|
|
15509
|
+
meansMin: [number, number, number];
|
|
15510
|
+
meansMax: [number, number, number];
|
|
15511
|
+
scalesMin?: [number, number, number];
|
|
15512
|
+
scalesMax?: [number, number, number];
|
|
15513
|
+
sh0Min?: [number, number, number, number];
|
|
15514
|
+
sh0Max?: [number, number, number, number];
|
|
15515
|
+
shnMin?: number;
|
|
15516
|
+
shnMax?: number;
|
|
15517
|
+
/** SH layout info. */
|
|
15518
|
+
shCoeffCount: number;
|
|
15519
|
+
/** CPU-side decoded positions for the depth-sort worker. */
|
|
15520
|
+
positions: Float32Array;
|
|
15521
|
+
}
|
|
15420
15522
|
/**
|
|
15421
15523
|
* A parsed buffer and how to use it
|
|
15422
15524
|
*/
|
|
@@ -15434,6 +15536,8 @@ declare namespace BABYLON {
|
|
|
15434
15536
|
safeOrbitCameraElevationMinMax?: [number, number];
|
|
15435
15537
|
upAxis?: "X" | "Y" | "Z";
|
|
15436
15538
|
chirality?: "LeftHanded" | "RightHanded";
|
|
15539
|
+
/** When set, the splats are to be uploaded as raw SOG textures and dequantized in the shader. */
|
|
15540
|
+
sogTextures?: ISogTexturePack;
|
|
15437
15541
|
}
|
|
15438
15542
|
|
|
15439
15543
|
|
|
@@ -15519,6 +15623,15 @@ declare namespace BABYLON {
|
|
|
15519
15623
|
* @returns Parsed data
|
|
15520
15624
|
*/
|
|
15521
15625
|
export function ParseSogMeta(dataOrFiles: SOGRootData | Map<string, Uint8Array>, rootUrl: string, scene: Scene): Promise<IParsedSplat>;
|
|
15626
|
+
/**
|
|
15627
|
+
* Parse SOG data and produce a set of GPU textures + dequantization parameters.
|
|
15628
|
+
* The shader will sample these raw RGBA8 textures and reconstruct positions/scales/rotations/colors/SH on the GPU.
|
|
15629
|
+
* @param dataOrFiles Either the SOGRootData or a Map of filenames to Uint8Array file data (including meta.json)
|
|
15630
|
+
* @param rootUrl Base URL to load webp files from (if dataOrFiles is SOGRootData)
|
|
15631
|
+
* @param scene The Babylon.js scene
|
|
15632
|
+
* @returns Parsed splat info with `sogTextures` populated.
|
|
15633
|
+
*/
|
|
15634
|
+
export function ParseSogMetaAsTextures(dataOrFiles: SOGRootData | Map<string, Uint8Array>, rootUrl: string, scene: Scene): Promise<IParsedSplat>;
|
|
15522
15635
|
|
|
15523
15636
|
|
|
15524
15637
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-loaders",
|
|
3
|
-
"version": "9.9.
|
|
3
|
+
"version": "9.9.2",
|
|
4
4
|
"main": "babylonjs.loaders.min.js",
|
|
5
5
|
"types": "babylonjs.loaders.module.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"test:escheck": "es-check es6 ./babylonjs.loaders.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"babylonjs": "9.9.
|
|
20
|
-
"babylonjs-gltf2interface": "9.9.
|
|
19
|
+
"babylonjs": "9.9.2",
|
|
20
|
+
"babylonjs-gltf2interface": "9.9.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@dev/build-tools": "1.0.0",
|