@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,40 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileComment: Independently implemented for WebGPU; inspired by NVIDIA RAPIDS cuProj.
|
|
5
|
+
import { assert } from '@luma.gl/core';
|
|
6
|
+
import { GPUSimpleGraph } from "../gpu-simple-graph/gpu-simple-graph.js";
|
|
7
|
+
import { GPUGraph } from "../gpu-core/gpu-graph.js";
|
|
8
|
+
import { gpuGraph } from "../gpu-core/gpu-graph-value.js";
|
|
9
|
+
import { CPUProjectionOperation } from "./cpu-projection-operation.js";
|
|
10
|
+
/** Reusable layer-facing point-coordinate pipeline. Projection loading remains caller-owned. */
|
|
11
|
+
export class CoordinateProjectionGraph {
|
|
12
|
+
graph;
|
|
13
|
+
format;
|
|
14
|
+
constructor(device, props) {
|
|
15
|
+
this.format = props.format;
|
|
16
|
+
const graph = device.type === 'webgpu' ? new GPUGraph() : new GPUSimpleGraph();
|
|
17
|
+
graph.addInput('source', gpuGraph.vector(props.format));
|
|
18
|
+
graph.add(new CPUProjectionOperation({
|
|
19
|
+
id: 'project-coordinates',
|
|
20
|
+
input: 'source',
|
|
21
|
+
output: 'positions',
|
|
22
|
+
format: props.format,
|
|
23
|
+
projection: props.projection
|
|
24
|
+
}));
|
|
25
|
+
this.graph = graph.compile(device, { outputs: ['positions'] });
|
|
26
|
+
}
|
|
27
|
+
/** Borrow input storage and preserve row/chunk boundaries; each result owns independent storage. */
|
|
28
|
+
async run(source) {
|
|
29
|
+
assert(source.format === this.format);
|
|
30
|
+
// Point layers must handle null filtering before this numeric projection boundary.
|
|
31
|
+
assert(source.data.every(chunk => !chunk.nullBitmap && !chunk.valueOffsets));
|
|
32
|
+
const { positions } = await this.graph.run({ inputs: { source } });
|
|
33
|
+
return { positions, destroy: () => positions.destroy() };
|
|
34
|
+
}
|
|
35
|
+
/** Destroy the compiled pipeline. Previously returned results remain caller-owned. */
|
|
36
|
+
destroy() {
|
|
37
|
+
this.graph.destroy();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=coordinate-projection-graph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinate-projection-graph.js","sourceRoot":"","sources":["../../src/gpu-project/coordinate-projection-graph.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAC5D,4FAA4F;AAE5F,OAAO,EAAC,MAAM,EAAc,MAAM,eAAe,CAAC;AAElD,OAAO,EAAC,cAAc,EAAC,gDAA6C;AACpE,OAAO,EAAC,QAAQ,EAAC,iCAA8B;AAG/C,OAAO,EAAC,QAAQ,EAAC,uCAAoC;AACrD,OAAO,EAAC,sBAAsB,EAAmC,sCAAmC;AAYpG,gGAAgG;AAChG,MAAM,OAAO,yBAAyB;IACnB,KAAK,CAAsD;IACnE,MAAM,CAA2C;IAE1D,YAAY,MAAc,EAAE,KAAqC;QAC/D,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,QA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Descriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var cpu_geoarrow_exports = {};
|
|
19
|
+
__export(cpu_geoarrow_exports, {
|
|
20
|
+
makeCPUVectorFromGeoArrowColumn: () => makeCPUVectorFromGeoArrowColumn,
|
|
21
|
+
makeGeoArrowColumnFromCPUVector: () => makeGeoArrowColumnFromCPUVector
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(cpu_geoarrow_exports);
|
|
24
|
+
var import_core = require("@luma.gl/core");
|
|
25
|
+
var import_gpu_data = require("@luma.gl/graph/gpu-data");
|
|
26
|
+
function makeGeoArrowColumnFromCPUVector(vector, options = {}) {
|
|
27
|
+
const info = (0, import_gpu_data.getGPUVectorFormatInfo)(vector.format);
|
|
28
|
+
(0, import_core.assert)(info.signedDataType === "float32" && info.components >= 2 && !info.fixedSizeList);
|
|
29
|
+
const variable = info.vertexList || info.valueList;
|
|
30
|
+
const encoding = options.encoding ?? (variable ? "geoarrow.linestring" : "geoarrow.point");
|
|
31
|
+
(0, import_core.assert)(variable === (encoding !== "geoarrow.point"));
|
|
32
|
+
const dimension = options.dimension ?? (info.components === 2 ? "xy" : info.components === 3 ? "xyz" : "xyzm");
|
|
33
|
+
(0, import_core.assert)((dimension === "xy" ? 2 : dimension === "xyzm" ? 4 : 3) === info.components);
|
|
34
|
+
const chunks = vector.data.map((chunk) => {
|
|
35
|
+
const packed = chunk.byteStride === info.byteLength && chunk.byteOffset % 4 === 0;
|
|
36
|
+
const count = variable ? chunk.valueLength : chunk.length;
|
|
37
|
+
let values;
|
|
38
|
+
if (packed)
|
|
39
|
+
values = new Float32Array(chunk.buffer, chunk.byteOffset, count * info.components);
|
|
40
|
+
else {
|
|
41
|
+
values = new Float32Array(count * info.components);
|
|
42
|
+
const bytes = new Uint8Array(values.buffer);
|
|
43
|
+
for (let index = 0; index < count; index++)
|
|
44
|
+
bytes.set(new Uint8Array(chunk.buffer, chunk.byteOffset + index * chunk.byteStride, info.byteLength), index * info.byteLength);
|
|
45
|
+
}
|
|
46
|
+
const coordinates = {
|
|
47
|
+
kind: "fixed-size-list",
|
|
48
|
+
length: count,
|
|
49
|
+
size: info.components,
|
|
50
|
+
child: {
|
|
51
|
+
kind: "primitive",
|
|
52
|
+
length: count * info.components,
|
|
53
|
+
values
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const validity = chunk.nullBitmap ? { values: chunk.nullBitmap } : void 0;
|
|
57
|
+
if (!variable)
|
|
58
|
+
return { ...coordinates, validity };
|
|
59
|
+
(0, import_core.assert)(chunk.valueOffsets);
|
|
60
|
+
const rings = {
|
|
61
|
+
kind: "list",
|
|
62
|
+
length: chunk.length,
|
|
63
|
+
offsets: chunk.valueOffsets,
|
|
64
|
+
child: coordinates,
|
|
65
|
+
validity
|
|
66
|
+
};
|
|
67
|
+
return encoding === "geoarrow.polygon" ? {
|
|
68
|
+
kind: "list",
|
|
69
|
+
length: chunk.length,
|
|
70
|
+
offsets: Int32Array.from({ length: chunk.length + 1 }, (_, index) => index),
|
|
71
|
+
child: rings,
|
|
72
|
+
validity
|
|
73
|
+
} : rings;
|
|
74
|
+
});
|
|
75
|
+
return { encoding, dimension, coordinateLayout: "interleaved", chunks };
|
|
76
|
+
}
|
|
77
|
+
function makeCPUVectorFromGeoArrowColumn(column) {
|
|
78
|
+
(0, import_core.assert)(column.coordinateLayout === "interleaved" && ["geoarrow.point", "geoarrow.linestring", "geoarrow.multipoint"].includes(column.encoding));
|
|
79
|
+
const components = column.dimension === "xy" ? 2 : column.dimension === "xyzm" ? 4 : 3;
|
|
80
|
+
const variable = column.encoding !== "geoarrow.point";
|
|
81
|
+
const element = `float32x${components}`;
|
|
82
|
+
const format = variable ? `vertex-list<${element}>` : element;
|
|
83
|
+
const data = column.chunks.map((chunk) => {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
(0, import_core.assert)(!((_a = chunk.validity) == null ? void 0 : _a.bitOffset));
|
|
86
|
+
const coordinates = variable && chunk.kind === "list" ? chunk.child : chunk;
|
|
87
|
+
(0, import_core.assert)(coordinates.kind === "fixed-size-list" && coordinates.size === components && !coordinates.offset && (!variable || !coordinates.validity));
|
|
88
|
+
const primitive = coordinates.child;
|
|
89
|
+
(0, import_core.assert)(primitive.kind === "primitive" && primitive.values instanceof Float32Array && !primitive.validity && (!primitive.stride || primitive.stride === 1));
|
|
90
|
+
const offset = primitive.offset ?? 0;
|
|
91
|
+
const values = primitive.values.subarray(offset, offset + coordinates.length * components);
|
|
92
|
+
let valueOffsets;
|
|
93
|
+
if (variable) {
|
|
94
|
+
(0, import_core.assert)(chunk.kind === "list" && chunk.offsets instanceof Int32Array && !chunk.offset && !chunk.offsetBase);
|
|
95
|
+
valueOffsets = chunk.offsets;
|
|
96
|
+
}
|
|
97
|
+
return new import_gpu_data.CPUData({
|
|
98
|
+
buffer: values,
|
|
99
|
+
format,
|
|
100
|
+
length: chunk.length,
|
|
101
|
+
valueLength: variable ? coordinates.length : void 0,
|
|
102
|
+
valueOffsets,
|
|
103
|
+
nullBitmap: (_b = chunk.validity) == null ? void 0 : _b.values
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
return new import_gpu_data.CPUVector({ format, data });
|
|
107
|
+
}
|
|
108
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
109
|
+
0 && (module.exports = {
|
|
110
|
+
makeCPUVectorFromGeoArrowColumn,
|
|
111
|
+
makeGeoArrowColumnFromCPUVector
|
|
112
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CPUVector } from '@luma.gl/graph/gpu-data';
|
|
2
|
+
import type { GeoArrowColumn, GeoArrowDimension } from '@math.gl/core/arrow';
|
|
3
|
+
/** Borrow CPU coordinate chunks as native GeoArrow points or single-level coordinate lists. */
|
|
4
|
+
export declare function makeGeoArrowColumnFromCPUVector(vector: CPUVector, options?: {
|
|
5
|
+
encoding?: 'geoarrow.point' | 'geoarrow.linestring' | 'geoarrow.multipoint' | 'geoarrow.polygon';
|
|
6
|
+
dimension?: GeoArrowDimension;
|
|
7
|
+
}): GeoArrowColumn;
|
|
8
|
+
/** Borrow packed Float32 GeoArrow points/lines/multipoints as CPU chunks. Nested polygons stay GeoArrow. */
|
|
9
|
+
export declare function makeCPUVectorFromGeoArrowColumn(column: GeoArrowColumn): CPUVector;
|
|
10
|
+
//# sourceMappingURL=cpu-geoarrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpu-geoarrow.d.ts","sourceRoot":"","sources":["../../src/gpu-project/cpu-geoarrow.ts"],"names":[],"mappings":"AAMA,OAAO,EAAU,SAAS,EAAyB,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAGlB,MAAM,qBAAqB,CAAC;AAE7B,+FAA+F;AAC/F,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE;IACP,QAAQ,CAAC,EACL,gBAAgB,GAChB,qBAAqB,GACrB,qBAAqB,GACrB,kBAAkB,CAAC;IACvB,SAAS,CAAC,EAAE,iBAAiB,CAAC;CAC1B,GACL,cAAc,CA2DhB;AAED,4GAA4G;AAC5G,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,CA+CjF"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileComment: Independently implemented for WebGPU; inspired by NVIDIA RAPIDS cuProj.
|
|
5
|
+
import { assert } from '@luma.gl/core';
|
|
6
|
+
import { CPUData, CPUVector, getGPUVectorFormatInfo } from '@luma.gl/graph/gpu-data';
|
|
7
|
+
/** Borrow CPU coordinate chunks as native GeoArrow points or single-level coordinate lists. */
|
|
8
|
+
export function makeGeoArrowColumnFromCPUVector(vector, options = {}) {
|
|
9
|
+
const info = getGPUVectorFormatInfo(vector.format);
|
|
10
|
+
assert(info.signedDataType === 'float32' && info.components >= 2 && !info.fixedSizeList);
|
|
11
|
+
const variable = info.vertexList || info.valueList;
|
|
12
|
+
const encoding = options.encoding ?? (variable ? 'geoarrow.linestring' : 'geoarrow.point');
|
|
13
|
+
assert(variable === (encoding !== 'geoarrow.point'));
|
|
14
|
+
const dimension = options.dimension ?? (info.components === 2 ? 'xy' : info.components === 3 ? 'xyz' : 'xyzm');
|
|
15
|
+
assert((dimension === 'xy' ? 2 : dimension === 'xyzm' ? 4 : 3) === info.components);
|
|
16
|
+
const chunks = vector.data.map(chunk => {
|
|
17
|
+
// GeoArrow primitive scalar stride cannot express padding between coordinate tuples.
|
|
18
|
+
const packed = chunk.byteStride === info.byteLength && chunk.byteOffset % 4 === 0;
|
|
19
|
+
const count = variable ? chunk.valueLength : chunk.length;
|
|
20
|
+
let values;
|
|
21
|
+
if (packed)
|
|
22
|
+
values = new Float32Array(chunk.buffer, chunk.byteOffset, count * info.components);
|
|
23
|
+
else {
|
|
24
|
+
values = new Float32Array(count * info.components);
|
|
25
|
+
const bytes = new Uint8Array(values.buffer);
|
|
26
|
+
for (let index = 0; index < count; index++)
|
|
27
|
+
bytes.set(new Uint8Array(chunk.buffer, chunk.byteOffset + index * chunk.byteStride, info.byteLength), index * info.byteLength);
|
|
28
|
+
}
|
|
29
|
+
const coordinates = {
|
|
30
|
+
kind: 'fixed-size-list',
|
|
31
|
+
length: count,
|
|
32
|
+
size: info.components,
|
|
33
|
+
child: {
|
|
34
|
+
kind: 'primitive',
|
|
35
|
+
length: count * info.components,
|
|
36
|
+
values
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const validity = chunk.nullBitmap ? { values: chunk.nullBitmap } : undefined;
|
|
40
|
+
if (!variable)
|
|
41
|
+
return { ...coordinates, validity };
|
|
42
|
+
assert(chunk.valueOffsets);
|
|
43
|
+
const rings = {
|
|
44
|
+
kind: 'list',
|
|
45
|
+
length: chunk.length,
|
|
46
|
+
offsets: chunk.valueOffsets,
|
|
47
|
+
child: coordinates,
|
|
48
|
+
validity
|
|
49
|
+
};
|
|
50
|
+
return encoding === 'geoarrow.polygon'
|
|
51
|
+
? {
|
|
52
|
+
kind: 'list',
|
|
53
|
+
length: chunk.length,
|
|
54
|
+
offsets: Int32Array.from({ length: chunk.length + 1 }, (_, index) => index),
|
|
55
|
+
child: rings,
|
|
56
|
+
validity
|
|
57
|
+
}
|
|
58
|
+
: rings;
|
|
59
|
+
});
|
|
60
|
+
return { encoding, dimension, coordinateLayout: 'interleaved', chunks };
|
|
61
|
+
}
|
|
62
|
+
/** Borrow packed Float32 GeoArrow points/lines/multipoints as CPU chunks. Nested polygons stay GeoArrow. */
|
|
63
|
+
export function makeCPUVectorFromGeoArrowColumn(column) {
|
|
64
|
+
assert(column.coordinateLayout === 'interleaved' &&
|
|
65
|
+
['geoarrow.point', 'geoarrow.linestring', 'geoarrow.multipoint'].includes(column.encoding));
|
|
66
|
+
const components = column.dimension === 'xy' ? 2 : column.dimension === 'xyzm' ? 4 : 3;
|
|
67
|
+
const variable = column.encoding !== 'geoarrow.point';
|
|
68
|
+
const element = `float32x${components}`;
|
|
69
|
+
const format = variable ? `vertex-list<${element}>` : element;
|
|
70
|
+
const data = column.chunks.map(chunk => {
|
|
71
|
+
assert(!chunk.validity?.bitOffset);
|
|
72
|
+
const coordinates = variable && chunk.kind === 'list' ? chunk.child : chunk;
|
|
73
|
+
assert(coordinates.kind === 'fixed-size-list' &&
|
|
74
|
+
coordinates.size === components &&
|
|
75
|
+
!coordinates.offset &&
|
|
76
|
+
(!variable || !coordinates.validity));
|
|
77
|
+
const primitive = coordinates.child;
|
|
78
|
+
assert(primitive.kind === 'primitive' &&
|
|
79
|
+
primitive.values instanceof Float32Array &&
|
|
80
|
+
!primitive.validity &&
|
|
81
|
+
(!primitive.stride || primitive.stride === 1));
|
|
82
|
+
const offset = primitive.offset ?? 0;
|
|
83
|
+
const values = primitive.values.subarray(offset, offset + coordinates.length * components);
|
|
84
|
+
let valueOffsets;
|
|
85
|
+
if (variable) {
|
|
86
|
+
assert(chunk.kind === 'list' &&
|
|
87
|
+
chunk.offsets instanceof Int32Array &&
|
|
88
|
+
!chunk.offset &&
|
|
89
|
+
!chunk.offsetBase);
|
|
90
|
+
valueOffsets = chunk.offsets;
|
|
91
|
+
}
|
|
92
|
+
return new CPUData({
|
|
93
|
+
buffer: values,
|
|
94
|
+
format,
|
|
95
|
+
length: chunk.length,
|
|
96
|
+
valueLength: variable ? coordinates.length : undefined,
|
|
97
|
+
valueOffsets,
|
|
98
|
+
nullBitmap: chunk.validity?.values
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
return new CPUVector({ format, data });
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=cpu-geoarrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpu-geoarrow.js","sourceRoot":"","sources":["../../src/gpu-project/cpu-geoarrow.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAC5D,4FAA4F;AAE5F,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAA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jB,MAAM,EAAE,MAAM;YACd,MAAM;YACN,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;YACtD,YAAY;YACZ,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM;SACnC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,SAAS,CAAC,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var cpu_geometry_pipelines_exports = {};
|
|
19
|
+
__export(cpu_geometry_pipelines_exports, {
|
|
20
|
+
projectCPUVector: () => projectCPUVector,
|
|
21
|
+
tessellateCPUVectorPolygons: () => tessellateCPUVectorPolygons,
|
|
22
|
+
tessellateGeoArrowColumnToCPUVectors: () => tessellateGeoArrowColumnToCPUVectors
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(cpu_geometry_pipelines_exports);
|
|
25
|
+
var import_core = require("@luma.gl/core");
|
|
26
|
+
var import_gpu_data = require("@luma.gl/graph/gpu-data");
|
|
27
|
+
var import_arrow = require("@math.gl/geometry/arrow");
|
|
28
|
+
var import_cpu_geoarrow = require("./cpu-geoarrow.cjs");
|
|
29
|
+
async function projectCPUVector(vector, projection) {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
const { name, format } = vector;
|
|
32
|
+
vector = (0, import_cpu_geoarrow.makeCPUVectorFromGeoArrowColumn)((0, import_cpu_geoarrow.makeGeoArrowColumnFromCPUVector)(vector));
|
|
33
|
+
const info = (0, import_gpu_data.getGPUVectorFormatInfo)(vector.format);
|
|
34
|
+
(0, import_core.assert)(info.signedDataType === "float32" && (info.components === 2 || info.components === 3) && !info.fixedSizeList);
|
|
35
|
+
const data = [];
|
|
36
|
+
for (const chunk of vector.data) {
|
|
37
|
+
const variable = info.vertexList || info.valueList;
|
|
38
|
+
const count = variable ? chunk.valueLength : chunk.length;
|
|
39
|
+
const values = new Float32Array(count * info.components);
|
|
40
|
+
const bytes = new Uint8Array(values.buffer);
|
|
41
|
+
for (let index = 0; index < count; index++)
|
|
42
|
+
bytes.set(new Uint8Array(chunk.buffer, chunk.byteOffset + index * chunk.byteStride, info.byteLength), index * info.byteLength);
|
|
43
|
+
if (variable)
|
|
44
|
+
(0, import_core.assert)(chunk.valueOffsets);
|
|
45
|
+
let row = 0;
|
|
46
|
+
while (row < chunk.length) {
|
|
47
|
+
if (chunk.nullBitmap && !(chunk.nullBitmap[row >> 3] & 1 << (row & 7))) {
|
|
48
|
+
row++;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const firstRow = row++;
|
|
52
|
+
while (row < chunk.length && (!chunk.nullBitmap || chunk.nullBitmap[row >> 3] & 1 << (row & 7)))
|
|
53
|
+
row++;
|
|
54
|
+
const start = variable ? chunk.valueOffsets[firstRow] : firstRow;
|
|
55
|
+
const end = variable ? chunk.valueOffsets[row] : row;
|
|
56
|
+
if (end > start)
|
|
57
|
+
values.set(await projection.projectFlat(values.slice(start * info.components, end * info.components), info.components), start * info.components);
|
|
58
|
+
}
|
|
59
|
+
data.push(new import_gpu_data.CPUData({
|
|
60
|
+
buffer: values,
|
|
61
|
+
format,
|
|
62
|
+
length: chunk.length,
|
|
63
|
+
valueLength: chunk.valueLength,
|
|
64
|
+
valueOffsets: (_a = chunk.valueOffsets) == null ? void 0 : _a.slice(),
|
|
65
|
+
nullBitmap: (_b = chunk.nullBitmap) == null ? void 0 : _b.slice()
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
return new import_gpu_data.CPUVector({ name, format, data });
|
|
69
|
+
}
|
|
70
|
+
function tessellateCPUVectorPolygons(vector) {
|
|
71
|
+
return tessellateGeoArrowColumnToCPUVectors((0, import_cpu_geoarrow.makeGeoArrowColumnFromCPUVector)(vector, { encoding: "geoarrow.polygon" }));
|
|
72
|
+
}
|
|
73
|
+
function tessellateGeoArrowColumnToCPUVectors(column, options = {}) {
|
|
74
|
+
const positions = [];
|
|
75
|
+
const indices = [];
|
|
76
|
+
const rowIndices = [];
|
|
77
|
+
let rowOffset = options.sourceRowOffset ?? 0;
|
|
78
|
+
for (const rings of column.chunks) {
|
|
79
|
+
const mesh = (0, import_arrow.tessellateGeoArrowPolygons)({ ...column, chunks: [rings] }, { ...options, positionSize: 4, sourceRowOffset: rowOffset });
|
|
80
|
+
const vertexOffsets = new Int32Array(rings.length + 1);
|
|
81
|
+
const indexOffsets = new Int32Array(rings.length + 1);
|
|
82
|
+
for (const source of mesh.sourceRowIndices)
|
|
83
|
+
vertexOffsets[source - rowOffset + 1]++;
|
|
84
|
+
for (const index of mesh.indices)
|
|
85
|
+
indexOffsets[mesh.sourceRowIndices[index] - rowOffset + 1]++;
|
|
86
|
+
for (let row = 1; row <= rings.length; row++) {
|
|
87
|
+
vertexOffsets[row] += vertexOffsets[row - 1];
|
|
88
|
+
indexOffsets[row] += indexOffsets[row - 1];
|
|
89
|
+
}
|
|
90
|
+
let nullBitmap;
|
|
91
|
+
if (rings.validity) {
|
|
92
|
+
nullBitmap = new Uint8Array(Math.ceil(rings.length / 8));
|
|
93
|
+
for (let row = 0; row < rings.length; row++) {
|
|
94
|
+
const bit = row + (rings.validity.bitOffset ?? 0);
|
|
95
|
+
if (rings.validity.values[bit >> 3] & 1 << (bit & 7))
|
|
96
|
+
nullBitmap[row >> 3] |= 1 << (row & 7);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const common = { length: rings.length, nullBitmap };
|
|
100
|
+
positions.push(new import_gpu_data.CPUData({
|
|
101
|
+
...common,
|
|
102
|
+
format: "vertex-list<float32x4>",
|
|
103
|
+
buffer: mesh.positions,
|
|
104
|
+
valueLength: mesh.vertexCount,
|
|
105
|
+
valueOffsets: vertexOffsets
|
|
106
|
+
}));
|
|
107
|
+
indices.push(new import_gpu_data.CPUData({
|
|
108
|
+
...common,
|
|
109
|
+
format: "vertex-list<uint32>",
|
|
110
|
+
buffer: Uint32Array.from(mesh.indices),
|
|
111
|
+
valueLength: mesh.indices.length,
|
|
112
|
+
valueOffsets: indexOffsets
|
|
113
|
+
}));
|
|
114
|
+
rowIndices.push(new import_gpu_data.CPUData({
|
|
115
|
+
...common,
|
|
116
|
+
format: "vertex-list<uint32>",
|
|
117
|
+
buffer: mesh.sourceRowIndices,
|
|
118
|
+
valueLength: mesh.vertexCount,
|
|
119
|
+
valueOffsets: vertexOffsets
|
|
120
|
+
}));
|
|
121
|
+
rowOffset += rings.length;
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
positions: new import_gpu_data.CPUVector({ format: "vertex-list<float32x4>", data: positions }),
|
|
125
|
+
indices: new import_gpu_data.CPUVector({ format: "vertex-list<uint32>", data: indices }),
|
|
126
|
+
rowIndices: new import_gpu_data.CPUVector({ format: "vertex-list<uint32>", data: rowIndices })
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
130
|
+
0 && (module.exports = {
|
|
131
|
+
projectCPUVector,
|
|
132
|
+
tessellateCPUVectorPolygons,
|
|
133
|
+
tessellateGeoArrowColumnToCPUVectors
|
|
134
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CPUVector } from '@luma.gl/graph/gpu-data';
|
|
2
|
+
import type { Projection } from '@math.gl/geospatial/projection-types';
|
|
3
|
+
import type { GeoArrowColumn } from '@math.gl/core/arrow';
|
|
4
|
+
import { type TessellateGeoArrowPolygonsOptions } from '@math.gl/geometry/arrow';
|
|
5
|
+
/** Project Float32 coordinates while retaining single-level row topology and null rows. */
|
|
6
|
+
export declare function projectCPUVector(vector: CPUVector, projection: Pick<Projection, 'projectFlat'>): Promise<CPUVector>;
|
|
7
|
+
/** Tessellate one simple polygon ring per list row, preserving source chunks and row identities. */
|
|
8
|
+
export declare function tessellateCPUVectorPolygons(vector: CPUVector): {
|
|
9
|
+
positions: CPUVector<'vertex-list<float32x4>'>;
|
|
10
|
+
indices: CPUVector<'vertex-list<uint32>'>;
|
|
11
|
+
rowIndices: CPUVector<'vertex-list<uint32>'>;
|
|
12
|
+
};
|
|
13
|
+
/** Full native GeoArrow polygon tessellation, including holes, multipolygons and mixed columns. */
|
|
14
|
+
export declare function tessellateGeoArrowColumnToCPUVectors(column: GeoArrowColumn, options?: TessellateGeoArrowPolygonsOptions): {
|
|
15
|
+
positions: CPUVector<'vertex-list<float32x4>'>;
|
|
16
|
+
indices: CPUVector<'vertex-list<uint32>'>;
|
|
17
|
+
rowIndices: CPUVector<'vertex-list<uint32>'>;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=cpu-geometry-pipelines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpu-geometry-pipelines.d.ts","sourceRoot":"","sources":["../../src/gpu-project/cpu-geometry-pipelines.ts"],"names":[],"mappings":"AAMA,OAAO,EAAU,SAAS,EAAyB,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,yBAAyB,CAAC;AAGjC,2FAA2F;AAC3F,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,GAC1C,OAAO,CAAC,SAAS,CAAC,CAwDpB;AAED,oGAAoG;AACpG,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,GAAG;IAC9D,SAAS,EAAE,SAAS,CAAC,wBAAwB,CAAC,CAAC;IAC/C,OAAO,EAAE,SAAS,CAAC,qBAAqB,CAAC,CAAC;IAC1C,UAAU,EAAE,SAAS,CAAC,qBAAqB,CAAC,CAAC;CAC9C,CAIA;AAED,mGAAmG;AACnG,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,iCAAsC,GAC9C;IACD,SAAS,EAAE,SAAS,CAAC,wBAAwB,CAAC,CAAC;IAC/C,OAAO,EAAE,SAAS,CAAC,qBAAqB,CAAC,CAAC;IAC1C,UAAU,EAAE,SAAS,CAAC,qBAAqB,CAAC,CAAC;CAC9C,CA8DA"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileComment: Independently implemented for WebGPU; inspired by NVIDIA RAPIDS cuProj.
|
|
5
|
+
import { assert } from '@luma.gl/core';
|
|
6
|
+
import { CPUData, CPUVector, getGPUVectorFormatInfo } from '@luma.gl/graph/gpu-data';
|
|
7
|
+
import { tessellateGeoArrowPolygons } from '@math.gl/geometry/arrow';
|
|
8
|
+
import { makeGeoArrowColumnFromCPUVector, makeCPUVectorFromGeoArrowColumn } from "./cpu-geoarrow.js";
|
|
9
|
+
/** Project Float32 coordinates while retaining single-level row topology and null rows. */
|
|
10
|
+
export async function projectCPUVector(vector, projection) {
|
|
11
|
+
const { name, format } = vector;
|
|
12
|
+
vector = makeCPUVectorFromGeoArrowColumn(makeGeoArrowColumnFromCPUVector(vector));
|
|
13
|
+
const info = getGPUVectorFormatInfo(vector.format);
|
|
14
|
+
assert(info.signedDataType === 'float32' &&
|
|
15
|
+
(info.components === 2 || info.components === 3) &&
|
|
16
|
+
!info.fixedSizeList);
|
|
17
|
+
const data = [];
|
|
18
|
+
for (const chunk of vector.data) {
|
|
19
|
+
const variable = info.vertexList || info.valueList;
|
|
20
|
+
const count = variable ? chunk.valueLength : chunk.length;
|
|
21
|
+
const values = new Float32Array(count * info.components);
|
|
22
|
+
const bytes = new Uint8Array(values.buffer);
|
|
23
|
+
for (let index = 0; index < count; index++)
|
|
24
|
+
bytes.set(new Uint8Array(chunk.buffer, chunk.byteOffset + index * chunk.byteStride, info.byteLength), index * info.byteLength);
|
|
25
|
+
if (variable)
|
|
26
|
+
assert(chunk.valueOffsets);
|
|
27
|
+
let row = 0;
|
|
28
|
+
while (row < chunk.length) {
|
|
29
|
+
if (chunk.nullBitmap && !(chunk.nullBitmap[row >> 3] & (1 << (row & 7)))) {
|
|
30
|
+
row++;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const firstRow = row++;
|
|
34
|
+
while (row < chunk.length &&
|
|
35
|
+
(!chunk.nullBitmap || chunk.nullBitmap[row >> 3] & (1 << (row & 7))))
|
|
36
|
+
row++;
|
|
37
|
+
const start = variable ? chunk.valueOffsets[firstRow] : firstRow;
|
|
38
|
+
const end = variable ? chunk.valueOffsets[row] : row;
|
|
39
|
+
if (end > start)
|
|
40
|
+
values.set(await projection.projectFlat(values.slice(start * info.components, end * info.components), info.components), start * info.components);
|
|
41
|
+
}
|
|
42
|
+
data.push(new CPUData({
|
|
43
|
+
buffer: values,
|
|
44
|
+
format,
|
|
45
|
+
length: chunk.length,
|
|
46
|
+
valueLength: chunk.valueLength,
|
|
47
|
+
valueOffsets: chunk.valueOffsets?.slice(),
|
|
48
|
+
nullBitmap: chunk.nullBitmap?.slice()
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
return new CPUVector({ name, format, data });
|
|
52
|
+
}
|
|
53
|
+
/** Tessellate one simple polygon ring per list row, preserving source chunks and row identities. */
|
|
54
|
+
export function tessellateCPUVectorPolygons(vector) {
|
|
55
|
+
return tessellateGeoArrowColumnToCPUVectors(makeGeoArrowColumnFromCPUVector(vector, { encoding: 'geoarrow.polygon' }));
|
|
56
|
+
}
|
|
57
|
+
/** Full native GeoArrow polygon tessellation, including holes, multipolygons and mixed columns. */
|
|
58
|
+
export function tessellateGeoArrowColumnToCPUVectors(column, options = {}) {
|
|
59
|
+
const positions = [];
|
|
60
|
+
const indices = [];
|
|
61
|
+
const rowIndices = [];
|
|
62
|
+
let rowOffset = options.sourceRowOffset ?? 0;
|
|
63
|
+
for (const rings of column.chunks) {
|
|
64
|
+
const mesh = tessellateGeoArrowPolygons({ ...column, chunks: [rings] }, { ...options, positionSize: 4, sourceRowOffset: rowOffset });
|
|
65
|
+
const vertexOffsets = new Int32Array(rings.length + 1);
|
|
66
|
+
const indexOffsets = new Int32Array(rings.length + 1);
|
|
67
|
+
for (const source of mesh.sourceRowIndices)
|
|
68
|
+
vertexOffsets[source - rowOffset + 1]++;
|
|
69
|
+
for (const index of mesh.indices)
|
|
70
|
+
indexOffsets[mesh.sourceRowIndices[index] - rowOffset + 1]++;
|
|
71
|
+
for (let row = 1; row <= rings.length; row++) {
|
|
72
|
+
vertexOffsets[row] += vertexOffsets[row - 1];
|
|
73
|
+
indexOffsets[row] += indexOffsets[row - 1];
|
|
74
|
+
}
|
|
75
|
+
let nullBitmap;
|
|
76
|
+
if (rings.validity) {
|
|
77
|
+
nullBitmap = new Uint8Array(Math.ceil(rings.length / 8));
|
|
78
|
+
for (let row = 0; row < rings.length; row++) {
|
|
79
|
+
const bit = row + (rings.validity.bitOffset ?? 0);
|
|
80
|
+
if (rings.validity.values[bit >> 3] & (1 << (bit & 7)))
|
|
81
|
+
nullBitmap[row >> 3] |= 1 << (row & 7);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const common = { length: rings.length, nullBitmap };
|
|
85
|
+
positions.push(new CPUData({
|
|
86
|
+
...common,
|
|
87
|
+
format: 'vertex-list<float32x4>',
|
|
88
|
+
buffer: mesh.positions,
|
|
89
|
+
valueLength: mesh.vertexCount,
|
|
90
|
+
valueOffsets: vertexOffsets
|
|
91
|
+
}));
|
|
92
|
+
indices.push(new CPUData({
|
|
93
|
+
...common,
|
|
94
|
+
format: 'vertex-list<uint32>',
|
|
95
|
+
buffer: Uint32Array.from(mesh.indices),
|
|
96
|
+
valueLength: mesh.indices.length,
|
|
97
|
+
valueOffsets: indexOffsets
|
|
98
|
+
}));
|
|
99
|
+
rowIndices.push(new CPUData({
|
|
100
|
+
...common,
|
|
101
|
+
format: 'vertex-list<uint32>',
|
|
102
|
+
buffer: mesh.sourceRowIndices,
|
|
103
|
+
valueLength: mesh.vertexCount,
|
|
104
|
+
valueOffsets: vertexOffsets
|
|
105
|
+
}));
|
|
106
|
+
rowOffset += rings.length;
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
positions: new CPUVector({ format: 'vertex-list<float32x4>', data: positions }),
|
|
110
|
+
indices: new CPUVector({ format: 'vertex-list<uint32>', data: indices }),
|
|
111
|
+
rowIndices: new CPUVector({ format: 'vertex-list<uint32>', data: rowIndices })
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=cpu-geometry-pipelines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpu-geometry-pipelines.js","sourceRoot":"","sources":["../../src/gpu-project/cpu-geometry-pipelines.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D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@@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var cpu_projection_operation_exports = {};
|
|
19
|
+
__export(cpu_projection_operation_exports, {
|
|
20
|
+
CPUProjectionOperation: () => CPUProjectionOperation
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(cpu_projection_operation_exports);
|
|
23
|
+
var import_core = require("@luma.gl/core");
|
|
24
|
+
var import_gpu_cpu_operation = require("../gpu-core/gpu-cpu-operation.cjs");
|
|
25
|
+
var import_gpu_graph_value = require("../gpu-core/gpu-graph-value.cjs");
|
|
26
|
+
class CPUProjectionOperation extends import_gpu_cpu_operation.GPUCPUOperation {
|
|
27
|
+
constructor(props) {
|
|
28
|
+
const dimension = props.format === "float32x2" ? 2 : 3;
|
|
29
|
+
super({
|
|
30
|
+
id: props.id,
|
|
31
|
+
inputs: { positions: props.input },
|
|
32
|
+
outputs: { [props.output]: import_gpu_graph_value.gpuGraph.vector(props.format) },
|
|
33
|
+
async execute({ inputs }) {
|
|
34
|
+
const input = inputs["positions"];
|
|
35
|
+
(0, import_core.assert)(typeof input !== "number" && input.format === props.format);
|
|
36
|
+
return {
|
|
37
|
+
[props.output]: {
|
|
38
|
+
chunks: await Promise.all(input.chunks.map(async (chunk) => {
|
|
39
|
+
(0, import_core.assert)(chunk.values instanceof Float32Array);
|
|
40
|
+
const values = chunk.values.slice();
|
|
41
|
+
return {
|
|
42
|
+
values: values.length ? await props.projection.projectFlat(values, dimension) : values
|
|
43
|
+
};
|
|
44
|
+
}))
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
CPUProjectionOperation
|
|
54
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Projection } from '@math.gl/geospatial/projection-types';
|
|
2
|
+
import { GPUCPUOperation } from "../gpu-core/gpu-cpu-operation.js";
|
|
3
|
+
export type CPUProjectionOperationProps = {
|
|
4
|
+
id: string;
|
|
5
|
+
input: string;
|
|
6
|
+
output: string;
|
|
7
|
+
format: 'float32x2' | 'float32x3';
|
|
8
|
+
projection: Pick<Projection, 'projectFlat'>;
|
|
9
|
+
};
|
|
10
|
+
/** Forward projection on the CPU with executor-managed GPU readback and upload. */
|
|
11
|
+
export declare class CPUProjectionOperation extends GPUCPUOperation {
|
|
12
|
+
constructor(props: CPUProjectionOperationProps);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=cpu-projection-operation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpu-projection-operation.d.ts","sourceRoot":"","sources":["../../src/gpu-project/cpu-projection-operation.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAC,eAAe,EAAC,yCAAsC;AAG9D,MAAM,MAAM,2BAA2B,GAAG;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,GAAG,WAAW,CAAC;IAClC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;CAC7C,CAAC;AAEF,mFAAmF;AACnF,qBAAa,sBAAuB,SAAQ,eAAe;gBAC7C,KAAK,EAAE,2BAA2B;CA4B/C"}
|