@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,263 @@
|
|
|
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 rigid_body_terrain_stream_exports = {};
|
|
19
|
+
__export(rigid_body_terrain_stream_exports, {
|
|
20
|
+
GPURigidBodyTerrainStream: () => GPURigidBodyTerrainStream,
|
|
21
|
+
RigidBodyTerrainLoadQueue: () => RigidBodyTerrainLoadQueue,
|
|
22
|
+
makeRigidBodyTerrainFetchProvider: () => makeRigidBodyTerrainFetchProvider
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(rigid_body_terrain_stream_exports);
|
|
25
|
+
var import_rigid_body_terrain_stitch = require("./rigid-body-terrain-stitch.cjs");
|
|
26
|
+
function makeRigidBodyTerrainFetchProvider(props) {
|
|
27
|
+
return {
|
|
28
|
+
async loadTile(key, signal) {
|
|
29
|
+
const response = await (props.fetch ?? globalThis.fetch)(props.getTileUrl(key), { signal });
|
|
30
|
+
if (!response.ok)
|
|
31
|
+
throw new Error(`Terrain request failed with HTTP ${response.status}`);
|
|
32
|
+
signal.throwIfAborted();
|
|
33
|
+
return props.decode(response, key, signal);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
class GPURigidBodyTerrainStream {
|
|
38
|
+
world;
|
|
39
|
+
loadQueue;
|
|
40
|
+
/** Last request, used to ignore late completions. */
|
|
41
|
+
controller;
|
|
42
|
+
/** Fully fetched and stitched window waiting for publication. */
|
|
43
|
+
ready;
|
|
44
|
+
/** Current stream-owned collider contents. */
|
|
45
|
+
resident = { keys: /* @__PURE__ */ new Map(), source: /* @__PURE__ */ new Map(), stitched: /* @__PURE__ */ new Map() };
|
|
46
|
+
/** Create a streamer that borrows a world's fixed slots and owns its provider requests. */
|
|
47
|
+
constructor(world, props, loadQueue = new RigidBodyTerrainLoadQueue(props)) {
|
|
48
|
+
this.world = world;
|
|
49
|
+
this.loadQueue = loadQueue;
|
|
50
|
+
}
|
|
51
|
+
/** Stage the latest window. False indicates a newer window or cancellation superseded it. */
|
|
52
|
+
async prepare(window) {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
const keys = /* @__PURE__ */ new Map();
|
|
55
|
+
for (const { collider, key } of window.tiles) {
|
|
56
|
+
if (!Number.isSafeInteger(collider) || collider < 0 || keys.has(collider) || !key)
|
|
57
|
+
throw new Error("Invalid terrain window slot");
|
|
58
|
+
keys.set(collider, key);
|
|
59
|
+
}
|
|
60
|
+
const seams = ((_a = window.seams) == null ? void 0 : _a.map((seam) => ({ ...seam }))) ?? [];
|
|
61
|
+
for (const seam of seams)
|
|
62
|
+
if (!keys.has(seam.first) || !keys.has(seam.second))
|
|
63
|
+
throw new Error("Terrain seam references an absent slot");
|
|
64
|
+
(_b = this.controller) == null ? void 0 : _b.abort();
|
|
65
|
+
this.ready = void 0;
|
|
66
|
+
const required = new Set(keys.values());
|
|
67
|
+
this.loadQueue.setDemand(this, /* @__PURE__ */ new Set([...this.resident.source.keys(), ...required]));
|
|
68
|
+
const controller = new AbortController();
|
|
69
|
+
this.controller = controller;
|
|
70
|
+
const signal = controller.signal;
|
|
71
|
+
const cancellation = new Promise((resolve) => {
|
|
72
|
+
signal.addEventListener("abort", () => resolve(false), { once: true });
|
|
73
|
+
});
|
|
74
|
+
const residentSources = this.resident.source;
|
|
75
|
+
const loadWindow = async () => {
|
|
76
|
+
const source = new Map(await Promise.all([...required].map(async (key) => [key, residentSources.get(key) ?? await this.loadQueue.getLoad(key)])));
|
|
77
|
+
if (signal.aborted)
|
|
78
|
+
return false;
|
|
79
|
+
const tiles = new Map(Array.from(keys, ([collider, key]) => [collider, source.get(key)]));
|
|
80
|
+
const stitched = (0, import_rigid_body_terrain_stitch.stitchRigidBodyTerrainTiles)(tiles, seams);
|
|
81
|
+
this.ready = { keys, source, stitched };
|
|
82
|
+
return true;
|
|
83
|
+
};
|
|
84
|
+
try {
|
|
85
|
+
return await Promise.race([loadWindow(), cancellation]);
|
|
86
|
+
} catch (error) {
|
|
87
|
+
if (signal.aborted)
|
|
88
|
+
return false;
|
|
89
|
+
this.cancel();
|
|
90
|
+
throw error;
|
|
91
|
+
} finally {
|
|
92
|
+
if (this.controller === controller)
|
|
93
|
+
this.controller = void 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/** Publish the fully staged window between submissions. Preserve it if upload validation fails. */
|
|
97
|
+
apply() {
|
|
98
|
+
const edits = this.getPreparedEdits();
|
|
99
|
+
if (!edits)
|
|
100
|
+
return false;
|
|
101
|
+
if (edits.length)
|
|
102
|
+
this.world.setHeightFieldTiles(edits);
|
|
103
|
+
this.commitPreparedWindow();
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
/** @internal Plan the ready window without changing its publication status. */
|
|
107
|
+
getPreparedEdits() {
|
|
108
|
+
const ready = this.ready;
|
|
109
|
+
if (!ready)
|
|
110
|
+
return void 0;
|
|
111
|
+
const edits = [];
|
|
112
|
+
for (const collider of this.resident.stitched.keys()) {
|
|
113
|
+
if (!ready.keys.has(collider))
|
|
114
|
+
edits.push({ collider, field: null });
|
|
115
|
+
}
|
|
116
|
+
for (const [collider, tile] of ready.stitched) {
|
|
117
|
+
const previous = this.resident.stitched.get(collider);
|
|
118
|
+
const keyChanged = this.resident.keys.get(collider) !== ready.keys.get(collider);
|
|
119
|
+
if (keyChanged || !sameStitchedSamples(previous, tile))
|
|
120
|
+
edits.push({ collider, field: tile.field, position: tile.position });
|
|
121
|
+
}
|
|
122
|
+
return edits;
|
|
123
|
+
}
|
|
124
|
+
/** @internal Commit only after the caller has published the corresponding edits. */
|
|
125
|
+
commitPreparedWindow() {
|
|
126
|
+
const ready = this.ready;
|
|
127
|
+
this.resident = ready;
|
|
128
|
+
this.ready = void 0;
|
|
129
|
+
this.loadQueue.setDemand(this, new Set(ready.source.keys()));
|
|
130
|
+
}
|
|
131
|
+
/** Number of slots in the committed window. */
|
|
132
|
+
get residentTileCount() {
|
|
133
|
+
return this.resident.keys.size;
|
|
134
|
+
}
|
|
135
|
+
/** Read a detached copy of the collider's currently committed and stitched tile. */
|
|
136
|
+
getTile(collider) {
|
|
137
|
+
const tile = this.resident.stitched.get(collider);
|
|
138
|
+
return tile ? structuredClone(tile) : null;
|
|
139
|
+
}
|
|
140
|
+
/** Cancel pending work and discard unapplied data. */
|
|
141
|
+
cancel() {
|
|
142
|
+
var _a;
|
|
143
|
+
(_a = this.controller) == null ? void 0 : _a.abort();
|
|
144
|
+
this.controller = void 0;
|
|
145
|
+
this.ready = void 0;
|
|
146
|
+
this.loadQueue.setDemand(this, new Set(this.resident.source.keys()));
|
|
147
|
+
}
|
|
148
|
+
/** Release stream-owned slots after canceling fetches. Call between submissions. */
|
|
149
|
+
clear() {
|
|
150
|
+
this.cancel();
|
|
151
|
+
const edits = Array.from(this.resident.stitched.keys(), (collider) => ({ collider, field: null }));
|
|
152
|
+
if (edits.length)
|
|
153
|
+
this.world.setHeightFieldTiles(edits);
|
|
154
|
+
this.release();
|
|
155
|
+
}
|
|
156
|
+
/** @internal Forget the window after its world has taken over resource disposal. */
|
|
157
|
+
release() {
|
|
158
|
+
this.cancel();
|
|
159
|
+
this.loadQueue.setDemand(this, /* @__PURE__ */ new Set());
|
|
160
|
+
this.resident = { keys: /* @__PURE__ */ new Map(), source: /* @__PURE__ */ new Map(), stitched: /* @__PURE__ */ new Map() };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
class RigidBodyTerrainLoadQueue {
|
|
164
|
+
props;
|
|
165
|
+
/** Active provider work, including aborted requests that have not settled. */
|
|
166
|
+
activeLoads = 0;
|
|
167
|
+
/** Requests retained by the latest window, including completed but unapplied data. */
|
|
168
|
+
loads = /* @__PURE__ */ new Map();
|
|
169
|
+
/** Pending provider work in submission order. */
|
|
170
|
+
queued = /* @__PURE__ */ new Map();
|
|
171
|
+
/** Shared concurrency limit. */
|
|
172
|
+
maximumConcurrentLoads;
|
|
173
|
+
demands = /* @__PURE__ */ new Map();
|
|
174
|
+
references = /* @__PURE__ */ new Map();
|
|
175
|
+
constructor(props) {
|
|
176
|
+
this.props = props;
|
|
177
|
+
this.maximumConcurrentLoads = props.maximumConcurrentLoads ?? 4;
|
|
178
|
+
if (!Number.isSafeInteger(this.maximumConcurrentLoads) || this.maximumConcurrentLoads < 1)
|
|
179
|
+
throw new Error("Invalid terrain provider concurrency");
|
|
180
|
+
}
|
|
181
|
+
/** Replace one owner's demand while keeping shared requests and resident content alive. */
|
|
182
|
+
setDemand(owner, keys) {
|
|
183
|
+
const previous = this.demands.get(owner);
|
|
184
|
+
for (const key of keys)
|
|
185
|
+
if (!(previous == null ? void 0 : previous.has(key)))
|
|
186
|
+
this.references.set(key, (this.references.get(key) ?? 0) + 1);
|
|
187
|
+
for (const key of previous ?? []) {
|
|
188
|
+
if (keys.has(key))
|
|
189
|
+
continue;
|
|
190
|
+
const remaining = this.references.get(key) - 1;
|
|
191
|
+
if (remaining) {
|
|
192
|
+
this.references.set(key, remaining);
|
|
193
|
+
} else {
|
|
194
|
+
this.references.delete(key);
|
|
195
|
+
const load = this.loads.get(key);
|
|
196
|
+
if (load)
|
|
197
|
+
this.abortLoad(load);
|
|
198
|
+
this.loads.delete(key);
|
|
199
|
+
this.queued.delete(key);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
if (keys.size)
|
|
203
|
+
this.demands.set(owner, keys);
|
|
204
|
+
else
|
|
205
|
+
this.demands.delete(owner);
|
|
206
|
+
}
|
|
207
|
+
/** Reuse the same fetch when a superseding window still needs its revisioned key. */
|
|
208
|
+
getLoad(key) {
|
|
209
|
+
const retained = this.loads.get(key);
|
|
210
|
+
if (retained)
|
|
211
|
+
return retained.tile;
|
|
212
|
+
let resolve;
|
|
213
|
+
let reject;
|
|
214
|
+
const tile = new Promise((resolveTile, rejectTile) => {
|
|
215
|
+
resolve = resolveTile;
|
|
216
|
+
reject = rejectTile;
|
|
217
|
+
});
|
|
218
|
+
const load = { controller: new AbortController(), tile, resolve, reject };
|
|
219
|
+
this.loads.set(key, load);
|
|
220
|
+
this.queued.set(key, load);
|
|
221
|
+
this.startQueuedLoads();
|
|
222
|
+
return tile;
|
|
223
|
+
}
|
|
224
|
+
/** Release the waiting window promptly while retaining the active capacity reservation. */
|
|
225
|
+
abortLoad(load) {
|
|
226
|
+
load.controller.abort();
|
|
227
|
+
load.reject(load.controller.signal.reason);
|
|
228
|
+
}
|
|
229
|
+
/** Only active provider work consumes concurrency, even if the provider ignores abort. */
|
|
230
|
+
startQueuedLoads() {
|
|
231
|
+
for (const [key, load] of this.queued) {
|
|
232
|
+
if (this.activeLoads >= this.maximumConcurrentLoads)
|
|
233
|
+
break;
|
|
234
|
+
this.queued.delete(key);
|
|
235
|
+
this.activeLoads++;
|
|
236
|
+
const { signal } = load.controller;
|
|
237
|
+
void Promise.resolve().then(() => {
|
|
238
|
+
signal.throwIfAborted();
|
|
239
|
+
return this.props.provider.loadTile(key, signal);
|
|
240
|
+
}).then((tile) => load.resolve(structuredClone(tile))).catch((error) => {
|
|
241
|
+
if (this.loads.get(key) === load)
|
|
242
|
+
this.loads.delete(key);
|
|
243
|
+
load.reject(error);
|
|
244
|
+
}).finally(() => {
|
|
245
|
+
this.activeLoads--;
|
|
246
|
+
this.startQueuedLoads();
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
function sameStitchedSamples(previous, next) {
|
|
252
|
+
if (previous === next)
|
|
253
|
+
return true;
|
|
254
|
+
const first = previous == null ? void 0 : previous.field.heights;
|
|
255
|
+
const second = next.field.heights;
|
|
256
|
+
return (first == null ? void 0 : first.length) === (second == null ? void 0 : second.length) && (!first || first.every((value, index) => Object.is(value, second[index])));
|
|
257
|
+
}
|
|
258
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
259
|
+
0 && (module.exports = {
|
|
260
|
+
GPURigidBodyTerrainStream,
|
|
261
|
+
RigidBodyTerrainLoadQueue,
|
|
262
|
+
makeRigidBodyTerrainFetchProvider
|
|
263
|
+
});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { GPURigidBodyWorld, GPURigidBodyHeightFieldEdit } from "./gpu-rigid-body-world.js";
|
|
2
|
+
import { type GPURigidBodyTerrainSeam, type GPURigidBodyTerrainTile } from "./rigid-body-terrain-stitch.js";
|
|
3
|
+
/** Fetch and decode a tile by an application-defined revisioned key. */
|
|
4
|
+
export type GPURigidBodyTerrainProvider = {
|
|
5
|
+
/** Resolve a detached tile in the shared collider frame. Honor signal for prompt cancellation. */
|
|
6
|
+
loadTile(key: string, signal: AbortSignal): Promise<GPURigidBodyTerrainTile>;
|
|
7
|
+
};
|
|
8
|
+
/** URL resolver and decoder used by the standard fetch provider. */
|
|
9
|
+
export type GPURigidBodyTerrainFetchProps = {
|
|
10
|
+
/** Resolve a revisioned tile key to a request URL. */
|
|
11
|
+
getTileUrl: (key: string) => string | URL;
|
|
12
|
+
/** Decode the response into a native field and metric placement. */
|
|
13
|
+
decode: (response: Response, key: string, signal: AbortSignal) => Promise<GPURigidBodyTerrainTile>;
|
|
14
|
+
/** Optional transport for applications with custom request policy. */
|
|
15
|
+
fetch?: typeof globalThis.fetch;
|
|
16
|
+
};
|
|
17
|
+
/** Load HTTP tiles with the stream's cancellation signal and a caller-supplied decoder. */
|
|
18
|
+
export declare function makeRigidBodyTerrainFetchProvider(props: GPURigidBodyTerrainFetchProps): GPURigidBodyTerrainProvider;
|
|
19
|
+
/** One requested tile and its reserved native height-field slot. */
|
|
20
|
+
export type GPURigidBodyTerrainSlot = {
|
|
21
|
+
/** Collider receiving the tile. */
|
|
22
|
+
collider: number;
|
|
23
|
+
/** Stable content key, including revision if tiles can change. */
|
|
24
|
+
key: string;
|
|
25
|
+
};
|
|
26
|
+
/** Complete desired residency and the edges to reconcile before publication. */
|
|
27
|
+
export type GPURigidBodyTerrainWindow = {
|
|
28
|
+
/** Requested tiles across all slots owned by this stream. */
|
|
29
|
+
tiles: readonly GPURigidBodyTerrainSlot[];
|
|
30
|
+
/** Explicit collinear neighbors in the supplied frame. */
|
|
31
|
+
seams?: readonly GPURigidBodyTerrainSeam[];
|
|
32
|
+
};
|
|
33
|
+
/** Stream settings. */
|
|
34
|
+
export type GPURigidBodyTerrainStreamProps = {
|
|
35
|
+
/** Data source for loading native fields. */
|
|
36
|
+
provider: GPURigidBodyTerrainProvider;
|
|
37
|
+
/** Upper bound shared across current and superseded windows. Defaults to four. */
|
|
38
|
+
maximumConcurrentLoads?: number;
|
|
39
|
+
};
|
|
40
|
+
/** Bounded provider fetching with an explicit publication boundary between GPU submissions. */
|
|
41
|
+
export declare class GPURigidBodyTerrainStream {
|
|
42
|
+
private readonly world;
|
|
43
|
+
/** @internal One queue can serve multiple independent residency windows. */
|
|
44
|
+
private readonly loadQueue;
|
|
45
|
+
/** Last request, used to ignore late completions. */
|
|
46
|
+
private controller?;
|
|
47
|
+
/** Fully fetched and stitched window waiting for publication. */
|
|
48
|
+
private ready?;
|
|
49
|
+
/** Current stream-owned collider contents. */
|
|
50
|
+
private resident;
|
|
51
|
+
/** Create a streamer that borrows a world's fixed slots and owns its provider requests. */
|
|
52
|
+
constructor(world: Pick<GPURigidBodyWorld, 'setHeightFieldTiles'>, props: GPURigidBodyTerrainStreamProps,
|
|
53
|
+
/** @internal One queue can serve multiple independent residency windows. */
|
|
54
|
+
loadQueue?: RigidBodyTerrainLoadQueue);
|
|
55
|
+
/** Stage the latest window. False indicates a newer window or cancellation superseded it. */
|
|
56
|
+
prepare(window: GPURigidBodyTerrainWindow): Promise<boolean>;
|
|
57
|
+
/** Publish the fully staged window between submissions. Preserve it if upload validation fails. */
|
|
58
|
+
apply(): boolean;
|
|
59
|
+
/** @internal Plan the ready window without changing its publication status. */
|
|
60
|
+
getPreparedEdits(): GPURigidBodyHeightFieldEdit[] | undefined;
|
|
61
|
+
/** @internal Commit only after the caller has published the corresponding edits. */
|
|
62
|
+
commitPreparedWindow(): void;
|
|
63
|
+
/** Number of slots in the committed window. */
|
|
64
|
+
get residentTileCount(): number;
|
|
65
|
+
/** Read a detached copy of the collider's currently committed and stitched tile. */
|
|
66
|
+
getTile(collider: number): GPURigidBodyTerrainTile | null;
|
|
67
|
+
/** Cancel pending work and discard unapplied data. */
|
|
68
|
+
cancel(): void;
|
|
69
|
+
/** Release stream-owned slots after canceling fetches. Call between submissions. */
|
|
70
|
+
clear(): void;
|
|
71
|
+
/** @internal Forget the window after its world has taken over resource disposal. */
|
|
72
|
+
release(): void;
|
|
73
|
+
}
|
|
74
|
+
/** @internal Shared, ref-counted provider requests across independent windows. */
|
|
75
|
+
export declare class RigidBodyTerrainLoadQueue {
|
|
76
|
+
private readonly props;
|
|
77
|
+
/** Active provider work, including aborted requests that have not settled. */
|
|
78
|
+
private activeLoads;
|
|
79
|
+
/** Requests retained by the latest window, including completed but unapplied data. */
|
|
80
|
+
private readonly loads;
|
|
81
|
+
/** Pending provider work in submission order. */
|
|
82
|
+
private readonly queued;
|
|
83
|
+
/** Shared concurrency limit. */
|
|
84
|
+
private readonly maximumConcurrentLoads;
|
|
85
|
+
private readonly demands;
|
|
86
|
+
private readonly references;
|
|
87
|
+
constructor(props: GPURigidBodyTerrainStreamProps);
|
|
88
|
+
/** Replace one owner's demand while keeping shared requests and resident content alive. */
|
|
89
|
+
setDemand(owner: object, keys: ReadonlySet<string>): void;
|
|
90
|
+
/** Reuse the same fetch when a superseding window still needs its revisioned key. */
|
|
91
|
+
getLoad(key: string): Promise<GPURigidBodyTerrainTile>;
|
|
92
|
+
/** Release the waiting window promptly while retaining the active capacity reservation. */
|
|
93
|
+
private abortLoad;
|
|
94
|
+
/** Only active provider work consumes concurrency, even if the provider ignores abort. */
|
|
95
|
+
private startQueuedLoads;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=rigid-body-terrain-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rigid-body-terrain-stream.d.ts","sourceRoot":"","sources":["../../src/gpu-physics/rigid-body-terrain-stream.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,2BAA2B,EAAC,kCAA+B;AAC3F,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC7B,uCAAoC;AAErC,wEAAwE;AACxE,MAAM,MAAM,2BAA2B,GAAG;IACxC,kGAAkG;IAClG,QAAQ,CAAC,GAAG,EAAE,MAAM,EAA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FAAqF;IACrF,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAgBtD,2FAA2F;IAC3F,OAAO,CAAC,SAAS;IAKjB,0FAA0F;IAC1F,OAAO,CAAC,gBAAgB;CAsBzB"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import { stitchRigidBodyTerrainTiles } from "./rigid-body-terrain-stitch.js";
|
|
5
|
+
/** Load HTTP tiles with the stream's cancellation signal and a caller-supplied decoder. */
|
|
6
|
+
export function makeRigidBodyTerrainFetchProvider(props) {
|
|
7
|
+
return {
|
|
8
|
+
async loadTile(key, signal) {
|
|
9
|
+
const response = await (props.fetch ?? globalThis.fetch)(props.getTileUrl(key), { signal });
|
|
10
|
+
if (!response.ok)
|
|
11
|
+
throw new Error(`Terrain request failed with HTTP ${response.status}`);
|
|
12
|
+
signal.throwIfAborted();
|
|
13
|
+
return props.decode(response, key, signal);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** Bounded provider fetching with an explicit publication boundary between GPU submissions. */
|
|
18
|
+
export class GPURigidBodyTerrainStream {
|
|
19
|
+
world;
|
|
20
|
+
loadQueue;
|
|
21
|
+
/** Last request, used to ignore late completions. */
|
|
22
|
+
controller;
|
|
23
|
+
/** Fully fetched and stitched window waiting for publication. */
|
|
24
|
+
ready;
|
|
25
|
+
/** Current stream-owned collider contents. */
|
|
26
|
+
resident = { keys: new Map(), source: new Map(), stitched: new Map() };
|
|
27
|
+
/** Create a streamer that borrows a world's fixed slots and owns its provider requests. */
|
|
28
|
+
constructor(world, props,
|
|
29
|
+
/** @internal One queue can serve multiple independent residency windows. */
|
|
30
|
+
loadQueue = new RigidBodyTerrainLoadQueue(props)) {
|
|
31
|
+
this.world = world;
|
|
32
|
+
this.loadQueue = loadQueue;
|
|
33
|
+
}
|
|
34
|
+
/** Stage the latest window. False indicates a newer window or cancellation superseded it. */
|
|
35
|
+
async prepare(window) {
|
|
36
|
+
const keys = new Map();
|
|
37
|
+
for (const { collider, key } of window.tiles) {
|
|
38
|
+
if (!Number.isSafeInteger(collider) || collider < 0 || keys.has(collider) || !key)
|
|
39
|
+
throw new Error('Invalid terrain window slot');
|
|
40
|
+
keys.set(collider, key);
|
|
41
|
+
}
|
|
42
|
+
const seams = window.seams?.map(seam => ({ ...seam })) ?? [];
|
|
43
|
+
for (const seam of seams)
|
|
44
|
+
if (!keys.has(seam.first) || !keys.has(seam.second))
|
|
45
|
+
throw new Error('Terrain seam references an absent slot');
|
|
46
|
+
this.controller?.abort();
|
|
47
|
+
this.ready = undefined;
|
|
48
|
+
const required = new Set(keys.values());
|
|
49
|
+
this.loadQueue.setDemand(this, new Set([...this.resident.source.keys(), ...required]));
|
|
50
|
+
const controller = new AbortController();
|
|
51
|
+
this.controller = controller;
|
|
52
|
+
const signal = controller.signal;
|
|
53
|
+
const cancellation = new Promise(resolve => {
|
|
54
|
+
signal.addEventListener('abort', () => resolve(false), { once: true });
|
|
55
|
+
});
|
|
56
|
+
// Capture this revision's cache so a later publication cannot change the selected source.
|
|
57
|
+
const residentSources = this.resident.source;
|
|
58
|
+
const loadWindow = async () => {
|
|
59
|
+
const source = new Map(await Promise.all([...required].map(async (key) => [key, residentSources.get(key) ?? (await this.loadQueue.getLoad(key))])));
|
|
60
|
+
if (signal.aborted)
|
|
61
|
+
return false;
|
|
62
|
+
const tiles = new Map(Array.from(keys, ([collider, key]) => [collider, source.get(key)]));
|
|
63
|
+
const stitched = stitchRigidBodyTerrainTiles(tiles, seams);
|
|
64
|
+
this.ready = { keys, source, stitched };
|
|
65
|
+
return true;
|
|
66
|
+
};
|
|
67
|
+
try {
|
|
68
|
+
return await Promise.race([loadWindow(), cancellation]);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (signal.aborted)
|
|
72
|
+
return false;
|
|
73
|
+
this.cancel();
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
finally {
|
|
77
|
+
if (this.controller === controller)
|
|
78
|
+
this.controller = undefined;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** Publish the fully staged window between submissions. Preserve it if upload validation fails. */
|
|
82
|
+
apply() {
|
|
83
|
+
const edits = this.getPreparedEdits();
|
|
84
|
+
if (!edits)
|
|
85
|
+
return false;
|
|
86
|
+
if (edits.length)
|
|
87
|
+
this.world.setHeightFieldTiles(edits);
|
|
88
|
+
this.commitPreparedWindow();
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
/** @internal Plan the ready window without changing its publication status. */
|
|
92
|
+
getPreparedEdits() {
|
|
93
|
+
const ready = this.ready;
|
|
94
|
+
if (!ready)
|
|
95
|
+
return undefined;
|
|
96
|
+
const edits = [];
|
|
97
|
+
for (const collider of this.resident.stitched.keys()) {
|
|
98
|
+
if (!ready.keys.has(collider))
|
|
99
|
+
edits.push({ collider, field: null });
|
|
100
|
+
}
|
|
101
|
+
for (const [collider, tile] of ready.stitched) {
|
|
102
|
+
const previous = this.resident.stitched.get(collider);
|
|
103
|
+
const keyChanged = this.resident.keys.get(collider) !== ready.keys.get(collider);
|
|
104
|
+
if (keyChanged || !sameStitchedSamples(previous, tile))
|
|
105
|
+
edits.push({ collider, field: tile.field, position: tile.position });
|
|
106
|
+
}
|
|
107
|
+
return edits;
|
|
108
|
+
}
|
|
109
|
+
/** @internal Commit only after the caller has published the corresponding edits. */
|
|
110
|
+
commitPreparedWindow() {
|
|
111
|
+
const ready = this.ready;
|
|
112
|
+
this.resident = ready;
|
|
113
|
+
this.ready = undefined;
|
|
114
|
+
this.loadQueue.setDemand(this, new Set(ready.source.keys()));
|
|
115
|
+
}
|
|
116
|
+
/** Number of slots in the committed window. */
|
|
117
|
+
get residentTileCount() {
|
|
118
|
+
return this.resident.keys.size;
|
|
119
|
+
}
|
|
120
|
+
/** Read a detached copy of the collider's currently committed and stitched tile. */
|
|
121
|
+
getTile(collider) {
|
|
122
|
+
const tile = this.resident.stitched.get(collider);
|
|
123
|
+
return tile ? structuredClone(tile) : null;
|
|
124
|
+
}
|
|
125
|
+
/** Cancel pending work and discard unapplied data. */
|
|
126
|
+
cancel() {
|
|
127
|
+
this.controller?.abort();
|
|
128
|
+
this.controller = undefined;
|
|
129
|
+
this.ready = undefined;
|
|
130
|
+
this.loadQueue.setDemand(this, new Set(this.resident.source.keys()));
|
|
131
|
+
}
|
|
132
|
+
/** Release stream-owned slots after canceling fetches. Call between submissions. */
|
|
133
|
+
clear() {
|
|
134
|
+
this.cancel();
|
|
135
|
+
const edits = Array.from(this.resident.stitched.keys(), collider => ({ collider, field: null }));
|
|
136
|
+
if (edits.length)
|
|
137
|
+
this.world.setHeightFieldTiles(edits);
|
|
138
|
+
this.release();
|
|
139
|
+
}
|
|
140
|
+
/** @internal Forget the window after its world has taken over resource disposal. */
|
|
141
|
+
release() {
|
|
142
|
+
this.cancel();
|
|
143
|
+
this.loadQueue.setDemand(this, new Set());
|
|
144
|
+
this.resident = { keys: new Map(), source: new Map(), stitched: new Map() };
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/** @internal Shared, ref-counted provider requests across independent windows. */
|
|
148
|
+
export class RigidBodyTerrainLoadQueue {
|
|
149
|
+
props;
|
|
150
|
+
/** Active provider work, including aborted requests that have not settled. */
|
|
151
|
+
activeLoads = 0;
|
|
152
|
+
/** Requests retained by the latest window, including completed but unapplied data. */
|
|
153
|
+
loads = new Map();
|
|
154
|
+
/** Pending provider work in submission order. */
|
|
155
|
+
queued = new Map();
|
|
156
|
+
/** Shared concurrency limit. */
|
|
157
|
+
maximumConcurrentLoads;
|
|
158
|
+
demands = new Map();
|
|
159
|
+
references = new Map();
|
|
160
|
+
constructor(props) {
|
|
161
|
+
this.props = props;
|
|
162
|
+
this.maximumConcurrentLoads = props.maximumConcurrentLoads ?? 4;
|
|
163
|
+
if (!Number.isSafeInteger(this.maximumConcurrentLoads) || this.maximumConcurrentLoads < 1)
|
|
164
|
+
throw new Error('Invalid terrain provider concurrency');
|
|
165
|
+
}
|
|
166
|
+
/** Replace one owner's demand while keeping shared requests and resident content alive. */
|
|
167
|
+
setDemand(owner, keys) {
|
|
168
|
+
const previous = this.demands.get(owner);
|
|
169
|
+
for (const key of keys)
|
|
170
|
+
if (!previous?.has(key))
|
|
171
|
+
this.references.set(key, (this.references.get(key) ?? 0) + 1);
|
|
172
|
+
for (const key of previous ?? []) {
|
|
173
|
+
if (keys.has(key))
|
|
174
|
+
continue;
|
|
175
|
+
const remaining = this.references.get(key) - 1;
|
|
176
|
+
if (remaining) {
|
|
177
|
+
this.references.set(key, remaining);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
this.references.delete(key);
|
|
181
|
+
const load = this.loads.get(key);
|
|
182
|
+
if (load)
|
|
183
|
+
this.abortLoad(load);
|
|
184
|
+
this.loads.delete(key);
|
|
185
|
+
this.queued.delete(key);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (keys.size)
|
|
189
|
+
this.demands.set(owner, keys);
|
|
190
|
+
else
|
|
191
|
+
this.demands.delete(owner);
|
|
192
|
+
}
|
|
193
|
+
/** Reuse the same fetch when a superseding window still needs its revisioned key. */
|
|
194
|
+
getLoad(key) {
|
|
195
|
+
const retained = this.loads.get(key);
|
|
196
|
+
if (retained)
|
|
197
|
+
return retained.tile;
|
|
198
|
+
let resolve;
|
|
199
|
+
let reject;
|
|
200
|
+
const tile = new Promise((resolveTile, rejectTile) => {
|
|
201
|
+
resolve = resolveTile;
|
|
202
|
+
reject = rejectTile;
|
|
203
|
+
});
|
|
204
|
+
const load = { controller: new AbortController(), tile, resolve, reject };
|
|
205
|
+
this.loads.set(key, load);
|
|
206
|
+
this.queued.set(key, load);
|
|
207
|
+
this.startQueuedLoads();
|
|
208
|
+
return tile;
|
|
209
|
+
}
|
|
210
|
+
/** Release the waiting window promptly while retaining the active capacity reservation. */
|
|
211
|
+
abortLoad(load) {
|
|
212
|
+
load.controller.abort();
|
|
213
|
+
load.reject(load.controller.signal.reason);
|
|
214
|
+
}
|
|
215
|
+
/** Only active provider work consumes concurrency, even if the provider ignores abort. */
|
|
216
|
+
startQueuedLoads() {
|
|
217
|
+
for (const [key, load] of this.queued) {
|
|
218
|
+
if (this.activeLoads >= this.maximumConcurrentLoads)
|
|
219
|
+
break;
|
|
220
|
+
this.queued.delete(key);
|
|
221
|
+
this.activeLoads++;
|
|
222
|
+
const { signal } = load.controller;
|
|
223
|
+
void Promise.resolve()
|
|
224
|
+
.then(() => {
|
|
225
|
+
signal.throwIfAborted();
|
|
226
|
+
return this.props.provider.loadTile(key, signal);
|
|
227
|
+
})
|
|
228
|
+
.then(tile => load.resolve(structuredClone(tile)))
|
|
229
|
+
.catch(error => {
|
|
230
|
+
if (this.loads.get(key) === load)
|
|
231
|
+
this.loads.delete(key);
|
|
232
|
+
load.reject(error);
|
|
233
|
+
})
|
|
234
|
+
.finally(() => {
|
|
235
|
+
this.activeLoads--;
|
|
236
|
+
this.startQueuedLoads();
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
/** For the same raw tile, only stitched seam heights can differ. */
|
|
242
|
+
function sameStitchedSamples(previous, next) {
|
|
243
|
+
if (previous === next)
|
|
244
|
+
return true;
|
|
245
|
+
const first = previous?.field.heights;
|
|
246
|
+
const second = next.field.heights;
|
|
247
|
+
return (first?.length === second?.length &&
|
|
248
|
+
(!first || first.every((value, index) => Object.is(value, second[index]))));
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=rigid-body-terrain-stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rigid-body-terrain-stream.js","sourceRoot":"","sources":["../../src/gpu-physics/rigid-body-terrain-stream.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAG5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MAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAC5E,CAAC;AACJ,CAAC"}
|
|
@@ -144,6 +144,7 @@ struct TriggerRing {sequence:u32,step:u32,saturated:u32,reserved:u32,entries:arr
|
|
|
144
144
|
for(var firstTriangle=0u;firstTriangle<firstCount&&!found;firstTriangle++){
|
|
145
145
|
for(var secondTriangle=0u;secondTriangle<secondCount;secondTriangle++){
|
|
146
146
|
if(tested>=MESH_TRAVERSAL_BUDGET){incomplete=true;break;}tested++;
|
|
147
|
+
if((firstMesh&&!meshTriangleActive(pair.x,firstTriangle))||(secondMesh&&!meshTriangleActive(pair.y,secondTriangle))){continue;}
|
|
147
148
|
if(!permitsPlaneContact(pair.x,pair.y)||!permitsPlaneContact(pair.y,pair.x)){continue;}
|
|
148
149
|
let hit=convexContact(pair.x,pair.y,select(-1,i32(firstTriangle),firstMesh),select(-1,i32(secondTriangle),secondMesh));
|
|
149
150
|
incomplete=incomplete||hit.status==2u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rigid-body-triggers.d.ts","sourceRoot":"","sources":["../../src/gpu-physics/rigid-body-triggers.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,MAAM,EAA0B,MAAM,eAAe,CAAC;AAE9D,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAElB,yCAAsC;AACvC,OAAO,KAAK,EAAC,oBAAoB,EAAC,mCAAgC;AAGlE,MAAM,MAAM,mBAAmB,GAAG;IAChC,uEAAuE;IACvE,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,wFAAwF;IACxF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uEAAuE;IACvE,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,yFAAyF;IACzF,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IACvD,8FAA8F;IAC9F,KAAK,CAAC,EAAE,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AE,CAAC;CACpC,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,EACxC,SAAS,EAAE,SAAS,CAAC,oBAAoB,GAAG;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAC,EAAE;;;;EAkE9D;AACD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,WAAW,EACjB,MAAM,SAAI,GACT,wBAAwB,CAwB1B;AACD,KAAK,WAAW,GAAG;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC;AACjG,wBAAgB,oBAAoB,CAAC,UAAU,EAC7C,KAAK,EAAE,eAAe,CAAC,UAAU,CAAC,EAClC,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,EACrD,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,WAAW,EAAE,EACvB,UAAU,EAAE,WAAW,EACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,KAAK,MAAM,EAC9D,SAAS,UAAQ,EACjB,QAAQ,UAAQ;;;;;;;;;EA8KjB"}
|
|
@@ -132,6 +132,7 @@ struct TriggerRing {sequence:u32,step:u32,saturated:u32,reserved:u32,entries:arr
|
|
|
132
132
|
for(var firstTriangle=0u;firstTriangle<firstCount&&!found;firstTriangle++){
|
|
133
133
|
for(var secondTriangle=0u;secondTriangle<secondCount;secondTriangle++){
|
|
134
134
|
if(tested>=MESH_TRAVERSAL_BUDGET){incomplete=true;break;}tested++;
|
|
135
|
+
if((firstMesh&&!meshTriangleActive(pair.x,firstTriangle))||(secondMesh&&!meshTriangleActive(pair.y,secondTriangle))){continue;}
|
|
135
136
|
if(!permitsPlaneContact(pair.x,pair.y)||!permitsPlaneContact(pair.y,pair.x)){continue;}
|
|
136
137
|
let hit=convexContact(pair.x,pair.y,select(-1,i32(firstTriangle),firstMesh),select(-1,i32(secondTriangle),secondMesh));
|
|
137
138
|
incomplete=incomplete||hit.status==2u;
|