@playcanvas/splat-transform
Version:
Library and CLI tool for 3D Gaussian splat format conversion and transformation
47 lines (46 loc) • 1.29 kB
TypeScript
import { DataTable } from '../data-table';
import { type ReadFileSystem } from '../io/read';
type MetaV1 = {
means: {
shape: [number, number];
mins: number[];
maxs: number[];
files: string[];
};
scales: {
mins: number[];
maxs: number[];
files: string[];
};
quats: {
files: string[];
};
sh0: {
mins: number[];
maxs: number[];
files: string[];
};
shN?: {
shape?: [number, number];
mins: number;
maxs: number;
quantization?: number;
files: string[];
};
};
/**
* Read a legacy V1 SOG file from a ReadFileSystem.
*
* Called by readSog (in read-sog.ts) after it detects a V1 meta payload.
* Receives the already-parsed meta and the directory it was loaded from so
* we don't re-fetch the JSON.
*
* @param fileSystem - The file system to read texture files from
* @param baseDir - Directory containing the SOG textures (relative paths in
* meta are resolved from here)
* @param meta - The parsed V1 meta.json payload
* @returns DataTable with Gaussian splat data
* @ignore
*/
declare const readSogV1: (fileSystem: ReadFileSystem, baseDir: string, meta: MetaV1) => Promise<DataTable>;
export { readSogV1, type MetaV1 };