@arcgis/core 5.2.0-next.121 → 5.2.0-next.122
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/Ground.js +1 -1
- package/arcgisGlobal.d.ts +2 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0148cb611bf7c8c5fe8a.js +1 -0
- package/assets/esri/core/workers/chunks/{deb5b1d772ca407654d4.js → 0acc754907395e83bbc6.js} +1 -1
- package/assets/esri/core/workers/chunks/{bcb06a0643b4c83535ee.js → 1302bf9718747cd9fdd9.js} +1 -1
- package/assets/esri/core/workers/chunks/{956432c9d45940983bc2.js → 1b42d163ef22e3565bb7.js} +1 -1
- package/assets/esri/core/workers/chunks/1b551ef3d84d9c1e93f9.js +1 -0
- package/assets/esri/core/workers/chunks/{4adad3312caa24af98ac.js → 1c38ce72160d5a4e4b3d.js} +1 -1
- package/assets/esri/core/workers/chunks/1c3b087fbf2d102376fc.js +1 -0
- package/assets/esri/core/workers/chunks/{9b3813e39992b1b99941.js → 1e46703cb566c25458ad.js} +1 -1
- package/assets/esri/core/workers/chunks/{015cb790262a59857c5f.js → 1f135269aea3931e11b2.js} +1 -1
- package/assets/esri/core/workers/chunks/23279303cd7698314c56.js +1 -0
- package/assets/esri/core/workers/chunks/{4bf2cc4d092601ff2b86.js → 24673aac70d6c949b6fa.js} +1 -1
- package/assets/esri/core/workers/chunks/24cf91aeab53a897e951.js +1 -0
- package/assets/esri/core/workers/chunks/26bc509a031788bfa678.js +1 -0
- package/assets/esri/core/workers/chunks/2ae6deade655fdbc28de.js +1 -0
- package/assets/esri/core/workers/chunks/{37cf4ca2083cd3b6002e.js → 2c7bb5c9751524687002.js} +1 -1
- package/assets/esri/core/workers/chunks/2c8957f9c7610805208c.js +1 -0
- package/assets/esri/core/workers/chunks/{a3c1a5a5c5cbf27b376d.js → 2d592c935571de80a2e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{a917a1df8270860dc514.js → 2f52ad525744b8793d49.js} +1 -1
- package/assets/esri/core/workers/chunks/{6efc5873747b9cd44fb9.js → 323451ef52d0c2805f1d.js} +1 -1
- package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +1 -0
- package/assets/esri/core/workers/chunks/38890ac5917942374ab8.js +1 -0
- package/assets/esri/core/workers/chunks/3e33d953e41b281a120b.js +1 -0
- package/assets/esri/core/workers/chunks/3e52351e06d85bf9bedd.js +1 -0
- package/assets/esri/core/workers/chunks/{fbc5f275c4e5e6bfffaa.js → 462fd57af8ed7921d6ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{1846296be959e28c42bb.js → 475906b079f4f1ddacf2.js} +1 -1
- package/assets/esri/core/workers/chunks/{ea49721fdd2172d1c799.js → 48a2f68e06a2e90b77d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6ca73c1384f07b30b74.js → 4bb8432d99a39733368f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c44cbe04efddbbbaec13.js → 4f58e0322707f63f5bf2.js} +1 -1
- package/assets/esri/core/workers/chunks/{0e9f54d7f158195bd203.js → 59cd139712d919e6a738.js} +1 -1
- package/assets/esri/core/workers/chunks/59d5247ac4075b024244.js +1 -0
- package/assets/esri/core/workers/chunks/5b9f3c4f65412c66316f.js +1 -0
- package/assets/esri/core/workers/chunks/{be3421ffb5b391bca02e.js → 5d35e0c2665f5e625ee9.js} +1 -1
- package/assets/esri/core/workers/chunks/5e70bfb9d6235a87b87a.js +1 -0
- package/assets/esri/core/workers/chunks/6006bd8a5ed945fa2776.js +1 -0
- package/assets/esri/core/workers/chunks/618927cfcb93dd1d92fd.js +1 -0
- package/assets/esri/core/workers/chunks/6709d24867d275b33d24.js +1 -0
- package/assets/esri/core/workers/chunks/68e24fa3f564c2a5c9fd.js +1 -0
- package/assets/esri/core/workers/chunks/{fd5e61cb6f936eadcfe3.js → 724ea2e2843e6dac0a90.js} +1 -1
- package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +1 -0
- package/assets/esri/core/workers/chunks/{e86f83a6514a35255f64.js → 781fa83e8063b8f685dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{a005efcde3ca9def4e6b.js → 78c1b75b1a8937eaa3cd.js} +1 -1
- package/assets/esri/core/workers/chunks/793b072519ded0dc6f34.js +1 -0
- package/assets/esri/core/workers/chunks/{1086f190f94c715bbfe4.js → 7994fce5f36963aadc51.js} +1 -1
- package/assets/esri/core/workers/chunks/7adee504107cb9ad8563.js +1 -0
- package/assets/esri/core/workers/chunks/7efc45858ebd3fd3302e.js +1 -0
- package/assets/esri/core/workers/chunks/7ff536284942c5284a16.js +1 -0
- package/assets/esri/core/workers/chunks/813dd84933b407c8fe86.js +1 -0
- package/assets/esri/core/workers/chunks/8daeac785af725c3ebdf.js +1 -0
- package/assets/esri/core/workers/chunks/{3ab25279aaa30f035038.js → 8daed13400d9e63e65ae.js} +1 -1
- package/assets/esri/core/workers/chunks/9020bd7a0e488d55ef14.js +1 -0
- package/assets/esri/core/workers/chunks/{cf7c06702babd6fa88b4.js → 9af36ee6a0df224859bc.js} +1 -1
- package/assets/esri/core/workers/chunks/{452d069ba7ad6759b558.js → 9c46c7f00d42f5c02b26.js} +1 -1
- package/assets/esri/core/workers/chunks/a3ab53b534e2872131be.js +1 -0
- package/assets/esri/core/workers/chunks/{fa3f824c874f29d24953.js → aa6b2cc8f6f5627891c1.js} +1 -1
- package/assets/esri/core/workers/chunks/ac7af417ebf7721d7400.js +1 -0
- package/assets/esri/core/workers/chunks/aed479c14d93955f4798.js +1 -0
- package/assets/esri/core/workers/chunks/{60c61f34733063730386.js → b013b70e40dfb6ce013e.js} +1 -1
- package/assets/esri/core/workers/chunks/b22de8bf4a4a739bc36d.js +1 -0
- package/assets/esri/core/workers/chunks/b39cd78d2d97bef9909e.js +1 -0
- package/assets/esri/core/workers/chunks/b5f50955c1eee55b67d1.js +1 -0
- package/assets/esri/core/workers/chunks/{99ebc99e8d1bca105b5e.js → b688e6463a651779a016.js} +1 -1
- package/assets/esri/core/workers/chunks/bdf012e591a8476db467.js +1 -0
- package/assets/esri/core/workers/chunks/{daf7b647bd960d8bad56.js → be52c319a0a81ce1ba36.js} +1 -1
- package/assets/esri/core/workers/chunks/{89edaa1ffa566908ebca.js → ca5a4f62b09cc8579dc0.js} +1 -1
- package/assets/esri/core/workers/chunks/{fbb390c0d92d1536fce3.js → ce1ccf9ec90b786591e5.js} +1 -1
- package/assets/esri/core/workers/chunks/cf0bed7ae27021fd7b05.js +1 -0
- package/assets/esri/core/workers/chunks/cf6f671823fa6c2a9a5e.js +1 -0
- package/assets/esri/core/workers/chunks/{39c5e0f6262f69a62c66.js → d25210574168ead2f813.js} +1 -1
- package/assets/esri/core/workers/chunks/d3378c479052d566317c.js +1 -0
- package/assets/esri/core/workers/chunks/d3ef23923424ad8c5048.js +1 -0
- package/assets/esri/core/workers/chunks/{46388b86d1b10e6121bd.js → d507d7d7a7282fc38e8d.js} +1 -1
- package/assets/esri/core/workers/chunks/dc0816f064be576a2fa6.js +1 -0
- package/assets/esri/core/workers/chunks/{d9b761104ab6e4acaf91.js → dd4ecf81250cc001d040.js} +1 -1
- package/assets/esri/core/workers/chunks/e10fe4c77b8dc4492092.js +1 -0
- package/assets/esri/core/workers/chunks/e4e1db4e9e5f13167401.js +1 -0
- package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +1 -0
- package/assets/esri/core/workers/chunks/{e755075ac2e02e881fad.js → e6637f9176566382ed3e.js} +1 -1
- package/assets/esri/core/workers/chunks/e6dc68c4bd8eddb168d1.js +1 -0
- package/assets/esri/core/workers/chunks/eb780f2dafa14f776166.js +1 -0
- package/assets/esri/core/workers/chunks/{d9d5f50af047ee7af129.js → eb7f45736c852725b0bb.js} +89 -58
- package/assets/esri/core/workers/chunks/ed31ec586b754241474d.js +1 -0
- package/assets/esri/core/workers/chunks/f38d11be766043413659.js +1 -0
- package/assets/esri/libs/pdfjs/pdf.worker.mjs +63075 -0
- package/assets/esri/libs/pdfjs/wasm/jbig2.wasm +0 -0
- package/assets/esri/libs/pdfjs/wasm/openjpeg.wasm +0 -0
- package/assets/esri/libs/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/assets/esri/libs/pdfjs/wasm/quickjs-eval.wasm +0 -0
- package/assets/esri/widgets/support/SelectionToolbar/t9n/messages.en.json +1 -1
- package/chunks/CloudsComposition.glsl.js +2 -2
- package/chunks/GlobalIllumination.glsl.js +42 -13
- package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
- package/config.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/workers/registry.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/kernel.js +1 -1
- package/layers/GeospatialPDFLayer.d.ts +40 -0
- package/layers/GeospatialPDFLayer.js +2 -0
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFFrame.js +2 -0
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +5 -0
- package/layers/geospatialPDF/GeospatialPDFParserUtils.js +2 -0
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +2 -0
- package/layers/geospatialPDF/LGIDictMapFrame.js +2 -0
- package/layers/geospatialPDF/Projection.js +2 -0
- package/layers/geospatialPDF/ViewportMeasureFrame.js +2 -0
- package/layers/geospatialPDF/renderExtentUtils.js +2 -0
- package/layers/geospatialPDF/sharedUtils.js +2 -0
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/raster/datasets/GeospatialPDFRaster.js +2 -0
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/layersLoader.js +1 -1
- package/layers/types.d.ts +1 -1
- package/package.json +4 -4
- package/portal/PortalItem.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/input/handlers/KeyPan.js +1 -1
- package/views/2d/input/handlers/KeyRotate.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/GeospatialPDFLayerView2D.js +2 -0
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/types.d.ts +2 -0
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/GeospatialPDFLayerView3D.js +2 -0
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/LayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/Intersector.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/support/GroundAndIMSurface.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/types.d.ts +2 -0
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +8 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +6 -6
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/SceneView.d.ts +31 -0
- package/views/SceneView.js +1 -1
- package/views/View.d.ts +35 -0
- package/views/View.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileQuerySourceUtils.js +1 -1
- package/views/interactive/options/ViewOptions.d.ts +98 -0
- package/views/interactive/options/ViewOptions.js +2 -0
- package/views/interactive/support/Units.d.ts +10 -2
- package/views/interactive/support/Units.js +1 -1
- package/views/layers/FeatureLikeLayerView.d.ts +27 -5
- package/views/layers/GraphicsLayerView.d.ts +25 -2
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/selection/types.d.ts +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/types.d.ts +9 -3
- package/widgets/ElevationProfile/ElevationProfileLineGround.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +8 -2
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar/VisibleElements.d.ts +8 -1
- package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
- package/widgets/support/SelectionToolbar.d.ts +7 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +0 -1
- package/assets/esri/core/workers/chunks/0b727d7bf3e36e146725.js +0 -1
- package/assets/esri/core/workers/chunks/0bd067a5c0bac96caeb5.js +0 -1
- package/assets/esri/core/workers/chunks/0ff13f7a18b0123d253e.js +0 -1
- package/assets/esri/core/workers/chunks/114bc14c49176f64a2c5.js +0 -1
- package/assets/esri/core/workers/chunks/173417fe995e9bfc49d8.js +0 -1
- package/assets/esri/core/workers/chunks/2cf571d968118b6bdde0.js +0 -1
- package/assets/esri/core/workers/chunks/43436c7ccc6baefc885d.js +0 -1
- package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +0 -1
- package/assets/esri/core/workers/chunks/48d3da636be15581fd7d.js +0 -1
- package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +0 -1
- package/assets/esri/core/workers/chunks/50ae209237f104735a30.js +0 -1
- package/assets/esri/core/workers/chunks/54f9062526c2002b7fd7.js +0 -1
- package/assets/esri/core/workers/chunks/56b7ac280bf0be938c14.js +0 -1
- package/assets/esri/core/workers/chunks/61bcbafd676804ce3e1d.js +0 -1
- package/assets/esri/core/workers/chunks/63f7141c71f29dbe8270.js +0 -1
- package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +0 -1
- package/assets/esri/core/workers/chunks/75410a4de76e67ed5da4.js +0 -1
- package/assets/esri/core/workers/chunks/85780f4fa4b5509f864e.js +0 -1
- package/assets/esri/core/workers/chunks/862754d2d659528fe884.js +0 -1
- package/assets/esri/core/workers/chunks/8675ab3c4dec2f13b9c6.js +0 -1
- package/assets/esri/core/workers/chunks/8a103b6e9534516421e2.js +0 -1
- package/assets/esri/core/workers/chunks/917dec9c004218c58950.js +0 -1
- package/assets/esri/core/workers/chunks/91a51d959ee5c6123c46.js +0 -1
- package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +0 -1
- package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +0 -1
- package/assets/esri/core/workers/chunks/a42505b978d54d36d3b6.js +0 -1
- package/assets/esri/core/workers/chunks/a70c59129ea808857d07.js +0 -1
- package/assets/esri/core/workers/chunks/a86a4e550a92f770d6d5.js +0 -1
- package/assets/esri/core/workers/chunks/b45ebb1b64ee7314375e.js +0 -1
- package/assets/esri/core/workers/chunks/b5b30c8447a0f967fa79.js +0 -1
- package/assets/esri/core/workers/chunks/baa8bce361a2677533ec.js +0 -1
- package/assets/esri/core/workers/chunks/c70a32ac0fa49f4493ca.js +0 -1
- package/assets/esri/core/workers/chunks/cf1106eda10f3cccb1bd.js +0 -1
- package/assets/esri/core/workers/chunks/d1b5be1aeab16d36d4b1.js +0 -1
- package/assets/esri/core/workers/chunks/d38252956c3d9e2168f7.js +0 -1
- package/assets/esri/core/workers/chunks/d6130cd8a20d24dd9d3c.js +0 -1
- package/assets/esri/core/workers/chunks/da161f8cbe1cfc5fcf7c.js +0 -1
- package/assets/esri/core/workers/chunks/da5b3421a984cb94fd58.js +0 -1
- package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +0 -1
- package/assets/esri/core/workers/chunks/e88eee4c2fc4229c2a8b.js +0 -1
- package/assets/esri/core/workers/chunks/f75e57d3e02f9828b049.js +0 -1
- package/assets/esri/core/workers/chunks/f774e5b94710ccee1af0.js +0 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"widgetLabel":"Selection toolbar","addToSelection":"Add to selection","clearSelection":"Clear selection","pan":"Pan","removeFromSelection":"Remove from selection","replaceSelection":"Replace selection","selectFeatures":"Select features","selectByLasso":"Select by lasso","selectByPoint":"Select by point","selectByRectangle":"Select by rectangle"}
|
|
1
|
+
{"widgetLabel":"Selection toolbar","addToSelection":"Add to selection","clearSelection":"Clear selection","pan":"Pan","removeFromSelection":"Remove from selection","replaceSelection":"Replace selection","selectFeatures":"Select features","selectByLasso":"Select by lasso","selectByPolygon":"Select by polygon","selectByPoint":"Select by point","selectByRectangle":"Select by rectangle"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{Gamma as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{PiUtils as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{CloudsParallaxShading as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import{ColorConversion as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{Float3BindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ScreenSpacePassAtmosphere as d}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";function c(){const
|
|
3
|
-
fragColor = vec4(cloudsOpacity * cloudsColor.rgb, cloudsColor.a);`),
|
|
2
|
+
import{Gamma as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{PiUtils as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{CloudsParallaxShading as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import{ColorConversion as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{Float3BindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatBindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ScreenSpacePassAtmosphere as d}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";function c(c){const t=new a,{fragment:g}=t;return t.include(d,{needUVs:!1,needEyeDirection:!1}),g.include(i),g.include(r),g.include(e),t.include(o,c),g.uniforms.add(new s("cameraPosition",e=>e.camera.eye),new l("cloudsOpacity",e=>e.clouds.opacity)).main.add(n`vec4 cloudsColor = renderClouds(normalize(worldRay), cameraPosition);
|
|
3
|
+
fragColor = vec4(cloudsOpacity * cloudsColor.rgb, cloudsColor.a);`),t}const t=Object.freeze(Object.defineProperty({__proto__:null,build:c},Symbol.toStringTag,{value:"Module"}));export{t as C,c as b};
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepthLastFrame as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import{Gamma as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{mainLightDirection as
|
|
2
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepthLastFrame as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import{Gamma as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{mainLightDirection as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{ScreenSpaceRayMarching as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import{CameraSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{viewMatrix as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{FloatBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s,If as h}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as p}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{floatBlendReductionFactor as g}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{ToneMapping as f}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ColorAttachment1 as y,SizedPixelFormat as x}from"../views/webgl/enums.js";import{NoParameters as v}from"../views/webgl/NoParameters.js";import{ShaderBuilder as M}from"../views/webgl/ShaderBuilder.js";const b=.01,w=.008,B=.0028,S=.45,j=.5,W=.02,F=.1,D=.008,I=.3,R=.008,C=150,z=.095,O=.008,T=60,G=2,P=.0039,E=.25,L=.012,Q=6,H=2.5,V=.15,k=25,U=.15,N=.5,q=1,_=1,$=16;class A extends v{constructor(){super(...arguments),this.projScale=1,this.scaleGlobalIllumination=1,this.accumulatedFrames=0,this.temporalSampleFrame=0,this.rayMarchMinReach=U,this.rayMarchMaxReach=N,this.rayMarchWorldReach=k,this.rayMarchMinReachEmissionWeight=q,this.rayMarchMaxReachEmissionWeight=_,this.rayMarchMaxSteps=$,this.colorBleedWeight=V,this.highQualityIdleColorBlendStart=I}}function K(v){const I=new M,V=I.fragment;I.include(e),I.include(r),V.include(a),V.include(t),V.include(p),V.include(f),I.include(i,v),V.uniforms.add(o,l,new u("normalMap",e=>e.normalTexture),new u("depthMap",e=>e.depthTexture),new m("lastFrameColorTexture",e=>e.reprojection.lastFrameColor?.getTexture()),new m("lastFrameDepthTexture",e=>e.reprojection.lastFrameDepth?.attachment),new m("lastFrameGlobalIlluminationTexture",e=>e.globalIllumination?.getTexture()),new m("lastFrameGlobalIlluminationWeightTexture",e=>e.globalIllumination?.getTexture(y)),new d("reprojectionProjectionMatrix",e=>e.reprojection.lastFrameCamera.projectionMatrix),new d("reprojectionViewMatrix",e=>e.reprojection.viewMatrix),new c("accumulatedFrames",e=>e.accumulatedFrames),new c("temporalSampleFrame",e=>e.temporalSampleFrame),new c("scaleGlobalIllumination",e=>e.scaleGlobalIllumination)),V.uniforms.add(new c("rayMarchMinReach",e=>e.rayMarchMinReach),new c("rayMarchMaxReach",e=>e.rayMarchMaxReach),new c("rayMarchWorldReach",e=>e.rayMarchWorldReach),new c("rayMarchMinReachEmissionWeight",e=>e.rayMarchMinReachEmissionWeight),new c("rayMarchMaxReachEmissionWeight",e=>e.rayMarchMaxReachEmissionWeight),new c("rayMarchMaxSteps",e=>e.rayMarchMaxSteps),new c("colorBleedWeight",e=>e.colorBleedWeight),new c("highQualityIdleColorBlendStart",e=>e.highQualityIdleColorBlendStart));const{hasEmission:k,hasColor:U}=v;return k&&(V.uniforms.add(new n("inputScale",e=>e.reprojection.lastFrameEmission?.getTexture()?.descriptor.internalFormat===x.RGBA8?g:1),new m("lastFrameEmissionTexture",e=>e.reprojection.lastFrameEmission?.getTexture())),V.code.add(s`bool hasHitReprojectionMismatch(vec3 hit, vec2 hitReprojectedCoordinate, float colorBlendWeight) {
|
|
3
|
+
if (colorBlendWeight != 1.0) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
if (
|
|
7
|
+
any(lessThan(hitReprojectedCoordinate, vec2(0.0))) ||
|
|
8
|
+
any(greaterThanEqual(hitReprojectedCoordinate, vec2(1.0)))
|
|
9
|
+
) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
vec3 hitViewPos = reconstructPosition(hit.xy * vec2(textureSize(normalMap, 0)), -hit.z);
|
|
13
|
+
vec3 reprojectedHitViewPos = (reprojectionViewMatrix * vec4(hitViewPos, 1.0)).xyz;
|
|
14
|
+
float expectedLastFrameDepth = -reprojectedHitViewPos.z;
|
|
15
|
+
float storedLastFrameDepth = -linearDepthFromTextureLastFrame(
|
|
16
|
+
lastFrameDepthTexture,
|
|
17
|
+
hitReprojectedCoordinate
|
|
18
|
+
);
|
|
19
|
+
float relativeDepthMismatch = abs(storedLastFrameDepth - expectedLastFrameDepth) /
|
|
20
|
+
max(max(storedLastFrameDepth, expectedLastFrameDepth), 0.00001);
|
|
21
|
+
return relativeDepthMismatch > reprojectionMismatchThreshold;
|
|
22
|
+
}`)),V.constants.add("highQualityIdleColorBlendEnd","float",R),V.constants.add("highQualityIdleColorBlendFrames","float",C),V.constants.add("highQualityIdleOcclusionBlendEnd","float",O),V.constants.add("highQualityIdleOcclusionBlendExponent","float",G),V.constants.add("highQualityIdleOcclusionBlendFrames","float",T),V.constants.add("highQualityIdleOcclusionBlendStart","float",z),V.constants.add("fullColorBleedBlendWeight","float",L),V.constants.add("accumulationDitherScale","float",P),V.constants.add("lowQualityColorBlendWeight","float",B),V.constants.add("lowQualityColorDitherScale","float",E),V.constants.add("lowQualityOcclusionBlendWeight","float",w),V.constants.add("reprojectionMismatchThreshold","float",b),V.constants.add("reprojectionMismatchColorScale","float",S),V.constants.add("stableHistoryColorBlendWeight","float",D),V.constants.add("strongHistoryOcclusionThreshold","float",W),V.constants.add("weakHistoryOcclusionBlendWeight","float",F),V.constants.add("weakHistoryOcclusionThreshold","float",j),V.constants.add("storedColorBlendWeightScale","float",Q),V.constants.add("emissionBoostFactor","float",H),V.code.add(s`float computeIdleColorBlendWeight(float accumulatedFrames) {
|
|
3
23
|
float idleColorBlendProgress = clamp(accumulatedFrames / highQualityIdleColorBlendFrames, 0.0, 1.0);
|
|
4
24
|
return mix(highQualityIdleColorBlendStart, highQualityIdleColorBlendEnd, pow(idleColorBlendProgress, 1./5.)
|
|
5
25
|
);
|
|
@@ -49,7 +69,7 @@ blueNoiseDitherValue(pixel, frame, vec2(0.25881904, 0.9659258), 0.37),
|
|
|
49
69
|
blueNoiseDitherValue(pixel, frame, vec2(1.0, 0.0), 0.61)
|
|
50
70
|
);
|
|
51
71
|
return value * 2.0 - 1.0;
|
|
52
|
-
}`),I.outputs.add("fragGlobalIllumination","vec4",0),I.outputs.add("fragWeight","vec2",1),
|
|
72
|
+
}`),I.outputs.add("fragGlobalIllumination","vec4",0),I.outputs.add("fragWeight","vec2",1),V.main.add(s`
|
|
53
73
|
float depth = depthFromTexture(depthMap, uv);
|
|
54
74
|
|
|
55
75
|
// Early out if depth is out of range, such as in the sky
|
|
@@ -97,18 +117,15 @@ return value * 2.0 - 1.0;
|
|
|
97
117
|
bool hasReprojectionMismatch = reprojectionDepthMismatch > reprojectionMismatchThreshold;
|
|
98
118
|
bool isScaledGlobalIllumination = scaleGlobalIllumination < 1.0;
|
|
99
119
|
bool isLowQualityEdgePixel = isScaledGlobalIllumination && isEdgeDepth(currentPixelDepth, uv);
|
|
100
|
-
bool resetColorHistory = false;
|
|
101
120
|
|
|
102
121
|
// Heuristic to determine blending weights and number of steps for occlusion and color
|
|
103
122
|
if (hasReprojectionMismatch) {
|
|
104
123
|
if (isLowQualityEdgePixel) {
|
|
105
124
|
steps = 1;
|
|
106
125
|
occlusionBlendWeight = lowQualityOcclusionBlendWeight;
|
|
107
|
-
resetColorHistory = true;
|
|
108
126
|
} else {
|
|
109
127
|
steps = 6;
|
|
110
128
|
occlusionBlendWeight = 1.0;
|
|
111
|
-
resetColorHistory = true;
|
|
112
129
|
}
|
|
113
130
|
} else {
|
|
114
131
|
steps = 1;
|
|
@@ -159,14 +176,17 @@ return value * 2.0 - 1.0;
|
|
|
159
176
|
// 0.0 alpha excludes the surface as a receiver (e.g. water), but a valid ray hit still occludes as opaque
|
|
160
177
|
hitOpacity = storedHitOpacity == 0.0 ? 1.0 : storedHitOpacity;
|
|
161
178
|
|
|
162
|
-
${h(
|
|
179
|
+
${h(U,s`
|
|
163
180
|
// Emission and color bleed - Reproject the current receiver and sampled hit to estimate bounced color
|
|
164
181
|
vec3 receiverColor = texture(lastFrameColorTexture, reprojectedCoordinate.xy).rgb;
|
|
165
182
|
|
|
166
183
|
vec2 hitReprojectedCoordinate = reprojectionCoordinate(hit);
|
|
167
184
|
vec3 sourceColor = texture(lastFrameColorTexture, hitReprojectedCoordinate).rgb;
|
|
168
185
|
vec3 sourceColorLinear = linearizeGamma(sourceColor);
|
|
169
|
-
|
|
186
|
+
${h(k,s`
|
|
187
|
+
bool rejectReprojectedHitEmission = hasHitReprojectionMismatch(hit, hitReprojectedCoordinate, colorBlendWeight);
|
|
188
|
+
`)}
|
|
189
|
+
vec3 sourceEmission = ${h(k,"rejectReprojectedHitEmission\n ? vec3(0.0)\n : texture(lastFrameEmissionTexture, hitReprojectedCoordinate).xyz * inputScale","vec3(0.0)")};
|
|
170
190
|
|
|
171
191
|
float emissionWeight = mix(
|
|
172
192
|
rayMarchMinReachEmissionWeight,
|
|
@@ -174,7 +194,7 @@ return value * 2.0 - 1.0;
|
|
|
174
194
|
(rayMarchScreenReach - rayMarchMinReach) / max(rayMarchMaxReach - rayMarchMinReach, 0.00001)
|
|
175
195
|
);
|
|
176
196
|
fragGlobalIllumination.rgb += (
|
|
177
|
-
hitOpacity * (sourceColorLinear * colorBleedWeight) + sourceEmission * emissionWeight
|
|
197
|
+
hitOpacity * (sourceColorLinear * colorBleedWeight) + emissionBoostFactor * sourceEmission * emissionWeight
|
|
178
198
|
) * stepSize;
|
|
179
199
|
`)}
|
|
180
200
|
}
|
|
@@ -197,20 +217,29 @@ return value * 2.0 - 1.0;
|
|
|
197
217
|
? receiverOpacity * randomDirectionSample.b * accumulationDitherScale
|
|
198
218
|
: 0.0;
|
|
199
219
|
|
|
200
|
-
${h(
|
|
220
|
+
${h(U,s`
|
|
201
221
|
// Accumulate color
|
|
202
222
|
vec3 lastFrameColor = lastFrameGlobalIllumination.rgb;
|
|
203
223
|
float colorDitherScale = isScaledGlobalIllumination ? lowQualityColorDitherScale : 1.0;
|
|
204
|
-
fragGlobalIllumination.rgb =
|
|
205
|
-
|
|
206
|
-
|
|
224
|
+
fragGlobalIllumination.rgb = mix(
|
|
225
|
+
lastFrameColor + accumulationDither * colorDitherScale,
|
|
226
|
+
fragGlobalIllumination.rgb,
|
|
227
|
+
colorBlendWeight
|
|
228
|
+
);
|
|
229
|
+
// Heuristic: attenuate emission to reduce sparkling artifacts when reprojection history cannot be reused.
|
|
230
|
+
if (hasReprojectionMismatch) {
|
|
231
|
+
fragGlobalIllumination.rgb *= reprojectionMismatchColorScale;
|
|
232
|
+
}
|
|
207
233
|
`,s`
|
|
208
234
|
fragGlobalIllumination.rgb = vec3(0.0);
|
|
209
235
|
`)}
|
|
236
|
+
|
|
237
|
+
// Tone-map accumulated color before quantizing it for storage.
|
|
238
|
+
fragGlobalIllumination.rgb = tonemapKhronosNeutral(fragGlobalIllumination.rgb);
|
|
210
239
|
fragGlobalIllumination.rgb = quantizeGlobalIlluminationColor(fragGlobalIllumination.rgb);
|
|
211
240
|
|
|
212
241
|
// Accumulate occlusion
|
|
213
242
|
fragGlobalIllumination.a = mix(lastFrameGlobalIllumination.a + accumulationDither, fragGlobalIllumination.a, occlusionBlendWeight);
|
|
214
243
|
|
|
215
244
|
fragWeight = vec2(occlusionBlendWeight, colorBlendWeight * storedColorBlendWeightScale);
|
|
216
|
-
`),I}const
|
|
245
|
+
`),I}const J=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:A,build:K,defaultColorBleedWeight:V,defaultRayMarchMaxReach:N,defaultRayMarchMaxReachEmissionWeight:_,defaultRayMarchMaxSteps:$,defaultRayMarchMinReach:U,defaultRayMarchMinReachEmissionWeight:q,defaultRayMarchWorldReach:k},Symbol.toStringTag,{value:"Module"}));export{A as G,J as a,$ as b,K as c,N as d,V as e,_ as f,U as g,q as h,k as i};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as l}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{BooleanBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js";import{Float2DrawUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as c}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{ditherNoise as p}from"../views/3d/webgl-engine/shaders/ditherNoise.glsl.js";import{FloatBlendScaleConfiguration as d}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{NoParameters as h}from"../views/webgl/NoParameters.js";import{ShaderBuilder as f}from"../views/webgl/ShaderBuilder.js";const g=4,b=.2,S=2.5;class w extends h{constructor(){super(...arguments),this.blurSize=e()}}function v(){const e=new f,d=e.fragment;e.include(l),e.include(t),e.include(i);const h=(g+3)/2,w=1/(2*h*h);d.include(o),d.include(p,W),d.include(c);const v=5e4;d.uniforms.add(new a("hasEmission",e=>null!=e.reprojection.lastFrameEmission),new m("depthMap",e=>e.depthTexture),new m("normalMap",e=>e.normalTexture),new u("globalIlluminationTexture",e=>e.texture),new u("globalIlluminationWeightTexture",e=>e.weightTexture),new n("blurSize",e=>e.blurSize),new s("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new s("projScale",(e,l)=>{const o=l.camera.distance;return o>v?Math.max(0,e.projScale-(o-v)):e.projScale}));const I=.1,x=
|
|
2
|
+
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as l}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{BooleanBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js";import{Float2DrawUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as c}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{ditherNoise as p}from"../views/3d/webgl-engine/shaders/ditherNoise.glsl.js";import{FloatBlendScaleConfiguration as d}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{NoParameters as h}from"../views/webgl/NoParameters.js";import{ShaderBuilder as f}from"../views/webgl/ShaderBuilder.js";const g=4,b=.2,S=2.5;class w extends h{constructor(){super(...arguments),this.blurSize=e()}}function v(){const e=new f,d=e.fragment;e.include(l),e.include(t),e.include(i);const h=(g+3)/2,w=1/(2*h*h);d.include(o),d.include(p,W),d.include(c);const v=5e4;d.uniforms.add(new a("hasEmission",e=>null!=e.reprojection.lastFrameEmission),new m("depthMap",e=>e.depthTexture),new m("normalMap",e=>e.normalTexture),new u("globalIlluminationTexture",e=>e.texture),new u("globalIlluminationWeightTexture",e=>e.weightTexture),new n("blurSize",e=>e.blurSize),new s("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new s("projScale",(e,l)=>{const o=l.camera.distance;return o>v?Math.max(0,e.projScale-(o-v)):e.projScale}));const I=.1,x=120,O=.03,j=.08,D=1.5,G=1/32768,B=.85;return d.code.add(r`
|
|
3
3
|
void accumulateBlurSample(
|
|
4
4
|
vec2 sampleUv,
|
|
5
5
|
float sampleOffset,
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.122";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/arrayUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{toConst as n}from"./compilerUtils.js";import t from"./RandomLCG.js";const e=1.5,r=1/e,o=.5;function l(n,t){if(!t)return n;for(const e of t)n.push(e);return n}function u(n){return n}function f(n,t=u){if(!n||0===n.length)return;let e=n[0],r=t(e);for(let o=1;o<n.length;++o){const l=n[o],u=Number(t(l));u>r&&(r=u,e=l)}return e}function c(n,t=u){return f(n,n=>-t(n))}function i(n,t){if(t){const e=[];for(const r of n)e.some(n=>t(n,r))||e.push(r);return e}return Array.from(new Set(n))}function s(n,t,e,r,o,l,u){if(null==n&&null==r)return!0;t=Math.max(0,t),o=Math.max(0,o),e=Math.max(0,e<0?(n?.length??0)+e:e),l=Math.max(0,l<0?(r?.length??0)+l:l);const f=e-t;if(null==n||null==r||f!==l-o)return!1;if(u){for(let c=0;c<f;c++)if(!u(n[t+c],r[o+c]))return!1}else for(let c=0;c<f;c++)if(n[t+c]!==r[o+c])return!1;return!0}function h(n,t,e){return s(n,0,n?.length??0,t,0,t?.length??0,e)}function a(){return(n,t)=>{if(null==n&&null==t)return!0;if(null==n||null==t||n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}}const g=a();function m(n,t){let e=n.length!==t.length;e&&(n.length=t.length);for(let r=0;r<t.length;++r)n[r]!==t[r]&&(n[r]=t[r],e=!0);return e}function d(n,t,e){let r,o;
|
|
2
|
+
import{toConst as n}from"./compilerUtils.js";import t from"./RandomLCG.js";const e=1.5,r=1/e,o=.5;function l(n,t){if(!t)return n;for(const e of t)n.push(e);return n}function u(n){return n}function f(n,t=u){if(!n||0===n.length)return;let e=n[0],r=t(e);for(let o=1;o<n.length;++o){const l=n[o],u=Number(t(l));u>r&&(r=u,e=l)}return e}function c(n,t=u){return f(n,n=>-t(n))}function i(n,t){if(t){const e=[];for(const r of n)e.some(n=>t(n,r))||e.push(r);return e}return Array.from(new Set(n))}function s(n,t,e,r,o,l,u){if(null==n&&null==r)return!0;t=Math.max(0,t),o=Math.max(0,o),e=Math.max(0,e<0?(n?.length??0)+e:e),l=Math.max(0,l<0?(r?.length??0)+l:l);const f=e-t;if(null==n||null==r||f!==l-o)return!1;if(u){for(let c=0;c<f;c++)if(!u(n[t+c],r[o+c]))return!1}else for(let c=0;c<f;c++)if(n[t+c]!==r[o+c])return!1;return!0}function h(n,t,e){return s(n,0,n?.length??0,t,0,t?.length??0,e)}function a(){return(n,t)=>{if(null==n&&null==t)return!0;if(null==n||null==t||n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}}const g=a();function m(n,t){let e=n.length!==t.length;e&&(n.length=t.length);for(let r=0;r<t.length;++r)n[r]!==t[r]&&(n[r]=t[r],e=!0);return e}function d(n,t,e){let r,o;if(e)r=t.filter(t=>!n.some(n=>e(n,t))),o=n.filter(n=>!t.some(t=>e(t,n)));else{const e=new Set(n),l=new Set(t);r=t.filter(n=>!e.has(n)),o=n.filter(n=>!l.has(n))}return{added:r,removed:o}}function p(n,t,e){return n&&t?e?n.filter(n=>t.findIndex(t=>e(n,t))>-1):n.filter(n=>t.includes(n)):[]}function M(n){return n&&"number"==typeof n.length}function x(n,t){const e=n.length;if(0===e)return[];const r=[];for(let o=0;o<e;o+=t)r.push(n.slice(o,o+t));return r}function w(n,t){void 0===t&&(t=n,n=0);const e=new Array(t-n);for(let r=n;r<t;r++)e[r-n]=r;return e}function N(n,t,e){const r=n.length;let o=0,l=r-1;for(;o<l;){const e=o+Math.floor((l-o)/2);t>n[e]?o=e+1:l=e}const u=n[o];return e?t>=n[r-1]?-1:u===t?o:o-1:u===t?o:-1}function y(n,t=1){const e=t/n.reduce((n,t)=>n+t,0);for(let r=0;r<n.length;++r)n[r]*=e}function S(n,t,e,r){n.length>e&&(n.length=e);const o=n.length;let l=0,u=o;if(o===e){const e=r(n[o-1],t);if(e<=0||Number.isNaN(e))return}for(;l<u;){const e=l+u>>>1,o=r(n[e],t);o<=0||Number.isNaN(o)?l=e+1:u=e}o===e&&n.pop(),n.splice(l,0,t)}class b{constructor(){this.last=0}}const A=new b;function j(n,t,e,r){r=r||A;const o=Math.max(0,r.last-10);for(let u=o;u<e;++u)if(n[u]===t)return r.last=u,u;const l=Math.min(o,e);for(let u=0;u<l;++u)if(n[u]===t)return r.last=u,u;return-1}function v(t,e,r,o){const l=r??t.length,u=j(t,n(e),l,o);if(-1!==u)return t[u]=t[l-1],null==r&&t.pop(),e}const z=new Set;function C(n,t,e=n.length,r=t.length,o,l){if(0===r||0===e)return e;z.clear();for(let f=0;f<r;++f)z.add(t[f]);o=o||A;const u=Math.max(0,o.last-10);for(let f=u;f<e;++f)if(z.has(n[f])&&(l?.push(n[f]),z.delete(n[f]),n[f]=n[e-1],--e,--f,0===z.size||0===e))return z.clear(),e;for(let f=0;f<u;++f)if(z.has(n[f])&&(l?.push(n[f]),z.delete(n[f]),n[f]=n[e-1],--e,--f,0===z.size||0===e))return z.clear(),e;return z.clear(),e}function F(n,t){let e=0;for(let r=0;r<n.length;++r){const o=n[r];t(o,r)&&(n[e]=o,e++)}return n.length=e,n}function G(n,t,e){const r=n.length;if(t>=r)return n.slice();const o=I(e),l=new Set,u=[];for(;u.length<t;){const t=Math.floor(o()*r);l.has(t)||(l.add(t),u.push(n[t]))}return u}function I(n){return n?(L.seed=n,()=>L.getFloat()):Math.random}const L=new t;function O(n,t){if(!n)return n;const e=I(t);for(let r=n.length-1;r>0;r--){const t=Math.floor(e()*(r+1)),o=n[r];n[r]=n[t],n[t]=o}return n}function R(n,t){const e=n.indexOf(t);return-1!==e?(n.splice(e,1),t):null}function U(n,t){return null!=n}function k(n,...t){for(const e of t)null!=e&&n.push(e);return n.length}function q(n,t){return n.reduce((n,e)=>t(e)?n+1:n,0)}function B(n){return Array.isArray(n)}function D(n,t,e){for(t<n.length&&(n.length=t);n.length<t;)n.push(e())}function E(n,t){return n-t}const H=[];export{b as PositionHint,l as addMany,N as binaryIndexOf,q as countIf,d as difference,H as emptyArray,h as equals,F as filterInPlace,I as getRandomNumberGenerator,j as indexOf,S as insertSortedStableTopN,p as intersect,M as isArrayLike,B as isArrayWithReadonly,U as isSome,a as makeArrayEquals,f as max,c as min,y as normalize,g as numbersEquals,E as numericSort,G as pickRandom,k as pushIfSome,w as range,e as reallocGrowthFactor,r as reallocShrinkFactor,o as reallocShrinkThreshold,R as remove,v as removeUnordered,C as removeUnorderedMany,D as resizeFilled,O as shuffle,s as sliceEquals,x as splitIntoChunks,i as unique,m as update};
|
package/core/workers/registry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const r={CSVSourceWorker:()=>import("../../layers/graphics/sources/support/CSVSourceWorker.js"),EdgeProcessingWorker:()=>import("../../views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js"),ElevationSamplerWorker:()=>import("../../geometry/support/meshUtils/ElevationSamplerWorker.js"),FeaturePipelineWorker:()=>import("../../views/2d/layers/features/FeaturePipelineWorker.js"),FeatureServiceSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js"),FlowWorker:()=>import("../../views/3d/support/flow/FlowWorker.js"),GaussianSplatSortWorker:()=>import("../../views/3d/support/GaussianSplatSortWorker.js"),GeometryWorker:()=>import("../../views/support/GeometryWorker.js"),GeoJSONSourceWorker:()=>import("../../layers/graphics/sources/geojson/GeoJSONSourceWorker.js"),GeoJSONVectorTileSourceWorker:()=>import("../../views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js"),GlyphWorker:()=>import("../../views/2d/engine/webgl/GlyphWorker.js"),IntegratedMesh3DTilesLayerWorker:()=>import("../../views/3d/layers/IntegratedMesh3DTilesLayerWorker.js"),LercWorker:()=>import("../../layers/support/LercWorker.js"),Lyr3DWorker:()=>import("../../views/3d/layers/Lyr3DWorker.js"),MemorySourceWorker:()=>import("../../layers/graphics/sources/support/MemorySourceWorker.js"),PBFDecoderWorker:()=>import("../../views/3d/support/PBFDecoderWorker.js"),PanoramicMeshWorker:()=>import("../../widgets/PanoramicViewer/support/PanoramicMeshWorker.js"),ParquetSourceWorker:()=>import("../../layers/graphics/sources/support/ParquetSourceWorker.js"),PointCloudWorker:()=>import("../../views/3d/layers/PointCloudWorker.js"),RasterWorker:()=>import("../../layers/support/RasterWorker.js"),SceneLayerSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js"),SceneLayerWorker:()=>import("../../views/3d/layers/SceneLayerWorker.js"),TextureCompressionWorker:()=>import("../../views/support/TextureCompressionWorker.js"),WFSSourceWorker:()=>import("../../layers/graphics/sources/WFSSourceWorker.js"),WorkerTileHandler:()=>import("../../views/2d/engine/vectorTiles/WorkerTileHandler.js"),arcadeGeometryOperatorsWorker:()=>import("../../arcade/geometry/operatorsWorker.js"),statsWorker:()=>import("../../smartMapping/statistics/support/statsWorker.js"),ImageMeasurementWorker:()=>import("../../widgets/OrientedImageryViewer/ImageMeasurementWorker.js")};export{r as registry};
|
|
2
|
+
const r={CSVSourceWorker:()=>import("../../layers/graphics/sources/support/CSVSourceWorker.js"),EdgeProcessingWorker:()=>import("../../views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js"),ElevationSamplerWorker:()=>import("../../geometry/support/meshUtils/ElevationSamplerWorker.js"),FeaturePipelineWorker:()=>import("../../views/2d/layers/features/FeaturePipelineWorker.js"),FeatureServiceSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js"),FlowWorker:()=>import("../../views/3d/support/flow/FlowWorker.js"),GaussianSplatSortWorker:()=>import("../../views/3d/support/GaussianSplatSortWorker.js"),GeospatialPDFLayerWorker:()=>import("../../layers/geospatialPDF/GeospatialPDFLayerWorker.js"),GeometryWorker:()=>import("../../views/support/GeometryWorker.js"),GeoJSONSourceWorker:()=>import("../../layers/graphics/sources/geojson/GeoJSONSourceWorker.js"),GeoJSONVectorTileSourceWorker:()=>import("../../views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js"),GlyphWorker:()=>import("../../views/2d/engine/webgl/GlyphWorker.js"),IntegratedMesh3DTilesLayerWorker:()=>import("../../views/3d/layers/IntegratedMesh3DTilesLayerWorker.js"),LercWorker:()=>import("../../layers/support/LercWorker.js"),Lyr3DWorker:()=>import("../../views/3d/layers/Lyr3DWorker.js"),MemorySourceWorker:()=>import("../../layers/graphics/sources/support/MemorySourceWorker.js"),PBFDecoderWorker:()=>import("../../views/3d/support/PBFDecoderWorker.js"),PanoramicMeshWorker:()=>import("../../widgets/PanoramicViewer/support/PanoramicMeshWorker.js"),ParquetSourceWorker:()=>import("../../layers/graphics/sources/support/ParquetSourceWorker.js"),PointCloudWorker:()=>import("../../views/3d/layers/PointCloudWorker.js"),RasterWorker:()=>import("../../layers/support/RasterWorker.js"),SceneLayerSnappingSourceWorker:()=>import("../../views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js"),SceneLayerWorker:()=>import("../../views/3d/layers/SceneLayerWorker.js"),TextureCompressionWorker:()=>import("../../views/support/TextureCompressionWorker.js"),WFSSourceWorker:()=>import("../../layers/graphics/sources/WFSSourceWorker.js"),WorkerTileHandler:()=>import("../../views/2d/engine/vectorTiles/WorkerTileHandler.js"),arcadeGeometryOperatorsWorker:()=>import("../../arcade/geometry/operatorsWorker.js"),statsWorker:()=>import("../../smartMapping/statistics/support/statsWorker.js"),ImageMeasurementWorker:()=>import("../../widgets/OrientedImageryViewer/ImageMeasurementWorker.js")};export{r as registry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import n from"../Extent.js";import{getExtentForScale as e}from"./scaleUtils.js";async function t(n,e){if(n.hasZ||"2d"===e.type)return n;const t=e.map?.ground;return t?.
|
|
2
|
+
import n from"../Extent.js";import{getExtentForScale as e}from"./scaleUtils.js";async function t(n,e){if(n.hasZ||"2d"===e.type)return n;const t=e.map?.ground;return t?.allLayers.length?(await t.queryElevation(n,{cache:e.groundView?.elevationQueryCache})).geometry:n}function r(n,e,t){return i(n.center,e,t)}function i(t,r,i){const u=t.hasZ?t.z:void 0;if(r?.map){return(null!=i?e(r,i):r.extent).clone().centerAt(t).set({zmax:u,zmin:u})}const{x:o,y:a,spatialReference:c}=t;return new n({xmin:o-.25,ymin:a-.25,xmax:o+.25,ymax:a+.25,spatialReference:c,zmin:u,zmax:u})}function u(n,e,t,r){switch(n?.type){case"extent":return n;case"polygon":case"polyline":case"multipoint":return n.extent??void 0;case"point":return i(r(n),e??void 0,t??void 0);default:return}}function o([n,e,t,r],[i,u,o,a]){return n===i&&e===u&&(null==t&&null==o||t===o)&&(null==r&&null==a||r===a)}function a(n){return n?l:c}function c(n,e){return n[0]===e[0]&&n[1]===e[1]}function l(n,e){return n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]}export{o as comparePoints,c as coordinate2DEquals,l as coordinate3DEquals,i as createExtentFromPoint,a as getCoordinateEquals,u as getExtentFromGeometry,t as getPointWithElevation,r as scaleExtent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";import t from"../HeightModelInfo.js";import{parse as n}from"../../layers/support/arcgisLayerUrl.js";function i(n,i){if(!n)return null;if(!o(n))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:n});const a=n.heightUnit,r=t.deriveUnitFromSR(n,i).heightUnit;return a!==r?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${a}) must match the horizontal units of the scene (${r})`,{verticalUnit:a,horizontalUnit:r}):null}function a(n,i,a){const o=l(n),c=i,h=r(o,c,a);if(o){const i=t.deriveUnitFromSR(o,n.spatialReference).heightUnit;if(!a&&i!==o.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o,error:t})}}if(!s(n)||4===h)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o});switch(h){case 1:{const t=o?.heightUnit||"unknown",n=c?.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case 2:{const t=o?.heightModel||"unknown",n=c?.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case 3:{const t=o?.vertCRS||"unknown",n=c?.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}}return null}function r(e,t,n){if(!o(e)||!o(t))return 4;if(null==e||null==t)return 0;if(!n&&e.heightUnit!==t.heightUnit)return 1;if(e.heightModel!==t.heightModel)return 2;switch(e.heightModel){case"gravity-related-height":return 0;case"ellipsoidal":return e.vertCRS===t.vertCRS?0:3;default:return 4}}function o(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function s(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!
|
|
2
|
+
import e from"../../core/Error.js";import t from"../HeightModelInfo.js";import{parse as n}from"../../layers/support/arcgisLayerUrl.js";function i(n,i){if(!n)return null;if(!o(n))return new e("webscene:unsupported-height-model-info","The vertical coordinate system of the scene is not supported",{heightModelInfo:n});const a=n.heightUnit,r=t.deriveUnitFromSR(n,i).heightUnit;return a!==r?new e("webscene:incompatible-height-unit",`The vertical units of the scene (${a}) must match the horizontal units of the scene (${r})`,{verticalUnit:a,horizontalUnit:r}):null}function a(n,i,a){const o=l(n),c=i,h=r(o,c,a);if(o){const i=t.deriveUnitFromSR(o,n.spatialReference).heightUnit;if(!a&&i!==o.heightUnit){const t=new e("layerview:unmatched-height-unit",`The vertical units of the layer must match the horizontal units (${i})`,{horizontalUnit:i});return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o,error:t})}}if(!s(n)||4===h)return new e("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o});switch(h){case 1:{const t=o?.heightUnit||"unknown",n=c?.heightUnit||"unknown",i=new e("layerview:incompatible-height-unit",`The vertical units of the layer (${t}) must match the vertical units of the scene (${n})`,{layerUnit:t,sceneUnit:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case 2:{const t=o?.heightModel||"unknown",n=c?.heightModel||"unknown",i=new e("layerview:incompatible-height-model",`The height model of the layer (${t}) must match the height model of the scene (${n})`,{layerHeightModel:t,sceneHeightModel:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}case 3:{const t=o?.vertCRS||"unknown",n=c?.vertCRS||"unknown",i=new e("layerview:incompatible-vertical-datum",`The vertical datum of the layer (${t}) must match the vertical datum of the scene (${n})`,{layerDatum:t,sceneDatum:n});return new e("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:c,error:i})}}return null}function r(e,t,n){if(!o(e)||!o(t))return 4;if(null==e||null==t)return 0;if(!n&&e.heightUnit!==t.heightUnit)return 1;if(e.heightModel!==t.heightModel)return 2;switch(e.heightModel){case"gravity-related-height":return 0;case"ellipsoidal":return e.vertCRS===t.vertCRS?0:3;default:return 4}}function o(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function s(e){return"heightModelInfo"in e&&null!=e.heightModelInfo||null!=e.spatialReference||!f(e)}function c(e){const t=e.url?n(e.url):void 0,i=e.spatialReference?.vcsWkid;return!(null==i&&null!=t&&"ImageServer"===t.serverType)&&h(e)&&e.heightModelInfo?e.heightModelInfo:null}function l(e,n){const i=c(e);if(i)return i;if(f(e)){const i=n??e.spatialReference;return t.fromSpatialReference(i)??t.deriveUnitFromSR(m,i)}return null}function h(e){return"heightModelInfo"in e}function u(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"annotation-feature":case"catalog":case"catalog-footprint":case"csv":case"feature":case"dimension-feature":case"geojson":case"subtype-group":case"ogc-feature":case"oriented-imagery":case"wfs":case"knowledge-graph-sublayer":return!0;default:return!1}}function f(e){return u(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):d(e)}function g(e){return null!=e.layers||d(e)||u(e)||h(e)}function d(e){switch(e.type){case"annotation-feature":case"building-scene":case"elevation":case"gaussian-splat":case"integrated-mesh":case"integrated-mesh-3dtiles":case"point-cloud":case"scene":case"voxel":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"catalog":case"catalog-footprint":case"catalog-dynamic-group":case"csv":case"dimension":case"dimension-feature":case"geojson":case"feature":case"subtype-group":case"geospatial-pdf":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"oriented-imagery":case"parquet":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"video":case"viewshed":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}const m=new t({heightModel:"gravity-related-height"});export{l as deriveHeightModelInfoFromLayer,c as getLayerHeightModelInfo,r as isCompatible,a as rejectLayerError,g as supportsHeightModelInfo,i as validateWebSceneError};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../core/Logger.js";import{getMetersPerUnitForSR as t}from"../../../core/units.js";import o from"../../Mesh.js";import n from"../../Point.js";import{project as r}from"../../projectionUtils.js";import i from"../MeshComponent.js";import a from"../MeshVertexAttributes.js";import{isGround as s}from"../../../support/groundInstanceUtils.js";const l=()=>e.getLogger("esri.geometry.support.meshUtils.elevation");async function m(e,t,n){let r;if(p(e)||s(e)){const o=await u(e);return r=await o.createElevationSampler(t,{demResolution:n?.demResolution??"finest-contiguous"}),c(r,t,{material:n?.material})}return"string"==typeof n?.demResolution?(l().error("create()","demResolution must be a number when used directly with a sampler"),new o):c(e,t,{material:n?.material,demResolution:n?.demResolution})}function c(e,n,s){const l=t(n.spatialReference),m=(s?.demResolution??e.demResolution.min)/l,c=Math.round(n.width/m),u=Math.round(n.height/m),p=c+1,d=u+1,h=new Float64Array(p*d*3),w=new Float32Array(p*d*2);let R=0,y=0;const g=new Uint32Array(c*u*2*3);let j=0,v=0;const A=!e.spatialReference.equals(n.spatialReference);f.spatialReference=n.spatialReference;const{xmin:x,ymin:b,height:M,width:U}=n;for(let t=0;t<d;t++){const o=b+M*(t/u);for(let n=0;n<p;n++){const i=x+U*(n/c);if(h[R++]=i,h[R++]=o,A){f.x=i,f.y=o;const t=r(f,e.spatialReference);h[R++]=e.elevationAt(t.x,t.y)??0}else h[R++]=e.elevationAt(i,o)??0;const a=n/c,s=t/u;w[y++]=a,w[y++]=s,t!==u&&n!==c&&(g[v++]=j+1,g[v++]=j+p+1,g[v++]=j+p,g[v++]=j,g[v++]=j+1,g[v++]=j+p),j++}}return new o({vertexAttributes:new a({position:h,uv:w}),components:[new i({faces:g,shading:"smooth",material:s?.material??null})],spatialReference:n.spatialReference})}async function u(e){return p(e)?e.load():(await e.load(),await Promise.allSettled(e.
|
|
2
|
+
import e from"../../../core/Logger.js";import{getMetersPerUnitForSR as t}from"../../../core/units.js";import o from"../../Mesh.js";import n from"../../Point.js";import{project as r}from"../../projectionUtils.js";import i from"../MeshComponent.js";import a from"../MeshVertexAttributes.js";import{isGround as s}from"../../../support/groundInstanceUtils.js";const l=()=>e.getLogger("esri.geometry.support.meshUtils.elevation");async function m(e,t,n){let r;if(p(e)||s(e)){const o=await u(e);return r=await o.createElevationSampler(t,{demResolution:n?.demResolution??"finest-contiguous"}),c(r,t,{material:n?.material})}return"string"==typeof n?.demResolution?(l().error("create()","demResolution must be a number when used directly with a sampler"),new o):c(e,t,{material:n?.material,demResolution:n?.demResolution})}function c(e,n,s){const l=t(n.spatialReference),m=(s?.demResolution??e.demResolution.min)/l,c=Math.round(n.width/m),u=Math.round(n.height/m),p=c+1,d=u+1,h=new Float64Array(p*d*3),w=new Float32Array(p*d*2);let R=0,y=0;const g=new Uint32Array(c*u*2*3);let j=0,v=0;const A=!e.spatialReference.equals(n.spatialReference);f.spatialReference=n.spatialReference;const{xmin:x,ymin:b,height:M,width:U}=n;for(let t=0;t<d;t++){const o=b+M*(t/u);for(let n=0;n<p;n++){const i=x+U*(n/c);if(h[R++]=i,h[R++]=o,A){f.x=i,f.y=o;const t=r(f,e.spatialReference);h[R++]=e.elevationAt(t.x,t.y)??0}else h[R++]=e.elevationAt(i,o)??0;const a=n/c,s=t/u;w[y++]=a,w[y++]=s,t!==u&&n!==c&&(g[v++]=j+1,g[v++]=j+p+1,g[v++]=j+p,g[v++]=j,g[v++]=j+1,g[v++]=j+p),j++}}return new o({vertexAttributes:new a({position:h,uv:w}),components:[new i({faces:g,shading:"smooth",material:s?.material??null})],spatialReference:n.spatialReference})}async function u(e){return p(e)?e.load():(await e.load(),await Promise.allSettled(e.allLayers.items.map(e=>e.load())),e)}function p(e){return"type"in e&&("elevation"===e.type||"base-elevation"===e.type)}const f=new n;export{m as create};
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.122",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type SpatialReference from "../geometry/SpatialReference.js";
|
|
2
|
+
import type Layer from "./Layer.js";
|
|
3
|
+
import type TileInfo from "./support/TileInfo.js";
|
|
4
|
+
import type { MultiOriginJSONSupportMixin } from "../core/MultiOriginJSONSupport.js";
|
|
5
|
+
import type { BlendLayer, BlendLayerProperties } from "./mixins/BlendLayer.js";
|
|
6
|
+
import type { PortalLayer, PortalLayerProperties } from "./mixins/PortalLayer.js";
|
|
7
|
+
import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js";
|
|
8
|
+
import type { TileInfoProperties } from "./support/TileInfo.js";
|
|
9
|
+
import type { LayerProperties } from "./Layer.js";
|
|
10
|
+
|
|
11
|
+
export interface GeospatialPDFLayerProperties extends LayerProperties, PortalLayerProperties, ScaleRangeLayerProperties, BlendLayerProperties, Partial<Pick<GeospatialPDFLayer, "clippedToNeatline" | "neatlineVisible" | "url">> {
|
|
12
|
+
/** The tiling scheme information for the layer. */
|
|
13
|
+
tileInfo?: TileInfoProperties | null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default class GeospatialPDFLayer extends GeospatialPDFLayerSuperclass {
|
|
17
|
+
constructor(properties?: GeospatialPDFLayerProperties);
|
|
18
|
+
/**
|
|
19
|
+
* TODO doc
|
|
20
|
+
*
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
accessor clippedToNeatline: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* TODO doc
|
|
26
|
+
*
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
accessor neatlineVisible: boolean;
|
|
30
|
+
/** The spatial reference of the layer. */
|
|
31
|
+
get spatialReference(): SpatialReference;
|
|
32
|
+
/** The tiling scheme information for the layer. */
|
|
33
|
+
get tileInfo(): TileInfo | null | undefined;
|
|
34
|
+
set tileInfo(value: TileInfoProperties | null | undefined);
|
|
35
|
+
/** The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules. */
|
|
36
|
+
get type(): "geospatial-pdf";
|
|
37
|
+
/** The URL to the PDF file. */
|
|
38
|
+
accessor url: string;
|
|
39
|
+
}
|
|
40
|
+
declare const GeospatialPDFLayerSuperclass: typeof Layer & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof ScaleRangeLayer & typeof BlendLayer
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../core/Error.js";import r from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{property as i,subclass as a}from"../core/accessorSupport/decorators.js";import n from"../geometry/SpatialReference.js";import{getInfo as l}from"../geometry/support/spatialReferenceUtils.js";import p from"./Layer.js";import{BlendLayer as m}from"./mixins/BlendLayer.js";import{PortalLayer as c}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as f}from"./mixins/RasterJobHandlerMixin.js";import{ScaleRangeLayer as h}from"./mixins/ScaleRangeLayer.js";import d from"./raster/datasets/GeospatialPDFRaster.js";import{clip as u}from"./raster/functions/clipUtils.js";import{sanitizeUrl as y}from"./support/arcgisLayerUrl.js";import{interpolationKebab as g}from"./support/rasterEnums.js";import b from"./support/TileInfo.js";import x from"../renderers/RasterStretchRenderer.js";import{normalizeRendererJSON as _}from"../renderers/support/rasterRendererHelper.js";import R from"../renderers/support/RasterSymbolizer.js";import{enumeration as j}from"../core/accessorSupport/decorators/enumeration.js";let I=class extends(m(h(c(f(s(p)))))){constructor(e){super(e),this.interpolation="bilinear",this.renderer=null,this.serviceRasterInfo=null,this.symbolizer=null,this._frame=null,this.clippedToNeatline=!0,this.neatlineVisible=!0,this.raster=null,this.spatialReference=null,this.type="geospatial-pdf"}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["PDF"],supportsData:!1},e).catch(o).then(()=>this._openRaster(e?.signal))),Promise.resolve(this)}destroy(){this._shutdownJobHandler(),this.raster?.destroy()}get fullExtent(){return this.serviceRasterInfo?.extent}set url(e){this._set("url",y(e,r.getLogger(this)))}async fetchImageBitmapTile(){throw new t("geospatial-pdf-layer:fetch-image-bitmap-tile","GeospatialPDFLayer does not expose pre-rendered image tile URLs.")}async fetchPixels(e,t,r,s={}){return v(this),await this._initJobHandler(),this.raster.fetchPixels(e,Math.round(t),Math.round(r),s)}async fetchTile(e,r,s,o={}){if(v(this),o.requestAsImageElement)throw new t("geospatial-pdf-layer:fetch-tile","GeospatialPDFLayer does not support requestAsImageElement.");await this._initJobHandler();const i=await this.raster.fetchTile(e,r,s,o);return this.clippedToNeatline&&i.pixelBlock&&this._frame&&i.srcExtent&&(i.pixelBlock=await u(i.pixelBlock,i.srcExtent,this._frame.sourceNeatlinePolygon)),i}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}getCompatibleTileInfo(e,t,r=!1){if(!this.loaded||null==t)return null;if(r&&e.equals(this.spatialReference))return this.tileInfo;const s=l(e);return b.create({size:256,spatialReference:e,origin:s?{x:s.origin[0],y:s.origin[1]}:{x:t.xmin,y:t.ymax}})}getRawDisplayBandIds(){return v(this),[0,1,2]}_configDefaultSettings(){this._configPDFSymbolizer()}_configPDFSymbolizer(){v(this);const{rasterInfo:e}=this.raster,t=new x({stretchType:"none",useGamma:!1}),s=_(t.toJSON());this._set("renderer",t),this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=e):this.symbolizer=new R({rendererJSON:s,rasterInfo:e});const o=this.symbolizer.bind();o.success||r.getLogger(this).warn("geospatial-pdf-layer",o.error||"The fixed GeospatialPDFLayer renderer is not supported.")}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(()=>{this._rasterJobHandler&&(v(this),this.raster.rasterJobHandler=this._rasterJobHandler)}).catch(()=>{})}async _openRaster(e){const r=new d({url:this.url});if(await r.open({signal:e}),!r.rasterInfo)throw r.destroy(),new t("geospatialpdf-layer:load","cannot load resources on "+this.url);const{rasterInfo:s}=r;this._set("serviceRasterInfo",s),this.setAtOrigin("spatialReference",s.spatialReference,"service"),this.setAtOrigin("tileInfo",r.rasterInfo.storageInfo.tileInfo,"service"),this._frame=r.frame,this.raster=r,this._configDefaultSettings()}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}};function v(e){if(!e.raster||!e.serviceRasterInfo)throw new t("imagery-tile","no raster")}e([j(g)],I.prototype,"interpolation",void 0),e([i({readOnly:!0,clonable:!1,json:{read:!1}})],I.prototype,"renderer",void 0),e([i()],I.prototype,"serviceRasterInfo",void 0),e([i({clonable:!1})],I.prototype,"symbolizer",void 0),e([i({clonable:!1})],I.prototype,"_compatibleFullExtent",void 0),e([i({type:Boolean})],I.prototype,"clippedToNeatline",void 0),e([i({json:{read:!1}})],I.prototype,"fullExtent",null),e([i({type:Boolean})],I.prototype,"neatlineVisible",void 0),e([i()],I.prototype,"raster",void 0),e([i({readOnly:!0,type:n,json:{read:!1}})],I.prototype,"spatialReference",void 0),e([i({type:b})],I.prototype,"tileInfo",void 0),e([i({readOnly:!0,value:"geospatial-pdf"})],I.prototype,"type",void 0),e([i()],I.prototype,"url",null),I=e([a("esri.layers.GeospatialPDFLayer")],I);const w=I;export{w as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__addDisposableResource as e,__disposeResources as t,__decorate as o}from"tslib";import{isSome as r}from"../core/arrayUtils.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Error.js";import{abortHandle as n,disposable as a,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{MultiOriginJSONSupportMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as y,throwIfAbortError as m}from"../core/promiseUtils.js";import{on as u,sync as c,watch as h}from"../core/reactiveUtils.js";import{property as f,subclass as v}from"../core/accessorSupport/decorators.js";import{persistable as g}from"../core/accessorSupport/decorators/persistable.js";import S from"./Layer.js";import{APIKeyMixin as _}from"./mixins/APIKeyMixin.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as Q}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{SceneService as I}from"./mixins/SceneService.js";import{elevationInfo as x}from"./support/commonProperties.js";import{GeometryDescriptor as A}from"./support/GeometryDescriptor.js";import{queryIntegratedMeshElevation as k,defaultNoDataValue as
|
|
2
|
+
import{__addDisposableResource as e,__disposeResources as t,__decorate as o}from"tslib";import{isSome as r}from"../core/arrayUtils.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Error.js";import{abortHandle as n,disposable as a,makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import p from"../core/Logger.js";import{MultiOriginJSONSupportMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAborted as y,throwIfAbortError as m}from"../core/promiseUtils.js";import{on as u,sync as c,watch as h}from"../core/reactiveUtils.js";import{property as f,subclass as v}from"../core/accessorSupport/decorators.js";import{persistable as g}from"../core/accessorSupport/decorators/persistable.js";import S from"./Layer.js";import{APIKeyMixin as _}from"./mixins/APIKeyMixin.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as Q}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{SceneService as I}from"./mixins/SceneService.js";import{elevationInfo as x}from"./support/commonProperties.js";import{GeometryDescriptor as A}from"./support/GeometryDescriptor.js";import{queryIntegratedMeshElevation as k,defaultNoDataValue as T}from"./support/I3SIntegratedMeshElevationQuery.js";import{I3SNodePageDefinition as D,I3SMaterialDefinition as C,I3STextureSetDefinition as M,I3SGeometryDefinition as W}from"./support/I3SLayerDefinitions.js";import E from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as U,elevationModeRequiredMessage as G,featureExpressionUnsupportedMessage as O}from"../support/elevationInfoUtils.js";import{isGround as P}from"../support/groundInstanceUtils.js";import{f as N}from"../chunks/persistableUrlUtils.js";import{isBasemap as R}from"../support/userTypeGuards/isBasemap.js";import{SceneLayerWorkerHandle as H}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{I3SDataRequester as z}from"../views/3d/layers/i3s/I3SDataRequester.js";import K from"../views/3d/layers/i3s/I3SNodeLoader.js";import{ImmediateTask as V}from"../views/support/Scheduler.js";import{reader as q}from"../core/accessorSupport/decorators/reader.js";let F=class extends(I(j(b(Q(L(d(w(_(i(S)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null,this.definitionExpression=null,this._elevationQueryAbortController=new AbortController,this._elevationQueryWorkerContext=`i3s-elevation-query-${this.uid}`,this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,this._modificationsGeneration=0}destroy(){this._elevationQueryAbortController.abort();const e=this._elevationQueryWorkerHandle;this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,null!=e&&e.destroyContextAndSelf(this._elevationQueryWorkerContext),super.destroy()}initialize(){this.addHandles([u(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},c),h(()=>this.modifications,()=>this._modificationsGeneration++,c),h(()=>this.memoizedElevationQueryDependencies,()=>this._abortElevationQueriesAfterDependencyChange(),c)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:N(e,o),context:o}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get _elevationQueryWorker(){return this._elevationQueryWorkerHandle??=new H((e,t)=>V.schedule(e,t))}get memoizedElevationQueryDependencies(){return[this.elevationInfo?.offset,this._modificationsGeneration]}async queryElevation(o,i,s){const p={stack:[],error:void 0,hasError:!1};try{const t=s?.noDataValue??Number.MAX_VALUE,d=this._elevationQueryWorker,m=new AbortController;o.addHandles(n(m),m);e(p,a(l(()=>o.removeHandles(m))),!1);const u=AbortSignal.any([s?.signal,this._elevationQueryAbortController.signal,m.signal].filter(r));await this.load({signal:u}),y(u);const c=A.fromGeometry(i),h={signal:u,elevationOffset:this.elevationInfo?.offset??0,scheduler:o.resourceController.scheduler};if(null==this._elevationQueryWorkerSetup){const e=this.store?.defaultGeometrySchema;null!=e&&(this._elevationQueryWorkerSetup=d.setLegacySchema(this._elevationQueryWorkerContext,e))}const f=await k(this,c,h);y(u);const v=f.coordinates[0].z===T;v&&(f.coordinates[0].z=t);const g=await f.project(i.spatialReference,u);y(u);const S=g??c.clone(),_={geometry:S.export(),noDataValue:t};return s?.returnSampleInfo&&(_.sampleInfo=S.coordinates.map(()=>({demResolution:v?-1:1}))),_}catch(d){p.error=d,p.hasError=!0}finally{t(p)}}_abortElevationQueriesAfterDependencyChange(){const e=this._elevationQueryAbortController;this._elevationQueryAbortController=new AbortController,e.abort()}async processElevationQueryGeometry(e,t){return await this._elevationQueryWorkerSetup,y(t),this._elevationQueryWorker.invoke(e,t)}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(o){m(o)}if(y(t),await this._fetchService(t),y(t),null!=this._modificationsSource){const o=await E.fromUrl(this._modificationsSource.url,this.spatialReference,e);y(t),this.setAtOrigin("modifications",o,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t),y(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}get isUsedAsGroundLayer(){return!has("enable-feature:im-as-ground")||(R(this.parent)||P(this.parent))}get replacesTerrain(){return!1}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new s("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new s("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new s("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}get elevationQueryDataRequester(){return new z(this.customParameters,this.apiKey)}get elevationQueryNodeLoader(){return new K(this,this.elevationQueryDataRequester,p.getLogger("esri.layers.IntegratedMeshLayer"),this.store?.defaultGeometrySchema,[],{loadFeatureData:!1,textureUsageMask:0})}_validateElevationInfo(e){const t="Integrated mesh layers";U(p.getLogger(this),G(t,"absolute-height",e)),U(p.getLogger(this),O(t,e))}};o([f({type:String,readOnly:!0})],F.prototype,"geometryType",void 0),o([f({type:["show","hide"]})],F.prototype,"listMode",void 0),o([f({type:["IntegratedMeshLayer"]})],F.prototype,"operationalLayerType",void 0),o([f({json:{read:!1},readOnly:!0})],F.prototype,"type",void 0),o([f({type:D,readOnly:!0,clonable:!1})],F.prototype,"nodePages",void 0),o([f({type:[C],readOnly:!0,clonable:!1})],F.prototype,"materialDefinitions",void 0),o([f({type:[M],readOnly:!0,clonable:!1})],F.prototype,"textureSetDefinitions",void 0),o([f({type:[W],readOnly:!0,clonable:!1})],F.prototype,"geometryDefinitions",void 0),o([f({readOnly:!0})],F.prototype,"serviceUpdateTimeStamp",void 0),o([f({type:E,clonable:e=>e?.clone()??e}),g({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],F.prototype,"modifications",void 0),o([f({clonable:e=>e?{...e}:null})],F.prototype,"_modificationsSource",void 0),o([q(["web-scene","portal-item"],"modifications")],F.prototype,"readModifications",null),o([f(x)],F.prototype,"elevationInfo",null),o([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],F.prototype,"path",void 0),o([f({clonable:!1})],F.prototype,"_elevationQueryWorker",null),o([f()],F.prototype,"_modificationsGeneration",void 0),o([f()],F.prototype,"memoizedElevationQueryDependencies",null),o([f()],F.prototype,"isUsedAsGroundLayer",null),o([f()],F.prototype,"replacesTerrain",null),o([f({clonable:!1})],F.prototype,"elevationQueryDataRequester",null),o([f({clonable:!1})],F.prototype,"elevationQueryNodeLoader",null),F=o([v("esri.layers.IntegratedMeshLayer")],F);const B=F;export{B as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"../../core/Error.js";import{throwIfAborted as t}from"../../core/promiseUtils.js";import{create as o}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as r}from"../../core/libs/gl-matrix-2/math/vec2.js";import i from"../../geometry/Extent.js";import n from"../../geometry/Polygon.js";import{densifyExecute as a}from"../../geometry/operators/densifyOperator.js";import{projectExecute as s}from"../../geometry/operators/projectOperator.js";class c{constructor(e){this.ctm=e.ctm,this.spatialReference=e.toSpatialReference(),this.pairedNeatline=e.pairedNeatline,this.outerExtentMediabox=this._getExtentFromArray(e.outerExtentMediaBox),this.geoControlPoints=e.geoControlPoints,this.outerMediaBox=e.outerExtentMediaBox,this.sourceMediaBoxPolygon=this.createSourceMediaBoxPolygon(),this.sourceNeatlinePolygon=this.createSourceNeatlinePolygon()}createSourceMediaBoxPolygon(){const e=[];for(const[t,o]of this.outerMediaBox){const r=l(this.ctm,t,o);e.push([r[0],r[1]])}return new n({rings:[e],spatialReference:this.spatialReference})}createSourceNeatlinePolygon(){const e=[];for(const[t,o]of this.pairedNeatline){const r=l(this.ctm,t,o);e.push([r[0],r[1]])}return new n({rings:[e],spatialReference:this.spatialReference})}createProjectedPolygon(o,r,i){t(i);const n=o;if(n.spatialReference.equals(r))return n;if(!n||!n.extent)throw new e("geospatial-pdf-layer: load","Could not project neatline");const c=Math.max(n.extent.width,n.extent.height)/256,l=a(n,c);return s(l,r)}toExtent(){return this._getExtentFromArray(this.pairedNeatline)}_getExtentFromArray(e){let t=1/0,o=1/0,r=-1/0,n=-1/0;for(let i=0;i<e.length;i++){const a=l(this.ctm,e[i][0],e[i][1]);t=Math.min(t,a[0]),o=Math.min(o,a[1]),r=Math.max(r,a[0]),n=Math.max(n,a[1])}return new i({...{xmin:t,ymin:o,xmax:r,ymax:n},spatialReference:this.spatialReference})}}function l(e,t,i){const[n,a,s,c,l,m]=e,h=o();return r(h,n*t+s*i+l,a*t+c*i+m),h}export{c as default};
|