@pmndrs/vdb 0.0.0-stage → 0.2.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 (570) hide show
  1. package/CHANGELOG.md +727 -0
  2. package/LICENSE +21 -0
  3. package/README.md +496 -2
  4. package/THIRD_PARTY_NOTICES.md +315 -0
  5. package/dist/core/compute/atlas.d.ts +102 -0
  6. package/dist/core/compute/atlas.js +103 -0
  7. package/dist/core/compute/atlas.js.map +1 -0
  8. package/dist/core/compute/index.d.ts +13 -0
  9. package/dist/core/compute/index.js +9 -0
  10. package/dist/core/compute/index.js.map +1 -0
  11. package/dist/core/compute/majorant-build.d.ts +45 -0
  12. package/dist/core/compute/majorant-build.js +193 -0
  13. package/dist/core/compute/majorant-build.js.map +1 -0
  14. package/dist/core/compute/multi-scale.d.ts +155 -0
  15. package/dist/core/compute/multi-scale.js +684 -0
  16. package/dist/core/compute/multi-scale.js.map +1 -0
  17. package/dist/core/compute/pyramid.d.ts +120 -0
  18. package/dist/core/compute/pyramid.js +468 -0
  19. package/dist/core/compute/pyramid.js.map +1 -0
  20. package/dist/core/compute/shared.d.ts +116 -0
  21. package/dist/core/compute/shared.js +211 -0
  22. package/dist/core/compute/shared.js.map +1 -0
  23. package/dist/core/compute/stats.d.ts +78 -0
  24. package/dist/core/compute/stats.js +193 -0
  25. package/dist/core/compute/stats.js.map +1 -0
  26. package/dist/core/compute/value-transform.d.ts +30 -0
  27. package/dist/core/compute/value-transform.js +64 -0
  28. package/dist/core/compute/value-transform.js.map +1 -0
  29. package/dist/core/errors.d.ts +21 -0
  30. package/dist/core/errors.js +17 -0
  31. package/dist/core/errors.js.map +1 -0
  32. package/dist/core/frame/emission.d.ts +85 -0
  33. package/dist/core/frame/emission.js +422 -0
  34. package/dist/core/frame/emission.js.map +1 -0
  35. package/dist/core/frame/environment.d.ts +47 -0
  36. package/dist/core/frame/environment.js +178 -0
  37. package/dist/core/frame/environment.js.map +1 -0
  38. package/dist/core/frame/index.d.ts +39 -0
  39. package/dist/core/frame/index.js +27 -0
  40. package/dist/core/frame/index.js.map +1 -0
  41. package/dist/core/frame/kernels.d.ts +115 -0
  42. package/dist/core/frame/kernels.js +496 -0
  43. package/dist/core/frame/kernels.js.map +1 -0
  44. package/dist/core/frame/limits.d.ts +67 -0
  45. package/dist/core/frame/limits.js +109 -0
  46. package/dist/core/frame/limits.js.map +1 -0
  47. package/dist/core/frame/phase.d.ts +17 -0
  48. package/dist/core/frame/phase.js +53 -0
  49. package/dist/core/frame/phase.js.map +1 -0
  50. package/dist/core/frame/pipelines.d.ts +49 -0
  51. package/dist/core/frame/pipelines.js +147 -0
  52. package/dist/core/frame/pipelines.js.map +1 -0
  53. package/dist/core/frame/renderer.d.ts +122 -0
  54. package/dist/core/frame/renderer.js +1712 -0
  55. package/dist/core/frame/renderer.js.map +1 -0
  56. package/dist/core/frame/resources.d.ts +71 -0
  57. package/dist/core/frame/resources.js +100 -0
  58. package/dist/core/frame/resources.js.map +1 -0
  59. package/dist/core/frame/scattering.d.ts +97 -0
  60. package/dist/core/frame/scattering.js +332 -0
  61. package/dist/core/frame/scattering.js.map +1 -0
  62. package/dist/core/frame/settings.d.ts +243 -0
  63. package/dist/core/frame/settings.js +67 -0
  64. package/dist/core/frame/settings.js.map +1 -0
  65. package/dist/core/frame/shadows.d.ts +55 -0
  66. package/dist/core/frame/shadows.js +460 -0
  67. package/dist/core/frame/shadows.js.map +1 -0
  68. package/dist/core/frame/types.d.ts +415 -0
  69. package/dist/core/frame/types.js +49 -0
  70. package/dist/core/frame/types.js.map +1 -0
  71. package/dist/core/frame/uniforms.d.ts +105 -0
  72. package/dist/core/frame/uniforms.js +276 -0
  73. package/dist/core/frame/uniforms.js.map +1 -0
  74. package/dist/core/frame/wgsl/chunks.d.ts +4 -0
  75. package/dist/core/frame/wgsl/chunks.js +728 -0
  76. package/dist/core/frame/wgsl/chunks.js.map +1 -0
  77. package/dist/core/frame/wgsl/emission.d.ts +82 -0
  78. package/dist/core/frame/wgsl/emission.js +353 -0
  79. package/dist/core/frame/wgsl/emission.js.map +1 -0
  80. package/dist/core/frame/wgsl/environment.d.ts +42 -0
  81. package/dist/core/frame/wgsl/environment.js +711 -0
  82. package/dist/core/frame/wgsl/environment.js.map +1 -0
  83. package/dist/core/frame/wgsl/gather.d.ts +55 -0
  84. package/dist/core/frame/wgsl/gather.js +850 -0
  85. package/dist/core/frame/wgsl/gather.js.map +1 -0
  86. package/dist/core/frame/wgsl/integrate.d.ts +78 -0
  87. package/dist/core/frame/wgsl/integrate.js +213 -0
  88. package/dist/core/frame/wgsl/integrate.js.map +1 -0
  89. package/dist/core/frame/wgsl/lighting.d.ts +103 -0
  90. package/dist/core/frame/wgsl/lighting.js +1636 -0
  91. package/dist/core/frame/wgsl/lighting.js.map +1 -0
  92. package/dist/core/frame/wgsl/occluders.d.ts +20 -0
  93. package/dist/core/frame/wgsl/occluders.js +95 -0
  94. package/dist/core/frame/wgsl/occluders.js.map +1 -0
  95. package/dist/core/frame/wgsl/resolve.d.ts +19 -0
  96. package/dist/core/frame/wgsl/resolve.js +205 -0
  97. package/dist/core/frame/wgsl/resolve.js.map +1 -0
  98. package/dist/core/frame/wgsl/shadows.d.ts +35 -0
  99. package/dist/core/frame/wgsl/shadows.js +328 -0
  100. package/dist/core/frame/wgsl/shadows.js.map +1 -0
  101. package/dist/core/half.d.ts +11 -0
  102. package/dist/core/half.js +22 -0
  103. package/dist/core/half.js.map +1 -0
  104. package/dist/core/index.d.ts +52 -0
  105. package/dist/core/index.js +46 -0
  106. package/dist/core/index.js.map +1 -0
  107. package/dist/core/internal.d.ts +31 -0
  108. package/dist/core/internal.js +32 -0
  109. package/dist/core/internal.js.map +1 -0
  110. package/dist/core/pool/affine.d.ts +34 -0
  111. package/dist/core/pool/affine.js +100 -0
  112. package/dist/core/pool/affine.js.map +1 -0
  113. package/dist/core/pool/allocator.d.ts +32 -0
  114. package/dist/core/pool/allocator.js +81 -0
  115. package/dist/core/pool/allocator.js.map +1 -0
  116. package/dist/core/pool/image-header.d.ts +93 -0
  117. package/dist/core/pool/image-header.js +194 -0
  118. package/dist/core/pool/image-header.js.map +1 -0
  119. package/dist/core/pool/layout.d.ts +198 -0
  120. package/dist/core/pool/layout.js +316 -0
  121. package/dist/core/pool/layout.js.map +1 -0
  122. package/dist/core/pool/limits.d.ts +41 -0
  123. package/dist/core/pool/limits.js +80 -0
  124. package/dist/core/pool/limits.js.map +1 -0
  125. package/dist/core/pool/pool.d.ts +384 -0
  126. package/dist/core/pool/pool.js +1184 -0
  127. package/dist/core/pool/pool.js.map +1 -0
  128. package/dist/core/reference/index.d.ts +6 -0
  129. package/dist/core/reference/index.js +7 -0
  130. package/dist/core/reference/index.js.map +1 -0
  131. package/dist/core/reference/renderer.d.ts +105 -0
  132. package/dist/core/reference/renderer.js +474 -0
  133. package/dist/core/reference/renderer.js.map +1 -0
  134. package/dist/core/reference/wgsl.d.ts +65 -0
  135. package/dist/core/reference/wgsl.js +803 -0
  136. package/dist/core/reference/wgsl.js.map +1 -0
  137. package/dist/core/sequence.d.ts +347 -0
  138. package/dist/core/sequence.js +548 -0
  139. package/dist/core/sequence.js.map +1 -0
  140. package/dist/core/source/brick-cache.d.ts +165 -0
  141. package/dist/core/source/brick-cache.js +627 -0
  142. package/dist/core/source/brick-cache.js.map +1 -0
  143. package/dist/core/source/dense-fill.d.ts +53 -0
  144. package/dist/core/source/dense-fill.js +377 -0
  145. package/dist/core/source/dense-fill.js.map +1 -0
  146. package/dist/core/source/dense.d.ts +50 -0
  147. package/dist/core/source/dense.js +384 -0
  148. package/dist/core/source/dense.js.map +1 -0
  149. package/dist/core/source/sparse-wgsl.d.ts +92 -0
  150. package/dist/core/source/sparse-wgsl.js +481 -0
  151. package/dist/core/source/sparse-wgsl.js.map +1 -0
  152. package/dist/core/source/sparse.d.ts +192 -0
  153. package/dist/core/source/sparse.js +762 -0
  154. package/dist/core/source/sparse.js.map +1 -0
  155. package/dist/core/source/types.d.ts +120 -0
  156. package/dist/core/source/types.js +9 -0
  157. package/dist/core/source/types.js.map +1 -0
  158. package/dist/core/surface/index.d.ts +10 -0
  159. package/dist/core/surface/index.js +9 -0
  160. package/dist/core/surface/index.js.map +1 -0
  161. package/dist/core/surface/level-set-pass.d.ts +140 -0
  162. package/dist/core/surface/level-set-pass.js +291 -0
  163. package/dist/core/surface/level-set-pass.js.map +1 -0
  164. package/dist/core/surface/level-set-wgsl.d.ts +46 -0
  165. package/dist/core/surface/level-set-wgsl.js +99 -0
  166. package/dist/core/surface/level-set-wgsl.js.map +1 -0
  167. package/dist/core/surface/points.d.ts +109 -0
  168. package/dist/core/surface/points.js +226 -0
  169. package/dist/core/surface/points.js.map +1 -0
  170. package/dist/core/types.d.ts +37 -0
  171. package/dist/core/types.js +32 -0
  172. package/dist/core/types.js.map +1 -0
  173. package/dist/core/wgsl/api.d.ts +65 -0
  174. package/dist/core/wgsl/api.js +546 -0
  175. package/dist/core/wgsl/api.js.map +1 -0
  176. package/dist/core/wgsl/generate.d.ts +90 -0
  177. package/dist/core/wgsl/generate.js +678 -0
  178. package/dist/core/wgsl/generate.js.map +1 -0
  179. package/dist/core/wgsl/lean.d.ts +50 -0
  180. package/dist/core/wgsl/lean.js +327 -0
  181. package/dist/core/wgsl/lean.js.map +1 -0
  182. package/dist/core/wgsl/level-set.d.ts +58 -0
  183. package/dist/core/wgsl/level-set.js +200 -0
  184. package/dist/core/wgsl/level-set.js.map +1 -0
  185. package/dist/core/wgsl/majorant.d.ts +62 -0
  186. package/dist/core/wgsl/majorant.js +381 -0
  187. package/dist/core/wgsl/majorant.js.map +1 -0
  188. package/dist/core/wgsl/pnanovdb.chunks.generated.d.ts +14 -0
  189. package/dist/core/wgsl/pnanovdb.chunks.generated.js +333 -0
  190. package/dist/core/wgsl/pnanovdb.chunks.generated.js.map +1 -0
  191. package/dist/core/wgsl/reserved.d.ts +9 -0
  192. package/dist/core/wgsl/reserved.js +26 -0
  193. package/dist/core/wgsl/reserved.js.map +1 -0
  194. package/dist/core/wgsl/types.d.ts +198 -0
  195. package/dist/core/wgsl/types.js +2 -0
  196. package/dist/core/wgsl/types.js.map +1 -0
  197. package/dist/three/coarse-first.d.ts +207 -0
  198. package/dist/three/coarse-first.js +205 -0
  199. package/dist/three/coarse-first.js.map +1 -0
  200. package/dist/three/compute.d.ts +73 -0
  201. package/dist/three/compute.js +66 -0
  202. package/dist/three/compute.js.map +1 -0
  203. package/dist/three/device.d.ts +66 -0
  204. package/dist/three/device.js +62 -0
  205. package/dist/three/device.js.map +1 -0
  206. package/dist/three/frame/core-environment.d.ts +38 -0
  207. package/dist/three/frame/core-environment.js +154 -0
  208. package/dist/three/frame/core-environment.js.map +1 -0
  209. package/dist/three/frame/core-integrate-material.d.ts +34 -0
  210. package/dist/three/frame/core-integrate-material.js +162 -0
  211. package/dist/three/frame/core-integrate-material.js.map +1 -0
  212. package/dist/three/frame/core-occluders.d.ts +53 -0
  213. package/dist/three/frame/core-occluders.js +193 -0
  214. package/dist/three/frame/core-occluders.js.map +1 -0
  215. package/dist/three/frame/core-structs.d.ts +34 -0
  216. package/dist/three/frame/core-structs.js +61 -0
  217. package/dist/three/frame/core-structs.js.map +1 -0
  218. package/dist/three/frame/core-textures.d.ts +41 -0
  219. package/dist/three/frame/core-textures.js +114 -0
  220. package/dist/three/frame/core-textures.js.map +1 -0
  221. package/dist/three/frame/emission-light.d.ts +117 -0
  222. package/dist/three/frame/emission-light.js +276 -0
  223. package/dist/three/frame/emission-light.js.map +1 -0
  224. package/dist/three/frame/index.d.ts +19 -0
  225. package/dist/three/frame/index.js +15 -0
  226. package/dist/three/frame/index.js.map +1 -0
  227. package/dist/three/frame/medium.d.ts +33 -0
  228. package/dist/three/frame/medium.js +29 -0
  229. package/dist/three/frame/medium.js.map +1 -0
  230. package/dist/three/frame/renderer.d.ts +97 -0
  231. package/dist/three/frame/renderer.js +480 -0
  232. package/dist/three/frame/renderer.js.map +1 -0
  233. package/dist/three/frame/spectrum.d.ts +4 -0
  234. package/dist/three/frame/spectrum.js +15 -0
  235. package/dist/three/frame/spectrum.js.map +1 -0
  236. package/dist/three/frame/three-internals.d.ts +60 -0
  237. package/dist/three/frame/three-internals.js +152 -0
  238. package/dist/three/frame/three-internals.js.map +1 -0
  239. package/dist/three/frame/volume-shadows.d.ts +139 -0
  240. package/dist/three/frame/volume-shadows.js +403 -0
  241. package/dist/three/frame/volume-shadows.js.map +1 -0
  242. package/dist/three/frame/volume.d.ts +230 -0
  243. package/dist/three/frame/volume.js +268 -0
  244. package/dist/three/frame/volume.js.map +1 -0
  245. package/dist/three/grid-node.d.ts +229 -0
  246. package/dist/three/grid-node.js +545 -0
  247. package/dist/three/grid-node.js.map +1 -0
  248. package/dist/three/index.d.ts +52 -0
  249. package/dist/three/index.js +58 -0
  250. package/dist/three/index.js.map +1 -0
  251. package/dist/three/internal.d.ts +20 -0
  252. package/dist/three/internal.js +18 -0
  253. package/dist/three/internal.js.map +1 -0
  254. package/dist/three/level-set-material.d.ts +185 -0
  255. package/dist/three/level-set-material.js +241 -0
  256. package/dist/three/level-set-material.js.map +1 -0
  257. package/dist/three/level-set-physical-material.d.ts +154 -0
  258. package/dist/three/level-set-physical-material.js +253 -0
  259. package/dist/three/level-set-physical-material.js.map +1 -0
  260. package/dist/three/level-set-velocity.d.ts +94 -0
  261. package/dist/three/level-set-velocity.js +208 -0
  262. package/dist/three/level-set-velocity.js.map +1 -0
  263. package/dist/three/material.d.ts +324 -0
  264. package/dist/three/material.js +502 -0
  265. package/dist/three/material.js.map +1 -0
  266. package/dist/three/points.d.ts +140 -0
  267. package/dist/three/points.js +261 -0
  268. package/dist/three/points.js.map +1 -0
  269. package/dist/three/sparse-source.d.ts +165 -0
  270. package/dist/three/sparse-source.js +405 -0
  271. package/dist/three/sparse-source.js.map +1 -0
  272. package/dist/three/volume-source.d.ts +22 -0
  273. package/dist/three/volume-source.js +110 -0
  274. package/dist/three/volume-source.js.map +1 -0
  275. package/dist/tools/cpu/brick-atlas.d.ts +36 -0
  276. package/dist/tools/cpu/brick-atlas.js +129 -0
  277. package/dist/tools/cpu/brick-atlas.js.map +1 -0
  278. package/dist/tools/cpu/compute.d.ts +116 -0
  279. package/dist/tools/cpu/compute.js +239 -0
  280. package/dist/tools/cpu/compute.js.map +1 -0
  281. package/dist/tools/cpu/lean-reads.d.ts +81 -0
  282. package/dist/tools/cpu/lean-reads.js +262 -0
  283. package/dist/tools/cpu/lean-reads.js.map +1 -0
  284. package/dist/tools/cpu/level-set.d.ts +111 -0
  285. package/dist/tools/cpu/level-set.js +313 -0
  286. package/dist/tools/cpu/level-set.js.map +1 -0
  287. package/dist/tools/cpu/majorant.d.ts +265 -0
  288. package/dist/tools/cpu/majorant.js +541 -0
  289. package/dist/tools/cpu/majorant.js.map +1 -0
  290. package/dist/tools/cpu/march.d.ts +297 -0
  291. package/dist/tools/cpu/march.js +726 -0
  292. package/dist/tools/cpu/march.js.map +1 -0
  293. package/dist/tools/cpu/mesh-decimate.d.ts +124 -0
  294. package/dist/tools/cpu/mesh-decimate.js +1225 -0
  295. package/dist/tools/cpu/mesh-decimate.js.map +1 -0
  296. package/dist/tools/cpu/points.d.ts +29 -0
  297. package/dist/tools/cpu/points.js +38 -0
  298. package/dist/tools/cpu/points.js.map +1 -0
  299. package/dist/tools/cpu/probe-coords.d.ts +70 -0
  300. package/dist/tools/cpu/probe-coords.js +116 -0
  301. package/dist/tools/cpu/probe-coords.js.map +1 -0
  302. package/dist/tools/cpu/read-value.d.ts +44 -0
  303. package/dist/tools/cpu/read-value.js +351 -0
  304. package/dist/tools/cpu/read-value.js.map +1 -0
  305. package/dist/tools/cpu/sample-trilinear.d.ts +43 -0
  306. package/dist/tools/cpu/sample-trilinear.js +168 -0
  307. package/dist/tools/cpu/sample-trilinear.js.map +1 -0
  308. package/dist/tools/cpu/stride-tables.d.ts +56 -0
  309. package/dist/tools/cpu/stride-tables.generated.d.ts +1059 -0
  310. package/dist/tools/cpu/stride-tables.generated.js +1267 -0
  311. package/dist/tools/cpu/stride-tables.generated.js.map +1 -0
  312. package/dist/tools/cpu/stride-tables.js +78 -0
  313. package/dist/tools/cpu/stride-tables.js.map +1 -0
  314. package/dist/tools/cpu/surface-nets.d.ts +90 -0
  315. package/dist/tools/cpu/surface-nets.js +597 -0
  316. package/dist/tools/cpu/surface-nets.js.map +1 -0
  317. package/dist/tools/errors.d.ts +66 -0
  318. package/dist/tools/errors.js +67 -0
  319. package/dist/tools/errors.js.map +1 -0
  320. package/dist/tools/frame/ambient.d.ts +98 -0
  321. package/dist/tools/frame/ambient.js +274 -0
  322. package/dist/tools/frame/ambient.js.map +1 -0
  323. package/dist/tools/frame/blackbody.d.ts +57 -0
  324. package/dist/tools/frame/blackbody.js +151 -0
  325. package/dist/tools/frame/blackbody.js.map +1 -0
  326. package/dist/tools/frame/brick-cache.d.ts +165 -0
  327. package/dist/tools/frame/brick-cache.js +326 -0
  328. package/dist/tools/frame/brick-cache.js.map +1 -0
  329. package/dist/tools/frame/emission.d.ts +137 -0
  330. package/dist/tools/frame/emission.js +290 -0
  331. package/dist/tools/frame/emission.js.map +1 -0
  332. package/dist/tools/frame/environment-gpu.d.ts +111 -0
  333. package/dist/tools/frame/environment-gpu.js +280 -0
  334. package/dist/tools/frame/environment-gpu.js.map +1 -0
  335. package/dist/tools/frame/environment.d.ts +106 -0
  336. package/dist/tools/frame/environment.js +272 -0
  337. package/dist/tools/frame/environment.js.map +1 -0
  338. package/dist/tools/frame/froxel.d.ts +58 -0
  339. package/dist/tools/frame/froxel.js +115 -0
  340. package/dist/tools/frame/froxel.js.map +1 -0
  341. package/dist/tools/frame/grid.d.ts +392 -0
  342. package/dist/tools/frame/grid.js +802 -0
  343. package/dist/tools/frame/grid.js.map +1 -0
  344. package/dist/tools/frame/index.d.ts +150 -0
  345. package/dist/tools/frame/index.js +389 -0
  346. package/dist/tools/frame/index.js.map +1 -0
  347. package/dist/tools/frame/medium.d.ts +77 -0
  348. package/dist/tools/frame/medium.js +101 -0
  349. package/dist/tools/frame/medium.js.map +1 -0
  350. package/dist/tools/frame/mie-table.d.ts +6 -0
  351. package/dist/tools/frame/mie-table.js +16 -0
  352. package/dist/tools/frame/mie-table.js.map +1 -0
  353. package/dist/tools/frame/mie.d.ts +63 -0
  354. package/dist/tools/frame/mie.js +194 -0
  355. package/dist/tools/frame/mie.js.map +1 -0
  356. package/dist/tools/frame/mlp-nn.d.ts +36 -0
  357. package/dist/tools/frame/mlp-nn.js +159 -0
  358. package/dist/tools/frame/mlp-nn.js.map +1 -0
  359. package/dist/tools/frame/mlp-tza.d.ts +29 -0
  360. package/dist/tools/frame/mlp-tza.js +186 -0
  361. package/dist/tools/frame/mlp-tza.js.map +1 -0
  362. package/dist/tools/frame/mlp.d.ts +183 -0
  363. package/dist/tools/frame/mlp.js +434 -0
  364. package/dist/tools/frame/mlp.js.map +1 -0
  365. package/dist/tools/frame/ms-exit.d.ts +42 -0
  366. package/dist/tools/frame/ms-exit.js +90 -0
  367. package/dist/tools/frame/ms-exit.js.map +1 -0
  368. package/dist/tools/frame/multi-scale.d.ts +152 -0
  369. package/dist/tools/frame/multi-scale.js +302 -0
  370. package/dist/tools/frame/multi-scale.js.map +1 -0
  371. package/dist/tools/frame/neural-weights.d.ts +10 -0
  372. package/dist/tools/frame/neural-weights.js +244 -0
  373. package/dist/tools/frame/neural-weights.js.map +1 -0
  374. package/dist/tools/frame/neural.d.ts +80 -0
  375. package/dist/tools/frame/neural.js +150 -0
  376. package/dist/tools/frame/neural.js.map +1 -0
  377. package/dist/tools/frame/occluders.d.ts +51 -0
  378. package/dist/tools/frame/occluders.js +72 -0
  379. package/dist/tools/frame/occluders.js.map +1 -0
  380. package/dist/tools/frame/pyramid-layout.d.ts +55 -0
  381. package/dist/tools/frame/pyramid-layout.js +100 -0
  382. package/dist/tools/frame/pyramid-layout.js.map +1 -0
  383. package/dist/tools/frame/shadows.d.ts +190 -0
  384. package/dist/tools/frame/shadows.js +468 -0
  385. package/dist/tools/frame/shadows.js.map +1 -0
  386. package/dist/tools/frame/sparse.d.ts +147 -0
  387. package/dist/tools/frame/sparse.js +432 -0
  388. package/dist/tools/frame/sparse.js.map +1 -0
  389. package/dist/tools/frame/spectral-stack.d.ts +159 -0
  390. package/dist/tools/frame/spectral-stack.js +391 -0
  391. package/dist/tools/frame/spectral-stack.js.map +1 -0
  392. package/dist/tools/frame/spectral.d.ts +222 -0
  393. package/dist/tools/frame/spectral.js +572 -0
  394. package/dist/tools/frame/spectral.js.map +1 -0
  395. package/dist/tools/frame/stack.d.ts +115 -0
  396. package/dist/tools/frame/stack.js +290 -0
  397. package/dist/tools/frame/stack.js.map +1 -0
  398. package/dist/tools/frame/view.d.ts +131 -0
  399. package/dist/tools/frame/view.js +337 -0
  400. package/dist/tools/frame/view.js.map +1 -0
  401. package/dist/tools/index.d.ts +157 -0
  402. package/dist/tools/index.js +132 -0
  403. package/dist/tools/index.js.map +1 -0
  404. package/dist/tools/internal.d.ts +87 -0
  405. package/dist/tools/internal.js +85 -0
  406. package/dist/tools/internal.js.map +1 -0
  407. package/dist/tools/nanovdb/build-from-vdb.d.ts +59 -0
  408. package/dist/tools/nanovdb/build-from-vdb.js +100 -0
  409. package/dist/tools/nanovdb/build-from-vdb.js.map +1 -0
  410. package/dist/tools/nanovdb/bytes.d.ts +233 -0
  411. package/dist/tools/nanovdb/bytes.js +388 -0
  412. package/dist/tools/nanovdb/bytes.js.map +1 -0
  413. package/dist/tools/nanovdb/coarse-first.d.ts +78 -0
  414. package/dist/tools/nanovdb/coarse-first.js +92 -0
  415. package/dist/tools/nanovdb/coarse-first.js.map +1 -0
  416. package/dist/tools/nanovdb/half.d.ts +22 -0
  417. package/dist/tools/nanovdb/half.js +73 -0
  418. package/dist/tools/nanovdb/half.js.map +1 -0
  419. package/dist/tools/nanovdb/index.d.ts +34 -0
  420. package/dist/tools/nanovdb/index.js +25 -0
  421. package/dist/tools/nanovdb/index.js.map +1 -0
  422. package/dist/tools/nanovdb/inspect.d.ts +33 -0
  423. package/dist/tools/nanovdb/inspect.js +70 -0
  424. package/dist/tools/nanovdb/inspect.js.map +1 -0
  425. package/dist/tools/nanovdb/leaf-codec.d.ts +119 -0
  426. package/dist/tools/nanovdb/leaf-codec.js +356 -0
  427. package/dist/tools/nanovdb/leaf-codec.js.map +1 -0
  428. package/dist/tools/nanovdb/quantize.d.ts +72 -0
  429. package/dist/tools/nanovdb/quantize.js +329 -0
  430. package/dist/tools/nanovdb/quantize.js.map +1 -0
  431. package/dist/tools/nanovdb/resample.d.ts +177 -0
  432. package/dist/tools/nanovdb/resample.js +692 -0
  433. package/dist/tools/nanovdb/resample.js.map +1 -0
  434. package/dist/tools/nanovdb/serialize.d.ts +176 -0
  435. package/dist/tools/nanovdb/serialize.js +439 -0
  436. package/dist/tools/nanovdb/serialize.js.map +1 -0
  437. package/dist/tools/nanovdb/stats.d.ts +87 -0
  438. package/dist/tools/nanovdb/stats.js +225 -0
  439. package/dist/tools/nanovdb/stats.js.map +1 -0
  440. package/dist/tools/nanovdb/transform.d.ts +30 -0
  441. package/dist/tools/nanovdb/transform.js +94 -0
  442. package/dist/tools/nanovdb/transform.js.map +1 -0
  443. package/dist/tools/nanovdb/tree.d.ts +186 -0
  444. package/dist/tools/nanovdb/tree.js +530 -0
  445. package/dist/tools/nanovdb/tree.js.map +1 -0
  446. package/dist/tools/nanovdb/write-nvdb.d.ts +74 -0
  447. package/dist/tools/nanovdb/write-nvdb.js +290 -0
  448. package/dist/tools/nanovdb/write-nvdb.js.map +1 -0
  449. package/dist/tools/nvdb-file.d.ts +265 -0
  450. package/dist/tools/nvdb-file.js +763 -0
  451. package/dist/tools/nvdb-file.js.map +1 -0
  452. package/dist/tools/nvdb-stream.d.ts +154 -0
  453. package/dist/tools/nvdb-stream.js +409 -0
  454. package/dist/tools/nvdb-stream.js.map +1 -0
  455. package/dist/tools/reference/analytic.d.ts +41 -0
  456. package/dist/tools/reference/analytic.js +95 -0
  457. package/dist/tools/reference/analytic.js.map +1 -0
  458. package/dist/tools/reference/environment.d.ts +62 -0
  459. package/dist/tools/reference/environment.js +154 -0
  460. package/dist/tools/reference/environment.js.map +1 -0
  461. package/dist/tools/reference/index.d.ts +12 -0
  462. package/dist/tools/reference/index.js +13 -0
  463. package/dist/tools/reference/index.js.map +1 -0
  464. package/dist/tools/reference/media.d.ts +14 -0
  465. package/dist/tools/reference/media.js +30 -0
  466. package/dist/tools/reference/media.js.map +1 -0
  467. package/dist/tools/reference/rng.d.ts +20 -0
  468. package/dist/tools/reference/rng.js +30 -0
  469. package/dist/tools/reference/rng.js.map +1 -0
  470. package/dist/tools/reference/scene.d.ts +312 -0
  471. package/dist/tools/reference/scene.js +169 -0
  472. package/dist/tools/reference/scene.js.map +1 -0
  473. package/dist/tools/reference/tables.d.ts +98 -0
  474. package/dist/tools/reference/tables.js +264 -0
  475. package/dist/tools/reference/tables.js.map +1 -0
  476. package/dist/tools/reference/trace.d.ts +160 -0
  477. package/dist/tools/reference/trace.js +497 -0
  478. package/dist/tools/reference/trace.js.map +1 -0
  479. package/dist/tools/vdb/bit-utils.d.ts +20 -0
  480. package/dist/tools/vdb/bit-utils.js +42 -0
  481. package/dist/tools/vdb/bit-utils.js.map +1 -0
  482. package/dist/tools/vdb/blosc-write.d.ts +43 -0
  483. package/dist/tools/vdb/blosc-write.js +197 -0
  484. package/dist/tools/vdb/blosc-write.js.map +1 -0
  485. package/dist/tools/vdb/blosc.d.ts +86 -0
  486. package/dist/tools/vdb/blosc.js +287 -0
  487. package/dist/tools/vdb/blosc.js.map +1 -0
  488. package/dist/tools/vdb/blosclz.d.ts +33 -0
  489. package/dist/tools/vdb/blosclz.js +112 -0
  490. package/dist/tools/vdb/blosclz.js.map +1 -0
  491. package/dist/tools/vdb/byte-reader.d.ts +50 -0
  492. package/dist/tools/vdb/byte-reader.js +161 -0
  493. package/dist/tools/vdb/byte-reader.js.map +1 -0
  494. package/dist/tools/vdb/compression.d.ts +81 -0
  495. package/dist/tools/vdb/compression.js +260 -0
  496. package/dist/tools/vdb/compression.js.map +1 -0
  497. package/dist/tools/vdb/errors.d.ts +10 -0
  498. package/dist/tools/vdb/errors.js +11 -0
  499. package/dist/tools/vdb/errors.js.map +1 -0
  500. package/dist/tools/vdb/grid.d.ts +37 -0
  501. package/dist/tools/vdb/grid.js +153 -0
  502. package/dist/tools/vdb/grid.js.map +1 -0
  503. package/dist/tools/vdb/half-float.d.ts +9 -0
  504. package/dist/tools/vdb/half-float.js +24 -0
  505. package/dist/tools/vdb/half-float.js.map +1 -0
  506. package/dist/tools/vdb/index.d.ts +4 -0
  507. package/dist/tools/vdb/index.js +3 -0
  508. package/dist/tools/vdb/index.js.map +1 -0
  509. package/dist/tools/vdb/inflate.d.ts +24 -0
  510. package/dist/tools/vdb/inflate.js +334 -0
  511. package/dist/tools/vdb/inflate.js.map +1 -0
  512. package/dist/tools/vdb/lz4.d.ts +30 -0
  513. package/dist/tools/vdb/lz4.js +228 -0
  514. package/dist/tools/vdb/lz4.js.map +1 -0
  515. package/dist/tools/vdb/metadata.d.ts +17 -0
  516. package/dist/tools/vdb/metadata.js +72 -0
  517. package/dist/tools/vdb/metadata.js.map +1 -0
  518. package/dist/tools/vdb/parse.d.ts +47 -0
  519. package/dist/tools/vdb/parse.js +241 -0
  520. package/dist/tools/vdb/parse.js.map +1 -0
  521. package/dist/tools/vdb/point-render-data.d.ts +79 -0
  522. package/dist/tools/vdb/point-render-data.js +137 -0
  523. package/dist/tools/vdb/point-render-data.js.map +1 -0
  524. package/dist/tools/vdb/points.d.ts +186 -0
  525. package/dist/tools/vdb/points.js +835 -0
  526. package/dist/tools/vdb/points.js.map +1 -0
  527. package/dist/tools/vdb/transform.d.ts +23 -0
  528. package/dist/tools/vdb/transform.js +54 -0
  529. package/dist/tools/vdb/transform.js.map +1 -0
  530. package/dist/tools/vdb/tree.d.ts +111 -0
  531. package/dist/tools/vdb/tree.js +228 -0
  532. package/dist/tools/vdb/tree.js.map +1 -0
  533. package/dist/tools/vdb/types.d.ts +195 -0
  534. package/dist/tools/vdb/types.js +3 -0
  535. package/dist/tools/vdb/types.js.map +1 -0
  536. package/dist/tools/wvdb/bake.d.ts +145 -0
  537. package/dist/tools/wvdb/bake.js +361 -0
  538. package/dist/tools/wvdb/bake.js.map +1 -0
  539. package/dist/tools/wvdb/dense.d.ts +191 -0
  540. package/dist/tools/wvdb/dense.js +368 -0
  541. package/dist/tools/wvdb/dense.js.map +1 -0
  542. package/dist/tools/wvdb/format.d.ts +220 -0
  543. package/dist/tools/wvdb/format.js +306 -0
  544. package/dist/tools/wvdb/format.js.map +1 -0
  545. package/dist/tools/wvdb/index.d.ts +14 -0
  546. package/dist/tools/wvdb/index.js +15 -0
  547. package/dist/tools/wvdb/index.js.map +1 -0
  548. package/dist/tools/wvdb/level-set.d.ts +56 -0
  549. package/dist/tools/wvdb/level-set.js +153 -0
  550. package/dist/tools/wvdb/level-set.js.map +1 -0
  551. package/dist/tools/wvdb/nanovdb.d.ts +59 -0
  552. package/dist/tools/wvdb/nanovdb.js +64 -0
  553. package/dist/tools/wvdb/nanovdb.js.map +1 -0
  554. package/dist/tools/wvdb/partial.d.ts +74 -0
  555. package/dist/tools/wvdb/partial.js +233 -0
  556. package/dist/tools/wvdb/partial.js.map +1 -0
  557. package/dist/tools/wvdb/read.d.ts +336 -0
  558. package/dist/tools/wvdb/read.js +766 -0
  559. package/dist/tools/wvdb/read.js.map +1 -0
  560. package/dist/tools/wvdb/sha256.d.ts +7 -0
  561. package/dist/tools/wvdb/sha256.js +76 -0
  562. package/dist/tools/wvdb/sha256.js.map +1 -0
  563. package/dist/tools/wvdb/write.d.ts +149 -0
  564. package/dist/tools/wvdb/write.js +403 -0
  565. package/dist/tools/wvdb/write.js.map +1 -0
  566. package/package.json +83 -4
  567. package/vendor/LICENSE +201 -0
  568. package/vendor/NOTICE +19 -0
  569. package/vendor/VENDOR.md +100 -0
  570. package/vendor/pnanovdb.wgsl +1577 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../src/t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C,CAAC;IACzE,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,IAAI,IAAI,CAAC,MAAM;YAAE,gBAAgB,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAE7E,OAAO;QACL,UAAU;QACV,MAAM;QACN,KAAK;QACL,gBAAgB;QAChB,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChG,CAAC;AACJ,CAAC","sourcesContent":["/**\n * tree.ts — the 5-4-3 tree: root -> upper (32^3 slots, log2dim 5) -> lower\n * (16^3 slots, log2dim 4) -> leaf (8^3 voxels, log2dim 3).\n *\n * Two-phase read, per both format references (and matching real OpenVDB's\n * `Tree::readTopology`/`Tree::readBuffers` split):\n * 1. **Topology** (single recursive pass): root tiles/children; each\n * upper/lower node's `(childMask, valueMask, tileValues)` inline (file\n * version >= 214, \"internal-node compression\" — always true for our\n * 218-224 window); each leaf's `valueMask` ONLY (its value buffer is\n * deferred).\n * 2. **Buffers** (second pass, same recursion order, leaves only): each\n * leaf re-serializes its `valueMask` (a genuine on-disk quirk — OpenVDB's\n * `LeafNode::writeBuffers` re-saves the mask right before the buffer;\n * confirmed against `vdb-rs`'s `read_tree_data`, which does the same\n * double read) followed by its compressed voxel values.\n *\n * The `mjurczyk/openvdb` JS reader (this repo's other reference) never\n * actually implements leaf value decoding — `ChildNode.readValues()` returns\n * early for leaves with a mask-derived 0/1 placeholder array and\n * `GridDescriptor.readBuffers()` is a bare `// TODO`. That's fine for its\n * boolean-active demos but useless for real voxel data, which is the whole\n * point of this parser (handing Phase 5b's serializer real floats) — the\n * two-phase buffer reading here is lifted from `vdb-rs` instead.\n *\n * ## Active tiles (K4.1)\n *\n * Root, upper and lower nodes may hold *active tiles*: a slot whose child bit\n * is clear and whose value-mask bit is set stands for a uniform, active block\n * of `childDim^3` voxels (lower slot: one 8^3 leaf; upper slot: one 128^3 lower\n * node; root tile: one 4096^3 upper node). They are read from the formats'\n * own topology fields (OpenVDB `RootNode::readTopology` /\n * `InternalNode::readTopology`) and returned as {@link TileData}, so\n * `buildFromVdb` can emit them as NanoVDB tiles rather than expanding them.\n * Inactive tiles are kept too (K4.9): `active: false`, with their stored value\n * (a level set's interior reads `-background`). Internal-node inactive tiles\n * equal to the background are skipped, as they read identically to no tile.\n *\n * ## Value types and point data (K4.2)\n *\n * Values follow the grid's {@link ValueFormat} (float, vec3s/vec3d/vec3i, or\n * `PointDataIndex32` for point data grids): the root background and root\n * tile values are full-width `ValueType`s, internal-node and leaf arrays go\n * through `readCompressedValues`, `components` scalars per value. Point data\n * grids write their leaf buffers in passes; `points.ts` reads those.\n *\n * Scope limits (throw `VDBUnsupportedError`, not silently wrong data):\n * multi-buffer trees.\n */\n\nimport { countBits, countZeroBits, iterOnes, testBit } from \"./bit-utils.js\";\nimport type { ByteReader } from \"./byte-reader.js\";\nimport type { CompressionFlags, ValueFormat } from \"./compression.js\";\nimport { FLOAT_FORMAT, readCompressedValues, readFullValue } from \"./compression.js\";\nimport { VdbFormatError, VDBUnsupportedError } from \"./errors.js\";\nimport { MAX_POINT_EXPANSION, type PointLeafData, readPointDataBuffers } from \"./points.js\";\n\nexport const LEAF_LOG2DIM = 3;\nexport const LOWER_LOG2DIM = 4;\nexport const UPPER_LOG2DIM = 5;\n\nexport const LEAF_DIM = 1 << LEAF_LOG2DIM; // 8\nexport const LEAF_NUM_VALUES = 1 << (3 * LEAF_LOG2DIM); // 512\nconst LOWER_NUM_VALUES = 1 << (3 * LOWER_LOG2DIM); // 4096\nconst UPPER_NUM_VALUES = 1 << (3 * UPPER_LOG2DIM); // 32768\n\nconst LOWER_TOTAL = LEAF_LOG2DIM; // 3\nconst UPPER_TOTAL = LEAF_LOG2DIM + LOWER_LOG2DIM; // 7\n\n/** Edge length, in voxels, of an active tile at each level. */\nexport const LOWER_TILE_DIM = 8; // 1 << LOWER_TOTAL: a lower-node tile covers one leaf\nexport const UPPER_TILE_DIM = 128; // 1 << UPPER_TOTAL: an upper-node tile covers one lower node\nexport const ROOT_TILE_DIM = 4096; // 1 << (3 + 4 + 5): a root tile covers one upper node\n\nexport interface LeafData {\n origin: [number, number, number];\n values: Float32Array; // 512 * components\n valueMask: Uint32Array; // 16 x u32 = 512 bits\n}\n\n/**\n * One tile above leaf level: `dim^3` voxels, all `value`. Active tiles have their\n * value-mask bit set. Inactive tiles (K4.9) keep a stored value, e.g. a level\n * set's interior `-background`; internal-node inactive tiles whose value equals\n * the background are not kept (they read the same as no tile).\n */\nexport interface TileData {\n /** Index-space min corner, a multiple of `dim`. */\n origin: [number, number, number];\n /** Edge length in voxels: 8 (lower-node tile), 128 (upper-node tile) or 4096 (root tile). */\n dim: 8 | 128 | 4096;\n /** The tile value, `components` scalars. */\n value: number[];\n /** True for an active tile, false for an inactive tile with a stored value. */\n active: boolean;\n}\n\nexport interface TreeReadResult {\n /** The background value, `components` scalars. */\n background: number[];\n leaves: LeafData[];\n /** Point data grids only: per-leaf attribute data, in `leaves` order. */\n pointLeaves?: PointLeafData[];\n /** Point data grids only: the most `points()` may allocate (a multiple of the file size). */\n pointOutputBudget?: number;\n /** Tiles at root, upper and lower level: active ones and inactive ones with a non-background value (root: all). */\n tiles: TileData[];\n /** Active voxels in leaves plus `dim^3` per active tile. */\n activeVoxelCount: number;\n}\n\ninterface TreeCtx {\n reader: ByteReader;\n fileVersion: number;\n compression: CompressionFlags;\n useHalf: boolean;\n format: ValueFormat;\n background: number[];\n /** Active tiles collected during the topology pass. */\n tiles: TileData[];\n}\n\nfunction offsetToLocalCoord(offset: number, log2dim: number): [number, number, number] {\n const x = offset >> (2 * log2dim);\n const rem = offset & ((1 << (2 * log2dim)) - 1);\n const y = rem >> log2dim;\n const z = rem & ((1 << log2dim) - 1);\n return [x, y, z];\n}\n\nfunction offsetToGlobalCoord(\n offset: number,\n log2dim: number,\n total: number,\n origin: readonly [number, number, number],\n): [number, number, number] {\n const [lx, ly, lz] = offsetToLocalCoord(offset, log2dim);\n return [origin[0] + (lx << total), origin[1] + (ly << total), origin[2] + (lz << total)];\n}\n\n/**\n * Reads `(childMask, valueMask, tileValues)` for an upper/lower node and\n * appends every active tile (child bit clear, value bit set) to `ctx.tiles`.\n *\n * Tile-value layout follows OpenVDB `InternalNode::readTopology`: from file\n * version 222 (node-mask compression) the stream holds a value for every slot,\n * indexed by slot; before 222 it holds one value per child-*off* slot, packed\n * in slot order.\n */\nfunction readInternalNodeTopology(\n ctx: TreeCtx,\n origin: readonly [number, number, number],\n log2dim: number,\n childTotal: number,\n fullNumValues: number,\n): { childMask: Uint32Array; valueMask: Uint32Array } {\n const childMask = ctx.reader.maskWords(fullNumValues);\n const valueMask = ctx.reader.maskWords(fullNumValues);\n const packed = ctx.fileVersion < 222;\n const numValuesForStream = packed ? countZeroBits(childMask, fullNumValues) : fullNumValues;\n const values = readCompressedValues(ctx.reader, {\n fileVersion: ctx.fileVersion,\n compression: ctx.compression,\n useHalf: ctx.useHalf,\n background: ctx.background,\n numValues: numValuesForStream,\n valueMask,\n format: ctx.format,\n });\n const comps = ctx.format.components;\n const dim = (1 << childTotal) as TileData[\"dim\"];\n let packedIdx = 0;\n for (let i = 0; i < fullNumValues; i++) {\n if (testBit(childMask, i)) continue;\n const at = (packed ? packedIdx++ : i) * comps;\n const active = testBit(valueMask, i);\n const value = Array.from(values.subarray(at, at + comps));\n // An inactive tile holding the background reads exactly like no tile.\n if (!active && value.every((v, c) => v === ctx.background[c])) continue;\n ctx.tiles.push({ origin: offsetToGlobalCoord(i, log2dim, childTotal, origin), dim, value, active });\n }\n return { childMask, valueMask };\n}\n\nexport interface LeafPlaceholder {\n origin: [number, number, number];\n}\n\ninterface LowerNode {\n origin: [number, number, number];\n childMask: Uint32Array;\n leaves: Map<number, LeafPlaceholder>;\n}\n\ninterface UpperNode {\n origin: [number, number, number];\n childMask: Uint32Array;\n lowers: Map<number, LowerNode>;\n}\n\nfunction readLowerTopology(ctx: TreeCtx, origin: [number, number, number]): LowerNode {\n const { childMask } = readInternalNodeTopology(ctx, origin, LOWER_LOG2DIM, LOWER_TOTAL, LOWER_NUM_VALUES);\n const leaves = new Map<number, LeafPlaceholder>();\n for (const idx of iterOnes(childMask, LOWER_NUM_VALUES)) {\n const leafOrigin = offsetToGlobalCoord(idx, LOWER_LOG2DIM, LOWER_TOTAL, origin);\n // Leaf topology: value mask only, no child mask, no data (deferred).\n ctx.reader.maskWords(LEAF_NUM_VALUES);\n leaves.set(idx, { origin: leafOrigin });\n }\n return { origin, childMask, leaves };\n}\n\nfunction readUpperTopology(ctx: TreeCtx, origin: [number, number, number]): UpperNode {\n const { childMask } = readInternalNodeTopology(ctx, origin, UPPER_LOG2DIM, UPPER_TOTAL, UPPER_NUM_VALUES);\n const lowers = new Map<number, LowerNode>();\n for (const idx of iterOnes(childMask, UPPER_NUM_VALUES)) {\n const lowerOrigin = offsetToGlobalCoord(idx, UPPER_LOG2DIM, UPPER_TOTAL, origin);\n lowers.set(idx, readLowerTopology(ctx, lowerOrigin));\n }\n return { origin, childMask, lowers };\n}\n\nfunction readLeafBuffer(ctx: TreeCtx, placeholder: LeafPlaceholder): LeafData {\n // The value mask is re-serialized immediately before the buffer data — a\n // real on-disk quirk of LeafNode::writeBuffers, not a bug in this reader.\n const valueMask = ctx.reader.maskWords(LEAF_NUM_VALUES);\n // Before v222 the origin and a buffer count follow the mask\n // (OpenVDB `LeafNode::readBuffers`).\n if (ctx.fileVersion < 222) {\n ctx.reader.vec3i(); // origin (redundant with topology-derived origin)\n const numBuffers = ctx.reader.u8();\n if (numBuffers !== 1) {\n throw new VdbFormatError(`leaf node numBuffers ${numBuffers} !== 1 (multi-buffer leaves unsupported)`);\n }\n }\n const values = readCompressedValues(ctx.reader, {\n fileVersion: ctx.fileVersion,\n compression: ctx.compression,\n useHalf: ctx.useHalf,\n background: ctx.background,\n numValues: LEAF_NUM_VALUES,\n valueMask,\n format: ctx.format,\n });\n return { origin: placeholder.origin, values, valueMask };\n}\n\nexport interface TreeReadOptions {\n fileVersion: number;\n compression: CompressionFlags;\n useHalf: boolean;\n /** The grid's value layout. Default: float. */\n format?: ValueFormat;\n /**\n * A `PointDataGrid`: leaf buffers are written in passes (OpenVDB\n * `Grid::readBuffers` with `io::MultiPass`) and hold attribute arrays.\n */\n pointData?: boolean;\n}\n\nexport function readTree(reader: ByteReader, options: TreeReadOptions): TreeReadResult {\n const bufferCount = reader.u32();\n if (bufferCount !== 1) {\n throw new VDBUnsupportedError(`multi-buffer trees are not supported (bufferCount=${bufferCount})`);\n }\n\n // RootNode::readTopology: the background is a full-width ValueType.\n const format = options.format ?? FLOAT_FORMAT;\n const background = readFullValue(reader, format);\n const tiles: TileData[] = [];\n const ctx: TreeCtx = {\n reader,\n fileVersion: options.fileVersion,\n compression: options.compression,\n useHalf: options.useHalf,\n format,\n background,\n tiles,\n };\n\n const numTiles = reader.u32();\n const numRootChildren = reader.u32();\n\n // Root tiles: origin, value (always full-width ValueType, never half — see\n // OpenVDB `RootNode::readTopology`), active flag. Inactive tiles are kept (K4.9).\n for (let i = 0; i < numTiles; i++) {\n const origin = reader.vec3i();\n const value = readFullValue(reader, format);\n const active = reader.bool();\n if (origin.some((c) => c % ROOT_TILE_DIM !== 0)) {\n throw new VdbFormatError(`root tile origin [${origin.join(\", \")}] is not ${ROOT_TILE_DIM}-aligned`);\n }\n tiles.push({ origin, dim: ROOT_TILE_DIM, value, active });\n }\n\n const uppers: UpperNode[] = [];\n for (let i = 0; i < numRootChildren; i++) {\n const origin = reader.vec3i();\n uppers.push(readUpperTopology(ctx, origin));\n }\n\n const placeholders: LeafPlaceholder[] = [];\n for (const upper of uppers) {\n for (const lower of upper.lowers.values()) {\n for (const placeholder of lower.leaves.values()) placeholders.push(placeholder);\n }\n }\n\n let leaves: LeafData[];\n let pointLeaves: PointLeafData[] | undefined;\n if (options.pointData) {\n // Compression is recorded per array (paged, Blosc flag), not taken from the grid.\n pointLeaves = readPointDataBuffers(reader, { fileVersion: options.fileVersion, leaves: placeholders });\n leaves = pointLeaves.map((p) => ({ origin: p.origin, values: Float32Array.from(p.offsets), valueMask: p.valueMask }));\n } else {\n leaves = placeholders.map((placeholder) => readLeafBuffer(ctx, placeholder));\n }\n\n let activeVoxelCount = 0;\n for (const leaf of leaves) activeVoxelCount += countBits(leaf.valueMask);\n for (const tile of tiles) if (tile.active) activeVoxelCount += tile.dim ** 3;\n\n return {\n background,\n leaves,\n tiles,\n activeVoxelCount,\n ...(pointLeaves ? { pointLeaves, pointOutputBudget: MAX_POINT_EXPANSION * reader.length } : {}),\n };\n}\n"]}
