gaussian-splat-lite 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -2
- package/CONTRIBUTING.md +4 -2
- package/README.md +4 -3
- package/dist/gaussian-splat-lite.cjs +6379 -1441
- package/dist/gaussian-splat-lite.cjs.map +1 -1
- package/dist/gaussian-splat-lite.min.cjs +978 -11
- package/dist/gaussian-splat-lite.min.cjs.map +1 -1
- package/dist/gaussian-splat-lite.module.js +5920 -982
- package/dist/gaussian-splat-lite.module.js.map +1 -1
- package/dist/gaussian-splat-lite.module.min.js +7882 -3373
- package/dist/gaussian-splat-lite.module.min.js.map +1 -1
- package/dist/types/addons/NeuralDenoiseNode.d.cts +72 -0
- package/dist/types/addons/NeuralDenoiseNode.d.ts +72 -0
- package/dist/types/addons/NeuralDenoisePass.d.cts +34 -0
- package/dist/types/addons/NeuralDenoisePass.d.ts +34 -0
- package/dist/types/addons/TAANode.d.cts +46 -33
- package/dist/types/addons/TAANode.d.ts +46 -33
- package/dist/types/addons/TAAPass.d.cts +47 -32
- package/dist/types/addons/TAAPass.d.ts +47 -32
- package/dist/types/addons/neuralDenoiseGL.d.cts +25 -0
- package/dist/types/addons/neuralDenoiseGL.d.ts +25 -0
- package/dist/types/addons/neuralDenoiseGLSL.d.cts +8 -0
- package/dist/types/addons/neuralDenoiseGLSL.d.ts +8 -0
- package/dist/types/addons/neuralDenoisePasses.d.cts +26 -0
- package/dist/types/addons/neuralDenoisePasses.d.ts +26 -0
- package/dist/types/addons/neuralDenoiseShaders.d.cts +38 -0
- package/dist/types/addons/neuralDenoiseShaders.d.ts +38 -0
- package/dist/types/addons/neuralDenoiseWeights.d.cts +118 -0
- package/dist/types/addons/neuralDenoiseWeights.d.ts +118 -0
- package/dist/types/addons/stochasticCoverage.d.cts +14 -0
- package/dist/types/addons/stochasticCoverage.d.ts +14 -0
- package/dist/types/addons/taaShared.d.cts +58 -39
- package/dist/types/addons/taaShared.d.ts +58 -39
- package/dist/types/capture/SplatCapture.d.cts +54 -53
- package/dist/types/capture/SplatCapture.d.ts +54 -53
- package/dist/types/capture/WebGLCapture.d.cts +10 -10
- package/dist/types/capture/WebGLCapture.d.ts +10 -10
- package/dist/types/capture/WebGPUCapture.d.cts +14 -14
- package/dist/types/capture/WebGPUCapture.d.ts +14 -14
- package/dist/types/capture/pixels.d.cts +15 -4
- package/dist/types/capture/pixels.d.ts +15 -4
- package/dist/types/capture/rendererState.d.cts +5 -2
- package/dist/types/capture/rendererState.d.ts +5 -2
- package/dist/types/data/IndexedSplats.d.cts +76 -58
- package/dist/types/data/IndexedSplats.d.ts +76 -58
- package/dist/types/data/RadPagedSplats.d.cts +65 -61
- package/dist/types/data/RadPagedSplats.d.ts +65 -61
- package/dist/types/data/SogRegionSplats.d.cts +25 -19
- package/dist/types/data/SogRegionSplats.d.ts +25 -19
- package/dist/types/data/SplatOpacityTable.d.cts +29 -29
- package/dist/types/data/SplatOpacityTable.d.ts +29 -29
- package/dist/types/data/Splats.d.cts +99 -69
- package/dist/types/data/Splats.d.ts +99 -69
- package/dist/types/data/defines.d.cts +24 -24
- package/dist/types/data/defines.d.ts +24 -24
- package/dist/types/data/raycast.d.cts +13 -9
- package/dist/types/data/raycast.d.ts +13 -9
- package/dist/types/data/splatCodec.d.cts +29 -5
- package/dist/types/data/splatCodec.d.ts +29 -5
- package/dist/types/data/splatData.d.cts +18 -11
- package/dist/types/data/splatData.d.ts +18 -11
- package/dist/types/data/splatRange.d.cts +6 -2
- package/dist/types/data/splatRange.d.ts +6 -2
- package/dist/types/data/textureLayout.d.cts +9 -6
- package/dist/types/data/textureLayout.d.ts +9 -6
- package/dist/types/data/unpack.d.cts +16 -9
- package/dist/types/data/unpack.d.ts +16 -9
- package/dist/types/index.d.cts +65 -19
- package/dist/types/index.d.ts +65 -19
- package/dist/types/loaders/SplatLoader.d.cts +27 -14
- package/dist/types/loaders/SplatLoader.d.ts +27 -14
- package/dist/types/loaders/loadSplatData.d.cts +35 -17
- package/dist/types/loaders/loadSplatData.d.ts +35 -17
- package/dist/types/loaders/loadTypes.d.cts +46 -40
- package/dist/types/loaders/loadTypes.d.ts +46 -40
- package/dist/types/loaders/morton.d.cts +9 -3
- package/dist/types/loaders/morton.d.ts +9 -3
- package/dist/types/loaders/postDecode/builder.d.cts +222 -127
- package/dist/types/loaders/postDecode/builder.d.ts +222 -127
- package/dist/types/loaders/postDecode/compiler.d.cts +25 -11
- package/dist/types/loaders/postDecode/compiler.d.ts +25 -11
- package/dist/types/loaders/postDecode/operations.d.cts +22 -3
- package/dist/types/loaders/postDecode/operations.d.ts +22 -3
- package/dist/types/loaders/postDecode/optimizer.d.cts +5 -2
- package/dist/types/loaders/postDecode/optimizer.d.ts +5 -2
- package/dist/types/loaders/postDecode/program.d.cts +13 -6
- package/dist/types/loaders/postDecode/program.d.ts +13 -6
- package/dist/types/loaders/postDecode/protocol.d.cts +136 -111
- package/dist/types/loaders/postDecode/protocol.d.ts +136 -111
- package/dist/types/loaders/postDecode/registers.d.cts +12 -7
- package/dist/types/loaders/postDecode/registers.d.ts +12 -7
- package/dist/types/loaders/postDecode/runtime.d.cts +9 -2
- package/dist/types/loaders/postDecode/runtime.d.ts +9 -2
- package/dist/types/loaders/rad/RadSource.d.cts +81 -66
- package/dist/types/loaders/rad/RadSource.d.ts +81 -66
- package/dist/types/loaders/rad/radFormat.d.cts +41 -36
- package/dist/types/loaders/rad/radFormat.d.ts +41 -36
- package/dist/types/loaders/rad.d.cts +4 -4
- package/dist/types/loaders/rad.d.ts +4 -4
- package/dist/types/loaders/sog/SogSource.d.cts +14 -4
- package/dist/types/loaders/sog/SogSource.d.ts +14 -4
- package/dist/types/loaders/sog/sogZip.d.cts +12 -12
- package/dist/types/loaders/sog/sogZip.d.ts +12 -12
- package/dist/types/loaders/sog.d.cts +3 -3
- package/dist/types/loaders/sog.d.ts +3 -3
- package/dist/types/loaders/source.d.cts +43 -15
- package/dist/types/loaders/source.d.ts +43 -15
- package/dist/types/loaders/stream/StreamByteBudget.d.cts +4 -4
- package/dist/types/loaders/stream/StreamByteBudget.d.ts +4 -4
- package/dist/types/loaders/stream/StreamCameras.d.cts +27 -18
- package/dist/types/loaders/stream/StreamCameras.d.ts +27 -18
- package/dist/types/loaders/stream/StreamWorkerPool.d.cts +37 -34
- package/dist/types/loaders/stream/StreamWorkerPool.d.ts +37 -34
- package/dist/types/loaders/stream/rad-stream/RadSelectionState.d.cts +15 -11
- package/dist/types/loaders/stream/rad-stream/RadSelectionState.d.ts +15 -11
- package/dist/types/loaders/stream/rad-stream/RadStreamBatch.d.cts +13 -9
- package/dist/types/loaders/stream/rad-stream/RadStreamBatch.d.ts +13 -9
- package/dist/types/loaders/stream/rad-stream/RadStreamLoader.d.cts +64 -49
- package/dist/types/loaders/stream/rad-stream/RadStreamLoader.d.ts +64 -49
- package/dist/types/loaders/stream/rad-stream/RadStreamScheduler.d.cts +110 -102
- package/dist/types/loaders/stream/rad-stream/RadStreamScheduler.d.ts +110 -102
- package/dist/types/loaders/stream/rad-stream/RadStreamWorker.d.cts +3 -3
- package/dist/types/loaders/stream/rad-stream/RadStreamWorker.d.ts +3 -3
- package/dist/types/loaders/stream/rad-stream/prepareRadSelection.d.cts +27 -15
- package/dist/types/loaders/stream/rad-stream/prepareRadSelection.d.ts +27 -15
- package/dist/types/loaders/stream/rad-stream/radFade.d.cts +13 -8
- package/dist/types/loaders/stream/rad-stream/radFade.d.ts +13 -8
- package/dist/types/loaders/stream/rad-stream/radLod.d.cts +26 -26
- package/dist/types/loaders/stream/rad-stream/radLod.d.ts +26 -26
- package/dist/types/loaders/stream/rad-stream/worker.d.cts +3 -59
- package/dist/types/loaders/stream/rad-stream/worker.d.ts +3 -59
- package/dist/types/loaders/stream/rad-stream/workerHandlers.d.cts +85 -59
- package/dist/types/loaders/stream/rad-stream/workerHandlers.d.ts +85 -59
- package/dist/types/loaders/stream/sog-stream/SogStreamBatch.d.cts +17 -12
- package/dist/types/loaders/stream/sog-stream/SogStreamBatch.d.ts +17 -12
- package/dist/types/loaders/stream/sog-stream/SogStreamLoader.d.cts +56 -41
- package/dist/types/loaders/stream/sog-stream/SogStreamLoader.d.ts +56 -41
- package/dist/types/loaders/stream/sog-stream/SogStreamScheduler.d.cts +82 -81
- package/dist/types/loaders/stream/sog-stream/SogStreamScheduler.d.ts +82 -81
- package/dist/types/loaders/stream/sog-stream/SogStreamWorker.d.cts +3 -3
- package/dist/types/loaders/stream/sog-stream/SogStreamWorker.d.ts +3 -3
- package/dist/types/loaders/stream/sog-stream/sogLod.d.cts +59 -44
- package/dist/types/loaders/stream/sog-stream/sogLod.d.ts +59 -44
- package/dist/types/loaders/stream/sog-stream/sogVisibility.d.cts +30 -22
- package/dist/types/loaders/stream/sog-stream/sogVisibility.d.ts +30 -22
- package/dist/types/loaders/stream/sog-stream/worker.d.cts +7 -40
- package/dist/types/loaders/stream/sog-stream/worker.d.ts +7 -40
- package/dist/types/loaders/stream/sog-stream/workerHandlers.d.cts +69 -44
- package/dist/types/loaders/stream/sog-stream/workerHandlers.d.ts +69 -44
- package/dist/types/loaders/stream/streamOptions.d.cts +41 -32
- package/dist/types/loaders/stream/streamOptions.d.ts +41 -32
- package/dist/types/loaders/workerDecode.d.cts +30 -12
- package/dist/types/loaders/workerDecode.d.ts +30 -12
- package/dist/types/patches/threeR186.d.cts +3 -0
- package/dist/types/patches/threeR186.d.ts +3 -0
- package/dist/types/rendering/GaussianSplatRenderer.d.cts +393 -376
- package/dist/types/rendering/GaussianSplatRenderer.d.ts +393 -376
- package/dist/types/rendering/MaterialState.d.cts +9 -0
- package/dist/types/rendering/MaterialState.d.ts +9 -0
- package/dist/types/rendering/SortCenterCache.d.cts +17 -17
- package/dist/types/rendering/SortCenterCache.d.ts +17 -17
- package/dist/types/rendering/SplatAccumulator.d.cts +93 -77
- package/dist/types/rendering/SplatAccumulator.d.ts +93 -77
- package/dist/types/rendering/SplatGeometry.d.cts +2 -2
- package/dist/types/rendering/SplatGeometry.d.ts +2 -2
- package/dist/types/rendering/StochasticSplatMaterial.d.cts +14 -0
- package/dist/types/rendering/StochasticSplatMaterial.d.ts +14 -0
- package/dist/types/rendering/backend.d.cts +30 -18
- package/dist/types/rendering/backend.d.ts +30 -18
- package/dist/types/rendering/blueNoise.d.cts +1 -1
- package/dist/types/rendering/blueNoise.d.ts +1 -1
- package/dist/types/rendering/rendererUtils.d.cts +25 -10
- package/dist/types/rendering/rendererUtils.d.ts +25 -10
- package/dist/types/rendering/tsl/GenerateProgram.d.cts +19 -17
- package/dist/types/rendering/tsl/GenerateProgram.d.ts +19 -17
- package/dist/types/rendering/tsl/ProjectionProgram.d.cts +38 -33
- package/dist/types/rendering/tsl/ProjectionProgram.d.ts +38 -33
- package/dist/types/rendering/tsl/SplatBackend.d.cts +22 -10
- package/dist/types/rendering/tsl/SplatBackend.d.ts +22 -10
- package/dist/types/rendering/tsl/SplatMaterial.d.cts +38 -25
- package/dist/types/rendering/tsl/SplatMaterial.d.ts +38 -25
- package/dist/types/rendering/tsl/shaderUtils.d.cts +55 -17
- package/dist/types/rendering/tsl/shaderUtils.d.ts +55 -17
- package/dist/types/rendering/tsl/stochasticCoverage.d.cts +7 -0
- package/dist/types/rendering/tsl/stochasticCoverage.d.ts +7 -0
- package/dist/types/rendering/tsl/viewUniforms.d.cts +19 -9
- package/dist/types/rendering/tsl/viewUniforms.d.ts +19 -9
- package/dist/types/rendering/uniforms.d.cts +83 -83
- package/dist/types/rendering/uniforms.d.ts +83 -83
- package/dist/types/rendering/webgl/AccumulatorGenerator.d.cts +28 -12
- package/dist/types/rendering/webgl/AccumulatorGenerator.d.ts +28 -12
- package/dist/types/rendering/webgl/OrderingTexture.d.cts +10 -7
- package/dist/types/rendering/webgl/OrderingTexture.d.ts +10 -7
- package/dist/types/rendering/webgl/SplatBackend.d.cts +20 -15
- package/dist/types/rendering/webgl/SplatBackend.d.ts +20 -15
- package/dist/types/rendering/webgl/SplatMaterial.d.cts +9 -4
- package/dist/types/rendering/webgl/SplatMaterial.d.ts +9 -4
- package/dist/types/rendering/webgl/textureUtils.d.cts +10 -3
- package/dist/types/rendering/webgl/textureUtils.d.ts +10 -3
- package/dist/types/rendering/webgl-fallback/AccumulatorGenerator.d.cts +8 -10
- package/dist/types/rendering/webgl-fallback/AccumulatorGenerator.d.ts +8 -10
- package/dist/types/rendering/webgl-fallback/SplatBackend.d.cts +18 -14
- package/dist/types/rendering/webgl-fallback/SplatBackend.d.ts +18 -14
- package/dist/types/rendering/webgpu/ProjectedSplats.d.cts +76 -66
- package/dist/types/rendering/webgpu/ProjectedSplats.d.ts +76 -66
- package/dist/types/rendering/webgpu/ProjectionCache.d.cts +43 -28
- package/dist/types/rendering/webgpu/ProjectionCache.d.ts +43 -28
- package/dist/types/rendering/webgpu/ProjectionKernel.d.cts +22 -0
- package/dist/types/rendering/webgpu/ProjectionKernel.d.ts +22 -0
- package/dist/types/rendering/webgpu/RadixSort.d.cts +44 -40
- package/dist/types/rendering/webgpu/RadixSort.d.ts +44 -40
- package/dist/types/rendering/webgpu/SplatBackend.d.cts +14 -12
- package/dist/types/rendering/webgpu/SplatBackend.d.ts +14 -12
- package/dist/types/runtime/SplatWorker.d.cts +17 -13
- package/dist/types/runtime/SplatWorker.d.ts +17 -13
- package/dist/types/runtime/WorkerRpc.d.cts +26 -20
- package/dist/types/runtime/WorkerRpc.d.ts +26 -20
- package/dist/types/runtime/abort.d.cts +10 -5
- package/dist/types/runtime/abort.d.ts +10 -5
- package/dist/types/runtime/retry.d.cts +6 -6
- package/dist/types/runtime/retry.d.ts +6 -6
- package/dist/types/runtime/wasmCall.d.cts +3 -3
- package/dist/types/runtime/wasmCall.d.ts +3 -3
- package/dist/types/runtime/worker.d.cts +44 -24
- package/dist/types/runtime/worker.d.ts +44 -24
- package/dist/types/runtime/workerServer.d.cts +3 -1
- package/dist/types/runtime/workerServer.d.ts +3 -1
- package/dist/types/scene/SplatEdit.d.cts +74 -67
- package/dist/types/scene/SplatEdit.d.ts +74 -67
- package/dist/types/scene/SplatMesh.d.cts +92 -70
- package/dist/types/scene/SplatMesh.d.ts +92 -70
- package/dist/types/utils/index.d.cts +15 -7
- package/dist/types/utils/index.d.ts +15 -7
- package/dist/types/utils/three.d.cts +3 -3
- package/dist/types/utils/three.d.ts +3 -3
- package/dist/types/utils/transforms.d.cts +10 -3
- package/dist/types/utils/transforms.d.ts +10 -3
- package/docs/GaussianSplatRenderer.md +3 -1
- package/docs/NeuralDenoiseNode.md +148 -0
- package/docs/SplatMesh.md +1 -1
- package/docs/StochasticRendering.md +36 -10
- package/docs/TAAPass.md +20 -3
- package/package.json +9 -11
- package/dist/types/capture/sceneView.d.cts +0 -3
- package/dist/types/capture/sceneView.d.ts +0 -3
- package/dist/types/rendering/tsl/tslCompat.d.cts +0 -68
- package/dist/types/rendering/tsl/tslCompat.d.ts +0 -68
- package/docs/Architecture.md +0 -200
|
@@ -1,78 +1,93 @@
|
|
|
1
|
-
import { LoadingManager } from
|
|
2
|
-
import { SplatFileResolver, SplatRequestOptions } from
|
|
3
|
-
import { RadHeader } from
|
|
1
|
+
import type { LoadingManager } from "three";
|
|
2
|
+
import type { SplatFileResolver, SplatRequestOptions } from "../loadTypes.cjs";
|
|
3
|
+
import type { RadHeader } from "./radFormat.cjs";
|
|
4
4
|
export type RadSourceOptions = SplatRequestOptions & {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
url?: string;
|
|
6
|
+
file?: Blob;
|
|
7
|
+
fileBytes?: Uint8Array | ArrayBuffer;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
manager?: LoadingManager;
|
|
10
|
+
resolveFile?: SplatFileResolver;
|
|
11
|
+
/** Internal bridge for LoadingManager URL modifiers in a decode worker. */
|
|
12
|
+
resolveAsset?: (url: string) => Promise<string>;
|
|
13
|
+
onProgress?: (downloadedBytes: number) => void;
|
|
14
|
+
/** Validate ordinary metadata as soon as the full-response header arrives. */
|
|
15
|
+
validateHeader?: (bytes: Uint8Array) => void;
|
|
16
16
|
};
|
|
17
17
|
type Remote = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
url: string;
|
|
19
|
+
resolved?: string;
|
|
20
|
+
responseUrl?: string;
|
|
21
|
+
total?: number;
|
|
22
|
+
validator?: string;
|
|
23
|
+
validatorHeader?: "ETag" | "Last-Modified";
|
|
24
|
+
full?: Blob;
|
|
25
25
|
};
|
|
26
26
|
/** Small response snapshot shared across a dataset's download workers. */
|
|
27
|
-
export type RadResourceState = Pick<
|
|
27
|
+
export type RadResourceState = Pick<
|
|
28
|
+
Remote,
|
|
29
|
+
"responseUrl" | "total" | "validator" | "validatorHeader"
|
|
30
|
+
>;
|
|
28
31
|
/** Resolved page input. Local inputs contain only the requested Blob slice. */
|
|
29
32
|
export type RadReadRequest = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
input: string | Blob;
|
|
34
|
+
offset: number;
|
|
35
|
+
length: number;
|
|
36
|
+
wholeFile: boolean;
|
|
37
|
+
resourceUrl?: string;
|
|
38
|
+
state?: RadResourceState;
|
|
39
|
+
requestHeader?: Record<string, string>;
|
|
40
|
+
withCredentials?: boolean;
|
|
38
41
|
};
|
|
39
42
|
/** Validated byte reads shared by ordinary RAD loading and paged loading. */
|
|
40
43
|
export declare class RadSource {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
44
|
+
readonly options: RadSourceOptions;
|
|
45
|
+
private readonly allowFullDownload;
|
|
46
|
+
readonly stats: {
|
|
47
|
+
downloadedBytes: number;
|
|
48
|
+
activeRequests: number;
|
|
49
|
+
cachedBytes: number;
|
|
50
|
+
};
|
|
51
|
+
private readonly controller;
|
|
52
|
+
private readonly remotes;
|
|
53
|
+
private readonly root;
|
|
54
|
+
private readonly origin?;
|
|
55
|
+
constructor(options: RadSourceOptions, allowFullDownload?: boolean);
|
|
56
|
+
get url(): string | undefined;
|
|
57
|
+
readHeader(signal?: AbortSignal): Promise<Uint8Array<ArrayBuffer>>;
|
|
58
|
+
readChunk(
|
|
59
|
+
header: RadHeader,
|
|
60
|
+
index: number,
|
|
61
|
+
signal?: AbortSignal,
|
|
62
|
+
): Promise<Uint8Array<ArrayBufferLike>>;
|
|
63
|
+
private chunkRead;
|
|
64
|
+
/** Resolve callbacks on their owning thread; workers read and validate bodies. */
|
|
65
|
+
prepareChunk(
|
|
66
|
+
header: RadHeader,
|
|
67
|
+
index: number,
|
|
68
|
+
signal?: AbortSignal,
|
|
69
|
+
): Promise<RadReadRequest>;
|
|
70
|
+
/** Worker transport reuses all ordinary Range, size and encoding validation. */
|
|
71
|
+
static readPreparedChunk(
|
|
72
|
+
request: RadReadRequest,
|
|
73
|
+
signal: AbortSignal,
|
|
74
|
+
onProgress?: (downloadedBytes: number) => void,
|
|
75
|
+
): Promise<{
|
|
76
|
+
bytes: Uint8Array<ArrayBufferLike>;
|
|
77
|
+
state: RadResourceState | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
/** Reconcile parallel responses before publishing a decoded page. */
|
|
80
|
+
acceptChunkResponse(request: RadReadRequest, state?: RadResourceState): void;
|
|
81
|
+
private resourceState;
|
|
82
|
+
private remote;
|
|
83
|
+
private resolveRemote;
|
|
84
|
+
private requestController;
|
|
85
|
+
private read;
|
|
86
|
+
private readRemote;
|
|
87
|
+
private cacheFullResponse;
|
|
88
|
+
private readHeaderOnlyResponse;
|
|
89
|
+
private readResponse;
|
|
90
|
+
private progress;
|
|
91
|
+
dispose(): void;
|
|
77
92
|
}
|
|
78
93
|
export {};
|
|
@@ -1,78 +1,93 @@
|
|
|
1
|
-
import { LoadingManager } from
|
|
2
|
-
import { SplatFileResolver, SplatRequestOptions } from
|
|
3
|
-
import { RadHeader } from
|
|
1
|
+
import type { LoadingManager } from "three";
|
|
2
|
+
import type { SplatFileResolver, SplatRequestOptions } from "../loadTypes.js";
|
|
3
|
+
import type { RadHeader } from "./radFormat.js";
|
|
4
4
|
export type RadSourceOptions = SplatRequestOptions & {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
url?: string;
|
|
6
|
+
file?: Blob;
|
|
7
|
+
fileBytes?: Uint8Array | ArrayBuffer;
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
manager?: LoadingManager;
|
|
10
|
+
resolveFile?: SplatFileResolver;
|
|
11
|
+
/** Internal bridge for LoadingManager URL modifiers in a decode worker. */
|
|
12
|
+
resolveAsset?: (url: string) => Promise<string>;
|
|
13
|
+
onProgress?: (downloadedBytes: number) => void;
|
|
14
|
+
/** Validate ordinary metadata as soon as the full-response header arrives. */
|
|
15
|
+
validateHeader?: (bytes: Uint8Array) => void;
|
|
16
16
|
};
|
|
17
17
|
type Remote = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
url: string;
|
|
19
|
+
resolved?: string;
|
|
20
|
+
responseUrl?: string;
|
|
21
|
+
total?: number;
|
|
22
|
+
validator?: string;
|
|
23
|
+
validatorHeader?: "ETag" | "Last-Modified";
|
|
24
|
+
full?: Blob;
|
|
25
25
|
};
|
|
26
26
|
/** Small response snapshot shared across a dataset's download workers. */
|
|
27
|
-
export type RadResourceState = Pick<
|
|
27
|
+
export type RadResourceState = Pick<
|
|
28
|
+
Remote,
|
|
29
|
+
"responseUrl" | "total" | "validator" | "validatorHeader"
|
|
30
|
+
>;
|
|
28
31
|
/** Resolved page input. Local inputs contain only the requested Blob slice. */
|
|
29
32
|
export type RadReadRequest = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
input: string | Blob;
|
|
34
|
+
offset: number;
|
|
35
|
+
length: number;
|
|
36
|
+
wholeFile: boolean;
|
|
37
|
+
resourceUrl?: string;
|
|
38
|
+
state?: RadResourceState;
|
|
39
|
+
requestHeader?: Record<string, string>;
|
|
40
|
+
withCredentials?: boolean;
|
|
38
41
|
};
|
|
39
42
|
/** Validated byte reads shared by ordinary RAD loading and paged loading. */
|
|
40
43
|
export declare class RadSource {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
44
|
+
readonly options: RadSourceOptions;
|
|
45
|
+
private readonly allowFullDownload;
|
|
46
|
+
readonly stats: {
|
|
47
|
+
downloadedBytes: number;
|
|
48
|
+
activeRequests: number;
|
|
49
|
+
cachedBytes: number;
|
|
50
|
+
};
|
|
51
|
+
private readonly controller;
|
|
52
|
+
private readonly remotes;
|
|
53
|
+
private readonly root;
|
|
54
|
+
private readonly origin?;
|
|
55
|
+
constructor(options: RadSourceOptions, allowFullDownload?: boolean);
|
|
56
|
+
get url(): string | undefined;
|
|
57
|
+
readHeader(signal?: AbortSignal): Promise<Uint8Array<ArrayBuffer>>;
|
|
58
|
+
readChunk(
|
|
59
|
+
header: RadHeader,
|
|
60
|
+
index: number,
|
|
61
|
+
signal?: AbortSignal,
|
|
62
|
+
): Promise<Uint8Array<ArrayBufferLike>>;
|
|
63
|
+
private chunkRead;
|
|
64
|
+
/** Resolve callbacks on their owning thread; workers read and validate bodies. */
|
|
65
|
+
prepareChunk(
|
|
66
|
+
header: RadHeader,
|
|
67
|
+
index: number,
|
|
68
|
+
signal?: AbortSignal,
|
|
69
|
+
): Promise<RadReadRequest>;
|
|
70
|
+
/** Worker transport reuses all ordinary Range, size and encoding validation. */
|
|
71
|
+
static readPreparedChunk(
|
|
72
|
+
request: RadReadRequest,
|
|
73
|
+
signal: AbortSignal,
|
|
74
|
+
onProgress?: (downloadedBytes: number) => void,
|
|
75
|
+
): Promise<{
|
|
76
|
+
bytes: Uint8Array<ArrayBufferLike>;
|
|
77
|
+
state: RadResourceState | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
/** Reconcile parallel responses before publishing a decoded page. */
|
|
80
|
+
acceptChunkResponse(request: RadReadRequest, state?: RadResourceState): void;
|
|
81
|
+
private resourceState;
|
|
82
|
+
private remote;
|
|
83
|
+
private resolveRemote;
|
|
84
|
+
private requestController;
|
|
85
|
+
private read;
|
|
86
|
+
private readRemote;
|
|
87
|
+
private cacheFullResponse;
|
|
88
|
+
private readHeaderOnlyResponse;
|
|
89
|
+
private readResponse;
|
|
90
|
+
private progress;
|
|
91
|
+
dispose(): void;
|
|
77
92
|
}
|
|
78
93
|
export {};
|
|
@@ -1,57 +1,62 @@
|
|
|
1
|
-
import { ReorderedSplatResult, SplatResult } from
|
|
2
|
-
import { PostDecodeSplatData } from
|
|
1
|
+
import type { ReorderedSplatResult, SplatResult } from "../../data/defines.cjs";
|
|
2
|
+
import type { PostDecodeSplatData } from "../postDecode/protocol.cjs";
|
|
3
3
|
export type RadChunkRange = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
offset: number;
|
|
5
|
+
bytes: number;
|
|
6
|
+
base?: number;
|
|
7
|
+
count?: number;
|
|
8
|
+
filename?: string;
|
|
9
9
|
};
|
|
10
10
|
/** Spark RAD version 1 directory. Child references use file-global indices. */
|
|
11
11
|
export type RadMeta = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
version: number;
|
|
13
|
+
type: "gsplat";
|
|
14
|
+
count: number;
|
|
15
|
+
maxSh?: number;
|
|
16
|
+
lodTree?: boolean;
|
|
17
|
+
chunkSize?: number;
|
|
18
|
+
allChunkBytes: number;
|
|
19
|
+
chunks: RadChunkRange[];
|
|
20
|
+
shCodeCount?: number;
|
|
21
|
+
splatEncoding?: Record<string, unknown>;
|
|
22
|
+
comment?: string;
|
|
23
23
|
};
|
|
24
24
|
export type RadHeader = {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
meta: RadMeta;
|
|
26
|
+
chunksStart: number;
|
|
27
27
|
};
|
|
28
28
|
export type RadChunkData = SplatResult & {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
base: number;
|
|
30
|
+
childStart?: Uint32Array;
|
|
31
|
+
childCount?: Uint16Array;
|
|
32
|
+
lodRadii?: Float32Array;
|
|
33
33
|
};
|
|
34
34
|
/** Render records for streaming; tree arrays are transferred to the LOD worker. */
|
|
35
35
|
export type RadStreamChunk = Omit<ReorderedSplatResult, "sortCenters"> & {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/** Root-page radius used when its initial bounds collapse to one point. */
|
|
37
|
+
rootRadius?: number;
|
|
38
38
|
};
|
|
39
39
|
export type RadDecodedChunk = PostDecodeSplatData & {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
base: number;
|
|
41
|
+
childStart?: Uint32Array;
|
|
42
|
+
childCount?: Uint16Array;
|
|
43
|
+
lodRadii?: Float32Array;
|
|
44
44
|
};
|
|
45
45
|
export declare function unpackRadChunk(decoded: RadDecodedChunk): RadChunkData;
|
|
46
46
|
/** Without chunkSize, Spark treats the dataset as one chunk. */
|
|
47
|
-
export declare function getRadChunkSpan(
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
export declare function getRadChunkSpan(
|
|
48
|
+
meta: RadMeta,
|
|
49
|
+
index: number,
|
|
50
|
+
): {
|
|
51
|
+
base: number;
|
|
52
|
+
count: number;
|
|
50
53
|
};
|
|
51
54
|
export declare function isRadPrefix(bytes: Uint8Array): boolean;
|
|
52
55
|
export declare function getRadHeaderSize(prefix: Uint8Array): {
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
jsonLength: number;
|
|
57
|
+
headerLength: number;
|
|
55
58
|
};
|
|
56
59
|
/** Validate the header as soon as a full-response fallback supplies it. */
|
|
57
|
-
export declare function collectRadHeader(
|
|
60
|
+
export declare function collectRadHeader(
|
|
61
|
+
complete: (bytes: Uint8Array) => void,
|
|
62
|
+
): (bytes: Uint8Array) => void;
|
|
@@ -1,57 +1,62 @@
|
|
|
1
|
-
import { ReorderedSplatResult, SplatResult } from
|
|
2
|
-
import { PostDecodeSplatData } from
|
|
1
|
+
import type { ReorderedSplatResult, SplatResult } from "../../data/defines.js";
|
|
2
|
+
import type { PostDecodeSplatData } from "../postDecode/protocol.js";
|
|
3
3
|
export type RadChunkRange = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
offset: number;
|
|
5
|
+
bytes: number;
|
|
6
|
+
base?: number;
|
|
7
|
+
count?: number;
|
|
8
|
+
filename?: string;
|
|
9
9
|
};
|
|
10
10
|
/** Spark RAD version 1 directory. Child references use file-global indices. */
|
|
11
11
|
export type RadMeta = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
version: number;
|
|
13
|
+
type: "gsplat";
|
|
14
|
+
count: number;
|
|
15
|
+
maxSh?: number;
|
|
16
|
+
lodTree?: boolean;
|
|
17
|
+
chunkSize?: number;
|
|
18
|
+
allChunkBytes: number;
|
|
19
|
+
chunks: RadChunkRange[];
|
|
20
|
+
shCodeCount?: number;
|
|
21
|
+
splatEncoding?: Record<string, unknown>;
|
|
22
|
+
comment?: string;
|
|
23
23
|
};
|
|
24
24
|
export type RadHeader = {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
meta: RadMeta;
|
|
26
|
+
chunksStart: number;
|
|
27
27
|
};
|
|
28
28
|
export type RadChunkData = SplatResult & {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
base: number;
|
|
30
|
+
childStart?: Uint32Array;
|
|
31
|
+
childCount?: Uint16Array;
|
|
32
|
+
lodRadii?: Float32Array;
|
|
33
33
|
};
|
|
34
34
|
/** Render records for streaming; tree arrays are transferred to the LOD worker. */
|
|
35
35
|
export type RadStreamChunk = Omit<ReorderedSplatResult, "sortCenters"> & {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/** Root-page radius used when its initial bounds collapse to one point. */
|
|
37
|
+
rootRadius?: number;
|
|
38
38
|
};
|
|
39
39
|
export type RadDecodedChunk = PostDecodeSplatData & {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
base: number;
|
|
41
|
+
childStart?: Uint32Array;
|
|
42
|
+
childCount?: Uint16Array;
|
|
43
|
+
lodRadii?: Float32Array;
|
|
44
44
|
};
|
|
45
45
|
export declare function unpackRadChunk(decoded: RadDecodedChunk): RadChunkData;
|
|
46
46
|
/** Without chunkSize, Spark treats the dataset as one chunk. */
|
|
47
|
-
export declare function getRadChunkSpan(
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
export declare function getRadChunkSpan(
|
|
48
|
+
meta: RadMeta,
|
|
49
|
+
index: number,
|
|
50
|
+
): {
|
|
51
|
+
base: number;
|
|
52
|
+
count: number;
|
|
50
53
|
};
|
|
51
54
|
export declare function isRadPrefix(bytes: Uint8Array): boolean;
|
|
52
55
|
export declare function getRadHeaderSize(prefix: Uint8Array): {
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
jsonLength: number;
|
|
57
|
+
headerLength: number;
|
|
55
58
|
};
|
|
56
59
|
/** Validate the header as soon as a full-response fallback supplies it. */
|
|
57
|
-
export declare function collectRadHeader(
|
|
60
|
+
export declare function collectRadHeader(
|
|
61
|
+
complete: (bytes: Uint8Array) => void,
|
|
62
|
+
): (bytes: Uint8Array) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SplatSourceArgs as LoadRadArgs } from
|
|
2
|
-
import { PostDecodeSplatData } from
|
|
3
|
-
export { isRadPrefix } from
|
|
1
|
+
import type { SplatSourceArgs as LoadRadArgs } from "./loadTypes.cjs";
|
|
2
|
+
import type { PostDecodeSplatData } from "./postDecode/protocol.cjs";
|
|
3
|
+
export { isRadPrefix } from "./rad/radFormat.cjs";
|
|
4
4
|
type RadOutput = PostDecodeSplatData & {
|
|
5
|
-
|
|
5
|
+
sourceIds: Uint32Array;
|
|
6
6
|
};
|
|
7
7
|
/** Complete-file RAD decode with validated chunk coverage and LOD trees. */
|
|
8
8
|
export declare function loadRad(args: LoadRadArgs): Promise<RadOutput>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SplatSourceArgs as LoadRadArgs } from
|
|
2
|
-
import { PostDecodeSplatData } from
|
|
3
|
-
export { isRadPrefix } from
|
|
1
|
+
import type { SplatSourceArgs as LoadRadArgs } from "./loadTypes.js";
|
|
2
|
+
import type { PostDecodeSplatData } from "./postDecode/protocol.js";
|
|
3
|
+
export { isRadPrefix } from "./rad/radFormat.js";
|
|
4
4
|
type RadOutput = PostDecodeSplatData & {
|
|
5
|
-
|
|
5
|
+
sourceIds: Uint32Array;
|
|
6
6
|
};
|
|
7
7
|
/** Complete-file RAD decode with validated chunk coverage and LOD trees. */
|
|
8
8
|
export declare function loadRad(args: LoadRadArgs): Promise<RadOutput>;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import { SplatSourceArgs } from
|
|
2
|
-
import { ByteSource as Source } from
|
|
3
|
-
export declare function openSogSource(
|
|
1
|
+
import type { SplatSourceArgs } from "../loadTypes.cjs";
|
|
2
|
+
import type { ByteSource as Source } from "../source.cjs";
|
|
3
|
+
export declare function openSogSource(
|
|
4
|
+
args: SplatSourceArgs,
|
|
5
|
+
progress: (bytes: number, total?: number) => void,
|
|
6
|
+
signal: AbortSignal,
|
|
7
|
+
): Promise<Source>;
|
|
4
8
|
/** Resolve and read an external property image; ZIP entries stay with the archive reader. */
|
|
5
|
-
export declare function readSogAsset(
|
|
9
|
+
export declare function readSogAsset(
|
|
10
|
+
name: string,
|
|
11
|
+
args: SplatSourceArgs,
|
|
12
|
+
sourceUrl: string | undefined,
|
|
13
|
+
progress: (bytes: number) => void,
|
|
14
|
+
signal: AbortSignal,
|
|
15
|
+
): Promise<Uint8Array[]>;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import { SplatSourceArgs } from
|
|
2
|
-
import { ByteSource as Source } from
|
|
3
|
-
export declare function openSogSource(
|
|
1
|
+
import type { SplatSourceArgs } from "../loadTypes.js";
|
|
2
|
+
import type { ByteSource as Source } from "../source.js";
|
|
3
|
+
export declare function openSogSource(
|
|
4
|
+
args: SplatSourceArgs,
|
|
5
|
+
progress: (bytes: number, total?: number) => void,
|
|
6
|
+
signal: AbortSignal,
|
|
7
|
+
): Promise<Source>;
|
|
4
8
|
/** Resolve and read an external property image; ZIP entries stay with the archive reader. */
|
|
5
|
-
export declare function readSogAsset(
|
|
9
|
+
export declare function readSogAsset(
|
|
10
|
+
name: string,
|
|
11
|
+
args: SplatSourceArgs,
|
|
12
|
+
sourceUrl: string | undefined,
|
|
13
|
+
progress: (bytes: number) => void,
|
|
14
|
+
signal: AbortSignal,
|
|
15
|
+
): Promise<Uint8Array[]>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ByteSource as Source } from
|
|
1
|
+
import type { ByteSource as Source } from "../source.cjs";
|
|
2
2
|
type Entry = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
name: string;
|
|
4
|
+
nameLength: number;
|
|
5
|
+
method: number;
|
|
6
|
+
flags: number;
|
|
7
|
+
crc: number;
|
|
8
|
+
compressedSize: number;
|
|
9
|
+
size: number;
|
|
10
|
+
offset: number;
|
|
11
11
|
};
|
|
12
12
|
export declare function readZip(source: Source): Promise<{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
meta: Entry;
|
|
14
|
+
read: (entry: Entry) => Promise<Uint8Array<ArrayBufferLike>[]>;
|
|
15
|
+
entry(name: string): Entry | undefined;
|
|
16
16
|
}>;
|
|
17
17
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ByteSource as Source } from
|
|
1
|
+
import type { ByteSource as Source } from "../source.js";
|
|
2
2
|
type Entry = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
name: string;
|
|
4
|
+
nameLength: number;
|
|
5
|
+
method: number;
|
|
6
|
+
flags: number;
|
|
7
|
+
crc: number;
|
|
8
|
+
compressedSize: number;
|
|
9
|
+
size: number;
|
|
10
|
+
offset: number;
|
|
11
11
|
};
|
|
12
12
|
export declare function readZip(source: Source): Promise<{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
meta: Entry;
|
|
14
|
+
read: (entry: Entry) => Promise<Uint8Array<ArrayBufferLike>[]>;
|
|
15
|
+
entry(name: string): Entry | undefined;
|
|
16
16
|
}>;
|
|
17
17
|
export {};
|