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.
Files changed (248) hide show
  1. package/CHANGELOG.md +32 -2
  2. package/CONTRIBUTING.md +4 -2
  3. package/README.md +4 -3
  4. package/dist/gaussian-splat-lite.cjs +6379 -1441
  5. package/dist/gaussian-splat-lite.cjs.map +1 -1
  6. package/dist/gaussian-splat-lite.min.cjs +978 -11
  7. package/dist/gaussian-splat-lite.min.cjs.map +1 -1
  8. package/dist/gaussian-splat-lite.module.js +5920 -982
  9. package/dist/gaussian-splat-lite.module.js.map +1 -1
  10. package/dist/gaussian-splat-lite.module.min.js +7882 -3373
  11. package/dist/gaussian-splat-lite.module.min.js.map +1 -1
  12. package/dist/types/addons/NeuralDenoiseNode.d.cts +72 -0
  13. package/dist/types/addons/NeuralDenoiseNode.d.ts +72 -0
  14. package/dist/types/addons/NeuralDenoisePass.d.cts +34 -0
  15. package/dist/types/addons/NeuralDenoisePass.d.ts +34 -0
  16. package/dist/types/addons/TAANode.d.cts +46 -33
  17. package/dist/types/addons/TAANode.d.ts +46 -33
  18. package/dist/types/addons/TAAPass.d.cts +47 -32
  19. package/dist/types/addons/TAAPass.d.ts +47 -32
  20. package/dist/types/addons/neuralDenoiseGL.d.cts +25 -0
  21. package/dist/types/addons/neuralDenoiseGL.d.ts +25 -0
  22. package/dist/types/addons/neuralDenoiseGLSL.d.cts +8 -0
  23. package/dist/types/addons/neuralDenoiseGLSL.d.ts +8 -0
  24. package/dist/types/addons/neuralDenoisePasses.d.cts +26 -0
  25. package/dist/types/addons/neuralDenoisePasses.d.ts +26 -0
  26. package/dist/types/addons/neuralDenoiseShaders.d.cts +38 -0
  27. package/dist/types/addons/neuralDenoiseShaders.d.ts +38 -0
  28. package/dist/types/addons/neuralDenoiseWeights.d.cts +118 -0
  29. package/dist/types/addons/neuralDenoiseWeights.d.ts +118 -0
  30. package/dist/types/addons/stochasticCoverage.d.cts +14 -0
  31. package/dist/types/addons/stochasticCoverage.d.ts +14 -0
  32. package/dist/types/addons/taaShared.d.cts +58 -39
  33. package/dist/types/addons/taaShared.d.ts +58 -39
  34. package/dist/types/capture/SplatCapture.d.cts +54 -53
  35. package/dist/types/capture/SplatCapture.d.ts +54 -53
  36. package/dist/types/capture/WebGLCapture.d.cts +10 -10
  37. package/dist/types/capture/WebGLCapture.d.ts +10 -10
  38. package/dist/types/capture/WebGPUCapture.d.cts +14 -14
  39. package/dist/types/capture/WebGPUCapture.d.ts +14 -14
  40. package/dist/types/capture/pixels.d.cts +15 -4
  41. package/dist/types/capture/pixels.d.ts +15 -4
  42. package/dist/types/capture/rendererState.d.cts +5 -2
  43. package/dist/types/capture/rendererState.d.ts +5 -2
  44. package/dist/types/data/IndexedSplats.d.cts +76 -58
  45. package/dist/types/data/IndexedSplats.d.ts +76 -58
  46. package/dist/types/data/RadPagedSplats.d.cts +65 -61
  47. package/dist/types/data/RadPagedSplats.d.ts +65 -61
  48. package/dist/types/data/SogRegionSplats.d.cts +25 -19
  49. package/dist/types/data/SogRegionSplats.d.ts +25 -19
  50. package/dist/types/data/SplatOpacityTable.d.cts +29 -29
  51. package/dist/types/data/SplatOpacityTable.d.ts +29 -29
  52. package/dist/types/data/Splats.d.cts +99 -69
  53. package/dist/types/data/Splats.d.ts +99 -69
  54. package/dist/types/data/defines.d.cts +24 -24
  55. package/dist/types/data/defines.d.ts +24 -24
  56. package/dist/types/data/raycast.d.cts +13 -9
  57. package/dist/types/data/raycast.d.ts +13 -9
  58. package/dist/types/data/splatCodec.d.cts +29 -5
  59. package/dist/types/data/splatCodec.d.ts +29 -5
  60. package/dist/types/data/splatData.d.cts +18 -11
  61. package/dist/types/data/splatData.d.ts +18 -11
  62. package/dist/types/data/splatRange.d.cts +6 -2
  63. package/dist/types/data/splatRange.d.ts +6 -2
  64. package/dist/types/data/textureLayout.d.cts +9 -6
  65. package/dist/types/data/textureLayout.d.ts +9 -6
  66. package/dist/types/data/unpack.d.cts +16 -9
  67. package/dist/types/data/unpack.d.ts +16 -9
  68. package/dist/types/index.d.cts +65 -19
  69. package/dist/types/index.d.ts +65 -19
  70. package/dist/types/loaders/SplatLoader.d.cts +27 -14
  71. package/dist/types/loaders/SplatLoader.d.ts +27 -14
  72. package/dist/types/loaders/loadSplatData.d.cts +35 -17
  73. package/dist/types/loaders/loadSplatData.d.ts +35 -17
  74. package/dist/types/loaders/loadTypes.d.cts +46 -40
  75. package/dist/types/loaders/loadTypes.d.ts +46 -40
  76. package/dist/types/loaders/morton.d.cts +9 -3
  77. package/dist/types/loaders/morton.d.ts +9 -3
  78. package/dist/types/loaders/postDecode/builder.d.cts +222 -127
  79. package/dist/types/loaders/postDecode/builder.d.ts +222 -127
  80. package/dist/types/loaders/postDecode/compiler.d.cts +25 -11
  81. package/dist/types/loaders/postDecode/compiler.d.ts +25 -11
  82. package/dist/types/loaders/postDecode/operations.d.cts +22 -3
  83. package/dist/types/loaders/postDecode/operations.d.ts +22 -3
  84. package/dist/types/loaders/postDecode/optimizer.d.cts +5 -2
  85. package/dist/types/loaders/postDecode/optimizer.d.ts +5 -2
  86. package/dist/types/loaders/postDecode/program.d.cts +13 -6
  87. package/dist/types/loaders/postDecode/program.d.ts +13 -6
  88. package/dist/types/loaders/postDecode/protocol.d.cts +136 -111
  89. package/dist/types/loaders/postDecode/protocol.d.ts +136 -111
  90. package/dist/types/loaders/postDecode/registers.d.cts +12 -7
  91. package/dist/types/loaders/postDecode/registers.d.ts +12 -7
  92. package/dist/types/loaders/postDecode/runtime.d.cts +9 -2
  93. package/dist/types/loaders/postDecode/runtime.d.ts +9 -2
  94. package/dist/types/loaders/rad/RadSource.d.cts +81 -66
  95. package/dist/types/loaders/rad/RadSource.d.ts +81 -66
  96. package/dist/types/loaders/rad/radFormat.d.cts +41 -36
  97. package/dist/types/loaders/rad/radFormat.d.ts +41 -36
  98. package/dist/types/loaders/rad.d.cts +4 -4
  99. package/dist/types/loaders/rad.d.ts +4 -4
  100. package/dist/types/loaders/sog/SogSource.d.cts +14 -4
  101. package/dist/types/loaders/sog/SogSource.d.ts +14 -4
  102. package/dist/types/loaders/sog/sogZip.d.cts +12 -12
  103. package/dist/types/loaders/sog/sogZip.d.ts +12 -12
  104. package/dist/types/loaders/sog.d.cts +3 -3
  105. package/dist/types/loaders/sog.d.ts +3 -3
  106. package/dist/types/loaders/source.d.cts +43 -15
  107. package/dist/types/loaders/source.d.ts +43 -15
  108. package/dist/types/loaders/stream/StreamByteBudget.d.cts +4 -4
  109. package/dist/types/loaders/stream/StreamByteBudget.d.ts +4 -4
  110. package/dist/types/loaders/stream/StreamCameras.d.cts +27 -18
  111. package/dist/types/loaders/stream/StreamCameras.d.ts +27 -18
  112. package/dist/types/loaders/stream/StreamWorkerPool.d.cts +37 -34
  113. package/dist/types/loaders/stream/StreamWorkerPool.d.ts +37 -34
  114. package/dist/types/loaders/stream/rad-stream/RadSelectionState.d.cts +15 -11
  115. package/dist/types/loaders/stream/rad-stream/RadSelectionState.d.ts +15 -11
  116. package/dist/types/loaders/stream/rad-stream/RadStreamBatch.d.cts +13 -9
  117. package/dist/types/loaders/stream/rad-stream/RadStreamBatch.d.ts +13 -9
  118. package/dist/types/loaders/stream/rad-stream/RadStreamLoader.d.cts +64 -49
  119. package/dist/types/loaders/stream/rad-stream/RadStreamLoader.d.ts +64 -49
  120. package/dist/types/loaders/stream/rad-stream/RadStreamScheduler.d.cts +110 -102
  121. package/dist/types/loaders/stream/rad-stream/RadStreamScheduler.d.ts +110 -102
  122. package/dist/types/loaders/stream/rad-stream/RadStreamWorker.d.cts +3 -3
  123. package/dist/types/loaders/stream/rad-stream/RadStreamWorker.d.ts +3 -3
  124. package/dist/types/loaders/stream/rad-stream/prepareRadSelection.d.cts +27 -15
  125. package/dist/types/loaders/stream/rad-stream/prepareRadSelection.d.ts +27 -15
  126. package/dist/types/loaders/stream/rad-stream/radFade.d.cts +13 -8
  127. package/dist/types/loaders/stream/rad-stream/radFade.d.ts +13 -8
  128. package/dist/types/loaders/stream/rad-stream/radLod.d.cts +26 -26
  129. package/dist/types/loaders/stream/rad-stream/radLod.d.ts +26 -26
  130. package/dist/types/loaders/stream/rad-stream/worker.d.cts +3 -59
  131. package/dist/types/loaders/stream/rad-stream/worker.d.ts +3 -59
  132. package/dist/types/loaders/stream/rad-stream/workerHandlers.d.cts +85 -59
  133. package/dist/types/loaders/stream/rad-stream/workerHandlers.d.ts +85 -59
  134. package/dist/types/loaders/stream/sog-stream/SogStreamBatch.d.cts +17 -12
  135. package/dist/types/loaders/stream/sog-stream/SogStreamBatch.d.ts +17 -12
  136. package/dist/types/loaders/stream/sog-stream/SogStreamLoader.d.cts +56 -41
  137. package/dist/types/loaders/stream/sog-stream/SogStreamLoader.d.ts +56 -41
  138. package/dist/types/loaders/stream/sog-stream/SogStreamScheduler.d.cts +82 -81
  139. package/dist/types/loaders/stream/sog-stream/SogStreamScheduler.d.ts +82 -81
  140. package/dist/types/loaders/stream/sog-stream/SogStreamWorker.d.cts +3 -3
  141. package/dist/types/loaders/stream/sog-stream/SogStreamWorker.d.ts +3 -3
  142. package/dist/types/loaders/stream/sog-stream/sogLod.d.cts +59 -44
  143. package/dist/types/loaders/stream/sog-stream/sogLod.d.ts +59 -44
  144. package/dist/types/loaders/stream/sog-stream/sogVisibility.d.cts +30 -22
  145. package/dist/types/loaders/stream/sog-stream/sogVisibility.d.ts +30 -22
  146. package/dist/types/loaders/stream/sog-stream/worker.d.cts +7 -40
  147. package/dist/types/loaders/stream/sog-stream/worker.d.ts +7 -40
  148. package/dist/types/loaders/stream/sog-stream/workerHandlers.d.cts +69 -44
  149. package/dist/types/loaders/stream/sog-stream/workerHandlers.d.ts +69 -44
  150. package/dist/types/loaders/stream/streamOptions.d.cts +41 -32
  151. package/dist/types/loaders/stream/streamOptions.d.ts +41 -32
  152. package/dist/types/loaders/workerDecode.d.cts +30 -12
  153. package/dist/types/loaders/workerDecode.d.ts +30 -12
  154. package/dist/types/patches/threeR186.d.cts +3 -0
  155. package/dist/types/patches/threeR186.d.ts +3 -0
  156. package/dist/types/rendering/GaussianSplatRenderer.d.cts +393 -376
  157. package/dist/types/rendering/GaussianSplatRenderer.d.ts +393 -376
  158. package/dist/types/rendering/MaterialState.d.cts +9 -0
  159. package/dist/types/rendering/MaterialState.d.ts +9 -0
  160. package/dist/types/rendering/SortCenterCache.d.cts +17 -17
  161. package/dist/types/rendering/SortCenterCache.d.ts +17 -17
  162. package/dist/types/rendering/SplatAccumulator.d.cts +93 -77
  163. package/dist/types/rendering/SplatAccumulator.d.ts +93 -77
  164. package/dist/types/rendering/SplatGeometry.d.cts +2 -2
  165. package/dist/types/rendering/SplatGeometry.d.ts +2 -2
  166. package/dist/types/rendering/StochasticSplatMaterial.d.cts +14 -0
  167. package/dist/types/rendering/StochasticSplatMaterial.d.ts +14 -0
  168. package/dist/types/rendering/backend.d.cts +30 -18
  169. package/dist/types/rendering/backend.d.ts +30 -18
  170. package/dist/types/rendering/blueNoise.d.cts +1 -1
  171. package/dist/types/rendering/blueNoise.d.ts +1 -1
  172. package/dist/types/rendering/rendererUtils.d.cts +25 -10
  173. package/dist/types/rendering/rendererUtils.d.ts +25 -10
  174. package/dist/types/rendering/tsl/GenerateProgram.d.cts +19 -17
  175. package/dist/types/rendering/tsl/GenerateProgram.d.ts +19 -17
  176. package/dist/types/rendering/tsl/ProjectionProgram.d.cts +38 -33
  177. package/dist/types/rendering/tsl/ProjectionProgram.d.ts +38 -33
  178. package/dist/types/rendering/tsl/SplatBackend.d.cts +22 -10
  179. package/dist/types/rendering/tsl/SplatBackend.d.ts +22 -10
  180. package/dist/types/rendering/tsl/SplatMaterial.d.cts +38 -25
  181. package/dist/types/rendering/tsl/SplatMaterial.d.ts +38 -25
  182. package/dist/types/rendering/tsl/shaderUtils.d.cts +55 -17
  183. package/dist/types/rendering/tsl/shaderUtils.d.ts +55 -17
  184. package/dist/types/rendering/tsl/stochasticCoverage.d.cts +7 -0
  185. package/dist/types/rendering/tsl/stochasticCoverage.d.ts +7 -0
  186. package/dist/types/rendering/tsl/viewUniforms.d.cts +19 -9
  187. package/dist/types/rendering/tsl/viewUniforms.d.ts +19 -9
  188. package/dist/types/rendering/uniforms.d.cts +83 -83
  189. package/dist/types/rendering/uniforms.d.ts +83 -83
  190. package/dist/types/rendering/webgl/AccumulatorGenerator.d.cts +28 -12
  191. package/dist/types/rendering/webgl/AccumulatorGenerator.d.ts +28 -12
  192. package/dist/types/rendering/webgl/OrderingTexture.d.cts +10 -7
  193. package/dist/types/rendering/webgl/OrderingTexture.d.ts +10 -7
  194. package/dist/types/rendering/webgl/SplatBackend.d.cts +20 -15
  195. package/dist/types/rendering/webgl/SplatBackend.d.ts +20 -15
  196. package/dist/types/rendering/webgl/SplatMaterial.d.cts +9 -4
  197. package/dist/types/rendering/webgl/SplatMaterial.d.ts +9 -4
  198. package/dist/types/rendering/webgl/textureUtils.d.cts +10 -3
  199. package/dist/types/rendering/webgl/textureUtils.d.ts +10 -3
  200. package/dist/types/rendering/webgl-fallback/AccumulatorGenerator.d.cts +8 -10
  201. package/dist/types/rendering/webgl-fallback/AccumulatorGenerator.d.ts +8 -10
  202. package/dist/types/rendering/webgl-fallback/SplatBackend.d.cts +18 -14
  203. package/dist/types/rendering/webgl-fallback/SplatBackend.d.ts +18 -14
  204. package/dist/types/rendering/webgpu/ProjectedSplats.d.cts +76 -66
  205. package/dist/types/rendering/webgpu/ProjectedSplats.d.ts +76 -66
  206. package/dist/types/rendering/webgpu/ProjectionCache.d.cts +43 -28
  207. package/dist/types/rendering/webgpu/ProjectionCache.d.ts +43 -28
  208. package/dist/types/rendering/webgpu/ProjectionKernel.d.cts +22 -0
  209. package/dist/types/rendering/webgpu/ProjectionKernel.d.ts +22 -0
  210. package/dist/types/rendering/webgpu/RadixSort.d.cts +44 -40
  211. package/dist/types/rendering/webgpu/RadixSort.d.ts +44 -40
  212. package/dist/types/rendering/webgpu/SplatBackend.d.cts +14 -12
  213. package/dist/types/rendering/webgpu/SplatBackend.d.ts +14 -12
  214. package/dist/types/runtime/SplatWorker.d.cts +17 -13
  215. package/dist/types/runtime/SplatWorker.d.ts +17 -13
  216. package/dist/types/runtime/WorkerRpc.d.cts +26 -20
  217. package/dist/types/runtime/WorkerRpc.d.ts +26 -20
  218. package/dist/types/runtime/abort.d.cts +10 -5
  219. package/dist/types/runtime/abort.d.ts +10 -5
  220. package/dist/types/runtime/retry.d.cts +6 -6
  221. package/dist/types/runtime/retry.d.ts +6 -6
  222. package/dist/types/runtime/wasmCall.d.cts +3 -3
  223. package/dist/types/runtime/wasmCall.d.ts +3 -3
  224. package/dist/types/runtime/worker.d.cts +44 -24
  225. package/dist/types/runtime/worker.d.ts +44 -24
  226. package/dist/types/runtime/workerServer.d.cts +3 -1
  227. package/dist/types/runtime/workerServer.d.ts +3 -1
  228. package/dist/types/scene/SplatEdit.d.cts +74 -67
  229. package/dist/types/scene/SplatEdit.d.ts +74 -67
  230. package/dist/types/scene/SplatMesh.d.cts +92 -70
  231. package/dist/types/scene/SplatMesh.d.ts +92 -70
  232. package/dist/types/utils/index.d.cts +15 -7
  233. package/dist/types/utils/index.d.ts +15 -7
  234. package/dist/types/utils/three.d.cts +3 -3
  235. package/dist/types/utils/three.d.ts +3 -3
  236. package/dist/types/utils/transforms.d.cts +10 -3
  237. package/dist/types/utils/transforms.d.ts +10 -3
  238. package/docs/GaussianSplatRenderer.md +3 -1
  239. package/docs/NeuralDenoiseNode.md +148 -0
  240. package/docs/SplatMesh.md +1 -1
  241. package/docs/StochasticRendering.md +36 -10
  242. package/docs/TAAPass.md +20 -3
  243. package/package.json +9 -11
  244. package/dist/types/capture/sceneView.d.cts +0 -3
  245. package/dist/types/capture/sceneView.d.ts +0 -3
  246. package/dist/types/rendering/tsl/tslCompat.d.cts +0 -68
  247. package/dist/types/rendering/tsl/tslCompat.d.ts +0 -68
  248. package/docs/Architecture.md +0 -200
