@math.gl/geospatial 5.0.0-beta.9 → 5.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/crs/crs-descriptor-types.d.ts +2 -1
- package/dist/crs/crs-descriptor-types.d.ts.map +1 -1
- package/dist/crs/index.cjs +54 -0
- package/dist/crs/index.cjs.map +2 -2
- package/dist/crs/index.d.ts +1 -0
- package/dist/crs/index.d.ts.map +1 -1
- package/dist/crs/index.js +1 -0
- package/dist/crs/index.js.map +1 -1
- package/dist/crs/spatial-reference-metadata.d.ts +20 -0
- package/dist/crs/spatial-reference-metadata.d.ts.map +1 -0
- package/dist/crs/spatial-reference-metadata.js +86 -0
- package/dist/crs/spatial-reference-metadata.js.map +1 -0
- package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts +1 -1
- package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts.map +1 -1
- package/dist/ellipsoid-helpers/ellipsoid-transform.js +2 -2
- package/dist/ellipsoid-helpers/ellipsoid-transform.js.map +1 -1
- package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js +1 -1
- package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js.map +1 -1
- package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts +1 -1
- package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts.map +1 -1
- package/dist/ellipsoid-tangent-plane.d.ts +2 -2
- package/dist/ellipsoid-tangent-plane.d.ts.map +1 -1
- package/dist/ellipsoid-tangent-plane.js +1 -1
- package/dist/ellipsoid-tangent-plane.js.map +1 -1
- package/dist/ellipsoid-transforms.d.ts +2 -2
- package/dist/ellipsoid-transforms.d.ts.map +1 -1
- package/dist/ellipsoid-transforms.js +1 -1
- package/dist/ellipsoid-transforms.js.map +1 -1
- package/dist/ellipsoid.d.ts +2 -2
- package/dist/ellipsoid.d.ts.map +1 -1
- package/dist/ellipsoid.js +2 -2
- package/dist/ellipsoid.js.map +1 -1
- package/dist/expressions.d.ts +1 -1
- package/dist/expressions.d.ts.map +1 -1
- package/dist/expressions.js +1 -1
- package/dist/expressions.js.map +1 -1
- package/dist/geodesic-buffer.d.ts +1 -1
- package/dist/geodesic-buffer.d.ts.map +1 -1
- package/dist/geodesic-path.d.ts +1 -1
- package/dist/geodesic-path.d.ts.map +1 -1
- package/dist/geometry-constructors.d.ts +6 -0
- package/dist/geometry-constructors.d.ts.map +1 -0
- package/dist/geometry-constructors.js +37 -0
- package/dist/geometry-constructors.js.map +1 -0
- package/dist/geometry-inspection.d.ts +8 -0
- package/dist/geometry-inspection.d.ts.map +1 -0
- package/dist/geometry-inspection.js +61 -0
- package/dist/geometry-inspection.js.map +1 -0
- package/dist/index.cjs +2514 -558
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +164 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -1
- package/dist/line-simplification.d.ts +4 -0
- package/dist/line-simplification.d.ts.map +1 -0
- package/dist/line-simplification.js +83 -0
- package/dist/line-simplification.js.map +1 -0
- package/dist/linear-referencing.d.ts +6 -0
- package/dist/linear-referencing.d.ts.map +1 -0
- package/dist/linear-referencing.js +74 -0
- package/dist/linear-referencing.js.map +1 -0
- package/dist/lng-lat-rectangle.d.ts +1 -1
- package/dist/lng-lat-rectangle.d.ts.map +1 -1
- package/dist/lng-lat-rectangle.js +1 -1
- package/dist/lng-lat-rectangle.js.map +1 -1
- package/dist/local-reference-frame.d.ts +3 -3
- package/dist/local-reference-frame.d.ts.map +1 -1
- package/dist/local-reference-frame.js +2 -2
- package/dist/local-reference-frame.js.map +1 -1
- package/dist/make-obb-from-region.d.ts +1 -1
- package/dist/make-obb-from-region.d.ts.map +1 -1
- package/dist/make-obb-from-region.js +1 -1
- package/dist/make-obb-from-region.js.map +1 -1
- package/dist/maps/air-ocean-mesh.js +1 -1
- package/dist/maps/air-ocean-mesh.js.map +1 -1
- package/dist/maps/myriahedral/unfold.d.ts +1 -1
- package/dist/maps/myriahedral/unfold.d.ts.map +1 -1
- package/dist/maps/myriahedral/unfold.js +1 -1
- package/dist/maps/myriahedral/unfold.js.map +1 -1
- package/dist/maps/presets.cjs +6 -6
- package/dist/maps/presets.cjs.map +2 -2
- package/dist/maps.cjs +6 -6
- package/dist/maps.cjs.map +2 -2
- package/dist/projection/deformation.cjs +5 -5
- package/dist/projection/deformation.cjs.map +2 -2
- package/dist/projection/experimental/core.cjs +8 -4
- package/dist/projection/experimental/core.cjs.map +1 -1
- package/dist/projection/experimental/crs/spatial-reference.d.ts.map +1 -1
- package/dist/projection/experimental/crs/spatial-reference.js.map +1 -1
- package/dist/projection/experimental/crs/types.d.ts +1 -1
- package/dist/projection/experimental/crs/types.d.ts.map +1 -1
- package/dist/projection/experimental/crs-rendering-scale.d.ts.map +1 -1
- package/dist/projection/experimental/crs-rendering-scale.js +13 -2
- package/dist/projection/experimental/crs-rendering-scale.js.map +1 -1
- package/dist/projection/experimental/datum.js +1 -1
- package/dist/projection/experimental/datum.js.map +1 -1
- package/dist/projection/experimental/entries/projections/geocent.cjs +3 -3
- package/dist/projection/experimental/entries/projections/geocent.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/aea.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/aea.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/aea.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/aea.js +4 -1
- package/dist/projection/experimental/lazy-projections/aea.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/bonne.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/bonne.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/bonne.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/bonne.js +4 -1
- package/dist/projection/experimental/lazy-projections/bonne.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/cass.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/cass.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/cass.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/cass.js +4 -1
- package/dist/projection/experimental/lazy-projections/cass.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/eck6.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/eck6.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/eck6.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/eck6.js +4 -1
- package/dist/projection/experimental/lazy-projections/eck6.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqdc.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/eqdc.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqdc.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqdc.js +4 -1
- package/dist/projection/experimental/lazy-projections/eqdc.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqearth.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/eqearth.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqearth.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqearth.js +4 -1
- package/dist/projection/experimental/lazy-projections/eqearth.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/equi.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/equi.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/equi.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/equi.js +4 -1
- package/dist/projection/experimental/lazy-projections/equi.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/geocent.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/geocent.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/geocent.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/geocent.js +4 -1
- package/dist/projection/experimental/lazy-projections/geocent.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/geos.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/geos.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/geos.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/geos.js +4 -1
- package/dist/projection/experimental/lazy-projections/geos.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/gnom.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/gnom.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/gnom.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/gnom.js +4 -1
- package/dist/projection/experimental/lazy-projections/gnom.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/index.cjs +100 -27
- package/dist/projection/experimental/lazy-projections/index.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/krovak.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/krovak.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/krovak.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/krovak.js +4 -1
- package/dist/projection/experimental/lazy-projections/krovak.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/merc.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/merc.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/merc.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/merc.js +4 -1
- package/dist/projection/experimental/lazy-projections/merc.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/mill.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/mill.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/mill.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/mill.js +4 -1
- package/dist/projection/experimental/lazy-projections/mill.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/moll.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/moll.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/moll.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/moll.js +4 -1
- package/dist/projection/experimental/lazy-projections/moll.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/nzmg.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/nzmg.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/nzmg.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/nzmg.js +4 -1
- package/dist/projection/experimental/lazy-projections/nzmg.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/omerc.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/omerc.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/omerc.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/omerc.js +4 -1
- package/dist/projection/experimental/lazy-projections/omerc.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/ortho.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/ortho.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/ortho.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/ortho.js +4 -1
- package/dist/projection/experimental/lazy-projections/ortho.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/poly.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/poly.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/poly.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/poly.js +4 -1
- package/dist/projection/experimental/lazy-projections/poly.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/robin.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/robin.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/robin.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/robin.js +4 -1
- package/dist/projection/experimental/lazy-projections/robin.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/sinu.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/sinu.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/sinu.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/sinu.js +4 -1
- package/dist/projection/experimental/lazy-projections/sinu.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/stere.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/stere.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/stere.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/stere.js +4 -1
- package/dist/projection/experimental/lazy-projections/stere.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/tpers.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/tpers.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/tpers.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/tpers.js +4 -1
- package/dist/projection/experimental/lazy-projections/tpers.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/vandg.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/vandg.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/vandg.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/vandg.js +4 -1
- package/dist/projection/experimental/lazy-projections/vandg.js.map +1 -1
- package/dist/projection/experimental/spatial-deformation.js +1 -1
- package/dist/projection/experimental/spatial-deformation.js.map +1 -1
- package/dist/projection/index.cjs +8 -4
- package/dist/projection/index.cjs.map +1 -1
- package/dist/projection/index.d.ts.map +1 -1
- package/dist/projection/index.js.map +1 -1
- package/dist/projection/lib/projection.js.map +1 -1
- package/dist/projection/pipeline.cjs +3 -3
- package/dist/projection/pipeline.cjs.map +1 -1
- package/dist/projection/temporal.cjs +5 -5
- package/dist/projection/temporal.cjs.map +2 -2
- package/dist/projection/transform-analysis.cjs +3 -3
- package/dist/projection/transform-analysis.cjs.map +1 -1
- package/dist/rhumb-path.d.ts +1 -1
- package/dist/rhumb-path.d.ts.map +1 -1
- package/dist/spatial-planar-intersects.d.ts +4 -0
- package/dist/spatial-planar-intersects.d.ts.map +1 -0
- package/dist/spatial-planar-intersects.js +108 -0
- package/dist/spatial-planar-intersects.js.map +1 -0
- package/dist/spatial-planar.d.ts +16 -0
- package/dist/spatial-planar.d.ts.map +1 -0
- package/dist/spatial-planar.js +240 -0
- package/dist/spatial-planar.js.map +1 -0
- package/dist/spatial-sql.d.ts +45 -0
- package/dist/spatial-sql.d.ts.map +1 -0
- package/dist/spatial-sql.js +192 -0
- package/dist/spatial-sql.js.map +1 -0
- package/dist/st-functions.cjs +1616 -0
- package/dist/st-functions.cjs.map +6 -0
- package/dist/st-functions.d.ts +307 -0
- package/dist/st-functions.d.ts.map +1 -0
- package/dist/st-functions.js +593 -0
- package/dist/st-functions.js.map +1 -0
- package/dist/subdivide-globe-mesh.js +1 -1
- package/dist/subdivide-globe-mesh.js.map +1 -1
- package/dist/tasks/index.cjs +216 -98
- package/dist/tasks/index.cjs.map +2 -2
- package/dist/tasks/terrain-residency.d.ts +9 -0
- package/dist/tasks/terrain-residency.d.ts.map +1 -1
- package/dist/tasks/terrain-residency.js +98 -19
- package/dist/tasks/terrain-residency.js.map +1 -1
- package/dist/terrain/cutout-polygons.d.ts +21 -0
- package/dist/terrain/cutout-polygons.d.ts.map +1 -0
- package/dist/terrain/cutout-polygons.js +172 -0
- package/dist/terrain/cutout-polygons.js.map +1 -0
- package/dist/terrain/cutout-region.d.ts +34 -0
- package/dist/terrain/cutout-region.d.ts.map +1 -0
- package/dist/terrain/cutout-region.js +33 -0
- package/dist/terrain/cutout-region.js.map +1 -0
- package/dist/terrain/cutout-skirts.d.ts +34 -0
- package/dist/terrain/cutout-skirts.d.ts.map +1 -0
- package/dist/terrain/cutout-skirts.js +29 -0
- package/dist/terrain/cutout-skirts.js.map +1 -0
- package/dist/terrain/depression-fill.d.ts +25 -0
- package/dist/terrain/depression-fill.d.ts.map +1 -0
- package/dist/terrain/depression-fill.js +106 -0
- package/dist/terrain/depression-fill.js.map +1 -0
- package/dist/terrain/geographic-cutout.d.ts +38 -0
- package/dist/terrain/geographic-cutout.d.ts.map +1 -0
- package/dist/terrain/geographic-cutout.js +120 -0
- package/dist/terrain/geographic-cutout.js.map +1 -0
- package/dist/terrain/geographic-lod-seams.d.ts +10 -0
- package/dist/terrain/geographic-lod-seams.d.ts.map +1 -0
- package/dist/terrain/geographic-lod-seams.js +100 -0
- package/dist/terrain/geographic-lod-seams.js.map +1 -0
- package/dist/terrain/geographic-neighbor.d.ts +18 -0
- package/dist/terrain/geographic-neighbor.d.ts.map +1 -0
- package/dist/terrain/geographic-neighbor.js +44 -0
- package/dist/terrain/geographic-neighbor.js.map +1 -0
- package/dist/terrain/geographic-poles.d.ts +24 -0
- package/dist/terrain/geographic-poles.d.ts.map +1 -0
- package/dist/terrain/geographic-poles.js +34 -0
- package/dist/terrain/geographic-poles.js.map +1 -0
- package/dist/terrain/hydrology.d.ts +42 -0
- package/dist/terrain/hydrology.d.ts.map +1 -0
- package/dist/terrain/hydrology.js +112 -0
- package/dist/terrain/hydrology.js.map +1 -0
- package/dist/terrain/index.cjs +2135 -161
- package/dist/terrain/index.cjs.map +3 -3
- package/dist/terrain/index.d.ts +23 -1
- package/dist/terrain/index.d.ts.map +1 -1
- package/dist/terrain/index.js +21 -0
- package/dist/terrain/index.js.map +1 -1
- package/dist/terrain/lod-screen-error.d.ts +28 -0
- package/dist/terrain/lod-screen-error.d.ts.map +1 -0
- package/dist/terrain/lod-screen-error.js +95 -0
- package/dist/terrain/lod-screen-error.js.map +1 -0
- package/dist/terrain/lod-select.d.ts +26 -10
- package/dist/terrain/lod-select.d.ts.map +1 -1
- package/dist/terrain/lod-select.js +27 -14
- package/dist/terrain/lod-select.js.map +1 -1
- package/dist/terrain/lod-stitch.d.ts +2 -0
- package/dist/terrain/lod-stitch.d.ts.map +1 -1
- package/dist/terrain/lod-stitch.js +21 -6
- package/dist/terrain/lod-stitch.js.map +1 -1
- package/dist/terrain/mesh-cutout.d.ts +45 -0
- package/dist/terrain/mesh-cutout.d.ts.map +1 -0
- package/dist/terrain/mesh-cutout.js +336 -0
- package/dist/terrain/mesh-cutout.js.map +1 -0
- package/dist/terrain/mesh-skirts.d.ts +8 -2
- package/dist/terrain/mesh-skirts.d.ts.map +1 -1
- package/dist/terrain/mesh-skirts.js +5 -4
- package/dist/terrain/mesh-skirts.js.map +1 -1
- package/dist/terrain/mixed-halo-update.d.ts.map +1 -1
- package/dist/terrain/mixed-halo-update.js +58 -23
- package/dist/terrain/mixed-halo-update.js.map +1 -1
- package/dist/terrain/mixed-vertex-halos.d.ts +24 -1
- package/dist/terrain/mixed-vertex-halos.d.ts.map +1 -1
- package/dist/terrain/mixed-vertex-halos.js +75 -58
- package/dist/terrain/mixed-vertex-halos.js.map +1 -1
- package/dist/terrain/regional-viewshed.d.ts +55 -0
- package/dist/terrain/regional-viewshed.d.ts.map +1 -0
- package/dist/terrain/regional-viewshed.js +119 -0
- package/dist/terrain/regional-viewshed.js.map +1 -0
- package/dist/terrain/surface.d.ts +1 -1
- package/dist/terrain/surface.d.ts.map +1 -1
- package/dist/terrain/surface.js +1 -1
- package/dist/terrain/surface.js.map +1 -1
- package/dist/terrain/sweep-capsule.d.ts +27 -0
- package/dist/terrain/sweep-capsule.d.ts.map +1 -0
- package/dist/terrain/sweep-capsule.js +104 -0
- package/dist/terrain/sweep-capsule.js.map +1 -0
- package/dist/terrain/sweep-cylinder.d.ts +16 -0
- package/dist/terrain/sweep-cylinder.d.ts.map +1 -0
- package/dist/terrain/sweep-cylinder.js +52 -0
- package/dist/terrain/sweep-cylinder.js.map +1 -0
- package/dist/terrain/sweep-plane.d.ts +9 -0
- package/dist/terrain/sweep-plane.d.ts.map +1 -0
- package/dist/terrain/sweep-plane.js +52 -0
- package/dist/terrain/sweep-plane.js.map +1 -0
- package/dist/terrain/sweep-polytope.d.ts +42 -0
- package/dist/terrain/sweep-polytope.d.ts.map +1 -0
- package/dist/terrain/sweep-polytope.js +189 -0
- package/dist/terrain/sweep-polytope.js.map +1 -0
- package/dist/terrain/sweep-rotating-capsule.d.ts +17 -0
- package/dist/terrain/sweep-rotating-capsule.d.ts.map +1 -0
- package/dist/terrain/sweep-rotating-capsule.js +118 -0
- package/dist/terrain/sweep-rotating-capsule.js.map +1 -0
- package/dist/terrain/sweep-rotation.d.ts +35 -0
- package/dist/terrain/sweep-rotation.d.ts.map +1 -0
- package/dist/terrain/sweep-rotation.js +114 -0
- package/dist/terrain/sweep-rotation.js.map +1 -0
- package/dist/terrain/sweep-sphere.d.ts +27 -0
- package/dist/terrain/sweep-sphere.d.ts.map +1 -0
- package/dist/terrain/sweep-sphere.js +69 -0
- package/dist/terrain/sweep-sphere.js.map +1 -0
- package/dist/terrain/tile-cutout-update.d.ts +73 -0
- package/dist/terrain/tile-cutout-update.d.ts.map +1 -0
- package/dist/terrain/tile-cutout-update.js +181 -0
- package/dist/terrain/tile-cutout-update.js.map +1 -0
- package/dist/terrain/tile-cutout.d.ts +33 -0
- package/dist/terrain/tile-cutout.d.ts.map +1 -0
- package/dist/terrain/tile-cutout.js +93 -0
- package/dist/terrain/tile-cutout.js.map +1 -0
- package/dist/terrain/watershed-accumulation.d.ts +20 -0
- package/dist/terrain/watershed-accumulation.d.ts.map +1 -0
- package/dist/terrain/watershed-accumulation.js +53 -0
- package/dist/terrain/watershed-accumulation.js.map +1 -0
- package/dist/triaxial.d.ts +1 -1
- package/dist/triaxial.d.ts.map +1 -1
- package/dist/turf-expressions.cjs +1997 -0
- package/dist/turf-expressions.cjs.map +6 -0
- package/dist/turf-expressions.d.ts +3 -0
- package/dist/turf-expressions.d.ts.map +1 -0
- package/dist/turf-expressions.js +7 -0
- package/dist/turf-expressions.js.map +1 -0
- package/dist/turf-functions.cjs +743 -0
- package/dist/turf-functions.cjs.map +6 -0
- package/dist/turf-functions.d.ts +90 -0
- package/dist/turf-functions.d.ts.map +1 -0
- package/dist/{turf/expressions.js → turf-functions.js} +51 -5
- package/dist/turf-functions.js.map +1 -0
- package/dist/turf.cjs +25 -25
- package/dist/turf.cjs.map +2 -2
- package/dist/turf.d.ts +1 -1
- package/dist/turf.d.ts.map +1 -1
- package/dist/turf.js +2 -2
- package/dist/turf.js.map +1 -1
- package/dist/type-utils.d.ts +1 -1
- package/dist/type-utils.d.ts.map +1 -1
- package/dist/type-utils.js +1 -1
- package/dist/type-utils.js.map +1 -1
- package/dist/web-mercator/assert.d.ts +2 -0
- package/dist/web-mercator/assert.d.ts.map +1 -0
- package/dist/web-mercator/assert.js +12 -0
- package/dist/web-mercator/assert.js.map +1 -0
- package/dist/web-mercator/fit-bounds.d.ts +52 -0
- package/dist/web-mercator/fit-bounds.d.ts.map +1 -0
- package/dist/web-mercator/fit-bounds.js +70 -0
- package/dist/web-mercator/fit-bounds.js.map +1 -0
- package/dist/web-mercator/fly-to-viewport.d.ts +19 -0
- package/dist/web-mercator/fly-to-viewport.d.ts.map +1 -0
- package/dist/web-mercator/fly-to-viewport.js +94 -0
- package/dist/web-mercator/fly-to-viewport.js.map +1 -0
- package/dist/web-mercator/get-bounds.d.ts +3 -0
- package/dist/web-mercator/get-bounds.d.ts.map +1 -0
- package/dist/web-mercator/get-bounds.js +56 -0
- package/dist/web-mercator/get-bounds.js.map +1 -0
- package/dist/web-mercator/index.cjs +705 -0
- package/dist/web-mercator/index.cjs.map +6 -0
- package/dist/web-mercator/index.d.ts +14 -0
- package/dist/web-mercator/index.d.ts.map +1 -0
- package/dist/web-mercator/index.js +14 -0
- package/dist/web-mercator/index.js.map +1 -0
- package/dist/web-mercator/math-utils.d.ts +7 -0
- package/dist/web-mercator/math-utils.d.ts.map +1 -0
- package/dist/web-mercator/math-utils.js +30 -0
- package/dist/web-mercator/math-utils.js.map +1 -0
- package/dist/web-mercator/mercator-meters.d.ts +29 -0
- package/dist/web-mercator/mercator-meters.d.ts.map +1 -0
- package/dist/web-mercator/mercator-meters.js +61 -0
- package/dist/web-mercator/mercator-meters.js.map +1 -0
- package/dist/web-mercator/normalize-viewport-props.d.ts +16 -0
- package/dist/web-mercator/normalize-viewport-props.d.ts.map +1 -0
- package/dist/web-mercator/normalize-viewport-props.js +45 -0
- package/dist/web-mercator/normalize-viewport-props.js.map +1 -0
- package/dist/web-mercator/web-mercator-utils.d.ts +192 -0
- package/dist/web-mercator/web-mercator-utils.d.ts.map +1 -0
- package/dist/web-mercator/web-mercator-utils.js +321 -0
- package/dist/web-mercator/web-mercator-utils.js.map +1 -0
- package/dist/web-mercator/web-mercator-viewport.d.ts +177 -0
- package/dist/web-mercator/web-mercator-viewport.d.ts.map +1 -0
- package/dist/web-mercator/web-mercator-viewport.js +276 -0
- package/dist/web-mercator/web-mercator-viewport.js.map +1 -0
- package/dist/web-mercator.d.ts +1 -1
- package/dist/web-mercator.d.ts.map +1 -1
- package/dist/web-mercator.js +1 -1
- package/dist/web-mercator.js.map +1 -1
- package/package.json +34 -462
- package/src/crs/crs-descriptor-types.ts +2 -1
- package/src/crs/index.ts +7 -0
- package/src/crs/spatial-reference-metadata.ts +118 -0
- package/src/ellipsoid-helpers/ellipsoid-transform.ts +3 -3
- package/src/ellipsoid-helpers/scale-to-geodetic-surface.ts +1 -1
- package/src/ellipsoid-helpers/tangent-plane-numerics.ts +1 -1
- package/src/ellipsoid-tangent-plane.ts +2 -2
- package/src/ellipsoid-transforms.ts +2 -2
- package/src/ellipsoid.ts +7 -3
- package/src/expressions.ts +2 -2
- package/src/geodesic-buffer.ts +1 -1
- package/src/geodesic-path.ts +1 -1
- package/src/geometry-constructors.ts +36 -0
- package/src/geometry-inspection.ts +66 -0
- package/src/index.ts +271 -4
- package/src/line-simplification.ts +97 -0
- package/src/linear-referencing.ts +94 -0
- package/src/lng-lat-rectangle.ts +1 -1
- package/src/local-reference-frame.ts +4 -4
- package/src/make-obb-from-region.ts +9 -1
- package/src/maps/air-ocean-mesh.ts +1 -1
- package/src/maps/myriahedral/unfold.ts +1 -1
- package/src/projection/experimental/crs/spatial-reference.ts +1 -6
- package/src/projection/experimental/crs/types.ts +2 -2
- package/src/projection/experimental/crs/wkt.ts +1 -1
- package/src/projection/experimental/crs-descriptor.ts +1 -1
- package/src/projection/experimental/crs-rendering-scale.ts +16 -4
- package/src/projection/experimental/datum.ts +1 -1
- package/src/projection/experimental/lazy-projections/aea.ts +4 -1
- package/src/projection/experimental/lazy-projections/bonne.ts +4 -1
- package/src/projection/experimental/lazy-projections/cass.ts +4 -1
- package/src/projection/experimental/lazy-projections/eck6.ts +4 -1
- package/src/projection/experimental/lazy-projections/eqdc.ts +4 -1
- package/src/projection/experimental/lazy-projections/eqearth.ts +4 -1
- package/src/projection/experimental/lazy-projections/equi.ts +4 -1
- package/src/projection/experimental/lazy-projections/geocent.ts +4 -1
- package/src/projection/experimental/lazy-projections/geos.ts +4 -1
- package/src/projection/experimental/lazy-projections/gnom.ts +4 -1
- package/src/projection/experimental/lazy-projections/krovak.ts +4 -1
- package/src/projection/experimental/lazy-projections/merc.ts +4 -1
- package/src/projection/experimental/lazy-projections/mill.ts +4 -1
- package/src/projection/experimental/lazy-projections/moll.ts +4 -1
- package/src/projection/experimental/lazy-projections/nzmg.ts +4 -1
- package/src/projection/experimental/lazy-projections/omerc.ts +4 -1
- package/src/projection/experimental/lazy-projections/ortho.ts +4 -1
- package/src/projection/experimental/lazy-projections/poly.ts +4 -1
- package/src/projection/experimental/lazy-projections/robin.ts +4 -1
- package/src/projection/experimental/lazy-projections/sinu.ts +4 -1
- package/src/projection/experimental/lazy-projections/stere.ts +4 -1
- package/src/projection/experimental/lazy-projections/tpers.ts +4 -1
- package/src/projection/experimental/lazy-projections/vandg.ts +4 -1
- package/src/projection/experimental/spatial-deformation.ts +1 -1
- package/src/projection/index.ts +1 -1
- package/src/projection/lib/projection.ts +1 -1
- package/src/rhumb-path.ts +1 -1
- package/src/spatial-planar-intersects.ts +134 -0
- package/src/spatial-planar.ts +266 -0
- package/src/spatial-sql.ts +276 -0
- package/src/st-functions.ts +852 -0
- package/src/subdivide-globe-mesh.ts +1 -1
- package/src/tasks/terrain-residency.ts +120 -24
- package/src/terrain/cutout-polygons.ts +202 -0
- package/src/terrain/cutout-region.ts +54 -0
- package/src/terrain/cutout-skirts.ts +52 -0
- package/src/terrain/depression-fill.ts +125 -0
- package/src/terrain/geographic-cutout.ts +154 -0
- package/src/terrain/geographic-lod-seams.ts +109 -0
- package/src/terrain/geographic-neighbor.ts +58 -0
- package/src/terrain/geographic-poles.ts +52 -0
- package/src/terrain/hydrology.ts +149 -0
- package/src/terrain/index.ts +122 -1
- package/src/terrain/lod-screen-error.ts +128 -0
- package/src/terrain/lod-select.ts +65 -31
- package/src/terrain/lod-stitch.ts +25 -7
- package/src/terrain/mesh-cutout.ts +420 -0
- package/src/terrain/mesh-skirts.ts +10 -7
- package/src/terrain/mixed-halo-update.ts +54 -20
- package/src/terrain/mixed-vertex-halos.ts +94 -78
- package/src/terrain/regional-viewshed.ts +177 -0
- package/src/terrain/surface.ts +1 -1
- package/src/terrain/sweep-capsule.ts +148 -0
- package/src/terrain/sweep-cylinder.ts +64 -0
- package/src/terrain/sweep-plane.ts +61 -0
- package/src/terrain/sweep-polytope.ts +253 -0
- package/src/terrain/sweep-rotating-capsule.ts +139 -0
- package/src/terrain/sweep-rotation.ts +149 -0
- package/src/terrain/sweep-sphere.ts +100 -0
- package/src/terrain/tile-cutout-update.ts +293 -0
- package/src/terrain/tile-cutout.ts +123 -0
- package/src/terrain/watershed-accumulation.ts +67 -0
- package/src/triaxial.ts +1 -1
- package/src/turf-expressions.ts +7 -0
- package/src/{turf/expressions.ts → turf-functions.ts} +121 -6
- package/src/turf.ts +3 -7
- package/src/type-utils.ts +2 -2
- package/src/web-mercator/assert.ts +11 -0
- package/src/web-mercator/fit-bounds.ts +132 -0
- package/src/web-mercator/fly-to-viewport.ts +157 -0
- package/src/web-mercator/get-bounds.ts +62 -0
- package/src/web-mercator/index.ts +49 -0
- package/src/web-mercator/math-utils.ts +35 -0
- package/src/web-mercator/mercator-meters.ts +83 -0
- package/src/web-mercator/normalize-viewport-props.ts +58 -0
- package/src/web-mercator/web-mercator-utils.ts +468 -0
- package/src/web-mercator/web-mercator-viewport.ts +406 -0
- package/src/web-mercator.ts +1 -1
- package/dist/projection/experimental/index.cjs +0 -11707
- package/dist/projection/experimental/index.cjs.map +0 -6
- package/dist/turf/expressions.cjs +0 -87
- package/dist/turf/expressions.cjs.map +0 -6
- package/dist/turf/expressions.d.ts +0 -24
- package/dist/turf/expressions.d.ts.map +0 -1
- package/dist/turf/expressions.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subdivide-globe-mesh.js","sourceRoot":"","sources":["../src/subdivide-globe-mesh.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAC5D,mMAAmM;AAEnM,OAAO,EAAC,mBAAmB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"subdivide-globe-mesh.js","sourceRoot":"","sources":["../src/subdivide-globe-mesh.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAC5D,mMAAmM;AAEnM,OAAO,EAAC,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,qBAAqB,EAItB,MAAM,mBAAmB,CAAC;AAe3B;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAkB,EAClB,OAAkC;IAElC,MAAM,EAAC,aAAa,GAAG,OAAO,EAAE,aAAa,GAAG,aAAa,EAAE,IAAI,GAAG,CAAC,EAAE,GAAG,MAAM,EAAC,GAAG,OAAO,CAAC;IAC9F,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;IACjF,IACE,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC;QAC/B,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC;QAC/B,aAAa,IAAI,CAAC;QAClB,aAAa,IAAI,CAAC;QAClB,aAAa,GAAG,aAAa;QAE7B,MAAM,IAAI,UAAU,CAAC,sCAAsC,CAAC,CAAC;IAC/D,2FAA2F;IAC3F,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,IAAI,IAAI;QAClD,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE;YAAE,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;IAC3F,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAClF,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,GAAG,GAAG;YACzD,MAAM,IAAI,UAAU,CAAC,iDAAiD,CAAC,CAAC;IAC5E,CAAC;IACD,MAAM,QAAQ,GAAG;QACf,aAAa;QACb,aAAa;QACb,mBAAmB,EAAE,CAAC,GAAG,CAAC,aAAa,GAAG,aAAa,CAAC,IAAI,CAAC;KAC9D,CAAC;IACF,OAAO,qBAAqB,CAAC,IAAI,EAAE;QACjC,GAAG,MAAM;QACT,IAAI;QACJ,UAAU,EAAE,CAAC;QACb,SAAS,CAAC,QAAQ;YAChB,MAAM,KAAK,GAAG;gBACZ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG;gBAChC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG;gBAChC,CAAC,EAAE,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAChC,CAAC;YACF,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAC;YACvD,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
package/dist/tasks/index.cjs
CHANGED
|
@@ -457,56 +457,48 @@ function buildMixedVertexTileHalos(tiles, options = {}, targets, preparation) {
|
|
|
457
457
|
if (![maxSamples, maxTests].every((v) => Number.isSafeInteger(v) && v >= 0))
|
|
458
458
|
throw new Error("Invalid mixed halo capacity");
|
|
459
459
|
let count = 0;
|
|
460
|
-
|
|
460
|
+
let previousKey;
|
|
461
461
|
let frame;
|
|
462
462
|
const sources = [...tiles].sort((a, b) => a.spacing - b.spacing || a.column - b.column || a.row - b.row).map((tile) => {
|
|
463
|
-
if (![tile.column, tile.row, tile.spacing].every(Number.isSafeInteger) || tile.spacing < 1 || 2 ** Math.round(Math.log2(tile.spacing)) !== tile.spacing)
|
|
464
|
-
throw new Error("Invalid mixed halo lattice");
|
|
465
|
-
const key3 = `${tile.spacing}/${tile.column}/${tile.row}`;
|
|
466
|
-
if (addresses.has(key3))
|
|
467
|
-
throw new Error("Duplicate mixed halo tile");
|
|
468
|
-
addresses.add(key3);
|
|
469
463
|
count += (tile.field.width + 2) * (tile.field.height + 2);
|
|
470
464
|
if (!Number.isSafeInteger(count) || count > maxSamples)
|
|
471
465
|
throw new Error("Mixed halo sample capacity exceeded");
|
|
472
|
-
let
|
|
473
|
-
if (!
|
|
474
|
-
|
|
475
|
-
preparation == null ? void 0 : preparation.
|
|
466
|
+
let prepared = preparation == null ? void 0 : preparation.tiles.get(tile);
|
|
467
|
+
if (!prepared) {
|
|
468
|
+
prepared = prepareMixedHaloTile(tile);
|
|
469
|
+
preparation == null ? void 0 : preparation.tiles.set(tile, prepared);
|
|
470
|
+
}
|
|
471
|
+
const { key: key3, source: field, columnStep: column, rowStep: row, frameOrigin: origin, scale: scale3 } = prepared;
|
|
472
|
+
if (previousKey === key3)
|
|
473
|
+
throw new Error("Duplicate mixed halo tile");
|
|
474
|
+
previousKey = key3;
|
|
475
|
+
if (frame) {
|
|
476
|
+
if (frame.reference !== field.heightReference)
|
|
477
|
+
throw new Error("Mixed halo frames or height references differ");
|
|
478
|
+
for (let i = 0; i < 2; i++) {
|
|
479
|
+
if (column[i] !== frame.column[i] || row[i] !== frame.row[i] || origin[i] !== frame.origin[i] && Math.abs(origin[i] - frame.origin[i]) > Math.min(16 * Number.EPSILON * Math.max(scale3[i], frame.scale[i]), 1e-9 * Math.max(Math.abs(column[i]), Math.abs(row[i]))))
|
|
480
|
+
throw new Error("Mixed halo frames or height references differ");
|
|
481
|
+
}
|
|
476
482
|
}
|
|
477
|
-
if (field.registration !== "vertex")
|
|
478
|
-
throw new Error("Mixed halos require vertex registration");
|
|
479
|
-
const column = field.columnStep.map((v) => v / tile.spacing);
|
|
480
|
-
const row = field.rowStep.map((v) => v / tile.spacing);
|
|
481
|
-
const origin = field.origin.map((v, axis) => v - tile.column * column[axis] - tile.row * row[axis]);
|
|
482
|
-
const scale3 = field.origin.map((v, i) => Math.max(1, Math.abs(v), Math.abs(tile.column * column[i]), Math.abs(tile.row * row[i])));
|
|
483
|
-
if (!origin.every(Number.isFinite))
|
|
484
|
-
throw new Error("Mixed halo coordinate overflow");
|
|
485
|
-
if (frame && (frame.reference !== field.heightReference || column.some((v, i) => v !== frame.column[i]) || row.some((v, i) => v !== frame.row[i]) || origin.some((v, i) => Math.abs(v - frame.origin[i]) > Math.min(16 * Number.EPSILON * Math.max(scale3[i], frame.scale[i]), 1e-9 * Math.max(Math.abs(column[i]), Math.abs(row[i]))))))
|
|
486
|
-
throw new Error("Mixed halo frames or height references differ");
|
|
487
483
|
frame ?? (frame = { origin, column, row, reference: field.heightReference, scale: scale3 });
|
|
488
|
-
return
|
|
484
|
+
return prepared;
|
|
489
485
|
});
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
if (sources.length && !Number.isSafeInteger(max2 - min2))
|
|
501
|
-
throw new Error("Mixed halo lattice span overflow");
|
|
502
|
-
}
|
|
486
|
+
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
487
|
+
for (let i = 0; i < sources.length; i++) {
|
|
488
|
+
const { haloBounds } = sources[i];
|
|
489
|
+
minX = Math.min(minX, haloBounds.minX);
|
|
490
|
+
minY = Math.min(minY, haloBounds.minY);
|
|
491
|
+
maxX = Math.max(maxX, haloBounds.maxX);
|
|
492
|
+
maxY = Math.max(maxY, haloBounds.maxY);
|
|
493
|
+
}
|
|
494
|
+
if (sources.length && (!Number.isSafeInteger(maxX - minX) || !Number.isSafeInteger(maxY - minY)))
|
|
495
|
+
throw new Error("Mixed halo lattice span overflow");
|
|
503
496
|
if (targets && targets.size === 0)
|
|
504
497
|
return { tiles: [] };
|
|
505
498
|
let index;
|
|
506
499
|
if (sources.length > 8) {
|
|
507
|
-
const keys = preparation && sources.map((tile) => `${tile.spacing}/${tile.column}/${tile.row}/${tile.source.width}/${tile.source.height}`);
|
|
508
500
|
const cached = preparation == null ? void 0 : preparation.layout;
|
|
509
|
-
if (
|
|
501
|
+
if (cached && sources.length === cached.keys.length && sources.every((tile, i) => tile.layoutKey === cached.keys[i])) {
|
|
510
502
|
index = cached.query;
|
|
511
503
|
} else {
|
|
512
504
|
index = createTerrainBoxIndex(sources.map((tile) => ({
|
|
@@ -515,8 +507,8 @@ function buildMixedVertexTileHalos(tiles, options = {}, targets, preparation) {
|
|
|
515
507
|
maxX: tile.column + (tile.source.width - 1) * tile.spacing,
|
|
516
508
|
maxY: tile.row + (tile.source.height - 1) * tile.spacing
|
|
517
509
|
})));
|
|
518
|
-
if (preparation
|
|
519
|
-
preparation.layout = { keys, query: index };
|
|
510
|
+
if (preparation)
|
|
511
|
+
preparation.layout = { keys: sources.map((tile) => tile.layoutKey), query: index };
|
|
520
512
|
}
|
|
521
513
|
}
|
|
522
514
|
let tests = 0;
|
|
@@ -525,21 +517,17 @@ function buildMixedVertexTileHalos(tiles, options = {}, targets, preparation) {
|
|
|
525
517
|
throw new Error("Mixed halo tile-test budget exceeded");
|
|
526
518
|
};
|
|
527
519
|
return {
|
|
528
|
-
tiles: sources.filter((tile) => !targets || targets.has(
|
|
520
|
+
tiles: sources.filter((tile) => !targets || targets.has(tile.key)).map((tile) => {
|
|
529
521
|
const source = tile.source, width = source.width + 2, height2 = source.height + 2;
|
|
530
522
|
const heights = new Float64Array(width * height2), validity = new Uint8Array(heights.length), statuses = new Uint8Array(heights.length);
|
|
531
|
-
const candidates = (index == null ? void 0 : index(
|
|
532
|
-
minX: tile.column - tile.spacing,
|
|
533
|
-
minY: tile.row - tile.spacing,
|
|
534
|
-
maxX: tile.column + source.width * tile.spacing,
|
|
535
|
-
maxY: tile.row + source.height * tile.spacing
|
|
536
|
-
}, charge).map((id) => sources[id])) ?? sources;
|
|
523
|
+
const candidates = (index == null ? void 0 : index(tile.haloBounds, charge).map((id) => sources[id])) ?? sources;
|
|
537
524
|
for (let y = 0; y < height2; y++)
|
|
538
525
|
for (let x = 0; x < width; x++) {
|
|
539
526
|
const gx = tile.column + (x - 1) * tile.spacing, gy = tile.row + (y - 1) * tile.spacing;
|
|
540
|
-
if (!
|
|
527
|
+
if (!Number.isSafeInteger(gx) || !Number.isSafeInteger(gy))
|
|
541
528
|
throw new Error("Mixed halo lattice overflow");
|
|
542
|
-
for (
|
|
529
|
+
for (let candidateIndex = 0; candidateIndex < candidates.length; candidateIndex++) {
|
|
530
|
+
const candidate = candidates[candidateIndex];
|
|
543
531
|
charge();
|
|
544
532
|
const cx = (gx - candidate.column) / candidate.spacing, cy = (gy - candidate.row) / candidate.spacing;
|
|
545
533
|
const f = candidate.source;
|
|
@@ -582,6 +570,36 @@ function buildMixedVertexTileHalos(tiles, options = {}, targets, preparation) {
|
|
|
582
570
|
})
|
|
583
571
|
};
|
|
584
572
|
}
|
|
573
|
+
function prepareMixedHaloTile(tile) {
|
|
574
|
+
const { column, row, spacing } = tile;
|
|
575
|
+
if (![column, row, spacing].every(Number.isSafeInteger) || spacing < 1 || 2 ** Math.round(Math.log2(spacing)) !== spacing)
|
|
576
|
+
throw new Error("Invalid mixed halo lattice");
|
|
577
|
+
const source = new HeightField(tile.field);
|
|
578
|
+
if (source.registration !== "vertex")
|
|
579
|
+
throw new Error("Mixed halos require vertex registration");
|
|
580
|
+
const columnStep = source.columnStep.map((v) => v / spacing);
|
|
581
|
+
const rowStep = source.rowStep.map((v) => v / spacing);
|
|
582
|
+
const frameOrigin = source.origin.map((v, i) => v - column * columnStep[i] - row * rowStep[i]);
|
|
583
|
+
const scale3 = source.origin.map((v, i) => Math.max(1, Math.abs(v), Math.abs(column * columnStep[i]), Math.abs(row * rowStep[i])));
|
|
584
|
+
if (!frameOrigin.every(Number.isFinite))
|
|
585
|
+
throw new Error("Mixed halo coordinate overflow");
|
|
586
|
+
const minX = column - spacing, minY = row - spacing;
|
|
587
|
+
const maxX = column + source.width * spacing, maxY = row + source.height * spacing;
|
|
588
|
+
if (![minX, minY, maxX, maxY].every(Number.isSafeInteger))
|
|
589
|
+
throw new Error("Mixed halo lattice overflow");
|
|
590
|
+
const key3 = `${spacing}/${column}/${row}`;
|
|
591
|
+
return {
|
|
592
|
+
...tile,
|
|
593
|
+
source,
|
|
594
|
+
columnStep,
|
|
595
|
+
rowStep,
|
|
596
|
+
frameOrigin,
|
|
597
|
+
scale: scale3,
|
|
598
|
+
key: key3,
|
|
599
|
+
layoutKey: `${key3}/${source.width}/${source.height}`,
|
|
600
|
+
haloBounds: { minX, minY, maxX, maxY }
|
|
601
|
+
};
|
|
602
|
+
}
|
|
585
603
|
var init_mixed_vertex_halos = __esm({
|
|
586
604
|
"dist/terrain/mixed-vertex-halos.js"() {
|
|
587
605
|
init_box_index();
|
|
@@ -629,14 +647,21 @@ function updateTerrainMixedVertexTileHalos(previous, resident, options = {}) {
|
|
|
629
647
|
const budget = options.maxDependencyTests ?? 1e7;
|
|
630
648
|
if (!Number.isSafeInteger(budget) || budget < 0)
|
|
631
649
|
throw new Error("Invalid mixed halo dependency budget");
|
|
632
|
-
const old = new Map(previous == null ? void 0 : previous.sources.map((t) => [key(t), t]));
|
|
633
|
-
const current = new Map(resident.map((t) => [key(t), t]));
|
|
634
|
-
const cached = new Map(previous == null ? void 0 : previous.tiles.map((t) => [key(t), t]));
|
|
635
|
-
const targets = /* @__PURE__ */ new Set();
|
|
636
650
|
const unchangedLayout = (previous == null ? void 0 : previous.sources.length) === resident.length && resident.every((tile, i) => {
|
|
637
651
|
const prior = previous.sources[i];
|
|
638
|
-
return
|
|
652
|
+
return prior === tile || prior.column === tile.column && prior.row === tile.row && prior.spacing === tile.spacing && prior.field.width === tile.field.width && prior.field.height === tile.field.height;
|
|
639
653
|
});
|
|
654
|
+
const old = unchangedLayout ? void 0 : new Map(previous == null ? void 0 : previous.sources.map((t) => [key(t), t]));
|
|
655
|
+
const targets = /* @__PURE__ */ new Set();
|
|
656
|
+
const initialized = previous !== null && preparations.has(previous);
|
|
657
|
+
if (!initialized) {
|
|
658
|
+
const cached = new Set(previous == null ? void 0 : previous.tiles.map(key));
|
|
659
|
+
for (const tile of resident) {
|
|
660
|
+
const address = key(tile);
|
|
661
|
+
if (!cached.has(address))
|
|
662
|
+
targets.add(address);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
640
665
|
let index = unchangedLayout && previous ? targetIndexes.get(previous) : void 0;
|
|
641
666
|
let tests = 0;
|
|
642
667
|
const charge = () => {
|
|
@@ -648,12 +673,13 @@ function updateTerrainMixedVertexTileHalos(previous, resident, options = {}) {
|
|
|
648
673
|
for (const id of index(box, charge))
|
|
649
674
|
targets.add(key(resident[id]));
|
|
650
675
|
}
|
|
651
|
-
for (
|
|
652
|
-
const
|
|
653
|
-
const prior = old.get(
|
|
654
|
-
if (
|
|
655
|
-
|
|
656
|
-
|
|
676
|
+
for (let i = 0; i < resident.length; i++) {
|
|
677
|
+
const tile = resident[i];
|
|
678
|
+
const prior = unchangedLayout ? previous.sources[i] : old == null ? void 0 : old.get(key(tile));
|
|
679
|
+
if (prior === tile)
|
|
680
|
+
continue;
|
|
681
|
+
targets.add(key(tile));
|
|
682
|
+
if (!previous)
|
|
657
683
|
continue;
|
|
658
684
|
if (!prior) {
|
|
659
685
|
invalidate(bounds(tile));
|
|
@@ -666,24 +692,44 @@ function updateTerrainMixedVertexTileHalos(previous, resident, options = {}) {
|
|
|
666
692
|
invalidate(dirty);
|
|
667
693
|
}
|
|
668
694
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
695
|
+
const removed = [];
|
|
696
|
+
if (old == null ? void 0 : old.size) {
|
|
697
|
+
const current = new Set(resident.map(key));
|
|
698
|
+
for (const [address, tile] of old) {
|
|
699
|
+
if (current.has(address))
|
|
700
|
+
continue;
|
|
701
|
+
removed.push(address);
|
|
702
|
+
if (resident.length)
|
|
703
|
+
invalidate(bounds(tile));
|
|
704
|
+
}
|
|
672
705
|
}
|
|
673
706
|
const priorPreparation = previous && preparations.get(previous);
|
|
674
707
|
const preparation = {
|
|
675
|
-
|
|
708
|
+
tiles: (priorPreparation == null ? void 0 : priorPreparation.tiles) ?? /* @__PURE__ */ new WeakMap(),
|
|
676
709
|
layout: priorPreparation == null ? void 0 : priorPreparation.layout
|
|
677
710
|
};
|
|
678
711
|
const built = buildMixedVertexTileHalos(resident, options, targets, preparation).tiles;
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
712
|
+
let tiles;
|
|
713
|
+
if (unchangedLayout && initialized) {
|
|
714
|
+
let cursor = 0;
|
|
715
|
+
tiles = previous.tiles.map((tile) => {
|
|
716
|
+
const replacement = built[cursor];
|
|
717
|
+
if ((replacement == null ? void 0 : replacement.spacing) !== tile.spacing || replacement.column !== tile.column || replacement.row !== tile.row)
|
|
718
|
+
return tile;
|
|
719
|
+
cursor++;
|
|
720
|
+
return replacement;
|
|
721
|
+
});
|
|
722
|
+
} else {
|
|
723
|
+
const cached = new Map(previous == null ? void 0 : previous.tiles.map((tile) => [key(tile), tile]));
|
|
724
|
+
for (const tile of built)
|
|
725
|
+
cached.set(key(tile), tile);
|
|
726
|
+
tiles = resident.map((tile) => cached.get(key(tile))).sort((a, b) => a.spacing - b.spacing || a.column - b.column || a.row - b.row);
|
|
727
|
+
}
|
|
682
728
|
const snapshot2 = {
|
|
683
729
|
sources: resident.slice(),
|
|
684
730
|
tiles,
|
|
685
731
|
rebuilt: built.map(key),
|
|
686
|
-
removed:
|
|
732
|
+
removed: removed.sort()
|
|
687
733
|
};
|
|
688
734
|
preparations.set(snapshot2, preparation);
|
|
689
735
|
if (index)
|
|
@@ -6166,7 +6212,7 @@ function airOceanMesh() {
|
|
|
6166
6212
|
faces[19] = [1, 13, 2];
|
|
6167
6213
|
faces.push([13, 1, 10]);
|
|
6168
6214
|
const radians4 = Math.PI / 180;
|
|
6169
|
-
const rotation2 = new
|
|
6215
|
+
const rotation2 = new import_matrix.Matrix4().rotateZ(83.65929 * radians4).rotateY(25.44458 * radians4).rotateX(87.45184 * radians4);
|
|
6170
6216
|
const geographicVertices = vertices2.map((v) => Array.from(rotation2.transformAsPoint(v)));
|
|
6171
6217
|
for (const f of faces) {
|
|
6172
6218
|
if (dot(cross(subtract(geographicVertices[f[1]], geographicVertices[f[0]]), subtract(geographicVertices[f[2]], geographicVertices[f[0]])), geographicVertices[f[0]]) < 0)
|
|
@@ -6203,10 +6249,10 @@ function airOceanMesh() {
|
|
|
6203
6249
|
joins: parents.flatMap((parent, face) => parent < 0 ? [] : [[parent, face]])
|
|
6204
6250
|
};
|
|
6205
6251
|
}
|
|
6206
|
-
var
|
|
6252
|
+
var import_matrix, subtract, center;
|
|
6207
6253
|
var init_air_ocean_mesh = __esm({
|
|
6208
6254
|
"dist/maps/air-ocean-mesh.js"() {
|
|
6209
|
-
|
|
6255
|
+
import_matrix = require("@math.gl/core/matrix");
|
|
6210
6256
|
init_math();
|
|
6211
6257
|
subtract = (a, b) => add(a, scale(b, -1));
|
|
6212
6258
|
center = (points) => scale(points.reduce(add, [0, 0, 0]), 1 / points.length);
|
|
@@ -8646,7 +8692,7 @@ function createLayout(mesh, seed = 1, options = {}) {
|
|
|
8646
8692
|
const origin = center2(mesh.faces[0].map((i) => mesh.vertices[i]));
|
|
8647
8693
|
const x = normalize(subtract3(mesh.vertices[mesh.faces[0][1]], mesh.vertices[mesh.faces[0][0]]));
|
|
8648
8694
|
const z = normals[0], y = cross3(z, x);
|
|
8649
|
-
const rootTransform = new
|
|
8695
|
+
const rootTransform = new import_matrix2.Matrix4([
|
|
8650
8696
|
x[0],
|
|
8651
8697
|
y[0],
|
|
8652
8698
|
z[0],
|
|
@@ -8680,7 +8726,7 @@ function restoreLayout(data) {
|
|
|
8680
8726
|
if (panels.length !== mesh.faces.length || targetAngles.length !== panels.length || !targetAngles.every(Number.isFinite) || data.rootTransform.length !== 16 || !data.rootTransform.every(Number.isFinite))
|
|
8681
8727
|
throw new Error("Invalid prepared hinge layout");
|
|
8682
8728
|
const tree = new import_geometry3.HingeTree(panels);
|
|
8683
|
-
const rootTransform = new
|
|
8729
|
+
const rootTransform = new import_matrix2.Matrix4(data.rootTransform);
|
|
8684
8730
|
const poses = new Float64Array(panels.length * 16), angles = new Float64Array(panels.length);
|
|
8685
8731
|
const evaluate2 = (amount) => {
|
|
8686
8732
|
if (!Number.isFinite(amount) || amount < 0 || amount > 1)
|
|
@@ -8688,7 +8734,7 @@ function restoreLayout(data) {
|
|
|
8688
8734
|
for (let i = 0; i < angles.length; i++)
|
|
8689
8735
|
angles[i] = targetAngles[i] * amount;
|
|
8690
8736
|
tree.evaluate(angles, poses, rootTransform);
|
|
8691
|
-
const matrix = new
|
|
8737
|
+
const matrix = new import_matrix2.Matrix4();
|
|
8692
8738
|
return mesh.faces.map((face, i) => {
|
|
8693
8739
|
matrix.copy(poses.subarray(i * 16, i * 16 + 16));
|
|
8694
8740
|
return face.map((v) => Array.from(matrix.transformAsPoint(mesh.vertices[v])));
|
|
@@ -8722,10 +8768,10 @@ function countOverlaps(faces) {
|
|
|
8722
8768
|
}
|
|
8723
8769
|
return count;
|
|
8724
8770
|
}
|
|
8725
|
-
var
|
|
8771
|
+
var import_matrix2, import_geometry3;
|
|
8726
8772
|
var init_unfold = __esm({
|
|
8727
8773
|
"dist/maps/myriahedral/unfold.js"() {
|
|
8728
|
-
|
|
8774
|
+
import_matrix2 = require("@math.gl/core/matrix");
|
|
8729
8775
|
import_geometry3 = require("@math.gl/geometry");
|
|
8730
8776
|
init_mesh();
|
|
8731
8777
|
}
|
|
@@ -11174,6 +11220,9 @@ var init_numerical_derivative = __esm({
|
|
|
11174
11220
|
});
|
|
11175
11221
|
|
|
11176
11222
|
// dist/projection/experimental/crs-rendering-scale.js
|
|
11223
|
+
function isEarth(ellipsoid) {
|
|
11224
|
+
return Math.abs(ellipsoid.semiMajorAxis - 6375e3) < 7e-3 * 6375e3;
|
|
11225
|
+
}
|
|
11177
11226
|
function validateScale(scale3) {
|
|
11178
11227
|
if (scale3.length !== 3 || scale3.some((value2) => !Number.isFinite(value2) || value2 <= 0))
|
|
11179
11228
|
throw new Error("Invalid CRS rendering scale");
|
|
@@ -11187,6 +11236,7 @@ function createRenderingScale(crs, projection, axis, center3) {
|
|
|
11187
11236
|
}
|
|
11188
11237
|
const anchor = [0, 0, 0], input = [0, 0, 0], geographic2 = [0, 0, 0], sample2 = [0, 0, 0];
|
|
11189
11238
|
const derivatives = Array.from({ length: 3 }, () => [0, 0, 0]);
|
|
11239
|
+
const body = isEarth(crs.ellipsoid) ? WGS84 : crs.ellipsoid;
|
|
11190
11240
|
let component = 0, longitudeMeters = 0, latitudeMeters = 0, busy = false;
|
|
11191
11241
|
const numerical = new NumericalDerivative((offset, output) => {
|
|
11192
11242
|
for (let i = 0; i < 3; i++)
|
|
@@ -11215,7 +11265,7 @@ function createRenderingScale(crs, projection, axis, center3) {
|
|
|
11215
11265
|
return null;
|
|
11216
11266
|
projection.unprojectTo(anchor, geographic2);
|
|
11217
11267
|
const latitude = geographic2[1] * RADIANS;
|
|
11218
|
-
const a =
|
|
11268
|
+
const a = body.semiMajorAxis, es = body.eccentricitySquared;
|
|
11219
11269
|
const denominator = 1 - es * Math.sin(latitude) ** 2;
|
|
11220
11270
|
longitudeMeters = a * Math.cos(latitude) / Math.sqrt(denominator) * RADIANS;
|
|
11221
11271
|
latitudeMeters = a * (1 - es) / denominator ** 1.5 * RADIANS;
|
|
@@ -11836,7 +11886,7 @@ var init_mutable_projection = __esm({
|
|
|
11836
11886
|
function geodeticToGeocentricInPlace(point, ellipsoid) {
|
|
11837
11887
|
if (Math.abs(point.y) > Math.PI / 2)
|
|
11838
11888
|
throw new Error("Latitude outside geocentric domain");
|
|
11839
|
-
if (!(0,
|
|
11889
|
+
if (!(0, import_matrix3.spheroidToCartesian)(point, ellipsoid))
|
|
11840
11890
|
throw new Error("Geocentric coordinate must be finite");
|
|
11841
11891
|
}
|
|
11842
11892
|
function geocentricToGeodeticInPlace(point, ellipsoid) {
|
|
@@ -11852,7 +11902,7 @@ function geocentricToGeodeticInPlace(point, ellipsoid) {
|
|
|
11852
11902
|
point.z = Math.abs(z) - b;
|
|
11853
11903
|
return;
|
|
11854
11904
|
}
|
|
11855
|
-
if (!(0,
|
|
11905
|
+
if (!(0, import_matrix3.cartesianToSpheroid)(point, ellipsoid)) {
|
|
11856
11906
|
if (!Number.isFinite(Math.hypot(x, y, z)))
|
|
11857
11907
|
throw new Error("Geocentric radius must be finite");
|
|
11858
11908
|
throw new Error("Geocentric inverse did not converge");
|
|
@@ -11958,10 +12008,10 @@ function geocentricToGeodetic(coordinate, ellipsoid) {
|
|
|
11958
12008
|
geocentricToGeodeticInPlace(point, ellipsoid);
|
|
11959
12009
|
return [point.x, point.y, point.z];
|
|
11960
12010
|
}
|
|
11961
|
-
var
|
|
12011
|
+
var import_matrix3, ARC_SECOND, WGS842;
|
|
11962
12012
|
var init_datum = __esm({
|
|
11963
12013
|
"dist/projection/experimental/datum.js"() {
|
|
11964
|
-
|
|
12014
|
+
import_matrix3 = require("@math.gl/core/matrix");
|
|
11965
12015
|
ARC_SECOND = Math.PI / (180 * 3600);
|
|
11966
12016
|
WGS842 = {
|
|
11967
12017
|
ellipsoid: {
|
|
@@ -23202,6 +23252,7 @@ __export(index_exports, {
|
|
|
23202
23252
|
module.exports = __toCommonJS(index_exports);
|
|
23203
23253
|
|
|
23204
23254
|
// dist/tasks/terrain-residency.js
|
|
23255
|
+
var sourceIndexes = /* @__PURE__ */ new WeakMap();
|
|
23205
23256
|
var addressKey = ({ spacing, column, row }) => `${spacing}/${column}/${row}`;
|
|
23206
23257
|
function sameArray(a, b) {
|
|
23207
23258
|
if (a.length !== b.length)
|
|
@@ -23225,6 +23276,39 @@ function sameHalo(a, b) {
|
|
|
23225
23276
|
return Object.prototype.hasOwnProperty.call(bf, key3) && Object.is(left, right);
|
|
23226
23277
|
}) && sameArray(a.statuses, b.statuses);
|
|
23227
23278
|
}
|
|
23279
|
+
function copyResidentSamples(field) {
|
|
23280
|
+
const { width, height: height2, offset = 0, stride = width } = field;
|
|
23281
|
+
const heights = field.heights instanceof Float64Array ? new Float64Array(width * height2) : new Float32Array(width * height2);
|
|
23282
|
+
const validity = new Uint8Array(heights.length);
|
|
23283
|
+
for (let y = 0; y < height2; y++) {
|
|
23284
|
+
for (let x = 0; x < width; x++) {
|
|
23285
|
+
const input = offset + y * stride + x;
|
|
23286
|
+
const output = y * width + x;
|
|
23287
|
+
const value2 = field.heights[input];
|
|
23288
|
+
if (Number.isFinite(value2) && (!field.validity || field.validity[input] !== 0)) {
|
|
23289
|
+
heights[output] = value2;
|
|
23290
|
+
validity[output] = 1;
|
|
23291
|
+
}
|
|
23292
|
+
}
|
|
23293
|
+
}
|
|
23294
|
+
return { heights, validity };
|
|
23295
|
+
}
|
|
23296
|
+
function compareAddress(a, b) {
|
|
23297
|
+
return a.spacing - b.spacing || a.column - b.column || a.row - b.row;
|
|
23298
|
+
}
|
|
23299
|
+
function changedHalos(previous, next) {
|
|
23300
|
+
const changed = [];
|
|
23301
|
+
let index = 0;
|
|
23302
|
+
for (let i = 0; i < next.length; i++) {
|
|
23303
|
+
const tile = next[i];
|
|
23304
|
+
while (index < previous.length && compareAddress(previous[index], tile) < 0)
|
|
23305
|
+
index++;
|
|
23306
|
+
const prior = previous[index];
|
|
23307
|
+
if (!prior || prior !== tile && (compareAddress(prior, tile) !== 0 || !sameHalo(prior, tile)))
|
|
23308
|
+
changed.push(tile);
|
|
23309
|
+
}
|
|
23310
|
+
return changed;
|
|
23311
|
+
}
|
|
23228
23312
|
var TerrainResidencyTask = {
|
|
23229
23313
|
id: "terrain-residency",
|
|
23230
23314
|
initialize(limits) {
|
|
@@ -23242,42 +23326,62 @@ var TerrainResidencyTask = {
|
|
|
23242
23326
|
removed: []
|
|
23243
23327
|
};
|
|
23244
23328
|
}
|
|
23329
|
+
const start = input.measureStages ? performance.now() : 0;
|
|
23245
23330
|
try {
|
|
23246
23331
|
if (input.revision !== state.revision)
|
|
23247
23332
|
throw new Error("Stale terrain residency revision");
|
|
23248
|
-
const
|
|
23249
|
-
Promise.resolve().then(() => (init_mixed_halo_update(), mixed_halo_update_exports)),
|
|
23250
|
-
Promise.resolve().then(() => (init_height_field(), height_field_exports))
|
|
23251
|
-
]);
|
|
23333
|
+
const { updateTerrainMixedVertexTileHalos: updateTerrainMixedVertexTileHalos2 } = await Promise.resolve().then(() => (init_mixed_halo_update(), mixed_halo_update_exports));
|
|
23252
23334
|
context.throwIfAborted();
|
|
23253
|
-
const
|
|
23335
|
+
const priorSources = ((_b2 = state.snapshot) == null ? void 0 : _b2.sources) ?? [];
|
|
23336
|
+
let sourceIndex = state.snapshot && sourceIndexes.get(state.snapshot);
|
|
23337
|
+
if (!sourceIndex) {
|
|
23338
|
+
sourceIndex = /* @__PURE__ */ new Map();
|
|
23339
|
+
for (let i = 0; i < priorSources.length; i++)
|
|
23340
|
+
sourceIndex.set(addressKey(priorSources[i]), i);
|
|
23341
|
+
}
|
|
23342
|
+
const resident = priorSources.slice();
|
|
23343
|
+
let structural;
|
|
23344
|
+
const getSource = (key3) => structural ? structural.get(key3) : resident[sourceIndex.get(key3)];
|
|
23345
|
+
const setSource = (key3, tile) => {
|
|
23346
|
+
if (structural)
|
|
23347
|
+
structural.set(key3, tile);
|
|
23348
|
+
else
|
|
23349
|
+
resident[sourceIndex.get(key3)] = tile;
|
|
23350
|
+
};
|
|
23351
|
+
const editLayout = () => {
|
|
23352
|
+
if (!structural) {
|
|
23353
|
+
structural = /* @__PURE__ */ new Map();
|
|
23354
|
+
for (const tile of resident)
|
|
23355
|
+
structural.set(addressKey(tile), tile);
|
|
23356
|
+
}
|
|
23357
|
+
return structural;
|
|
23358
|
+
};
|
|
23254
23359
|
const writable = /* @__PURE__ */ new Map();
|
|
23255
23360
|
for (const edit of input.edits) {
|
|
23256
23361
|
if (edit.type === "upsert") {
|
|
23257
23362
|
const key4 = addressKey(edit.tile);
|
|
23258
|
-
|
|
23363
|
+
editLayout().set(key4, structuredClone(edit.tile));
|
|
23259
23364
|
writable.delete(key4);
|
|
23260
23365
|
continue;
|
|
23261
23366
|
}
|
|
23262
23367
|
const key3 = addressKey(edit.address);
|
|
23263
23368
|
if (edit.type === "remove") {
|
|
23264
|
-
|
|
23369
|
+
editLayout().delete(key3);
|
|
23265
23370
|
writable.delete(key3);
|
|
23266
23371
|
continue;
|
|
23267
23372
|
}
|
|
23268
23373
|
if (edit.type !== "samples")
|
|
23269
23374
|
throw new Error("Unknown terrain residency edit");
|
|
23270
|
-
const source =
|
|
23375
|
+
const source = getSource(key3);
|
|
23271
23376
|
if (!source)
|
|
23272
23377
|
throw new Error("Terrain sample edit requires a resident tile");
|
|
23273
23378
|
if (!edit.samples.length)
|
|
23274
23379
|
continue;
|
|
23275
23380
|
let data = writable.get(key3);
|
|
23276
23381
|
if (!data) {
|
|
23277
|
-
|
|
23278
|
-
data = { heights: copied.heights, validity: copied.validity };
|
|
23382
|
+
data = structural ? new (await Promise.resolve().then(() => (init_height_field(), height_field_exports))).HeightField(source.field).copyData() : copyResidentSamples(source.field);
|
|
23279
23383
|
writable.set(key3, data);
|
|
23280
|
-
|
|
23384
|
+
setSource(key3, {
|
|
23281
23385
|
...source,
|
|
23282
23386
|
field: { ...source.field, ...data, offset: 0, stride: source.field.width }
|
|
23283
23387
|
});
|
|
@@ -23292,16 +23396,30 @@ var TerrainResidencyTask = {
|
|
|
23292
23396
|
data.validity[index] = height2 === null ? 0 : 1;
|
|
23293
23397
|
}
|
|
23294
23398
|
}
|
|
23295
|
-
const
|
|
23296
|
-
const
|
|
23297
|
-
const
|
|
23298
|
-
|
|
23299
|
-
return !prior || !sameHalo(prior, tile);
|
|
23300
|
-
}));
|
|
23399
|
+
const applied = input.measureStages ? performance.now() : 0;
|
|
23400
|
+
const next = updateTerrainMixedVertexTileHalos2(state.snapshot, structural ? [...structural.values()] : resident, state.limits);
|
|
23401
|
+
const updated = input.measureStages ? performance.now() : 0;
|
|
23402
|
+
const tiles = structuredClone(changedHalos(((_c = state.snapshot) == null ? void 0 : _c.tiles) ?? [], next.tiles));
|
|
23301
23403
|
context.throwIfAborted();
|
|
23404
|
+
if (!structural)
|
|
23405
|
+
sourceIndexes.set(next, sourceIndex);
|
|
23302
23406
|
state.snapshot = next;
|
|
23303
23407
|
state.revision++;
|
|
23304
|
-
|
|
23408
|
+
const result = {
|
|
23409
|
+
revision: state.revision,
|
|
23410
|
+
tiles,
|
|
23411
|
+
removed: next.removed
|
|
23412
|
+
};
|
|
23413
|
+
if (input.measureStages) {
|
|
23414
|
+
const finish = performance.now();
|
|
23415
|
+
result.timings = {
|
|
23416
|
+
applyEditsMs: applied - start,
|
|
23417
|
+
updateHalosMs: updated - applied,
|
|
23418
|
+
prepareDeltaMs: finish - updated,
|
|
23419
|
+
processMs: finish - start
|
|
23420
|
+
};
|
|
23421
|
+
}
|
|
23422
|
+
return result;
|
|
23305
23423
|
} catch (error) {
|
|
23306
23424
|
context.throwIfAborted();
|
|
23307
23425
|
return {
|