@pmndrs/vdb 0.1.0 → 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.
- package/CHANGELOG.md +592 -2
- package/README.md +85 -37
- package/THIRD_PARTY_NOTICES.md +197 -29
- package/dist/core/compute/atlas.d.ts +10 -2
- package/dist/core/compute/atlas.js +6 -1
- package/dist/core/compute/atlas.js.map +1 -1
- package/dist/core/compute/index.d.ts +3 -3
- package/dist/core/compute/index.js +2 -2
- package/dist/core/compute/index.js.map +1 -1
- package/dist/core/compute/majorant-build.d.ts +45 -0
- package/dist/core/compute/majorant-build.js +193 -0
- package/dist/core/compute/majorant-build.js.map +1 -0
- package/dist/core/compute/multi-scale.d.ts +155 -0
- package/dist/core/compute/multi-scale.js +684 -0
- package/dist/core/compute/multi-scale.js.map +1 -0
- package/dist/core/compute/pyramid.d.ts +22 -7
- package/dist/core/compute/pyramid.js +22 -9
- package/dist/core/compute/pyramid.js.map +1 -1
- package/dist/core/compute/shared.d.ts +1 -0
- package/dist/core/compute/shared.js.map +1 -1
- package/dist/core/compute/stats.d.ts +10 -3
- package/dist/core/compute/stats.js +6 -1
- package/dist/core/compute/stats.js.map +1 -1
- package/dist/core/compute/value-transform.d.ts +8 -1
- package/dist/core/compute/value-transform.js +9 -3
- package/dist/core/compute/value-transform.js.map +1 -1
- package/dist/core/errors.d.ts +10 -0
- package/dist/core/errors.js +8 -0
- package/dist/core/errors.js.map +1 -1
- package/dist/core/frame/emission.d.ts +85 -0
- package/dist/core/frame/emission.js +422 -0
- package/dist/core/frame/emission.js.map +1 -0
- package/dist/core/frame/environment.d.ts +47 -0
- package/dist/core/frame/environment.js +178 -0
- package/dist/core/frame/environment.js.map +1 -0
- package/dist/core/frame/index.d.ts +39 -0
- package/dist/core/frame/index.js +27 -0
- package/dist/core/frame/index.js.map +1 -0
- package/dist/core/frame/kernels.d.ts +115 -0
- package/dist/core/frame/kernels.js +496 -0
- package/dist/core/frame/kernels.js.map +1 -0
- package/dist/core/frame/limits.d.ts +67 -0
- package/dist/core/frame/limits.js +109 -0
- package/dist/core/frame/limits.js.map +1 -0
- package/dist/core/frame/phase.d.ts +17 -0
- package/dist/core/frame/phase.js +53 -0
- package/dist/core/frame/phase.js.map +1 -0
- package/dist/core/frame/pipelines.d.ts +49 -0
- package/dist/core/frame/pipelines.js +147 -0
- package/dist/core/frame/pipelines.js.map +1 -0
- package/dist/core/frame/renderer.d.ts +122 -0
- package/dist/core/frame/renderer.js +1712 -0
- package/dist/core/frame/renderer.js.map +1 -0
- package/dist/core/frame/resources.d.ts +71 -0
- package/dist/core/frame/resources.js +100 -0
- package/dist/core/frame/resources.js.map +1 -0
- package/dist/core/frame/scattering.d.ts +97 -0
- package/dist/core/frame/scattering.js +332 -0
- package/dist/core/frame/scattering.js.map +1 -0
- package/dist/core/frame/settings.d.ts +243 -0
- package/dist/core/frame/settings.js +67 -0
- package/dist/core/frame/settings.js.map +1 -0
- package/dist/core/frame/shadows.d.ts +55 -0
- package/dist/core/frame/shadows.js +460 -0
- package/dist/core/frame/shadows.js.map +1 -0
- package/dist/core/frame/types.d.ts +415 -0
- package/dist/core/frame/types.js +49 -0
- package/dist/core/frame/types.js.map +1 -0
- package/dist/core/frame/uniforms.d.ts +105 -0
- package/dist/core/frame/uniforms.js +276 -0
- package/dist/core/frame/uniforms.js.map +1 -0
- package/dist/core/frame/wgsl/chunks.d.ts +4 -0
- package/dist/core/frame/wgsl/chunks.js +728 -0
- package/dist/core/frame/wgsl/chunks.js.map +1 -0
- package/dist/core/frame/wgsl/emission.d.ts +82 -0
- package/dist/core/frame/wgsl/emission.js +353 -0
- package/dist/core/frame/wgsl/emission.js.map +1 -0
- package/dist/core/frame/wgsl/environment.d.ts +42 -0
- package/dist/core/frame/wgsl/environment.js +711 -0
- package/dist/core/frame/wgsl/environment.js.map +1 -0
- package/dist/core/frame/wgsl/gather.d.ts +55 -0
- package/dist/core/frame/wgsl/gather.js +850 -0
- package/dist/core/frame/wgsl/gather.js.map +1 -0
- package/dist/core/frame/wgsl/integrate.d.ts +78 -0
- package/dist/core/frame/wgsl/integrate.js +213 -0
- package/dist/core/frame/wgsl/integrate.js.map +1 -0
- package/dist/core/frame/wgsl/lighting.d.ts +103 -0
- package/dist/core/frame/wgsl/lighting.js +1636 -0
- package/dist/core/frame/wgsl/lighting.js.map +1 -0
- package/dist/core/frame/wgsl/occluders.d.ts +20 -0
- package/dist/core/frame/wgsl/occluders.js +95 -0
- package/dist/core/frame/wgsl/occluders.js.map +1 -0
- package/dist/core/frame/wgsl/resolve.d.ts +19 -0
- package/dist/core/frame/wgsl/resolve.js +205 -0
- package/dist/core/frame/wgsl/resolve.js.map +1 -0
- package/dist/core/frame/wgsl/shadows.d.ts +35 -0
- package/dist/core/frame/wgsl/shadows.js +328 -0
- package/dist/core/frame/wgsl/shadows.js.map +1 -0
- package/dist/core/half.d.ts +11 -0
- package/dist/core/half.js +22 -0
- package/dist/core/half.js.map +1 -0
- package/dist/core/index.d.ts +25 -3
- package/dist/core/index.js +23 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/internal.d.ts +17 -1
- package/dist/core/internal.js +18 -1
- package/dist/core/internal.js.map +1 -1
- package/dist/core/pool/image-header.d.ts +13 -2
- package/dist/core/pool/image-header.js +24 -5
- package/dist/core/pool/image-header.js.map +1 -1
- package/dist/core/pool/layout.d.ts +35 -1
- package/dist/core/pool/layout.js +51 -2
- package/dist/core/pool/layout.js.map +1 -1
- package/dist/core/pool/limits.d.ts +1 -0
- package/dist/core/pool/limits.js +1 -0
- package/dist/core/pool/limits.js.map +1 -1
- package/dist/core/pool/pool.d.ts +120 -15
- package/dist/core/pool/pool.js +255 -24
- package/dist/core/pool/pool.js.map +1 -1
- package/dist/core/reference/index.d.ts +6 -0
- package/dist/core/reference/index.js +7 -0
- package/dist/core/reference/index.js.map +1 -0
- package/dist/core/reference/renderer.d.ts +105 -0
- package/dist/core/reference/renderer.js +474 -0
- package/dist/core/reference/renderer.js.map +1 -0
- package/dist/core/reference/wgsl.d.ts +65 -0
- package/dist/core/reference/wgsl.js +803 -0
- package/dist/core/reference/wgsl.js.map +1 -0
- package/dist/{three → core}/sequence.d.ts +32 -2
- package/dist/{three → core}/sequence.js +24 -2
- package/dist/core/sequence.js.map +1 -0
- package/dist/core/source/brick-cache.d.ts +165 -0
- package/dist/core/source/brick-cache.js +627 -0
- package/dist/core/source/brick-cache.js.map +1 -0
- package/dist/core/source/dense-fill.d.ts +53 -0
- package/dist/core/source/dense-fill.js +377 -0
- package/dist/core/source/dense-fill.js.map +1 -0
- package/dist/core/source/dense.d.ts +33 -2
- package/dist/core/source/dense.js +121 -24
- package/dist/core/source/dense.js.map +1 -1
- package/dist/core/source/sparse-wgsl.d.ts +92 -0
- package/dist/core/source/sparse-wgsl.js +481 -0
- package/dist/core/source/sparse-wgsl.js.map +1 -0
- package/dist/core/source/sparse.d.ts +192 -0
- package/dist/core/source/sparse.js +762 -0
- package/dist/core/source/sparse.js.map +1 -0
- package/dist/core/source/types.d.ts +59 -2
- package/dist/core/source/types.js.map +1 -1
- package/dist/core/surface/index.d.ts +10 -0
- package/dist/core/surface/index.js +9 -0
- package/dist/core/surface/index.js.map +1 -0
- package/dist/core/surface/level-set-pass.d.ts +140 -0
- package/dist/core/surface/level-set-pass.js +291 -0
- package/dist/core/surface/level-set-pass.js.map +1 -0
- package/dist/core/surface/level-set-wgsl.d.ts +46 -0
- package/dist/core/surface/level-set-wgsl.js +99 -0
- package/dist/core/surface/level-set-wgsl.js.map +1 -0
- package/dist/core/surface/points.d.ts +109 -0
- package/dist/core/surface/points.js +226 -0
- package/dist/core/surface/points.js.map +1 -0
- package/dist/core/types.d.ts +12 -3
- package/dist/core/types.js +6 -2
- package/dist/core/types.js.map +1 -1
- package/dist/core/wgsl/api.d.ts +29 -5
- package/dist/core/wgsl/api.js +110 -27
- package/dist/core/wgsl/api.js.map +1 -1
- package/dist/core/wgsl/generate.d.ts +8 -0
- package/dist/core/wgsl/generate.js +195 -22
- package/dist/core/wgsl/generate.js.map +1 -1
- package/dist/core/wgsl/lean.d.ts +50 -0
- package/dist/core/wgsl/lean.js +327 -0
- package/dist/core/wgsl/lean.js.map +1 -0
- package/dist/core/wgsl/level-set.d.ts +5 -1
- package/dist/core/wgsl/level-set.js +11 -5
- package/dist/core/wgsl/level-set.js.map +1 -1
- package/dist/core/wgsl/majorant.d.ts +62 -0
- package/dist/core/wgsl/majorant.js +381 -0
- package/dist/core/wgsl/majorant.js.map +1 -0
- package/dist/core/wgsl/pnanovdb.chunks.generated.d.ts +2 -2
- package/dist/core/wgsl/pnanovdb.chunks.generated.js +15 -12
- package/dist/core/wgsl/pnanovdb.chunks.generated.js.map +1 -1
- package/dist/core/wgsl/types.d.ts +97 -3
- package/dist/core/wgsl/types.js.map +1 -1
- package/dist/three/coarse-first.d.ts +53 -8
- package/dist/three/coarse-first.js +24 -6
- package/dist/three/coarse-first.js.map +1 -1
- package/dist/three/compute.d.ts +12 -2
- package/dist/three/compute.js +16 -6
- package/dist/three/compute.js.map +1 -1
- package/dist/three/device.d.ts +7 -0
- package/dist/three/device.js +3 -0
- package/dist/three/device.js.map +1 -1
- package/dist/three/frame/core-environment.d.ts +38 -0
- package/dist/three/frame/core-environment.js +154 -0
- package/dist/three/frame/core-environment.js.map +1 -0
- package/dist/three/frame/core-integrate-material.d.ts +34 -0
- package/dist/three/frame/core-integrate-material.js +162 -0
- package/dist/three/frame/core-integrate-material.js.map +1 -0
- package/dist/three/frame/core-occluders.d.ts +53 -0
- package/dist/three/frame/core-occluders.js +193 -0
- package/dist/three/frame/core-occluders.js.map +1 -0
- package/dist/three/frame/core-structs.d.ts +34 -0
- package/dist/three/frame/core-structs.js +61 -0
- package/dist/three/frame/core-structs.js.map +1 -0
- package/dist/three/frame/core-textures.d.ts +41 -0
- package/dist/three/frame/core-textures.js +114 -0
- package/dist/three/frame/core-textures.js.map +1 -0
- package/dist/three/frame/emission-light.d.ts +64 -114
- package/dist/three/frame/emission-light.js +188 -567
- package/dist/three/frame/emission-light.js.map +1 -1
- package/dist/three/frame/index.d.ts +11 -31
- package/dist/three/frame/index.js +9 -29
- package/dist/three/frame/index.js.map +1 -1
- package/dist/three/frame/medium.d.ts +12 -0
- package/dist/three/frame/medium.js.map +1 -1
- package/dist/three/frame/renderer.d.ts +58 -454
- package/dist/three/frame/renderer.js +409 -1427
- package/dist/three/frame/renderer.js.map +1 -1
- package/dist/three/frame/spectrum.d.ts +0 -14
- package/dist/three/frame/spectrum.js +2 -23
- package/dist/three/frame/spectrum.js.map +1 -1
- package/dist/three/frame/three-internals.d.ts +3 -8
- package/dist/three/frame/three-internals.js +13 -11
- package/dist/three/frame/three-internals.js.map +1 -1
- package/dist/three/frame/volume-shadows.d.ts +93 -107
- package/dist/three/frame/volume-shadows.js +278 -631
- package/dist/three/frame/volume-shadows.js.map +1 -1
- package/dist/three/frame/volume.d.ts +91 -33
- package/dist/three/frame/volume.js +63 -51
- package/dist/three/frame/volume.js.map +1 -1
- package/dist/three/grid-node.d.ts +34 -1
- package/dist/three/grid-node.js +36 -1
- package/dist/three/grid-node.js.map +1 -1
- package/dist/three/index.d.ts +20 -11
- package/dist/three/index.js +21 -12
- package/dist/three/index.js.map +1 -1
- package/dist/three/internal.d.ts +14 -8
- package/dist/three/internal.js +11 -7
- package/dist/three/internal.js.map +1 -1
- package/dist/three/level-set-material.d.ts +81 -8
- package/dist/three/level-set-material.js +162 -125
- package/dist/three/level-set-material.js.map +1 -1
- package/dist/three/level-set-physical-material.d.ts +154 -0
- package/dist/three/level-set-physical-material.js +253 -0
- package/dist/three/level-set-physical-material.js.map +1 -0
- package/dist/three/level-set-velocity.d.ts +94 -0
- package/dist/three/level-set-velocity.js +208 -0
- package/dist/three/level-set-velocity.js.map +1 -0
- package/dist/three/material.d.ts +141 -11
- package/dist/three/material.js +161 -18
- package/dist/three/material.js.map +1 -1
- package/dist/three/points.d.ts +60 -4
- package/dist/three/points.js +140 -9
- package/dist/three/points.js.map +1 -1
- package/dist/three/sparse-source.d.ts +49 -117
- package/dist/three/sparse-source.js +109 -580
- package/dist/three/sparse-source.js.map +1 -1
- package/dist/three/volume-source.d.ts +11 -156
- package/dist/three/volume-source.js +29 -272
- package/dist/three/volume-source.js.map +1 -1
- package/dist/tools/cpu/brick-atlas.d.ts +36 -0
- package/dist/tools/cpu/brick-atlas.js +129 -0
- package/dist/tools/cpu/brick-atlas.js.map +1 -0
- package/dist/tools/cpu/compute.d.ts +23 -4
- package/dist/tools/cpu/compute.js +35 -14
- package/dist/tools/cpu/compute.js.map +1 -1
- package/dist/tools/cpu/lean-reads.d.ts +81 -0
- package/dist/tools/cpu/lean-reads.js +262 -0
- package/dist/tools/cpu/lean-reads.js.map +1 -0
- package/dist/tools/cpu/level-set.d.ts +42 -3
- package/dist/tools/cpu/level-set.js +59 -7
- package/dist/tools/cpu/level-set.js.map +1 -1
- package/dist/tools/cpu/majorant.d.ts +265 -0
- package/dist/tools/cpu/majorant.js +541 -0
- package/dist/tools/cpu/majorant.js.map +1 -0
- package/dist/tools/cpu/march.d.ts +93 -2
- package/dist/tools/cpu/march.js +165 -14
- package/dist/tools/cpu/march.js.map +1 -1
- package/dist/tools/cpu/mesh-decimate.d.ts +124 -0
- package/dist/tools/cpu/mesh-decimate.js +1225 -0
- package/dist/tools/cpu/mesh-decimate.js.map +1 -0
- package/dist/tools/cpu/points.d.ts +29 -0
- package/dist/tools/cpu/points.js +38 -0
- package/dist/tools/cpu/points.js.map +1 -0
- package/dist/tools/cpu/read-value.d.ts +19 -6
- package/dist/tools/cpu/read-value.js +32 -17
- package/dist/tools/cpu/read-value.js.map +1 -1
- package/dist/tools/cpu/sample-trilinear.d.ts +17 -4
- package/dist/tools/cpu/sample-trilinear.js +19 -7
- package/dist/tools/cpu/sample-trilinear.js.map +1 -1
- package/dist/tools/cpu/stride-tables.d.ts +2 -2
- package/dist/tools/cpu/stride-tables.generated.d.ts +6 -5
- package/dist/tools/cpu/stride-tables.generated.js +7 -6
- package/dist/tools/cpu/stride-tables.generated.js.map +1 -1
- package/dist/tools/cpu/stride-tables.js +1 -1
- package/dist/tools/cpu/stride-tables.js.map +1 -1
- package/dist/tools/cpu/surface-nets.d.ts +90 -0
- package/dist/tools/cpu/surface-nets.js +597 -0
- package/dist/tools/cpu/surface-nets.js.map +1 -0
- package/dist/tools/errors.d.ts +9 -0
- package/dist/tools/errors.js +9 -0
- package/dist/tools/errors.js.map +1 -1
- package/dist/tools/frame/ambient.d.ts +98 -0
- package/dist/tools/frame/ambient.js +274 -0
- package/dist/tools/frame/ambient.js.map +1 -0
- package/dist/tools/frame/blackbody.d.ts +15 -0
- package/dist/tools/frame/blackbody.js +35 -0
- package/dist/tools/frame/blackbody.js.map +1 -1
- package/dist/tools/frame/brick-cache.d.ts +165 -0
- package/dist/tools/frame/brick-cache.js +326 -0
- package/dist/tools/frame/brick-cache.js.map +1 -0
- package/dist/tools/frame/emission.d.ts +9 -0
- package/dist/tools/frame/emission.js +9 -1
- package/dist/tools/frame/emission.js.map +1 -1
- package/dist/tools/frame/environment-gpu.d.ts +111 -0
- package/dist/tools/frame/environment-gpu.js +280 -0
- package/dist/tools/frame/environment-gpu.js.map +1 -0
- package/dist/tools/frame/environment.d.ts +3 -2
- package/dist/tools/frame/environment.js +8 -4
- package/dist/tools/frame/environment.js.map +1 -1
- package/dist/tools/frame/froxel.d.ts +58 -0
- package/dist/tools/frame/froxel.js +115 -0
- package/dist/tools/frame/froxel.js.map +1 -0
- package/dist/tools/frame/grid.d.ts +90 -0
- package/dist/tools/frame/grid.js +112 -13
- package/dist/tools/frame/grid.js.map +1 -1
- package/dist/tools/frame/index.d.ts +14 -0
- package/dist/tools/frame/index.js +45 -4
- package/dist/tools/frame/index.js.map +1 -1
- package/dist/tools/frame/medium.d.ts +16 -0
- package/dist/tools/frame/medium.js +3 -1
- package/dist/tools/frame/medium.js.map +1 -1
- package/dist/tools/frame/mie.d.ts +9 -0
- package/dist/tools/frame/mie.js +18 -0
- package/dist/tools/frame/mie.js.map +1 -1
- package/dist/tools/frame/mlp-nn.d.ts +36 -0
- package/dist/tools/frame/mlp-nn.js +159 -0
- package/dist/tools/frame/mlp-nn.js.map +1 -0
- package/dist/tools/frame/mlp-tza.d.ts +29 -0
- package/dist/tools/frame/mlp-tza.js +186 -0
- package/dist/tools/frame/mlp-tza.js.map +1 -0
- package/dist/tools/frame/mlp.d.ts +183 -0
- package/dist/tools/frame/mlp.js +434 -0
- package/dist/tools/frame/mlp.js.map +1 -0
- package/dist/tools/frame/ms-exit.d.ts +42 -0
- package/dist/tools/frame/ms-exit.js +90 -0
- package/dist/tools/frame/ms-exit.js.map +1 -0
- package/dist/tools/frame/multi-scale.d.ts +152 -0
- package/dist/tools/frame/multi-scale.js +302 -0
- package/dist/tools/frame/multi-scale.js.map +1 -0
- package/dist/tools/frame/neural-weights.d.ts +6 -5
- package/dist/tools/frame/neural-weights.js +234 -235
- package/dist/tools/frame/neural-weights.js.map +1 -1
- package/dist/tools/frame/neural.js +1 -1
- package/dist/tools/frame/neural.js.map +1 -1
- package/dist/tools/frame/occluders.d.ts +51 -0
- package/dist/tools/frame/occluders.js +72 -0
- package/dist/tools/frame/occluders.js.map +1 -0
- package/dist/tools/frame/pyramid-layout.d.ts +17 -0
- package/dist/tools/frame/pyramid-layout.js +47 -0
- package/dist/tools/frame/pyramid-layout.js.map +1 -1
- package/dist/tools/frame/shadows.d.ts +110 -0
- package/dist/tools/frame/shadows.js +286 -0
- package/dist/tools/frame/shadows.js.map +1 -1
- package/dist/tools/frame/sparse.d.ts +82 -0
- package/dist/tools/frame/sparse.js +242 -1
- package/dist/tools/frame/sparse.js.map +1 -1
- package/dist/tools/frame/spectral-stack.d.ts +159 -0
- package/dist/tools/frame/spectral-stack.js +391 -0
- package/dist/tools/frame/spectral-stack.js.map +1 -0
- package/dist/tools/frame/spectral.d.ts +21 -2
- package/dist/tools/frame/spectral.js +30 -8
- package/dist/tools/frame/spectral.js.map +1 -1
- package/dist/tools/frame/stack.d.ts +115 -0
- package/dist/tools/frame/stack.js +290 -0
- package/dist/tools/frame/stack.js.map +1 -0
- package/dist/tools/frame/view.d.ts +131 -0
- package/dist/tools/frame/view.js +337 -0
- package/dist/tools/frame/view.js.map +1 -0
- package/dist/tools/index.d.ts +66 -15
- package/dist/tools/index.js +55 -11
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/internal.d.ts +58 -17
- package/dist/tools/internal.js +65 -11
- package/dist/tools/internal.js.map +1 -1
- package/dist/tools/nanovdb/build-from-vdb.d.ts +11 -2
- package/dist/tools/nanovdb/build-from-vdb.js +10 -2
- package/dist/tools/nanovdb/build-from-vdb.js.map +1 -1
- package/dist/tools/nanovdb/bytes.d.ts +17 -4
- package/dist/tools/nanovdb/bytes.js +46 -3
- package/dist/tools/nanovdb/bytes.js.map +1 -1
- package/dist/tools/nanovdb/coarse-first.d.ts +19 -3
- package/dist/tools/nanovdb/coarse-first.js +7 -1
- package/dist/tools/nanovdb/coarse-first.js.map +1 -1
- package/dist/tools/nanovdb/half.d.ts +22 -0
- package/dist/tools/nanovdb/half.js +73 -0
- package/dist/tools/nanovdb/half.js.map +1 -0
- package/dist/tools/nanovdb/index.d.ts +3 -1
- package/dist/tools/nanovdb/index.js +2 -1
- package/dist/tools/nanovdb/index.js.map +1 -1
- package/dist/tools/nanovdb/inspect.d.ts +10 -1
- package/dist/tools/nanovdb/inspect.js +8 -1
- package/dist/tools/nanovdb/inspect.js.map +1 -1
- package/dist/tools/nanovdb/leaf-codec.d.ts +35 -1
- package/dist/tools/nanovdb/leaf-codec.js +40 -4
- package/dist/tools/nanovdb/leaf-codec.js.map +1 -1
- package/dist/tools/nanovdb/quantize.d.ts +39 -10
- package/dist/tools/nanovdb/quantize.js +96 -44
- package/dist/tools/nanovdb/quantize.js.map +1 -1
- package/dist/tools/nanovdb/resample.d.ts +20 -3
- package/dist/tools/nanovdb/resample.js +20 -7
- package/dist/tools/nanovdb/resample.js.map +1 -1
- package/dist/tools/nanovdb/serialize.d.ts +34 -3
- package/dist/tools/nanovdb/serialize.js +51 -7
- package/dist/tools/nanovdb/serialize.js.map +1 -1
- package/dist/tools/nanovdb/stats.d.ts +34 -5
- package/dist/tools/nanovdb/stats.js +87 -11
- package/dist/tools/nanovdb/stats.js.map +1 -1
- package/dist/tools/nanovdb/transform.d.ts +4 -0
- package/dist/tools/nanovdb/transform.js +3 -0
- package/dist/tools/nanovdb/transform.js.map +1 -1
- package/dist/tools/nanovdb/tree.d.ts +14 -3
- package/dist/tools/nanovdb/tree.js +25 -13
- package/dist/tools/nanovdb/tree.js.map +1 -1
- package/dist/tools/nanovdb/write-nvdb.d.ts +47 -12
- package/dist/tools/nanovdb/write-nvdb.js +108 -28
- package/dist/tools/nanovdb/write-nvdb.js.map +1 -1
- package/dist/tools/nvdb-file.d.ts +77 -7
- package/dist/tools/nvdb-file.js +177 -20
- package/dist/tools/nvdb-file.js.map +1 -1
- package/dist/tools/nvdb-stream.d.ts +23 -7
- package/dist/tools/nvdb-stream.js +78 -34
- package/dist/tools/nvdb-stream.js.map +1 -1
- package/dist/tools/reference/analytic.d.ts +41 -0
- package/dist/tools/reference/analytic.js +95 -0
- package/dist/tools/reference/analytic.js.map +1 -0
- package/dist/tools/reference/environment.d.ts +62 -0
- package/dist/tools/reference/environment.js +154 -0
- package/dist/tools/reference/environment.js.map +1 -0
- package/dist/tools/reference/index.d.ts +12 -0
- package/dist/tools/reference/index.js +13 -0
- package/dist/tools/reference/index.js.map +1 -0
- package/dist/tools/reference/media.d.ts +14 -0
- package/dist/tools/reference/media.js +30 -0
- package/dist/tools/reference/media.js.map +1 -0
- package/dist/tools/reference/rng.d.ts +20 -0
- package/dist/tools/reference/rng.js +30 -0
- package/dist/tools/reference/rng.js.map +1 -0
- package/dist/tools/reference/scene.d.ts +312 -0
- package/dist/tools/reference/scene.js +169 -0
- package/dist/tools/reference/scene.js.map +1 -0
- package/dist/tools/reference/tables.d.ts +98 -0
- package/dist/tools/reference/tables.js +264 -0
- package/dist/tools/reference/tables.js.map +1 -0
- package/dist/tools/reference/trace.d.ts +160 -0
- package/dist/tools/reference/trace.js +497 -0
- package/dist/tools/reference/trace.js.map +1 -0
- package/dist/tools/vdb/blosc-write.d.ts +43 -0
- package/dist/tools/vdb/blosc-write.js +197 -0
- package/dist/tools/vdb/blosc-write.js.map +1 -0
- package/dist/tools/vdb/blosc.d.ts +35 -5
- package/dist/tools/vdb/blosc.js +82 -26
- package/dist/tools/vdb/blosc.js.map +1 -1
- package/dist/tools/vdb/blosclz.d.ts +33 -0
- package/dist/tools/vdb/blosclz.js +112 -0
- package/dist/tools/vdb/blosclz.js.map +1 -0
- package/dist/tools/vdb/byte-reader.d.ts +13 -3
- package/dist/tools/vdb/byte-reader.js +26 -4
- package/dist/tools/vdb/byte-reader.js.map +1 -1
- package/dist/tools/vdb/compression.d.ts +13 -5
- package/dist/tools/vdb/compression.js +13 -2
- package/dist/tools/vdb/compression.js.map +1 -1
- package/dist/tools/vdb/grid.js +8 -2
- package/dist/tools/vdb/grid.js.map +1 -1
- package/dist/tools/vdb/index.d.ts +2 -1
- package/dist/tools/vdb/index.js.map +1 -1
- package/dist/tools/vdb/lz4.d.ts +30 -0
- package/dist/tools/vdb/lz4.js +228 -0
- package/dist/tools/vdb/lz4.js.map +1 -0
- package/dist/tools/vdb/metadata.js +1 -1
- package/dist/tools/vdb/metadata.js.map +1 -1
- package/dist/tools/vdb/parse.d.ts +24 -2
- package/dist/tools/vdb/parse.js +102 -32
- package/dist/tools/vdb/parse.js.map +1 -1
- package/dist/tools/vdb/point-render-data.d.ts +49 -1
- package/dist/tools/vdb/point-render-data.js +91 -11
- package/dist/tools/vdb/point-render-data.js.map +1 -1
- package/dist/tools/vdb/points.d.ts +26 -0
- package/dist/tools/vdb/points.js +46 -5
- package/dist/tools/vdb/points.js.map +1 -1
- package/dist/tools/vdb/types.d.ts +59 -2
- package/dist/tools/vdb/types.js.map +1 -1
- package/dist/tools/wvdb/bake.d.ts +38 -9
- package/dist/tools/wvdb/bake.js +63 -13
- package/dist/tools/wvdb/bake.js.map +1 -1
- package/dist/tools/wvdb/dense.d.ts +80 -1
- package/dist/tools/wvdb/dense.js +67 -8
- package/dist/tools/wvdb/dense.js.map +1 -1
- package/dist/tools/wvdb/format.d.ts +59 -0
- package/dist/tools/wvdb/format.js +3 -0
- package/dist/tools/wvdb/format.js.map +1 -1
- package/dist/tools/wvdb/index.d.ts +1 -0
- package/dist/tools/wvdb/index.js +1 -0
- package/dist/tools/wvdb/index.js.map +1 -1
- package/dist/tools/wvdb/level-set.d.ts +10 -2
- package/dist/tools/wvdb/level-set.js.map +1 -1
- package/dist/tools/wvdb/nanovdb.d.ts +6 -1
- package/dist/tools/wvdb/nanovdb.js +5 -1
- package/dist/tools/wvdb/nanovdb.js.map +1 -1
- package/dist/tools/wvdb/partial.d.ts +74 -0
- package/dist/tools/wvdb/partial.js +233 -0
- package/dist/tools/wvdb/partial.js.map +1 -0
- package/dist/tools/wvdb/read.d.ts +77 -1
- package/dist/tools/wvdb/read.js +30 -7
- package/dist/tools/wvdb/read.js.map +1 -1
- package/dist/tools/wvdb/write.d.ts +23 -1
- package/dist/tools/wvdb/write.js +8 -1
- package/dist/tools/wvdb/write.js.map +1 -1
- package/package.json +2 -1
- package/vendor/VENDOR.md +21 -6
- package/vendor/pnanovdb.wgsl +52 -14
- package/dist/three/frame/blackbody.d.ts +0 -42
- package/dist/three/frame/blackbody.js +0 -74
- package/dist/three/frame/blackbody.js.map +0 -1
- package/dist/three/frame/chunks.d.ts +0 -157
- package/dist/three/frame/chunks.js +0 -559
- package/dist/three/frame/chunks.js.map +0 -1
- package/dist/three/frame/density-material.d.ts +0 -53
- package/dist/three/frame/density-material.js +0 -353
- package/dist/three/frame/density-material.js.map +0 -1
- package/dist/three/frame/environment-grid-material.d.ts +0 -21
- package/dist/three/frame/environment-grid-material.js +0 -184
- package/dist/three/frame/environment-grid-material.js.map +0 -1
- package/dist/three/frame/environment-material.d.ts +0 -22
- package/dist/three/frame/environment-material.js +0 -87
- package/dist/three/frame/environment-material.js.map +0 -1
- package/dist/three/frame/grid-mip-material.d.ts +0 -12
- package/dist/three/frame/grid-mip-material.js +0 -61
- package/dist/three/frame/grid-mip-material.js.map +0 -1
- package/dist/three/frame/inject-material.d.ts +0 -56
- package/dist/three/frame/inject-material.js +0 -424
- package/dist/three/frame/inject-material.js.map +0 -1
- package/dist/three/frame/integrate-material.d.ts +0 -26
- package/dist/three/frame/integrate-material.js +0 -198
- package/dist/three/frame/integrate-material.js.map +0 -1
- package/dist/three/frame/layout.d.ts +0 -34
- package/dist/three/frame/layout.js +0 -48
- package/dist/three/frame/layout.js.map +0 -1
- package/dist/three/frame/lighting-material.d.ts +0 -41
- package/dist/three/frame/lighting-material.js +0 -257
- package/dist/three/frame/lighting-material.js.map +0 -1
- package/dist/three/frame/lights.d.ts +0 -11
- package/dist/three/frame/lights.js +0 -16
- package/dist/three/frame/lights.js.map +0 -1
- package/dist/three/frame/neural.d.ts +0 -14
- package/dist/three/frame/neural.js +0 -105
- package/dist/three/frame/neural.js.map +0 -1
- package/dist/three/frame/phase.d.ts +0 -44
- package/dist/three/frame/phase.js +0 -80
- package/dist/three/frame/phase.js.map +0 -1
- package/dist/three/frame/shadow-density-material.d.ts +0 -30
- package/dist/three/frame/shadow-density-material.js +0 -123
- package/dist/three/frame/shadow-density-material.js.map +0 -1
- package/dist/three/frame/temporal-material.d.ts +0 -29
- package/dist/three/frame/temporal-material.js +0 -152
- package/dist/three/frame/temporal-material.js.map +0 -1
- package/dist/three/frame/transmittance-material.d.ts +0 -31
- package/dist/three/frame/transmittance-material.js +0 -315
- package/dist/three/frame/transmittance-material.js.map +0 -1
- package/dist/three/frame/view.d.ts +0 -103
- package/dist/three/frame/view.js +0 -296
- package/dist/three/frame/view.js.map +0 -1
- package/dist/three/frame/volume-shadow-material.d.ts +0 -36
- package/dist/three/frame/volume-shadow-material.js +0 -128
- package/dist/three/frame/volume-shadow-material.js.map +0 -1
- package/dist/three/sequence.js.map +0 -1
|
@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C,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AACtG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAkB,EAAE,SAA8B,EAAE,GAAe;IAC9F,OAAO,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * `VDBGridNode`: a `VDBGridPool` inside three's node system (task K2.2,\n * docs/dev/design/K1-core.md §6). Follows `@pmndrs/bvh`'s `src/three/trace-nodes.ts`.\n *\n * const grids = new VDBGridNode(renderer, pool, { profile: 'sample' });\n * // TSL:\n * const density = vdbSample(grids, gridId, positionWorld);\n * // or WGSL, calling the generated module by name (one module per shader):\n * const shade = wgslFn(`fn shade(g: u32, p: vec3f) -> f32 {\n * var a = vdbAccessorInit(g);\n * return vdbSample(&a, vdbWorldToIndex(g, p));\n * }`, [grids.module]);\n * // each frame, after pool.update(encoder) was submitted (or pool.flush()):\n * grids.update();\n *\n * **Binding.** `grids.storage` is a read-only three storage node named\n * `vdbPool` (`storage(standIn, 'uint', 0).toReadOnly().setName('vdbPool')`).\n * Its `StorageBufferAttribute` is a stand-in: before three first sees it, the\n * backend's record for it gets `buffer = pool.buffer`, and three's\n * `createAttribute` only makes a buffer when that field is unset. So three\n * binds the pool's buffer as is: no copy, no CPU write, one binding (D10).\n * three emits `struct vdbPoolStruct { value: array<u32> }` at a group and\n * binding it chooses; the module reads it through the storage node's property\n * reference (`vdbPool.value`), its one access site (the generator's `buffer`\n * mode). The name is fixed, so shader text is the same on every load.\n *\n * **Module.** `grids.module` is a `CodeNode` holding the storage node as a node\n * property, so three sets it up as a child and emits its binding in any shader\n * that includes the module. Its WGSL is `vdbModuleWgsl({ ...options, buffer:\n * <the storage node's property reference> })`, memoized per reference.\n * `wgslFn` parses only its first `fn`; every helper lives in this module.\n *\n * **Rebinding.** `update()` compares `pool.version` (and the buffer object). When\n * the pool replaced its buffer (growth, compaction, rollback), the storage\n * node's value becomes a new stand-in bound to the new buffer and three makes\n * new bind groups at the next use. Nothing recompiles. `pool.revision` changes\n * (add, replace, remove, setTransform into the same buffer) need nothing.\n * Skipping `update()` after a growth leaves three binding the old buffer, which\n * the pool destroys a couple of updates later.\n *\n * **Disposal.** The pool owns its buffer. three tracks the stand-ins like its own\n * attributes, so `renderer.dispose()` or a stand-in's `dispose()` would destroy\n * the pool's buffer. `backend.destroyAttribute` is wrapped once per backend:\n * for a stand-in, a throwaway buffer takes the pool's place before three\n * destroys it. (A renderer that created its own device still destroys that\n * device in `renderer.dispose()`; see `device.ts`.)\n *\n * **One renderer, one module per shader.** A `VDBGridNode` binds through one\n * renderer's backend: build a second node for a second renderer (even on the\n * same device). A shader holds at most one VDB module, so every grid one\n * shader reads goes through one `VDBGridNode`. Both are checked when three\n * builds a shader (`VDB_BAD_OPTION`).\n *\n * This file reaches into three's WebGPU backend, which is not public API. It\n * is written against three r187 (peer range >=0.187.0 <0.188.0, D23), and\n * every internal it uses is listed in `threeInternals` and checked loudly:\n * another three revision warns once, and the first `VDBGridNode` on a backend\n * runs a self-test of the disposal path before any pool buffer reaches three\n * (`VDB_ENGINE_MISMATCH` if three would destroy a buffer behind the guard).\n */\n\nimport { CodeNode, REVISION, StorageBufferAttribute, type Node, type NodeBuilder } from \"three/webgpu\";\nimport { storage, uint, wgslFn } from \"three/tsl\";\nimport { VDBError } from \"../core/errors.js\";\nimport { vdbCheckModule, vdbModuleWgsl } from \"../core/wgsl/generate.js\";\nimport type { VDBModuleHelper, VDBModuleOptions, VDBModuleProfile } from \"../core/wgsl/types.js\";\nimport type { VDBGridTypeName } from \"../core/types.js\";\nimport { webgpuBackendOf, type VDBThreeRendererLike } from \"./device.js\";\n\n/** What `VDBGridNode` needs from a pool; a `VDBGridPool` is one. */\nexport interface VDBGridNodePoolLike {\n readonly device: GPUDevice;\n /** Replaced only when `version` changes. */\n readonly buffer: GPUBuffer;\n readonly version: number;\n readonly layoutVersion: number;\n readonly types: Iterable<VDBGridTypeName>;\n}\n\n/** Options of {@link VDBGridNode}: the module options, minus the binding (the adapter owns it). */\nexport interface VDBGridNodeOptions {\n /** Grid types the module decodes; others read 0. Default: the pool's types now (`[...pool.types]`, checked). */\n readonly types?: Iterable<VDBGridTypeName> | undefined;\n /** `'read'`, `'sample'` (default) or `'march'`. `vdbSample` needs `sample`+. */\n readonly profile?: Exclude<VDBModuleProfile, \"majorant\"> | undefined;\n readonly sampler?: VDBModuleOptions[\"sampler\"];\n readonly isActive?: VDBModuleOptions[\"isActive\"];\n readonly outside?: VDBModuleOptions[\"outside\"];\n /**\n * Opt-in WGSL helpers for the module (`'rayClipSupport'`, and with `march`\n * `'cellBoundTrilinear'`, `'hddaCellEnd'`). `VDBVolumeMaterial` needs\n * `'rayClipSupport'`. Default none.\n */\n readonly helpers?: Iterable<VDBModuleHelper> | undefined;\n /** Name of the storage binding three emits. Default `'vdbPool'`. */\n readonly name?: string | undefined;\n}\n\n/** The parts of three's `WebGPURenderer` this file uses (see {@link threeInternals}). */\ninterface RendererLike {\n readonly backend: BackendLike;\n readonly _attributes?: { has(attribute: object): boolean; update(attribute: object, type: number): void };\n}\n\ninterface BackendLike {\n readonly isWebGPUBackend?: boolean;\n readonly device?: GPUDevice | null;\n /** The renderer's constructor parameters; `device` is undefined when the renderer made its own device. */\n readonly parameters?: { readonly device?: GPUDevice };\n get(object: object): Record<string, unknown> & { buffer?: GPUBuffer };\n destroyAttribute?(attribute: object): void;\n}\n\n/** A three storage node, as far as this file uses one. */\ntype StorageNode = Node & { value: unknown; setName(name: string): unknown; build(builder: NodeBuilder, output?: string): unknown };\n\n/**\n * A TSL node, loosely typed: three's TSL types do not follow a value returned\n * through a `wgslFn`, so the helpers take and return this (as `@pmndrs/bvh` does).\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type VDBTslNode = any;\n\nconst unsupported = (what: string): VDBError =>\n new VDBError(\n \"VDB_ENGINE_MISMATCH\",\n `three adapter: three r${REVISION} ${what}. VDBGridNode binds the pool's buffer through three's WebGPU backend internals, ` +\n \"written against three r187 (peer range >=0.187.0 <0.188.0); this three version is unsupported.\",\n );\n\n/** Stand-ins per backend whose buffer is a pool's: `destroyAttribute` swaps in a throwaway for them. */\nconst guarded = new WeakMap<BackendLike, WeakSet<object>>();\n/** Self-test result per backend: true, or the error every later construction rethrows. */\nconst selfTested = new WeakMap<BackendLike, true | VDBError>();\n/** Backends already warned about owning their device. */\nconst ownDeviceWarned = new WeakSet<BackendLike>();\n/** The VDB module each shader build has generated (one per shader). */\nconst moduleOfBuild = new WeakMap<object, VDBModuleNode>();\n\n/** three r187's `AttributeType.STORAGE` (`renderers/common/Constants.js`; not exported from `three/webgpu`). */\nconst ATTRIBUTE_TYPE_STORAGE = 3;\n/** The three revision this adapter is written against. */\nexport const VDB_THREE_REVISION = \"187\";\n/** Label of the self-test buffer (4 bytes, once per backend). */\nexport const VDB_THREE_SELF_TEST_LABEL = \"@pmndrs/vdb/three self-test\";\n\nlet revisionWarned = false;\n\n/**\n * @internal Warns once per page when `revision` is not the three revision this\n * adapter is written against. Returns true when it warned.\n */\nexport function warnThreeRevision(revision: string): boolean {\n if (revision === VDB_THREE_REVISION || revisionWarned) return false;\n revisionWarned = true;\n console.warn(\n `@pmndrs/vdb/three: three r${revision} is outside the supported range (r${VDB_THREE_REVISION}; peer >=0.187.0 <0.188.0). ` +\n \"VDBGridNode binds the pool's buffer through three's WebGPU backend internals; it self-tests them and throws \" +\n \"VDB_ENGINE_MISMATCH when they differ, but other internals may have changed too.\",\n );\n return true;\n}\n\n/** @internal Resets the once-per-page revision warning (tests). */\nexport function resetThreeRevisionWarning(): void {\n revisionWarned = false;\n}\n\n/**\n * Every three internal VDBGridNode relies on, checked against three r187's source:\n *\n * 1. `backend.get(attribute).buffer` is a storage attribute's `GPUBuffer`.\n * `WebGPUAttributeUtils.createAttribute` makes one only when it is undefined,\n * and `WebGPUBindingUtils.createBindGroup` binds it for a storage binding\n * (`backend.get(binding.attribute).buffer`).\n * 2. `backend.destroyAttribute(attribute)` destroys that buffer\n * (`WebGPUAttributeUtils.destroyAttribute`). `Attributes.delete` calls it on\n * the attribute's `dispose` event and for every tracked attribute in\n * `renderer.dispose()` (`Attributes.dispose`).\n * 3. `renderer._attributes.has(attribute)` is true once three used the attribute.\n * 4. `Bindings` rebuilds a storage binding's bind group when the storage node's\n * value (`NodeStorageBuffer.attribute`) is a different attribute.\n * 5. `renderer._attributes.update(attribute, AttributeType.STORAGE)` is how\n * three first uses a storage attribute (`createStorageAttribute`, which\n * keeps a buffer already in the record), and registers the attribute's\n * `dispose` event to `Attributes.delete`.\n * 6. `NodeBuilder.renderer` is the renderer building the shader.\n *\n * The constructor checks 2, 3 and 5 exist, then (once per backend) runs\n * {@link threeInternals.selfTest}: a 4-byte buffer goes through 1, 5 and 2\n * as a stand-in would, and must come out undestroyed. `update()` checks 1 for\n * every stand-in three used (its buffer is still the pool's, and three made\n * no other). The module node checks 6 per shader.\n */\nconst threeInternals = {\n check(renderer: RendererLike): void {\n if (typeof renderer.backend.destroyAttribute !== \"function\") throw unsupported(\"has no backend.destroyAttribute\");\n if (typeof renderer._attributes?.has !== \"function\" || typeof renderer._attributes.update !== \"function\") {\n throw unsupported(\"has no renderer._attributes (has/update)\");\n }\n },\n /**\n * Puts a 4-byte buffer through three's attribute path exactly as a stand-in\n * goes (bind, guard, `_attributes.update(attr, STORAGE)`, `attr.dispose()`)\n * and checks three took it as made and never destroyed it. Its instance\n * `destroy` only records the call until the test ends. Cached per backend;\n * a failure is rethrown on every later construction on that backend.\n *\n * @throws VDBError `VDB_ENGINE_MISMATCH` when three bypasses the guard (or\n * makes its own buffer, or keeps a disposed attribute).\n */\n selfTest(renderer: RendererLike): void {\n const backend = renderer.backend;\n const cached = selfTested.get(backend);\n if (cached === true) return;\n if (cached) throw cached;\n let error: VDBError | null = null;\n const dummy = backend.device!.createBuffer({ label: VDB_THREE_SELF_TEST_LABEL, size: 4, usage: 0x80 /* GPUBufferUsage.STORAGE */ });\n const realDestroy = dummy.destroy;\n let destroyedByThree = false;\n (dummy as { destroy: () => void }).destroy = () => {\n destroyedByThree = true;\n };\n try {\n const attribute = new StorageBufferAttribute(new Uint32Array(1), 1);\n attribute.name = VDB_THREE_SELF_TEST_LABEL;\n this.bind(backend, attribute, dummy);\n this.guardDestroy(backend, attribute);\n renderer._attributes!.update(attribute, ATTRIBUTE_TYPE_STORAGE);\n if (!this.usedByThree(renderer, attribute)) {\n error = unsupported(\"did not track a storage attribute in renderer._attributes after _attributes.update\");\n } else if (this.bufferOf(backend, attribute) !== dummy || this.otherBuffer(backend, attribute, dummy)) {\n error = unsupported(\"made its own GPUBuffer for a storage attribute whose backend record already held one\");\n }\n attribute.dispose(); // three: Attributes.delete -> backend.destroyAttribute (the guard swaps a throwaway in)\n if (!error && destroyedByThree) {\n error = unsupported(\"destroyed a storage attribute's GPUBuffer without going through backend.destroyAttribute (the destroy guard)\");\n } else if (!error && this.usedByThree(renderer, attribute)) {\n error = unsupported(\"kept a disposed storage attribute in renderer._attributes\");\n }\n } catch (e) {\n error = e instanceof VDBError ? e : unsupported(`failed the adapter's attribute self-test (${e instanceof Error ? e.message : String(e)})`);\n } finally {\n (dummy as { destroy: () => void }).destroy = realDestroy;\n dummy.destroy();\n }\n selfTested.set(backend, error ?? true);\n if (error) throw error;\n },\n bufferOf(backend: BackendLike, attribute: object): GPUBuffer | undefined {\n return backend.get(attribute).buffer;\n },\n bind(backend: BackendLike, attribute: object, buffer: GPUBuffer): void {\n backend.get(attribute).buffer = buffer;\n },\n usedByThree(renderer: RendererLike, attribute: object): boolean {\n return renderer._attributes!.has(attribute);\n },\n /** A GPUBuffer in the backend's record other than `ours` (three made its own). */\n otherBuffer(backend: BackendLike, attribute: object, ours: GPUBuffer): boolean {\n return Object.values(backend.get(attribute)).some(\n (value) => value !== ours && typeof (value as { getMappedRange?: unknown } | null)?.getMappedRange === \"function\",\n );\n },\n /** Makes `backend.destroyAttribute` spare `attribute`'s buffer: a throwaway takes its place first. */\n guardDestroy(backend: BackendLike, attribute: object): void {\n let set = guarded.get(backend);\n if (!set) {\n const ours = (set = new WeakSet());\n guarded.set(backend, ours);\n const destroy = backend.destroyAttribute!;\n (backend as { destroyAttribute: (target: object) => void }).destroyAttribute = function (this: BackendLike, target: object) {\n if (ours.has(target)) {\n ours.delete(target);\n backend.get(target).buffer = backend.device!.createBuffer({\n label: \"@pmndrs/vdb/three retired stand-in\",\n size: 16,\n usage: 0x80 /* GPUBufferUsage.STORAGE */,\n });\n }\n return destroy.call(this, target);\n };\n }\n set.add(attribute);\n },\n};\n\n/** Module options after validation, without the binding. */\ntype ModuleOptions = Omit<VDBModuleOptions, \"slot\" | \"buffer\" | \"helpers\"> & {\n readonly types: readonly VDBGridTypeName[];\n readonly profile: VDBModuleProfile;\n readonly helpers?: readonly VDBModuleHelper[];\n};\n\nconst OPTION_KEYS = new Set([\"types\", \"profile\", \"sampler\", \"isActive\", \"outside\", \"helpers\", \"name\"]);\n\nfunction bad(message: string): VDBError {\n return new VDBError(\"VDB_BAD_OPTION\", `VDBGridNode: ${message}`);\n}\n\n/** The generated module as a three code node: its buffer reference is the storage node's, per shader. */\nclass VDBModuleNode extends CodeNode {\n /** Node-valued property: three sets it up and analyzes it as this node's child. */\n vdbPool: StorageNode;\n private readonly _options: ModuleOptions;\n private readonly _byRef = new Map<string, string>();\n /** The backend the stand-ins are bound through; a shader built by another renderer would bind nothing. */\n private readonly _backend: object;\n\n constructor(storageNode: StorageNode, options: ModuleOptions, backend: object) {\n super(\"\", [], \"wgsl\");\n this.vdbPool = storageNode;\n this._options = options;\n this._backend = backend;\n }\n\n /**\n * The per-shader checks, before anything is emitted: the shader is built by\n * the renderer this node binds through, and it holds no other VDB module.\n */\n checkBuild(builder: NodeBuilder): void {\n const backend = (builder as unknown as { renderer?: { backend?: object } }).renderer?.backend;\n if (backend !== this._backend) {\n throw bad(\n \"a shader built by another renderer uses this node. A VDBGridNode binds the pool's buffer through the renderer \" +\n \"it was made with; on any other renderer it would bind nothing and read 0. Create one VDBGridNode per renderer \" +\n \"(new VDBGridNode(otherRenderer, pool, options)).\",\n );\n }\n const first = moduleOfBuild.get(builder);\n if (first !== undefined && first !== this) {\n throw bad(\n \"two VDB modules (two VDBGridNodes) in one shader. One VDB module per shader: generated symbols are declared \" +\n \"once, so a second module redeclares them. Read every grid of the shader through one VDBGridNode (by id), \" +\n \"made with the largest profile, types and helpers the shader needs.\",\n );\n }\n moduleOfBuild.set(builder, this);\n }\n\n /** The module for a buffer reference (`'vdbPool.value'` in three r187). Memoized per reference. */\n moduleFor(ref: string): string {\n let text = this._byRef.get(ref);\n if (text === undefined) {\n text = vdbModuleWgsl({ ...this._options, buffer: ref });\n this._byRef.set(ref, text);\n }\n return text;\n }\n\n override generate(builder: NodeBuilder): string {\n this.checkBuild(builder);\n const ref = this.vdbPool.build(builder, \"property\");\n if (typeof ref !== \"string\") throw unsupported(\"built the pool storage node to a non-string property reference\");\n const text = this.moduleFor(ref);\n const nodeCode = (builder as unknown as { getCodeFromNode(node: Node, type: string): { code: string } }).getCodeFromNode(\n this,\n this.getNodeType(builder),\n );\n nodeCode.code = text;\n return text;\n }\n}\n\n/**\n * Warns once per backend when the renderer made its own device (no `device`\n * parameter): `renderer.dispose()` then destroys that device, and with it the\n * pool's buffer.\n */\nfunction warnOwnDevice(backend: BackendLike): void {\n if (backend.parameters === undefined || backend.parameters.device !== undefined || ownDeviceWarned.has(backend)) return;\n ownDeviceWarned.add(backend);\n console.warn(\n \"@pmndrs/vdb/three: this WebGPURenderer created its own GPUDevice, so renderer.dispose() destroys that device and every \" +\n \"buffer on it, the VDBGridPool's included. For a pool that outlives the renderer, create the device yourself \" +\n \"(adapter.requestDevice({ requiredLimits: VDBGridPool.requiredLimits(adapter) })) and pass new WebGPURenderer({ device }).\",\n );\n}\n\ntype HelperKind = \"sampleWorld\" | \"sampleIndex\" | \"readValue\";\n\nconst HELPER_WGSL: Readonly<Record<HelperKind, string>> = {\n sampleWorld: /* wgsl */ `fn vdbThreeSampleWorld(g: u32, p: vec3f) -> f32 {\n var a = vdbAccessorInit(g);\n return vdbSample(&a, vdbWorldToIndex(g, p));\n}`,\n sampleIndex: /* wgsl */ `fn vdbThreeSampleIndex(g: u32, xyz: vec3f) -> f32 {\n var a = vdbAccessorInit(g);\n return vdbSample(&a, xyz);\n}`,\n readValue: /* wgsl */ `fn vdbThreeReadValue(g: u32, ijk: vec3i) -> f32 {\n var a = vdbAccessorInit(g);\n return vdbReadValue(&a, ijk);\n}`,\n};\n\n/**\n * A `VDBGridPool` in three's node system; see the file comment. Not itself a\n * three node: it holds the storage node (`storage`), the module code node\n * (`module`) and the TSL helpers' functions.\n */\nexport class VDBGridNode {\n /** The pool's buffer as a read-only three storage node (`array<u32>`). */\n readonly storage: StorageNode;\n /** The generated WGSL module (`vdbAccessorInit`, `vdbSample`, ...) as a three code node: include it in a `wgslFn`. */\n readonly module: Node;\n /** The module options this node compiles (validated; `types` sorted). */\n readonly options: Readonly<ModuleOptions>;\n /** Name of the storage binding three emits. */\n readonly name: string;\n /**\n * The renderer this node binds through. Only shaders this renderer builds\n * may use the node; make one `VDBGridNode` per renderer.\n */\n readonly renderer: VDBThreeRendererLike;\n\n private readonly three: RendererLike;\n private boundVersion: number;\n private bound: GPUBuffer;\n private disposed = false;\n private readonly verified = new WeakSet<object>();\n private readonly helpers = new Map<HelperKind, (...args: unknown[]) => VDBTslNode>();\n\n constructor(\n renderer: VDBThreeRendererLike,\n readonly pool: VDBGridNodePoolLike,\n options: VDBGridNodeOptions = {},\n ) {\n const backend = webgpuBackendOf(renderer, \"VDBGridNode\");\n warnThreeRevision(REVISION);\n this.renderer = renderer;\n this.three = renderer as unknown as RendererLike;\n threeInternals.check(this.three);\n if (pool === null || typeof pool !== \"object\" || typeof pool.version !== \"number\") {\n throw bad(\"pool must be a VDBGridPool (or an object with device, buffer, version, layoutVersion, types).\");\n }\n if (pool.device !== backend.device) {\n throw bad(\n \"the pool was created on a different GPUDevice than the renderer's. Create it with VDBGridPool.create(getDevice(renderer)).\",\n );\n }\n if (options === null || typeof options !== \"object\") throw bad(\"options must be an object.\");\n for (const key of Object.keys(options)) {\n if (key === \"slot\" || key === \"buffer\") {\n throw bad(`'${key}' is not an option here: three assigns the binding, and VDBGridNode reads it through its storage node.`);\n }\n if (!OPTION_KEYS.has(key)) throw bad(`unknown option '${key}'; use ${[...OPTION_KEYS].join(\", \")}.`);\n }\n if ((options.profile as string | undefined) === \"majorant\") {\n throw new VDBError(\"VDB_BAD_OPTION\", \"VDBGridNode: profile 'majorant' is deferred past 0.1 (D22). Use 'read', 'sample' or 'march'.\");\n }\n const name = options.name ?? \"vdbPool\";\n const explicitTypes = options.types !== undefined;\n const poolTypes = [...pool.types];\n if (!explicitTypes && poolTypes.length === 0) {\n throw bad(\"the pool holds no grids yet, so there are no types to compile. Pass types (e.g. ['float', 'fp8']) or add grids first.\");\n }\n const raw: VDBModuleOptions = {\n buffer: `${name}.value`,\n types: explicitTypes ? options.types! : poolTypes,\n profile: options.profile ?? \"sample\",\n sampler: options.sampler,\n isActive: options.isActive,\n outside: options.outside,\n // Materialize once (a one-shot iterable would be empty after validation); non-iterables reach the validator as is.\n helpers:\n options.helpers != null && typeof options.helpers !== \"string\" && typeof options.helpers[Symbol.iterator] === \"function\"\n ? [...options.helpers]\n : options.helpers,\n };\n // Validates every option (VDB_BAD_OPTION), the name as a WGSL identifier included.\n vdbModuleWgsl(raw);\n // With the default types, the module must decode every grid the pool holds now.\n // Explicit types are the caller's choice (a pool may be shared by modules\n // compiling different subsets); the layout must match either way.\n vdbCheckModule(explicitTypes ? { types: [], layoutVersion: pool.layoutVersion } : pool, raw);\n this.name = name;\n this.options = Object.freeze({\n types: Object.freeze([...new Set(raw.types)].sort()) as readonly VDBGridTypeName[],\n profile: raw.profile,\n ...(raw.sampler !== undefined ? { sampler: raw.sampler } : {}),\n ...(raw.isActive !== undefined ? { isActive: raw.isActive } : {}),\n ...(raw.outside !== undefined ? { outside: raw.outside } : {}),\n ...(raw.helpers !== undefined ? { helpers: Object.freeze([...new Set(raw.helpers)].sort()) as readonly VDBModuleHelper[] } : {}),\n });\n\n // Before any pool buffer reaches three: the destroy guard must hold on this backend.\n threeInternals.selfTest(this.three);\n warnOwnDevice(this.three.backend);\n\n this.bound = pool.buffer;\n this.boundVersion = pool.version;\n const node = storage(this.standIn(this.bound), \"uint\", 0).toReadOnly() as unknown as StorageNode;\n node.setName(name);\n this.storage = node;\n this.module = new VDBModuleNode(node, this.options, this.three.backend);\n }\n\n /** The pool version bound now (the pool's at construction or the last {@link update} that rebound). */\n get version(): number {\n return this.boundVersion;\n }\n\n /**\n * Rebinds the storage node when the pool replaced its buffer (`version`\n * changed, or the buffer object differs). Returns true when it rebound.\n * Cheap when nothing changed; call it every frame before three renders or\n * computes with this node.\n *\n * @throws VDBError `VDB_ENGINE_MISMATCH` when three bound something other\n * than the pool's buffer to a stand-in it used (a three whose internals\n * differ; see `threeInternals`); `VDB_DISPOSED` after {@link dispose}.\n */\n update(): boolean {\n if (this.disposed) throw new VDBError(\"VDB_DISPOSED\", \"VDBGridNode: update() after dispose().\");\n this.checkBinding();\n const buffer = this.pool.buffer;\n if (this.pool.version === this.boundVersion && buffer === this.bound) return false;\n const old = this.storage.value as StorageBufferAttribute;\n this.storage.value = this.standIn(buffer);\n this.retire(old);\n this.bound = buffer;\n this.boundVersion = this.pool.version;\n return true;\n }\n\n /**\n * Checks that this module can read every grid the pool holds now.\n *\n * @throws VDBError `VDB_TYPE_NOT_COMPILED` (those grids would read 0) or `VDB_LAYOUT_MISMATCH`.\n */\n check(): void {\n vdbCheckModule(this.pool, { types: this.options.types });\n }\n\n /** Releases the stand-in attribute. The pool's buffer is not destroyed (it is the pool's). */\n dispose(): void {\n if (this.disposed) return;\n this.retire(this.storage.value as StorageBufferAttribute);\n this.disposed = true;\n }\n\n /** @internal The `wgslFn` behind a TSL helper, made once per node (the module is included once per shader). */\n helper(kind: HelperKind): (...args: unknown[]) => VDBTslNode {\n let fn = this.helpers.get(kind);\n if (fn === undefined) {\n if (kind !== \"readValue\" && this.options.profile === \"read\") {\n throw bad(\"vdbSample needs profile 'sample' or 'march'; this VDBGridNode was made with profile 'read'.\");\n }\n fn = wgslFn(HELPER_WGSL[kind], [this.module] as never) as unknown as (...args: unknown[]) => VDBTslNode;\n this.helpers.set(kind, fn);\n }\n return fn;\n }\n\n /** The stand-in three used still has the pool's buffer, and three made none of its own. */\n private checkBinding(): void {\n const attribute = this.storage.value as StorageBufferAttribute;\n if (this.verified.has(attribute) || !threeInternals.usedByThree(this.three, attribute)) return;\n const backend = this.three.backend;\n if (threeInternals.bufferOf(backend, attribute) !== this.bound || threeInternals.otherBuffer(backend, attribute, this.bound)) {\n throw unsupported(\"did not bind the pool buffer VDBGridNode set (backend.get(attribute).buffer)\");\n }\n this.verified.add(attribute);\n }\n\n /** A `StorageBufferAttribute` whose GPU buffer is `buffer`: three takes it as made, never creates one, never destroys it. */\n private standIn(buffer: GPUBuffer): StorageBufferAttribute {\n const attribute = new StorageBufferAttribute(new Uint32Array(1), 1);\n attribute.name = buffer.label || this.name;\n threeInternals.bind(this.three.backend, attribute, buffer);\n threeInternals.guardDestroy(this.three.backend, attribute);\n return attribute;\n }\n\n /** Lets three forget an attribute: the destroy guard swaps a throwaway in for the pool's buffer, which three then destroys. */\n private retire(attribute: StorageBufferAttribute): void {\n attribute.dispose();\n }\n}\n\n/** A grid id as a TSL node: a number becomes `uint(n)`. */\nfunction gridId(index: VDBTslNode | number): VDBTslNode {\n if (typeof index === \"number\") {\n if (!Number.isInteger(index) || index < 0) throw bad(`grid index must be a non-negative integer, got ${index}.`);\n return uint(index);\n }\n return index;\n}\n\n/** Options of {@link vdbSample}. */\nexport interface VDBSampleOptions {\n /** `'world'` (default): `position` is world space, through the grid's record transform (`setTransform`). `'index'`: index space. */\n readonly space?: \"world\" | \"index\" | undefined;\n}\n\n/**\n * TSL: the grid's value at `position` (a `vec3` node) with the node's sampler\n * (`trilinear` or `nearest`) and `outside` mode. `gridIndex` is a `uint` node\n * or a number (the id `pool.add` returned). Needs profile `sample` or `march`.\n * A dead id, or a grid type the module does not compile, reads 0.\n */\nexport function vdbSample(grids: VDBGridNode, gridIndex: VDBTslNode | number, position: VDBTslNode, options: VDBSampleOptions = {}): VDBTslNode {\n const space = options.space ?? \"world\";\n if (space !== \"world\" && space !== \"index\") throw bad(`vdbSample space must be 'world' or 'index', got ${JSON.stringify(space)}.`);\n return grids.helper(space === \"world\" ? \"sampleWorld\" : \"sampleIndex\")(gridId(gridIndex), position);\n}\n\n/**\n * TSL: the grid's value at index coordinate `ijk` (an `ivec3` node; a float\n * vector converts by truncation). Any profile. A dead id, or a grid type the\n * module does not compile, reads 0.\n */\nexport function vdbReadValue(grids: VDBGridNode, gridIndex: VDBTslNode | number, ijk: VDBTslNode): VDBTslNode {\n return grids.helper(\"readValue\")(gridId(gridIndex), ijk);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"grid-node.js","sourceRoot":"","sources":["../../src/three/grid-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,sBAAsB,EAA+B,MAAM,cAAc,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGzE,OAAO,EAAE,eAAe,EAA6B,MAAM,aAAa,CAAC;AA+DzE,MAAM,WAAW,GAAG,CAAC,IAAY,EAAY,EAAE,CAC7C,IAAI,QAAQ,CACV,q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I,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,CAAC;AACtG,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,KAAkB,EAAE,SAA8B,EAAE,GAAe;IAC9F,OAAO,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * `VDBGridNode`: a `VDBGridPool` inside three's node system (task K2.2,\n * docs/dev/design/K1-core.md §6). Follows `@pmndrs/bvh`'s `src/three/trace-nodes.ts`.\n *\n * const grids = new VDBGridNode(renderer, pool, { profile: 'sample' });\n * // TSL:\n * const density = vdbSample(grids, gridId, positionWorld);\n * // or WGSL, calling the generated module by name (one module per shader):\n * const shade = wgslFn(`fn shade(g: u32, p: vec3f) -> f32 {\n * var a = vdbAccessorInit(g);\n * return vdbSample(&a, vdbWorldToIndex(g, p));\n * }`, [grids.module]);\n * // each frame, after pool.update(encoder) was submitted (or pool.flush()):\n * grids.update();\n *\n * **Binding.** `grids.storage` is a read-only three storage node named\n * `vdbPool` (`storage(standIn, 'uint', 0).toReadOnly().setName('vdbPool')`).\n * Its `StorageBufferAttribute` is a stand-in: before three first sees it, the\n * backend's record for it gets `buffer = pool.buffer`, and three's\n * `createAttribute` only makes a buffer when that field is unset. So three\n * binds the pool's buffer as is: no copy, no CPU write, one binding (D10).\n * three emits `struct vdbPoolStruct { value: array<u32> }` at a group and\n * binding it chooses; the module reads it through the storage node's property\n * reference (`vdbPool.value`), its one access site (the generator's `buffer`\n * mode). The name is fixed, so shader text is the same on every load.\n *\n * **Module.** `grids.module` is a `CodeNode` holding the storage node as a node\n * property, so three sets it up as a child and emits its binding in any shader\n * that includes the module. Its WGSL is `vdbModuleWgsl({ ...options, buffer:\n * <the storage node's property reference> })`, memoized per reference.\n * `wgslFn` parses only its first `fn`; every helper lives in this module.\n *\n * **Rebinding.** `update()` compares `pool.version` (and the buffer object). When\n * the pool replaced its buffer (growth, compaction, rollback), the storage\n * node's value becomes a new stand-in bound to the new buffer and three makes\n * new bind groups at the next use. Nothing recompiles. `pool.revision` changes\n * (add, replace, remove, setTransform into the same buffer) need nothing.\n * Skipping `update()` after a growth leaves three binding the old buffer, which\n * the pool destroys a couple of updates later.\n *\n * **Disposal.** The pool owns its buffer. three tracks the stand-ins like its own\n * attributes, so `renderer.dispose()` or a stand-in's `dispose()` would destroy\n * the pool's buffer. `backend.destroyAttribute` is wrapped once per backend:\n * for a stand-in, a throwaway buffer takes the pool's place before three\n * destroys it. (A renderer that created its own device still destroys that\n * device in `renderer.dispose()`; see `device.ts`.)\n *\n * **One renderer, one module per shader.** A `VDBGridNode` binds through one\n * renderer's backend: build a second node for a second renderer (even on the\n * same device). A shader holds at most one VDB module, so every grid one\n * shader reads goes through one `VDBGridNode`. Both are checked when three\n * builds a shader (`VDB_BAD_OPTION`).\n *\n * This file reaches into three's WebGPU backend, which is not public API. It\n * is written against three r187 (peer range >=0.187.0 <0.188.0, D23), and\n * every internal it uses is listed in `threeInternals` and checked loudly:\n * another three revision warns once, and the first `VDBGridNode` on a backend\n * runs a self-test of the disposal path before any pool buffer reaches three\n * (`VDB_ENGINE_MISMATCH` if three would destroy a buffer behind the guard).\n */\n\nimport { CodeNode, REVISION, StorageBufferAttribute, type Node, type NodeBuilder } from \"three/webgpu\";\nimport { storage, uint, wgslFn } from \"three/tsl\";\nimport { VDBError } from \"../core/errors.js\";\nimport { vdbCheckModule, vdbModuleWgsl } from \"../core/wgsl/generate.js\";\nimport type { VDBModuleHelper, VDBModuleOptions, VDBModuleProfile } from \"../core/wgsl/types.js\";\nimport type { VDBGridTypeName } from \"../core/types.js\";\nimport { webgpuBackendOf, type VDBThreeRendererLike } from \"./device.js\";\n\n/** What `VDBGridNode` needs from a pool; a `VDBGridPool` is one. */\nexport interface VDBGridNodePoolLike {\n /** The device the pool lives on; it must be the renderer's. */\n readonly device: GPUDevice;\n /** Replaced only when `version` changes. */\n readonly buffer: GPUBuffer;\n /** Changes when the pool's buffer is replaced. */\n readonly version: number;\n /** The pool's GPU layout version. */\n readonly layoutVersion: number;\n /** Grid types the pool holds now. */\n readonly types: Iterable<VDBGridTypeName>;\n}\n\n/** Options of {@link VDBGridNode}: the module options, minus the binding (the adapter owns it). */\nexport interface VDBGridNodeOptions {\n /** Grid types the module decodes; others read 0. Default: the pool's types now (`[...pool.types]`, checked). */\n readonly types?: Iterable<VDBGridTypeName> | undefined;\n /** `'read'`, `'sample'` (default) or `'march'`. `vdbSample` needs `sample`+. */\n readonly profile?: Exclude<VDBModuleProfile, \"majorant\"> | undefined;\n /** `vdbSample`'s filter: `'trilinear'` (default) or `'nearest'`. */\n readonly sampler?: VDBModuleOptions[\"sampler\"];\n /** Whether the module has `vdbIsActive` (default true). */\n readonly isActive?: VDBModuleOptions[\"isActive\"];\n /** What `vdbSample` returns outside the index box: `'background'` (default) or `'zero'`. */\n readonly outside?: VDBModuleOptions[\"outside\"];\n /**\n * Opt-in WGSL helpers for the module (`'rayClipSupport'`, and with `march`\n * `'cellBoundTrilinear'`, `'hddaCellEnd'`). `VDBVolumeMaterial` needs\n * `'rayClipSupport'`. Default none.\n */\n readonly helpers?: Iterable<VDBModuleHelper> | undefined;\n /** Name of the storage binding three emits. Default `'vdbPool'`. */\n readonly name?: string | undefined;\n}\n\n/** The parts of three's `WebGPURenderer` this file uses (see {@link threeInternals}). */\ninterface RendererLike {\n readonly backend: BackendLike;\n readonly _attributes?: { has(attribute: object): boolean; update(attribute: object, type: number): void };\n}\n\ninterface BackendLike {\n readonly isWebGPUBackend?: boolean;\n readonly device?: GPUDevice | null;\n /** The renderer's constructor parameters; `device` is undefined when the renderer made its own device. */\n readonly parameters?: { readonly device?: GPUDevice };\n get(object: object): Record<string, unknown> & { buffer?: GPUBuffer };\n destroyAttribute?(attribute: object): void;\n}\n\n/** A three storage node, as far as this file uses one. */\ntype StorageNode = Node & { value: unknown; setName(name: string): unknown; build(builder: NodeBuilder, output?: string): unknown };\n\n/**\n * A TSL node, loosely typed: three's TSL types do not follow a value returned\n * through a `wgslFn`, so the helpers take and return this (as `@pmndrs/bvh` does).\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type VDBTslNode = any;\n\nconst unsupported = (what: string): VDBError =>\n new VDBError(\n \"VDB_ENGINE_MISMATCH\",\n `three adapter: three r${REVISION} ${what}. VDBGridNode binds the pool's buffer through three's WebGPU backend internals, ` +\n \"written against three r187 (peer range >=0.187.0 <0.188.0); this three version is unsupported.\",\n );\n\n/** Stand-ins per backend whose buffer is a pool's: `destroyAttribute` swaps in a throwaway for them. */\nconst guarded = new WeakMap<BackendLike, WeakSet<object>>();\n/** Self-test result per backend: true, or the error every later construction rethrows. */\nconst selfTested = new WeakMap<BackendLike, true | VDBError>();\n/** Backends already warned about owning their device. */\nconst ownDeviceWarned = new WeakSet<BackendLike>();\n/** The VDB module each shader build has generated (one per shader). */\nconst moduleOfBuild = new WeakMap<object, VDBModuleNode>();\n\n/** three r187's `AttributeType.STORAGE` (`renderers/common/Constants.js`; not exported from `three/webgpu`). */\nconst ATTRIBUTE_TYPE_STORAGE = 3;\n/** The three revision this adapter is written against. */\nexport const VDB_THREE_REVISION = \"187\";\n/** Label of the self-test buffer (4 bytes, once per backend). */\nexport const VDB_THREE_SELF_TEST_LABEL = \"@pmndrs/vdb/three self-test\";\n\nlet revisionWarned = false;\n\n/**\n * @internal Warns once per page when `revision` is not the three revision this\n * adapter is written against. Returns true when it warned.\n */\nexport function warnThreeRevision(revision: string): boolean {\n if (revision === VDB_THREE_REVISION || revisionWarned) return false;\n revisionWarned = true;\n console.warn(\n `@pmndrs/vdb/three: three r${revision} is outside the supported range (r${VDB_THREE_REVISION}; peer >=0.187.0 <0.188.0). ` +\n \"VDBGridNode binds the pool's buffer through three's WebGPU backend internals; it self-tests them and throws \" +\n \"VDB_ENGINE_MISMATCH when they differ, but other internals may have changed too.\",\n );\n return true;\n}\n\n/** @internal Resets the once-per-page revision warning (tests). */\nexport function resetThreeRevisionWarning(): void {\n revisionWarned = false;\n}\n\n/**\n * Every three internal VDBGridNode relies on, checked against three r187's source:\n *\n * 1. `backend.get(attribute).buffer` is a storage attribute's `GPUBuffer`.\n * `WebGPUAttributeUtils.createAttribute` makes one only when it is undefined,\n * and `WebGPUBindingUtils.createBindGroup` binds it for a storage binding\n * (`backend.get(binding.attribute).buffer`).\n * 2. `backend.destroyAttribute(attribute)` destroys that buffer\n * (`WebGPUAttributeUtils.destroyAttribute`). `Attributes.delete` calls it on\n * the attribute's `dispose` event and for every tracked attribute in\n * `renderer.dispose()` (`Attributes.dispose`).\n * 3. `renderer._attributes.has(attribute)` is true once three used the attribute.\n * 4. `Bindings` rebuilds a storage binding's bind group when the storage node's\n * value (`NodeStorageBuffer.attribute`) is a different attribute.\n * 5. `renderer._attributes.update(attribute, AttributeType.STORAGE)` is how\n * three first uses a storage attribute (`createStorageAttribute`, which\n * keeps a buffer already in the record), and registers the attribute's\n * `dispose` event to `Attributes.delete`.\n * 6. `NodeBuilder.renderer` is the renderer building the shader.\n *\n * The constructor checks 2, 3 and 5 exist, then (once per backend) runs\n * {@link threeInternals.selfTest}: a 4-byte buffer goes through 1, 5 and 2\n * as a stand-in would, and must come out undestroyed. `update()` checks 1 for\n * every stand-in three used (its buffer is still the pool's, and three made\n * no other). The module node checks 6 per shader.\n */\nconst threeInternals = {\n check(renderer: RendererLike): void {\n if (typeof renderer.backend.destroyAttribute !== \"function\") throw unsupported(\"has no backend.destroyAttribute\");\n if (typeof renderer._attributes?.has !== \"function\" || typeof renderer._attributes.update !== \"function\") {\n throw unsupported(\"has no renderer._attributes (has/update)\");\n }\n },\n /**\n * Puts a 4-byte buffer through three's attribute path exactly as a stand-in\n * goes (bind, guard, `_attributes.update(attr, STORAGE)`, `attr.dispose()`)\n * and checks three took it as made and never destroyed it. Its instance\n * `destroy` only records the call until the test ends. Cached per backend;\n * a failure is rethrown on every later construction on that backend.\n *\n * @throws VDBError `VDB_ENGINE_MISMATCH` when three bypasses the guard (or\n * makes its own buffer, or keeps a disposed attribute).\n */\n selfTest(renderer: RendererLike): void {\n const backend = renderer.backend;\n const cached = selfTested.get(backend);\n if (cached === true) return;\n if (cached) throw cached;\n let error: VDBError | null = null;\n const dummy = backend.device!.createBuffer({ label: VDB_THREE_SELF_TEST_LABEL, size: 4, usage: 0x80 /* GPUBufferUsage.STORAGE */ });\n const realDestroy = dummy.destroy;\n let destroyedByThree = false;\n (dummy as { destroy: () => void }).destroy = () => {\n destroyedByThree = true;\n };\n try {\n const attribute = new StorageBufferAttribute(new Uint32Array(1), 1);\n attribute.name = VDB_THREE_SELF_TEST_LABEL;\n this.bind(backend, attribute, dummy);\n this.guardDestroy(backend, attribute);\n renderer._attributes!.update(attribute, ATTRIBUTE_TYPE_STORAGE);\n if (!this.usedByThree(renderer, attribute)) {\n error = unsupported(\"did not track a storage attribute in renderer._attributes after _attributes.update\");\n } else if (this.bufferOf(backend, attribute) !== dummy || this.otherBuffer(backend, attribute, dummy)) {\n error = unsupported(\"made its own GPUBuffer for a storage attribute whose backend record already held one\");\n }\n attribute.dispose(); // three: Attributes.delete -> backend.destroyAttribute (the guard swaps a throwaway in)\n if (!error && destroyedByThree) {\n error = unsupported(\"destroyed a storage attribute's GPUBuffer without going through backend.destroyAttribute (the destroy guard)\");\n } else if (!error && this.usedByThree(renderer, attribute)) {\n error = unsupported(\"kept a disposed storage attribute in renderer._attributes\");\n }\n } catch (e) {\n error = e instanceof VDBError ? e : unsupported(`failed the adapter's attribute self-test (${e instanceof Error ? e.message : String(e)})`);\n } finally {\n (dummy as { destroy: () => void }).destroy = realDestroy;\n dummy.destroy();\n }\n selfTested.set(backend, error ?? true);\n if (error) throw error;\n },\n bufferOf(backend: BackendLike, attribute: object): GPUBuffer | undefined {\n return backend.get(attribute).buffer;\n },\n bind(backend: BackendLike, attribute: object, buffer: GPUBuffer): void {\n backend.get(attribute).buffer = buffer;\n },\n usedByThree(renderer: RendererLike, attribute: object): boolean {\n return renderer._attributes!.has(attribute);\n },\n /** A GPUBuffer in the backend's record other than `ours` (three made its own). */\n otherBuffer(backend: BackendLike, attribute: object, ours: GPUBuffer): boolean {\n return Object.values(backend.get(attribute)).some(\n (value) => value !== ours && typeof (value as { getMappedRange?: unknown } | null)?.getMappedRange === \"function\",\n );\n },\n /** Makes `backend.destroyAttribute` spare `attribute`'s buffer: a throwaway takes its place first. */\n guardDestroy(backend: BackendLike, attribute: object): void {\n let set = guarded.get(backend);\n if (!set) {\n const ours = (set = new WeakSet());\n guarded.set(backend, ours);\n const destroy = backend.destroyAttribute!;\n (backend as { destroyAttribute: (target: object) => void }).destroyAttribute = function (this: BackendLike, target: object) {\n if (ours.has(target)) {\n ours.delete(target);\n backend.get(target).buffer = backend.device!.createBuffer({\n label: \"@pmndrs/vdb/three retired stand-in\",\n size: 16,\n usage: 0x80 /* GPUBufferUsage.STORAGE */,\n });\n }\n return destroy.call(this, target);\n };\n }\n set.add(attribute);\n },\n};\n\n/** Module options after validation, without the binding. */\ntype ModuleOptions = Omit<VDBModuleOptions, \"slot\" | \"buffer\" | \"helpers\"> & {\n readonly types: readonly VDBGridTypeName[];\n readonly profile: VDBModuleProfile;\n readonly helpers?: readonly VDBModuleHelper[];\n};\n\nconst OPTION_KEYS = new Set([\"types\", \"profile\", \"sampler\", \"isActive\", \"outside\", \"helpers\", \"name\"]);\n\nfunction bad(message: string): VDBError {\n return new VDBError(\"VDB_BAD_OPTION\", `VDBGridNode: ${message}`);\n}\n\n/** The generated module as a three code node: its buffer reference is the storage node's, per shader. */\nclass VDBModuleNode extends CodeNode {\n /** Node-valued property: three sets it up and analyzes it as this node's child. */\n vdbPool: StorageNode;\n private readonly _options: ModuleOptions;\n private readonly _byRef = new Map<string, string>();\n /** The backend the stand-ins are bound through; a shader built by another renderer would bind nothing. */\n private readonly _backend: object;\n\n constructor(storageNode: StorageNode, options: ModuleOptions, backend: object) {\n super(\"\", [], \"wgsl\");\n this.vdbPool = storageNode;\n this._options = options;\n this._backend = backend;\n }\n\n /**\n * The per-shader checks, before anything is emitted: the shader is built by\n * the renderer this node binds through, and it holds no other VDB module.\n */\n checkBuild(builder: NodeBuilder): void {\n const backend = (builder as unknown as { renderer?: { backend?: object } }).renderer?.backend;\n if (backend !== this._backend) {\n throw bad(\n \"a shader built by another renderer uses this node. A VDBGridNode binds the pool's buffer through the renderer \" +\n \"it was made with; on any other renderer it would bind nothing and read 0. Create one VDBGridNode per renderer \" +\n \"(new VDBGridNode(otherRenderer, pool, options)).\",\n );\n }\n const first = moduleOfBuild.get(builder);\n if (first !== undefined && first !== this) {\n throw bad(\n \"two VDB modules (two VDBGridNodes) in one shader. One VDB module per shader: generated symbols are declared \" +\n \"once, so a second module redeclares them. Read every grid of the shader through one VDBGridNode (by id), \" +\n \"made with the largest profile, types and helpers the shader needs.\",\n );\n }\n moduleOfBuild.set(builder, this);\n }\n\n /** The module for a buffer reference (`'vdbPool.value'` in three r187). Memoized per reference. */\n moduleFor(ref: string): string {\n let text = this._byRef.get(ref);\n if (text === undefined) {\n text = vdbModuleWgsl({ ...this._options, buffer: ref });\n this._byRef.set(ref, text);\n }\n return text;\n }\n\n override generate(builder: NodeBuilder): string {\n this.checkBuild(builder);\n const ref = this.vdbPool.build(builder, \"property\");\n if (typeof ref !== \"string\") throw unsupported(\"built the pool storage node to a non-string property reference\");\n const text = this.moduleFor(ref);\n const nodeCode = (builder as unknown as { getCodeFromNode(node: Node, type: string): { code: string } }).getCodeFromNode(\n this,\n this.getNodeType(builder),\n );\n nodeCode.code = text;\n return text;\n }\n}\n\n/**\n * Warns once per backend when the renderer made its own device (no `device`\n * parameter): `renderer.dispose()` then destroys that device, and with it the\n * pool's buffer.\n */\nfunction warnOwnDevice(backend: BackendLike): void {\n if (backend.parameters === undefined || backend.parameters.device !== undefined || ownDeviceWarned.has(backend)) return;\n ownDeviceWarned.add(backend);\n console.warn(\n \"@pmndrs/vdb/three: this WebGPURenderer created its own GPUDevice, so renderer.dispose() destroys that device and every \" +\n \"buffer on it, the VDBGridPool's included. For a pool that outlives the renderer, create the device yourself \" +\n \"(adapter.requestDevice({ requiredLimits: VDBGridPool.requiredLimits(adapter) })) and pass new WebGPURenderer({ device }).\",\n );\n}\n\n/**\n * @internal K6.8a: a three `StorageBufferAttribute` whose GPU buffer is `buffer`, a buffer someone else owns (a core\n * frame renderer's volume shadow view): the `VDBGridNode` pool-buffer pattern for any storage buffer. three binds it as\n * made, never creates one for it and never destroys it (the destroy guard); the attribute self-test runs once per\n * backend first. Bind it with `storage(attribute, type, count).toReadOnly()`; swap the storage node's `value` to rebind,\n * and `dispose()` the old attribute (the guard swaps a throwaway in). `buffer` needs `STORAGE` usage.\n *\n * @throws VDBError `VDB_ENGINE_MISMATCH` when three's internals differ (see `threeInternals`).\n */\nexport function vdbThreeStorageStandIn(renderer: object, buffer: GPUBuffer, name: string): StorageBufferAttribute {\n const three = renderer as RendererLike;\n threeInternals.check(three);\n threeInternals.selfTest(three);\n const attribute = new StorageBufferAttribute(new Uint32Array(4), 4);\n attribute.name = buffer.label || name;\n threeInternals.bind(three.backend, attribute, buffer);\n threeInternals.guardDestroy(three.backend, attribute);\n return attribute;\n}\n\ntype HelperKind = \"sampleWorld\" | \"sampleIndex\" | \"readValue\";\n\nconst HELPER_WGSL: Readonly<Record<HelperKind, string>> = {\n sampleWorld: /* wgsl */ `fn vdbThreeSampleWorld(g: u32, p: vec3f) -> f32 {\n var a = vdbAccessorInit(g);\n return vdbSample(&a, vdbWorldToIndex(g, p));\n}`,\n sampleIndex: /* wgsl */ `fn vdbThreeSampleIndex(g: u32, xyz: vec3f) -> f32 {\n var a = vdbAccessorInit(g);\n return vdbSample(&a, xyz);\n}`,\n readValue: /* wgsl */ `fn vdbThreeReadValue(g: u32, ijk: vec3i) -> f32 {\n var a = vdbAccessorInit(g);\n return vdbReadValue(&a, ijk);\n}`,\n};\n\n/**\n * A `VDBGridPool` in three's node system; see the file comment. Not itself a\n * three node: it holds the storage node (`storage`), the module code node\n * (`module`) and the TSL helpers' functions.\n */\nexport class VDBGridNode {\n /** The pool's buffer as a read-only three storage node (`array<u32>`). */\n readonly storage: StorageNode;\n /** The generated WGSL module (`vdbAccessorInit`, `vdbSample`, ...) as a three code node: include it in a `wgslFn`. */\n readonly module: Node;\n /** The module options this node compiles (validated; `types` sorted). */\n readonly options: Readonly<ModuleOptions>;\n /** Name of the storage binding three emits. */\n readonly name: string;\n /**\n * The renderer this node binds through. Only shaders this renderer builds\n * may use the node; make one `VDBGridNode` per renderer.\n */\n readonly renderer: VDBThreeRendererLike;\n\n private readonly three: RendererLike;\n private boundVersion: number;\n private bound: GPUBuffer;\n private disposed = false;\n private readonly verified = new WeakSet<object>();\n private readonly helpers = new Map<HelperKind, (...args: unknown[]) => VDBTslNode>();\n\n /**\n * Wraps `pool` for the renderer's shaders.\n *\n * @param renderer The initialized `WebGPURenderer` (on its WebGPU backend) that will render with this node.\n * @param pool The pool (a `VDBGridPool`) created on the renderer's device.\n * @param options The module options (types, profile, sampler, helpers, binding name).\n */\n constructor(\n renderer: VDBThreeRendererLike,\n readonly pool: VDBGridNodePoolLike,\n options: VDBGridNodeOptions = {},\n ) {\n const backend = webgpuBackendOf(renderer, \"VDBGridNode\");\n warnThreeRevision(REVISION);\n this.renderer = renderer;\n this.three = renderer as unknown as RendererLike;\n threeInternals.check(this.three);\n if (pool === null || typeof pool !== \"object\" || typeof pool.version !== \"number\") {\n throw bad(\"pool must be a VDBGridPool (or an object with device, buffer, version, layoutVersion, types).\");\n }\n if (pool.device !== backend.device) {\n throw bad(\n \"the pool was created on a different GPUDevice than the renderer's. Create it with VDBGridPool.create(getDevice(renderer)).\",\n );\n }\n if (options === null || typeof options !== \"object\") throw bad(\"options must be an object.\");\n for (const key of Object.keys(options)) {\n if (key === \"slot\" || key === \"buffer\") {\n throw bad(`'${key}' is not an option here: three assigns the binding, and VDBGridNode reads it through its storage node.`);\n }\n if (!OPTION_KEYS.has(key)) throw bad(`unknown option '${key}'; use ${[...OPTION_KEYS].join(\", \")}.`);\n }\n if ((options.profile as string | undefined) === \"majorant\") {\n throw new VDBError(\"VDB_BAD_OPTION\", \"VDBGridNode: profile 'majorant' is for raw WGSL hosts (vdbModuleWgsl; P1). Use 'read', 'sample' or 'march'.\");\n }\n const name = options.name ?? \"vdbPool\";\n const explicitTypes = options.types !== undefined;\n const poolTypes = [...pool.types];\n if (!explicitTypes && poolTypes.length === 0) {\n throw bad(\"the pool holds no grids yet, so there are no types to compile. Pass types (e.g. ['float', 'fp8']) or add grids first.\");\n }\n const raw: VDBModuleOptions = {\n buffer: `${name}.value`,\n types: explicitTypes ? options.types! : poolTypes,\n profile: options.profile ?? \"sample\",\n sampler: options.sampler,\n isActive: options.isActive,\n outside: options.outside,\n // Materialize once (a one-shot iterable would be empty after validation); non-iterables reach the validator as is.\n helpers:\n options.helpers != null && typeof options.helpers !== \"string\" && typeof options.helpers[Symbol.iterator] === \"function\"\n ? [...options.helpers]\n : options.helpers,\n };\n // Validates every option (VDB_BAD_OPTION), the name as a WGSL identifier included.\n vdbModuleWgsl(raw);\n // With the default types, the module must decode every grid the pool holds now.\n // Explicit types are the caller's choice (a pool may be shared by modules\n // compiling different subsets); the layout must match either way.\n vdbCheckModule(explicitTypes ? { types: [], layoutVersion: pool.layoutVersion } : pool, raw);\n this.name = name;\n this.options = Object.freeze({\n types: Object.freeze([...new Set(raw.types)].sort()) as readonly VDBGridTypeName[],\n profile: raw.profile,\n ...(raw.sampler !== undefined ? { sampler: raw.sampler } : {}),\n ...(raw.isActive !== undefined ? { isActive: raw.isActive } : {}),\n ...(raw.outside !== undefined ? { outside: raw.outside } : {}),\n ...(raw.helpers !== undefined ? { helpers: Object.freeze([...new Set(raw.helpers)].sort()) as readonly VDBModuleHelper[] } : {}),\n });\n\n // Before any pool buffer reaches three: the destroy guard must hold on this backend.\n threeInternals.selfTest(this.three);\n warnOwnDevice(this.three.backend);\n\n this.bound = pool.buffer;\n this.boundVersion = pool.version;\n const node = storage(this.standIn(this.bound), \"uint\", 0).toReadOnly() as unknown as StorageNode;\n node.setName(name);\n this.storage = node;\n this.module = new VDBModuleNode(node, this.options, this.three.backend);\n }\n\n /** The pool version bound now (the pool's at construction or the last {@link update} that rebound). */\n get version(): number {\n return this.boundVersion;\n }\n\n /**\n * Rebinds the storage node when the pool replaced its buffer (`version`\n * changed, or the buffer object differs). Returns true when it rebound.\n * Cheap when nothing changed; call it every frame before three renders or\n * computes with this node.\n *\n * @throws VDBError `VDB_ENGINE_MISMATCH` when three bound something other\n * than the pool's buffer to a stand-in it used (a three whose internals\n * differ; see `threeInternals`); `VDB_DISPOSED` after {@link dispose}.\n */\n update(): boolean {\n if (this.disposed) throw new VDBError(\"VDB_DISPOSED\", \"VDBGridNode: update() after dispose().\");\n this.checkBinding();\n const buffer = this.pool.buffer;\n if (this.pool.version === this.boundVersion && buffer === this.bound) return false;\n const old = this.storage.value as StorageBufferAttribute;\n this.storage.value = this.standIn(buffer);\n this.retire(old);\n this.bound = buffer;\n this.boundVersion = this.pool.version;\n return true;\n }\n\n /**\n * Checks that this module can read every grid the pool holds now.\n *\n * @throws VDBError `VDB_TYPE_NOT_COMPILED` (those grids would read 0) or `VDB_LAYOUT_MISMATCH`.\n */\n check(): void {\n vdbCheckModule(this.pool, { types: this.options.types });\n }\n\n /** Releases the stand-in attribute. The pool's buffer is not destroyed (it is the pool's). */\n dispose(): void {\n if (this.disposed) return;\n this.retire(this.storage.value as StorageBufferAttribute);\n this.disposed = true;\n }\n\n /** @internal The `wgslFn` behind a TSL helper, made once per node (the module is included once per shader). */\n helper(kind: HelperKind): (...args: unknown[]) => VDBTslNode {\n let fn = this.helpers.get(kind);\n if (fn === undefined) {\n if (kind !== \"readValue\" && this.options.profile === \"read\") {\n throw bad(\"vdbSample needs profile 'sample' or 'march'; this VDBGridNode was made with profile 'read'.\");\n }\n fn = wgslFn(HELPER_WGSL[kind], [this.module] as never) as unknown as (...args: unknown[]) => VDBTslNode;\n this.helpers.set(kind, fn);\n }\n return fn;\n }\n\n /** The stand-in three used still has the pool's buffer, and three made none of its own. */\n private checkBinding(): void {\n const attribute = this.storage.value as StorageBufferAttribute;\n if (this.verified.has(attribute) || !threeInternals.usedByThree(this.three, attribute)) return;\n const backend = this.three.backend;\n if (threeInternals.bufferOf(backend, attribute) !== this.bound || threeInternals.otherBuffer(backend, attribute, this.bound)) {\n throw unsupported(\"did not bind the pool buffer VDBGridNode set (backend.get(attribute).buffer)\");\n }\n this.verified.add(attribute);\n }\n\n /** A `StorageBufferAttribute` whose GPU buffer is `buffer`: three takes it as made, never creates one, never destroys it. */\n private standIn(buffer: GPUBuffer): StorageBufferAttribute {\n const attribute = new StorageBufferAttribute(new Uint32Array(1), 1);\n attribute.name = buffer.label || this.name;\n threeInternals.bind(this.three.backend, attribute, buffer);\n threeInternals.guardDestroy(this.three.backend, attribute);\n return attribute;\n }\n\n /** Lets three forget an attribute: the destroy guard swaps a throwaway in for the pool's buffer, which three then destroys. */\n private retire(attribute: StorageBufferAttribute): void {\n attribute.dispose();\n }\n}\n\n/** A grid id as a TSL node: a number becomes `uint(n)`. */\nfunction gridId(index: VDBTslNode | number): VDBTslNode {\n if (typeof index === \"number\") {\n if (!Number.isInteger(index) || index < 0) throw bad(`grid index must be a non-negative integer, got ${index}.`);\n return uint(index);\n }\n return index;\n}\n\n/** Options of {@link vdbSample}. */\nexport interface VDBSampleOptions {\n /** `'world'` (default): `position` is world space, through the grid's record transform (`setTransform`). `'index'`: index space. */\n readonly space?: \"world\" | \"index\" | undefined;\n}\n\n/**\n * TSL: the grid's value at `position` (a `vec3` node) with the node's sampler\n * (`trilinear` or `nearest`) and `outside` mode. `gridIndex` is a `uint` node\n * or a number (the id `pool.add` returned). Needs profile `sample` or `march`.\n * A dead id, or a grid type the module does not compile, reads 0.\n *\n * @param grids The node whose module is compiled into the shader.\n * @param gridIndex The grid's pool id: a number or a `uint` node.\n * @param position A `vec3` node in the space chosen by `options.space`.\n * @param options `space`: `'world'` (default) or `'index'`.\n */\nexport function vdbSample(grids: VDBGridNode, gridIndex: VDBTslNode | number, position: VDBTslNode, options: VDBSampleOptions = {}): VDBTslNode {\n const space = options.space ?? \"world\";\n if (space !== \"world\" && space !== \"index\") throw bad(`vdbSample space must be 'world' or 'index', got ${JSON.stringify(space)}.`);\n return grids.helper(space === \"world\" ? \"sampleWorld\" : \"sampleIndex\")(gridId(gridIndex), position);\n}\n\n/**\n * TSL: the grid's value at index coordinate `ijk` (an `ivec3` node; a float\n * vector converts by truncation). Any profile. A dead id, or a grid type the\n * module does not compile, reads 0.\n *\n * @param grids The node whose module is compiled into the shader.\n * @param gridIndex The grid's pool id: a number or a `uint` node.\n * @param ijk An `ivec3` node: the voxel's index coordinate.\n */\nexport function vdbReadValue(grids: VDBGridNode, gridIndex: VDBTslNode | number, ijk: VDBTslNode): VDBTslNode {\n return grids.helper(\"readValue\")(gridId(gridIndex), ijk);\n}\n"]}
|
package/dist/three/index.d.ts
CHANGED
|
@@ -5,19 +5,21 @@
|
|
|
5
5
|
* pool and the other pmndrs tools share one device. `VDBGridNode` puts a
|
|
6
6
|
* `VDBGridPool` into three's node system (`vdbSample`, `vdbReadValue`, or the
|
|
7
7
|
* module as a `wgslFn` include). `VDBVolumeMaterial` raymarches one pooled
|
|
8
|
-
* grid; `VDBSequence` plays a frame sequence into one pool id with
|
|
8
|
+
* grid; `VDBSequence` (the core's, re-exported) plays a frame sequence into one pool id with
|
|
9
9
|
* `pool.replace`. `vdbGridStats` / `vdbDecodeToAtlas` run the core compute
|
|
10
10
|
* tools through the renderer's device. `VDBFrameVolume` / `VDBFrameRenderer`
|
|
11
|
-
* are mjurczyk's froxel renderer on a dense or sparse volume source
|
|
11
|
+
* are mjurczyk's froxel renderer on a dense or sparse volume source, drawn by the
|
|
12
|
+
* core frame renderer on three's device (K6.8: a thin adapter; `renderer.core`).
|
|
12
13
|
*
|
|
13
14
|
* There is no renderer bootstrap: create the device yourself
|
|
14
15
|
* (`adapter.requestDevice({ requiredLimits: VDBGridPool.requiredLimits(adapter) })`)
|
|
15
16
|
* and pass it, `new WebGPURenderer({ device })`, so the pool outlives
|
|
16
17
|
* `renderer.dispose()`.
|
|
17
18
|
*
|
|
18
|
-
* This barrel is the public API (D32). The frame renderer's
|
|
19
|
+
* This barrel is the public API (D32). The frame renderer's composite material, core-texture stand-ins and three
|
|
19
20
|
* internals hooks live in `./internal.ts`, imported by path by tests and harnesses; it is not a package
|
|
20
|
-
* export.
|
|
21
|
+
* export. Core types the adapter takes or returns (settings, emission colour, light bits) are the core's
|
|
22
|
+
* declarations, re-exported.
|
|
21
23
|
*/
|
|
22
24
|
export { getDevice, getGPUTexture } from "./device.js";
|
|
23
25
|
export type { VDBThreeBackendLike, VDBThreeRendererLike } from "./device.js";
|
|
@@ -25,19 +27,26 @@ export { VDBGridNode, vdbReadValue, vdbSample } from "./grid-node.js";
|
|
|
25
27
|
export type { VDBGridNodeOptions, VDBGridNodePoolLike, VDBSampleOptions, VDBTslNode } from "./grid-node.js";
|
|
26
28
|
export { VDBVolumeMaterial, vdbProxyGeometry, VDB_VOLUME_MAX_STEPS_CAP, VDB_VOLUME_SHADOW_STEPS_CAP, VDB_VOLUME_SAMPLE_BUDGET_CAP, } from "./material.js";
|
|
27
29
|
export type { VDBVolumeMaterialParameters, VDBProxyGridInfo, VDBUintUniform } from "./material.js";
|
|
28
|
-
export { VDBSequence } from "
|
|
29
|
-
export type { VDBSequenceLoopMode, VDBSequenceOptions, VDBSequenceRange, VDBSequenceStats, VDBSequenceTarget, VDBSequencePoolLike,
|
|
30
|
+
export { VDBSequence } from "../core/sequence.js";
|
|
31
|
+
export type { VDBSequenceLoopMode, VDBSequenceOptions, VDBSequenceRange, VDBSequenceStats, VDBSequenceTarget, VDBSequencePoolLike, VDBSequenceFrameLoader, } from "../core/sequence.js";
|
|
30
32
|
export { VDBLevelSetMaterial, VDB_LEVEL_SET_SAMPLES_CAP } from "./level-set-material.js";
|
|
31
33
|
export type { VDBLevelSetMaterialParameters } from "./level-set-material.js";
|
|
34
|
+
export { VDBLevelSetPhysicalMaterial } from "./level-set-physical-material.js";
|
|
35
|
+
export type { VDBLevelSetBackdrop, VDBLevelSetPhysicalMaterialParameters } from "./level-set-physical-material.js";
|
|
36
|
+
export { VDBLevelSetVelocityNode } from "./level-set-velocity.js";
|
|
32
37
|
export { VDBPoints } from "./points.js";
|
|
33
38
|
export type { VDBPointsData, VDBPointsOptions } from "./points.js";
|
|
34
39
|
export { vdbGridStats, vdbDecodeToAtlas } from "./compute.js";
|
|
35
40
|
export type { VDBThreeGridStatsOptions, VDBGridStatsResult, VDBThreeDecodeToAtlasOptions, VDBDecodeToAtlasResult } from "./compute.js";
|
|
36
|
-
export { vdbDenseTextures
|
|
37
|
-
export type {
|
|
41
|
+
export { vdbDenseTextures } from "./volume-source.js";
|
|
42
|
+
export type { VDBThreeDenseSource, VDBThreeVolumeSource } from "./volume-source.js";
|
|
38
43
|
export { vdbSparseSource } from "./sparse-source.js";
|
|
39
|
-
export type { VDBSparseLod, VDBSparseSourceGrids, VDBSparseSourceOptions, VDBThreeSparseSource,
|
|
44
|
+
export type { VDBSparseLod, VDBSparseSourceGrids, VDBSparseSourceOptions, VDBThreeSparseSource, VDBIndexBox, } from "./sparse-source.js";
|
|
40
45
|
export { vdbCoarseFirstApply, vdbStreamCoarseFirst } from "./coarse-first.js";
|
|
41
46
|
export type { VDBCoarseFirstBind, VDBCoarseFirstBindPoolLike, VDBCoarseFirstEvent, VDBCoarseFirstOptions, VDBCoarseFirstPoolLike, VDBCoarseFirstResult, VDBCoarseFirstSource, } from "./coarse-first.js";
|
|
42
|
-
export { VDBFrameVolume, VDBFrameRenderer, vdbFrameRenderer,
|
|
43
|
-
export type { VDBFrameVolumeProps,
|
|
47
|
+
export { VDBFrameVolume, VDBFrameRenderer, vdbFrameRenderer, getFrameMediumProps as vdbFrameMedium, VDBFrameEmissionLight, } from "./frame/index.js";
|
|
48
|
+
export type { VDBFrameVolumeProps, VDBFramePassHook, VDBFramePhaseSettings, VDBFrameMediumVolumeProps, VDBFrameEmissionLightProps } from "./frame/index.js";
|
|
49
|
+
export { VDB_FRAME_ALL_LIGHTS, VDB_FRAME_LIGHT_BITS } from "../core/frame/types.js";
|
|
50
|
+
export type { VDBEmissionColor, VDBFrameRedrawStats, VDBFrameTimestamps, VDBFrameUpdate } from "../core/frame/types.js";
|
|
51
|
+
export type { VDBFrameSettings, VDBFramePhaseName, VDBFrameMultipleScatteringMode } from "../core/frame/settings.js";
|
|
52
|
+
export type { VDBFrameMlp, VDBFrameMlpLayer } from "../tools/frame/mlp.js";
|
package/dist/three/index.js
CHANGED
|
@@ -5,19 +5,21 @@
|
|
|
5
5
|
* pool and the other pmndrs tools share one device. `VDBGridNode` puts a
|
|
6
6
|
* `VDBGridPool` into three's node system (`vdbSample`, `vdbReadValue`, or the
|
|
7
7
|
* module as a `wgslFn` include). `VDBVolumeMaterial` raymarches one pooled
|
|
8
|
-
* grid; `VDBSequence` plays a frame sequence into one pool id with
|
|
8
|
+
* grid; `VDBSequence` (the core's, re-exported) plays a frame sequence into one pool id with
|
|
9
9
|
* `pool.replace`. `vdbGridStats` / `vdbDecodeToAtlas` run the core compute
|
|
10
10
|
* tools through the renderer's device. `VDBFrameVolume` / `VDBFrameRenderer`
|
|
11
|
-
* are mjurczyk's froxel renderer on a dense or sparse volume source
|
|
11
|
+
* are mjurczyk's froxel renderer on a dense or sparse volume source, drawn by the
|
|
12
|
+
* core frame renderer on three's device (K6.8: a thin adapter; `renderer.core`).
|
|
12
13
|
*
|
|
13
14
|
* There is no renderer bootstrap: create the device yourself
|
|
14
15
|
* (`adapter.requestDevice({ requiredLimits: VDBGridPool.requiredLimits(adapter) })`)
|
|
15
16
|
* and pass it, `new WebGPURenderer({ device })`, so the pool outlives
|
|
16
17
|
* `renderer.dispose()`.
|
|
17
18
|
*
|
|
18
|
-
* This barrel is the public API (D32). The frame renderer's
|
|
19
|
+
* This barrel is the public API (D32). The frame renderer's composite material, core-texture stand-ins and three
|
|
19
20
|
* internals hooks live in `./internal.ts`, imported by path by tests and harnesses; it is not a package
|
|
20
|
-
* export.
|
|
21
|
+
* export. Core types the adapter takes or returns (settings, emission colour, light bits) are the core's
|
|
22
|
+
* declarations, re-exported.
|
|
21
23
|
*/
|
|
22
24
|
// K2.1/K2.2: the adapter over the engine-free core (docs/dev/design/K1-core.md §6). `getDevice` and
|
|
23
25
|
// `getGPUTexture` keep the helper names the other pmndrs tools use (D32).
|
|
@@ -25,25 +27,32 @@ export { getDevice, getGPUTexture } from "./device.js";
|
|
|
25
27
|
export { VDBGridNode, vdbReadValue, vdbSample } from "./grid-node.js";
|
|
26
28
|
// K2.3: the volume material and the sequence player on the pool.
|
|
27
29
|
export { VDBVolumeMaterial, vdbProxyGeometry, VDB_VOLUME_MAX_STEPS_CAP, VDB_VOLUME_SHADOW_STEPS_CAP, VDB_VOLUME_SAMPLE_BUDGET_CAP, } from "./material.js";
|
|
28
|
-
|
|
30
|
+
// K6.8: VDBSequence lives in the core (engine-free, Q7); re-exported here.
|
|
31
|
+
export { VDBSequence } from "../core/sequence.js";
|
|
29
32
|
// K3.7 (R1 §6 Step 7): level-set surfaces traced on the sparse pool, and point grids as sprites.
|
|
30
33
|
export { VDBLevelSetMaterial, VDB_LEVEL_SET_SAMPLES_CAP } from "./level-set-material.js";
|
|
34
|
+
// G13a: the same trace on three's physical material (glass, clearcoat).
|
|
35
|
+
export { VDBLevelSetPhysicalMaterial } from "./level-set-physical-material.js";
|
|
36
|
+
// G13c-a1b (D42 (3)): the traced hit's velocity for temporal antialiasing and upscalers (an MRT `velocity` output).
|
|
37
|
+
export { VDBLevelSetVelocityNode } from "./level-set-velocity.js";
|
|
31
38
|
export { VDBPoints } from "./points.js";
|
|
32
39
|
// K2.3: compute wrappers over the core tools (renderer in, promise out). The
|
|
33
|
-
// core's `
|
|
40
|
+
// core's `vdbGridStats` / `vdbDecodeToAtlas` take a device and an encoder;
|
|
34
41
|
// the value transform is the core's `vdbApplyValueTransform` (CPU).
|
|
35
42
|
export { vdbGridStats, vdbDecodeToAtlas } from "./compute.js";
|
|
36
|
-
// K3.0: the dense `.wvdb` volume source (R1 §4.2)
|
|
37
|
-
export { vdbDenseTextures
|
|
43
|
+
// K3.0 / K6.11: the dense `.wvdb` volume source (R1 §4.2), a handle `VDBFrameVolume` draws.
|
|
44
|
+
export { vdbDenseTextures } from "./volume-source.js";
|
|
38
45
|
// K3.2: the sparse volume source (a VDBGridPool grid behind the same seam) with its LOD strategies.
|
|
39
46
|
export { vdbSparseSource } from "./sparse-source.js";
|
|
40
47
|
// K4.16: coarse-first `.nvdb` streaming into one pool id (add the preview with
|
|
41
48
|
// the full size reserved, then replace). Engine-free glue; here because tools
|
|
42
49
|
// may not import the core.
|
|
43
50
|
export { vdbCoarseFirstApply, vdbStreamCoarseFirst } from "./coarse-first.js";
|
|
44
|
-
// K3.1–K3.6: the froxel renderer (his FrameVolume / FrameRenderer)
|
|
45
|
-
// renderer, the
|
|
46
|
-
export { VDBFrameVolume, VDBFrameRenderer, vdbFrameRenderer,
|
|
51
|
+
// K3.1–K3.6, K6.8: the froxel renderer (his FrameVolume / FrameRenderer) over the core frame renderer: the volume, the
|
|
52
|
+
// renderer, the measured media and the emission light.
|
|
53
|
+
export { VDBFrameVolume, VDBFrameRenderer, vdbFrameRenderer,
|
|
47
54
|
// His helper name stays inside frame/ (diffable with upstream); the public name follows D17.
|
|
48
|
-
getFrameMediumProps as vdbFrameMedium, VDBFrameEmissionLight,
|
|
55
|
+
getFrameMediumProps as vdbFrameMedium, VDBFrameEmissionLight, } from "./frame/index.js";
|
|
56
|
+
// K6.8 (0.2.0): the core's declarations the adapter takes or returns, re-exported (one declaration each).
|
|
57
|
+
export { VDB_FRAME_ALL_LIGHTS, VDB_FRAME_LIGHT_BITS } from "../core/frame/types.js";
|
|
49
58
|
//# sourceMappingURL=index.js.map
|
package/dist/three/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/three/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/three/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,oGAAoG;AACpG,0EAA0E;AAC1E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGtE,iEAAiE;AACjE,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,eAAe,CAAC;AAEvB,2EAA2E;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAWlD,iGAAiG;AACjG,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEzF,wEAAwE;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,oHAAoH;AACpH,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,6EAA6E;AAC7E,2EAA2E;AAC3E,oEAAoE;AACpE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAG9D,4FAA4F;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,oGAAoG;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrD,+EAA+E;AAC/E,8EAA8E;AAC9E,2BAA2B;AAC3B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAW9E,uHAAuH;AACvH,uDAAuD;AACvD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB;AAChB,6FAA6F;AAC7F,mBAAmB,IAAI,cAAc,EACrC,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,0GAA0G;AAC1G,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["/**\n * @pmndrs/vdb/three — the three.js adapter over the engine-free core (D8).\n *\n * `getDevice` / `getGPUTexture` reach the renderer's WebGPU handles, so the\n * pool and the other pmndrs tools share one device. `VDBGridNode` puts a\n * `VDBGridPool` into three's node system (`vdbSample`, `vdbReadValue`, or the\n * module as a `wgslFn` include). `VDBVolumeMaterial` raymarches one pooled\n * grid; `VDBSequence` (the core's, re-exported) plays a frame sequence into one pool id with\n * `pool.replace`. `vdbGridStats` / `vdbDecodeToAtlas` run the core compute\n * tools through the renderer's device. `VDBFrameVolume` / `VDBFrameRenderer`\n * are mjurczyk's froxel renderer on a dense or sparse volume source, drawn by the\n * core frame renderer on three's device (K6.8: a thin adapter; `renderer.core`).\n *\n * There is no renderer bootstrap: create the device yourself\n * (`adapter.requestDevice({ requiredLimits: VDBGridPool.requiredLimits(adapter) })`)\n * and pass it, `new WebGPURenderer({ device })`, so the pool outlives\n * `renderer.dispose()`.\n *\n * This barrel is the public API (D32). The frame renderer's composite material, core-texture stand-ins and three\n * internals hooks live in `./internal.ts`, imported by path by tests and harnesses; it is not a package\n * export. Core types the adapter takes or returns (settings, emission colour, light bits) are the core's\n * declarations, re-exported.\n */\n\n// K2.1/K2.2: the adapter over the engine-free core (docs/dev/design/K1-core.md §6). `getDevice` and\n// `getGPUTexture` keep the helper names the other pmndrs tools use (D32).\nexport { getDevice, getGPUTexture } from \"./device.js\";\nexport type { VDBThreeBackendLike, VDBThreeRendererLike } from \"./device.js\";\nexport { VDBGridNode, vdbReadValue, vdbSample } from \"./grid-node.js\";\nexport type { VDBGridNodeOptions, VDBGridNodePoolLike, VDBSampleOptions, VDBTslNode } from \"./grid-node.js\";\n\n// K2.3: the volume material and the sequence player on the pool.\nexport {\n VDBVolumeMaterial,\n vdbProxyGeometry,\n VDB_VOLUME_MAX_STEPS_CAP,\n VDB_VOLUME_SHADOW_STEPS_CAP,\n VDB_VOLUME_SAMPLE_BUDGET_CAP,\n} from \"./material.js\";\nexport type { VDBVolumeMaterialParameters, VDBProxyGridInfo, VDBUintUniform } from \"./material.js\";\n// K6.8: VDBSequence lives in the core (engine-free, Q7); re-exported here.\nexport { VDBSequence } from \"../core/sequence.js\";\nexport type {\n VDBSequenceLoopMode,\n VDBSequenceOptions,\n VDBSequenceRange,\n VDBSequenceStats,\n VDBSequenceTarget,\n VDBSequencePoolLike,\n VDBSequenceFrameLoader,\n} from \"../core/sequence.js\";\n\n// K3.7 (R1 §6 Step 7): level-set surfaces traced on the sparse pool, and point grids as sprites.\nexport { VDBLevelSetMaterial, VDB_LEVEL_SET_SAMPLES_CAP } from \"./level-set-material.js\";\nexport type { VDBLevelSetMaterialParameters } from \"./level-set-material.js\";\n// G13a: the same trace on three's physical material (glass, clearcoat).\nexport { VDBLevelSetPhysicalMaterial } from \"./level-set-physical-material.js\";\nexport type { VDBLevelSetBackdrop, VDBLevelSetPhysicalMaterialParameters } from \"./level-set-physical-material.js\";\n// G13c-a1b (D42 (3)): the traced hit's velocity for temporal antialiasing and upscalers (an MRT `velocity` output).\nexport { VDBLevelSetVelocityNode } from \"./level-set-velocity.js\";\nexport { VDBPoints } from \"./points.js\";\nexport type { VDBPointsData, VDBPointsOptions } from \"./points.js\";\n\n// K2.3: compute wrappers over the core tools (renderer in, promise out). The\n// core's `vdbGridStats` / `vdbDecodeToAtlas` take a device and an encoder;\n// the value transform is the core's `vdbApplyValueTransform` (CPU).\nexport { vdbGridStats, vdbDecodeToAtlas } from \"./compute.js\";\nexport type { VDBThreeGridStatsOptions, VDBGridStatsResult, VDBThreeDecodeToAtlasOptions, VDBDecodeToAtlasResult } from \"./compute.js\";\n\n// K3.0 / K6.11: the dense `.wvdb` volume source (R1 §4.2), a handle `VDBFrameVolume` draws.\nexport { vdbDenseTextures } from \"./volume-source.js\";\nexport type { VDBThreeDenseSource, VDBThreeVolumeSource } from \"./volume-source.js\";\n\n// K3.2: the sparse volume source (a VDBGridPool grid behind the same seam) with its LOD strategies.\nexport { vdbSparseSource } from \"./sparse-source.js\";\nexport type {\n VDBSparseLod,\n VDBSparseSourceGrids,\n VDBSparseSourceOptions,\n VDBThreeSparseSource,\n VDBIndexBox,\n} from \"./sparse-source.js\";\n\n// K4.16: coarse-first `.nvdb` streaming into one pool id (add the preview with\n// the full size reserved, then replace). Engine-free glue; here because tools\n// may not import the core.\nexport { vdbCoarseFirstApply, vdbStreamCoarseFirst } from \"./coarse-first.js\";\nexport type {\n VDBCoarseFirstBind,\n VDBCoarseFirstBindPoolLike,\n VDBCoarseFirstEvent,\n VDBCoarseFirstOptions,\n VDBCoarseFirstPoolLike,\n VDBCoarseFirstResult,\n VDBCoarseFirstSource,\n} from \"./coarse-first.js\";\n\n// K3.1–K3.6, K6.8: the froxel renderer (his FrameVolume / FrameRenderer) over the core frame renderer: the volume, the\n// renderer, the measured media and the emission light.\nexport {\n VDBFrameVolume,\n VDBFrameRenderer,\n vdbFrameRenderer,\n // His helper name stays inside frame/ (diffable with upstream); the public name follows D17.\n getFrameMediumProps as vdbFrameMedium,\n VDBFrameEmissionLight,\n} from \"./frame/index.js\";\nexport type { VDBFrameVolumeProps, VDBFramePassHook, VDBFramePhaseSettings, VDBFrameMediumVolumeProps, VDBFrameEmissionLightProps } from \"./frame/index.js\";\n// K6.8 (0.2.0): the core's declarations the adapter takes or returns, re-exported (one declaration each).\nexport { VDB_FRAME_ALL_LIGHTS, VDB_FRAME_LIGHT_BITS } from \"../core/frame/types.js\";\nexport type { VDBEmissionColor, VDBFrameRedrawStats, VDBFrameTimestamps, VDBFrameUpdate } from \"../core/frame/types.js\";\nexport type { VDBFrameSettings, VDBFramePhaseName, VDBFrameMultipleScatteringMode } from \"../core/frame/settings.js\";\nexport type { VDBFrameMlp, VDBFrameMlpLayer } from \"../tools/frame/mlp.js\";\n"]}
|
package/dist/three/internal.d.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @pmndrs/vdb/three internals (D32): NOT a package export.
|
|
3
3
|
*
|
|
4
|
-
* Everything public (`./index.ts`) plus what tests and harnesses need that a user doesn't: the frame
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* and the three-internals hooks. Import it by path (`src/three/internal.ts`); its names can change
|
|
8
|
-
* without notice.
|
|
4
|
+
* Everything public (`./index.ts`) plus what tests and harnesses need that a user doesn't: the frame renderer's
|
|
5
|
+
* composite material, core-texture stand-ins, volume shadow receivers and the three-internals hooks. Import it by
|
|
6
|
+
* path (`src/three/internal.ts`); its names can change without notice.
|
|
9
7
|
*/
|
|
10
8
|
export * from "./index.js";
|
|
9
|
+
export type { VDBThreeBrickOptions, VDBThreeSparseSourceInternalOptions } from "./sparse-source.js";
|
|
10
|
+
export { vdbVolumeMarchScales, vdbVolumeDensityReference, VDB_VOLUME_OPTICAL_DEPTH, VDB_VOLUME_SHADOW_REACH, VDB_VOLUME_SUN_INTENSITY, VDB_VOLUME_MIN_REFERENCE, } from "./material.js";
|
|
11
|
+
export type { VDBVolumeMarchScaleInputs, VDBVolumeMarchScales } from "./material.js";
|
|
11
12
|
export { vdbAttenuatedPointSize, vdbPointDiscTexture } from "./points.js";
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export
|
|
13
|
+
export { vdbApplyLevelSetTrace, vdbLevelSetLightingPosition, vdbLevelSetTrace } from "./level-set-material.js";
|
|
14
|
+
export type { VDBLevelSetTrace, VDBLevelSetTraceParameters } from "./level-set-material.js";
|
|
15
|
+
export { VDBLevelSetPhysicalLightingModel, vdbLevelSetShadowTint } from "./level-set-physical-material.js";
|
|
16
|
+
export type { VDBLevelSetShadowTintInputs } from "./level-set-physical-material.js";
|
|
17
|
+
export { vdbLevelSetGridMotion, vdbLevelSetVelocityCpu } from "./level-set-velocity.js";
|
|
18
|
+
export { vdbLevelSetSpecularAa, vdbLevelSetSpecularAaCpu, VDB_SPECULAR_AA_CLAMP, VDB_SPECULAR_AA_VARIANCE } from "./level-set-material.js";
|
|
19
|
+
export { VDBFrameCoreIntegrateMaterial, VDBFrameVolumeShadowReceivers, VDBFrameVolumeShadowNode, VDBFrameEmissionLightNode, VDBCoreTextureBinding, vdbCoreTextureSelfTest, vdbCoreTextureStandIn, VDB_THREE_CORE_TEXTURE_SELF_TEST_LABEL, vdbFrameCheckLightReset, VDB_FRAME_THREE_REVISION, getFrameAngstromExponent as vdbFrameAngstromExponent, frameAngstromExponents as vdbFrameAngstromExponents, } from "./frame/index.js";
|
|
20
|
+
export type { VDBFrameShadowEntry, VDBFramePhaseSettings } from "./frame/index.js";
|
package/dist/three/internal.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @pmndrs/vdb/three internals (D32): NOT a package export.
|
|
3
3
|
*
|
|
4
|
-
* Everything public (`./index.ts`) plus what tests and harnesses need that a user doesn't: the frame
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* and the three-internals hooks. Import it by path (`src/three/internal.ts`); its names can change
|
|
8
|
-
* without notice.
|
|
4
|
+
* Everything public (`./index.ts`) plus what tests and harnesses need that a user doesn't: the frame renderer's
|
|
5
|
+
* composite material, core-texture stand-ins, volume shadow receivers and the three-internals hooks. Import it by
|
|
6
|
+
* path (`src/three/internal.ts`); its names can change without notice.
|
|
9
7
|
*/
|
|
10
8
|
export * from "./index.js";
|
|
9
|
+
// EX1a: the CPU twin of what VDBVolumeMaterial's march derives from the grid, and its default constants.
|
|
10
|
+
export { vdbVolumeMarchScales, vdbVolumeDensityReference, VDB_VOLUME_OPTICAL_DEPTH, VDB_VOLUME_SHADOW_REACH, VDB_VOLUME_SUN_INTENSITY, VDB_VOLUME_MIN_REFERENCE, } from "./material.js";
|
|
11
11
|
export { vdbAttenuatedPointSize, vdbPointDiscTexture } from "./points.js";
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
12
|
+
export { vdbApplyLevelSetTrace, vdbLevelSetLightingPosition, vdbLevelSetTrace } from "./level-set-material.js";
|
|
13
|
+
export { VDBLevelSetPhysicalLightingModel, vdbLevelSetShadowTint } from "./level-set-physical-material.js";
|
|
14
|
+
// G13c-a1b: the CPU twins of VDBLevelSetVelocityNode's reprojection and of its grid motion.
|
|
15
|
+
export { vdbLevelSetGridMotion, vdbLevelSetVelocityCpu } from "./level-set-velocity.js";
|
|
16
|
+
export { vdbLevelSetSpecularAa, vdbLevelSetSpecularAaCpu, VDB_SPECULAR_AA_CLAMP, VDB_SPECULAR_AA_VARIANCE } from "./level-set-material.js";
|
|
17
|
+
export { VDBFrameCoreIntegrateMaterial, VDBFrameVolumeShadowReceivers, VDBFrameVolumeShadowNode, VDBFrameEmissionLightNode, VDBCoreTextureBinding, vdbCoreTextureSelfTest, vdbCoreTextureStandIn, VDB_THREE_CORE_TEXTURE_SELF_TEST_LABEL, vdbFrameCheckLightReset, VDB_FRAME_THREE_REVISION, getFrameAngstromExponent as vdbFrameAngstromExponent, frameAngstromExponents as vdbFrameAngstromExponents, } from "./frame/index.js";
|
|
14
18
|
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/three/internal.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/three/internal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAC;AAI3B,yGAAyG;AACzG,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE/G,OAAO,EAAE,gCAAgC,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE3G,4FAA4F;AAC5F,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC3I,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,IAAI,wBAAwB,EACpD,sBAAsB,IAAI,yBAAyB,GACpD,MAAM,kBAAkB,CAAC","sourcesContent":["/**\n * @pmndrs/vdb/three internals (D32): NOT a package export.\n *\n * Everything public (`./index.ts`) plus what tests and harnesses need that a user doesn't: the frame renderer's\n * composite material, core-texture stand-ins, volume shadow receivers and the three-internals hooks. Import it by\n * path (`src/three/internal.ts`); its names can change without notice.\n */\n\nexport * from \"./index.js\";\n// K3.2f: the sparse source's internal options (the core source's brick cache).\nexport type { VDBThreeBrickOptions, VDBThreeSparseSourceInternalOptions } from \"./sparse-source.js\";\n\n// EX1a: the CPU twin of what VDBVolumeMaterial's march derives from the grid, and its default constants.\nexport {\n vdbVolumeMarchScales,\n vdbVolumeDensityReference,\n VDB_VOLUME_OPTICAL_DEPTH,\n VDB_VOLUME_SHADOW_REACH,\n VDB_VOLUME_SUN_INTENSITY,\n VDB_VOLUME_MIN_REFERENCE,\n} from \"./material.js\";\nexport type { VDBVolumeMarchScaleInputs, VDBVolumeMarchScales } from \"./material.js\";\nexport { vdbAttenuatedPointSize, vdbPointDiscTexture } from \"./points.js\";\nexport { vdbApplyLevelSetTrace, vdbLevelSetLightingPosition, vdbLevelSetTrace } from \"./level-set-material.js\";\nexport type { VDBLevelSetTrace, VDBLevelSetTraceParameters } from \"./level-set-material.js\";\nexport { VDBLevelSetPhysicalLightingModel, vdbLevelSetShadowTint } from \"./level-set-physical-material.js\";\nexport type { VDBLevelSetShadowTintInputs } from \"./level-set-physical-material.js\";\n// G13c-a1b: the CPU twins of VDBLevelSetVelocityNode's reprojection and of its grid motion.\nexport { vdbLevelSetGridMotion, vdbLevelSetVelocityCpu } from \"./level-set-velocity.js\";\nexport { vdbLevelSetSpecularAa, vdbLevelSetSpecularAaCpu, VDB_SPECULAR_AA_CLAMP, VDB_SPECULAR_AA_VARIANCE } from \"./level-set-material.js\";\nexport {\n VDBFrameCoreIntegrateMaterial,\n VDBFrameVolumeShadowReceivers,\n VDBFrameVolumeShadowNode,\n VDBFrameEmissionLightNode,\n VDBCoreTextureBinding,\n vdbCoreTextureSelfTest,\n vdbCoreTextureStandIn,\n VDB_THREE_CORE_TEXTURE_SELF_TEST_LABEL,\n vdbFrameCheckLightReset,\n VDB_FRAME_THREE_REVISION,\n getFrameAngstromExponent as vdbFrameAngstromExponent,\n frameAngstromExponents as vdbFrameAngstromExponents,\n} from \"./frame/index.js\";\nexport type { VDBFrameShadowEntry, VDBFramePhaseSettings } from \"./frame/index.js\";\n"]}
|