@playcanvas/splat-transform 0.17.1 → 1.1.0

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.
Files changed (35) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.mjs +352 -5
  3. package/dist/cli.mjs.map +1 -1
  4. package/dist/index.cjs +5478 -0
  5. package/dist/index.cjs.map +1 -0
  6. package/dist/index.mjs +352 -5
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/lib/data-table/combine.d.ts +16 -0
  9. package/dist/lib/data-table/data-table.d.ts +48 -0
  10. package/dist/lib/data-table/summary.d.ts +33 -0
  11. package/dist/lib/data-table/transform.d.ts +19 -0
  12. package/dist/lib/index.d.cts +34 -0
  13. package/dist/lib/index.d.ts +4 -4
  14. package/dist/lib/io/read/index.d.ts +1 -1
  15. package/dist/lib/io/read/zip-file-system.d.ts +1 -1
  16. package/dist/lib/io/write/memory-file-system.d.ts +15 -0
  17. package/dist/lib/io/write/zip-file-system.d.ts +20 -0
  18. package/dist/lib/process.d.ts +96 -1
  19. package/dist/lib/read.d.ts +57 -1
  20. package/dist/lib/readers/read-ksplat.d.ts +11 -0
  21. package/dist/lib/readers/read-lcc.d.ts +13 -0
  22. package/dist/lib/readers/read-mjs.d.ts +12 -0
  23. package/dist/lib/readers/read-ply.d.ts +10 -0
  24. package/dist/lib/readers/read-sog.d.ts +1 -0
  25. package/dist/lib/readers/read-splat.d.ts +10 -0
  26. package/dist/lib/readers/read-spz.d.ts +12 -0
  27. package/dist/lib/types.d.ts +1 -0
  28. package/dist/lib/write.d.ts +57 -1
  29. package/dist/lib/writers/write-compressed-ply.d.ts +11 -0
  30. package/dist/lib/writers/write-csv.d.ts +10 -0
  31. package/dist/lib/writers/write-html.d.ts +10 -0
  32. package/dist/lib/writers/write-lod.d.ts +11 -0
  33. package/dist/lib/writers/write-ply.d.ts +10 -0
  34. package/dist/lib/writers/write-sog.d.ts +16 -1
  35. package/package.json +13 -4
@@ -1,3 +1,19 @@
1
1
  import { DataTable } from './data-table';
2
+ /**
3
+ * Combines multiple DataTables into a single DataTable.
4
+ *
5
+ * Merges rows from all input tables. Columns are matched by name and type;
6
+ * columns that don't exist in all tables will have undefined values for
7
+ * rows from tables lacking that column.
8
+ *
9
+ * @param dataTables - Array of DataTables to combine.
10
+ * @returns A new DataTable containing all rows from all input tables.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const combined = combine([tableA, tableB, tableC]);
15
+ * console.log(combined.numRows); // tableA.numRows + tableB.numRows + tableC.numRows
16
+ * ```
17
+ */
2
18
  declare const combine: (dataTables: DataTable[]) => DataTable;
3
19
  export { combine };
@@ -1,5 +1,23 @@
1
+ /**
2
+ * Union of all typed array types supported for column data.
3
+ */
1
4
  type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
5
+ /**
6
+ * String identifiers for typed array element types.
7
+ */
2
8
  type ColumnType = 'int8' | 'uint8' | 'int16' | 'uint16' | 'int32' | 'uint32' | 'float32' | 'float64';
