@playcanvas/splat-transform
Version:
Library and CLI tool for 3D Gaussian splat format conversion and transformation
36 lines (35 loc) • 1.2 kB
TypeScript
import { type ReadFileSystem, type ProgressCallback, type ReadSource, ReadStream } from './file-system';
/**
* ReadSource implementation wrapping a Uint8Array or ArrayBuffer.
* Size is always exact. Always seekable.
*/
declare class MemoryReadSource implements ReadSource {
readonly size: number;
readonly seekable: boolean;
private data;
private closed;
constructor(data: Uint8Array | ArrayBuffer);
read(start?: number, end?: number): ReadStream;
close(): void;
}
/**
* ReadFileSystem for reading from named memory buffers.
* Useful for testing or when data is already in memory.
*/
declare class MemoryReadFileSystem implements ReadFileSystem {
private buffers;
/**
* Store a named buffer.
* @param name - Name/path for the buffer
* @param data - Data to store
*/
set(name: string, data: Uint8Array): void;
/**
* Get a stored buffer by name.
* @param name - Name/path of the buffer
* @returns The stored data or undefined
*/
get(name: string): Uint8Array | undefined;
createSource(filename: string, progress?: ProgressCallback): Promise<ReadSource>;
}
export { MemoryReadFileSystem, MemoryReadSource };