@arcgis/core 5.0.0-next.36 → 5.0.0-next.38
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/WebLinkChart.js +1 -1
- package/analysis/ShadowCast/types.d.ts +2 -0
- package/applications/Components/analysisUtils.d.ts +1 -0
- package/applications/Components/analysisUtils.js +1 -1
- package/applications/Components/testUtils.d.ts +4 -0
- package/applications/Components/testUtils.js +5 -0
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/AttributeFilter.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerOGC.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/014dbe6fa93a277b08f7.js +1 -0
- package/assets/esri/core/workers/chunks/{51355866a0dcf41cfded.js → 0a5427127634738aa239.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7c721de93bc8688e13c.js → 1d4ea8db272655c0608c.js} +1 -1
- package/assets/esri/core/workers/chunks/1d566539ff6fb6ac798c.js +1 -0
- package/assets/esri/core/workers/chunks/1de216d9850c39c1735d.js +1 -0
- package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +1 -0
- package/assets/esri/core/workers/chunks/2795e491f803654413d2.js +1 -0
- package/assets/esri/core/workers/chunks/2f9129003f77bfeab2f9.js +1 -0
- package/assets/esri/core/workers/chunks/{1817cf11e85afca947d3.js → 328106e181e5957ceaa5.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3db7244fac7398cc700.js → 4b6a44c6265c8959abd8.js} +1 -1
- package/assets/esri/core/workers/chunks/50ffb22c48fadd36c748.js +1 -0
- package/assets/esri/core/workers/chunks/{f1ac1c8b1331ec79e898.js → 59ce992d3a5e7c32b9fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a946cbc816f373c136b.js → 5e30acfda04f7fc2b676.js} +1 -1
- package/assets/esri/core/workers/chunks/6330d8767ba1d5329daa.js +1 -0
- package/assets/esri/core/workers/chunks/{3f03165487c1c2340fff.js → 690a40d2eef52bfc149f.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd34d56caafa38d4b8e4.js → 7aa730e5ac7b268e3c98.js} +1 -1
- package/assets/esri/core/workers/chunks/{b451dc416eebd0931ef8.js → 7ab237d19b84d89ff483.js} +7 -7
- package/assets/esri/core/workers/chunks/{1fa55d4c4b092a98bdd7.js → b56c07c0b43cb1999070.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfb9cbe59d36d18f9157.js → cda5c95fd49b8901f7d4.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9e7cc5d853908ab5b2f.js → ce99abfdcd71ff9e4e36.js} +1 -1
- package/assets/esri/core/workers/chunks/{726a797f5df7eeee0b3d.js → d786b17cc9062b1450ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{52c8687b473c9953c2f2.js → d9958654c6438f28237b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e76fbd3c874300fc4a7.js → de3da4d31a7529761565.js} +1 -1
- package/assets/esri/core/workers/chunks/{eb6218634a492667506a.js → e501d68a1464805c4b4e.js} +1 -1
- package/assets/esri/core/workers/chunks/{33431e8131f6017de2f9.js → e7f4d135ef9665de1468.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8623f5f13a084e439c2.js → e9bc3c6482ba778c9349.js} +37 -37
- package/assets/esri/core/workers/chunks/{7420fa18ba12014b22ea.js → ee67c8a7c1f8b482cd99.js} +1 -1
- package/assets/esri/core/workers/chunks/{abb05a903440d97a6a74.js → f441fc74451330384fb0.js} +1 -1
- package/assets/esri/core/workers/chunks/f609b256df9eb3803464.js +1 -0
- package/assets/esri/core/workers/chunks/f97a7cb367634353177d.js +1 -0
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +2 -2
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/Path.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +34 -36
- package/chunks/WaterSurface.glsl.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/vec32.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/iteratorUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/lineSegment.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +59 -5
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +1 -1
- package/layers/support/csvUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/package.json +5 -5
- package/support/revision.js +1 -1
- package/support/tests/meshUtils.js +5 -0
- package/support/tests/serviceMockDependencies.js +5 -0
- package/support/tests/setupServiceMocksMesh.js +5 -0
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/interactive/SegmentLabels2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/interactive/SegmentLabels3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImagerySubView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/FovController.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/support/intersectionUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.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/TileCompositor.js +1 -1
- package/views/3d/webgl/RenderCamera.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/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +4 -7
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +19 -15
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +14 -14
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +16 -37
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +8 -8
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Normals.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +5 -0
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayoutField.js +5 -0
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +5 -0
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/triangleIntersectionUtils.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/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.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/LineMarkerMaterial.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/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/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -10
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/BreakpointsOwner.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileVisualizationUtils.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/webmap/utils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/assets/esri/core/workers/chunks/11687718c8635eb7bf37.js +0 -1
- package/assets/esri/core/workers/chunks/15c1a48e8cd2a8882d85.js +0 -1
- package/assets/esri/core/workers/chunks/1b9e7d416c9f00e020bb.js +0 -1
- package/assets/esri/core/workers/chunks/24a3c6f0154787968724.js +0 -1
- package/assets/esri/core/workers/chunks/5000a37fba27464d10ca.js +0 -1
- package/assets/esri/core/workers/chunks/951a3442d4342539f2ea.js +0 -1
- package/assets/esri/core/workers/chunks/b075d3714fab0591d67c.js +0 -1
- package/assets/esri/core/workers/chunks/d8975dd7b85b5d065ee4.js +0 -1
- package/assets/esri/core/workers/chunks/e0a74250d22fa1d7dc18.js +0 -1
- package/assets/esri/core/workers/chunks/f43e1e1a1b2eb737e00c.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/FastApproximateTrigonometry.glsl.js +0 -26
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{EvaluateSceneLighting as a,addAmbientBoostFactor as i,addLightingGlobalFactor as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{terrainDepthTest as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ComputeCovariance as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/ComputeCovariance.glsl.js";import{GaussianSplatUnpackingPassParameters as c,GaussianSplatUnpacking as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatPassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as m,If as h}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{getGaussianSplatAlphaCutoffValue as y}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";class P extends c{constructor(){super(...arguments),this.totalGaussians=-1,this.focalLength=-1,this.minSplatRadius=-1,this.tanFov=n()}}function D(n){const c=new b;c.varyings.add("vColor","vec4"),c.varyings.add("conicOpacity","vec4"),c.varyings.add("depth","float"),c.varyings.add("gaussianCenterScreenPos","vec2"),c.varyings.add("fragScreenPos","vec2"),c.varyings.add("offsetFromCenter","vec2"),c.outputs.add("fragColor","vec4",0),c.vertex.uniforms.add(new w("splatOrderTexture",e=>e.splatOrder),new w("splatFadingTexture",e=>e.splatFading),new w("splatAtlasTexture",e=>e.splatAtlas),new f("numSplats",e=>e.totalGaussians),new p("focalLength",e=>e.focalLength),new p("minSplatRadius",e=>e.minSplatRadius),new v("tanFov",e=>e.tanFov),new u("screenSize",({camera:n})=>e(C,n.fullWidth,n.fullHeight)),new x("proj",e=>e.camera.projectionMatrix),new x("view",e=>e.camera.viewMatrix),new u("nearFar",e=>e.camera.nearFar),new g("cameraPosition",e=>e.camera.eye)),c.vertex.include(l),c.vertex.include(d),c.vertex.include(s),c.vertex.include(a,n),c.include(r,n),i(c.vertex),t(c.vertex),c.include(o,n);const P=n.depthPass,D=y(n.alphaCutoff),S=Math.log(D),F=-2*S;return c.vertex.code.add(m`vec2 ndcToPixel(vec2 ndcCoord, vec2 screenSize) {
|
|
6
6
|
return ((ndcCoord + 1.0) * screenSize - 1.0) * 0.5;
|
|
7
|
-
}`),
|
|
7
|
+
}`),c.vertex.main.add(`\n uint instanceID = uint(gl_InstanceID);\n\n // Transform the instanceID into 2D coordinates\n uint orderTextureWidth = uint(textureSize(splatOrderTexture, 0).x);\n uint x = instanceID % orderTextureWidth;\n uint y = instanceID / orderTextureWidth;\n\n // Fetch the index of the remaining frontmost Gaussian\n uint gaussianIndex = texelFetch(splatOrderTexture, ivec2(x, y), 0).r;\n\n uint splatAtlasWidth = uint(textureSize(splatAtlasTexture, 0).x);\n\n // Fetch the packed Gaussian according to the index\n uint gaussianIndexX = gaussianIndex % splatAtlasWidth;\n uint gaussianIndexY = gaussianIndex / splatAtlasWidth;\n uvec4 packedGaussian = texelFetch(splatAtlasTexture, ivec2(gaussianIndexX, gaussianIndexY), 0);\n\n // Fetch the header associated with the packed Gaussian (contains tile origin and number of fractional bits)\n uint pageNum = gaussianIndex / 1024u;\n uint headerIndex = (pageNum + 1u) * 1024u - 1u;\n uint headerIndexX = headerIndex % splatAtlasWidth;\n uint headerIndexY = headerIndex / splatAtlasWidth;\n uvec4 packedHeader = texelFetch(splatAtlasTexture, ivec2(headerIndexX, headerIndexY), 0);\n\n // Unpack the Gaussian\n vColor = unpackColor(packedGaussian);\n\n // Handle fading\n ${h(n.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n if(vColor.a < ${D}) {\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n return;\n }\n\n vec3 scale = unpackScale(packedGaussian);\n vec4 quaternion = unpackQuaternion(packedGaussian);\n mat3 rotation = quaternionToRotationMatrix(quaternion);\n vec3 tileOriginRelativePosition = unpackTileOriginRelativePosition(packedGaussian);\n\n vec3 cameraRelativePosition = unpackCameraRelativeGaussianPosition(packedHeader, tileOriginRelativePosition);\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n // Handle environment (scene lighting)\n ${h(!P,`\n vec3 groundNormal = ${n.spherical?m`normalize(cameraRelativePosition + cameraPosition)`:m`vec3(0.0, 0.0, 1.0)`};\n\n float groundLightAlignment = dot(groundNormal, mainLightDirection);\n float additionalAmbientScale = additionalDirectedAmbientLight(groundLightAlignment);\n vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;\n\n vColor.rgb = evaluateSceneLighting(groundNormal, vColor.rgb, 0.0, 0.0, mainLightIntensity);\n `)};\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n return;\n }\n\n forwardViewPosDepth(viewPos.xyz);\n\n vec3 covarianceA;\n vec3 covarianceB;\n computeCovariance3D(rotation, scale.xyz, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Invert covariance (EWA algorithm)\n float determinant = (covariance2D.x * covariance2D.z - covariance2D.y * covariance2D.y);\n if (determinant <= 0.) {\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n return;\n }\n float invDeterminant = 1. / determinant;\n\n vec4 projPos = proj * viewPos;\n float invW = 1. / (projPos.w + 1e-7);\n vec3 ndcPos = projPos.xyz * invW;\n\n // Compute the Gaussians extent in screen space by finding the eigenvalues lambda1 and lambda2\n // of the 2D covariance matrix\n float mid = 0.5 * (covariance2D.x + covariance2D.z);\n float radius = length(vec2((covariance2D.x - covariance2D.z) * 0.5, covariance2D.y));\n float lambda1 = mid + radius;\n float lambda2 = mid - radius;\n\n // Compute the extents along the principal axes\n float l1 = ceil(sqrt(lambda1 * ${F}));\n float l2 = ceil(sqrt(lambda2 * ${F}));\n\n float maxRadius = max(l1, l2);\n\n // Ignore gaussians with very small contribution, with tolerance based on the quality profile\n if(minSplatRadius > 0.0) {\n float effectiveSize = maxRadius * vColor.a;\n if(effectiveSize < minSplatRadius) {\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n return;\n }\n }\n\n // Screen space frustum culling\n vec2 radiusNDC = maxRadius * 2.0 / screenSize;\n\n if (any(greaterThan(abs(ndcPos.xy) - radiusNDC, vec2(1.0)))) {\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n return;\n }\n\n // Compute the principal diagonal direction (eigenvector for lambda1)\n vec2 diagonalVector = normalize(vec2(covariance2D.y, lambda1 - covariance2D.x));\n\n vec2 majorAxis = l1 * diagonalVector;\n vec2 minorAxis = l2 * vec2(diagonalVector.y, -diagonalVector.x);\n\n gaussianCenterScreenPos = ndcToPixel(ndcPos.xy, screenSize);\n\n // This maps vertex IDs 0, 1, 2, 3 to (-1,-1), (1,-1), (-1,1), (1,1)\n vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.0;\n fragScreenPos = gaussianCenterScreenPos + corner.x * majorAxis + corner.y * minorAxis;\n\n // We use a conic function to derive the opacity\n vec3 conic = vec3(covariance2D.z, -covariance2D.y, covariance2D.x) * invDeterminant;\n conicOpacity = vec4(conic, vColor.a);\n\n depth = ndcPos.z;\n\n // Convert from screen-space to clip-space\n vec2 clipPos = fragScreenPos / screenSize * 2. - 1.;\n\n offsetFromCenter = gaussianCenterScreenPos - fragScreenPos;\n\n gl_Position = vec4(clipPos, depth, 1.0);\n\n `),c.fragment.main.add(`\n discardByTerrainDepth();\n\n // Evaluate the 2D elliptical Gaussian exponent using the general conic form: Ax^2+2Bxy+Cy^2\n float x = offsetFromCenter.x;\n float y = offsetFromCenter.y;\n float conic = dot(conicOpacity.xyz, vec3(x * x, 2.0 * x * y, y * y));\n float gaussianExponent = -0.5 * conic;\n\n // A positive exponent indicates alpha > 1, this should not happen\n // We also early check the alphaCutoff (i.e., ln(alphaCutoff)), to avoid unnecessary exp()\n if (gaussianExponent > 0.0 || gaussianExponent < ${S}) {\n discard;\n }\n\n float gaussianFalloff = exp(gaussianExponent);\n\n // cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians\n float alpha = min(.99f, conicOpacity.w * gaussianFalloff);\n\n // We cannot write color and depth in the same pass, as they require different blend modes.\n // Regular depth writing based on first hit is not precise enough due to the inherently\n // transparent nature of Gaussian Splats (especially at the borders of the Splat).\n // We thus use a blended depth that computes a non-linear average using\n // the splat order and opacity with geometric decay.\n // This means the depth is averaged based on the order and opacity of the Gaussians,\n // with the frontmost Gaussians contributing the most.\n ${h(P,"fragColor = vec4(depth, 0, 0, alpha);","fragColor = vec4(vColor.rgb * alpha, alpha);")}\n `),c}const C=n(),S=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatPassParameters:P,build:D},Symbol.toStringTag,{value:"Module"}));export{P as G,S as a,D as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deg2rad as e}from"../core/mathUtils.js";import{set as i}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{p as n,e as a,n as o,b as r,
|
|
5
|
+
import{deg2rad as e}from"../core/mathUtils.js";import{set as i}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as t}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{p as n,e as a,n as o,b as r,C as l,d as s,f as c,i as d}from"./vec32.js";import{create as f}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as p}from"./vec42.js";import{create as g}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{pointAt as h}from"../geometry/support/lineSegment.js";import{fromPositionAndNormal as m,create as u}from"../geometry/support/plane.js";import{Laserline as w}from"../views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js";import{ScreenSpacePass as x}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Float2PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as M}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as C}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ShaderBuilder as L}from"../views/webgl/ShaderBuilder.js";const A=e(6);function j(e){const i=new L;i.include(x),i.include(w,e);const t=i.fragment;if(e.lineVerticalPlaneEnabled||e.heightManifoldEnabled)if(t.uniforms.add(new S("maxPixelDistance",(i,t)=>e.heightManifoldEnabled?2*t.camera.computeScreenPixelSizeAt(i.heightManifoldTarget):2*t.camera.computeScreenPixelSizeAt(i.lineVerticalPlaneSegment.origin))),t.code.add(C`float planeDistancePixels(vec4 plane, vec3 pos) {
|
|
6
6
|
float dist = dot(plane.xyz, pos) + plane.w;
|
|
7
7
|
float width = fwidth(dist);
|
|
8
8
|
dist /= min(width, maxPixelDistance);
|
package/chunks/Path.glsl.js
CHANGED
|
@@ -8,7 +8,7 @@ forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
|
8
8
|
gl_Position = transformPosition(proj, view, vpos);
|
|
9
9
|
forwardObjectAndLayerIdColor();
|
|
10
10
|
vcolor = getColor();
|
|
11
|
-
forwardLinearDepthToReadShadowMap();`)),V){case 0:I.include(w,B),
|
|
11
|
+
forwardLinearDepthToReadShadowMap();`)),V){case 0:I.include(w,B),_.include(t,B),_.include(d,B),I.include(v,B),_.include(o,B),I.include(A,B),L(_,B),c(_),m(_),_.uniforms.add(M.uniforms.get("localOrigin"),new j("ambient",e=>e.ambient),new j("diffuse",e=>e.diffuse),new P("opacity",e=>e.opacity)),_.include(b),_.include(C,B),g(_),_.main.add(S`
|
|
12
12
|
discardBySlice(vpos);
|
|
13
13
|
discardByTerrainDepth();
|
|
14
14
|
|
|
@@ -25,7 +25,7 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
25
25
|
forwardLinearDepthToReadShadowMap();
|
|
26
26
|
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
27
27
|
${V(J,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
28
|
-
`);const{hasColorTexture:Z,hasColorTextureTransform:ee}=_;return
|
|
28
|
+
`);const{hasColorTexture:Z,hasColorTextureTransform:ee}=_;return H.include(w,_),H.include(b,_),z.include(O,_),H.include(r,_),z.include(k,_),S(H,_),f(H),p(H),u(H),H.uniforms.add(W.uniforms.get("localOrigin"),W.uniforms.get("view"),new A("ambient",e=>e.ambient),new A("diffuse",e=>e.diffuse),new D("opacity",e=>e.opacity),new D("layerOpacity",e=>e.layerOpacity)),Z&&H.uniforms.add(new T("tex",e=>e.texture)),z.include(x,_),H.include(y,_),H.include(N),H.include($,_),h(H),H.main.add(F`
|
|
29
29
|
discardBySlice(vpos);
|
|
30
30
|
discardByTerrainDepth();
|
|
31
31
|
vec4 texColor = ${Z?`texture(tex, ${ee?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
package/chunks/Terrain.glsl.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as
|
|
5
|
+
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as r,h as i}from"./vec32.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{addLinearDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{addNearFar as t}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{SliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as s}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as g}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{EvaluateAmbientOcclusion as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as w,addAmbientBoostFactor as f,addLightingGlobalFactor as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as b,addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{ReadShadowMapDraw as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayTerrain as L}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as j,TerrainTexture as x}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{addProjViewLocalOrigin as T,addViewNormal as M,addCameraPosition as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3BindUniform as $}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as S,If as z}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DBindUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{outputColorHighlightOLID as F}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as _}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as V}from"../webscene/support/AlphaCutoff.js";class N extends j{}function W(o){const a=new _,{attributes:j,vertex:N,fragment:W,varyings:H}=a;j.add("position","vec3"),a.include(d,o),a.include(c,o);const U=()=>{a.include(C,o),N.code.add(S`vec3 getNormal() {
|
|
6
6
|
float z = 1.0 - abs(normalCompressed.x) - abs(normalCompressed.y);
|
|
7
7
|
vec3 n = vec3(normalCompressed + vec2(normalCompressed.x >= 0.0 ? 1.0 : -1.0,
|
|
8
8
|
normalCompressed.y >= 0.0 ? 1.0 : -1.0) * min(z, 0.0), z);
|
|
9
9
|
return normalize(n);
|
|
10
|
-
}`)};T(
|
|
10
|
+
}`)};T(N,o),a.include(s);const{output:E,overlayMode:I,tileBorders:q,transparencyMode:R,overlayEnabled:G}=o,J=2===R||3===R,K=0!==o.pbrMode,Q=G&&J;switch(E){case 0:{a.include(x,o),W.include(w,o),G&&a.include(L,o);const l=2===I;l&&a.include(m,o),H.add("vnormal","vec3"),H.add("vpos","vec3",{invariant:!0}),H.add("vup","vec3"),U(),N.main.add(S`
|
|
11
11
|
vpos = position;
|
|
12
12
|
vec3 positionWorld = position + localOrigin;
|
|
13
13
|
gl_Position = transformPosition(proj, view, vpos);
|
|
@@ -16,26 +16,24 @@ return normalize(n);
|
|
|
16
16
|
${z(l,S`forwardVertexTangent(vnormal);`)}
|
|
17
17
|
|
|
18
18
|
forwardTextureCoordinatesWithTransform(uv0);
|
|
19
|
-
${z(
|
|
19
|
+
${z(G,"setOverlayVTC(uv0);")}
|
|
20
20
|
${z(q,"forwardTextureCoordinates();")}
|
|
21
|
-
forwardLinearDepthToReadShadowMap();`),
|
|
21
|
+
forwardLinearDepthToReadShadowMap();`),a.include(O,o),W.include(n,o),W.include(w,o),W.include(p,o),a.include(F,o),P(W,o),f(W),h(W),W.uniforms.add(N.uniforms.get("localOrigin"),new $("viewDirection",({camera:e})=>r(B,i(B,e.viewMatrix[12],e.viewMatrix[13],e.viewMatrix[14])))),l&&W.uniforms.add(new A("ovWaterTex",e=>e.overlay?.getTexture(3)),new D("view",({origin:o},{camera:r})=>e(k,r.viewMatrix,o))),b(W),y(W),W.main.add(S`
|
|
22
22
|
vec3 normal = normalize(vnormal);
|
|
23
|
-
float
|
|
23
|
+
float lightAlignment = dot(normal, mainLightDirection);
|
|
24
24
|
|
|
25
|
-
float additionalAmbientScale =
|
|
25
|
+
float additionalAmbientScale = additionalDirectedAmbientLight(lightAlignment);
|
|
26
26
|
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
27
27
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
28
28
|
vec4 tileColor = getTileColor();
|
|
29
29
|
|
|
30
|
-
${z(
|
|
30
|
+
${z(G,S`vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
|
|
31
31
|
vec4 overlayColor = overlayOpacity * overlayColorOpaque;
|
|
32
|
-
${z(
|
|
32
|
+
${z(J,`if (overlayColor.a < ${S.float(V)}) { discard; }`)}
|
|
33
33
|
vec4 groundColor = tileColor;
|
|
34
34
|
tileColor = tileColor * (1.0 - overlayColor.a) + overlayColor;`)}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
// is neglectable because terrain typically renders first into the framebuffer.
|
|
38
|
-
if(tileColor.a < ${S.float(A)}) {
|
|
36
|
+
if(tileColor.a < ${S.float(V)}) {
|
|
39
37
|
discard;
|
|
40
38
|
}
|
|
41
39
|
|
|
@@ -49,38 +47,38 @@ return normalize(n);
|
|
|
49
47
|
// heuristic shading function used in the old terrain, now used to add ambient lighting
|
|
50
48
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
51
49
|
|
|
52
|
-
${
|
|
50
|
+
${K?S`vec4 finalColor = vec4(evaluatePBRSimplifiedLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight, normalize(vpos - cameraPosition), vup), tileColor.a);`:S`vec4 finalColor = vec4(evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight), tileColor.a);`}
|
|
53
51
|
${z(l,S`vec4 overlayWaterMask = getOverlayColor(ovWaterTex, vtcOverlay);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
float waterNormalLength = length(overlayWaterMask);
|
|
53
|
+
if (waterNormalLength > 0.95) {
|
|
54
|
+
mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, vnormal);
|
|
55
|
+
vec4 waterOverlayColor = vec4(overlayColor.w > 0.0 ? overlayColorOpaque.xyz/overlayColor.w : vec3(1.0), overlayColor.w);
|
|
56
|
+
vec4 viewPosition = view*vec4(vpos, 1.0);
|
|
57
|
+
vec4 waterColorLinear = getOverlayWaterColor(overlayWaterMask, waterOverlayColor, -normalize(vpos - cameraPosition), shadow, vnormal, tbnMatrix, viewPosition.xyz, vpos + localOrigin);
|
|
58
|
+
vec4 waterColorNonLinear = delinearizeGamma(vec4(waterColorLinear.xyz, 1.0));
|
|
59
|
+
float opacity = sliced ? groundSliceOpacity : 1.0;
|
|
60
|
+
// un-gamma the ground color to mix in linear space
|
|
61
|
+
finalColor = mix(groundColor, waterColorNonLinear, waterColorLinear.w) * opacity;
|
|
62
|
+
}`)}
|
|
65
63
|
${z(q,S`vec2 dVuv = fwidth(vuv0);
|
|
66
64
|
vec2 edgeFactors = smoothstep(vec2(0.0), 1.5 * dVuv, min(vuv0, 1.0 - vuv0));
|
|
67
65
|
float edgeFactor = 1.0 - min(edgeFactors.x, edgeFactors.y);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
${z(
|
|
71
|
-
gl_Position = transformPosition(proj, view, position);`),
|
|
72
|
-
${z(
|
|
66
|
+
finalColor = mix(finalColor, vec4(1.0, 0.0, 0.0, 1.0), edgeFactor);`)}
|
|
67
|
+
outputColorHighlightOLID(finalColor, vpos, finalColor.rgb);`)}break;case 1:Q&&a.include(L,o),N.main.add(S`
|
|
68
|
+
${z(Q,"setOverlayVTC(uv0);")}
|
|
69
|
+
gl_Position = transformPosition(proj, view, position);`),W.main.add(`${z(Q,`if (getCombinedOverlayColor().a < ${S.float(V)}) discard;`)}`);break;case 3:case 4:case 5:case 6:case 7:a.include(v,o),l(a),t(a),N.main.add(S`gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);`),W.main.add(S`outputDepth(linearDepth);`);break;case 2:Q&&a.include(L,o),H.add("vnormal","vec3"),M(N),U(),N.main.add(S`
|
|
70
|
+
${z(Q,"setOverlayVTC(uv0);")}
|
|
73
71
|
gl_Position = transformPosition(proj, view, position);
|
|
74
|
-
vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),
|
|
75
|
-
${z(
|
|
72
|
+
vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),W.main.add(S`
|
|
73
|
+
${z(Q,`if (getCombinedOverlayColor().a < ${S.float(V)}) discard;`)}
|
|
76
74
|
vec3 normal = normalize(vnormal);
|
|
77
75
|
if (gl_FrontFacing == false) {
|
|
78
76
|
normal = -normal;
|
|
79
77
|
}
|
|
80
|
-
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case 8:
|
|
81
|
-
${z(
|
|
82
|
-
gl_Position = transformPosition(proj, view, position);`),
|
|
83
|
-
${z(
|
|
78
|
+
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case 8:G&&(a.include(L,o),a.include(u,o)),N.main.add(S`
|
|
79
|
+
${z(G,"setOverlayVTC(uv0);")}
|
|
80
|
+
gl_Position = transformPosition(proj, view, position);`),a.include(g,o),W.main.add(S`
|
|
81
|
+
${z(G,S`
|
|
84
82
|
calculateOcclusionAndOutputHighlight(getAllOverlayHighlightValuesEncoded());`,"calculateOcclusionAndOutputHighlight();")}
|
|
85
|
-
`);break;case 9:if(
|
|
86
|
-
setOverlayVTC(uv0);`),
|
|
83
|
+
`);break;case 9:if(G)a.include(L,o),N.main.add(S`gl_Position = transformPosition(proj, view, position);
|
|
84
|
+
setOverlayVTC(uv0);`),W.main.add(S`fragColor = getOverlayColorTexel();`);else{const e=0===R;N.main.add(S`${z(e,"gl_Position = transformPosition(proj, view, position);")}`),W.main.add(S`fragColor = vec4(0.0);`)}}return a}const k=o(),B=a(),H=Object.freeze(Object.defineProperty({__proto__:null,TerrainPassParameters:N,build:W},Symbol.toStringTag,{value:"Module"}));export{N as T,H as a,W as b};
|
|
@@ -25,7 +25,7 @@ import{isColor as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutpu
|
|
|
25
25
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
26
26
|
|
|
27
27
|
gl_Position = transformPosition(proj, view, vpos);
|
|
28
|
-
forwardLinearDepthToReadShadowMap();`)}switch(C.include(d,L),C.include(g,L),O){case 0:
|
|
28
|
+
forwardLinearDepthToReadShadowMap();`)}switch(C.include(d,L),C.include(g,L),O){case 0:x.include(t,{pbrMode:0,lightingSphericalHarmonicsOrder:2}),C.include(v),C.include(m,L),x.include(r,L),C.include(b,L),x.include(c),w(x,L),n(x),s(x),x.uniforms.add(_,new f("timeElapsed",({timeElapsed:e})=>e),P.uniforms.get("view"),P.uniforms.get("localOrigin")).main.add(h`
|
|
29
29
|
discardBySlice(vpos);
|
|
30
30
|
discardByTerrainDepth();
|
|
31
31
|
vec3 localUp = vnormal;
|
package/chunks/boundedPlane.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../core/has.js";import s from"../core/Logger.js";import{acosClamped as t}from"../core/mathUtils.js";import{ObjectStack as i}from"../core/ObjectStack.js";import{invert as n,transpose as r,fromRotation as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as a,j as c,i as u,h as g,
|
|
5
|
+
import"../core/has.js";import s from"../core/Logger.js";import{acosClamped as t}from"../core/mathUtils.js";import{ObjectStack as i}from"../core/ObjectStack.js";import{invert as n,transpose as r,fromRotation as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as a,j as c,i as u,h as g,C as b,b as f,D as p,g as l,e as m,m as d,p as j,E as h,n as I}from"./vec32.js";import{fromValues as y,clone as v,create as P}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as N}from"../geometry/support/aaBoundingRect.js";import{projectPointClamp as w,distance2 as x,create as M}from"../geometry/support/lineSegment.js";import{create as S,wrap as T,copy as V,fromVectorsAndPoint as A,fromValues as E,intersectRay as _,intersectLineSegment as O,intersectLineSegmentClamp as k,isPointInside as C,projectPoint as F,getNormal as R,setOffsetFromPoint as q}from"../geometry/support/plane.js";import{distance2 as B}from"../geometry/support/ray.js";import{projectPointSignedLength as Y}from"../geometry/support/vector.js";import{sv3d as L}from"../geometry/support/vectorStacks.js";const U=()=>s.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function z(s=Ns){return{plane:S(s.plane),origin:v(s.origin),basis1:v(s.basis1),basis2:v(s.basis2)}}function D(s,t,i){const n=Ss.get();return n.origin=s,n.basis1=t,n.basis2=i,n.plane=T(0,0,0,0),J(n),n}function G(s,t=z()){return H(s.origin,s.basis1,s.basis2,t)}function W(s,t){a(t.origin,s.origin),a(t.basis1,s.basis1),a(t.basis2,s.basis2),V(t.plane,s.plane)}function H(s,t,i,n=z()){return a(n.origin,s),a(n.basis1,t),a(n.basis2,i),J(n),vs(n,"fromValues()"),n}function J(s){A(s.basis2,s.basis1,s.origin,s.plane)}function K(s,t,i){s!==i&&G(s,i);const n=c(L.get(),ds(s),t);return u(i.origin,i.origin,n),i.plane[3]-=t,i}function Q(s,t,i){return Z(t,i),K(i,bs(s,s.origin),i),i}function X(s,t){const i=s.basis1[0],n=s.basis2[1],[r,e]=s.origin;return N(r-i,e-n,r+i,e+n,t)}function Z(s,t=z()){const i=(s[2]-s[0])/2,n=(s[3]-s[1])/2;return g(t.origin,s[0]+i,s[1]+n,0),g(t.basis1,i,0,0),g(t.basis2,0,n,0),E(0,0,1,0,t.plane),t}function $(s,t,i){return!!_(s.plane,t,i)&&hs(s,i)}function ss(s,t,i){if($(s,t,i))return i;const n=ts(s,t,L.get());return u(i,t.origin,c(L.get(),t.direction,b(t.origin,n)/f(t.direction))),i}function ts(s,i,n){const r=ws.get();Ps(s,i,r,ws.get());let e=Number.POSITIVE_INFINITY;for(const o of Ts){const c=ys(s,o,xs.get()),u=L.get();if(O(r,c,u)){const s=p(L.get(),i.origin,u),r=Math.abs(t(l(i.direction,s)));r<e&&(e=r,a(n,u))}}return e===Number.POSITIVE_INFINITY?ns(s,i,n):n}function is(s,t){return(t-s)/t}function ns(s,t,i){if($(s,t,i))return i;const n=ws.get(),r=ws.get();Ps(s,t,n,r);let e=Number.POSITIVE_INFINITY;for(const o of Ts){const c=ys(s,o,xs.get()),u=L.get();if(k(n,c,u)){const s=B(t,u);if(!C(r,u))continue;s<e&&(e=s,a(i,u))}}return os(s,t.origin)<e&&rs(s,t.origin,i),i}function rs(s,t,i){const n=F(s.plane,t,L.get()),r=w(Is(s,s.basis1),n,-1,1,L.get()),e=w(Is(s,s.basis2),n,-1,1,L.get());return m(i,u(L.get(),r,e),s.origin),i}function es(s,t,i){const{origin:n,basis1:r,basis2:e}=s,o=m(L.get(),t,n),a=Y(r,o),c=Y(e,o),u=Y(ds(s),o);return g(i,a,c,u)}function os(s,t){const i=es(s,t,L.get()),{basis1:n,basis2:r}=s,e=f(n),o=f(r),a=Math.max(Math.abs(i[0])-e,0),c=Math.max(Math.abs(i[1])-o,0),u=i[2];return a*a+c*c+u*u}function as(s,t){return Math.sqrt(os(s,t))}function cs(s,t){let i=Number.NEGATIVE_INFINITY;for(const n of Ts){const r=ys(s,n,xs.get()),e=x(r,t);e>i&&(i=e)}return Math.sqrt(i)}function us(s,t){return C(s.plane,t)&&hs(s,t)}function gs(s,t,i,n){return js(s,i,n)}function bs(s,t){const i=-s.plane[3];return Y(ds(s),t)-i}function fs(s,t,i,n){const r=bs(s,t),e=c(Ms,ds(s),i-r);return u(n,t,e),n}function ps(s,t){return d(s.basis1,t.basis1)&&d(s.basis2,t.basis2)&&d(s.origin,t.origin)}function ls(s,t,i){return s!==i&&G(s,i),n(Vs,t),r(Vs,Vs),j(i.basis1,s.basis1,Vs),j(i.basis2,s.basis2,Vs),j(R(i.plane),R(s.plane),Vs),j(i.origin,s.origin,t),q(i.plane,i.plane,i.origin),i}function ms(s,t,i,n){return s!==n&&G(s,n),e(As,t,i),j(n.basis1,s.basis1,As),j(n.basis2,s.basis2,As),J(n),n}function ds(s){return R(s.plane)}function js(s,t,i){switch(t){case 0:a(i,s.basis1),I(i,i);break;case 1:a(i,s.basis2),I(i,i);break;case 2:a(i,ds(s))}return i}function hs(s,t){const i=m(L.get(),t,s.origin),n=h(s.basis1),r=h(s.basis2),e=l(s.basis1,i),o=l(s.basis2,i);return-e-n<0&&e-n<0&&-o-r<0&&o-r<0}function Is(s,t){const i=xs.get();return a(i.origin,s.origin),a(i.vector,t),i}function ys(s,t,i){const{basis1:n,basis2:r,origin:e}=s,o=c(L.get(),n,t.origin[0]),a=c(L.get(),r,t.origin[1]);u(i.origin,o,a),u(i.origin,i.origin,e);const g=c(L.get(),n,t.direction[0]),b=c(L.get(),r,t.direction[1]);return c(i.vector,u(g,g,b),2),i}function vs(s,t){Math.abs(l(s.basis1,s.basis2)/(f(s.basis1)*f(s.basis2)))>1e-6&&U().warn(t,"Provided basis vectors are not perpendicular"),Math.abs(l(s.basis1,ds(s)))>1e-6&&U().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-l(ds(s),s.origin)-s.plane[3])>1e-6&&U().warn(t,"Plane offset is not consistent with plane origin")}function Ps(s,t,i,n){const r=ds(s);A(r,t.direction,t.origin,i),A(R(i),r,t.origin,n)}const Ns={plane:S(),origin:y(0,0,0),basis1:y(1,0,0),basis2:y(0,1,0)},ws=new i(S),xs=new i(M),Ms=P(),Ss=new i(()=>z()),Ts=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],Vs=o(),As=o(),Es=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:bs,axisAt:gs,cameraFrustumCoverage:is,closestPoint:ns,closestPointOnSilhouette:ts,copy:G,copyWithoutVerify:W,create:z,distance:as,distance2:os,distanceToSilhouette:cs,elevate:K,equals:ps,extrusionContainsPoint:us,fromAABoundingRect:Z,fromValues:H,getExtent:X,intersectRay:$,intersectRayClosestSilhouette:ss,normal:ds,projectPoint:rs,projectPointLocal:es,rotate:ms,setAltitudeAt:fs,setExtent:Q,transform:ls,up:Ns,updateUnboundedPlane:J,wrap:D},Symbol.toStringTag,{value:"Module"}));export{gs as A,bs as B,fs as C,Ns as D,z as a,Es as b,is as c,G as d,us as e,H as f,ps as g,Z as h,$ as i,as as j,W as k,K as l,X as m,ds as n,ss as o,ts as p,ns as q,ms as r,Q as s,ls as t,J as u,rs as v,D as w,es as x,os as y,cs as z};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{cyclical2PI as e}from"../core/Cyclical.js";import{deg2rad as t,rad2deg as r,asinClamped as o,lerp as s,clamp as n}from"../core/mathUtils.js";import{fromRotation as a,rotate as i}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{f as l,g as m,n as p,p as u,q as f,b as h,j as g,
|
|
5
|
+
import{cyclical2PI as e}from"../core/Cyclical.js";import{deg2rad as t,rad2deg as r,asinClamped as o,lerp as s,clamp as n}from"../core/mathUtils.js";import{fromRotation as a,rotate as i}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{f as l,g as m,n as p,p as u,q as f,b as h,j as g,C as d,l as y,v as M,c as j}from"./vec32.js";import{fromValues as b,create as v,ZEROS as x,clone as T}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{c as C,d as w}from"./vec42.js";import{create as R}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{getEpsilon as S}from"../core/libs/gl-matrix-2/math/common.js";import{getReferenceEllipsoid as U}from"../geometry/ellipsoidUtils.js";import P from"../geometry/Extent.js";import q from"../geometry/Polygon.js";import H from"../geometry/SpatialReference.js";import{isClockwise as I}from"../geometry/support/coordsUtils.js";import{fromPoints as A,create as E}from"../geometry/support/lineSegment.js";import{gcsCyclical as k}from"../geometry/support/normalizeUtils.js";import{fromPositionAndNormal as F,create as _,isPointInside as z,intersectLineOrRay as G,getNormal as W}from"../geometry/support/plane.js";import{wrap as O}from"../geometry/support/ray.js";import{Sphere as D}from"../geometry/support/sphere.js";import{geographicToWebMercator as L}from"../geometry/support/webMercatorUtils.js";import{Frustum as N}from"../views/3d/state/Frustum.js";import{minNearDistanceInMeters as B}from"../views/3d/state/NearFarHeuristic.js";import{createDirectionUp as J,directionToHeadingTilt as K,clampLineSegmentToPlane as Q}from"../views/3d/support/cameraUtilsInternal.js";import{getLonDeltaForDistance as V}from"../views/3d/support/earthUtils.js";import{slerp as X}from"../views/3d/support/mathUtils.js";const Y=b(0,0,1),Z=p(v(),b(1,1,1)),$=c(),ee=v(),te=v();function re(e,r,o,s=J()){l(ee,e,Y),0===m(ee,ee)&&l(ee,e,Z),a($,-t(r),e),i($,$,-t(o),ee);const{up:n,direction:c}=s;return l(n,ee,e),p(n,n),u(n,n,$),p(c,e),f(c,c),u(c,c,$),s}function oe(e,t,r,o){const s=ee,n=te;return p(s,e),l(te,s,Y),0===m(te,te)&&l(te,s,Z),l(n,te,s),K(t,r,o,s,n)}function se(e,r,s,n){const a={eye:v(),up:null,tilt:n,heading:s},i=ee;i[0]=e[0],i[1]=e[2],i[2]=-e[1];const c=r,l=t(s),m=t(n),p=Math.sin(l),u=Math.cos(l),f=Math.sin(m),d=Math.cos(m),y=h(i);let M;if(Math.abs(m)<1e-8)M=c+y;else{const e=y/f,t=o(c/e),r=Math.PI-m-t;M=e*Math.sin(r)}const j=d*c,b=c*c*(f*f),x=u*u*b,T=M-j,C=T*T,w=x*(x+C-i[1]*i[1]);if(w<0)return g(a.eye,i,M/y),a.tilt=0,ae(a,e);const R=Math.sqrt(w),S=i[1]*T,U=x+C;let P;if(P=u>0?-R+S:R+S,Math.abs(U)<1e-8)return y<1e-8?(a.eye[0]=0,a.eye[1]=0,a.eye[2]=c):g(a.eye,i,M/y),a.tilt=0,ne(a.eye),ae(a,e);a.eye[1]=P/U;const q=p*p*b,H=f*c,I=u*H*a.eye[1],A=a.eye[1]*a.eye[1],E=1-A,k=Math.sqrt(E),F=x*A+q-2*I*k*T+E*C;return Math.abs(F)<1e-8?(g(a.eye,i,M/y),a.tilt=0,ne(a.eye),ae(a,e)):(a.eye[0]=(E*(M*i[0]-j*i[0])-H*k*(i[0]*a.eye[1]*u+i[2]*p))/F,a.eye[2]=(E*(M*i[2]-j*i[2])-H*k*(i[2]*a.eye[1]*u-i[0]*p))/F,g(a.eye,a.eye,M),ne(a.eye),ae(a,e))}function ne(e){const t=e[1];e[1]=-e[2],e[2]=t}function ae(e,t){const r=re(t,e.heading,e.tilt);return e.up=r.up,e}function ie(e,t,s){const n=h(t),a=Math.sqrt(s*s+n*n-2*s*n*Math.cos(Math.PI-e)),i=o(s/(a/Math.sin(e)));return r(e-i)}function ce(e,r,s){const n=t(e),a=h(r);return o(s/(a/Math.sin(n)))+n}function le(o,s,n,a,i){let c,l,m,p;const u=s.latitude,f=U(o.spatialReference).radius,h=s.longitude,g=V(u,n,f)/2;c=h-g,l=h+g;const d=t(u),y=(1+Math.sin(d))/(1-Math.sin(d)),M=(y+1)*Math.tan(a/f/2),j=M*M;function b(t){const r=Math.PI/2;return(t=e.normalize(t,-r))>r&&(t=Math.PI-t),t}if(m=1.5*Math.PI-2*Math.atan(.5*(M+Math.sqrt(4*y+j))),p=m+a/f,m=b(m),p=b(p),p<m){const e=p;p=m,m=e}if(m=Math.max(r(m),-90),p=Math.min(r(p),90),l=k.monotonic(c,l),l-c>180){const e=(l-c-180)/2;c+=e,l-=e}const v=o.spatialReference&&o.spatialReference.isGeographic?o.spatialReference:H.WGS84;return i?(i.xmin=c,i.ymin=m,i.xmax=l,i.ymax=p,i.spatialReference=v):i=new P(c,m,l,p,v),o.spatialReference&&o.spatialReference.isWebMercator&&L(i,!1,i),i}function me(e,t){const{renderCoordsHelper:r}=e,o=e.state.camera.clone(),a=new N(r);o.near=B,a.update(o);const i=r.getAltitude(t),c=e.spatialReference,l=r.referenceEllipsoid.radius,m=o.eye,p=1+d(m,t)/(l+i),u=Math.sqrt(p*p-1),{minCurvature:f,maxCurvature:h,minSamples:g,maxSamples:j}=ge,b=he(e),v=n((u-f)/(h-f),0,1),R=Math.round(s(g,j,v)),S=o.aboveGround,U=a.planes[5],P=[],H=F(x,de,_()),I=F(x,ye,_());C(Te,0,0,0,0);const A=e=>{};for(let n=0;n<4;n++){const e=1===n&&!S||3===n&&S?1-b:0,t=1===n&&S||3===n&&!S?b:1,o=a.lines[n],c=a.lines[3===n?0:n+1];for(let a=0;a<R;a++){const l=a/R,p=0===a?0:s(e,t,1===n?1-(1-l)**2:3===n?l**2:l),u=y(je,o.origin,c.origin,p),f=X(o.direction,c.direction,p,Me);r.intersectManifoldClosestSilhouette(O(u,f),i,be),Q(be,m,be,U),P.push(T(be)),0!==P.length&&A(M(P.at(-1),be));const h=(z(H,be)?1:0)|(z(I,be)?2:0);Te[h]=1}}P.length>2&&A(M(P[0],P.at(-1)));const E=pe(w(Te)>1?ue(fe(P,H),I):[P],r,c);return new q({rings:E,spatialReference:c})}function pe(e,t,r){const o=2*S();return e.map(e=>{const s=[];let n=!1;for(const a of e)t.fromRenderCoords(a,be,r),Math.abs(a[0])<o&&Math.abs(a[1])<o?(s.push([null,be[1]]),s.push([null,be[1]]),n=!0):s.push([be[0],be[1]]);if(n)for(let t=0;t<s.length;t++){const e=s[t];if(null!=e[0])continue;const r=s[t+1],o=s.at(0===t?-1:t-1);e[0]=o[0],t++;const n=s.at(t===s.length-1?0:t+1);r[0]=n[0]}return s.push(s[0]),I(s)||s.reverse(),s})}function ue(e,t){const r=[];for(const o of e)r.push(...fe(o,t));return r}function fe(e,t){const r=[],o=[],s=S();for(let a=0;a<e.length;a++){const n=e[a],i=a===e.length-1?e[0]:e[a+1],c=A(n,i,xe),l=G(t,c.origin,c.vector,0,be);switch(l){case 2:r.push(n);break;case 3:o.push(n);break;case 0:case 1:{const[e,a,i]=0===l?[1,r,o]:[-1,o,r],c=W(t),m=j(v(),be,c,e*s),p=j(v(),be,c,e*-s);a.push(n),a.push(m),i.push(p)}}}const n=[];return r.length&&n.push(r),o.length&&n.push(o),n}function he(e){const{renderCoordsHelper:t,state:r}=e,o=Math.abs(t.getAltitude(r.camera.center));return ve.radius=t.referenceEllipsoid.radius+o,r.camera.sphereFrustumCoverage(ve,t)}const ge={minCurvature:t(5),maxCurvature:t(50),minSamples:1,maxSamples:6},de=b(1,0,0),ye=b(0,1,0),Me=v(),je=v(),be=v(),ve=new D,xe=E(),Te=R(),Ce=Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:oe,eyeForCenterWithHeadingTilt:se,eyeTiltToLookAtTilt:ce,headingTiltToDirectionUp:re,lookAtTiltToEyeTilt:ie,toArea:me,toExtent:le},Symbol.toStringTag,{value:"Module"}));export{ce as a,me as b,Ce as c,oe as d,se as e,re as h,ie as l,le as t};
|
package/chunks/vec32.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as n,RANDOM as a}from"../core/libs/gl-matrix-2/math/common.js";function r(t){const n=t[0],a=t[1],r=t[2];return Math.sqrt(n*n+a*a+r*r)}function s(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,a,r){return t[0]=n,t[1]=a,t[2]=r,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t}function c(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function e(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function h(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function M(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function l(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t}function d(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t}function b(t,n=0,a=1){return t[0]=Math.min(Math.max(t[0],n),a),t[1]=Math.min(Math.max(t[1],n),a),t[2]=Math.min(Math.max(t[2],n),a),t}function x(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function q(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t}function p(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];return Math.sqrt(a*a+r*r+s*s)}function v(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];return a*a+r*r+s*s}function j(t){const n=t[0],a=t[1],r=t[2];return n*n+a*a+r*r}function y(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function z(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function A(t,n){const a=n[0],r=n[1],s=n[2];let o=a*a+r*r+s*s;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function _(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],c=a[1],e=a[2];return t[0]=s*e-o*c,t[1]=o*u-r*e,t[2]=r*c-s*u,t}function D(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],c=a[1],e=a[2],i=s*e-o*c,h=o*u-r*e,M=r*c-s*u,f=Math.sqrt(i*i+h*h+M*M);return t[0]=i/f,t[1]=h/f,t[2]=M/f,t}function I(t,n,a,r){const s=n[0],o=n[1],u=n[2];return t[0]=s+r*(a[0]-s),t[1]=o+r*(a[1]-o),t[2]=u+r*(a[2]-u),t}function L(t,n,a,r,s,o){const u=o*o,c=u*(2*o-3)+1,e=u*(o-2)+o,i=u*(o-1),h=u*(3-2*o);return t[0]=n[0]*c+a[0]*e+r[0]*i+s[0]*h,t[1]=n[1]*c+a[1]*e+r[1]*i+s[1]*h,t[2]=n[2]*c+a[2]*e+r[2]*i+s[2]*h,t}function O(t,n,a,r,s,o){const u=1-o,c=u*u,e=o*o,i=c*u,h=3*o*c,M=3*e*u,f=e*o;return t[0]=n[0]*i+a[0]*h+r[0]*M+s[0]*f,t[1]=n[1]*i+a[1]*h+r[1]*M+s[1]*f,t[2]=n[2]*i+a[2]*h+r[2]*M+s[2]*f,t}function S(t,n=1){const r=a,s=2*r()*Math.PI,o=2*r()-1,u=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(s)*u,t[1]=Math.sin(s)*u,t[2]=o*n,t}function E(t,n,a){const r=n[0],s=n[1],o=n[2];return t[0]=a[0]*r+a[4]*s+a[8]*o+a[12],t[1]=a[1]*r+a[5]*s+a[9]*o+a[13],t[2]=a[2]*r+a[6]*s+a[10]*o+a[14],t}function N(t,n,a){const r=n[0],s=n[1],o=n[2];return t[0]=r*a[0]+s*a[3]+o*a[6],t[1]=r*a[1]+s*a[4]+o*a[7],t[2]=r*a[2]+s*a[5]+o*a[8],t}function Q(t,n,a){const r=a[0],s=a[1],o=a[2],u=a[3],c=n[0],e=n[1],i=n[2],h=s*i-o*e,M=o*c-r*i,f=r*e-s*c,m=s*f-o*M,l=o*h-r*f,d=r*M-s*h,b=2*u;return t[0]=c+h*b+2*m,t[1]=e+M*b+2*l,t[2]=i+f*b+2*d,t}function T(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[0],o[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),o[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function k(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),o[1]=s[1],o[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function w(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),o[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),o[2]=s[2],t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function B(t,n){A(C,t),A(F,n);const a=P(C,F);return a>1?0:a<-1?Math.PI:Math.acos(a)}const C=t(),F=t();function G(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function H(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function J(t,a){if(t===a)return!0;const r=t[0],s=t[1],o=t[2],u=a[0],c=a[1],e=a[2],i=n();return Math.abs(r-u)<=i*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(s-c)<=i*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(o-e)<=i*Math.max(1,Math.abs(o),Math.abs(e))}function K(t,n,a){const r=a[0]-n[0],s=a[1]-n[1],o=a[2]-n[2];let u=r*r+s*s+o*o;return u>0?(u=1/Math.sqrt(u),t[0]=r*u,t[1]=s*u,t[2]=o*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const R=c,U=e,V=i,W=p,X=v,Y=r,Z=j,$=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:B,bezier:O,ceil:h,clamp:b,copy:s,cross:_,crossAndNormalize:D,direction:K,dist:W,distance:p,div:V,divide:i,dot:P,equals:J,exactEquals:H,floor:M,hermite:L,inverse:z,len:Y,length:r,lerp:I,max:d,min:l,mul:U,multiply:e,negate:y,normalize:A,random:S,rotateX:T,rotateY:k,rotateZ:w,round:x,scale:g,scaleAndAdd:q,set:o,sign:m,sqrDist:X,sqrLen:Z,squaredDistance:v,squaredLength:j,str:G,sub:R,subtract:c,transformMat3:N,transformMat4:E,transformQuat:Q},Symbol.toStringTag,{value:"Module"}));export{e as A,
|
|
5
|
+
import{create as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as n,RANDOM as a}from"../core/libs/gl-matrix-2/math/common.js";function r(t){const n=t[0],a=t[1],r=t[2];return Math.sqrt(n*n+a*a+r*r)}function s(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,a,r){return t[0]=n,t[1]=a,t[2]=r,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t}function c(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function e(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function h(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function M(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function l(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t}function d(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t}function b(t,n=0,a=1){return t[0]=Math.min(Math.max(t[0],n),a),t[1]=Math.min(Math.max(t[1],n),a),t[2]=Math.min(Math.max(t[2],n),a),t}function x(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function q(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t}function p(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];return Math.sqrt(a*a+r*r+s*s)}function v(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];return a*a+r*r+s*s}function j(t){const n=t[0],a=t[1],r=t[2];return n*n+a*a+r*r}function y(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function z(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function A(t,n){const a=n[0],r=n[1],s=n[2];let o=a*a+r*r+s*s;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function _(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],c=a[1],e=a[2];return t[0]=s*e-o*c,t[1]=o*u-r*e,t[2]=r*c-s*u,t}function D(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],c=a[1],e=a[2],i=s*e-o*c,h=o*u-r*e,M=r*c-s*u,f=Math.sqrt(i*i+h*h+M*M);return t[0]=i/f,t[1]=h/f,t[2]=M/f,t}function I(t,n,a,r){const s=n[0],o=n[1],u=n[2];return t[0]=s+r*(a[0]-s),t[1]=o+r*(a[1]-o),t[2]=u+r*(a[2]-u),t}function L(t,n,a,r,s,o){const u=o*o,c=u*(2*o-3)+1,e=u*(o-2)+o,i=u*(o-1),h=u*(3-2*o);return t[0]=n[0]*c+a[0]*e+r[0]*i+s[0]*h,t[1]=n[1]*c+a[1]*e+r[1]*i+s[1]*h,t[2]=n[2]*c+a[2]*e+r[2]*i+s[2]*h,t}function O(t,n,a,r,s,o){const u=1-o,c=u*u,e=o*o,i=c*u,h=3*o*c,M=3*e*u,f=e*o;return t[0]=n[0]*i+a[0]*h+r[0]*M+s[0]*f,t[1]=n[1]*i+a[1]*h+r[1]*M+s[1]*f,t[2]=n[2]*i+a[2]*h+r[2]*M+s[2]*f,t}function S(t,n=1){const r=a,s=2*r()*Math.PI,o=2*r()-1,u=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(s)*u,t[1]=Math.sin(s)*u,t[2]=o*n,t}function E(t,n,a){const r=n[0],s=n[1],o=n[2];return t[0]=a[0]*r+a[4]*s+a[8]*o+a[12],t[1]=a[1]*r+a[5]*s+a[9]*o+a[13],t[2]=a[2]*r+a[6]*s+a[10]*o+a[14],t}function N(t,n,a){const r=n[0],s=n[1],o=n[2];return t[0]=r*a[0]+s*a[3]+o*a[6],t[1]=r*a[1]+s*a[4]+o*a[7],t[2]=r*a[2]+s*a[5]+o*a[8],t}function Q(t,n,a){const r=a[0],s=a[1],o=a[2],u=a[3],c=n[0],e=n[1],i=n[2],h=s*i-o*e,M=o*c-r*i,f=r*e-s*c,m=s*f-o*M,l=o*h-r*f,d=r*M-s*h,b=2*u;return t[0]=c+h*b+2*m,t[1]=e+M*b+2*l,t[2]=i+f*b+2*d,t}function T(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[0],o[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),o[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function k(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),o[1]=s[1],o[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function w(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),o[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),o[2]=s[2],t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function B(t,n){A(C,t),A(F,n);const a=P(C,F);return a>1?0:a<-1?Math.PI:Math.acos(a)}const C=t(),F=t();function G(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function H(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function J(t,a){if(t===a)return!0;const r=t[0],s=t[1],o=t[2],u=a[0],c=a[1],e=a[2],i=n();return Math.abs(r-u)<=i*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(s-c)<=i*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(o-e)<=i*Math.max(1,Math.abs(o),Math.abs(e))}function K(t,n,a){const r=a[0]-n[0],s=a[1]-n[1],o=a[2]-n[2];let u=r*r+s*s+o*o;return u>0?(u=1/Math.sqrt(u),t[0]=r*u,t[1]=s*u,t[2]=o*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const R=c,U=e,V=i,W=p,X=v,Y=r,Z=j,$=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:B,bezier:O,ceil:h,clamp:b,copy:s,cross:_,crossAndNormalize:D,direction:K,dist:W,distance:p,div:V,divide:i,dot:P,equals:J,exactEquals:H,floor:M,hermite:L,inverse:z,len:Y,length:r,lerp:I,max:d,min:l,mul:U,multiply:e,negate:y,normalize:A,random:S,rotateX:T,rotateY:k,rotateZ:w,round:x,scale:g,scaleAndAdd:q,set:o,sign:m,sqrDist:X,sqrLen:Z,squaredDistance:v,squaredLength:j,str:G,sub:R,subtract:c,transformMat3:N,transformMat4:E,transformQuat:Q},Symbol.toStringTag,{value:"Module"}));export{e as A,i as B,p as C,K as D,j as E,J as F,W as G,Y as H,$ as I,M as J,w as K,h as L,b as M,x as N,D as O,L as P,O as Q,S as R,T as S,k as T,G as U,U as V,V as W,R as a,r as b,q as c,s as d,c as e,_ as f,P as g,o as h,u as i,g as j,B as k,I as l,H as m,A as n,z as o,E as p,y as q,Q as r,v as s,N as t,f as u,X as v,Z as w,d as x,l as y,m as z};
|
package/config.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.
|
|
5
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.38";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/has.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("workers-pool-size",8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-fast-triangulation-enabled",!0),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("parquetlayer-full-query-feature-count",2e4),has.add("parquetlayer-hittest-max-feature-count",1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",50),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",4),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:basemap-groundlayers",!0),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
|
|
5
|
+
const e=globalThis,a={...e.esriConfig?.has};function has(d){return"function"==typeof a[d]?a[d]=a[d](e):a[d]}has.add=(e,d,r,t)=>{(t||void 0===a[e])&&(a[e]=d),r&&has(e)},has.cache=a,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope);const a="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",a),has.add("host-node",!("object"!=typeof e.process||!e.process.versions?.node||!e.process.versions.v8)),has.add("dom",a),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,r=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?r:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",r=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,r),has.add("ios",r)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",r),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(e.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in e),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",()=>{const a="SharedArrayBuffer"in e,d=!1===e.crossOriginIsolated;return a&&!d}),has.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),has.add("esri-atomics","Atomics"in e),has.add("esri-workers","Worker"in e),has.add("web-feat:cache","caches"in e),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("workers-pool-size",8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-fast-triangulation-enabled",!0),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-initial-tolerance",0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-multipoint-min-threshold",2e4),has.add("featurelayer-snapshot-multipoint-max-threshold",1e5),has.add("featurelayer-snapshot-polygon-min-threshold",2e3),has.add("featurelayer-snapshot-polygon-max-threshold",2e3),has.add("featurelayer-snapshot-polyline-min-threshold",2e3),has.add("featurelayer-snapshot-polyline-max-threshold",2e3),has.add("featurelayer-snapshot-max-vertex-count",25e4),has.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled",!0),has.add("featurelayer-snapshot-concurrency",4),has.add("featurelayer-snapshot-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-query-tile-concurrency",4),has.add("featurelayer-query-tile-max-features",6e5),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("parquetlayer-full-query-feature-count",2e4),has.add("parquetlayer-hittest-max-feature-count",1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-global",50),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",4),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixel-deviation",.5),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has.add("enable-feature:esri-compress-textures",!0),has.add("enable-feature:basemap-groundlayers",!0),has.add("enable-feature:oit-ground",!1),!has("host-webworker")&&has("host-browser")&&(has.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),has.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();export{has as default};
|
package/core/iteratorUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(n){const t=[];return function*(){yield*t;let e,l=t.length;for(;!(e=n.next()).done;)for(t.push(e.value),yield e.value;++l<t.length;)yield t[l]}}const t=Object.freeze({done:!0,value:void 0});function e(n){const e=[];let l=null,o=null,u=!1;async function r(){if(u)return t;if(null!=o)return o;o=n.next();try{const n=await o;return o=null,n.done?(u=!0,t):(e.push(n.value),n)}catch(r){throw u=!0,o=null,l=r,r}}return async function*(){yield*e;let n,t=e.length;for(;!(n=await r()).done;)for(yield n.value;++t<e.length;)yield e[t];if(null!=l)throw l}}function l(n,t){for(const e of n)if(null!=e&&t(e))return e}function o(n){return null!=n&&"function"==typeof n[Symbol.iterator]}export{n as cache,e as cacheAsync,l as find,o as isIterable};
|
|
5
|
+
function n(n){const t=[];return function*(){yield*t;let e,l=t.length;for(;!(e=n.next()).done;)for(t.push(e.value),yield e.value;++l<t.length;)yield t[l]}}const t=Object.freeze({done:!0,value:void 0});function e(n){const e=[];let l=null,o=null,u=!1;async function r(){if(u)return t;if(null!=o)return o;o=n.next();try{const n=await o;return o=null,n.done?(u=!0,t):(e.push(n.value),n)}catch(r){throw u=!0,o=null,l=r,r}}return async function*(){yield*e;let n,t=e.length;for(;!(n=await r()).done;)for(yield n.value;++t<e.length;)yield e[t];if(null!=l)throw l}}function l(n,t){for(const e of n)if(null!=e&&t(e))return e}function o(n){return null!=n&&"function"==typeof n[Symbol.iterator]}function u(n){return n.done?void 0:n.value}export{n as cache,e as cacheAsync,l as find,u as getYieldedValue,o as isIterable};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as t}from"../factories/mat3f64.js";import{create as n}from"../factories/quatf64.js";import{fromValues as s,create as o}from"../factories/vec3f64.js";import{getEpsilon as a,RANDOM as r}from"./common.js";import{g as e,f as c,
|
|
5
|
+
import{create as t}from"../factories/mat3f64.js";import{create as n}from"../factories/quatf64.js";import{fromValues as s,create as o}from"../factories/vec3f64.js";import{getEpsilon as a,RANDOM as r}from"./common.js";import{g as e,f as c,H as i,n as u}from"../../../../chunks/vec32.js";import{c as h,a as M,n as f,f as l,i as m,s as p,h as q,l as j,j as d,d as g,e as P}from"../../../../chunks/vec42.js";function I(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function v(t,n,s){s*=.5;const o=Math.sin(s);return t[0]=o*n[0],t[1]=o*n[1],t[2]=o*n[2],t[3]=Math.cos(s),t}function x(t,n){const s=2*Math.acos(n[3]),o=Math.sin(s/2);return o>a()?(t[0]=n[0]/o,t[1]=n[1]/o,t[2]=n[2]/o):(t[0]=1,t[1]=0,t[2]=0),s}function y(t,n,s){const o=n[0],a=n[1],r=n[2],e=n[3],c=s[0],i=s[1],u=s[2],h=s[3];return t[0]=o*h+e*c+a*u-r*i,t[1]=a*h+e*i+r*c-o*u,t[2]=r*h+e*u+o*i-a*c,t[3]=e*h-o*c-a*i-r*u,t}function A(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i+e*c,t[1]=a*i+r*c,t[2]=r*i-a*c,t[3]=e*i-o*c,t}function b(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i-r*c,t[1]=a*i+e*c,t[2]=r*i+o*c,t[3]=e*i-a*c,t}function _(t,n,s){s*=.5;const o=n[0],a=n[1],r=n[2],e=n[3],c=Math.sin(s),i=Math.cos(s);return t[0]=o*i+a*c,t[1]=a*i-o*c,t[2]=r*i+e*c,t[3]=e*i-r*c,t}function k(t,n){const s=n[0],o=n[1],a=n[2];return t[0]=s,t[1]=o,t[2]=a,t[3]=Math.sqrt(Math.abs(1-s*s-o*o-a*a)),t}function z(t,n,s,o){const r=n[0],e=n[1],c=n[2],i=n[3];let u,h,M,f,l,m=s[0],p=s[1],q=s[2],j=s[3];return h=r*m+e*p+c*q+i*j,h<0&&(h=-h,m=-m,p=-p,q=-q,j=-j),1-h>a()?(u=Math.acos(h),M=Math.sin(u),f=Math.sin((1-o)*u)/M,l=Math.sin(o*u)/M):(f=1-o,l=o),t[0]=f*r+l*m,t[1]=f*e+l*p,t[2]=f*c+l*q,t[3]=f*i+l*j,t}function E(t){const n=r,s=n(),o=n(),a=n(),e=Math.sqrt(1-s),c=Math.sqrt(s);return t[0]=e*Math.sin(2*Math.PI*o),t[1]=e*Math.cos(2*Math.PI*o),t[2]=c*Math.sin(2*Math.PI*a),t[3]=c*Math.cos(2*Math.PI*a),t}function L(t,n){const s=n[0],o=n[1],a=n[2],r=n[3],e=s*s+o*o+a*a+r*r,c=e?1/e:0;return t[0]=-s*c,t[1]=-o*c,t[2]=-a*c,t[3]=r*c,t}function O(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function S(t,n){const s=n[0]+n[4]+n[8];let o;if(s>0)o=Math.sqrt(s+1),t[3]=.5*o,o=.5/o,t[0]=(n[5]-n[7])*o,t[1]=(n[6]-n[2])*o,t[2]=(n[1]-n[3])*o;else{let s=0;n[4]>n[0]&&(s=1),n[8]>n[3*s+s]&&(s=2);const a=(s+1)%3,r=(s+2)%3;o=Math.sqrt(n[3*s+s]-n[3*a+a]-n[3*r+r]+1),t[s]=.5*o,o=.5/o,t[3]=(n[3*a+r]-n[3*r+a])*o,t[a]=(n[3*a+s]+n[3*s+a])*o,t[r]=(n[3*r+s]+n[3*s+r])*o}return t}function T(t,n,s,o){const a=.5*Math.PI/180;n*=a,s*=a,o*=a;const r=Math.sin(n),e=Math.cos(n),c=Math.sin(s),i=Math.cos(s),u=Math.sin(o),h=Math.cos(o);return t[0]=r*i*h-e*c*u,t[1]=e*c*h+r*i*u,t[2]=e*i*u-r*c*h,t[3]=e*i*h+r*c*u,t}function H(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}const W=l,X=h,Y=m,Z=y,w=p,B=q,C=j,D=d,F=D,G=g,J=G,K=f,N=M,Q=P;function R(t,n,s){const o=e(n,s);return o<-.999999?(c(U,V,n),i(U)<1e-6&&c(U,$,n),u(U,U),v(t,U,Math.PI),t):o>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(c(U,n,s),t[0]=U[0],t[1]=U[1],t[2]=U[2],t[3]=1+o,K(t,t))}const U=o(),V=s(1,0,0),$=s(0,1,0);function tt(t,n,s,o,a,r){return z(nt,n,a,r),z(st,s,o,r),z(t,nt,st,2*r*(1-r)),t}const nt=n(),st=n();function ot(t,n,s,o){const a=at;return a[0]=s[0],a[3]=s[1],a[6]=s[2],a[1]=o[0],a[4]=o[1],a[7]=o[2],a[2]=-n[0],a[5]=-n[1],a[8]=-n[2],K(t,S(t,a))}const at=t(),rt=Object.freeze(Object.defineProperty({__proto__:null,add:Y,calculateW:k,conjugate:O,copy:W,dot:B,equals:Q,exactEquals:N,fromEuler:T,fromMat3:S,getAxisAngle:x,identity:I,invert:L,len:F,length:D,lerp:C,mul:Z,multiply:y,normalize:K,random:E,rotateX:A,rotateY:b,rotateZ:_,rotationTo:R,scale:w,set:X,setAxes:ot,setAxisAngle:v,slerp:z,sqlerp:tt,sqrLen:J,squaredLength:G,str:H},Symbol.toStringTag,{value:"Module"}));export{Y as add,k as calculateW,O as conjugate,W as copy,B as dot,Q as equals,N as exactEquals,T as fromEuler,S as fromMat3,x as getAxisAngle,I as identity,L as invert,F as len,D as length,C as lerp,Z as mul,y as multiply,K as normalize,rt as q,E as random,A as rotateX,b as rotateY,_ as rotateZ,R as rotationTo,w as scale,X as set,ot as setAxes,v as setAxisAngle,z as slerp,tt as sqlerp,J as sqrLen,G as squaredLength,H as str};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../factories/vec3f64.js";import"./common.js";export{u as abs,i as add,k as angle,Q as bezier,L as ceil,M as clamp,d as copy,f as cross,O as crossAndNormalize,
|
|
5
|
+
import"../factories/vec3f64.js";import"./common.js";export{u as abs,i as add,k as angle,Q as bezier,L as ceil,M as clamp,d as copy,f as cross,O as crossAndNormalize,D as direction,G as dist,C as distance,W as div,B as divide,g as dot,F as equals,m as exactEquals,J as floor,P as hermite,o as inverse,H as len,b as length,l as lerp,x as max,y as min,V as mul,A as multiply,q as negate,n as normalize,R as random,S as rotateX,T as rotateY,K as rotateZ,N as round,j as scale,c as scaleAndAdd,h as set,z as sign,v as sqrDist,w as sqrLen,s as squaredDistance,E as squaredLength,U as str,a as sub,e as subtract,t as transformMat3,p as transformMat4,r as transformQuat}from"../../../../chunks/vec32.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as e}from"../../../core/mathUtils.js";import{s as t,m as s,b as r,r as i,c}from"../../../chunks/vec42.js";import{
|
|
5
|
+
import{clamp as e}from"../../../core/mathUtils.js";import{s as t,m as s,b as r,r as i,c}from"../../../chunks/vec42.js";import{create as n,ONES as l,ZEROS as u}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{getFloat16ArrayConstructor as a,hasNativeFloat16Array as f}from"../float16.js";import{BufferViewMat3Impl as p}from"./internals/Mat3.js";import{BufferViewMat4Impl as y}from"./internals/Mat4.js";import{BufferViewScalarImpl as h}from"./internals/Scalar.js";import{BufferViewVec2Impl as o}from"./internals/Vec2.js";import{BufferViewVec3Impl as m}from"./internals/Vec3.js";import{BufferViewVec4Impl as T}from"./internals/Vec4.js";import{assert as d}from"../../../views/3d/webgl-engine/lib/Util.js";class x extends h{constructor(e,t=0,s,r){d(f),super(a(),e,t,s,r),this.elementType="f16"}static{this.ElementType="f16"}}class B extends h{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}static{this.ElementType="f32"}}class E extends o{constructor(e,t=0,s,r){d(f),super(a(),e,t,s,r),this.elementType="f16"}slice(e,t){return this.sliceBuffer(E,e,t)}static{this.ElementType="f16"}}class A extends o{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(A,e,t)}static{this.ElementType="f32"}}class b extends m{constructor(e,t=0,s,r){d(f),super(a(),e,t,s,r),this.elementType="f16"}slice(e,t){return this.sliceBuffer(b,e,t)}static{this.ElementType="f16"}}class U extends m{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class F extends T{constructor(e,t=0,s,r){d(f),super(a(),e,t,s,r),this.elementType="f16"}slice(e,t){return this.sliceBuffer(F,e,t)}static{this.ElementType="f16"}}class I extends T{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(I,e,t)}static{this.ElementType="f32"}}class g extends p{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(g,e,t)}static{this.ElementType="f32"}}class j extends p{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(j,e,t)}static{this.ElementType="f64"}}class V extends y{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(V,e,t)}static{this.ElementType="f32"}}class O extends y{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(O,e,t)}static{this.ElementType="f64"}}class w extends h{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(w,e,t)}static{this.ElementType="f64"}}class M extends o{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(M,e,t)}static{this.ElementType="f64"}}class v extends m{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class L extends T{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(L,e,t)}static{this.ElementType="f64"}}class S extends h{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(S,e,t)}static{this.ElementType="u8"}}class k extends o{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(k,e,t)}static{this.ElementType="u8"}}class q extends m{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class z extends T{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(z,e,t)}static{this.ElementType="u8"}}class C extends h{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(C,e,t)}static{this.ElementType="u16"}}class D extends o{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(D,e,t)}static{this.ElementType="u16"}}class G extends m{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(G,e,t)}static{this.ElementType="u16"}}class H extends T{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(H,e,t)}static{this.ElementType="u16"}}class J extends h{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(J,e,t)}static{this.ElementType="u32"}}class K extends o{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(K,e,t)}static{this.ElementType="u32"}}class N extends m{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(N,e,t)}static{this.ElementType="u32"}}class P extends T{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(P,e,t)}static{this.ElementType="u32"}}class Q extends h{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(Q,e,t)}static{this.ElementType="i8"}}class R extends o{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(R,e,t)}static{this.ElementType="i8"}}class W extends m{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(W,e,t)}static{this.ElementType="i8"}}class X extends T{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(X,e,t)}static{this.ElementType="i8"}}class Y extends h{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(Y,e,t)}static{this.ElementType="i16"}}class Z extends o{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(Z,e,t)}static{this.ElementType="i16"}}class $ extends m{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer($,e,t)}static{this.ElementType="i16"}}class _ extends T{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(_,e,t)}static{this.ElementType="i16"}}class ee extends h{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(ee,e,t)}static{this.ElementType="i32"}}class te extends o{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(te,e,t)}static{this.ElementType="i32"}}class se extends m{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(se,e,t)}static{this.ElementType="i32"}}class re extends T{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(re,e,t)}static{this.ElementType="i32"}}class ie extends S{constructor(e,t=0,s,r){super(e,t,s,r)}get(e){return this.typedBuffer[e*this.typedBufferStride]/255}set(t,s){this.typedBuffer[t*this.typedBufferStride]=Math.round(255*e(s,0,1))}slice(e,t){return this.sliceBuffer(ie,e,t)}}class ce extends z{constructor(e,t=0,s,r){super(e,t,s,r)}getVec(e,s){return t(s,super.getVec(e,s),1/255)}setVec(e,c){s(ne,r(ne,c,u),l),t(ne,ne,255),i(ne,ne),super.setVec(e,ne)}get(e,t){return super.get(e,t)/255}set(t,s,r){super.set(t,s,Math.round(255*e(r,0,1)))}setValues(e,t,s,r,i){c(ne,t,s,r,i),this.setVec(e,ne)}slice(e,t){return this.sliceBuffer(ce,e,t)}}const ne=n();export{B as BufferViewFloat,x as BufferViewFloat16,w as BufferViewFloat64,Y as BufferViewInt16,ee as BufferViewInt32,Q as BufferViewInt8,g as BufferViewMat3f,j as BufferViewMat3f64,V as BufferViewMat4f,O as BufferViewMat4f64,C as BufferViewUint16,J as BufferViewUint32,S as BufferViewUint8,ie as BufferViewUnorm8,A as BufferViewVec2f,E as BufferViewVec2f16,M as BufferViewVec2f64,Z as BufferViewVec2i16,te as BufferViewVec2i32,R as BufferViewVec2i8,D as BufferViewVec2u16,K as BufferViewVec2u32,k as BufferViewVec2u8,U as BufferViewVec3f,b as BufferViewVec3f16,v as BufferViewVec3f64,$ as BufferViewVec3i16,se as BufferViewVec3i32,W as BufferViewVec3i8,G as BufferViewVec3u16,N as BufferViewVec3u32,q as BufferViewVec3u8,ce as BufferViewVec4Unorm8,I as BufferViewVec4f,F as BufferViewVec4f16,L as BufferViewVec4f64,_ as BufferViewVec4i16,re as BufferViewVec4i32,X as BufferViewVec4i8,H as BufferViewVec4u16,P as BufferViewVec4u32,z as BufferViewVec4u8};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{interpolateCubicBezier as t}from"./bezierCurveUtils.js";import{deriveCircleFromCircularArc as s}from"./circularArcUtils.js";import{isCurvedGeometry as i,getCurves as n,getEndpoint as e,isCoordinate as r,isBezierCurve as a,isCircularArc as h,isEllipticArc4 as c,isEllipticArc7 as o,cloneCurve as u}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as p}from"./ellipticArc4Utils.js";import{deriveEllipse as l,interpolateEllipse as d}from"./ellipticArc7Utils.js";import{interpolateSegment as m,pointToSegmentDistance2 as S,distance2 as E}from"./mathUtils.js";const v={maxSegmentLength:1/0,maxDeviation:1/0,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1},f=1e-6,g=[0,0];function M(t){return{maxSegmentLength:t.maxSegmentLength??v.maxSegmentLength,maxDeviation:t.maxDeviation??v.maxDeviation,maxSegmentsPerCurve:t.maxSegmentsPerCurve??v.maxSegmentsPerCurve,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??v.minSegmentsPerCurve,1)}}class P{constructor(t,s){this.curveStart=t,this.curveEnd=s,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,s){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(s)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:s,maxSegmentLength:i,maxSegmentsPerCurve:n,minSegmentsPerCurve:e}){const r=i*i,a=s*s,h=1/n,c=this.interpolate(0),o=this.interpolate(1);E(this.curveStart,c)>f&&t.push(c),this.initialize(c,o);const u=1/e;for(let p=e-1;p>0;p--){const t=p*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<h||(0===r||!isFinite(r)||E(this.arcStart,this.arcEnd)<r)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return E(this.curveEnd,o)>f&&t.push([...this.curveEnd]),t}}class x extends P{constructor(t,s){const[i,n,e]=s.b;super(t,i),this._controlPointsStack=[],this._curveControlPoints=[n,e],this._arcControlPoints=[n,e],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:s,arcEnd:i,tStart:n,tEnd:e}=this,[r,a]=this._arcControlPoints,h=(t-n)/(e-n),c=m([],s,r,h),o=m(g,r,a,h),u=m([],a,i,h),p=m([],c,o,h),l=m([],o,u,h),d=m([],p,l,h);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([l,u]),this.tEndStack.push(t),this.arcEndStack.push(d),this._arcControlPoints[0]=c,this._arcControlPoints[1]=p,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(s){const{curveStart:i,curveEnd:n}=this,[e,r]=this._curveControlPoints;return t(i,e,r,n,s)}getDeviation2(){const{arcStart:t,arcEnd:s}=this,[i,n]=this._arcControlPoints;return Math.max(S(i,t,s),S(n,t,s))}}class k extends P{constructor(t,s){const[i]=s.a;super(t,i),this._derivedEllipse=l(t,s)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return d(this._derivedEllipse,t)}getDeviation2(){return S(this._arcMid,this.arcStart,this.arcEnd)}}function C(t,s,i,{cx:n,cy:e,radius:r,thetaStart:a,thetaEnd:h,isInvalid:c},{maxDeviation:o,maxSegmentLength:u,maxSegmentsPerCurve:p,minSegmentsPerCurve:l}){if(c)return t.push([...i]),t;const d=2*r,m=[n+r*Math.cos(a),e+r*Math.sin(a)],S=[n+r*Math.cos(h),e+r*Math.sin(h)];E(s,m)>f&&t.push(m);const v=Math.abs(h-a),g=u<d?2*Math.asin(u/d):v,M=o<=r?2*Math.acos(1-o/r):v,P=Math.min(g,M),x=Math.min(p,Math.max(l,Math.ceil(Math.abs(v/P)))),k=1/x;for(let E=1;E<x;E++){const s=E*k,i=a*(1-s)+h*s;t.push([n+r*Math.cos(i),e+r*Math.sin(i)])}return t.push(S),E(i,S)>f&&t.push([...i]),t}function _(t,s,i,n){return new x(s,i).densify(t,n)}function Z(t,i,n,e){const r=s(i,n),[a]=n.c;return C(t,i,a,r,e)}function A(t,s,i,n){const e=p(s,i),[r]=i.a;return C(t,s,r,e,n)}function D(t,s,i,n){const[e,r,a,h,c,o,u]=i.a;return 0===o||0===u?(t.push([...e]),t):new k(s,i).densify(t,n)}function R(t,s,i,n){return r(i)?(t.push([...i]),t):a(i)?_(t,s,i,n):h(i)?Z(t,s,i,n):c(i)?A(t,s,i,n):D(t,s,i,n)}function y(t,s){if(!i(t))return t;const r=M(s),a=n(t),h=[];for(const i of a){const t=[];for(let s=0;s<i.length-1;s++){const n=s+1,a=[...e(i[s])];0===s&&t.push(a);R(t,a,i[n],r)}h.push(t)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:h,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:h,spatialReference:t.spatialReference}}function j(t,s,p){if(!i(t))return t;const l=new Set(s),d=M(p),m=n(t),S=[];let E=!1;for(const i of m){const t=[];for(let s=0;s<i.length-1;s++){const n=s+1,p=[...e(i[s])];0===s&&t.push(p);const m=i[n];r(m)?t.push([...m]):a(m)&&!l.has("esriGeometryBezier3Curve")?_(t,p,m,d):h(m)&&!l.has("esriGeometryCircularArc")?Z(t,p,m,d):c(m)&&!l.has("esriGeometryEllipticArc")?A(t,p,m,d):o(m)&&!l.has("esriGeometryEllipticArc")?D(t,p,m,d):(t.push(u(m)),E=!0)}S.push(t)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...E?{curvePaths:S}:{paths:S}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...E?{curveRings:S}:{rings:S}}}export{y as densifyCurvedGeometry,j as selectiveDensifyCurvedGeometry};
|
|
5
|
+
import{interpolateCubicBezier as t}from"./bezierCurveUtils.js";import{deriveCircleFromCircularArc as s}from"./circularArcUtils.js";import{isCurvedGeometry as i,getCurves as n,getEndpoint as e,isCoordinate as r,isBezierCurve as a,isCircularArc as h,isEllipticArc4 as c,isEllipticArc7 as o,cloneCurve as u}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as p}from"./ellipticArc4Utils.js";import{deriveEllipse as l,interpolateEllipse as d}from"./ellipticArc7Utils.js";import{interpolateSegment as m,pointToSegmentDistance2 as S,distance2 as E}from"./mathUtils.js";const v={maxSegmentLength:1/0,maxDeviation:1/0,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1},f=1e-6,g=[0,0];function M(t){return{maxSegmentLength:t.maxSegmentLength??v.maxSegmentLength,maxDeviation:t.maxDeviation??v.maxDeviation,maxSegmentsPerCurve:t.maxSegmentsPerCurve??v.maxSegmentsPerCurve,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??v.minSegmentsPerCurve,1)}}class P{constructor(t,s){this.curveStart=t,this.curveEnd=s,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,s){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(s)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:s,maxSegmentLength:i,maxSegmentsPerCurve:n,minSegmentsPerCurve:e}){const r=i*i,a=s*s,h=1/n,c=this.interpolate(0),o=this.interpolate(1);E(this.curveStart,c)>f&&t.push(c),this.initialize(c,o);const u=1/e;for(let p=e-1;p>0;p--){const t=p*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<h||(0===r||!isFinite(r)||E(this.arcStart,this.arcEnd)<r)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return E(this.curveEnd,o)>f&&t.push([...this.curveEnd]),t}}class x extends P{constructor(t,s){const[i,n,e]=s.b;super(t,i),this._controlPointsStack=[],this._curveControlPoints=[n,e],this._arcControlPoints=[n,e],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:s,arcEnd:i,tStart:n,tEnd:e}=this,[r,a]=this._arcControlPoints,h=(t-n)/(e-n),c=m([],s,r,h),o=m(g,r,a,h),u=m([],a,i,h),p=m([],c,o,h),l=m([],o,u,h),d=m([],p,l,h);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([l,u]),this.tEndStack.push(t),this.arcEndStack.push(d),this._arcControlPoints[0]=c,this._arcControlPoints[1]=p,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(s){const{curveStart:i,curveEnd:n}=this,[e,r]=this._curveControlPoints;return t(i,e,r,n,s)}getDeviation2(){const{arcStart:t,arcEnd:s}=this,[i,n]=this._arcControlPoints;return Math.max(S(i,t,s),S(n,t,s))}}class k extends P{constructor(t,s){const[i]=s.a;super(t,i),this._derivedEllipse=l(t,s)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return d(this._derivedEllipse,t)}getDeviation2(){return S(this._arcMid,this.arcStart,this.arcEnd)}}function C(t,s,i,{cx:n,cy:e,radius:r,thetaStart:a,thetaEnd:h,isInvalid:c},{maxDeviation:o,maxSegmentLength:u,maxSegmentsPerCurve:p,minSegmentsPerCurve:l}){if(c)return t.push([...i]),t;const d=2*r,m=[n+r*Math.cos(a),e+r*Math.sin(a)],S=[n+r*Math.cos(h),e+r*Math.sin(h)];E(s,m)>f&&t.push(m);const v=Math.abs(h-a),g=u<d?2*Math.asin(u/d):v,M=o<=r?2*Math.acos(1-o/r):v,P=Math.min(g,M),x=Math.min(p,Math.max(l,Math.ceil(Math.abs(v/P)))),k=1/x;for(let E=1;E<x;E++){const s=E*k,i=a*(1-s)+h*s;t.push([n+r*Math.cos(i),e+r*Math.sin(i)])}return t.push(S),E(i,S)>f&&t.push([...i]),t}function _(t,s,i,n){return new x(s,i).densify(t,n)}function Z(t,i,n,e){const r=s(i,n),[a]=n.c;return C(t,i,a,r,e)}function A(t,s,i,n){const e=p(s,i),[r]=i.a;return C(t,s,r,e,n)}function D(t,s,i,n){const[e,r,a,h,c,o,u]=i.a;return 0===o||0===u?(t.push([...e]),t):new k(s,i).densify(t,n)}function R(t,s,i,n){return r(i)?(t.push([...i]),t):a(i)?_(t,s,i,n):h(i)?Z(t,s,i,n):c(i)?A(t,s,i,n):D(t,s,i,n)}function y(t,s={}){if(!i(t))return t;const r=M(s),a=n(t),h=[];for(const i of a){const t=[];for(let s=0;s<i.length-1;s++){const n=s+1,a=[...e(i[s])];0===s&&t.push(a);R(t,a,i[n],r)}h.push(t)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:h,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:h,spatialReference:t.spatialReference}}function j(t,s,p){if(!i(t))return t;const l=new Set(s),d=M(p),m=n(t),S=[];let E=!1;for(const i of m){const t=[];for(let s=0;s<i.length-1;s++){const n=s+1,p=[...e(i[s])];0===s&&t.push(p);const m=i[n];r(m)?t.push([...m]):a(m)&&!l.has("esriGeometryBezier3Curve")?_(t,p,m,d):h(m)&&!l.has("esriGeometryCircularArc")?Z(t,p,m,d):c(m)&&!l.has("esriGeometryEllipticArc")?A(t,p,m,d):o(m)&&!l.has("esriGeometryEllipticArc")?D(t,p,m,d):(t.push(u(m)),E=!0)}S.push(t)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...E?{curvePaths:S}:{paths:S}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...E?{curveRings:S}:{rings:S}}}export{y as densifyCurvedGeometry,j as selectiveDensifyCurvedGeometry};
|