@luma.gl/engine 10.0.0-beta.4 → 10.0.0-rc.2
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/THIRD-PARTY-NOTICES.md +82 -0
- package/dist/animation/animation-track.d.ts +7 -0
- package/dist/animation/animation-track.d.ts.map +1 -1
- package/dist/animation/animation-track.js.map +1 -1
- package/dist/animation/node-animation-binding.cjs +1 -0
- package/dist/animation/node-animation-binding.d.ts +2 -1
- package/dist/animation/node-animation-binding.d.ts.map +1 -1
- package/dist/animation/node-animation-binding.js +6 -0
- package/dist/animation/node-animation-binding.js.map +1 -1
- package/dist/animation/scenegraph-gpu-animation-layout.cjs +99 -0
- package/dist/animation/scenegraph-gpu-animation-layout.d.ts +69 -0
- package/dist/animation/scenegraph-gpu-animation-layout.d.ts.map +1 -0
- package/dist/animation/scenegraph-gpu-animation-layout.js +90 -0
- package/dist/animation/scenegraph-gpu-animation-layout.js.map +1 -0
- package/dist/animation/scenegraph-gpu-animation.cjs +281 -0
- package/dist/animation/scenegraph-gpu-animation.d.ts +54 -0
- package/dist/animation/scenegraph-gpu-animation.d.ts.map +1 -0
- package/dist/animation/scenegraph-gpu-animation.js +274 -0
- package/dist/animation/scenegraph-gpu-animation.js.map +1 -0
- package/dist/arrow/arrow-picking.cjs +4 -3
- package/dist/arrow/arrow-picking.d.ts +15 -5
- package/dist/arrow/arrow-picking.d.ts.map +1 -1
- package/dist/arrow/arrow-picking.js +16 -5
- package/dist/arrow/arrow-picking.js.map +1 -1
- package/dist/arrow/index.cjs.map +1 -1
- package/dist/audio/audio-controller.cjs +6 -2
- package/dist/audio/audio-controller.d.ts.map +1 -1
- package/dist/audio/audio-controller.js +6 -2
- package/dist/audio/audio-controller.js.map +1 -1
- package/dist/audio/audio-graph.cjs +26 -2
- package/dist/audio/audio-graph.d.ts +9 -0
- package/dist/audio/audio-graph.d.ts.map +1 -1
- package/dist/audio/audio-graph.js +35 -10
- package/dist/audio/audio-graph.js.map +1 -1
- package/dist/dist.dev.js +1689 -1094
- package/dist/dist.min.js +69 -70
- package/dist/effects/glfx-effects.cjs +261 -0
- package/dist/effects/glfx-effects.d.ts +959 -0
- package/dist/effects/glfx-effects.d.ts.map +1 -0
- package/dist/effects/glfx-effects.js +200 -0
- package/dist/effects/glfx-effects.js.map +1 -0
- package/dist/effects/graph/gpu-effect-operation.cjs +402 -0
- package/dist/effects/graph/gpu-effect-operation.d.ts +101 -0
- package/dist/effects/graph/gpu-effect-operation.d.ts.map +1 -0
- package/dist/effects/graph/gpu-effect-operation.js +410 -0
- package/dist/effects/graph/gpu-effect-operation.js.map +1 -0
- package/dist/effects/graph/temporal-graph-history.cjs +48 -0
- package/dist/effects/graph/temporal-graph-history.d.ts +17 -0
- package/dist/effects/graph/temporal-graph-history.d.ts.map +1 -0
- package/dist/effects/graph/temporal-graph-history.js +30 -0
- package/dist/effects/graph/temporal-graph-history.js.map +1 -0
- package/dist/effects/index.cjs +117 -30
- package/dist/effects/index.cjs.map +3 -3
- package/dist/effects/index.d.ts +34 -18
- package/dist/effects/index.d.ts.map +1 -1
- package/dist/effects/index.js +31 -18
- package/dist/effects/index.js.map +1 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.cjs +9 -2
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts +19 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js +6 -0
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.cjs +9 -2
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts +41 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js +6 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.cjs +200 -13
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts +992 -6
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js +199 -10
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts +3 -3
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.js.map +1 -1
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.cjs +41 -40
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts +116 -8
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js +38 -37
- package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.cjs +83 -66
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts +470 -2
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js +80 -62
- package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.cjs +7 -0
- package/dist/effects/passes/screen-space/copy-pass.d.ts +1 -0
- package/dist/effects/passes/screen-space/copy-pass.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/copy-pass.js +4 -0
- package/dist/effects/passes/screen-space/copy-pass.js.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.cjs +14 -5
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts +125 -17
- package/dist/effects/passes/screen-space/depth-aware-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/depth-aware-blur.js +11 -3
- package/dist/effects/passes/screen-space/depth-aware-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/dof.cjs +19 -3
- package/dist/effects/passes/screen-space/dof.d.ts +181 -0
- package/dist/effects/passes/screen-space/dof.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/dof.js +17 -3
- package/dist/effects/passes/screen-space/dof.js.map +1 -1
- package/dist/effects/passes/screen-space/gtao.cjs +82 -62
- package/dist/effects/passes/screen-space/gtao.d.ts +608 -3
- package/dist/effects/passes/screen-space/gtao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/gtao.js +83 -60
- package/dist/effects/passes/screen-space/gtao.js.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.cjs +103 -79
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts +225 -3
- package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/hdr-auto-exposure.js +102 -77
- package/dist/effects/passes/screen-space/hdr-auto-exposure.js.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.cjs +14 -0
- package/dist/effects/passes/screen-space/height-fog.d.ts +71 -0
- package/dist/effects/passes/screen-space/height-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/height-fog.js +16 -3
- package/dist/effects/passes/screen-space/height-fog.js.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.cjs +7 -8
- package/dist/effects/passes/screen-space/motion-blur.d.ts +41 -2
- package/dist/effects/passes/screen-space/motion-blur.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/motion-blur.js +6 -6
- package/dist/effects/passes/screen-space/motion-blur.js.map +1 -1
- package/dist/effects/passes/screen-space/outlines.cjs +143 -18
- package/dist/effects/passes/screen-space/outlines.d.ts +162 -3
- package/dist/effects/passes/screen-space/outlines.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/outlines.js +137 -15
- package/dist/effects/passes/screen-space/outlines.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.cjs +70 -61
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts +309 -2
- package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js +69 -59
- package/dist/effects/passes/screen-space/screen-space-global-illumination.js.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.cjs +151 -83
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts +778 -7
- package/dist/effects/passes/screen-space/screen-space-reflections.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/screen-space-reflections.js +148 -79
- package/dist/effects/passes/screen-space/screen-space-reflections.js.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.cjs +12 -2
- package/dist/effects/passes/screen-space/selection-outline.d.ts +44 -0
- package/dist/effects/passes/screen-space/selection-outline.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/selection-outline.js +9 -0
- package/dist/effects/passes/screen-space/selection-outline.js.map +1 -1
- package/dist/effects/passes/screen-space/ssao.cjs +69 -44
- package/dist/effects/passes/screen-space/ssao.d.ts +648 -3
- package/dist/effects/passes/screen-space/ssao.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/ssao.js +67 -42
- package/dist/effects/passes/screen-space/ssao.js.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.cjs +42 -30
- package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts +107 -6
- package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/temporal-antialiasing.js +40 -27
- package/dist/effects/passes/screen-space/temporal-antialiasing.js.map +1 -1
- package/dist/effects/passes/screen-space/temporal-frame.cjs +34 -0
- package/dist/effects/passes/screen-space/temporal-frame.d.ts +23 -0
- package/dist/effects/passes/screen-space/temporal-frame.d.ts.map +1 -0
- package/dist/effects/passes/screen-space/temporal-frame.js +16 -0
- package/dist/effects/passes/screen-space/temporal-frame.js.map +1 -0
- package/dist/effects/passes/screen-space/volumetric-fog.cjs +25 -22
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts +161 -2
- package/dist/effects/passes/screen-space/volumetric-fog.d.ts.map +1 -1
- package/dist/effects/passes/screen-space/volumetric-fog.js +27 -21
- package/dist/effects/passes/screen-space/volumetric-fog.js.map +1 -1
- package/dist/effects/temporal-upscale/index.cjs +40 -0
- package/dist/effects/temporal-upscale/index.d.ts +5 -0
- package/dist/effects/temporal-upscale/index.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/index.js +6 -0
- package/dist/effects/temporal-upscale/index.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-math.cjs +202 -0
- package/dist/effects/temporal-upscale/temporal-math.d.ts +101 -0
- package/dist/effects/temporal-upscale/temporal-math.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-math.js +202 -0
- package/dist/effects/temporal-upscale/temporal-math.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.cjs +353 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.d.ts +7 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.js +321 -0
- package/dist/effects/temporal-upscale/temporal-upscale-shaders.js.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.cjs +392 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.d.ts +143 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.d.ts.map +1 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.js +385 -0
- package/dist/effects/temporal-upscale/temporal-upscaler.js.map +1 -0
- package/dist/experimental-controls.cjs +13 -3
- package/dist/experimental-controls.d.ts +2 -1
- package/dist/experimental-controls.d.ts.map +1 -1
- package/dist/experimental-controls.js +1 -1
- package/dist/experimental-controls.js.map +1 -1
- package/dist/experimental-materials.cjs +37 -3
- package/dist/experimental-materials.d.ts +2 -1
- package/dist/experimental-materials.d.ts.map +1 -1
- package/dist/experimental-materials.js +1 -1
- package/dist/experimental-materials.js.map +1 -1
- package/dist/experimental-textures.cjs +13 -3
- package/dist/experimental-textures.d.ts +2 -1
- package/dist/experimental-textures.d.ts.map +1 -1
- package/dist/experimental-textures.js +1 -1
- package/dist/experimental-textures.js.map +1 -1
- package/dist/experimental-webxr.cjs +17 -3
- package/dist/experimental-webxr.d.ts +2 -1
- package/dist/experimental-webxr.d.ts.map +1 -1
- package/dist/experimental-webxr.js +1 -1
- package/dist/experimental-webxr.js.map +1 -1
- package/dist/gltf/gltf/create-gltf-model.cjs +34 -71
- package/dist/gltf/gltf/create-gltf-model.d.ts +3 -0
- package/dist/gltf/gltf/create-gltf-model.d.ts.map +1 -1
- package/dist/gltf/gltf/create-gltf-model.js +40 -74
- package/dist/gltf/gltf/create-gltf-model.js.map +1 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.cjs +46 -4
- package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts +9 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts.map +1 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.js +54 -4
- package/dist/gltf/gltf/create-scenegraph-from-gltf.js.map +1 -1
- package/dist/gltf/gltf/gltf-animated-crowd.cjs +25 -136
- package/dist/gltf/gltf/gltf-animated-crowd.d.ts +4 -8
- package/dist/gltf/gltf/gltf-animated-crowd.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-animated-crowd.js +27 -139
- package/dist/gltf/gltf/gltf-animated-crowd.js.map +1 -1
- package/dist/gltf/gltf/gltf-animation-nodes.cjs +84 -0
- package/dist/gltf/gltf/gltf-animation-nodes.d.ts +11 -0
- package/dist/gltf/gltf/gltf-animation-nodes.d.ts.map +1 -0
- package/dist/gltf/gltf/gltf-animation-nodes.js +62 -0
- package/dist/gltf/gltf/gltf-animation-nodes.js.map +1 -0
- package/dist/gltf/gltf/gltf-animator.cjs +8 -2
- package/dist/gltf/gltf/gltf-animator.d.ts +6 -1
- package/dist/gltf/gltf/gltf-animator.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-animator.js +10 -2
- package/dist/gltf/gltf/gltf-animator.js.map +1 -1
- package/dist/gltf/gltf/gltf-gpu-animation-controller.cjs +81 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.d.ts +9 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.d.ts.map +1 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.js +67 -0
- package/dist/gltf/gltf/gltf-gpu-animation-controller.js.map +1 -0
- package/dist/gltf/gltf/gltf-gpu-animation.cjs +33 -28
- package/dist/gltf/gltf/gltf-gpu-animation.d.ts +7 -26
- package/dist/gltf/gltf/gltf-gpu-animation.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-gpu-animation.js +29 -28
- package/dist/gltf/gltf/gltf-gpu-animation.js.map +1 -1
- package/dist/gltf/index.cjs.map +3 -3
- package/dist/gltf/index.d.ts +2 -2
- package/dist/gltf/index.d.ts.map +1 -1
- package/dist/gltf/index.js.map +1 -1
- package/dist/gltf/parsers/parse-gltf.cjs +4 -2
- package/dist/gltf/parsers/parse-gltf.d.ts +3 -0
- package/dist/gltf/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/gltf/parsers/parse-gltf.js +7 -2
- package/dist/gltf/parsers/parse-gltf.js.map +1 -1
- package/dist/graph/models/index.cjs.map +2 -2
- package/dist/graph/physics/index.cjs +5 -0
- package/dist/graph/physics/index.cjs.map +3 -3
- package/dist/graph/physics/index.d.ts +1 -0
- package/dist/graph/physics/index.d.ts.map +1 -1
- package/dist/graph/physics/index.js +1 -0
- package/dist/graph/physics/index.js.map +1 -1
- package/dist/graph/physics/physics-controller-geometry.cjs +21 -0
- package/dist/graph/physics/physics-controller-geometry.d.ts +8 -1
- package/dist/graph/physics/physics-controller-geometry.d.ts.map +1 -1
- package/dist/graph/physics/physics-controller-geometry.js +22 -0
- package/dist/graph/physics/physics-controller-geometry.js.map +1 -1
- package/dist/graph/physics/scenegraph-session.d.ts +1 -1
- package/dist/graph/physics/scenegraph-session.d.ts.map +1 -1
- package/dist/graph/tables/index.cjs.map +2 -2
- package/dist/index.cjs +16 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lighting/ambient-occlusion-pass.cjs +47 -28
- package/dist/lighting/ambient-occlusion-pass.d.ts +12 -0
- package/dist/lighting/ambient-occlusion-pass.d.ts.map +1 -1
- package/dist/lighting/ambient-occlusion-pass.js +45 -26
- package/dist/lighting/ambient-occlusion-pass.js.map +1 -1
- package/dist/lighting/clustered-light-grid.cjs +71 -20
- package/dist/lighting/clustered-light-grid.d.ts +37 -0
- package/dist/lighting/clustered-light-grid.d.ts.map +1 -1
- package/dist/lighting/clustered-light-grid.js +68 -18
- package/dist/lighting/clustered-light-grid.js.map +1 -1
- package/dist/lighting/contact-shadow-composite.cjs +72 -51
- package/dist/lighting/contact-shadow-composite.d.ts +274 -3
- package/dist/lighting/contact-shadow-composite.d.ts.map +1 -1
- package/dist/lighting/contact-shadow-composite.js +72 -50
- package/dist/lighting/contact-shadow-composite.js.map +1 -1
- package/dist/lighting/contact-shadow-pass.cjs +50 -39
- package/dist/lighting/contact-shadow-pass.d.ts +8 -0
- package/dist/lighting/contact-shadow-pass.d.ts.map +1 -1
- package/dist/lighting/contact-shadow-pass.js +47 -37
- package/dist/lighting/contact-shadow-pass.js.map +1 -1
- package/dist/lighting/cortao/cortao-occluder-lookup-table.cjs +96 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.d.ts +41 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.js +94 -0
- package/dist/lighting/cortao/cortao-occluder-lookup-table.js.map +1 -0
- package/dist/lighting/cortao/cortao-parameters.cjs +127 -0
- package/dist/lighting/cortao/cortao-parameters.d.ts +95 -0
- package/dist/lighting/cortao/cortao-parameters.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-parameters.js +122 -0
- package/dist/lighting/cortao/cortao-parameters.js.map +1 -0
- package/dist/lighting/cortao/cortao-pass.cjs +100 -0
- package/dist/lighting/cortao/cortao-pass.d.ts +33 -0
- package/dist/lighting/cortao/cortao-pass.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-pass.js +84 -0
- package/dist/lighting/cortao/cortao-pass.js.map +1 -0
- package/dist/lighting/cortao/cortao-passes.cjs +42 -0
- package/dist/lighting/cortao/cortao-passes.d.ts +38 -0
- package/dist/lighting/cortao/cortao-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-passes.js +19 -0
- package/dist/lighting/cortao/cortao-passes.js.map +1 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.cjs +606 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.d.ts +49 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.js +610 -0
- package/dist/lighting/cortao/cortao-shaders-wgsl.js.map +1 -0
- package/dist/lighting/cortao/cortao-shaders.cjs +667 -0
- package/dist/lighting/cortao/cortao-shaders.d.ts +118 -0
- package/dist/lighting/cortao/cortao-shaders.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-shaders.js +657 -0
- package/dist/lighting/cortao/cortao-shaders.js.map +1 -0
- package/dist/lighting/cortao/cortao-upsample.cjs +191 -0
- package/dist/lighting/cortao/cortao-upsample.d.ts +16 -0
- package/dist/lighting/cortao/cortao-upsample.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-upsample.js +159 -0
- package/dist/lighting/cortao/cortao-upsample.js.map +1 -0
- package/dist/lighting/cortao/cortao-webgl-passes.cjs +229 -0
- package/dist/lighting/cortao/cortao-webgl-passes.d.ts +28 -0
- package/dist/lighting/cortao/cortao-webgl-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-webgl-passes.js +212 -0
- package/dist/lighting/cortao/cortao-webgl-passes.js.map +1 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.cjs +348 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.d.ts +31 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.d.ts.map +1 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.js +335 -0
- package/dist/lighting/cortao/cortao-webgpu-passes.js.map +1 -0
- package/dist/lighting/index.cjs +13 -2
- package/dist/lighting/index.cjs.map +3 -3
- package/dist/lighting/index.d.ts +11 -6
- package/dist/lighting/index.d.ts.map +1 -1
- package/dist/lighting/index.js +6 -5
- package/dist/lighting/index.js.map +1 -1
- package/dist/lighting/shadow-map-renderer.cjs +40 -37
- package/dist/lighting/shadow-map-renderer.d.ts +15 -0
- package/dist/lighting/shadow-map-renderer.d.ts.map +1 -1
- package/dist/lighting/shadow-map-renderer.js +37 -35
- package/dist/lighting/shadow-map-renderer.js.map +1 -1
- package/dist/model/gpu-vector-model.cjs +39 -16
- package/dist/model/gpu-vector-model.d.ts +8 -0
- package/dist/model/gpu-vector-model.d.ts.map +1 -1
- package/dist/model/gpu-vector-model.js +46 -18
- package/dist/model/gpu-vector-model.js.map +1 -1
- package/dist/passes/effect-renderer.cjs +155 -0
- package/dist/passes/effect-renderer.d.ts +158 -0
- package/dist/passes/effect-renderer.d.ts.map +1 -0
- package/dist/passes/effect-renderer.js +143 -0
- package/dist/passes/effect-renderer.js.map +1 -0
- package/dist/passes/scene-capture-pass.cjs +42 -0
- package/dist/passes/scene-capture-pass.d.ts +29 -0
- package/dist/passes/scene-capture-pass.d.ts.map +1 -0
- package/dist/passes/scene-capture-pass.js +21 -0
- package/dist/passes/scene-capture-pass.js.map +1 -0
- package/dist/passes/shader-pass-renderer.cjs +94 -68
- package/dist/passes/shader-pass-renderer.d.ts +32 -15
- package/dist/passes/shader-pass-renderer.d.ts.map +1 -1
- package/dist/passes/shader-pass-renderer.js +104 -76
- package/dist/passes/shader-pass-renderer.js.map +1 -1
- package/dist/scenegraph/model-node.cjs +2 -0
- package/dist/scenegraph/model-node.d.ts +4 -0
- package/dist/scenegraph/model-node.d.ts.map +1 -1
- package/dist/scenegraph/model-node.js +2 -0
- package/dist/scenegraph/model-node.js.map +1 -1
- package/dist/splats/gpu-paged-splat-renderer.cjs +52 -8
- package/dist/splats/gpu-paged-splat-renderer.d.ts +16 -3
- package/dist/splats/gpu-paged-splat-renderer.d.ts.map +1 -1
- package/dist/splats/gpu-paged-splat-renderer.js +55 -9
- package/dist/splats/gpu-paged-splat-renderer.js.map +1 -1
- package/dist/splats/gpu-paged-splat-shaders.cjs +3 -1
- package/dist/splats/gpu-paged-splat-shaders.d.ts.map +1 -1
- package/dist/splats/gpu-paged-splat-shaders.js +3 -1
- package/dist/splats/gpu-paged-splat-shaders.js.map +1 -1
- package/dist/splats/index.cjs.map +2 -2
- package/dist/text/fonts/atlas/browser-font-atlas.cjs +10 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts +3 -1
- package/dist/text/fonts/atlas/browser-font-atlas.d.ts.map +1 -1
- package/dist/text/fonts/atlas/browser-font-atlas.js +10 -2
- package/dist/text/fonts/atlas/browser-font-atlas.js.map +1 -1
- package/dist/text/fonts/atlas/lru-cache.cjs +4 -0
- package/dist/text/fonts/atlas/lru-cache.d.ts +3 -1
- package/dist/text/fonts/atlas/lru-cache.d.ts.map +1 -1
- package/dist/text/fonts/atlas/lru-cache.js +4 -0
- package/dist/text/fonts/atlas/lru-cache.js.map +1 -1
- package/dist/text/fonts/index.cjs +2 -0
- package/dist/text/fonts/index.cjs.map +1 -1
- package/dist/text/fonts/index.d.ts +1 -1
- package/dist/text/fonts/index.d.ts.map +1 -1
- package/dist/text/fonts/index.js +1 -1
- package/dist/text/fonts/index.js.map +1 -1
- package/dist/text/index.cjs.map +1 -1
- package/package.json +8 -8
- package/src/animation/animation-track.ts +5 -0
- package/src/animation/node-animation-binding.ts +9 -8
- package/src/animation/scenegraph-gpu-animation-layout.ts +195 -0
- package/src/animation/scenegraph-gpu-animation.ts +340 -0
- package/src/arrow/arrow-picking.ts +23 -11
- package/src/audio/audio-controller.ts +4 -1
- package/src/audio/audio-graph.ts +46 -25
- package/src/effects/README.md +38 -14
- package/src/effects/glfx-effects.ts +227 -0
- package/src/effects/graph/gpu-effect-operation.ts +601 -0
- package/src/effects/graph/temporal-graph-history.ts +46 -0
- package/src/effects/index.ts +81 -19
- package/src/effects/passes/postprocessing/fxaa/fxaa.ts +8 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/tone-mapping.ts +8 -0
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.ts +219 -19
- package/src/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.ts +6 -6
- package/src/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.ts +45 -45
- package/src/effects/passes/screen-space/clustered-volumetric-lighting.ts +88 -68
- package/src/effects/passes/screen-space/copy-pass.ts +4 -0
- package/src/effects/passes/screen-space/depth-aware-blur.ts +13 -3
- package/src/effects/passes/screen-space/dof.ts +20 -3
- package/src/effects/passes/screen-space/gtao.ts +91 -65
- package/src/effects/passes/screen-space/hdr-auto-exposure.ts +109 -84
- package/src/effects/passes/screen-space/height-fog.ts +18 -3
- package/src/effects/passes/screen-space/motion-blur.ts +8 -7
- package/src/effects/passes/screen-space/outlines.ts +143 -17
- package/src/effects/passes/screen-space/screen-space-global-illumination.ts +75 -64
- package/src/effects/passes/screen-space/screen-space-reflections.ts +158 -95
- package/src/effects/passes/screen-space/selection-outline.ts +11 -0
- package/src/effects/passes/screen-space/ssao.ts +79 -46
- package/src/effects/passes/screen-space/temporal-antialiasing.ts +43 -33
- package/src/effects/passes/screen-space/temporal-frame.ts +33 -0
- package/src/effects/passes/screen-space/volumetric-fog.ts +30 -24
- package/src/effects/temporal-upscale/index.ts +20 -0
- package/src/effects/temporal-upscale/temporal-math.ts +308 -0
- package/src/effects/temporal-upscale/temporal-upscale-shaders.ts +326 -0
- package/src/effects/temporal-upscale/temporal-upscaler.ts +538 -0
- package/src/experimental-controls.ts +13 -1
- package/src/experimental-materials.ts +37 -1
- package/src/experimental-textures.ts +9 -1
- package/src/experimental-webxr.ts +18 -1
- package/src/gltf/gltf/create-gltf-model.ts +59 -90
- package/src/gltf/gltf/create-scenegraph-from-gltf.ts +71 -5
- package/src/gltf/gltf/gltf-animated-crowd.ts +30 -177
- package/src/gltf/gltf/gltf-animation-nodes.ts +82 -0
- package/src/gltf/gltf/gltf-animator.ts +15 -4
- package/src/gltf/gltf/gltf-gpu-animation-controller.ts +88 -0
- package/src/gltf/gltf/gltf-gpu-animation.ts +53 -60
- package/src/gltf/index.ts +5 -0
- package/src/gltf/parsers/parse-gltf.ts +12 -2
- package/src/graph/physics/index.ts +4 -0
- package/src/graph/physics/physics-controller-geometry.ts +33 -1
- package/src/index.ts +25 -0
- package/src/lighting/ambient-occlusion-pass.ts +62 -28
- package/src/lighting/clustered-light-grid.ts +87 -30
- package/src/lighting/contact-shadow-composite.ts +80 -52
- package/src/lighting/contact-shadow-pass.ts +59 -39
- package/src/lighting/cortao/cortao-occluder-lookup-table.ts +138 -0
- package/src/lighting/cortao/cortao-parameters.ts +218 -0
- package/src/lighting/cortao/cortao-pass.ts +136 -0
- package/src/lighting/cortao/cortao-passes.ts +50 -0
- package/src/lighting/cortao/cortao-shaders-wgsl.ts +633 -0
- package/src/lighting/cortao/cortao-shaders.ts +674 -0
- package/src/lighting/cortao/cortao-upsample.ts +177 -0
- package/src/lighting/cortao/cortao-webgl-passes.ts +284 -0
- package/src/lighting/cortao/cortao-webgpu-passes.ts +430 -0
- package/src/lighting/index.ts +12 -3
- package/src/lighting/shadow-map-renderer.ts +57 -43
- package/src/model/gpu-vector-model.ts +47 -18
- package/src/passes/effect-renderer.ts +332 -0
- package/src/passes/scene-capture-pass.ts +51 -0
- package/src/passes/shader-pass-renderer.ts +164 -115
- package/src/scenegraph/model-node.ts +5 -0
- package/src/splats/README.md +1 -1
- package/src/splats/gpu-paged-splat-renderer.ts +77 -9
- package/src/splats/gpu-paged-splat-shaders.ts +7 -1
- package/src/text/fonts/atlas/browser-font-atlas.ts +12 -2
- package/src/text/fonts/atlas/lru-cache.ts +6 -1
- package/src/text/fonts/index.ts +1 -0
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -183,3 +183,85 @@ Full terms: [LicenseRef-LTC and paper citation](./src/lighting/LTC-LICENSE.txt).
|
|
|
183
183
|
## deck.gl-community glyph utilities
|
|
184
184
|
|
|
185
185
|
Copyright (c) 2020 vis.gl a Series of LF Projects, LLC. Glyph range utilities from [deck.gl-community](https://github.com/visgl/deck.gl-community) were adapted for engine font loading and atlas construction. Historical import revision unknown. Full terms: [deck.gl-community MIT license](./licenses/deck-community.txt).
|
|
186
|
+
|
|
187
|
+
## CORTAO
|
|
188
|
+
|
|
189
|
+
`src/lighting/cortao/` contains a port of CORTAO (Circular Occluder Ray-Traced Ambient Occlusion) by
|
|
190
|
+
Daniel Isheden.
|
|
191
|
+
|
|
192
|
+
- The shaders and the occluder lookup table generator are adapted from the CORTAO reference
|
|
193
|
+
implementation: https://github.com/theagentd/CORTAO
|
|
194
|
+
- The default parameters follow the Carbon Engine version of CORTAO:
|
|
195
|
+
https://github.com/carbonengine/CORTAO
|
|
196
|
+
|
|
197
|
+
Both projects use the MIT License. Their notices follow.
|
|
198
|
+
|
|
199
|
+
### CORTAO reference implementation
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
MIT License
|
|
203
|
+
|
|
204
|
+
Copyright (c) 2026 Daniel Isheden
|
|
205
|
+
|
|
206
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
207
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
208
|
+
in the Software without restriction, including without limitation the rights
|
|
209
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
210
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
211
|
+
furnished to do so, subject to the following conditions:
|
|
212
|
+
|
|
213
|
+
The above copyright notice and this permission notice shall be included in all
|
|
214
|
+
copies or substantial portions of the Software.
|
|
215
|
+
|
|
216
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
217
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
218
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
219
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
220
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
221
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
222
|
+
SOFTWARE.
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## CORTAO for the Carbon Engine
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
MIT License
|
|
229
|
+
|
|
230
|
+
Copyright (c) 2026 Fenris Creations
|
|
231
|
+
|
|
232
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
233
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
234
|
+
in the Software without restriction, including without limitation the rights
|
|
235
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
236
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
237
|
+
furnished to do so, subject to the following conditions:
|
|
238
|
+
|
|
239
|
+
The above copyright notice and this permission notice shall be included in all
|
|
240
|
+
copies or substantial portions of the Software.
|
|
241
|
+
|
|
242
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
243
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
244
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
245
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
246
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
247
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
248
|
+
SOFTWARE.
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
## FSR 2 temporal upscaling
|
|
253
|
+
|
|
254
|
+
AMD FidelityFX FSR2 v2.2.1 (MIT license).
|
|
255
|
+
|
|
256
|
+
Source: [FidelityFX FSR2](https://github.com/GPUOpen-Effects/FidelityFX-FSR2).
|
|
257
|
+
|
|
258
|
+
Revision: [v2.2.1](https://github.com/GPUOpen-Effects/FidelityFX-FSR2/releases/tag/v2.2.1).
|
|
259
|
+
|
|
260
|
+
Adaptation: `src/effects/temporal-upscale` is an independently authored implementation
|
|
261
|
+
inspired by FSR 2's dilation, reprojection, rectification, accumulation and RCAS
|
|
262
|
+
sharpening structure and jitter phase rule. No upstream shader source is copied.
|
|
263
|
+
The bounded contrast-adaptive sharpening weights are independently derived, not
|
|
264
|
+
an implementation of the upstream RCAS coefficients. This is architectural credit,
|
|
265
|
+
not a claim of feature or image-quality parity.
|
|
266
|
+
|
|
267
|
+
Upstream terms: [AMD MIT license](https://github.com/GPUOpen-Effects/FidelityFX-FSR2/blob/master/LICENSE.txt).
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { type AnimationInterpolation, type AnimationSampler, type AnimationValueType } from "./animation-interpolation.js";
|
|
2
|
+
import type { GroupNode } from "../scenegraph/group-node.js";
|
|
3
|
+
import type { NodePoseProperty } from "./node-animation-binding.js";
|
|
2
4
|
/** Read/write connection between an animation track and an application property. */
|
|
3
5
|
export type AnimationBinding = {
|
|
4
6
|
/** Stable identity used to blend tracks that address the same property. */
|
|
5
7
|
id?: string;
|
|
8
|
+
/** Resolved pose property that can be sampled into a GPU animation atlas. */
|
|
9
|
+
poseTarget?: {
|
|
10
|
+
node: GroupNode;
|
|
11
|
+
property: NodePoseProperty;
|
|
12
|
+
};
|
|
6
13
|
/** Reads the unanimated property value when an action has less than full influence. */
|
|
7
14
|
getValue?: () => readonly number[];
|
|
8
15
|
/** Applies an interpolated or blended property value. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation-track.d.ts","sourceRoot":"","sources":["../../src/animation/animation-track.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,qCAAkC;AAEnC,oFAAoF;AACpF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,2EAA2E;IAC3E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,SAAS,MAAM,EAAE,CAAC;IACnC,yDAAyD;IACzD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,6DAA6D;AAC7D,MAAM,MAAM,mBAAmB,GAAG;IAChC,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,+EAA+E;IAC/E,MAAM,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IACvC,gDAAgD;IAChD,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,mEAAmE;IACnE,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEF,2EAA2E;AAC3E,qBAAa,cAAc;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CA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kCAAkC;IAClC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,+EAA+E;IAC/E,MAAM,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IACvC,gDAAgD;IAChD,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,mEAAmE;IACnE,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,wDAAwD;IACxD,OAAO,EAAE,gBAAgB,CAAC;CAC3B,CAAC;AAEF,2EAA2E;AAC3E,qBAAa,cAAc;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IAChD,QAAQ,CAAC,aAAa,EAAE,sBAAsB,CAAC;IAC/C,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;gBAEvB,KAAK,EAAE,mBAAmB;IAStC,sCAAsC;IACtC,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,oEAAoE;IACpE,IAAI,OAAO,IAAI,gBAAgB,CAE9B;IAED,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;CAGxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation-track.js","sourceRoot":"","sources":["../../src/animation/animation-track.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EACL,wBAAwB,EAIzB,qCAAkC;
|
|
1
|
+
{"version":3,"file":"animation-track.js","sourceRoot":"","sources":["../../src/animation/animation-track.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EACL,wBAAwB,EAIzB,qCAAkC;AAiCnC,2EAA2E;AAC3E,MAAM,OAAO,cAAc;IAChB,IAAI,CAAS;IACb,KAAK,CAAoB;IACzB,MAAM,CAAiC;IACvC,aAAa,CAAyB;IACtC,SAAS,CAAqB;IAC9B,OAAO,CAAmB;IAEnC,YAAY,KAA0B;QACpC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,SAAS,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,IAAI,QAAQ,CAAC;QACrD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,QAAQ,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,sCAAsC;IACtC,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,oEAAoE;IACpE,IAAI,OAAO;QACT,OAAO,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAC,CAAC;IACrF,CAAC;IAED,wEAAwE;IACxE,QAAQ,CAAC,IAAY;QACnB,OAAO,wBAAwB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC;CACF"}
|
|
@@ -24,6 +24,7 @@ var import_morph_controller = require("../scenegraph/controllers/morph-controlle
|
|
|
24
24
|
function makeNodeAnimationBinding(node, property, options = {}) {
|
|
25
25
|
return {
|
|
26
26
|
id: options.id,
|
|
27
|
+
...property === "translation" || property === "rotation" || property === "scale" || property === "weights" ? { poseTarget: { node, property } } : {},
|
|
27
28
|
getValue: () => {
|
|
28
29
|
switch (property) {
|
|
29
30
|
case "translation":
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AnimationBinding } from "./animation-track.js";
|
|
2
2
|
import type { GroupNode } from "../scenegraph/group-node.js";
|
|
3
|
-
export type
|
|
3
|
+
export type NodePoseProperty = 'translation' | 'rotation' | 'scale' | 'weights';
|
|
4
|
+
export type NodeAnimationProperty = NodePoseProperty | 'visibility' | 'selectable' | 'hoverable';
|
|
4
5
|
/** Bind a property once to a node reference; playback does not resolve asset IDs. */
|
|
5
6
|
export declare function makeNodeAnimationBinding(node: GroupNode, property: NodeAnimationProperty, options?: {
|
|
6
7
|
id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-animation-binding.d.ts","sourceRoot":"","sources":["../../src/animation/node-animation-binding.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAC,6BAA0B;AACxD,OAAO,KAAK,EAAC,SAAS,EAAC,oCAAiC;AAGxD,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"node-animation-binding.d.ts","sourceRoot":"","sources":["../../src/animation/node-animation-binding.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAC,6BAA0B;AACxD,OAAO,KAAK,EAAC,SAAS,EAAC,oCAAiC;AAGxD,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AAEhF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,CAAC;AAEjG,qFAAqF;AACrF,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,GAAE;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAAM,GAC3D,gBAAgB,CAsDlB"}
|
|
@@ -6,6 +6,12 @@ import { setMorphWeights } from "../scenegraph/controllers/morph-controller.js";
|
|
|
6
6
|
export function makeNodeAnimationBinding(node, property, options = {}) {
|
|
7
7
|
return {
|
|
8
8
|
id: options.id,
|
|
9
|
+
...(property === 'translation' ||
|
|
10
|
+
property === 'rotation' ||
|
|
11
|
+
property === 'scale' ||
|
|
12
|
+
property === 'weights'
|
|
13
|
+
? { poseTarget: { node, property } }
|
|
14
|
+
: {}),
|
|
9
15
|
getValue: () => {
|
|
10
16
|
switch (property) {
|
|
11
17
|
case 'translation':
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-animation-binding.js","sourceRoot":"","sources":["../../src/animation/node-animation-binding.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAI5D,OAAO,EAAC,eAAe,EAAC,sDAAmD;
|
|
1
|
+
{"version":3,"file":"node-animation-binding.js","sourceRoot":"","sources":["../../src/animation/node-animation-binding.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAI5D,OAAO,EAAC,eAAe,EAAC,sDAAmD;AAM3E,qFAAqF;AACrF,MAAM,UAAU,wBAAwB,CACtC,IAAe,EACf,QAA+B,EAC/B,UAA0D,EAAE;IAE5D,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,GAAG,CAAC,QAAQ,KAAK,aAAa;YAC9B,QAAQ,KAAK,UAAU;YACvB,QAAQ,KAAK,OAAO;YACpB,QAAQ,KAAK,SAAS;YACpB,CAAC,CAAC,EAAC,UAAU,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAC;YAChC,CAAC,CAAC,EAAE,CAAC;QACP,QAAQ,EAAE,GAAG,EAAE;YACb,QAAQ,QAAQ,EAAE,CAAC;gBACjB,KAAK,aAAa;oBAChB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,C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C,CAAC;oBAC5C,MAAM;gBACR,KAAK,WAAW;oBACd,IAAI,CAAC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC;oBAC3C,MAAM;gBACR,KAAK,YAAY;oBACf,IAAI,CAAC,QAAQ,CAAC,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC;oBACzC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;oBAC/B,MAAM;YACV,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var scenegraph_gpu_animation_layout_exports = {};
|
|
19
|
+
__export(scenegraph_gpu_animation_layout_exports, {
|
|
20
|
+
getScenegraphGPUAnimationFrameStride: () => getScenegraphGPUAnimationFrameStride,
|
|
21
|
+
getScenegraphGPUAnimationFrames: () => getScenegraphGPUAnimationFrames,
|
|
22
|
+
planScenegraphGPUAnimation: () => planScenegraphGPUAnimation
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(scenegraph_gpu_animation_layout_exports);
|
|
25
|
+
function planScenegraphGPUAnimation(timings, primitives, options = {}, device) {
|
|
26
|
+
const reject = (fallbackReason, estimatedByteLength2 = 0) => ({ layout: null, estimatedByteLength: estimatedByteLength2, fallbackReason });
|
|
27
|
+
if (options.enabled === false) {
|
|
28
|
+
return reject("disabled");
|
|
29
|
+
}
|
|
30
|
+
if (!timings.length) {
|
|
31
|
+
return reject("no-animations");
|
|
32
|
+
}
|
|
33
|
+
const sampleRate = options.sampleRate ?? 30;
|
|
34
|
+
const maxFrames = options.maxFrames ?? 8192;
|
|
35
|
+
const maxBytes = options.maxBytes ?? 64 * 1024 * 1024;
|
|
36
|
+
if (!Number.isFinite(sampleRate) || sampleRate <= 0 || !Number.isSafeInteger(maxFrames) || maxFrames <= 0 || !Number.isSafeInteger(maxBytes) || maxBytes <= 0) {
|
|
37
|
+
return reject("invalid-options");
|
|
38
|
+
}
|
|
39
|
+
if (new Set(timings.map((timing) => timing.name)).size !== timings.length) {
|
|
40
|
+
return reject("unsupported-scene");
|
|
41
|
+
}
|
|
42
|
+
let frameCount = 0;
|
|
43
|
+
const clips = [];
|
|
44
|
+
for (const { name, duration } of timings) {
|
|
45
|
+
if (!Number.isFinite(duration) || duration < 0) {
|
|
46
|
+
return reject("invalid-animation");
|
|
47
|
+
}
|
|
48
|
+
const clipFrameCount = Math.max(1, Math.ceil(duration * sampleRate) + 1);
|
|
49
|
+
if (!Number.isSafeInteger(clipFrameCount) || frameCount + clipFrameCount > maxFrames) {
|
|
50
|
+
return reject("frame-budget");
|
|
51
|
+
}
|
|
52
|
+
clips.push({
|
|
53
|
+
name,
|
|
54
|
+
duration,
|
|
55
|
+
frameOffset: frameCount,
|
|
56
|
+
frameCount: clipFrameCount
|
|
57
|
+
});
|
|
58
|
+
frameCount += clipFrameCount;
|
|
59
|
+
}
|
|
60
|
+
let estimatedByteLength = 0;
|
|
61
|
+
let maximumAtlasByteLength = 0;
|
|
62
|
+
let maximumFrameStride = 0;
|
|
63
|
+
for (const { jointCount, morphTargetCount, count = 1 } of primitives) {
|
|
64
|
+
if (!Number.isSafeInteger(jointCount) || jointCount < 0 || !Number.isSafeInteger(morphTargetCount) || morphTargetCount < 0 || !Number.isSafeInteger(count) || count < 1) {
|
|
65
|
+
return reject("invalid-options");
|
|
66
|
+
}
|
|
67
|
+
const frameStride = getScenegraphGPUAnimationFrameStride(jointCount, morphTargetCount);
|
|
68
|
+
const atlasByteLength = frameCount * frameStride * 16;
|
|
69
|
+
maximumFrameStride = Math.max(maximumFrameStride, frameStride);
|
|
70
|
+
maximumAtlasByteLength = Math.max(maximumAtlasByteLength, atlasByteLength);
|
|
71
|
+
estimatedByteLength += atlasByteLength * count;
|
|
72
|
+
}
|
|
73
|
+
if (!Number.isSafeInteger(estimatedByteLength) || estimatedByteLength > maxBytes) {
|
|
74
|
+
return reject("byte-budget", estimatedByteLength);
|
|
75
|
+
}
|
|
76
|
+
if ((device == null ? void 0 : device.type) === "webgpu") {
|
|
77
|
+
if (maximumAtlasByteLength > Math.min(device.limits.maxBufferSize, device.limits.maxStorageBufferBindingSize)) {
|
|
78
|
+
return reject("buffer-limit", estimatedByteLength);
|
|
79
|
+
}
|
|
80
|
+
} else if (device && (maximumFrameStride > device.limits.maxTextureDimension2D || frameCount > device.limits.maxTextureDimension2D)) {
|
|
81
|
+
return reject("texture-limit", estimatedByteLength);
|
|
82
|
+
}
|
|
83
|
+
return { layout: { sampleRate, frameCount, clips }, estimatedByteLength };
|
|
84
|
+
}
|
|
85
|
+
function getScenegraphGPUAnimationFrameStride(jointCount, morphTargetCount) {
|
|
86
|
+
return 4 + jointCount * 4 + morphTargetCount;
|
|
87
|
+
}
|
|
88
|
+
function getScenegraphGPUAnimationFrames(clip, time, sampleRate) {
|
|
89
|
+
const frame = Math.min(Math.max(time, 0) * sampleRate, clip.frameCount - 1);
|
|
90
|
+
const firstFrame = Math.floor(frame);
|
|
91
|
+
const secondFrame = Math.min(firstFrame + 1, clip.frameCount - 1);
|
|
92
|
+
return [clip.frameOffset + firstFrame, clip.frameOffset + secondFrame, frame - firstFrame];
|
|
93
|
+
}
|
|
94
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
95
|
+
0 && (module.exports = {
|
|
96
|
+
getScenegraphGPUAnimationFrameStride,
|
|
97
|
+
getScenegraphGPUAnimationFrames,
|
|
98
|
+
planScenegraphGPUAnimation
|
|
99
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { Device } from '@luma.gl/core';
|
|
2
|
+
/** Optional one-time animation baking followed by GPU vertex-stage sampling. */
|
|
3
|
+
export type ScenegraphGPUAnimationOptions = {
|
|
4
|
+
/** Enables GPU sampling without changing the established CPU-animation default. */
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
/** Number of baked poses per second. Defaults to 30. */
|
|
7
|
+
sampleRate?: number;
|
|
8
|
+
/** Maximum combined baked frames before gracefully retaining CPU animation. Defaults to 8192. */
|
|
9
|
+
maxFrames?: number;
|
|
10
|
+
/** Maximum estimated GPU atlas bytes across primitives. Defaults to 64 MiB. */
|
|
11
|
+
maxBytes?: number;
|
|
12
|
+
};
|
|
13
|
+
/** Runtime diagnostics for baked skeletal and morph playback. */
|
|
14
|
+
export type ScenegraphGPUAnimationStats = {
|
|
15
|
+
mode: 'cpu' | 'gpu';
|
|
16
|
+
sampleRate?: number;
|
|
17
|
+
frameCount: number;
|
|
18
|
+
clipCount: number;
|
|
19
|
+
morphGroupCount: number;
|
|
20
|
+
/** Conservative GPU atlas byte estimate; CPU staging requires the same amount again. */
|
|
21
|
+
estimatedByteLength: number;
|
|
22
|
+
/** Present only when an explicitly requested GPU path retained CPU playback. */
|
|
23
|
+
fallbackReason?: ScenegraphGPUAnimationFallbackReason;
|
|
24
|
+
};
|
|
25
|
+
/** One named clip stored inside a shared frame-address space. */
|
|
26
|
+
export type ScenegraphGPUAnimationClip = {
|
|
27
|
+
name: string;
|
|
28
|
+
duration: number;
|
|
29
|
+
frameOffset: number;
|
|
30
|
+
frameCount: number;
|
|
31
|
+
};
|
|
32
|
+
/** Immutable baked-frame layout shared by all actor draw groups. */
|
|
33
|
+
export type ScenegraphGPUAnimationLayout = {
|
|
34
|
+
sampleRate: number;
|
|
35
|
+
frameCount: number;
|
|
36
|
+
clips: readonly ScenegraphGPUAnimationClip[];
|
|
37
|
+
};
|
|
38
|
+
/** Reason an explicitly requested baked animation path retained CPU playback. */
|
|
39
|
+
export type ScenegraphGPUAnimationFallbackReason = 'disabled' | 'no-animations' | 'invalid-options' | 'invalid-animation' | 'frame-budget' | 'byte-budget' | 'texture-limit' | 'buffer-limit' | 'unsupported-scene';
|
|
40
|
+
/** Allocation preflight, before scenegraph construction creates any baked resources. */
|
|
41
|
+
export type ScenegraphGPUAnimationPlan = {
|
|
42
|
+
layout: ScenegraphGPUAnimationLayout | null;
|
|
43
|
+
estimatedByteLength: number;
|
|
44
|
+
fallbackReason?: ScenegraphGPUAnimationFallbackReason;
|
|
45
|
+
};
|
|
46
|
+
type ScenegraphGPUAnimationDevice = Pick<Device, 'type' | 'limits'>;
|
|
47
|
+
/** Baked pose configuration passed by a scene adapter to its primitive model factory. */
|
|
48
|
+
export type ScenegraphGPUAnimationModelOptions = {
|
|
49
|
+
layout: ScenegraphGPUAnimationLayout;
|
|
50
|
+
jointCount: number;
|
|
51
|
+
};
|
|
52
|
+
/** Inputs resolved by the caller before allocating a frame atlas. */
|
|
53
|
+
export type ScenegraphGPUAnimationClipTiming = {
|
|
54
|
+
name: string;
|
|
55
|
+
duration: number;
|
|
56
|
+
};
|
|
57
|
+
export type ScenegraphGPUAnimationPrimitiveLayout = {
|
|
58
|
+
jointCount: number;
|
|
59
|
+
morphTargetCount: number;
|
|
60
|
+
count?: number;
|
|
61
|
+
};
|
|
62
|
+
/** Bounds GPU atlases and their CPU staging arrays before any allocation. */
|
|
63
|
+
export declare function planScenegraphGPUAnimation(timings: readonly ScenegraphGPUAnimationClipTiming[], primitives: readonly ScenegraphGPUAnimationPrimitiveLayout[], options?: ScenegraphGPUAnimationOptions, device?: ScenegraphGPUAnimationDevice): ScenegraphGPUAnimationPlan;
|
|
64
|
+
/** Number of RGBA texels per pose, shared by WebGPU buffers and WebGL textures. */
|
|
65
|
+
export declare function getScenegraphGPUAnimationFrameStride(jointCount: number, morphTargetCount: number): number;
|
|
66
|
+
/** Resolves adjacent baked frames while retaining interpolation on the GPU. */
|
|
67
|
+
export declare function getScenegraphGPUAnimationFrames(clip: ScenegraphGPUAnimationClip, time: number, sampleRate: number): readonly [number, number, number];
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=scenegraph-gpu-animation-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenegraph-gpu-animation-layout.d.ts","sourceRoot":"","sources":["../../src/animation/scenegraph-gpu-animation-layout.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAE1C,gFAAgF;AAChF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,mFAAmF;IACnF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,iEAAiE;AACjE,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gFAAgF;IAChF,cAAc,CAAC,EAAE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AAS,gCAAgC,EAAE,EACpD,UAAU,EAAE,SAAS,qCAAqC,EAAE,EAC5D,OAAO,GAAE,6BAAkC,EAC3C,MAAM,CAAC,EAAE,4BAA4B,GACpC,0BAA0B,CAuF5B;AAED,mFAAmF;AACnF,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,MAAM,GACvB,MAAM,CAER;AAED,+EAA+E;AAC/E,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,0BAA0B,EAChC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GACjB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAKnC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
/** Bounds GPU atlases and their CPU staging arrays before any allocation. */
|
|
5
|
+
export function planScenegraphGPUAnimation(timings, primitives, options = {}, device) {
|
|
6
|
+
const reject = (fallbackReason, estimatedByteLength = 0) => ({ layout: null, estimatedByteLength, fallbackReason });
|
|
7
|
+
if (options.enabled === false) {
|
|
8
|
+
return reject('disabled');
|
|
9
|
+
}
|
|
10
|
+
if (!timings.length) {
|
|
11
|
+
return reject('no-animations');
|
|
12
|
+
}
|
|
13
|
+
const sampleRate = options.sampleRate ?? 30;
|
|
14
|
+
const maxFrames = options.maxFrames ?? 8192;
|
|
15
|
+
const maxBytes = options.maxBytes ?? 64 * 1024 * 1024;
|
|
16
|
+
if (!Number.isFinite(sampleRate) ||
|
|
17
|
+
sampleRate <= 0 ||
|
|
18
|
+
!Number.isSafeInteger(maxFrames) ||
|
|
19
|
+
maxFrames <= 0 ||
|
|
20
|
+
!Number.isSafeInteger(maxBytes) ||
|
|
21
|
+
maxBytes <= 0) {
|
|
22
|
+
return reject('invalid-options');
|
|
23
|
+
}
|
|
24
|
+
if (new Set(timings.map(timing => timing.name)).size !== timings.length) {
|
|
25
|
+
return reject('unsupported-scene');
|
|
26
|
+
}
|
|
27
|
+
let frameCount = 0;
|
|
28
|
+
const clips = [];
|
|
29
|
+
for (const { name, duration } of timings) {
|
|
30
|
+
if (!Number.isFinite(duration) || duration < 0) {
|
|
31
|
+
return reject('invalid-animation');
|
|
32
|
+
}
|
|
33
|
+
const clipFrameCount = Math.max(1, Math.ceil(duration * sampleRate) + 1);
|
|
34
|
+
if (!Number.isSafeInteger(clipFrameCount) || frameCount + clipFrameCount > maxFrames) {
|
|
35
|
+
return reject('frame-budget');
|
|
36
|
+
}
|
|
37
|
+
clips.push({
|
|
38
|
+
name,
|
|
39
|
+
duration,
|
|
40
|
+
frameOffset: frameCount,
|
|
41
|
+
frameCount: clipFrameCount
|
|
42
|
+
});
|
|
43
|
+
frameCount += clipFrameCount;
|
|
44
|
+
}
|
|
45
|
+
let estimatedByteLength = 0;
|
|
46
|
+
let maximumAtlasByteLength = 0;
|
|
47
|
+
let maximumFrameStride = 0;
|
|
48
|
+
for (const { jointCount, morphTargetCount, count = 1 } of primitives) {
|
|
49
|
+
if (!Number.isSafeInteger(jointCount) ||
|
|
50
|
+
jointCount < 0 ||
|
|
51
|
+
!Number.isSafeInteger(morphTargetCount) ||
|
|
52
|
+
morphTargetCount < 0 ||
|
|
53
|
+
!Number.isSafeInteger(count) ||
|
|
54
|
+
count < 1) {
|
|
55
|
+
return reject('invalid-options');
|
|
56
|
+
}
|
|
57
|
+
const frameStride = getScenegraphGPUAnimationFrameStride(jointCount, morphTargetCount);
|
|
58
|
+
const atlasByteLength = frameCount * frameStride * 16;
|
|
59
|
+
maximumFrameStride = Math.max(maximumFrameStride, frameStride);
|
|
60
|
+
maximumAtlasByteLength = Math.max(maximumAtlasByteLength, atlasByteLength);
|
|
61
|
+
estimatedByteLength += atlasByteLength * count;
|
|
62
|
+
}
|
|
63
|
+
if (!Number.isSafeInteger(estimatedByteLength) || estimatedByteLength > maxBytes) {
|
|
64
|
+
return reject('byte-budget', estimatedByteLength);
|
|
65
|
+
}
|
|
66
|
+
if (device?.type === 'webgpu') {
|
|
67
|
+
if (maximumAtlasByteLength >
|
|
68
|
+
Math.min(device.limits.maxBufferSize, device.limits.maxStorageBufferBindingSize)) {
|
|
69
|
+
return reject('buffer-limit', estimatedByteLength);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else if (device &&
|
|
73
|
+
(maximumFrameStride > device.limits.maxTextureDimension2D ||
|
|
74
|
+
frameCount > device.limits.maxTextureDimension2D)) {
|
|
75
|
+
return reject('texture-limit', estimatedByteLength);
|
|
76
|
+
}
|
|
77
|
+
return { layout: { sampleRate, frameCount, clips }, estimatedByteLength };
|
|
78
|
+
}
|
|
79
|
+
/** Number of RGBA texels per pose, shared by WebGPU buffers and WebGL textures. */
|
|
80
|
+
export function getScenegraphGPUAnimationFrameStride(jointCount, morphTargetCount) {
|
|
81
|
+
return 4 + jointCount * 4 + morphTargetCount;
|
|
82
|
+
}
|
|
83
|
+
/** Resolves adjacent baked frames while retaining interpolation on the GPU. */
|
|
84
|
+
export function getScenegraphGPUAnimationFrames(clip, time, sampleRate) {
|
|
85
|
+
const frame = Math.min(Math.max(time, 0) * sampleRate, clip.frameCount - 1);
|
|
86
|
+
const firstFrame = Math.floor(frame);
|
|
87
|
+
const secondFrame = Math.min(firstFrame + 1, clip.frameCount - 1);
|
|
88
|
+
return [clip.frameOffset + firstFrame, clip.frameOffset + secondFrame, frame - firstFrame];
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=scenegraph-gpu-animation-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scenegraph-gpu-animation-layout.js","sourceRoot":"","sources":["../../src/animation/scenegraph-gpu-animation-layout.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AA+E5D,6EAA6E;AAC7E,MAAM,UAAU,0BAA0B,CACxC,OAAoD,EACpD,UAA4D,EAC5D,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