@arcgis/core 5.2.0-next.73 → 5.2.0-next.75
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/analysis/ViewshedAnalysis.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +1 -0
- package/assets/esri/core/workers/chunks/{d3be4d914fc99a1d686c.js → 075e65cc4275ac886f08.js} +1 -1
- package/assets/esri/core/workers/chunks/087bd698b80ca0cea71e.js +1 -0
- package/assets/esri/core/workers/chunks/{b6c7b7b7f87dce5de811.js → 0bf644f93c180a2bc2f8.js} +1 -1
- package/assets/esri/core/workers/chunks/0d3b2d9a19383bb63f0a.js +1 -0
- package/assets/esri/core/workers/chunks/0d9fe49812554e7d7ba7.js +1 -0
- package/assets/esri/core/workers/chunks/0daaa89de339e8ea4b81.js +1 -0
- package/assets/esri/core/workers/chunks/{1ca04ecf010e68863014.js → 0eb35e09765fd74eb698.js} +1 -1
- package/assets/esri/core/workers/chunks/12234a63d3fa4bc25e7e.js +1 -0
- package/assets/esri/core/workers/chunks/18e0e993c0c39c962e61.js +1 -0
- package/assets/esri/core/workers/chunks/1c49c9472167a2e0c923.js +1 -0
- package/assets/esri/core/workers/chunks/{cf360767310fb45660a8.js → 1cf8fb704c48ac3d3b15.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e44978ee677aa23163d.js → 2435ef7d11f8dbb920b7.js} +1 -1
- package/assets/esri/core/workers/chunks/2501d9459f6d14c797e5.js +1 -0
- package/assets/esri/core/workers/chunks/2740f755c3a322cbd477.js +1 -0
- package/assets/esri/core/workers/chunks/27f574acf52f2c8bc2c9.js +1 -0
- package/assets/esri/core/workers/chunks/28f87daaba1ae3441364.js +1 -0
- package/assets/esri/core/workers/chunks/2b93888e61ca638490cf.js +1 -0
- package/assets/esri/core/workers/chunks/2c31648a4b95275516ee.js +1 -0
- package/assets/esri/core/workers/chunks/2f4ed8a63d57636a4ebe.js +1 -0
- package/assets/esri/core/workers/chunks/2f81047790c4890ae625.js +1 -0
- package/assets/esri/core/workers/chunks/305eea9c1fc4aee3309e.js +1 -0
- package/assets/esri/core/workers/chunks/30818b5ff0ce51b25d6f.js +1 -0
- package/assets/esri/core/workers/chunks/3235e14fedb19dd94807.js +1 -0
- package/assets/esri/core/workers/chunks/36ec5b84e551ab08b24a.js +1 -0
- package/assets/esri/core/workers/chunks/3c28e2040cb4fb716eaa.js +1 -0
- package/assets/esri/core/workers/chunks/3c32471785bc8570e41c.js +1 -0
- package/assets/esri/core/workers/chunks/4046bd65d7d0677f4600.js +1 -0
- package/assets/esri/core/workers/chunks/4295822fa6ef743c76f1.js +1 -0
- package/assets/esri/core/workers/chunks/{35fd2f765d2cb3f59a22.js → 42d5ed44111bea77ec71.js} +115 -115
- package/assets/esri/core/workers/chunks/43713bc6f7eea07259d0.js +1 -0
- package/assets/esri/core/workers/chunks/{36171c72a3c04b0d13ef.js → 43a65cab888d43954564.js} +1 -1
- package/assets/esri/core/workers/chunks/44a786aba84918f2b247.js +1 -0
- package/assets/esri/core/workers/chunks/46873badbd6ce8ff4e1e.js +1 -0
- package/assets/esri/core/workers/chunks/495f90fe3d0ad32bb82d.js +1 -0
- package/assets/esri/core/workers/chunks/4b5bd0c9a55ea2998601.js +1 -0
- package/assets/esri/core/workers/chunks/4d7a3b3aaf876da0891b.js +1 -0
- package/assets/esri/core/workers/chunks/4fe2cca405180af23364.js +1 -0
- package/assets/esri/core/workers/chunks/50b08415e072a49bc572.js +1 -0
- package/assets/esri/core/workers/chunks/519af918050b47f93516.js +1 -0
- package/assets/esri/core/workers/chunks/{bd311c85437743cf7d2f.js → 53d165b4f30fd64e5d8a.js} +1 -1
- package/assets/esri/core/workers/chunks/552d6aecc7d88d16227b.js +1 -0
- package/assets/esri/core/workers/chunks/5627f562dea8bae2f346.js +1 -0
- package/assets/esri/core/workers/chunks/5ba3a30b7cbfa9e3aa62.js +1 -0
- package/assets/esri/core/workers/chunks/5e1d84e97de0e662aaa9.js +1 -0
- package/assets/esri/core/workers/chunks/64a1ffc221e5b63b43fb.js +1 -0
- package/assets/esri/core/workers/chunks/{31669511cfddf116d991.js → 66e60351aacbd162775f.js} +1 -1
- package/assets/esri/core/workers/chunks/{c203df41f9d2e4b80889.js → 6743d726e45e7b660505.js} +1 -1
- package/assets/esri/core/workers/chunks/69b0dcd7bcd8ec42e2c3.js +1 -0
- package/assets/esri/core/workers/chunks/6b783f440c4a5d36e879.js +1 -0
- package/assets/esri/core/workers/chunks/6dddd3df31961b9fda12.js +1 -0
- package/assets/esri/core/workers/chunks/6fc3553c52af6ace926d.js +1 -0
- package/assets/esri/core/workers/chunks/702b2381acf4d1f90094.js +1 -0
- package/assets/esri/core/workers/chunks/762be5d3e6aeaea33f74.js +29 -0
- package/assets/esri/core/workers/chunks/792303e4090c0c70c4ff.js +1 -0
- package/assets/esri/core/workers/chunks/7a24cc0f3b4eff2bdb8e.js +1 -0
- package/assets/esri/core/workers/chunks/7aaa051b51a8e34bbfb0.js +1 -0
- package/assets/esri/core/workers/chunks/7dc5aedc964eacd1be5a.js +1 -0
- package/assets/esri/core/workers/chunks/81130dbcb738d40f723b.js +1 -0
- package/assets/esri/core/workers/chunks/835af7b4fd92cb4e7af0.js +1 -0
- package/assets/esri/core/workers/chunks/841c81c280114412c95b.js +1 -0
- package/assets/esri/core/workers/chunks/{96d861265566854760cd.js → 88fd698b940dadcc6dc5.js} +1 -1
- package/assets/esri/core/workers/chunks/8a36b999cbd65dd2f16c.js +1 -0
- package/assets/esri/core/workers/chunks/8ae3a6ddc87bf8315583.js +1 -0
- package/assets/esri/core/workers/chunks/8f0d4aec8bd3cbfefc40.js +1 -0
- package/assets/esri/core/workers/chunks/{7f208ef75ef2ce0d7cf9.js → 910c93bbbf8113a4a51f.js} +1 -1
- package/assets/esri/core/workers/chunks/92c4464b67fce6cea134.js +1 -0
- package/assets/esri/core/workers/chunks/{509cfac9e5d86a8ee449.js → 936d44c7bc3a181e64a3.js} +1 -1
- package/assets/esri/core/workers/chunks/947f1ea4dbc3e3419ecc.js +1 -0
- package/assets/esri/core/workers/chunks/9b76c8974424a1908e86.js +1 -0
- package/assets/esri/core/workers/chunks/9cff18e6f751d1b3085e.js +1 -0
- package/assets/esri/core/workers/chunks/a101152066dd56259619.js +1 -0
- package/assets/esri/core/workers/chunks/a2a2c7e274fb32fecffa.js +1 -0
- package/assets/esri/core/workers/chunks/a50421fe79f264ae3619.js +1 -0
- package/assets/esri/core/workers/chunks/a6a2a4a2bae0d327d7ed.js +1 -0
- package/assets/esri/core/workers/chunks/a7a7d3289d4ca95f545f.js +1 -0
- package/assets/esri/core/workers/chunks/abb6c76d5dba3559a68e.js +1 -0
- package/assets/esri/core/workers/chunks/aca5c524bd3c955e9243.js +1 -0
- package/assets/esri/core/workers/chunks/b14961a9f1f40028f141.js +1 -0
- package/assets/esri/core/workers/chunks/b1a175b3b2d1a7ddde8e.js +1 -0
- package/assets/esri/core/workers/chunks/b6cd165d0e58598f28a5.js +1 -0
- package/assets/esri/core/workers/chunks/b78f509fd8e95f728178.js +1 -0
- package/assets/esri/core/workers/chunks/b9c61b20bbc91cb63036.js +1 -0
- package/assets/esri/core/workers/chunks/b9d1bb106737a05290e1.js +1 -0
- package/assets/esri/core/workers/chunks/{faa55265020591fd2224.js → bc0395777c5c1adb1ddb.js} +1 -1
- package/assets/esri/core/workers/chunks/bf3dc3ad8df8488da3f0.js +1 -0
- package/assets/esri/core/workers/chunks/c1568bcd3f04014152e1.js +1 -0
- package/assets/esri/core/workers/chunks/c374e5d5980db74c4aca.js +1 -0
- package/assets/esri/core/workers/chunks/{b9953277d0cd4a01bdc6.js → c37b28f200b704ae6002.js} +1 -1
- package/assets/esri/core/workers/chunks/c67e4a848d41038367b8.js +1 -0
- package/assets/esri/core/workers/chunks/cff6390b863361eaeeed.js +1 -0
- package/assets/esri/core/workers/chunks/d1c7c877edc6948f3801.js +1 -0
- package/assets/esri/core/workers/chunks/d2172583ee6e481a66aa.js +1 -0
- package/assets/esri/core/workers/chunks/d633e98b0dfa0490e4de.js +1 -0
- package/assets/esri/core/workers/chunks/d8eca13c127b443141b7.js +1 -0
- package/assets/esri/core/workers/chunks/ddd8f6154e265dbb6f9f.js +1 -0
- package/assets/esri/core/workers/chunks/de5013f89f0eae93978f.js +1 -0
- package/assets/esri/core/workers/chunks/de601f0d5a2a282d2efd.js +1 -0
- package/assets/esri/core/workers/chunks/e557043f90c051e93925.js +1 -0
- package/assets/esri/core/workers/chunks/e59101f1d060d0a30a65.js +1 -0
- package/assets/esri/core/workers/chunks/{bee5e738ecf8680909c4.js → eaf26c1cc938789d5336.js} +1 -1
- package/assets/esri/core/workers/chunks/eb1a86159dbc098f06fe.js +1 -0
- package/assets/esri/core/workers/chunks/ee9eb381e675d2d01260.js +1 -0
- package/assets/esri/core/workers/chunks/{014f9fd2818e2c9d9a3b.js → f43a0edf58941e2ac78e.js} +1 -1
- package/assets/esri/core/workers/chunks/f4bc563c71c478d3912f.js +1 -0
- package/assets/esri/core/workers/chunks/{4abd54518e35050feb90.js → f78acff510ca615d42e4.js} +1 -1
- package/assets/esri/core/workers/chunks/{01c92e68fb17cf2d0e08.js → f7a5c4d22a24e1ac433c.js} +1 -1
- package/assets/esri/core/workers/chunks/fb0b89bbb4f8607d5f20.js +1 -0
- package/assets/esri/core/workers/chunks/ff890167ff2baabfc4ce.js +1 -0
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/GaussianSplatShadow.glsl.js +4 -5
- package/chunks/OccludedGeometryDepth.glsl.js +5 -0
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/config.js +1 -1
- package/core/importUtils.js +2 -0
- package/geometry/operators/importUtils.js +2 -0
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/normalizeUtils.d.ts +17 -15
- package/geometry/support/normalizeUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +22 -0
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/geoprocessor/utils.js +1 -1
- package/rest/identify.js +1 -1
- package/rest/imageService.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryAttributeBins.js +1 -1
- package/rest/query/operations/queryPivot.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +8 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClear.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClearTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastMaskTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastRenderer.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualize.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +28 -21
- package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/OccludedGeometryDepthTechnique.js +2 -0
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/PolylinePlugin.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawToolUtils.js +1 -1
- package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/options/InteractiveToolOptions.d.ts +36 -0
- package/views/interactive/options/InteractiveToolOptions.js +2 -0
- package/views/interactive/sketch/SketchOptions.d.ts +4 -3
- package/views/interactive/sketch/SketchOptions.js +1 -1
- package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +1 -1
- package/views/interactive/tooltip/fields/fields.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +8 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.d.ts +8 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +29 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/assets/esri/core/workers/chunks/00cbff0b785e24e87d97.js +0 -1
- package/assets/esri/core/workers/chunks/0623acb2bd14a61b65c9.js +0 -29
- package/assets/esri/core/workers/chunks/06c9aac75a01d3af6d54.js +0 -1
- package/assets/esri/core/workers/chunks/089f8c60e96d920a2cb2.js +0 -1
- package/assets/esri/core/workers/chunks/0c3c311400ee352187ea.js +0 -1
- package/assets/esri/core/workers/chunks/0dbf31a663b5220a3136.js +0 -1
- package/assets/esri/core/workers/chunks/0df660dfd941cff3ea1d.js +0 -1
- package/assets/esri/core/workers/chunks/1418c03c4ab87f7ab5f4.js +0 -1
- package/assets/esri/core/workers/chunks/158d2ac0333d53556e33.js +0 -1
- package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +0 -1
- package/assets/esri/core/workers/chunks/16cade1c2ddf44e336ee.js +0 -1
- package/assets/esri/core/workers/chunks/1b130af7d14eaae69d96.js +0 -1
- package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +0 -1
- package/assets/esri/core/workers/chunks/1e0140556c2e3fa72545.js +0 -1
- package/assets/esri/core/workers/chunks/1e5cb72830c7f32f2961.js +0 -1
- package/assets/esri/core/workers/chunks/259bdacfb7b0f866a8d0.js +0 -1
- package/assets/esri/core/workers/chunks/2a2ed7bd44010f24c2dd.js +0 -1
- package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +0 -1
- package/assets/esri/core/workers/chunks/2f58e1f64df2da8259a2.js +0 -1
- package/assets/esri/core/workers/chunks/383304d33b496c5d8baa.js +0 -1
- package/assets/esri/core/workers/chunks/3aacb935d632834d4154.js +0 -1
- package/assets/esri/core/workers/chunks/3c8e98cf23ad8ef12fcb.js +0 -1
- package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +0 -1
- package/assets/esri/core/workers/chunks/3dc71e03a630dd50b28e.js +0 -1
- package/assets/esri/core/workers/chunks/3fd022df127af32782ce.js +0 -1
- package/assets/esri/core/workers/chunks/4344ab1250a1c550bf8b.js +0 -1
- package/assets/esri/core/workers/chunks/43de723f765ec8f268ac.js +0 -1
- package/assets/esri/core/workers/chunks/44b50d4716a2567ab6f1.js +0 -1
- package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +0 -1
- package/assets/esri/core/workers/chunks/4695cd6120f60b234d5c.js +0 -1
- package/assets/esri/core/workers/chunks/4cf2b0558a4acc141429.js +0 -1
- package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +0 -1
- package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +0 -1
- package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +0 -1
- package/assets/esri/core/workers/chunks/582a1d468089b9986416.js +0 -1
- package/assets/esri/core/workers/chunks/5f201c77a09ae0df29d6.js +0 -1
- package/assets/esri/core/workers/chunks/6080e46fc79127500283.js +0 -1
- package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +0 -1
- package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +0 -1
- package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +0 -1
- package/assets/esri/core/workers/chunks/64176f7ae719289a2f79.js +0 -1
- package/assets/esri/core/workers/chunks/67d3ff7fcefaa7d5d27f.js +0 -1
- package/assets/esri/core/workers/chunks/6a9002fcba11e2cf3f2e.js +0 -1
- package/assets/esri/core/workers/chunks/72dcd4bd1a28bf8605c5.js +0 -1
- package/assets/esri/core/workers/chunks/73f228d966b89c73c9e9.js +0 -1
- package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +0 -1
- package/assets/esri/core/workers/chunks/77df0bb35d2688729479.js +0 -1
- package/assets/esri/core/workers/chunks/7a143ca61c0a70306185.js +0 -1
- package/assets/esri/core/workers/chunks/7e373d9c98ce910db9d2.js +0 -1
- package/assets/esri/core/workers/chunks/869d292a60747c93dc84.js +0 -1
- package/assets/esri/core/workers/chunks/86a4057572755b403548.js +0 -1
- package/assets/esri/core/workers/chunks/8c76f31a363dd0c3354d.js +0 -1
- package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +0 -1
- package/assets/esri/core/workers/chunks/9c57161ad48d8d546dc7.js +0 -1
- package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +0 -1
- package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +0 -1
- package/assets/esri/core/workers/chunks/a7f42ada0aa69873a938.js +0 -1
- package/assets/esri/core/workers/chunks/a988fd54912969b812ce.js +0 -1
- package/assets/esri/core/workers/chunks/aff0e7761276036e029d.js +0 -1
- package/assets/esri/core/workers/chunks/b33d870cbfa238762c5e.js +0 -1
- package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +0 -1
- package/assets/esri/core/workers/chunks/b7d8817018b3d277c454.js +0 -1
- package/assets/esri/core/workers/chunks/b984b808d383974ca3d8.js +0 -1
- package/assets/esri/core/workers/chunks/ba4f419f46be09a9a55c.js +0 -1
- package/assets/esri/core/workers/chunks/bfb6566c27c09deb0929.js +0 -1
- package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +0 -1
- package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +0 -1
- package/assets/esri/core/workers/chunks/c715c585c42d8c2b86f5.js +0 -1
- package/assets/esri/core/workers/chunks/c7e9513f75b8ec205562.js +0 -1
- package/assets/esri/core/workers/chunks/c838cc1c786368b78598.js +0 -1
- package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +0 -1
- package/assets/esri/core/workers/chunks/c873383e7dae35dc1a61.js +0 -1
- package/assets/esri/core/workers/chunks/cd4e5c948d1bfa9b9a2d.js +0 -1
- package/assets/esri/core/workers/chunks/cfe31b7d1c6c05fbd268.js +0 -1
- package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +0 -1
- package/assets/esri/core/workers/chunks/d0c1bc90e474f706211c.js +0 -1
- package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +0 -1
- package/assets/esri/core/workers/chunks/d901f8503a73277cfa58.js +0 -1
- package/assets/esri/core/workers/chunks/da484787bd9fd3b13d15.js +0 -1
- package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +0 -1
- package/assets/esri/core/workers/chunks/e21b3490bfce75405e55.js +0 -1
- package/assets/esri/core/workers/chunks/e4353f0792f45aa6a62f.js +0 -1
- package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +0 -1
- package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +0 -1
- package/assets/esri/core/workers/chunks/e702abaeccef20b64a81.js +0 -1
- package/assets/esri/core/workers/chunks/ebd619533be077059494.js +0 -1
- package/assets/esri/core/workers/chunks/f475672ff4c2ec9367c2.js +0 -1
- package/assets/esri/core/workers/chunks/f69329b85b362b349a8c.js +0 -1
- package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +0 -1
- package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +0 -1
- package/assets/esri/core/workers/chunks/fba8065a3a6fbd877e23.js +0 -1
- package/assets/esri/core/workers/chunks/fec07a16b72cdcafc641.js +0 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +0 -2
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as a,scaleAndAdd as
|
|
2
|
+
import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as a,scaleAndAdd as o,subtract as i,length as r,dot as n}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as p}from"../../../../../../core/support/UpdatingHandles.js";import{c as d,a as l}from"../../../../../../chunks/boundedPlane.js";import{intersectRay as u}from"../../../../../../geometry/support/plane.js";import{sv3d as h}from"../../../../../../geometry/support/vectorStacks.js";import{updateResizeHandle as m,isDiagonalResizeHandle as _,calculateDiagonalResizeHandleScale as f}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToRenderPlane as g}from"../../dragEventPipeline3D.js";import{mapPlaneAutoSize2D as y}from"./extentUtils.js";import{ResizeManipulator as x}from"../../../manipulators/ResizeManipulator.js";import{fromScreenNormalized as S}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as M}from"../../../../../interactive/dragEventPipeline.js";import{ExtentScaleTooltipInfo as b}from"../../../../../interactive/tooltip/infos/ExtentScaleTooltipInfo.js";import{GeometryWorkerHandle as z}from"../../../../../support/GeometryWorkerHandle.js";class j{get _object(){return this._tool.object}get _operations(){return this._object.operations}get updating(){return this._updatingHandles.updating}get zMax(){if(!this._zMaxDirty||!this._operations)return this._zMax;const t=this._operations.data;if(t.geometry.hasZ){const e=t.coordinateHelper;this._zMax=Number.NEGATIVE_INFINITY;for(const s of t.parts)for(const t of s.vertices){const s=e.getZ(t.pos)??0;this._zMax=Math.max(s,this._zMax)}}else this._zMax=0;return this._zMaxDirty=!1,this._zMax}constructor(t,e,s){this._tool=t,this._bounds=e,this._preserveAspectRatioStep=s,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._displayBoundsStart=d(),this._displayBoundsMarginStart=0,this._updatingHandles=new p,this._measurementWorker=new z({preloadGeodetic:!0}),this._zMax=0,this._zMaxDirty=!0;const a=this._tool,o=a.view;this.resizeManipulators=this._resizeHandles.map(t=>{const e=new x(o,t);return a.addHandles([e.events.on("grab-changed",t=>this._onGrabChanged(t)),this._createResizeDragPipeline(e,t)]),e}),a.manipulators.addMany(this.resizeManipulators),this._operations&&a.addHandles(this._operations.data.on("change",()=>{"resize"!==a.inputState?.type&&(this._zMaxDirty=!0)}))}destroy(){this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._measurementWorker.destroy(),this._updatingHandles.destroy()}forEachManipulator(t){this.resizeManipulators.forEach(e=>t(e,2))}updateManipulators(t,e){this.resizeManipulators.forEach((s,a)=>{m(s,this._resizeHandles[a],t,e)})}getUpdatedTooltipInfo(){if(!this.resizeManipulators.some(t=>t.focused))return null;const t=this._tooltipInfo??=new b({toolOptions:this._tool.toolOptions});return this.resizeManipulators.some(t=>t.dragging)||(t.xScale=1,t.yScale=1),this._updatingHandles.consumePromise(y(this._bounds.mapBounds,this.zMax,this._bounds.spatialReference,this._measurementWorker).then(({width:e,height:s})=>{t.xSize=e,t.ySize=s})),t}_onGrabChanged({action:t,screenPoint:e}){const s=this._tool,a=this._bounds;if("start"!==t||!e)return;const o=S(s.view.state.camera,e);u(a.displayBounds.plane,o,h.get())&&(a.backupMapBounds(),l(a.displayBounds,this._displayBoundsStart),this._displayBoundsMarginStart=a.displayBoundsMargin,s.inputState={type:"resize"})}_createResizeDragPipeline(t,e){const{_tool:s,_object:a}=this;return M(t,(t,o,i)=>{let r;null!=s.inputState&&(o.next(t=>("start"===t.action&&s.events.emit("scale-start",{object:a,xScale:1,yScale:1}),{...t,handle:e})).next(g(s.view,this._displayBoundsStart.plane)).next(this._renderPlaneToFactors()).next(...this._preserveAspectRatioStep()).next(t=>("end"===t.action&&r?[t.factor1,t.factor2]=r:r=[t.factor1,t.factor2],t)).next(this._updateGeometry()).next(t=>{const e=this._tooltipInfo;e&&(e.xScale=t.factor1,e.yScale=t.factor2);const o={object:a,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":s.events.emit("scale",o);break;case"end":s.inputState=null,s.events.emit("scale-stop",o)}return t}),i.next(()=>{null!=s.inputState&&s.events.emit("scale-stop",{object:a,xScale:1,yScale:1}),s.cancelDrag()}))})}_renderPlaneToFactors(){const t=this._bounds;return e=>{const s=this._displayBoundsStart,c=e.handle.direction,p=t.displayBoundsMargin,d=this._displayBoundsMarginStart,l=a(h.get(),s.origin);o(l,l,s.basis1,-c[0]),o(l,l,s.basis2,-c[1]);const u=i(h.get(),e.renderEnd,l),m=i(h.get(),e.renderStart,l),g=_(e.handle),y=f(s),x=f(t.displayBounds)/y,S=(t,e)=>{if(0===t)return 1;let s=r(e),a=.5*t*n(e,u)/s;const o=a<0?-1:1;if(g){a+=(s-.5*t*n(e,m)/s)*o*x}const i=s<1.5*d?1:B;return s=Math.max(s-d,B),o>0&&(a-=p),o*Math.max(o*(a/s),i)};return{...e,factor1:S(c[0],s.basis1),factor2:S(c[1],s.basis2)}}}_updateGeometry(){const i=this._bounds;return r=>{const n=a(c(),i.mapBoundsStart.origin);o(n,n,i.mapBoundsStart.basis1,-r.handle.direction[0]),o(n,n,i.mapBoundsStart.basis2,-r.handle.direction[1]);const p=t(s(),i.mapBoundsStart.basis1[0],i.mapBoundsStart.basis1[1]);e(p,p);const d="start"===r.action?0:1;if(this._operations){const t=this._operations.scale(n,p,r.factor1,r.factor2,d,1);l(i.mapBoundsStart,i.mapBounds),i.updateMapBoundsFromOperation(t)}return r}}}const B=1e-6;export{j as ExtentScale,B as scaleEpsilon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{colorVectorToColorAndOpacity as e}from"../../../core/colorUtils.js";import{invert as t}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{subtract as
|
|
2
|
+
import{colorVectorToColorAndOpacity as e}from"../../../core/colorUtils.js";import{invert as t}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{subtract as r,cross as o,transformMat4 as n,normalize as i}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{sv3d as l,sm4d as c}from"../../../geometry/support/vectorStacks.js";import{hydrateGeometry as s}from"../../../layers/graphics/hydratedFeatures.js";import{manipulatedObjectGeometry as a}from"./editingTools/manipulatedObjectUtils.js";import{computeCentroid as u}from"../layers/graphics/graphicUtils.js";import{createSphereGeometry as d}from"../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as m}from"../webgl-engine/materials/ColorMaterial.js";function f(t,r=4,o=!0,n){const i=e(t),l=t[3]<1;return new m({color:i,writeDepth:!l,cullFace:2,renderOccluded:r,isDecoration:!0,shadingEnabled:o,screenSizeScale:n,screenSizeEnabled:null!=n})}function g({color:e,focusedColor:t,outlineColor:r,focusedOutlineColor:o,screenSize:n,renderOccluded:i=4,shaded:l=!0}){const c=f(e,i,l,n?.size);let s,a;if(null!=r){const e=o??r,t=null==n?void 0:n.size+2*n.outlineSize;s=p(e,i,t),a=p(r,i,t)}else{s=f(t??e,i,l,n?.size),a=c}return{material:c,focusedMaterial:s,outlineMaterial:a}}function p(t,r=4,o){return new m({color:e(t),writeDepth:!0,cullFace:1,renderOccluded:r,isDecoration:!0,forceTransparentMode:!0,shadingEnabled:!1,...null==o?{}:{screenSizeEnabled:!0,screenSizeScale:o}})}function h(e,t=.5,r=[0,0,0]){return d(e,t,16,16,{offset:r})}const b=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0}),j=Object.freeze({calloutLength:40,calloutWidth:1,discRadius:27,focusMultiplier:1.1}),z=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0});function S(e,i,s,a){const u=r(l.get(),e,s),d=O(u,o(l.get(),a,u),s,c.get());t(d,d);const m=n(l.get(),i,d);return Math.atan2(m[1],m[0])}function O(e,t,r,n){const c=i(l.get(),e),s=i(l.get(),t),a=o(l.get(),c,s);return n[0]=c[0],n[1]=c[1],n[2]=c[2],n[3]=0,n[4]=s[0],n[5]=s[1],n[6]=s[2],n[7]=0,n[8]=a[0],n[9]=a[1],n[10]=a[2],n[11]=0,n[12]=r[0],n[13]=r[1],n[14]=r[2],n[15]=1,n}function w(e,t){const r=e.getViewForGraphic(t);return null!=r&&"computeAttachmentOrigin"in r?r.computeAttachmentOrigin(t,e.spatialReference):null}function y(e,t){const r=t.origin;null==r?M(e,a(t)):e.elevationAlignedLocation=r}function M(e,t){if(null==t)return;const r="mesh"===t.type?t.origin:u(t);null!=r&&(e.location=s(r))}export{S as calculateInputRotationTransform,O as calculateTranslateRotateFromBases,f as createManipulatorMaterial,g as createManipulatorMaterials,h as createSphereGeometryAsOffsets,w as getGraphicAttachmentOrigin,y as placeAtObject,j as rotateManipulatorDefaults,b as screenSizeManipulatorSettings,z as worldScaledManipulatorSettings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{set as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{exactEquals as r,copy as i}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromArray as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{
|
|
2
|
+
import{set as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{exactEquals as r,copy as i}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromArray as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{createSphereGeometryAsOffsets as a}from"../manipulatorUtils.js";import{Object3DVisualElement as l}from"./Object3DVisualElement.js";import{ElevationContext as o}from"../../layers/graphics/ElevationContext.js";import{geometryToRenderInfo as n}from"../../support/renderInfoUtils/point.js";import{ColorMaterial as c}from"../../webgl-engine/materials/ColorMaterial.js";class h extends l{constructor(e){super(e),this.view=null,this._renderOccluded=4,this._vertices=null,this._spatialReference=null,this._color=s([1,127/255,0,1]),this._size=11,this._outlineColor=s([0,0,0,.5]),this._outlineSize=1,this._elevationInfo=null,this.applyProperties(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial(),this._updateOutlineMaterial())}get vertices(){return this._vertices}set vertices(e){this._vertices=e,this.recreateGeometry()}get spatialReference(){return this._spatialReference}set spatialReference(e){this._spatialReference=e,this.recreateGeometry()}get color(){return this._color}set color(e){r(e,this._color)||(i(this._color,e),this._updateMaterial())}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(e){r(e,this._outlineColor)||(i(this._outlineColor,e),this._updateOutlineMaterial())}get outlineSize(){return this._outlineSize}set outlineSize(e){e!==this._outlineSize&&(this._outlineSize=e,this._updateOutlineMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get _vertexMaterialParameters(){return{color:this._color,screenSizeScale:this.size,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}get _vertexOutlineMaterialParameters(){return{color:this._outlineColor,screenSizeScale:this.size+2*this.outlineSize,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){this.attached&&this._vertexMaterial.setParameters(this._vertexMaterialParameters)}_updateOutlineMaterial(){this.attached&&this._vertexOutlineMaterial.setParameters(this._vertexOutlineMaterialParameters)}_createRenderGeometries(){const t=this.vertices;if(null==t||0===t.length)return[];const r=.5,i=.5,s=n(t,this.spatialReference,this.view.elevationProvider,this.view.renderCoordsHelper,o.fromElevationInfo(this.elevationInfo)),l=[],c=s.numVertices,h=s.position;for(let o=0;o<c;++o){const t=e(u,h[3*o],h[3*o+1],h[3*o+2]),s=a(this._vertexMaterial,r,t),n=a(this._vertexOutlineMaterial,i,t);l.push({vertexGeometry:s,vertexOutlineGeometry:n})}return l}createGeometries(e){const t=this._createRenderGeometries();for(const{vertexGeometry:r,vertexOutlineGeometry:i}of t)e.addGeometry(r),e.addGeometry(i)}createExternalResources(){this._vertexMaterial=new c({...this._vertexMaterialParameters,writeDepth:!0,cullFace:2,screenSizeEnabled:!0,shadingEnabled:!0}),this._vertexOutlineMaterial=new c({...this._vertexOutlineMaterialParameters,forceTransparentMode:!0,writeDepth:!0,cullFace:1,screenSizeEnabled:!0,shadingEnabled:!1})}destroyExternalResources(){this._vertexMaterial=null,this._vertexOutlineMaterial=null}forEachMaterial(e){e(this._vertexMaterial),e(this._vertexOutlineMaterial)}}const u=t();export{h as VerticesVisualElement};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../../../core/has.js";import"../../../../core/Logger.js";import{trackAccess as n}from"../../../../core/accessorSupport/tracking.js";import{SimpleObservable as t}from"../../../../core/accessorSupport/tracking/SimpleObservable.js";import{e}from"../../../../chunks/earcut.js";import{loadLibtessF64 as o,isLibtessF64Loaded as i,triangulateIndexedF64 as s}from"../../../../geometry/libtess.js";import{isClockwise as r}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as u,doubleSubArray as l,concatDoubleArrays as c}from"../../../../geometry/support/DoubleArray.js";import{compactMeshIndices as g,newIndexArray as h,concatIndexArrays as f}from"../../../../geometry/support/Indices.js";import{leastSignificantAxis as p}from"../../../../geometry/support/polygonUtils.js";const d=1e-5,a={method:"auto",projectionAxis:void 0,outlines:void 0,owner:void 0};function m(n,t){const{hasZ:e,ccwRingsAsHoles:o,spatialReference:i}=t,s=t.axis??x(n,e,i),r=n.length,c=[],g=[],h=[],f=[],p=n.reduce((n,t)=>n+t.length,0);let d=0;const a=u(3*p);let m=0;const L=o&&n[0]&&y(n[0],e,s);for(let u=r-1;u>=0;u--){const t=n[u],i=H(t,e);if(i<3){i>1&&f.push(t);continue}const r=!!o&&y(t,e,s);if(L?!r:r)c[d++]=t;else{let n=t.length;for(let t=0;t<d;++t)n+=c[t].length;const o={index:m,pathLengths:new Array(d+1),count:n,holeIndices:new Array(d)};o.pathLengths[0]=t.length,t.length>0&&h.push({index:m,count:t.length}),m=U(t,a,m,t.length,e,L);for(let t=0;t<d;++t){const n=c[t];o.holeIndices[t]=m,o.pathLengths[t+1]=n.length,n.length>0&&h.push({index:m,count:n.length}),m=U(n,a,m,n.length,e,L)}d=0,o.count>0&&g.push(o)}}const w=m;for(const u of f)h.push({index:m,count:u.length}),m=U(u,a,m,u.length,e,L);return{positions:3*m===a.length?a:l(a,0,3*m),polygonVertexCount:w,polygons:g,outlines:h}}function x(n,t,e){if(!t)return 2;
|
|
2
|
+
import"../../../../core/has.js";import"../../../../core/Logger.js";import{trackAccess as n}from"../../../../core/accessorSupport/tracking.js";import{SimpleObservable as t}from"../../../../core/accessorSupport/tracking/SimpleObservable.js";import{e}from"../../../../chunks/earcut.js";import{loadLibtessF64 as o,isLibtessF64Loaded as i,triangulateIndexedF64 as s}from"../../../../geometry/libtess.js";import{isClockwise as r}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as u,doubleSubArray as l,concatDoubleArrays as c}from"../../../../geometry/support/DoubleArray.js";import{compactMeshIndices as g,newIndexArray as h,concatIndexArrays as f}from"../../../../geometry/support/Indices.js";import{leastSignificantAxis as p}from"../../../../geometry/support/polygonUtils.js";const d=1e-5,a={method:"auto",projectionAxis:void 0,outlines:void 0,owner:void 0};function m(n,t){const{hasZ:e,ccwRingsAsHoles:o,spatialReference:i}=t,s=t.axis??x(n,e,i),r=n.length,c=[],g=[],h=[],f=[],p=n.reduce((n,t)=>n+t.length,0);let d=0;const a=u(3*p);let m=0;const L=o&&n[0]&&y(n[0],e,s);for(let u=r-1;u>=0;u--){const t=n[u],i=H(t,e);if(i<3){i>1&&f.push(t);continue}const r=!!o&&y(t,e,s);if(L?!r:r)c[d++]=t;else{let n=t.length;for(let t=0;t<d;++t)n+=c[t].length;const o={index:m,pathLengths:new Array(d+1),count:n,holeIndices:new Array(d)};o.pathLengths[0]=t.length,t.length>0&&h.push({index:m,count:t.length}),m=U(t,a,m,t.length,e,L);for(let t=0;t<d;++t){const n=c[t];o.holeIndices[t]=m,o.pathLengths[t+1]=n.length,n.length>0&&h.push({index:m,count:n.length}),m=U(n,a,m,n.length,e,L)}d=0,o.count>0&&g.push(o)}}const w=m;for(const u of f)h.push({index:m,count:u.length}),m=U(u,a,m,u.length,e,L);return{positions:3*m===a.length?a:l(a,0,3*m),polygonVertexCount:w,polygons:g,outlines:h}}function x(n,t,e){if(!t)return 2;let o=null;for(const i of n){const n=H(i,t),s=n<3?2:p(i,n,e);if(o??=s,s!==o)return 2}return o??2}function y(n,t,e){if(!t)return!r(n);if(n.length<3)return!1;switch(e){case 0:return!r(n,1,2);case 1:return!r(n,0,2);case 2:return!r(n,0,1)}}const L=new t;function w(t,e){const o=v(t,e);if(o.succeeded)return o;return"libtess-not-loaded"===o.message?(n(L),j()):o}async function j(){try{await o(),L.notify()}catch(n){throw n}}function v(n,t){const e={method:t?.method??a.method,projectionAxis:t?.projectionAxis??a.projectionAxis,outlines:t?.outlines??a.outlines,owner:t?.owner??a.owner},{projectionAxis:o}=e,i=null!=o&&2!==o;i&&k(n.positions,o,2);const s=I(n,e);if(i){const t=s.succeeded?s.positions:null;null!=t&&t!==n.positions&&k(t,2,o),k(n.positions,2,o)}return s}function I(n,t){if("libtess"===t.method)return C(n,t);const o=b(n,t),i=Array();let s=0;for(const l of n.polygons){const r=P(n.positions,l),u=(l.holeIndices??[]).map(n=>n-l.index),c=u.length>0?u:null,g=e(r,c,3),h=e.deviation(r,u,3,g);if(o&&h>d)return C(n,t);for(let n=0;n<g.length;n++)i.push(g[n]+l.index);s=Math.max(s,h)}const{outlineIndexBuffer:r,outlineRingLengths:u}=null!=t.outlines?S(t.outlines,n.positions):{outlineIndexBuffer:void 0,outlineRingLengths:void 0};return{succeeded:!0,positions:n.positions,indices:g(i),outlineIndexBuffer:r,outlineRingLengths:u,vertexCount:n.positions.length/3,method:"earcut",deviation:s}}const R=250;let A=new WeakSet;const B=1e4;function b(n,t){const e=null!=t.owner&&A.has(t.owner),o=B;return"auto"===t.method&&!(e&&n.polygonVertexCount>=o)}function C(n,t){if(!i())return M("libtess-not-loaded");const e=null!=t.outlines,{positions:o,mergedPathLengths:r}=W(n),u=performance.now(),{vertices:l,indices:c,outlineIndices:g,outlineRingLengths:h}=s(o,r,3,e),f=performance.now()-u,p=R;if(null!=t.owner&&f>p&&A.add(t.owner),l.length%3!=0)return M("positions-not-multiple-of-3");const{positions:d,outlineIndexBuffer:a,mergedOutlineRingLengths:m}=e?O(n,t.outlines,l,g,h):{positions:l,outlineIndexBuffer:void 0,mergedOutlineRingLengths:void 0};return{succeeded:!0,positions:d,indices:c,outlineIndexBuffer:a,outlineRingLengths:m,vertexCount:d.length/3,method:"libtess"}}function O(n,t,e,o,i){const s=n.polygonVertexCount,r=e.length/3,u=(t??[]).values().filter(n=>n.index>=s).map(n=>({index:r+n.index-s,count:n.count})).toArray();if(0===u.length)return{positions:e,outlineIndexBuffer:o,mergedOutlineRingLengths:i};const g=3*s,h=l(n.positions,g,n.positions.length-g),p=c(e,h),{outlineIndexBuffer:d,outlineRingLengths:a}=S(u,p);return{positions:p,outlineIndexBuffer:f(o,d,p.length/3),mergedOutlineRingLengths:f(i,a,i.length+a.length)}}function k(n,t,e){for(let o=0;o<n.length;o+=3){const i=n[o+t];n[o+t]=n[o+e],n[o+e]=i}}function S(n,t){const e=h(n.length);let o=0;for(let r=0;r<n.length;r++){const i=n[r],s=i.count;if(s<=0){e[r]=0;continue}const u=3*i.index,l=3*(i.index+s-1),c=s>1&&t[u]===t[l]&&t[u+1]===t[l+1]&&t[u+2]===t[l+2]?s-1:s,g=c>0?c+1:0;e[r]=g,o+=g}const i=h(o,t.length/3);let s=0;for(let r=0;r<n.length;r++){const t=e[r];if(0===t)continue;const o=n[r].index,u=t-1;for(let n=0;n<u;n++)i[s++]=o+n;i[s++]=o}return{outlineIndexBuffer:i,outlineRingLengths:e}}function V(n){const t=n.reduce((n,t)=>n+t.pathLengths.length,0),e=new Array(t);let o=0;for(let i=0;i<n.length;i++){const t=n[i].pathLengths;for(let n=0;n<t.length;n++)e[o++]=t[n]}return e}function P(n,{index:t,count:e}){return l(n,3*t,3*e)}function U(n,t,e,o,i,s){let r=s?n.length-1:0;const u=s?-1:1;e*=3;for(let l=0;l<o;++l){const o=n[r];t[e++]=o[0],t[e++]=o[1],t[e++]=i&&null!=o[2]?o[2]:0,r+=u}return e/3}function D(n,t){const e=n.length;if(e<2)return!1;const o=n[0],i=n[e-1];return o[0]===i[0]&&o[1]===i[1]&&(!t||o[2]===i[2])}function H(n,t){return D(n,t)?n.length-1:n.length}function M(n){return{succeeded:!1,message:n}}function W(n){const t=V(n.polygons),e=3*n.polygonVertexCount;return e===n.positions.length?{positions:n.positions,mergedPathLengths:t}:{positions:l(n.positions,0,e),mergedPathLengths:t}}const Z=void 0;export{x as axisFromRings,y as isCounterClockwise,j as load,m as ringsToOutlinedTessellationInfo,v as tessellate,w as tessellateOrLoad,Z as tessellationTestHooks};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{normalize as
|
|
2
|
+
import{clamp as t}from"../../../../core/mathUtils.js";import{normalize as r,copy as n,set as e,dist as s,sub as o,dot as i,scaleAndAdd as u,cross as c,add as f,scale as a,len as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l,fromValues as m,freeze as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as d}from"../../../../geometry/ellipsoidUtils.js";import{getSphericalPCPF as _}from"../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectBuffer as g}from"../../../../geometry/projection/projectBuffer.js";import{projectVec3Array as b}from"../../../../geometry/projection/projectVec3Array.js";import{fromValues as S,signedDistance as M}from"../../../../geometry/support/plane.js";import{Frustum as F}from"../../state/Frustum.js";class R{constructor(t,r){this._renderCoordsHelper=t,this.opaqueGround=r,this._cache=new Map,this._cameraForward=l(),this._cameraEye=l(),this._cameraFovY=55*Math.PI/180,this._frustumBoundingSphereCenter=l(),this._frustumBoundingSphereRadius=0,this._frustum=new F(t),this._renderSR=t.spatialReference;const n=_(this._renderSR);this._renderSREllipsoidRadius=d(n).radius}setup(t){this._aboveGround=t.aboveGround,this._frustum.update(t),r(this._cameraForward,t.viewForward),n(this._cameraEye,t.eye),this._cameraFovY=t.fovY,this._updateFrustumBoundingSphere()}done(){this._cache.clear()}compute(t){if(this._cache.has(t.id))return this._cache.get(t.id);const r=this._isVisibleInFrustum(t);return this._cache.set(t.id,r),r}_isVisibleInFrustum(t){return 2===this._renderCoordsHelper.viewingMode?this._isTileVisibleInFrustumLocal(t):this._isTileVisibleInFrustumGlobal(t)}_updateFrustumBoundingSphere(){const t=this._frustum.boundingSphere;n(this._frustumBoundingSphereCenter,t.center),this._frustumBoundingSphereRadius=t.radius+xt}_isTileVisibleInFrustumLocal(t){const r=t.spatialReference,n=t.extent,c=this._renderSR;if(!n)return!0;if(E[0]=n[0],E[1]=n[1],E[2]=0,E[3]=n[2],E[4]=n[3],E[5]=0,!g(E,r,0,E,c,0))return!1;e(P[0],E[0],E[1],0),e(P[1],E[3],E[1],0),e(P[2],E[3],E[4],0),e(P[3],E[0],E[4],0),e(T,.5*(E[0]+E[3]),.5*(E[1]+E[4]),.5*(E[2]+E[5]));const f=vt,a=.5*s(P[0],P[2]),h=this._frustum,l=this._frustumBoundingSphereRadius,m=this._frustumBoundingSphereCenter,p=z;o(p,m,T);const d=i(f,p),_=W;u(_,T,f,d);if(s(_,m)>a+l)return!1;const b=this._cameraForward,S=i(b,vt),M=this._cameraFovY,F=this._cameraEye;if(Math.abs(S)<Math.abs(Math.cos(.5*M))){let t=!0;const r=e(jt,b[0],b[1],0),n=i(F,r);for(let e=0;e<4;++e){const s=P[e];if(i(s,r)-n>0){t=!1;break}}if(t)return!1}{const t=P[0],r=P[2];if(t[0]<=F[0]&&F[0]<=r[0]&&t[1]<=F[1]&&F[1]<=r[1])return!0}const R=C,v=this.opaqueGround&&this._aboveGround,j=this.opaqueGround&&!this._aboveGround,G=Math.min(j?_t:1/0,d+l),B=Math.max(v?-_t:-1/0,d-l);for(let e=0;e<4;++e)u(R[e],P[e],f,G),u(R[e+4],P[e],f,B);if(q(h.planes,R,8))return!1;if(w(h.planes,R,8))return!0;for(let e=0;e<4;++e){const t=R[e],r=R[e+4];if(Gt(h.planes,t,r))return!0;const n=R[(e+1)%4];if(Gt(h.planes,t,n))return!0;const s=R[4+(e+1)%4];if(Gt(h.planes,r,s))return!0}if(qt[0][3]=+P[0][0],qt[1][3]=-P[2][0],qt[2][3]=+P[0][1],qt[3][3]=-P[2][1],qt[4][3]=+B,qt[5][3]=-G,w(qt,h.points))return!0;for(let e=0;e<4;++e){const t=F,r=h.points[e+4];if(Bt(qt,t,r))return!0;const n=h.points[4+(e+1)%4];if(Bt(qt,r,n))return!0}return!1}_isTileVisibleInFrustumGlobal(n){if(n.level<x)return!0;const l=n.spatialReference,m=n.extent;if(!m||!l)return!0;const p=this.opaqueGround&&this._aboveGround,d=this.opaqueGround&&!this._aboveGround,_=P,g=.5*(m[0]+m[2]);if(e(_[0],m[0],m[1],0),e(_[1],m[2],m[1],0),e(_[2],m[2],m[3],0),e(_[3],m[0],m[3],0),e(_[4],g,m[1],0),e(_[5],g,m[3],0),!b(_,l,0,_,this._renderSR,0,6))return!1;const S=_[0][2]>0,F=_[3][2]<0,R=S||F,B=this._renderSREllipsoidRadius;if(R){const t=k;v(t,wt,_[0]);const r=U;if(v(r,wt,_[1]),S){const n=Y,e=_[4],s=H;v(s,e,wt),v(n,s,e);const o=_[0];c(o,t,n),G(o,B);const i=_[1];c(i,r,n),G(i,B)}else if(F){const n=Y,e=_[5],s=H;v(s,e,wt),v(n,e,s);const o=_[3];c(o,n,t),G(o,B);const i=_[2];c(i,n,r),G(i,B)}}const y=T,w=o(O,_[3],_[0]);r(w,w);const I=f(Q,_[0],_[3]);a(I,I,.5);const C=-i(I,w),E=f(X,_[0],_[1]);a(E,E,.5);const W=f(Z,_[2],_[3]);a(W,W,.5);const z=o($,W,E);r(z,z);const st=-(C+i(w,E))/i(w,z);u(y,E,z,st),G(y,B);const lt=this._frustumBoundingSphereRadius,mt=this._frustumBoundingSphereCenter,pt=this._frustum,vt=pt.planes,jt=L;r(jt,y);const Gt=i(_[0],jt)/h(_[0]),Bt=Math.sqrt(1-Gt*Gt),yt=pt.origin,qt=pt.points;let xt=!1;if(p){xt=!0;const t=r(gt,yt);for(let n=0;n<4;++n){const e=qt[4+n],s=o(St,e,yt);r(s,s);const u=c(Mt,t,s);r(u,u);const f=c(Ft,s,u);r(f,f);if(i(yt,f)>B){xt=!1;break}}if(xt){if(i(yt,jt)<B*Gt-_t)return!1}if(i(t,jt)<-Bt)return!1;{const t=r(bt,pt.direction);if(i(t,jt)>Rt)return!1}}if(Bt>.9)return!0;let It=!1;const Vt=i(jt,mt),Ct=h(mt);if(Ct<=lt&&!vt.some(t=>M(t,D)>0)){if(!p)return!0;It=!0}if(!It&&Vt<=0){if(-Vt>lt)return!1}if(!It&&Ct>lt){const r=t(Vt/Ct,-1,1),n=Math.sqrt(1-r*r),e=t(lt/Ct,0,1);if(n*Math.sqrt(1-e*e)-e*r>Bt)return!1}if(!xt){if(_.some(t=>pt.intersectsPoint(t)))return!0;if(pt.intersectsPoint(y))return!0}const Et=J;o(Et,mt,D);const Pt=i(Et,jt),Tt=A;a(Tt,jt,Pt);const Yt=s(Tt,mt),kt=l.isWGS84,Ut=n.lij,Ht=kt&&Ut[2]===2**Ut[0]-1,Lt=kt&&0===Ut[2],At=Lt?ft:Ht?ut:ot,Wt=Lt?at:Ht?ct:it;if(!It){const t=_,r=ht,n=tt,e=rt,s=D;for(const o of At){const u=t[o];if(j(n,t[(o+1)%4],u),j(e,s,u),v(r,e,n),i(r,jt)>0&&a(r,r,-1),V(r,qt,1))return!1}}let zt=null;if(!p&&Pt<1.01*lt){const t=2.5*lt;if(Yt>Gt*t+lt)return!1;const r=N,n=t/Gt;for(let e=0;e<4;++e)a(r[e],_[e],n/B);e(r[4],0,0,0),zt=r}else{const t=(d?B+_t:Pt+lt)/Gt,r=p?B-_t:(Pt-lt)/Gt,n=K;for(let e=0;e<4;++e){const s=_[e];a(n[e],s,r/B),a(n[e+4],s,t/B)}zt=n}if(q(vt,zt,zt.length))return!1;const Dt=pt.lines,Jt=nt,Kt=et;for(const t of Dt){r(Kt,t.direction);for(const t of Wt){const n=zt[t];if(r(Jt,n),dt(Kt,Jt,zt,qt))return!1;const e=(t+1)%4;if(p){const t=zt[e];if(o(Jt,t,n),r(Jt,Jt),dt(Kt,Jt,zt,qt))return!1}if(d){const n=zt[4+t],s=zt[4+e];if(o(Jt,s,n),r(Jt,Jt),dt(Kt,Jt,zt,qt))return!1}}}return!0}}function v(t,n,e){return c(t,n,e),r(t,t),t}function j(t,n,e){return o(t,n,e),r(t,t),t}function G(t,r){return a(t,t,r/h(t)),t}const B=[0,1,2,3,5];function y(t,r,n){for(let e=0;e<n;++e)if(M(t,r[e])<=0)return!1;return!0}function q(t,r,n){for(const e of B)if(y(t[e],r,n))return!0;return!1}function w(t,r,n=r.length){for(let e=0;e<n;++e){const n=r[e];let s=!0;for(const r of t){if(M(r,n)>0){s=!1;break}}if(s)return!0}return!1}const x=2,I=4;function V(t,r,n){for(const e of r)if(i(e,t)<n)return!1;return!0}const C=[l(),l(),l(),l(),l(),l(),l(),l()],E=[0,0,0,0,0,0],P=[l(),l(),l(),l(),l(),l()],T=l(),Y=l(),k=l(),U=l(),H=l(),L=l(),A=l(),W=l(),z=l(),D=p(0,0,0),J=l(),K=[l(),l(),l(),l(),l(),l(),l(),l()],N=[l(),l(),l(),l(),l()],O=l(),Q=l(),X=l(),Z=l(),$=l(),tt=l(),rt=l(),nt=l(),et=l(),st=l(),ot=[0,1,2,3],it=[0,1,2,3],ut=[0,1,3],ct=[0,1,3],ft=[1,2,3],at=[1,2,3],ht=l();function lt(t,r,n){let e=1/0,s=-1/0;for(const o of n){const t=i(r,o);e=Math.min(e,t),s=Math.max(s,t)}t[0]=e,t[1]=s}function mt(t,r,n,e){let s=1/0,o=-1/0;for(const u of e){const e=i(n,u);if(s=Math.min(s,e),o=Math.max(o,e),s<=r&&o>=t)return!1}return!0}const pt=[0,0];function dt(t,r,n,e){const s=n.length,o=e.length;if(0===s||0===o)return!0;const i=st;v(i,t,r);const u=o<s,c=u?n:e,f=pt;return lt(f,i,u?e:n),mt(f[0],f[1],i,c)}const _t=430,gt=l(),bt=l(),St=l(),Mt=l(),Ft=l(),Rt=Math.cos(.25*Math.PI),vt=m(0,0,1),jt=l();function Gt(t,r,n){const e={t0:0,t1:1};for(const s of B){if(!yt(t[s],r,n,e))return!1}return e.t0<e.t1}function Bt(t,r,n){const e={t0:0,t1:1};for(const s of t){if(!yt(s,r,n,e))return!1}return e.t0<e.t1}function yt(t,r,n,e){let{t0:s,t1:o}=e;const i=M(t,r),u=M(t,n);if(i>=0&&u>=0)return!1;if(i<0&&u>=0){const t=-i/(u-i);if(t<s)return!1;t<o&&(o=t)}else if(i>=0&&u<0){const t=i/(i-u);if(t>o)return!1;t>s&&(s=t)}return e.t0=s,e.t1=o,!0}const qt=[S(-1,0,0,1),S(1,0,0,-1),S(0,-1,0,1),S(0,1,0,-1),S(0,0,-1,1),S(0,0,1,-1)],wt=p(0,0,1),xt=1;export{R as FeatureTileVisibility3D,w as isAnyVertexInPolyhedron,q as isConvexHullOutsideOfFrustum,I as maxLODLevelDelta,x as minTileLOD};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{destroyHandle as o,makeHandle as i}from"../../../../core/handleUtils.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as r,destroyMaybe as n}from"../../../../core/maybe.js";import{debounce as a}from"../../../../core/promiseUtils.js";import{initial as l,watch as d,syncAndInitial as c}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as p}from"../../../../core/units.js";import{property as h,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as _}from"../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/mat2df64.js";import{set as u,transformMat2d as y}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{ControlPointOperations as T}from"../../interactive/editingTools/media/ControlPointOperations.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{KeyBindings as j,mediaKeys as w}from"../../../interactive/keybindings.js";import{acquire as E}from"../../../interactive/snapping/SnappingManagerPool.js";const O=Symbol(),M=Symbol(),P=1,S=10;let H=class extends t{get editSourcePoints(){return!!this.options?.reshapeOptions.editSourcePoints!==this._isEditSourcePointsToggled}get updating(){return this._updatingHandles.updating}get _preferredInteractionTool(){return this.options?.tool??"transform"}get _toolType(){switch(this._preferredInteractionTool){case"transform":return"transform-3d";case"reshape":return"reshape-3d"}}get _validatedSelectedElement(){const e=this.selectedElement;if(!e)return null;const{layer:{source:t}}=this;return t?"hasElement"in t?t.hasElement(e)?e:null:t===e?e:null:null}constructor(e){super(e),this.enabled=!1,this._isEditSourcePointsToggled=!1,this._updatingHandles=new v,this._isOpacityToggled=!1,this._factor=P,this._tool=null,this._object=null,this._createToolAbortController=null,this._onPointerMove=a(async e=>{const t=await this._updatingHandles.addPromise(this._findElementAtScreenPoint(e));this.destroyed||(this.removeHandles(M),t&&t!==this.selectedElement&&this.addHandles(this.view.acquireCursor("pointer","high"),M))}),this._tmpMat2=g(),this._tmpVec2=f()}destroy(){this._createToolAbortController=r(this._createToolAbortController)}initialize(){this.addHandles([o(this._updatingHandles),this._updatingHandles.add(()=>this.enabled,e=>this._enableDisable(e),l),this._updatingHandles.add(()=>this._preferredInteractionTool,e=>this._preferredInteractionToolChanged(e))])}_enableDisable(e){if(!e)return void this.removeHandles(O);this._dynamicImports();const{view:t}=this,o=new j;o.add(w.undo,()=>{this._object?.operations?.undo(),this._object?.emit("modified-externally")}),o.add(w.redo,()=>{this._object?.operations?.redo(),this._object?.emit("modified-externally")}),o.addToggle(w.preserveAspectRatio,e=>{"transform-3d"===this._tool?.type&&(this._tool.preserveAspectRatio="key-down"===e.type)}),o.addToggle(w.editSourcePoints,e=>{"reshape-3d"===this._tool?.type&&(this._isEditSourcePointsToggled="key-down"===e.type)}),o.addToggle(w.rotateIncrements,e=>{"transform-3d"===this._tool?.type&&(this._tool.snapRotation="key-down"===e.type)}),o.add(w.toggleOpacity,()=>{const e=this._object?.element;e&&(e.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)}),o.add(w.moveUp,()=>this._move(0,this._factor)),o.add(w.moveDown,()=>this._move(0,-this._factor)),o.add(w.moveRight,()=>this._move(this._factor,0)),o.add(w.moveLeft,()=>this._move(-this._factor,0)),o.addToggle(w.factorModifier,e=>this._factor="key-down"===e.type?S:P),this._isOpacityToggled=!1,this.addHandles([o.register(t,b.TOOL),i(()=>{this._isOpacityToggled&&this.selectedElement&&(this.selectedElement.opacity*=2,this._isOpacityToggled=!1)}),t.on("immediate-click",e=>this._onClick(e),b.TOOL),t.on("pointer-move",e=>this._onPointerMove(e).catch(()=>{}),b.TOOL),this._updatingHandles.add(()=>this._validatedSelectedElement,(e,t)=>{t&&e!==t&&this._isOpacityToggled&&(t.opacity*=2,this._isOpacityToggled=!1),this._selectedElementChanged(e)},l),i(()=>{this.removeHandles(M),this._removeTool()})],O)}async _onClick(e){await this._updatingHandles.addPromise(e.defer(async()=>{const t=await this._findElementAtScreenPoint(e);this.destroyed||(t&&e.stopPropagation(),this.selectedElement=t,this.selectedElement&&this.removeHandles(M))}))}async _selectedElementChanged(e){e?.georeference?this._object?.element!==e&&await this._updatingHandles.addPromise(this._recreateTool()):this._removeTool()}async _recreateTool(){this._createToolAbortController=r(this._createToolAbortController),this._removeTool();const e=this._validatedSelectedElement;if(!e)return;const t=new AbortController;this._createToolAbortController=t;const{ManipulatedObject3DMediaElement:o,ExtentTransformTool:s,ReshapeTool3D:a}=await this._dynamicImports();if(t.signal.aborted)return;const{view:l,layer:p,_toolType:h}=this;switch(this._object=new o({view:l,layer:p,element:e,tool:this._preferredInteractionTool}),h){case"transform-3d":this._tool=new s({view:l,object:this._object}),l.inputManager.isModifierKeyDown(w.rotateIncrements.key)&&(this._tool.snapRotation=!0),l.inputManager.isModifierKeyDown(w.preserveAspectRatio.key)&&(this._tool.preserveAspectRatio=!0);break;case"reshape-3d":{const e=E(l),{snappingManager:t}=e;this._tool=new a({view:l,object:this._object,enableMidpoints:!1,enableZShape:!1,snappingManager:t,enableMoveObject:!1,autoHideManipulators:!0,enableDeleteVertices:!1,
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{destroyHandle as o,makeHandle as i}from"../../../../core/handleUtils.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as r,destroyMaybe as n}from"../../../../core/maybe.js";import{debounce as a}from"../../../../core/promiseUtils.js";import{initial as l,watch as d,syncAndInitial as c}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as p}from"../../../../core/units.js";import{property as h,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as _}from"../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/mat2df64.js";import{set as u,transformMat2d as y}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{ControlPointOperations as T}from"../../interactive/editingTools/media/ControlPointOperations.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{KeyBindings as j,mediaKeys as w}from"../../../interactive/keybindings.js";import{acquire as E}from"../../../interactive/snapping/SnappingManagerPool.js";const O=Symbol(),M=Symbol(),P=1,S=10;let H=class extends t{get editSourcePoints(){return!!this.options?.reshapeOptions.editSourcePoints!==this._isEditSourcePointsToggled}get updating(){return this._updatingHandles.updating}get _preferredInteractionTool(){return this.options?.tool??"transform"}get _toolType(){switch(this._preferredInteractionTool){case"transform":return"transform-3d";case"reshape":return"reshape-3d"}}get _validatedSelectedElement(){const e=this.selectedElement;if(!e)return null;const{layer:{source:t}}=this;return t?"hasElement"in t?t.hasElement(e)?e:null:t===e?e:null:null}constructor(e){super(e),this.enabled=!1,this._isEditSourcePointsToggled=!1,this._updatingHandles=new v,this._isOpacityToggled=!1,this._factor=P,this._tool=null,this._object=null,this._createToolAbortController=null,this._onPointerMove=a(async e=>{const t=await this._updatingHandles.addPromise(this._findElementAtScreenPoint(e));this.destroyed||(this.removeHandles(M),t&&t!==this.selectedElement&&this.addHandles(this.view.acquireCursor("pointer","high"),M))}),this._tmpMat2=g(),this._tmpVec2=f()}destroy(){this._createToolAbortController=r(this._createToolAbortController)}initialize(){this.addHandles([o(this._updatingHandles),this._updatingHandles.add(()=>this.enabled,e=>this._enableDisable(e),l),this._updatingHandles.add(()=>this._preferredInteractionTool,e=>this._preferredInteractionToolChanged(e))])}_enableDisable(e){if(!e)return void this.removeHandles(O);this._dynamicImports();const{view:t}=this,o=new j;o.add(w.undo,()=>{this._object?.operations?.undo(),this._object?.emit("modified-externally")}),o.add(w.redo,()=>{this._object?.operations?.redo(),this._object?.emit("modified-externally")}),o.addToggle(w.preserveAspectRatio,e=>{"transform-3d"===this._tool?.type&&(this._tool.preserveAspectRatio="key-down"===e.type)}),o.addToggle(w.editSourcePoints,e=>{"reshape-3d"===this._tool?.type&&(this._isEditSourcePointsToggled="key-down"===e.type)}),o.addToggle(w.rotateIncrements,e=>{"transform-3d"===this._tool?.type&&(this._tool.snapRotation="key-down"===e.type)}),o.add(w.toggleOpacity,()=>{const e=this._object?.element;e&&(e.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)}),o.add(w.moveUp,()=>this._move(0,this._factor)),o.add(w.moveDown,()=>this._move(0,-this._factor)),o.add(w.moveRight,()=>this._move(this._factor,0)),o.add(w.moveLeft,()=>this._move(-this._factor,0)),o.addToggle(w.factorModifier,e=>this._factor="key-down"===e.type?S:P),this._isOpacityToggled=!1,this.addHandles([o.register(t,b.TOOL),i(()=>{this._isOpacityToggled&&this.selectedElement&&(this.selectedElement.opacity*=2,this._isOpacityToggled=!1)}),t.on("immediate-click",e=>this._onClick(e),b.TOOL),t.on("pointer-move",e=>this._onPointerMove(e).catch(()=>{}),b.TOOL),this._updatingHandles.add(()=>this._validatedSelectedElement,(e,t)=>{t&&e!==t&&this._isOpacityToggled&&(t.opacity*=2,this._isOpacityToggled=!1),this._selectedElementChanged(e)},l),i(()=>{this.removeHandles(M),this._removeTool()})],O)}async _onClick(e){await this._updatingHandles.addPromise(e.defer(async()=>{const t=await this._findElementAtScreenPoint(e);this.destroyed||(t&&e.stopPropagation(),this.selectedElement=t,this.selectedElement&&this.removeHandles(M))}))}async _selectedElementChanged(e){e?.georeference?this._object?.element!==e&&await this._updatingHandles.addPromise(this._recreateTool()):this._removeTool()}async _recreateTool(){this._createToolAbortController=r(this._createToolAbortController),this._removeTool();const e=this._validatedSelectedElement;if(!e)return;const t=new AbortController;this._createToolAbortController=t;const{ManipulatedObject3DMediaElement:o,ExtentTransformTool:s,ReshapeTool3D:a}=await this._dynamicImports();if(t.signal.aborted)return;const{view:l,layer:p,_toolType:h}=this;switch(this._object=new o({view:l,layer:p,element:e,tool:this._preferredInteractionTool}),h){case"transform-3d":this._tool=new s({view:l,object:this._object}),l.inputManager.isModifierKeyDown(w.rotateIncrements.key)&&(this._tool.snapRotation=!0),l.inputManager.isModifierKeyDown(w.preserveAspectRatio.key)&&(this._tool.preserveAspectRatio=!0);break;case"reshape-3d":{const e=E(l),{snappingManager:t}=e;this._tool=new a({view:l,object:this._object,enableMidpoints:!1,enableZShape:!1,snappingManager:t,enableMoveObject:!1,autoHideManipulators:!0,enableDeleteVertices:!1,toolOptions:{tooltips:{enabled:!0,inputEnabled:!0,visibleElements:{area:!1}}}}),this.addHandles([e,d(()=>({editSourcePoints:this.editSourcePoints,operations:this._object?.operations}),e=>{e.operations instanceof T&&(e.operations.editSourcePoints=e.editSourcePoints)},c)],this._tool)}}this.addHandles([i(()=>{this._object=n(this._object),this._tool&&(l.tools.remove(this._tool),this._tool=null)})],this._tool),l.addAndActivateTool(this._tool)}_preferredInteractionToolChanged(e){const{_tool:t}=this;if(!t)return;if(this._toolType!==t.type)return void this._updatingHandles.consumePromise(this._recreateTool());const{_object:o}=this;o&&(o.tool=e)}async _dynamicImports(){const[{ManipulatedObject3DMediaElement:e},{ExtentTransformTool:t,ReshapeTool3D:o}]=await Promise.all([import("../../interactive/editingTools/ManipulatedObject3DMediaElement.js"),import("../../interactive/editingTools.js")]);return{ManipulatedObject3DMediaElement:e,ExtentTransformTool:t,ReshapeTool3D:o}}async _findElementAtScreenPoint(e){const t=(await this.view.hitTest(e,{include:[this.layer]})).results[0];return"media"===t?.type?t.element:null}_removeTool(){this._tool&&this.removeHandles(this._tool)}_move(e,t){const{view:o,_object:i}=this,r=i?.operations;if(!r)return;const n=o.overlayPixelSizeInMapUnits(o.pointsOfInterest.focus.location)*p(o.spatialReference)/p(r.data.spatialReference),{_tmpMat2:a,_tmpVec2:l}=this,d=_(a,s(360-this.view.camera.heading)),c=u(l,n*e,n*t);y(c,c,d),r.move(c[0],c[1],0),i.emit("modified-externally")}};e([h({constructOnly:!0})],H.prototype,"view",void 0),e([h({constructOnly:!0})],H.prototype,"layer",void 0),e([h()],H.prototype,"selectedElement",void 0),e([h()],H.prototype,"enabled",void 0),e([h()],H.prototype,"options",void 0),e([h()],H.prototype,"editSourcePoints",null),e([h()],H.prototype,"_isEditSourcePointsToggled",void 0),e([h()],H.prototype,"updating",null),e([h()],H.prototype,"_preferredInteractionTool",null),e([h()],H.prototype,"_validatedSelectedElement",null),H=e([m("esri.views.3d.layers.support.MediaLayerInteraction")],H);export{H as MediaLayerInteraction};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{watch as t,syncAndInitial as s,when as i,sync as l}from"../../../../core/reactiveUtils.js";import{throttle as a}from"../../../../core/throttle.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{clone as n,create as d}from"../../../../geometry/support/aaBoundingRect.js";import h from"../../layers/FlowSubView3D.js";import{getFeatureTileId as u}from"../../layers/support/FeatureTileDescriptor.js";import{tilesWaitingTime as c}from"./constants.js";import{FlowDataTile as p}from"./loadUtils.js";import{isRasterTile as f}from"../../terrain/TerrainData.js";import{descendantsAtLevel as T}from"../../terrain/tileUtils.js";import{toFlowData as _}from"../../../support/flow/dataUtils.js";const m={type:"delete"};let g=class extends h{constructor(e){super(e),this._flowDataTiles=D(),this._throttling=!1,this._resetTileData=!0}initialize(){this.addHandles([this.surface.on("tile-data-changed",({tile:e,layerIndex:t,layerClass:s})=>{if(t!==this._layerIndex||1!==s)return;const i=this.frameTask.schedule(()=>{this._applyTileDataUpdate(e)&&this.triggerLoad()});this.updatingHandles.consumePromise(i)}),t(()=>this.renderedTiles,e=>{const t=this.frameTask.scheduleGenerator(this.loadAllTiles?t=>this._applyTileDataUpdates(e,t):t=>this._syncToTiles(e,t));this.updatingHandles.consumePromise(t)},s),i(()=>null!=this.renderedTiles&&null!=this.extent&&this.loadAllTiles,()=>{const e=this.frameTask.scheduleGenerator(e=>this._enterAllTilesMode(e));this.updatingHandles.consumePromise(e)},s),t(()=>this._pixelSize,()=>{this.invalidateTileData(),this._resetTileData=!0},l),this.layerView.on("data-changed",()=>{this.invalidateTileData(),this._resetTileData=!0})]),this._throttledTriggerLoad=a(()=>{super.triggerLoad(),this._throttling=!1},()=>this._throttling=!0,c,this),this.addHandles(this._throttledTriggerLoad)}clear(){super.clear(),this._resetTileData=!1}*_enterAllTilesMode(e){const{targetTiles:t,_flowDataTiles:s}=this,i=D();for(const[l,a]of s)t.has(l)&&i.set(l,a);this._setFlowDataTiles(i),e.madeProgress(),e.done&&(e=yield),yield*this._applyTileDataUpdates(new Set(this.surface.allTiles),e),this.triggerLoad()}*_syncToTiles(e,t){const s=D();for(const i of e??[]){const e=this._flowDataTiles.get(i.key),l=null==e||"delete"===e.type||"invalid"===e.type?this._getLoadedState(i):e;null!=l&&s.set(i.key,l),t.madeProgress(),t.done&&(t=yield)}this._setFlowDataTiles(s),this.triggerLoad()}*_applyTileDataUpdates(e,t){let s=!1;for(const i of e??[]){const e=this._applyTileDataUpdate(i);s||=e,t.madeProgress(),t.done&&(t=yield)}s&&this.triggerLoad()}abort(){super.abort(),this._throttling=!1}get _layerIndex(){return this.surface.getLayerIndexByUID(1,this.layerView.uid)}get _pixelSize(){return this.surface.tilingScheme.pixelSize}doRefresh(){this.invalidateTileData(),super.doRefresh()}triggerLoad(){const{_throttledTriggerLoad:e}=this;null!=e?this._allTilesLoaded?(e.hasPendingUpdates()||e(),e.forceUpdate()):e():super.triggerLoad()}async fetchDataAndGenerateStreamlines(e,t){const{_flowDataTiles:s,needsMagnitude:i}=this,l=this.getSimulationSettings(e);if(null==l)return;const a=this._resetTileData;if(!a&&0===s.size)return;const r=D();s.forEach((e,t)=>{"delete"===e.type?(r.set(t,m),s.delete(t)):(a||"on-worker"!==e.type&&"invalid"!==e.type)&&(r.set(t,e),s.set(t,"invalid"===e.type?{type:"invalid",memory:e.memory}:{type:"on-worker",sourceLevel:e.sourceLevel,memory:e.memory}))});const o={simulationSettings:l,flowExtentInfo:e.flowExtentInfo,flowDataTiles:r,reset:a,needsMagnitude:i,startPositions:this.startPositions(e)};this._resetTileData=!1;const{streamlines:n}=await this.workerHandle.generateTiledStreamlines(o,t);return n}hasWork(){const e=!this.suspended&&super.loadRequirementsMet&&this.tilesIntersectDataBounds;return super.hasWork()||this._throttling||this._resetTileData&&e}get loadRequirementsMet(){return super.loadRequirementsMet&&(this._flowDataTiles.size>0||this._resetTileData)}_getLoadedState(e){const{_layerIndex:t}=this;if(null==t||e.isDisposed)return null;const s=e.getLayerInfo(t,1);if(null==s)return null;const i=this._getRasterTile(s,e,t);if(null==i)return this._upsampleFlowData(t,s.upsampleInfo,e.lij,e.extent);const l=this._createFlowDataTile(i,e.lij,e.extent,this._pixelSize);return{type:"loaded",memory:v(l),data:l,sourceLevel:e.level}}_upsampleFlowData(e,t,s,i){if(null==t)return null;const l=t.tile;if(null==l)return null;const a=l.getLayerInfo(e,1);if(null==a)return null;const r=this._getRasterTile(a,l,e);if(null==r)return null;const{scale:o,offset:n}=t,d=Math.max(Math.floor(this._pixelSize*o),1),h=r.source,u=Math.floor(n[0]*h.width),c=Math.floor((1-n[1]-o)*h.height),p=this._createFlowDataTile(r,s,i,d,u,c);return{type:"loaded",memory:v(p),data:p,sourceLevel:l.level}}_getRasterTile(e,t,s){const{data:i}=e;return!e.dataMissing&&t.hasLayerData(s,1)&&f(i)?i:null}_createFlowDataTile(e,t,s,i,l,a){const r=_(this.layer.serviceRasterInfo.dataType,e.source,i,i,l,a),o=r.mask.slice();return new p(r.data,o,r.width,r.height,t,n(s))}_applyTileDataUpdate(e){const{renderedTiles:t,_layerIndex:s,loadAllTiles:i,loadAllTilesLevel:l}=this;if(null==t||null==s||i&&e.level>l)return!1;if(t.has(e))return this._updateRenderedTile(e);const a=e.key;let r=this._setTileData(a,m);const o=this._updateUpsampledTiles(t,e,s);r||=o;const n=i&&this._updateDescendants(e,s);return r||=n,r}_updateRenderedTile(e){const t=e.key,{_flowDataTiles:s}=this;if(w(s.get(t),e))return!1;const i=this._getLoadedState(e);return this._setTileData(t,i)}_updateUpsampledTiles(e,t,s){const{_flowDataTiles:i}=this;let l=!1;for(const a of e.values()){const e=a.key;if(w(i.get(e),t))continue;const r=a.getLayerInfo(s,1);if(null==r)continue;if(null!=this._getRasterTile(r,a,s))continue;const o=r.upsampleInfo?.tile;if(o!==t)continue;const n=this._getLoadedState(a),d=this._setTileData(e,n);l||=d}return l}_updateDescendants(e,t){let s=!1;const{tilingScheme:i,upsampleInfoPool:l}=this.surface,{targetTiles:a,_flowDataTiles:r,loadAllTilesLevel:o}=this,n=e.lij,h=T(n,o).map(e=>[u(e[0],e[1],e[2]),e]).filter(([e])=>a.has(e));if(0===h.length)return s;const c=1<<o-n[0],p=1/c,f=n[1]*c,_=n[2]*c,m=l.acquire();for(const[u,T]of h){if(w(r.get(u),e))continue;const l=d();i.getExtent(T[0],T[1],T[2],l);const a=1-(T[1]-f)*p-p,o=(T[2]-_)*p;m.init(e,o,a,p);const n=this._upsampleFlowData(t,m,T,l),h=this._setTileData(u,n);s||=h}return l.release(m),s}_setTileData(e,t){if(null==t)return!1;const{_flowDataTiles:s}=this;return(null!=s.get(e)||"delete"!==t.type)&&(s.set(e,t),!0)}_setFlowDataTiles(e){const t=this._flowDataTiles.size!==e.size||e.entries().some(([e,t])=>this._flowDataTiles.get(e)!==t);this._flowDataTiles=e,t&&(this._resetTileData=!0)}get _allTilesLoaded(){let e=0;for(const t of this._flowDataTiles.values()??[])"delete"!==t.type&&"invalid"!==t.type&&e++;return this.loadAllTiles?e===this.targetTiles.size:e===this.renderedTiles?.size}invalidateTileData(){const{_flowDataTiles:e}=this;for(const[t,s]of e.entries())"delete"!==s.type&&e.set(t,{type:"invalid",memory:s.memory})}get usedMemory(){let e=0;return this._flowDataTiles.forEach(t=>{"delete"!==t.type&&(e+=t.memory)}),super.usedMemory+e}get test(){return{...super.test,loadedTiles:this._flowDataTiles}}};e([r()],g.prototype,"_throttling",void 0),e([r()],g.prototype,"_resetTileData",void 0),g=e([o("esri.views.3d.support.flow.FlowSubViewTiles3D")],g);const y=g;function D(){return new Map}function w(e,t){return null!=e&&("loaded"===e.type||"on-worker"===e.type)&&e.sourceLevel>=t.level}function v(e){return e.width*e.height*9}export{y as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{watch as t,syncAndInitial as s,when as i,sync as l}from"../../../../core/reactiveUtils.js";import{throttle as a}from"../../../../core/throttle.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{clone as n,create as d}from"../../../../geometry/support/aaBoundingRect.js";import h from"../../layers/FlowSubView3D.js";import{getFeatureTileId as u}from"../../layers/support/FeatureTileDescriptor.js";import{tilesWaitingTime as c}from"./constants.js";import{FlowDataTile as p}from"./loadUtils.js";import{isRasterTile as f}from"../../terrain/TerrainData.js";import{descendantsAtLevel as T}from"../../terrain/tileUtils.js";import{toFlowData as _}from"../../../support/flow/dataUtils.js";const m={type:"delete"};let g=class extends h{constructor(e){super(e),this._flowDataTiles=D(),this._throttling=!1,this._resetTileData=!0}initialize(){this.addHandles([this.surface.on("tile-data-changed",({tile:e,layerIndex:t,layerClass:s})=>{if(t!==this._layerIndex||1!==s)return;const i=this.frameTask.schedule(()=>{this._applyTileDataUpdate(e)&&this.triggerLoad()});this.updatingHandles.consumePromise(i)}),t(()=>this.renderedTiles,e=>{const t=this.frameTask.scheduleGenerator(this.loadAllTiles?t=>this._applyTileDataUpdates(e,t):t=>this._syncToTiles(e,t));this.updatingHandles.consumePromise(t)},s),i(()=>null!=this.renderedTiles&&null!=this.extent&&this.loadAllTiles,()=>{const e=this.frameTask.scheduleGenerator(e=>this._enterAllTilesMode(e));this.updatingHandles.consumePromise(e)},s),t(()=>this._pixelSize,()=>{this.invalidateTileData(),this._resetTileData=!0},l),this.layerView.on("data-changed",()=>{this.invalidateTileData(),this._resetTileData=!0})]),this._throttledTriggerLoad=a(()=>{super.triggerLoad(),this._throttling=!1},()=>this._throttling=!0,c,this),this.addHandles(this._throttledTriggerLoad)}clear(){super.clear(),this._resetTileData=!1}*_enterAllTilesMode(e){const{targetTiles:t,_flowDataTiles:s}=this,i=D();for(const[l,a]of s)t.has(l)&&i.set(l,a);this._setFlowDataTiles(i),e.madeProgress(),e.done&&(e=yield),yield*this._applyTileDataUpdates(new Set(this.surface.allTiles),e),this.triggerLoad()}*_syncToTiles(e,t){const s=D();for(const i of e??[]){const e=this._flowDataTiles.get(i.key),l=null==e||"delete"===e.type||"invalid"===e.type?this._getLoadedState(i):e;null!=l&&s.set(i.key,l),t.madeProgress(),t.done&&(t=yield)}this._setFlowDataTiles(s),this.triggerLoad()}*_applyTileDataUpdates(e,t){let s=!1;for(const i of e??[]){const e=this._applyTileDataUpdate(i);s||=e,t.madeProgress(),t.done&&(t=yield)}s&&this.triggerLoad()}abort(){super.abort(),this._throttling=!1}get _layerIndex(){return this.surface.getLayerIndexByUID(1,this.layerView.uid)}get _pixelSize(){return this.surface.tilingScheme.pixelSize}doRefresh(){this.invalidateTileData(),super.doRefresh()}triggerLoad(){const{_throttledTriggerLoad:e}=this;null!=e?this._allTilesLoaded?(e.hasPendingUpdates()||e(),e.forceUpdate()):e():super.triggerLoad()}async fetchDataAndGenerateStreamlines(e,t){const{_flowDataTiles:s,needsMagnitude:i}=this,l=this.getSimulationSettings(e);if(null==l)return;const a=this._resetTileData;if(!a&&0===s.size)return;const r=D();s.forEach((e,t)=>{"delete"===e.type?(r.set(t,m),s.delete(t)):(a||"on-worker"!==e.type&&"invalid"!==e.type)&&(r.set(t,e),s.set(t,"invalid"===e.type?{type:"invalid",memory:e.memory}:{type:"on-worker",sourceLevel:e.sourceLevel,memory:e.memory}))});const o={simulationSettings:l,flowExtentInfo:e.flowExtentInfo,flowDataTiles:r,reset:a,needsMagnitude:i,startPositions:this.startPositions(e)};this._resetTileData=!1;const{streamlines:n}=await this.workerHandle.generateTiledStreamlines(o,t);return n}hasWork(){const e=!this.suspended&&super.loadRequirementsMet&&this.tilesIntersectDataBounds;return super.hasWork()||this._throttling||this._resetTileData&&e}get loadRequirementsMet(){return super.loadRequirementsMet&&(this._flowDataTiles.size>0||this._resetTileData)}_getLoadedState(e){const{_layerIndex:t}=this;if(null==t||e.isDisposed)return null;const s=e.getLayerInfo(t,1);if(null==s)return null;const i=this._getRasterTile(s,e,t);if(null==i)return this._upsampleFlowData(t,s.upsampleInfo,e.lij,e.extent);const l=this._createFlowDataTile(i,e.lij,e.extent,this._pixelSize);return{type:"loaded",memory:v(l),data:l,sourceLevel:e.level}}_upsampleFlowData(e,t,s,i){if(null==t)return null;const l=t.tile;if(null==l)return null;const a=l.getLayerInfo(e,1);if(null==a)return null;const r=this._getRasterTile(a,l,e);if(null==r)return null;const{scale:o,offset:n}=t,d=Math.max(Math.floor(this._pixelSize*o),1),h=r.source,u=Math.floor(n[0]*h.width),c=Math.floor((1-n[1]-o)*h.height),p=this._createFlowDataTile(r,s,i,d,u,c);return{type:"loaded",memory:v(p),data:p,sourceLevel:l.level}}_getRasterTile(e,t,s){const{data:i}=e;return!e.dataMissing&&t.hasLayerData(s,1)&&f(i)?i:null}_createFlowDataTile(e,t,s,i,l,a){const r=_(this.layer.serviceRasterInfo.dataType,e.source,i,i,l,a),o=r.mask.slice();return new p(r.data,o,r.width,r.height,t,n(s))}_applyTileDataUpdate(e){const{renderedTiles:t,_layerIndex:s,loadAllTiles:i,loadAllTilesLevel:l}=this;if(null==t||null==s||i&&e.level>l)return!1;if(t.has(e))return this._updateRenderedTile(e);const a=e.key;let r=this._setTileData(a,m);const o=this._updateUpsampledTiles(t,e,s);r||=o;const n=i&&this._updateDescendants(e,s);return r||=n,r}_updateRenderedTile(e){const t=e.key,{_flowDataTiles:s}=this;if(w(s.get(t),e))return!1;const i=this._getLoadedState(e);return this._setTileData(t,i)}_updateUpsampledTiles(e,t,s){const{_flowDataTiles:i}=this;let l=!1;for(const a of e.values()){const e=a.key;if(w(i.get(e),t))continue;const r=a.getLayerInfo(s,1);if(null==r)continue;if(null!=this._getRasterTile(r,a,s))continue;const o=r.upsampleInfo?.tile;if(o!==t)continue;const n=this._getLoadedState(a),d=this._setTileData(e,n);l||=d}return l}_updateDescendants(e,t){let s=!1;const{tilingScheme:i,upsampleInfoPool:l}=this.surface,{targetTiles:a,_flowDataTiles:r,loadAllTilesLevel:o}=this,n=e.lij,h=T(n,o).values().map(e=>[u(e[0],e[1],e[2]),e]).filter(([e])=>a.has(e)).toArray();if(0===h.length)return s;const c=1<<o-n[0],p=1/c,f=n[1]*c,_=n[2]*c,m=l.acquire();for(const[u,T]of h){if(w(r.get(u),e))continue;const l=d();i.getExtent(T[0],T[1],T[2],l);const a=1-(T[1]-f)*p-p,o=(T[2]-_)*p;m.init(e,o,a,p);const n=this._upsampleFlowData(t,m,T,l),h=this._setTileData(u,n);s||=h}return l.release(m),s}_setTileData(e,t){if(null==t)return!1;const{_flowDataTiles:s}=this;return(null!=s.get(e)||"delete"!==t.type)&&(s.set(e,t),!0)}_setFlowDataTiles(e){const t=this._flowDataTiles.size!==e.size||e.entries().some(([e,t])=>this._flowDataTiles.get(e)!==t);this._flowDataTiles=e,t&&(this._resetTileData=!0)}get _allTilesLoaded(){let e=0;for(const t of this._flowDataTiles.values()??[])"delete"!==t.type&&"invalid"!==t.type&&e++;return this.loadAllTiles?e===this.targetTiles.size:e===this.renderedTiles?.size}invalidateTileData(){const{_flowDataTiles:e}=this;for(const[t,s]of e.entries())"delete"!==s.type&&e.set(t,{type:"invalid",memory:s.memory})}get usedMemory(){let e=0;return this._flowDataTiles.forEach(t=>{"delete"!==t.type&&(e+=t.memory)}),super.usedMemory+e}get test(){return{...super.test,loadedTiles:this._flowDataTiles}}};e([r()],g.prototype,"_throttling",void 0),e([r()],g.prototype,"_resetTileData",void 0),g=e([o("esri.views.3d.support.flow.FlowSubViewTiles3D")],g);const y=g;function D(){return new Map}function w(e,t){return null!=e&&("loaded"===e.type||"on-worker"===e.type)&&e.sourceLevel>=t.level}function v(e){return e.width*e.height*9}export{y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../Graphic.js";import{isIterable as n}from"../../../core/iteratorUtils.js";import{screenPointObjectToArray as t,isScreenPolygon as i,isScreenRect as r,createScreenPointArray as s,createScreenPoint as o}from"../../../core/screenUtils.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import
|
|
2
|
+
import e from"../../../Graphic.js";import{isIterable as n}from"../../../core/iteratorUtils.js";import{screenPointObjectToArray as t,isScreenPolygon as i,isScreenRect as r,createScreenPointArray as s,createScreenPoint as o}from"../../../core/screenUtils.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import a from"../../../geometry/Point.js";import c from"../../../geometry/SpatialReference.js";import{projectVectorToVector as u}from"../../../geometry/projection/projectVectorToVector.js";import{Sphere as d,sphereCSO as p}from"../../../geometry/support/sphere.js";import{fallbackObjectIDAttribute as f}from"../../../layers/LayerConstants.js";import{isIntegratedMeshLayer as m}from"../../../layers/support/layerUtils.js";import{debugFlags as g}from"./debugFlags.js";import{getElevationAtPoint as y}from"./ElevationProvider.js";import{getGraphicHitDedupeKey as h,resolveOrderedIntersectionHits as w}from"./intersectionHitUtils.js";import{Intersector as b}from"../webgl-engine/lib/Intersector.js";import{isValidIntersectorResultRay as S}from"../webgl-engine/lib/IntersectorResult.js";import{toHit as x,toOwner as E}from"../webgl-engine/lib/intersectorUtilsConversions.js";import{terrainId as U}from"../webgl-engine/lib/verticalOffsetUtils.js";async function j(e,n,t,o){const l=t?C(e,t):o;if(i(n))return I(e,n,l,t?.excludeLabels);if(r(n))return I(e,V(n),l,t?.excludeLabels);const a=n,c=s(a.x,a.y);l.requiresGroundFeedback=!0,l.enableDraped=!0;const u=new b(e.state.viewingMode);u.options.selectionMode=!0,u.options.store=2,u.options.excludeLabels=t?.excludeLabels??!1,e.sceneIntersectionHelper.intersectIntersectorScreen(c,u,l);const d=await Array.fromAsync(M(e,u.results.all,l.graphics,{getDistance:e=>e.distanceInRenderSpace,getMapPoint:n=>L(e,n),stopAtSupportSurface:!0})),p=u.results.ground,f=E(p,e),y=null!=f&&"type"in f&&m(f)?f:null,h={screenPoint:a,results:d,ground:{mapPoint:L(e,p),distance:S(p)?p.distanceInRenderSpace:0,layer:y}};return g.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=u),h}async function I(e,n,i,r){i.enableDraped=!0;const s=new b(e.state.viewingMode);s.options.selectionMode=!0,s.options.store=2,s.options.excludeLabels=r??!1,await e.sceneIntersectionHelper.intersectIntersectorScreenPolygon(n.map(e=>t(e)),s,i);const o=new Array;await e.sceneIntersectionHelper.screenPolygonIntersectionTask.scheduleGenerator(async function*(n){for await(const t of M(e,R(e,s.polygonResults.all),i.graphics,{getDistance:e=>e.distance,getMapPoint:()=>null}))o.push(t),n.madeProgress()&&(n=yield)});const l={screenPoint:null,results:o,ground:{mapPoint:null,distance:0,layer:null}};return g.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(l.intersector=s),l}function*R(e,n){const t=T(e);if(null!=t)for(const i of n)null!=i.distance&&i.distance<=t&&(yield i);else yield*n}function T(e){const n=e.basemapTerrain,t=e.state.camera;if(1!==e.state.viewingMode||!t.aboveGround||!n?.opaque)return null;z.radius=n.getLowerBoundRadius();return p.distanceToSilhouette(z,t.eye)*F}function V(e){return[o(e.x,e.y),o(e.x+e.width,e.y),o(e.x+e.width,e.y+e.height),o(e.x,e.y+e.height)]}function P(e,n,i,r){const s=i?C(e,i):r,o=!(!s.graphics?.include&&!s.graphics?.exclude),l=!(!s.mediaElements?.include&&!s.mediaElements?.exclude),a=t(n);s.enableDraped=s.include&&!s.include.has(U)||s.exclude?.has(U);const c=e.sceneIntersectionHelper,u=new b(e.state.viewingMode);if(u.options.selectionMode=!0,u.options.store=o||l?2:0,u.options.excludeLabels=i?.excludeLabels??!1,c.intersectIntersectorScreen(a,u,s),o||l){for(const n of u.results.all){const t=x(n,e);if(null==t)return L(e,n);if(o&&("graphic"!==t.type||G(s.graphics,t.graphic)))return L(e,n);if(l&&("media"!==t.type||H(s.mediaElements,t.element)))return L(e,n)}return null}return L(e,u.results.min)}async function*M(e,n,t,i){const r=w(e,i.stopAtSupportSurface?function*(){for(const t of n){yield t;const n=E(t,e);if(null!=n&&(n===e.map.ground||"type"in n&&m(n)))break}}():n,{getDedupeKey:e=>"graphic"===e.type?v(e.graphic):null,filterHit:e=>"graphic"!==e.type||G(t,e.graphic)});for await(const{input:s,hit:o}of r){const e=i.getMapPoint(s),n=i.getDistance(s);if("media"===o.type){const t=e?o.element.toSource(e):null;yield{...o,mapPoint:e,distance:n,sourcePoint:t}}else yield{...o,mapPoint:e,distance:n}}}function L(e,n,t){return n.getIntersectionPoint(q)?(t=D(e,q,t),7===n.intersector&&e.basemapTerrain&&(t.z=y(e.basemapTerrain,t)??0),t):null}function v(e){const n=e.getObjectId()??e.attributes?.[f];return e.origin&&null!=n?`o-${e.origin.id}-${n}`:`u-${h(e)}`}function G(e,n){return H(e,v(n))}function H(e,n){return null==e||(null==e.include||e.include.has(n))&&(null==e.exclude||!e.exclude.has(n))}function D(e,n,t){let i=e.spatialReference||c.WGS84;return u(n,e.renderSpatialReference,q,i)?n=q:(i=c.WGS84,u(n,e.renderSpatialReference,q,i)&&(n=q)),t?(t.x=n[0],t.y=n[1],t.z=n[2],t.spatialReference=i):t=new a(n,i),t}function C(e,n){const t=N(e,n.include,0),i=N(e,n.exclude,1);return{include:t.layerViewUids,exclude:i.layerViewUids,graphics:{include:t.graphicUids,exclude:i.graphicUids},mediaElements:{include:t.mediaElements,exclude:i.mediaElements}}}function N(t,i,r,s=new _){if(!i)return s;if(i instanceof e)k(s,v(i)),0===r&&(null!=t.graphicsView&&i.layer===t?O(s,t.graphicsView.uid):i.layer&&A(s,t,i.layer.uid));else if("layer"in i&&"element"in i)$(s,i.element),0===r&&A(s,t,i.layer.uid);else if(n(i))for(const e of i)e===t.graphics&&null!=t.graphicsView?O(s,t.graphicsView.uid):e===t.map.ground?(O(s,U),t.map.ground.integratedMeshGround&&A(s,t,t.map.ground.integratedMeshGround.uid)):N(t,e,r,s);else"layer"in i&&W(s,t,i),"uid"in i&&A(s,t,i.uid);return s}class _{constructor(){this.layerViewUids=null,this.graphicUids=null,this.mediaElements=null}}function A(e,n,t){const i=n.allLayerViews.find(e=>e.layer.uid===t);i&&O(e,i.uid)}function O(e,n){e.layerViewUids??=new Map,e.layerViewUids.set(n,!0)}function W(e,n,t){const i=n.allLayerViews.find(e=>e.layer.uid===t.layer.uid);if(!i)return;e.layerViewUids??=new Map;const r=e.layerViewUids.get(i.uid);!0!==r&&(r?r.add(t.id):e.layerViewUids.set(i.uid,new Set([t.id])))}function k(e,n){e.graphicUids??=new Set,e.graphicUids.add(n)}function $(e,n){e.mediaElements??=new Set,e.mediaElements.add(n)}const q=l(),z=new d,F=1.2;export{D as computeMapPointFromVec3d,C as externalToInternalIntersectOptions,j as hitTest,L as intersectResultToMapPoint,G as testGraphicUidFilter,P as toMap};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isPromiseLike as e}from"../../../../core/promiseUtils.js";import{projectBuffer as t}from"../../../../geometry/projection/projectBuffer.js";import{doubleSubArray as n,newDoubleArray as o}from"../../../../geometry/support/DoubleArray.js";import{applyPerVertexElevationAlignment as s}from"../../layers/graphics/elevationAlignmentUtils.js";import{axisFromRings as i,ringsToOutlinedTessellationInfo as r,tessellateOrLoad as l,load as u}from"../../layers/graphics/tessellationUtils.js";import{drapedZ as c}from"../../terrain/OverlayRenderer.js";async function a(){return u()}class p{constructor(e,t,n,o){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=o,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=A(e.outlineIndices[n]);return t}get outlineSegmentCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++){t+=A(e.outlineIndices[n])}return t}}class d extends p{}class f extends p{}class h extends p{constructor(e,t,n,o,s,i){super(e,n,o,s),this.mapPositions=t,this.sampledElevation=i}}function g(t,n){const o=
|
|
2
|
+
import{isPromiseLike as e}from"../../../../core/promiseUtils.js";import{projectBuffer as t}from"../../../../geometry/projection/projectBuffer.js";import{doubleSubArray as n,newDoubleArray as o}from"../../../../geometry/support/DoubleArray.js";import{applyPerVertexElevationAlignment as s}from"../../layers/graphics/elevationAlignmentUtils.js";import{axisFromRings as i,ringsToOutlinedTessellationInfo as r,tessellateOrLoad as l,load as u}from"../../layers/graphics/tessellationUtils.js";import{drapedZ as c}from"../../terrain/OverlayRenderer.js";async function a(){return u()}class p{constructor(e,t,n,o){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=o,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=A(e.outlineIndices[n]);return t}get outlineSegmentCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++){t+=A(e.outlineIndices[n])}return t}}class d extends p{}class f extends p{}class h extends p{constructor(e,t,n,o,s,i){super(e,n,o,s),this.mapPositions=t,this.sampledElevation=i}}function g(t,n){const o=v(t,n);return e(o)?null:o}function m(t,n,o,s,i){const r=w(t,n,o,s,i);return e(r)?null:r}function x(t,n){const o=R(t,n);return e(o)?null:o}function v(t,n){const{projectIfNearlyVertical:o=!1,outlineOutput:s="none",method:u,owner:c}=n??{},a="tessellated-indices"===s,p=i(t.rings,!!t.hasZ,t.spatialReference),d=r(t.rings,{hasZ:!!t.hasZ,ccwRingsAsHoles:!0,spatialReference:t.spatialReference,axis:p}),h=l(d,{projectionAxis:o?p:void 0,outlines:a?d.outlines:void 0,method:u,owner:c});if(e(h))return h;if(!h.succeeded)return null;let g={output:"none"};if("vertex-data"===s){const e=h.positions!==d.positions?d.positions:d.positions.slice();g={output:"vertex-data",outlines:y(d.outlines,e)}}else"tessellated-indices"===s&&(g=j(h));return new f(h.positions,h.indices,g,!0)}function R(n,o){const{drapedSpatialReference:s,projectIfNearlyVertical:u=!1,outlineOutput:a="none",method:p,owner:f}=o,h=i(n.rings,!1,n.spatialReference),g=r(n.rings,{hasZ:!1,ccwRingsAsHoles:!0,spatialReference:n.spatialReference,axis:h}),m="none"!==a,x=t(g.positions,n.spatialReference,0,g.positions,s,0),v=l(g,{projectionAxis:u?h:void 0,outlines:m?g.outlines:void 0,method:p,owner:f});if(e(v))return v;if(!v.succeeded)return null;const{positions:R,indices:w}=v;for(let e=2;e<R.length;e+=3)R[e]=c;let I={output:"none"};if("vertex-data"===a){if(R!==g.positions)for(let t=2;t<g.positions.length;t+=3)g.positions[t]=c;const e=R!==g.positions?g.positions:g.positions.slice();I={output:"vertex-data",outlines:y(g.outlines,e)}}else"tessellated-indices"===a&&(I=j(v));return new d(R,w,I,x)}function w(t,n,u,c,a){const{projectIfNearlyVertical:p=!1,outlineOutput:d="none",method:f,owner:g}=a??{},m="none"!==d,x=!!t.hasZ&&"on-the-ground"!==c.mode,v=i(t.rings,x,t.spatialReference),R=r(t.rings,{hasZ:x,ccwRingsAsHoles:!0,spatialReference:t.spatialReference,axis:v}),w=l(R,{projectionAxis:p?v:void 0,outlines:m?R.outlines:void 0,method:f,owner:g});if(e(w))return w;if(!w.succeeded)return null;const{positions:y,vertexCount:A}=w,Z=o(y.length),C=s(y,t.spatialReference,0,Z,0,y,0,A,n,u,c);let O={output:"none"};"vertex-data"===d?O={output:"vertex-data",outlines:I(w,Z)}:"tessellated-indices"===d&&(O=j(w));const B=null!=C;return new h(y,Z,w.indices,O,B,C)}function y(e,t,o=null){return e.values().filter(({count:e})=>e>1).map(({index:e,count:s})=>{const i=3*e,r=3*s;return null!=o?new C(e,s,n(t,i,r),n(o,i,r)):new Z(e,s,n(t,i,r))}).toArray()}function j(e){const{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};const o=new Array(n.length);let s=0;for(let i=0;i<n.length;i++){const e=n[i],r=t.slice(s,s+e);o[i]=r,s+=e}return{output:"tessellated-indices",outlineIndices:o}}function I(e,t){const{outlineIndexBuffer:s,outlineRingLengths:i,positions:r}=e;if(null==s||null==i)return[];let l=0;for(let n=0;n<i.length;n++)l+=i[n]-1;const u=o(3*l),c=o(3*l),a=new Array;let p=0,d=0;for(let o=0;o<i.length;o++){const e=i[o],l=e-1;for(let n=0;n<l;n++){const e=3*s[p+n],o=3*(d+n);u[o]=r[e],u[o+1]=r[e+1],u[o+2]=r[e+2],c[o]=t[e],c[o+1]=t[e+1],c[o+2]=t[e+2]}a.push(new C(d,l,n(u,3*d,3*l),n(c,3*d,3*l))),p+=e,d+=l}return a}function A(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class Z{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class C extends Z{constructor(e,t,n,o){super(e,t,n),this.mapPositions=o}}export{C as OutlineVertexData,Z as OutlineVertexDataDraped,p as PolygonRenderInfoBase,d as PolygonRenderInfoDraped,h as PolygonRenderInfoElevationAligned,f as PolygonRenderInfoNotElevationAligned,a as loadTessellationUtils,R as polygonToRenderInfoDraped,w as polygonToRenderInfoElevationAligned,v as polygonToRenderInfoNotElevationAligned,x as preloadedPolygonToRenderInfoDraped,m as preloadedPolygonToRenderInfoElevationAligned,g as preloadedPolygonToRenderInfoNotElevationAligned,j as splitOutlineIndexRings,I as tessellatedOutlineIndicesToVertexData};
|
|
@@ -10,6 +10,14 @@ mat3 covariance3D = transpose(scaledRotation) * scaledRotation;
|
|
|
10
10
|
covarianceA = vec3(covariance3D[0][0], covariance3D[0][1], covariance3D[0][2]);
|
|
11
11
|
covarianceB = vec3(covariance3D[1][1], covariance3D[1][2], covariance3D[2][2]);
|
|
12
12
|
}
|
|
13
|
+
float regularizeGaussianCovariance(inout vec3 covariance2D) {
|
|
14
|
+
float originalDeterminant = covariance2D.x * covariance2D.z - covariance2D.y * covariance2D.y;
|
|
15
|
+
const float covarianceRegularization = 0.3;
|
|
16
|
+
covariance2D.x += covarianceRegularization;
|
|
17
|
+
covariance2D.z += covarianceRegularization;
|
|
18
|
+
float regularizedDeterminant = covariance2D.x * covariance2D.z - covariance2D.y * covariance2D.y;
|
|
19
|
+
return sqrt(max(0.0, originalDeterminant / regularizedDeterminant));
|
|
20
|
+
}
|
|
13
21
|
vec3 computeGaussianCovariance2D(vec3 viewSpaceCenter, float focalLength, vec2 tanFov, float[6] cov3D, mat4 view) {
|
|
14
22
|
vec4 viewSpacePoint = vec4(viewSpaceCenter, 1);
|
|
15
23
|
vec2 clampLimit = 1.3 * tanFov;
|
|
@@ -30,9 +38,6 @@ cov3D[1], cov3D[3], cov3D[4],
|
|
|
30
38
|
cov3D[2], cov3D[4], cov3D[5]
|
|
31
39
|
);
|
|
32
40
|
mat3 covariance2D = transpose(covarianceProjection) * transpose(covariance3D) * covarianceProjection;
|
|
33
|
-
const float regularization = 0.3;
|
|
34
|
-
covariance2D[0][0] += regularization;
|
|
35
|
-
covariance2D[1][1] += regularization;
|
|
36
41
|
return vec3(covariance2D[0][0], covariance2D[0][1], covariance2D[1][1]);
|
|
37
42
|
}
|
|
38
43
|
void computePackedGaussianCovariance3D(uvec4 packedGaussian, out vec3 covarianceA, out vec3 covarianceB) {
|
|
@@ -16,11 +16,17 @@ return max(0.0, -2.0 * gaussianLogAlphaCutoff);
|
|
|
16
16
|
bool rejectGaussianByMinimumRadius(float maxRadius, float opacity, float minSplatRadius) {
|
|
17
17
|
return minSplatRadius > 0.0 && maxRadius * opacity < minSplatRadius;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
vec2 computeGaussianScreenRadii(vec3 covariance2D, float gaussianEllipseThreshold) {
|
|
20
|
+
return ceil(sqrt(covariance2D.xz * gaussianEllipseThreshold));
|
|
21
|
+
}
|
|
22
|
+
bool rejectGaussianByScreenBounds(vec2 ndcPosition, vec2 screenRadii, vec2 clipSpacePixelScale) {
|
|
23
|
+
vec2 radiusNDC = screenRadii * clipSpacePixelScale;
|
|
21
24
|
return any(greaterThan(abs(ndcPosition) - radiusNDC, vec2(1.0)));
|
|
22
25
|
}
|
|
23
26
|
vec2 computeGaussianMajorAxisDirection(vec3 covariance2D, float majorEigenvalue) {
|
|
27
|
+
if (covariance2D.y == 0.0) {
|
|
28
|
+
return covariance2D.x >= covariance2D.z ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
|
|
29
|
+
}
|
|
24
30
|
return normalize(vec2(covariance2D.y, majorEigenvalue - covariance2D.x));
|
|
25
31
|
}
|
|
26
32
|
vec2 computeGaussianUnitQuadCorner(int vertexID) {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{sliceEquals as t}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{disposeMaybe as i}from"../../../../../core/maybe.js";import{watch as s,sync as r}from"../../../../../core/reactiveUtils.js";import{signal as a}from"../../../../../core/signal.js";import{property as o,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{copy as u,equals as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{InternalRenderCategory as l}from"../../../webgl.js";import m from"../../../webgl/RenderNode.js";import{ReadShadowMapPassParameters as d}from"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{volumeToVao as _}from"../focusArea/focusAreaMaskUtils.js";import{S as p}from"../../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as f}from"./ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as g}from"./ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as b}from"./ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as v}from"./ShadowCastMaskTechnique.js";import{BindParameters as y}from"../../lib/BindParameters.js";import{DepthRange as S}from"../../lib/DepthRange.js";import{createQuadVAO as w}from"../../lib/glUtil3D.js";import{ShadowMap as A}from"../../lib/ShadowMap.js";import{V as C}from"../../../../../chunks/VolumeMask.glsl.js";import{PrimitiveType as x,DepthStencilAttachment as R,PixelType as V}from"../../../../webgl/enums.js";import{DisposableFramebufferObject as F}from"../../../../webgl/FramebufferObject.js";import{noParameters as P}from"../../../../webgl/NoParameters.js";let H=class extends m{constructor(e){super(e),this.consumes={required:[]},this.produces=l.SHADOW_ACCUMULATION,this._fullyRecompute=!1,this._analysisVolumeGeometry=null,this._primarySet=new D(new g(0),()=>this._requestRenderIfEnabled()),this._contextSet=new D(new g(1),()=>this._requestRenderIfEnabled()),this._passParameters=new d,this._maskParameters=new C,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=S.Zero,this._didAccumulate=!1,this._enabled=!1,this._previewing=!1,this.accumulationRenderer=null,this._shadowAccumulatorKey=Symbol("shadowAccumulator");const{view:t}=e,i=t.stage.renderer.fboCache;this._accumulationBindParameters=new y(i.rctx,new A(i,t.stage.viewingMode)),this._accumulationBindParameters.shadowMap.enabled=!0,this._vao=w(i.rctx),this._tmpReadFbo=new F(i.rctx),this.addHandles([s(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},r),s(()=>this._numActive,()=>this._numActiveChanged(),r)],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this.accumulationRenderer=null,this._fboHandle=i(this._fboHandle),this._vao=i(this._vao),this._volumeVao=i(this._volumeVao),this._tmpReadFbo=i(this._tmpReadFbo),this._accumulationBindParameters.destroy();for(const e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&(this._previewing||this._refining||this._fullyRecompute)}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&this._accumulationSets().some(e=>e.active)}get canAccumulate(){return null!=this._accumulationBindParameters.depth&&this._depthRange!==S.Zero&&null!=this.accumulationRenderer&&this.accumulationRenderer.isAboveElevationThreshold}get _doneAccumulating(){return this._accumulationSets().every(e=>e.doneAccumulating)}get _numActive(){return this._accumulationSets().reduce((e,t)=>e+(t.active?1:0),0)}get _colorFormat(){return 2===this._numActive?2:0}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=i(this._volumeVao),this._volumeVertexCount=0;const t=null!=e;for(const i of this._accumulationSets())i.configuration.useMask=t;if(!t)return;const s=e.geometryVolume,{vao:r,vertexCount:a}=_(this._rctx,s);this._volumeVao=r,this._volumeVertexCount=a}get requireGeometryDepth(){return this.accumulating||null!=this._volumeVao}precompile(){if(this.active&&(this._fullyRecompute=0!==this.bindParameters.frameRendererTarget,this.accumulating)){for(const e of this._accumulationSets())this.techniques.precompile(f,e.configuration),this.techniques.precompile(b,e.configuration);this.techniques.precompile(v)}}get didAccumulate(){return this._didAccumulate}render(){this._updateCamera(),this._didAccumulate=this._renderAccumulation(),this._updateMask();const e=this._fboHandle;return e?.retain(),e}_renderAccumulation(){if(!this.active)return!1;if(this._accumulationBindParameters.contentCamera=this.bindParameters.contentCamera,this._accumulationBindParameters.depth=this.bindParameters.depth,this._passParameters.origin=this._accumulationBindParameters.camera.center,!this.canAccumulate)return this._accumulationBindParameters.depth=null,!1;if(this._renderAreaMask(),!this.accumulating)return this._accumulationBindParameters.depth=null,!1;(this._previewing||this._fullyRecompute)&&this._reset(),this._clearBuffersOnAccumulationStart(this._accumulationBindParameters);const e=this._accumulateSetsForRenderFrame(this._previewing&&!this._fullyRecompute,this._accumulationBindParameters);return this._accumulationBindParameters.depth=null,e}_renderAreaMask(){const e=this.techniques.getCompiled(v),t=this._volumeVao,i=this._volumeVertexCount,s=this._fboHandle,r=this._analysisVolume;if(s?.detachDepth(),!e||!t||i<1||!s||!r)return;s.acquireDepth(14);const a=this._rctx,o=this._accumulationBindParameters,n=o.depth,u=this._tmpReadFbo;u.attachDepthStencil(n?.attachment),a.blitFramebuffer(u,s.fbo,256),u.detachDepthStencilTexture(),a.bindFramebuffer(s.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);const h=a.bindTechnique(e,o,P);this._maskParameters.origin=r.origin,h.bindDraw(o,P,this._maskParameters),a.bindVAO(t),a.drawArrays(x.TRIANGLES,0,i)}_clearBuffersOnAccumulationStart(e){if(this._accumulationSets().every(e=>0===e.progress))this._clearFramebuffer();else for(const t of this._accumulationSets())0===t.progress&&this._clearFramebufferForSet(this._fboHandle,t,e)}_accumulateSetsForRenderFrame(e,t){let i=!1;for(const s of this._accumulationSets())this._accumulateSet(s,e,t),i=!0;return i&&this.requestRender(1),i}_accumulateSet(e,t,i){const s=t?Math.min(q,e.sampleCount)-e.progress:e.sampleCount-e.progress;for(let r=0;r<s;++r)this._accumulateShadow(e,i)}_updateMask(){this.accumulationRenderer?.setStencilMask(this._fboHandle?.getAttachment(R))}setParameters(e){void 0!==e.previewing&&(this._previewing=e.previewing),void 0!==e.lightDirections&&(this._primarySet.lightDirections=e.lightDirections),void 0!==e.lightDirectionsContext&&(this._contextSet.lightDirections=e.lightDirectionsContext),!0===e.enabled?this._enable():!1===e.enabled&&this._disable(),void 0!==e.analysisVolume&&(this._analysisVolume=e.analysisVolume),this.accumulationRenderer?.setOptions(e)}readAccumulatedShadow(e,t){const i=this._primarySet.progress;return!this.active||!this._fboHandle||i<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,V.UNSIGNED_BYTE,j),j[0]/i)}_updateCamera(){if(!this.active)return;const e=this.bindParameters.camera,t=this._accumulationBindParameters.camera;e.equals(t)||t.copyFrom(e),this._isAccumulationValid(e)||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight),this._reset()),this.accumulationRenderer?.setOpacityFromElevation(e.relativeElevation)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;const e=2===this._numActive,{width:t,height:i}=this._fboHandle.fbo,s=this._createFBO(t,i);e&&(this._clearFramebuffer(s),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,s.fbo),this._fboHandle.dispose(),this._fboHandle=s,this.requestRender(1)}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=i(this._fboHandle),this._enabled=!1,this.requestRender(1))}_createFBO(e,t){return this.fboCache.acquire(e,t,this.produces,this._colorFormat)}_invalidateAccumulationSets(){for(const e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(const e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t,i){if(!e)return;const s=this.techniques.get(b,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(s,i,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(s.primitiveType,0,this._vao.vertexCount("geometry"))}_accumulateShadow(e,t){this.view.stage.renderer.renderShadowAccumulationShadowMap(t.camera,t.contentCamera,this._accumulationBindParameters.shadowMap,e.lightDirections[e.progress++],this._depthRange);const i=this.techniques.get(f,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(i,t,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(i.primitiveType,0,this._vao.vertexCount("geometry"))}_isAccumulationValid(e){return this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight}_requestRenderIfEnabled(){this._enabled&&this.requestRender(1)}get _rctx(){return this.renderingContext}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e,this._invalidateAccumulationSets())}get test(){}};e([o()],H.prototype,"consumes",void 0),e([o()],H.prototype,"produces",void 0),e([o()],H.prototype,"_refining",null),e([o()],H.prototype,"active",null),e([o()],H.prototype,"_doneAccumulating",null),e([o()],H.prototype,"_numActive",null),e([o()],H.prototype,"_colorFormat",null),e([o()],H.prototype,"_depthRange",void 0),e([o()],H.prototype,"_enabled",void 0),e([o()],H.prototype,"_previewing",void 0),e([o()],H.prototype,"accumulationRenderer",void 0),H=e([n("esri.views.3d.webgl-engine.effects.shadowAccumulation.ShadowAccumulator")],H);const q=6,j=new Uint8Array(4);class D{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=a(0),this._sampleCount=a(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){const i=this._cachedLightDirections,s=Math.min(p,e.length);if(!t(i,0,i.length,e,0,s,h)){i.length=s,this._sampleCount.value=s;for(let t=0;t<s;++t)i[t]=u(i[t]??c(),e[t]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}}export{H as ShadowAccumulator};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../../../webgl/ShaderBuilder.js";export{S as ShadowCastMaxSamples,b as build}from"../../../../../chunks/ShadowCastAccumulate.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as t}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/ShadowCastAccumulate.glsl.js";import{PrimitiveType as o}from"../../../../webgl/enums.js";import{makePipelineState as a,add as l,simpleStencilTestParams as c}from"../../../../webgl/renderState.js";let n=class extends t{constructor(){super(...arguments),this.shader=new s(i,()=>import("./ShadowCastAccumulate.glsl.js")),this.ignoreUnused=!0,this.primitiveType=o.TRIANGLE_STRIP}initializePipeline(e){const r={r:0===e.index,g:1===e.index,b:!1,a:!1};return a({blending:l,colorWrite:r,depthTest:null,depthWrite:null,stencilTest:e.useMask?c(0,255,{compare:517,fail:7680,zFail:7680,zPass:7680}):null})}};n=e([r("esri.views.3d.webgl-engine.effects.shadowAccumulation.ShadowCastAccumulateTechnique")],n);export{n as ShadowCastAccumulateTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class i extends t{constructor(e){super(),this.index=0,this.useMask=!1,this.index=e}}e([o({count:2})],i.prototype,"index",void 0),e([o()],i.prototype,"useMask",void 0);export{i as ShadowCastAccumulateTechniqueConfiguration};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../../core/shaderTechnique/ShaderTechnique.js";import{S as o}from"../../../../../chunks/ShadowCastClear.glsl.js";import{PrimitiveType as t}from"../../../../webgl/enums.js";import{makePipelineState as l}from"../../../../webgl/renderState.js";let n=class extends i{constructor(){super(...arguments),this.shader=new s(o,()=>import("./ShadowCastClear.glsl.js")),this.ignoreUnused=!0,this.primitiveType=t.TRIANGLE_STRIP}initializePipeline(e){const r={r:0===e.index,g:1===e.index,b:!1,a:!1};return l({blending:null,colorWrite:r,depthTest:null,depthWrite:null})}};n=e([r("esri.views.3d.webgl-engine.effects.shadowAccumulation.ShadowCastClearTechnique")],n);export{n as ShadowCastClearTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{VolumeMaskTechnique as i}from"../../shaders/VolumeMaskTechnique.js";import{PrimitiveType as r}from"../../../../webgl/enums.js";import{makePipelineState as t,separateStencilTestParams as o}from"../../../../webgl/renderState.js";let a=class extends i{constructor(){super(...arguments),this.ignoreUnused=!0,this.primitiveType=r.TRIANGLE_STRIP}initializePipeline(){return t({depthTest:{func:513},stencilTest:o(0,255,{compare:519,fail:7680,zFail:34055,zPass:7680},{compare:519,fail:7680,zFail:34056,zPass:7680}),stencilWrite:{mask:255}})}};a=e([s("esri.views.3d.webgl-engine.effects.shadowAccumulation.ShadowCastMaskTechnique")],a);export{a as ShadowCastMaskTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{equals as s}from"../../../../../core/arrayUtils.js";import{smoothstep as t}from"../../../../../core/mathUtils.js";import{watch as i,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{exactEquals as n,copy as l,equals as d}from"../../../../../core/libs/gl-matrix-2/math/vec4.js";import{InternalRenderCategory as h}from"../../../webgl.js";import m from"../../../webgl/RenderNode.js";import{S as u}from"../../../../../chunks/ShadowCastVisualize.glsl.js";import{ShadowCastVisualizeTechnique as p}from"./ShadowCastVisualizeTechnique.js";import{ShadowCastVisualizeTechniqueConfiguration as c}from"./ShadowCastVisualizeTechniqueConfiguration.js";import{vvColorNumber as b}from"../../materials/VisualVariablePassParameters.js";import{ColorAttachment0 as f}from"../../../../webgl/enums.js";let _=class extends m{constructor(e){super(e),this.produces=h.TRANSPARENT_NO_DEPTH,this.consumes={required:[h.TRANSPARENT_NO_DEPTH]},this.enabled=!1,this._configuration=new c,this._stencilMask=null,this._disableElevation={min:4e4,max:5e4,threshold:1/512},this._passParameters=new u(e.data)}initialize(){this.addHandles([i(()=>this.enabled,e=>{this.produces=e?h.TRANSPARENT_NO_DEPTH:"disabled",this.requestRender(1)},a)])}precompile(){this._showVisualization&&this.techniques.precompile(p,this._configuration)}render(){const e=this.input;if(!this._showVisualization)return e;const[s,t]=this.data.computedSamples;this._passParameters.sampleScale=[s?1/s:0,t?1/t:0];const i=this.techniques.get(p,this._configuration),a=null!=this._stencilMask,r=this.renderingContext,o=this.bindParameters,n=r.boundFramebuffer;let l=null;return a&&(l=this.fboCache.acquire(o.camera.width,o.camera.height,"shadow cast masked draw"),l.attachDepth(this._stencilMask),r.bindFramebuffer(l.fbo),r.blitFramebuffer(n,l.fbo,16384)),r.bindTechnique(i,o,this._passParameters),r.setDrawBuffers([f]),r.screen.draw(),null!=l&&(r.bindFramebuffer(n),r.blitFramebuffer(l.fbo,n,16384),l.detachDepth(),l.release()),e}setStencilMask(e){this._stencilMask=e}setOptions(e){void 0!==e.enabled&&(this.enabled=e.enabled),void 0!==e.thresholdColor&&(n(this._passParameters.thresholdColor,e.thresholdColor)||(l(this._passParameters.thresholdColor,e.thresholdColor),this._requestRenderIfEnabled())),void 0!==e.gradientColorRamp&&this._modifyGradientColorRamp(e.gradientColorRamp),void 0!==e.bandedGradientColorRamp&&this._modifyGradientColorRamp(e.bandedGradientColorRamp,!0),void 0!==e.threshold&&this._passParameters.threshold!==e.threshold&&(this._passParameters.threshold=e.threshold,this._requestRenderIfEnabled()),void 0!==e.rendersSunlight&&this._configuration.rendersSunlight!==e.rendersSunlight&&(this._configuration.rendersSunlight=e.rendersSunlight,this._requestRenderIfEnabled()),void 0!==e.visualization&&this._configuration.visualization!==e.visualization&&(this._configuration.visualization=e.visualization,this._requestRenderIfEnabled()),void 0!==e.bandSize&&this._passParameters.bandSize!==e.bandSize&&(this._passParameters.bandSize=e.bandSize,this._requestRenderIfEnabled()),void 0!==e.analysisVolume&&(this._configuration.useMask=null!==e.analysisVolume)}get isAboveElevationThreshold(){return this._passParameters.opacityFromElevation>this._disableElevation.threshold}setOpacityFromElevation(e){this._passParameters.opacityFromElevation=1-t(this._disableElevation.min,this._disableElevation.max,e)}get _showVisualization(){return this.enabled&&(this.data.computedSamples[0]>0||this.data.computedSamples[1]>0)&&this.isAboveElevationThreshold}_modifyGradientColorRamp(e,s=!1){e.length>b&&(e=e.slice(0,b)),v(s?this._passParameters.bandedGradientColorRamp:this._passParameters.gradientColorRamp,e)||(s?this._passParameters.bandedGradientColorRamp=e:this._passParameters.gradientColorRamp=e,this._requestRenderIfEnabled())}_requestRenderIfEnabled(){this.enabled&&this.requestRender(1)}};function v(e,t){return s(e,t,([e,s],[t,i])=>e===t&&d(s,i))}e([r()],_.prototype,"produces",void 0),e([r()],_.prototype,"consumes",void 0),e([r()],_.prototype,"enabled",void 0),e([r({constructOnly:!0})],_.prototype,"data",void 0),_=e([o("esri.views.3d.webgl-engine.effects.shadowAccumulation.ShadowCastRenderer")],_);export{_ as ShadowCastRenderer};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/util/BlendColorsPremultiplied.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderModules/Float2PassUniform.js";import"../../core/shaderModules/Float4PassUniform.js";import"../../core/shaderModules/Float4sPassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../../chunks/ShadowCastAccumulate.glsl.js";import"../../shaders/colorRampParameters.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{S as ShadowCastVisualizePassParameters,b as build}from"../../../../../chunks/ShadowCastVisualize.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as i}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as t}from"../../../../../chunks/ShadowCastVisualize.glsl.js";import{PrimitiveType as o}from"../../../../webgl/enums.js";import{makePipelineState as a,defaultColorWrite as l,premultipliedAlpha as n,simpleStencilTestParams as c}from"../../../../webgl/renderState.js";let u=class extends r{constructor(){super(...arguments),this.shader=new i(t,()=>import("./ShadowCastVisualize.glsl.js")),this.primitiveType=o.TRIANGLE_STRIP}initializePipeline(){return a({blending:n,colorWrite:l,depthTest:null,depthWrite:null,stencilTest:this._configuration.useMask?c(0,255,{compare:517,fail:7680,zFail:7680,zPass:7680}):null})}};u=e([s("esri.views.3d.webgl-engine.effects.shadowAccumulation.ShadowCastVisualizeTechnique")],u);export{u as ShadowCastVisualizeTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as o}from"tslib";import{parameter as t,ShaderTechniqueConfiguration as i}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class e extends i{constructor(){super(...arguments),this.visualization=0,this.rendersSunlight=!1,this.useMask=!1}}o([t({count:4})],e.prototype,"visualization",void 0),o([t()],e.prototype,"rendersSunlight",void 0),o([t()],e.prototype,"useMask",void 0);export{e as ShadowCastVisualizeTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{releaseMaybe as t}from"../../../../core/maybe.js";import{signal as i}from"../../../../core/signal.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import e from"../../webgl/RenderCamera.js";import{isColor as h}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as n}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as r}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as o}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as a}from"../lighting/SceneLighting.js";class l{constructor(t,i){this.width=t,this.height=i}}const g=5e5;class u{constructor(t,h){this._rctx=t,this.shadowMap=h,this._output=0,this.slot=2,this.slicePlane=null,this.hasOccludees=!1,this._emissions=i(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=i(!0),this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.overlayStretch=1,this.viewshedEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this.renderingShadowAnalysisMap=!1,this._camera=i(new e),this._inverseViewport=s(),this._oldLighting=new a,this._newLighting=new a,this._fadedLighting=new a,this._lighting=this._newLighting,this.screenSpaceReflections=new o,this.reprojection=new r,this.highlights=new Array,this.highlightMixOrigin=s(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new n,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=t(this.depth),this.shadowMap?.dispose()}get output(){return this._output}set output(t){this._output!==t&&(this._output=t,this._rctx.resetDrawBuffers(t))}get emissions(){return this._emissions.value}set emissions(t){this._emissions.value=t}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return 1===this.emissions||3===this.emissions}get hasTransparentEmission(){return 2===this.emissions||3===this.emissions}get hasEmissions(){return 0!==this.emissions}get camera(){return this._camera.value}set camera(t){this._camera.value=t,this._inverseViewport[0]=1/t.fullViewport[2],this._inverseViewport[1]=1/t.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<g}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(t,i,s,e){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=i,this._newLighting.globalFactor=s,this._newLighting.set(t),this._oldLighting.updateLegacy(),1===e&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return h(this.output)&&this.screenSpaceReflections.enabled&&null!=this.reprojection.lastFrameColor}get highlight(){return null==this.highlightLevel?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(t){t&&(t.name="geometry depth"),this._depth=t}get occluder(){return 10===this.slot||11===this.slot?this.slot:null}}export{u as BindParameters,l as ViewportSize};
|
|
2
|
+
import{releaseMaybe as t}from"../../../../core/maybe.js";import{signal as i}from"../../../../core/signal.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import e from"../../webgl/RenderCamera.js";import{isColor as h}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as n}from"../effects/clouds/CloudsParameters.js";import{ReprojectionUniforms as r}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as o}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as a}from"../lighting/SceneLighting.js";class l{constructor(t,i){this.width=t,this.height=i}}const g=5e5;class u{constructor(t,h){this._rctx=t,this.shadowMap=h,this._output=0,this.slot=2,this.slicePlane=null,this.hasOccludees=!1,this._emissions=i(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=i(!0),this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.frameRendererTarget=0,this.overlayStretch=1,this.viewshedEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this.renderingShadowAnalysisMap=!1,this._camera=i(new e),this._inverseViewport=s(),this._oldLighting=new a,this._newLighting=new a,this._fadedLighting=new a,this._lighting=this._newLighting,this.screenSpaceReflections=new o,this.reprojection=new r,this.highlights=new Array,this.highlightMixOrigin=s(),this.highlightMixTexture=null,this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new n,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=t(this.depth),this.shadowMap?.dispose()}get output(){return this._output}set output(t){this._output!==t&&(this._output=t,this._rctx.resetDrawBuffers(t))}get emissions(){return this._emissions.value}set emissions(t){this._emissions.value=t}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return 1===this.emissions||3===this.emissions}get hasTransparentEmission(){return 2===this.emissions||3===this.emissions}get hasEmissions(){return 0!==this.emissions}get camera(){return this._camera.value}set camera(t){this._camera.value=t,this._inverseViewport[0]=1/t.fullViewport[2],this._inverseViewport[1]=1/t.fullViewport[3]}get enableOITOffset(){return this.camera.relativeElevation<g}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(t,i,s,e){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=i,this._newLighting.globalFactor=s,this._newLighting.set(t),this._oldLighting.updateLegacy(),1===e&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return h(this.output)&&this.screenSpaceReflections.enabled&&null!=this.reprojection.lastFrameColor}get highlight(){return null==this.highlightLevel?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(t){t&&(t.name="geometry depth"),this._depth=t}get occluder(){return 10===this.slot||11===this.slot?this.slot:null}}export{u as BindParameters,l as ViewportSize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{InternalRenderCategory as l}from"../../webgl.js";import{glLayout as
|
|
2
|
+
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{InternalRenderCategory as l}from"../../webgl.js";import{glLayout as u}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import h from"../../webgl/RenderNode.js";import{VertexArrayObject as c}from"./VertexArrayObject.js";import{C as m}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as d}from"../shaders/CutFillCompositionTechnique.js";import{DefaultMaterialPassParameters as p,DefaultMaterialDrawParameters as f,DefaultMaterialTechnique as _}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as C}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as b}from"../shaders/EmissiveTechniqueConfiguration.js";import{O as g}from"../../../../chunks/OccludedGeometryDepth.glsl.js";import{OccludedGeometryDepthTechnique as V}from"../shaders/OccludedGeometryDepthTechnique.js";import{V as v}from"../../../../chunks/VolumeMask.glsl.js";import{VolumeMaskTechnique as T}from"../shaders/VolumeMaskTechnique.js";import{DepthStencilAttachment as w,PrimitiveType as P}from"../../../webgl/enums.js";import{noParameters as q}from"../../../webgl/NoParameters.js";import{VertexBuffer as y}from"../../../webgl/VertexBuffer.js";let D=class extends h{constructor(e){super(e),this.consumes={required:[l.CUTFILL_COLOR,l.GROUND_DEPTH]},this.produces=l.CUTFILL_COLOR,this.measureType="cut-fill",this._vaoCut=null,this._vaoFill=null,this._compositeConfiguration=new b,this._maskParameters=new v,this._occludedGeometryDepthParameters=new g,this._cutVolumeParameters=new p,this._fillVolumeParameters=new p,this._compositeParameters=new m,this._drawParameters=new f;const t=1===e.view.state.viewingMode;this._cutVolumeConfiguration=new C(t),this._cutVolumeConfiguration.customDepthTest=3,this._cutVolumeConfiguration.writeDepth=!1,this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2,this._fillVolumeConfiguration=new C(t),this._fillVolumeConfiguration.customDepthTest=1,this._fillVolumeConfiguration.cullFace=2}initialize(){this.addHandles([i(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),s),i(()=>this.measureType,()=>this.requestRender(1),s)])}destroy(){this._disposeVaos()}precompile(){this._vaoCut&&this._vaoFill&&("cut-fill"===this.measureType?(this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2):(this._cutVolumeConfiguration.cullFace=0,this._cutVolumeConfiguration.doubleSidedMode=0),this._compositeConfiguration.hasEmissive=0!==this.bindParameters.emissions,this.techniques.precompile(T),this.techniques.precompile(V),this.techniques.precompile(_,this._cutVolumeConfiguration),this.techniques.precompile(_,this._fillVolumeConfiguration),this.techniques.precompile(d,this._compositeConfiguration))}render(e){const t=this.input;if(!this._vaoCut||!this._vaoFill)return t;const i=this._vaoCut.vertexCount("geometry"),s=this._vaoFill.vertexCount("geometry"),o=this.bindParameters,r=o.camera,a=r.fullViewport[2],u=r.fullViewport[3],n=this.renderingContext,h=this.fboCache,c=e.find(({name:e})=>e===l.GROUND_DEPTH),m=h.acquire(a,u,"cutfill color mask",2).attachDepth(c.getAttachment(w));n.bindFramebuffer(m.fbo),n.setClearColor(0,0,0,1),n.clear(17408),n.setViewport(0,0,a,u);const p=this.techniques.get(T);n.bindTechnique(p,o,q,this._maskParameters),n.setFaceCullingEnabled(!1),n.setStencilTestEnabled(!0),n.setStencilOpSeparate(1028,7680,34055,7680),n.setStencilOpSeparate(1029,7680,34056,7680),n.setDepthWriteEnabled(!1),n.bindVAO(this._vaoCut),n.setDepthTestEnabled(!0),n.setStencilWriteMask(255),n.setStencilFunction(519,0,255),n.setColorMask(!1,!1,!1,!1),n.drawArrays(P.TRIANGLES,0,i),n.setDepthTestEnabled(!1),n.setStencilWriteMask(0),n.setStencilFunction(517,0,255),n.setColorMask(!0,!1,!1,!1),n.drawArrays(P.TRIANGLES,0,i),n.bindVAO(this._vaoFill),n.setDepthTestEnabled(!0),n.setStencilWriteMask(255),n.setStencilFunction(519,0,255),n.setColorMask(!1,!0,!1,!1),n.drawArrays(P.TRIANGLES,0,s);const f=h.acquire(a,u,"cutfill color cut volume",5).acquireDepth(14);n.bindFramebuffer(f.fbo),n.setClearColor(0,0,0,0),n.setClearDepth(1),n.setColorMask(!0,!0,!0,!0),n.setDepthWriteEnabled(!0),n.clear(16640);const C=this.techniques.get(V);this._occludedGeometryDepthParameters.depthTexture=c.getTexture(w),this._occludedGeometryDepthParameters.cullFace=this._cutVolumeConfiguration.cullFace,n.bindTechnique(C,o,this._occludedGeometryDepthParameters,this._drawParameters),n.bindVAO(this._vaoCut),n.drawArrays(P.TRIANGLES,0,i);const b=this.techniques.get(_,this._cutVolumeConfiguration);n.bindTechnique(b,this.bindParameters,this._cutVolumeParameters,this._drawParameters),n.bindVAO(this._vaoCut),n.drawArrays(P.TRIANGLES,0,i),f.detachDepth();const g=h.acquire(a,u,"cutfill color fill volume",5).acquireDepth(14);n.blitFramebuffer(t.fbo,g.fbo,256),n.bindFramebuffer(g.fbo),n.clear(16384),n.setColorMask(!0,!0,!0,!0);const v=this.techniques.get(_,this._fillVolumeConfiguration);n.bindTechnique(v,this.bindParameters,this._fillVolumeParameters,this._drawParameters),n.bindVAO(this._vaoFill),n.drawArrays(P.TRIANGLES,0,s),g.detachDepth();const y=t.obtainDepthTexture();n.bindFramebuffer(t.fbo),this._compositeParameters.cutVolume=f.getTexture(),this._compositeParameters.fillVolume=g.getTexture(),this._compositeParameters.mask=m.getTexture(),this._compositeParameters.sceneDepth=y?.attachment,this._compositeParameters.groundDepth=c.getTexture(w),this.borderColor.toUnitRGBA(this._compositeParameters.borderColor);const D=this.techniques.get(d,this._compositeConfiguration);return n.bindTechnique(D,o,this._compositeParameters),n.screen.draw(),t.attachDepth(y),y?.release(),m.release(),f.release(),g.release(),t}enable(){this.produces=l.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,t,i){this._disposeVaos(),this._vaoCut=this._createVao(e),this._vaoFill=this._createVao(t),this._maskParameters.origin=i,a(this._drawParameters.origin,i),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=this.cutColor.toUnitRGB(),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=this.fillColor.toUnitRGB(),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const{vertices:t,normals:i,indicesBottom:s,indicesExtruded:o}=e,r=s.length+o.length,a=this.renderingContext,l=F.createBuffer(r),{position:n,normal:h}=l;let m=0;for(let u=0;u<s.length;u++){const e=3*s[u];n.set(m,0,t[e]),n.set(m,1,t[e+1]),n.set(m,2,t[e+2]),h.set(m,0,i[e]),h.set(m,1,i[e+1]),h.set(m,2,i[e+2]),m++}for(let u=0;u<o.length;u++){const e=3*o[u];n.set(m,0,t[e]),n.set(m,1,t[e+1]),n.set(m,2,t[e+2]),h.set(m,0,i[e]),h.set(m,1,i[e+1]),h.set(m,2,i[e+2]),m++}const d=new y(a,u(F),l.buffer);return new c(a,d)}_disposeVaos(){this._vaoCut=t(this._vaoCut),this._vaoFill=t(this._vaoFill)}};e([o()],D.prototype,"consumes",void 0),e([o()],D.prototype,"produces",void 0),e([o()],D.prototype,"cutColor",void 0),e([o()],D.prototype,"fillColor",void 0),e([o()],D.prototype,"borderColor",void 0),e([o()],D.prototype,"measureType",void 0),D=e([r("esri.views.3d.webgl-engine.lib.CutFillVisualization")],D);const F=n().vec3f("position").vec3f("normal").freeze();class j{constructor(e,t,i,s){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=i,this.normals=s}}export{D as CutFillVisualization,j as VolumeGeometry};
|