import { type SplatRequestOptions, type StreamedSplatFormat } from '../loaders/loading'; /** * Where a streamed dataset's files come from. * * A streamed scene is never one file: it is a manifest plus sidecars and chunk * files that the manifest names *relatively* (`data.bin`, `data/3dgs/x.sog`, * `0_0/meta.json`). Over HTTP those resolve against the manifest's URL; from a * dropped folder there is no URL to resolve against, only `File` objects. * * This is the seam between the two. Everything downstream - including the * worker's ranged chunk reads - keeps working on plain URLs, because a * dropped file's `blob:` URL answers `Range` with a real 206 (verified on * Chromium/WebKit/Gecko), so only *name resolution* has to differ. */ export interface SplatDatasetSource { /** Fetchable URL of the manifest itself. */ readonly manifestUrl: string; /** Fetchable URL for a dataset-relative path, or null when absent. */ resolve(path: string): string | null; /** Byte length of a file, or null when absent. Cancellation rejects with AbortError. */ size(path: string, options?: { signal?: AbortSignal; }): Promise; /** * The files inside a chunk *directory* (unbundled SOG), as * `name → fetchable URL`. Null when the chunk should be fetched by URL * instead - the HTTP case, where the directory is a real path. */ directoryFiles(path: string): Record | null; /** Releases any resources held for this dataset (e.g. blob URLs). */ dispose(): void; } /** A dataset served over HTTP, resolved against the manifest's URL. */ export declare function httpDatasetSource(manifestUrl: string, request?: SplatRequestOptions): SplatDatasetSource; /** A dataset picked out of a dropped folder. */ export interface LocalDataset { readonly source: SplatDatasetSource; /** The streamed format the folder's manifest identifies it as. */ readonly format: Exclude; /** The manifest's file name, for display. */ readonly name: string; } /** * Builds a dataset from a dropped folder's files, keyed by their paths * relative to the folder root. * * Every file gets a `blob:` URL, so the rest of the pipeline - including the * worker's ranged reads into a multi-hundred-megabyte `data.bin` - is * identical to the HTTP path. Nothing is copied or read here: a blob URL is a * handle to the file on disk, so a 300 MB `data.bin` costs nothing until a * chunk actually reads a range out of it. * * @throws {SplatLoadError} with `phase: 'manifest'` when the folder holds no * recognizable manifest, or more than one (which would make the choice * arbitrary). Neither is retryable: the same folder fails the same way. */ export declare function createLocalDataset(files: ReadonlyMap): LocalDataset;