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,79 +1,89 @@
|
|
|
1
1
|
/** @internal */
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
/** @internal */
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
2
|
+
export declare const Opcode: {
|
|
3
|
+
readonly Constant: 1;
|
|
4
|
+
readonly InputField: 2;
|
|
5
|
+
readonly InputAttribute: 3;
|
|
6
|
+
readonly Negate: 10;
|
|
7
|
+
readonly Abs: 11;
|
|
8
|
+
readonly Sqrt: 12;
|
|
9
|
+
readonly Log: 13;
|
|
10
|
+
readonly Exp: 14;
|
|
11
|
+
readonly Floor: 15;
|
|
12
|
+
readonly Ceil: 16;
|
|
13
|
+
readonly Round: 17;
|
|
14
|
+
readonly Normalize: 18;
|
|
15
|
+
readonly Length: 19;
|
|
16
|
+
readonly IsFinite: 20;
|
|
17
|
+
readonly Not: 22;
|
|
18
|
+
readonly Sin: 23;
|
|
19
|
+
readonly Cos: 24;
|
|
20
|
+
readonly Acos: 25;
|
|
21
|
+
readonly Tan: 26;
|
|
22
|
+
readonly Asin: 27;
|
|
23
|
+
readonly Atan: 28;
|
|
24
|
+
readonly Add: 30;
|
|
25
|
+
readonly Subtract: 31;
|
|
26
|
+
readonly Multiply: 32;
|
|
27
|
+
readonly Divide: 33;
|
|
28
|
+
readonly Min: 34;
|
|
29
|
+
readonly Max: 35;
|
|
30
|
+
readonly Pow: 36;
|
|
31
|
+
readonly Dot: 37;
|
|
32
|
+
readonly Cross: 38;
|
|
33
|
+
readonly Equal: 39;
|
|
34
|
+
readonly NotEqual: 40;
|
|
35
|
+
readonly Less: 41;
|
|
36
|
+
readonly LessEqual: 42;
|
|
37
|
+
readonly Greater: 43;
|
|
38
|
+
readonly GreaterEqual: 44;
|
|
39
|
+
readonly And: 45;
|
|
40
|
+
readonly Or: 46;
|
|
41
|
+
readonly QuaternionMultiply: 47;
|
|
42
|
+
readonly RotateVector: 48;
|
|
43
|
+
readonly Atan2: 49;
|
|
44
|
+
readonly Select: 60;
|
|
45
|
+
readonly Clamp: 61;
|
|
46
|
+
readonly Mix: 62;
|
|
47
|
+
readonly MultiplyAdd: 63;
|
|
48
|
+
readonly AddMultiply: 64;
|
|
49
|
+
readonly Vec2: 70;
|
|
50
|
+
readonly Vec3: 71;
|
|
51
|
+
readonly Vec4: 72;
|
|
52
|
+
readonly Component: 74;
|
|
53
|
+
readonly MaxComponentIndex: 75;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type Opcode = (typeof Opcode)[keyof typeof Opcode];
|
|
57
|
+
/** @internal */
|
|
58
|
+
export declare const InputField: {
|
|
59
|
+
readonly Position: 1;
|
|
60
|
+
readonly Scale: 2;
|
|
61
|
+
readonly Quaternion: 3;
|
|
62
|
+
readonly Opacity: 4;
|
|
63
|
+
readonly Alpha: 5;
|
|
64
|
+
readonly Color: 6;
|
|
65
|
+
readonly Sh0: 7;
|
|
66
|
+
};
|
|
67
|
+
/** @internal */
|
|
68
|
+
export type InputField = (typeof InputField)[keyof typeof InputField];
|
|
65
69
|
/** @internal */
|
|
66
70
|
export declare const SH_COEFFICIENT_COUNT = 15;
|
|
67
71
|
/** @internal */
|
|
68
|
-
export type SplatPostDecodeValueType =
|
|
72
|
+
export type SplatPostDecodeValueType =
|
|
73
|
+
| "float"
|
|
74
|
+
| "bool"
|
|
75
|
+
| "vec2"
|
|
76
|
+
| "vec3"
|
|
77
|
+
| "vec4"
|
|
78
|
+
| "quaternion";
|
|
69
79
|
/** @internal */
|
|
70
80
|
export declare const TYPE_WIDTHS: Record<SplatPostDecodeValueType, number>;
|
|
71
81
|
/** @internal */
|
|
72
82
|
export type SplatPostDecodeInstruction = {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
opcode: Opcode;
|
|
84
|
+
type: SplatPostDecodeValueType;
|
|
85
|
+
args: readonly number[];
|
|
86
|
+
immediate: number;
|
|
77
87
|
};
|
|
78
88
|
/** @internal */
|
|
79
89
|
export declare const SPLAT_POST_DECODE_INSTRUCTION_OPCODE = 0;
|
|
@@ -90,36 +100,51 @@ export declare const SPLAT_POST_DECODE_INSTRUCTION_STRIDE = 7;
|
|
|
90
100
|
/** @internal */
|
|
91
101
|
export declare const SPLAT_POST_DECODE_MISSING_ARGUMENT = 65535;
|
|
92
102
|
/** @internal */
|
|
93
|
-
export type SplatPostDecodeAttributeFormat =
|
|
94
|
-
|
|
95
|
-
|
|
103
|
+
export type SplatPostDecodeAttributeFormat =
|
|
104
|
+
| "f32"
|
|
105
|
+
| "f16"
|
|
106
|
+
| "u8"
|
|
107
|
+
| "unorm8"
|
|
108
|
+
| "i8"
|
|
109
|
+
| "snorm8"
|
|
110
|
+
| "u16"
|
|
111
|
+
| "unorm16"
|
|
112
|
+
| "i16"
|
|
113
|
+
| "snorm16"
|
|
114
|
+
| "u32"
|
|
115
|
+
| "i32";
|
|
116
|
+
/** @internal */
|
|
117
|
+
export declare const ATTRIBUTE_FORMAT_BYTES: Record<
|
|
118
|
+
SplatPostDecodeAttributeFormat,
|
|
119
|
+
number
|
|
120
|
+
>;
|
|
96
121
|
export type AttributeComponents = 1 | 2 | 3 | 4;
|
|
97
122
|
export type AttributeBinding = {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
123
|
+
data: ArrayBufferView;
|
|
124
|
+
format: SplatPostDecodeAttributeFormat;
|
|
125
|
+
count: number;
|
|
126
|
+
components: AttributeComponents;
|
|
127
|
+
byteOffset: number;
|
|
128
|
+
byteStride: number;
|
|
104
129
|
};
|
|
105
130
|
/** @internal */
|
|
106
131
|
export type SerializedSplatPostDecodeAttribute = {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
132
|
+
format: SplatPostDecodeAttributeFormat;
|
|
133
|
+
components: AttributeComponents;
|
|
134
|
+
byteOffset: number;
|
|
135
|
+
byteStride: number;
|
|
136
|
+
count: number;
|
|
112
137
|
};
|
|
113
138
|
/** @internal */
|
|
114
139
|
export type SplatPostDecodeOutputs = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
140
|
+
when?: number;
|
|
141
|
+
position?: number;
|
|
142
|
+
scale?: number;
|
|
143
|
+
quaternion?: number;
|
|
144
|
+
opacity?: number;
|
|
145
|
+
alpha?: number;
|
|
146
|
+
color?: number;
|
|
147
|
+
sh?: readonly number[];
|
|
123
148
|
};
|
|
124
149
|
/** @internal */
|
|
125
150
|
export declare const SPLAT_POST_DECODE_FLOW_STAGE_START = 0;
|
|
@@ -135,32 +160,32 @@ export declare const SPLAT_POST_DECODE_FLOW_STAGE_ON_FALSE = 4;
|
|
|
135
160
|
export declare const SPLAT_POST_DECODE_FLOW_STAGE_STRIDE = 5;
|
|
136
161
|
/** @internal */
|
|
137
162
|
export type SerializedSplatPostDecodeCondition = {
|
|
138
|
-
|
|
139
|
-
|
|
163
|
+
/** Packed start/instruction/register/onTrue/onFalse Uint16 records. */
|
|
164
|
+
stages: Uint16Array;
|
|
140
165
|
};
|
|
141
166
|
/** @internal */
|
|
142
167
|
export type SerializedSplatPostDecode = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
168
|
+
/** Packed opcode/width/immediate/arg0/arg1/arg2/arg3 Uint16 records. */
|
|
169
|
+
instructions: Uint16Array;
|
|
170
|
+
constants: Float32Array;
|
|
171
|
+
outputs: Omit<SplatPostDecodeOutputs, "when">;
|
|
172
|
+
condition?: SerializedSplatPostDecodeCondition;
|
|
173
|
+
attributeData: Uint8Array;
|
|
174
|
+
attributes: readonly SerializedSplatPostDecodeAttribute[];
|
|
150
175
|
};
|
|
151
176
|
export type PostDecodeSource = {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
177
|
+
instructions: readonly SplatPostDecodeInstruction[];
|
|
178
|
+
constants: readonly number[];
|
|
179
|
+
attributes: readonly AttributeBinding[];
|
|
155
180
|
};
|
|
156
181
|
export type PostDecodeSplatData = {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
182
|
+
numSplats: number;
|
|
183
|
+
splat0: Uint32Array;
|
|
184
|
+
splat1: Uint32Array;
|
|
185
|
+
sortCenters: Float32Array;
|
|
186
|
+
sourceIds?: Uint32Array;
|
|
187
|
+
sh1?: Uint32Array;
|
|
188
|
+
sh2?: Uint32Array;
|
|
189
|
+
sh3a?: Uint32Array;
|
|
190
|
+
sh3b?: Uint32Array;
|
|
166
191
|
};
|
|
@@ -1,79 +1,89 @@
|
|
|
1
1
|
/** @internal */
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
/** @internal */
|
|
56
|
-
export
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
2
|
+
export declare const Opcode: {
|
|
3
|
+
readonly Constant: 1;
|
|
4
|
+
readonly InputField: 2;
|
|
5
|
+
readonly InputAttribute: 3;
|
|
6
|
+
readonly Negate: 10;
|
|
7
|
+
readonly Abs: 11;
|
|
8
|
+
readonly Sqrt: 12;
|
|
9
|
+
readonly Log: 13;
|
|
10
|
+
readonly Exp: 14;
|
|
11
|
+
readonly Floor: 15;
|
|
12
|
+
readonly Ceil: 16;
|
|
13
|
+
readonly Round: 17;
|
|
14
|
+
readonly Normalize: 18;
|
|
15
|
+
readonly Length: 19;
|
|
16
|
+
readonly IsFinite: 20;
|
|
17
|
+
readonly Not: 22;
|
|
18
|
+
readonly Sin: 23;
|
|
19
|
+
readonly Cos: 24;
|
|
20
|
+
readonly Acos: 25;
|
|
21
|
+
readonly Tan: 26;
|
|
22
|
+
readonly Asin: 27;
|
|
23
|
+
readonly Atan: 28;
|
|
24
|
+
readonly Add: 30;
|
|
25
|
+
readonly Subtract: 31;
|
|
26
|
+
readonly Multiply: 32;
|
|
27
|
+
readonly Divide: 33;
|
|
28
|
+
readonly Min: 34;
|
|
29
|
+
readonly Max: 35;
|
|
30
|
+
readonly Pow: 36;
|
|
31
|
+
readonly Dot: 37;
|
|
32
|
+
readonly Cross: 38;
|
|
33
|
+
readonly Equal: 39;
|
|
34
|
+
readonly NotEqual: 40;
|
|
35
|
+
readonly Less: 41;
|
|
36
|
+
readonly LessEqual: 42;
|
|
37
|
+
readonly Greater: 43;
|
|
38
|
+
readonly GreaterEqual: 44;
|
|
39
|
+
readonly And: 45;
|
|
40
|
+
readonly Or: 46;
|
|
41
|
+
readonly QuaternionMultiply: 47;
|
|
42
|
+
readonly RotateVector: 48;
|
|
43
|
+
readonly Atan2: 49;
|
|
44
|
+
readonly Select: 60;
|
|
45
|
+
readonly Clamp: 61;
|
|
46
|
+
readonly Mix: 62;
|
|
47
|
+
readonly MultiplyAdd: 63;
|
|
48
|
+
readonly AddMultiply: 64;
|
|
49
|
+
readonly Vec2: 70;
|
|
50
|
+
readonly Vec3: 71;
|
|
51
|
+
readonly Vec4: 72;
|
|
52
|
+
readonly Component: 74;
|
|
53
|
+
readonly MaxComponentIndex: 75;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type Opcode = (typeof Opcode)[keyof typeof Opcode];
|
|
57
|
+
/** @internal */
|
|
58
|
+
export declare const InputField: {
|
|
59
|
+
readonly Position: 1;
|
|
60
|
+
readonly Scale: 2;
|
|
61
|
+
readonly Quaternion: 3;
|
|
62
|
+
readonly Opacity: 4;
|
|
63
|
+
readonly Alpha: 5;
|
|
64
|
+
readonly Color: 6;
|
|
65
|
+
readonly Sh0: 7;
|
|
66
|
+
};
|
|
67
|
+
/** @internal */
|
|
68
|
+
export type InputField = (typeof InputField)[keyof typeof InputField];
|
|
65
69
|
/** @internal */
|
|
66
70
|
export declare const SH_COEFFICIENT_COUNT = 15;
|
|
67
71
|
/** @internal */
|
|
68
|
-
export type SplatPostDecodeValueType =
|
|
72
|
+
export type SplatPostDecodeValueType =
|
|
73
|
+
| "float"
|
|
74
|
+
| "bool"
|
|
75
|
+
| "vec2"
|
|
76
|
+
| "vec3"
|
|
77
|
+
| "vec4"
|
|
78
|
+
| "quaternion";
|
|
69
79
|
/** @internal */
|
|
70
80
|
export declare const TYPE_WIDTHS: Record<SplatPostDecodeValueType, number>;
|
|
71
81
|
/** @internal */
|
|
72
82
|
export type SplatPostDecodeInstruction = {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
opcode: Opcode;
|
|
84
|
+
type: SplatPostDecodeValueType;
|
|
85
|
+
args: readonly number[];
|
|
86
|
+
immediate: number;
|
|
77
87
|
};
|
|
78
88
|
/** @internal */
|
|
79
89
|
export declare const SPLAT_POST_DECODE_INSTRUCTION_OPCODE = 0;
|
|
@@ -90,36 +100,51 @@ export declare const SPLAT_POST_DECODE_INSTRUCTION_STRIDE = 7;
|
|
|
90
100
|
/** @internal */
|
|
91
101
|
export declare const SPLAT_POST_DECODE_MISSING_ARGUMENT = 65535;
|
|
92
102
|
/** @internal */
|
|
93
|
-
export type SplatPostDecodeAttributeFormat =
|
|
94
|
-
|
|
95
|
-
|
|
103
|
+
export type SplatPostDecodeAttributeFormat =
|
|
104
|
+
| "f32"
|
|
105
|
+
| "f16"
|
|
106
|
+
| "u8"
|
|
107
|
+
| "unorm8"
|
|
108
|
+
| "i8"
|
|
109
|
+
| "snorm8"
|
|
110
|
+
| "u16"
|
|
111
|
+
| "unorm16"
|
|
112
|
+
| "i16"
|
|
113
|
+
| "snorm16"
|
|
114
|
+
| "u32"
|
|
115
|
+
| "i32";
|
|
116
|
+
/** @internal */
|
|
117
|
+
export declare const ATTRIBUTE_FORMAT_BYTES: Record<
|
|
118
|
+
SplatPostDecodeAttributeFormat,
|
|
119
|
+
number
|
|
120
|
+
>;
|
|
96
121
|
export type AttributeComponents = 1 | 2 | 3 | 4;
|
|
97
122
|
export type AttributeBinding = {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
123
|
+
data: ArrayBufferView;
|
|
124
|
+
format: SplatPostDecodeAttributeFormat;
|
|
125
|
+
count: number;
|
|
126
|
+
components: AttributeComponents;
|
|
127
|
+
byteOffset: number;
|
|
128
|
+
byteStride: number;
|
|
104
129
|
};
|
|
105
130
|
/** @internal */
|
|
106
131
|
export type SerializedSplatPostDecodeAttribute = {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
132
|
+
format: SplatPostDecodeAttributeFormat;
|
|
133
|
+
components: AttributeComponents;
|
|
134
|
+
byteOffset: number;
|
|
135
|
+
byteStride: number;
|
|
136
|
+
count: number;
|
|
112
137
|
};
|
|
113
138
|
/** @internal */
|
|
114
139
|
export type SplatPostDecodeOutputs = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
140
|
+
when?: number;
|
|
141
|
+
position?: number;
|
|
142
|
+
scale?: number;
|
|
143
|
+
quaternion?: number;
|
|
144
|
+
opacity?: number;
|
|
145
|
+
alpha?: number;
|
|
146
|
+
color?: number;
|
|
147
|
+
sh?: readonly number[];
|
|
123
148
|
};
|
|
124
149
|
/** @internal */
|
|
125
150
|
export declare const SPLAT_POST_DECODE_FLOW_STAGE_START = 0;
|
|
@@ -135,32 +160,32 @@ export declare const SPLAT_POST_DECODE_FLOW_STAGE_ON_FALSE = 4;
|
|
|
135
160
|
export declare const SPLAT_POST_DECODE_FLOW_STAGE_STRIDE = 5;
|
|
136
161
|
/** @internal */
|
|
137
162
|
export type SerializedSplatPostDecodeCondition = {
|
|
138
|
-
|
|
139
|
-
|
|
163
|
+
/** Packed start/instruction/register/onTrue/onFalse Uint16 records. */
|
|
164
|
+
stages: Uint16Array;
|
|
140
165
|
};
|
|
141
166
|
/** @internal */
|
|
142
167
|
export type SerializedSplatPostDecode = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
168
|
+
/** Packed opcode/width/immediate/arg0/arg1/arg2/arg3 Uint16 records. */
|
|
169
|
+
instructions: Uint16Array;
|
|
170
|
+
constants: Float32Array;
|
|
171
|
+
outputs: Omit<SplatPostDecodeOutputs, "when">;
|
|
172
|
+
condition?: SerializedSplatPostDecodeCondition;
|
|
173
|
+
attributeData: Uint8Array;
|
|
174
|
+
attributes: readonly SerializedSplatPostDecodeAttribute[];
|
|
150
175
|
};
|
|
151
176
|
export type PostDecodeSource = {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
177
|
+
instructions: readonly SplatPostDecodeInstruction[];
|
|
178
|
+
constants: readonly number[];
|
|
179
|
+
attributes: readonly AttributeBinding[];
|
|
155
180
|
};
|
|
156
181
|
export type PostDecodeSplatData = {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
182
|
+
numSplats: number;
|
|
183
|
+
splat0: Uint32Array;
|
|
184
|
+
splat1: Uint32Array;
|
|
185
|
+
sortCenters: Float32Array;
|
|
186
|
+
sourceIds?: Uint32Array;
|
|
187
|
+
sh1?: Uint32Array;
|
|
188
|
+
sh2?: Uint32Array;
|
|
189
|
+
sh3a?: Uint32Array;
|
|
190
|
+
sh3b?: Uint32Array;
|
|
166
191
|
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { SerializedSplatPostDecode } from
|
|
1
|
+
import type { SerializedSplatPostDecode } from "./protocol.cjs";
|
|
2
2
|
export declare const CONDITION_CARRY_EVENT_OFFSET_MASK = 2147483647;
|
|
3
3
|
export declare const CONDITION_CARRY_EVENT_REMOVAL = 2147483648;
|
|
4
4
|
export declare function getInstructionCount(instructions: Uint16Array): number;
|
|
5
|
-
export declare function instructionWidth(
|
|
5
|
+
export declare function instructionWidth(
|
|
6
|
+
instructions: Uint16Array,
|
|
7
|
+
index: number,
|
|
8
|
+
): number;
|
|
6
9
|
/** @internal */
|
|
7
|
-
export declare function allocateSplatPostDecodeRegisters(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
export declare function allocateSplatPostDecodeRegisters(
|
|
11
|
+
program: SerializedSplatPostDecode,
|
|
12
|
+
): {
|
|
13
|
+
registerOffsets: Uint32Array<ArrayBuffer>;
|
|
14
|
+
registerValueCount: number;
|
|
15
|
+
conditionCarryStageStarts: Uint32Array<ArrayBuffer>;
|
|
16
|
+
conditionCarryEvents: Uint32Array<ArrayBuffer>;
|
|
12
17
|
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { SerializedSplatPostDecode } from
|
|
1
|
+
import type { SerializedSplatPostDecode } from "./protocol.js";
|
|
2
2
|
export declare const CONDITION_CARRY_EVENT_OFFSET_MASK = 2147483647;
|
|
3
3
|
export declare const CONDITION_CARRY_EVENT_REMOVAL = 2147483648;
|
|
4
4
|
export declare function getInstructionCount(instructions: Uint16Array): number;
|
|
5
|
-
export declare function instructionWidth(
|
|
5
|
+
export declare function instructionWidth(
|
|
6
|
+
instructions: Uint16Array,
|
|
7
|
+
index: number,
|
|
8
|
+
): number;
|
|
6
9
|
/** @internal */
|
|
7
|
-
export declare function allocateSplatPostDecodeRegisters(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
export declare function allocateSplatPostDecodeRegisters(
|
|
11
|
+
program: SerializedSplatPostDecode,
|
|
12
|
+
): {
|
|
13
|
+
registerOffsets: Uint32Array<ArrayBuffer>;
|
|
14
|
+
registerValueCount: number;
|
|
15
|
+
conditionCarryStageStarts: Uint32Array<ArrayBuffer>;
|
|
16
|
+
conditionCarryEvents: Uint32Array<ArrayBuffer>;
|
|
12
17
|
};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
PostDecodeSplatData,
|
|
3
|
+
SerializedSplatPostDecode,
|
|
4
|
+
} from "./protocol.cjs";
|
|
5
|
+
export declare function applySplatPostDecode(
|
|
6
|
+
data: PostDecodeSplatData,
|
|
7
|
+
program: SerializedSplatPostDecode,
|
|
8
|
+
onProgress?: (loaded: number, total: number) => void,
|
|
9
|
+
): void;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
PostDecodeSplatData,
|
|
3
|
+
SerializedSplatPostDecode,
|
|
4
|
+
} from "./protocol.js";
|
|
5
|
+
export declare function applySplatPostDecode(
|
|
6
|
+
data: PostDecodeSplatData,
|
|
7
|
+
program: SerializedSplatPostDecode,
|
|
8
|
+
onProgress?: (loaded: number, total: number) => void,
|
|
9
|
+
): void;
|