@arcgis/core 4.23.0-next.20220127 → 4.23.0-next.20220128
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0463ba46df855a92b9c0.js +1 -0
- package/assets/esri/core/workers/chunks/{e657ba0cab29f05d02da.js → 0cd0a6eef51fc5b9ea61.js} +1 -1
- package/assets/esri/core/workers/chunks/{e4896cf85fb2da8a9cc7.js → 17de7a324dfa7f57ad5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{c36f84daa7736878418d.js → 197ec52641aed20029c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0317f37b6c8705b363fd.js → 1c733b7db092a2a88ef3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9387db408f496e7dd003.js → 214910032945dd2d86b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{d835b2a683fcd8aeeed8.js → 27474b007988855bea9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{8001b0e514bfffe9d7f8.js → 357033117dfe61eb81ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{5948923e07bd1662c24a.js → 37c03cfc19086ce631c6.js} +1 -1
- package/assets/esri/core/workers/chunks/3c673495e5f507c4a9e5.js +1 -0
- package/assets/esri/core/workers/chunks/44f0c3663b293afbd172.js +1 -0
- package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +1 -0
- package/assets/esri/core/workers/chunks/49a1a633bb0d93764aae.js +1 -0
- package/assets/esri/core/workers/chunks/{5f1dcb6556820cd0aa31.js → 4be35af7d6babbfe9d84.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9ff3eaf4eb324429fbd.js → 5457962a70bd3c557a75.js} +1 -1
- package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +1 -0
- package/assets/esri/core/workers/chunks/{56274b37ff74ca0d68a6.js → 5d11b97b667921d67ae7.js} +1 -1
- package/assets/esri/core/workers/chunks/{ba5eb394f098968c22d2.js → 655b55ac0cd533d7e9d7.js} +1 -1
- package/assets/esri/core/workers/chunks/7903a3e2e0faff0f86c0.js +1 -0
- package/assets/esri/core/workers/chunks/918bb7a7d901544a7367.js +1 -0
- package/assets/esri/core/workers/chunks/949b2269457302ffc64b.js +1 -0
- package/assets/esri/core/workers/chunks/{601e697dc7414bda128a.js → 952980635afc7ec81804.js} +1 -1
- package/assets/esri/core/workers/chunks/{e8741bf421f80213f1d3.js → 9876a1bae350795fab36.js} +1 -1
- package/assets/esri/core/workers/chunks/99619fcb772807c74f3b.js +1 -0
- package/assets/esri/core/workers/chunks/{3f343f792fd9f44d6f25.js → b3f5e91116112b0b612a.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c76146014dc15143ba3.js → be588873c16770ceb9ef.js} +1 -1
- package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +1 -0
- package/assets/esri/core/workers/chunks/{b62e3dccd9f662c0afeb.js → db3c729ce0c0b2690dc9.js} +1 -1
- package/assets/esri/core/workers/chunks/{199670a3a564ebe3bd79.js → e218bde41ffbcc5194f5.js} +1 -1
- package/assets/esri/core/workers/chunks/e21b211913aefde47e30.js +1 -0
- package/assets/esri/core/workers/chunks/{c9cbf8135e95f0f42cd9.js → e287f49184d076af17e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{bde1d5b0a7717350986e.js → e4019b63a1fe74e2c842.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e6a3c5866e8d8820457.js → eb82ff10cef2bde6e57f.js} +1 -1
- package/assets/esri/core/workers/chunks/ebc6f4764b82d4104c65.js +1 -0
- package/assets/esri/core/workers/chunks/{842db82733635dbf25cb.js → ee6e0db58dc64410e687.js} +1 -1
- package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +1 -0
- package/assets/esri/core/workers/chunks/ff6abdc72076f3994659.js +981 -0
- package/chunks/BlendLayers.glsl.js +2 -2
- package/chunks/ChapmanAtmosphere.glsl.js +17 -17
- package/chunks/CheckerBoard.glsl.js +3 -3
- package/chunks/Clouds.glsl.js +2 -2
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +12 -12
- package/chunks/ComponentShader.glsl.js +3 -3
- package/chunks/Compositing.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +33 -33
- package/chunks/EdgeShaderProgram.glsl.js +7 -7
- package/chunks/Fog.glsl.js +10 -12
- package/chunks/HUDMaterial.glsl.js +2 -2
- package/chunks/HighlightComposition.glsl.js +5 -5
- package/chunks/ImageMaterial.glsl.js +6 -6
- package/chunks/LaserlinePath.glsl.js +8 -8
- package/chunks/LineCallout.glsl.js +6 -6
- package/chunks/MeasurementArrow.glsl.js +1 -1
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/Path.glsl.js +5 -5
- package/chunks/Pattern.glsl.js +9 -9
- package/chunks/PointRenderer.glsl.js +14 -14
- package/chunks/Precipitation.glsl.js +2 -2
- package/chunks/RealisticTree.glsl.js +21 -21
- package/chunks/RibbonLine.glsl.js +11 -11
- package/chunks/SMAA.glsl.js +40 -40
- package/chunks/ShadedColorMaterial.glsl.js +12 -12
- package/chunks/ShadowCast.glsl.js +6 -6
- package/chunks/ShadowHighlight.glsl.js +4 -4
- package/chunks/SimpleAtmosphere.glsl.js +3 -3
- package/chunks/SlicePlaneMaterial.glsl.js +3 -3
- package/chunks/Stars.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +11 -11
- package/chunks/TextureOnly.glsl.js +2 -2
- package/chunks/WaterSurface.glsl.js +5 -5
- package/chunks/boundedPlane.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/loadAll.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +204 -10
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LayerContingentValuesCache.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/package.json +1 -1
- package/smartMapping/statistics/support/predominanceUtils.d.ts +4 -0
- package/support/revision.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DIconOutline.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/symbols/support/Thumbnail.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/views/2d/engine/vectorTiles/SchemaHelper.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/Fog.glsl.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/PanoramicAtmosphere.js +1 -1
- package/views/3d/environment/Precipitation.glsl.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/environment/Stars.glsl.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/symbolComplexity.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +5 -0
- package/views/3d/layers/support/overlayImageUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/LaserlinePathData.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +12 -12
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +16 -16
- package/views/3d/webgl-engine/core/shaderLibrary/default/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +10 -10
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureUniformName.js +4 -0
- package/views/3d/webgl-engine/lib/UniformName.js +4 -0
- package/views/3d/webgl-engine/lib/VertexAttribute.js +5 -0
- package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/VisualVariableMaterialParameters.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/internal/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/internal/waterMaterialUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SMAA.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +10 -10
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardShortEdges.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShaderProgram.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +21 -21
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +6 -6
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +13 -13
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +6 -6
- package/views/SceneView.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/support/WatchUpdatingTracking.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/InstanceCounter.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Search.js +1 -1
- package/assets/esri/core/workers/chunks/12c0cabb6c59e65d8546.js +0 -1
- package/assets/esri/core/workers/chunks/322d917e8cb398816a93.js +0 -1
- package/assets/esri/core/workers/chunks/392b6382e06652dd4c80.js +0 -1
- package/assets/esri/core/workers/chunks/3aa73119b055e05bbbeb.js +0 -1
- package/assets/esri/core/workers/chunks/52ea678ba1da0e349919.js +0 -1
- package/assets/esri/core/workers/chunks/5ee497d5d7b0e580526a.js +0 -1
- package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +0 -1
- package/assets/esri/core/workers/chunks/83b8fec1650e061aaa56.js +0 -1
- package/assets/esri/core/workers/chunks/9796d54ff12b6429164a.js +0 -1
- package/assets/esri/core/workers/chunks/d07440469fe7d181c4fd.js +0 -1
- package/assets/esri/core/workers/chunks/dbf192b4ce7e608610f6.js +0 -1
- package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +0 -981
- package/assets/esri/core/workers/chunks/dee9929d95e9fe26929c.js +0 -1
- package/assets/esri/core/workers/chunks/e12d91ef44d6f879a02a.js +0 -1
- package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import t from"../../Color.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isSome as s}from"../../core/maybe.js";import{px2pt as e}from"../../core/screenUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{symbol3dLinePatternProperty as a}from"../patterns/utils.js";import{colorAndTransparencyProperty as c,screenSizeProperty as l}from"./materialUtils.js";import{lineCaps as n}from"./symbolLayerUtils3D.js";var m;let u=m=class extends o{constructor(r){super(r),this.color=new t([0,0,0,1]),this.size=e(1),this.pattern=null,this.patternCap="butt"}clone(){const r={color:s(this.color)?this.color.clone():null,size:this.size,pattern:s(this.pattern)?this.pattern.clone():null,patternCap:this.patternCap};return new m(r)}};r([p(c)],u.prototype,"color",void 0),r([p(l)],u.prototype,"size",void 0),r([p(a)],u.prototype,"pattern",void 0),r([p({type:n,json:{default:"butt",write:{overridePolicy(){return{enabled:s(this.pattern)}}}}})],u.prototype,"patternCap",void 0),u=m=r([i("esri.symbols.support.Symbol3DOutline")],u);export{u as Symbol3DOutline};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";var t;let p=t=class extends o{clone(){return new t({url:this.url})}};r([s({type:String})],p.prototype,"url",void 0),p=t=r([e("esri.symbols.support.Thumbnail")],p);
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";var t;let p=t=class extends o{clone(){return new t({url:this.url})}};r([s({type:String})],p.prototype,"url",void 0),p=t=r([e("esri.symbols.support.Thumbnail")],p);export{p as Thumbnail};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSymbol3D as t}from"../../symbols.js";import{isDevEnvironment as e,adjustStaticAGOUrl as r}from"../../core/devEnvironmentUtils.js";import o from"../../core/Error.js";import{urlToObject as l,removeFile as n}from"../../core/urlUtils.js";import s from"../../portal/Portal.js";import{f as m}from"../../chunks/persistableUrlUtils.js";import{fromJSON as i}from"./jsonUtils.js";import a from"./StyleOrigin.js";import{requestJSON as u,makeCIMSymbolRef as p,fetchStyle as y,symbolUrlFromStyleItem as f,Style2DUrlTemplate as c}from"./styleUtils.js";import b
|
|
5
|
+
import{isSymbol3D as t}from"../../symbols.js";import{isDevEnvironment as e,adjustStaticAGOUrl as r}from"../../core/devEnvironmentUtils.js";import o from"../../core/Error.js";import{urlToObject as l,removeFile as n}from"../../core/urlUtils.js";import s from"../../portal/Portal.js";import{f as m}from"../../chunks/persistableUrlUtils.js";import{fromJSON as i}from"./jsonUtils.js";import a from"./StyleOrigin.js";import{requestJSON as u,makeCIMSymbolRef as p,fetchStyle as y,symbolUrlFromStyleItem as f,Style2DUrlTemplate as c}from"./styleUtils.js";import{Thumbnail as b}from"./Thumbnail.js";function g(t,e,r,l){return t.name?t.styleName&&"Esri2DPointSymbolsStyle"===t.styleName?j(t,e,l):y(t,e,l).then((o=>h(o,t.name,e,r,l))):Promise.reject(new o("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))}function h(y,c,g,h,j){const d=y.data,U={portal:g&&g.portal||s.getDefault(),url:l(y.baseUrl),origin:"portal-item"},N=d.items.find((t=>t.name===c));if(!N){const t=`The symbol name '${c}' could not be found`;return Promise.reject(new o("symbolstyleutils:symbol-name-not-found",t,{symbolName:c}))}let w=m(f(N,h),U),P=N.thumbnail&&N.thumbnail.href;const S=N.thumbnail&&N.thumbnail.imageData;e()&&(w=r(w),P=r(P));const D={portal:g.portal,url:l(n(w)),origin:"portal-item"};return u(w,j).then((e=>{const r="cimRef"===h?p(e.data):e.data,o=i(r,D);if(o&&t(o)){if(P){const t=m(P,U);o.thumbnail=new b({url:t})}else S&&(o.thumbnail=new b({url:`data:image/png;base64,${S}`}));y.styleUrl?o.styleOrigin=new a({portal:g.portal,styleUrl:y.styleUrl,name:c}):y.styleName&&(o.styleOrigin=new a({portal:g.portal,styleName:y.styleName,name:c}))}return o}))}function j(t,e,r){const o=c.replace(/\{SymbolName\}/gi,t.name);return u(o,r).then((t=>{const r=p(t.data);return i(r,{portal:e.portal,url:l(n(o)),origin:"portal-item"})}))}export{h as fetchSymbolFromStyle,g as resolveWebStyleSymbol};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
class e{constructor(e,i){this.lockedSchemaPixelSize=e,this.isGCS=i}getLevelRowColumn(e){return this.isGCS?[e[0],e[1]>>1,e[2]>>1]:256===this.lockedSchemaPixelSize&&e[0]>0?[e[0]-1,e[1]>>1,e[2]>>1]:e}adjustLevel(e){return this.isGCS?e:256===this.lockedSchemaPixelSize?e>0?e-1:0:e}getShift(e,i){let t=0,s=0;return(256===this.lockedSchemaPixelSize||this.isGCS)&&(e[2]%2&&(t=i),e[1]%2&&(s=i)),[t,s]}getScale(e){if(this.isGCS){if(512===this.lockedSchemaPixelSize)return 4}else if(256===this.lockedSchemaPixelSize&&0===e)return 1;return 2}}export{e as SchemaHelper};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/
|
|
5
|
+
import"../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{b as build}from"../../../chunks/ChapmanAtmosphere.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Handles.js";import{lerp as t,smoothstep as i}from"../../../core/mathUtils.js";import{releaseMaybe as s,disposeMaybe as a,destroyMaybe as r,isSome as h,isNone as n,unwrapOr as o}from"../../../core/maybe.js";import{on as d}from"../../../core/watchUtils.js";import{a as _}from"../../../chunks/mat4.js";import{c as m}from"../../../chunks/mat4f64.js";import{s as c}from"../../../chunks/vec2.js";import{a as u}from"../../../chunks/vec2f64.js";import{s as l,l as p,g as f}from"../../../chunks/vec3.js";import{c as v}from"../../../chunks/vec3f64.js";import{c as g,f as b}from"../../../chunks/vec4f64.js";import{earth as T}from"../../../geometry/support/Ellipsoid.js";import{rayLeighScaleHeight as w,atmosphereHeight as R,betaRayleigh as H,betaOzone as j,betaMie as x,innerAtmosphereDepth as q,computeInnerAltitudeFade as E}from"./atmosphereUtils.js";import{ChapmanAtmosphereTechniqueConfiguration as U,ChapmanAtmosphereTechnique as z}from"./ChapmanAtmosphereTechnique.js";import{Pos2Tex as B}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as F}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as P}from"../../webgl/enums.js";class y{constructor(e){this._view=e,this.type="realistic",this.canRender=!0,this._cameraPosition=v(),this._projectionInverse=m(),this._viewInverse=m(),this._heightParameters=g(),this._betasRayleigh=v(),this._betasCombined=v(),this._scaleHeight=0,this._radii=u(),this._nearFar=u(),this._cameraHeight=0,this._cameraHeightSq=0,this._cAtmosphere=0,this._innerFadeDistance=0,this._altitudeFade=0,this._lowerElevationBoundRadius=0,this._lowerBoundEarthRadius=T.radius,this._hazeStrength=1,this._darkenHaze=!1,this._updateRadius(T.radius)}destroy(){this._atmosphereTechnique=s(this._atmosphereTechnique),this._atmosphereHazeTechnique=s(this._atmosphereHazeTechnique),this._vao=a(this._vao),this._handles=r(this._handles)}when(){return Promise.resolve()}initializeRenderContext(t){const i=t.renderContext.rctx;this._handles=new e,h(this._view.basemapTerrain.rootTiles)&&this._updateElevation({spatialReference:this._view.basemapTerrain.spatialReference,tile:this._view.basemapTerrain.rootTiles[0],extent:this._view.basemapTerrain.rootTiles[0].extent,context:"ground"}),this._handles.add(d(this._view,"basemapTerrain","elevation-change",(e=>this._updateElevation(e)),(()=>this._updateElevation()))),this._handles.add(d(this._view,"basemapTerrain","elevation-bounds-change",(()=>this._updateVisibleElevationBounds())));const s=new U;s.haze=!1,this._atmosphereTechnique=t.shaderTechniqueRep.acquire(z,s),s.haze=!0,this._atmosphereHazeTechnique=t.shaderTechniqueRep.acquire(z,s),this._vao=F(i,B),this._scaleHeight=w*R,l(this._betasRayleigh,H[0],H[1],H[2]),l(this._betasCombined,H[0]+j[0],H[1]+j[1],H[2]+j[2])}render(e){this._render(e,this._atmosphereTechnique,e.offscreenRenderingHelper.depthTexture)}renderHaze(e,t){this._darkenHaze=t,this._render(e,this._atmosphereHazeTechnique,e.offscreenRenderingHelper.linearDepthTexture)}_render(e,t,i){this._update(e.camera);const s=e.rctx,a=e.offscreenRenderingHelper;s.useProgram(t.program),t.bindPipelineState(s),a.renderDepthDetached((()=>{t.program.bindTexture(i,"depthTex"),this._renderCommon(t.program,e)}))}_renderCommon(e,t){if(n(this._vao))return;const i=t.rctx;t.scenelightingData.setLightDirectionUniform(e),e.setUniform4fv("heightParameters",this._heightParameters),e.setUniform3fv("cameraPosition",this._cameraPosition),e.setUniformMatrix4fv("
|
|
5
|
+
import e from"../../../core/Handles.js";import{lerp as t,smoothstep as i}from"../../../core/mathUtils.js";import{releaseMaybe as s,disposeMaybe as a,destroyMaybe as r,isSome as h,isNone as n,unwrapOr as o}from"../../../core/maybe.js";import{on as d}from"../../../core/watchUtils.js";import{a as _}from"../../../chunks/mat4.js";import{c as m}from"../../../chunks/mat4f64.js";import{s as c}from"../../../chunks/vec2.js";import{a as u}from"../../../chunks/vec2f64.js";import{s as l,l as p,g as f}from"../../../chunks/vec3.js";import{c as v}from"../../../chunks/vec3f64.js";import{c as g,f as b}from"../../../chunks/vec4f64.js";import{earth as T}from"../../../geometry/support/Ellipsoid.js";import{rayLeighScaleHeight as w,atmosphereHeight as R,betaRayleigh as H,betaOzone as j,betaMie as x,innerAtmosphereDepth as q,computeInnerAltitudeFade as E}from"./atmosphereUtils.js";import{ChapmanAtmosphereTechniqueConfiguration as U,ChapmanAtmosphereTechnique as z}from"./ChapmanAtmosphereTechnique.js";import{Pos2Tex as B}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as F}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as P}from"../../webgl/enums.js";class y{constructor(e){this._view=e,this.type="realistic",this.canRender=!0,this._cameraPosition=v(),this._projectionInverse=m(),this._viewInverse=m(),this._heightParameters=g(),this._betasRayleigh=v(),this._betasCombined=v(),this._scaleHeight=0,this._radii=u(),this._nearFar=u(),this._cameraHeight=0,this._cameraHeightSq=0,this._cAtmosphere=0,this._innerFadeDistance=0,this._altitudeFade=0,this._lowerElevationBoundRadius=0,this._lowerBoundEarthRadius=T.radius,this._hazeStrength=1,this._darkenHaze=!1,this._updateRadius(T.radius)}destroy(){this._atmosphereTechnique=s(this._atmosphereTechnique),this._atmosphereHazeTechnique=s(this._atmosphereHazeTechnique),this._vao=a(this._vao),this._handles=r(this._handles)}when(){return Promise.resolve()}initializeRenderContext(t){const i=t.renderContext.rctx;this._handles=new e,h(this._view.basemapTerrain.rootTiles)&&this._updateElevation({spatialReference:this._view.basemapTerrain.spatialReference,tile:this._view.basemapTerrain.rootTiles[0],extent:this._view.basemapTerrain.rootTiles[0].extent,context:"ground"}),this._handles.add(d(this._view,"basemapTerrain","elevation-change",(e=>this._updateElevation(e)),(()=>this._updateElevation()))),this._handles.add(d(this._view,"basemapTerrain","elevation-bounds-change",(()=>this._updateVisibleElevationBounds())));const s=new U;s.haze=!1,this._atmosphereTechnique=t.shaderTechniqueRep.acquire(z,s),s.haze=!0,this._atmosphereHazeTechnique=t.shaderTechniqueRep.acquire(z,s),this._vao=F(i,B),this._scaleHeight=w*R,l(this._betasRayleigh,H[0],H[1],H[2]),l(this._betasCombined,H[0]+j[0],H[1]+j[1],H[2]+j[2])}render(e){this._render(e,this._atmosphereTechnique,e.offscreenRenderingHelper.depthTexture)}renderHaze(e,t){this._darkenHaze=t,this._render(e,this._atmosphereHazeTechnique,e.offscreenRenderingHelper.linearDepthTexture)}_render(e,t,i){this._update(e.camera);const s=e.rctx,a=e.offscreenRenderingHelper;s.useProgram(t.program),t.bindPipelineState(s),a.renderDepthDetached((()=>{t.program.bindTexture(i,"depthTex"),this._renderCommon(t.program,e)}))}_renderCommon(e,t){if(n(this._vao))return;const i=t.rctx;t.scenelightingData.setLightDirectionUniform(e),e.setUniform4fv("heightParameters",this._heightParameters),e.setUniform3fv("cameraPosition",this._cameraPosition),e.setUniformMatrix4fv("inverseProjectionMatrix",this._projectionInverse),e.setUniformMatrix4fv("inverseViewMatrix",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform2fv("radii",this._radii),e.setUniform1f("scaleHeight",this._scaleHeight),e.setUniform1f("betaMie",x),e.setUniform3fv("betaRayleigh",this._betasRayleigh),e.setUniform3fv("betaCombined",this._betasCombined),e.setUniform1f("innerFadeDistance",this._innerFadeDistance),e.setUniform1f("altitudeFade",this._altitudeFade),e.setUniform1f("hazeStrength",this._hazeStrength),i.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),i.drawArrays(P.TRIANGLE_STRIP,0,4)}_adjustRadiusForTesselation(e){return e*Math.cos(Math.PI/16/16)}_updateElevation(e){const t=e?e.tile:o(this._view.basemapTerrain.rootTiles,[null])[0];if(n(t)||0!==t.level)return;const i=this._adjustRadiusForTesselation(T.radius+t.elevationBounds[0]);i!==this._lowerElevationBoundRadius&&(this._lowerElevationBoundRadius=i,this._lowerBoundEarthRadius=-1,this._updateVisibleElevationBounds())}_updateVisibleElevationBounds(){const e=this._adjustRadiusForTesselation(T.radius+this._view.basemapTerrain.elevationBounds.min);(this._lowerBoundEarthRadius<0||e<this._lowerBoundEarthRadius)&&this._updateRadius(e)}_updateRadius(e){this._lowerBoundEarthRadius=e,c(this._radii,e,e+R),this._innerFadeDistance=2*Math.sqrt((2*e-q)*q)}_update(e){if(n(e))return;this._cameraHeight=p(e.eye),this._cameraHeightSq=this._cameraHeight*this._cameraHeight,this._cAtmosphere=this._cameraHeightSq-this._radii[1]*this._radii[1];const s=Math.min(1,Math.max(0,(this._cameraHeight-this._radii[0])/R));this._heightParameters=b(this._cameraHeight,this._cameraHeightSq,this._cAtmosphere,s),f(this._cameraPosition,e.eye),_(this._projectionInverse,e.projectionMatrix),_(this._viewInverse,e.viewMatrix),c(this._nearFar,e.near,e.far),this._altitudeFade=E(this._cameraHeight-this._lowerBoundEarthRadius),this._hazeStrength=this._darkenHaze?t(.6,1,i(9500,10500,this._cameraHeight-T.radius)):1}static isSupported(e){return e.renderContext.rctx.capabilities.depthTexture}}export{y as ChapmanAtmosphere};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/EvaluateMainLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import"../webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import"../webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import"../webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/
|
|
5
|
+
import"../webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/EvaluateMainLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import"../webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import"../webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import"../webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{b as build}from"../../../chunks/CloudsComposition.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{init as c}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{x as f}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f as _,z as g}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as y}from"../../../geometry/projectionEllipsoid.js";import{cloudPresets as v}from"./CloudsPresets.js";import{CloudsTechniqueConfiguration as
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{init as c}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{x as f}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f as _,z as g}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as y}from"../../../geometry/projectionEllipsoid.js";import{cloudPresets as v}from"./CloudsPresets.js";import{CloudsTechniqueConfiguration as b,CloudsTechnique as x}from"./CloudsTechnique.js";import{NoiseTextureAtlas as S}from"./NoiseTextureAtlas.js";import{createQuadVAO as T}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as w}from"../../support/Scheduler.js";import{TextureType as z,PixelFormat as M,PixelType as j,TextureWrapMode as C,TextureSamplingMode as U,TargetType as E}from"../../webgl/enums.js";import{FramebufferObject as R}from"../../webgl/FramebufferObject.js";let q=class extends e{constructor(t){super(t),this._frameTask=null,this._handles=new i,this._cubeMapSize=s("esri-mobile")?1024:2048,this._techniques=[],this._techniqueConfiguration=new b,this.coverage=r(P.coverage[0],P.coverage[1],.5),this.density=r(P.density[0],P.density[1],.5),this.absorption=r(P.absorption[0],P.absorption[1],.5),this.cloudSize=r(P.cloudSize[0],P.cloudSize[1],.5),this.detailSize=r(P.detailSize[0],P.detailSize[1],.5),this.smoothness=r(P.smoothness[0],P.smoothness[1],.5),this.cloudHeight=r(P.cloudHeight[0],P.cloudHeight[1],.5),this.raymarchingStepType=P.raymarchingStepType,this._cloudRadius=0,this._viewMatrix=l(),this._viewMatrix3=d(),this.running=!1}_getTechnique(t){const e=this._techniques[t];return e||(this._techniqueConfiguration.steps=t,this._techniques[t]=new x({rctx:this.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[t])}initialize(){this._vao=T(this.rctx);const t=y(this.view.spatialReference);this._cloudRadius=.5*t.radius,this.setDirty(),this._frameTask=this.view.resourceController.scheduler.registerTask(w.CLOUDS_GENERATOR,this),this._handles.add(this._frameTask),this._handles.add(c(this,"coverage",(()=>this.setDirty())));["coverage","density","absorption","cloudSize","detailSize","smoothness","cloudHeight","raymarchingStepType"].forEach((t=>this._handles.add(c(this,t,(()=>this.setDirty())))))}destroy(){this._handles.destroy(),this._techniques.forEach((t=>o(t))),this._techniques=null,this._frameBufferCube=h(this._frameBufferCube),this._vao=h(this._vao),this._noiseTexture=a(this._noiseTexture)}_ensureNoiseTexture(){return n(this._noiseTexture)&&(this._noiseTexture=new S(this.rctx,this.view),this._noiseTexture.render(this.rctx)),this._noiseTexture}get frameBufferCube(){if(n(this._frameBufferCube)){const t={target:z.TEXTURE_CUBE_MAP,pixelFormat:M.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:C.CLAMP_TO_EDGE,samplingMode:U.LINEAR,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new R(this.rctx,{colorTarget:E.CUBEMAP,width:this._cubeMapSize,height:this._cubeMapSize},t)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}applyPreset(t,e){const i=t.median,s=t=>{const s=r(t[0],t[1],i);return e<.5?r(t[0],s,2*e):r(s,t[1],2*(e-.5))};this.coverage=s(t.coverage),this.density=s(t.density),this.absorption=s(t.absorption),this.cloudSize=s(t.cloudSize),this.detailSize=s(t.detailSize),this.smoothness=s(t.smoothness),this.cloudHeight=s(t.cloudHeight),this.raymarchingStepType=t.raymarchingStepType}setDirty(){this.running=!0}runTask(t){if(0===this.coverage||n(this._vao))return void(this.running=!1);const e=this._ensureNoiseTexture().textureAtlas;if(n(e))return void(this.running=!1);const i=this.rctx.getViewport();this.rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this.rctx.bindFramebuffer(this.frameBufferCube);const s=this._getTechnique(this.raymarchingStepType),o=s.program;this.rctx.useProgram(o);const h=1+this.absorption,a=r(35,120,this.absorption);o.bindTexture(e,"cloudShapeTexture"),o.setUniform1f("cloudRadius",this._cloudRadius),o.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),o.setUniform1f("power",a),o.setUniform1f("sigmaE",h),o.setUniform1f("density",r(0,.3,this.density)),o.setUniform1f("cloudSize",r(0,.02,Math.max(.01,1-this.cloudSize))),o.setUniform1f("detailSize",r(0,.2,Math.max(.01,1-this.detailSize))),o.setUniform1f("smoothness",r(0,.5,1-this.smoothness)),o.setUniform1f("cloudHeight",r(0,1500,this.cloudHeight)),o.setUniform1f("coverage",this.coverage),this.rctx.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),s.bindPipelineState(this.rctx);for(let r=0;r<5;r++){const t=A[r],e=B[r];f(this._viewMatrix,k,t,e),m(this._viewMatrix3,this._viewMatrix),o.setUniformMatrix3fv("view",this._viewMatrix3);const i=z.TEXTURE_CUBE_MAP_POSITIVE_X+r;this.frameBufferCube.setColorTextureTarget(i),this.rctx.gl.drawArrays(this.rctx.gl.TRIANGLE_STRIP,0,4),this.rctx.gl.flush()}this.running=!1,this.rctx.setViewport(i.x,i.y,i.width,i.height),this.requestRender(),t.madeProgress()}};t([u({constructOnly:!0})],q.prototype,"rctx",void 0),t([u({constructOnly:!0})],q.prototype,"view",void 0),t([u({constructOnly:!0})],q.prototype,"requestRender",void 0),t([u()],q.prototype,"_frameTask",void 0),t([u()],q.prototype,"coverage",void 0),t([u()],q.prototype,"density",void 0),t([u()],q.prototype,"absorption",void 0),t([u()],q.prototype,"cloudSize",void 0),t([u()],q.prototype,"detailSize",void 0),t([u()],q.prototype,"smoothness",void 0),t([u()],q.prototype,"cloudHeight",void 0),t([u()],q.prototype,"raymarchingStepType",void 0),t([u()],q.prototype,"running",void 0),q=t([p("esri.views.3d.environment.CloudsGenerator")],q);const A=[_(1,0,0),_(-1,0,0),_(0,1,0),_(0,-1,0),_(0,0,1)],B=[_(0,1,0),_(0,1,0),_(0,0,-1),_(0,0,1),_(0,1,0)],k=g(),P=v.sunny;export{q as CloudsGenerator};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/
|
|
5
|
+
import"../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{b as build}from"../../../chunks/Fog.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{smoothstep as e,lerp as t}from"../../../core/mathUtils.js";import{isNone as i,releaseMaybe as r,disposeMaybe as s}from"../../../core/maybe.js";import{a}from"../../../chunks/mat4.js";import{c as h}from"../../../chunks/mat4f64.js";import{s as o}from"../../../chunks/vec2.js";import{a as n}from"../../../chunks/vec2f64.js";import{l as c}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as _}from"./atmosphereUtils.js";import{FogTechniqueConfiguration as f,FogTechnique as m}from"./FogTechnique.js";import{weatherHeightLimit as g}from"./weather.js";import{Pos2Tex as
|
|
5
|
+
import{smoothstep as e,lerp as t}from"../../../core/mathUtils.js";import{isNone as i,releaseMaybe as r,disposeMaybe as s}from"../../../core/maybe.js";import{a}from"../../../chunks/mat4.js";import{c as h}from"../../../chunks/mat4f64.js";import{s as o}from"../../../chunks/vec2.js";import{a as n}from"../../../chunks/vec2f64.js";import{l as c}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as _}from"./atmosphereUtils.js";import{FogTechniqueConfiguration as f,FogTechnique as m}from"./FogTechnique.js";import{weatherHeightLimit as g}from"./weather.js";import{Pos2Tex as d}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as p}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as l}from"../../webgl/enums.js";class v{constructor(e,t){this._projectionInverse=h(),this._viewInverse=h(),this._nearFar=n(),this._darkenHaze=!1,this._hazeMultiplier=1,this._foggyFadeStart=.3,this._foggyFadeEnd=.6,this._hazeFadeStart=.7,this._hazeFadeEnd=1,this._hazeFadeBuffer=500,this._strength=4e-6,this._view=t;const i=e.renderContext.rctx;this._vao=p(i,d),this._shaderTechniqueRepository=e.shaderTechniqueRep;const r=u(t.spatialReference);this._planetRadius=r.radius,this._atmosphereRadius=r.radius+_}set strength(e){this._strength=e}get strength(){return this._strength}get foggyWeatherTechnique(){if(i(this._foggyWeatherTechnique)){const e=new f;e.haze=!1,this._foggyWeatherTechnique=this._shaderTechniqueRepository.acquire(m,e)}return this._foggyWeatherTechnique}get distanceFogTechnique(){if(i(this._distanceFogTechnique)){const e=new f;e.haze=!0,this._distanceFogTechnique=this._shaderTechniqueRepository.acquire(m,e)}return this._distanceFogTechnique}destroy(){this._distanceFogTechnique=r(this._distanceFogTechnique),this._foggyWeatherTechnique=r(this._foggyWeatherTechnique),this._vao=s(this._vao)}when(){return Promise.resolve()}render(e,t,i){if(0===this._view.basemapTerrain.baseOpacity&&!t)return;if(this._darkenHaze=i,this._update(e.camera,t),this._fogAmount<=0)return;const r=e.rctx,s=e.offscreenRenderingHelper,a=t?this.foggyWeatherTechnique:this.distanceFogTechnique;r.useProgram(a.program),a.bindPipelineState(r),s.renderDepthDetached((()=>{a.program.bindTexture(s.depthTexture,"depthTex"),this._renderFog(a.program,e)}))}_renderFog(e,t){if(i(this._vao))return!1;const r=t.rctx;return t.scenelightingData.setLightDirectionUniform(e),e.setUniform3fv("cameraPosition",t.camera.eye),e.setUniformMatrix4fv("inverseProjectionMatrix",this._projectionInverse),e.setUniformMatrix4fv("inverseViewMatrix",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform1f("atmosphereC",this._atmosphereC),e.setUniform1f("fogStrength",this._strength),e.setUniform1f("fogAmount",this._hazeMultiplier*this._fogAmount),r.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(l.TRIANGLE_STRIP,0,4),!0}_update(r,s){if(i(r))return;a(this._projectionInverse,r.projectionMatrix),a(this._viewInverse,r.viewMatrix),o(this._nearFar,r.near,r.far);const h=c(r.eye),n=h*h;this._atmosphereC=n-this._atmosphereRadius*this._atmosphereRadius,this._fogAmount=s?1-e(this._foggyFadeStart*g,this._foggyFadeEnd*g,Math.abs(h-this._planetRadius)):1-e(this._hazeFadeStart*g,this._hazeFadeEnd*g,Math.abs(h-this._planetRadius)),this._hazeMultiplier=this._darkenHaze?t(.4,1,e(g-this._hazeFadeBuffer,g+this._hazeFadeBuffer,Math.abs(h-this._planetRadius))):1}static isSupported(e){return e.capabilities.depthTexture}}export{v as Fog};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{disposeMaybe as
|
|
5
|
+
import e from"../../../core/Logger.js";import{disposeMaybe as t,abortMaybe as r}from"../../../core/maybe.js";import{createResolver as o,isAbortError as i}from"../../../core/promiseUtils.js";import{c as s}from"../../../chunks/mat4.js";import{c as n}from"../../../chunks/mat4f64.js";import{requestImage as a}from"../../../support/requestImageUtils.js";import{S as m}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechniqueConfiguration as l,SimpleAtmosphereTechnique as h}from"./SimpleAtmosphereTechnique.js";import c from"./resources/SimpleAtmosphereTexture.js";import{glLayout as p}from"../support/buffer/glUtil.js";import{newLayout as u}from"../support/buffer/InterleavedLayout.js";import{bindProjectionMatrix as f}from"../webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Default3D as g}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import _ from"../webgl-engine/lib/GeometryUtil.js";import{VertexAttribute as d}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as b}from"../../webgl/BufferObject.js";import{PixelFormat as y,PixelType as j,TextureWrapMode as x,TextureSamplingMode as v,PrimitiveType as w,Usage as A}from"../../webgl/enums.js";import{Texture as T}from"../../webgl/Texture.js";import{vertexCount as C}from"../../webgl/Util.js";import{VertexArrayObject as R}from"../../webgl/VertexArrayObject.js";const q=e.getLogger("esri.views.3d.environment.PanoramicAtmosphere");class I{constructor(){this.type="panoramic",this._atmosphereTechniqueConfig=new l,this._readyResolver=o(),this._readyController=new AbortController}destroy(){this._readyResolver.reject(),this._texture=t(this._texture),this._vao=t(this._vao),this._readyController=r(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._atmosphereTechniqueConfig.geometry=m.Cylinder,this._atmosphereTechnique=e.shaderTechniqueRep.acquire(h,this._atmosphereTechniqueConfig);const t=e.renderContext.rctx;this._vao=this._createVertexArrayObject(t),this._vaoCount=C(this._vao,"geometry"),a(c,{signal:this._readyController.signal}).then((r=>{this._texture=new T(t,{pixelFormat:y.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:x.CLAMP_TO_EDGE,samplingMode:v.LINEAR,flipped:!0},r),e.requestRender(),this._readyController=null,this._readyResolver.resolve()})).catch((e=>{i(e)||q.error("Unable to initialize atmosphere: image request failed",e),this._readyResolver.reject()}))}get canRender(){return null!=this._texture}render(e){const t=e.rctx,r=this._atmosphereTechnique.program;t.useProgram(r),this._atmosphereTechnique.bindPipelineState(t),r.bindTexture(this._texture,"tex"),f(r,e.camera.projectionMatrix),O(S,e.camera.viewMatrix),r.setUniformMatrix4fv("view",S),r.setUniform4f("uColor",1,1,1,1),e.scenelightingData.setLightDirectionUniform(r),t.bindVAO(this._vao),r.assertCompatibleVertexAttributeLocations(this._vao),t.drawArrays(w.TRIANGLES,0,this._vaoCount)}renderHaze(){return!1}_createVertexArrayObject(e){const t=_.createPolySphereGeometry(1,2,!1),r=t.indices.get(d.POSITION);for(let n=0;n<r.length;n+=3){const e=r[n];r[n]=r[n+2],r[n+2]=e}const o=t.vertexAttributes.get(d.POSITION).data,i=L.createBuffer(r.length),s=i.position;for(let n=0;n<r.length;++n){const e=3*r[n];s.set(n,0,o[e]),s.set(n,1,o[e+1]),s.set(n,2,o[e+2])}return new R(e,g,{geometry:p(L)},{geometry:b.createVertex(e,A.STATIC_DRAW,i.buffer)})}}function O(e,t){s(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}const S=n(),L=u().vec3f(d.POSITION);export{I as PanoramicAtmosphere};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/
|
|
5
|
+
import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{P as PrecipitationType,b as build}from"../../../chunks/Precipitation.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{isNone as t,disposeMaybe as r,isSome as i}from"../../../core/maybe.js";import{secondsFromMilliseconds as s}from"../../../core/time.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as o}from"../../../geometry/projectionEllipsoid.js";import{P as c}from"../../../chunks/Precipitation.glsl.js";import{PrecipitationTechniqueConfiguration as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{isNone as t,disposeMaybe as r,isSome as i}from"../../../core/maybe.js";import{secondsFromMilliseconds as s}from"../../../core/time.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as o}from"../../../geometry/projectionEllipsoid.js";import{P as c}from"../../../chunks/Precipitation.glsl.js";import{PrecipitationTechniqueConfiguration as u,PrecipitationTechnique as h}from"./PrecipitationTechnique.js";import{glLayout as p}from"../support/buffer/glUtil.js";import{newLayout as m}from"../support/buffer/InterleavedLayout.js";import{AnimationTimer as _}from"../webgl-engine/lib/AnimationTimer.js";import{VertexAttribute as d}from"../webgl-engine/lib/VertexAttribute.js";import{WatchUpdatingTracking as f}from"../../support/WatchUpdatingTracking.js";import{BufferObject as l}from"../../webgl/BufferObject.js";import{PrimitiveType as T,Usage as g}from"../../webgl/enums.js";import{bindVertexBufferLayout as b,unbindVertexBufferLayout as y}from"../../webgl/Util.js";import{VertexArrayObject as j}from"../../webgl/VertexArrayObject.js";let w=class{constructor(e,t){this._numParticles=25e4,this._rainSpeed=.1,this._snowSpeed=.01,this._renderParameter={camera:null,time:0,radius:1},this._animation=new _,this._updatingTracking=new f,this._renderParameter.time=0,this._renderParameter.radius=o(t.spatialReference).radius,this._shaderTechniqueRepository=e.shaderTechniqueRep}get updating(){return this._updatingTracking.updating}get rainTechnique(){if(t(this._rainTechnique)){const e=new u;e.type=c.RAIN,this._rainTechnique=this._shaderTechniqueRepository.acquire(h,e)}return this._rainTechnique}get snowTechnique(){if(t(this._snowTechnique)){const e=new u;e.type=c.SNOW,this._snowTechnique=this._shaderTechniqueRepository.acquire(h,e)}return this._snowTechnique}destroy(){this._updatingTracking.destroy(),this._numParticles=0,this._snowTechnique=r(this._snowTechnique),this._rainTechnique=r(this._rainTechnique),this._vao=r(this._vao),this._instanceIdBuffer=r(this._instanceIdBuffer)}update(e){return this._animation.advance(e)}render(e,r,i){const{rctx:n,camera:a}=e;this._ensureResources(n);const o=i===c.RAIN?this.rainTechnique:this.snowTechnique;if(t(o)||t(this._vao)||t(this._instanceIdBuffer))return!1;const u=o.program,p=h.attributeLocation;return n.useProgram(u),this._renderParameter.camera=a,this._renderParameter.time=(i===c.RAIN?this._rainSpeed:this._snowSpeed)*s(this._animation.time),o.bindPass(this._renderParameter),o.bindPipelineState(n),n.bindVAO(this._vao),u.assertCompatibleVertexAttributeLocations(this._vao),b(n,p,this._instanceIdBuffer,q,0),n.capabilities.instancing.drawArraysInstanced(T.TRIANGLES,0,3,this._numParticles*r),y(n,p,this._instanceIdBuffer,q),!0}_ensureResources(e){i(this._vao)||(this._vao=this._createVertexArrayObject(e),i(this._instanceIdBuffer)||(this._instanceIdBuffer=this._createInstanceIndices(e)))}_createInstanceIndices(e){const t=[];for(let r=0;r<this._numParticles;r++)t.push(r);return l.createVertex(e,g.STATIC_DRAW,new Float32Array(t))}_createVertexArrayObject(e){const t=new Float32Array([-1,0,1,1,0,-1,1,0,1]);return new j(e,h.attributeLocation,{geometry:p(I)},{geometry:l.createVertex(e,g.STATIC_DRAW,t)})}};e([n({constructOnly:!0})],w.prototype,"requestRender",void 0),e([n({readOnly:!0})],w.prototype,"updating",null),e([n()],w.prototype,"_updatingTracking",void 0),w=e([a("esri.views.3d.environment.Precipitation")],w);const I=m().vec3f(d.POSITION),q=p(m().f32(d.INSTANCEFEATUREATTRIBUTE),1);export{w as Precipitation};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import{smoothstep as i}from"../../../core/mathUtils.js";import{l as e}from"../../../chunks/vec3.js";import{c as r}from"../../../chunks/vec3f64.js";import{a as s,P as o}from"../../../chunks/Precipitation.glsl.js";import{weatherHeightLimit as h}from"./weather.js";import{bindProjectionMatrix as a}from"../webgl-engine/core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as n}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as m}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as c}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js";import{
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import{smoothstep as i}from"../../../core/mathUtils.js";import{l as e}from"../../../chunks/vec3.js";import{c as r}from"../../../chunks/vec3f64.js";import{a as s,P as o}from"../../../chunks/Precipitation.glsl.js";import{weatherHeightLimit as h}from"./weather.js";import{bindProjectionMatrix as a}from"../webgl-engine/core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as n}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as m}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as c}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Program as l}from"../webgl-engine/lib/Program.js";import{VertexAttribute as p}from"../webgl-engine/lib/VertexAttribute.js";import{BlendFactor as d,CompareFunction as g}from"../../webgl/enums.js";import{makePipelineState as _,separateBlendingParams as w,defaultColorWriteParams as u}from"../../webgl/renderState.js";class b extends m{constructor(){super(...arguments),this._width=500,this._offset=r(),this._tile=r()}initializeProgram(t){const i=b.shader.get(),e=this.configuration,r=i.build({type:e.type});return new l(t.rctx,r,b.attributeLocation)}initializePipeline(){return _({blending:w(d.ONE,d.ONE,d.ONE_MINUS_SRC_ALPHA,d.ONE_MINUS_SRC_ALPHA),depthTest:{func:g.LEQUAL},colorWrite:u})}bindPass(t){const r=t.camera.eye;this._tile[0]=Math.floor((r[0]+.5*this._width)/this._width),this._tile[1]=Math.floor((r[1]+.5*this._width)/this._width),this._tile[2]=Math.floor((r[2]+.5*this._width)/this._width),this._offset[0]=r[0]-this._tile[0]*this._width,this._offset[1]=r[1]-this._tile[1]*this._width,this._offset[2]=r[2]-this._tile[2]*this._width,this.program.setUniform1f("width",this._width),this.program.setUniform3fv("offset",this._offset),this.program.setUniformMatrix4fv("view",t.camera.viewMatrix),this.program.setUniform3fv("cameraPosition",t.camera.eye),a(this.program,t.camera.projectionMatrix),this.program.setUniform1f("time",t.time);const s=1-i(.9*h,h,Math.abs(e(t.camera.eye)-t.radius));this.program.setUniform1f("heightFade",s)}}b.shader=new n(s,(()=>import("./Precipitation.glsl.js"))),b.attributeLocation=new Map([[p.POSITION,0],[p.INSTANCEFEATUREATTRIBUTE,1]]);class j extends c{constructor(){super(...arguments),this.type=o.RAIN}}t([f()],j.prototype,"type",void 0);export{b as PrecipitationTechnique,j as PrecipitationTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../webgl-engine/core/shaderLibrary/Transform.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/
|
|
5
|
+
import"../webgl-engine/core/shaderLibrary/Transform.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{S as SimpleAtmosphereGeometry,b as build}from"../../../chunks/SimpleAtmosphere.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{lerp as t,clamp as r}from"../../../core/mathUtils.js";import{removeMaybe as i,disposeMaybe as s,abortMaybe as o,isNone as a}from"../../../core/maybe.js";import{createResolver as n,isAbortError as h}from"../../../core/promiseUtils.js";import{init as m}from"../../../core/watchUtils.js";import{n as l}from"../../../chunks/mat4.js";import{c}from"../../../chunks/mat4f64.js";import{s as d}from"../../../chunks/vec2.js";import{a as u}from"../../../chunks/vec2f64.js";import{l as p,a as f,b as _,i as g,c as R,p as
|
|
5
|
+
import e from"../../../core/Logger.js";import{lerp as t,clamp as r}from"../../../core/mathUtils.js";import{removeMaybe as i,disposeMaybe as s,abortMaybe as o,isNone as a}from"../../../core/maybe.js";import{createResolver as n,isAbortError as h}from"../../../core/promiseUtils.js";import{init as m}from"../../../core/watchUtils.js";import{n as l}from"../../../chunks/mat4.js";import{c}from"../../../chunks/mat4f64.js";import{s as d}from"../../../chunks/vec2.js";import{a as u}from"../../../chunks/vec2f64.js";import{l as p,a as f,b as _,i as g,c as R,p as x}from"../../../chunks/vec3.js";import{c as C}from"../../../chunks/vec3f64.js";import{getReferenceEllipsoid as V}from"../../../geometry/projectionEllipsoid.js";import{isMars as j}from"../../../geometry/support/spatialReferenceUtils.js";import{requestImage as y}from"../../../support/requestImageUtils.js";import{computeInnerAltitudeFade as v,innerAtmosphereDepth as b}from"./atmosphereUtils.js";import{S as U}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechniqueConfiguration as A,SimpleAtmosphereTechnique as T}from"./SimpleAtmosphereTechnique.js";import w from"./resources/MarsAtmosphereTexture.js";import D from"./resources/SimpleAtmosphereTexture.js";import{makePiecewiseLinearFunction as q}from"../support/mathUtils.js";import{glLayout as S}from"../support/buffer/glUtil.js";import{newLayout as F}from"../support/buffer/InterleavedLayout.js";import{Default3D as M}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{createQuadVAO as I}from"../webgl-engine/lib/glUtil3D.js";import{project as L}from"../webgl-engine/lib/Util.js";import{VertexAttribute as O}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as E}from"../../webgl/BufferObject.js";import{PixelFormat as W,PixelType as k,TextureWrapMode as P,TextureSamplingMode as N,PrimitiveType as G,Usage as B}from"../../webgl/enums.js";import{Texture as H}from"../../webgl/Texture.js";import{vertexCount as z}from"../../webgl/Util.js";import{VertexArrayObject as Y}from"../../webgl/VertexArrayObject.js";const J=e.getLogger("esri.views.3d.environment.SimpleAtmosphere"),K=128,Q=-b,X=0,Z=50,$=()=>1-511/512,ee=q([[50,.1015625],[500,.21875],[5e3,1-250/512],[5e4,.4140625]]);class te{constructor(e){this.view=e,this.type="simple",this._renderData={texV:u(),silCircleCenter:C(),silCircleV1:C(),silCircleV2:C(),altitudeFade:0,innerScale:0,undergroundFadeAlpha:0},this._fadeVaoCount=0,this._readyResolver=n(),this._readyController=new AbortController,this.texV1=1,this.canRender=!0,this.isOnMars=j(e.spatialReference);const t=V(e.spatialReference);this.planetRadius=t.radius,this.outerRimWidth=t.outerAtmosphereRimWidth,this.innerRimFactor=(this.planetRadius+Q)/this.planetRadius,this.middleRimFactor=(this.planetRadius+X)/this.planetRadius,this.outerRimFactor=(this.planetRadius+this.outerRimWidth)/this.planetRadius,this.texV0=X/this.outerRimWidth,this.texVScale=this.texV1-this.texV0}destroy(){this._readyResolver.reject(),this._cameraChangeHandle=i(this._cameraChangeHandle),this._texture=s(this._texture),this._fadeVao=s(this._fadeVao),this._vao=s(this._vao),this._readyController=o(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._shaderTechniqueRepository=e.shaderTechniqueRep;const t=e.renderContext.rctx;this._cameraChangeHandle=m(this.view,"state.camera",(()=>e.requestRender()),!0),this._vao=this._createRibbon(t),this._vaoCount=z(this._vao,"geometry"),this._fadeVao=I(t),this._fadeVaoCount=z(this._fadeVao,"geometry"),y(this.isOnMars?w:D,{signal:this._readyController.signal}).then((r=>{this._texture=new H(t,{pixelFormat:W.RGBA,dataType:k.UNSIGNED_BYTE,wrapMode:P.CLAMP_TO_EDGE,samplingMode:N.LINEAR,flipped:!0},r),e.requestRender(),this._readyController=null,this._readyResolver.resolve()})).catch((e=>{h(e)||J.error("Unable to initialize simple atmosphere: image request failed",e),this._readyResolver.reject(e)}))}get atmosphereConeTechnique(){if(a(this._atmosphereConeTechnique)){const e=new A;e.geometry=U.Cone,this._atmosphereConeTechnique=this._shaderTechniqueRepository.acquire(T,e)}return this._atmosphereConeTechnique}get atmosphereUndergroundTechnique(){if(a(this._atmosphereUndergroundTechnique)){const e=new A;e.geometry=U.Underground,this._atmosphereUndergroundTechnique=this._shaderTechniqueRepository.acquire(T,e)}return this._atmosphereUndergroundTechnique}render(e){this._update(e.camera);const t=e.rctx;if(this.atmosphereConeTechnique.bindPipelineState(t),this._renderData.undergroundFadeAlpha<1){const r=this.atmosphereConeTechnique.program;t.useProgram(r),r.setUniformMatrix4fv("proj",e.camera.projectionMatrix),r.setUniformMatrix4fv("view",e.camera.viewMatrix),r.setUniform3fv("silCircleCenter",this._renderData.silCircleCenter),r.setUniform3fv("silCircleV1",this._renderData.silCircleV1),r.setUniform3fv("silCircleV2",this._renderData.silCircleV2),r.setUniform2fv("texV",this._renderData.texV),r.bindTexture(this._texture,"tex"),e.scenelightingData.setLightDirectionUniform(r),r.setUniform1f("altitudeFade",this._renderData.altitudeFade),r.setUniform1f("innerScale",this._renderData.innerScale),t.bindVAO(this._vao),t.drawArrays(G.TRIANGLES,0,this._vaoCount)}if(this._renderData.undergroundFadeAlpha>0){const r=this.atmosphereUndergroundTechnique.program;t.useProgram(r),r.setUniform1f("undergroundFadeAlpha",this._renderData.undergroundFadeAlpha),e.scenelightingData.setLightDirectionUniform(r),r.setUniform3fv("cameraPosition",e.camera.eye),t.bindVAO(this._fadeVao),t.drawArrays(G.TRIANGLE_STRIP,0,this._fadeVaoCount)}}renderHaze(){return!1}_update(e){const i=C(),s=this.planetRadius,o=p(e.eye),a=o-s;if(a<0){const e=Math.min(-a/5e3,1);this._renderData.undergroundFadeAlpha=e}else this._renderData.undergroundFadeAlpha=0;const n=Math.max(Z,a),h=s+Q;this._renderData.innerScale=ae(s+n,s,h)-1,this._renderData.altitudeFade=v(a),f(i,e.eye,(s+Z)/o),re(i,e.center,e.up,s,this._renderData);const m=this._computeScreenRimWidth(e,i,e.up,this._renderData),l=$(),c=ee(a);let u=this.texV0+l*this.texVScale,_=this.texV0+m*c*this.texVScale;if(a>Z){re(e.eye,e.center,e.up,s,this._renderData);const i=this._computeScreenRimWidth(e,e.eye,e.up,this._renderData),o=r((i-1.5)/(m-1.5),0,1);u=this.texV0+o*l*this.texVScale,_=this.texV0+t(this.texV1,m*c,o)*this.texVScale}d(this._renderData.texV,u,_)}_createRibbon(e){const t=new Float32Array(3+3*K*3),r=new Uint32Array(3*K*5);t[0]=0,t[1]=0,t[2]=-1;for(let o=0;o<K;o++){const e=9*o+3;t[e+0]=o,t[e+1]=this.innerRimFactor,t[e+2]=-1,t[e+3]=o,t[e+4]=this.middleRimFactor,t[e+5]=0,t[e+6]=o,t[e+7]=this.outerRimFactor,t[e+8]=1;const i=3*o+1,s=o===K-1?1:i+3,a=15*o;r[a+0]=i,r[a+1]=i+1,r[a+2]=s+1,r[a+3]=s+1,r[a+4]=s,r[a+5]=i,r[a+6]=i+1,r[a+7]=i+2,r[a+8]=s+2,r[a+9]=s+2,r[a+10]=s+1,r[a+11]=i+1,r[a+12]=i,r[a+13]=s,r[a+14]=0}const i=ne.createBuffer(r.length),s=i.position;for(let o=0;o<r.length;++o){const e=3*r[o];s.set(o,0,t[e]),s.set(o,1,t[e+1]),s.set(o,2,t[e+2])}return new Y(e,M,{geometry:S(ne)},{geometry:E.createVertex(e,B.STATIC_DRAW,i.buffer)})}_computeScreenRimWidth(e,t,r,i){return _(se,i.silCircleCenter,i.silCircleV2),f(oe,se,this.outerRimFactor),l(ie,t,se,r),L(se,ie,e.projectionMatrix,e.viewport),L(oe,ie,e.projectionMatrix,e.viewport),g(se,oe)/e.height}}function re(e,t,r,i,s){const o=p(e),a=i*Math.sqrt(o*o-i*i)/o,n=Math.sqrt(i*i-a*a),h=s.silCircleV1,m=s.silCircleV2;return f(s.silCircleCenter,e,n/o),R(h,e,t),x(h)<1&&R(h,e,r),f(h,h,a/p(h)),R(m,h,e),f(m,m,a/p(m)),a}const ie=c(),se=C(),oe=C();function ae(e,t,r){return e*e/(Math.sqrt(e*e-t*t)*Math.sqrt(e*e-r*r)+t*r)}const ne=F().vec3f(O.POSITION);export{te as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/
|
|
5
|
+
import"../webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{b as build}from"../../../chunks/Stars.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import{fetchAsset as e}from"../../../assets.js";import r from"../../../core/Accessor.js";import s from"../../../core/Error.js";import
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import{fetchAsset as e}from"../../../assets.js";import r from"../../../core/Accessor.js";import s from"../../../core/Error.js";import i from"../../../core/Logger.js";import{isSome as a,abortMaybe as o,disposeMaybe as n,isNone as c}from"../../../core/maybe.js";import{createTask as f,isAbortError as u}from"../../../core/promiseUtils.js";import{initial as h}from"../../../core/reactiveUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../../core/accessorSupport/decorators/subclass.js";import{c as p,g as l,m as g}from"../../../chunks/mat4.js";import{c as _,f as b}from"../../../chunks/mat4f64.js";import{StarsTechnique as v}from"./StarsTechnique.js";import{glLayout as y}from"../support/buffer/glUtil.js";import{newLayout as j}from"../support/buffer/InterleavedLayout.js";import{Default3D as w}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{VertexAttribute as T}from"../webgl-engine/lib/VertexAttribute.js";import{WatchUpdatingTracking as k}from"../../support/WatchUpdatingTracking.js";import{BufferObject as D}from"../../webgl/BufferObject.js";import{PrimitiveType as P,Usage as x}from"../../webgl/enums.js";import{VertexArrayObject as A}from"../../webgl/VertexArrayObject.js";const S=i.getLogger("esri.views.3d.environment.Stars");let O=class extends r{constructor(t){super(t),this._loadDataTask=null,this._numPoints=0,this._renderParameter={camera:null,modelMatrix:_()},this._updatingTracking=new k}get updating(){return this._updatingTracking.updating||this.loading}get loading(){return a(this._loadDataTask)&&!this._loadDataTask.finished}initialize(){this._loadDataTask=this._createLoadDataTask()}destroy(){this._loadDataTask=o(this._loadDataTask),this._updatingTracking.destroy(),this._numPoints=0,this._technique=n(this._technique),this._vao=n(this._vao)}render(t){const{rctx:e,camera:r}=t;if(this._ensureResources(e),c(this._technique)||c(this._vao))return;const s=this._technique.program;e.useProgram(s),this._renderParameter.camera=r,this._technique.bindPass(this._renderParameter),this._technique.bindPipelineState(e),e.bindVAO(this._vao),s.assertCompatibleVertexAttributeLocations(this._vao),e.drawArrays(P.POINTS,0,this._numPoints)}_ensureResources(t){if(a(this._technique)||c(U))return;this._technique=new v({rctx:t,viewingMode:this.view.state.viewingMode},null),this._numPoints=U.byteLength/L;const e=new Float32Array(U,0,2*this._numPoints),r=new Uint8Array(U,2*this._numPoints*4,this._numPoints);this._vao=this._createVertexArrayObject(t,e,r,this._numPoints),this._updatingTracking.add((()=>{var t,e,r;return null==(t=this.view)||null==(e=t.environment)||null==(r=e.lighting)?void 0:r.date}),(t=>this._update(t)),h)}_computeDayDuration(t){const e=t,r=new Date(t.getFullYear(),0,1,11,58,56);return(+e-+r)/(+new Date(t.getFullYear()+1,0,1,11,58,55)-+r)}_update(t){if(!t)return;const e=(t.getHours()/12+t.getMinutes()/60*(2/24)+t.getSeconds()/60*(2/1440)-.9972222)%2,r=2*this._computeDayDuration(t),s=this._renderParameter.modelMatrix;p(s,I),l(s,s,-r*Math.PI),g(s,M,s),l(s,s,-e*Math.PI),this.requestRender()}_hexToRGB(t){return[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]}_unpackUint8Attributes(t){return t>=192?[2.9,t-192]:t>=160?[2.5,t-160]:t>=128?[2,t-128]:t>=96?[1.5,t-96]:t>=64?[1,t-64]:t>=32?[.7,t-32]:[.4,t]}_createVertexArrayObject(t,e,r,s){const i=R.createBuffer(s),a=i.position,o=i.color,n=i.size;for(let c=0;c<s;c++){const t=e[2*c+0],s=e[2*c+1];a.set(c,0,-Math.cos(t)*Math.sin(s)),a.set(c,1,-Math.sin(t)*Math.sin(s)),a.set(c,2,-Math.cos(s));const i=this._unpackUint8Attributes(r[c]),f=this._hexToRGB(q[i[1]]);o.set(c,0,255*f[0]),o.set(c,1,255*f[1]),o.set(c,2,255*f[2]),o.set(c,3,255),n.set(c,i[0])}return new A(t,w,{geometry:y(R)},{geometry:D.createVertex(t,x.STATIC_DRAW,i.buffer)})}_createLoadDataTask(){if(a(U))return null;const t=f((async t=>{const{data:r}=await e("esri/views/3d/environment/resources/stars.wsv",{responseType:"array-buffer",signal:t});this._verifyStarData(r),U=r}));return t.promise.catch((t=>{u(t)||S.error(t)})).then((()=>{this.destroyed||(this.requestRender(),this.notifyChange("updating"))})),t}_verifyStarData(t){if(!t)throw new s("stars:no-data-received","Failed to create stars because star catalogue is missing");const e=t.byteLength/L;if(e%1!=0||e>5e4||e<5e3)throw new s("stars:invalid-data","Failed to create stars because star catalogue data is invalid")}};t([d({constructOnly:!0})],O.prototype,"view",void 0),t([d({constructOnly:!0})],O.prototype,"requestRender",void 0),t([d({readOnly:!0})],O.prototype,"updating",null),t([d()],O.prototype,"_loadDataTask",void 0),t([d()],O.prototype,"_updatingTracking",void 0),O=t([m("esri.views.3d.environment.Stars")],O);const q=["9bb2ff","9eb5ff","aabfff","bbccff","ccd8ff ","dae2ff","e4e9ff","eeefff","f8f6ff","fff9fb","fff5ef","fff1e5","ffeddb","ffe9d2","ffe6ca","ffe3c3","ffe0bb","ffddb4","ffdaad","ffd6a5","ffd29c","ffcc8f","ffc178","ffa94b","ff7b00"],M=b(1,0,0,0,0,.9174771405229186,.39778850739794974,0,0,-.39778850739794974,.9174771405229186,0,0,0,0,1),I=b(1,0,0,0,0,.9174771405229186,-.39778850739794974,0,0,.39778850739794974,.9174771405229186,0,0,0,0,1),L=9,R=j().vec3f(T.POSITION).vec4u8(T.COLOR).f32(T.SIZE);let U=null;export{O as Stars};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../../geometry.js";import{neverReached as e}from"../../../../../core/compilerUtils.js";import t from"../../../../../core/Logger.js";import{rad2deg as r,deg2rad as s}from"../../../../../core/mathUtils.js";import{isNone as i,isSome as n}from"../../../../../core/maybe.js";import{castRenderScreenPointArray3 as o}from"../../../../../core/screenUtils.js";import{g as a,b as c,h as l,m as u,r as d,i as m,j as p,k as g}from"../../../../../chunks/mat4.js";import{c as f}from"../../../../../chunks/mat4f64.js";import{r as b}from"../../../../../chunks/quat.js";import{a as h,g as T,d as y,c as O,n as w,b as I,l as E,f as R,p as j,s as A,v as M}from"../../../../../chunks/vec3.js";import{a as L,c as P,f as k}from"../../../../../chunks/vec3f64.js";import{tryProjectWithZConversion as C}from"../../../../../geometry/projection.js";import{Axis as _}from"../../../../../geometry/support/Axis.js";import{r as v,f as N,i as U,c as S,n as V,u as G}from"../../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as x,fromVectorsAndPoint as F}from"../../../../../geometry/support/plane.js";import{create as H}from"../../../../../geometry/support/ray.js";import{angleAroundAxis as D}from"../../../../../geometry/support/vector.js";import{sv3d as z,sm4d as X,sq4d as Y}from"../../../../../geometry/support/vectorStacks.js";import{applyProjectionAndElevationAlignment as Z}from"../../../analysis/support/projectionUtils.js";import{Manipulator3D as B}from"../../Manipulator3D.js";import{calculateTranslateRotateFromBases as W}from"../../manipulatorUtils.js";import{SHIFT_RESTART_TIP_RADIUS as q,RESIZE_HANDLE_EDGE_PADDING_FRAC as $,VERTICAL_DOT_THRESHOLD as J,SMALL_ANGLE_DOT_THRESHOLD as K,PLANE_MIN_BASIS_SCREEN_LEN2 as Q,INITIAL_PLANE_HALF_SIZE_VIEW_PROPORTION as ee,SHIFT_RESTART_OFFSET_DISTANCE as te,SHIFT_RESTART_ARROW_OUTLINE_WIDTH as re,SHIFT_RESTART_ARROW_TIP_COLOR as se,SHIFT_RESTART_ARROW_CAP_COLOR as ie,SHIFT_RESTART_TUBE_COLOR as ne,SHIFT_RESTART_OUTLINE_COLOR as oe,SHIFT_RESTART_CALLOUT_COLOR as ae,ROTATE_HEADING_OFFSET_DISTANCE as ce,ROTATE_HEADING_DISC_RADIUS as le,ROTATE_HEADING_CALLOUT_COLOR as ue,PLANE_OUTLINE_COLOR as de,PLANE_OUTLINE_WIDTH as me,PLANE_BACKGROUND_COLOR as pe,GRID_COLOR as ge,RESIZE_HANDLE_CORNER_INPUT_RADIUS as fe,RESIZE_HANDLE_EDGE_INPUT_RADIUS as be,ROTATE_HEADING_TIP_LENGTH as he,ROTATE_HEADING_DISC_RADIUS_FOCUS_MULTIPLIER as Te,RESIZE_HANDLE_COLOR as ye,DISPLAY_FOCUS_MULTIPLIER as Oe,RESIZE_HANDLE_EDGE_WIDTH as we,SHIFT_RESTART_ARROW_LENGTH as Ie,SHIFT_RESTART_TUBE_RADIUS as Ee,SHIFT_RESTART_TIP_LENGTH as Re,SHIFT_RESTART_TUBE_FOCUS_MULTIPLIER as je,SHIFT_RESTART_TIP_FOCUS_MULTIPLIER as Ae,RESIZE_HANDLE_CORNER_WIDTH as Me}from"./sliceToolConfig.js";import{LineVisualElement as Le}from"../../visualElements/LineVisualElement.js";import{SlicePlaneVisualElement as Pe}from"../../visualElements/SlicePlaneVisualElement.js";import{RenderCoordsHelper as ke}from"../../../support/RenderCoordsHelper.js";import{fromRender as Ce}from"../../../support/geometryUtils/ray.js";import{CullFaceOptions as _e,VertexAttribute as ve}from"../../../webgl-engine/lib/basicInterfaces.js";import{Geometry as Ne}from"../../../webgl-engine/lib/Geometry.js";import Ue from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as Se}from"../../../webgl-engine/lib/Material.js";import{ColorMaterial as Ve}from"../../../webgl-engine/materials/ColorMaterial.js";import{ImageMaterial as Ge}from"../../../webgl-engine/materials/ImageMaterial.js";import{NativeLineMaterial as xe}from"../../../webgl-engine/materials/NativeLineMaterial.js";import{RibbonLineMaterial as Fe}from"../../../webgl-engine/materials/RibbonLineMaterial.js";import{ManipulatorStateCustomFlags as He,ManipulatorStateFlags as De}from"../../../../interactive/interfaces.js";import ze from"../../../../../widgets/Slice/SlicePlane.js";import Xe from"../../../../../geometry/Extent.js";const Ye=t.getLogger("esri.views.3d.interactive.analysisTools.slice.sliceToolUtils");function Ze(e,t,r,s,i,n,o,a){return Be(t,o.worldUpAtPosition(e,z.get()),i,n,a.basis1,a.basis2),h(a.basis1,a.basis1,r),h(a.basis2,a.basis2,s),T(a.origin,e),F(a.basis2,a.basis1,a.origin,a.plane),a}function Be(e,t,r,s,i,n){const o=y(e,t),a=z.get(),c=z.get();switch(s===Ct.HORIZONTAL_OR_VERTICAL?Math.abs(o)>J?Ct.HORIZONTAL:Ct.VERTICAL:s){case Ct.VERTICAL:{const s=Math.abs(o)<=K?e:r.viewUp;O(a,s,t),T(c,t);break}case Ct.HORIZONTAL:O(a,r.viewUp,t),O(c,t,a);break;case Ct.TILTED:{const s=Math.abs(o)<=K?t:r.viewUp;O(a,s,e),O(c,e,a);break}}const l=O(z.get(),a,c);y(l,r.viewForward)>0&&h(c,c,-1),w(i,a),w(n,c)}function We(e,t,r){const s=t.worldUpAtPosition(e.origin,z.get()),i=e.basis1,n=It(e,s),o=Math.round(n/Nt)*Nt;return v(e,o-n,i,r)}function qe(e,t,r,s,i,n){const o=T(z.get(),i.origin);I(o,o,h(z.get(),i.basis1,e.direction[0]<0?1:-1)),I(o,o,h(z.get(),i.basis2,e.direction[1]<0?1:-1));const a=E(i.basis1),c=E(i.basis2),l=R(z.get(),r,o),u=R(z.get(),t,o);let d=0,m=0;if(ut(e)){const t=lt(i),r=lt(n);d=a-.5*e.direction[0]*y(i.basis1,u)/a,m=c-.5*e.direction[1]*y(i.basis2,u)/c;const s=r/t;d*=s,m*=s}const p=d+.5*e.direction[0]*y(i.basis1,l)/a,g=m+.5*e.direction[1]*y(i.basis2,l)/c,f=h(z.get(),i.basis1,p/a),b=h(z.get(),i.basis2,g/c);(p<=0||at(n.origin,f,s)<=Q)&&T(f,n.basis1),(g<=0||at(n.origin,b,s)<=Q)&&T(b,n.basis2);const O=T(z.get(),o);return I(O,O,h(z.get(),f,e.direction[0]<0?-1:1)),I(O,O,h(z.get(),b,e.direction[1]<0?-1:1)),N(O,f,b,n)}function $e(e,t){return ee*Math.min(t.width,t.height)*t.computeRenderPixelSizeAt(e)}function Je(e,t,r,s){const i=O(z.get(),t,r);return O(i,i,t),x(e,i,s)}function Ke(e,t){return W(e.basis1,e.basis2,e.origin,t)}function Qe(e,t,r,s){const i=t.worldUpAtPosition(e.origin,z.get()),n=z.get();switch(r){case kt.HEADING:T(n,i);break;case kt.TILT:T(n,e.basis1)}return x(e.origin,n,s)}function et(e,t,r,s){const i=ot(r,nt.NEGATIVE_X),n=X.get();a(n,t,i.edge*Math.PI/2);const c=w(z.get(),i.basis);let l=h(z.get(),c,i.direction*s.computeScreenPixelSizeAt(i.position)*te);I(l,l,i.position);const u=s.projectToRenderScreen(l,o(z.get())),d=tt(s,u);Ce(s,u,vt),w(vt.direction,vt.direction);const m=z.get();!d&&U(r,vt,m)&&(l=m),n[12]=0,n[13]=0,n[14]=0,e.modelTransform=n,e.renderLocation=L(l),d?e.state|=_t:e.state&=~_t}function tt(e,t){const[r,s,i,n]=e.viewport,o=Math.min(i,n)/16;let a=!0;return t[0]<r+o?(t[0]=r+o,a=!1):t[0]>r+i-o&&(t[0]=r+i-o,a=!1),t[1]<s+o?(t[1]=s+o,a=!1):t[1]>s+n-o&&(t[1]=s+n-o,a=!1),a}function rt(e,t,r,s){const i=E(s.basis1),n=E(s.basis2),o=ct(s),a=lt(s),d=A(z.get(),0,0,0);I(d,h(z.get(),s.basis1,t.direction[0]),h(z.get(),s.basis2,t.direction[1])),I(d,s.origin,d);let m=0,p=1;if(ut(t))1===t.direction[0]&&-1===t.direction[1]?m=Nt:1===t.direction[0]&&1===t.direction[1]?m=Math.PI:-1===t.direction[0]&&1===t.direction[1]&&(m=3*Math.PI/2),p=a;else{const e=0!==t.direction[0]?1:2;m=1===e?Nt:0,p=(1===e?n:i)-o}const g=c(X.get(),m);l(g,g,A(z.get(),p,p,p)),u(g,r,g),g[12]=0,g[13]=0,g[14]=0,e.modelTransform=g,e.renderLocation=d}function st(e,t,r,s){const i=s.worldUpAtPosition(r.origin,z.get()),n=ot(r,nt.POSITIVE_X),o=c(X.get(),n.edge*Math.PI/2);d(o,o,-It(r,i)),u(o,t,o),o[12]=0,o[13]=0,o[14]=0,e.modelTransform=o,e.renderLocation=n.position}function it(e,t,r){const s=ot(r,nt.POSITIVE_Y),i=c(X.get(),s.edge*Math.PI/2);d(i,i,Nt),u(i,t,i),i[12]=0,i[13]=0,i[14]=0,e.modelTransform=i,e.renderLocation=s.position}var nt;function ot(e,t){switch(t){case nt.POSITIVE_X:return{basis:e.basis1,direction:1,position:I(z.get(),e.origin,e.basis1),edge:t};case nt.POSITIVE_Y:return{basis:e.basis2,direction:1,position:I(z.get(),e.origin,e.basis2),edge:t};case nt.NEGATIVE_X:return{basis:e.basis1,direction:-1,position:R(z.get(),e.origin,e.basis1),edge:t};case nt.NEGATIVE_Y:return{basis:e.basis2,direction:-1,position:R(z.get(),e.origin,e.basis2),edge:t}}}function at(e,t,r){const s=r.projectToRenderScreen(I(z.get(),e,t),o(z.get())),i=r.projectToRenderScreen(R(z.get(),e,t),o(z.get()));return j(R(s,s,i))}function ct(e){const t=E(e.basis1),r=E(e.basis2);return $*Math.min(t,r)}function lt(e){return ct(e)}function ut(e){return 0!==e.direction[0]&&0!==e.direction[1]}function dt(e,t=Vt.CENTER_ON_ARROW){const r=t===Vt.CENTER_ON_CALLOUT?te:0,s=[k(r,0,-Ie/2),k(r,0,Ie/2)],i=Tt(s,!0),n=(e,t)=>bt(s,s,{tubeRadius:Ee,tipRadius:q,tipLength:Re,tubeFocusMultiplier:je,tipFocusMultiplier:Ae,padding:e,bothEnds:!0,flat:null,focusTipLength:!0,addCap:t}),o=n(0,!1),a=n(re,!0),c=new Ve({color:se,cullFace:_e.Back,renderOccluded:Se.Opaque}),l=new Ve({color:ie,cullFace:_e.Back,renderOccluded:Se.Opaque}),u=new Ve({color:ne,cullFace:_e.Back,renderOccluded:Se.Opaque}),d=new Ve({color:oe,transparent:!0,writeDepth:!1,cullFace:_e.Front,renderOccluded:Se.Transparent}),m=Ue.createPolylineGeometry([[r,0,0],[r-te,0,0]]),p=Ue.createPolylineGeometry([[r,0,0],[r-te,0,0]]),g=new xe({color:ae,renderOccluded:Se.OccludeAndTransparent});return new B({view:e,renderObjects:[...o.normal.map((({part:e,geometry:t,transform:r})=>({geometry:t,material:"tip"===e?c:"cap"===e?l:u,transform:r,stateMask:De.Unfocused|Pt}))),...a.normal.map((({geometry:e,transform:t})=>({geometry:e,material:d,transform:t,stateMask:De.Unfocused|Pt}))),{geometry:m,material:g,stateMask:De.Unfocused|Pt|_t},...o.focused.map((({part:e,geometry:t,transform:r})=>({geometry:t,material:"tip"===e?c:"cap"===e?l:u,transform:r,stateMask:De.Focused|Pt}))),...a.focused.map((({geometry:e,transform:t})=>({geometry:e,material:d,transform:t,stateMask:De.Focused|Pt}))),{geometry:p,material:g,stateMask:De.Focused|Pt|_t}],autoScaleRenderObjects:!1,collisionType:{type:"line",paths:[i]},collisionPriority:1,radius:q,state:Pt})}function mt(e,t){const r=new Ge({transparent:!0,writeDepth:!1,textureId:t.id,renderOccluded:Se.Opaque}),s=ce,i=le,n=i*Te,o=e=>{const t=new Uint32Array([0,1,2,2,3,0]);return new Ne([[ve.POSITION,{size:3,data:[s-e,-e,0,s+e,-e,0,s+e,e,0,s-e,e,0],exclusive:!0}],[ve.UV0,{size:2,data:[0,0,1,0,1,1,0,1]}]],[[ve.POSITION,t],[ve.UV0,t]])},a=Ue.createPolylineGeometry([[0,0,0],[s-i,0,0]]),c=Ue.createPolylineGeometry([[0,0,0],[s-n,0,0]]),l=new xe({color:ue,renderOccluded:Se.OccludeAndTransparent}),u=[{geometry:o(i),material:r,stateMask:De.Unfocused|Pt},{geometry:a,material:l,stateMask:De.Unfocused|Pt},{geometry:o(n),material:r,stateMask:De.Focused|Pt},{geometry:c,material:l,stateMask:De.Focused|Pt}];return new B({view:e,renderObjects:u,autoScaleRenderObjects:!1,collisionType:{type:"disc",direction:[0,0,1],offset:[s,0,0]},collisionPriority:1,radius:i/2,state:Pt})}function pt(e){const t=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new Le({view:e,attached:!0,color:de,width:me,writeDepthEnabled:!1,renderOccluded:Se.OccludeAndTransparent,geometry:[t]})}function gt(e){return new Pe({view:e,attached:!0,backgroundColor:[...pe],gridColor:ge,gridWidth:4,renderOccluded:Se.OccludeAndTransparent})}function ft(e,t){const r=ut(t),s=r?[k(1,0,0),k(0,0,0),k(0,1,0)]:[k(1,0,0),k(-1,0,0)],i=Ue.createPolylineGeometry(s),n=ye,o=e=>new Fe({color:n,width:e,renderOccluded:Se.OccludeAndTransparent}),a=()=>new xe({color:n,renderOccluded:Se.OccludeAndTransparent}),c=r?Me:we,l=c*Oe,u=we,d=e=>e>1?o(e):a(),m=[{geometry:i,material:d(c),stateMask:De.Unfocused|Ut},{geometry:i,material:d(l),stateMask:De.Focused|Ut},{geometry:i,material:d(u),stateMask:St}],p=new B({view:e,renderObjects:m,collisionType:{type:"line",paths:[s]},autoScaleRenderObjects:!1,worldSized:!0,radius:r?fe:be});return p.state=Ut,p}function bt(e,t,r){const s=s=>{const i=(s?t:e).slice(0),o=R(z.get(),i[0],i[1]);w(o,o);const a=R(z.get(),i[i.length-1],i[i.length-2]);if(w(a,a),r.padding>0){const e=h(P(),a,-r.padding);if(i[i.length-1]=I(e,e,i[i.length-1]),r.bothEnds){const e=h(P(),o,-r.padding);i[0]=I(e,e,i[0])}}const c=s?r.tipFocusMultiplier:1,d=r.tipLength*(r.focusTipLength?c:1),T=r.tipRadius*c,y=m(X.get());if(r.padding>0){const e=d/4,t=A(z.get(),0,e,0),s=1+r.padding/e;p(y,y,t),l(y,y,A(z.get(),s,s,s)),p(y,y,h(t,t,-1/s))}const O=m(f()),E=k(0,1,0),j=g(f(),b(Y.get(),E,a));j[12]=i[i.length-1][0],j[13]=i[i.length-1][1],j[14]=i[i.length-1][2],u(j,j,y);const M=[{part:"tube",geometry:ht(r.tubeRadius*(s?r.tubeFocusMultiplier:1)+r.padding,r.flat,i),transform:O}];let L,C;if(n(r.flat)?L=Ue.createExtrudedTriangle(d,T,T,r.flat.thickness):(L=Ue.createConeGeometry(d,T,24,!1,!1,!0),C=Ue.createConeGeometry(d,T,24,!1,!0,!1)),M.push({part:"tip",geometry:L,transform:j}),C&&M.push({part:"cap",geometry:C,transform:j}),r.bothEnds){const e=g(f(),b(Y.get(),E,o));e[12]=i[0][0],e[13]=i[0][1],e[14]=i[0][2],u(e,e,y),M.push({part:"tip",geometry:L,transform:e}),C&&M.push({part:"cap",geometry:C,transform:e})}return M};return{normal:s(!1),focused:s(!0)}}function ht(e,t,r){const s=[];if(n(t))s.push([e,t.thickness/2],[-e,t.thickness/2],[-e,-t.thickness/2],[e,-t.thickness/2]);else{const t=12;for(let r=0;r<t;r++){const i=r/t*2*Math.PI;s.push([Math.cos(i)*e,Math.sin(i)*e])}}return Ue.createPathExtrusionGeometry(s,r,[],[],!1)}function Tt(e,t){const r=R(P(),e[e.length-1],e[e.length-2]);if(w(r,r),h(r,r,he),I(r,r,e[e.length-1]),t){const t=R(P(),e[0],e[1]);return w(t,t),h(t,t,he),I(t,t,e[0]),[t,...e,r]}return[...e,r]}function yt(e,t,s,n=new ze){if(i(e))return null;const{renderCoordsHelper:o}=t,a=o.fromRenderCoords(e.origin,t.spatialReference);if(i(a))return null;const c=C(a,s);if(i(c))return null;n.position=c;const l=o.worldUpAtPosition(e.origin,z.get()),u=o.worldBasisAtPosition(e.origin,_.Y,z.get()),d=2*E(e.basis1),m=2*E(e.basis2),p=ke.renderUnitScaleFactor(t.spatialReference,s);return n.width=d*p,n.height=m*p,n.tilt=r(It(e,l)),n.heading=r(Et(e,l,u)),n}function Ot(e,t,r){if(i(e)||i(e.position))return null;const{spatialReference:s}=e.position,o=wt(At(e,{renderCoordsHelper:t,spatialReference:s},r),t,s);return!e.position.hasZ&&n(o)&&(o.zmin=null,o.zmax=null),o}function wt(e,t,r){if(i(e))return null;const s=e.origin,n=z.get(),o=z.get(),a=z.get(),c=z.get();let l,u,d,m,p,g;I(n,s,e.basis1),I(n,n,e.basis2),I(o,s,e.basis1),M(o,o,e.basis2),M(a,s,e.basis1),M(a,a,e.basis2),M(c,s,e.basis1),I(c,c,e.basis2);for(const f of[n,o,a,c]){const e=t.fromRenderCoords(f,f,r);if(i(e))return null;l=null==l?e[0]:Math.min(l,e[0]),u=null==u?e[0]:Math.max(u,e[0]),d=null==d?e[1]:Math.min(d,e[1]),m=null==m?e[1]:Math.max(m,e[1]),p=null==p?e[2]:Math.min(p,e[2]),g=null==g?e[2]:Math.max(g,e[2])}return new Xe({xmin:l,xmax:u,ymin:d,ymax:m,zmin:p,zmax:g,spatialReference:r})}function It(e,t){return D(t,e.basis2,e.basis1)+Nt}function Et(e,t,r){return D(e.basis1,r,t)-Nt}function Rt(e,t,r,i,n,o,a=S()){return o.toRenderCoords(e,a.origin)?(o.worldBasisAtPosition(a.origin,_.X,a.basis1),o.worldBasisAtPosition(a.origin,_.Y,a.basis2),F(a.basis2,a.basis1,a.origin,a.plane),v(a,-s(t),V(a),a),v(a,s(r),a.basis1,a),h(a.basis1,a.basis1,i/2),h(a.basis2,a.basis2,n/2),G(a),a):(Ye.error(`Failed to project slice plane position, projection from ${e.spatialReference.wkid} is not supported`),null)}function jt(e,t){if(i(e)||i(e.position))return null;const r=Z(e.position,t.spatialReference,t.elevationProvider);if(i(r))return null;const s=ke.renderUnitScaleFactor(e.position.spatialReference,t.spatialReference),n=e.width*s,o=e.height*s;return{position:r,heading:e.heading,tilt:e.tilt,renderWidth:n,renderHeight:o}}function At(e,t,r,s=S()){const n=jt(e,t);return i(n)?null:Mt(n,t,r,s)}function Mt(e,t,r,s=S()){if(i(e))return null;const o=Rt(e.position,e.heading,e.tilt,e.renderWidth,e.renderHeight,t.renderCoordsHelper,s);return!r.tiltEnabled&&n(o)&&We(o,t.renderCoordsHelper,o),o}function Lt(t){switch(t.type){case"analysis":case"building-scene":case"csv":case"feature":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"kml":case"map-notes":case"ogc-feature":case"point-cloud":case"route":case"scene":case"stream":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case null:return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"imagery":case"imagery-tile":case"map-image":case"open-street-map":case"tile":case"vector-tile":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e(t.type),!1}}!function(e){e[e.POSITIVE_X=0]="POSITIVE_X",e[e.POSITIVE_Y=1]="POSITIVE_Y",e[e.NEGATIVE_X=2]="NEGATIVE_X",e[e.NEGATIVE_Y=3]="NEGATIVE_Y"}(nt||(nt={}));const Pt=He.Custom1;var kt,Ct;!function(e){e[e.HEADING=1]="HEADING",e[e.TILT=2]="TILT"}(kt||(kt={})),function(e){e[e.HORIZONTAL_OR_VERTICAL=0]="HORIZONTAL_OR_VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL",e[e.VERTICAL=2]="VERTICAL",e[e.TILTED=3]="TILTED"}(Ct||(Ct={}));const _t=He.Custom2,vt=H(),Nt=Math.PI/2,Ut=He.Custom1,St=He.Custom2;var Vt;function Gt(e){const t="building-scene-3d"===e.type?e:null;return n(t)}!function(e){e[e.CENTER_ON_CALLOUT=0]="CENTER_ON_CALLOUT",e[e.CENTER_ON_ARROW=1]="CENTER_ON_ARROW"}(Vt||(Vt={}));export{Pt as DidPointerMoveRecentlyFlag,_t as IsShiftEdgeOnScreenFlag,Vt as OffsetMode,kt as RotationAxis,Ct as SliceOrientation,Tt as addArrowTips,Ke as calculateBoundedPlaneTranslateRotate,lt as calculateDiagonalResizeHandleScale,$e as calculatePlaneHalfSize,ct as calculateResizeHandlePadding,at as calculateScreenSpaceBasisLength2,bt as createArrowGeometry,gt as createGridVisualElement,pt as createOutlineVisualElement,Ze as createPlane,ft as createResizeManipulator,mt as createRotateManipulator,Qe as createRotatePlane,dt as createShiftManipulator,Je as createShiftPlane,We as forceHorizontalOrVertical,Lt as isAlwaysDrapedLayer,ut as isDiagonalResizeHandle,Gt as isIBuildingSceneLayerView3D,Be as normalToBases,wt as planeToExtent,yt as planeToShape,jt as projectAndElevationAlignShape,Mt as projectedShapeToPlane,Ut as resizeNormal,St as resizeOutlineOnly,qe as resizePlane,Ot as shapeToExtent,At as shapeToPlane,rt as updateResizeHandle,st as updateRotateHeadingHandle,it as updateRotateTiltHandle,et as updateShiftRestartHandle};
|
|
5
|
+
import"../../../../../geometry.js";import{neverReached as e}from"../../../../../core/compilerUtils.js";import t from"../../../../../core/Logger.js";import{rad2deg as r,deg2rad as s}from"../../../../../core/mathUtils.js";import{isNone as i,isSome as n}from"../../../../../core/maybe.js";import{castRenderScreenPointArray3 as o}from"../../../../../core/screenUtils.js";import{g as a,b as c,h as l,m as u,r as d,i as m,j as p,k as g}from"../../../../../chunks/mat4.js";import{c as f}from"../../../../../chunks/mat4f64.js";import{r as b}from"../../../../../chunks/quat.js";import{a as h,g as T,d as y,c as w,n as O,b as I,l as E,f as R,p as j,s as A,v as M}from"../../../../../chunks/vec3.js";import{a as L,c as P,f as k}from"../../../../../chunks/vec3f64.js";import{tryProjectWithZConversion as C}from"../../../../../geometry/projection.js";import{Axis as _}from"../../../../../geometry/support/Axis.js";import{r as v,f as N,i as U,c as V,n as S,u as x}from"../../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as G,fromVectorsAndPoint as F}from"../../../../../geometry/support/plane.js";import{create as H}from"../../../../../geometry/support/ray.js";import{angleAroundAxis as D}from"../../../../../geometry/support/vector.js";import{sv3d as z,sm4d as X,sq4d as Y}from"../../../../../geometry/support/vectorStacks.js";import{applyProjectionAndElevationAlignment as Z}from"../../../analysis/support/projectionUtils.js";import{Manipulator3D as B}from"../../Manipulator3D.js";import{calculateTranslateRotateFromBases as W}from"../../manipulatorUtils.js";import{SHIFT_RESTART_TIP_RADIUS as q,RESIZE_HANDLE_EDGE_PADDING_FRAC as $,VERTICAL_DOT_THRESHOLD as J,SMALL_ANGLE_DOT_THRESHOLD as K,PLANE_MIN_BASIS_SCREEN_LEN2 as Q,INITIAL_PLANE_HALF_SIZE_VIEW_PROPORTION as ee,SHIFT_RESTART_OFFSET_DISTANCE as te,SHIFT_RESTART_ARROW_OUTLINE_WIDTH as re,SHIFT_RESTART_ARROW_TIP_COLOR as se,SHIFT_RESTART_ARROW_CAP_COLOR as ie,SHIFT_RESTART_TUBE_COLOR as ne,SHIFT_RESTART_OUTLINE_COLOR as oe,SHIFT_RESTART_CALLOUT_COLOR as ae,ROTATE_HEADING_OFFSET_DISTANCE as ce,ROTATE_HEADING_DISC_RADIUS as le,ROTATE_HEADING_CALLOUT_COLOR as ue,PLANE_OUTLINE_COLOR as de,PLANE_OUTLINE_WIDTH as me,PLANE_BACKGROUND_COLOR as pe,GRID_COLOR as ge,RESIZE_HANDLE_CORNER_INPUT_RADIUS as fe,RESIZE_HANDLE_EDGE_INPUT_RADIUS as be,ROTATE_HEADING_TIP_LENGTH as he,ROTATE_HEADING_DISC_RADIUS_FOCUS_MULTIPLIER as Te,RESIZE_HANDLE_COLOR as ye,DISPLAY_FOCUS_MULTIPLIER as we,RESIZE_HANDLE_EDGE_WIDTH as Oe,SHIFT_RESTART_ARROW_LENGTH as Ie,SHIFT_RESTART_TUBE_RADIUS as Ee,SHIFT_RESTART_TIP_LENGTH as Re,SHIFT_RESTART_TUBE_FOCUS_MULTIPLIER as je,SHIFT_RESTART_TIP_FOCUS_MULTIPLIER as Ae,RESIZE_HANDLE_CORNER_WIDTH as Me}from"./sliceToolConfig.js";import{LineVisualElement as Le}from"../../visualElements/LineVisualElement.js";import{SlicePlaneVisualElement as Pe}from"../../visualElements/SlicePlaneVisualElement.js";import{RenderCoordsHelper as ke}from"../../../support/RenderCoordsHelper.js";import{fromRender as Ce}from"../../../support/geometryUtils/ray.js";import{CullFaceOptions as _e}from"../../../webgl-engine/lib/basicInterfaces.js";import{Geometry as ve}from"../../../webgl-engine/lib/Geometry.js";import Ne from"../../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as Ue}from"../../../webgl-engine/lib/Material.js";import{VertexAttribute as Ve}from"../../../webgl-engine/lib/VertexAttribute.js";import{ColorMaterial as Se}from"../../../webgl-engine/materials/ColorMaterial.js";import{ImageMaterial as xe}from"../../../webgl-engine/materials/ImageMaterial.js";import{NativeLineMaterial as Ge}from"../../../webgl-engine/materials/NativeLineMaterial.js";import{RibbonLineMaterial as Fe}from"../../../webgl-engine/materials/RibbonLineMaterial.js";import{ManipulatorStateCustomFlags as He,ManipulatorStateFlags as De}from"../../../../interactive/interfaces.js";import ze from"../../../../../widgets/Slice/SlicePlane.js";import Xe from"../../../../../geometry/Extent.js";const Ye=t.getLogger("esri.views.3d.interactive.analysisTools.slice.sliceToolUtils");function Ze(e,t,r,s,i,n,o,a){return Be(t,o.worldUpAtPosition(e,z.get()),i,n,a.basis1,a.basis2),h(a.basis1,a.basis1,r),h(a.basis2,a.basis2,s),T(a.origin,e),F(a.basis2,a.basis1,a.origin,a.plane),a}function Be(e,t,r,s,i,n){const o=y(e,t),a=z.get(),c=z.get();switch(s===Ct.HORIZONTAL_OR_VERTICAL?Math.abs(o)>J?Ct.HORIZONTAL:Ct.VERTICAL:s){case Ct.VERTICAL:{const s=Math.abs(o)<=K?e:r.viewUp;w(a,s,t),T(c,t);break}case Ct.HORIZONTAL:w(a,r.viewUp,t),w(c,t,a);break;case Ct.TILTED:{const s=Math.abs(o)<=K?t:r.viewUp;w(a,s,e),w(c,e,a);break}}const l=w(z.get(),a,c);y(l,r.viewForward)>0&&h(c,c,-1),O(i,a),O(n,c)}function We(e,t,r){const s=t.worldUpAtPosition(e.origin,z.get()),i=e.basis1,n=It(e,s),o=Math.round(n/Nt)*Nt;return v(e,o-n,i,r)}function qe(e,t,r,s,i,n){const o=T(z.get(),i.origin);I(o,o,h(z.get(),i.basis1,e.direction[0]<0?1:-1)),I(o,o,h(z.get(),i.basis2,e.direction[1]<0?1:-1));const a=E(i.basis1),c=E(i.basis2),l=R(z.get(),r,o),u=R(z.get(),t,o);let d=0,m=0;if(ut(e)){const t=lt(i),r=lt(n);d=a-.5*e.direction[0]*y(i.basis1,u)/a,m=c-.5*e.direction[1]*y(i.basis2,u)/c;const s=r/t;d*=s,m*=s}const p=d+.5*e.direction[0]*y(i.basis1,l)/a,g=m+.5*e.direction[1]*y(i.basis2,l)/c,f=h(z.get(),i.basis1,p/a),b=h(z.get(),i.basis2,g/c);(p<=0||at(n.origin,f,s)<=Q)&&T(f,n.basis1),(g<=0||at(n.origin,b,s)<=Q)&&T(b,n.basis2);const w=T(z.get(),o);return I(w,w,h(z.get(),f,e.direction[0]<0?-1:1)),I(w,w,h(z.get(),b,e.direction[1]<0?-1:1)),N(w,f,b,n)}function $e(e,t){return ee*Math.min(t.width,t.height)*t.computeRenderPixelSizeAt(e)}function Je(e,t,r,s){const i=w(z.get(),t,r);return w(i,i,t),G(e,i,s)}function Ke(e,t){return W(e.basis1,e.basis2,e.origin,t)}function Qe(e,t,r,s){const i=t.worldUpAtPosition(e.origin,z.get()),n=z.get();switch(r){case kt.HEADING:T(n,i);break;case kt.TILT:T(n,e.basis1)}return G(e.origin,n,s)}function et(e,t,r,s){const i=ot(r,nt.NEGATIVE_X),n=X.get();a(n,t,i.edge*Math.PI/2);const c=O(z.get(),i.basis);let l=h(z.get(),c,i.direction*s.computeScreenPixelSizeAt(i.position)*te);I(l,l,i.position);const u=s.projectToRenderScreen(l,o(z.get())),d=tt(s,u);Ce(s,u,vt),O(vt.direction,vt.direction);const m=z.get();!d&&U(r,vt,m)&&(l=m),n[12]=0,n[13]=0,n[14]=0,e.modelTransform=n,e.renderLocation=L(l),d?e.state|=_t:e.state&=~_t}function tt(e,t){const[r,s,i,n]=e.viewport,o=Math.min(i,n)/16;let a=!0;return t[0]<r+o?(t[0]=r+o,a=!1):t[0]>r+i-o&&(t[0]=r+i-o,a=!1),t[1]<s+o?(t[1]=s+o,a=!1):t[1]>s+n-o&&(t[1]=s+n-o,a=!1),a}function rt(e,t,r,s){const i=E(s.basis1),n=E(s.basis2),o=ct(s),a=lt(s),d=A(z.get(),0,0,0);I(d,h(z.get(),s.basis1,t.direction[0]),h(z.get(),s.basis2,t.direction[1])),I(d,s.origin,d);let m=0,p=1;if(ut(t))1===t.direction[0]&&-1===t.direction[1]?m=Nt:1===t.direction[0]&&1===t.direction[1]?m=Math.PI:-1===t.direction[0]&&1===t.direction[1]&&(m=3*Math.PI/2),p=a;else{const e=0!==t.direction[0]?1:2;m=1===e?Nt:0,p=(1===e?n:i)-o}const g=c(X.get(),m);l(g,g,A(z.get(),p,p,p)),u(g,r,g),g[12]=0,g[13]=0,g[14]=0,e.modelTransform=g,e.renderLocation=d}function st(e,t,r,s){const i=s.worldUpAtPosition(r.origin,z.get()),n=ot(r,nt.POSITIVE_X),o=c(X.get(),n.edge*Math.PI/2);d(o,o,-It(r,i)),u(o,t,o),o[12]=0,o[13]=0,o[14]=0,e.modelTransform=o,e.renderLocation=n.position}function it(e,t,r){const s=ot(r,nt.POSITIVE_Y),i=c(X.get(),s.edge*Math.PI/2);d(i,i,Nt),u(i,t,i),i[12]=0,i[13]=0,i[14]=0,e.modelTransform=i,e.renderLocation=s.position}var nt;function ot(e,t){switch(t){case nt.POSITIVE_X:return{basis:e.basis1,direction:1,position:I(z.get(),e.origin,e.basis1),edge:t};case nt.POSITIVE_Y:return{basis:e.basis2,direction:1,position:I(z.get(),e.origin,e.basis2),edge:t};case nt.NEGATIVE_X:return{basis:e.basis1,direction:-1,position:R(z.get(),e.origin,e.basis1),edge:t};case nt.NEGATIVE_Y:return{basis:e.basis2,direction:-1,position:R(z.get(),e.origin,e.basis2),edge:t}}}function at(e,t,r){const s=r.projectToRenderScreen(I(z.get(),e,t),o(z.get())),i=r.projectToRenderScreen(R(z.get(),e,t),o(z.get()));return j(R(s,s,i))}function ct(e){const t=E(e.basis1),r=E(e.basis2);return $*Math.min(t,r)}function lt(e){return ct(e)}function ut(e){return 0!==e.direction[0]&&0!==e.direction[1]}function dt(e,t=St.CENTER_ON_ARROW){const r=t===St.CENTER_ON_CALLOUT?te:0,s=[k(r,0,-Ie/2),k(r,0,Ie/2)],i=Tt(s,!0),n=(e,t)=>bt(s,s,{tubeRadius:Ee,tipRadius:q,tipLength:Re,tubeFocusMultiplier:je,tipFocusMultiplier:Ae,padding:e,bothEnds:!0,flat:null,focusTipLength:!0,addCap:t}),o=n(0,!1),a=n(re,!0),c=new Se({color:se,cullFace:_e.Back,renderOccluded:Ue.Opaque}),l=new Se({color:ie,cullFace:_e.Back,renderOccluded:Ue.Opaque}),u=new Se({color:ne,cullFace:_e.Back,renderOccluded:Ue.Opaque}),d=new Se({color:oe,transparent:!0,writeDepth:!1,cullFace:_e.Front,renderOccluded:Ue.Transparent}),m=Ne.createPolylineGeometry([[r,0,0],[r-te,0,0]]),p=Ne.createPolylineGeometry([[r,0,0],[r-te,0,0]]),g=new Ge({color:ae,renderOccluded:Ue.OccludeAndTransparent});return new B({view:e,renderObjects:[...o.normal.map((({part:e,geometry:t,transform:r})=>({geometry:t,material:"tip"===e?c:"cap"===e?l:u,transform:r,stateMask:De.Unfocused|Pt}))),...a.normal.map((({geometry:e,transform:t})=>({geometry:e,material:d,transform:t,stateMask:De.Unfocused|Pt}))),{geometry:m,material:g,stateMask:De.Unfocused|Pt|_t},...o.focused.map((({part:e,geometry:t,transform:r})=>({geometry:t,material:"tip"===e?c:"cap"===e?l:u,transform:r,stateMask:De.Focused|Pt}))),...a.focused.map((({geometry:e,transform:t})=>({geometry:e,material:d,transform:t,stateMask:De.Focused|Pt}))),{geometry:p,material:g,stateMask:De.Focused|Pt|_t}],autoScaleRenderObjects:!1,collisionType:{type:"line",paths:[i]},collisionPriority:1,radius:q,state:Pt})}function mt(e,t){const r=new xe({transparent:!0,writeDepth:!1,textureId:t.id,renderOccluded:Ue.Opaque}),s=ce,i=le,n=i*Te,o=e=>{const t=new Uint32Array([0,1,2,2,3,0]);return new ve([[Ve.POSITION,{size:3,data:[s-e,-e,0,s+e,-e,0,s+e,e,0,s-e,e,0],exclusive:!0}],[Ve.UV0,{size:2,data:[0,0,1,0,1,1,0,1]}]],[[Ve.POSITION,t],[Ve.UV0,t]])},a=Ne.createPolylineGeometry([[0,0,0],[s-i,0,0]]),c=Ne.createPolylineGeometry([[0,0,0],[s-n,0,0]]),l=new Ge({color:ue,renderOccluded:Ue.OccludeAndTransparent}),u=[{geometry:o(i),material:r,stateMask:De.Unfocused|Pt},{geometry:a,material:l,stateMask:De.Unfocused|Pt},{geometry:o(n),material:r,stateMask:De.Focused|Pt},{geometry:c,material:l,stateMask:De.Focused|Pt}];return new B({view:e,renderObjects:u,autoScaleRenderObjects:!1,collisionType:{type:"disc",direction:[0,0,1],offset:[s,0,0]},collisionPriority:1,radius:i/2,state:Pt})}function pt(e){const t=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new Le({view:e,attached:!0,color:de,width:me,writeDepthEnabled:!1,renderOccluded:Ue.OccludeAndTransparent,geometry:[t]})}function gt(e){return new Pe({view:e,attached:!0,backgroundColor:[...pe],gridColor:ge,gridWidth:4,renderOccluded:Ue.OccludeAndTransparent})}function ft(e,t){const r=ut(t),s=r?[k(1,0,0),k(0,0,0),k(0,1,0)]:[k(1,0,0),k(-1,0,0)],i=Ne.createPolylineGeometry(s),n=ye,o=e=>new Fe({color:n,width:e,renderOccluded:Ue.OccludeAndTransparent}),a=()=>new Ge({color:n,renderOccluded:Ue.OccludeAndTransparent}),c=r?Me:Oe,l=c*we,u=Oe,d=e=>e>1?o(e):a(),m=[{geometry:i,material:d(c),stateMask:De.Unfocused|Ut},{geometry:i,material:d(l),stateMask:De.Focused|Ut},{geometry:i,material:d(u),stateMask:Vt}],p=new B({view:e,renderObjects:m,collisionType:{type:"line",paths:[s]},autoScaleRenderObjects:!1,worldSized:!0,radius:r?fe:be});return p.state=Ut,p}function bt(e,t,r){const s=s=>{const i=(s?t:e).slice(0),o=R(z.get(),i[0],i[1]);O(o,o);const a=R(z.get(),i[i.length-1],i[i.length-2]);if(O(a,a),r.padding>0){const e=h(P(),a,-r.padding);if(i[i.length-1]=I(e,e,i[i.length-1]),r.bothEnds){const e=h(P(),o,-r.padding);i[0]=I(e,e,i[0])}}const c=s?r.tipFocusMultiplier:1,d=r.tipLength*(r.focusTipLength?c:1),T=r.tipRadius*c,y=m(X.get());if(r.padding>0){const e=d/4,t=A(z.get(),0,e,0),s=1+r.padding/e;p(y,y,t),l(y,y,A(z.get(),s,s,s)),p(y,y,h(t,t,-1/s))}const w=m(f()),E=k(0,1,0),j=g(f(),b(Y.get(),E,a));j[12]=i[i.length-1][0],j[13]=i[i.length-1][1],j[14]=i[i.length-1][2],u(j,j,y);const M=[{part:"tube",geometry:ht(r.tubeRadius*(s?r.tubeFocusMultiplier:1)+r.padding,r.flat,i),transform:w}];let L,C;if(n(r.flat)?L=Ne.createExtrudedTriangle(d,T,T,r.flat.thickness):(L=Ne.createConeGeometry(d,T,24,!1,!1,!0),C=Ne.createConeGeometry(d,T,24,!1,!0,!1)),M.push({part:"tip",geometry:L,transform:j}),C&&M.push({part:"cap",geometry:C,transform:j}),r.bothEnds){const e=g(f(),b(Y.get(),E,o));e[12]=i[0][0],e[13]=i[0][1],e[14]=i[0][2],u(e,e,y),M.push({part:"tip",geometry:L,transform:e}),C&&M.push({part:"cap",geometry:C,transform:e})}return M};return{normal:s(!1),focused:s(!0)}}function ht(e,t,r){const s=[];if(n(t))s.push([e,t.thickness/2],[-e,t.thickness/2],[-e,-t.thickness/2],[e,-t.thickness/2]);else{const t=12;for(let r=0;r<t;r++){const i=r/t*2*Math.PI;s.push([Math.cos(i)*e,Math.sin(i)*e])}}return Ne.createPathExtrusionGeometry(s,r,[],[],!1)}function Tt(e,t){const r=R(P(),e[e.length-1],e[e.length-2]);if(O(r,r),h(r,r,he),I(r,r,e[e.length-1]),t){const t=R(P(),e[0],e[1]);return O(t,t),h(t,t,he),I(t,t,e[0]),[t,...e,r]}return[...e,r]}function yt(e,t,s,n=new ze){if(i(e))return null;const{renderCoordsHelper:o}=t,a=o.fromRenderCoords(e.origin,t.spatialReference);if(i(a))return null;const c=C(a,s);if(i(c))return null;n.position=c;const l=o.worldUpAtPosition(e.origin,z.get()),u=o.worldBasisAtPosition(e.origin,_.Y,z.get()),d=2*E(e.basis1),m=2*E(e.basis2),p=ke.renderUnitScaleFactor(t.spatialReference,s);return n.width=d*p,n.height=m*p,n.tilt=r(It(e,l)),n.heading=r(Et(e,l,u)),n}function wt(e,t,r){if(i(e)||i(e.position))return null;const{spatialReference:s}=e.position,o=Ot(At(e,{renderCoordsHelper:t,spatialReference:s},r),t,s);return!e.position.hasZ&&n(o)&&(o.zmin=null,o.zmax=null),o}function Ot(e,t,r){if(i(e))return null;const s=e.origin,n=z.get(),o=z.get(),a=z.get(),c=z.get();let l,u,d,m,p,g;I(n,s,e.basis1),I(n,n,e.basis2),I(o,s,e.basis1),M(o,o,e.basis2),M(a,s,e.basis1),M(a,a,e.basis2),M(c,s,e.basis1),I(c,c,e.basis2);for(const f of[n,o,a,c]){const e=t.fromRenderCoords(f,f,r);if(i(e))return null;l=null==l?e[0]:Math.min(l,e[0]),u=null==u?e[0]:Math.max(u,e[0]),d=null==d?e[1]:Math.min(d,e[1]),m=null==m?e[1]:Math.max(m,e[1]),p=null==p?e[2]:Math.min(p,e[2]),g=null==g?e[2]:Math.max(g,e[2])}return new Xe({xmin:l,xmax:u,ymin:d,ymax:m,zmin:p,zmax:g,spatialReference:r})}function It(e,t){return D(t,e.basis2,e.basis1)+Nt}function Et(e,t,r){return D(e.basis1,r,t)-Nt}function Rt(e,t,r,i,n,o,a=V()){return o.toRenderCoords(e,a.origin)?(o.worldBasisAtPosition(a.origin,_.X,a.basis1),o.worldBasisAtPosition(a.origin,_.Y,a.basis2),F(a.basis2,a.basis1,a.origin,a.plane),v(a,-s(t),S(a),a),v(a,s(r),a.basis1,a),h(a.basis1,a.basis1,i/2),h(a.basis2,a.basis2,n/2),x(a),a):(Ye.error(`Failed to project slice plane position, projection from ${e.spatialReference.wkid} is not supported`),null)}function jt(e,t){if(i(e)||i(e.position))return null;const r=Z(e.position,t.spatialReference,t.elevationProvider);if(i(r))return null;const s=ke.renderUnitScaleFactor(e.position.spatialReference,t.spatialReference),n=e.width*s,o=e.height*s;return{position:r,heading:e.heading,tilt:e.tilt,renderWidth:n,renderHeight:o}}function At(e,t,r,s=V()){const n=jt(e,t);return i(n)?null:Mt(n,t,r,s)}function Mt(e,t,r,s=V()){if(i(e))return null;const o=Rt(e.position,e.heading,e.tilt,e.renderWidth,e.renderHeight,t.renderCoordsHelper,s);return!r.tiltEnabled&&n(o)&&We(o,t.renderCoordsHelper,o),o}function Lt(t){switch(t.type){case"analysis":case"building-scene":case"csv":case"feature":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"kml":case"map-notes":case"ogc-feature":case"point-cloud":case"route":case"scene":case"stream":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case null:return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"imagery":case"imagery-tile":case"map-image":case"open-street-map":case"tile":case"vector-tile":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e(t.type),!1}}!function(e){e[e.POSITIVE_X=0]="POSITIVE_X",e[e.POSITIVE_Y=1]="POSITIVE_Y",e[e.NEGATIVE_X=2]="NEGATIVE_X",e[e.NEGATIVE_Y=3]="NEGATIVE_Y"}(nt||(nt={}));const Pt=He.Custom1;var kt,Ct;!function(e){e[e.HEADING=1]="HEADING",e[e.TILT=2]="TILT"}(kt||(kt={})),function(e){e[e.HORIZONTAL_OR_VERTICAL=0]="HORIZONTAL_OR_VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL",e[e.VERTICAL=2]="VERTICAL",e[e.TILTED=3]="TILTED"}(Ct||(Ct={}));const _t=He.Custom2,vt=H(),Nt=Math.PI/2,Ut=He.Custom1,Vt=He.Custom2;var St;function xt(e){const t="building-scene-3d"===e.type?e:null;return n(t)}!function(e){e[e.CENTER_ON_CALLOUT=0]="CENTER_ON_CALLOUT",e[e.CENTER_ON_ARROW=1]="CENTER_ON_ARROW"}(St||(St={}));export{Pt as DidPointerMoveRecentlyFlag,_t as IsShiftEdgeOnScreenFlag,St as OffsetMode,kt as RotationAxis,Ct as SliceOrientation,Tt as addArrowTips,Ke as calculateBoundedPlaneTranslateRotate,lt as calculateDiagonalResizeHandleScale,$e as calculatePlaneHalfSize,ct as calculateResizeHandlePadding,at as calculateScreenSpaceBasisLength2,bt as createArrowGeometry,gt as createGridVisualElement,pt as createOutlineVisualElement,Ze as createPlane,ft as createResizeManipulator,mt as createRotateManipulator,Qe as createRotatePlane,dt as createShiftManipulator,Je as createShiftPlane,We as forceHorizontalOrVertical,Lt as isAlwaysDrapedLayer,ut as isDiagonalResizeHandle,xt as isIBuildingSceneLayerView3D,Be as normalToBases,Ot as planeToExtent,yt as planeToShape,jt as projectAndElevationAlignShape,Mt as projectedShapeToPlane,Ut as resizeNormal,Vt as resizeOutlineOnly,qe as resizePlane,wt as shapeToExtent,At as shapeToPlane,rt as updateResizeHandle,st as updateRotateHeadingHandle,it as updateRotateTiltHandle,et as updateShiftRestartHandle};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";import e from"../../../../core/Handles.js";import{isSome as t,unwrap as s,isNone as i,unwrapOr as r}from"../../../../core/maybe.js";import{g as n,f as a,k as l,o}from"../../../../chunks/vec3.js";import{c as h,f as _}from"../../../../chunks/vec3f64.js";import{g as d,c as p}from"../../../../chunks/vec4.js";import{f as u,a as c}from"../../../../chunks/vec4f32.js";import{create as f,fromRay as m,getStart as y,getEnd as g}from"../../../../geometry/support/clipRay.js";import{intersectClipRay as x}from"../../../../geometry/support/frustum.js";import{create as w,fromPoints as b,pointAt as E}from"../../../../geometry/support/lineSegment.js";import{create as R,fromPoints as O}from"../../../../geometry/support/ray.js";import{LaserlineVisualElement as D}from"./LaserlineVisualElement.js";import{Object3DVisualElement as
|
|
5
|
+
import"../../../../core/has.js";import e from"../../../../core/Handles.js";import{isSome as t,unwrap as s,isNone as i,unwrapOr as r}from"../../../../core/maybe.js";import{g as n,f as a,k as l,o}from"../../../../chunks/vec3.js";import{c as h,f as _}from"../../../../chunks/vec3f64.js";import{g as d,c as p}from"../../../../chunks/vec4.js";import{f as u,a as c}from"../../../../chunks/vec4f32.js";import{create as f,fromRay as m,getStart as y,getEnd as g}from"../../../../geometry/support/clipRay.js";import{intersectClipRay as x}from"../../../../geometry/support/frustum.js";import{create as w,fromPoints as b,pointAt as E}from"../../../../geometry/support/lineSegment.js";import{create as R,fromPoints as O}from"../../../../geometry/support/ray.js";import{LaserlineVisualElement as D}from"./LaserlineVisualElement.js";import{Object3DVisualElement as A}from"./Object3DVisualElement.js";import C from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as P}from"../../webgl-engine/lib/Material.js";import{VertexAttribute as j}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as v}from"../../webgl-engine/materials/RibbonLineMaterial.js";class M extends A{constructor(t){super(t),this._ray=R(),this._externalResources=null,this._handles=new e,this._isWorldDown=!1,this._start=h(),this._end=_(1,0,0),this._width=1,this._color=u(1,0,1,1),this._polygonOffset=!1,this._writeDepthEnabled=!0,this._innerWidth=0,this._innerColor=u(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._falloff=0,this._extensionType=T.LINE,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=P.OccludeAndTransparent,this._fadedExtensions=N,this.applyProps(t)}createExternalResources(){const e=new v(this.materialParameters);this._handles.add(this.view.state.watch("camera",(()=>{this._updateGeometry()})));const t=new D({view:this.view,attached:this._laserlineEnabled});this._externalResources={material:e,laserline:t}}destroyExternalResources(){t(this._externalResources)&&this._externalResources.laserline.destroy(),this._externalResources=null,this._handles.removeAll()}forEachExternalMaterial(e){t(this._externalResources)&&e(this._externalResources.material)}createGeometries(e){const t=[h(),h()],i=this.extensionType===T.FADED;i&&t.push(h(),h());const r=i?new Float32Array([1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0]):null,n=C.createPolylineGeometry(t,null,r);e.addGeometry(n,s(this._externalResources).material),this._updateVertices(e)}updateVisibility(e){super.updateVisibility(e),t(this._externalResources)&&(this._externalResources.laserline.visible=e)}setStartEndFromWorldDownAtLocation(e){this._isWorldDown=!0,n(this._start,e),this.view.renderCoordsHelper.worldUpAtPosition(e,this._end),a(this._end,e,this._end),O(this._start,this._end,this._ray),this._updateGeometry()}get start(){return this._start}set start(e){this._isWorldDown=!1,l(this._start,e)||(n(this._start,e),O(this._start,this._end,this._ray),this._updateGeometry())}get end(){return this._end}set end(e){this._isWorldDown=!1,l(this._end,e)||(n(this._end,e),O(this._start,this._end,this._ray),this._updateGeometry())}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){d(e,this._color)||(p(this._color,e),this._updateMaterial())}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){e!==this._polygonOffset&&(this._polygonOffset=e,this._updateMaterial())}get writeDepthEnabled(){return this._writeDepthEnabled}set writeDepthEnabled(e){this._writeDepthEnabled!==e&&(this._writeDepthEnabled=e,this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){d(e,this._innerColor)||(p(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const s=t(e)!==t(this._stipplePattern);this._stipplePattern=e,s?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){(i(e)||i(this._stippleOffColor)||!d(e,this._stippleOffColor))&&(this._stippleOffColor=t(e)?c(e):null,this._updateMaterial())}get stipplePreferContinuous(){return this._stipplePreferContinuous}set stipplePreferContinuous(e){e!==this._stipplePreferContinuous&&(this._stipplePreferContinuous=e,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get extensionType(){return this._extensionType}set extensionType(e){e!==this._extensionType&&(this._extensionType=e,this._updateGeometry())}get _laserlineAttached(){return this._laserlineEnabled&&t(this._laserlineStyle)}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,t(this._externalResources)&&(this._externalResources.laserline.attached=this._laserlineAttached,t(e)&&(this._externalResources.laserline.style=e))}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,t(this._externalResources)&&(this._externalResources.laserline.attached=this._laserlineAttached))}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get fadedExtensions(){return this._fadedExtensions}set fadedExtensions(e){this._fadedExtensions=r(e,N),this.recreateGeometry()}_updateMaterial(){if(i(this._externalResources))return;this._externalResources.material.setParameters(this.materialParameters)}get materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,innerWidth:this._innerWidth,innerColor:this._innerColor,falloff:this._falloff,polygonOffset:this._polygonOffset,renderOccluded:this._renderOccluded,writeDepth:this._writeDepthEnabled}}_updateGeometry(){t(this.object)&&this._updateVertices(this.object)}_updateVertices(e){const s=this._extensionType===T.FADED?this._updateLineSegmentFinite(S):this._updateLineSegmentInfinite(this._extensionType,S);this._updateVertexAttributes(e,s),t(this._externalResources)&&(this._externalResources.laserline.intersectsLine=s)}_updateLineSegmentFinite(e){return b(this._start,this._end,e)}_updateLineSegmentInfinite(e,t){const s=this.view.state.camera;switch(m(this._ray,G),e){case T.LINE:G.c0=-Number.MAX_VALUE;break;case T.RAY:case T.GROUND_RAY:{const e=this._ray.origin,t=r(this.view.elevationProvider.getElevation(e[0],e[1],e[2],this.view.renderCoordsHelper.spatialReference,"ground"),0),s=this.view.renderCoordsHelper.getAltitude(e);this._isWorldDown&&s<t&&o(G.ray.direction,G.ray.direction),this._extensionType===T.GROUND_RAY&&null!=t&&(G.c1=Math.abs(s-t));break}}if(!x(s.frustum,G))return b(this._start,this._end,t);const i=y(G,W),n=g(G,L);return b(i,n,t)}_updateVertexAttributes(e,t){const s=e.geometries[0].getMutableAttribute(j.POSITION).data;if(this.extensionType===T.FADED){const e=E(t,-this.fadedExtensions.start,W);s[0]=e[0],s[1]=e[1],s[2]=e[2];const i=E(t,0,W);s[3]=i[0],s[4]=i[1],s[5]=i[2];const r=E(t,1,W);s[6]=r[0],s[7]=r[1],s[8]=r[2];const n=E(t,1+this.fadedExtensions.end,W);s[9]=n[0],s[10]=n[1],s[11]=n[2]}else{const e=E(t,0,W);s[0]=e[0],s[1]=e[1],s[2]=e[2];const i=E(t,1,W);s[3]=i[0],s[4]=i[1],s[5]=i[2]}e.geometryVertexAttrsUpdated(e.geometryRecords[0])}}const G=f(),W=h(),L=h(),S=w();var T;!function(e){e[e.LINE=0]="LINE",e[e.RAY=1]="RAY",e[e.GROUND_RAY=2]="GROUND_RAY",e[e.FADED=3]="FADED"}(T||(T={}));const V=1/3,N={start:V,end:V};export{M as ExtendedLineVisualElement,T as ExtensionType};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e,isNone as r}from"../../../../core/maybe.js";import{B as t}from"../../../../chunks/mat4.js";import{f as s}from"../../../../chunks/vec3.js";import{c as o}from"../../../../chunks/vec3f64.js";import{g as i,c}from"../../../../chunks/vec4.js";import{f as a}from"../../../../chunks/vec4f64.js";import{Object3DVisualElement as l}from"./Object3DVisualElement.js";import{
|
|
5
|
+
import{isSome as e,isNone as r}from"../../../../core/maybe.js";import{B as t}from"../../../../chunks/mat4.js";import{f as s}from"../../../../chunks/vec3.js";import{c as o}from"../../../../chunks/vec3f64.js";import{g as i,c}from"../../../../chunks/vec4.js";import{f as a}from"../../../../chunks/vec4f64.js";import{Object3DVisualElement as l}from"./Object3DVisualElement.js";import{Geometry as h}from"../../webgl-engine/lib/Geometry.js";import{RenderOccludedFlag as n}from"../../webgl-engine/lib/Material.js";import{VertexAttribute as d}from"../../webgl-engine/lib/VertexAttribute.js";import{CheckerBoardMaterial as _}from"../../webgl-engine/materials/CheckerBoardMaterial.js";class m extends l{constructor(e){super(e),this._checkerBoardMaterial=null,this._renderOccluded=n.OccludeAndTransparent,this._geometry=null,this._size=[1,1],this._color1=a(1,.5,0,.5),this._color2=a(1,1,1,.5),this.applyProps(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this._geometryChanged()}get size(){return this._size}set size(e){this._size=e,this._updateMaterial()}get color1(){return this._color1}set color1(e){i(e,this._color1)||(c(this._color1,e),this._updateMaterial())}get color2(){return this._color2}set color2(e){i(e,this._color2)||(c(this._color2,e),this._updateMaterial())}_updateMaterial(){e(this._checkerBoardMaterial)&&this._checkerBoardMaterial.setParameters({size:this._size,color1:this._color1,color2:this._color2,renderOccluded:this._renderOccluded})}createExternalResources(){this._checkerBoardMaterial=new _({size:this._size,color1:this._color1,color2:this._color2,transparent:!0,writeDepth:!1,polygonOffset:!0,renderOccluded:n.OccludeAndTransparent})}destroyExternalResources(){this._checkerBoardMaterial=null}forEachExternalMaterial(r){e(this._checkerBoardMaterial)&&r(this._checkerBoardMaterial)}createGeometries(e){if(r(this._geometry)||r(this._checkerBoardMaterial))return;const i=u;t(i,this.transform);const c=this._geometry,a=[],l=o();c.position.forEach((e=>{s(l,e,i),a.push(l[0],l[1],l[2])}));const n=[];c.uv.forEach((e=>{n.push(e[0],e[1])}));const _=new h([[d.POSITION,{size:3,data:a,exclusive:!0}],[d.UV0,{size:2,data:n,exclusive:!0}]],[[d.POSITION,c.triangleIndices],[d.UV0,c.triangleIndices]]);e.addGeometry(_,this._checkerBoardMaterial)}_geometryChanged(){this.recreateGeometry()}}const u=o();export{m as MeasurementAreaVisualElement};
|