@arcgis/core 4.33.0-next.20250429 → 4.33.0-next.20250430
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analysis/AreaMeasurementAnalysis.js +1 -1
- package/applications/Components/baUtils.js +5 -0
- package/assets/components/assets/icon/mosaicMethodBlend16.json +1 -1
- package/assets/components/assets/icon/mosaicMethodBlend24.json +1 -1
- package/assets/components/assets/icon/mosaicMethodBlend32.json +1 -1
- package/assets/components/assets/icon/mosaicMethodNorthWest32.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9a1c058d3ecd1db0e996.js → 0c338364cb55afdbd580.js} +1 -1
- package/assets/esri/core/workers/chunks/{4351b3e54b309935faed.js → 173737c60fa54f7d82bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{90dc783a617ff053e862.js → 181ad3cee0b30a72e7c7.js} +1 -1
- package/assets/esri/core/workers/chunks/210e057fe5e66abea984.js +1 -0
- package/assets/esri/core/workers/chunks/{9850ff14bd9c7da81c65.js → 23c76963481e38f39653.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1473d15c75fc560ea4a.js → 2ad47c0ba1680f7d5e03.js} +1 -1
- package/assets/esri/core/workers/chunks/2c3920ad82b9d86c3f05.js +1 -0
- package/assets/esri/core/workers/chunks/{4da99f058cca83937e9b.js → 2c92f6f268aa2de5432c.js} +1 -1
- package/assets/esri/core/workers/chunks/{12c9dd3932218238033b.js → 3a205f87f100832ef9f5.js} +1 -1
- package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{2fd5b48976cefe7cc0ab.js → 581180668e0229dcdc14.js} +1 -1
- package/assets/esri/core/workers/chunks/5c2299f22a69e58cc4dd.js +1 -0
- package/assets/esri/core/workers/chunks/60eb6dd09080da5653a1.js +1 -0
- package/assets/esri/core/workers/chunks/6210346dc9d064ac90af.js +1 -0
- package/assets/esri/core/workers/chunks/{3cf001abca8ad933bccf.js → 670a66617249f2d15a62.js} +2 -2
- package/assets/esri/core/workers/chunks/{3cf001abca8ad933bccf.js.LICENSE.txt → 670a66617249f2d15a62.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/710e03feaa25e357f17a.js +1 -0
- package/assets/esri/core/workers/chunks/{a6de903f22f76d875005.js → 7496c4c33c2d8f60a434.js} +1 -1
- package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +2 -0
- package/assets/esri/core/workers/chunks/{30551c1d3e4fa7be86c1.js.LICENSE.txt → 7b4523ab392966624d97.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{50ffb2620cdbcfd75723.js → 81b3351ea9627bb631d4.js} +1 -1
- package/assets/esri/core/workers/chunks/84d7ed2cf5fe23a0888f.js +1 -0
- package/assets/esri/core/workers/chunks/84f972d7851d982701a0.js +319 -0
- package/assets/esri/core/workers/chunks/{f52e597dca4b32a81881.js → 867c6c5b2ee1db977c99.js} +1 -1
- package/assets/esri/core/workers/chunks/{c5d786166a5609b85276.js → 8a87c181b85d0b86b9bb.js} +2 -2
- package/assets/esri/core/workers/chunks/{c5d786166a5609b85276.js.LICENSE.txt → 8a87c181b85d0b86b9bb.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{a0c51c4c30a5f749dfc6.js → 8bf2e2fe5e3e8b4a1fa0.js} +1 -1
- package/assets/esri/core/workers/chunks/{213adc87c843d627c5d6.js → 8f2e0277c66247bd40b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{a600194cfe26aedc21dd.js → 9d32f41f8f69b8a507c3.js} +1 -1
- package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{899f197556b6ced6eddf.js → ad9b4e0164706c53b872.js} +2 -2
- package/assets/esri/core/workers/chunks/{1a6d2d090b643a87408a.js → b780c7062b1b18a5ae19.js} +1 -1
- package/assets/esri/core/workers/chunks/{72097a8247101018dcdf.js → ba4aafa8dfa76006c3e7.js} +1 -1
- package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +2 -0
- package/assets/esri/core/workers/chunks/{e524462c63834fae7e01.js.LICENSE.txt → c2594024d72133d3ed7b.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{5a821b7bf58eebb9062c.js → c607d618b64d3accecc4.js} +1 -1
- package/assets/esri/core/workers/chunks/c819535525e9a27bae1f.js +39 -0
- package/assets/esri/core/workers/chunks/{c3033f148213c960b906.js → cb25b45a6b385e60c68d.js} +307 -309
- package/assets/esri/core/workers/chunks/{577f24923fa4d08360e4.js → ce9de24cb96b56d20562.js} +2 -2
- package/assets/esri/core/workers/chunks/{577f24923fa4d08360e4.js.LICENSE.txt → ce9de24cb96b56d20562.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d30fae6233d3426615ed.js +1 -0
- package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{28317c8d7fa2eeeaf997.js → d92ea6b0674f34206ab6.js} +1 -1
- package/assets/esri/core/workers/chunks/{345993291540433d3d92.js → e93222c65bd28203ddf7.js} +1 -1
- package/assets/esri/themes/base/widgets/_SelectionList.scss +5 -17
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/BloomBlur.glsl.js +1 -1
- package/chunks/BloomComposition.glsl.js +2 -2
- package/chunks/ChapmanAtmosphere.glsl.js +1 -1
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +33 -33
- package/chunks/DefaultMaterial.glsl.js +22 -22
- package/chunks/Fog.glsl.js +3 -3
- package/chunks/Haze.glsl.js +1 -1
- package/chunks/Path.glsl.js +22 -18
- package/chunks/RealisticTree.glsl.js +9 -9
- package/chunks/RibbonLine.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +5 -5
- package/chunks/ShadowHighlight.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Viewshed.glsl.js +1 -1
- package/geometry/support/PolylineBuilder.js +1 -1
- package/geometry/support/curves/bezierCurveUtils.js +5 -0
- package/geometry/support/curves/circleUtils.js +5 -0
- package/geometry/support/curves/circularArcUtils.js +5 -0
- package/geometry/support/curves/closestPointOnCurve.js +5 -0
- package/geometry/support/curves/curveUtils.js +5 -0
- package/geometry/support/curves/densifyCurvedGeometry.js +5 -0
- package/geometry/support/curves/ellipticArc4Utils.js +5 -0
- package/geometry/support/curves/ellipticArc7Utils.js +5 -0
- package/geometry/support/curves/mathUtils.js +5 -0
- package/geometry/support/curves/splitCurveAtPoint.js +5 -0
- package/interfaces.d.ts +452 -17
- package/layers/VideoLayer.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +5 -0
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +5 -0
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +5 -0
- package/rest/knowledgeGraph/wasmInterface/wasmUtils.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/effects/EffectSuppress.js +5 -0
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/pipeline/FeatureProcessingContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/ObjectSymbolLayerRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/Point3DSymbolRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/SimpleFeatureRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/UniqueValueFeatureRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/factoryUtils.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/AnalyticalSkyModel.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +15 -15
- package/views/3d/webgl-engine/core/shaderLibrary/shading/FoamRendering.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +27 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +28 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +12 -0
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +9 -9
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +2 -20
- package/views/VideoView.js +1 -1
- package/webscene/support/FeatureReference.d.ts +4 -0
- package/webscene/support/FeatureReference.js +5 -0
- package/webscene/support/FeatureReferenceGlobalId.d.ts +4 -0
- package/webscene/support/FeatureReferenceGlobalId.js +5 -0
- package/webscene/support/FeatureReferenceId.d.ts +4 -0
- package/webscene/support/FeatureReferenceId.js +5 -0
- package/webscene/support/FeatureReferenceObjectId.d.ts +4 -0
- package/webscene/support/FeatureReferenceObjectId.js +5 -0
- package/webscene/support/LayerReference.d.ts +4 -0
- package/webscene/support/LayerReference.js +5 -0
- package/webscene/support/SlideElements.js +1 -1
- package/webscene/support/SlidePopupInfo.d.ts +4 -0
- package/webscene/support/SlidePopupInfo.js +5 -0
- package/webscene/support/featureReferenceUtils.js +5 -0
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/TableList/ListItemPanel.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/2e3019ce49e972a815ca.js +0 -1
- package/assets/esri/core/workers/chunks/30551c1d3e4fa7be86c1.js +0 -2
- package/assets/esri/core/workers/chunks/3293b4041c222299428f.js +0 -1
- package/assets/esri/core/workers/chunks/626ba3a7dee952308566.js +0 -1
- package/assets/esri/core/workers/chunks/97eedd6b90c6a9c67947.js +0 -1
- package/assets/esri/core/workers/chunks/b1e420cb425a3625170e.js +0 -319
- package/assets/esri/core/workers/chunks/bf4947fe446dcb477031.js +0 -1
- package/assets/esri/core/workers/chunks/cd2927b922444880566d.js +0 -1
- package/assets/esri/core/workers/chunks/d3a74087e076a3ae76ca.js +0 -1
- package/assets/esri/core/workers/chunks/def182fff5a0244b1c2c.js +0 -1
- package/assets/esri/core/workers/chunks/e524462c63834fae7e01.js +0 -2
- package/assets/esri/core/workers/chunks/e64e0c3240f8e577a61c.js +0 -39
- package/geometry/support/curveUtils.js +0 -5
- package/geometry/support/densifyUtils.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/Factory.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.js +0 -38
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.js +0 -35
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +0 -5
- package/widgets/support/InteractiveAnalysisViewModel.js +0 -5
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as g}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as v,addAmbientBoostFactor as b,addLightingGlobalFactor as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as
|
|
5
|
+
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as g}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as v,addAmbientBoostFactor as b,addLightingGlobalFactor as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as p,addMainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PBRMode as f,PhysicallyBasedRenderingParameters as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as y,ReadShadowMapDraw as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as M}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as P,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as F,If as $}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as N}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as I}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as T}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as V}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as B}from"../webscene/support/AlphaCutoff.js";function R(R){const _=new V,{attributes:z,vertex:k,fragment:G,varyings:U}=_,{output:W,offsetBackfaces:H,instancedColor:q,pbrMode:J,snowCover:K,spherical:Q,hasBloom:X}=R,Y=J===f.Normal||J===f.Schematic;if(P(k,R),z.add(I.POSITION,"vec3"),U.add("vpos","vec3",{invariant:!0}),_.include(j,R),_.include(l,R),_.include(c,R),_.include(L,R),r(W)&&(S(_.vertex,R),_.include(t,R),_.include(a,R),H&&_.include(o),q&&_.attributes.add(I.INSTANCECOLOR,"vec4"),U.add("vNormalWorld","vec3"),U.add("localvpos","vec3",{invariant:!0}),_.include(n,R),_.include(e,R),_.include(s,R),_.include(d,R),k.uniforms.add(new E("externalColor",(e=>e.externalColor))),U.add("vcolorExt","vec4"),k.main.add(F`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
vcolorExt = externalColor;
|
|
8
|
-
${
|
|
8
|
+
${$(q,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
9
9
|
vcolorExt *= vvColor();
|
|
10
10
|
vcolorExt *= getSymbolColor();
|
|
11
11
|
forwardColorMixMode();
|
|
@@ -23,12 +23,12 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
23
23
|
forwardTextureCoordinates();
|
|
24
24
|
|
|
25
25
|
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
26
|
-
${
|
|
27
|
-
`)),r(W)){const{hasColorTexture:e,hasColorTextureTransform:o,receiveShadows:r}=R;_.include(v,R),
|
|
26
|
+
${$(H,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
27
|
+
`)),r(W)){const{hasColorTexture:e,hasColorTextureTransform:o,receiveShadows:r}=R;_.include(v,R),G.include(m,R),_.include(O,R),_.include(R.instancedDoublePrecision?y:C,R),G.include(i,R),_.include(T,R),S(G,R),p(G),b(G),w(G),G.uniforms.add(k.uniforms.get("localOrigin"),k.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))),e&&G.uniforms.add(new N("tex",(e=>e.texture))),_.include(x,R),G.include(u,R),G.include(M),h(G),G.main.add(F`
|
|
28
28
|
discardBySlice(vpos);
|
|
29
29
|
discardByTerrainDepth();
|
|
30
30
|
vec4 texColor = ${e?`texture(tex, ${o?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
31
|
-
${
|
|
31
|
+
${$(e,`${$(R.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
32
32
|
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
33
33
|
applyPBRFactors();
|
|
34
34
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
@@ -41,7 +41,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
41
41
|
${R.hasVertexColors?F`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
42
42
|
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:F`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
|
|
43
43
|
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
|
|
44
|
-
${
|
|
44
|
+
${$(K,"albedo = mix(albedo, vec3(1), 0.9);")}
|
|
45
45
|
${F`vec3 shadingNormal = normalize(vNormalWorld);
|
|
46
46
|
albedo *= 1.2;
|
|
47
47
|
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
@@ -50,10 +50,10 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
50
50
|
float treeRadialFalloff = vColor.r;
|
|
51
51
|
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
52
52
|
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
53
|
-
${
|
|
53
|
+
${$(Y,`vec3 normalGround = ${Q?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
|
|
54
54
|
${Y?F`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
55
|
-
${
|
|
55
|
+
${$(K,F`mrr = applySnowToMRR(mrr, 1.0)`)}
|
|
56
56
|
vec4 emission = ${K||X?"vec4(0.0)":"getEmissions(albedo)"};
|
|
57
57
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:F`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
58
58
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
59
|
-
outputColorHighlightOID(finalColor, vpos, albedo);`)}return _.include(g,R),_}const _=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));export{_ as R,R as b};
|
|
59
|
+
outputColorHighlightOID(finalColor, vpos, albedo ${$(K,", 1.0")});`)}return _.include(g,R),_}const _=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));export{_ as R,R 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/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as r,computePixelSize as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as p,addPixelRatio as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as D}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{VertexAttribute as u}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{LineMarkerSpace as x}from"../views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js";import{outputColorHighlightOID as L}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{CapType as w}from"../views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as y}from"../webscene/support/AlphaCutoff.js";const j=1;function P(P){const C=new b,{attributes:F,varyings:A,vertex:R,fragment:z}=C,{applyMarkerOffset:T,draped:V,output:W,capType:E,stippleEnabled:O,falloffEnabled:M,roundJoins:N,wireframe:_,innerColorEnabled:I}=P;
|
|
5
|
+
import{ShaderOutput as e}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as r,computePixelSize as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as p,addPixelRatio as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as D}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{VertexAttribute as u}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{LineMarkerSpace as x}from"../views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js";import{outputColorHighlightOID as L}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{CapType as w}from"../views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js";import{ShaderBuilder as b}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as y}from"../webscene/support/AlphaCutoff.js";const j=1;function P(P){const C=new b,{attributes:F,varyings:A,vertex:R,fragment:z}=C,{applyMarkerOffset:T,draped:V,output:W,capType:E,stippleEnabled:O,falloffEnabled:M,roundJoins:N,wireframe:_,innerColorEnabled:I}=P;z.include(s),C.include(n,P),C.include(r,P),C.include(t,P),C.include(l,P);const k=T&&!V;k&&(R.uniforms.add(new h("markerScale",(e=>e.markerScale))),C.include(a,{space:x.World})),p(R,P),R.uniforms.add(new S("inverseProjectionMatrix",(e=>e.camera.inverseProjectionMatrix)),new m("nearFar",(e=>e.camera.nearFar)),new h("miterLimit",(e=>"miter"!==e.join?0:e.miterLimit)),new v("viewport",(e=>e.camera.fullViewport))),R.constants.add("LARGE_HALF_FLOAT","float",65500),F.add(u.POSITION,"vec3"),F.add(u.PREVIOUSDELTA,"vec4"),F.add(u.NEXTDELTA,"vec4"),F.add(u.LINEPARAMETERS,"vec2"),F.add(u.U0,"float"),A.add("vColor","vec4"),A.add("vpos","vec3",{invariant:!0}),A.add("vLineDistance","float"),A.add("vLineWidth","float");const U=O;U&&A.add("vLineSizeInv","float");const B=E===w.ROUND,$=O&&B,H=M||$;H&&A.add("vLineDistanceNorm","float"),B&&(A.add("vSegmentSDF","float"),A.add("vReverseSegmentSDF","float")),R.code.add(D`vec2 perpendicular(vec2 v) {
|
|
6
6
|
return vec2(v.y, -v.x);
|
|
7
7
|
}
|
|
8
8
|
float interp(float ncp, vec4 a, vec4 b) {
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{calculateUVZShadowFromDepthPass as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.js";import{ReadShadowMapPass as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ReadShadowMapConfiguration as r}from"../views/3d/webgl-engine/shaders/ReadShadowMapConfiguration.js";import{ShadowCastAccumulateIndex as
|
|
6
|
-
sampleCount = ${
|
|
5
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{calculateUVZShadowFromDepthPass as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import{ReadShadowMapPass as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ReadShadowMapConfiguration as r}from"../views/3d/webgl-engine/shaders/ReadShadowMapConfiguration.js";import{ShadowCastAccumulateIndex as t}from"../views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";const i=255,l=1/i;function u(r){const i=new n,{fragment:u}=i;i.include(e),i.include(a),i.include(o,w),u.uniforms.add(new d("shadowMap",(e=>e.shadowMap.depthTexture)),new d("depthMap",(e=>e.depth?.attachment))),u.constants.add("sampleValue","float",l);const h=r.index===t.CONTEXT?"vec2":"float";return i.outputs.add("sampleCount",h),u.main.add(s`
|
|
6
|
+
sampleCount = ${h}(0.0);
|
|
7
7
|
|
|
8
|
-
vec3 uvzShadow = calculateUVZShadowFromDepth(uv, shadowMap, depthMap);
|
|
8
|
+
vec3 uvzShadow = calculateUVZShadowFromDepth(uv, textureSize(shadowMap,0), depthMap);
|
|
9
9
|
if (uvzShadow.z < 0.0) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
bool shadow = posIsInShadowF(uvzShadow, shadowMap);
|
|
14
14
|
if (shadow) {
|
|
15
|
-
sampleCount = ${
|
|
15
|
+
sampleCount = ${h}(sampleValue); // Add 1 to the sample count
|
|
16
16
|
}
|
|
17
|
-
`),i}const
|
|
17
|
+
`),i}const w=new r,h=Object.freeze(Object.defineProperty({__proto__:null,ShadowCastMaxSamples:i,build:u},Symbol.toStringTag,{value:"Module"}));export{i as S,h as a,u 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/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{n as e,t as i}from"./vec32.js";import{create as o}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{NormalFromDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js";import{ScreenSpacePass as
|
|
5
|
+
import{n as e,t as i}from"./vec32.js";import{create as o}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{NormalFromDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{calculateUVZShadowFromDepthPass as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import{ReadShadowMapPass as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{RgbaFloatEncoding as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{Float3BindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as d}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DUintPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{SnapshotSlot as w}from"../views/3d/webgl-engine/lib/ShadowMap.js";import{ReadShadowMapConfiguration as m}from"../views/3d/webgl-engine/shaders/ReadShadowMapConfiguration.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";const f=.025;function v(){const o=new p;o.include(a),o.include(l,x),o.include(t),o.include(r);const m=o.fragment;return m.include(h),m.uniforms.add(new c("shadowMapExcludingHighlight",(e=>e.shadowMap.getSnapshot(w.ExcludeHighlight))),new c("shadowMapHighlight",(e=>e.shadowMap.getSnapshot(w.Highlight))),new c("depthMap",(e=>e.depth?.attachment)),new u("highlightTexture",(e=>e.highlightTexture)),new g("uColor",(e=>e.shadowColor)),new s("opacity",(e=>e.shadowOpacity)),new s("occludedOpacity",(e=>e.occludedShadowOpacity)),new s("terminationFactor",(e=>e.opacityElevation*e.dayNightTerminator)),new n("lightingMainDirectionView",(({lighting:o,camera:r})=>e(b,i(b,o.mainLight.direction,r.viewInverseTransposeMatrix))))),m.main.add(d`
|
|
6
6
|
ivec2 highlightTextureSize = textureSize(highlightTexture, 0);
|
|
7
7
|
ivec2 highlightIUV = ivec2(uv * vec2(highlightTextureSize));
|
|
8
8
|
uvec2 highlightInfo = texelFetch(highlightTexture, highlightIUV, 0).rg;
|
|
@@ -18,7 +18,7 @@ import{n as e,t as i}from"./vec32.js";import{create as o}from"../core/libs/gl-ma
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
vec4 currentPixelPos;
|
|
21
|
-
vec3 uvzShadow = calculateUVZShadowAndPixelPosFromDepth(uv, shadowMapHighlight, depthMap, currentPixelPos);
|
|
21
|
+
vec3 uvzShadow = calculateUVZShadowAndPixelPosFromDepth(uv, textureSize(shadowMapHighlight,0), depthMap, currentPixelPos);
|
|
22
22
|
if (uvzShadow.z < 0.0) {
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
@@ -35,4 +35,4 @@ import{n as e,t as i}from"./vec32.js";import{create as o}from"../core/libs/gl-ma
|
|
|
35
35
|
|
|
36
36
|
float fragOpacity = (shadowDefault || shaded) ? occludedOpacity : opacity;
|
|
37
37
|
fragColor = vec4(uColor.rgb, uColor.a * fragOpacity * terminationFactor);
|
|
38
|
-
`),o}const b=o(),x=new m,
|
|
38
|
+
`),o}const b=o(),x=new m,S=Object.freeze(Object.defineProperty({__proto__:null,build:v},Symbol.toStringTag,{value:"Module"}));export{S,v as b};
|
package/chunks/Terrain.glsl.js
CHANGED
|
@@ -22,7 +22,7 @@ return normalize(n);
|
|
|
22
22
|
screenSizeDistanceToCamera = length(viewPos);
|
|
23
23
|
vec3 viewSpaceNormal = (viewNormal * vec4(normalize(positionWorld), 1.0)).xyz;
|
|
24
24
|
screenSizeCosAngle = abs(viewSpaceNormal.z);`)}
|
|
25
|
-
${V(n,"forwardLinearDepth();")}`),
|
|
25
|
+
${V(n,"forwardLinearDepth();")}`),E.include(m,r),i.include(C,r),E.include(b,r),i.include(T,r),D(E,r),y(E),x(E),E.uniforms.add(k.uniforms.get("localOrigin"),new A("viewDirection",(({camera:e})=>o(G,a(G,e.viewMatrix[12],e.viewMatrix[13],e.viewMatrix[14]))))),t&&E.uniforms.add(new B("ovWaterTex",(e=>e.overlay?.getTexture(l.WaterNormal))),new _("view",(({origin:r},{camera:o})=>e(q,o.viewMatrix,r))));const s=.2;E.code.add(F`float lum(vec3 c) {
|
|
26
26
|
return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
|
|
27
27
|
}`),O(E),j(E),E.main.add(F`
|
|
28
28
|
vec3 normal = normalize(vnormal);
|
package/chunks/Viewshed.glsl.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{invertOrIdentity as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{PiUtils as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{LocalFromScreenSpacePassParameters as a,localFromScreenSpace as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js";import{Rgba4FloatEncoding as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloat16Encoding.glsl.js";import{TextureAtlasLookup as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/TextureAtlasLookup.glsl.js";import{Float2PassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as f}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Matrix4BindUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Matrix4sPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js";import{Texture2DBindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as V}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";class b extends a{constructor(){super(...arguments),this.shadowMap={depthTexture:null,nearFar:[1,100],numActiveFaces:1,atlasRegions:[[0,0,1,1]]},this.targetVector=[1,0,0],this.upVector=[0,0,1],this.fovs=[45,45],this.headingAndTilt=[0,0],this.observerOffset=[0,0,0],this.projectionMatrices=i.flat(),this.viewMatrices=i.flat(),this.volumeOffset=0}}function P(){const i=new x,o=i.fragment;return i.include(t),i.include(n),i.include(l),o.include(s),o.include(d),
|
|
5
|
+
import{invertOrIdentity as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{PiUtils as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{LocalFromScreenSpacePassParameters as a,localFromScreenSpace as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js";import{Rgba4FloatEncoding as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloat16Encoding.glsl.js";import{TextureAtlasLookup as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/TextureAtlasLookup.glsl.js";import{Float2PassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as f}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Matrix4BindUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Matrix4sPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js";import{Texture2DBindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as V}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";class b extends a{constructor(){super(...arguments),this.shadowMap={depthTexture:null,nearFar:[1,100],numActiveFaces:1,atlasRegions:[[0,0,1,1]]},this.targetVector=[1,0,0],this.upVector=[0,0,1],this.fovs=[45,45],this.headingAndTilt=[0,0],this.observerOffset=[0,0,0],this.projectionMatrices=i.flat(),this.viewMatrices=i.flat(),this.volumeOffset=0}}function P(){const i=new x,o=i.fragment;return i.include(t),i.include(n),i.include(l),o.include(s),o.include(d),o.include(r),o.uniforms.add(new u("depthTexture",(e=>e.depth?.attachment)),new p("inverseProjectionMatrix",(e=>e.camera.inverseProjectionMatrix)),new p("inverseViewNormalMatrix",(({camera:i})=>e(M,i.viewInverseTransposeMatrix))),new h("viewshedObserverOffset",(e=>e.observerOffset)),new h("viewshedTargetVector",(e=>e.targetVector)),new h("viewshedUpVector",(e=>e.upVector)),new c("viewshedFOVs",(e=>e.fovs)),new c("viewshedHeadingAndTilt",(e=>e.headingAndTilt)),new c("viewshedNearFar",(e=>e.shadowMap.nearFar??[1,100])),new v("viewshedVolumeOffset",(e=>e.volumeOffset)),new V("viewshedShadowMap",(e=>e.shadowMap.depthTexture)),new m("viewshedProjectionMatrices",(e=>e.projectionMatrices),6),new m("viewshedViewMatrices",(e=>e.viewMatrices),6),new g("viewshedNumFaces",(e=>e.shadowMap.numActiveFaces)),new w("viewshedAtlasRegions",(e=>e.shadowMap.atlasRegions.flat()),24),new V("normalMap",(e=>e.normals))),o.constants.add("visibleColor","vec4",[0,1,0,.5]),o.constants.add("occludedColor","vec4",[1,0,0,.5]),o.code.add(f`vec2 getViewshedUv(vec4 worldPosition, int face) {
|
|
6
6
|
mat4 viewshedMatrix = viewshedProjectionMatrices[face];
|
|
7
7
|
vec4 viewshedUv4 = viewshedMatrix * worldPosition;
|
|
8
8
|
vec3 viewshedUv = viewshedUv4.xyz / viewshedUv4.w;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
class t{constructor(){this._polyline=[]}beginPath(t){this._polyline.push([t])}lineTo(t){if(0===this._polyline.length)throw new Error("No path started. Call beginPath first.");this._polyline[this._polyline.length-1].push(t)}getPointCount(){return this._polyline.reduce(((t,e)=>t+e.length),0)}getXY(t){let e=0;for(const l of this._polyline){if(t<e+l.length)return l[t-e];e+=l.length}return null}getGeometry(){return this._polyline}}export{t as default};
|
|
5
|
+
class t{constructor(){this._polyline=[]}beginPath(t){this._polyline.push([t])}lineTo(t){if(0===this._polyline.length)throw new Error("No path started. Call beginPath first.");this._polyline[this._polyline.length-1].push(t)}getPointCount(){return this._polyline.reduce(((t,e)=>t+e.length),0)}addSegment(t,e,l){l&&this.beginPath(t),this.lineTo(e)}getXY(t){let e=0;for(const l of this._polyline){if(t<e+l.length)return l[t-e];e+=l.length}return null}getGeometry(){return this._polyline}}export{t as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{floatEqualRelative as t,floatEqualAbsolute as n}from"../../../core/mathUtils.js";import{interpolateSegment as o,findClosestAndFurthestCurveParametersToPoint as r}from"./mathUtils.js";const s=[0,0];function c(t,n,o,r,s){const c=1-s,e=c*c,i=s*s,u=e*c,m=3*s*e,a=3*i*c,f=i*s;return[t[0]*u+n[0]*m+o[0]*a+r[0]*f,t[1]*u+n[1]*m+o[1]*a+r[1]*f]}function e(t,n,o){const r=t,[s,e,i]=n.b;return c(r,e,i,s,o)}function i(t,n,r){const c=t,[e,i,u]=n.b,m=o([0,0],c,i,r),a=o(s,i,u,r),f=o([0,0],u,e,r),h=o([0,0],m,a,r),p=o([0,0],a,f,r);return[{b:[o([],h,p,r),m,h]},{b:[[...e],p,f]}]}function u(o,s,e){const i=o,[u,m,a]=s.b,f=r(e,[.1,.5,.9],(t=>{const n=1-t,[o,r]=c(i,m,a,u,t);return[o,r,3*n*n*(m[0]-i[0])+6*n*t*(a[0]-m[0])+3*t*t*(u[0]-a[0]),3*n*n*(m[1]-i[1])+6*n*t*(a[1]-m[1])+3*t*t*(u[1]-a[1]),6*n*(a[0]-2*m[0]+i[0])+6*t*(u[0]-2*a[0]+m[0]),6*n*(a[1]-2*m[1]+i[1])+6*t*(u[1]-2*a[1]+m[1])]})).map((t=>Math.min(1,Math.max(0,t))));f.push(0,1);let h=1/0;const p=f.map((t=>{const n=c(i,m,a,u,t),[o,r]=n,s=e[0]-o,f=e[1]-r,p=Math.sqrt(s*s+f*f);return h=Math.min(p,h),{t,curvePoint:n,distance:p}})),b=[];for(const r of p){const{t:o,distance:s}=r;t(s,h)&&!b.some((({t})=>n(t,o)))&&b.push(r)}return b}export{u as closestPointsOnBezierCurve,e as interpolateBezierCurve,c as interpolateCubicBezier,i as splitBezierCurve};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{wrapAtan2 as t,matchWindingAndWrap as s,distance2 as a}from"./mathUtils.js";const n=2*Math.PI;class h{constructor(t,s,a,n,h,c){this.cx=t,this.cy=s,this.radius=a,this.thetaStart=n,this.thetaEnd=h,this.isInvalid=c}}function c(t,s){const{cx:a,cy:n,radius:h,thetaStart:c,thetaEnd:i}=t,r=c*(1-s)+i*s;return[a+h*Math.cos(r),n+h*Math.sin(r)]}function i(h,i){const{cx:r,cy:o,thetaStart:e,thetaEnd:u}=h,[M,d]=i;let l=t(d-o,M-r);l=s(l,e,u);const m=l-e;let f=m/(u-e);if(f<0||f>1){const t=Math.abs(m)%n,s=Math.abs(l-u)%n;f=Math.min(s,n-s)<Math.min(t,n-t)?1:0}const x=c(h,f);return{t:f,curvePoint:x,distance:Math.sqrt(a(i,x))}}export{h as DerivedCircle,i as closestPointOnCircle,c as interpolateCircle};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{set as t,determinant as r}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{DerivedCircle as n,interpolateCircle as c}from"./circleUtils.js";import{interpolateSegment as i,wrapAtan2 as s}from"./mathUtils.js";const m=o();function l(o,n,c){const[i,s]=o,[l,e]=n,[a,f]=c,u=i*i+s*s,h=l*l+e*e,p=a*a+f*f;t(m,i,l,a,s,e,f,1,1,1);const j=r(m);if(0===j)return null;t(m,u,h,p,s,e,f,1,1,1);const g=r(m);t(m,u,h,p,i,l,a,1,1,1);return[g/j*.5,r(m)/j*-.5]}function e(t,r){const[o,c]=r.c,m=l(t,c,o),e=null==m,a=m??i([],t,o,.5),[f,u]=t,[h,p]=c,[j,g]=o,[x,M]=a,b=f-x,U=u-M,q=Math.sqrt(b*b+U*U),w=s(u-M,f-x),I=s(p-M,h-x);let P=s(g-M,j-x);return(I-w)*(P-I)<0&&(P+=2*Math.sign(w-P)*Math.PI),new n(x,M,q,w,P,e)}function a(t,r,o){const n=c(t,o/2),i=c(t,o),s=c(t,(o+1)/2);return[{c:[i,n]},{c:[[...r.c[0]],s]}]}export{e as deriveCircleFromCircularArc,a as splitCircularArc};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import r from"../../../core/Error.js";import{closestPointsOnBezierCurve as i}from"./bezierCurveUtils.js";import{closestPointOnCircle as t}from"./circleUtils.js";import{deriveCircleFromCircularArc as o}from"./circularArcUtils.js";import{isBezierCurve as e,isCircularArc as c,isEllipticArc as n,isEllipticArc4 as s,isEllipticArc7 as l}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as f}from"./ellipticArc4Utils.js";import{deriveEllipse as m,closestPointOnEllipse as u}from"./ellipticArc7Utils.js";function p(p,j,U){if(e(j)){const t=i(p,j,U)[0];if(null==t)throw new r("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return t}if(c(j)){const r=o(p,j);return t(r,U)}if(n(j)){if(s(j)){const r=f(p,j);return t(r,U)}if(l(j)){const r=m(p,j);return u(r,U)}}return null}export{p as closestPointOnCurve};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
function n(n){return"curveRings"in n&&!!n.curveRings?.length||"curvePaths"in n&&!!n.curvePaths?.length}function r(n){return"curveRings"in n?n.curveRings:n.curvePaths}function t(n){return"b"in n}function u(n){return"c"in n}function e(n){return Array.isArray(n)}function i(n){return"a"in n}function c(n){return 4===n.a.length}function f(n){return 7===n.a.length}function o(n){return t(n)?n.b[0]:u(n)?n.c[0]:i(n)?n.a[0]:n}function a(n){if(t(n)){const[r,t,u]=n.b;return{b:[[...r],[...t],[...u]]}}if(u(n)){const[r,t]=n.c;return{c:[[...r],[...t]]}}if(e(n))return[...n];if(c(n)){const[r,t,u,e]=n.a;return{a:[[...r],[...t],u,e]}}if(f(n)){const[r,t,u,e,i,c,f]=n.a;return{a:[[...r],[...t],u,e,i,c,f]}}return n}export{a as cloneCurve,r as getCurves,o as getEndpoint,t as isBezierCurve,u as isCircularArc,e as isCoordinate,n as isCurvedGeometry,i as isEllipticArc,c as isEllipticArc4,f as isEllipticArc7};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
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 r,isCoordinate as e,isBezierCurve as a,isCircularArc as h,isEllipticArc as c,isEllipticArc4 as o,isEllipticArc7 as u}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as p}from"./ellipticArc4Utils.js";import{deriveEllipse as d,interpolateEllipse as l}from"./ellipticArc7Utils.js";import{interpolateSegment as S,pointToSegmentDistance2 as m,distance2 as E}from"./mathUtils.js";const f={maxSegmentLength:1/0,maxDeviation:1/0,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1},v=1e-6,g=[0,0];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:r}){const e=i*i,a=s*s,h=1/n,c=this.interpolate(0),o=this.interpolate(1);E(this.curveStart,c)>v&&t.push(c),this.initialize(c,o);const u=1/r;for(let p=r-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===e||!isFinite(e)||E(this.arcStart,this.arcEnd)<e)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return E(this.curveEnd,o)>v&&t.push([...this.curveEnd]),t}}class x extends P{constructor(t,s){const[i,n,r]=s.b;super(t,i),this._controlPointsStack=[],this._curveControlPoints=[n,r],this._arcControlPoints=[n,r],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:s,arcEnd:i,tStart:n,tEnd:r}=this,[e,a]=this._arcControlPoints,h=(t-n)/(r-n),c=S([],s,e,h),o=S(g,e,a,h),u=S([],a,i,h),p=S([],c,o,h),d=S([],o,u,h),l=S([],p,d,h);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([d,u]),this.tEndStack.push(t),this.arcEndStack.push(l),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,[r,e]=this._curveControlPoints;return t(i,r,e,n,s)}getDeviation2(){const{arcStart:t,arcEnd:s}=this,[i,n]=this._arcControlPoints;return Math.max(m(i,t,s),m(n,t,s))}}class k extends P{constructor(t,s){const[i]=s.a;super(t,i),this._derivedEllipse=d(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 l(this._derivedEllipse,t)}getDeviation2(){return m(this._arcMid,this.arcStart,this.arcEnd)}}function C(t,s,i,{cx:n,cy:r,radius:e,thetaStart:a,thetaEnd:h},{maxDeviation:c,maxSegmentLength:o,maxSegmentsPerCurve:u,minSegmentsPerCurve:p}){const d=2*e,l=[n+e*Math.cos(a),r+e*Math.sin(a)],S=[n+e*Math.cos(h),r+e*Math.sin(h)];E(s,l)>v&&t.push(l);const m=Math.abs(h-a),f=o<d?2*Math.asin(o/d):m,g=c<=e?2*Math.acos(1-c/e):m,P=Math.min(f,g),x=Math.min(u,Math.max(p,Math.ceil(Math.abs(m/P)))),k=1/x;for(let E=1;E<x;E++){const s=E*k,i=a*(1-s)+h*s;t.push([n+e*Math.cos(i),r+e*Math.sin(i)])}return t.push(S),E(i,S)>v&&t.push([...i]),t}function _(t,s,i,n){return new x(s,i).densify(t,n)}function M(t,i,n,r){const e=s(i,n),[a]=n.c;return e.isInvalid?(t.push([...a]),t):C(t,i,a,e,r)}function D(t,s,i,n){const r=p(s,i),[e]=i.a;return C(t,s,e,r,n)}function A(t,s,i,n){return new k(s,i).densify(t,n)}function j(t,s,i,n){if(e(i))return t.push([...i]),t;if(a(i))return _(t,s,i,n);if(h(i))return M(t,s,i,n);if(c(i)){if(o(i))return D(t,s,i,n);if(u(i))return A(t,s,i,n)}return t}function L(t,s){if(!i(t))return t;const e=n(t),a=[];for(const i of e){const t=[];for(let n=0,e=1;e<i.length;n=e++){const a=r(i[n]);0===n&&t.push(a);j(t,a,i[e],{maxSegmentLength:s.maxSegmentLength??f.maxSegmentLength,maxDeviation:s.maxDeviation??f.maxDeviation,maxSegmentsPerCurve:s.maxSegmentsPerCurve??f.maxSegmentsPerCurve,minSegmentsPerCurve:Math.max(s.minSegmentsPerCurve??f.minSegmentsPerCurve,1)})}a.push(t)}return"curvePaths"in t?{paths:a,spatialReference:t.spatialReference}:{rings:a,spatialReference:t.spatialReference}}export{L as densifyCurvedGeometry};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{DerivedCircle as t,interpolateCircle as a}from"./circleUtils.js";import{wrapAtan2 as r,correctSweepAndWinding as n}from"./mathUtils.js";function o(a,o){const[s,c]=o.a,[h,e]=a,[i,m]=s,[M,f]=c,u=h-M,l=e-f,p=Math.sqrt(u*u+l*l),b=r(e-f,h-M),j=n(r(m-f,i-M),b,o);return new t(M,f,p,b,j,!1)}function s(t,r,n){const{cx:o,cy:s,thetaStart:c,thetaEnd:h}=t,[e,i,m,M]=r.a,f=c*(1-n)+h*n;return[{a:[a(t,n),[o,s],Math.abs(f-c)<Math.PI?1:0,M]},{a:[[...e],[o,s],Math.abs(h-f)<Math.PI?1:0,M]}]}export{o as deriveCircleFromEllipticArc4,s as splitEllipticArc4};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{cloneCurve as t}from"./curveUtils.js";import{wrapAtan2 as s,correctSweepAndWinding as n,findClosestAndFurthestCurveParametersToPoint as c,matchWindingAndWrap as o}from"./mathUtils.js";class i{constructor(t,s,n,c,o,i,r,u){this.cx=t,this.cy=s,this.a=n,this.b=c,this.cosR=o,this.sinR=i,this.u1=r,this.u2=u}}function r(t,c){const[o,r,u,a,h,e,f]=c.a,[M,m]=t,[R,b]=o,[p,l]=r,P=e*f,x=Math.cos(h),I=Math.sin(h),j=s(1/P*(m-l)*x-1/P*(M-p)*I,1/e*(m-l)*I+1/e*(M-p)*x),v=n(s(1/P*(b-l)*x-1/P*(R-p)*I,1/e*(b-l)*I+1/e*(R-p)*x),j,c);return new i(p,l,e,P,x,I,j,v)}function u(t,s){const{a:n,b:c,cosR:o,sinR:i,cx:r,cy:u}=t,a=Math.cos(s),h=Math.sin(s);return[n*a*o-c*h*i+r,n*a*i+c*h*o+u]}function a(t,s){const{u1:n,u2:c}=t;return u(t,n*(1-s)+c*s)}function h(s,n,c){if(c<0||c>1)return[];if(0===c||1===c)return[t(n)];const[o,[i,r],u,h,e,f,M]=n.a,{u1:m,u2:R}=s,b=m*(1-c)+R*c;return[{a:[[...a(s,c)],[i,r],Math.abs(b-m)<Math.PI?1:0,h,e,f,M]},{a:[[...o],[i,r],Math.abs(R-b)<Math.PI?1:0,h,e,f,M]}]}function e(t,s){const{a:n,b:i,cosR:r,sinR:a,u1:h,u2:e}=t,f=Math.PI/6,M=c(s,[1*f,2*f,4*f,5*f,7*f,8*f,10*f,11*f],(s=>{const c=Math.cos(s),o=Math.sin(s),[h,e]=u(t,s);return[h,e,-n*r*o-i*a*c,-n*a*o+i*r*c,-n*r*c+i*a*o,-n*a*c-i*r*o]})).map((t=>o(t,h,e)));M.push(h,e);let m,R,b=1/0;for(const c of M){const n=(c-h)/(e-h);if(n<0||n>1)continue;const o=u(t,c),[i,r]=o,a=s[0]-i,f=s[1]-r,M=a*a+f*f;M<b&&(m=n,R=o,b=M)}return{t:m,curvePoint:R,distance:Math.sqrt(b)}}export{i as DerivedEllipse,e as closestPointOnEllipse,r as deriveEllipse,a as interpolateEllipse,h as splitEllipticArc7};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{floatEqualAbsolute as t}from"../../../core/mathUtils.js";import{squaredDistance as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";function r(t,n,r,o){return t[0]=n[0]*(1-o)+r[0]*o,t[1]=n[1]*(1-o)+r[1]*o,t}function o(t,r){return n(t,r)}function a(t,n,r){const a=o(n,r);if(0===a)return o(n,t);const c=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return c*c/a}function c(t,n){const r=Math.atan2(t,n);return r<0?r+2*Math.PI:r}function u(n,r,o){const[a,c,u,e]=o.a,i=Math.abs(n-r),h=i>Math.PI,s=i<Math.PI,M=t(i,Math.PI);return(!M&&(h&&u||s&&!u)||M&&(n>r&&e||n<r&&!e))&&(n+=2*(Math.sign(r-n)||1)*Math.PI),n}function e(t,n,r){const o=2*Math.PI,a=t-n;return(r-n)*a<0?t-=(Math.trunc(a/o)+Math.sign(a))*o:a>=o&&(t-=Math.trunc(a/o)*o),t}function i(t,n,r,o=10){return n.map((n=>{let a=n;for(let c=0;c<o;c++){const[n,o,c,u,e,i]=r(a),h=t[0]-n,s=t[1]-o,M=-c,f=-u;a+=-(2*h*M+2*s*f)/(2*M*M+2*h*-e+2*f*f+2*s*-i||1e-6)}return a}))}export{u as correctSweepAndWinding,o as distance2,i as findClosestAndFurthestCurveParametersToPoint,r as interpolateSegment,e as matchWindingAndWrap,a as pointToSegmentDistance2,c as wrapAtan2};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{closestPointsOnBezierCurve as t,splitBezierCurve as r}from"./bezierCurveUtils.js";import{closestPointOnCircle as i}from"./circleUtils.js";import{deriveCircleFromCircularArc as n,splitCircularArc as o}from"./circularArcUtils.js";import{isBezierCurve as c,isCircularArc as s,isEllipticArc as e,isEllipticArc4 as u,cloneCurve as f}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as l,splitEllipticArc4 as m}from"./ellipticArc4Utils.js";import{deriveEllipse as p,closestPointOnEllipse as a,splitEllipticArc7 as j}from"./ellipticArc7Utils.js";const U=1e-6;function d(i,n,o,c){const s=t(i,n,o).filter((({distance:t})=>t<=c)),e=[];let u=0,f=n;for(const{t}of s){const n=(t-u)/(1-u);if(n<U||1-n<U)continue;const[o,c]=r(i,f,t);e.push(o),f=c,u=t}return e.push(f),e}function v(t,r,c,s){const e=n(t,r);if(e.isInvalid)return[f(r)];const{t:u,distance:l}=i(e,c);return l<=s?o(e,r,u):[f(r)]}function A(t,r,n,o){const c=l(t,r),{t:s,distance:e}=i(c,n);return e<=o?m(c,r,s):[f(r)]}function h(t,r,i,n){const o=p(t,r),{t:c,distance:s}=a(o,i);return s<=n?j(o,r,c):[f(r)]}function b(t,r,i,n){return c(r)?d(t,r,i,n):s(r)?v(t,r,i,n):e(r)?u(r)?A(t,r,i,n):h(t,r,i,n):[f(r)]}export{b as splitCurveAtPoint};
|