@luma.gl/graph 10.0.0-beta.1 → 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/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/gpu-dataframe/gpu-data-frame-query.cjs +7 -3
- package/dist/gpu-dataframe/gpu-data-frame-query.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-data-frame-query.js +14 -4
- 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 +86 -0
- package/dist/gpu-dataframe/gpu-expression.d.ts +23 -2
- package/dist/gpu-dataframe/gpu-expression.d.ts.map +1 -1
- package/dist/gpu-dataframe/gpu-expression.js +81 -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 +8 -0
- package/dist/gpu-dataframe/index.cjs.map +2 -2
- package/dist/gpu-dataframe/index.d.ts +2 -2
- package/dist/gpu-dataframe/index.d.ts.map +1 -1
- package/dist/gpu-dataframe/index.js +1 -1
- package/dist/gpu-dataframe/index.js.map +1 -1
- package/dist/gpu-dataframe/portable-expression.cjs +68 -4
- package/dist/gpu-dataframe/portable-expression.d.ts +3 -1
- package/dist/gpu-dataframe/portable-expression.d.ts.map +1 -1
- package/dist/gpu-dataframe/portable-expression.js +69 -5
- package/dist/gpu-dataframe/portable-expression.js.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-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-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 +483 -152
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts +64 -3
- package/dist/gpu-physics/gpu-rigid-body-world.d.ts.map +1 -1
- package/dist/gpu-physics/gpu-rigid-body-world.js +523 -161
- 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 +8 -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-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 +11 -5
- 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 +14 -6
- 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 +99 -44
- package/dist/gpu-physics/rigid-body-vehicle.d.ts +15 -3
- package/dist/gpu-physics/rigid-body-vehicle.d.ts.map +1 -1
- package/dist/gpu-physics/rigid-body-vehicle.js +93 -40
- package/dist/gpu-physics/rigid-body-vehicle.js.map +1 -1
- package/dist/gpu-project/cpu-geometry-pipelines.d.ts +1 -1
- package/dist/gpu-project/cpu-projection-operation.d.ts +1 -1
- package/dist/gpu-project/crs.cjs.map +2 -2
- package/dist/gpu-project/crs.d.ts +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/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/operation/gpu-data-evaluator.d.ts +1 -1
- package/dist/gpu-simple-graph/operation/gpu-data-evaluator.d.ts.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-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 +76 -122
- package/dist/gpu-sql/gpu-sql.d.ts.map +1 -1
- package/dist/gpu-sql/gpu-sql.js +99 -130
- package/dist/gpu-sql/gpu-sql.js.map +1 -1
- package/dist/gpu-sql/index.cjs.map +2 -2
- package/package.json +19 -19
- package/src/experimental-models.ts +5 -0
- package/src/experimental-simulation.ts +5 -0
- package/src/gpu-dataframe/gpu-data-frame-query.ts +18 -5
- package/src/gpu-dataframe/gpu-expression-shader.ts +128 -7
- package/src/gpu-dataframe/gpu-expression.ts +124 -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 +15 -2
- package/src/gpu-dataframe/portable-expression.ts +81 -4
- package/src/gpu-dggs-benchmarks.ts +5 -0
- 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 +668 -198
- package/src/gpu-physics/index.ts +37 -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-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 +17 -6
- 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 +108 -41
- package/src/gpu-project/README.md +2 -2
- package/src/gpu-project/cpu-geometry-pipelines.ts +1 -1
- package/src/gpu-project/cpu-projection-operation.ts +1 -1
- package/src/gpu-project/crs.ts +2 -2
- 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/gpu-simple-graph-transfer.ts +1 -1
- package/src/gpu-simple-graph/gpu-simple-graph-value.ts +1 -1
- package/src/gpu-simple-graph/operation/gpu-data-evaluator.ts +1 -1
- package/src/gpu-simple-graph/operation/operation.ts +1 -1
- package/src/gpu-simple-graph/operations/swizzle.ts +1 -1
- 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 +150 -152
|
@@ -0,0 +1,215 @@
|
|
|
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_stitch_exports = {};
|
|
19
|
+
__export(rigid_body_terrain_stitch_exports, {
|
|
20
|
+
stitchRigidBodyTerrainTiles: () => stitchRigidBodyTerrainTiles
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(rigid_body_terrain_stitch_exports);
|
|
23
|
+
function stitchRigidBodyTerrainTiles(tiles, seams) {
|
|
24
|
+
if (!seams.length)
|
|
25
|
+
return tiles;
|
|
26
|
+
const samples = /* @__PURE__ */ new Map();
|
|
27
|
+
const constraints = [];
|
|
28
|
+
const aliases = [];
|
|
29
|
+
const getSample = (boundary, edgeIndex) => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
let tileSamples = samples.get(boundary.slot);
|
|
32
|
+
if (!tileSamples) {
|
|
33
|
+
tileSamples = /* @__PURE__ */ new Map();
|
|
34
|
+
samples.set(boundary.slot, tileSamples);
|
|
35
|
+
}
|
|
36
|
+
const index = boundary.index(edgeIndex);
|
|
37
|
+
const { field, position } = boundary.tile;
|
|
38
|
+
const sourceHeight = ((_a = field.heights) == null ? void 0 : _a[index]) ?? NaN;
|
|
39
|
+
const spacing = Math.hypot(...boundary.step);
|
|
40
|
+
let sample = tileSamples.get(index);
|
|
41
|
+
if (!sample) {
|
|
42
|
+
sample = {
|
|
43
|
+
parent: null,
|
|
44
|
+
value: sourceHeight + position[2],
|
|
45
|
+
valid: Number.isFinite(sourceHeight) && ((_b = field.validity) == null ? void 0 : _b[index]) !== 0,
|
|
46
|
+
spacing,
|
|
47
|
+
slot: boundary.slot,
|
|
48
|
+
index
|
|
49
|
+
};
|
|
50
|
+
tileSamples.set(index, sample);
|
|
51
|
+
} else {
|
|
52
|
+
sample.spacing = Math.max(sample.spacing, spacing);
|
|
53
|
+
}
|
|
54
|
+
return sample;
|
|
55
|
+
};
|
|
56
|
+
for (const seam of seams) {
|
|
57
|
+
const first = makeBoundary(tiles, seam.first, seam.firstEdge);
|
|
58
|
+
const second = makeBoundary(tiles, seam.second, seam.secondEdge);
|
|
59
|
+
if (first.slot === second.slot)
|
|
60
|
+
throw new Error("Terrain seam requires distinct tiles");
|
|
61
|
+
const firstSpacing = Math.hypot(...first.step);
|
|
62
|
+
const secondSpacing = Math.hypot(...second.step);
|
|
63
|
+
const firstIsCoarse = firstSpacing >= secondSpacing;
|
|
64
|
+
const coarse = firstIsCoarse ? first : second;
|
|
65
|
+
const fine = firstIsCoarse ? second : first;
|
|
66
|
+
const spacing = Math.max(firstSpacing, secondSpacing);
|
|
67
|
+
const spacingRatio = Math.min(firstSpacing, secondSpacing) / spacing;
|
|
68
|
+
if (!Number.isFinite(spacingRatio) || spacingRatio <= 0)
|
|
69
|
+
throw new Error("Invalid terrain edge spacing");
|
|
70
|
+
const direction = coarse.step.map((value) => value / spacing);
|
|
71
|
+
const offset = fine.origin.map((value, axis) => value - coarse.origin[axis]);
|
|
72
|
+
const projectedStart = (offset[0] * direction[0] + offset[1] * direction[1]) / spacing;
|
|
73
|
+
const projectedStep = (fine.step[0] * direction[0] + fine.step[1] * direction[1]) / spacing;
|
|
74
|
+
const tolerance = 16 * Number.EPSILON * Math.max(1, coarse.count, fine.count, ...coarse.origin.map((value) => Math.abs(value) / spacing), ...fine.origin.map((value) => Math.abs(value) / spacing));
|
|
75
|
+
const lateralStart = (offset[0] * direction[1] - offset[1] * direction[0]) / spacing;
|
|
76
|
+
const lateralStep = (fine.step[0] * direction[1] - fine.step[1] * direction[0]) / spacing;
|
|
77
|
+
const subdivision = Math.round(1 / spacingRatio);
|
|
78
|
+
if (tolerance >= spacingRatio * 0.01 || Math.max(Math.abs(lateralStart), Math.abs(lateralStart + lateralStep * (fine.count - 1))) > tolerance || Math.abs(Math.abs(projectedStep) - 1 / subdivision) * (fine.count - 1) > tolerance || Math.abs(projectedStart * subdivision - Math.round(projectedStart * subdivision)) > tolerance * subdivision)
|
|
79
|
+
throw new Error("Terrain seam requires collinear nested sample lattices");
|
|
80
|
+
const start = Math.round(projectedStart * subdivision);
|
|
81
|
+
const directionSign = Math.sign(projectedStep);
|
|
82
|
+
const end = start + directionSign * (fine.count - 1);
|
|
83
|
+
const lower = Math.max(0, Math.min(start, end));
|
|
84
|
+
const upper = Math.min((coarse.count - 1) * subdivision, Math.max(start, end));
|
|
85
|
+
if (upper <= lower || lower % subdivision !== 0 || upper % subdivision !== 0)
|
|
86
|
+
throw new Error("Terrain seam overlap must start and end at common sample knots");
|
|
87
|
+
for (let knot = lower; knot <= upper; knot++) {
|
|
88
|
+
const fineSample = getSample(fine, (knot - start) * directionSign);
|
|
89
|
+
const lowerIndex = Math.floor(knot / subdivision);
|
|
90
|
+
const lowerSample = getSample(coarse, lowerIndex);
|
|
91
|
+
const remainder = knot % subdivision;
|
|
92
|
+
if (remainder === 0) {
|
|
93
|
+
aliases.push([fineSample, lowerSample]);
|
|
94
|
+
} else {
|
|
95
|
+
constraints.push({
|
|
96
|
+
fine: fineSample,
|
|
97
|
+
lower: lowerSample,
|
|
98
|
+
upper: getSample(coarse, lowerIndex + 1),
|
|
99
|
+
fraction: remainder / subdivision
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
for (const [first, second] of aliases)
|
|
105
|
+
uniteSamples(first, second);
|
|
106
|
+
const bySample = /* @__PURE__ */ new Map();
|
|
107
|
+
for (const constraint of constraints) {
|
|
108
|
+
const root = getRoot(constraint.fine);
|
|
109
|
+
const existing = bySample.get(root) ?? [];
|
|
110
|
+
existing.push(constraint);
|
|
111
|
+
bySample.set(root, existing);
|
|
112
|
+
}
|
|
113
|
+
const resolved = /* @__PURE__ */ new Map();
|
|
114
|
+
const resolving = /* @__PURE__ */ new Set();
|
|
115
|
+
const resolve = (sample) => {
|
|
116
|
+
const root = getRoot(sample);
|
|
117
|
+
const cached = resolved.get(root);
|
|
118
|
+
if (cached !== void 0)
|
|
119
|
+
return cached;
|
|
120
|
+
if (resolving.has(root))
|
|
121
|
+
throw new Error("Cyclic terrain seam constraints");
|
|
122
|
+
resolving.add(root);
|
|
123
|
+
const rules = bySample.get(root);
|
|
124
|
+
let value = root.valid ? root.value : NaN;
|
|
125
|
+
if (root.valid && rules) {
|
|
126
|
+
let previous;
|
|
127
|
+
for (const rule of rules) {
|
|
128
|
+
const lower = resolve(rule.lower);
|
|
129
|
+
const upper = resolve(rule.upper);
|
|
130
|
+
const interpolated = lower + (upper - lower) * rule.fraction;
|
|
131
|
+
if (!Number.isFinite(interpolated)) {
|
|
132
|
+
previous = NaN;
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
if (previous !== void 0 && Math.abs(previous - interpolated) > 16 * Number.EPSILON * Math.max(1, Math.abs(previous), Math.abs(interpolated)))
|
|
136
|
+
throw new Error("Incompatible terrain junction heights");
|
|
137
|
+
previous = interpolated;
|
|
138
|
+
}
|
|
139
|
+
value = previous;
|
|
140
|
+
}
|
|
141
|
+
resolving.delete(root);
|
|
142
|
+
resolved.set(root, value);
|
|
143
|
+
return value;
|
|
144
|
+
};
|
|
145
|
+
const result = new Map(tiles);
|
|
146
|
+
for (const [slot, tileSamples] of samples) {
|
|
147
|
+
const tile = tiles.get(slot);
|
|
148
|
+
const { field, position } = tile;
|
|
149
|
+
if (!field.heights)
|
|
150
|
+
continue;
|
|
151
|
+
let heights;
|
|
152
|
+
for (const sample of tileSamples.values()) {
|
|
153
|
+
const height = resolve(sample) - position[2];
|
|
154
|
+
if (!heights && Object.is(height, field.heights[sample.index]))
|
|
155
|
+
continue;
|
|
156
|
+
heights ??= Float64Array.from(field.heights);
|
|
157
|
+
heights[sample.index] = height;
|
|
158
|
+
}
|
|
159
|
+
if (heights)
|
|
160
|
+
result.set(slot, { ...tile, field: { ...field, heights } });
|
|
161
|
+
}
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
function makeBoundary(tiles, slot, edge) {
|
|
165
|
+
var _a;
|
|
166
|
+
const tile = tiles.get(slot);
|
|
167
|
+
if (!tile || !tile.field.heights)
|
|
168
|
+
throw new Error("Terrain seam requires two loaded height fields");
|
|
169
|
+
const { field, position } = tile;
|
|
170
|
+
if (!Number.isSafeInteger(field.width) || !Number.isSafeInteger(field.height) || field.width < 2 || field.height < 2 || field.width * field.height > 1e6 || ((_a = field.heights) == null ? void 0 : _a.length) !== field.width * field.height || !position.every(Number.isFinite))
|
|
171
|
+
throw new Error("Invalid terrain seam tile");
|
|
172
|
+
const origin = field.origin ?? [0, 0];
|
|
173
|
+
const columnStep = field.columnStep ?? [1, 0];
|
|
174
|
+
const rowStep = field.rowStep ?? [0, 1];
|
|
175
|
+
const rowEdge = edge === "first-row" || edge === "last-row";
|
|
176
|
+
const row = edge === "last-row" ? field.height - 1 : 0;
|
|
177
|
+
const column = edge === "last-column" ? field.width - 1 : 0;
|
|
178
|
+
return {
|
|
179
|
+
slot,
|
|
180
|
+
tile,
|
|
181
|
+
origin: [
|
|
182
|
+
position[0] + origin[0] + column * columnStep[0] + row * rowStep[0],
|
|
183
|
+
position[1] + origin[1] + column * columnStep[1] + row * rowStep[1]
|
|
184
|
+
],
|
|
185
|
+
step: rowEdge ? columnStep : rowStep,
|
|
186
|
+
count: rowEdge ? field.width : field.height,
|
|
187
|
+
index: rowEdge ? (sample) => row * field.width + sample : (sample) => sample * field.width + column
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function getRoot(sample) {
|
|
191
|
+
let root = sample;
|
|
192
|
+
while (root.parent)
|
|
193
|
+
root = root.parent;
|
|
194
|
+
while (sample.parent) {
|
|
195
|
+
const previous = sample.parent;
|
|
196
|
+
sample.parent = root;
|
|
197
|
+
sample = previous;
|
|
198
|
+
}
|
|
199
|
+
return root;
|
|
200
|
+
}
|
|
201
|
+
function uniteSamples(first, second) {
|
|
202
|
+
const firstRoot = getRoot(first);
|
|
203
|
+
const secondRoot = getRoot(second);
|
|
204
|
+
if (firstRoot === secondRoot)
|
|
205
|
+
return;
|
|
206
|
+
const firstWins = firstRoot.spacing > secondRoot.spacing || firstRoot.spacing === secondRoot.spacing && firstRoot.slot < secondRoot.slot;
|
|
207
|
+
const authority = firstWins ? firstRoot : secondRoot;
|
|
208
|
+
const dependent = firstWins ? secondRoot : firstRoot;
|
|
209
|
+
authority.valid &&= dependent.valid;
|
|
210
|
+
dependent.parent = authority;
|
|
211
|
+
}
|
|
212
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
213
|
+
0 && (module.exports = {
|
|
214
|
+
stitchRigidBodyTerrainTiles
|
|
215
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { GPURigidBodyHeightField } from "./rigid-body-height-field.js";
|
|
2
|
+
import type { RigidBodyVector } from "./rigid-body-properties.js";
|
|
3
|
+
/** A source tile in the common metric frame shared by the receiving collider slots. */
|
|
4
|
+
export type GPURigidBodyTerrainTile = {
|
|
5
|
+
/** Source samples and affine grid transform. */
|
|
6
|
+
field: GPURigidBodyHeightField;
|
|
7
|
+
/** Placement of the tile in the common frame. */
|
|
8
|
+
position: RigidBodyVector;
|
|
9
|
+
};
|
|
10
|
+
/** Grid-index boundary, independent of the compass direction of its affine transform. */
|
|
11
|
+
export type GPURigidBodyTerrainEdge = 'first-column' | 'last-column' | 'first-row' | 'last-row';
|
|
12
|
+
/** Two declared adjacent edges indexed by collider slot in a terrain window. */
|
|
13
|
+
export type GPURigidBodyTerrainSeam = {
|
|
14
|
+
/** First collider slot. */
|
|
15
|
+
first: number;
|
|
16
|
+
/** Edge of the first tile. */
|
|
17
|
+
firstEdge: GPURigidBodyTerrainEdge;
|
|
18
|
+
/** Second collider slot. */
|
|
19
|
+
second: number;
|
|
20
|
+
/** Edge of the second tile. */
|
|
21
|
+
secondEdge: GPURigidBodyTerrainEdge;
|
|
22
|
+
};
|
|
23
|
+
/** Match aligned mixed-resolution edges without mutating any provider tile. */
|
|
24
|
+
export declare function stitchRigidBodyTerrainTiles(tiles: ReadonlyMap<number, GPURigidBodyTerrainTile>, seams: readonly GPURigidBodyTerrainSeam[]): ReadonlyMap<number, GPURigidBodyTerrainTile>;
|
|
25
|
+
//# sourceMappingURL=rigid-body-terrain-stitch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rigid-body-terrain-stitch.d.ts","sourceRoot":"","sources":["../../src/gpu-physics/rigid-body-terrain-stitch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,uBAAuB,EAAC,qCAAkC;AACvE,OAAO,KAAK,EAAC,eAAe,EAAC,mCAAgC;AAE7D,uFAAuF;AACvF,MAAM,MAAM,uBAAuB,GAAG;IACpC,gDAAgD;IAChD,KAAK,EAAE,uBAAuB,CAAC;IAC/B,iDAAiD;IACjD,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,yFAAyF;AACzF,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC;AAEhG,gFAAgF;AAChF,MAAM,MAAM,uBAAuB,GAAG;IACpC,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,SAAS,EAAE,uBAAuB,CAAC;IACnC,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,UAAU,EAAE,uBAAuB,CAAC;CACrC,CAAC;AAyBF,+EAA+E;AAC/E,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,uBAAuB,CAAC,EACnD,KAAK,EAAE,SAAS,uBAAuB,EAAE,GACxC,WAAW,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAkK9C"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// luma.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
/** Match aligned mixed-resolution edges without mutating any provider tile. */
|
|
5
|
+
export function stitchRigidBodyTerrainTiles(tiles, seams) {
|
|
6
|
+
if (!seams.length)
|
|
7
|
+
return tiles;
|
|
8
|
+
const samples = new Map();
|
|
9
|
+
const constraints = [];
|
|
10
|
+
const aliases = [];
|
|
11
|
+
/** Retain original samples until every neighbor and corner constraint is collected. */
|
|
12
|
+
const getSample = (boundary, edgeIndex) => {
|
|
13
|
+
let tileSamples = samples.get(boundary.slot);
|
|
14
|
+
if (!tileSamples) {
|
|
15
|
+
tileSamples = new Map();
|
|
16
|
+
samples.set(boundary.slot, tileSamples);
|
|
17
|
+
}
|
|
18
|
+
const index = boundary.index(edgeIndex);
|
|
19
|
+
const { field, position } = boundary.tile;
|
|
20
|
+
const sourceHeight = field.heights?.[index] ?? NaN;
|
|
21
|
+
const spacing = Math.hypot(...boundary.step);
|
|
22
|
+
let sample = tileSamples.get(index);
|
|
23
|
+
if (!sample) {
|
|
24
|
+
sample = {
|
|
25
|
+
parent: null,
|
|
26
|
+
value: sourceHeight + position[2],
|
|
27
|
+
valid: Number.isFinite(sourceHeight) && field.validity?.[index] !== 0,
|
|
28
|
+
spacing,
|
|
29
|
+
slot: boundary.slot,
|
|
30
|
+
index
|
|
31
|
+
};
|
|
32
|
+
tileSamples.set(index, sample);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
sample.spacing = Math.max(sample.spacing, spacing);
|
|
36
|
+
}
|
|
37
|
+
return sample;
|
|
38
|
+
};
|
|
39
|
+
for (const seam of seams) {
|
|
40
|
+
const first = makeBoundary(tiles, seam.first, seam.firstEdge);
|
|
41
|
+
const second = makeBoundary(tiles, seam.second, seam.secondEdge);
|
|
42
|
+
if (first.slot === second.slot)
|
|
43
|
+
throw new Error('Terrain seam requires distinct tiles');
|
|
44
|
+
const firstSpacing = Math.hypot(...first.step);
|
|
45
|
+
const secondSpacing = Math.hypot(...second.step);
|
|
46
|
+
const firstIsCoarse = firstSpacing >= secondSpacing;
|
|
47
|
+
const coarse = firstIsCoarse ? first : second;
|
|
48
|
+
const fine = firstIsCoarse ? second : first;
|
|
49
|
+
const spacing = Math.max(firstSpacing, secondSpacing);
|
|
50
|
+
const spacingRatio = Math.min(firstSpacing, secondSpacing) / spacing;
|
|
51
|
+
if (!Number.isFinite(spacingRatio) || spacingRatio <= 0)
|
|
52
|
+
throw new Error('Invalid terrain edge spacing');
|
|
53
|
+
const direction = coarse.step.map(value => value / spacing);
|
|
54
|
+
const offset = fine.origin.map((value, axis) => value - coarse.origin[axis]);
|
|
55
|
+
const projectedStart = (offset[0] * direction[0] + offset[1] * direction[1]) / spacing;
|
|
56
|
+
const projectedStep = (fine.step[0] * direction[0] + fine.step[1] * direction[1]) / spacing;
|
|
57
|
+
// Include subtraction roundoff from large anchors. Reject an ambiguous lattice fit.
|
|
58
|
+
const tolerance = 16 *
|
|
59
|
+
Number.EPSILON *
|
|
60
|
+
Math.max(1, coarse.count, fine.count, ...coarse.origin.map(value => Math.abs(value) / spacing), ...fine.origin.map(value => Math.abs(value) / spacing));
|
|
61
|
+
const lateralStart = (offset[0] * direction[1] - offset[1] * direction[0]) / spacing;
|
|
62
|
+
const lateralStep = (fine.step[0] * direction[1] - fine.step[1] * direction[0]) / spacing;
|
|
63
|
+
const subdivision = Math.round(1 / spacingRatio);
|
|
64
|
+
if (tolerance >= spacingRatio * 0.01 ||
|
|
65
|
+
Math.max(Math.abs(lateralStart), Math.abs(lateralStart + lateralStep * (fine.count - 1))) >
|
|
66
|
+
tolerance ||
|
|
67
|
+
Math.abs(Math.abs(projectedStep) - 1 / subdivision) * (fine.count - 1) > tolerance ||
|
|
68
|
+
Math.abs(projectedStart * subdivision - Math.round(projectedStart * subdivision)) >
|
|
69
|
+
tolerance * subdivision)
|
|
70
|
+
throw new Error('Terrain seam requires collinear nested sample lattices');
|
|
71
|
+
// Work on exact integer subdivisions after matching the physical lattice.
|
|
72
|
+
const start = Math.round(projectedStart * subdivision);
|
|
73
|
+
const directionSign = Math.sign(projectedStep);
|
|
74
|
+
const end = start + directionSign * (fine.count - 1);
|
|
75
|
+
const lower = Math.max(0, Math.min(start, end));
|
|
76
|
+
const upper = Math.min((coarse.count - 1) * subdivision, Math.max(start, end));
|
|
77
|
+
if (upper <= lower || lower % subdivision !== 0 || upper % subdivision !== 0)
|
|
78
|
+
throw new Error('Terrain seam overlap must start and end at common sample knots');
|
|
79
|
+
for (let knot = lower; knot <= upper; knot++) {
|
|
80
|
+
const fineSample = getSample(fine, (knot - start) * directionSign);
|
|
81
|
+
const lowerIndex = Math.floor(knot / subdivision);
|
|
82
|
+
const lowerSample = getSample(coarse, lowerIndex);
|
|
83
|
+
const remainder = knot % subdivision;
|
|
84
|
+
if (remainder === 0) {
|
|
85
|
+
aliases.push([fineSample, lowerSample]);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
constraints.push({
|
|
89
|
+
fine: fineSample,
|
|
90
|
+
lower: lowerSample,
|
|
91
|
+
upper: getSample(coarse, lowerIndex + 1),
|
|
92
|
+
fraction: remainder / subdivision
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
for (const [first, second] of aliases)
|
|
98
|
+
uniteSamples(first, second);
|
|
99
|
+
const bySample = new Map();
|
|
100
|
+
for (const constraint of constraints) {
|
|
101
|
+
const root = getRoot(constraint.fine);
|
|
102
|
+
const existing = bySample.get(root) ?? [];
|
|
103
|
+
existing.push(constraint);
|
|
104
|
+
bySample.set(root, existing);
|
|
105
|
+
}
|
|
106
|
+
const resolved = new Map();
|
|
107
|
+
const resolving = new Set();
|
|
108
|
+
/** Evaluate coarse endpoint constraints before fine samples, including at T-junctions. */
|
|
109
|
+
const resolve = (sample) => {
|
|
110
|
+
const root = getRoot(sample);
|
|
111
|
+
const cached = resolved.get(root);
|
|
112
|
+
if (cached !== undefined)
|
|
113
|
+
return cached;
|
|
114
|
+
if (resolving.has(root))
|
|
115
|
+
throw new Error('Cyclic terrain seam constraints');
|
|
116
|
+
resolving.add(root);
|
|
117
|
+
const rules = bySample.get(root);
|
|
118
|
+
let value = root.valid ? root.value : NaN;
|
|
119
|
+
if (root.valid && rules) {
|
|
120
|
+
let previous;
|
|
121
|
+
for (const rule of rules) {
|
|
122
|
+
const lower = resolve(rule.lower);
|
|
123
|
+
const upper = resolve(rule.upper);
|
|
124
|
+
const interpolated = lower + (upper - lower) * rule.fraction;
|
|
125
|
+
if (!Number.isFinite(interpolated)) {
|
|
126
|
+
previous = NaN;
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
if (previous !== undefined &&
|
|
130
|
+
Math.abs(previous - interpolated) >
|
|
131
|
+
16 * Number.EPSILON * Math.max(1, Math.abs(previous), Math.abs(interpolated)))
|
|
132
|
+
throw new Error('Incompatible terrain junction heights');
|
|
133
|
+
previous = interpolated;
|
|
134
|
+
}
|
|
135
|
+
value = previous;
|
|
136
|
+
}
|
|
137
|
+
resolving.delete(root);
|
|
138
|
+
resolved.set(root, value);
|
|
139
|
+
return value;
|
|
140
|
+
};
|
|
141
|
+
const result = new Map(tiles);
|
|
142
|
+
for (const [slot, tileSamples] of samples) {
|
|
143
|
+
const tile = tiles.get(slot);
|
|
144
|
+
const { field, position } = tile;
|
|
145
|
+
if (!field.heights)
|
|
146
|
+
continue;
|
|
147
|
+
let heights;
|
|
148
|
+
for (const sample of tileSamples.values()) {
|
|
149
|
+
const height = resolve(sample) - position[2];
|
|
150
|
+
if (!heights && Object.is(height, field.heights[sample.index]))
|
|
151
|
+
continue;
|
|
152
|
+
heights ??= Float64Array.from(field.heights);
|
|
153
|
+
heights[sample.index] = height;
|
|
154
|
+
}
|
|
155
|
+
if (heights)
|
|
156
|
+
result.set(slot, { ...tile, field: { ...field, heights } });
|
|
157
|
+
}
|
|
158
|
+
return result;
|
|
159
|
+
}
|
|
160
|
+
/** Read edge positions in the common metric frame. */
|
|
161
|
+
function makeBoundary(tiles, slot, edge) {
|
|
162
|
+
const tile = tiles.get(slot);
|
|
163
|
+
if (!tile || !tile.field.heights)
|
|
164
|
+
throw new Error('Terrain seam requires two loaded height fields');
|
|
165
|
+
const { field, position } = tile;
|
|
166
|
+
if (!Number.isSafeInteger(field.width) ||
|
|
167
|
+
!Number.isSafeInteger(field.height) ||
|
|
168
|
+
field.width < 2 ||
|
|
169
|
+
field.height < 2 ||
|
|
170
|
+
field.width * field.height > 1_000_000 ||
|
|
171
|
+
field.heights?.length !== field.width * field.height ||
|
|
172
|
+
!position.every(Number.isFinite))
|
|
173
|
+
throw new Error('Invalid terrain seam tile');
|
|
174
|
+
const origin = field.origin ?? [0, 0];
|
|
175
|
+
const columnStep = field.columnStep ?? [1, 0];
|
|
176
|
+
const rowStep = field.rowStep ?? [0, 1];
|
|
177
|
+
const rowEdge = edge === 'first-row' || edge === 'last-row';
|
|
178
|
+
const row = edge === 'last-row' ? field.height - 1 : 0;
|
|
179
|
+
const column = edge === 'last-column' ? field.width - 1 : 0;
|
|
180
|
+
return {
|
|
181
|
+
slot,
|
|
182
|
+
tile,
|
|
183
|
+
origin: [
|
|
184
|
+
position[0] + origin[0] + column * columnStep[0] + row * rowStep[0],
|
|
185
|
+
position[1] + origin[1] + column * columnStep[1] + row * rowStep[1]
|
|
186
|
+
],
|
|
187
|
+
step: rowEdge ? columnStep : rowStep,
|
|
188
|
+
count: rowEdge ? field.width : field.height,
|
|
189
|
+
index: rowEdge ? sample => row * field.width + sample : sample => sample * field.width + column
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/** Find and compress a shared grid knot's authoritative sample. */
|
|
193
|
+
function getRoot(sample) {
|
|
194
|
+
let root = sample;
|
|
195
|
+
while (root.parent)
|
|
196
|
+
root = root.parent;
|
|
197
|
+
while (sample.parent) {
|
|
198
|
+
const previous = sample.parent;
|
|
199
|
+
sample.parent = root;
|
|
200
|
+
sample = previous;
|
|
201
|
+
}
|
|
202
|
+
return root;
|
|
203
|
+
}
|
|
204
|
+
/** Join knots with deterministic coarse-first ownership and conservative missing-data handling. */
|
|
205
|
+
function uniteSamples(first, second) {
|
|
206
|
+
const firstRoot = getRoot(first);
|
|
207
|
+
const secondRoot = getRoot(second);
|
|
208
|
+
if (firstRoot === secondRoot)
|
|
209
|
+
return;
|
|
210
|
+
// A tie uses the stable slot ID. Comparing grid spacing also resolves corner ownership.
|
|
211
|
+
const firstWins = firstRoot.spacing > secondRoot.spacing ||
|
|
212
|
+
(firstRoot.spacing === secondRoot.spacing && firstRoot.slot < secondRoot.slot);
|
|
213
|
+
const authority = firstWins ? firstRoot : secondRoot;
|
|
214
|
+
const dependent = firstWins ? secondRoot : firstRoot;
|
|
215
|
+
authority.valid &&= dependent.valid;
|
|
216
|
+
dependent.parent = authority;
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=rigid-body-terrain-stitch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rigid-body-terrain-stitch.js","sourceRoot":"","sources":["../../src/gpu-physics/rigid-body-terrain-stitch.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAmD5D,+EAA+E;AAC/E,MAAM,UAAU,2BAA2B,CACzC,KAAmD,EACnD,KAAyC;IAEzC,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAChC,MAAM,OAAO,GAAG,IAAI,GAAG,EAA+B,CAAC;IACvD,MAAM,WAAW,GAAoB,EAAE,CAAC;IACxC,MAAM,OAAO,GAAuB,EAAE,CAAC;IAEvC,uFAAuF;IACvF,MAAM,SAAS,GAAG,CAAC,QAAkB,EAAE,SAAiB,EAAU,EAAE;QAClE,IAAI,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAC1C,CAAC;QACD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACxC,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;QACxC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC;QACnD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,QAAQ,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