@@ -0,0 +1,195 @@
1
+ /** Public `.vdb` parser types (docs/archive/v1/SPEC.md §4, docs/archive/v1/PLAN.md Phase 5). */
2
+ /**
3
+ * Cheap description of one grid in a `.vdb`, read from the grid's header (name, type string, metadata and
4
+ * transform) without decoding its tree. `VdbFile.descriptors` lists every grid in file order.
5
+ */
6
+ export interface VdbGridDescriptor {
7
+ name: string;
8
+ /** The grid type without the `_HalfFloat` suffix, e.g. `Tree_float_5_4_3`. */
9
+ gridType: string;
10
+ /**
11
+ * The on-disk `<valueType>` parsed from `gridType` (`float`, `vec3s`, `half`, ...), or `""` when the type string is
12
+ * unrecognised. A `half` grid decodes as a float grid (`VdbGrid.valueType` is `float`; DIVERGES V70).
13
+ */
14
+ valueType: string;
15
+ /** The grid's `class` metadata (`level set`, `fog volume`, `staggered`, `unknown`), or `""` when absent. */
16
+ gridClass: string;
17
+ /** `null` when the grid was not read far enough to know it (an unsupported type or instanced grid) or its transform is unsupported. */
18
+ transform: VdbTransformInfo | null;
19
+ /** From the grid's `file_bbox_min` / `file_bbox_max` metadata, or `null`. */
20
+ indexBBox: VdbBBox | null;
21
+ /** The grid's compression flags (`zip`: zlib, `blosc`: Blosc, `activeMask`: node masks are compressed). */
22
+ compression: {
23
+ zip: boolean;
24
+ activeMask: boolean;
25
+ blosc: boolean;
26
+ };
27
+ /** Why this parser cannot decode the grid (value type, tree layout, transform or instancing), or `null` when it can. */
28
+ unsupported: string | null;
29
+ }
30
+ /** A parsed `.vdb` file. */
31
+ export interface VdbFile {
32
+ /** The OpenVDB file format version. */
33
+ fileVersion: number;
34
+ /** The decoded grids (every supported grid, or the ones `ParseVdbOptions.select` accepted), in file order. */
35
+ grids: VdbGrid[];
36
+ /** Every grid in the file, decoded or not, in file order. */
37
+ descriptors: VdbGridDescriptor[];
38
+ }
39
+ /** A grid's index-to-world transform. */
40
+ export interface VdbTransformInfo {
41
+ /** OpenVDB map type name (e.g. a uniform or scale-translate map). */
42
+ type: string;
43
+ /** 4x4 row-major index->world affine matrix. */
44
+ matrix: number[];
45
+ /** Voxel size per axis, in world units. */
46
+ voxelSize: [number, number, number];
47
+ }
48
+ /** An inclusive index-space box. */
49
+ export interface VdbBBox {
50
+ /** Smallest index corner. */
51
+ min: [number, number, number];
52
+ /** Largest index corner. */
53
+ max: [number, number, number];
54
+ }
55
+ /** A 3-vector of numbers (also exported by the core as `VDBVec3`). */
56
+ export type VDBVec3 = [number, number, number];
57
+ /**
58
+ * The OpenVDB value types this parser reads (the `<valueType>` of a
59
+ * `Tree_<valueType>_5_4_3` grid type): `float`; the vectors `vec3s`, `vec3d`
60
+ * (narrowed to f32) and `vec3i` (exact below 2^24); and `ptdataidx32`, the
61
+ * point data grid (`points::PointDataGrid`).
62
+ */
63
+ export type VdbValueType = "float" | "vec3s" | "vec3d" | "vec3i" | "ptdataidx32";
64
+ /** One 8x8x8 leaf node of a parsed grid. */
65
+ export interface VdbLeaf {
66
+ /** Index-space min corner (a multiple of 8). */
67
+ origin: [number, number, number];
68
+ /**
69
+ * All 512 voxel values in leaf-offset order, `components` scalars each
70
+ * (xyz interleaved for vector grids, so 1536 entries). For a point data
71
+ * grid these are the voxels' point end offsets, see {@link VdbPointDataGrid}.
72
+ */
73
+ values: Float32Array;
74
+ /** 512-bit active mask as 16 little-endian u32 words. */
75
+ valueMask: Uint32Array;
76
+ }
77
+ /**
78
+ * An active tile above leaf level: a `dim^3` block of voxels that are all
79
+ * active and all equal to `value`. `dim` is 8 for a lower-node (16^3) tile,
80
+ * 128 for an upper-node (32^3) tile and 4096 for a root tile.
81
+ */
82
+ export interface VdbTile<V = number> {
83
+ /** Index-space min corner, a multiple of `dim`. */
84
+ origin: [number, number, number];
85
+ /** Edge length of the tile in voxels. */
86
+ dim: 8 | 128 | 4096;
87
+ /** The value of every voxel in the tile. */
88
+ value: V;
89
+ }
90
+ interface VdbGridBase<V> {
91
+ name: string;
92
+ /** The grid type without the `_HalfFloat` suffix, e.g. `Tree_vec3s_5_4_3`. */
93
+ gridType: string;
94
+ transform: VdbTransformInfo;
95
+ metadata: Record<string, unknown>;
96
+ indexBBox: VdbBBox | null;
97
+ /** Active voxels in leaves plus `dim^3` for every active tile. */
98
+ activeVoxelCount: bigint;
99
+ background: V;
100
+ /**
101
+ * Value and active state at an index coordinate: a leaf voxel, else the value
102
+ * of an enclosing active tile, else the background (inactive).
103
+ */
104
+ readValue(ijk: [number, number, number]): {
105
+ value: V;
106
+ active: boolean;
107
+ };
108
+ iterLeaves(): Iterable<VdbLeaf>;
109
+ /** Active tiles at root, upper and lower level. Empty for fully leaf-resolved grids. */
110
+ iterTiles(): Iterable<VdbTile<V>>;
111
+ /**
112
+ * Inactive tiles with a stored value (K4.9), e.g. a level set's interior
113
+ * `-background`. Internal-node inactive tiles equal to the background are omitted.
114
+ */
115
+ iterInactiveTiles(): Iterable<VdbTile<V>>;
116
+ }
117
+ /** A scalar `FloatGrid`. */
118
+ export interface VdbFloatGrid extends VdbGridBase<number> {
119
+ /** Discriminant: a float grid. */
120
+ valueType: "float";
121
+ /** Scalars per value. */
122
+ components: 1;
123
+ }
124
+ /** A `Vec3SGrid` / `Vec3DGrid` / `Vec3IGrid`. Values are `[x, y, z]`. */
125
+ export interface VdbVec3Grid extends VdbGridBase<VDBVec3> {
126
+ /** Discriminant: which vector type the file stored. */
127
+ valueType: "vec3s" | "vec3d" | "vec3i";
128
+ /** Scalars per value. */
129
+ components: 3;
130
+ }
131
+ /** Element type of a decoded point attribute. */
132
+ export type VdbPointAttributeArray = Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | BigInt64Array | Uint8Array | Uint16Array | Uint32Array | BigUint64Array;
133
+ /** One attribute in a point data grid's descriptor. */
134
+ export interface VdbPointAttributeInfo {
135
+ /** Attribute name (e.g. `P`, `Cd`, `v`). */
136
+ name: string;
137
+ /** OpenVDB value type name, e.g. `vec3s`, `float`, `int32`, `uint8`. */
138
+ type: string;
139
+ /** OpenVDB codec name, e.g. `null`, `trnc`, `fxpt16`, `uvec`, `grp`, `str`. */
140
+ codec: string;
141
+ /** Position in the attribute set. */
142
+ index: number;
143
+ }
144
+ /** Points decoded from a point data grid, in OpenVDB leaf and voxel order. */
145
+ export interface VdbPointList {
146
+ /** Number of points. */
147
+ count: number;
148
+ /** World-space positions, xyz per point: `vdbTransform(voxel ijk + P)`. */
149
+ positions: Float32Array;
150
+ /**
151
+ * Every other decodable attribute, `count * stride * components` values
152
+ * (vectors interleaved). Real types decode to `Float32Array` (`double` to
153
+ * `Float64Array`), whatever their codec; integer types keep their width.
154
+ * Group attributes (codec `grp`) are not listed here; see `groups`.
155
+ */
156
+ attributes: Record<string, VdbPointAttributeArray>;
157
+ /** Shape of each entry in `attributes`. */
158
+ attributeShapes: Record<string, {
159
+ components: number;
160
+ stride: number;
161
+ }>;
162
+ /** Group membership per point (0 or 1), by group name. */
163
+ groups: Record<string, Uint8Array>;
164
+ /** Attributes whose type/codec pair this decoder does not handle. */
165
+ skipped: VdbPointAttributeInfo[];
166
+ }
167
+ /**
168
+ * A `points::PointDataGrid` (`ptdataidx32`). The tree is parsed like any
169
+ * other: each leaf voxel holds the *end* offset of its points within the
170
+ * leaf's attribute arrays (so a voxel's points are `[prev end, end)`).
171
+ * `readValue` returns that offset. {@link VdbPointDataGrid.points} decodes the
172
+ * attribute arrays.
173
+ */
174
+ export interface VdbPointDataGrid extends VdbGridBase<number> {
175
+ /** Discriminant: a point data grid. */
176
+ valueType: "ptdataidx32";
177
+ /** Scalars per voxel value (the point end offset). */
178
+ components: 1;
179
+ /** Total points (the sum of every leaf's last end offset). */
180
+ pointCount: number;
181
+ /** The attribute descriptor of the first leaf (OpenVDB shares one per grid when it can). */
182
+ attributes: VdbPointAttributeInfo[];
183
+ /** Group names, from the descriptor. */
184
+ groupNames: string[];
185
+ /**
186
+ * Decodes every leaf's attribute arrays (cached after the first call).
187
+ * @param options `onProgress(decoded, total)` after each leaf (G14a); once with `(total, total)` when cached.
188
+ */
189
+ points(options?: {
190
+ onProgress?: (decoded: number, total: number) => void;
191
+ }): VdbPointList;
192
+ }
193
+ /** Any grid {@link parseVdb} returns, discriminated by `valueType`. */
194
+ export type VdbGrid = VdbFloatGrid | VdbVec3Grid | VdbPointDataGrid;
195
+ export {};
@@ -0,0 +1,3 @@
1
+ /** Public `.vdb` parser types (docs/archive/v1/SPEC.md §4, docs/archive/v1/PLAN.md Phase 5). */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/tools/vdb/types.ts"],"names":[],"mappings":"AAAA,gGAAgG","sourcesContent":["/** Public `.vdb` parser types (docs/archive/v1/SPEC.md §4, docs/archive/v1/PLAN.md Phase 5). */\n\n/**\n * Cheap description of one grid in a `.vdb`, read from the grid's header (name, type string, metadata and\n * transform) without decoding its tree. `VdbFile.descriptors` lists every grid in file order.\n */\nexport interface VdbGridDescriptor {\n name: string;\n /** The grid type without the `_HalfFloat` suffix, e.g. `Tree_float_5_4_3`. */\n gridType: string;\n /**\n * The on-disk `<valueType>` parsed from `gridType` (`float`, `vec3s`, `half`, ...), or `\"\"` when the type string is\n * unrecognised. A `half` grid decodes as a float grid (`VdbGrid.valueType` is `float`; DIVERGES V70).\n */\n valueType: string;\n /** The grid's `class` metadata (`level set`, `fog volume`, `staggered`, `unknown`), or `\"\"` when absent. */\n gridClass: string;\n /** `null` when the grid was not read far enough to know it (an unsupported type or instanced grid) or its transform is unsupported. */\n transform: VdbTransformInfo | null;\n /** From the grid's `file_bbox_min` / `file_bbox_max` metadata, or `null`. */\n indexBBox: VdbBBox | null;\n /** The grid's compression flags (`zip`: zlib, `blosc`: Blosc, `activeMask`: node masks are compressed). */\n compression: { zip: boolean; activeMask: boolean; blosc: boolean };\n /** Why this parser cannot decode the grid (value type, tree layout, transform or instancing), or `null` when it can. */\n unsupported: string | null;\n}\n\n/** A parsed `.vdb` file. */\nexport interface VdbFile {\n /** The OpenVDB file format version. */\n fileVersion: number;\n /** The decoded grids (every supported grid, or the ones `ParseVdbOptions.select` accepted), in file order. */\n grids: VdbGrid[];\n /** Every grid in the file, decoded or not, in file order. */\n descriptors: VdbGridDescriptor[];\n}\n\n/** A grid's index-to-world transform. */\nexport interface VdbTransformInfo {\n /** OpenVDB map type name (e.g. a uniform or scale-translate map). */\n type: string;\n /** 4x4 row-major index->world affine matrix. */\n matrix: number[];\n /** Voxel size per axis, in world units. */\n voxelSize: [number, number, number];\n}\n\n/** An inclusive index-space box. */\nexport interface VdbBBox {\n /** Smallest index corner. */\n min: [number, number, number];\n /** Largest index corner. */\n max: [number, number, number];\n}\n\n/** A 3-vector of numbers (also exported by the core as `VDBVec3`). */\nexport type VDBVec3 = [number, number, number];\n\n/**\n * The OpenVDB value types this parser reads (the `<valueType>` of a\n * `Tree_<valueType>_5_4_3` grid type): `float`; the vectors `vec3s`, `vec3d`\n * (narrowed to f32) and `vec3i` (exact below 2^24); and `ptdataidx32`, the\n * point data grid (`points::PointDataGrid`).\n */\nexport type VdbValueType = \"float\" | \"vec3s\" | \"vec3d\" | \"vec3i\" | \"ptdataidx32\";\n\n/** One 8x8x8 leaf node of a parsed grid. */\nexport interface VdbLeaf {\n /** Index-space min corner (a multiple of 8). */\n origin: [number, number, number];\n /**\n * All 512 voxel values in leaf-offset order, `components` scalars each\n * (xyz interleaved for vector grids, so 1536 entries). For a point data\n * grid these are the voxels' point end offsets, see {@link VdbPointDataGrid}.\n */\n values: Float32Array;\n /** 512-bit active mask as 16 little-endian u32 words. */\n valueMask: Uint32Array;\n}\n\n/**\n * An active tile above leaf level: a `dim^3` block of voxels that are all\n * active and all equal to `value`. `dim` is 8 for a lower-node (16^3) tile,\n * 128 for an upper-node (32^3) tile and 4096 for a root tile.\n */\nexport interface VdbTile<V = number> {\n /** Index-space min corner, a multiple of `dim`. */\n origin: [number, number, number];\n /** Edge length of the tile in voxels. */\n dim: 8 | 128 | 4096;\n /** The value of every voxel in the tile. */\n value: V;\n}\n\ninterface VdbGridBase<V> {\n name: string;\n /** The grid type without the `_HalfFloat` suffix, e.g. `Tree_vec3s_5_4_3`. */\n gridType: string;\n transform: VdbTransformInfo;\n metadata: Record<string, unknown>;\n indexBBox: VdbBBox | null;\n /** Active voxels in leaves plus `dim^3` for every active tile. */\n activeVoxelCount: bigint;\n background: V;\n /**\n * Value and active state at an index coordinate: a leaf voxel, else the value\n * of an enclosing active tile, else the background (inactive).\n */\n readValue(ijk: [number, number, number]): { value: V; active: boolean };\n iterLeaves(): Iterable<VdbLeaf>;\n /** Active tiles at root, upper and lower level. Empty for fully leaf-resolved grids. */\n iterTiles(): Iterable<VdbTile<V>>;\n /**\n * Inactive tiles with a stored value (K4.9), e.g. a level set's interior\n * `-background`. Internal-node inactive tiles equal to the background are omitted.\n */\n iterInactiveTiles(): Iterable<VdbTile<V>>;\n}\n\n/** A scalar `FloatGrid`. */\nexport interface VdbFloatGrid extends VdbGridBase<number> {\n /** Discriminant: a float grid. */\n valueType: \"float\";\n /** Scalars per value. */\n components: 1;\n}\n\n/** A `Vec3SGrid` / `Vec3DGrid` / `Vec3IGrid`. Values are `[x, y, z]`. */\nexport interface VdbVec3Grid extends VdbGridBase<VDBVec3> {\n /** Discriminant: which vector type the file stored. */\n valueType: \"vec3s\" | \"vec3d\" | \"vec3i\";\n /** Scalars per value. */\n components: 3;\n}\n\n/** Element type of a decoded point attribute. */\nexport type VdbPointAttributeArray =\n | Float32Array\n | Float64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | BigInt64Array\n | Uint8Array\n | Uint16Array\n | Uint32Array\n | BigUint64Array;\n\n/** One attribute in a point data grid's descriptor. */\nexport interface VdbPointAttributeInfo {\n /** Attribute name (e.g. `P`, `Cd`, `v`). */\n name: string;\n /** OpenVDB value type name, e.g. `vec3s`, `float`, `int32`, `uint8`. */\n type: string;\n /** OpenVDB codec name, e.g. `null`, `trnc`, `fxpt16`, `uvec`, `grp`, `str`. */\n codec: string;\n /** Position in the attribute set. */\n index: number;\n}\n\n/** Points decoded from a point data grid, in OpenVDB leaf and voxel order. */\nexport interface VdbPointList {\n /** Number of points. */\n count: number;\n /** World-space positions, xyz per point: `vdbTransform(voxel ijk + P)`. */\n positions: Float32Array;\n /**\n * Every other decodable attribute, `count * stride * components` values\n * (vectors interleaved). Real types decode to `Float32Array` (`double` to\n * `Float64Array`), whatever their codec; integer types keep their width.\n * Group attributes (codec `grp`) are not listed here; see `groups`.\n */\n attributes: Record<string, VdbPointAttributeArray>;\n /** Shape of each entry in `attributes`. */\n attributeShapes: Record<string, { components: number; stride: number }>;\n /** Group membership per point (0 or 1), by group name. */\n groups: Record<string, Uint8Array>;\n /** Attributes whose type/codec pair this decoder does not handle. */\n skipped: VdbPointAttributeInfo[];\n}\n\n/**\n * A `points::PointDataGrid` (`ptdataidx32`). The tree is parsed like any\n * other: each leaf voxel holds the *end* offset of its points within the\n * leaf's attribute arrays (so a voxel's points are `[prev end, end)`).\n * `readValue` returns that offset. {@link VdbPointDataGrid.points} decodes the\n * attribute arrays.\n */\nexport interface VdbPointDataGrid extends VdbGridBase<number> {\n /** Discriminant: a point data grid. */\n valueType: \"ptdataidx32\";\n /** Scalars per voxel value (the point end offset). */\n components: 1;\n /** Total points (the sum of every leaf's last end offset). */\n pointCount: number;\n /** The attribute descriptor of the first leaf (OpenVDB shares one per grid when it can). */\n attributes: VdbPointAttributeInfo[];\n /** Group names, from the descriptor. */\n groupNames: string[];\n /**\n * Decodes every leaf's attribute arrays (cached after the first call).\n * @param options `onProgress(decoded, total)` after each leaf (G14a); once with `(total, total)` when cached.\n */\n points(options?: { onProgress?: (decoded: number, total: number) => void }): VdbPointList;\n}\n\n/** Any grid {@link parseVdb} returns, discriminated by `valueType`. */\nexport type VdbGrid = VdbFloatGrid | VdbVec3Grid | VdbPointDataGrid;\n"]}
@@ -0,0 +1,145 @@
1
+ /**
2
+ * bake.ts — resample sparse grids (a parsed `.vdb`, or a NanoVDB grid image
3
+ * through the CPU oracle) to dense levels and write a `.wvdb`.
4
+ *
5
+ * Portions derived from mjurczyk/openvdb (MIT), commit 75e7345:
6
+ * `src/wvdb/bake.js` (getWVDBBox, getFinestDimensions, forEachTexel,
7
+ * sampleScalarGrid, the level-set band limit, getBakedGrids and
8
+ * encodePointGrid: point data grids become points grids in file order, G14b)
9
+ * and `src/wvdb/cli.js` (the `source` member). His sampling is reproduced, including its arithmetic order:
10
+ * - one shared world box for all grids: the union of the grids' active-voxel
11
+ * index boxes (voxel centres, so `max` is the last voxel, not one past it)
12
+ * mapped to world space, unless `bbox` is given;
13
+ * - the finest LOD has `resolution` voxels on the longest box side, the other
14
+ * sides `max(1, round(side * resolution / longest))` (§3.2.1);
15
+ * - **point sampling, no prefilter** (§3.2.2): world position of voxel centre
16
+ * `min + ((i + 0.5) / X) * size`, mapped to index space with the inverse
17
+ * map, rounded with `Math.round` (halves toward +infinity) and read with
18
+ * the grid's own value lookup (inactive values included). A source much
19
+ * finer than the target resolution aliases; that is his behaviour and the
20
+ * default here (`sampling: 'nearest'`).
21
+ *
22
+ * Options beyond his CLI (K4.13):
23
+ * - `sampling: 'box'` prefilters: each texel is the area-weighted mean of the
24
+ * source voxels its cell covers, on the same lattice (`vdbResampleDense`, the
25
+ * K4.4 `vdbResampleGrid` box filter). Mass is conserved and thin features fade
26
+ * instead of flickering in and out;
27
+ * - `levelSetSampler: 'surface-mean'` samples level sets with his CLI's
28
+ * `sampleLevelSet` (`level-set.ts`), which reproduces his level-set files.
29
+ *
30
+ * Differences from his CLI (also in docs/archive/handoffs/K4-3.md):
31
+ * - by default (`levelSetSampler: 'spec'`) level sets are point-sampled and
32
+ * then encoded by the §8 rule (active: clamp to `±(b - 2b/maxCode)`;
33
+ * inactive: `±b` by sign). His CLI uses `sampleLevelSet` (a surface-aware
34
+ * mean) instead, so level-set bytes differ (DIVERGES V17);
35
+ * - `dimensions` can override the finest LOD size (his pre-0.11 bakes used
36
+ * `resolution`³ for every box, e.g. the committed `smoke.wvdb` and
37
+ * `bunny_cloud.wvdb`; this reproduces them).
38
+ */
39
+ import type { VdbFile, VdbGrid, VdbPointDataGrid } from "../vdb/types.js";
40
+ import type { WvdbBits, WvdbBox, WvdbVec3 } from "./format.js";
41
+ import { type WvdbIndexAccess } from "./level-set.js";
42
+ import { type WriteWvdbOptions, type WriteWvdbResult, type WvdbPointsGridInput } from "./write.js";
43
+ /** A grid the baker can point-sample in world space. */
44
+ export interface WvdbSampleSource {
45
+ /** The grid name (matched by `gridNames`). */
46
+ name: string;
47
+ /** `.wvdb` class string: "fog volume", "level set", "staggered" or "unknown". */
48
+ class: string;
49
+ /** The value outside the grid's active voxels. */
50
+ background: number;
51
+ /** World box of the active voxels (voxel centres), or null when the grid has none. */
52
+ bbox: WvdbBox | null;
53
+ /** The grid value (and active state) at the voxel nearest to a world position. */
54
+ sample(world: WvdbVec3): {
55
+ value: number;
56
+ active: boolean;
57
+ };
58
+ /** Index-space access, for `levelSetSampler: 'surface-mean'`. The built-in sources have it. */
59
+ index?: WvdbIndexAccess;
60
+ /** The sparse grid behind the source, for `sampling: 'box'`. The built-in sources have it. */
61
+ grid?: Uint32Array | VdbGrid;
62
+ }
63
+ /** Options of {@link bakeWvdb}: the writer's options plus the box, resolution and sampling choices. */
64
+ export interface BakeWvdbOptions extends Omit<WriteWvdbOptions, "resolution" | "bakeBBox"> {
65
+ /** Voxels on the longest box side of the finest LOD. Default 128. */
66
+ resolution?: number;
67
+ /** One world box for all grids (a sequence box, §10; recorded as `bake.bbox`). Default: union of the grids' boxes. */
68
+ bbox?: WvdbBox | null;
69
+ /** Override the finest LOD dimensions (default from `resolution` and the box). */
70
+ dimensions?: WvdbVec3;
71
+ /**
72
+ * Grids to keep, by name; also recorded as `bake.grids`. Default null (all).
73
+ */
74
+ gridNames?: string[] | null;
75
+ /**
76
+ * Resampling filter. `"nearest"` (default): his point sampling. `"box"`: the
77
+ * area-weighted mean over each texel's cell (K4.4's box filter; conserves
78
+ * mass, no aliasing when the source is finer than the texels). Needs a source
79
+ * with `grid` (the built-in sources).
80
+ */
81
+ sampling?: WvdbSampling;
82
+ /**
83
+ * How level sets are sampled. `"spec"` (default): `sampling`, then the spec
84
+ * §8 rule by active state. `"surface-mean"`: his CLI's `sampleLevelSet`
85
+ * (trilinear near the surface, a 4x4x4 mean in texels that cross it), which
86
+ * reproduces his level-set `.wvdb` files; it ignores `sampling`.
87
+ */
88
+ levelSetSampler?: WvdbLevelSetSampler;
89
+ }
90
+ /** Resampling filter of the baker: point sampling (`nearest`) or the area-weighted mean of each texel cell (`box`). */
91
+ export type WvdbSampling = "nearest" | "box";
92
+ /** How the baker samples level sets: the spec rule (`spec`) or his CLI sampler (`surface-mean`). */
93
+ export type WvdbLevelSetSampler = "spec" | "surface-mean";
94
+ /** §3.2.1, his `getFinestDimensions`. */
95
+ export declare function wvdbFinestDimensions(bbox: WvdbBox | null, resolution: number): WvdbVec3;
96
+ /** Point-samples one source over the box (his `forEachTexel` + `sampleScalarGrid`). */
97
+ export declare function sampleWvdbDense(source: WvdbSampleSource, bbox: WvdbBox | null, dimensions: WvdbVec3, bits?: WvdbBits): Float32Array;
98
+ /**
99
+ * Box-filters one source over the box (`sampling: 'box'`): `vdbResampleDense` on
100
+ * his lattice, then the level-set rule of {@link sampleWvdbDense} by the
101
+ * filtered active state.
102
+ */
103
+ export declare function sampleWvdbDenseBox(source: WvdbSampleSource, bbox: WvdbBox | null, dimensions: WvdbVec3, bits?: WvdbBits): Float32Array;
104
+ /**
105
+ * Bakes sources to a `.wvdb` with his CLI defaults (128, 3 LODs, 8 bits, sparse, 1024 bricks per page).
106
+ * @param sources The grids to bake, point-sampled in world space.
107
+ * @param options Resolution, box, grid names, sampling and the writer's options ({@link BakeWvdbOptions}).
108
+ */
109
+ export declare function bakeWvdb(sources: readonly WvdbSampleSource[], options?: BakeWvdbOptions): WriteWvdbResult;
110
+ /** A parsed `.vdb` grid (axis-aligned map) as a sample source. */
111
+ export declare function wvdbSourceFromVdbGrid(grid: VdbGrid): WvdbSampleSource;
112
+ /** A NanoVDB FLOAT/Fp8/FpN grid image as a sample source, read through the CPU oracle (`readValue`). */
113
+ export declare function wvdbSourceFromNvdb(gridWords: Uint32Array): WvdbSampleSource;
114
+ /** Options of {@link vdbToWvdb}: the baker's options plus the source file name. */
115
+ export interface VdbToWvdbOptions extends BakeWvdbOptions {
116
+ /** `source.file` (the name without directories). Default "". */
117
+ fileName?: string;
118
+ }
119
+ /**
120
+ * A parsed point data grid as a `.wvdb` points grid (G14b, his `encodePointGrid`): world positions and `Cd` in
121
+ * the grid's point order, every n-th point above `maxPoints` (`vdbPointRenderData`'s stride rule, his
122
+ * `createPointData`), the source count and his spacing. `writeWvdb` then splits it into LODs (§3.5).
123
+ *
124
+ * @param grid A point data grid from `parseVdb`.
125
+ * @param maxPoints Keep every `ceil(total / maxPoints)`-th point above this many (default 4,000,000).
126
+ */
127
+ export declare function wvdbPointsFromVdbGrid(grid: VdbPointDataGrid, maxPoints?: number): WvdbPointsGridInput;
128
+ /**
129
+ * `.vdb` → `.wvdb`, like his `wvdb` CLI with the same options. Given the file
130
+ * bytes, `source.sha256` is their digest. Float grids are baked as volumes and
131
+ * point data grids as points grids (G14b: positions and `Cd`, every n-th point
132
+ * above `maxPoints`, the §3.5 LOD order), in file order; the volume box ignores
133
+ * the points (his `getWVDBBox`). Vector grids are skipped (his CLI bakes them as
134
+ * 3 channels; not ported).
135
+ * @param input The `.vdb` file's bytes, or an already parsed {@link VdbFile}.
136
+ * @param options Baker options and the `source.file` name.
137
+ * @throws VDBToolsError `VDB_UNSUPPORTED_GRID_TYPE` when the file has no float or point data grids.
138
+ */
139
+ export declare function vdbToWvdb(input: ArrayBuffer | Uint8Array | VdbFile, options?: VdbToWvdbOptions): WriteWvdbResult;
140
+ /**
141
+ * NanoVDB grid image(s) → `.wvdb`, sampled through the CPU oracle.
142
+ * @param images One grid image or several.
143
+ * @param options Baker options.
144
+ */
145
+ export declare function nvdbToWvdb(images: Uint32Array | readonly Uint32Array[], options?: BakeWvdbOptions): WriteWvdbResult;