@math.gl/geospatial 5.0.0-beta.10 → 5.0.0-beta.12
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/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/expressions.d.ts +1 -1
- package/dist/expressions.d.ts.map +1 -1
- package/dist/index.cjs +1738 -316
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +14 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- 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.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 +92 -23
- 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/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.map +1 -1
- package/dist/projection/transform-analysis.cjs.map +1 -1
- package/dist/tasks/index.cjs +181 -84
- package/dist/tasks/index.cjs.map +2 -2
- package/dist/tasks/terrain-residency.d.ts.map +1 -1
- package/dist/tasks/terrain-residency.js +80 -18
- 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/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 +1529 -107
- package/dist/terrain/index.cjs.map +3 -3
- package/dist/terrain/index.d.ts +15 -1
- package/dist/terrain/index.d.ts.map +1 -1
- package/dist/terrain/index.js +13 -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/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/sweep-polytope.d.ts +4 -0
- package/dist/terrain/sweep-polytope.d.ts.map +1 -1
- package/dist/terrain/sweep-polytope.js +15 -5
- package/dist/terrain/sweep-polytope.js.map +1 -1
- 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/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/turf/expressions.cjs +4 -4
- package/dist/turf/expressions.cjs.map +2 -2
- package/dist/turf/expressions.d.ts +2 -2
- package/dist/turf/expressions.d.ts.map +1 -1
- package/dist/turf/expressions.js +2 -2
- package/dist/turf/expressions.js.map +1 -1
- 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/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 +19 -458
- package/src/crs/index.ts +7 -0
- package/src/crs/spatial-reference-metadata.ts +118 -0
- package/src/expressions.ts +1 -1
- package/src/index.ts +92 -4
- package/src/projection/experimental/crs/spatial-reference.ts +1 -6
- package/src/projection/experimental/crs/types.ts +1 -1
- package/src/projection/experimental/crs/wkt.ts +1 -1
- package/src/projection/experimental/crs-descriptor.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/index.ts +1 -1
- package/src/projection/lib/projection.ts +1 -1
- package/src/tasks/terrain-residency.ts +86 -21
- 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/hydrology.ts +149 -0
- package/src/terrain/index.ts +85 -1
- package/src/terrain/lod-screen-error.ts +128 -0
- package/src/terrain/lod-select.ts +65 -31
- 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/sweep-polytope.ts +49 -25
- package/src/terrain/sweep-rotating-capsule.ts +139 -0
- package/src/terrain/sweep-rotation.ts +149 -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/turf/expressions.ts +3 -3
- package/src/turf.ts +3 -7
- 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/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)
|
|
@@ -23202,6 +23248,7 @@ __export(index_exports, {
|
|
|
23202
23248
|
module.exports = __toCommonJS(index_exports);
|
|
23203
23249
|
|
|
23204
23250
|
// dist/tasks/terrain-residency.js
|
|
23251
|
+
var sourceIndexes = /* @__PURE__ */ new WeakMap();
|
|
23205
23252
|
var addressKey = ({ spacing, column, row }) => `${spacing}/${column}/${row}`;
|
|
23206
23253
|
function sameArray(a, b) {
|
|
23207
23254
|
if (a.length !== b.length)
|
|
@@ -23225,6 +23272,39 @@ function sameHalo(a, b) {
|
|
|
23225
23272
|
return Object.prototype.hasOwnProperty.call(bf, key3) && Object.is(left, right);
|
|
23226
23273
|
}) && sameArray(a.statuses, b.statuses);
|
|
23227
23274
|
}
|
|
23275
|
+
function copyResidentSamples(field) {
|
|
23276
|
+
const { width, height: height2, offset = 0, stride = width } = field;
|
|
23277
|
+
const heights = field.heights instanceof Float64Array ? new Float64Array(width * height2) : new Float32Array(width * height2);
|
|
23278
|
+
const validity = new Uint8Array(heights.length);
|
|
23279
|
+
for (let y = 0; y < height2; y++) {
|
|
23280
|
+
for (let x = 0; x < width; x++) {
|
|
23281
|
+
const input = offset + y * stride + x;
|
|
23282
|
+
const output = y * width + x;
|
|
23283
|
+
const value2 = field.heights[input];
|
|
23284
|
+
if (Number.isFinite(value2) && (!field.validity || field.validity[input] !== 0)) {
|
|
23285
|
+
heights[output] = value2;
|
|
23286
|
+
validity[output] = 1;
|
|
23287
|
+
}
|
|
23288
|
+
}
|
|
23289
|
+
}
|
|
23290
|
+
return { heights, validity };
|
|
23291
|
+
}
|
|
23292
|
+
function compareAddress(a, b) {
|
|
23293
|
+
return a.spacing - b.spacing || a.column - b.column || a.row - b.row;
|
|
23294
|
+
}
|
|
23295
|
+
function changedHalos(previous, next) {
|
|
23296
|
+
const changed = [];
|
|
23297
|
+
let index = 0;
|
|
23298
|
+
for (let i = 0; i < next.length; i++) {
|
|
23299
|
+
const tile = next[i];
|
|
23300
|
+
while (index < previous.length && compareAddress(previous[index], tile) < 0)
|
|
23301
|
+
index++;
|
|
23302
|
+
const prior = previous[index];
|
|
23303
|
+
if (!prior || prior !== tile && (compareAddress(prior, tile) !== 0 || !sameHalo(prior, tile)))
|
|
23304
|
+
changed.push(tile);
|
|
23305
|
+
}
|
|
23306
|
+
return changed;
|
|
23307
|
+
}
|
|
23228
23308
|
var TerrainResidencyTask = {
|
|
23229
23309
|
id: "terrain-residency",
|
|
23230
23310
|
initialize(limits) {
|
|
@@ -23246,39 +23326,58 @@ var TerrainResidencyTask = {
|
|
|
23246
23326
|
try {
|
|
23247
23327
|
if (input.revision !== state.revision)
|
|
23248
23328
|
throw new Error("Stale terrain residency revision");
|
|
23249
|
-
const
|
|
23250
|
-
Promise.resolve().then(() => (init_mixed_halo_update(), mixed_halo_update_exports)),
|
|
23251
|
-
Promise.resolve().then(() => (init_height_field(), height_field_exports))
|
|
23252
|
-
]);
|
|
23329
|
+
const { updateTerrainMixedVertexTileHalos: updateTerrainMixedVertexTileHalos2 } = await Promise.resolve().then(() => (init_mixed_halo_update(), mixed_halo_update_exports));
|
|
23253
23330
|
context.throwIfAborted();
|
|
23254
|
-
const
|
|
23331
|
+
const priorSources = ((_b2 = state.snapshot) == null ? void 0 : _b2.sources) ?? [];
|
|
23332
|
+
let sourceIndex = state.snapshot && sourceIndexes.get(state.snapshot);
|
|
23333
|
+
if (!sourceIndex) {
|
|
23334
|
+
sourceIndex = /* @__PURE__ */ new Map();
|
|
23335
|
+
for (let i = 0; i < priorSources.length; i++)
|
|
23336
|
+
sourceIndex.set(addressKey(priorSources[i]), i);
|
|
23337
|
+
}
|
|
23338
|
+
const resident = priorSources.slice();
|
|
23339
|
+
let structural;
|
|
23340
|
+
const getSource = (key3) => structural ? structural.get(key3) : resident[sourceIndex.get(key3)];
|
|
23341
|
+
const setSource = (key3, tile) => {
|
|
23342
|
+
if (structural)
|
|
23343
|
+
structural.set(key3, tile);
|
|
23344
|
+
else
|
|
23345
|
+
resident[sourceIndex.get(key3)] = tile;
|
|
23346
|
+
};
|
|
23347
|
+
const editLayout = () => {
|
|
23348
|
+
if (!structural) {
|
|
23349
|
+
structural = /* @__PURE__ */ new Map();
|
|
23350
|
+
for (const tile of resident)
|
|
23351
|
+
structural.set(addressKey(tile), tile);
|
|
23352
|
+
}
|
|
23353
|
+
return structural;
|
|
23354
|
+
};
|
|
23255
23355
|
const writable = /* @__PURE__ */ new Map();
|
|
23256
23356
|
for (const edit of input.edits) {
|
|
23257
23357
|
if (edit.type === "upsert") {
|
|
23258
23358
|
const key4 = addressKey(edit.tile);
|
|
23259
|
-
|
|
23359
|
+
editLayout().set(key4, structuredClone(edit.tile));
|
|
23260
23360
|
writable.delete(key4);
|
|
23261
23361
|
continue;
|
|
23262
23362
|
}
|
|
23263
23363
|
const key3 = addressKey(edit.address);
|
|
23264
23364
|
if (edit.type === "remove") {
|
|
23265
|
-
|
|
23365
|
+
editLayout().delete(key3);
|
|
23266
23366
|
writable.delete(key3);
|
|
23267
23367
|
continue;
|
|
23268
23368
|
}
|
|
23269
23369
|
if (edit.type !== "samples")
|
|
23270
23370
|
throw new Error("Unknown terrain residency edit");
|
|
23271
|
-
const source =
|
|
23371
|
+
const source = getSource(key3);
|
|
23272
23372
|
if (!source)
|
|
23273
23373
|
throw new Error("Terrain sample edit requires a resident tile");
|
|
23274
23374
|
if (!edit.samples.length)
|
|
23275
23375
|
continue;
|
|
23276
23376
|
let data = writable.get(key3);
|
|
23277
23377
|
if (!data) {
|
|
23278
|
-
|
|
23279
|
-
data = { heights: copied.heights, validity: copied.validity };
|
|
23378
|
+
data = structural ? new (await Promise.resolve().then(() => (init_height_field(), height_field_exports))).HeightField(source.field).copyData() : copyResidentSamples(source.field);
|
|
23280
23379
|
writable.set(key3, data);
|
|
23281
|
-
|
|
23380
|
+
setSource(key3, {
|
|
23282
23381
|
...source,
|
|
23283
23382
|
field: { ...source.field, ...data, offset: 0, stride: source.field.width }
|
|
23284
23383
|
});
|
|
@@ -23294,14 +23393,12 @@ var TerrainResidencyTask = {
|
|
|
23294
23393
|
}
|
|
23295
23394
|
}
|
|
23296
23395
|
const applied = input.measureStages ? performance.now() : 0;
|
|
23297
|
-
const next = updateTerrainMixedVertexTileHalos2(state.snapshot, [...
|
|
23396
|
+
const next = updateTerrainMixedVertexTileHalos2(state.snapshot, structural ? [...structural.values()] : resident, state.limits);
|
|
23298
23397
|
const updated = input.measureStages ? performance.now() : 0;
|
|
23299
|
-
const
|
|
23300
|
-
const tiles = structuredClone(next.tiles.filter((tile) => {
|
|
23301
|
-
const prior = old.get(addressKey(tile));
|
|
23302
|
-
return !prior || !sameHalo(prior, tile);
|
|
23303
|
-
}));
|
|
23398
|
+
const tiles = structuredClone(changedHalos(((_c = state.snapshot) == null ? void 0 : _c.tiles) ?? [], next.tiles));
|
|
23304
23399
|
context.throwIfAborted();
|
|
23400
|
+
if (!structural)
|
|
23401
|
+
sourceIndexes.set(next, sourceIndex);
|
|
23305
23402
|
state.snapshot = next;
|
|
23306
23403
|
state.revision++;
|
|
23307
23404
|
const result = {
|