babylonjs-loaders 8.30.1 → 8.30.3

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.
@@ -6352,6 +6352,16 @@ declare module BABYLON {
6352
6352
 
6353
6353
 
6354
6354
 
6355
+ /**
6356
+ * Parses SPZ data and returns a promise resolving to an IParsedPLY object.
6357
+ * @param data The ArrayBuffer containing SPZ data.
6358
+ * @param scene The Babylon.js scene.
6359
+ * @param loadingOptions Options for loading Gaussian Splatting files.
6360
+ * @returns A promise resolving to the parsed SPZ data.
6361
+ */
6362
+ export function ParseSpz(data: ArrayBuffer, scene: Scene, loadingOptions: SPLATLoadingOptions): Promise<IParsedPLY>;
6363
+
6364
+
6355
6365
  /**
6356
6366
  * Options for loading Gaussian Splatting and PLY files
6357
6367
  */
@@ -6379,6 +6389,12 @@ declare module BABYLON {
6379
6389
  readonly ".spz": {
6380
6390
  readonly isBinary: true;
6381
6391
  };
6392
+ readonly ".json": {
6393
+ readonly isBinary: false;
6394
+ };
6395
+ readonly ".sog": {
6396
+ readonly isBinary: true;
6397
+ };
6382
6398
  };
6383
6399
  };
6384
6400
 
@@ -6415,6 +6431,12 @@ declare module BABYLON {
6415
6431
  readonly ".spz": {
6416
6432
  readonly isBinary: true;
6417
6433
  };
6434
+ readonly ".json": {
6435
+ readonly isBinary: false;
6436
+ };
6437
+ readonly ".sog": {
6438
+ readonly isBinary: true;
6439
+ };
6418
6440
  };
6419
6441
  /**
6420
6442
  * Creates loader for gaussian splatting files
@@ -6437,7 +6459,7 @@ declare module BABYLON {
6437
6459
  importMeshAsync(meshesNames: any, scene: Scene, data: any, rootUrl: string, _onProgress?: (event: ISceneLoaderProgressEvent) => void, _fileName?: string): Promise<ISceneLoaderAsyncResult>;
6438
6460
  private static _BuildPointCloud;
6439
6461
  private static _BuildMesh;
6440
- private _parseSPZAsync;
6462
+ private _unzipWithFFlateAsync;
6441
6463
  private _parseAsync;
6442
6464
  /**
6443
6465
  * Load into an asset container.
@@ -6466,6 +6488,114 @@ declare module BABYLON {
6466
6488
  }
6467
6489
 
6468
6490
 
6491
+ /**
6492
+ * Indicator of the parsed ply buffer. A standard ready to use splat or an array of positions for a point cloud
6493
+ */
6494
+ export enum Mode {
6495
+ Splat = 0,
6496
+ PointCloud = 1,
6497
+ Mesh = 2,
6498
+ Reject = 3
6499
+ }
6500
+ /**
6501
+ * A parsed buffer and how to use it
6502
+ */
6503
+ export interface IParsedPLY {
6504
+ data: ArrayBuffer;
6505
+ mode: Mode;
6506
+ faces?: number[];
6507
+ hasVertexColors?: boolean;
6508
+ sh?: Uint8Array[];
6509
+ trainedWithAntialiasing?: boolean;
6510
+ compressed?: boolean;
6511
+ rawSplat?: boolean;
6512
+ }
6513
+
6514
+
6515
+ /**
6516
+ * Definition of a SOG data file
6517
+ */
6518
+ export interface SOGDataFile {
6519
+ /**
6520
+ * index 0 is number of splats index 1 is number of components per splat (3 for vec3, 4 for vec4, etc.)
6521
+ */
6522
+ shape: number[];
6523
+ /**
6524
+ * type of components
6525
+ */
6526
+ dtype: string;
6527
+ /**
6528
+ * min range of data
6529
+ */
6530
+ mins?: number | number[];
6531
+ /**
6532
+ * max range of data
6533
+ */
6534
+ maxs?: number | number[];
6535
+ /**
6536
+ * palette for indexed data (quantized)
6537
+ */
6538
+ codebook?: number[];
6539
+ /**
6540
+ * type of encoding
6541
+ */
6542
+ encoding?: string;
6543
+ /**
6544
+ * number of bits for quantization (if any)
6545
+ */
6546
+ quantization?: number;
6547
+ /**
6548
+ * webp file names
6549
+ */
6550
+ files: string[];
6551
+ /**
6552
+ * SH band count (if applicable)
6553
+ */
6554
+ bands?: number;
6555
+ }
6556
+ /**
6557
+ * Definition of the root SOG data file
6558
+ */
6559
+ export interface SOGRootData {
6560
+ /**
6561
+ * version of the SOG format
6562
+ */
6563
+ version?: number;
6564
+ /**
6565
+ * mean positions of the splats
6566
+ */
6567
+ means: SOGDataFile;
6568
+ /**
6569
+ * scales of the splats
6570
+ */
6571
+ scales: SOGDataFile;
6572
+ /**
6573
+ * quaternions of the splats
6574
+ */
6575
+ quats: SOGDataFile;
6576
+ /**
6577
+ * SH0 coefficients of the splats (base color)
6578
+ */
6579
+ sh0: SOGDataFile;
6580
+ /**
6581
+ * Optional higher order SH coefficients of the splats (lighting information)
6582
+ */
6583
+ shN?: SOGDataFile;
6584
+ /**
6585
+ * number of splats (optional, can be inferred from means.shape[0])
6586
+ */
6587
+ count?: number;
6588
+ }
6589
+ /**
6590
+ * Parse SOG data from either a SOGRootData object (with webp files loaded from rootUrl) or from a Map of filenames to Uint8Array file data (including meta.json)
6591
+ * @param dataOrFiles Either the SOGRootData or a Map of filenames to Uint8Array file data (including meta.json)
6592
+ * @param rootUrl Base URL to load webp files from (if dataOrFiles is SOGRootData)
6593
+ * @param scene The Babylon.js scene
6594
+ * @returns Parsed data
6595
+ */
6596
+ export function ParseSogMeta(dataOrFiles: SOGRootData | Map<string, Uint8Array>, rootUrl: string, scene: Scene): Promise<IParsedPLY>;
6597
+
6598
+
6469
6599
 
6470
6600
 
6471
6601
  /**