@luma.gl/engine 10.0.0-alpha.8 → 10.0.0-beta.1
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/LICENSE +4 -4
- package/THIRD-PARTY-NOTICES.md +185 -0
- package/dist/animation/node-animation-binding.cjs +10 -0
- package/dist/animation/node-animation-binding.d.ts +1 -1
- package/dist/animation/node-animation-binding.d.ts.map +1 -1
- package/dist/animation/node-animation-binding.js +10 -0
- package/dist/animation/node-animation-binding.js.map +1 -1
- package/dist/arrow/index.cjs +5 -0
- package/dist/arrow/index.cjs.map +3 -3
- package/dist/arrow/index.d.ts +1 -0
- package/dist/arrow/index.d.ts.map +1 -1
- package/dist/arrow/index.js +1 -0
- package/dist/arrow/index.js.map +1 -1
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.cjs +161 -0
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.d.ts +34 -0
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.d.ts.map +1 -0
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.js +164 -0
- package/dist/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.js.map +1 -0
- package/dist/arrow/renderers/text/renderers/arrow-text-renderer.d.ts +1 -1
- package/dist/arrow/renderers/text/renderers/arrow-text-renderer.d.ts.map +1 -1
- package/dist/arrow/renderers/text/renderers/arrow-text-renderer.js.map +1 -1
- package/dist/arrow/renderers/text/renderers/arrow-text-shaders.cjs +10 -1
- package/dist/arrow/renderers/text/renderers/arrow-text-shaders.d.ts.map +1 -1
- package/dist/arrow/renderers/text/renderers/arrow-text-shaders.js +10 -3
- package/dist/arrow/renderers/text/renderers/arrow-text-shaders.js.map +1 -1
- package/dist/compute/computation.cjs +1 -1
- package/dist/compute/computation.js +1 -1
- package/dist/compute/computation.js.map +1 -1
- package/dist/compute/swap.d.ts +2 -2
- package/dist/compute/swap.d.ts.map +1 -1
- package/dist/compute/swap.js.map +1 -1
- package/dist/dist.dev.js +1149 -657
- package/dist/dist.min.js +76 -69
- package/dist/dynamic-texture/video-texture.cjs +1 -1
- package/dist/dynamic-texture/video-texture.d.ts +3 -3
- package/dist/dynamic-texture/video-texture.d.ts.map +1 -1
- package/dist/dynamic-texture/video-texture.js +1 -1
- package/dist/dynamic-texture/video-texture.js.map +1 -1
- package/dist/effects/index.cjs.map +1 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js +2 -1
- package/dist/effects/passes/postprocessing/fxaa/fxaa.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.js +2 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.js +2 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/denoise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.js +2 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/huesaturation.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.js +2 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/noise.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.js +2 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/sepia.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.js +2 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/vibrance.js.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.d.ts.map +1 -1
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.js +2 -0
- package/dist/effects/passes/postprocessing/image-adjust-filters/vignette.js.map +1 -1
- package/dist/geometry/gpu-vector-geometry-adapter.cjs +14 -0
- package/dist/geometry/gpu-vector-geometry-adapter.d.ts +7 -0
- package/dist/geometry/gpu-vector-geometry-adapter.d.ts.map +1 -1
- package/dist/geometry/gpu-vector-geometry-adapter.js +17 -0
- package/dist/geometry/gpu-vector-geometry-adapter.js.map +1 -1
- package/dist/geometry/gpu-vector-geometry.cjs +3 -0
- package/dist/geometry/gpu-vector-geometry.d.ts +2 -0
- package/dist/geometry/gpu-vector-geometry.d.ts.map +1 -1
- package/dist/geometry/gpu-vector-geometry.js +2 -0
- package/dist/geometry/gpu-vector-geometry.js.map +1 -1
- package/dist/gltf/gltf/animations/animations.d.ts +1 -1
- package/dist/gltf/gltf/animations/animations.d.ts.map +1 -1
- package/dist/gltf/gltf/create-gltf-model.cjs +3 -0
- package/dist/gltf/gltf/create-gltf-model.d.ts.map +1 -1
- package/dist/gltf/gltf/create-gltf-model.js +4 -0
- package/dist/gltf/gltf/create-gltf-model.js.map +1 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.cjs +80 -12
- package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts +8 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts.map +1 -1
- package/dist/gltf/gltf/create-scenegraph-from-gltf.js +82 -14
- package/dist/gltf/gltf/create-scenegraph-from-gltf.js.map +1 -1
- package/dist/gltf/gltf/gltf-billboard.cjs +6 -1
- package/dist/gltf/gltf/gltf-billboard.d.ts.map +1 -1
- package/dist/gltf/gltf/gltf-billboard.js +6 -1
- package/dist/gltf/gltf/gltf-billboard.js.map +1 -1
- package/dist/gltf/gltf/gltf-extension-support.cjs +2 -2
- package/dist/gltf/gltf/gltf-extension-support.js +2 -2
- package/dist/gltf/gltf/gltf-extension-support.js.map +1 -1
- package/dist/gltf/index.cjs +2 -0
- 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 +1 -1
- package/dist/gltf/index.js.map +1 -1
- package/dist/gltf/parsers/parse-gltf-animations.cjs +8 -5
- package/dist/gltf/parsers/parse-gltf-animations.js +20 -5
- package/dist/gltf/parsers/parse-gltf-animations.js.map +1 -1
- package/dist/gltf/parsers/parse-gltf-lights.cjs +36 -72
- package/dist/gltf/parsers/parse-gltf-lights.d.ts +6 -2
- package/dist/gltf/parsers/parse-gltf-lights.d.ts.map +1 -1
- package/dist/gltf/parsers/parse-gltf-lights.js +34 -91
- package/dist/gltf/parsers/parse-gltf-lights.js.map +1 -1
- package/dist/gltf/parsers/parse-gltf-metadata.cjs +60 -0
- package/dist/gltf/parsers/parse-gltf-metadata.d.ts +5 -0
- package/dist/gltf/parsers/parse-gltf-metadata.d.ts.map +1 -0
- package/dist/gltf/parsers/parse-gltf-metadata.js +39 -0
- package/dist/gltf/parsers/parse-gltf-metadata.js.map +1 -0
- package/dist/gltf/parsers/parse-gltf.cjs +23 -14
- package/dist/gltf/parsers/parse-gltf.d.ts +12 -2
- package/dist/gltf/parsers/parse-gltf.d.ts.map +1 -1
- package/dist/gltf/parsers/parse-gltf.js +21 -13
- package/dist/gltf/parsers/parse-gltf.js.map +1 -1
- package/dist/gltf/parsers/parse-pbr-material.cjs +13 -3
- package/dist/gltf/parsers/parse-pbr-material.d.ts +7 -2
- package/dist/gltf/parsers/parse-pbr-material.d.ts.map +1 -1
- package/dist/gltf/parsers/parse-pbr-material.js +17 -5
- package/dist/gltf/parsers/parse-pbr-material.js.map +1 -1
- package/dist/gltf/parsers/post-process-gltf.cjs +1 -0
- package/dist/gltf/parsers/post-process-gltf.d.ts.map +1 -1
- package/dist/gltf/parsers/post-process-gltf.js +1 -0
- package/dist/gltf/parsers/post-process-gltf.js.map +1 -1
- package/dist/gltf/pbr/pbr-environment.cjs +21 -3
- package/dist/gltf/pbr/pbr-environment.d.ts +3 -0
- package/dist/gltf/pbr/pbr-environment.d.ts.map +1 -1
- package/dist/gltf/pbr/pbr-environment.js +19 -1
- package/dist/gltf/pbr/pbr-environment.js.map +1 -1
- package/dist/gltf/pbr/pbr-material.d.ts +3 -3
- package/dist/gltf/pbr/pbr-material.d.ts.map +1 -1
- package/dist/gltf/types/gltf-json-schema.d.ts.map +1 -1
- package/dist/gltf/types/gltf-json-schema.js +1 -0
- package/dist/gltf/types/gltf-json-schema.js.map +1 -1
- package/dist/gltf/types/gltf-postprocessed-schema.d.ts +2 -0
- package/dist/gltf/types/gltf-postprocessed-schema.d.ts.map +1 -1
- package/dist/gltf/types/gltf-postprocessed-schema.js +1 -0
- package/dist/gltf/types/gltf-postprocessed-schema.js.map +1 -1
- package/dist/gltf/types/gltf-types.d.ts +19 -0
- package/dist/gltf/types/gltf-types.d.ts.map +1 -1
- package/dist/graph/models/index.cjs.map +1 -1
- package/dist/graph/models/path/path-attribute-model.cjs +4 -1
- package/dist/graph/models/path/path-attribute-model.d.ts +3 -1
- package/dist/graph/models/path/path-attribute-model.d.ts.map +1 -1
- package/dist/graph/models/path/path-attribute-model.js +6 -1
- package/dist/graph/models/path/path-attribute-model.js.map +1 -1
- package/dist/graph/models/path/path-storage-model.cjs +4 -1
- package/dist/graph/models/path/path-storage-model.d.ts +3 -1
- package/dist/graph/models/path/path-storage-model.d.ts.map +1 -1
- package/dist/graph/models/path/path-storage-model.js +6 -1
- package/dist/graph/models/path/path-storage-model.js.map +1 -1
- package/dist/graph/physics/index.cjs.map +2 -2
- package/dist/graph/physics/physics-controller.cjs +42 -0
- package/dist/graph/physics/physics-controller.d.ts +12 -1
- package/dist/graph/physics/physics-controller.d.ts.map +1 -1
- package/dist/graph/physics/physics-controller.js +41 -0
- package/dist/graph/physics/physics-controller.js.map +1 -1
- package/dist/graph/physics/scenegraph-instance.cjs +7 -0
- package/dist/graph/physics/scenegraph-instance.d.ts.map +1 -1
- package/dist/graph/physics/scenegraph-instance.js +8 -0
- package/dist/graph/physics/scenegraph-instance.js.map +1 -1
- package/dist/graph/tables/gpu-table-model.cjs +2 -2
- package/dist/graph/tables/gpu-table-model.d.ts +2 -1
- package/dist/graph/tables/gpu-table-model.d.ts.map +1 -1
- package/dist/graph/tables/gpu-table-model.js +2 -2
- package/dist/graph/tables/gpu-table-model.js.map +1 -1
- package/dist/graph/tables/index.cjs.map +1 -1
- 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 +126 -0
- package/dist/lighting/ambient-occlusion-pass.d.ts +31 -0
- package/dist/lighting/ambient-occlusion-pass.d.ts.map +1 -0
- package/dist/lighting/ambient-occlusion-pass.js +108 -0
- package/dist/lighting/ambient-occlusion-pass.js.map +1 -0
- package/dist/lighting/clustered-light-grid.cjs +378 -0
- package/dist/lighting/clustered-light-grid.d.ts +94 -0
- package/dist/lighting/clustered-light-grid.d.ts.map +1 -0
- package/dist/lighting/clustered-light-grid.js +370 -0
- package/dist/lighting/clustered-light-grid.js.map +1 -0
- package/dist/lighting/contact-shadow-composite.cjs +80 -0
- package/dist/lighting/contact-shadow-composite.d.ts +6 -0
- package/dist/lighting/contact-shadow-composite.d.ts.map +1 -0
- package/dist/lighting/contact-shadow-composite.js +59 -0
- package/dist/lighting/contact-shadow-composite.js.map +1 -0
- package/dist/lighting/contact-shadow-pass.cjs +102 -0
- package/dist/lighting/contact-shadow-pass.d.ts +23 -0
- package/dist/lighting/contact-shadow-pass.d.ts.map +1 -0
- package/dist/lighting/contact-shadow-pass.js +85 -0
- package/dist/lighting/contact-shadow-pass.js.map +1 -0
- package/dist/lighting/index.cjs +128 -0
- package/dist/lighting/index.cjs.map +6 -0
- package/dist/lighting/index.d.ts +35 -0
- package/dist/lighting/index.d.ts.map +1 -0
- package/dist/lighting/index.js +22 -0
- package/dist/lighting/index.js.map +1 -0
- package/dist/lighting/lightmap-atlas.cjs +246 -0
- package/dist/lighting/lightmap-atlas.d.ts +53 -0
- package/dist/lighting/lightmap-atlas.d.ts.map +1 -0
- package/dist/lighting/lightmap-atlas.js +279 -0
- package/dist/lighting/lightmap-atlas.js.map +1 -0
- package/dist/lighting/lightmap-baker.cjs +238 -0
- package/dist/lighting/lightmap-baker.d.ts +62 -0
- package/dist/lighting/lightmap-baker.d.ts.map +1 -0
- package/dist/lighting/lightmap-baker.js +236 -0
- package/dist/lighting/lightmap-baker.js.map +1 -0
- package/dist/lighting/lightmap-data.cjs +117 -0
- package/dist/lighting/lightmap-data.d.ts +20 -0
- package/dist/lighting/lightmap-data.d.ts.map +1 -0
- package/dist/lighting/lightmap-data.js +110 -0
- package/dist/lighting/lightmap-data.js.map +1 -0
- package/dist/lighting/lightmap-environment.cjs +61 -0
- package/dist/lighting/lightmap-environment.d.ts +18 -0
- package/dist/lighting/lightmap-environment.d.ts.map +1 -0
- package/dist/lighting/lightmap-environment.js +46 -0
- package/dist/lighting/lightmap-environment.js.map +1 -0
- package/dist/lighting/pbr-environment.cjs +45 -0
- package/dist/lighting/pbr-environment.d.ts +25 -0
- package/dist/lighting/pbr-environment.d.ts.map +1 -0
- package/dist/lighting/pbr-environment.js +30 -0
- package/dist/lighting/pbr-environment.js.map +1 -0
- package/dist/lighting/pbr-material.cjs +75 -0
- package/dist/lighting/pbr-material.d.ts +33 -0
- package/dist/lighting/pbr-material.d.ts.map +1 -0
- package/dist/lighting/pbr-material.js +52 -0
- package/dist/lighting/pbr-material.js.map +1 -0
- package/dist/lighting/pbr-model.cjs +579 -0
- package/dist/lighting/pbr-model.d.ts +45 -0
- package/dist/lighting/pbr-model.d.ts.map +1 -0
- package/dist/lighting/pbr-model.js +545 -0
- package/dist/lighting/pbr-model.js.map +1 -0
- package/dist/lighting/pbr-surface-pass.cjs +116 -0
- package/dist/lighting/pbr-surface-pass.d.ts +35 -0
- package/dist/lighting/pbr-surface-pass.d.ts.map +1 -0
- package/dist/lighting/pbr-surface-pass.js +98 -0
- package/dist/lighting/pbr-surface-pass.js.map +1 -0
- package/dist/lighting/prefiltered-environment.cjs +275 -0
- package/dist/lighting/prefiltered-environment.d.ts +56 -0
- package/dist/lighting/prefiltered-environment.d.ts.map +1 -0
- package/dist/lighting/prefiltered-environment.js +264 -0
- package/dist/lighting/prefiltered-environment.js.map +1 -0
- package/dist/lighting/reflection-probe.cjs +321 -0
- package/dist/lighting/reflection-probe.d.ts +77 -0
- package/dist/lighting/reflection-probe.d.ts.map +1 -0
- package/dist/lighting/reflection-probe.js +298 -0
- package/dist/lighting/reflection-probe.js.map +1 -0
- package/dist/lighting/shadow-map-renderer.cjs +631 -0
- package/dist/lighting/shadow-map-renderer.d.ts +92 -0
- package/dist/lighting/shadow-map-renderer.d.ts.map +1 -0
- package/dist/lighting/shadow-map-renderer.js +622 -0
- package/dist/lighting/shadow-map-renderer.js.map +1 -0
- package/dist/lighting/shadow-quality.cjs +58 -0
- package/dist/lighting/shadow-quality.d.ts +13 -0
- package/dist/lighting/shadow-quality.d.ts.map +1 -0
- package/dist/lighting/shadow-quality.js +37 -0
- package/dist/lighting/shadow-quality.js.map +1 -0
- package/dist/material/material.cjs +3 -0
- package/dist/material/material.d.ts +2 -0
- package/dist/material/material.d.ts.map +1 -1
- package/dist/material/material.js +3 -0
- package/dist/material/material.js.map +1 -1
- package/dist/model/gpu-vector-bindings.cjs +10 -3
- package/dist/model/gpu-vector-bindings.d.ts +1 -1
- package/dist/model/gpu-vector-bindings.d.ts.map +1 -1
- package/dist/model/gpu-vector-bindings.js +12 -3
- package/dist/model/gpu-vector-bindings.js.map +1 -1
- package/dist/model/gpu-vector-draw-batches.cjs +4 -3
- package/dist/model/gpu-vector-draw-batches.d.ts +1 -1
- package/dist/model/gpu-vector-draw-batches.d.ts.map +1 -1
- package/dist/model/gpu-vector-draw-batches.js +4 -3
- package/dist/model/gpu-vector-draw-batches.js.map +1 -1
- package/dist/model/gpu-vector-model.cjs +42 -17
- package/dist/model/gpu-vector-model.d.ts +28 -4
- package/dist/model/gpu-vector-model.d.ts.map +1 -1
- package/dist/model/gpu-vector-model.js +49 -17
- package/dist/model/gpu-vector-model.js.map +1 -1
- package/dist/model/model.d.ts +1 -1
- package/dist/model/model.d.ts.map +1 -1
- package/dist/models/light-model-utils.cjs +2 -2
- package/dist/models/light-model-utils.d.ts +2 -1
- package/dist/models/light-model-utils.d.ts.map +1 -1
- package/dist/models/light-model-utils.js +2 -2
- package/dist/models/light-model-utils.js.map +1 -1
- package/dist/scenegraph/controllers/punctual-light-controller.cjs +121 -0
- package/dist/scenegraph/controllers/punctual-light-controller.d.ts +31 -0
- package/dist/scenegraph/controllers/punctual-light-controller.d.ts.map +1 -0
- package/dist/scenegraph/controllers/punctual-light-controller.js +117 -0
- package/dist/scenegraph/controllers/punctual-light-controller.js.map +1 -0
- package/dist/scenegraph/scene-metadata.cjs +43 -0
- package/dist/scenegraph/scene-metadata.d.ts +9 -0
- package/dist/scenegraph/scene-metadata.d.ts.map +1 -0
- package/dist/scenegraph/scene-metadata.js +21 -0
- package/dist/scenegraph/scene-metadata.js.map +1 -0
- package/dist/scenegraph/scenegraph-interaction.cjs +99 -0
- package/dist/scenegraph/scenegraph-interaction.d.ts +47 -0
- package/dist/scenegraph/scenegraph-interaction.d.ts.map +1 -0
- package/dist/scenegraph/scenegraph-interaction.js +79 -0
- package/dist/scenegraph/scenegraph-interaction.js.map +1 -0
- package/dist/scenegraph/scenegraph-node.cjs +10 -0
- package/dist/scenegraph/scenegraph-node.d.ts +10 -0
- package/dist/scenegraph/scenegraph-node.d.ts.map +1 -1
- package/dist/scenegraph/scenegraph-node.js +10 -0
- package/dist/scenegraph/scenegraph-node.js.map +1 -1
- package/dist/splats/index.cjs.map +1 -1
- package/dist/splats/splat-data.cjs +34 -23
- package/dist/splats/splat-data.d.ts.map +1 -1
- package/dist/splats/splat-data.js +34 -22
- package/dist/splats/splat-data.js.map +1 -1
- package/dist/text/experimental.cjs.map +1 -1
- package/dist/text/fonts/atlas/text-utils.cjs +1 -1
- package/dist/text/fonts/atlas/text-utils.js +1 -1
- package/dist/text/fonts/atlas/text-utils.js.map +1 -1
- package/dist/text/fonts/index.cjs.map +1 -1
- package/dist/text/index.cjs +2 -0
- package/dist/text/index.cjs.map +2 -2
- package/dist/text/index.d.ts +1 -1
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.js +1 -1
- package/dist/text/index.js.map +1 -1
- package/dist/text/text-2d/index.cjs +3 -0
- package/dist/text/text-2d/index.d.ts +1 -0
- package/dist/text/text-2d/index.d.ts.map +1 -1
- package/dist/text/text-2d/index.js +1 -0
- package/dist/text/text-2d/index.js.map +1 -1
- package/dist/text/text-2d/model-utils/text-code-point-source.cjs +41 -0
- package/dist/text/text-2d/model-utils/text-code-point-source.d.ts +8 -0
- package/dist/text/text-2d/model-utils/text-code-point-source.d.ts.map +1 -0
- package/dist/text/text-2d/model-utils/text-code-point-source.js +23 -0
- package/dist/text/text-2d/model-utils/text-code-point-source.js.map +1 -0
- package/dist/text/text-2d/models/text-attribute-model.cjs +4 -1
- package/dist/text/text-2d/models/text-attribute-model.d.ts +3 -1
- package/dist/text/text-2d/models/text-attribute-model.d.ts.map +1 -1
- package/dist/text/text-2d/models/text-attribute-model.js +6 -1
- package/dist/text/text-2d/models/text-attribute-model.js.map +1 -1
- package/dist/text/text-2d/models/text-dictionary-model.cjs +4 -1
- package/dist/text/text-2d/models/text-dictionary-model.d.ts +3 -1
- package/dist/text/text-2d/models/text-dictionary-model.d.ts.map +1 -1
- package/dist/text/text-2d/models/text-dictionary-model.js +6 -1
- package/dist/text/text-2d/models/text-dictionary-model.js.map +1 -1
- package/dist/text/text-2d/models/text-storage-model.cjs +4 -1
- package/dist/text/text-2d/models/text-storage-model.d.ts +3 -1
- package/dist/text/text-2d/models/text-storage-model.d.ts.map +1 -1
- package/dist/text/text-2d/models/text-storage-model.js +6 -1
- package/dist/text/text-2d/models/text-storage-model.js.map +1 -1
- package/licenses/cesium.txt +207 -0
- package/licenses/deck-community.txt +19 -0
- package/licenses/deck.txt +19 -0
- package/licenses/glfx.txt +19 -0
- package/licenses/gltf-loader-ts.txt +21 -0
- package/licenses/magenta-font.txt +13 -0
- package/licenses/nvidia-fxaa.txt +25 -0
- package/licenses/philogl.txt +19 -0
- package/licenses/spark.txt +21 -0
- package/licenses/three.txt +21 -0
- package/package.json +17 -9
- package/src/animation/node-animation-binding.ts +18 -1
- package/src/arrow/index.ts +6 -0
- package/src/arrow/renderers/splats/conversion/make-gpu-splat-data-from-gltf.ts +224 -0
- package/src/arrow/renderers/text/renderers/arrow-text-renderer.ts +1 -0
- package/src/arrow/renderers/text/renderers/arrow-text-shaders.ts +12 -5
- package/src/compute/computation.ts +1 -1
- package/src/compute/swap.ts +2 -2
- package/src/dynamic-texture/video-texture.ts +9 -3
- package/src/effects/passes/postprocessing/fxaa/fxaa.ts +2 -1
- package/src/effects/passes/postprocessing/image-adjust-filters/brightnesscontrast.ts +2 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/denoise.ts +2 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/huesaturation.ts +2 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/noise.ts +2 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/sepia.ts +2 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/vibrance.ts +2 -0
- package/src/effects/passes/postprocessing/image-adjust-filters/vignette.ts +2 -0
- package/src/geometry/gpu-vector-geometry-adapter.ts +19 -1
- package/src/geometry/gpu-vector-geometry.ts +3 -0
- package/src/gltf/gltf/animations/animations.ts +8 -1
- package/src/gltf/gltf/create-gltf-model.ts +4 -0
- package/src/gltf/gltf/create-scenegraph-from-gltf.ts +98 -17
- package/src/gltf/gltf/gltf-billboard.ts +6 -1
- package/src/gltf/gltf/gltf-extension-support.ts +2 -2
- package/src/gltf/index.ts +2 -0
- package/src/gltf/parsers/parse-gltf-animations.ts +22 -8
- package/src/gltf/parsers/parse-gltf-lights.ts +42 -130
- package/src/gltf/parsers/parse-gltf-metadata.ts +40 -0
- package/src/gltf/parsers/parse-gltf.ts +32 -16
- package/src/gltf/parsers/parse-pbr-material.ts +35 -7
- package/src/gltf/parsers/post-process-gltf.ts +1 -0
- package/src/gltf/pbr/pbr-environment.ts +27 -1
- package/src/gltf/pbr/pbr-material.ts +8 -3
- package/src/gltf/types/gltf-json-schema.ts +1 -0
- package/src/gltf/types/gltf-postprocessed-schema.ts +3 -0
- package/src/gltf/types/gltf-types.ts +20 -0
- package/src/graph/models/path/path-attribute-model.ts +10 -1
- package/src/graph/models/path/path-storage-model.ts +10 -1
- package/src/graph/physics/physics-controller.ts +55 -1
- package/src/graph/physics/scenegraph-instance.ts +10 -0
- package/src/graph/tables/gpu-table-model.ts +3 -2
- package/src/index.ts +19 -0
- package/src/lighting/ambient-occlusion-pass.ts +130 -0
- package/src/lighting/clustered-light-grid.ts +481 -0
- package/src/lighting/contact-shadow-composite.ts +67 -0
- package/src/lighting/contact-shadow-pass.ts +107 -0
- package/src/lighting/index.ts +125 -0
- package/src/lighting/lightmap-atlas.ts +348 -0
- package/src/lighting/lightmap-baker.ts +306 -0
- package/src/lighting/lightmap-data.ts +138 -0
- package/src/lighting/lightmap-environment.ts +70 -0
- package/src/lighting/pbr-environment.ts +55 -0
- package/src/lighting/pbr-material.ts +85 -0
- package/src/lighting/pbr-model.ts +608 -0
- package/src/lighting/pbr-surface-pass.ts +122 -0
- package/src/lighting/prefiltered-environment.ts +354 -0
- package/src/lighting/reflection-probe.ts +360 -0
- package/src/lighting/shadow-map-renderer.ts +918 -0
- package/src/lighting/shadow-quality.ts +50 -0
- package/src/material/material.ts +3 -0
- package/src/model/gpu-vector-bindings.ts +11 -3
- package/src/model/gpu-vector-draw-batches.ts +12 -10
- package/src/model/gpu-vector-model.ts +96 -20
- package/src/model/model.ts +1 -1
- package/src/models/light-model-utils.ts +3 -2
- package/src/scenegraph/controllers/punctual-light-controller.ts +172 -0
- package/src/scenegraph/scene-metadata.ts +23 -0
- package/src/scenegraph/scenegraph-interaction.ts +131 -0
- package/src/scenegraph/scenegraph-node.ts +12 -0
- package/src/splats/README.md +46 -0
- package/src/splats/splat-data.ts +53 -45
- package/src/text/fonts/atlas/text-utils.ts +1 -1
- package/src/text/index.ts +1 -0
- package/src/text/text-2d/index.ts +1 -0
- package/src/text/text-2d/model-utils/text-code-point-source.ts +34 -0
- package/src/text/text-2d/models/text-attribute-model.ts +10 -1
- package/src/text/text-2d/models/text-dictionary-model.ts +10 -1
- package/src/text/text-2d/models/text-storage-model.ts +10 -1
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {Device} from '@luma.gl/core';
|
|
6
|
+
import {GroupNode} from '@luma.gl/engine';
|
|
7
|
+
import {Matrix4} from '@math.gl/core';
|
|
8
|
+
import {getGLTFNodeInstancing} from '../../../../gltf/gltf/gltf-instancing';
|
|
9
|
+
import {makeVector} from 'apache-arrow';
|
|
10
|
+
import type {GLTFPostprocessed} from '@luma.gl/engine/gltf';
|
|
11
|
+
import {
|
|
12
|
+
loadGPUSplatDataFromGLTF,
|
|
13
|
+
type GLTFSplatPrimitive,
|
|
14
|
+
type GPUSplatData,
|
|
15
|
+
type LoadGPUSplatDataFromGLTFOptions
|
|
16
|
+
} from '@luma.gl/engine/splats';
|
|
17
|
+
import {
|
|
18
|
+
makeGPUSplatDataFromArrow,
|
|
19
|
+
type GPUSplatArrowSource,
|
|
20
|
+
type GPUSplatArrowTableLike
|
|
21
|
+
} from './make-gpu-splat-data-from-arrow';
|
|
22
|
+
|
|
23
|
+
/** GPU batches prepared from one glTF mesh primitive. */
|
|
24
|
+
export type GLTFSplatBatchGroup = {
|
|
25
|
+
/** Source mesh index, shared by all node instances of this mesh. */
|
|
26
|
+
meshIndex: number;
|
|
27
|
+
/** Source primitive index within the mesh. */
|
|
28
|
+
primitiveIndex: number;
|
|
29
|
+
/** Ordered, independently owned batches; the caller must destroy them. */
|
|
30
|
+
batches: GPUSplatData[];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Prepares loader-decoded Arrow splats and uncompressed glTF splat attributes.
|
|
35
|
+
* The returned identity refers to mesh primitives, not scene-node instances. The caller owns
|
|
36
|
+
* the returned GPU batches and must apply each node's transform when drawing them.
|
|
37
|
+
*/
|
|
38
|
+
export async function makeGPUSplatDataFromGLTFScene(
|
|
39
|
+
device: Device,
|
|
40
|
+
gltf: GLTFPostprocessed,
|
|
41
|
+
options: LoadGPUSplatDataFromGLTFOptions = {}
|
|
42
|
+
): Promise<GLTFSplatBatchGroup[]> {
|
|
43
|
+
const groups: GLTFSplatBatchGroup[] = [];
|
|
44
|
+
let sourceBatchIndex = options.sourceBatchIndex ?? 0;
|
|
45
|
+
let rowIndexBase = options.rowIndexBase ?? 0;
|
|
46
|
+
try {
|
|
47
|
+
for (const [meshIndex, mesh] of gltf.meshes.entries()) {
|
|
48
|
+
for (const [primitiveIndex, primitive] of mesh.primitives.entries()) {
|
|
49
|
+
if (!primitive.extensions?.KHR_gaussian_splatting) continue;
|
|
50
|
+
options.signal?.throwIfAborted();
|
|
51
|
+
const descriptor = gltf.gaussianSplatPrimitives?.find(
|
|
52
|
+
item => item.meshIndex === meshIndex && item.primitiveIndex === primitiveIndex
|
|
53
|
+
);
|
|
54
|
+
let batches: GPUSplatData[];
|
|
55
|
+
let consumedSourceBatches = 1;
|
|
56
|
+
const firstSourceBatchIndex = sourceBatchIndex;
|
|
57
|
+
if (descriptor?.decoded !== undefined) {
|
|
58
|
+
const extension = primitive.extensions.KHR_gaussian_splatting;
|
|
59
|
+
if (
|
|
60
|
+
primitive.mode !== 0 ||
|
|
61
|
+
extension.kernel !== 'ellipse' ||
|
|
62
|
+
extension.colorSpace !== 'lin_rec709_display' ||
|
|
63
|
+
(extension.projection !== undefined && extension.projection !== 'perspective') ||
|
|
64
|
+
(extension.sortingMethod !== undefined && extension.sortingMethod !== 'cameraDistance')
|
|
65
|
+
) {
|
|
66
|
+
throw new Error('Unsupported decoded glTF Gaussian splat primitive');
|
|
67
|
+
}
|
|
68
|
+
const result = descriptor.decoded;
|
|
69
|
+
const table =
|
|
70
|
+
result &&
|
|
71
|
+
typeof result === 'object' &&
|
|
72
|
+
'shape' in result &&
|
|
73
|
+
result.shape === 'arrow-table' &&
|
|
74
|
+
'data' in result
|
|
75
|
+
? result.data
|
|
76
|
+
: result;
|
|
77
|
+
if (
|
|
78
|
+
!table ||
|
|
79
|
+
typeof table !== 'object' ||
|
|
80
|
+
!('batches' in table) ||
|
|
81
|
+
!Array.isArray(table.batches) ||
|
|
82
|
+
!('getChild' in table) ||
|
|
83
|
+
typeof table.getChild !== 'function'
|
|
84
|
+
) {
|
|
85
|
+
throw new Error('Decoded glTF splats require a Mesh Arrow table');
|
|
86
|
+
}
|
|
87
|
+
const decoded = table as GPUSplatArrowTableLike;
|
|
88
|
+
consumedSourceBatches = decoded.batches.length;
|
|
89
|
+
const declaredFeature = primitive.extensions?.EXT_mesh_features?.featureIds?.find(
|
|
90
|
+
(feature: {attribute?: number}) => feature.attribute !== undefined
|
|
91
|
+
);
|
|
92
|
+
const featureName =
|
|
93
|
+
options.featureIdAttribute ??
|
|
94
|
+
(declaredFeature ? `_FEATURE_ID_${declaredFeature.attribute}` : undefined);
|
|
95
|
+
let source: GPUSplatArrowSource = decoded;
|
|
96
|
+
if (featureName) {
|
|
97
|
+
const accessor = primitive.attributes[featureName];
|
|
98
|
+
const values = accessor?.value;
|
|
99
|
+
if (
|
|
100
|
+
accessor?.normalized ||
|
|
101
|
+
!(
|
|
102
|
+
values instanceof Uint8Array ||
|
|
103
|
+
values instanceof Uint16Array ||
|
|
104
|
+
values instanceof Uint32Array
|
|
105
|
+
)
|
|
106
|
+
) {
|
|
107
|
+
throw new Error('glTF Gaussian splat feature IDs must be unsigned integers');
|
|
108
|
+
}
|
|
109
|
+
if (values.length !== decoded.numRows) {
|
|
110
|
+
throw new Error('glTF Gaussian splat feature-ID count does not match decoded splats');
|
|
111
|
+
}
|
|
112
|
+
let offset = 0;
|
|
113
|
+
const recordBatches = decoded.batches.map(recordBatch => {
|
|
114
|
+
const ids = values.subarray(offset, offset + recordBatch.numRows);
|
|
115
|
+
offset += recordBatch.numRows;
|
|
116
|
+
const vector = makeVector(ids);
|
|
117
|
+
return {
|
|
118
|
+
numRows: recordBatch.numRows,
|
|
119
|
+
schema: recordBatch.schema,
|
|
120
|
+
getChild: (name: string) =>
|
|
121
|
+
name === '__gltf_feature_id' ? vector : recordBatch.getChild(name)
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
const table = {
|
|
125
|
+
numRows: decoded.numRows,
|
|
126
|
+
schema: decoded.schema,
|
|
127
|
+
batches: recordBatches,
|
|
128
|
+
getChild: (name: string) => decoded.getChild(name)
|
|
129
|
+
};
|
|
130
|
+
source = table;
|
|
131
|
+
}
|
|
132
|
+
batches = makeGPUSplatDataFromArrow(device, source, {
|
|
133
|
+
sourceBatchIndex,
|
|
134
|
+
rowIndexBase,
|
|
135
|
+
maxSphericalHarmonicsDegree: options.maxSphericalHarmonicsDegree,
|
|
136
|
+
...(featureName ? {semanticColumn: '__gltf_feature_id'} : {})
|
|
137
|
+
});
|
|
138
|
+
} else {
|
|
139
|
+
const batch = await loadGPUSplatDataFromGLTF(
|
|
140
|
+
device,
|
|
141
|
+
primitive as unknown as GLTFSplatPrimitive,
|
|
142
|
+
{...options, sourceBatchIndex, rowIndexBase}
|
|
143
|
+
);
|
|
144
|
+
batches = [batch];
|
|
145
|
+
}
|
|
146
|
+
groups.push({meshIndex, primitiveIndex, batches});
|
|
147
|
+
options.signal?.throwIfAborted();
|
|
148
|
+
for (const batch of batches) {
|
|
149
|
+
sourceBatchIndex = batch.sourceBatchIndex + 1;
|
|
150
|
+
rowIndexBase = batch.rowIndexBase + batch.rowCount;
|
|
151
|
+
}
|
|
152
|
+
sourceBatchIndex = Math.max(
|
|
153
|
+
sourceBatchIndex,
|
|
154
|
+
firstSourceBatchIndex + consumedSourceBatches
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return groups;
|
|
159
|
+
} catch (error) {
|
|
160
|
+
for (const group of groups) for (const batch of group.batches) batch.destroy();
|
|
161
|
+
throw error;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** A mesh primitive's splat batches placed by one visible glTF node in one scene. */
|
|
166
|
+
export type GLTFSplatInstance = {
|
|
167
|
+
/** Source scene index. */
|
|
168
|
+
sceneIndex: number;
|
|
169
|
+
/** Source node index. */
|
|
170
|
+
nodeIndex: number;
|
|
171
|
+
/** Index of the authored GPU instance, when the node uses GPU instancing. */
|
|
172
|
+
instanceIndex?: number;
|
|
173
|
+
/** Source mesh and primitive indices and their borrowed batches. */
|
|
174
|
+
group: GLTFSplatBatchGroup;
|
|
175
|
+
/** Current column-major world transform, including the complete ancestor hierarchy. */
|
|
176
|
+
worldMatrix: Float32Array;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** Resolves visible instances without baking node transforms into borrowed splat data. */
|
|
180
|
+
export function getGLTFSplatSceneInstances(
|
|
181
|
+
scenegraphs: import('@luma.gl/engine/gltf').GLTFScenegraphs,
|
|
182
|
+
groups: readonly GLTFSplatBatchGroup[]
|
|
183
|
+
): GLTFSplatInstance[] {
|
|
184
|
+
const instances: GLTFSplatInstance[] = [];
|
|
185
|
+
const nodeIndices = new Map(
|
|
186
|
+
Array.from(scenegraphs.gltfNodeIndexToNodeMap, ([index, node]) => [node, index])
|
|
187
|
+
);
|
|
188
|
+
for (const [sceneIndex, scene] of scenegraphs.scenes.entries()) {
|
|
189
|
+
const visit = (node: GroupNode, parent: Matrix4): void => {
|
|
190
|
+
if (!node.display) return;
|
|
191
|
+
const world = parent.clone().multiplyRight(node.matrix);
|
|
192
|
+
const nodeIndex = nodeIndices.get(node);
|
|
193
|
+
if (nodeIndex !== undefined) {
|
|
194
|
+
const sourceNode = scenegraphs.gltf.nodes[nodeIndex];
|
|
195
|
+
const mesh = sourceNode?.mesh;
|
|
196
|
+
const meshIndex = mesh ? scenegraphs.gltf.meshes.indexOf(mesh) : -1;
|
|
197
|
+
const instancing =
|
|
198
|
+
sourceNode && mesh ? getGLTFNodeInstancing(scenegraphs.gltf, sourceNode) : null;
|
|
199
|
+
for (const group of groups) {
|
|
200
|
+
if (group.meshIndex !== meshIndex) continue;
|
|
201
|
+
if (instancing) {
|
|
202
|
+
for (const [instanceIndex, localMatrix] of instancing.matrices.entries()) {
|
|
203
|
+
const worldMatrix = world.clone().multiplyRight(localMatrix);
|
|
204
|
+
instances.push({
|
|
205
|
+
sceneIndex,
|
|
206
|
+
nodeIndex,
|
|
207
|
+
instanceIndex,
|
|
208
|
+
group,
|
|
209
|
+
worldMatrix: Float32Array.from(worldMatrix)
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
} else {
|
|
213
|
+
instances.push({sceneIndex, nodeIndex, group, worldMatrix: Float32Array.from(world)});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
for (const child of node.children) {
|
|
218
|
+
if (child instanceof GroupNode) visit(child, world);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
visit(scene, new Matrix4());
|
|
222
|
+
}
|
|
223
|
+
return instances;
|
|
224
|
+
}
|
|
@@ -47,11 +47,18 @@ export function configureArrowTextShaderAssembler<ShaderAssemblerType extends Sh
|
|
|
47
47
|
return shaderAssembler;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
shaderAssembler.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
shaderAssembler.addShaderInjectionTarget({
|
|
51
|
+
name: 'TEXT_ATTRIBUTE_VERTEX_TRANSFORM',
|
|
52
|
+
stage: 'vertex',
|
|
53
|
+
glsl: {
|
|
54
|
+
parameters:
|
|
55
|
+
'inout vec4 position, inout vec2 textureCoordinate, inout vec4 textColor, vec2 worldPosition, vec4 glyphFrame, vec2 corner, vec2 glyphSize, vec2 atlasSize'
|
|
56
|
+
},
|
|
57
|
+
wgsl: {
|
|
58
|
+
parameters:
|
|
59
|
+
'outputs: ptr<function, FragmentInputs>, worldPosition: vec2<f32>, glyphFrame: vec4<f32>, corner: vec2<f32>, glyphSize: vec2<f32>, atlasSize: vec2<f32>'
|
|
60
|
+
}
|
|
61
|
+
});
|
|
55
62
|
configuredLanguages.add(shaderLanguage);
|
|
56
63
|
return shaderAssembler;
|
|
57
64
|
}
|
|
@@ -185,7 +185,7 @@ export class Computation {
|
|
|
185
185
|
|
|
186
186
|
const platformInfo = getPlatformInfo(device);
|
|
187
187
|
const resolvedPlugins = resolveShaderPlugins(this.props.plugins, platformInfo.shaderLanguage);
|
|
188
|
-
if (resolvedPlugins.
|
|
188
|
+
if (resolvedPlugins.injectionTargets.length > 0) {
|
|
189
189
|
throw new Error('Computation does not support ShaderPlugin render hooks');
|
|
190
190
|
}
|
|
191
191
|
if (
|
package/src/compute/swap.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
5
|
import type {BufferProps, FramebufferProps} from '@luma.gl/core';
|
|
6
|
-
import {Device,
|
|
6
|
+
import {Device, DeviceResource, Buffer, Framebuffer, Texture} from '@luma.gl/core';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Helper class for working with repeated transformations / computations
|
|
@@ -11,7 +11,7 @@ import {Device, Resource, Buffer, Framebuffer, Texture} from '@luma.gl/core';
|
|
|
11
11
|
* @note the two resources are expected to be structurally identical (same size, length, format, etc)
|
|
12
12
|
* @note the two resources can be destroyed by calling `destroy()`
|
|
13
13
|
*/
|
|
14
|
-
export class Swap<T extends
|
|
14
|
+
export class Swap<T extends DeviceResource<any>> {
|
|
15
15
|
id: string;
|
|
16
16
|
|
|
17
17
|
/** The current resource - usually the source for renders or computations */
|
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type {
|
|
6
|
+
Device,
|
|
7
|
+
ExternalTexture,
|
|
8
|
+
DeviceResourceProps,
|
|
9
|
+
Sampler,
|
|
10
|
+
SamplerProps
|
|
11
|
+
} from '@luma.gl/core';
|
|
6
12
|
import {Texture, assert} from '@luma.gl/core';
|
|
7
13
|
import {uid} from '../utils/uid';
|
|
8
14
|
import type {TextureBindingLayout, TextureBindingSource} from '@luma.gl/core/dynamic';
|
|
9
15
|
|
|
10
16
|
/** Properties for a live video binding source. */
|
|
11
|
-
export type VideoTextureProps = Pick<
|
|
17
|
+
export type VideoTextureProps = Pick<DeviceResourceProps, 'id'> & {
|
|
12
18
|
/** Caller-owned live video source followed by this binding source. */
|
|
13
19
|
source: HTMLVideoElement | VideoFrame;
|
|
14
20
|
/** Color space requested for copied or imported video data. */
|
|
@@ -62,7 +68,7 @@ export class VideoTexture implements TextureBindingSource {
|
|
|
62
68
|
return this._updateTimestamp;
|
|
63
69
|
}
|
|
64
70
|
|
|
65
|
-
/**
|
|
71
|
+
/** DeviceResource label used by debug output. */
|
|
66
72
|
get [Symbol.toStringTag]() {
|
|
67
73
|
return 'VideoTexture';
|
|
68
74
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
|
-
// Copyright (c) vis.gl contributors
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileCopyrightText: Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
|
|
4
5
|
|
|
5
6
|
import type {ShaderPass} from '@luma.gl/shaders';
|
|
6
7
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileCopyrightText: Copyright (C) 2011 by Evan Wallace
|
|
5
|
+
// Classic filter adapted from glfx.js; see the package THIRD-PARTY-NOTICES.md.
|
|
4
6
|
|
|
5
7
|
import type {ShaderPass} from '@luma.gl/shaders';
|
|
6
8
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileCopyrightText: Copyright (C) 2011 by Evan Wallace
|
|
5
|
+
// Classic filter adapted from glfx.js; see the package THIRD-PARTY-NOTICES.md.
|
|
4
6
|
|
|
5
7
|
import type {ShaderPass} from '@luma.gl/shaders';
|
|
6
8
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileCopyrightText: Copyright (C) 2011 by Evan Wallace
|
|
5
|
+
// Classic filter adapted from glfx.js; see the package THIRD-PARTY-NOTICES.md.
|
|
4
6
|
|
|
5
7
|
import type {ShaderPass} from '@luma.gl/shaders';
|
|
6
8
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileCopyrightText: Copyright (C) 2011 by Evan Wallace
|
|
5
|
+
// Classic filter adapted from glfx.js; see the package THIRD-PARTY-NOTICES.md.
|
|
4
6
|
|
|
5
7
|
import type {ShaderPass} from '@luma.gl/shaders';
|
|
6
8
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileCopyrightText: Copyright (C) 2011 by Evan Wallace
|
|
5
|
+
// Classic filter adapted from glfx.js; see the package THIRD-PARTY-NOTICES.md.
|
|
4
6
|
|
|
5
7
|
import type {ShaderPass} from '@luma.gl/shaders';
|
|
6
8
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileCopyrightText: Copyright (C) 2011 by Evan Wallace
|
|
5
|
+
// Classic filter adapted from glfx.js; see the package THIRD-PARTY-NOTICES.md.
|
|
4
6
|
|
|
5
7
|
import type {ShaderPass} from '@luma.gl/shaders';
|
|
6
8
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// luma.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileCopyrightText: Copyright (C) 2011 by Evan Wallace
|
|
5
|
+
// Classic filter adapted from glfx.js; see the package THIRD-PARTY-NOTICES.md.
|
|
4
6
|
|
|
5
7
|
import type {ShaderPass} from '@luma.gl/shaders';
|
|
6
8
|
|
|
@@ -2,11 +2,29 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
+
import type {Device} from '@luma.gl/core';
|
|
6
|
+
import type {Geometry} from '@math.gl/geometry';
|
|
5
7
|
import {vertexFormatDecoder} from '@luma.gl/core';
|
|
6
8
|
import type {GPUVectorModelInput} from '../model/gpu-vector-model-batches';
|
|
7
|
-
import {GPUGeometry} from './gpu-geometry';
|
|
9
|
+
import {GPUGeometry, makeGPUGeometry} from './gpu-geometry';
|
|
8
10
|
import {GPUVectorGeometry} from './gpu-vector-geometry';
|
|
9
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Interleaves and uploads CPU geometry for use with GPUVectorModel.
|
|
14
|
+
* The returned geometry owns its uploaded buffers; call destroy() after all models stop using it.
|
|
15
|
+
*/
|
|
16
|
+
export function makeGPUVectorGeometry(device: Device, geometry: Geometry): GPUVectorGeometry {
|
|
17
|
+
const gpuGeometry = makeGPUGeometry(device, geometry);
|
|
18
|
+
try {
|
|
19
|
+
const vectorGeometry = makeGPUVectorGeometryFromGPUGeometry(gpuGeometry);
|
|
20
|
+
vectorGeometry.destroy = () => gpuGeometry.destroy();
|
|
21
|
+
return vectorGeometry;
|
|
22
|
+
} catch (error) {
|
|
23
|
+
gpuGeometry.destroy();
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
10
28
|
/** Borrows legacy geometry storage as typed vector views for Model's input adapter. */
|
|
11
29
|
export function makeGPUVectorGeometryFromGPUGeometry(geometry: GPUGeometry): GPUVectorGeometry {
|
|
12
30
|
const attributes: Record<string, GPUVectorModelInput> = {};
|
|
@@ -23,6 +23,9 @@ export class GPUVectorGeometry {
|
|
|
23
23
|
readonly vertexCount?: number;
|
|
24
24
|
readonly bufferLayout?: BufferLayout[];
|
|
25
25
|
|
|
26
|
+
/** Releases resources owned by uploaded geometry; borrowed vectors remain caller-owned. */
|
|
27
|
+
destroy(): void {}
|
|
28
|
+
|
|
26
29
|
constructor(props: GPUVectorGeometryProps) {
|
|
27
30
|
this.attributes = props.attributes;
|
|
28
31
|
this.indices = props.indices ?? null;
|
|
@@ -13,7 +13,14 @@ export type GLTFAnimation = {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
/** Supported glTF animation target paths. */
|
|
16
|
-
export type GLTFAnimationPath =
|
|
16
|
+
export type GLTFAnimationPath =
|
|
17
|
+
| 'translation'
|
|
18
|
+
| 'rotation'
|
|
19
|
+
| 'scale'
|
|
20
|
+
| 'weights'
|
|
21
|
+
| 'visibility'
|
|
22
|
+
| 'selectable'
|
|
23
|
+
| 'hoverable';
|
|
17
24
|
|
|
18
25
|
/** Parsed glTF animation channel that targets a scenegraph node. */
|
|
19
26
|
export type GLTFNodeAnimationChannel = {
|
|
@@ -549,6 +549,10 @@ export function createGLTFMaterial(device: Device, options: CreateGLTFMaterialOp
|
|
|
549
549
|
|
|
550
550
|
const pbrMaterialProps = {...options.parsedPPBRMaterial.uniforms};
|
|
551
551
|
delete pbrMaterialProps.camera;
|
|
552
|
+
// Environment controls belong to the scene uniforms of each model, not to the material.
|
|
553
|
+
delete pbrMaterialProps.environmentIntensity;
|
|
554
|
+
delete pbrMaterialProps.environmentRotation;
|
|
555
|
+
delete pbrMaterialProps.environmentMipCount;
|
|
552
556
|
const materialBindings = Object.fromEntries(
|
|
553
557
|
Object.entries({
|
|
554
558
|
...pbrMaterialProps,
|