9
+ /**
10
+ * A named column of typed array data within a DataTable.
11
+ *
12
+ * Columns store homogeneous numeric data efficiently using JavaScript typed arrays.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const positions = new Column('x', new Float32Array([1.0, 2.0, 3.0]));
17
+ * console.log(positions.name); // 'x'
18
+ * console.log(positions.dataType); // 'float32'
19
+ * ```
20
+ */
3
21
  declare class Column {
4
22
  name: string;
5
23
  data: TypedArray;
@@ -7,9 +25,39 @@ declare class Column {
7
25
  get dataType(): ColumnType | null;
8
26
  clone(): Column;
9
27
  }
28
+ /**
29
+ * A row object mapping column names to numeric values.
30
+ * @ignore
31
+ */
10
32
  type Row = {
11
33
  [colName: string]: number;
12
34
  };
35
+ /**
36
+ * A table of columnar data representing Gaussian splat properties.
37
+ *
38
+ * DataTable is the core data structure for splat data. Each column represents
39
+ * a property (e.g., position, rotation, color) as a typed array, and all columns
40
+ * must have the same number of rows.
41
+ *
42
+ * Standard columns include:
43
+ * - Position: `x`, `y`, `z`
44
+ * - Rotation: `rot_0`, `rot_1`, `rot_2`, `rot_3` (quaternion)
45
+ * - Scale: `scale_0`, `scale_1`, `scale_2` (log scale)
46
+ * - Color: `f_dc_0`, `f_dc_1`, `f_dc_2` (spherical harmonics DC)
47
+ * - Opacity: `opacity` (logit)
48
+ * - Spherical Harmonics: `f_rest_0` through `f_rest_44`
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const table = new DataTable([
53
+ * new Column('x', new Float32Array([0, 1, 2])),
54
+ * new Column('y', new Float32Array([0, 0, 0])),
55
+ * new Column('z', new Float32Array([0, 0, 0]))
56
+ * ]);
57
+ * console.log(table.numRows); // 3
58
+ * console.log(table.numColumns); // 3
59
+ * ```
60
+ */
13
61
  declare class DataTable {
14
62
  columns: Column[];
15
63
  constructor(columns: Column[]);
@@ -1,17 +1,50 @@
1
1
  import { DataTable } from './data-table';
2
+ /**
3
+ * Statistical summary for a single column.
4
+ */
2
5
  type ColumnStats = {
6
+ /** Minimum value (excluding NaN/Inf). */
3
7
  min: number;
8
+ /** Maximum value (excluding NaN/Inf). */
4
9
  max: number;
10
+ /** Median value. */
5
11
  median: number;
12
+ /** Arithmetic mean. */
6
13
  mean: number;
14
+ /** Standard deviation. */
7
15
  stdDev: number;
16
+ /** Count of NaN values. */
8
17
  nanCount: number;
18
+ /** Count of Infinity values. */
9
19
  infCount: number;
10
20
  };
21
+ /**
22
+ * Statistical summary for an entire DataTable.
23
+ */
11
24
  type SummaryData = {
25
+ /** Summary format version. */
12
26
  version: number;
27
+ /** Total number of rows. */
13
28
  rowCount: number;
29
+ /** Per-column statistics keyed by column name. */
14
30
  columns: Record<string, ColumnStats>;
15
31
  };
32
+ /**
33
+ * Computes statistical summary for all columns in a DataTable.
34
+ *
35
+ * For each column, calculates min, max, median, mean, standard deviation,
36
+ * and counts of NaN/Infinity values. Useful for data validation and analysis.
37
+ *
38
+ * @param dataTable - The DataTable to analyze.
39
+ * @returns Summary data with per-column statistics.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const summary = computeSummary(dataTable);
44
+ * console.log(summary.rowCount);
45
+ * console.log(summary.columns['x'].mean);
46
+ * console.log(summary.columns['opacity'].nanCount);
47
+ * ```
48
+ */
16
49
  declare const computeSummary: (dataTable: DataTable) => SummaryData;
17
50
  export { computeSummary, type ColumnStats, type SummaryData };
@@ -1,4 +1,23 @@
1
1
  import { Quat, Vec3 } from 'playcanvas';
2
2
  import { DataTable } from './data-table';
3
+ /**
4
+ * Applies a spatial transformation to splat data in-place.
5
+ *
6
+ * Transforms position, rotation, scale, and spherical harmonics data.
7
+ * The transformation is applied as: scale first, then rotation, then translation.
8
+ *
9
+ * @param dataTable - The DataTable to transform (modified in-place).
10
+ * @param t - Translation vector.
11
+ * @param r - Rotation quaternion.
12
+ * @param s - Uniform scale factor.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { Vec3, Quat } from 'playcanvas';
17
+ *
18
+ * // Scale by 2x, rotate 90° around Y, translate up
19
+ * transform(dataTable, new Vec3(0, 5, 0), new Quat().setFromEulerAngles(0, 90, 0), 2.0);
20
+ * ```
21
+ */
3
22
  declare const transform: (dataTable: DataTable, t: Vec3, r: Quat, s: number) => void;
4
23
  export { transform };
@@ -0,0 +1,34 @@
1
+ export { Column, DataTable } from './data-table/data-table';
2
+ export type { TypedArray, ColumnType, Row } from './data-table/data-table';
3
+ export { combine } from './data-table/combine';
4
+ export { transform } from './data-table/transform';
5
+ export { computeSummary } from './data-table/summary';
6
+ export type { ColumnStats, SummaryData } from './data-table/summary';
7
+ export { readFile, getInputFormat } from './read';
8
+ export type { InputFormat, ReadFileOptions } from './read';
9
+ export { writeFile, getOutputFormat } from './write';
10
+ export type { OutputFormat, WriteOptions } from './write';
11
+ export { processDataTable } from './process';
12
+ export type { ProcessAction, Translate, Rotate, Scale, FilterNaN, FilterByValue, FilterBands, FilterBox, FilterSphere, Param as ProcessParam, Lod, Summary } from './process';
13
+ export { ReadStream, MemoryReadFileSystem, UrlReadFileSystem, ZipReadFileSystem } from './io/read';
14
+ export type { ReadSource, ReadFileSystem, ProgressCallback, ZipEntry } from './io/read';
15
+ export { MemoryFileSystem, ZipFileSystem } from './io/write';
16
+ export type { FileSystem, Writer } from './io/write';
17
+ export { readKsplat } from './readers/read-ksplat';
18
+ export { readLcc } from './readers/read-lcc';
19
+ export { readMjs } from './readers/read-mjs';
20
+ export { readPly } from './readers/read-ply';
21
+ export { readSog } from './readers/read-sog';
22
+ export { readSplat } from './readers/read-splat';
23
+ export { readSpz } from './readers/read-spz';
24
+ export { writeSog } from './writers/write-sog';
25
+ export type { DeviceCreator } from './writers/write-sog';
26
+ export { writePly } from './writers/write-ply';
27
+ export { writeCompressedPly } from './writers/write-compressed-ply';
28
+ export { writeCsv } from './writers/write-csv';
29
+ export { writeHtml } from './writers/write-html';
30
+ export { writeLod } from './writers/write-lod';
31
+ export type { Options, Param } from './types';
32
+ export { logger } from './utils/logger';
33
+ export type { Logger } from './utils/logger';
34
+ export { WebPCodec } from './utils/webp-codec';
@@ -5,13 +5,13 @@ export { transform } from './data-table/transform';
5
5
  export { computeSummary } from './data-table/summary';
6
6
  export type { ColumnStats, SummaryData } from './data-table/summary';
7
7
  export { readFile, getInputFormat } from './read';
8
- export type { InputFormat } from './read';
8
+ export type { InputFormat, ReadFileOptions } from './read';
9
9
  export { writeFile, getOutputFormat } from './write';
10
- export type { OutputFormat } from './write';
10
+ export type { OutputFormat, WriteOptions } from './write';
11
11
  export { processDataTable } from './process';
12
- export type { ProcessAction } from './process';
12
+ export type { ProcessAction, Translate, Rotate, Scale, FilterNaN, FilterByValue, FilterBands, FilterBox, FilterSphere, Param as ProcessParam, Lod, Summary } from './process';
13
13
  export { ReadStream, MemoryReadFileSystem, UrlReadFileSystem, ZipReadFileSystem } from './io/read';
14
- export type { ReadSource, ReadFileSystem, ProgressCallback } from './io/read';
14
+ export type { ReadSource, ReadFileSystem, ProgressCallback, ZipEntry } from './io/read';
15
15
  export { MemoryFileSystem, ZipFileSystem } from './io/write';
16
16
  export type { FileSystem, Writer } from './io/write';
17
17
  export { readKsplat } from './readers/read-ksplat';
@@ -2,4 +2,4 @@ export { ReadStream, type ReadSource, type ReadFileSystem, type ProgressCallback
2
2
  export { dirname, join } from 'pathe';
3
3
  export { MemoryReadFileSystem } from './memory-file-system';
4
4
  export { UrlReadFileSystem } from './url-file-system';
5
- export { ZipReadFileSystem } from './zip-file-system';
5
+ export { ZipReadFileSystem, type ZipEntry } from './zip-file-system';
@@ -48,4 +48,4 @@ declare class ZipReadFileSystem implements ReadFileSystem {
48
48
  */
49
49
  close(): void;
50
50
  }
51
- export { ZipReadFileSystem };
51
+ export { ZipReadFileSystem, type ZipEntry };
@@ -1,4 +1,19 @@
1
1
  import { type FileSystem, type Writer } from './file-system';
2
+ /**
3
+ * A file system that writes files to in-memory buffers.
4
+ *
5
+ * Useful for generating output without writing to disk, such as when
6
+ * creating data for download or further processing.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const fs = new MemoryFileSystem();
11
+ * await writeFile({ filename: 'output.ply', ... }, fs);
12
+ *
13
+ * // Get the generated data
14
+ * const data = fs.results.get('output.ply');
15
+ * ```
16
+ */
2
17
  declare class MemoryFileSystem implements FileSystem {
3
18
  results: Map<string, Uint8Array>;
4
19
  createWriter(filename: string): Writer;
@@ -1,4 +1,24 @@
1
1
  import { type FileSystem, type Writer } from './file-system';
2
+ /**
3
+ * A file system that writes files into a ZIP archive.
4
+ *
5
+ * Creates a ZIP file containing all written files. Used internally
6
+ * for bundled output formats like .sog files.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * const outputWriter = await fs.createWriter('bundle.zip');
11
+ * const zipFs = new ZipFileSystem(outputWriter);
12
+ *
13
+ * // Write files into the zip
14
+ * const writer = await zipFs.createWriter('data.json');
15
+ * await writer.write(jsonData);
16
+ * await writer.close();
17
+ *
18
+ * // Finalize the zip
19
+ * await zipFs.close();
20
+ * ```
21
+ */
2
22
  declare class ZipFileSystem implements FileSystem {
3
23
  close: () => Promise<void>;
4
24
  createWriter: (filename: string) => Promise<Writer>;
@@ -1,52 +1,147 @@
1
1
  import { Vec3 } from 'playcanvas';
2
2
  import { DataTable } from './data-table/data-table';
3
+ /**
4
+ * Translate splats by a 3D vector offset.
5
+ */
3
6
  type Translate = {
7
+ /** Action type identifier. */
4
8
  kind: 'translate';
9
+ /** Translation offset. */
5
10
  value: Vec3;
6
11
  };
12
+ /**
13
+ * Rotate splats by Euler angles.
14
+ */
7
15
  type Rotate = {
16
+ /** Action type identifier. */
8
17
  kind: 'rotate';
18
+ /** Euler angles in degrees (x, y, z). */
9
19
  value: Vec3;
10
20
  };
21
+ /**
22
+ * Uniformly scale all splats.
23
+ */
11
24
  type Scale = {
25
+ /** Action type identifier. */
12
26
  kind: 'scale';
27
+ /** Scale factor. */
13
28
  value: number;
14
29
  };
30
+ /**
31
+ * Remove splats containing NaN or Infinity values.
32
+ */
15
33
  type FilterNaN = {
34
+ /** Action type identifier. */
16
35
  kind: 'filterNaN';
17
36
  };
37
+ /**
38
+ * Filter splats by comparing a column value.
39
+ */
18
40
  type FilterByValue = {
41
+ /** Action type identifier. */
19
42
  kind: 'filterByValue';
43
+ /** Name of the column to compare. */
20
44
  columnName: string;
45
+ /** Comparison operator. */
21
46
  comparator: 'lt' | 'lte' | 'gt' | 'gte' | 'eq' | 'neq';
47
+ /** Value to compare against. */
22
48
  value: number;
23
49
  };
50
+ /**
51
+ * Remove spherical harmonic bands above a threshold.
52
+ */
24
53
  type FilterBands = {
54
+ /** Action type identifier. */
25
55
  kind: 'filterBands';
56
+ /** Maximum SH band to keep (0-3). */
26
57
  value: 0 | 1 | 2 | 3;
27
58
  };
59
+ /**
60
+ * Keep only splats within a bounding box.
61
+ */
28
62
  type FilterBox = {
63
+ /** Action type identifier. */
29
64
  kind: 'filterBox';
65
+ /** Minimum corner of the box. */
30
66
  min: Vec3;
67
+ /** Maximum corner of the box. */
31
68
  max: Vec3;
32
69
  };
70
+ /**
71
+ * Keep only splats within a sphere.
72
+ */
33
73
  type FilterSphere = {
74
+ /** Action type identifier. */
34
75
  kind: 'filterSphere';
76
+ /** Center of the sphere. */
35
77
  center: Vec3;
78
+ /** Radius of the sphere. */
36
79
  radius: number;
37
80
  };
81
+ /**
82
+ * Parameter for .mjs generator modules.
83
+ */
38
84
  type Param = {
85
+ /** Action type identifier. */
39
86
  kind: 'param';
87
+ /** Parameter name. */
40
88
  name: string;
89
+ /** Parameter value. */
41
90
  value: string;
42
91
  };
92
+ /**
93
+ * Assign a LOD level to all splats.
94
+ */
43
95
  type Lod = {
96
+ /** Action type identifier. */
44
97
  kind: 'lod';
98
+ /** LOD level to assign. */
45
99
  value: number;
46
100
  };
101
+ /**
102
+ * Print a statistical summary to the logger.
103
+ */
47
104
  type Summary = {
105
+ /** Action type identifier. */
48
106
  kind: 'summary';
49
107
  };
108
+ /**
109
+ * A processing action to apply to splat data.
110
+ *
111
+ * Actions can transform, filter, or analyze the data:
112
+ * - `translate` - Move splats by a Vec3 offset
113
+ * - `rotate` - Rotate splats by Euler angles (degrees)
114
+ * - `scale` - Uniformly scale splats
115
+ * - `filterNaN` - Remove splats with NaN/Inf values
116
+ * - `filterByValue` - Keep splats matching a column condition
117
+ * - `filterBands` - Remove spherical harmonic bands above a threshold
118
+ * - `filterBox` - Keep splats within a bounding box
119
+ * - `filterSphere` - Keep splats within a sphere
120
+ * - `lod` - Assign LOD level to all splats
121
+ * - `summary` - Print statistical summary to logger
122
+ */
50
123
  type ProcessAction = Translate | Rotate | Scale | FilterNaN | FilterByValue | FilterBands | FilterBox | FilterSphere | Param | Lod | Summary;
124
+ /**
125
+ * Applies a sequence of processing actions to splat data.
126
+ *
127
+ * Actions are applied in order and can include transformations (translate, rotate, scale),
128
+ * filters (NaN, value, box, sphere, bands), and analysis (summary).
129
+ *
130
+ * @param dataTable - The input splat data.
131
+ * @param processActions - Array of actions to apply in sequence.
132
+ * @returns The processed DataTable (may be a new instance if filtered).
133
+ *
134
+ * @example
135
+ * ```ts
136
+ * import { Vec3 } from 'playcanvas';
137
+ *
138
+ * const processed = processDataTable(dataTable, [
139
+ * { kind: 'scale', value: 0.5 },
140
+ * { kind: 'translate', value: new Vec3(0, 1, 0) },
141
+ * { kind: 'filterNaN' },
142
+ * { kind: 'filterByValue', columnName: 'opacity', comparator: 'gt', value: 0.1 }
143
+ * ]);
144
+ * ```
145
+ */
51
146
  declare const processDataTable: (dataTable: DataTable, processActions: ProcessAction[]) => DataTable;
52
- export { ProcessAction, processDataTable };
147
+ export { processDataTable, type ProcessAction, type Translate, type Rotate, type Scale, type FilterNaN, type FilterByValue, type FilterBands, type FilterBox, type FilterSphere, type Param, type Lod, type Summary };
@@ -1,14 +1,70 @@
1
1
  import { DataTable } from './data-table/data-table';
2
2
  import { ReadFileSystem } from './io/read';
3
3
  import { Options, Param } from './types';
4
+ /**
5
+ * Supported input file formats for Gaussian splat data.
6
+ *
7
+ * - `ply` - PLY format (standard 3DGS training output)
8
+ * - `splat` - Antimatter15 splat format
9
+ * - `ksplat` - Kevin Kwok's compressed splat format
10
+ * - `spz` - Niantic Labs compressed format
11
+ * - `sog` - PlayCanvas SOG format (WebP-compressed)
12
+ * - `lcc` - XGrids LCC format
13
+ * - `mjs` - JavaScript module generator
14
+ */
4
15
  type InputFormat = 'mjs' | 'ksplat' | 'splat' | 'sog' | 'ply' | 'spz' | 'lcc';
16
+ /**
17
+ * Determines the input format based on file extension.
18
+ *
19
+ * @param filename - The filename to analyze.
20
+ * @returns The detected input format.
21
+ * @throws Error if the file extension is not recognized.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const format = getInputFormat('scene.ply'); // returns 'ply'
26
+ * const format2 = getInputFormat('scene.splat'); // returns 'splat'
27
+ * ```
28
+ */
5
29
  declare const getInputFormat: (filename: string) => InputFormat;
30
+ /**
31
+ * Options for reading a Gaussian splat file.
32
+ */
6
33
  type ReadFileOptions = {
34
+ /** Path to the input file. */
7
35
  filename: string;
36
+ /** The format of the input file. */
8
37
  inputFormat: InputFormat;
38
+ /** Processing options. */
9
39
  options: Options;
40
+ /** Parameters for generator modules (.mjs files). */
10
41
  params: Param[];
42
+ /** File system abstraction for reading files. */
11
43
  fileSystem: ReadFileSystem;
12
44
  };
45
+ /**
46
+ * Reads a Gaussian splat file and returns its data as one or more DataTables.
47
+ *
48
+ * Supports multiple input formats including PLY, splat, ksplat, spz, SOG, and LCC.
49
+ * Some formats (like LCC) may return multiple DataTables for different LOD levels.
50
+ *
51
+ * @param readFileOptions - Options specifying the file to read and how to read it.
52
+ * @returns Promise resolving to an array of DataTables containing the splat data.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * import { readFile, getInputFormat, UrlReadFileSystem } from '@playcanvas/splat-transform';
57
+ *
58
+ * const filename = 'scene.ply';
59
+ * const fileSystem = new UrlReadFileSystem('https://example.com/');
60
+ * const tables = await readFile({
61
+ * filename,
62
+ * inputFormat: getInputFormat(filename),
63
+ * options: {},
64
+ * params: [],
65
+ * fileSystem
66
+ * });
67
+ * ```
68
+ */
13
69
  declare const readFile: (readFileOptions: ReadFileOptions) => Promise<DataTable[]>;
14
- export { readFile, getInputFormat, type InputFormat };
70
+ export { readFile, getInputFormat, type InputFormat, type ReadFileOptions };
@@ -1,4 +1,15 @@
1
1
  import { DataTable } from '../data-table/data-table';
2
2
  import { ReadSource } from '../io/read';
3
+ /**
4
+ * Reads a .ksplat file containing compressed Gaussian splat data.
5
+ *
6
+ * The .ksplat format (Kevin Kwok's format) uses spatial bucketing and
7
+ * quantization to achieve high compression ratios while preserving quality.
8
+ * Supports multiple compression modes and spherical harmonics bands.
9
+ *
10
+ * @param source - The read source providing access to the .ksplat file data.
11
+ * @returns Promise resolving to a DataTable containing the splat data.
12
+ * @ignore
13
+ */
3
14
  declare const readKsplat: (source: ReadSource) => Promise<DataTable>;
4
15
  export { readKsplat };
@@ -1,5 +1,18 @@
1
1
  import { DataTable } from '../data-table/data-table';
2
2
  import { ReadFileSystem } from '../io/read';
3
3
  import { Options } from '../types';
4
+ /**
5
+ * Reads an XGrids LCC format containing multi-LOD Gaussian splat data.
6
+ *
7
+ * The LCC format uses a quadtree spatial structure with multiple LOD levels.
8
+ * Each LOD level is stored separately in data.bin with optional spherical
9
+ * harmonics in shcoef.bin. Environment splats are stored in environment.bin.
10
+ *
11
+ * @param fileSystem - File system for reading the LCC files.
12
+ * @param filename - Path to the meta.lcc file.
13
+ * @param options - Options including LOD selection via `lodSelect`.
14
+ * @returns Promise resolving to an array of DataTables, one per LOD level plus environment.
15
+ * @ignore
16
+ */
4
17
  declare const readLcc: (fileSystem: ReadFileSystem, filename: string, options: Options) => Promise<DataTable[]>;
5
18
  export { readLcc };
@@ -1,4 +1,16 @@
1
1
  import { DataTable } from '../data-table/data-table';
2
2
  import { Param } from '../types';
3
+ /**
4
+ * Reads splat data from a JavaScript module generator.
5
+ *
6
+ * The module must export a `Generator` class with a static `create(params)` method
7
+ * that returns an object with `count`, `columnNames`, and `getRow(index, row)` properties.
8
+ * This allows programmatic generation of splat data.
9
+ *
10
+ * @param moduleUrl - URL or path to the JavaScript module.
11
+ * @param params - Parameters to pass to the generator's create method.
12
+ * @returns Promise resolving to a DataTable containing the generated splat data.
13
+ * @ignore
14
+ */
3
15
  declare const readMjs: (moduleUrl: string, params: Param[]) => Promise<DataTable>;
4
16
  export { readMjs };
@@ -7,5 +7,15 @@ type PlyData = {
7
7
  dataTable: DataTable;
8
8
  }[];
9
9
  };
10
+ /**
11
+ * Reads a PLY file containing Gaussian splat data.
12
+ *
13
+ * Supports both standard PLY files and compressed PLY format. The PLY format is
14
+ * the standard output from 3D Gaussian Splatting training pipelines.
15
+ *
16
+ * @param source - The read source providing access to the PLY file data.
17
+ * @returns Promise resolving to a DataTable containing the splat data.
18
+ * @ignore
19
+ */
10
20
  declare const readPly: (source: ReadSource) => Promise<DataTable>;
11
21
  export { PlyData, readPly };
@@ -5,6 +5,7 @@ import { ReadFileSystem } from '../io/read';
5
5
  * @param fileSystem - The file system to read from
6
6
  * @param filename - Path to meta.json (relative paths resolved from its directory)
7
7
  * @returns DataTable with Gaussian splat data
8
+ * @ignore
8
9
  */
9
10
  declare const readSog: (fileSystem: ReadFileSystem, filename: string) => Promise<DataTable>;
10
11
  export { readSog };
@@ -1,4 +1,14 @@
1
1
  import { DataTable } from '../data-table/data-table';
2
2
  import { ReadSource } from '../io/read';
3
+ /**
4
+ * Reads an Antimatter15 .splat file containing Gaussian splat data.
5
+ *
6
+ * The .splat format stores each splat as 32 bytes with position, scale, color,
7
+ * opacity, and rotation data in a compact binary format.
8
+ *
9
+ * @param source - The read source providing access to the .splat file data.
10
+ * @returns Promise resolving to a DataTable containing the splat data.
11
+ * @ignore
12
+ */
3
13
  declare const readSplat: (source: ReadSource) => Promise<DataTable>;
4
14
  export { readSplat };
@@ -1,4 +1,16 @@
1
1
  import { DataTable } from '../data-table/data-table';
2
2
  import { ReadSource } from '../io/read';
3
+ /**
4
+ * Reads a .spz file containing Niantic Labs compressed Gaussian splat data.
5
+ *
6
+ * The .spz format uses GZIP compression and fixed-point encoding to achieve
7
+ * compact file sizes. Supports version 2 and 3 of the format.
8
+ *
9
+ * @see https://github.com/nianticlabs/spz
10
+ *
11
+ * @param source - The read source providing access to the .spz file data.
12
+ * @returns Promise resolving to a DataTable containing the splat data.
13
+ * @ignore
14
+ */
3
15
  declare const readSpz: (source: ReadSource) => Promise<DataTable>;
4
16
  export { readSpz };
@@ -17,6 +17,7 @@ type Options = {
17
17
  };
18
18
  /**
19
19
  * Parameter passed to MJS generator scripts.
20
+ * @ignore
20
21
  */
21
22
  type Param = {
22
23
  name: string;