gaussian-splat-lite 1.2.2 → 1.3.1
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 +61 -2
- package/CONTRIBUTING.md +4 -2
- package/README.md +4 -3
- package/dist/gaussian-splat-lite.cjs +6782 -1661
- package/dist/gaussian-splat-lite.cjs.map +1 -1
- package/dist/gaussian-splat-lite.min.cjs +991 -15
- package/dist/gaussian-splat-lite.min.cjs.map +1 -1
- package/dist/gaussian-splat-lite.module.js +6328 -1207
- package/dist/gaussian-splat-lite.module.js.map +1 -1
- package/dist/gaussian-splat-lite.module.min.js +8208 -3572
- 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 +83 -58
- package/dist/types/data/IndexedSplats.d.ts +83 -58
- package/dist/types/data/RadPagedSplats.d.cts +66 -61
- package/dist/types/data/RadPagedSplats.d.ts +66 -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 +36 -29
- package/dist/types/data/SplatOpacityTable.d.ts +36 -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/StreamCameras.d.cts +27 -18
- package/dist/types/loaders/stream/StreamCameras.d.ts +27 -18
- package/dist/types/loaders/stream/StreamWorkerPool.d.cts +37 -37
- package/dist/types/loaders/stream/StreamWorkerPool.d.ts +37 -37
- package/dist/types/loaders/stream/rad-stream/RadSelectionState.d.cts +20 -13
- package/dist/types/loaders/stream/rad-stream/RadSelectionState.d.ts +20 -13
- 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 +69 -51
- package/dist/types/loaders/stream/rad-stream/RadStreamLoader.d.ts +69 -51
- package/dist/types/loaders/stream/rad-stream/RadStreamScheduler.d.cts +126 -102
- package/dist/types/loaders/stream/rad-stream/RadStreamScheduler.d.ts +126 -102
- package/dist/types/loaders/stream/rad-stream/RadStreamWorker.d.cts +4 -4
- package/dist/types/loaders/stream/rad-stream/RadStreamWorker.d.ts +4 -4
- package/dist/types/loaders/stream/rad-stream/prepareRadSelection.d.cts +20 -17
- package/dist/types/loaders/stream/rad-stream/prepareRadSelection.d.ts +20 -17
- 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 +29 -27
- package/dist/types/loaders/stream/rad-stream/radLod.d.ts +29 -27
- 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 +58 -61
- package/dist/types/loaders/stream/rad-stream/workerHandlers.d.ts +58 -61
- package/dist/types/loaders/stream/sog-stream/SogStreamBatch.d.cts +16 -12
- package/dist/types/loaders/stream/sog-stream/SogStreamBatch.d.ts +16 -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 +102 -81
- package/dist/types/loaders/stream/sog-stream/SogStreamScheduler.d.ts +102 -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 +67 -46
- package/dist/types/loaders/stream/sog-stream/sogLod.d.ts +67 -46
- package/dist/types/loaders/stream/sog-stream/sogVisibility.d.cts +28 -22
- package/dist/types/loaders/stream/sog-stream/sogVisibility.d.ts +28 -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 +63 -44
- package/dist/types/loaders/stream/sog-stream/workerHandlers.d.ts +63 -44
- package/dist/types/loaders/stream/streamOptions.d.cts +43 -33
- package/dist/types/loaders/stream/streamOptions.d.ts +43 -33
- 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/RadStreamScheduler.md +14 -5
- package/docs/SogStreamScheduler.md +8 -6
- 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/loaders/stream/StreamByteBudget.d.cts +0 -7
- package/dist/types/loaders/stream/StreamByteBudget.d.ts +0 -7
- 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,107 +1,131 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
export type RadStreamSchedulerOptions = RadStreamLoaderOptions &
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
import type { StreamResolutionSource } from "../StreamCameras.js";
|
|
3
|
+
import type { StreamSchedulerOptions, StreamStats } from "../streamOptions.js";
|
|
4
|
+
import type { RadStreamLoaderOptions } from "./RadStreamLoader.js";
|
|
5
|
+
export type RadStreamSchedulerOptions = RadStreamLoaderOptions &
|
|
6
|
+
StreamSchedulerOptions & {
|
|
7
|
+
/** Allowed fractional splat budget overshoot. Default: 0.1; 0 forbids overshoot. */
|
|
8
|
+
splatBudgetTolerance?: number;
|
|
9
|
+
/** Retained CPU byte budget, excluding pending copies and WASM. Default: 2 GiB. */
|
|
10
|
+
maxResidentCpuBytes?: number;
|
|
11
|
+
/** Estimated GPU byte budget for resident streaming data. Default: 1 GiB. */
|
|
12
|
+
maxResidentGpuBytes?: number;
|
|
13
|
+
};
|
|
6
14
|
export type RadStreamStats = StreamStats & {
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
/** Resident page limit derived from the smaller CPU/GPU allowance. */
|
|
16
|
+
pageBudget: number;
|
|
17
|
+
lodTimeMs: number;
|
|
9
18
|
};
|
|
10
19
|
/** Camera-driven RAD tree cuts with crossfades, on-demand pages and cooldown. */
|
|
11
20
|
export declare class RadStreamScheduler {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
21
|
+
private readonly options;
|
|
22
|
+
readonly group: THREE.Group;
|
|
23
|
+
readonly initialized: Promise<this>;
|
|
24
|
+
readonly firstRenderable: Promise<this>;
|
|
25
|
+
readonly cooldownMs: number;
|
|
26
|
+
readonly fadeDurationMs: number;
|
|
27
|
+
readonly maxConcurrentLoads: number;
|
|
28
|
+
readonly maxResidentCpuBytes: number;
|
|
29
|
+
readonly maxResidentGpuBytes: number;
|
|
30
|
+
private _splatBudget;
|
|
31
|
+
private _splatBudgetTolerance;
|
|
32
|
+
private readonly loader;
|
|
33
|
+
private readonly abort;
|
|
34
|
+
private readonly streamCameras;
|
|
35
|
+
private readonly pages;
|
|
36
|
+
private readonly pools;
|
|
37
|
+
private readonly bounds;
|
|
38
|
+
private readonly matrix;
|
|
39
|
+
private meta?;
|
|
40
|
+
private pageSize;
|
|
41
|
+
private pageBudget;
|
|
42
|
+
private numSh;
|
|
43
|
+
private maxPagePendingBytes;
|
|
44
|
+
private disposed;
|
|
45
|
+
private shown;
|
|
46
|
+
private displayed?;
|
|
47
|
+
private ready?;
|
|
48
|
+
private traversal?;
|
|
49
|
+
private preparation?;
|
|
50
|
+
private wanted;
|
|
51
|
+
private revision;
|
|
52
|
+
private lastRequestedRevision;
|
|
53
|
+
private refinementStopped;
|
|
54
|
+
private lastViewKey;
|
|
55
|
+
private views;
|
|
56
|
+
private lodTimeMs;
|
|
57
|
+
private resolveFirst;
|
|
58
|
+
private rejectFirst;
|
|
59
|
+
constructor(options: RadStreamSchedulerOptions);
|
|
60
|
+
/** Target selected-node budget. Assigning a new value requests LOD selection. */
|
|
61
|
+
get splatBudget(): number;
|
|
62
|
+
set splatBudget(value: number);
|
|
63
|
+
/** Allowed fractional budget overshoot; zero forbids overshoot. */
|
|
64
|
+
get splatBudgetTolerance(): number;
|
|
65
|
+
set splatBudgetTolerance(value: number);
|
|
66
|
+
/** Cameras that select detail, in registration order. */
|
|
67
|
+
get cameras(): readonly THREE.Camera[];
|
|
68
|
+
hasCamera(camera: THREE.Camera): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Select detail for this camera on each update; set its resolution too. For
|
|
71
|
+
* WebXR register renderer.xr.getCamera(): it selects with its eyes' combined
|
|
72
|
+
* frustum, sized by an eye's viewport. Returns whether the camera was newly
|
|
73
|
+
* added.
|
|
74
|
+
*/
|
|
75
|
+
setCamera(camera: THREE.Camera): boolean;
|
|
76
|
+
/** Stop selecting detail for this camera. Returns whether it was registered. */
|
|
77
|
+
deleteCamera(camera: THREE.Camera): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Set a registered camera's render size in CSS pixels, without the device
|
|
80
|
+
* pixel ratio. Returns whether the camera is registered.
|
|
81
|
+
*/
|
|
82
|
+
setResolution(
|
|
83
|
+
camera: THREE.Camera,
|
|
84
|
+
xOrVec: number | THREE.Vector2,
|
|
85
|
+
y?: number,
|
|
86
|
+
): boolean;
|
|
87
|
+
/** Set a registered camera's resolution from renderer.getSize(). */
|
|
88
|
+
setResolutionFromRenderer(
|
|
89
|
+
camera: THREE.Camera,
|
|
90
|
+
renderer: StreamResolutionSource,
|
|
91
|
+
): boolean;
|
|
92
|
+
get stats(): RadStreamStats;
|
|
93
|
+
/** Group-local root bounds plus selected Gaussian extents; approximate while streaming. */
|
|
94
|
+
getBoundingBox(): THREE.Box3;
|
|
95
|
+
private initialize;
|
|
96
|
+
/**
|
|
97
|
+
* Call before rendering. Registered cameras share one cut at the greatest
|
|
98
|
+
* detail any of them needs.
|
|
99
|
+
*/
|
|
100
|
+
update(): boolean;
|
|
101
|
+
private get selectionBaselineId();
|
|
102
|
+
private requestSelection;
|
|
103
|
+
private selectionPagesReady;
|
|
104
|
+
private prepareSelection;
|
|
105
|
+
private applySelection;
|
|
106
|
+
private invalidatePendingSelection;
|
|
107
|
+
private clearSelectionState;
|
|
108
|
+
/** Worker snapshots and waiting cuts pin pages without renewing cooldown. */
|
|
109
|
+
private isPagePinned;
|
|
110
|
+
private cancelUnusedLoads;
|
|
111
|
+
private updateFade;
|
|
112
|
+
private page;
|
|
113
|
+
private pump;
|
|
114
|
+
private loadPage;
|
|
115
|
+
private setInitialBounds;
|
|
116
|
+
private findSlot;
|
|
117
|
+
private reservePages;
|
|
118
|
+
private uploadPages;
|
|
119
|
+
private releasePage;
|
|
120
|
+
private isPageRequired;
|
|
121
|
+
private releaseUnused;
|
|
122
|
+
/** Map a raycast hit's rendered index back to its stable file index. */
|
|
123
|
+
getGlobalIndex(mesh: THREE.Object3D, renderedIndex: number): number;
|
|
124
|
+
private changed;
|
|
125
|
+
private failed;
|
|
126
|
+
private stopRefinement;
|
|
127
|
+
private scheduleRetry;
|
|
128
|
+
private retryDeadlines;
|
|
129
|
+
private readonly retryTimer;
|
|
130
|
+
dispose(): void;
|
|
107
131
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WorkerRpc } from
|
|
2
|
-
import { RadStreamRpcHandlers } from
|
|
3
|
-
/** Worker assigned
|
|
1
|
+
import { WorkerRpc } from "../../../runtime/WorkerRpc.cjs";
|
|
2
|
+
import type { RadStreamRpcHandlers } from "./worker.cjs";
|
|
3
|
+
/** Worker assigned traversal, display preparation, or page decoding. */
|
|
4
4
|
export declare class RadStreamWorker extends WorkerRpc<RadStreamRpcHandlers> {
|
|
5
|
-
|
|
5
|
+
constructor(onDispose?: () => void);
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WorkerRpc } from
|
|
2
|
-
import { RadStreamRpcHandlers } from
|
|
3
|
-
/** Worker assigned
|
|
1
|
+
import { WorkerRpc } from "../../../runtime/WorkerRpc.js";
|
|
2
|
+
import type { RadStreamRpcHandlers } from "./worker.js";
|
|
3
|
+
/** Worker assigned traversal, display preparation, or page decoding. */
|
|
4
4
|
export declare class RadStreamWorker extends WorkerRpc<RadStreamRpcHandlers> {
|
|
5
|
-
|
|
5
|
+
constructor(onDispose?: () => void);
|
|
6
6
|
}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type {
|
|
2
|
+
RadPreparedSelection,
|
|
3
|
+
RadSelectionSnapshot,
|
|
4
|
+
} from "../../../data/RadPagedSplats.cjs";
|
|
5
|
+
import type { RadStreamSelection } from "./radFade.cjs";
|
|
6
|
+
import type { RadLodChunk } from "./radLod.cjs";
|
|
7
|
+
export type RadSelectionChunk = Pick<
|
|
8
|
+
RadLodChunk,
|
|
9
|
+
"sourceToStorage" | "boundsBlocks"
|
|
10
|
+
>;
|
|
11
|
+
export type RadSelectionPreparation = {
|
|
12
|
+
selection: Omit<RadStreamSelection, "fade">;
|
|
13
|
+
fade: boolean;
|
|
14
|
+
pools: RadPreparedSelection[];
|
|
15
|
+
};
|
|
5
16
|
/** The scheduler snapshots and pins resident pages before dispatching this work. */
|
|
6
|
-
export declare function prepareRadSelection(
|
|
17
|
+
export declare function prepareRadSelection(
|
|
18
|
+
request: {
|
|
7
19
|
selection: RadStreamSelection;
|
|
8
20
|
pools: RadSelectionSnapshot[];
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
wantedChunks: Uint32Array;
|
|
13
|
-
touchedChunks: Uint32Array;
|
|
14
|
-
selectionId: number;
|
|
15
|
-
changedChunks: Uint32Array;
|
|
16
|
-
};
|
|
17
|
-
fade: boolean;
|
|
18
|
-
pools: RadPreparedSelection[];
|
|
19
|
-
};
|
|
20
|
-
export type RadSelectionPreparation = ReturnType<typeof prepareRadSelection>;
|
|
21
|
+
},
|
|
22
|
+
chunks: ReadonlyMap<number, RadSelectionChunk>,
|
|
23
|
+
): RadSelectionPreparation;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type {
|
|
2
|
+
RadPreparedSelection,
|
|
3
|
+
RadSelectionSnapshot,
|
|
4
|
+
} from "../../../data/RadPagedSplats.js";
|
|
5
|
+
import type { RadStreamSelection } from "./radFade.js";
|
|
6
|
+
import type { RadLodChunk } from "./radLod.js";
|
|
7
|
+
export type RadSelectionChunk = Pick<
|
|
8
|
+
RadLodChunk,
|
|
9
|
+
"sourceToStorage" | "boundsBlocks"
|
|
10
|
+
>;
|
|
11
|
+
export type RadSelectionPreparation = {
|
|
12
|
+
selection: Omit<RadStreamSelection, "fade">;
|
|
13
|
+
fade: boolean;
|
|
14
|
+
pools: RadPreparedSelection[];
|
|
15
|
+
};
|
|
5
16
|
/** The scheduler snapshots and pins resident pages before dispatching this work. */
|
|
6
|
-
export declare function prepareRadSelection(
|
|
17
|
+
export declare function prepareRadSelection(
|
|
18
|
+
request: {
|
|
7
19
|
selection: RadStreamSelection;
|
|
8
20
|
pools: RadSelectionSnapshot[];
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
wantedChunks: Uint32Array;
|
|
13
|
-
touchedChunks: Uint32Array;
|
|
14
|
-
selectionId: number;
|
|
15
|
-
changedChunks: Uint32Array;
|
|
16
|
-
};
|
|
17
|
-
fade: boolean;
|
|
18
|
-
pools: RadPreparedSelection[];
|
|
19
|
-
};
|
|
20
|
-
export type RadSelectionPreparation = ReturnType<typeof prepareRadSelection>;
|
|
21
|
+
},
|
|
22
|
+
chunks: ReadonlyMap<number, RadSelectionChunk>,
|
|
23
|
+
): RadSelectionPreparation;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { RadMeta } from
|
|
2
|
-
import { RadLodSelection } from
|
|
1
|
+
import type { RadMeta } from "../../rad/radFormat.cjs";
|
|
2
|
+
import type { RadLodSelection } from "./radLod.cjs";
|
|
3
3
|
export type RadFade = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
indices: Uint32Array;
|
|
5
|
+
fades: Uint8Array;
|
|
6
6
|
};
|
|
7
7
|
export type RadVersionedSelection = RadLodSelection & {
|
|
8
|
-
|
|
8
|
+
selectionId: number;
|
|
9
9
|
};
|
|
10
10
|
export type RadStreamSelection = RadVersionedSelection & {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
changedChunks: Uint32Array;
|
|
12
|
+
fade?: RadFade;
|
|
13
13
|
};
|
|
14
14
|
/** Compare sorted cuts and build their optional fade union in one pass. Allocate
|
|
15
15
|
* the union only after a difference, so unchanged decisions allocate no fade. */
|
|
16
|
-
export declare function prepareRadFade(
|
|
16
|
+
export declare function prepareRadFade(
|
|
17
|
+
meta: RadMeta,
|
|
18
|
+
previous: Uint32Array,
|
|
19
|
+
next: Uint32Array,
|
|
20
|
+
enableFade: boolean,
|
|
21
|
+
): Pick<RadStreamSelection, "changedChunks" | "fade">;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { RadMeta } from
|
|
2
|
-
import { RadLodSelection } from
|
|
1
|
+
import type { RadMeta } from "../../rad/radFormat.js";
|
|
2
|
+
import type { RadLodSelection } from "./radLod.js";
|
|
3
3
|
export type RadFade = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
indices: Uint32Array;
|
|
5
|
+
fades: Uint8Array;
|
|
6
6
|
};
|
|
7
7
|
export type RadVersionedSelection = RadLodSelection & {
|
|
8
|
-
|
|
8
|
+
selectionId: number;
|
|
9
9
|
};
|
|
10
10
|
export type RadStreamSelection = RadVersionedSelection & {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
changedChunks: Uint32Array;
|
|
12
|
+
fade?: RadFade;
|
|
13
13
|
};
|
|
14
14
|
/** Compare sorted cuts and build their optional fade union in one pass. Allocate
|
|
15
15
|
* the union only after a difference, so unchanged decisions allocate no fade. */
|
|
16
|
-
export declare function prepareRadFade(
|
|
16
|
+
export declare function prepareRadFade(
|
|
17
|
+
meta: RadMeta,
|
|
18
|
+
previous: Uint32Array,
|
|
19
|
+
next: Uint32Array,
|
|
20
|
+
enableFade: boolean,
|
|
21
|
+
): Pick<RadStreamSelection, "changedChunks" | "fade">;
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { RadMeta } from
|
|
2
|
-
/** CPU-only data
|
|
1
|
+
import type { RadMeta } from "../../rad/radFormat.cjs";
|
|
2
|
+
/** CPU-only page data split between traversal and display preparation workers. */
|
|
3
3
|
export type RadLodChunk = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
centers: Float32Array;
|
|
5
|
+
radii: Float32Array;
|
|
6
|
+
childStart: Uint32Array;
|
|
7
|
+
childCount: Uint16Array;
|
|
8
|
+
/** Original page index to Morton storage; tree arrays keep file order. */
|
|
9
|
+
sourceToStorage: Uint32Array;
|
|
10
|
+
/** Center and scale/rotation bounds per Morton storage block. */
|
|
11
|
+
boundsBlocks: Float32Array;
|
|
12
12
|
};
|
|
13
13
|
export type RadLodView = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
/** Object-to-camera transform; doubles preserve large scene translations. */
|
|
15
|
+
viewFromObject: number[];
|
|
16
|
+
/** Camera projection's X/Y rows (8 values), including zoom and view offsets. */
|
|
17
|
+
projectionRows: number[];
|
|
18
|
+
/** Pixels per camera-space unit at depth 1, including projection zoom. */
|
|
19
|
+
pixelScale: number;
|
|
20
|
+
orthographic: boolean;
|
|
21
21
|
};
|
|
22
22
|
export type RadLodRequest = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
views: RadLodView[];
|
|
24
|
+
splatBudget: number;
|
|
25
|
+
splatBudgetTolerance: number;
|
|
26
|
+
/** Combined limit for resident tree paths and requested pages. */
|
|
27
|
+
pageBudget: number;
|
|
28
|
+
pixelThreshold: number;
|
|
29
|
+
residentChunks: number[];
|
|
28
30
|
};
|
|
29
31
|
export type RadLodSelection = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
/** Stable file indices. The scheduler maps these to occupied GPU slots. */
|
|
33
|
+
indices: Uint32Array;
|
|
34
|
+
wantedChunks: Uint32Array;
|
|
35
|
+
/** Ancestor and selected pages required by this cut. */
|
|
36
|
+
touchedChunks: Uint32Array;
|
|
35
37
|
};
|
|
36
38
|
/** Resolve validated LOD indices without assuming that chunks are 64K records. */
|
|
37
39
|
export declare function radChunkIndex(meta: RadMeta, index: number): number;
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { RadMeta } from
|
|
2
|
-
/** CPU-only data
|
|
1
|
+
import type { RadMeta } from "../../rad/radFormat.js";
|
|
2
|
+
/** CPU-only page data split between traversal and display preparation workers. */
|
|
3
3
|
export type RadLodChunk = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
centers: Float32Array;
|
|
5
|
+
radii: Float32Array;
|
|
6
|
+
childStart: Uint32Array;
|
|
7
|
+
childCount: Uint16Array;
|
|
8
|
+
/** Original page index to Morton storage; tree arrays keep file order. */
|
|
9
|
+
sourceToStorage: Uint32Array;
|
|
10
|
+
/** Center and scale/rotation bounds per Morton storage block. */
|
|
11
|
+
boundsBlocks: Float32Array;
|
|
12
12
|
};
|
|
13
13
|
export type RadLodView = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
/** Object-to-camera transform; doubles preserve large scene translations. */
|
|
15
|
+
viewFromObject: number[];
|
|
16
|
+
/** Camera projection's X/Y rows (8 values), including zoom and view offsets. */
|
|
17
|
+
projectionRows: number[];
|
|
18
|
+
/** Pixels per camera-space unit at depth 1, including projection zoom. */
|
|
19
|
+
pixelScale: number;
|
|
20
|
+
orthographic: boolean;
|
|
21
21
|
};
|
|
22
22
|
export type RadLodRequest = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
views: RadLodView[];
|
|
24
|
+
splatBudget: number;
|
|
25
|
+
splatBudgetTolerance: number;
|
|
26
|
+
/** Combined limit for resident tree paths and requested pages. */
|
|
27
|
+
pageBudget: number;
|
|
28
|
+
pixelThreshold: number;
|
|
29
|
+
residentChunks: number[];
|
|
28
30
|
};
|
|
29
31
|
export type RadLodSelection = {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
/** Stable file indices. The scheduler maps these to occupied GPU slots. */
|
|
33
|
+
indices: Uint32Array;
|
|
34
|
+
wantedChunks: Uint32Array;
|
|
35
|
+
/** Ancestor and selected pages required by this cut. */
|
|
36
|
+
touchedChunks: Uint32Array;
|
|
35
37
|
};
|
|
36
38
|
/** Resolve validated LOD indices without assuming that chunks are 64K records. */
|
|
37
39
|
export declare function radChunkIndex(meta: RadMeta, index: number): number;
|
|
@@ -1,59 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
indices: Uint32Array;
|
|
5
|
-
wantedChunks: Uint32Array;
|
|
6
|
-
touchedChunks: Uint32Array;
|
|
7
|
-
selectionId: number;
|
|
8
|
-
changedChunks: Uint32Array;
|
|
9
|
-
};
|
|
10
|
-
fade: boolean;
|
|
11
|
-
pools: import('../../../data/RadPagedSplats.cjs').RadPreparedSelection[];
|
|
12
|
-
};
|
|
13
|
-
initializeRad({ bytes }: {
|
|
14
|
-
bytes: Uint8Array;
|
|
15
|
-
}): import('../../rad/radFormat.cjs').RadHeader;
|
|
16
|
-
initializeRadDecoder({ header: value, rootBytes, }: {
|
|
17
|
-
header: import('../../rad/radFormat.cjs').RadHeader;
|
|
18
|
-
rootBytes?: Uint8Array;
|
|
19
|
-
}): void;
|
|
20
|
-
loadRadChunk({ index, generation, request, }: {
|
|
21
|
-
index: number;
|
|
22
|
-
generation: number;
|
|
23
|
-
request: import('../../rad/RadSource.cjs').RadReadRequest;
|
|
24
|
-
}, { sendStatus }: {
|
|
25
|
-
sendStatus: (data: {
|
|
26
|
-
loaded: number;
|
|
27
|
-
}) => void;
|
|
28
|
-
}): Promise<{
|
|
29
|
-
data: {
|
|
30
|
-
numSplats: number;
|
|
31
|
-
splatArrays: [Uint32Array<ArrayBufferLike>, Uint32Array<ArrayBufferLike>];
|
|
32
|
-
extra: import('../../../data/defines.cjs').SplatExtra;
|
|
33
|
-
rootRadius: number | undefined;
|
|
34
|
-
} & import('../../../data/defines.cjs').SplatResult & {
|
|
35
|
-
sourceIds: Uint32Array;
|
|
36
|
-
centerOnlyBoundingBox: Float32Array;
|
|
37
|
-
boundingBox: Float32Array;
|
|
38
|
-
spatialBounds: Float32Array;
|
|
39
|
-
};
|
|
40
|
-
tree: import('./radLod.cjs').RadLodChunk;
|
|
41
|
-
state: import('../../rad/RadSource.cjs').RadResourceState | undefined;
|
|
42
|
-
rootBytes: Uint8Array<ArrayBufferLike> | undefined;
|
|
43
|
-
}>;
|
|
44
|
-
cancelRadLoad({ generation }: {
|
|
45
|
-
generation: number;
|
|
46
|
-
}): void;
|
|
47
|
-
retainRadChunk({ index, generation, tree, }: {
|
|
48
|
-
index: number;
|
|
49
|
-
generation: number;
|
|
50
|
-
tree: import('./radLod.cjs').RadLodChunk;
|
|
51
|
-
}): void;
|
|
52
|
-
selectRadLod(request: import('./RadSelectionState.cjs').RadSelectionRequest): import('./RadSelectionState.cjs').RadSelectionReply;
|
|
53
|
-
releaseRadChunk({ index, generation, }: {
|
|
54
|
-
index: number;
|
|
55
|
-
generation?: number;
|
|
56
|
-
}): void;
|
|
57
|
-
};
|
|
58
|
-
export type RadStreamRpcHandlers = typeof rpcHandlers;
|
|
59
|
-
export {};
|
|
1
|
+
import type { createRadStreamHandlers } from "./workerHandlers.cjs";
|
|
2
|
+
|
|
3
|
+
export type RadStreamRpcHandlers = ReturnType<typeof createRadStreamHandlers>;
|