Bump dist build

This commit is contained in:
sparkjsdev[bot]
2025-06-30 16:00:19 +00:00
parent 36c3c61d0b
commit ca9e50ce4b
18 changed files with 5265 additions and 4918 deletions
+45 -2
View File
@@ -4,22 +4,65 @@ import { SplatMesh } from './SplatMesh';
export declare class SplatLoader extends Loader {
fileLoader: FileLoader;
fileType?: SplatFileType;
packedSplats?: PackedSplats;
constructor(manager?: LoadingManager);
load(url: string, onLoad?: (decoded: PackedSplats) => void, onProgress?: (event: ProgressEvent) => void, onError?: (error: unknown) => void): void;
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<PackedSplats>;
loadExtra(url: string): Promise<ArrayBuffer>;
parse(packedSplats: PackedSplats): SplatMesh;
}
export declare enum SplatFileType {
PLY = "ply",
SPZ = "spz",
SPLAT = "splat",
KSPLAT = "ksplat"
KSPLAT = "ksplat",
PCSOGS = "pcsogs"
}
export declare function getSplatFileType(fileBytes: Uint8Array): SplatFileType | undefined;
export declare function getFileExtension(pathOrUrl: string): string;
export declare function getSplatFileTypeFromPath(pathOrUrl: string): SplatFileType | undefined;
export declare function unpackSplats({ input, fileType, pathOrUrl, }: {
export type PcSogsJson = {
means: {
shape: number[];
dtype: string;
mins: number[];
maxs: number[];
files: string[];
};
scales: {
shape: number[];
dtype: string;
mins: number[];
maxs: number[];
files: string[];
};
quats: {
shape: number[];
dtype: string;
encoding?: string;
files: string[];
};
sh0: {
shape: number[];
dtype: string;
mins: number[];
maxs: number[];
files: string[];
};
shN: {
shape: number[];
dtype: string;
mins: number;
maxs: number;
quantization: number;
files: string[];
};
};
export declare function isPcSogs(input: ArrayBuffer | Uint8Array | string): boolean;
export declare function tryPcSogs(input: ArrayBuffer | Uint8Array | string): PcSogsJson | undefined;
export declare function unpackSplats({ input, extraFiles, fileType, pathOrUrl, }: {
input: Uint8Array | ArrayBuffer;
extraFiles?: Record<string, ArrayBuffer>;
fileType?: SplatFileType;
pathOrUrl?: string;
}): Promise<{
+1 -1
View File
@@ -1,7 +1,7 @@
export { SparkRenderer, type SparkRendererOptions } from './SparkRenderer';
export { SparkViewpoint, type SparkViewpointOptions } from './SparkViewpoint';
export * as dyno from './dyno';
export { SplatLoader, unpackSplats, SplatFileType, getSplatFileType, } from './SplatLoader';
export { SplatLoader, unpackSplats, SplatFileType, getSplatFileType, isPcSogs, } from './SplatLoader';
export { PlyReader } from './ply';
export { SpzReader, SpzWriter, transcodeSpz } from './spz';
export { PackedSplats, type PackedSplatsOptions } from './PackedSplats';
+5
View File
@@ -0,0 +1,5 @@
export declare function unpackPcSogs(fileBytes: Uint8Array, extraFiles: Record<string, ArrayBuffer>): Promise<{
packedArray: Uint32Array;
numSplats: number;
extra: Record<string, unknown>;
}>;
+1
View File
@@ -43,6 +43,7 @@ export declare function setPackedSplat(packedSplats: Uint32Array, index: number,
export declare function setPackedSplatCenter(packedSplats: Uint32Array, index: number, x: number, y: number, z: number): void;
export declare function setPackedSplatScales(packedSplats: Uint32Array, index: number, scaleX: number, scaleY: number, scaleZ: number): void;
export declare function setPackedSplatQuat(packedSplats: Uint32Array, index: number, quatX: number, quatY: number, quatZ: number, quatW: number): void;
export declare function setPackedSplatRgba(packedSplats: Uint32Array, index: number, r: number, g: number, b: number, a: number): void;
export declare function setPackedSplatRgb(packedSplats: Uint32Array, index: number, r: number, g: number, b: number): void;
export declare function setPackedSplatOpacity(packedSplats: Uint32Array, index: number, opacity: number): void;
export declare function unpackSplat(packedSplats: Uint32Array, index: number): {