@@ -1,79 +1,89 @@
1
1
  /** @internal */
2
- export declare enum Opcode {
3
- Constant = 1,
4
- InputField = 2,
5
- InputAttribute = 3,
6
- Negate = 10,
7
- Abs = 11,
8
- Sqrt = 12,
9
- Log = 13,
10
- Exp = 14,
11
- Floor = 15,
12
- Ceil = 16,
13
- Round = 17,
14
- Normalize = 18,
15
- Length = 19,
16
- IsFinite = 20,
17
- Not = 22,
18
- Sin = 23,
19
- Cos = 24,
20
- Acos = 25,
21
- Tan = 26,
22
- Asin = 27,
23
- Atan = 28,
24
- Add = 30,
25
- Subtract = 31,
26
- Multiply = 32,
27
- Divide = 33,
28
- Min = 34,
29
- Max = 35,
30
- Pow = 36,
31
- Dot = 37,
32
- Cross = 38,
33
- Equal = 39,
34
- NotEqual = 40,
35
- Less = 41,
36
- LessEqual = 42,
37
- Greater = 43,
38
- GreaterEqual = 44,
39
- And = 45,
40
- Or = 46,
41
- QuaternionMultiply = 47,
42
- RotateVector = 48,
43
- Atan2 = 49,
44
- Select = 60,
45
- Clamp = 61,
46
- Mix = 62,
47
- MultiplyAdd = 63,
48
- AddMultiply = 64,
49
- Vec2 = 70,
50
- Vec3 = 71,
51
- Vec4 = 72,
52
- Component = 74,
53
- MaxComponentIndex = 75
54
- }
55
- /** @internal */
56
- export declare enum InputField {
57
- Position = 1,
58
- Scale = 2,
59
- Quaternion = 3,
60
- Opacity = 4,
61
- Alpha = 5,
62
- Color = 6,
63
- Sh0 = 7
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 = "float" | "bool" | "vec2" | "vec3" | "vec4" | "quaternion";
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
- opcode: Opcode;
74
- type: SplatPostDecodeValueType;
75
- args: readonly number[];
76
- immediate: number;
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 = "f32" | "f16" | "u8" | "unorm8" | "i8" | "snorm8" | "u16" | "unorm16" | "i16" | "snorm16" | "u32" | "i32";
94
- /** @internal */
95
- export declare const ATTRIBUTE_FORMAT_BYTES: Record<SplatPostDecodeAttributeFormat, number>;
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
- data: ArrayBufferView;
99
- format: SplatPostDecodeAttributeFormat;
100
- count: number;
101
- components: AttributeComponents;
102
- byteOffset: number;
103
- byteStride: number;
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
- format: SplatPostDecodeAttributeFormat;
108
- components: AttributeComponents;
109
- byteOffset: number;
110
- byteStride: number;
111
- count: number;
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
- when?: number;
116
- position?: number;
117
- scale?: number;
118
- quaternion?: number;
119
- opacity?: number;
120
- alpha?: number;
121
- color?: number;
122
- sh?: readonly number[];
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
- /** Packed start/instruction/register/onTrue/onFalse Uint16 records. */
139
- stages: Uint16Array;
163
+ /** Packed start/instruction/register/onTrue/onFalse Uint16 records. */
164
+ stages: Uint16Array;
140
165
  };
