@luma.gl/graph 10.0.0-alpha.9 → 10.0.0-beta.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/LICENSE +4 -4
- package/THIRD-PARTY-NOTICES.md +19 -0
- package/dist/arrow/arrow-colors.cjs +99 -18
- package/dist/arrow/arrow-colors.d.ts +27 -10
- package/dist/arrow/arrow-colors.d.ts.map +1 -1
- package/dist/arrow/arrow-colors.js +107 -24
- package/dist/arrow/arrow-colors.js.map +1 -1
- package/dist/arrow/arrow-utils/arrow-paths.cjs +4 -3
- package/dist/arrow/arrow-utils/arrow-paths.d.ts.map +1 -1
- package/dist/arrow/arrow-utils/arrow-paths.js +5 -4
- package/dist/arrow/arrow-utils/arrow-paths.js.map +1 -1
- package/dist/arrow/cpu/arrow-coordinate-projection.cjs +30 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.d.ts +5 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.js +9 -0
- package/dist/arrow/cpu/arrow-coordinate-projection.js.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.cjs +31 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.d.ts +2 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.js +5 -0
- package/dist/arrow/cpu/arrow-cpu-pipelines.js.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.cjs +99 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.d.ts +9 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.d.ts.map +1 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.js +100 -0
- package/dist/arrow/cpu/arrow-cpu-vector-adapters.js.map +1 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.cjs +9 -371
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts +8 -28
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.d.ts.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js +4 -381
- package/dist/arrow/geoarrow/arrow-geoarrow-adapter.js.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.cjs +11 -11
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts +2 -0
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.d.ts.map +1 -1
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js +4 -4
- package/dist/arrow/geoarrow/arrow-geoarrow-conversion.js.map +1 -1
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.cjs +2 -2
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.js +1 -1
- package/dist/arrow/geoarrow/arrow-polygon-tessellation.js.map +1 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.cjs +27 -8
- package/dist/arrow/gpu/arrow-column-gpu-vector.d.ts +11 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-column-gpu-vector.js +33 -8
- package/dist/arrow/gpu/arrow-column-gpu-vector.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-table-conversion.cjs +68 -3
- package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts +9 -2
- package/dist/arrow/gpu/arrow-gpu-table-conversion.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-table-conversion.js +76 -3
- package/dist/arrow/gpu/arrow-gpu-table-conversion.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.cjs +8 -6
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.d.ts +1 -0
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.js +17 -7
- package/dist/arrow/gpu/arrow-gpu-vector-adapters.js.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.cjs +35 -5
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.d.ts +6 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.d.ts.map +1 -1
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.js +40 -5
- package/dist/arrow/gpu/arrow-gpu-vector-conversion.js.map +1 -1
- package/dist/arrow/index.cjs +19 -2
- package/dist/arrow/index.cjs.map +3 -3
- package/dist/arrow/index.d.ts +5 -2
- package/dist/arrow/index.d.ts.map +1 -1
- package/dist/arrow/index.js +4 -1
- package/dist/arrow/index.js.map +1 -1
- package/dist/arrow/internal.cjs.map +2 -2
- package/dist/dist.dev.js +3820 -1646
- package/dist/dist.min.js +450 -136
- package/dist/experimental/index.cjs.map +1 -1
- package/dist/experimental/simulation/index.cjs.map +1 -1
- package/dist/experimental-models.cjs +21 -0
- package/dist/experimental-models.d.ts +2 -0
- package/dist/experimental-models.d.ts.map +1 -0
- package/dist/experimental-models.js +5 -0
- package/dist/experimental-models.js.map +1 -0
- package/dist/experimental-simulation.cjs +21 -0
- package/dist/experimental-simulation.d.ts +2 -0
- package/dist/experimental-simulation.d.ts.map +1 -0
- package/dist/experimental-simulation.js +5 -0
- package/dist/experimental-simulation.js.map +1 -0
- package/dist/geospatial/gpu-point-spatial-query.cjs +2 -15
- package/dist/geospatial/gpu-point-spatial-query.d.ts.map +1 -1
- package/dist/geospatial/gpu-point-spatial-query.js +2 -15
- package/dist/geospatial/gpu-point-spatial-query.js.map +1 -1
- package/dist/geospatial/index.cjs.map +2 -2
- package/dist/gpu-a5/index.cjs.map +1 -1
- package/dist/gpu-core/compiled-gpu-graph.cjs +47 -0
- package/dist/gpu-core/compiled-gpu-graph.d.ts +5 -0
- package/dist/gpu-core/compiled-gpu-graph.d.ts.map +1 -1
- package/dist/gpu-core/compiled-gpu-graph.js +54 -1
- package/dist/gpu-core/compiled-gpu-graph.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph-compiler.cjs +11 -2
- package/dist/gpu-core/gpu-command-graph-compiler.d.ts +2 -1
- package/dist/gpu-core/gpu-command-graph-compiler.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph-compiler.js +13 -2
- package/dist/gpu-core/gpu-command-graph-compiler.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph-types.d.ts +16 -1
- package/dist/gpu-core/gpu-command-graph-types.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph-types.js.map +1 -1
- package/dist/gpu-core/gpu-command-graph.cjs +34 -11
- package/dist/gpu-core/gpu-command-graph.d.ts +17 -8
- package/dist/gpu-core/gpu-command-graph.d.ts.map +1 -1
- package/dist/gpu-core/gpu-command-graph.js +39 -11
- package/dist/gpu-core/gpu-command-graph.js.map +1 -1
- package/dist/gpu-core/gpu-cpu-execution.cjs +279 -0
- package/dist/gpu-core/gpu-cpu-execution.d.ts +22 -0
- package/dist/gpu-core/gpu-cpu-execution.d.ts.map +1 -0
- package/dist/gpu-core/gpu-cpu-execution.js +294 -0
- package/dist/gpu-core/gpu-cpu-execution.js.map +1 -0
- package/dist/gpu-core/gpu-cpu-operation.cjs +54 -0
- package/dist/gpu-core/gpu-cpu-operation.d.ts +40 -0
- package/dist/gpu-core/gpu-cpu-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-cpu-operation.js +35 -0
- package/dist/gpu-core/gpu-cpu-operation.js.map +1 -0
- package/dist/gpu-core/gpu-dispatch-utils.cjs +7 -3
- package/dist/gpu-core/gpu-dispatch-utils.d.ts +2 -0
- package/dist/gpu-core/gpu-dispatch-utils.d.ts.map +1 -1
- package/dist/gpu-core/gpu-dispatch-utils.js +4 -1
- package/dist/gpu-core/gpu-dispatch-utils.js.map +1 -1
- package/dist/gpu-core/gpu-expression-operation.cjs +2 -2
- package/dist/gpu-core/gpu-expression-operation.d.ts +1 -1
- package/dist/gpu-core/gpu-expression-operation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-expression-operation.js +1 -1
- package/dist/gpu-core/gpu-expression-operation.js.map +1 -1
- package/dist/gpu-core/gpu-expression-plan.cjs +5 -1
- package/dist/gpu-core/gpu-expression-plan.d.ts +3 -2
- package/dist/gpu-core/gpu-expression-plan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-expression-plan.js +7 -1
- package/dist/gpu-core/gpu-expression-plan.js.map +1 -1
- package/dist/gpu-core/gpu-graph-compiler.cjs +48 -0
- package/dist/gpu-core/gpu-graph-compiler.d.ts +1 -0
- package/dist/gpu-core/gpu-graph-compiler.d.ts.map +1 -1
- package/dist/gpu-core/gpu-graph-compiler.js +50 -0
- package/dist/gpu-core/gpu-graph-compiler.js.map +1 -1
- package/dist/gpu-core/gpu-graph.d.ts +2 -2
- package/dist/gpu-core/gpu-graph.d.ts.map +1 -1
- package/dist/gpu-core/gpu-graph.js.map +1 -1
- package/dist/gpu-core/gpu-grid-aggregation.cjs +2 -5
- package/dist/gpu-core/gpu-grid-aggregation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-aggregation.js +2 -5
- package/dist/gpu-core/gpu-grid-aggregation.js.map +1 -1
- package/dist/gpu-core/gpu-grid-binning.cjs +2 -5
- package/dist/gpu-core/gpu-grid-binning.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-binning.js +2 -5
- package/dist/gpu-core/gpu-grid-binning.js.map +1 -1
- package/dist/gpu-core/gpu-grid-coordinate.cjs +41 -0
- package/dist/gpu-core/gpu-grid-coordinate.d.ts +7 -0
- package/dist/gpu-core/gpu-grid-coordinate.d.ts.map +1 -0
- package/dist/gpu-core/gpu-grid-coordinate.js +24 -0
- package/dist/gpu-core/gpu-grid-coordinate.js.map +1 -0
- package/dist/gpu-core/gpu-grid-index-internals.cjs +2 -15
- package/dist/gpu-core/gpu-grid-index-internals.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-index-internals.js +2 -15
- package/dist/gpu-core/gpu-grid-index-internals.js.map +1 -1
- package/dist/gpu-core/gpu-grid-index-query.cjs +2 -16
- package/dist/gpu-core/gpu-grid-index-query.d.ts.map +1 -1
- package/dist/gpu-core/gpu-grid-index-query.js +2 -16
- package/dist/gpu-core/gpu-grid-index-query.js.map +1 -1
- package/dist/gpu-core/gpu-group-aggregation.cjs +7 -15
- package/dist/gpu-core/gpu-group-aggregation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-group-aggregation.js +7 -18
- package/dist/gpu-core/gpu-group-aggregation.js.map +1 -1
- package/dist/gpu-core/gpu-operation.d.ts +4 -4
- package/dist/gpu-core/gpu-operation.d.ts.map +1 -1
- package/dist/gpu-core/gpu-operation.js.map +1 -1
- package/dist/gpu-core/gpu-reduction.cjs +6 -14
- package/dist/gpu-core/gpu-reduction.d.ts.map +1 -1
- package/dist/gpu-core/gpu-reduction.js +6 -15
- package/dist/gpu-core/gpu-reduction.js.map +1 -1
- package/dist/gpu-core/gpu-render-operation.cjs +39 -0
- package/dist/gpu-core/gpu-render-operation.d.ts +21 -0
- package/dist/gpu-core/gpu-render-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-render-operation.js +22 -0
- package/dist/gpu-core/gpu-render-operation.js.map +1 -0
- package/dist/gpu-core/gpu-scan.cjs +46 -32
- package/dist/gpu-core/gpu-scan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-scan.js +56 -44
- package/dist/gpu-core/gpu-scan.js.map +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.cjs +12 -9
- package/dist/gpu-core/gpu-segmented-reduction.d.ts +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.d.ts.map +1 -1
- package/dist/gpu-core/gpu-segmented-reduction.js +12 -9
- package/dist/gpu-core/gpu-segmented-reduction.js.map +1 -1
- package/dist/gpu-core/gpu-segmented-scan.cjs +73 -16
- package/dist/gpu-core/gpu-segmented-scan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-segmented-scan.js +73 -16
- package/dist/gpu-core/gpu-segmented-scan.js.map +1 -1
- package/dist/gpu-core/gpu-semantic-aggregation-operation.cjs +112 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.d.ts +71 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.js +92 -0
- package/dist/gpu-core/gpu-semantic-aggregation-operation.js.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.cjs +267 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.d.ts +29 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.d.ts.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.js +260 -0
- package/dist/gpu-core/gpu-shader-pass-kernel.js.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-operation.cjs +85 -0
- package/dist/gpu-core/gpu-shader-pass-operation.d.ts +32 -0
- package/dist/gpu-core/gpu-shader-pass-operation.d.ts.map +1 -0
- package/dist/gpu-core/gpu-shader-pass-operation.js +74 -0
- package/dist/gpu-core/gpu-shader-pass-operation.js.map +1 -0
- package/dist/gpu-core/gpu-texture-plan.d.ts +3 -2
- package/dist/gpu-core/gpu-texture-plan.d.ts.map +1 -1
- package/dist/gpu-core/gpu-texture-plan.js.map +1 -1
- package/dist/gpu-core/index.cjs +32 -0
- package/dist/gpu-core/index.cjs.map +3 -3
- package/dist/gpu-core/index.d.ts +21 -1
- package/dist/gpu-core/index.d.ts.map +1 -1
- package/dist/gpu-core/index.js +10 -0
- package/dist/gpu-core/index.js.map +1 -1
- package/dist/gpu-data/color-conversion.cjs +105 -0
- package/dist/gpu-data/color-conversion.d.ts +30 -0
- package/dist/gpu-data/color-conversion.d.ts.map +1 -0
- package/dist/gpu-data/color-conversion.js +109 -0
- package/dist/gpu-data/color-conversion.js.map +1 -0
- package/dist/gpu-data/cpu-data.cjs +60 -0
- package/dist/gpu-data/cpu-data.d.ts +28 -0
- package/dist/gpu-data/cpu-data.d.ts.map +1 -0
- package/dist/gpu-data/cpu-data.js +41 -0
- package/dist/gpu-data/cpu-data.js.map +1 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.cjs +98 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts +9 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.d.ts.map +1 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.js +85 -0
- package/dist/gpu-data/cpu-gpu-vector-transfer.js.map +1 -0
- package/dist/gpu-data/cpu-vector.cjs +42 -0
- package/dist/gpu-data/cpu-vector.d.ts +17 -0
- package/dist/gpu-data/cpu-vector.d.ts.map +1 -0
- package/dist/gpu-data/cpu-vector.js +21 -0
- package/dist/gpu-data/cpu-vector.js.map +1 -0
- package/dist/gpu-data/gpu-data-buffer-props.cjs +41 -0
- package/dist/gpu-data/gpu-data-buffer-props.d.ts +5 -0
- package/dist/gpu-data/gpu-data-buffer-props.d.ts.map +1 -0
- package/dist/gpu-data/gpu-data-buffer-props.js +19 -0
- package/dist/gpu-data/gpu-data-buffer-props.js.map +1 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.cjs +50 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.d.ts +41 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.d.ts.map +1 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.js +45 -0
- package/dist/gpu-data/gpu-vector-wgsl-layout.js.map +1 -0
- package/dist/gpu-data/index.cjs +21 -2
- package/dist/gpu-data/index.cjs.map +3 -3
- package/dist/gpu-data/index.d.ts +6 -0
- package/dist/gpu-data/index.d.ts.map +1 -1
- package/dist/gpu-data/index.js +5 -0
- package/dist/gpu-data/index.js.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.cjs +8 -19
- package/dist/gpu-dataframe/gpu-data-frame-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.js +14 -26
- package/dist/gpu-dataframe/gpu-data-frame-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-expression-shader.cjs +87 -5
- package/dist/gpu-dataframe/gpu-expression-shader.d.ts +2 -1
- package/dist/gpu-dataframe/gpu-expression-shader.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression-shader.js +101 -5
- package/dist/gpu-dataframe/gpu-expression-shader.js.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.cjs +177 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts +60 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.js +187 -0
- package/dist/gpu-dataframe/gpu-expression.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-query.cjs +2 -2
- package/dist/gpu-dataframe/gpu-global-aggregation-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-aggregation-query.js +5 -3
- package/dist/gpu-dataframe/gpu-global-aggregation-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.cjs +23 -11
- package/dist/gpu-dataframe/gpu-global-sort-compiler.d.ts +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-global-sort-compiler.js +24 -12
- package/dist/gpu-dataframe/gpu-global-sort-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-group-aggregation-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-group-by-query.cjs +2 -2
- package/dist/gpu-dataframe/gpu-group-by-query.js +5 -3
- package/dist/gpu-dataframe/gpu-group-by-query.js.map +1 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-histogram-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-join-compiler.cjs +0 -2
- package/dist/gpu-dataframe/gpu-join-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-join-compiler.js +0 -2
- package/dist/gpu-dataframe/gpu-join-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-query-compiler.cjs +3 -1
- package/dist/gpu-dataframe/gpu-query-compiler.d.ts +0 -1
- package/dist/gpu-dataframe/gpu-query-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-query-compiler.js +3 -1
- package/dist/gpu-dataframe/gpu-query-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.cjs +0 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.js +0 -1
- package/dist/gpu-dataframe/gpu-sort-compiler.js.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-query.cjs +13 -5
- package/dist/gpu-dataframe/gpu-sort-query.d.ts +4 -1
- package/dist/gpu-dataframe/gpu-sort-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-sort-query.js +14 -5
- package/dist/gpu-dataframe/gpu-sort-query.js.map +1 -1
- package/dist/gpu-dataframe/index.cjs +20 -2
- package/dist/gpu-dataframe/index.cjs.map +3 -3
- package/dist/gpu-dataframe/index.d.ts +6 -2
- package/dist/gpu-dataframe/index.d.ts.map +1 -1
- package/dist/gpu-dataframe/index.js +3 -1
- package/dist/gpu-dataframe/index.js.map +1 -1
- package/dist/gpu-dataframe/portable-expression.cjs +167 -0
- package/dist/gpu-dataframe/portable-expression.d.ts +21 -0
- package/dist/gpu-dataframe/portable-expression.d.ts.map +1 -0
- package/dist/gpu-dataframe/portable-expression.js +162 -0
- package/dist/gpu-dataframe/portable-expression.js.map +1 -0
- package/dist/gpu-dggs/benchmarks.cjs.map +1 -1
- package/dist/gpu-dggs/index.cjs.map +1 -1
- package/dist/gpu-dggs-benchmarks.cjs +21 -0
- package/dist/gpu-dggs-benchmarks.d.ts +2 -0
- package/dist/gpu-dggs-benchmarks.d.ts.map +1 -0
- package/dist/gpu-dggs-benchmarks.js +5 -0
- package/dist/gpu-dggs-benchmarks.js.map +1 -0
- package/dist/gpu-geometry/index.cjs.map +1 -1
- package/dist/gpu-graph/index.cjs +8 -0
- package/dist/gpu-graph/index.cjs.map +3 -3
- package/dist/gpu-graph/index.d.ts +4 -0
- package/dist/gpu-graph/index.d.ts.map +1 -1
- package/dist/gpu-graph/index.js +2 -0
- package/dist/gpu-graph/index.js.map +1 -1
- package/dist/gpu-graph-algorithms/benchmarks.cjs.map +2 -2
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.cjs +2 -15
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.d.ts.map +1 -1
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.js +2 -15
- package/dist/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.js.map +1 -1
- package/dist/gpu-graph-algorithms/index.cjs.map +2 -2
- package/dist/gpu-graph-algorithms-benchmarks.cjs +21 -0
- package/dist/gpu-graph-algorithms-benchmarks.d.ts +2 -0
- package/dist/gpu-graph-algorithms-benchmarks.d.ts.map +1 -0
- package/dist/gpu-graph-algorithms-benchmarks.js +5 -0
- package/dist/gpu-graph-algorithms-benchmarks.js.map +1 -0
- package/dist/gpu-h3/index.cjs.map +1 -1
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.cjs +116 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.d.ts +42 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.d.ts.map +1 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.js +90 -0
- package/dist/gpu-physics/gpu-physics-ensemble-terrain.js.map +1 -0
- package/dist/gpu-physics/gpu-physics-ensemble.cjs +97 -5
- package/dist/gpu-physics/gpu-physics-ensemble.d.ts +31 -2
- package/dist/gpu-physics/gpu-physics-ensemble.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-physics-ensemble.js +99 -3
- package/dist/gpu-physics/gpu-physics-ensemble.js.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.cjs +568 -77
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts +86 -0
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.js +617 -76
- package/dist/gpu-physics/gpu-rigid-body-world.js.map +1 -1
- package/dist/gpu-physics/index.cjs +23 -2
- package/dist/gpu-physics/index.cjs.map +3 -3
- package/dist/gpu-physics/index.d.ts +9 -2
- package/dist/gpu-physics/index.d.ts.map +1 -1
- package/dist/gpu-physics/index.js +6 -1
- package/dist/gpu-physics/index.js.map +1 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.cjs +21 -8
- package/dist/gpu-physics/rigid-body-bounds-shaders.d.ts +2 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.js +15 -1
- package/dist/gpu-physics/rigid-body-bounds-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.cjs +3 -2
- package/dist/gpu-physics/rigid-body-convex-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-convex-shaders.js +3 -2
- package/dist/gpu-physics/rigid-body-convex-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.cjs +36 -7
- package/dist/gpu-physics/rigid-body-ensemble-reset.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-reset.js +42 -7
- package/dist/gpu-physics/rigid-body-ensemble-reset.js.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.cjs +23 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.d.ts +4 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.js +25 -1
- package/dist/gpu-physics/rigid-body-ensemble-transaction.js.map +1 -1
- package/dist/gpu-physics/rigid-body-geometry.cjs +41 -4
- package/dist/gpu-physics/rigid-body-geometry.d.ts +10 -1
- package/dist/gpu-physics/rigid-body-geometry.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-geometry.js +44 -3
- package/dist/gpu-physics/rigid-body-geometry.js.map +1 -1
- package/dist/gpu-physics/rigid-body-height-field-shader.cjs +80 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.d.ts +3 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.js +56 -0
- package/dist/gpu-physics/rigid-body-height-field-shader.js.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field.cjs +166 -0
- package/dist/gpu-physics/rigid-body-height-field.d.ts +55 -0
- package/dist/gpu-physics/rigid-body-height-field.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-height-field.js +184 -0
- package/dist/gpu-physics/rigid-body-height-field.js.map +1 -0
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.cjs +4 -2
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.js +4 -2
- package/dist/gpu-physics/rigid-body-mesh-query-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh.cjs +72 -17
- package/dist/gpu-physics/rigid-body-mesh.d.ts +3 -0
- package/dist/gpu-physics/rigid-body-mesh.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-mesh.js +76 -20
- package/dist/gpu-physics/rigid-body-mesh.js.map +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.cjs +24 -9
- package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-parallel-shaders.js +28 -9
- package/dist/gpu-physics/rigid-body-parallel-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-properties.cjs +4 -4
- package/dist/gpu-physics/rigid-body-properties.d.ts +6 -0
- package/dist/gpu-physics/rigid-body-properties.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-properties.js +1 -1
- package/dist/gpu-physics/rigid-body-properties.js.map +1 -1
- package/dist/gpu-physics/rigid-body-publication.cjs +2 -2
- package/dist/gpu-physics/rigid-body-publication.js +1 -1
- package/dist/gpu-physics/rigid-body-publication.js.map +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.cjs +22 -4
- package/dist/gpu-physics/rigid-body-query-geometry.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-query-geometry.js +22 -4
- package/dist/gpu-physics/rigid-body-query-geometry.js.map +1 -1
- package/dist/gpu-physics/rigid-body-shaders.cjs +12 -6
- package/dist/gpu-physics/rigid-body-shaders.d.ts +1 -1
- package/dist/gpu-physics/rigid-body-shaders.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-shaders.js +15 -7
- package/dist/gpu-physics/rigid-body-shaders.js.map +1 -1
- package/dist/gpu-physics/rigid-body-shape-properties.cjs +2 -0
- package/dist/gpu-physics/rigid-body-shape-properties.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-shape-properties.js +2 -0
- package/dist/gpu-physics/rigid-body-shape-properties.js.map +1 -1
- package/dist/gpu-physics/rigid-body-terrain-atlas.cjs +287 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.d.ts +87 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.js +275 -0
- package/dist/gpu-physics/rigid-body-terrain-atlas.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.cjs +240 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.d.ts +76 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.js +247 -0
- package/dist/gpu-physics/rigid-body-terrain-lod.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.cjs +215 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.d.ts +25 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.js +218 -0
- package/dist/gpu-physics/rigid-body-terrain-stitch.js.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.cjs +263 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.d.ts +97 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.js +250 -0
- package/dist/gpu-physics/rigid-body-terrain-stream.js.map +1 -0
- package/dist/gpu-physics/rigid-body-triggers.cjs +1 -0
- package/dist/gpu-physics/rigid-body-triggers.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-triggers.js +1 -0
- package/dist/gpu-physics/rigid-body-triggers.js.map +1 -1
- package/dist/gpu-physics/rigid-body-vehicle.cjs +145 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts +47 -0
- package/dist/gpu-physics/rigid-body-vehicle.d.ts.map +1 -0
- package/dist/gpu-physics/rigid-body-vehicle.js +119 -0
- package/dist/gpu-physics/rigid-body-vehicle.js.map +1 -0
- package/dist/gpu-pointcloud/index.cjs.map +1 -1
- package/dist/gpu-project/benchmarks.cjs.map +2 -2
- package/dist/gpu-project/coordinate-projection-graph.cjs +59 -0
- package/dist/gpu-project/coordinate-projection-graph.d.ts +23 -0
- package/dist/gpu-project/coordinate-projection-graph.d.ts.map +1 -0
- package/dist/gpu-project/coordinate-projection-graph.js +40 -0
- package/dist/gpu-project/coordinate-projection-graph.js.map +1 -0
- package/dist/gpu-project/cpu-geoarrow.cjs +112 -0
- package/dist/gpu-project/cpu-geoarrow.d.ts +10 -0
- package/dist/gpu-project/cpu-geoarrow.d.ts.map +1 -0
- package/dist/gpu-project/cpu-geoarrow.js +103 -0
- package/dist/gpu-project/cpu-geoarrow.js.map +1 -0
- package/dist/gpu-project/cpu-geometry-pipelines.cjs +134 -0
- package/dist/gpu-project/cpu-geometry-pipelines.d.ts +19 -0
- package/dist/gpu-project/cpu-geometry-pipelines.d.ts.map +1 -0
- package/dist/gpu-project/cpu-geometry-pipelines.js +114 -0
- package/dist/gpu-project/cpu-geometry-pipelines.js.map +1 -0
- package/dist/gpu-project/cpu-projection-operation.cjs +54 -0
- package/dist/gpu-project/cpu-projection-operation.d.ts +14 -0
- package/dist/gpu-project/cpu-projection-operation.d.ts.map +1 -0
- package/dist/gpu-project/cpu-projection-operation.js +37 -0
- package/dist/gpu-project/cpu-projection-operation.js.map +1 -0
- package/dist/gpu-project/crs.cjs.map +3 -3
- package/dist/gpu-project/crs.d.ts +1 -1
- package/dist/gpu-project/geoarrow.cjs +36 -0
- package/dist/gpu-project/geoarrow.cjs.map +6 -0
- package/dist/gpu-project/geoarrow.d.ts +3 -0
- package/dist/gpu-project/geoarrow.d.ts.map +1 -0
- package/dist/gpu-project/geoarrow.js +7 -0
- package/dist/gpu-project/geoarrow.js.map +1 -0
- package/dist/gpu-project/graph.cjs +27 -0
- package/dist/gpu-project/graph.cjs.map +6 -0
- package/dist/gpu-project/graph.d.ts +2 -0
- package/dist/gpu-project/graph.d.ts.map +1 -0
- package/dist/gpu-project/graph.js +6 -0
- package/dist/gpu-project/graph.js.map +1 -0
- package/dist/gpu-project/index.cjs +3 -0
- package/dist/gpu-project/index.cjs.map +3 -3
- package/dist/gpu-project/index.d.ts +1 -0
- package/dist/gpu-project/index.d.ts.map +1 -1
- package/dist/gpu-project/index.js +1 -0
- package/dist/gpu-project/index.js.map +1 -1
- package/dist/gpu-project/projection-crs-benchmark.cjs +2 -2
- package/dist/gpu-project/projection-crs-benchmark.d.ts +1 -1
- package/dist/gpu-project/projection-crs-benchmark.js +1 -1
- package/dist/gpu-project/projection-crs-input.cjs +7 -7
- package/dist/gpu-project/projection-crs-input.d.ts +1 -1
- package/dist/gpu-project/projection-crs-input.js +4 -4
- package/dist/gpu-project/projection-engine.d.ts +2 -2
- package/dist/gpu-project-benchmarks.cjs +21 -0
- package/dist/gpu-project-benchmarks.d.ts +2 -0
- package/dist/gpu-project-benchmarks.d.ts.map +1 -0
- package/dist/gpu-project-benchmarks.js +5 -0
- package/dist/gpu-project-benchmarks.js.map +1 -0
- package/dist/gpu-project-crs.cjs +21 -0
- package/dist/gpu-project-crs.d.ts +2 -0
- package/dist/gpu-project-crs.d.ts.map +1 -0
- package/dist/gpu-project-crs.js +5 -0
- package/dist/gpu-project-crs.js.map +1 -0
- package/dist/gpu-project-geoarrow.cjs +21 -0
- package/dist/gpu-project-geoarrow.d.ts +2 -0
- package/dist/gpu-project-geoarrow.d.ts.map +1 -0
- package/dist/gpu-project-geoarrow.js +5 -0
- package/dist/gpu-project-geoarrow.js.map +1 -0
- package/dist/gpu-project-graph.cjs +21 -0
- package/dist/gpu-project-graph.d.ts +2 -0
- package/dist/gpu-project-graph.d.ts.map +1 -0
- package/dist/gpu-project-graph.js +5 -0
- package/dist/gpu-project-graph.js.map +1 -0
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.cjs +75 -5
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts +5 -1
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.d.ts.map +1 -1
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js +86 -6
- package/dist/gpu-simple-graph/compiled-gpu-expression-graph.js.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.cjs +9 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.d.ts +2 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.js +10 -0
- package/dist/gpu-simple-graph/gpu-simple-graph-lowering.js.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-transfer.d.ts +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-transfer.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-value.d.ts +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph-value.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph.cjs +126 -10
- package/dist/gpu-simple-graph/gpu-simple-graph.d.ts +36 -11
- package/dist/gpu-simple-graph/gpu-simple-graph.d.ts.map +1 -1
- package/dist/gpu-simple-graph/gpu-simple-graph.js +137 -12
- package/dist/gpu-simple-graph/gpu-simple-graph.js.map +1 -1
- package/dist/gpu-simple-graph/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/index.d.ts +1 -1
- package/dist/gpu-simple-graph/index.d.ts.map +1 -1
- package/dist/gpu-simple-graph/index.js.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.cjs +25 -0
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts +7 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js +28 -0
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.js.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.cjs +7 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.d.ts +2 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.js +7 -0
- package/dist/gpu-simple-graph/operation/gpu-vector-evaluator.js.map +1 -1
- package/dist/gpu-simple-graph/operation/operation.d.ts +1 -1
- package/dist/gpu-simple-graph/operation/operation.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/convert-colors.cjs +6 -6
- package/dist/gpu-simple-graph/operations/convert-colors.d.ts +5 -1
- package/dist/gpu-simple-graph/operations/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/convert-colors.js +12 -7
- package/dist/gpu-simple-graph/operations/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.cjs +16 -33
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.js +22 -35
- package/dist/gpu-simple-graph/operations/cpu/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/cpu/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/operations/webgl/index.cjs.map +3 -3
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.cjs +31 -13
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.d.ts.map +1 -1
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.js +42 -13
- package/dist/gpu-simple-graph/operations/webgpu/convert-colors.js.map +1 -1
- package/dist/gpu-simple-graph/operations/webgpu/index.cjs.map +1 -1
- package/dist/gpu-simple-graph-cpu.cjs +21 -0
- package/dist/gpu-simple-graph-cpu.d.ts +2 -0
- package/dist/gpu-simple-graph-cpu.d.ts.map +1 -0
- package/dist/gpu-simple-graph-cpu.js +5 -0
- package/dist/gpu-simple-graph-cpu.js.map +1 -0
- package/dist/gpu-simple-graph-webgl.cjs +21 -0
- package/dist/gpu-simple-graph-webgl.d.ts +2 -0
- package/dist/gpu-simple-graph-webgl.d.ts.map +1 -0
- package/dist/gpu-simple-graph-webgl.js +5 -0
- package/dist/gpu-simple-graph-webgl.js.map +1 -0
- package/dist/gpu-simple-graph-webgpu.cjs +21 -0
- package/dist/gpu-simple-graph-webgpu.d.ts +2 -0
- package/dist/gpu-simple-graph-webgpu.d.ts.map +1 -0
- package/dist/gpu-simple-graph-webgpu.js +5 -0
- package/dist/gpu-simple-graph-webgpu.js.map +1 -0
- package/dist/gpu-sql/gpu-sql.cjs +159 -328
- package/dist/gpu-sql/gpu-sql.d.ts +1 -1
- package/dist/gpu-sql/gpu-sql.d.ts.map +1 -1
- package/dist/gpu-sql/gpu-sql.js +186 -340
- package/dist/gpu-sql/gpu-sql.js.map +1 -1
- package/dist/gpu-sql/index.cjs.map +3 -3
- package/dist/gpu-tables/index.cjs.map +2 -2
- package/dist/gpu-tables/table/gpu-table.cjs +2 -2
- package/dist/gpu-tables/table/gpu-table.d.ts.map +1 -1
- package/dist/gpu-tables/table/gpu-table.js +2 -2
- package/dist/gpu-tables/table/gpu-table.js.map +1 -1
- package/dist/gpu-timeseries/index.cjs.map +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +30 -16
- package/src/arrow/arrow-colors.ts +194 -33
- package/src/arrow/arrow-utils/arrow-paths.ts +5 -3
- package/src/arrow/cpu/arrow-coordinate-projection.ts +18 -0
- package/src/arrow/cpu/arrow-cpu-pipelines.ts +9 -0
- package/src/arrow/cpu/arrow-cpu-vector-adapters.ts +153 -0
- package/src/arrow/geoarrow/arrow-geoarrow-adapter.ts +21 -493
- package/src/arrow/geoarrow/arrow-geoarrow-conversion.ts +7 -5
- package/src/arrow/geoarrow/arrow-polygon-tessellation.ts +1 -1
- package/src/arrow/gpu/arrow-column-gpu-vector.ts +67 -14
- package/src/arrow/gpu/arrow-gpu-table-conversion.ts +96 -4
- package/src/arrow/gpu/arrow-gpu-vector-adapters.ts +20 -7
- package/src/arrow/gpu/arrow-gpu-vector-conversion.ts +49 -6
- package/src/arrow/index.ts +14 -0
- package/src/experimental-models.ts +5 -0
- package/src/experimental-simulation.ts +5 -0
- package/src/geospatial/gpu-point-spatial-query.ts +2 -15
- package/src/gpu-core/compiled-gpu-graph.ts +73 -1
- package/src/gpu-core/gpu-command-graph-compiler.ts +25 -2
- package/src/gpu-core/gpu-command-graph-types.ts +20 -0
- package/src/gpu-core/gpu-command-graph.ts +48 -11
- package/src/gpu-core/gpu-cpu-execution.ts +345 -0
- package/src/gpu-core/gpu-cpu-operation.ts +65 -0
- package/src/gpu-core/gpu-dispatch-utils.ts +13 -1
- package/src/gpu-core/gpu-expression-operation.ts +1 -1
- package/src/gpu-core/gpu-expression-plan.ts +11 -3
- package/src/gpu-core/gpu-graph-compiler.ts +61 -0
- package/src/gpu-core/gpu-graph.ts +3 -3
- package/src/gpu-core/gpu-grid-aggregation.ts +2 -5
- package/src/gpu-core/gpu-grid-binning.ts +2 -5
- package/src/gpu-core/gpu-grid-coordinate.ts +24 -0
- package/src/gpu-core/gpu-grid-index-internals.ts +2 -15
- package/src/gpu-core/gpu-grid-index-query.ts +2 -16
- package/src/gpu-core/gpu-group-aggregation.ts +38 -50
- package/src/gpu-core/gpu-operation.ts +9 -7
- package/src/gpu-core/gpu-reduction.ts +32 -42
- package/src/gpu-core/gpu-render-operation.ts +42 -0
- package/src/gpu-core/gpu-scan.ts +59 -45
- package/src/gpu-core/gpu-segmented-reduction.ts +20 -10
- package/src/gpu-core/gpu-segmented-scan.ts +82 -17
- package/src/gpu-core/gpu-semantic-aggregation-operation.ts +150 -0
- package/src/gpu-core/gpu-shader-pass-kernel.ts +307 -0
- package/src/gpu-core/gpu-shader-pass-operation.ts +103 -0
- package/src/gpu-core/gpu-texture-plan.ts +3 -2
- package/src/gpu-core/index.ts +39 -0
- package/src/gpu-data/color-conversion.ts +158 -0
- package/src/gpu-data/cpu-data.ts +62 -0
- package/src/gpu-data/cpu-gpu-vector-transfer.ts +110 -0
- package/src/gpu-data/cpu-vector.ts +31 -0
- package/src/gpu-data/gpu-data-buffer-props.ts +25 -0
- package/src/gpu-data/gpu-vector-wgsl-layout.ts +79 -0
- package/src/gpu-data/index.ts +15 -0
- package/src/gpu-dataframe/gpu-data-frame-query.ts +24 -31
- package/src/gpu-dataframe/gpu-expression-shader.ts +128 -7
- package/src/gpu-dataframe/gpu-expression.ts +259 -1
- package/src/gpu-dataframe/gpu-global-aggregation-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-global-aggregation-query.ts +5 -3
- package/src/gpu-dataframe/gpu-global-sort-compiler.ts +26 -12
- package/src/gpu-dataframe/gpu-group-aggregation-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-group-by-query.ts +5 -3
- package/src/gpu-dataframe/gpu-histogram-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-join-compiler.ts +0 -2
- package/src/gpu-dataframe/gpu-query-compiler.ts +3 -3
- package/src/gpu-dataframe/gpu-sort-compiler.ts +0 -1
- package/src/gpu-dataframe/gpu-sort-query.ts +31 -5
- package/src/gpu-dataframe/index.ts +26 -2
- package/src/gpu-dataframe/portable-expression.ts +194 -0
- package/src/gpu-dggs-benchmarks.ts +5 -0
- package/src/gpu-graph/index.ts +17 -0
- package/src/gpu-graph-algorithms/gpu-graph-spatial-force-layout-internals.ts +2 -15
- package/src/gpu-graph-algorithms-benchmarks.ts +5 -0
- package/src/gpu-physics/gpu-physics-ensemble-terrain.ts +114 -0
- package/src/gpu-physics/gpu-physics-ensemble.ts +147 -4
- package/src/gpu-physics/gpu-rigid-body-world.ts +797 -102
- package/src/gpu-physics/index.ts +38 -0
- package/src/gpu-physics/rigid-body-bounds-shaders.ts +16 -1
- package/src/gpu-physics/rigid-body-convex-shaders.ts +3 -2
- package/src/gpu-physics/rigid-body-ensemble-reset.ts +48 -8
- package/src/gpu-physics/rigid-body-ensemble-transaction.ts +34 -1
- package/src/gpu-physics/rigid-body-geometry.ts +49 -4
- package/src/gpu-physics/rigid-body-height-field-shader.ts +56 -0
- package/src/gpu-physics/rigid-body-height-field.ts +257 -0
- package/src/gpu-physics/rigid-body-mesh-query-shaders.ts +4 -2
- package/src/gpu-physics/rigid-body-mesh.ts +97 -26
- package/src/gpu-physics/rigid-body-parallel-shaders.ts +32 -9
- package/src/gpu-physics/rigid-body-properties.ts +5 -2
- package/src/gpu-physics/rigid-body-publication.ts +1 -1
- package/src/gpu-physics/rigid-body-query-geometry.ts +22 -4
- package/src/gpu-physics/rigid-body-shaders.ts +19 -7
- package/src/gpu-physics/rigid-body-shape-properties.ts +2 -0
- package/src/gpu-physics/rigid-body-terrain-atlas.ts +378 -0
- package/src/gpu-physics/rigid-body-terrain-lod.ts +332 -0
- package/src/gpu-physics/rigid-body-terrain-stitch.ts +286 -0
- package/src/gpu-physics/rigid-body-terrain-stream.ts +323 -0
- package/src/gpu-physics/rigid-body-triggers.ts +1 -0
- package/src/gpu-physics/rigid-body-vehicle.ts +166 -0
- package/src/gpu-project/README.md +2 -2
- package/src/gpu-project/coordinate-projection-graph.ts +59 -0
- package/src/gpu-project/cpu-geoarrow.ts +135 -0
- package/src/gpu-project/cpu-geometry-pipelines.ts +159 -0
- package/src/gpu-project/cpu-projection-operation.ts +49 -0
- package/src/gpu-project/crs.ts +2 -2
- package/src/gpu-project/geoarrow.ts +11 -0
- package/src/gpu-project/graph.ts +10 -0
- package/src/gpu-project/index.ts +2 -0
- package/src/gpu-project/projection-crs-benchmark.ts +2 -2
- package/src/gpu-project/projection-crs-input.ts +4 -4
- package/src/gpu-project/projection-engine.ts +2 -2
- package/src/gpu-project-benchmarks.ts +5 -0
- package/src/gpu-project-crs.ts +5 -0
- package/src/gpu-project-geoarrow.ts +5 -0
- package/src/gpu-project-graph.ts +5 -0
- package/src/gpu-simple-graph/compiled-gpu-expression-graph.ts +97 -6
- package/src/gpu-simple-graph/gpu-simple-graph-lowering.ts +11 -0
- package/src/gpu-simple-graph/gpu-simple-graph-transfer.ts +1 -1
- package/src/gpu-simple-graph/gpu-simple-graph-value.ts +1 -1
- package/src/gpu-simple-graph/gpu-simple-graph.ts +163 -19
- package/src/gpu-simple-graph/index.ts +1 -0
- package/src/gpu-simple-graph/operation/gpu-data-evaluator.ts +25 -1
- package/src/gpu-simple-graph/operation/gpu-vector-evaluator.ts +7 -0
- package/src/gpu-simple-graph/operation/operation.ts +1 -1
- package/src/gpu-simple-graph/operations/convert-colors.ts +22 -7
- package/src/gpu-simple-graph/operations/cpu/convert-colors.ts +31 -48
- package/src/gpu-simple-graph/operations/swizzle.ts +1 -1
- package/src/gpu-simple-graph/operations/webgpu/convert-colors.ts +47 -13
- package/src/gpu-simple-graph-cpu.ts +5 -0
- package/src/gpu-simple-graph-webgl.ts +5 -0
- package/src/gpu-simple-graph-webgpu.ts +5 -0
- package/src/gpu-sql/gpu-sql.ts +238 -354
- package/src/gpu-tables/table/gpu-table.ts +2 -1
- package/src/index.ts +21 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {GPURigidBodyTerrainEdge, GPURigidBodyTerrainSeam} from './rigid-body-terrain-stitch';
|
|
6
|
+
import type {GPURigidBodyTerrainSlot, GPURigidBodyTerrainWindow} from './rigid-body-terrain-stream';
|
|
7
|
+
|
|
8
|
+
/** Planar metric bounds, in minimum east, minimum north, maximum east, maximum north order. */
|
|
9
|
+
export type GPURigidBodyTerrainBounds = readonly [number, number, number, number];
|
|
10
|
+
|
|
11
|
+
/** Quadtree address in a common metric frame. Rows increase along the positive north axis. */
|
|
12
|
+
export type GPURigidBodyTerrainAddress = Readonly<{
|
|
13
|
+
/** Zero at the root. */
|
|
14
|
+
level: number;
|
|
15
|
+
/** West-to-east index at this level. */
|
|
16
|
+
column: number;
|
|
17
|
+
/** South-to-north index at this level. */
|
|
18
|
+
row: number;
|
|
19
|
+
}>;
|
|
20
|
+
|
|
21
|
+
/** A selected provider tile, receiving collider, and sampling bounds. */
|
|
22
|
+
export type GPURigidBodySelectedTerrainTile = GPURigidBodyTerrainSlot & {
|
|
23
|
+
/** Quadtree position of the tile. */
|
|
24
|
+
address: GPURigidBodyTerrainAddress;
|
|
25
|
+
/** Metric domain expected in the fetched tile. */
|
|
26
|
+
bounds: GPURigidBodyTerrainBounds;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** A collider window and its quadtree selection diagnostics. */
|
|
30
|
+
export interface GPURigidBodyTerrainSelection extends GPURigidBodyTerrainWindow {
|
|
31
|
+
/** Selected nonoverlapping leaves with stable assignments where possible. */
|
|
32
|
+
tiles: readonly GPURigidBodySelectedTerrainTile[];
|
|
33
|
+
/** Edge matches computed from the selected quadtree leaves. */
|
|
34
|
+
seams: readonly GPURigidBodyTerrainSeam[];
|
|
35
|
+
/** Refinement was limited by the reserved collider slots. */
|
|
36
|
+
slotLimitReached: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Dataset coverage and selection policy. */
|
|
40
|
+
export type GPURigidBodyTerrainSelectorProps = {
|
|
41
|
+
/** Bounds of the root tile in a shared local metric frame. */
|
|
42
|
+
bounds: GPURigidBodyTerrainBounds;
|
|
43
|
+
/** Reserved fixed-dimension height-field collider indices. */
|
|
44
|
+
slots: readonly number[];
|
|
45
|
+
/** Deepest available quadtree level. */
|
|
46
|
+
maximumLevel: number;
|
|
47
|
+
/** Refine within this many tile widths of the focus. Defaults to one. */
|
|
48
|
+
refinementDistance?: number;
|
|
49
|
+
/** Fractional dead band around LOD and residency thresholds. Defaults to 0.2. */
|
|
50
|
+
hysteresis?: number;
|
|
51
|
+
/** Resolve a revisioned provider key. Undefined denotes a missing tile. */
|
|
52
|
+
getTileKey?: (address: GPURigidBodyTerrainAddress) => string | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** Location and optional collision residency radius used for one selection. */
|
|
56
|
+
export type GPURigidBodyTerrainFocus = {
|
|
57
|
+
/** Position of a camera, chassis, or predicted simulation focus in metric XY. */
|
|
58
|
+
position: readonly [number, number];
|
|
59
|
+
/** Include tiles intersecting this radius. Omit to keep coarse coverage to the root boundary. */
|
|
60
|
+
radius?: number;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** A leaf and its order of preference for refinement. */
|
|
64
|
+
type Candidate = {
|
|
65
|
+
id: string;
|
|
66
|
+
key: string;
|
|
67
|
+
address: GPURigidBodyTerrainAddress;
|
|
68
|
+
bounds: GPURigidBodyTerrainBounds;
|
|
69
|
+
priority: number;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** Relative offsets, and the matching grid-index edges of a neighbor. */
|
|
73
|
+
const DIRECTIONS = [
|
|
74
|
+
{column: -1, row: 0, edge: 'first-column', opposite: 'last-column'},
|
|
75
|
+
{column: 1, row: 0, edge: 'last-column', opposite: 'first-column'},
|
|
76
|
+
{column: 0, row: -1, edge: 'first-row', opposite: 'last-row'},
|
|
77
|
+
{column: 0, row: 1, edge: 'last-row', opposite: 'first-row'}
|
|
78
|
+
] as const satisfies readonly {
|
|
79
|
+
column: number;
|
|
80
|
+
row: number;
|
|
81
|
+
edge: GPURigidBodyTerrainEdge;
|
|
82
|
+
opposite: GPURigidBodyTerrainEdge;
|
|
83
|
+
}[];
|
|
84
|
+
|
|
85
|
+
/** Resolve the sampling domain of a quadtree address from the root extent. */
|
|
86
|
+
export function getRigidBodyTerrainTileBounds(
|
|
87
|
+
bounds: GPURigidBodyTerrainBounds,
|
|
88
|
+
address: GPURigidBodyTerrainAddress
|
|
89
|
+
): GPURigidBodyTerrainBounds {
|
|
90
|
+
const divisions = 2 ** address.level;
|
|
91
|
+
const east = (bounds[2] - bounds[0]) / divisions;
|
|
92
|
+
const north = (bounds[3] - bounds[1]) / divisions;
|
|
93
|
+
return [
|
|
94
|
+
bounds[0] + address.column * east,
|
|
95
|
+
bounds[1] + address.row * north,
|
|
96
|
+
bounds[0] + (address.column + 1) * east,
|
|
97
|
+
bounds[1] + (address.row + 1) * north
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Select a bounded collision window with 2:1 neighboring LODs and automatic seam declarations. */
|
|
102
|
+
export class GPURigidBodyTerrainSelector {
|
|
103
|
+
/** A detached copy of the dataset extent. */
|
|
104
|
+
private readonly bounds: GPURigidBodyTerrainBounds;
|
|
105
|
+
/** Stable slot order used to break ties. */
|
|
106
|
+
private readonly slots: readonly number[];
|
|
107
|
+
/** Per-tile distance threshold multiplier. */
|
|
108
|
+
private readonly refinementDistance: number;
|
|
109
|
+
/** LOD and residency dead band. */
|
|
110
|
+
private readonly hysteresis: number;
|
|
111
|
+
/** Collider assignment from the last selected window. */
|
|
112
|
+
private previous = new Map<string, number>();
|
|
113
|
+
/** Previously split ancestors, used to retain detail near the threshold. */
|
|
114
|
+
private previousSplits = new Set<string>();
|
|
115
|
+
|
|
116
|
+
/** Establish the provider topology and fixed collider budget. */
|
|
117
|
+
constructor(private readonly props: GPURigidBodyTerrainSelectorProps) {
|
|
118
|
+
const {bounds, maximumLevel, slots} = props;
|
|
119
|
+
this.refinementDistance = props.refinementDistance ?? 1;
|
|
120
|
+
this.hysteresis = props.hysteresis ?? 0.2;
|
|
121
|
+
if (
|
|
122
|
+
bounds.length !== 4 ||
|
|
123
|
+
!bounds.every(Number.isFinite) ||
|
|
124
|
+
!Number.isFinite(bounds[2] - bounds[0]) ||
|
|
125
|
+
!Number.isFinite(bounds[3] - bounds[1]) ||
|
|
126
|
+
bounds[2] <= bounds[0] ||
|
|
127
|
+
bounds[3] <= bounds[1] ||
|
|
128
|
+
!Number.isSafeInteger(maximumLevel) ||
|
|
129
|
+
maximumLevel < 0 ||
|
|
130
|
+
maximumLevel > 24 ||
|
|
131
|
+
!slots.length ||
|
|
132
|
+
new Set(slots).size !== slots.length ||
|
|
133
|
+
slots.some(slot => !Number.isSafeInteger(slot) || slot < 0) ||
|
|
134
|
+
!Number.isFinite(this.refinementDistance) ||
|
|
135
|
+
this.refinementDistance < 0 ||
|
|
136
|
+
!Number.isFinite(this.hysteresis) ||
|
|
137
|
+
this.hysteresis < 0 ||
|
|
138
|
+
this.hysteresis >= 1
|
|
139
|
+
)
|
|
140
|
+
throw new Error('Invalid terrain selection policy');
|
|
141
|
+
this.bounds = [...bounds];
|
|
142
|
+
this.slots = [...slots];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** Forget LOD hysteresis and previous slot choices after teleporting or resetting the app. */
|
|
146
|
+
reset(): void {
|
|
147
|
+
this.previous.clear();
|
|
148
|
+
this.previousSplits.clear();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** Select leaves near the focus. Missing children or exhausted slots retain their parent. */
|
|
152
|
+
select(focus: GPURigidBodyTerrainFocus): GPURigidBodyTerrainSelection {
|
|
153
|
+
const {position, radius = Infinity} = focus;
|
|
154
|
+
if (position.length !== 2 || !position.every(Number.isFinite) || !(radius >= 0))
|
|
155
|
+
throw new Error('Invalid terrain focus');
|
|
156
|
+
const leaves = new Map<string, Candidate>();
|
|
157
|
+
const split = new Set<string>();
|
|
158
|
+
const queue: Candidate[] = [];
|
|
159
|
+
let slotLimitReached = false;
|
|
160
|
+
|
|
161
|
+
/** Calculate proximity and consult the catalog only for the active residency footprint. */
|
|
162
|
+
const getCandidate = (
|
|
163
|
+
address: GPURigidBodyTerrainAddress,
|
|
164
|
+
bounds: GPURigidBodyTerrainBounds
|
|
165
|
+
) => {
|
|
166
|
+
const id = addressKey(address);
|
|
167
|
+
const distance = Math.hypot(
|
|
168
|
+
Math.max(0, bounds[0] - position[0], position[0] - bounds[2]),
|
|
169
|
+
Math.max(0, bounds[1] - position[1], position[1] - bounds[3])
|
|
170
|
+
);
|
|
171
|
+
const retained = this.previous.has(id) || this.previousSplits.has(id);
|
|
172
|
+
if (distance > radius * (retained ? 1 + this.hysteresis : 1)) return null;
|
|
173
|
+
const key = this.props.getTileKey ? this.props.getTileKey(address) : id;
|
|
174
|
+
if (!key) return undefined;
|
|
175
|
+
const priority = distance / Math.min(bounds[2] - bounds[0], bounds[3] - bounds[1]);
|
|
176
|
+
return {id, key, address, bounds, priority};
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** Register a leaf and enqueue it if the focus requires a finer resolution. */
|
|
180
|
+
const add = (tile: Candidate) => {
|
|
181
|
+
leaves.set(tile.id, tile);
|
|
182
|
+
const retained = this.previousSplits.has(tile.id);
|
|
183
|
+
const threshold =
|
|
184
|
+
this.refinementDistance * (retained ? 1 + this.hysteresis : 1 - this.hysteresis);
|
|
185
|
+
if (tile.address.level < this.props.maximumLevel && tile.priority <= threshold)
|
|
186
|
+
pushCandidate(queue, tile);
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const root = getCandidate({level: 0, column: 0, row: 0}, this.bounds);
|
|
190
|
+
if (root) add(root);
|
|
191
|
+
while (queue.length) {
|
|
192
|
+
const tile = popCandidate(queue);
|
|
193
|
+
if (!leaves.has(tile.id)) continue;
|
|
194
|
+
const refinements = new Map<Candidate, Candidate[]>();
|
|
195
|
+
let slotCost = 0;
|
|
196
|
+
/** Stage the requested split and any coarser neighbor splits needed to preserve 2:1. */
|
|
197
|
+
const planSplit = (parent: Candidate): boolean => {
|
|
198
|
+
if (refinements.has(parent)) return true;
|
|
199
|
+
const children: Candidate[] = [];
|
|
200
|
+
const {level, column, row} = parent.address;
|
|
201
|
+
for (let child = 0; child < 4; child++) {
|
|
202
|
+
const address = {
|
|
203
|
+
level: level + 1,
|
|
204
|
+
column: column * 2 + (child % 2),
|
|
205
|
+
row: row * 2 + Math.floor(child / 2)
|
|
206
|
+
};
|
|
207
|
+
const candidate = getCandidate(
|
|
208
|
+
address,
|
|
209
|
+
getRigidBodyTerrainTileBounds(this.bounds, address)
|
|
210
|
+
);
|
|
211
|
+
if (candidate === undefined) return false;
|
|
212
|
+
if (candidate) children.push(candidate);
|
|
213
|
+
}
|
|
214
|
+
if (!children.length) return false;
|
|
215
|
+
refinements.set(parent, children);
|
|
216
|
+
slotCost += children.length - 1;
|
|
217
|
+
if (leaves.size + slotCost > this.slots.length) {
|
|
218
|
+
slotLimitReached = true;
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
for (const direction of DIRECTIONS) {
|
|
222
|
+
const neighbor = getNeighbor(leaves, parent.address, direction);
|
|
223
|
+
if (neighbor && neighbor.address.level < level && !planSplit(neighbor)) return false;
|
|
224
|
+
}
|
|
225
|
+
return true;
|
|
226
|
+
};
|
|
227
|
+
if (!planSplit(tile)) continue;
|
|
228
|
+
for (const [parent, children] of refinements) {
|
|
229
|
+
leaves.delete(parent.id);
|
|
230
|
+
split.add(parent.id);
|
|
231
|
+
for (const child of children) add(child);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const assignments = new Map<string, number>();
|
|
236
|
+
for (const id of leaves.keys()) {
|
|
237
|
+
const slot = this.previous.get(id);
|
|
238
|
+
if (slot !== undefined) assignments.set(id, slot);
|
|
239
|
+
}
|
|
240
|
+
const taken = new Set(assignments.values());
|
|
241
|
+
const vacancies = this.slots.filter(slot => !taken.has(slot));
|
|
242
|
+
let nextSlot = 0;
|
|
243
|
+
const tiles = Array.from(leaves.values(), ({id, key, address, bounds}) => {
|
|
244
|
+
const collider = assignments.get(id) ?? vacancies[nextSlot++];
|
|
245
|
+
assignments.set(id, collider);
|
|
246
|
+
return {collider, key, address, bounds};
|
|
247
|
+
});
|
|
248
|
+
const seams: GPURigidBodyTerrainSeam[] = [];
|
|
249
|
+
for (const tile of tiles) {
|
|
250
|
+
for (const direction of DIRECTIONS) {
|
|
251
|
+
const neighbor = getNeighbor(leaves, tile.address, direction);
|
|
252
|
+
if (!neighbor) continue;
|
|
253
|
+
const collider = assignments.get(neighbor.id)!;
|
|
254
|
+
// A fine tile finds its coarse neighbor by walking ancestors. Equal levels only emit once.
|
|
255
|
+
if (neighbor.address.level === tile.address.level && collider < tile.collider) continue;
|
|
256
|
+
seams.push({
|
|
257
|
+
first: tile.collider,
|
|
258
|
+
firstEdge: direction.edge,
|
|
259
|
+
second: collider,
|
|
260
|
+
secondEdge: direction.opposite
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
this.previous = assignments;
|
|
265
|
+
this.previousSplits = split;
|
|
266
|
+
return {tiles, seams, slotLimitReached};
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/** Encode a dyadic tile address as its default provider key. */
|
|
271
|
+
function addressKey(address: GPURigidBodyTerrainAddress): string {
|
|
272
|
+
return `${address.level}/${address.column}/${address.row}`;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** Find a same-level or coarser leaf across an edge. Fine neighbors emit their own seam. */
|
|
276
|
+
function getNeighbor(
|
|
277
|
+
leaves: ReadonlyMap<string, Candidate>,
|
|
278
|
+
address: GPURigidBodyTerrainAddress,
|
|
279
|
+
direction: (typeof DIRECTIONS)[number]
|
|
280
|
+
): Candidate | undefined {
|
|
281
|
+
let column = address.column + direction.column;
|
|
282
|
+
let row = address.row + direction.row;
|
|
283
|
+
const count = 2 ** address.level;
|
|
284
|
+
if (column < 0 || row < 0 || column >= count || row >= count) return undefined;
|
|
285
|
+
for (let level = address.level; level >= 0; level--) {
|
|
286
|
+
const tile = leaves.get(addressKey({level, column, row}));
|
|
287
|
+
if (tile) return tile;
|
|
288
|
+
column = Math.floor(column / 2);
|
|
289
|
+
row = Math.floor(row / 2);
|
|
290
|
+
}
|
|
291
|
+
return undefined;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** Prefer nearby tiles and resolve equal priorities deterministically. */
|
|
295
|
+
function compareCandidates(first: Candidate, second: Candidate): number {
|
|
296
|
+
return (
|
|
297
|
+
first.priority - second.priority ||
|
|
298
|
+
first.address.level - second.address.level ||
|
|
299
|
+
first.address.row - second.address.row ||
|
|
300
|
+
first.address.column - second.address.column
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** Insert a refinement candidate in the priority heap. */
|
|
305
|
+
function pushCandidate(queue: Candidate[], candidate: Candidate): void {
|
|
306
|
+
let index = queue.length;
|
|
307
|
+
queue.push(candidate);
|
|
308
|
+
while (index > 0) {
|
|
309
|
+
const parent = Math.floor((index - 1) / 2);
|
|
310
|
+
if (compareCandidates(queue[parent], candidate) <= 0) break;
|
|
311
|
+
queue[index] = queue[parent];
|
|
312
|
+
index = parent;
|
|
313
|
+
}
|
|
314
|
+
queue[index] = candidate;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/** Remove the highest-priority refinement candidate. */
|
|
318
|
+
function popCandidate(queue: Candidate[]): Candidate {
|
|
319
|
+
const first = queue[0];
|
|
320
|
+
const last = queue.pop()!;
|
|
321
|
+
if (!queue.length) return first;
|
|
322
|
+
let index = 0;
|
|
323
|
+
while (index * 2 + 1 < queue.length) {
|
|
324
|
+
let child = index * 2 + 1;
|
|
325
|
+
if (child + 1 < queue.length && compareCandidates(queue[child + 1], queue[child]) < 0) child++;
|
|
326
|
+
if (compareCandidates(last, queue[child]) <= 0) break;
|
|
327
|
+
queue[index] = queue[child];
|
|
328
|
+
index = child;
|
|
329
|
+
}
|
|
330
|
+
queue[index] = last;
|
|
331
|
+
return first;
|
|
332
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {GPURigidBodyHeightField} from './rigid-body-height-field';
|
|
6
|
+
import type {RigidBodyVector} from './rigid-body-properties';
|
|
7
|
+
|
|
8
|
+
/** A source tile in the common metric frame shared by the receiving collider slots. */
|
|
9
|
+
export type GPURigidBodyTerrainTile = {
|
|
10
|
+
/** Source samples and affine grid transform. */
|
|
11
|
+
field: GPURigidBodyHeightField;
|
|
12
|
+
/** Placement of the tile in the common frame. */
|
|
13
|
+
position: RigidBodyVector;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** Grid-index boundary, independent of the compass direction of its affine transform. */
|
|
17
|
+
export type GPURigidBodyTerrainEdge = 'first-column' | 'last-column' | 'first-row' | 'last-row';
|
|
18
|
+
|
|
19
|
+
/** Two declared adjacent edges indexed by collider slot in a terrain window. */
|
|
20
|
+
export type GPURigidBodyTerrainSeam = {
|
|
21
|
+
/** First collider slot. */
|
|
22
|
+
first: number;
|
|
23
|
+
/** Edge of the first tile. */
|
|
24
|
+
firstEdge: GPURigidBodyTerrainEdge;
|
|
25
|
+
/** Second collider slot. */
|
|
26
|
+
second: number;
|
|
27
|
+
/** Edge of the second tile. */
|
|
28
|
+
secondEdge: GPURigidBodyTerrainEdge;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** Metric sample positions and their row-major indices on one boundary. */
|
|
32
|
+
type Boundary = {
|
|
33
|
+
slot: number;
|
|
34
|
+
tile: GPURigidBodyTerrainTile;
|
|
35
|
+
origin: readonly [number, number];
|
|
36
|
+
step: readonly [number, number];
|
|
37
|
+
count: number;
|
|
38
|
+
index: (sample: number) => number;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** One equivalence class of colocated boundary samples. */
|
|
42
|
+
type Sample = {
|
|
43
|
+
parent: Sample | null;
|
|
44
|
+
value: number;
|
|
45
|
+
spacing: number;
|
|
46
|
+
slot: number;
|
|
47
|
+
index: number;
|
|
48
|
+
valid: boolean;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** A fine boundary sample constrained to a coarse linear segment. */
|
|
52
|
+
type Interpolation = {fine: Sample; lower: Sample; upper: Sample; fraction: number};
|
|
53
|
+
|
|
54
|
+
/** Match aligned mixed-resolution edges without mutating any provider tile. */
|
|
55
|
+
export function stitchRigidBodyTerrainTiles(
|
|
56
|
+
tiles: ReadonlyMap<number, GPURigidBodyTerrainTile>,
|
|
57
|
+
seams: readonly GPURigidBodyTerrainSeam[]
|
|
58
|
+
): ReadonlyMap<number, GPURigidBodyTerrainTile> {
|
|
59
|
+
if (!seams.length) return tiles;
|
|
60
|
+
const samples = new Map<number, Map<number, Sample>>();
|
|
61
|
+
const constraints: Interpolation[] = [];
|
|
62
|
+
const aliases: [Sample, Sample][] = [];
|
|
63
|
+
|
|
64
|
+
/** Retain original samples until every neighbor and corner constraint is collected. */
|
|
65
|
+
const getSample = (boundary: Boundary, edgeIndex: number): Sample => {
|
|
66
|
+
let tileSamples = samples.get(boundary.slot);
|
|
67
|
+
if (!tileSamples) {
|
|
68
|
+
tileSamples = new Map();
|
|
69
|
+
samples.set(boundary.slot, tileSamples);
|
|
70
|
+
}
|
|
71
|
+
const index = boundary.index(edgeIndex);
|
|
72
|
+
const {field, position} = boundary.tile;
|
|
73
|
+
const sourceHeight = field.heights?.[index] ?? NaN;
|
|
74
|
+
const spacing = Math.hypot(...boundary.step);
|
|
75
|
+
let sample = tileSamples.get(index);
|
|
76
|
+
if (!sample) {
|
|
77
|
+
sample = {
|
|
78
|
+
parent: null,
|
|
79
|
+
value: sourceHeight + position[2],
|
|
80
|
+
valid: Number.isFinite(sourceHeight) && field.validity?.[index] !== 0,
|
|
81
|
+
spacing,
|
|
82
|
+
slot: boundary.slot,
|
|
83
|
+
index
|
|
84
|
+
};
|
|
85
|
+
tileSamples.set(index, sample);
|
|
86
|
+
} else {
|
|
87
|
+
sample.spacing = Math.max(sample.spacing, spacing);
|
|
88
|
+
}
|
|
89
|
+
return sample;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
for (const seam of seams) {
|
|
93
|
+
const first = makeBoundary(tiles, seam.first, seam.firstEdge);
|
|
94
|
+
const second = makeBoundary(tiles, seam.second, seam.secondEdge);
|
|
95
|
+
if (first.slot === second.slot) throw new Error('Terrain seam requires distinct tiles');
|
|
96
|
+
const firstSpacing = Math.hypot(...first.step);
|
|
97
|
+
const secondSpacing = Math.hypot(...second.step);
|
|
98
|
+
const firstIsCoarse = firstSpacing >= secondSpacing;
|
|
99
|
+
const coarse = firstIsCoarse ? first : second;
|
|
100
|
+
const fine = firstIsCoarse ? second : first;
|
|
101
|
+
const spacing = Math.max(firstSpacing, secondSpacing);
|
|
102
|
+
const spacingRatio = Math.min(firstSpacing, secondSpacing) / spacing;
|
|
103
|
+
if (!Number.isFinite(spacingRatio) || spacingRatio <= 0)
|
|
104
|
+
throw new Error('Invalid terrain edge spacing');
|
|
105
|
+
|
|
106
|
+
const direction = coarse.step.map(value => value / spacing);
|
|
107
|
+
const offset = fine.origin.map((value, axis) => value - coarse.origin[axis]);
|
|
108
|
+
const projectedStart = (offset[0] * direction[0] + offset[1] * direction[1]) / spacing;
|
|
109
|
+
const projectedStep = (fine.step[0] * direction[0] + fine.step[1] * direction[1]) / spacing;
|
|
110
|
+
// Include subtraction roundoff from large anchors. Reject an ambiguous lattice fit.
|
|
111
|
+
const tolerance =
|
|
112
|
+
16 *
|
|
113
|
+
Number.EPSILON *
|
|
114
|
+
Math.max(
|
|
115
|
+
1,
|
|
116
|
+
coarse.count,
|
|
117
|
+
fine.count,
|
|
118
|
+
...coarse.origin.map(value => Math.abs(value) / spacing),
|
|
119
|
+
...fine.origin.map(value => Math.abs(value) / spacing)
|
|
120
|
+
);
|
|
121
|
+
const lateralStart = (offset[0] * direction[1] - offset[1] * direction[0]) / spacing;
|
|
122
|
+
const lateralStep = (fine.step[0] * direction[1] - fine.step[1] * direction[0]) / spacing;
|
|
123
|
+
const subdivision = Math.round(1 / spacingRatio);
|
|
124
|
+
if (
|
|
125
|
+
tolerance >= spacingRatio * 0.01 ||
|
|
126
|
+
Math.max(Math.abs(lateralStart), Math.abs(lateralStart + lateralStep * (fine.count - 1))) >
|
|
127
|
+
tolerance ||
|
|
128
|
+
Math.abs(Math.abs(projectedStep) - 1 / subdivision) * (fine.count - 1) > tolerance ||
|
|
129
|
+
Math.abs(projectedStart * subdivision - Math.round(projectedStart * subdivision)) >
|
|
130
|
+
tolerance * subdivision
|
|
131
|
+
)
|
|
132
|
+
throw new Error('Terrain seam requires collinear nested sample lattices');
|
|
133
|
+
|
|
134
|
+
// Work on exact integer subdivisions after matching the physical lattice.
|
|
135
|
+
const start = Math.round(projectedStart * subdivision);
|
|
136
|
+
const directionSign = Math.sign(projectedStep);
|
|
137
|
+
const end = start + directionSign * (fine.count - 1);
|
|
138
|
+
const lower = Math.max(0, Math.min(start, end));
|
|
139
|
+
const upper = Math.min((coarse.count - 1) * subdivision, Math.max(start, end));
|
|
140
|
+
if (upper <= lower || lower % subdivision !== 0 || upper % subdivision !== 0)
|
|
141
|
+
throw new Error('Terrain seam overlap must start and end at common sample knots');
|
|
142
|
+
|
|
143
|
+
for (let knot = lower; knot <= upper; knot++) {
|
|
144
|
+
const fineSample = getSample(fine, (knot - start) * directionSign);
|
|
145
|
+
const lowerIndex = Math.floor(knot / subdivision);
|
|
146
|
+
const lowerSample = getSample(coarse, lowerIndex);
|
|
147
|
+
const remainder = knot % subdivision;
|
|
148
|
+
if (remainder === 0) {
|
|
149
|
+
aliases.push([fineSample, lowerSample]);
|
|
150
|
+
} else {
|
|
151
|
+
constraints.push({
|
|
152
|
+
fine: fineSample,
|
|
153
|
+
lower: lowerSample,
|
|
154
|
+
upper: getSample(coarse, lowerIndex + 1),
|
|
155
|
+
fraction: remainder / subdivision
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
for (const [first, second] of aliases) uniteSamples(first, second);
|
|
162
|
+
const bySample = new Map<Sample, Interpolation[]>();
|
|
163
|
+
for (const constraint of constraints) {
|
|
164
|
+
const root = getRoot(constraint.fine);
|
|
165
|
+
const existing = bySample.get(root) ?? [];
|
|
166
|
+
existing.push(constraint);
|
|
167
|
+
bySample.set(root, existing);
|
|
168
|
+
}
|
|
169
|
+
const resolved = new Map<Sample, number>();
|
|
170
|
+
const resolving = new Set<Sample>();
|
|
171
|
+
/** Evaluate coarse endpoint constraints before fine samples, including at T-junctions. */
|
|
172
|
+
const resolve = (sample: Sample): number => {
|
|
173
|
+
const root = getRoot(sample);
|
|
174
|
+
const cached = resolved.get(root);
|
|
175
|
+
if (cached !== undefined) return cached;
|
|
176
|
+
if (resolving.has(root)) throw new Error('Cyclic terrain seam constraints');
|
|
177
|
+
resolving.add(root);
|
|
178
|
+
const rules = bySample.get(root);
|
|
179
|
+
let value = root.valid ? root.value : NaN;
|
|
180
|
+
if (root.valid && rules) {
|
|
181
|
+
let previous: number | undefined;
|
|
182
|
+
for (const rule of rules) {
|
|
183
|
+
const lower = resolve(rule.lower);
|
|
184
|
+
const upper = resolve(rule.upper);
|
|
185
|
+
const interpolated = lower + (upper - lower) * rule.fraction;
|
|
186
|
+
if (!Number.isFinite(interpolated)) {
|
|
187
|
+
previous = NaN;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
if (
|
|
191
|
+
previous !== undefined &&
|
|
192
|
+
Math.abs(previous - interpolated) >
|
|
193
|
+
16 * Number.EPSILON * Math.max(1, Math.abs(previous), Math.abs(interpolated))
|
|
194
|
+
)
|
|
195
|
+
throw new Error('Incompatible terrain junction heights');
|
|
196
|
+
previous = interpolated;
|
|
197
|
+
}
|
|
198
|
+
value = previous!;
|
|
199
|
+
}
|
|
200
|
+
resolving.delete(root);
|
|
201
|
+
resolved.set(root, value);
|
|
202
|
+
return value;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const result = new Map(tiles);
|
|
206
|
+
for (const [slot, tileSamples] of samples) {
|
|
207
|
+
const tile = tiles.get(slot)!;
|
|
208
|
+
const {field, position} = tile;
|
|
209
|
+
if (!field.heights) continue;
|
|
210
|
+
let heights: Float64Array | undefined;
|
|
211
|
+
for (const sample of tileSamples.values()) {
|
|
212
|
+
const height = resolve(sample) - position[2];
|
|
213
|
+
if (!heights && Object.is(height, field.heights[sample.index])) continue;
|
|
214
|
+
heights ??= Float64Array.from(field.heights);
|
|
215
|
+
heights[sample.index] = height;
|
|
216
|
+
}
|
|
217
|
+
if (heights) result.set(slot, {...tile, field: {...field, heights}});
|
|
218
|
+
}
|
|
219
|
+
return result;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Read edge positions in the common metric frame. */
|
|
223
|
+
function makeBoundary(
|
|
224
|
+
tiles: ReadonlyMap<number, GPURigidBodyTerrainTile>,
|
|
225
|
+
slot: number,
|
|
226
|
+
edge: GPURigidBodyTerrainEdge
|
|
227
|
+
): Boundary {
|
|
228
|
+
const tile = tiles.get(slot);
|
|
229
|
+
if (!tile || !tile.field.heights)
|
|
230
|
+
throw new Error('Terrain seam requires two loaded height fields');
|
|
231
|
+
const {field, position} = tile;
|
|
232
|
+
if (
|
|
233
|
+
!Number.isSafeInteger(field.width) ||
|
|
234
|
+
!Number.isSafeInteger(field.height) ||
|
|
235
|
+
field.width < 2 ||
|
|
236
|
+
field.height < 2 ||
|
|
237
|
+
field.width * field.height > 1_000_000 ||
|
|
238
|
+
field.heights?.length !== field.width * field.height ||
|
|
239
|
+
!position.every(Number.isFinite)
|
|
240
|
+
)
|
|
241
|
+
throw new Error('Invalid terrain seam tile');
|
|
242
|
+
const origin = field.origin ?? [0, 0];
|
|
243
|
+
const columnStep = field.columnStep ?? [1, 0];
|
|
244
|
+
const rowStep = field.rowStep ?? [0, 1];
|
|
245
|
+
const rowEdge = edge === 'first-row' || edge === 'last-row';
|
|
246
|
+
const row = edge === 'last-row' ? field.height - 1 : 0;
|
|
247
|
+
const column = edge === 'last-column' ? field.width - 1 : 0;
|
|
248
|
+
return {
|
|
249
|
+
slot,
|
|
250
|
+
tile,
|
|
251
|
+
origin: [
|
|
252
|
+
position[0] + origin[0] + column * columnStep[0] + row * rowStep[0],
|
|
253
|
+
position[1] + origin[1] + column * columnStep[1] + row * rowStep[1]
|
|
254
|
+
],
|
|
255
|
+
step: rowEdge ? columnStep : rowStep,
|
|
256
|
+
count: rowEdge ? field.width : field.height,
|
|
257
|
+
index: rowEdge ? sample => row * field.width + sample : sample => sample * field.width + column
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/** Find and compress a shared grid knot's authoritative sample. */
|
|
262
|
+
function getRoot(sample: Sample): Sample {
|
|
263
|
+
let root = sample;
|
|
264
|
+
while (root.parent) root = root.parent;
|
|
265
|
+
while (sample.parent) {
|
|
266
|
+
const previous = sample.parent;
|
|
267
|
+
sample.parent = root;
|
|
268
|
+
sample = previous;
|
|
269
|
+
}
|
|
270
|
+
return root;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** Join knots with deterministic coarse-first ownership and conservative missing-data handling. */
|
|
274
|
+
function uniteSamples(first: Sample, second: Sample): void {
|
|
275
|
+
const firstRoot = getRoot(first);
|
|
276
|
+
const secondRoot = getRoot(second);
|
|
277
|
+
if (firstRoot === secondRoot) return;
|
|
278
|
+
// A tie uses the stable slot ID. Comparing grid spacing also resolves corner ownership.
|
|
279
|
+
const firstWins =
|
|
280
|
+
firstRoot.spacing > secondRoot.spacing ||
|
|
281
|
+
(firstRoot.spacing === secondRoot.spacing && firstRoot.slot < secondRoot.slot);
|
|
282
|
+
const authority = firstWins ? firstRoot : secondRoot;
|
|
283
|
+
const dependent = firstWins ? secondRoot : firstRoot;
|
|
284
|
+
authority.valid &&= dependent.valid;
|
|
285
|
+
dependent.parent = authority;
|
|
286
|
+
}
|