@arcgis/core 4.23.0-next.20220127 → 4.23.0-next.20220131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0463ba46df855a92b9c0.js +1 -0
- package/assets/esri/core/workers/chunks/{8001b0e514bfffe9d7f8.js → 0c15d77d8e817cf45a9a.js} +1 -1
- package/assets/esri/core/workers/chunks/{e657ba0cab29f05d02da.js → 0cd0a6eef51fc5b9ea61.js} +1 -1
- package/assets/esri/core/workers/chunks/{e4896cf85fb2da8a9cc7.js → 17de7a324dfa7f57ad5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{c36f84daa7736878418d.js → 197ec52641aed20029c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0317f37b6c8705b363fd.js → 1c733b7db092a2a88ef3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9387db408f496e7dd003.js → 214910032945dd2d86b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{d835b2a683fcd8aeeed8.js → 27474b007988855bea9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{e93dfdede0532a89ffa5.js → 2b25fc7945a187c2bb9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{5948923e07bd1662c24a.js → 37c03cfc19086ce631c6.js} +1 -1
- package/assets/esri/core/workers/chunks/44f0c3663b293afbd172.js +1 -0
- package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +1 -0
- package/assets/esri/core/workers/chunks/49a1a633bb0d93764aae.js +1 -0
- package/assets/esri/core/workers/chunks/{5f1dcb6556820cd0aa31.js → 4be35af7d6babbfe9d84.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9ff3eaf4eb324429fbd.js → 5457962a70bd3c557a75.js} +1 -1
- package/assets/esri/core/workers/chunks/56657f890e0f79f5d2ad.js +1 -0
- package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +1 -0
- package/assets/esri/core/workers/chunks/{56274b37ff74ca0d68a6.js → 5d11b97b667921d67ae7.js} +1 -1
- package/assets/esri/core/workers/chunks/{ba5eb394f098968c22d2.js → 655b55ac0cd533d7e9d7.js} +1 -1
- package/assets/esri/core/workers/chunks/70d6bb3c7112cb702389.js +1 -0
- package/assets/esri/core/workers/chunks/810a763373d7f78ae398.js +1 -0
- package/assets/esri/core/workers/chunks/918bb7a7d901544a7367.js +1 -0
- package/assets/esri/core/workers/chunks/949b2269457302ffc64b.js +1 -0
- package/assets/esri/core/workers/chunks/{601e697dc7414bda128a.js → 952980635afc7ec81804.js} +1 -1
- package/assets/esri/core/workers/chunks/{e8741bf421f80213f1d3.js → 9876a1bae350795fab36.js} +1 -1
- package/assets/esri/core/workers/chunks/99619fcb772807c74f3b.js +1 -0
- package/assets/esri/core/workers/chunks/{3f343f792fd9f44d6f25.js → b3f5e91116112b0b612a.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d77467aa71d345fc1b6.js → bcc01bbffaa3bb5f60a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c76146014dc15143ba3.js → be588873c16770ceb9ef.js} +1 -1
- package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +1 -0
- package/assets/esri/core/workers/chunks/d98dab12b71912fa397b.js +1 -0
- package/assets/esri/core/workers/chunks/{b62e3dccd9f662c0afeb.js → db3c729ce0c0b2690dc9.js} +1 -1
- package/assets/esri/core/workers/chunks/{199670a3a564ebe3bd79.js → e218bde41ffbcc5194f5.js} +1 -1
- package/assets/esri/core/workers/chunks/e21b211913aefde47e30.js +1 -0
- package/assets/esri/core/workers/chunks/{c9cbf8135e95f0f42cd9.js → e287f49184d076af17e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{bde1d5b0a7717350986e.js → e4019b63a1fe74e2c842.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e6a3c5866e8d8820457.js → eb82ff10cef2bde6e57f.js} +1 -1
- package/assets/esri/core/workers/chunks/ebc6f4764b82d4104c65.js +1 -0
- package/assets/esri/core/workers/chunks/{842db82733635dbf25cb.js → ee6e0db58dc64410e687.js} +1 -1
- package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +1 -0
- package/assets/esri/core/workers/chunks/f7150547d7e3259a0f29.js +981 -0
- package/assets/esri/core/workers/chunks/fc046a15466c25d081ff.js +1 -0
- package/assets/esri/images/portal/mediaservice16.png +0 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/widgets/Directions/t9n/Directions.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
- package/chunks/BlendLayers.glsl.js +2 -2
- package/chunks/ChapmanAtmosphere.glsl.js +17 -17
- package/chunks/CheckerBoard.glsl.js +3 -3
- package/chunks/Clouds.glsl.js +2 -2
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +12 -12
- package/chunks/ComponentShader.glsl.js +3 -3
- package/chunks/Compositing.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +33 -33
- package/chunks/EdgeShaderProgram.glsl.js +7 -7
- package/chunks/Fog.glsl.js +10 -12
- package/chunks/HUDMaterial.glsl.js +2 -2
- package/chunks/HighlightComposition.glsl.js +5 -5
- package/chunks/ImageMaterial.glsl.js +6 -6
- package/chunks/LaserlinePath.glsl.js +8 -8
- package/chunks/LineCallout.glsl.js +6 -6
- package/chunks/MeasurementArrow.glsl.js +1 -1
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/Path.glsl.js +5 -5
- package/chunks/Pattern.glsl.js +9 -9
- package/chunks/PointRenderer.glsl.js +14 -14
- package/chunks/Precipitation.glsl.js +2 -2
- package/chunks/RealisticTree.glsl.js +21 -21
- package/chunks/RibbonLine.glsl.js +11 -11
- package/chunks/SMAA.glsl.js +40 -40
- package/chunks/ShadedColorMaterial.glsl.js +12 -12
- package/chunks/ShadowCast.glsl.js +6 -6
- package/chunks/ShadowHighlight.glsl.js +4 -4
- package/chunks/SimpleAtmosphere.glsl.js +3 -3
- package/chunks/SlicePlaneMaterial.glsl.js +3 -3
- package/chunks/Stars.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +11 -11
- package/chunks/TextureOnly.glsl.js +2 -2
- package/chunks/WaterSurface.glsl.js +5 -5
- package/chunks/boundedPlane.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/loadAll.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +653 -55
- package/layers/RouteLayer.d.ts +4 -0
- package/layers/RouteLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LayerContingentValuesCache.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/rest/support/DirectionLine.d.ts +4 -0
- package/rest/support/DirectionPoint.d.ts +4 -0
- package/rest/support/RouteInfo.d.ts +4 -0
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/RouteSolveResult.d.ts +4 -0
- package/smartMapping/statistics/support/predominanceUtils.d.ts +4 -0
- package/support/revision.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DIconOutline.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/symbols/support/Thumbnail.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/views/2d/engine/vectorTiles/SchemaHelper.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/Fog.glsl.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.js +1 -1
- package/views/3d/environment/PanoramicAtmosphere.js +1 -1
- package/views/3d/environment/Precipitation.glsl.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/environment/Stars.glsl.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/symbolComplexity.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/I3SCrossfadeHelper.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +5 -0
- package/views/3d/layers/support/overlayImageUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/LaserlinePathData.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +12 -12
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +16 -16
- package/views/3d/webgl-engine/core/shaderLibrary/default/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +10 -10
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/HighlightHelper.js +1 -1
- package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowHighlightHelper.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureUniformName.js +4 -0
- package/views/3d/webgl-engine/lib/UniformName.js +4 -0
- package/views/3d/webgl-engine/lib/VertexAttribute.js +5 -0
- package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/VisualVariableMaterialParameters.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/internal/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/internal/waterMaterialUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SMAA.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +10 -10
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardShortEdges.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShaderProgram.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +21 -21
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +6 -6
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +13 -13
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +6 -6
- package/views/SceneView.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/support/WatchUpdatingTracking.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/InstanceCounter.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/webdoc/support/{Thumbnail.js → SlideThumbnail.js} +1 -1
- package/webmap/Bookmark.js +1 -1
- package/webmap/Version.js +1 -1
- package/webscene/Slide.js +1 -1
- package/webscene/Version.js +1 -1
- package/webscene/support/SlideVisibleLayer.js +1 -1
- package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions/support/directionsUtils.js +1 -1
- package/widgets/Directions/support/resources.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/assets/esri/core/workers/chunks/12c0cabb6c59e65d8546.js +0 -1
- package/assets/esri/core/workers/chunks/322d917e8cb398816a93.js +0 -1
- package/assets/esri/core/workers/chunks/392b6382e06652dd4c80.js +0 -1
- package/assets/esri/core/workers/chunks/3aa73119b055e05bbbeb.js +0 -1
- package/assets/esri/core/workers/chunks/52ea678ba1da0e349919.js +0 -1
- package/assets/esri/core/workers/chunks/5ee497d5d7b0e580526a.js +0 -1
- package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +0 -1
- package/assets/esri/core/workers/chunks/83b8fec1650e061aaa56.js +0 -1
- package/assets/esri/core/workers/chunks/9796d54ff12b6429164a.js +0 -1
- package/assets/esri/core/workers/chunks/c093dff4592832ac0973.js +0 -1
- package/assets/esri/core/workers/chunks/d07440469fe7d181c4fd.js +0 -1
- package/assets/esri/core/workers/chunks/dbf192b4ce7e608610f6.js +0 -1
- package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +0 -981
- package/assets/esri/core/workers/chunks/dee9929d95e9fe26929c.js +0 -1
- package/assets/esri/core/workers/chunks/e12d91ef44d6f879a02a.js +0 -1
- package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +0 -1
- package/assets/esri/core/workers/chunks/fc7e31d87555beb63291.js +0 -1
- package/assets/esri/core/workers/chunks/fff6b0338f06dad0c45d.js +0 -1
- package/widgets/Directions/support/CostSummary.js +0 -5
- package/widgets/Directions/support/RouteSection.js +0 -5
- package/widgets/Directions/support/RouteSections.js +0 -5
- package/widgets/Directions/support/maneuverUtils.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{isSome as r}from"../../../../core/maybe.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{c as s}from"../../../../chunks/vec2.js";import{s as a,f as n,d as o,a as l,b as c,g as u,l as p,i as h,m}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{PlaneIndex as T}from"../../../../geometry/support/frustum.js";import{create as d,distance2 as E,fromPoints as A,closestLineSegmentPoint as _}from"../../../../geometry/support/lineSegment.js";import{create as v,fromPoints as R,signedDistance as O,normal as I}from"../../../../geometry/support/plane.js";import{newLayout as S}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as g}from"../core/shaderLibrary/ShaderOutputOptions.js";import{VertexAttribute as b}from"../lib/basicInterfaces.js";import{computeAttachmentOriginLines as C}from"../lib/geometryDataUtils.js";import L from"../lib/GLMaterial.js";import{outputFromPass as N}from"../lib/GLMaterials.js";import{materialParametersDefaults as P,Material as y,RenderOccludedFlag as D}from"../lib/Material.js";import{RenderSlot as q}from"../lib/RenderSlot.js";import{isTranslationMatrix as U}from"../lib/Util.js";import j from"./VisualVariableMaterialParameters.js";import{isInstanceHidden as F}from"./renderers/utils.js";import{C as x,N as M}from"../../../../chunks/RibbonLine.glsl.js";import{ribbonVertexAttributeLocations as w,RibbonLineTechniqueConfiguration as G,RibbonLineTechnique as J}from"../shaders/RibbonLineTechnique.js";const H=e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial");var z;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(z||(z={}));class B extends y{constructor(e){super(e,Z),this._vertexAttributeLocations=w,this.techniqueConfig=new G,this.layout=this.createLayout()}isClosed(e,t){return Y(this.parameters,e,t)}dispose(){}getPassParameters(){return this.parameters}getTechniqueConfig(e,t){this.techniqueConfig.output=e,this.techniqueConfig.draped=t.slot===q.DRAPED_MATERIAL;const i=r(this.parameters.stipplePattern);return this.techniqueConfig.stippleEnabled=i,this.techniqueConfig.stippleOffColorEnabled=i&&r(this.parameters.stippleOffColor),this.techniqueConfig.stippleScaleWithLineWidth=i&&this.parameters.stippleScaleWithLineWidth,this.techniqueConfig.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.roundJoins="round"===this.parameters.join,this.techniqueConfig.capType=this.parameters.cap,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.innerColorEnabled=this.parameters.innerWidth>0&&r(this.parameters.innerColor),this.techniqueConfig.falloffEnabled=this.parameters.falloff>0,this.techniqueConfig.occluder=this.parameters.renderOccluded===D.OccludeAndTransparentStencil,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig.wireframe=this.parameters.wireframe,this.techniqueConfig}intersect(e,t,i,s,a,n,o,l,c){r(c)?this._intersectDrapedLineGeometry(e,s,c,n,o):this._intersectLineGeometry(e,t,i,s,o)}_intersectDrapedLineGeometry(e,r,i,s,a){if(!r.options.selectionMode)return;const n=e.vertexAttributes.get(b.POSITION).data,o=e.vertexAttributes.get(b.SIZE);let l=this.parameters.width;if(this.parameters.vvSizeEnabled){const r=e.vertexAttributes.get(b.SIZEFEATUREATTRIBUTE).data[0];l*=t(this.parameters.vvSizeOffset[0]+r*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else o&&(l*=o.data[0]);const c=s[0],u=s[1],p=(l/2+4)*e.screenToWorldRatio;let h=Number.MAX_VALUE,m=0;for(let f=0;f<n.length-5;f+=3){const e=n[f],r=n[f+1],i=c-e,s=u-r,a=n[f+3]-e,o=n[f+4]-r,l=t((a*i+o*s)/(a*a+o*o),0,1),p=a*l-i,T=o*l-s,d=p*p+T*T;d<h&&(h=d,m=f/3)}h<p*p&&a(i.dist,i.normal,m,!1)}_intersectLineGeometry(e,r,i,m,f){if(!m.options.selectionMode||F(r))return;if(!U(i))return void H.error("intersection assumes a translation-only matrix");const d=e.vertexAttributes,v=d.get(b.POSITION).data;let S=this.parameters.width;if(this.parameters.vvSizeEnabled){const e=d.get(b.SIZEFEATUREATTRIBUTE).data[0];S*=t(this.parameters.vvSizeOffset[0]+e*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else d.has(b.SIZE)&&(S*=d.get(b.SIZE).data[0]);const g=m.camera,C=te;s(C,m.point);const L=S*g.pixelRatio/2+4*g.pixelRatio;a(pe[0],C[0]-L,C[1]+L,0),a(pe[1],C[0]+L,C[1]+L,0),a(pe[2],C[0]+L,C[1]-L,0),a(pe[3],C[0]-L,C[1]-L,0);for(let t=0;t<4;t++)if(!g.unprojectFromRenderScreen(pe[t],he[t]))return;R(g.eye,he[0],he[1],me),R(g.eye,he[1],he[2],fe),R(g.eye,he[2],he[3],Te),R(g.eye,he[3],he[0],de);let N=Number.MAX_VALUE,P=0;const y=X(this.parameters,d,e.indices)?v.length-2:v.length-5;for(let t=0;t<y;t+=3){Q[0]=v[t]+i[12],Q[1]=v[t+1]+i[13],Q[2]=v[t+2]+i[14];const e=(t+3)%v.length;if(K[0]=v[e]+i[12],K[1]=v[e+1]+i[13],K[2]=v[e+2]+i[14],O(me,Q)<0&&O(me,K)<0||O(fe,Q)<0&&O(fe,K)<0||O(Te,Q)<0&&O(Te,K)<0||O(de,Q)<0&&O(de,K)<0)continue;if(g.projectToRenderScreen(Q,re),g.projectToRenderScreen(K,ie),re[2]<0&&ie[2]>0){n($,Q,K);const e=g.frustum,t=-O(e[T.NEAR],Q)/o($,I(e[T.NEAR]));l($,$,t),c(Q,Q,$),g.projectToRenderScreen(Q,re)}else if(re[2]>0&&ie[2]<0){n($,K,Q);const e=g.frustum,t=-O(e[T.NEAR],K)/o($,I(e[T.NEAR]));l($,$,t),c(K,K,$),g.projectToRenderScreen(K,ie)}else if(re[2]<0&&ie[2]<0)continue;re[2]=0,ie[2]=0;const r=E(A(re,ie,ne),C);r<N&&(N=r,u(se,Q),u(ae,K),P=t/3)}const D=m.rayBegin,q=m.rayEnd;if(N<L*L){let e=Number.MAX_VALUE;if(_(A(se,ae,ne),A(D,q,oe),ee)){n(ee,ee,D);const t=p(ee);l(ee,ee,1/t),e=t/h(D,q)}f(e,ee,P,!1)}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return null;const i=e.indices,s=r.get(b.POSITION);return C(s,i?i.get(b.POSITION):null,i&&X(this.parameters,r,i),t)}createLayout(){const e=S().vec3f(b.POSITION).f32(b.SUBDIVISIONFACTOR).vec2f(b.UV0).vec3f(b.AUXPOS1).vec3f(b.AUXPOS2);return this.parameters.vvSizeEnabled?e.f32(b.SIZEFEATUREATTRIBUTE):e.f32(b.SIZE),this.parameters.vvColorEnabled?e.f32(b.COLORFEATUREATTRIBUTE):e.vec4f(b.COLOR),this.parameters.vvOpacityEnabled&&e.f32(b.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new V(this.layout,this.parameters)}requiresSlot(e,t){if(e===q.DRAPED_MATERIAL)return!0;if(this.parameters.renderOccluded===D.OccludeAndTransparentStencil)return e===q.OPAQUE_MATERIAL||e===q.OCCLUDER_MATERIAL||e===q.TRANSPARENT_OCCLUDER_MATERIAL;const r=N(t);if(r===g.Color||r===g.Alpha){return e===(this.parameters.writeDepth?q.TRANSPARENT_MATERIAL:q.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL)}return e===q.OPAQUE_MATERIAL}createGLMaterial(e){return e.output===g.Color||e.output===g.Alpha||e.output===g.Highlight||e.output===g.Depth?new W(e):null}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),this._requiresTransparent(e)&&(e.transparent=!0)}_requiresTransparent(e){return!!((e.color&&e.color[3])<1||e.innerWidth>0&&this._colorRequiresTransparent(e.innerColor)||e.stipplePattern&&this._colorRequiresTransparent(e.stippleOffColor)||e.falloff>0)}_colorRequiresTransparent(e){return r(e)&&e[3]<1&&e[3]>0}}class W extends L{updateParameters(e){return this.ensureTechnique(J,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==g.Color&&this._output!==g.Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const Z={width:0,color:[1,1,1,1],join:"miter",cap:x.BUTT,miterLimit:5,writeDepth:!0,polygonOffset:!1,stipplePattern:null,stippleOffColor:null,stippleScaleWithLineWidth:!1,stipplePreferContinuous:!0,slicePlaneEnabled:!1,vvFastUpdate:!1,transparent:!1,isClosed:!1,falloff:0,innerWidth:0,innerColor:null,sceneHasOcludees:!1,wireframe:!1,...P,...j.Default};class V{constructor(e,t){this.parameters=t,this.numJoinSubdivisions=0,this.vertexBufferLayout=e;const r=t.stipplePattern?1:0;switch(this.parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=M+r}}_isClosed(e){return X(this.parameters,e.vertexAttributes,e.indices)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.indices.get(b.POSITION).length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this.parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i){var s;const n=le,o=ce,l=ue,c=t.vertexAttributes.get(b.POSITION).data,p=t.indices&&t.indices.get(b.POSITION),f=null==(s=t.vertexAttributes.get(b.DISTANCETOSTART))?void 0:s.data;p&&p.length!==2*(c.length/3-1)&&console.warn("RibbonLineMaterial does not support indices");let T=1,d=0;this.parameters.vvSizeEnabled?d=t.vertexAttributes.get(b.SIZEFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(b.SIZE)&&(T=t.vertexAttributes.get(b.SIZE).data[0]);let E=[1,1,1,1],A=0;this.parameters.vvColorEnabled?A=t.vertexAttributes.get(b.COLORFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(b.COLOR)&&(E=t.vertexAttributes.get(b.COLOR).data);let _=0;this.parameters.vvOpacityEnabled&&(_=t.vertexAttributes.get(b.OPACITYFEATUREATTRIBUTE).data[0]);const v=c.length/3,R=e.transformation,O=new Float32Array(r.buffer),I=this.vertexBufferLayout.stride/4;let S=i*I;const g=S;let C=0;const L=(e,t,r,i,s,a,n)=>{if(O[S++]=t[0],O[S++]=t[1],O[S++]=t[2],O[S++]=i,O[S++]=n,O[S++]=s,O[S++]=e[0],O[S++]=e[1],O[S++]=e[2],O[S++]=r[0],O[S++]=r[1],O[S++]=r[2],this.parameters.vvSizeEnabled?O[S++]=d:O[S++]=T,this.parameters.vvColorEnabled)O[S++]=A;else{const e=Math.min(4*a,E.length-4);O[S++]=E[e+0],O[S++]=E[e+1],O[S++]=E[e+2],O[S++]=E[e+3]}this.parameters.vvOpacityEnabled&&(O[S++]=_)};S+=I,a(o,c[0],c[1],c[2]),R&&m(o,o,R);const N=this._isClosed(t);if(N){const e=c.length-3;a(n,c[e],c[e+1],c[e+2]),R&&m(n,n,R)}else u(n,o),a(l,c[3],c[4],c[5]),R&&m(l,l,R),L(n,o,l,1,z.LEFT_CAP_START,0,C),L(n,o,l,1,z.RIGHT_CAP_START,0,C),u(n,o),u(o,l);const P=N?0:1,y=N?v:v-1,D=f?(e,t,r)=>C=f[r]:(e,t,r)=>C+=h(e,t);for(let h=P;h<y;h++){const e=(h+1)%v*3;a(l,c[e+0],c[e+1],c[e+2]),R&&m(l,l,R),D(n,o,h),L(n,o,l,0,z.LEFT_JOIN_END,h,C),L(n,o,l,0,z.RIGHT_JOIN_END,h,C);const t=this.numJoinSubdivisions;for(let r=0;r<t;++r){const e=(r+1)/(t+1);L(n,o,l,e,z.LEFT_JOIN_END,h,C),L(n,o,l,e,z.RIGHT_JOIN_END,h,C)}L(n,o,l,1,z.LEFT_JOIN_START,h,C),L(n,o,l,1,z.RIGHT_JOIN_START,h,C),u(n,o),u(o,l)}N?(a(l,c[3],c[4],c[5]),R&&m(l,l,R),C=D(n,o,y),L(n,o,l,0,z.LEFT_JOIN_END,P,C),L(n,o,l,0,z.RIGHT_JOIN_END,P,C)):(C=D(n,o,y),L(n,o,l,0,z.LEFT_CAP_END,y,C),L(n,o,l,0,z.RIGHT_CAP_END,y,C)),k(O,g+I,O,g,I);S=k(O,S-I,O,S,I),this.parameters.wireframe&&this._addWireframeVertices(r,g,S,I)}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=k(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function k(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function X(e,t,r){return Y(e,t.get(b.POSITION).data,r?r.get(b.POSITION):null)}function Y(e,t,r){return!!e.isClosed&&(r?r.length>2:t.length>6)}const Q=f(),K=f(),$=f(),ee=f(),te=f(),re=i(),ie=i(),se=f(),ae=f(),ne=d(),oe=d(),le=f(),ce=f(),ue=f(),pe=[i(),i(),i(),i()],he=[f(),f(),f(),f()],me=v(),fe=v(),Te=v(),de=v();export{B as RibbonLineMaterial};
|
|
5
|
+
import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{isSome as r}from"../../../../core/maybe.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{c as s}from"../../../../chunks/vec2.js";import{s as a,f as n,d as o,a as l,b as c,g as u,l as p,i as h,m}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{PlaneIndex as T}from"../../../../geometry/support/frustum.js";import{create as d,distance2 as E,fromPoints as A,closestLineSegmentPoint as _}from"../../../../geometry/support/lineSegment.js";import{create as v,fromPoints as R,signedDistance as O,normal as I}from"../../../../geometry/support/plane.js";import{newLayout as S}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as g}from"../core/shaderLibrary/ShaderOutputOptions.js";import{computeAttachmentOriginLines as b}from"../lib/geometryDataUtils.js";import C from"../lib/GLMaterial.js";import{outputFromPass as L}from"../lib/GLMaterials.js";import{DefaultMaterialParameters as N,Material as P,RenderOccludedFlag as y}from"../lib/Material.js";import{RenderSlot as D}from"../lib/RenderSlot.js";import{isTranslationMatrix as q}from"../lib/Util.js";import{VertexAttribute as U}from"../lib/VertexAttribute.js";import{VisualVariableDefaultMaterialParameters as j}from"./VisualVariableMaterialParameters.js";import{isInstanceHidden as F}from"./renderers/utils.js";import{C as x,N as M}from"../../../../chunks/RibbonLine.glsl.js";import{ribbonVertexAttributeLocations as w,RibbonLineTechniqueConfiguration as G,RibbonLineTechnique as J}from"../shaders/RibbonLineTechnique.js";const H=e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial");var z;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(z||(z={}));class B extends P{constructor(e){super(e,V),this._vertexAttributeLocations=w,this.techniqueConfig=new G,this.layout=this.createLayout()}isClosed(e,t){return Y(this.parameters,e,t)}dispose(){}getPassParameters(){return this.parameters}getTechniqueConfig(e,t){this.techniqueConfig.output=e,this.techniqueConfig.draped=t.slot===D.DRAPED_MATERIAL;const i=r(this.parameters.stipplePattern);return this.techniqueConfig.stippleEnabled=i,this.techniqueConfig.stippleOffColorEnabled=i&&r(this.parameters.stippleOffColor),this.techniqueConfig.stippleScaleWithLineWidth=i&&this.parameters.stippleScaleWithLineWidth,this.techniqueConfig.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.roundJoins="round"===this.parameters.join,this.techniqueConfig.capType=this.parameters.cap,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.innerColorEnabled=this.parameters.innerWidth>0&&r(this.parameters.innerColor),this.techniqueConfig.falloffEnabled=this.parameters.falloff>0,this.techniqueConfig.occluder=this.parameters.renderOccluded===y.OccludeAndTransparentStencil,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig.wireframe=this.parameters.wireframe,this.techniqueConfig}intersect(e,t,i,s,a,n,o,l,c){r(c)?this._intersectDrapedLineGeometry(e,s,c,n,o):this._intersectLineGeometry(e,t,i,s,o)}_intersectDrapedLineGeometry(e,r,i,s,a){if(!r.options.selectionMode)return;const n=e.vertexAttributes.get(U.POSITION).data,o=e.vertexAttributes.get(U.SIZE);let l=this.parameters.width;if(this.parameters.vvSizeEnabled){const r=e.vertexAttributes.get(U.SIZEFEATUREATTRIBUTE).data[0];l*=t(this.parameters.vvSizeOffset[0]+r*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else o&&(l*=o.data[0]);const c=s[0],u=s[1],p=(l/2+4)*e.screenToWorldRatio;let h=Number.MAX_VALUE,m=0;for(let f=0;f<n.length-5;f+=3){const e=n[f],r=n[f+1],i=c-e,s=u-r,a=n[f+3]-e,o=n[f+4]-r,l=t((a*i+o*s)/(a*a+o*o),0,1),p=a*l-i,T=o*l-s,d=p*p+T*T;d<h&&(h=d,m=f/3)}h<p*p&&a(i.dist,i.normal,m,!1)}_intersectLineGeometry(e,r,i,m,f){if(!m.options.selectionMode||F(r))return;if(!q(i))return void H.error("intersection assumes a translation-only matrix");const d=e.vertexAttributes,v=d.get(U.POSITION).data;let S=this.parameters.width;if(this.parameters.vvSizeEnabled){const e=d.get(U.SIZEFEATUREATTRIBUTE).data[0];S*=t(this.parameters.vvSizeOffset[0]+e*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else d.has(U.SIZE)&&(S*=d.get(U.SIZE).data[0]);const g=m.camera,b=te;s(b,m.point);const C=S*g.pixelRatio/2+4*g.pixelRatio;a(pe[0],b[0]-C,b[1]+C,0),a(pe[1],b[0]+C,b[1]+C,0),a(pe[2],b[0]+C,b[1]-C,0),a(pe[3],b[0]-C,b[1]-C,0);for(let t=0;t<4;t++)if(!g.unprojectFromRenderScreen(pe[t],he[t]))return;R(g.eye,he[0],he[1],me),R(g.eye,he[1],he[2],fe),R(g.eye,he[2],he[3],Te),R(g.eye,he[3],he[0],de);let L=Number.MAX_VALUE,N=0;const P=X(this.parameters,d,e.indices)?v.length-2:v.length-5;for(let t=0;t<P;t+=3){Q[0]=v[t]+i[12],Q[1]=v[t+1]+i[13],Q[2]=v[t+2]+i[14];const e=(t+3)%v.length;if(K[0]=v[e]+i[12],K[1]=v[e+1]+i[13],K[2]=v[e+2]+i[14],O(me,Q)<0&&O(me,K)<0||O(fe,Q)<0&&O(fe,K)<0||O(Te,Q)<0&&O(Te,K)<0||O(de,Q)<0&&O(de,K)<0)continue;if(g.projectToRenderScreen(Q,re),g.projectToRenderScreen(K,ie),re[2]<0&&ie[2]>0){n($,Q,K);const e=g.frustum,t=-O(e[T.NEAR],Q)/o($,I(e[T.NEAR]));l($,$,t),c(Q,Q,$),g.projectToRenderScreen(Q,re)}else if(re[2]>0&&ie[2]<0){n($,K,Q);const e=g.frustum,t=-O(e[T.NEAR],K)/o($,I(e[T.NEAR]));l($,$,t),c(K,K,$),g.projectToRenderScreen(K,ie)}else if(re[2]<0&&ie[2]<0)continue;re[2]=0,ie[2]=0;const r=E(A(re,ie,ne),b);r<L&&(L=r,u(se,Q),u(ae,K),N=t/3)}const y=m.rayBegin,D=m.rayEnd;if(L<C*C){let e=Number.MAX_VALUE;if(_(A(se,ae,ne),A(y,D,oe),ee)){n(ee,ee,y);const t=p(ee);l(ee,ee,1/t),e=t/h(y,D)}f(e,ee,N,!1)}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return null;const i=e.indices,s=r.get(U.POSITION);return b(s,i?i.get(U.POSITION):null,i&&X(this.parameters,r,i),t)}createLayout(){const e=S().vec3f(U.POSITION).f32(U.SUBDIVISIONFACTOR).vec2f(U.UV0).vec3f(U.AUXPOS1).vec3f(U.AUXPOS2);return this.parameters.vvSizeEnabled?e.f32(U.SIZEFEATUREATTRIBUTE):e.f32(U.SIZE),this.parameters.vvColorEnabled?e.f32(U.COLORFEATUREATTRIBUTE):e.vec4f(U.COLOR),this.parameters.vvOpacityEnabled&&e.f32(U.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new Z(this.layout,this.parameters)}requiresSlot(e,t){if(e===D.DRAPED_MATERIAL)return!0;if(this.parameters.renderOccluded===y.OccludeAndTransparentStencil)return e===D.OPAQUE_MATERIAL||e===D.OCCLUDER_MATERIAL||e===D.TRANSPARENT_OCCLUDER_MATERIAL;const r=L(t);if(r===g.Color||r===g.Alpha){return e===(this.parameters.writeDepth?D.TRANSPARENT_MATERIAL:D.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL)}return e===D.OPAQUE_MATERIAL}createGLMaterial(e){return e.output===g.Color||e.output===g.Alpha||e.output===g.Highlight||e.output===g.Depth?new W(e):null}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),this._requiresTransparent(e)&&(e.transparent=!0)}_requiresTransparent(e){return!!((e.color&&e.color[3])<1||e.innerWidth>0&&this._colorRequiresTransparent(e.innerColor)||e.stipplePattern&&this._colorRequiresTransparent(e.stippleOffColor)||e.falloff>0)}_colorRequiresTransparent(e){return r(e)&&e[3]<1&&e[3]>0}}class W extends C{updateParameters(e){return this.ensureTechnique(J,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==g.Color&&this._output!==g.Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const V={width:0,color:[1,1,1,1],join:"miter",cap:x.BUTT,miterLimit:5,writeDepth:!0,polygonOffset:!1,stipplePattern:null,stippleOffColor:null,stippleScaleWithLineWidth:!1,stipplePreferContinuous:!0,slicePlaneEnabled:!1,vvFastUpdate:!1,transparent:!1,isClosed:!1,falloff:0,innerWidth:0,innerColor:null,sceneHasOcludees:!1,wireframe:!1,...N,...j};class Z{constructor(e,t){this.parameters=t,this.numJoinSubdivisions=0,this.vertexBufferLayout=e;const r=t.stipplePattern?1:0;switch(this.parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=M+r}}_isClosed(e){return X(this.parameters,e.vertexAttributes,e.indices)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.indices.get(U.POSITION).length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this.parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i){var s;const n=le,o=ce,l=ue,c=t.vertexAttributes.get(U.POSITION).data,p=t.indices&&t.indices.get(U.POSITION),f=null==(s=t.vertexAttributes.get(U.DISTANCETOSTART))?void 0:s.data;p&&p.length!==2*(c.length/3-1)&&console.warn("RibbonLineMaterial does not support indices");let T=1,d=0;this.parameters.vvSizeEnabled?d=t.vertexAttributes.get(U.SIZEFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(U.SIZE)&&(T=t.vertexAttributes.get(U.SIZE).data[0]);let E=[1,1,1,1],A=0;this.parameters.vvColorEnabled?A=t.vertexAttributes.get(U.COLORFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(U.COLOR)&&(E=t.vertexAttributes.get(U.COLOR).data);let _=0;this.parameters.vvOpacityEnabled&&(_=t.vertexAttributes.get(U.OPACITYFEATUREATTRIBUTE).data[0]);const v=c.length/3,R=e.transformation,O=new Float32Array(r.buffer),I=this.vertexBufferLayout.stride/4;let S=i*I;const g=S;let b=0;const C=(e,t,r,i,s,a,n)=>{if(O[S++]=t[0],O[S++]=t[1],O[S++]=t[2],O[S++]=i,O[S++]=n,O[S++]=s,O[S++]=e[0],O[S++]=e[1],O[S++]=e[2],O[S++]=r[0],O[S++]=r[1],O[S++]=r[2],this.parameters.vvSizeEnabled?O[S++]=d:O[S++]=T,this.parameters.vvColorEnabled)O[S++]=A;else{const e=Math.min(4*a,E.length-4);O[S++]=E[e+0],O[S++]=E[e+1],O[S++]=E[e+2],O[S++]=E[e+3]}this.parameters.vvOpacityEnabled&&(O[S++]=_)};S+=I,a(o,c[0],c[1],c[2]),R&&m(o,o,R);const L=this._isClosed(t);if(L){const e=c.length-3;a(n,c[e],c[e+1],c[e+2]),R&&m(n,n,R)}else u(n,o),a(l,c[3],c[4],c[5]),R&&m(l,l,R),C(n,o,l,1,z.LEFT_CAP_START,0,b),C(n,o,l,1,z.RIGHT_CAP_START,0,b),u(n,o),u(o,l);const N=L?0:1,P=L?v:v-1,y=f?(e,t,r)=>b=f[r]:(e,t,r)=>b+=h(e,t);for(let h=N;h<P;h++){const e=(h+1)%v*3;a(l,c[e+0],c[e+1],c[e+2]),R&&m(l,l,R),y(n,o,h),C(n,o,l,0,z.LEFT_JOIN_END,h,b),C(n,o,l,0,z.RIGHT_JOIN_END,h,b);const t=this.numJoinSubdivisions;for(let r=0;r<t;++r){const e=(r+1)/(t+1);C(n,o,l,e,z.LEFT_JOIN_END,h,b),C(n,o,l,e,z.RIGHT_JOIN_END,h,b)}C(n,o,l,1,z.LEFT_JOIN_START,h,b),C(n,o,l,1,z.RIGHT_JOIN_START,h,b),u(n,o),u(o,l)}L?(a(l,c[3],c[4],c[5]),R&&m(l,l,R),b=y(n,o,P),C(n,o,l,0,z.LEFT_JOIN_END,N,b),C(n,o,l,0,z.RIGHT_JOIN_END,N,b)):(b=y(n,o,P),C(n,o,l,0,z.LEFT_CAP_END,P,b),C(n,o,l,0,z.RIGHT_CAP_END,P,b)),k(O,g+I,O,g,I);S=k(O,S-I,O,S,I),this.parameters.wireframe&&this._addWireframeVertices(r,g,S,I)}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=k(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function k(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function X(e,t,r){return Y(e,t.get(U.POSITION).data,r?r.get(U.POSITION):null)}function Y(e,t,r){return!!e.isClosed&&(r?r.length>2:t.length>6)}const Q=f(),K=f(),$=f(),ee=f(),te=f(),re=i(),ie=i(),se=f(),ae=f(),ne=d(),oe=d(),le=f(),ce=f(),ue=f(),pe=[i(),i(),i(),i()],he=[f(),f(),f(),f()],me=v(),fe=v(),Te=v(),de=v();export{B as RibbonLineMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{n as e,s as t,a as r,b as i}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{center as a,scale as n}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as o}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as u}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as l}from"../core/shaderLibrary/ShaderOutputOptions.js";import{CullFaceOptions as c
|
|
5
|
+
import{n as e,s as t,a as r,b as i}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{center as a,scale as n}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as o}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as u}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as l}from"../core/shaderLibrary/ShaderOutputOptions.js";import{CullFaceOptions as c}from"../lib/basicInterfaces.js";import h from"../lib/GLMaterial.js";import{outputFromPass as p}from"../lib/GLMaterials.js";import{DefaultMaterialParameters as f,Material as m}from"../lib/Material.js";import{RenderSlot as d}from"../lib/RenderSlot.js";import{assert as b}from"../lib/Util.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{writeDefaultAttributes as g,writePosition as T}from"./internal/bufferWriterUtils.js";import{intersectTriangleGeometry as S}from"./internal/MaterialUtil.js";import{ShadedColorMaterialTechniqueConfiguration as A,ShadedColorMaterialVertexAttrLocations as P,ShadedColorMaterialTechnique as v}from"../shaders/ShadedColorMaterialTechnique.js";class F extends m{constructor(e){super(e,C),this.supportsEdges=!0,this.techniqueConfig=new A,this._vertexAttributeLocations=P}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.screenSizeEnabled=this.parameters.screenSizeEnabled,this.techniqueConfig.shadingEnabled=this.parameters.shadingEnabled,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}intersect(e,s,o,u,l,c,h){if(this.parameters.screenSizeEnabled){const o=e.vertexAttributes.get(E.OFFSET),p={applyToVertex:(e,s,a,n)=>{const l=t(j,o.data[3*n+0],o.data[3*n+1],o.data[3*n+2]),c=t(x,e,s,a);return r(l,l,this.parameters.screenSize*u.camera.computeRenderPixelSizeAt(l)),i(c,c,l),[c[0],c[1],c[2]]},applyToAabb:e=>{const t=a(e,j);return n(e,this.parameters.screenSize*u.camera.computeRenderPixelSizeAt(t))}};S(e,s,u,l,c,p,h)}else S(e,s,u,l,c,void 0,h)}requiresSlot(e,t){if(p(t)===l.Highlight)return e===d.OPAQUE_MATERIAL;let r=d.OPAQUE_MATERIAL;return this.parameters.transparent&&(r=this.parameters.writeDepth?d.TRANSPARENT_MATERIAL:d.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),e===r||e===d.DRAPED_MATERIAL}createGLMaterial(e){return e.output===l.Color||e.output===l.Alpha||e.output===l.Highlight?new q(e):null}createBufferWriter(){return new O(this.parameters.screenSizeEnabled)}}class q extends h{updateParameters(e){return this.ensureTechnique(v,e)}beginSlot(e){return this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const C={color:[1,1,1,1],shadingTint:[0,0,0,.25],shadingDirection:e(s(),[.5,-.5,-.5]),transparent:!1,writeDepth:!0,slicePlaneEnabled:!1,cullFace:c.None,screenSizeEnabled:!1,screenSize:14,shadingEnabled:!0,...f};class O{constructor(e){this.screenSizeEnabled=e;const t=u().vec3f(E.POSITION).vec3f(E.NORMAL);this.screenSizeEnabled&&t.vec3f(E.OFFSET),this.vertexBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(E.POSITION).length}write(e,t,r,i){if(g(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,i),this.screenSizeEnabled){if(!t.vertexAttributes.has(E.OFFSET))throw new Error(`${E.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);{const s=t.vertexAttributes.get(E.OFFSET),a=t.indices.get(E.OFFSET);b(3===s.size);const n=r.getField(E.OFFSET,o);if(!n)throw new Error("unable to acquire view for "+E.OFFSET);T(a,s.data,e.invTranspTransformation,n,i)}}}}const j=s(),x=s();export{F as ShadedColorMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{unwrap as r}from"../../../../core/maybe.js";import{ShaderOutput as e}from"../core/shaderLibrary/ShaderOutputOptions.js";import{ShaderTechniqueConfiguration as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import i from"../lib/GLMaterial.js";import{Material as o,
|
|
5
|
+
import{unwrap as r}from"../../../../core/maybe.js";import{ShaderOutput as e}from"../core/shaderLibrary/ShaderOutputOptions.js";import{ShaderTechniqueConfiguration as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import i from"../lib/GLMaterial.js";import{Material as o,DefaultMaterialParameters as n}from"../lib/Material.js";import{RenderSlot as s}from"../lib/RenderSlot.js";import{DefaultBufferWriter as a,PositionUVLayout as u}from"./internal/DefaultBufferWriter.js";import{intersectTriangleGeometry as l}from"./internal/MaterialUtil.js";import{SlicePlaneMaterialTechnique as c}from"../shaders/SlicePlaneMaterialTechnique.js";class m extends o{constructor(r){super(r,f),this._config=new t}intersect(r,e,t,i,o,n,s){return l(r,e,i,o,n,void 0,s)}createBufferWriter(){return new a(u)}requiresSlot(r){return r===s.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL}createGLMaterial(r){return r.output===e.Color?new h(r):null}getTechniqueConfig(){return this._config}}class h extends i{constructor(r){super(r),this.ensureTechnique(c,null)}updateParameters(){return r(this.technique)}beginSlot(){return r(this.technique)}bind(r,e){e.bindPass(this._material.parameters,r)}}const f={backgroundColor:[1,0,0,.5],gridColor:[0,1,0,.5],gridWidth:4,...n};export{m as SlicePlaneMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{c as v}from"../../../../chunks/mat3f64.js";import{f as
|
|
5
|
+
import{c as v}from"../../../../chunks/mat3f64.js";import{f as o}from"../../../../chunks/vec3f32.js";const e={vvSizeEnabled:!1,vvSizeMinSize:o(1,1,1),vvSizeMaxSize:o(100,100,100),vvSizeOffset:o(0,0,0),vvSizeFactor:o(1,1,1),vvSizeValue:o(1,1,1),vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvOpacityEnabled:!1,vvOpacityValues:[0,0,0,0,0,0,0,0],vvOpacityOpacities:[1,1,1,1,1,1,1,1],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:v()};export{e as VisualVariableDefaultMaterialParameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/has.js";import{bindCloudsComposition as t}from"../../environment/CloudsComposition.js";import{ShaderOutput as o}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as a}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as n}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapUniforms as p}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindSSRUniforms as l}from"../core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js";import{bindWaterDistortionUniforms as u}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{bindProjectionMatrix as h,bindView as c,bindCameraPosition as d}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as m}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as g}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as b}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as v}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as
|
|
5
|
+
import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/has.js";import{bindCloudsComposition as t}from"../../environment/CloudsComposition.js";import{ShaderOutput as o}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as a}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as n}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapUniforms as p}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindSSRUniforms as l}from"../core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js";import{bindWaterDistortionUniforms as u}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{bindProjectionMatrix as h,bindView as c,bindCameraPosition as d}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as m}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as g}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as b}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as v}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as S,oitBlending as T,oitDepthTest as j,oitDepthWrite as w,getOITPolygonOffset as P}from"../lib/OrderIndependentTransparency.js";import{Program as C}from"../lib/Program.js";import{W as E}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as x,defaultDepthWriteParams as O,defaultColorWriteParams as R}from"../../../webgl/renderState.js";class D extends g{constructor(r,e,t){super(r,e,t),this._textureRepository=r.waterTextureRepository}initializeProgram(r){const t=D.shader.get(),o=this.configuration,i=t.build({oitEnabled:o.transparencyPassType===y.Color,output:o.output,viewingMode:r.viewingMode,slicePlaneEnabled:o.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,receiveShadows:o.receiveShadows,pbrMode:n.Water,useCustomDTRExponentForWater:!0,ssrEnabled:o.useSSR,cloudsReflectionsEnabled:e("enable-feature:clouds-reflections"),highStepCount:!0,multipassTerrainEnabled:o.multipassTerrainEnabled,cullAboveGround:o.cullAboveGround});return new C(r.rctx,i,v)}bindPass(r,i){h(this.program,i.camera.projectionMatrix),i.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",i.camera.nearFar),this.program.setUniform2fv("inverseViewport",i.inverseViewport),a(this.program,i)),this.configuration.output===o.Color&&(i.lighting.setUniforms(this.program,!1),l(this.program,i),e("enable-feature:clouds-reflections")&&t(this.program,i.camera,i.cloudsCompositionParams)),this.configuration.output!==o.Color&&this.configuration.output!==o.Normal||(u(this.program,r),this._textureRepository.bind(this.program)),this.program.setUniform4fv("waterColor",r.color),this.configuration.output===o.Highlight&&s(this.program,i)}bindDraw(r){c(this.program,r),this.program.rebindTextures(),this.configuration.output!==o.Color&&this.configuration.output!==o.Alpha||d(this.program,r.origin,r.camera.viewInverseTransposeMatrix),this.configuration.output===o.Color&&p(this.program,r),this.configuration.output!==o.Color&&this.configuration.output!==o.Alpha&&this.configuration.output!==o.Highlight||i(this.program,this.configuration,r)}_setPipelineState(r){const e=this.configuration,t=r===y.NONE,i=r===y.FrontFace;return x({blending:e.output!==o.Normal&&e.output!==o.Highlight&&e.transparent?t?S:T(r):null,depthTest:{func:j(r)},depthWrite:t?e.writeDepth&&O:w(r),colorWrite:R,polygonOffset:t||i?null:P(e.enableOffset)})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}D.shader=new m(E,(()=>import("../shaders/WaterSurface.glsl.js")));class L extends b{constructor(){super(...arguments),this.output=o.Color,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!1,this.useSSR=!1,this.isDraped=!1,this.transparencyPassType=y.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}r([f({count:o.COUNT})],L.prototype,"output",void 0),r([f()],L.prototype,"receiveShadows",void 0),r([f()],L.prototype,"slicePlaneEnabled",void 0),r([f()],L.prototype,"transparent",void 0),r([f()],L.prototype,"enableOffset",void 0),r([f()],L.prototype,"writeDepth",void 0),r([f()],L.prototype,"useSSR",void 0),r([f()],L.prototype,"isDraped",void 0),r([f({count:y.COUNT})],L.prototype,"transparencyPassType",void 0),r([f()],L.prototype,"multipassTerrainEnabled",void 0),r([f()],L.prototype,"cullAboveGround",void 0);export{D as WaterTechnique,L as WaterTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{VertexAttribute as
|
|
5
|
+
import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{VertexAttribute as t}from"../../lib/VertexAttribute.js";import{writeDefaultAttributes as r}from"./bufferWriterUtils.js";const f=e().vec3f(t.POSITION),o=e().vec3f(t.POSITION).vec2f(t.UV0),u=e().vec3f(t.POSITION).vec4u8(t.COLOR);class i{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(t.POSITION).length}write(e,t,f,o){r(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,f,o)}}export{i as DefaultBufferWriter,u as PositionColorLayout,f as PositionLayout,o as PositionUVLayout};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as t}from"../../../../../core/mathUtils.js";import{isNone as
|
|
5
|
+
import{clamp as t}from"../../../../../core/mathUtils.js";import{isNone as e,isSome as n}from"../../../../../core/maybe.js";import{s as i,c as o,n as r}from"../../../../../chunks/vec3.js";import{c as s}from"../../../../../chunks/vec3f64.js";import{create as c,setMin as f,setMax as a}from"../../../../../geometry/support/aaBoundingBox.js";import{PrimitiveType as l}from"../../lib/basicInterfaces.js";import{scale as u}from"../../lib/screenSizePerspectiveUtils.js";import{assert as m}from"../../lib/Util.js";import{VertexAttribute as p}from"../../lib/VertexAttribute.js";import{isInstanceHidden as h}from"../renderers/utils.js";const d=c();function g(t,e,n,i,o,r,s){if(!h(e))if(t.boundingInfo){m(t.primitiveType===l.Triangle);const e=n.tolerance;b(t.boundingInfo,i,o,e,r,s)}else{const e=t.indices.get(p.POSITION),n=t.vertexAttributes.get(p.POSITION);v(i,o,0,e.length/3,e,n,void 0,r,s)}}const x=s();function b(t,i,o,r,s,c){if(e(t))return;const l=A(i,o,x);if(f(d,t.getBBMin()),a(d,t.getBBMax()),n(s)&&s.applyToAabb(d),O(d,i,l,r)){const{primitiveIndices:e,indices:n,position:f}=t,a=e?e.length:n.length/3;if(a>z){const e=t.getChildren();if(void 0!==e){for(let t=0;t<8;++t)void 0!==e[t]&&b(e[t],i,o,r,s,c);return}}v(i,o,0,a,n,f,e,s,c)}}const M=s();function v(t,e,i,o,r,s,c,f,a){if(c)return y(t,e,i,o,r,s,c,f,a);const l=s.data,u=s.stride||s.size,m=t[0],p=t[1],h=t[2],d=e[0]-m,g=e[1]-p,x=e[2]-h;for(let b=i,v=3*i;b<o;++b){let t=u*r[v++],e=l[t++],i=l[t++],o=l[t];t=u*r[v++];let s=l[t++],c=l[t++],y=l[t];t=u*r[v++];let I=l[t++],T=l[t++],A=l[t];n(f)&&([e,i,o]=f.applyToVertex(e,i,o,b),[s,c,y]=f.applyToVertex(s,c,y,b),[I,T,A]=f.applyToVertex(I,T,A,b));const O=s-e,N=c-i,P=y-o,S=I-e,V=T-i,L=A-o,B=g*L-V*x,E=x*S-L*d,U=d*V-S*g,z=O*B+N*E+P*U;if(Math.abs(z)<=Number.EPSILON)continue;const W=m-e,k=p-i,R=h-o,C=W*B+k*E+R*U;if(z>0){if(C<0||C>z)continue}else if(C>0||C<z)continue;const H=k*P-N*R,X=R*O-P*W,Y=W*N-O*k,Z=d*H+g*X+x*Y;if(z>0){if(Z<0||C+Z>z)continue}else if(Z>0||C+Z<z)continue;const _=(S*H+V*X+L*Y)/z;if(_>=0){a(_,j(O,N,P,S,V,L,M),b,!1)}}}function y(t,e,i,o,r,s,c,f,a){const l=s.data,u=s.stride||s.size,m=t[0],p=t[1],h=t[2],d=e[0]-m,g=e[1]-p,x=e[2]-h;for(let b=i;b<o;++b){const t=c[b];let e=3*t,i=u*r[e++],o=l[i++],s=l[i++],v=l[i];i=u*r[e++];let y=l[i++],I=l[i++],T=l[i];i=u*r[e];let A=l[i++],O=l[i++],N=l[i];n(f)&&([o,s,v]=f.applyToVertex(o,s,v,b),[y,I,T]=f.applyToVertex(y,I,T,b),[A,O,N]=f.applyToVertex(A,O,N,b));const P=y-o,S=I-s,V=T-v,L=A-o,B=O-s,E=N-v,U=g*E-B*x,z=x*L-E*d,W=d*B-L*g,k=P*U+S*z+V*W;if(Math.abs(k)<=Number.EPSILON)continue;const R=m-o,C=p-s,H=h-v,X=R*U+C*z+H*W;if(k>0){if(X<0||X>k)continue}else if(X>0||X<k)continue;const Y=C*V-S*H,Z=H*P-V*R,_=R*S-P*C,q=d*Y+g*Z+x*_;if(k>0){if(q<0||X+q>k)continue}else if(q>0||X+q<k)continue;const w=(L*Y+B*Z+E*_)/k;if(w>=0){a(w,j(P,S,V,L,B,E,M),t,!1)}}}const I=s(),T=s();function j(t,e,n,s,c,f,a){return i(I,t,e,n),i(T,s,c,f),o(a,I,T),r(a,a),a}function A(t,e,n){return i(n,1/(e[0]-t[0]),1/(e[1]-t[1]),1/(e[2]-t[2]))}function O(t,e,n,i){return N(t,e,n,i,1/0)}function N(t,e,n,i,o){const r=(t[0]-i-e[0])*n[0],s=(t[3]+i-e[0])*n[0];let c=Math.min(r,s),f=Math.max(r,s);const a=(t[1]-i-e[1])*n[1],l=(t[4]+i-e[1])*n[1];if(f=Math.min(f,Math.max(a,l)),f<0)return!1;if(c=Math.max(c,Math.min(a,l)),c>f)return!1;const u=(t[2]-i-e[2])*n[2],m=(t[5]+i-e[2])*n[2];return f=Math.min(f,Math.max(u,m)),!(f<0)&&(c=Math.max(c,Math.min(u,m)),!(c>f)&&c<o)}function P(e,n,i,o,r){let s=(i.screenLength||0)*e.pixelRatio;r&&(s=u(s,o,n,r));const c=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return t(c*n,i.minWorldLength||0,null!=i.maxWorldLength?i.maxWorldLength:1/0)}function S(t,e,n){if(!t)return;const i=t.parameters,o=t.paddingPixelsOverride;e.setUniform4f(n,i.divisor,i.offset,i.minPixelSize,o)}function V(t,e){const n=e?V(e):{};for(const i in t){let e=t[i];e&&e.forEach&&(e=E(e)),null==e&&i in n||(n[i]=e)}return n}function L(t,e){let n=!1;for(const i in e){const o=e[i];void 0!==o&&(n=!0,Array.isArray(o)?t[i]=o.slice():t[i]=o)}return n}function B(e,n,i,o,r,s){if(!n.options.selectionMode)return;const c=e.vertexAttributes.get(p.POSITION).data,f=e.vertexAttributes.get(p.SIZE),a=f&&f.data[0],l=o[0],u=o[1],m=((a+r)/2+4)*e.screenToWorldRatio;let h=Number.MAX_VALUE,d=0;for(let p=0;p<c.length-5;p+=3){const e=c[p],n=c[p+1],i=l-e,o=u-n,r=c[p+3]-e,s=c[p+4]-n,f=t((r*i+s*o)/(r*r+s*s),0,1),a=r*f-i,m=s*f-o,g=a*a+m*m;g<h&&(h=g,d=p/3)}h<m*m&&s(i.dist,i.normal,d,!1)}function E(t){const e=[];return t.forEach((t=>e.push(t))),e}const U={multiply:1,ignore:2,replace:3,tint:4},z=1e3;export{S as bindScreenSizePerspective,U as colorMixModes,A as computeInvDir,j as computeNormal,V as copyParameters,O as intersectAabbInvDir,N as intersectAabbInvDirBefore,B as intersectDrapedRenderLineGeometry,g as intersectTriangleGeometry,v as intersectTriangles,L as updateParameters,P as verticalOffsetAtDistance};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{p as t}from"../../../../../chunks/mat4.js";import{BufferViewVec4f as e,BufferViewVec4u8 as f,BufferViewVec2f as o,BufferViewVec3f as r}from"../../../../../geometry/support/buffer/BufferView.js";import{
|
|
5
|
+
import{p as t}from"../../../../../chunks/mat4.js";import{BufferViewVec4f as e,BufferViewVec4u8 as f,BufferViewVec2f as o,BufferViewVec3f as r}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as s}from"../../lib/Util.js";import{VertexAttribute as n}from"../../lib/VertexAttribute.js";function i(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=2*t[i];r[o]=e[f],r[o+1]=e[f+1],o+=s}}function c(t,e,f,o,r){const s=f.typedBuffer,n=f.typedBufferStride,i=t.length;if(o*=n,null==r||1===r)for(let c=0;c<i;++c){const f=3*t[c];s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],o+=n}else for(let c=0;c<i;++c){const f=3*t[c];for(let t=0;t<r;++t)s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],o+=n}}function l(t,e,f,o,r=1){const s=f.typedBuffer,n=f.typedBufferStride,i=t.length;if(o*=n,1===r)for(let c=0;c<i;++c){const f=4*t[c];s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],s[o+3]=e[f+3],o+=n}else for(let c=0;c<i;++c){const f=4*t[c];for(let t=0;t<r;++t)s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],s[o+3]=e[f+3],o+=n}}function d(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=9*t[i];for(let t=0;t<9;++t)r[o+t]=e[f+t];o+=s}}function u(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=16*t[i];for(let t=0;t<16;++t)r[o+t]=e[f+t];o+=s}}function a(t,e,f,o,r,s=1){if(!f)return void c(t,e,o,r,s);const n=o.typedBuffer,i=o.typedBufferStride,l=t.length,d=f[0],u=f[1],a=f[2],p=f[4],B=f[5],y=f[6],g=f[8],h=f[9],b=f[10],m=f[12],S=f[13],z=f[14];if(r*=i,1===s)for(let c=0;c<l;++c){const f=3*t[c],o=e[f],s=e[f+1],l=e[f+2];n[r]=d*o+p*s+g*l+m,n[r+1]=u*o+B*s+h*l+S,n[r+2]=a*o+y*s+b*l+z,r+=i}else for(let c=0;c<l;++c){const f=3*t[c],o=e[f],l=e[f+1],O=e[f+2],k=d*o+p*l+g*O+m,F=u*o+B*l+h*O+S,M=a*o+y*l+b*O+z;for(let t=0;t<s;++t)n[r]=k,n[r+1]=F,n[r+2]=M,r+=i}}function p(e,f,o,r,s,n=1){if(!o)return void c(e,f,r,s,n);const i=o,l=r.typedBuffer,d=r.typedBufferStride,u=e.length,a=i[0],p=i[1],B=i[2],y=i[4],g=i[5],h=i[6],b=i[8],m=i[9],S=i[10],z=!t(i),O=1e-6,k=1-O;if(s*=d,1===n)for(let t=0;t<u;++t){const o=3*e[t],r=f[o],n=f[o+1],i=f[o+2];let c=a*r+y*n+b*i,u=p*r+g*n+m*i,F=B*r+h*n+S*i;if(z){const t=c*c+u*u+F*F;if(t<k&&t>O){const e=1/Math.sqrt(t);c*=e,u*=e,F*=e}}l[s+0]=c,l[s+1]=u,l[s+2]=F,s+=d}else for(let t=0;t<u;++t){const o=3*e[t],r=f[o],i=f[o+1],c=f[o+2];let u=a*r+y*i+b*c,F=p*r+g*i+m*c,M=B*r+h*i+S*c;if(z){const t=u*u+F*F+M*M;if(t<k&&t>O){const e=1/Math.sqrt(t);u*=e,F*=e,M*=e}}for(let t=0;t<n;++t)l[s+0]=u,l[s+1]=F,l[s+2]=M,s+=d}}function B(e,f,o,r,s,n=1){if(!o)return void l(e,f,r,s,n);const i=o,c=r.typedBuffer,d=r.typedBufferStride,u=e.length,a=i[0],p=i[1],B=i[2],y=i[4],g=i[5],h=i[6],b=i[8],m=i[9],S=i[10],z=!t(i),O=1e-6,k=1-O;if(s*=d,1===n)for(let t=0;t<u;++t){const o=4*e[t],r=f[o],n=f[o+1],i=f[o+2],l=f[o+3];let u=a*r+y*n+b*i,F=p*r+g*n+m*i,M=B*r+h*n+S*i;if(z){const t=u*u+F*F+M*M;if(t<k&&t>O){const e=1/Math.sqrt(t);u*=e,F*=e,M*=e}}c[s+0]=u,c[s+1]=F,c[s+2]=M,c[s+3]=l,s+=d}else for(let t=0;t<u;++t){const o=4*e[t],r=f[o],i=f[o+1],l=f[o+2],u=f[o+3];let F=a*r+y*i+b*l,M=p*r+g*i+m*l,N=B*r+h*i+S*l;if(z){const t=F*F+M*M+N*N;if(t<k&&t>O){const e=1/Math.sqrt(t);F*=e,M*=e,N*=e}}for(let t=0;t<n;++t)c[s+0]=F,c[s+1]=M,c[s+2]=N,c[s+3]=u,s+=d}}function y(t,e,f,o,r,s=1){const n=o.typedBuffer,i=o.typedBufferStride,c=t.length;if(r*=i,1===s){if(4===f)for(let l=0;l<c;++l){const f=4*t[l];n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=e[f+3],r+=i}else if(3===f)for(let l=0;l<c;++l){const f=3*t[l];n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=255,r+=i}}else if(4===f)for(let l=0;l<c;++l){const f=4*t[l];for(let t=0;t<s;++t)n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=e[f+3],r+=i}else if(3===f)for(let l=0;l<c;++l){const f=3*t[l];for(let t=0;t<s;++t)n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=255,r+=i}}function g(t,c,l,d,u,g){for(const h of c.fieldNames){const c=t.vertexAttributes.get(h),b=t.indices.get(h);if(c&&b)switch(h){case n.POSITION:{s(3===c.size);const t=u.getField(h,r);t&&a(b,c.data,l,t,g);break}case n.NORMAL:{s(3===c.size);const t=u.getField(h,r);t&&p(b,c.data,d,t,g);break}case n.UV0:{s(2===c.size);const t=u.getField(h,o);t&&i(b,c.data,t,g);break}case n.COLOR:{s(3===c.size||4===c.size);const t=u.getField(h,f);t&&y(b,c.data,c.size,t,g);break}case n.SYMBOLCOLOR:{s(3===c.size||4===c.size);const t=u.getField(h,f);t&&y(b,c.data,c.size,t,g);break}case n.TANGENT:{s(4===c.size);const t=u.getField(h,e);t&&B(b,c.data,d,t,g);break}}}}export{d as writeBufferMat3f,u as writeBufferMat4f,i as writeBufferVec2,c as writeBufferVec3,l as writeBufferVec4,y as writeColor,g as writeDefaultAttributes,p as writeNormal,a as writePosition,B as writeTangent};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{f as e}from"../../../../../chunks/vec2f64.js";import{
|
|
5
|
+
import{f as e}from"../../../../../chunks/vec2f64.js";import{DefaultMaterialParameters as t}from"../../lib/Material.js";const r={waveStrength:.06,waveTextureRepeat:32,waveDirection:e(1,0),waveVelocity:.05,flowStrength:.015,flowOffset:-.5,animationSpeed:.35,color:[0,0,0,0],transparent:!0,writeDepth:!0,slicePlaneEnabled:!1,isDraped:!1,receiveShadows:!0,ssrEnabled:!1,...t},a={"calm-small":{waveStrength:.005,perturbationStrength:.02,textureRepeat:12,waveVelocity:.01},"rippled-small":{waveStrength:.02,perturbationStrength:.09,textureRepeat:32,waveVelocity:.07},"slight-small":{waveStrength:.05,perturbationStrength:.07,textureRepeat:28,waveVelocity:.1},"moderate-small":{waveStrength:.075,perturbationStrength:.07,textureRepeat:24,waveVelocity:.1},"calm-medium":{waveStrength:.003125,perturbationStrength:.01,textureRepeat:8,waveVelocity:.02},"rippled-medium":{waveStrength:.035,perturbationStrength:.015,textureRepeat:12,waveVelocity:.07},"slight-medium":{waveStrength:.06,perturbationStrength:.015,textureRepeat:8,waveVelocity:.12},"moderate-medium":{waveStrength:.09,perturbationStrength:.03,textureRepeat:4,waveVelocity:.12},"calm-large":{waveStrength:.01,perturbationStrength:0,textureRepeat:4,waveVelocity:.05},"rippled-large":{waveStrength:.025,perturbationStrength:.01,textureRepeat:8,waveVelocity:.11},"slight-large":{waveStrength:.06,perturbationStrength:.02,textureRepeat:3,waveVelocity:.13},"moderate-large":{waveStrength:.14,perturbationStrength:.03,textureRepeat:2,waveVelocity:.15}};export{r as defaultWaterMaterialParameters,a as wavePresets};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{someMap as e}from"../../../../../core/MapUtils.js";import{isSome as t,isNone as r}from"../../../../../core/maybe.js";import s from"../../../../../core/PooledArray.js";import{m as i,a,t as o}from"../../../../../chunks/mat4.js";import{c as n}from"../../../../../chunks/mat4f64.js";import{glLayout as d}from"../../../support/buffer/glUtil.js";import{GLMaterials as h}from"../../lib/GLMaterials.js";import{RenderOccludedFlag as
|
|
5
|
+
import{someMap as e}from"../../../../../core/MapUtils.js";import{isSome as t,isNone as r}from"../../../../../core/maybe.js";import s from"../../../../../core/PooledArray.js";import{m as i,a,t as o}from"../../../../../chunks/mat4.js";import{c as n}from"../../../../../chunks/mat4f64.js";import{glLayout as d}from"../../../support/buffer/glUtil.js";import{GLMaterials as h}from"../../lib/GLMaterials.js";import{RenderOccludedFlag as f}from"../../lib/Material.js";import{ModelDirty as l}from"../../lib/ModelDirtyTypes.js";import{RenderPass as m}from"../../lib/RenderPass.js";import{assert as c,setMatrixTranslation3 as u}from"../../lib/Util.js";import{WaterMaterial as g}from"../WaterMaterial.js";import{sortInstancesByRange as _,BufferRange as p,Instance as b,addOrMerge as w}from"./Instance.js";import{MergedGeometryBuffer as y}from"./MergedGeometryBuffer.js";import{MergedGeometryBufferPool as C}from"./MergedGeometryBufferPool.js";import{calculateTransformRelativeToOrigin as H}from"./utils.js";class v{constructor(e,t,r){this._rctx=e,this._materialRepository=t,this._material=r,this.type="MergedRenderer",this._dataByOrigin=new Map,this._renderCommandData=new s,this._hasHighlights=!1,this._hasOccludees=!1,this._glMaterials=new h(this._material,this._materialRepository),this._bufferWriter=r.createBufferWriter(),this._bufferPool=new C(e,r.vertexAttributeLocations,d(this._bufferWriter.vertexBufferLayout))}dispose(){this._glMaterials.destroy(),this._dataByOrigin.forEach((e=>e.buffer.dispose())),this._dataByOrigin.clear(),this._bufferPool.dispose()}get isEmpty(){return 0===this._dataByOrigin.size}get hasHighlights(){return this._hasHighlights}get hasOccludees(){return this._hasOccludees}get hasWater(){return!this.isEmpty&&this._material instanceof g}get rendersOccluded(){return!this.isEmpty&&this._material.renderOccluded!==f.Occlude}modify(e){this._updateGeometries(e.updates),this._addAndRemoveGeometries(e.adds,e.removes),this._updateRenderCommands()}_addAndRemoveGeometries(e,t){const r=this._bufferWriter,s=r.vertexBufferLayout.stride/4,i=this._dataByOrigin,a=A(e,t);a.forEach(((e,t)=>{a.delete(t);const o=e.toAdd.reduce(((e,t)=>e+r.elementCount(t.data)),0);let n=i.get(t);if(null==n)c(0===e.toRemove.length),n=new B(e.origin,new y(this._bufferPool,o*s)),i.set(t,n);else if(0===e.toAdd.length&&n.instances.size===e.toRemove.length)return n.buffer.dispose(),void i.delete(t);let d=0;n.instances.forEach((e=>d+=e.to-e.from));const h=e.toRemove.reduce(((e,t)=>e+r.elementCount(t.data)),0),f=n.buffer.size,l=(d+o-h)*s,m=M;if(l<f/2?this._removeAndRebuild(n,e.toRemove,s,l,m):e.toRemove.length>0&&this._remove(n,e.toRemove,s,m),e.toAdd.length>0){const t=E;u(t,-e.origin[0],-e.origin[1],-e.origin[2]),this._add(n,e.toAdd,s,t,m)}const g=n.buffer.vao.vertexBuffers.geometry;I(m),m.forAll((({from:e,to:t})=>{if(e<t){const r=n.buffer.array,s=4,i=e*s,a=t*s;g.setSubData(r,i,i,a)}})),m.clear(),n.drawCommandsDirty=!0}))}_updateGeometries(e){const t=this._bufferWriter,r=t.vertexBufferLayout.stride/4;for(const s of e){const e=s.renderGeometry,i=this._dataByOrigin.get(e.origin.id),a=i&&i.instances.get(e.id);if(!a)return;const o=s.updateType;if(o&l.State.VISIBILITIES&&(a.isVisible=e.instanceParameters.visible),o&(l.State.HIGHLIGHTS|l.State.VISIBILITIES)){const t=e.instanceParameters.visible;a.hasHighlights=!!e.instanceParameters.highlights&&t}if(o&l.State.OCCLUDEES&&(a.hasOccludees=!!e.instanceParameters.occludees),o&(l.State.VERTEXATTRS|l.State.TRANSFORMATION)){const{array:s,vao:o}=i.buffer;H(e,L,P),t.write({transformation:L,invTranspTransformation:P},e.data,t.vertexBufferLayout.createView(s.buffer),a.from),c(a.from+t.elementCount(e.data)===a.to,"material VBO layout has changed"),o.vertexBuffers.geometry.setSubData(s,a.from*r*4,a.from*r*4,a.to*r*4)}i.drawCommandsDirty=!0}}_updateRenderCommands(){this._hasHighlights=!1,this._hasOccludees=!1,this._dataByOrigin.forEach((t=>{t.hasHiddenInstances=!1,t.hasHighlights=!1,t.hasOccludees=!1,e(t.instances,(e=>(e.isVisible?(e.hasHighlights&&(this._hasHighlights=!0,t.hasHighlights=!0),e.hasOccludees&&(this._hasOccludees=!0,t.hasOccludees=!0)):t.hasHiddenInstances=!0,t.hasHiddenInstances&&t.hasHighlights&&t.hasOccludees)))}));const t=e=>{if(e.drawCommandsDefault=null,e.drawCommandsHighlight=null,e.drawCommandsOccludees=null,e.drawCommandsShadowHighlightRest=null,0===e.instances.size)return;if(!S(e)){const t=this._bufferWriter.vertexBufferLayout.stride,r=4*e.buffer.size/t;return void(e.drawCommandsDefault=[{first:0,count:r}])}const t=_(e.instances);e.drawCommandsDefault=[],e.drawCommandsHighlight=[],e.drawCommandsOccludees=[],e.drawCommandsShadowHighlightRest=[];for(const r of t)r.isVisible&&(r.hasOccludees?w(e.drawCommandsOccludees,r):w(e.drawCommandsDefault,r),r.hasHighlights?w(e.drawCommandsHighlight,r):w(e.drawCommandsShadowHighlightRest,r))};this._dataByOrigin.forEach((e=>{e.drawCommandsDirty&&(t(e),e.drawCommandsDirty=!1)}))}updateAnimation(e){return this._material.update(e)}requiresSlot(e,t){return null==e||this._material.requiresSlot(e,t)}render(e,s,i){if(!this.requiresSlot(e,s))return!1;const a=s===m.MATERIAL_HIGHLIGHT||s===m.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT;if(a&&!this._hasHighlights)return!1;const o=s===m.MATERIAL_DEPTH_SHADOWMAP_DEFAULT,n=!(a||o);if(this._dataByOrigin.forEach((e=>{if(a&&!e.hasHighlights)return;const r=(a?e.drawCommandsHighlight:o&&S(e)?e.drawCommandsShadowHighlightRest:e.drawCommandsDefault)||null,s=n&&e.drawCommandsOccludees||null;(t(r)||t(s))&&this._renderCommandData.push(new T(e.origin,e.buffer,r,s))})),0===this._renderCommandData.length)return!1;const d=this._rctx,h=this._glMaterials.load(d,s);if(r(h))return this._renderCommandData.clear(),!1;const f=h.beginSlot(i);return d.useTechnique(f,e,!1),h.bind(i,f),this._renderCommandData.forAll((({origin:r,buffer:s,renderCommands:a,occludeeCommands:o})=>{i.origin=r,f.bindDraw(i),f.ensureAttributeLocations(s.vao),d.bindVAO(s.vao);const n=f.primitiveType;t(a)&&this._renderCommands(d,n,a),t(o)&&(f.bindPipelineState(d,e,!0),this._renderCommands(d,n,o),f.bindPipelineState(d,e,!1))})),this._renderCommandData.clear(),!0}_renderCommands(e,t,r){for(let s=0;s<r.length;s++)e.drawArrays(t,r[s].first,r[s].count)}_removeAndRebuild(e,t,r,s,i){for(const h of t)e.instances.delete(h.id);const a=_(e.instances);e.instances.clear();const o=e.buffer.size,n=e.buffer.alloc(s);let d=0;for(const h of a){const t=h.from*r,s=h.to*r;n.copy(d,t,s),h.from=d/r,d+=s-t,h.to=d/r,e.instances.set(h.id,h)}i.push(new p(0,n.hasNewBuffer?e.buffer.array.length:o)),n.dispose(),e.buffer.erase(d,i.back().to),e.holes.clear()}_remove(e,t,r,s){for(const i of t){const t=i.id,a=e.instances.get(t),o=a.from*r,n=a.to*r;e.buffer.erase(o,n),e.holes.push(new p(a.from,a.to)),e.instances.delete(t),s.push(new p(o,n))}I(e.holes)}_add(e,s,n,d,h){const f=this._bufferWriter;let l=f.vertexBufferLayout.createView(e.buffer.array.buffer);for(const m of s){const s=t(m.transformation)?i(L,d,m.transformation):d;a(P,s);const u=o(P,P),g=f.elementCount(m.data),_=g*n;let w=D(e.holes,g);r(w)&&(w=e.buffer.size/n,e.buffer.grow(_),l=f.vertexBufferLayout.createView(e.buffer.array.buffer)),f.write({transformation:s,invTranspTransformation:u},m.data,l,w);const y=m.instanceParameters.visible,C=!!m.instanceParameters.highlights&&y,H=!!m.instanceParameters.occludees,v=new b(m.id,w,w+g,y,C,H);c(null==e.instances.get(m.id)),e.instances.set(m.id,v),h.push(new p(v.from*n,v.to*n))}}get test(){return{material:this._material,glMaterials:this._glMaterials}}}class O{constructor(e){this.origin=e,this.toAdd=new Array,this.toRemove=new Array}}function A(e,t){const r=new Map;for(const s of e)R(r,s,!0);for(const s of t)R(r,s,!1);return r}function R(e,t,s){const i=t.origin;if(r(i))return;let a=e.get(i.id);null==a&&(a=new O(i.vec3),e.set(i.id,a)),s?a.toAdd.push(t):a.toRemove.push(t)}function S(e){return e.hasOccludees||e.hasHighlights||e.hasHiddenInstances}function D(e,t){let r;if(!e.some((e=>!(e.to-e.from<t)&&(r=e,!0))))return null;const s=r.from;return r.from+=t,r.from>=r.to&&e.removeUnordered(r),s}function I(e){const t=new Map;e.forAll((e=>t.set(e.from,e)));let r=!0;for(;r;)r=!1,e.forEach((s=>{const i=t.get(s.to);i&&(s.to=i.to,t.delete(i.from),e.removeUnordered(i),r=!0)}))}class B{constructor(e,t){this.origin=e,this.buffer=t,this.instances=new Map,this.holes=new s({deallocator:null}),this.hasHiddenInstances=!1,this.hasHighlights=!1,this.hasOccludees=!1,this.drawCommandsDirty=!1}}class T{constructor(e,t,r,s){this.origin=e,this.buffer=t,this.renderCommands=r,this.occludeeCommands=s}}const M=new s({deallocator:null}),E=n(),L=n(),P=n();export{v as MergedRenderer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/
|
|
5
|
+
import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as build}from"../../../../chunks/CheckerBoard.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../../../chunks/tslib.es6.js";import{bindMultipassTerrainTexture as e}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as t,bindView as o}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as a,ShaderTechniqueConfiguration as n}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as p}from"../lib/basicInterfaces.js";import{Default3D as l}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as c,oitDepthTest as m,oitDepthWrite as d}from"../lib/OrderIndependentTransparency.js";import{Program as h}from"../lib/Program.js";import{C as u}from"../../../../chunks/CheckerBoard.glsl.js";import{BlendFactor as f}from"../../../webgl/enums.js";import{separateBlendingParams as g,makePipelineState as b,defaultDepthWriteParams as y,defaultColorWriteParams as T}from"../../../webgl/renderState.js";class v extends s{initializeProgram(r){const e=v.shader.get(),t=this.configuration,o=e.build({
|
|
5
|
+
import{_ as r}from"../../../../chunks/tslib.es6.js";import{bindMultipassTerrainTexture as e}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as t,bindView as o}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as a,ShaderTechniqueConfiguration as n}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as p}from"../lib/basicInterfaces.js";import{Default3D as l}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as c,oitDepthTest as m,oitDepthWrite as d}from"../lib/OrderIndependentTransparency.js";import{Program as h}from"../lib/Program.js";import{C as u}from"../../../../chunks/CheckerBoard.glsl.js";import{BlendFactor as f}from"../../../webgl/enums.js";import{separateBlendingParams as g,makePipelineState as b,defaultDepthWriteParams as y,defaultColorWriteParams as T}from"../../../webgl/renderState.js";class v extends s{initializeProgram(r){const e=v.shader.get(),t=this.configuration,o=e.build({oitEnabled:t.transparencyPassType===p.Color,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new h(r.rctx,o,l)}bindPass(r,o){t(this.program,o.camera.projectionMatrix),this.program.setUniform2fv("size",r.size),this.program.setUniform4fv("color1",r.color1),this.program.setUniform4fv("color2",r.color2),o.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",o.camera.nearFar),this.program.setUniform2fv("inverseViewport",o.inverseViewport),e(this.program,o))}bindDraw(r){o(this.program,r)}_setPipelineState(r){const e=this.configuration,t=r===p.NONE,o=r===p.FrontFace;return b({blending:e.transparent?t?P:c(r):null,depthTest:{func:m(r)},depthWrite:t?e.writeDepth&&y:d(r),colorWrite:T,polygonOffset:t||o?e.polygonOffset&&j:{factor:-1,units:-25}})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}v.shader=new i(u,(()=>import("./CheckerBoard.glsl.js")));const j={factor:0,units:-25},P=g(f.SRC_ALPHA,f.ONE,f.ONE_MINUS_SRC_ALPHA,f.ONE_MINUS_SRC_ALPHA);class w extends n{constructor(){super(...arguments),this.transparent=!1,this.writeDepth=!0,this.polygonOffset=!1,this.transparencyPassType=p.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}r([a()],w.prototype,"transparent",void 0),r([a()],w.prototype,"writeDepth",void 0),r([a()],w.prototype,"polygonOffset",void 0),r([a({count:p.COUNT})],w.prototype,"transparencyPassType",void 0),r([a()],w.prototype,"multipassTerrainEnabled",void 0),r([a()],w.prototype,"cullAboveGround",void 0);export{v as CheckerBoardTechnique,w as CheckerBoardTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/
|
|
5
|
+
import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as build}from"../../../../chunks/ColorMaterial.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as t}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as r}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as i}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as o}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as s,bindView as a}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as n}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as p,ShaderTechniqueConfiguration as c}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,TransparencyPassType as h}from"../lib/basicInterfaces.js";import{Default3D as d}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as m,oitBlending as f,oitDepthTest as g,getOITPolygonOffset as b}from"../lib/OrderIndependentTransparency.js";import{Program as y}from"../lib/Program.js";import{stencilWriteMaskOn as T,stencilToolMaskBaseParams as v,stencilBaseAllZerosParams as P}from"../lib/StencilUtils.js";import{C as O}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as j,cullingParams as C,defaultDepthWriteParams as E,defaultColorWriteParams as x}from"../../../webgl/renderState.js";class S extends l{initializeProgram(e){const t=S.shader.get(),r=this.configuration,i=t.build({output:r.output,oitEnabled:r.transparencyPassType===h.Color,attributeColor:r.vertexColors,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new y(e.rctx,i,d)}bindPass(e,r){s(this.program,r.camera.projectionMatrix),this.program.setUniform4fv("eColor",e.color),this.configuration.output===t.Highlight&&i(this.program,r),(this.configuration.output===t.Depth||r.multipassTerrainEnabled)&&this.program.setUniform2fv("nearFar",r.camera.nearFar),r.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",r.inverseViewport),o(this.program,r))}bindDraw(e){a(this.program,e),this.program.rebindTextures(),r(this.program,this.configuration,e)}_createPipeline(e,r){const i=this.configuration,o=e===h.NONE,s=e===h.FrontFace;return j({blending:i.output!==t.Color&&i.output!==t.Alpha||!i.transparent?null:o?m:f(e),culling:C(i.cullFace),depthTest:{func:g(e)},depthWrite:o||s?i.writeDepth&&E:null,colorWrite:x,stencilWrite:i.sceneHasOcludees?T:null,stencilTest:i.sceneHasOcludees?r?v:P:null,polygonOffset:o||s?i.polygonOffset&&w:b(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._createPipeline(this.configuration.transparencyPassType,!0),this._createPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}S.shader=new n(O,(()=>import("./ColorMaterial.glsl.js")));const w={factor:1,units:1};class F extends c{constructor(){super(...arguments),this.output=t.Color,this.cullFace=u.None,this.slicePlaneEnabled=!1,this.vertexColors=!1,this.transparent=!1,this.polygonOffset=!1,this.enableOffset=!0,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparencyPassType=h.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([p({count:t.COUNT})],F.prototype,"output",void 0),e([p({count:u.COUNT})],F.prototype,"cullFace",void 0),e([p()],F.prototype,"slicePlaneEnabled",void 0),e([p()],F.prototype,"vertexColors",void 0),e([p()],F.prototype,"transparent",void 0),e([p()],F.prototype,"polygonOffset",void 0),e([p()],F.prototype,"enableOffset",void 0),e([p()],F.prototype,"writeDepth",void 0),e([p()],F.prototype,"sceneHasOcludees",void 0),e([p({count:h.COUNT})],F.prototype,"transparencyPassType",void 0),e([p()],F.prototype,"multipassTerrainEnabled",void 0),e([p()],F.prototype,"cullAboveGround",void 0);export{S as ColorMaterialTechnique,F as ColorMaterialTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../ViewingMode.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Offset.glsl.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/PositionAttribute.glsl.js";import"../core/shaderLibrary/attributes/SymbolColor.glsl.js";import"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import"../core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/shading/Normals.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/HeaderComment.glsl.js";import"../core/shaderLibrary/util/MixExternalColor.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/
|
|
5
|
+
import"../../../ViewingMode.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Offset.glsl.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/PositionAttribute.glsl.js";import"../core/shaderLibrary/attributes/SymbolColor.glsl.js";import"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import"../core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/shading/Normals.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/HeaderComment.glsl.js";import"../core/shaderLibrary/util/MixExternalColor.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as build}from"../../../../chunks/DefaultMaterial.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Logger.js";import{isSome as t}from"../../../../core/maybe.js";import{f as o}from"../../../../chunks/vec3f64.js";import{ShaderOutput as i}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as s}from"../core/shaderLibrary/Slice.glsl.js";import{bindCustomOrigin as a}from"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as n}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as l}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindVerticalOffsetUniforms as p}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{bindOutputHighlight as c}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as u}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as h}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as d,bindPBRUniforms as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapViewCustomOrigin as f}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindVisualVariablesUniformsForSymbols as g}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{doublePrecisionRequiresObfuscation as v}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{bindProjectionMatrix as b,bindViewCustomOrigin as y,bindCameraPosition as T}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as x}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as M}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as P,ShaderTechniqueConfiguration as S}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as C,CullFaceOptions as O,TransparencyPassType as D}from"../lib/basicInterfaces.js";import{Default3D as A}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as j,oitBlending as w,oitDepthTest as N,getOITPolygonOffset as E}from"../lib/OrderIndependentTransparency.js";import{Program as U}from"../lib/Program.js";import{stencilWriteMaskOn as L,stencilToolMaskBaseParams as z,stencilBaseAllZerosParams as R}from"../lib/StencilUtils.js";import{colorMixModes as H,bindScreenSizePerspective as F}from"../materials/internal/MaterialUtil.js";import{D as B}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as I,cullingParams as k,defaultDepthWriteParams as q,defaultColorWriteParams as V}from"../../../webgl/renderState.js";const _=r.getLogger("esri.views.3d.webgl-engine.shaders.DefaultTechnique");class G extends M{initializeProgram(e){const r=G.shader.get(),t=this.configuration,o=r.build({OITEnabled:t.transparencyPassType===D.Color,output:t.output,viewingMode:e.viewingMode,receiveShadows:t.receiveShadows,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:t.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:t.symbolColors,vvSize:t.vvSize,vvColor:t.vvColor,vvInstancingEnabled:!0,instanced:t.instanced,instancedColor:t.instancedColor,instancedDoublePrecision:t.instancedDoublePrecision,pbrMode:t.usePBR?t.isSchematic?d.Schematic:d.Normal:d.Disabled,hasMetalnessAndRoughnessTexture:t.hasMetalnessAndRoughnessTexture,hasEmissionTexture:t.hasEmissionTexture,hasOcclusionTexture:t.hasOcclusionTexture,hasNormalTexture:t.hasNormalTexture,hasColorTexture:t.hasColorTexture,hasModelTransformation:t.hasModelTransformation,receiveAmbientOcclusion:t.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:t.normalsTypeDerivate?n.Type.ScreenDerivative:n.Type.Attribute,doubleSidedMode:t.doubleSidedMode,vertexTangents:t.vertexTangents,attributeTextureCoordinates:t.hasMetalnessAndRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture||t.hasColorTexture?l.AttributeType.Default:l.AttributeType.None,textureAlphaPremultiplied:t.textureAlphaPremultiplied,attributeColor:t.vertexColors,screenSizePerspectiveEnabled:t.screenSizePerspective,verticalOffsetEnabled:t.verticalOffset,offsetBackfaces:t.offsetBackfaces,doublePrecisionRequiresObfuscation:v(e.rctx),alphaDiscardMode:t.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new U(e.rctx,o,A)}bindPass(e,r){var o,s;b(this.program,r.camera.projectionMatrix);const a=this.configuration.output;this.configuration.hasModelTransformation&&(t(e.modelTransformation)?this.program.setUniformMatrix4fv("model",e.modelTransformation):_.warnOnce("hasModelTransformation true, but no modelTransformation found.")),(this.configuration.output===i.Depth||r.multipassTerrainEnabled||a===i.Shadow)&&this.program.setUniform2fv("cameraNearFar",r.camera.nearFar),r.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",r.inverseViewport),u(this.program,r)),a===i.Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode])),a===i.Color?(r.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&m(this.program,e,this.configuration.isSchematic)):a===i.Highlight&&c(this.program,r),g(this.program,e),p(this.program,e,r),F(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==C.Mask&&e.textureAlphaMode!==C.MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(o=r.shadowMap)||o.bind(this.program),null==(s=r.ssaoHelper)||s.bind(this.program,r.camera)}bindDraw(e){const r=this.configuration.instancedDoublePrecision?o(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;y(this.program,r,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===i.Color||this.configuration.output===i.Alpha||this.configuration.output===i.Depth&&this.configuration.screenSizePerspective||this.configuration.output===i.Normal&&this.configuration.screenSizePerspective||this.configuration.output===i.Highlight&&this.configuration.screenSizePerspective)&&T(this.program,r,e.camera.viewInverseTransposeMatrix),this.configuration.output===i.Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&a(this.program,r),s(this.program,this.configuration,e.slicePlane,r),this.configuration.output===i.Color&&f(this.program,e,r)}_setPipeline(e,r){const t=this.configuration,o=e===D.NONE,s=e===D.FrontFace;return I({blending:t.output!==i.Color&&t.output!==i.Alpha||!t.transparent?null:o?j:w(e),culling:W(t)&&k(t.cullFace),depthTest:{func:N(e)},depthWrite:o||s?t.writeDepth&&q:null,colorWrite:V,stencilWrite:t.sceneHasOcludees?L:null,stencilTest:t.sceneHasOcludees?r?z:R:null,polygonOffset:o||s?null:E(t.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,r){return r?this._occludeePipelineState:super.getPipelineState(e,r)}}function W(e){return e.cullFace?e.cullFace!==O.None:!e.slicePlaneEnabled&&(!e.transparent&&!e.doubleSidedMode)}G.shader=new x(B,(()=>import("./DefaultMaterial.glsl.js")));class J extends S{constructor(){super(...arguments),this.output=i.Color,this.alphaDiscardMode=C.Opaque,this.doubleSidedMode=h.DoubleSidedMode.None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=O.None,this.transparencyPassType=D.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.hasModelTransformation=!1}}e([P({count:i.COUNT})],J.prototype,"output",void 0),e([P({count:C.COUNT})],J.prototype,"alphaDiscardMode",void 0),e([P({count:h.DoubleSidedMode.COUNT})],J.prototype,"doubleSidedMode",void 0),e([P()],J.prototype,"isSchematic",void 0),e([P()],J.prototype,"vertexColors",void 0),e([P()],J.prototype,"offsetBackfaces",void 0),e([P()],J.prototype,"symbolColors",void 0),e([P()],J.prototype,"vvSize",void 0),e([P()],J.prototype,"vvColor",void 0),e([P()],J.prototype,"verticalOffset",void 0),e([P()],J.prototype,"receiveShadows",void 0),e([P()],J.prototype,"slicePlaneEnabled",void 0),e([P()],J.prototype,"sliceHighlightDisabled",void 0),e([P()],J.prototype,"receiveAmbientOcclusion",void 0),e([P()],J.prototype,"screenSizePerspective",void 0),e([P()],J.prototype,"textureAlphaPremultiplied",void 0),e([P()],J.prototype,"hasColorTexture",void 0),e([P()],J.prototype,"usePBR",void 0),e([P()],J.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([P()],J.prototype,"hasEmissionTexture",void 0),e([P()],J.prototype,"hasOcclusionTexture",void 0),e([P()],J.prototype,"hasNormalTexture",void 0),e([P()],J.prototype,"instanced",void 0),e([P()],J.prototype,"instancedColor",void 0),e([P()],J.prototype,"instancedDoublePrecision",void 0),e([P()],J.prototype,"vertexTangents",void 0),e([P()],J.prototype,"normalsTypeDerivate",void 0),e([P()],J.prototype,"writeDepth",void 0),e([P()],J.prototype,"sceneHasOcludees",void 0),e([P()],J.prototype,"transparent",void 0),e([P()],J.prototype,"enableOffset",void 0),e([P({count:O.COUNT})],J.prototype,"cullFace",void 0),e([P({count:D.COUNT})],J.prototype,"transparencyPassType",void 0),e([P()],J.prototype,"multipassTerrainEnabled",void 0),e([P()],J.prototype,"cullAboveGround",void 0),e([P()],J.prototype,"hasModelTransformation",void 0);export{G as DefaultMaterialTechnique,J as DefaultMaterialTechniqueConfiguration};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Logger.js";import{isSome as t}from"../../../../core/maybe.js";import{f as o}from"../../../../chunks/vec3f64.js";import{ShaderOutput as i}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as s}from"../core/shaderLibrary/Slice.glsl.js";import{bindCustomOrigin as a}from"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttributeType as n}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttributeType as l}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindVerticalOffsetUniforms as p}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{bindOutputHighlight as c}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as u}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{NormalsDoubleSidedMode as h}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as d,bindPBRUniforms as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapViewCustomOrigin as f}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindVisualVariablesUniformsForSymbols as g}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{doublePrecisionRequiresObfuscation as v}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{bindProjectionMatrix as b,bindViewCustomOrigin as y,bindCameraPosition as T}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as x}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as M}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as P,ShaderTechniqueConfiguration as C}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as S,CullFaceOptions as O,TransparencyPassType as D}from"../lib/basicInterfaces.js";import{Default3D as j}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as A,oitBlending as w,oitDepthTest as E,getOITPolygonOffset as N}from"../lib/OrderIndependentTransparency.js";import{Program as U}from"../lib/Program.js";import{stencilWriteMaskOn as L,stencilToolMaskBaseParams as z,stencilBaseAllZerosParams as R}from"../lib/StencilUtils.js";import{colorMixModes as H,bindScreenSizePerspective as F}from"../materials/internal/MaterialUtil.js";import{D as B}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as k,cullingParams as I,defaultDepthWriteParams as q,defaultColorWriteParams as V}from"../../../webgl/renderState.js";const _=r.getLogger("esri.views.3d.webgl-engine.shaders.DefaultTechnique");class G extends M{initializeProgram(e){const r=G.shader.get(),t=this.configuration,o=r.build({oitEnabled:t.transparencyPassType===D.Color,output:t.output,viewingMode:e.viewingMode,receiveShadows:t.receiveShadows,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:t.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:t.symbolColors,vvSize:t.vvSize,vvColor:t.vvColor,vvInstancingEnabled:!0,instanced:t.instanced,instancedColor:t.instancedColor,instancedDoublePrecision:t.instancedDoublePrecision,pbrMode:t.usePBR?t.isSchematic?d.Schematic:d.Normal:d.Disabled,hasMetalnessAndRoughnessTexture:t.hasMetalnessAndRoughnessTexture,hasEmissionTexture:t.hasEmissionTexture,hasOcclusionTexture:t.hasOcclusionTexture,hasNormalTexture:t.hasNormalTexture,hasColorTexture:t.hasColorTexture,hasModelTransformation:t.hasModelTransformation,receiveAmbientOcclusion:t.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:t.normalsTypeDerivate?n.ScreenDerivative:n.Attribute,doubleSidedMode:t.doubleSidedMode,vertexTangents:t.vertexTangents,attributeTextureCoordinates:t.hasMetalnessAndRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture||t.hasColorTexture?l.Default:l.None,textureAlphaPremultiplied:t.textureAlphaPremultiplied,attributeColor:t.vertexColors,screenSizePerspectiveEnabled:t.screenSizePerspective,verticalOffsetEnabled:t.verticalOffset,offsetBackfaces:t.offsetBackfaces,doublePrecisionRequiresObfuscation:v(e.rctx),alphaDiscardMode:t.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new U(e.rctx,o,j)}bindPass(e,r){var o,s;b(this.program,r.camera.projectionMatrix);const a=this.configuration.output;this.configuration.hasModelTransformation&&(t(e.modelTransformation)?this.program.setUniformMatrix4fv("model",e.modelTransformation):_.warnOnce("hasModelTransformation true, but no modelTransformation found.")),(this.configuration.output===i.Depth||r.multipassTerrainEnabled||a===i.Shadow)&&this.program.setUniform2fv("nearFar",r.camera.nearFar),r.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",r.inverseViewport),u(this.program,r)),a===i.Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode])),a===i.Color?(r.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&m(this.program,e,this.configuration.isSchematic)):a===i.Highlight&&c(this.program,r),g(this.program,e),p(this.program,e,r),F(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==S.Mask&&e.textureAlphaMode!==S.MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(o=r.shadowMap)||o.bind(this.program),null==(s=r.ssaoHelper)||s.bind(this.program,r.camera)}bindDraw(e){const r=this.configuration.instancedDoublePrecision?o(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;y(this.program,r,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===i.Color||this.configuration.output===i.Alpha||this.configuration.output===i.Depth&&this.configuration.screenSizePerspective||this.configuration.output===i.Normal&&this.configuration.screenSizePerspective||this.configuration.output===i.Highlight&&this.configuration.screenSizePerspective)&&T(this.program,r,e.camera.viewInverseTransposeMatrix),this.configuration.output===i.Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&a(this.program,r),s(this.program,this.configuration,e.slicePlane,r),this.configuration.output===i.Color&&f(this.program,e,r)}_setPipeline(e,r){const t=this.configuration,o=e===D.NONE,s=e===D.FrontFace;return k({blending:t.output!==i.Color&&t.output!==i.Alpha||!t.transparent?null:o?A:w(e),culling:W(t)&&I(t.cullFace),depthTest:{func:E(e)},depthWrite:o||s?t.writeDepth&&q:null,colorWrite:V,stencilWrite:t.sceneHasOcludees?L:null,stencilTest:t.sceneHasOcludees?r?z:R:null,polygonOffset:o||s?null:N(t.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,r){return r?this._occludeePipelineState:super.getPipelineState(e,r)}}function W(e){return e.cullFace?e.cullFace!==O.None:!e.slicePlaneEnabled&&(!e.transparent&&!e.doubleSidedMode)}G.shader=new x(B,(()=>import("./DefaultMaterial.glsl.js")));class J extends C{constructor(){super(...arguments),this.output=i.Color,this.alphaDiscardMode=S.Opaque,this.doubleSidedMode=h.None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=O.None,this.transparencyPassType=D.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.hasModelTransformation=!1}}e([P({count:i.COUNT})],J.prototype,"output",void 0),e([P({count:S.COUNT})],J.prototype,"alphaDiscardMode",void 0),e([P({count:h.COUNT})],J.prototype,"doubleSidedMode",void 0),e([P()],J.prototype,"isSchematic",void 0),e([P()],J.prototype,"vertexColors",void 0),e([P()],J.prototype,"offsetBackfaces",void 0),e([P()],J.prototype,"symbolColors",void 0),e([P()],J.prototype,"vvSize",void 0),e([P()],J.prototype,"vvColor",void 0),e([P()],J.prototype,"verticalOffset",void 0),e([P()],J.prototype,"receiveShadows",void 0),e([P()],J.prototype,"slicePlaneEnabled",void 0),e([P()],J.prototype,"sliceHighlightDisabled",void 0),e([P()],J.prototype,"receiveAmbientOcclusion",void 0),e([P()],J.prototype,"screenSizePerspective",void 0),e([P()],J.prototype,"textureAlphaPremultiplied",void 0),e([P()],J.prototype,"hasColorTexture",void 0),e([P()],J.prototype,"usePBR",void 0),e([P()],J.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([P()],J.prototype,"hasEmissionTexture",void 0),e([P()],J.prototype,"hasOcclusionTexture",void 0),e([P()],J.prototype,"hasNormalTexture",void 0),e([P()],J.prototype,"instanced",void 0),e([P()],J.prototype,"instancedColor",void 0),e([P()],J.prototype,"instancedDoublePrecision",void 0),e([P()],J.prototype,"vertexTangents",void 0),e([P()],J.prototype,"normalsTypeDerivate",void 0),e([P()],J.prototype,"writeDepth",void 0),e([P()],J.prototype,"sceneHasOcludees",void 0),e([P()],J.prototype,"transparent",void 0),e([P()],J.prototype,"enableOffset",void 0),e([P({count:O.COUNT})],J.prototype,"cullFace",void 0),e([P({count:D.COUNT})],J.prototype,"transparencyPassType",void 0),e([P()],J.prototype,"multipassTerrainEnabled",void 0),e([P()],J.prototype,"cullAboveGround",void 0),e([P()],J.prototype,"hasModelTransformation",void 0);export{G as DefaultMaterialTechnique,J as DefaultMaterialTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../chunks/vec2.js";import"../../../../chunks/vec2f64.js";import"../../../../chunks/vec4f64.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/
|
|
5
|
+
import"../../../../chunks/vec2.js";import"../../../../chunks/vec2f64.js";import"../../../../chunks/vec4f64.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as bindHUDMaterialUniforms,a as build,c as calculateAnchorPosForRendering}from"../../../../chunks/HUDMaterial.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindVerticalOffsetUniforms as t}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{HUDSpace as o,bindHUDUniforms as s}from"../core/shaderLibrary/hud/HUD.glsl.js";import{bindOutputHighlight as a}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassGeometryTexture as n}from"../core/shaderLibrary/shading/MultipassGeometryTest.glsl.js";import{bindMultipassTerrainTexture as l}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindVisualVariablesUniforms as p}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{bindScreenSizePerspectiveUniforms as d}from"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{bindProjectionMatrix as c,bindViewport as u,bindView as h,bindCameraPosition as m}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as g}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as b}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as v}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as E}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as T}from"../lib/OrderIndependentTransparency.js";import{Program as O}from"../lib/Program.js";import{b as S,H as P}from"../../../../chunks/HUDMaterial.glsl.js";import{BlendFactor as j,CompareFunction as x,PrimitiveType as L}from"../../../webgl/enums.js";import{simpleBlendingParams as U,defaultDepthWriteParams as w,makePipelineState as D,defaultColorWriteParams as C}from"../../../webgl/renderState.js";class H extends b{initializeProgram(e){const r=H.shader.get(),i=this.configuration,t=r.build({output:i.output,
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindVerticalOffsetUniforms as t}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{HUDSpace as o,bindHUDUniforms as s}from"../core/shaderLibrary/hud/HUD.glsl.js";import{bindOutputHighlight as a}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassGeometryTexture as n}from"../core/shaderLibrary/shading/MultipassGeometryTest.glsl.js";import{bindMultipassTerrainTexture as l}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindVisualVariablesUniforms as p}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{bindScreenSizePerspectiveUniforms as d}from"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{bindProjectionMatrix as c,bindViewport as u,bindView as h,bindCameraPosition as m}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as g}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as b}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as v}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as E}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as T}from"../lib/OrderIndependentTransparency.js";import{Program as O}from"../lib/Program.js";import{b as S,H as P}from"../../../../chunks/HUDMaterial.glsl.js";import{BlendFactor as j,CompareFunction as x,PrimitiveType as L}from"../../../webgl/enums.js";import{simpleBlendingParams as U,defaultDepthWriteParams as w,makePipelineState as D,defaultColorWriteParams as C}from"../../../webgl/renderState.js";class H extends b{initializeProgram(e){const r=H.shader.get(),i=this.configuration,t=r.build({output:i.output,frontFacePass:i.transparencyPassType===y.FrontFace,viewingMode:e.viewingMode,occlusionTestEnabled:i.occlusionTestEnabled,signedDistanceFieldEnabled:i.sdf,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!0,debugDrawLabelBorder:i.debugDrawLabelBorder,binaryHighlightOcclusionEnabled:i.binaryHighlightOcclusion,screenCenterOffsetUnitsEnabled:i.screenCenterOffsetUnitsEnabled,screenSizePerspectiveEnabled:i.screenSizePerspective,verticalOffsetEnabled:i.verticalOffset,pixelSnappingEnabled:i.pixelSnappingEnabled,vvSize:i.vvSize,vvColor:i.vvColor,vvInstancingEnabled:!1,isDraped:i.isDraped,multipassGeometryEnabled:i.multipassGeometryEnabled,multipassTerrainEnabled:i.multipassTerrainEnabled,cullAboveGround:i.cullAboveGround});return new O(e.rctx,t,E)}bindPass(e,i){c(this.program,i.camera.projectionMatrix),this.program.setUniform1f("cameraGroundRelative",i.camera.aboveGround?1:-1),this.program.setUniform1f("perDistancePixelRatio",Math.tan(i.camera.fovY/2)/(i.camera.fullViewport[2]/2)),this.program.setUniformMatrix4fv("viewNormal",i.camera.viewInverseTransposeMatrix),this.program.setUniform1f("polygonOffset",e.shaderPolygonOffset),t(this.program,e,i),d(this.program,e),this.program.setUniform1f("pixelRatio",i.camera.pixelRatio||1),u(this.program,i),this.configuration.output===r.Occlusion?(this.program.setUniform2fv("nearFar",i.camera.nearFar),this.program.setUniform2fv("inverseViewport",i.inverseViewport),n(this.program,i),l(this.program,i)):(s(this.program,i),S(this.program,e,i.camera.pixelRatio||1),p(this.program,e),this.configuration.occlusionTestEnabled&&this.program.bindTexture(i.hudVisibilityTexture,"hudVisibilityTexture")),this.configuration.output===r.Highlight&&a(this.program,i)}bindDraw(e){h(this.program,e),m(this.program,e.origin,e.camera.viewInverseTransposeMatrix),i(this.program,this.configuration,e),this.program.rebindTextures()}_setPipelineState(e){const i=this.configuration,t=e===y.NONE,o=e===y.FrontFace,s=x.LEQUAL,a=this.configuration.polygonOffsetEnabled&&M,n=(t||o)&&i.output!==r.Highlight?(i.depthEnabled||i.output===r.Occlusion)&&w:null;return D({blending:i.output===r.Color||i.output===r.Alpha||i.output===r.Highlight?t?N:T(e):null,depthTest:{func:s},depthWrite:n,colorWrite:C,polygonOffset:a})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}get primitiveType(){return this.configuration.output===r.Occlusion?L.POINTS:L.TRIANGLES}}H.shader=new g(P,(()=>import("./HUDMaterial.glsl.js")));const M={factor:0,units:-4},N=U(j.ONE,j.ONE_MINUS_SRC_ALPHA);class G extends v{constructor(){super(...arguments),this.output=r.Color,this.occlusionTestEnabled=!0,this.sdf=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.screenSizePerspective=!1,this.screenCenterOffsetUnitsEnabled=o.World,this.debugDrawLabelBorder=!1,this.binaryHighlightOcclusion=!0,this.slicePlaneEnabled=!1,this.polygonOffsetEnabled=!1,this.depthEnabled=!0,this.transparencyPassType=y.NONE,this.pixelSnappingEnabled=!0,this.isDraped=!1,this.multipassGeometryEnabled=!1,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([f({count:r.COUNT})],G.prototype,"output",void 0),e([f()],G.prototype,"occlusionTestEnabled",void 0),e([f()],G.prototype,"sdf",void 0),e([f()],G.prototype,"vvSize",void 0),e([f()],G.prototype,"vvColor",void 0),e([f()],G.prototype,"verticalOffset",void 0),e([f()],G.prototype,"screenSizePerspective",void 0),e([f({count:o.COUNT})],G.prototype,"screenCenterOffsetUnitsEnabled",void 0),e([f()],G.prototype,"debugDrawLabelBorder",void 0),e([f()],G.prototype,"binaryHighlightOcclusion",void 0),e([f()],G.prototype,"slicePlaneEnabled",void 0),e([f()],G.prototype,"polygonOffsetEnabled",void 0),e([f()],G.prototype,"depthEnabled",void 0),e([f({count:y.COUNT})],G.prototype,"transparencyPassType",void 0),e([f()],G.prototype,"pixelSnappingEnabled",void 0),e([f()],G.prototype,"isDraped",void 0),e([f()],G.prototype,"multipassGeometryEnabled",void 0),e([f()],G.prototype,"multipassTerrainEnabled",void 0),e([f()],G.prototype,"cullAboveGround",void 0);export{H as HUDMaterialTechnique,G as HUDMaterialTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/
|
|
5
|
+
import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{H as HighlightCompositionPass,b as build}from"../../../../chunks/HighlightComposition.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as i}from"../../../../chunks/tslib.es6.js";import{ReloadableShaderModule as o}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as t,ShaderTechniqueConfiguration as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Default3D as s}from"../lib/DefaultVertexAttributeLocations.js";import{Program as a}from"../lib/Program.js";import{H as l,a as n}from"../../../../chunks/HighlightComposition.glsl.js";import{BlendFactor as h,PrimitiveType as m}from"../../../webgl/enums.js";import{makePipelineState as p,separateBlendingParams as c,defaultColorWriteParams as g}from"../../../webgl/renderState.js";const u=8.6,f=.4;class d extends r{initializeProgram(i){const o=d.shader.get().build(this.configuration);return new a(i.rctx,o,s)}bindApplyPass(i){this.program.setUniform4fv("
|
|
5
|
+
import{_ as i}from"../../../../chunks/tslib.es6.js";import{ReloadableShaderModule as o}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as t,ShaderTechniqueConfiguration as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Default3D as s}from"../lib/DefaultVertexAttributeLocations.js";import{Program as a}from"../lib/Program.js";import{H as l,a as n}from"../../../../chunks/HighlightComposition.glsl.js";import{BlendFactor as h,PrimitiveType as m}from"../../../webgl/enums.js";import{makePipelineState as p,separateBlendingParams as c,defaultColorWriteParams as g}from"../../../webgl/renderState.js";const u=8.6,f=.4;class d extends r{initializeProgram(i){const o=d.shader.get().build(this.configuration);return new a(i.rctx,o,s)}bindApplyPass(i){this.program.setUniform4fv("uColor",i.color),this.program.setUniform4fv("haloColor",i.haloColor),this.program.setUniform1f("outlineSize",u),this.program.setUniform1f("blurSize",f),this.program.setUniform4f("opacities",i.haloOpacity,i.haloOpacityOccluded,i.fillOpacity,i.fillOpacityOccluded)}initializePipeline(){return this.configuration.highlightStage===l.Apply?p({blending:c(h.SRC_ALPHA,h.ONE,h.ONE_MINUS_SRC_ALPHA,h.ONE_MINUS_SRC_ALPHA),colorWrite:g}):p({colorWrite:g})}get primitiveType(){return this.configuration.gridOptimization?m.TRIANGLES:m.TRIANGLE_STRIP}}d.shader=new o(n,(()=>import("./HighlightComposition.glsl.js")));class S extends e{constructor(){super(...arguments),this.highlightStage=l.Blur,this.gridOptimization=!1}}i([t({count:l.COUNT})],S.prototype,"highlightStage",void 0),i([t()],S.prototype,"gridOptimization",void 0);export{d as HighlightCompositionTechnique,S as HighlightCompositionTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/
|
|
5
|
+
import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as build}from"../../../../chunks/ImageMaterial.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as t}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as r}from"../core/shaderLibrary/Slice.glsl.js";import{bindMultipassTerrainTexture as i}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as s,bindView as o}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as l,ShaderTechniqueConfiguration as p}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as c,TransparencyPassType as u}from"../lib/basicInterfaces.js";import{Default3D as d}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as m,oitDepthTest as h,oitDepthWrite as b,getOITPolygonOffset as f}from"../lib/OrderIndependentTransparency.js";import{Program as g}from"../lib/Program.js";import{stencilWriteMaskOn as y,stencilToolMaskBaseParams as T,stencilBaseAllZerosParams as P}from"../lib/StencilUtils.js";import{I as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as t}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as r}from"../core/shaderLibrary/Slice.glsl.js";import{bindMultipassTerrainTexture as i}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as s,bindView as o}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as l,ShaderTechniqueConfiguration as p}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as c,TransparencyPassType as u}from"../lib/basicInterfaces.js";import{Default3D as d}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as m,oitDepthTest as h,oitDepthWrite as b,getOITPolygonOffset as f}from"../lib/OrderIndependentTransparency.js";import{Program as g}from"../lib/Program.js";import{stencilWriteMaskOn as y,stencilToolMaskBaseParams as T,stencilBaseAllZerosParams as P}from"../lib/StencilUtils.js";import{I as j}from"../../../../chunks/ImageMaterial.glsl.js";import{BlendFactor as v}from"../../../webgl/enums.js";import{simpleBlendingParams as O,makePipelineState as S,cullingParams as E,defaultDepthWriteParams as w,defaultColorWriteParams as N}from"../../../webgl/renderState.js";class _ extends n{initializeProgram(e){const t=_.shader.get(),r=this.configuration,i=t.build({output:r.output,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,oitEnabled:r.transparencyPassType===u.Color,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new g(e.rctx,i,d)}bindPass(e,t){s(this.program,t.camera.projectionMatrix),this.program.setUniform1f("opacity",e.opacity),t.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),i(this.program,t))}bindDraw(e){o(this.program,e),r(this.program,this.configuration,e),this.program.rebindTextures()}_setPipelineState(e,r){const i=this.configuration,s=e===u.NONE,o=e===u.FrontFace;return S({blending:i.output!==t.Color&&i.output!==t.Alpha||!i.transparent?null:s?x:m(e),culling:E(i.cullFace),depthTest:{func:h(e)},depthWrite:s?i.writeDepth&&w:b(e),colorWrite:N,stencilWrite:i.sceneHasOcludees?y:null,stencilTest:i.sceneHasOcludees?r?T:P:null,polygonOffset:s||o?null:f(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipelineState(this.configuration.transparencyPassType,!0),this._setPipelineState(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}_.shader=new a(j,(()=>import("./ImageMaterial.glsl.js")));const x=O(v.ONE,v.ONE_MINUS_SRC_ALPHA);class A extends p{constructor(){super(...arguments),this.output=t.Color,this.cullFace=c.None,this.slicePlaneEnabled=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparencyPassType=u.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([l({count:t.COUNT})],A.prototype,"output",void 0),e([l({count:c.COUNT})],A.prototype,"cullFace",void 0),e([l()],A.prototype,"slicePlaneEnabled",void 0),e([l()],A.prototype,"transparent",void 0),e([l()],A.prototype,"enableOffset",void 0),e([l()],A.prototype,"writeDepth",void 0),e([l()],A.prototype,"sceneHasOcludees",void 0),e([l({count:u.COUNT})],A.prototype,"transparencyPassType",void 0),e([l()],A.prototype,"multipassTerrainEnabled",void 0),e([l()],A.prototype,"cullAboveGround",void 0);export{_ as ImageMaterialTechnique,A as ImageMaterialTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../core/shaderLibrary/Laserline.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/
|
|
5
|
+
import"../core/shaderLibrary/Laserline.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as build}from"../../../../chunks/LaserlinePath.glsl.js";
|