141
166
  /** @internal */
142
167
  export type SerializedSplatPostDecode = {
143
- /** Packed opcode/width/immediate/arg0/arg1/arg2/arg3 Uint16 records. */
144
- instructions: Uint16Array;
145
- constants: Float32Array;
146
- outputs: Omit<SplatPostDecodeOutputs, "when">;
147
- condition?: SerializedSplatPostDecodeCondition;
148
- attributeData: Uint8Array;
149
- attributes: readonly SerializedSplatPostDecodeAttribute[];
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
- instructions: readonly SplatPostDecodeInstruction[];
153
- constants: readonly number[];
154
- attributes: readonly AttributeBinding[];
177
+ instructions: readonly SplatPostDecodeInstruction[];
178
+ constants: readonly number[];
179
+ attributes: readonly AttributeBinding[];
155
180
  };
156
181
  export type PostDecodeSplatData = {
157
- numSplats: number;
158
- splat0: Uint32Array;
159
- splat1: Uint32Array;
160
- sortCenters: Float32Array;
161
- sourceIds?: Uint32Array;
162
- sh1?: Uint32Array;
163
- sh2?: Uint32Array;
164
- sh3a?: Uint32Array;
165
- sh3b?: Uint32Array;
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 enum Opcode {
3
- Constant = 1,
4
- InputField = 2,
5
- InputAttribute = 3,
6
- Negate = 10,
7
- Abs = 11,
8
- Sqrt = 12,
9
- Log = 13,
10
- Exp = 14,
11
- Floor = 15,
12
- Ceil = 16,
13
- Round = 17,
14
- Normalize = 18,
15
- Length = 19,
16
- IsFinite = 20,
17
- Not = 22,
18
- Sin = 23,
19
- Cos = 24,
20
- Acos = 25,
21
- Tan = 26,
22
- Asin = 27,
23
- Atan = 28,
24
- Add = 30,
25
- Subtract = 31,
26
- Multiply = 32,
27
- Divide = 33,
28
- Min = 34,
29
- Max = 35,
30
- Pow = 36,
31
- Dot = 37,
32
- Cross = 38,
33
- Equal = 39,
34
- NotEqual = 40,
35
- Less = 41,
36
- LessEqual = 42,
37
- Greater = 43,
38
- GreaterEqual = 44,
39
- And = 45,
40
- Or = 46,
41
- QuaternionMultiply = 47,
42
- RotateVector = 48,
43
- Atan2 = 49,
44
- Select = 60,
45
- Clamp = 61,
46
- Mix = 62,
47
- MultiplyAdd = 63,
48
- AddMultiply = 64,
49
- Vec2 = 70,
50
- Vec3 = 71,
51
- Vec4 = 72,
52
- Component = 74,
53
- MaxComponentIndex = 75
54
- }
55
- /** @internal */
56
- export declare enum InputField {
57
- Position = 1,
58
- Scale = 2,
59
- Quaternion = 3,
60
- Opacity = 4,
61
- Alpha = 5,
62
- Color = 6,
63
- Sh0 = 7
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 = "float" | "bool" | "vec2" | "vec3" | "vec4" | "quaternion";
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
- opcode: Opcode;
74
- type: SplatPostDecodeValueType;
75
- args: readonly number[];
76
- immediate: number;
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 = "f32" | "f16" | "u8" | "unorm8" | "i8" | "snorm8" | "u16" | "unorm16" | "i16" | "snorm16" | "u32" | "i32";
94
- /** @internal */
95
- export declare const ATTRIBUTE_FORMAT_BYTES: Record<SplatPostDecodeAttributeFormat, number>;
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
- data: ArrayBufferView;
99
- format: SplatPostDecodeAttributeFormat;
100
- count: number;
101
- components: AttributeComponents;
102
- byteOffset: number;
103
- byteStride: number;
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
- format: SplatPostDecodeAttributeFormat;
108
- components: AttributeComponents;
109
- byteOffset: number;
110
- byteStride: number;
111
- count: number;
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
- when?: number;
116
- position?: number;
117
- scale?: number;
118
- quaternion?: number;
119
- opacity?: number;
120
- alpha?: number;
121
- color?: number;
122
- sh?: readonly number[];
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
- /** Packed start/instruction/register/onTrue/onFalse Uint16 records. */
139
- stages: Uint16Array;
163
+ /** Packed start/instruction/register/onTrue/onFalse Uint16 records. */
164
+ stages: Uint16Array;
140
165
  };
141
166
  /** @internal */
142
167
  export type SerializedSplatPostDecode = {
143
- /** Packed opcode/width/immediate/arg0/arg1/arg2/arg3 Uint16 records. */
144
- instructions: Uint16Array;
145
- constants: Float32Array;
146
- outputs: Omit<SplatPostDecodeOutputs, "when">;
147
- condition?: SerializedSplatPostDecodeCondition;
148
- attributeData: Uint8Array;
149
- attributes: readonly SerializedSplatPostDecodeAttribute[];
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
- instructions: readonly SplatPostDecodeInstruction[];
153
- constants: readonly number[];
154
- attributes: readonly AttributeBinding[];
177
+ instructions: readonly SplatPostDecodeInstruction[];
178
+ constants: readonly number[];
179
+ attributes: readonly AttributeBinding[];
155
180
  };
156
181
  export type PostDecodeSplatData = {
157
- numSplats: number;
158
- splat0: Uint32Array;
159
- splat1: Uint32Array;
160
- sortCenters: Float32Array;
161
- sourceIds?: Uint32Array;
162
- sh1?: Uint32Array;
163
- sh2?: Uint32Array;
164
- sh3a?: Uint32Array;
165
- sh3b?: Uint32Array;
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 './protocol.cjs';
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(instructions: Uint16Array, index: number): number;
5
+ export declare function instructionWidth(
6
+ instructions: Uint16Array,
7
+ index: number,
8
+ ): number;
6
9
  /** @internal */
7
- export declare function allocateSplatPostDecodeRegisters(program: SerializedSplatPostDecode): {
8
- registerOffsets: Uint32Array<ArrayBuffer>;
9
- registerValueCount: number;
10
- conditionCarryStageStarts: Uint32Array<ArrayBuffer>;
11
- conditionCarryEvents: Uint32Array<ArrayBuffer>;
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 './protocol';
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(instructions: Uint16Array, index: number): number;
5
+ export declare function instructionWidth(
6
+ instructions: Uint16Array,
7
+ index: number,
8
+ ): number;
6
9
  /** @internal */
7
- export declare function allocateSplatPostDecodeRegisters(program: SerializedSplatPostDecode): {
8
- registerOffsets: Uint32Array<ArrayBuffer>;
9
- registerValueCount: number;
10
- conditionCarryStageStarts: Uint32Array<ArrayBuffer>;
11
- conditionCarryEvents: Uint32Array<ArrayBuffer>;
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 { PostDecodeSplatData, SerializedSplatPostDecode } from './protocol.cjs';
2
- export declare function applySplatPostDecode(data: PostDecodeSplatData, program: SerializedSplatPostDecode, onProgress?: (loaded: number, total: number) => void): void;
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 { PostDecodeSplatData, SerializedSplatPostDecode } from './protocol';
2
- export declare function applySplatPostDecode(data: PostDecodeSplatData, program: SerializedSplatPostDecode, onProgress?: (loaded: number, total: number) => void): void;
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;