mirror of
https://github.com/storytold/spark.git
synced 2026-10-09 00:09:53 +00:00
Bump dist build
This commit is contained in:
Vendored
+45
-2
@@ -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<{
|
||||
|
||||
Vendored
+1
-1
@@ -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';
|
||||
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
export declare function unpackPcSogs(fileBytes: Uint8Array, extraFiles: Record<string, ArrayBuffer>): Promise<{
|
||||
packedArray: Uint32Array;
|
||||
numSplats: number;
|
||||
extra: Record<string, unknown>;
|
||||
}>;
|
||||
Vendored
+1
@@ -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): {
|
||||
|
||||
Reference in New Issue
Block a user