@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{nextHighestPowerOfTwo as e}from"../../../core/mathUtils.js";import{disposeMaybe as t,releaseMaybe as r,isNone as i,isSome as s}from"../../../core/maybe.js";import{s as o,c as a}from"../../../chunks/vec2.js";import{Z as n}from"../../../chunks/vec2f64.js";import{f as l}from"../../../chunks/vec3f64.js";import{f as u}from"../../../chunks/vec4f64.js";import{isBaseLayer as c}from"../../../layers/support/layerUtils.js";import{VectorTileRendererHelper3D as h}from"../../2d/engine/vectorTiles/VectorTileRendererHelper3D.js";import{RasterColorizerStretchType as _}from"../../2d/engine/webgl/brushes/raster/enums.js";import{ImageWithType as d}from"../support/StreamDataLoader.js";import{BlendLayersTechniqueConfiguration as p,BlendLayersTechnique as f}from"./BlendLayersTechnique.js";import{TextureUpdate as T}from"./interfaces.js";import{LayerClass as m}from"./LayerClass.js";import"../../../core/arrayUtils.js";import"../../../geometry/support/aaBoundingBox.js";import"../support/buffer/glUtil.js";import"./PatchGeometryFactory.js";import{ActivationTime as y}from"./TextureFader.js";import"../../../core/HeapSort.js";import"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import"../../webgl/BufferObject.js";import"../../webgl/VertexArrayObject.js";import{RasterColorizerTechniqueConfiguration as b,RasterColorizerTechnique as x}from"./RasterColorizerTechnique.js";import{isVectorTileLayerView as g,isVectorTileRenderInfo as I,isImageryTileRenderInfo as w,isRasterTileRenderInfo as R,isTextureTileRenderInfo as L}from"./terrainUtils.js";import{TextureReference as E}from"./TextureReference.js";import P from"./TileTexture.js";import{TileUpdate as D}from"./TileUpdate.js";import{FBOPool as A}from"./support/FBOPool.js";import{BlendMode as j}from"../webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{Pos2Tex as O}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as k,createColorTexture as q,createEmptyTexture as C}from"../webgl-engine/lib/glUtil3D.js";import{ClearBufferBit as U,TextureSamplingMode as B,PrimitiveType as F,TextureType as M,PixelFormat as S,PixelType as N,TextureWrapMode as z}from"../../webgl/enums.js";import{Texture as v}from"../../webgl/Texture.js";import{vertexCount as G}from"../../webgl/Util.js";class V{constructor(e,t,r){this._rctx=e,this.tileSize=t,this._techniqueRepository=r,this._backgroundIsGrid=!1,this._backgroundTexture=null,this._backgroundColor=null,this._blackTex=null,this._vectorTileHelper=new h,this._maxAnisotropy=this._rctx.parameters.maxMaxAnisotropy,this._vaoQuad=k(this._rctx,O),this._blackTex=new P(q(this._rctx,[0,0,0,1])),this._fboPool=new A(this._rctx)}dispose(){this._fboPool&&(this._fboPool.clear(),this._fboPool=null),this._vaoQuad=t(this._vaoQuad),this._backgroundTexture=r(this._backgroundTexture),this._blackTex=r(this._blackTex),this._blendLayersTechnique=t(this._blendLayersTechnique),this._applyOpacityTechnique=t(this._applyOpacityTechnique),this._vectorTileHelper=t(this._vectorTileHelper)}get blendLayersTechnique(){if(i(this._blendLayersTechnique)){const e=new p;e.mode=j.OneMinusSourceAlpha,this._blendLayersTechnique=this._techniqueRepository.acquire(f,e)}return this._blendLayersTechnique}get applyOpacityTechnique(){if(i(this._applyOpacityTechnique)){const e=new p;e.mode=j.SourceAlpha,this._applyOpacityTechnique=this._techniqueRepository.acquire(f,e)}return this._applyOpacityTechnique}get backgroundIsGrid(){return this._backgroundIsGrid}get backgroundColor(){return this._backgroundColor}updateTileTexture(e,t){const r=e.layerInfo[m.MAP];for(const s of r)s.pendingUpdates&=~(D.TEXTURE_NOFADING&D.TEXTURE_FADING);if(!e.renderData)return;const i=e.surface,o=i.baseOpacity;let a=0,n=0,l=this.tileSize,u=!1;const h=i.view.pixelRatio;let _=r.length,d=0;for(;d<r.length&&!u;d++){const t=i.layerViewByIndex(d,m.MAP),s=t.fullOpacity;if(X[d]=s,c(t.layer)&&_>=r.length&&(_=d),0===s)continue;++n;const p=Q(e,d,W);p&&(g(t)?l=Math.max(l,this.tileSize*h):1===o&&1===s&&(t.isOpaque||this._dataToTexture(p)&&p.sourceLayerInfo.data.descriptor.isOpaque)&&(u=!0),++a)}this._cleanupFBOPool(h,r.length),l=H(l);const p=l/this.tileSize,f=d-1;0!==a?1===a&&(u||this._backgroundIsGrid||s(this._backgroundColor))&&this._useLayerTexture(e,f,_,X[f])||this._composeMapLayers(e,t,f,_,u,X,l,p):this._useBackgroundTexture(e,n)}_useBackgroundTexture(e,t){let r=y.Immediate;(e.surface.view.layerViewManager.updating||t>0)&&(r=y.Delayed),this._backgroundTexture&&i(e.renderData.textureReference)&&(r=y.Immediate),e.renderData.setTextureReference(s(this._backgroundTexture)?new E(this._backgroundTexture,T.FADING,Y,e.surface.baseOpacity,1,1,!1):null,r)}_useLayerTexture(e,t,r,i){const s=t<r,o=s?1:e.surface.baseOpacity,a=s?e.surface.baseOpacity:1,n=Q(e,t,W);return!!this._dataToTexture(n)&&(e.renderData.setTextureReference(new E(n.sourceLayerInfo.data,T.FADING,n,o,i,a,!0)),!0)}_composeMapLayers(e,t,r,i,o,a,l,u){const c=this._rctx,h=this._fboPool.acquire(l);c.bindFramebuffer(h),c.setViewport(0,0,l,l),c.setClearColor(0,0,0,0),c.setClearDepth(1),c.clearSafe(U.COLOR_BUFFER_BIT|U.DEPTH_BUFFER_BIT);let _=!1;!o&&s(this._backgroundTexture)&&this._drawRasterData(this.blendLayersTechnique,this._backgroundTexture.texture,1,n);const d=e.surface.baseOpacity;let p=!1,f=B.LINEAR_MIPMAP_LINEAR;for(let s=r;s>=0;s--){const t=Q(e,s,W);t&&(s<i&&d<1&&!p&&(this._drawRasterData(this.applyOpacityTechnique,this._blackTex.texture,1,n,d),p=!0),0!==a[s]&&(I(t)?_=this._drawVectorData(this.blendLayersTechnique,t,u,a[s],l,h,_):w(t)?(this._drawImageryTileData(t,a[s]),this._hasNearestInterpolation(t)&&(f=B.NEAREST)):this._dataToTexture(t)&&this._drawRasterData(this.blendLayersTechnique,t.sourceLayerInfo.data.texture,t.scale,t.offset,a[s])))}const T=e.renderData.ensureTexture(l,(()=>this._buildTexture(l,f))),m=c.bindTexture(T.texture,v.TEXTURE_UNIT_FOR_UPDATES),y=T.descriptor;c.gl.copyTexImage2D(c.gl.TEXTURE_2D,0,y.pixelFormat,0,0,y.width,y.height,0),T.generateMipmap(),c.bindTexture(m,v.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(null),this._fboPool.release(h);const b=p?1:d;e.renderData.setTextureReference(new E(T,t,Y,b,1,1,!1))}_drawQuad(e){this._rctx.bindVAO(this._vaoQuad),e.assertCompatibleVertexAttributeLocations(this._vaoQuad),this._rctx.drawArrays(F.TRIANGLE_STRIP,0,G(this._vaoQuad,"geometry"))}_drawRasterData(e,t,r,s,o=1){if(i(t))return;const a=this._rctx,n=e.program;e.bindPipelineState(a),a.useProgram(n),n.bindTexture(t,"tex"),n.setUniform1f("scale",r),n.setUniform2f("offset",s[0],s[1]),n.setUniform1f("opacity",o),this._drawQuad(n)}_hasNearestInterpolation(e){const t=e.sourceLayerInfo.data;return!!t.source&&"nearest"===t.interpolation}_drawImageryTileData(e,t=1){const r=e.sourceLayerInfo.data;if(!r.source)return;e.tile.surface.layerViewByIndex(e.layerIndex,m.MAP).ensureSymbolizerParameters(r);const i=this._getRasterColorizerTechnique(r),s=this._rctx,o=i.program;if(i.bindPipelineState(s),s.useProgram(o),!r.bind(s))return;r.opacity=t,r.scale=e.scale,r.offset=e.offset;const{names:a,textures:n}=r.getTextures();a.forEach(((e,t)=>o.bindTexture(n[t],e))),i.bindPass(r.getUniforms()),this._drawQuad(o),s.bindVAO()}_getRasterColorizerTechnique(e){const t=e.symbolizerParameters,r=["stretch","lut","hillshade"].indexOf(t.type);return i(this._rasterColorizerConfig)&&(this._rasterColorizerConfig=new b,this._rctx.gl.getExtension("WEBGL_color_buffer_float"),this._rctx.gl.getExtension("OES_texture_float")),this._rasterColorizerConfig.colorizerType=r,this._rasterColorizerConfig.applyColormap=!!t.colormap,this._rasterColorizerConfig.stretchType=e.hasStretchTypeNone()?_.Noop:_.PerBand,this._rasterColorizerTechnique=this._techniqueRepository.releaseAndAcquire(x,this._rasterColorizerConfig,this._rasterColorizerTechnique),this._rasterColorizerTechnique}_drawVectorData(e,t,r,i,o,a,n){const l=this._rctx,u=t.sourceLayerInfo.data,c=t.tile.surface.layerViewByIndex(t.layerIndex,m.MAP);let h;return e.bindPipelineState(l),i<1?(h=this._fboPool.acquire(o),l.bindFramebuffer(h),l.setClearColor(1,1,1,0),l.clearSafe(U.COLOR_BUFFER_BIT|U.DEPTH_BUFFER_BIT)):n&&l.clearSafe(U.DEPTH_BUFFER_BIT),this._vectorTileHelper.render(l,t.sourceLod,u,c.painter,c.layer.styleRepository,c.schemaHelper,Math.round(1/t.scale),t.offset,this.tileSize,r),!s(h)||(l.bindFramebuffer(a),this._drawRasterData(e,h.colorTexture,1,[0,0],i),this._fboPool.release(h),n)}_dataToTexture(e){return R(e)&&this._rasterDataToTexture(e),L(e)}_rasterDataToTexture(e){const t=e.sourceLayerInfo;t.data=this._buildTexture(t.data),e.tile.setMemoryDirty()}setBackground(e,t){r(this._backgroundTexture),this._backgroundIsGrid=t,e instanceof HTMLImageElement?(this._backgroundTexture=this._buildTexture(e),this._backgroundColor=null):(this._backgroundTexture=new P(q(this._rctx,u(e[0]||0,e[1]||0,e[2]||0,1))),this._backgroundColor=l(e[0]||0,e[1]||0,e[2]||0))}_buildTexture(e,t=B.LINEAR_MIPMAP_LINEAR){if(i(e))return null;const r={target:M.TEXTURE_2D,pixelFormat:S.RGBA,dataType:N.UNSIGNED_BYTE,wrapMode:z.CLAMP_TO_EDGE,samplingMode:t,maxAnisotropy:this._maxAnisotropy,flipped:!0,hasMipmap:!0},s=this._rctx;let o;if("number"==typeof e)r.width=r.height=e,o=new P(new v(s,r));else if(e instanceof d)r.isOpaque=e.isOpaque,o=new P(new v(s,r,e.image)),e.release();else try{o=new P(new v(s,r,e))}catch(n){o=new P(C(s)),console.warn("TileRenderer: failed to execute 'texImage2D', cross-origin image may not be loaded.")}const a=s.bindTexture(o.texture,v.TEXTURE_UNIT_FOR_UPDATES);return o.generateMipmap(),s.bindTexture(a,v.TEXTURE_UNIT_FOR_UPDATES),o}_cleanupFBOPool(e,t){e===this._lastPixelRatio&&t===this._lastNumLayers||(this._fboPool.clear(),this._lastPixelRatio=e,this._lastNumLayers=t)}get test(){return{backgroundTexture:this._backgroundTexture}}}function H(t){const r=e(t),i=r*r,s=t*t;if(i===s)return t;const o=r/2;return i-s<s-o*o?r:o}function Q(e,t,r){r.layerIndex=t;const i=e.layerInfo[m.MAP][t];if(i.data)return o(r.offset,0,0),r.tile=e,r.scale=1,r.sourceLod=e.lij,r.sourceLayerInfo=i,r;const s=i.upsampleInfo;if(s){const e=s.tile.layerInfo[m.MAP][t];return r.tile=s.tile,a(r.offset,s.offset),r.scale=s.scale,r.sourceLod=s.tile.lij,r.sourceLayerInfo=e,r}return null}const X=new Array,W={tile:null,sourceLayerInfo:null,sourceLod:null,offset:[0,0],scale:1,layerIndex:0},Y={offset:[0,0],scale:1};export{V as TileRenderer};
|
|
5
|
+
import{nextHighestPowerOfTwo as e}from"../../../core/mathUtils.js";import{disposeMaybe as t,releaseMaybe as r,isNone as s,isSome as i}from"../../../core/maybe.js";import{s as o,c as a}from"../../../chunks/vec2.js";import{Z as n}from"../../../chunks/vec2f64.js";import{f as u}from"../../../chunks/vec3f64.js";import{f as l}from"../../../chunks/vec4f64.js";import{isBaseLayer as c}from"../../../layers/support/layerUtils.js";import{VectorTileRendererHelper3D as h}from"../../2d/engine/vectorTiles/VectorTileRendererHelper3D.js";import{RasterColorizerStretchType as _}from"../../2d/engine/webgl/brushes/raster/enums.js";import{ImageWithType as f}from"../support/StreamDataLoader.js";import{BlendLayersTechniqueConfiguration as d,BlendLayersTechnique as p}from"./BlendLayersTechnique.js";import{TextureUpdate as T}from"./interfaces.js";import{LayerClass as m}from"./LayerClass.js";import"../../../core/arrayUtils.js";import"../../../geometry/support/aaBoundingBox.js";import"../support/buffer/glUtil.js";import"./PatchGeometryFactory.js";import{ActivationTime as y}from"./TextureFader.js";import"../../../core/HeapSort.js";import"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import"../../webgl/BufferObject.js";import"../../webgl/VertexArrayObject.js";import{RasterColorizerTechniqueConfiguration as x,RasterColorizerTechnique as b}from"./RasterColorizerTechnique.js";import{isVectorTileLayerView as g,isVectorTileRenderInfo as I,isImageryTileRenderInfo as w,isRasterTileRenderInfo as R,isTextureTileRenderInfo as L}from"./terrainUtils.js";import{TextureReference as E}from"./TextureReference.js";import D from"./TileTexture.js";import{TileUpdate as A}from"./TileUpdate.js";import{FBOPool as P}from"./support/FBOPool.js";import{BlendMode as j}from"../webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{Pos2Tex as q}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as O,createColorTexture as k,createEmptyTexture as C}from"../webgl-engine/lib/glUtil3D.js";import{ClearBufferBit as U,TextureSamplingMode as B,PrimitiveType as F,TextureType as M,PixelFormat as N,PixelType as S,TextureWrapMode as z}from"../../webgl/enums.js";import{Texture as v}from"../../webgl/Texture.js";import{vertexCount as G}from"../../webgl/Util.js";class V{constructor(e,t,r){this._rctx=e,this.tileSize=t,this._techniqueRepository=r,this._backgroundIsGrid=!1,this._backgroundTexture=null,this._backgroundColor=null,this._blackTex=null,this._vectorTileHelper=new h,this._maxAnisotropy=this._rctx.parameters.maxMaxAnisotropy,this._vaoQuad=O(this._rctx,q),this._blackTex=new D(k(this._rctx,[0,0,0,1])),this._fboPool=new P(this._rctx)}dispose(){this._fboPool&&(this._fboPool.clear(),this._fboPool=null),this._vaoQuad=t(this._vaoQuad),this._backgroundTexture=r(this._backgroundTexture),this._blackTex=r(this._blackTex),this._blendLayersTechnique=t(this._blendLayersTechnique),this._applyOpacityTechnique=t(this._applyOpacityTechnique),this._vectorTileHelper=t(this._vectorTileHelper)}get blendLayersTechnique(){if(s(this._blendLayersTechnique)){const e=new d;e.mode=j.OneMinusSourceAlpha,this._blendLayersTechnique=this._techniqueRepository.acquire(p,e)}return this._blendLayersTechnique}get applyOpacityTechnique(){if(s(this._applyOpacityTechnique)){const e=new d;e.mode=j.SourceAlpha,this._applyOpacityTechnique=this._techniqueRepository.acquire(p,e)}return this._applyOpacityTechnique}get backgroundIsGrid(){return this._backgroundIsGrid}get backgroundColor(){return this._backgroundColor}updateTileTexture(e,t){const r=e.layerInfo[m.MAP];for(const i of r)i.pendingUpdates&=~(A.TEXTURE_NOFADING&A.TEXTURE_FADING);if(!e.renderData)return;const s=e.surface,o=s.baseOpacity;let a=0,n=0,u=this.tileSize,l=!1;const h=s.view.pixelRatio;let _=r.length,f=0;for(;f<r.length&&!l;f++){const t=s.layerViewByIndex(f,m.MAP),i=t.fullOpacity;if(X[f]=i,c(t.layer)&&_>=r.length&&(_=f),0===i)continue;++n;const d=Q(e,f,W);d&&(g(t)?u=Math.max(u,this.tileSize*h):1===o&&1===i&&(t.isOpaque||this._dataToTexture(d)&&d.sourceLayerInfo.data.descriptor.isOpaque)&&(l=!0),++a)}this._cleanupFBOPool(h,r.length),u=H(u);const d=u/this.tileSize,p=f-1;0!==a?1===a&&(l||this._backgroundIsGrid||i(this._backgroundColor))&&this._useLayerTexture(e,p,_,X[p])||this._composeMapLayers(e,t,p,_,l,X,u,d):this._useBackgroundTexture(e,n)}_useBackgroundTexture(e,t){let r=y.Immediate;(e.surface.view.layerViewManager.updating||t>0)&&(r=y.Delayed),this._backgroundTexture&&s(e.renderData.textureReference)&&(r=y.Immediate),e.renderData.setTextureReference(i(this._backgroundTexture)?new E(this._backgroundTexture,T.FADING,Y,e.surface.baseOpacity,1,1,!1):null,r)}_useLayerTexture(e,t,r,s){const i=t<r,o=i?1:e.surface.baseOpacity,a=i?e.surface.baseOpacity:1,n=Q(e,t,W);return!!this._dataToTexture(n)&&(e.renderData.setTextureReference(new E(n.sourceLayerInfo.data,T.FADING,n,o,s,a,!0)),!0)}_composeMapLayers(e,t,r,s,o,a,u,l){const c=this._rctx,h=this._fboPool.acquire(u);c.bindFramebuffer(h),c.setViewport(0,0,u,u),c.setClearColor(0,0,0,0),c.setClearDepth(1),c.clearSafe(U.COLOR_BUFFER_BIT|U.DEPTH_BUFFER_BIT);let _=!1;!o&&i(this._backgroundTexture)&&this._drawRasterData(this.blendLayersTechnique,this._backgroundTexture.texture,1,n);const f=e.surface.baseOpacity;let d=!1,p=B.LINEAR_MIPMAP_LINEAR;for(let i=r;i>=0;i--){const t=Q(e,i,W);t&&(i<s&&f<1&&!d&&(this._drawRasterData(this.applyOpacityTechnique,this._blackTex.texture,1,n,f),d=!0),0!==a[i]&&(I(t)?_=this._drawVectorData(this.blendLayersTechnique,t,l,a[i],u,h,_):w(t)?(this._drawImageryTileData(t,a[i]),this._hasNearestInterpolation(t)&&(p=B.NEAREST)):this._dataToTexture(t)&&this._drawRasterData(this.blendLayersTechnique,t.sourceLayerInfo.data.texture,t.scale,t.offset,a[i])))}const T=e.renderData.ensureTexture(u,(()=>this._buildTexture(u,p))),m=c.bindTexture(T.texture,v.TEXTURE_UNIT_FOR_UPDATES),y=T.descriptor;c.gl.copyTexImage2D(c.gl.TEXTURE_2D,0,y.pixelFormat,0,0,y.width,y.height,0),T.generateMipmap(),c.bindTexture(m,v.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(null),this._fboPool.release(h);const x=d?1:f;e.renderData.setTextureReference(new E(T,t,Y,x,1,1,!1))}_drawQuad(e){this._rctx.bindVAO(this._vaoQuad),e.assertCompatibleVertexAttributeLocations(this._vaoQuad),this._rctx.drawArrays(F.TRIANGLE_STRIP,0,G(this._vaoQuad,"geometry"))}_drawRasterData(e,t,r,i,o=1){if(s(t))return;const a=this._rctx.useTechnique(e);a.bindTexture(t,"tex"),a.setUniform1f("scale",r),a.setUniform2f("offset",i[0],i[1]),a.setUniform1f("opacity",o),this._drawQuad(a)}_hasNearestInterpolation(e){const t=e.sourceLayerInfo.data;return!!t.source&&"nearest"===t.interpolation}_drawImageryTileData(e,t=1){const r=e.sourceLayerInfo.data;if(!r.source)return;e.tile.surface.layerViewByIndex(e.layerIndex,m.MAP).ensureSymbolizerParameters(r);const s=this._getRasterColorizerTechnique(r),i=this._rctx,o=i.useTechnique(s);if(!r.bind(i))return;r.opacity=t,r.scale=e.scale,r.offset=e.offset;const{names:a,textures:n}=r.getTextures();a.forEach(((e,t)=>o.bindTexture(n[t],e))),s.bindPass(r.getUniforms()),this._drawQuad(o),i.bindVAO()}_getRasterColorizerTechnique(e){const t=e.symbolizerParameters,r=["stretch","lut","hillshade"].indexOf(t.type);return s(this._rasterColorizerConfig)&&(this._rasterColorizerConfig=new x,this._rctx.gl.getExtension("WEBGL_color_buffer_float"),this._rctx.gl.getExtension("OES_texture_float")),this._rasterColorizerConfig.colorizerType=r,this._rasterColorizerConfig.applyColormap=!!t.colormap,this._rasterColorizerConfig.stretchType=e.hasStretchTypeNone()?_.Noop:_.PerBand,this._rasterColorizerTechnique=this._techniqueRepository.releaseAndAcquire(b,this._rasterColorizerConfig,this._rasterColorizerTechnique),this._rasterColorizerTechnique}_drawVectorData(e,t,r,s,o,a,n){const u=this._rctx,l=t.sourceLayerInfo.data,c=t.tile.surface.layerViewByIndex(t.layerIndex,m.MAP);let h;return e.bindPipelineState(u),s<1?(h=this._fboPool.acquire(o),u.bindFramebuffer(h),u.setClearColor(1,1,1,0),u.clearSafe(U.COLOR_BUFFER_BIT|U.DEPTH_BUFFER_BIT)):n&&u.clearSafe(U.DEPTH_BUFFER_BIT),this._vectorTileHelper.render(u,t.sourceLod,l,c.painter,c.layer.styleRepository,c.schemaHelper,Math.round(1/t.scale),t.offset,this.tileSize,r),!i(h)||(u.bindFramebuffer(a),this._drawRasterData(e,h.colorTexture,1,[0,0],s),this._fboPool.release(h),n)}_dataToTexture(e){return R(e)&&this._rasterDataToTexture(e),L(e)}_rasterDataToTexture(e){const t=e.sourceLayerInfo;t.data=this._buildTexture(t.data),e.tile.setMemoryDirty()}setBackground(e,t){r(this._backgroundTexture),this._backgroundIsGrid=t,e instanceof HTMLImageElement?(this._backgroundTexture=this._buildTexture(e),this._backgroundColor=null):(this._backgroundTexture=new D(k(this._rctx,l(e[0]||0,e[1]||0,e[2]||0,1))),this._backgroundColor=u(e[0]||0,e[1]||0,e[2]||0))}_buildTexture(e,t=B.LINEAR_MIPMAP_LINEAR){if(s(e))return null;const r={target:M.TEXTURE_2D,pixelFormat:N.RGBA,dataType:S.UNSIGNED_BYTE,wrapMode:z.CLAMP_TO_EDGE,samplingMode:t,maxAnisotropy:this._maxAnisotropy,flipped:!0,hasMipmap:!0},i=this._rctx;let o;if("number"==typeof e)r.width=r.height=e,o=new D(new v(i,r));else if(e instanceof f)r.isOpaque=e.isOpaque,o=new D(new v(i,r,e.image)),e.release();else try{o=new D(new v(i,r,e))}catch(n){o=new D(C(i)),console.warn("TileRenderer: failed to execute 'texImage2D', cross-origin image may not be loaded.")}const a=i.bindTexture(o.texture,v.TEXTURE_UNIT_FOR_UPDATES);return o.generateMipmap(),i.bindTexture(a,v.TEXTURE_UNIT_FOR_UPDATES),o}_cleanupFBOPool(e,t){e===this._lastPixelRatio&&t===this._lastNumLayers||(this._fboPool.clear(),this._lastPixelRatio=e,this._lastNumLayers=t)}get test(){return{backgroundTexture:this._backgroundTexture}}}function H(t){const r=e(t),s=r*r,i=t*t;if(s===i)return t;const o=r/2;return s-i<i-o*o?r:o}function Q(e,t,r){r.layerIndex=t;const s=e.layerInfo[m.MAP][t];if(s.data)return o(r.offset,0,0),r.tile=e,r.scale=1,r.sourceLod=e.lij,r.sourceLayerInfo=s,r;const i=s.upsampleInfo;if(i){const e=i.tile.layerInfo[m.MAP][t];return r.tile=i.tile,a(r.offset,i.offset),r.scale=i.scale,r.sourceLod=i.tile.lij,r.sourceLayerInfo=e,r}return null}const X=new Array,W={tile:null,sourceLayerInfo:null,sourceLod:null,offset:[0,0],scale:1,layerIndex:0},Y={offset:[0,0],scale:1};export{V as TileRenderer};
|
|
@@ -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{unwrapOr as t,isSome as e}from"../../../core/maybe.js";import{ViewingMode as n}from"../../ViewingMode.js";import{ImageWithType as l}from"../support/StreamDataLoader.js";import{t as i}from"../../../chunks/terrainUtilsPlanar.js";import{t as o}from"../../../chunks/terrainUtilsSpherical.js";const r={[n.Global]:o,[n.Local]:i};function u(t,e){t||console.warn("Terrain: "+e)}const a=1.2,c=80/180*Math.PI,f=110/180*Math.PI;function s(n,l,i){const o=r[n.viewingMode];let u;if(o.isInsideExtent(n,l))u=t(n.getElevation(l[0],l[1],l[1],n.spatialReference),0);else{if(!o.isInsideExtent(n,l,a))return 0;const t=n.getTileWithElevation(l[0],l[1],l[1],n.spatialReference);u=.5*((e(t)?t.elevationBounds[0]:n.elevationBounds.min)+(e(t)?t.elevationBounds[1]:n.elevationBounds.max));const i=o.tiltToExtentEdge(n,l,u);if(i>c&&i<f)return 0}const s=l[2]-u;return Math.abs(s)<i?0:s<0?-1:1}function d(t){return v(t)?{fullExtent:t.fullExtent,minScale:t.layer.minScale,maxScale:t.layer.maxScale,tilemapCache:null}:t.layer}function p(t){return"vector-tile"===(null==t?void 0:t.type)}function m(t){return"imagery-tile"===(null==t?void 0:t.type)||"wcs"===(null==t?void 0:t.type)}function v(t){return"imagery-tile-3d"===(null==t?void 0:t.type)}function y(t){return"tile-3d"===(null==t?void 0:t.type)}function I(t){return"vector-tile-3d"===(null==t?void 0:t.type)}function x(t){return"wmts-3d"===(null==t?void 0:t.type)}function E(t){return"elevation-3d"===(null==t?void 0:t.type)}function
|
|
5
|
+
import{unwrapOr as t,isSome as e}from"../../../core/maybe.js";import{ViewingMode as n}from"../../ViewingMode.js";import{ImageWithType as l}from"../support/StreamDataLoader.js";import{t as i}from"../../../chunks/terrainUtilsPlanar.js";import{t as o}from"../../../chunks/terrainUtilsSpherical.js";const r={[n.Global]:o,[n.Local]:i};function u(t,e){t||console.warn("Terrain: "+e)}const a=1.2,c=80/180*Math.PI,f=110/180*Math.PI;function s(n,l,i){const o=r[n.viewingMode];let u;if(o.isInsideExtent(n,l))u=t(n.getElevation(l[0],l[1],l[1],n.spatialReference),0);else{if(!o.isInsideExtent(n,l,a))return 0;const t=n.getTileWithElevation(l[0],l[1],l[1],n.spatialReference);u=.5*((e(t)?t.elevationBounds[0]:n.elevationBounds.min)+(e(t)?t.elevationBounds[1]:n.elevationBounds.max));const i=o.tiltToExtentEdge(n,l,u);if(i>c&&i<f)return 0}const s=l[2]-u;return Math.abs(s)<i?0:s<0?-1:1}function d(t){return v(t)?{fullExtent:t.fullExtent,minScale:t.layer.minScale,maxScale:t.layer.maxScale,tilemapCache:null}:t.layer}function p(t){return"vector-tile"===(null==t?void 0:t.type)}function m(t){return"imagery-tile"===(null==t?void 0:t.type)||"wcs"===(null==t?void 0:t.type)}function v(t){return"imagery-tile-3d"===(null==t?void 0:t.type)}function y(t){return"tile-3d"===(null==t?void 0:t.type)}function I(t){return"vector-tile-3d"===(null==t?void 0:t.type)}function x(t){return"wmts-3d"===(null==t?void 0:t.type)}function E(t){return"elevation-3d"===(null==t?void 0:t.type)}function g(t){return t&&(y(t)||v(t)||E(t)||I(t)||x(t))}function h(t){var n;const l=null==t||null==(n=t.sourceLayerInfo)?void 0:n.data;return e(l)&&"type"in l&&"raster-tile"===l.type}function L(t){var n;const l=null==t||null==(n=t.sourceLayerInfo)?void 0:n.data;return e(l)&&"type"in l&&"vector-tile"===l.type}function T(t){var n;const l=null==t||null==(n=t.sourceLayerInfo)?void 0:n.data;return e(l)&&"type"in l&&"tile-texture"===l.type}function S(t){var e;const n=null==t||null==(e=t.sourceLayerInfo)?void 0:e.data;return n instanceof HTMLImageElement||n instanceof l||n instanceof HTMLCanvasElement||n instanceof ImageData}function M(t){return e(t)&&"release"in t&&t.release(),null}function w(t){return t.fetchTile&&!1!==t.hasOverriddenFetchTile}function b(t,e,n,l){return r[l].checkIfTileInfoSupportedForViewSR(t,n,e)}function C(t,l,i){let o=null,r=null;if("wmts"===t.type){const e=t.activeLayer;if(e){const t=e.tileMatrixSet;if(t)o=t.tileInfo,r=t.fullExtent;else{const t=e.tileMatrixSets;if(t){const e=t.find((t=>null==b(t.tileInfo,t.fullExtent,l,i)));if(e)return{tileInfo:e.tileInfo,fullExtent:e.fullExtent}}}}}else r=m(t)?t.getCompatibleFullExtent(l):t.fullExtent,o=p(t)&&!j.force512VTL?t.tileInfo.getOrCreateCompatible(256):m(t)?t.getCompatibleTileInfo(l,r,i===n.Local):t.tileInfo;return e(o)&&e(r)&&null==b(o,r,l,i)?{tileInfo:o,fullExtent:r}:null}const j={force512VTL:!1};export{b as checkIfTileInfoSupportedForView,s as computeSkirtScale,d as getLayerWithExtentRange,C as getTiledLayerInfo,E as isElevationLayerView,v as isImageryTileLayerView,h as isImageryTileRenderInfo,m as isProjectableRasterLayer,S as isRasterTileRenderInfo,g as isSurfaceLayerView,T as isTextureTileRenderInfo,y as isTileLayerView,p as isVectorTileLayer,I as isVectorTileLayerView,L as isVectorTileRenderInfo,x as isWMTSLayerView,M as releaseTileData,j as test,w as useFetchTileForLayer,u as weakAssert};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as t,isNone as e}from"../../../core/maybe.js";import n from"../../../core/PooledArray.js";class r{constructor(){this._queue=new n,this._last=null,this.remove=()=>{}}get done(){return 0===this._queue.length&&(!this._last||this._last.isLeaf)}resetOne(t){this._queue.clear(),this._queue.push(t),this._last=null}reset(e=null){this._queue.clear(),t(e)&&this._queue.pushArray(e),this._last=null}skipSubtree(){this._last=null}next(){return this._last&&!this._last.isLeaf&&this._queue.pushArray(this._last.children),this._last=this._queue.pop(),this._last}}class s{constructor(){this.q=new n}get done(){return 0===this.q.length}reset(t){if(this.q.clear(),!e(t)){this.q.pushArray(t);for(let t=0;t<this.q.length;++t){const e=this.q.data[t];e.isLeaf||this.q.pushArray(e.children)}}}next(){return this.q.pop()}}function i(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)l(t[n],e);else l(t,e)}function l(t,e){if(e(t),!t.isLeaf)for(const n of t.children)l(n,e)}function u(t,n,r){if(e(n)||e(n.fullExtent))return!1;const s=n.fullExtent,i=t.extent;if(r){if(i[0]<s.xmin||i[1]<s.ymin||i[2]>s.xmax||i[3]>s.ymax)return!1}else if(s.xmin>i[2]||s.ymin>i[3]||s.xmax<i[0]||s.ymax<i[1])return!1;const l=t.surface.tilingScheme.levels[t.level].scale;return!(n.minScale>0&&l>1.00000001*n.minScale)&&!(n.maxScale>0&&l<.99999999*n.maxScale)}function o(t,e){e.sort(((e,n)=>a(e,n,t)))}function a(t,e,n){const r=t.screenDepth,s=e.screenDepth;return r<s?-n:r>s?n:0}function h(t,e){const n=new Map;t.forAll((t=>n.set(t,t.distanceToSquared(e)))),t.sort(((t,e)=>n.get(t)-n.get(e)))}function c(t,e,n){let r=1,s=0,i=0;for(;t!==e;)if(r*=.5,s*=.5,i*=.5,1&t.lij[2]&&(s+=.5),0==(1&t.lij[1])&&(i+=.5),null==(t=t.parent))throw new Error("tile was not a descendant of upsampleTile");n.init(e,s,i,r)}function f(t){for(let e=0;e<t.length;e++){const n=t[e],r=n.parent;if(r)for(let t=0;t<4;t++){const e=r.children[t];if(e&&e!==n&&e.loadable)return!0}}return!1}function m(t,e){if(!t||!e||t[0]===e[0])return!1;const n=t[0]<e[0],r=n?t:e,s=n?e:t,i=1<<s[0]-r[0];return Math.floor(s[1]/i)===r[1]&&Math.floor(s[2]/i)===r[2]}export{s as IteratorPostorder,r as IteratorPreorder,a as compareTiles,c as computeUpsampleInfo,u as fallsWithinLayer,f as hasLoadableSiblings,o as sortTiles,h as sortTilesByPOI,m as tilesAreRelated,i as traverseTilesPreorder};
|
|
5
|
+
import{isSome as t,isNone as e}from"../../../core/maybe.js";import n from"../../../core/PooledArray.js";class r{constructor(){this._queue=new n,this._last=null,this.remove=()=>{}}get done(){return 0===this._queue.length&&(!this._last||this._last.isLeaf)}resetOne(t){this._queue.clear(),this._queue.push(t),this._last=null}reset(e=null){this._queue.clear(),t(e)&&this._queue.pushArray(e),this._last=null}skipSubtree(){this._last=null}next(){return this._last&&!this._last.isLeaf&&this._queue.pushArray(this._last.children),this._last=this._queue.pop(),this._last}}class s{constructor(){this.q=new n}get done(){return 0===this.q.length}reset(t){if(this.q.clear(),!e(t)){this.q.pushArray(t);for(let t=0;t<this.q.length;++t){const e=this.q.data[t];e.isLeaf||this.q.pushArray(e.children)}}}next(){return this.q.pop()}}function i(t,e){if(Array.isArray(t))for(let n=0;n<t.length;n++)l(t[n],e);else l(t,e)}function l(t,e){if(e(t),!t.isLeaf)for(const n of t.children)l(n,e)}function u(t,n,r){if(e(n)||e(n.fullExtent))return!1;const s=n.fullExtent,i=t.extent;if(r){if(i[0]<s.xmin||i[1]<s.ymin||i[2]>s.xmax||i[3]>s.ymax)return!1}else if(s.xmin>i[2]||s.ymin>i[3]||s.xmax<i[0]||s.ymax<i[1])return!1;const l=t.surface.tilingScheme.levels[t.level].scale;return!(n.minScale>0&&l>1.00000001*n.minScale)&&!(n.maxScale>0&&l<.99999999*n.maxScale)}function o(t,e){e.sort(((e,n)=>a(e,n,t)))}function a(t,e,n){const r=t.screenDepth,s=e.screenDepth;return r<s?-n:r>s?n:0}function h(t,e){const n=new Map;t.forAll((t=>n.set(t.lij,t.distanceToSquared(e)))),t.sort(((t,e)=>n.get(t.lij)-n.get(e.lij)))}function c(t,e,n){let r=1,s=0,i=0;for(;t!==e;)if(r*=.5,s*=.5,i*=.5,1&t.lij[2]&&(s+=.5),0==(1&t.lij[1])&&(i+=.5),null==(t=t.parent))throw new Error("tile was not a descendant of upsampleTile");n.init(e,s,i,r)}function f(t){for(let e=0;e<t.length;e++){const n=t[e],r=n.parent;if(r)for(let t=0;t<4;t++){const e=r.children[t];if(e&&e!==n&&e.loadable)return!0}}return!1}function m(t,e){if(!t||!e||t[0]===e[0])return!1;const n=t[0]<e[0],r=n?t:e,s=n?e:t,i=1<<s[0]-r[0];return Math.floor(s[1]/i)===r[1]&&Math.floor(s[2]/i)===r[2]}export{s as IteratorPostorder,r as IteratorPreorder,a as compareTiles,c as computeUpsampleInfo,u as fallsWithinLayer,f as hasLoadableSiblings,o as sortTiles,h as sortTilesByPOI,m as tilesAreRelated,i as traverseTilesPreorder};
|
|
@@ -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{isSome as t,isNone as o,applySome as r,unwrap as n}from"../../../../../core/maybe.js";import i from"../../../../../core/PooledArray.js";import{e as s,t as a,g as m}from"../../../../../chunks/mat3.js";import{c,a as l}from"../../../../../chunks/mat3f32.js";import{h as p,v as h,t as f,g as u}from"../../../../../chunks/vec3.js";import{c as b}from"../../../../../chunks/vec3f64.js";import{c as g}from"../../../../../chunks/vec4.js";import{c as d}from"../../../../../chunks/vec4f32.js";import{ColorMixModeEnum as y,encodeSymbolColor as C}from"../../../layers/support/symbolColorUtils.js";import{clone as j,radius as
|
|
5
|
+
import e from"../../../../../core/Logger.js";import{isSome as t,isNone as o,applySome as r,unwrap as n}from"../../../../../core/maybe.js";import i from"../../../../../core/PooledArray.js";import{e as s,t as a,g as m}from"../../../../../chunks/mat3.js";import{c,a as l}from"../../../../../chunks/mat3f32.js";import{h as p,v as h,t as f,g as u}from"../../../../../chunks/vec3.js";import{c as b}from"../../../../../chunks/vec3f64.js";import{c as g}from"../../../../../chunks/vec4.js";import{c as d}from"../../../../../chunks/vec4f32.js";import{ColorMixModeEnum as y,encodeSymbolColor as C}from"../../../layers/support/symbolColorUtils.js";import{clone as j,radius as M}from"../../../support/orientedBoundingBox.js";import{glLayout as w}from"../../../support/buffer/glUtil.js";import{newLayout as x}from"../../../support/buffer/InterleavedLayout.js";import S from"./ComponentData.js";import{State as v,ComponentObject as _}from"./ComponentObject.js";import{isVaryingComponentParameters as D}from"./interface.js";import A from"./IntersectionGeometry.js";import{Renderable as P}from"./Renderable.js";import{RenderGeometry as O}from"./RenderGeometry.js";import{RenderSubmitSystem as T}from"./RenderSubmitSystem.js";import{createVertexBufferLayout as k}from"./SourceGeometry.js";import{ComponentParametersVarying as R,ComponentParametersUniform as I,ComponentParameterSummary as U,ComponentMaterial as B}from"./Material/ComponentMaterial.js";import{ComponentDrawParameters as G}from"./Material/ComponentTechnique.js";import{TwoVectorPosition as V}from"../../core/util/TwoVectorPosition.js";import{getVisibility as E,updateVisibilityWithCount as N}from"../../lib/ComponentUtils.js";import{assert as L}from"../../lib/Util.js";import{VertexAttribute as W}from"../../lib/VertexAttribute.js";import{BufferManager as H}from"../../lib/TextureBackedBuffer/BufferManager.js";import{BufferObject as q}from"../../../../webgl/BufferObject.js";import{Usage as F,PrimitiveType as z}from"../../../../webgl/enums.js";import{VertexArrayObject as X}from"../../../../webgl/VertexArrayObject.js";const J=e.getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class K{constructor(e){this._renderManager=e,this._objects=[new i,new i],this._renderSubmit=new T(this),this._renderManager.register(this._renderSubmit),this._componentBufferManager=new H(e.rctx)}dispose(){L(0===this._objects[v.Hidden].length&&0===this._objects[v.Visible].length,"ObjectCollection should be empty upon disposal"),this._componentBufferManager.destroy()}createObject(e){const t=new _;return t.toMapSpace=e.toMapSpace.slice(),t.transform=e.transform,t.obb=j(e.obb),t.components=new S(this._componentBufferManager,e.geometry.componentOffsets),t.renderable=this._createRenderable(e,t.components),t.intersectionGeometry=new A(e.geometry.positionData,t.components),this._objects[t.visible].push(t),t}destroyObject(e){const t=e;this._objects[t.visible].removeUnordered(t),t.dispose(),this._notifyDirty()}setObjectVisibility(e,t){const o=e;t!==o.visible&&(this._objects[o.visible].removeUnordered(o),this._objects[t].push(o),o.visible=t,this._notifyDirty())}preSubmit(e){const t=e.camera.eye;this.visibleObjects.forAll((e=>{const o=p(t,e.obb.center);e.renderable.meta.cameraDepthSquared=o}))}getMaterial(e){return e.renderable.material}updateMaterial(e,t){const o=e.renderable.material;t(o),o.dirty&&this._notifyDirty()}setAllComponentVisibilities(e,t){const o=e;o.components.visibility.reset(t),o.components.visibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.components.visibility.forEachComponent(t)}getComponentCount(e){const t=e,o=t.components.visibility.componentCount();return{visible:o,invisible:t.components.count-o}}setComponentData(e,t){const o=e,r=o.renderable.material;if(D(t)){const e=o.components,n=e.materialDataBuffer,i=e.materialDataIndices,s={castShadows:!0,pickable:!0,externalColor:d(),externalColorMixMode:y.Multiply},a=n.textureBuffer,m=new Uint8Array(4),c=new Uint32Array(m.buffer);let l=0,p=0,h=0,f=!1,u=0;for(let o=0;o<e.count;o++)t(o,s),l+=+(s.externalColor[3]<1),p+=+(s.externalColorMixMode===y.Replace&&1===s.externalColor[3]),h+=+s.castShadows,C(s.externalColor,s.externalColorMixMode,m),m[2]=254&m[2]|+s.castShadows,a.setData(i[o],0,m[0],m[1],m[2],m[3]),f=f||o>0&&u!==c[0],u=c[0],s.pickable!==E(e.pickability,o)&&(e.pickability=N(e.pickability,e.count,o,s.pickable));f?(r.componentParameters=new R,r.componentParameters.castShadows=Y(h,e.count),r.componentParameters.transparent=Y(l,e.count),r.componentParameters.opaqueOverride=Y(p,e.count),r.componentParameters.texture=a,a.updateTexture()):(r.componentParameters=new I,r.componentParameters.castShadows=s.castShadows?U.All:U.None,r.componentParameters.externalColor=s.externalColor,r.componentParameters.externalColorMixMode=s.externalColorMixMode)}else r.componentParameters=new I,r.componentParameters.castShadows=t.castShadows?U.All:U.None,r.componentParameters.externalColor=t.externalColor,r.componentParameters.externalColorMixMode=t.externalColorMixMode;this._notifyDirty()}getComponentAabb(e,t,o){return e.intersectionGeometry.getComponentAabb(t,o)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,o){return e.intersectionGeometry.getComponentPositions(t,o)}intersect(e,o,r,n,i,m){const c=e;t(i)&&(i.localOrigin=c.transform.position);const l=s(Z,c.transform.rotationScale);h($,o,c.transform.position),h(ee,r,c.transform.position),f($,$,l),f(ee,ee,l);const p=a(Z,l);return c.intersectionGeometry.intersect($,ee,n,p,i,m)}addEdges(e,t,o,r){const n=e,{indices:i,positions:s}=n.intersectionGeometry,a=n.components.offsets;return t.addComponentObject(e,n.transform,{center:n.obb.center,radius:M(n.obb)},s,i,a,o,r)}addComponentHighlight(e,t){const r=e.components;o(r.highlightCounts)&&(r.highlightCounts=new Uint32Array(r.count+1));0===r.highlightCounts[t]++&&(r.highlightsDirty(),this._notifyDirty()),r.highlightCounts[r.count]++}removeComponentHighlight(e,t){const r=e.components;if(o(r.highlightCounts))return void J.warn("Removing non-existing highlight.");const n=r.highlightCounts[t],i=r.highlightCounts[r.count];if(0!==n){if(n>1)return r.highlightCounts[t]=n-1,void(r.highlightCounts[r.count]=i-1);r.highlightCounts[t]=0,r.highlightsDirty(),this._notifyDirty(),1===i?r.highlightCounts=null:r.highlightCounts[r.count]=i-1}else J.warn("Removing non-existing highlight.")}clearHighlights(e){const o=e.components;t(o.highlightCounts)&&(o.highlightCounts=null,o.highlightsDirty(),this._notifyDirty())}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._objects[v.Visible]}_createRenderable(e,o){const i=this._renderManager.rctx,c=e.geometry,p=c.vertices.layoutParameters,h=q.createVertex(i,F.STATIC_DRAW,c.vertices.data),f=r(c.indices,(e=>q.createIndex(i,F.STATIC_DRAW,e))),b=w(k(p)),d=new Uint16Array(c.vertices.count);for(let r=0;r<o.count;r++){const e=o.offsets[r],n=o.offsets[r+1],i=o.materialDataIndices[r];if(t(c.indices))for(let t=e;t<n;t++){d[c.indices[t]]=i}else for(let t=e;t<n;t++)d[t]=i}const y=q.createVertex(i,F.STATIC_DRAW,d.buffer),C=new V(e.transform.position),j=l(e.transform.rotationScale);s(j,j),a(j,j);const M=new G;u(M.transformWorldFromModelTL,C.low),u(M.transformWorldFromModelTH,C.high),m(M.transformWorldFromModelRS,e.transform.rotationScale),m(M.transformNormalGlobalFromModel,j),g(M.toMapSpace,e.toMapSpace);const x=new B,S=new X(i,x.attributeLocations,{data:b,componentIndices:Q},{data:h,componentIndices:y},n(f)),v=new O(S,z.TRIANGLES,p,t(f)),_={cameraDepthSquared:.5,gpuMemoryEstimate:h.byteSize+y.byteSize+(t(f)?f.byteSize:0)};return new P(x,M,v,_)}_notifyDirty(){this._renderManager.notifyDirty()}}const Q=w(x().u16(W.COMPONENTINDEX));function Y(e,t){return e===t?U.All:0===e?U.None:U.Some}const Z=c(),$=b(),ee=b();export{K as ComponentObjectCollection};
|
|
@@ -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{releaseMaybe as t,isSome as r}from"../../../../../../core/maybe.js";import{C as s}from"../../../../../../chunks/vec3.js";import{f as
|
|
5
|
+
import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{releaseMaybe as t,isSome as r}from"../../../../../../core/maybe.js";import{C as s}from"../../../../../../chunks/vec3.js";import{f as a}from"../../../../../../chunks/vec3f32.js";import{g as o,c as i,v as n}from"../../../../../../chunks/vec4.js";import{f as l}from"../../../../../../chunks/vec4f32.js";import{f as p}from"../../../../../../chunks/vec4f64.js";import{ColorMixModeEnum as h}from"../../../../layers/support/symbolColorUtils.js";import{ComponentTechniqueConfiguration as u,IntegratedMeshMode as c,ComponentTechnique as d}from"./ComponentTechnique.js";import{ComponentDataType as m}from"./shader/ComponentData.glsl.js";import{a as y}from"../../../../../../chunks/ComponentShader.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardByOpacity.glsl.js";import{parameter as b,parameterBlock as T,MaterialBase as g,MaterialParameterBlock as f}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as x,MaterialSubPass as M}from"../../../core/renderPasses/AllRenderPasses.js";import{ShaderOutput as O}from"../../../core/shaderLibrary/ShaderOutputOptions.js";import{NormalsDoubleSidedMode as P}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{defaultMaskAlphaCutoff as C}from"../../../core/shaderLibrary/util/AlphaDiscard.glsl.js";import{EllipsoidMode as q}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{AlphaDiscardMode as E,TransparencyPassType as w,CullFaceOptions as D}from"../../../lib/basicInterfaces.js";class N extends g{constructor(){super(...arguments),this.baseColor=l(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=a(1,1,.5),this.emissiveFactor=a(0,0,0),this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null,this.overlayTexOffset=p(-1,-1,-1,-1),this.overlayTexScale=p(0,0,0,0),this.overlayColor=null,this.overlayHighlight=null,this.overlayNormal=null,this.objectOpacity=1,this.commonMaterialParameters=new R,this.componentParameters=new I,this.alphaCutoff=C,this.alphaDiscardMode=E.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=q.Earth,this.sceneHasOcludees=!1,this._techniqueConfig=new u}dispose(){this._technique=t(this._technique),this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}prepareTechnique(e,t,s){const a=this._techniqueConfig;if(a.hasVertexColors=s.colors,a.hasNormals=s.normals,a.vertexTextureCoordinates=s.textureCoordinates,a.usePBR=this.usePBR,a.hasMetalnessAndRoughnessTexture=r(this.metallicRoughnessTexture),a.hasEmissionTexture=r(this.emissionTexture),a.hasOcclusionTexture=r(this.occlusionTexture),a.hasNormalTexture=r(this.normalTexture),a.transparencyPassType=t.identifier===x.Material&&null!=t.transparencyPassType?t.transparencyPassType:w.NONE,a.multipassTerrainEnabled=t.identifier===x.Material&&null!=t.multipassTerrainParams&&t.multipassTerrainParams.multipassTerrainEnabled,a.cullAboveGround=t.identifier===x.Material&&null!=t.multipassTerrainParams&&t.multipassTerrainParams.cullAboveGround,a.ellipsoidMode=this.ellipsoidMode,this.dirty){a.componentData=this.componentParameters.type,a.cullFace=this.commonMaterialParameters.cullFace,a.doubleSidedMode=this.commonMaterialParameters.doubleSided?P.View:P.None,a.baseColorTexture=r(this.baseColorTexture),a.isSchematic=this.hasParametersFromSource&&!r(this.baseColorTexture);const e=this._computeWhichMaterialPass();a.blendingEnabled=e===A.Transparent||e===A.OpaqueAndTransparent,a.alphaDiscardMode=this.alphaDiscardMode,a.integratedMeshMode=this.isIntegratedMesh?this.overlayColor?this.overlayNormal?c.ColorOverlayWithWater:c.ColorOverlay:c.NoOverlay:c.None,a.polygonOffsetEnabled=this.polygonOffsetEnabled,this._setClean()}return a.slicePlaneEnabled=t.slicePlaneEnabled&&this.commonMaterialParameters.slicePlaneEnabled,t.identifier===x.ShadowMap?(a.output=O.Shadow,a.vertexDiscardMode=v.None):t.identifier===x.Highlight?(a.output=O.Highlight,a.vertexDiscardMode=v.None):(this._computeWhichMaterialPass()===A.OpaqueAndTransparent?a.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:a.vertexDiscardMode=v.None,a.output=k(t.subPass),t.subPass===M.Alpha&&(a.sceneHasOcludees=t.sceneHasOcludees),t.subPass===M.Color?(a.receiveAmbientOcclusion=t.ambientOcclusionEnabled,a.sceneHasOcludees=t.sceneHasOcludees,a.receiveShadows=t.shadowsEnabled,a.ssrEnabled=t.ssrParams.ssrEnabled):(a.receiveAmbientOcclusion=!1,a.receiveShadows=!1)),this._technique=e.releaseAndAcquire(d,a,this._technique),this._technique}submit(e,t){if(0===this.objectOpacity)return;const s=t.renderable.geometry,a=t.components,o=t.renderable.drawParameters,i=t.renderable.meta.cameraDepthSquared,n=a.geometryRanges,l=a.highlightRanges,p=a.defaultShadowMapRanges;switch(this._computeWhichMaterialPass()){case A.Opaque:e.materialOpaque.submitDraw(this,s,n,o,i);break;case A.Transparent:e.materialTransparent.submitDraw(this,s,n,o,i);break;case A.OpaqueAndTransparent:e.materialOpaque.submitDraw(this,s,n,o,i),e.materialTransparent.submitDraw(this,s,n,o,i);break;case A.IntegratedMesh:e.materialIntegratedMesh.submitDraw(this,s,n,o,i),this.overlayHighlight&&e.highlightIntegratedMesh.submitDraw(this,s,n,o,i)}const h=this.componentParameters.castShadows!==j.None;h&&e.shadowMap.submitDraw(this,s,n,o,i),r(l)&&(e.highlight.submitDraw(this,s,l,o,i),h&&e.highlightShadowMap.submitDraw(this,s,l,o,i)),h&&r(p)&&e.defaultShadowMap.submitDraw(this,s,p,o,i)}get attributeLocations(){return y}_computeWhichMaterialPass(){return this.isIntegratedMesh?A.IntegratedMesh:this.objectOpacity<1?A.Transparent:this.componentParameters.opaqueOverride===j.All?A.Opaque:this.baseColor[3]<1||this.alphaDiscardMode===E.Blend||this.alphaDiscardMode===E.MaskBlend?A.Transparent:this.componentParameters.transparent===j.None?A.Opaque:this.componentParameters.transparent===j.All?A.Transparent:A.OpaqueAndTransparent}}var S,A,j;e([b({vectorOps:n})],N.prototype,"baseColor",void 0),e([b()],N.prototype,"usePBR",void 0),e([b()],N.prototype,"hasParametersFromSource",void 0),e([b({vectorOps:s})],N.prototype,"mrrFactors",void 0),e([b({vectorOps:s})],N.prototype,"emissiveFactor",void 0),e([b({dispose:!0})],N.prototype,"baseColorTexture",void 0),e([b({dispose:!0})],N.prototype,"metallicRoughnessTexture",void 0),e([b({dispose:!0})],N.prototype,"emissionTexture",void 0),e([b({dispose:!0})],N.prototype,"occlusionTexture",void 0),e([b({dispose:!0})],N.prototype,"normalTexture",void 0),e([b({vectorOps:{equals:o,copy:i}})],N.prototype,"overlayTexOffset",void 0),e([b({vectorOps:{equals:o,copy:i}})],N.prototype,"overlayTexScale",void 0),e([b()],N.prototype,"overlayColor",void 0),e([b()],N.prototype,"overlayHighlight",void 0),e([b()],N.prototype,"overlayNormal",void 0),e([b()],N.prototype,"objectOpacity",void 0),e([T()],N.prototype,"commonMaterialParameters",void 0),e([T()],N.prototype,"componentParameters",void 0),e([b()],N.prototype,"alphaCutoff",void 0),e([b()],N.prototype,"alphaDiscardMode",void 0),e([b()],N.prototype,"isIntegratedMesh",void 0),e([b()],N.prototype,"polygonOffsetEnabled",void 0),e([b()],N.prototype,"ellipsoidMode",void 0),e([b()],N.prototype,"sceneHasOcludees",void 0),function(e){e[e.VERTEX=0]="VERTEX",e[e.GROUND=1]="GROUND",e[e.SCREEN_DERIVATIVE=2]="SCREEN_DERIVATIVE"}(S||(S={})),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(A||(A={}));class R extends f{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=D.Back,this.slicePlaneEnabled=!0}}e([b()],R.prototype,"doubleSided",void 0),e([b()],R.prototype,"cullFace",void 0),e([b()],R.prototype,"slicePlaneEnabled",void 0);class I extends f{constructor(){super(...arguments),this.externalColor=l(1,1,1,1),this.externalColorMixMode=h.Multiply,this.castShadows=j.All}get transparent(){return this.externalColor[3]<1?j.All:j.None}get opaqueOverride(){return this.externalColorMixMode===h.Replace&&1===this.externalColor[3]?j.All:j.None}get visible(){return this.externalColor[3]>0?j.All:j.None}get type(){return m.Uniform}}e([b({vectorOps:n})],I.prototype,"externalColor",void 0),e([b()],I.prototype,"externalColorMixMode",void 0),e([b()],I.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(j||(j={}));class _ extends f{constructor(){super(...arguments),this.texture=null,this.transparent=j.None,this.opaqueOverride=j.None,this.castShadows=j.None}get type(){return m.Varying}}function k(e){switch(e){case M.Color:return O.Color;case M.Alpha:return O.Alpha;case M.Depth:return O.Depth;case M.Normal:return O.Normal}}e([b()],_.prototype,"texture",void 0),e([b()],_.prototype,"transparent",void 0),e([b()],_.prototype,"opaqueOverride",void 0),e([b()],_.prototype,"castShadows",void 0);export{R as CommonMaterialParameters,N as ComponentMaterial,j as ComponentParameterSummary,I as ComponentParametersUniform,_ as ComponentParametersVarying,S as ShadingNormalSource};
|
|
@@ -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{isSome as r}from"../../../../../../core/maybe.js";import{c as o}from"../../../../../../chunks/mat3f64.js";import{c as t}from"../../../../../../chunks/vec4f64.js";import{ComponentDataType as i}from"./shader/ComponentData.glsl.js";import{C as a}from"../../../../../../chunks/ComponentShader.glsl.js";import{VertexDiscardMode as s}from"./shader/VertexDiscardByOpacity.glsl.js";import{RenderPassIdentifier as n,MaterialSubPass as l}from"../../../core/renderPasses/AllRenderPasses.js";import{ShaderOutput as d}from"../../../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as p}from"../../../core/shaderLibrary/Slice.glsl.js";import{NormalAttribute as u}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as c}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexPosition as m}from"../../../core/shaderLibrary/attributes/VertexPosition.glsl.js";import{bindOutputHighlight as h}from"../../../core/shaderLibrary/output/OutputHighlight.glsl.js";import{Normals as b}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{bindPBRUniforms as T,PBRMode as f}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindSSRUniforms as x}from"../../../core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js";import{doublePrecisionRequiresObfuscation as g}from"../../../core/shaderLibrary/util/DoublePrecision.glsl.js";import{EllipsoidMode as v}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{ReloadableShaderModule as y}from"../../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as M}from"../../../core/shaderTechnique/ShaderTechnique.js";import{parameter as C,ShaderTechniqueConfiguration as O}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as N,AlphaDiscardMode as S,TransparencyPassType as P,StencilBits as E}from"../../../lib/basicInterfaces.js";import{blendingDefault as j,oitBlending as U,oitDepthTest as D,OITPolygonOffset as A}from"../../../lib/OrderIndependentTransparency.js";import{Program as w}from"../../../lib/Program.js";import{stencilWriteMaskOn as F,replaceBitWhenDepthTestPasses as R,stencilBaseAllZerosParams as L}from"../../../lib/StencilUtils.js";import{makePipelineState as W,cullingParams as _,defaultDepthWriteParams as V,defaultColorWriteParams as G}from"../../../../../webgl/renderState.js";class q extends M{bindPass(e){const r=this.program;m.bindViewProjTransform(r,e.viewTransform),p(this.program,this.configuration,e.slicePlane),e.identifier===n.Material&&(void 0!==e.ssrParams&&x(this.program,e.ssrParams),r.setUniformMatrix3fv("uTransformNormal_ViewFromGlobal",e.transformNormal_ViewFromGlobal),e.subPass===l.Depth&&r.setUniform2fv("cameraNearFar",e.cameraNearFar),e.subPass===l.Color&&e.lighting.setUniforms(this.program,e.integratedMesh)),e.identifier===n.ShadowMap&&this.program.setUniform2fv("cameraNearFar",e.cameraNearFar)}bindMaterial(e,o){this._material=e;const t=this.program;t.setUniform4fv("uBaseColor",e.baseColor),t.setUniform1f("uObjectOpacity",e.objectOpacity),t.setUniform1f("textureAlphaCutoff",e.alphaCutoff),e.componentParameters.type===i.Varying?e.componentParameters.texture.bind(t,"uComponentColorTex","uComponentColorTexInvDim"):(t.setUniform4fv("uExternalColor",e.componentParameters.externalColor),t.setUniform1i("uExternalColorMixMode",e.componentParameters.externalColorMixMode)),r(e.baseColorTexture)&&e.baseColorTexture.bind(t,"uBaseColorTexture","uBaseColorTextureSize"),this.configuration.output!==d.Color&&this.configuration.output!==d.Alpha||(T(this.program,e,this.configuration.isSchematic),r(e.metallicRoughnessTexture)&&e.metallicRoughnessTexture.bind(t,"texMetallicRoughness","texMetallicRoughnessSize"),r(e.emissionTexture)&&e.emissionTexture.bind(t,"texEmission","texEmissionSize"),r(e.occlusionTexture)&&e.occlusionTexture.bind(t,"texOcclusion","texOcclusionSize"),r(e.normalTexture)&&e.normalTexture.bind(t,"normalTexture","normalTextureSize")),e.isIntegratedMesh&&(o.identifier===n.Material&&o.subPass===l.Color?(t.bindTexture(e.overlayColor,"ovColorTex"),t.bindTexture(e.overlayNormal,"ovNormalTex")):o.identifier===n.Highlight&&t.bindTexture(e.overlayHighlight,"ovColorTex"),t.setUniform1f("overlayOpacity",1)),o.identifier===n.Highlight&&h(this.program,o),o.identifier===n.Material&&o.subPass===l.Color&&(o.ambientOcclusionEnabled&&o.bindAmbientOcclusion(t),o.shadowsEnabled&&o.bindShadowMap(t)),o.identifier!==n.Material||o.subPass!==l.Color&&o.subPass!==l.Alpha||!o.multipassTerrainParams.multipassTerrainEnabled||(this.program.setUniform2fv("cameraNearFar",o.cameraNearFar),t.setUniform2fv("inverseViewport",o.inverseViewport),o.multipassTerrainParams.terrainLinearDepthTexture&&t.bindTexture(o.multipassTerrainParams.terrainLinearDepthTexture,"terrainDepthTexture"))}bindDraw(e){if(m.bindModelTransform(this.program,e),this.program.setUniformMatrix3fv("uTransformNormal_GlobalFromModel",e.transformNormal_GlobalFromModel),this.program.rebindTextures(),r(this._material)&&this._material.isIntegratedMesh){const r=this._material.overlayTexScale,o=this._material.overlayTexOffset;this.program.setUniform4fv("overlayTexOffset",[e.toMapSpace[0]*r[0]+o[0],e.toMapSpace[1]*r[1]+o[1],e.toMapSpace[0]*r[2]+o[2],e.toMapSpace[1]*r[3]+o[3]]),this.program.setUniform4fv("overlayTexScale",[e.toMapSpace[2]*r[0],e.toMapSpace[3]*r[1],e.toMapSpace[2]*r[2],e.toMapSpace[3]*r[3]])}}initializeProgram(e){const r=q.shader.get(),o=this.configuration,t=r.build({multipassTerrainEnabled:o.multipassTerrainEnabled,cullAboveGround:o.cullAboveGround,OITEnabled:o.transparencyPassType===P.Color,output:o.output,normalType:o.integratedMeshMode===I.None?o.hasNormals?u.Type.CompressedAttribute:u.Type.ScreenDerivative:u.Type.Ground,attributeColor:o.hasVertexColors,attributeTextureCoordinates:o.vertexTextureCoordinates,componentData:o.componentData,alphaDiscardMode:o.alphaDiscardMode,baseColorTexture:o.baseColorTexture,doubleSidedMode:o.doubleSidedMode,receiveAmbientOcclusion:o.receiveAmbientOcclusion,receiveShadows:o.receiveShadows,slicePlaneEnabled:o.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,viewingMode:e.viewingMode,vertexDiscardMode:o.vertexDiscardMode,pbrMode:o.integratedMeshMode===I.ColorOverlayWithWater?f.WaterOnIntegratedMesh:o.usePBR?o.isSchematic?f.Schematic:f.Normal:f.Disabled,hasMetalnessAndRoughnessTexture:o.hasMetalnessAndRoughnessTexture,hasEmissionTexture:o.hasEmissionTexture,hasOcclusionTexture:o.hasOcclusionTexture,hasNormalTexture:o.hasNormalTexture,vertexTangents:!1,supportsTextureAtlas:!0,doublePrecisionRequiresObfuscation:g(e.rctx),overlayEnabled:o.integratedMeshMode===I.ColorOverlay||o.integratedMeshMode===I.ColorOverlayWithWater,ssrEnabled:o.ssrEnabled,highStepCount:!1,ellipsoidMode:o.ellipsoidMode});return new w(e.rctx,t,r.attributeLocations)}_setPipelineState(e){const r=this.configuration,o=r.integratedMeshMode!==I.None,t=e===P.NONE,i=e===P.FrontFace;return W({blending:r.output!==d.Color&&r.output!==d.Alpha||!r.blendingEnabled?null:t?j:U(e),culling:_(r.cullFace),depthTest:{func:D(e)},depthWrite:t||i?V:null,colorWrite:G,stencilWrite:o||r.sceneHasOcludees?F:null,stencilTest:o?R(E.IntegratedMeshMaskExcluded):r.sceneHasOcludees?L:null,polygonOffset:t||i?r.polygonOffsetEnabled?{factor:2,units:2}:null:A})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}q.shader=new y(a,(()=>import("./shader/ComponentShader.glsl.js")));class B extends m.ModelTransform{constructor(){super(...arguments),this.transformNormal_GlobalFromModel=o(),this.toMapSpace=t()}}var H,I;!function(e){e[e.None=0]="None",e[e.Transparent=1]="Transparent",e[e.Opaque=2]="Opaque",e[e.COUNT=3]="COUNT"}(H||(H={})),function(e){e[e.None=0]="None",e[e.NoOverlay=1]="NoOverlay",e[e.ColorOverlay=2]="ColorOverlay",e[e.ColorOverlayWithWater=3]="ColorOverlayWithWater",e[e.COUNT=4]="COUNT"}(I||(I={}));class z extends O{constructor(){super(...arguments),this.output=d.Color,this.hasVertexColors=!1,this.hasNormals=!1,this.vertexTextureCoordinates=c.AttributeType.None,this.componentData=i.Uniform,this.slicePlaneEnabled=!1,this.cullFace=N.Back,this.baseColorTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.vertexDiscardMode=s.None,this.doubleSidedMode=b.DoubleSidedMode.WindingOrder,this.blendingEnabled=!0,this.alphaDiscardMode=S.Opaque,this.integratedMeshMode=I.None,this.ssrEnabled=!1,this.polygonOffsetEnabled=!1,this.usePBR=!1,this.isSchematic=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.sceneHasOcludees=!1,this.transparencyPassType=P.NONE,this.ellipsoidMode=v.Earth,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([C({count:d.COUNT})],z.prototype,"output",void 0),e([C()],z.prototype,"hasVertexColors",void 0),e([C()],z.prototype,"hasNormals",void 0),e([C({count:c.AttributeType.COUNT})],z.prototype,"vertexTextureCoordinates",void 0),e([C({count:i.COUNT})],z.prototype,"componentData",void 0),e([C()],z.prototype,"slicePlaneEnabled",void 0),e([C({count:N.COUNT})],z.prototype,"cullFace",void 0),e([C()],z.prototype,"baseColorTexture",void 0),e([C()],z.prototype,"receiveAmbientOcclusion",void 0),e([C()],z.prototype,"receiveShadows",void 0),e([C({count:s.COUNT})],z.prototype,"vertexDiscardMode",void 0),e([C({count:b.DoubleSidedMode.COUNT})],z.prototype,"doubleSidedMode",void 0),e([C()],z.prototype,"blendingEnabled",void 0),e([C({count:S.COUNT})],z.prototype,"alphaDiscardMode",void 0),e([C({count:I.COUNT})],z.prototype,"integratedMeshMode",void 0),e([C()],z.prototype,"ssrEnabled",void 0),e([C()],z.prototype,"polygonOffsetEnabled",void 0),e([C()],z.prototype,"usePBR",void 0),e([C()],z.prototype,"isSchematic",void 0),e([C()],z.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([C()],z.prototype,"hasEmissionTexture",void 0),e([C()],z.prototype,"hasOcclusionTexture",void 0),e([C()],z.prototype,"hasNormalTexture",void 0),e([C()],z.prototype,"sceneHasOcludees",void 0),e([C({count:P.COUNT})],z.prototype,"transparencyPassType",void 0),e([C({count:v.COUNT})],z.prototype,"ellipsoidMode",void 0),e([C()],z.prototype,"multipassTerrainEnabled",void 0),e([C()],z.prototype,"cullAboveGround",void 0);export{B as ComponentDrawParameters,q as ComponentTechnique,z as ComponentTechniqueConfiguration,I as IntegratedMeshMode,H as PassDiscardMode};
|
|
5
|
+
import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{isSome as r}from"../../../../../../core/maybe.js";import{c as o}from"../../../../../../chunks/mat3f64.js";import{c as t}from"../../../../../../chunks/vec4f64.js";import{ComponentDataType as i}from"./shader/ComponentData.glsl.js";import{C as s}from"../../../../../../chunks/ComponentShader.glsl.js";import{VertexDiscardMode as a}from"./shader/VertexDiscardByOpacity.glsl.js";import{RenderPassIdentifier as n,MaterialSubPass as l}from"../../../core/renderPasses/AllRenderPasses.js";import{ShaderOutput as d}from"../../../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as p}from"../../../core/shaderLibrary/Slice.glsl.js";import{NormalAttributeType as u}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttributeType as c}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindViewProjTransform as h,bindModelTransform as m,VertexPositionModelTransform as b}from"../../../core/shaderLibrary/attributes/VertexPosition.glsl.js";import{bindOutputHighlight as f}from"../../../core/shaderLibrary/output/OutputHighlight.glsl.js";import{NormalsDoubleSidedMode as T}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{bindPBRUniforms as x,PBRMode as g}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindSSRUniforms as v}from"../../../core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js";import{doublePrecisionRequiresObfuscation as y}from"../../../core/shaderLibrary/util/DoublePrecision.glsl.js";import{EllipsoidMode as M}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{ReloadableShaderModule as C}from"../../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as O}from"../../../core/shaderTechnique/ShaderTechnique.js";import{parameter as N,ShaderTechniqueConfiguration as S}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as P,AlphaDiscardMode as E,TransparencyPassType as U,StencilBits as j}from"../../../lib/basicInterfaces.js";import{blendingDefault as D,oitBlending as A,oitDepthTest as w,OITPolygonOffset as F}from"../../../lib/OrderIndependentTransparency.js";import{Program as R}from"../../../lib/Program.js";import{stencilWriteMaskOn as L,replaceBitWhenDepthTestPasses as W,stencilBaseAllZerosParams as V}from"../../../lib/StencilUtils.js";import{makePipelineState as G,cullingParams as q,defaultDepthWriteParams as H,defaultColorWriteParams as _}from"../../../../../webgl/renderState.js";class z extends O{bindPass(e){const r=this.program;h(r,e.viewTransform),p(this.program,this.configuration,e.slicePlane),e.identifier===n.Material&&(void 0!==e.ssrParams&&v(this.program,e.ssrParams),r.setUniformMatrix3fv("transformNormalViewFromGlobal",e.transformNormalViewFromGlobal),e.subPass===l.Depth&&r.setUniform2fv("nearFar",e.nearFar),e.subPass===l.Color&&e.lighting.setUniforms(this.program,e.integratedMesh)),e.identifier===n.ShadowMap&&this.program.setUniform2fv("nearFar",e.nearFar)}bindMaterial(e,o){this._material=e;const t=this.program;t.setUniform4fv("baseColor",e.baseColor),t.setUniform1f("objectOpacity",e.objectOpacity),t.setUniform1f("textureAlphaCutoff",e.alphaCutoff),e.componentParameters.type===i.Varying?e.componentParameters.texture.bind(t,"componentColorTex","componentColorTexInvDim"):(t.setUniform4fv("externalColor",e.componentParameters.externalColor),t.setUniform1i("externalColorMixMode",e.componentParameters.externalColorMixMode)),r(e.baseColorTexture)&&e.baseColorTexture.bind(t,"baseColorTexture","baseColorTextureSize"),this.configuration.output!==d.Color&&this.configuration.output!==d.Alpha||(x(this.program,e,this.configuration.isSchematic),r(e.metallicRoughnessTexture)&&e.metallicRoughnessTexture.bind(t,"texMetallicRoughness","texMetallicRoughnessSize"),r(e.emissionTexture)&&e.emissionTexture.bind(t,"texEmission","texEmissionSize"),r(e.occlusionTexture)&&e.occlusionTexture.bind(t,"texOcclusion","texOcclusionSize"),r(e.normalTexture)&&e.normalTexture.bind(t,"normalTexture","normalTextureSize")),e.isIntegratedMesh&&(o.identifier===n.Material&&o.subPass===l.Color?(t.bindTexture(e.overlayColor,"ovColorTex"),t.bindTexture(e.overlayNormal,"ovNormalTex")):o.identifier===n.Highlight&&t.bindTexture(e.overlayHighlight,"ovColorTex"),t.setUniform1f("overlayOpacity",1)),o.identifier===n.Highlight&&f(this.program,o),o.identifier===n.Material&&o.subPass===l.Color&&(o.ambientOcclusionEnabled&&o.bindAmbientOcclusion(t),o.shadowsEnabled&&o.bindShadowMap(t)),o.identifier!==n.Material||o.subPass!==l.Color&&o.subPass!==l.Alpha||!o.multipassTerrainParams.multipassTerrainEnabled||(this.program.setUniform2fv("nearFar",o.nearFar),t.setUniform2fv("inverseViewport",o.inverseViewport),o.multipassTerrainParams.terrainLinearDepthTexture&&t.bindTexture(o.multipassTerrainParams.terrainLinearDepthTexture,"terrainDepthTexture"))}bindDraw(e){if(m(this.program,e),this.program.setUniformMatrix3fv("transformNormalGlobalFromModel",e.transformNormalGlobalFromModel),this.program.rebindTextures(),r(this._material)&&this._material.isIntegratedMesh){const r=this._material.overlayTexScale,o=this._material.overlayTexOffset;this.program.setUniform4fv("overlayTexOffset",[e.toMapSpace[0]*r[0]+o[0],e.toMapSpace[1]*r[1]+o[1],e.toMapSpace[0]*r[2]+o[2],e.toMapSpace[1]*r[3]+o[3]]),this.program.setUniform4fv("overlayTexScale",[e.toMapSpace[2]*r[0],e.toMapSpace[3]*r[1],e.toMapSpace[2]*r[2],e.toMapSpace[3]*r[3]])}}initializeProgram(e){const r=z.shader.get(),o=this.configuration,t=r.build({multipassTerrainEnabled:o.multipassTerrainEnabled,cullAboveGround:o.cullAboveGround,oitEnabled:o.transparencyPassType===U.Color,output:o.output,normalType:o.integratedMeshMode===B.None?o.hasNormals?u.CompressedAttribute:u.ScreenDerivative:u.Ground,attributeColor:o.hasVertexColors,attributeTextureCoordinates:o.vertexTextureCoordinates,componentData:o.componentData,alphaDiscardMode:o.alphaDiscardMode,baseColorTexture:o.baseColorTexture,doubleSidedMode:o.doubleSidedMode,receiveAmbientOcclusion:o.receiveAmbientOcclusion,receiveShadows:o.receiveShadows,slicePlaneEnabled:o.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,viewingMode:e.viewingMode,vertexDiscardMode:o.vertexDiscardMode,pbrMode:o.integratedMeshMode===B.ColorOverlayWithWater?g.WaterOnIntegratedMesh:o.usePBR?o.isSchematic?g.Schematic:g.Normal:g.Disabled,hasMetalnessAndRoughnessTexture:o.hasMetalnessAndRoughnessTexture,hasEmissionTexture:o.hasEmissionTexture,hasOcclusionTexture:o.hasOcclusionTexture,hasNormalTexture:o.hasNormalTexture,vertexTangents:!1,supportsTextureAtlas:!0,doublePrecisionRequiresObfuscation:y(e.rctx),overlayEnabled:o.integratedMeshMode===B.ColorOverlay||o.integratedMeshMode===B.ColorOverlayWithWater,ssrEnabled:o.ssrEnabled,highStepCount:!1,ellipsoidMode:o.ellipsoidMode});return new R(e.rctx,t,r.attributeLocations)}_setPipelineState(e){const r=this.configuration,o=r.integratedMeshMode!==B.None,t=e===U.NONE,i=e===U.FrontFace;return G({blending:r.output!==d.Color&&r.output!==d.Alpha||!r.blendingEnabled?null:t?D:A(e),culling:q(r.cullFace),depthTest:{func:w(e)},depthWrite:t||i?H:null,colorWrite:_,stencilWrite:o||r.sceneHasOcludees?L:null,stencilTest:o?W(j.IntegratedMeshMaskExcluded):r.sceneHasOcludees?V:null,polygonOffset:t||i?r.polygonOffsetEnabled?{factor:2,units:2}:null:F})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}z.shader=new C(s,(()=>import("./shader/ComponentShader.glsl.js")));class I extends b{constructor(){super(...arguments),this.transformNormalGlobalFromModel=o(),this.toMapSpace=t()}}var k,B;!function(e){e[e.None=0]="None",e[e.Transparent=1]="Transparent",e[e.Opaque=2]="Opaque",e[e.COUNT=3]="COUNT"}(k||(k={})),function(e){e[e.None=0]="None",e[e.NoOverlay=1]="NoOverlay",e[e.ColorOverlay=2]="ColorOverlay",e[e.ColorOverlayWithWater=3]="ColorOverlayWithWater",e[e.COUNT=4]="COUNT"}(B||(B={}));class J extends S{constructor(){super(...arguments),this.output=d.Color,this.hasVertexColors=!1,this.hasNormals=!1,this.vertexTextureCoordinates=c.None,this.componentData=i.Uniform,this.slicePlaneEnabled=!1,this.cullFace=P.Back,this.baseColorTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.vertexDiscardMode=a.None,this.doubleSidedMode=T.WindingOrder,this.blendingEnabled=!0,this.alphaDiscardMode=E.Opaque,this.integratedMeshMode=B.None,this.ssrEnabled=!1,this.polygonOffsetEnabled=!1,this.usePBR=!1,this.isSchematic=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.sceneHasOcludees=!1,this.transparencyPassType=U.NONE,this.ellipsoidMode=M.Earth,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([N({count:d.COUNT})],J.prototype,"output",void 0),e([N()],J.prototype,"hasVertexColors",void 0),e([N()],J.prototype,"hasNormals",void 0),e([N({count:c.COUNT})],J.prototype,"vertexTextureCoordinates",void 0),e([N({count:i.COUNT})],J.prototype,"componentData",void 0),e([N()],J.prototype,"slicePlaneEnabled",void 0),e([N({count:P.COUNT})],J.prototype,"cullFace",void 0),e([N()],J.prototype,"baseColorTexture",void 0),e([N()],J.prototype,"receiveAmbientOcclusion",void 0),e([N()],J.prototype,"receiveShadows",void 0),e([N({count:a.COUNT})],J.prototype,"vertexDiscardMode",void 0),e([N({count:T.COUNT})],J.prototype,"doubleSidedMode",void 0),e([N()],J.prototype,"blendingEnabled",void 0),e([N({count:E.COUNT})],J.prototype,"alphaDiscardMode",void 0),e([N({count:B.COUNT})],J.prototype,"integratedMeshMode",void 0),e([N()],J.prototype,"ssrEnabled",void 0),e([N()],J.prototype,"polygonOffsetEnabled",void 0),e([N()],J.prototype,"usePBR",void 0),e([N()],J.prototype,"isSchematic",void 0),e([N()],J.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([N()],J.prototype,"hasEmissionTexture",void 0),e([N()],J.prototype,"hasOcclusionTexture",void 0),e([N()],J.prototype,"hasNormalTexture",void 0),e([N()],J.prototype,"sceneHasOcludees",void 0),e([N({count:U.COUNT})],J.prototype,"transparencyPassType",void 0),e([N({count:M.COUNT})],J.prototype,"ellipsoidMode",void 0),e([N()],J.prototype,"multipassTerrainEnabled",void 0),e([N()],J.prototype,"cullAboveGround",void 0);export{I as ComponentDrawParameters,z as ComponentTechnique,J as ComponentTechniqueConfiguration,B as IntegratedMeshMode,k as PassDiscardMode};
|
|
@@ -2,13 +2,13 @@
|
|
|
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{DecodeSymbolColor as o}from"./DecodeSymbolColor.glsl.js";import{glsl as e}from"../../../../core/shaderModules/interfaces.js";import{VertexAttribute as r}from"../../../../lib/
|
|
6
|
-
float normalizedIndex = (componentIndex + 0.5) *
|
|
5
|
+
import{DecodeSymbolColor as o}from"./DecodeSymbolColor.glsl.js";import{glsl as e}from"../../../../core/shaderModules/interfaces.js";import{VertexAttribute as r}from"../../../../lib/VertexAttribute.js";var n;function l(l,t){t.componentData===n.Varying&&(l.vertex.uniforms.add("componentColorTex","sampler2D"),l.vertex.uniforms.add("componentColorTexInvDim","vec2"),l.attributes.add(r.COMPONENTINDEX,"float"),l.varyings.add("vExternalColorMixMode","mediump float"),l.varyings.add("vExternalColor","vec4"),l.include(o),l.vertex.code.add(e`vec4 _readComponentColor() {
|
|
6
|
+
float normalizedIndex = (componentIndex + 0.5) * componentColorTexInvDim.x;
|
|
7
7
|
vec2 indexCoord = vec2(
|
|
8
8
|
mod(normalizedIndex, 1.0),
|
|
9
|
-
(floor(normalizedIndex) + 0.5) *
|
|
9
|
+
(floor(normalizedIndex) + 0.5) * componentColorTexInvDim.y
|
|
10
10
|
);
|
|
11
|
-
return texture2D(
|
|
11
|
+
return texture2D(componentColorTex, indexCoord);
|
|
12
12
|
}
|
|
13
13
|
vec4 forwardExternalColor(out bool castShadows) {
|
|
14
14
|
vec4 componentColor = _readComponentColor() * 255.0;
|
|
@@ -22,11 +22,11 @@ return vExternalColor;
|
|
|
22
22
|
}`),l.fragment.code.add(e`void readExternalColor(out vec4 externalColor, out int externalColorMixMode) {
|
|
23
23
|
externalColor = vExternalColor;
|
|
24
24
|
externalColorMixMode = int(vExternalColorMixMode);
|
|
25
|
-
}`)),t.componentData===n.Uniform&&(l.vertex.uniforms.add("
|
|
26
|
-
vExternalColor =
|
|
25
|
+
}`)),t.componentData===n.Uniform&&(l.vertex.uniforms.add("externalColor","vec4"),l.fragment.uniforms.add("externalColorMixMode","int"),l.varyings.add("vExternalColor","vec4"),l.vertex.code.add(e`vec4 forwardExternalColor(out bool castShadows) {
|
|
26
|
+
vExternalColor = externalColor;
|
|
27
27
|
castShadows = true;
|
|
28
|
-
return
|
|
29
|
-
}`),l.fragment.code.add(e`void readExternalColor(out vec4
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
return externalColor;
|
|
29
|
+
}`),l.fragment.code.add(e`void readExternalColor(out vec4 color, out int colorMixMode) {
|
|
30
|
+
color = vExternalColor;
|
|
31
|
+
colorMixMode = externalColorMixMode;
|
|
32
32
|
}`))}!function(o){o[o.Uniform=0]="Uniform",o[o.Varying=1]="Varying",o[o.COUNT=2]="COUNT"}(n||(n={}));export{l as ComponentData,n as ComponentDataType};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../../../../geometry/support/Ellipsoid.js";import"../../../../../../ViewingMode.js";import"./ComponentData.glsl.js";import"./VertexDiscardByOpacity.glsl.js";import"../../../../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../../../../core/shaderLibrary/ShaderOutputOptions.js";import"../../../../core/shaderLibrary/Slice.glsl.js";import"../../../../core/shaderLibrary/attributes/NormalAttribute.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/VertexPosition.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/ComputeMaterialColor.glsl.js";import"../../../../core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import"../../../../core/shaderLibrary/shading/ComputeShadingNormal.glsl.js";import"../../../../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../../../../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../../../../core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import"../../../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../../../../core/shaderLibrary/terrain/Overlay.glsl.js";import"../../../../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../../../../core/shaderLibrary/util/EllipsoidMode.js";import"../../../../core/shaderModules/interfaces.js";import"../../../../core/shaderModules/ShaderBuilder.js";import"../../../../lib/
|
|
5
|
+
import"../../../../../../../geometry/support/Ellipsoid.js";import"../../../../../../ViewingMode.js";import"./ComponentData.glsl.js";import"./VertexDiscardByOpacity.glsl.js";import"../../../../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../../../../core/shaderLibrary/ShaderOutputOptions.js";import"../../../../core/shaderLibrary/Slice.glsl.js";import"../../../../core/shaderLibrary/attributes/NormalAttribute.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/VertexPosition.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/ComputeMaterialColor.glsl.js";import"../../../../core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import"../../../../core/shaderLibrary/shading/ComputeShadingNormal.glsl.js";import"../../../../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../../../../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../../../../core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import"../../../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../../../../core/shaderLibrary/terrain/Overlay.glsl.js";import"../../../../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../../../../core/shaderLibrary/util/EllipsoidMode.js";import"../../../../core/shaderModules/interfaces.js";import"../../../../core/shaderModules/ShaderBuilder.js";import"../../../../lib/VertexAttribute.js";export{a as attributeLocations,b as build}from"../../../../../../../chunks/ComponentShader.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{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{
|
|
5
|
+
import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{TextureCoordinateAttributeType as r}from"../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexAttribute as t}from"../../lib/VertexAttribute.js";function o(o){const i=e().vec3f(t.POSITION);return o.normals&&i.vec2i16(t.NORMALCOMPRESSED,{glNormalized:!0}),o.textureCoordinates===r.Default?i.vec2f(t.UV0):o.textureCoordinates===r.Atlas&&(i.vec2f(t.UV0),i.vec4u16(t.UVREGION,{glNormalized:!0})),o.colors&&i.vec4u8(t.COLOR,{glNormalized:!0}),i.alignTo(4)}export{o as createVertexBufferLayout};
|
|
@@ -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 s}from"../../../../../chunks/mat3f64.js";import{a as t}from"../../../../../chunks/vec2f64.js";import{c as
|
|
5
|
+
import{c as s}from"../../../../../chunks/mat3f64.js";import{a as t}from"../../../../../chunks/vec2f64.js";import{c as i}from"../../../../../chunks/vec4f64.js";import{c as e}from"../../../../../chunks/boundedPlane.js";import{VertexPositionViewProjectionTransform as r}from"../shaderLibrary/attributes/VertexPosition.glsl.js";import{TransparencyPassType as a}from"../../lib/basicInterfaces.js";var o,n;!function(s){s[s.Material=0]="Material",s[s.ShadowMap=1]="ShadowMap",s[s.Highlight=2]="Highlight"}(o||(o={})),function(s){s[s.Color=0]="Color",s[s.Alpha=1]="Alpha",s[s.Depth=2]="Depth",s[s.Normal=3]="Normal"}(n||(n={}));class h{constructor(){this.viewTransform=new r,this.slicePlane=e()}}class c extends h{constructor(){super(...arguments),this.identifier=o.Material,this.slicePlaneEnabled=!0,this.transparent=!1,this.integratedMesh=!1,this.transformNormalViewFromGlobal=s(),this.nearFar=t(),this.inverseViewport=t(),this.ambientOcclusionEnabled=!0,this.shadowsEnabled=!0,this.sceneHasOcludees=!1,this.transparencyPassType=a.NONE}}class l extends h{constructor(){super(...arguments),this.identifier=o.ShadowMap,this.nearFar=t()}}class p extends h{constructor(){super(...arguments),this.identifier=o.Highlight,this.inverseViewport=t(),this.viewport=i()}}export{p as HighlightPassParameters,c as MaterialPassesParameters,n as MaterialSubPass,h as PassParameters,o as RenderPassIdentifier,l as ShadowMapPassParameters};
|
|
@@ -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 e}from"../../../../../core/maybe.js";import t from"../../../../../core/PooledArray.js";import{TransparencyPassType as
|
|
5
|
+
import{unwrap as e}from"../../../../../core/maybe.js";import t from"../../../../../core/PooledArray.js";import{TransparencyPassType as s}from"../../lib/basicInterfaces.js";import{DataType as r}from"../../../../webgl/enums.js";var a;!function(e){e[e.FrontToBack=0]="FrontToBack",e[e.BackToFront=1]="BackToFront"}(a||(a={}));class i{constructor(e,s,r=a.FrontToBack){this._rctx=e,this._techniqueRepository=s,this._sorting=r,this._draws=new t({initialSize:32,allocator:e=>e||{material:null,geometry:null,geometryRanges:null,bindDrawParams:null,depthSquaredHint:0,indexType:0}}),this._passBoundTechniques=new Set,this._previouslyBoundMaterials=new Map,this._previouslyBoundDraw=new Map}submitDraw(t,s,r,a,i){const n=this._draws.pushNew();n.geometry=s,n.geometryRanges=r,n.material=t,n.bindDrawParams=a,n.depthSquaredHint=i,n.indexType=s.indexed?e(s.vao.indexBuffer).indexType:0}dispatch(e){const t=this._rctx;this._passBoundTechniques.clear(),this._previouslyBoundMaterials.clear(),this._previouslyBoundDraw.clear();let r=null;const a=this._draws.map((t=>t.material.prepareTechnique(this._techniqueRepository,e,t.geometry.parameters))),i=this._draws.length;for(let o=0;o<i;o++){const i=a[o];i===r&&i.configuration.transparencyPassType===s.NONE||(t.useTechnique(i,e.slot),r=i),this._passBoundTechniques.has(i)||(i.bindPass(e),this._passBoundTechniques.add(i));const d=this._draws.data[o],l=d.geometry;t.bindVAO(l.vao),this._previouslyBoundMaterials.get(i)!==d.material&&(i.bindMaterial(d.material,e),this._previouslyBoundMaterials.set(i,d.material)),this._previouslyBoundDraw.get(i)!==d.bindDrawParams&&(i.bindDraw(d.bindDrawParams),this._previouslyBoundDraw.set(i,d.bindDrawParams));const u=d.geometryRanges,p=u.length;if(0!==d.indexType){const e=n.get(d.indexType);for(let s=0;s<p;s+=2){const r=u[s],a=u[s+1];t.drawElements(l.primitiveType,a,d.indexType,r*e)}}else for(let e=0;e<p;e+=2){const s=u[e],r=u[e+1];t.drawArrays(l.primitiveType,s,r)}}}prepareSubmit(){this._draws.clear()}finishSubmit(){const e=this._sorting===a.FrontToBack?1:-1;this._draws.sort(((t,s)=>{const r=e*(t.depthSquaredHint-s.depthSquaredHint);return 0!==r?r:t.geometry.vao.size-s.geometry.vao.size}))}get count(){return this._draws.length}}const n=new Map;n.set(r.UNSIGNED_BYTE,1),n.set(r.UNSIGNED_SHORT,2),n.set(r.UNSIGNED_INT,4);export{i as RenderPass,a as RenderPassSorting};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as s}from"../../../../../core/maybe.js";import{f as a,t as e,e as r}from"../../../../../chunks/mat3.js";import{c as t}from"../../../../../chunks/mat3f64.js";import{c as i}from"../../../../../chunks/mat4.js";import{
|
|
5
|
+
import{isSome as s}from"../../../../../core/maybe.js";import{f as a,t as e,e as r}from"../../../../../chunks/mat3.js";import{c as t}from"../../../../../chunks/mat3f64.js";import{c as i}from"../../../../../chunks/mat4.js";import{c as h}from"../../../../../chunks/vec2.js";import{b as n,s as m,g as o,f as l}from"../../../../../chunks/vec3.js";import{c as P}from"../../../../../chunks/vec3f64.js";import{c as p}from"../../../../../chunks/vec4.js";import{d as c}from"../../../../../chunks/boundedPlane.js";import{MaterialPassesParameters as _,ShadowMapPassParameters as d,HighlightPassParameters as u,MaterialSubPass as T,RenderPassIdentifier as A}from"./AllRenderPasses.js";import{RenderPass as g,RenderPassSorting as f}from"./RenderPass.js";import{TwoVectorPosition as w}from"../util/TwoVectorPosition.js";import{union as R}from"../../lib/depthRange.js";import{RenderPass as M}from"../../lib/RenderPass.js";import{RenderSlot as E}from"../../lib/RenderSlot.js";class H{constructor(s,a){this.rctx=s,this.shaderTechniqueRepository=a,this.canRender=!0,this._materialPassParams=new _,this._shadowPassParams=new d,this._highlightPassParams=new u,this._systems=new Set,this._passes={materialOpaque:new g(s,this.shaderTechniqueRepository),materialTransparent:new g(s,this.shaderTechniqueRepository,f.BackToFront),materialIntegratedMesh:new g(s,this.shaderTechniqueRepository),shadowMap:new g(s,this.shaderTechniqueRepository),highlight:new g(s,this.shaderTechniqueRepository),highlightIntegratedMesh:new g(s,this.shaderTechniqueRepository),highlightShadowMap:new g(s,this.shaderTechniqueRepository),defaultShadowMap:new g(s,this.shaderTechniqueRepository)}}register(s){this._systems.add(s)}prepareRender(s){if(0!==this._systems.size){for(const s of Object.values(this._passes))s.prepareSubmit();this._systems.forEach((a=>a.submit(this._passes,{camera:s})));for(const s of Object.values(this._passes))s.finishSubmit();this.shaderTechniqueRepository.frameUpdate()}}render(s){if(0!==this._systems.size)switch(this._configure(s),s.slot){case E.OPAQUE_PLUGIN:switch(s.pass){case M.MATERIAL:return this._materialPassParams.subPass=T.Color,this._configureMaterialColorPass(s),this._passes.materialOpaque.dispatch(this._materialPassParams);case M.MATERIAL_DEPTH:return this._materialPassParams.subPass=T.Depth,this._passes.materialOpaque.dispatch(this._materialPassParams);case M.MATERIAL_NORMAL:return this._materialPassParams.subPass=T.Normal,this._passes.materialOpaque.dispatch(this._materialPassParams);case M.MATERIAL_HIGHLIGHT:return this._passes.highlight.dispatch(this._highlightPassParams);case M.MATERIAL_DEPTH_SHADOWMAP_ALL:return this._passes.shadowMap.dispatch(this._shadowPassParams);case M.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT:return this._passes.highlightShadowMap.dispatch(this._shadowPassParams);case M.MATERIAL_DEPTH_SHADOWMAP_DEFAULT:return this._passes.defaultShadowMap.dispatch(this._shadowPassParams)}return;case E.TRANSPARENT_PLUGIN:switch(s.pass){case M.MATERIAL:return this._materialPassParams.subPass=T.Color,this._configureMaterialColorPass(s),this._passes.materialTransparent.dispatch(this._materialPassParams);case M.MATERIAL_ALPHA:return this._materialPassParams.subPass=T.Alpha,this._configureMaterialColorPass(s),this._passes.materialTransparent.dispatch(this._materialPassParams);case M.MATERIAL_DEPTH:return this._materialPassParams.subPass=T.Depth,this._passes.materialTransparent.dispatch(this._materialPassParams);case M.MATERIAL_NORMAL:return this._materialPassParams.subPass=T.Normal,this._passes.materialTransparent.dispatch(this._materialPassParams)}return;case E.INTEGRATED_MESH:switch(s.pass){case M.MATERIAL:return this._materialPassParams.subPass=T.Color,this._configureMaterialColorPass(s),this._materialPassParams.ssrParams=s.ssrParams,this._passes.materialIntegratedMesh.dispatch(this._materialPassParams);case M.MATERIAL_DEPTH:return this._materialPassParams.subPass=T.Depth,this._passes.materialIntegratedMesh.dispatch(this._materialPassParams);case M.MATERIAL_NORMAL:return this._materialPassParams.subPass=T.Normal,this._passes.materialIntegratedMesh.dispatch(this._materialPassParams);case M.MATERIAL_HIGHLIGHT:return this._passes.highlightIntegratedMesh.dispatch(this._highlightPassParams)}return}}notifyDirty(){this._context.requestRender()}slots(){return[E.OPAQUE_PLUGIN,E.TRANSPARENT_PLUGIN,E.INTEGRATED_MESH]}initializeRenderContext(s){this._context=s}uninitializeRenderContext(){}queryDepthRange(a){const e={near:1/0,far:-1/0};return this._systems.forEach((r=>{const t=r.queryShadowCasterDepthRange(a);s(t)&&R(e,t,e)})),e}get shadowCastingEnabled(){return this._materialPassParams.shadowsEnabled}set shadowCastingEnabled(s){this._materialPassParams.shadowsEnabled=s}get screenSpaceReflectionsEnabled(){return s(this._materialPassParams.ssrParams.ssrEnabled)}set screenSpaceReflectionsEnabled(s){this._materialPassParams.ssrParams.ssrEnabled=!!s}_configureMaterialColorPass(s){this._materialPassParams.bindShadowMap=a=>{s.shadowMap.bind(a);const e=this._materialPassParams.viewTransform;n(I,e.transformWorldFromViewTL,e.transformWorldFromViewTH),s.shadowMap.bindView(a,I)},this._materialPassParams.bindAmbientOcclusion=a=>s.ssaoHelper.bind(a,s.camera),this._materialPassParams.ambientOcclusionEnabled=!!s.ssaoHelper&&s.ssaoHelper.ready,this._materialPassParams.sceneHasOcludees=s.hasOccludees}_configure(s){const a=s.pass===M.MATERIAL_DEPTH_SHADOWMAP_ALL||s.pass===M.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||s.pass===M.MATERIAL_DEPTH_SHADOWMAP_DEFAULT?this._shadowPassParams:s.pass===M.MATERIAL_HIGHLIGHT?this._highlightPassParams:this._materialPassParams;this._updateParameters(s,a)}_updateParameters(s,t){const n=s.camera,P=n.viewInverseTransposeMatrix;m(I,P[3],P[7],P[11]),b.set(I),o(t.viewTransform.transformWorldFromViewTH,b.high),o(t.viewTransform.transformWorldFromViewTL,b.low),a(t.viewTransform.transformViewFromCameraRelativeRS,n.viewMatrix),i(t.viewTransform.transformProjFromView,n.projectionMatrix),t.identifier===A.Material?(this._materialPassParams.transparent=s.slot===E.TRANSPARENT_PLUGIN,this._materialPassParams.integratedMesh=s.slot===E.INTEGRATED_MESH,this._materialPassParams.lighting=s.scenelightingData,e(L,t.viewTransform.transformViewFromCameraRelativeRS),r(t.transformNormalViewFromGlobal,L),h(t.nearFar,n.nearFar)):t.identifier===A.ShadowMap?h(t.nearFar,n.nearFar):t.identifier===A.Highlight&&(t.highlightDepthTexture=s.highlightDepthTexture,p(t.viewport,n.fullViewport)),t.identifier!==A.Material&&t.identifier!==A.Highlight||(t.inverseViewport[0]=1/n.fullViewport[2],t.inverseViewport[1]=1/n.fullViewport[3]),c(s.sliceHelper.plane,t.slicePlane),l(t.slicePlane.origin,t.slicePlane.origin,I),t.slicePlaneEnabled=s.sliceHelper.isEnabled,this._materialPassParams.slot=s.slot,this._materialPassParams.transparencyPassType=s.transparencyPassType,this._materialPassParams.multipassTerrainParams=s.multipassTerrainParams}get needsHighlight(){return this._passes.highlight.count>0||this._passes.highlightIntegratedMesh.count>0}get needsTransparentPass(){return this._passes.materialTransparent.count>0}}const I=P(),L=t(),b=new w;export{H as RenderPassManager};
|
|
@@ -2,6 +2,6 @@
|
|
|
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{ShaderOutput as e}from"./ShaderOutputOptions.js";import{glsl as r}from"../shaderModules/interfaces.js";function a(a,o){o.output===e.Color&&o.receiveShadows?(a.varyings.add("linearDepth","float"),a.vertex.code.add(r`void forwardLinearDepth() { linearDepth = gl_Position.w; }`)):o.output===e.Depth||o.output===e.Shadow?(a.varyings.add("linearDepth","float"),a.vertex.uniforms.add("
|
|
6
|
-
linearDepth = (-position_view().z -
|
|
5
|
+
import{ShaderOutput as e}from"./ShaderOutputOptions.js";import{glsl as r}from"../shaderModules/interfaces.js";function a(a,o){o.output===e.Color&&o.receiveShadows?(a.varyings.add("linearDepth","float"),a.vertex.code.add(r`void forwardLinearDepth() { linearDepth = gl_Position.w; }`)):o.output===e.Depth||o.output===e.Shadow?(a.varyings.add("linearDepth","float"),a.vertex.uniforms.add("nearFar","vec2"),a.vertex.code.add(r`void forwardLinearDepth() {
|
|
6
|
+
linearDepth = (-position_view().z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
7
7
|
}`)):a.vertex.code.add(r`void forwardLinearDepth() {}`)}export{a as ForwardLinearDepth};
|
|
@@ -2,9 +2,9 @@
|
|
|
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{glsl as e}from"../shaderModules/interfaces.js";function i(i){i.vertex.uniforms.add("
|
|
5
|
+
import{glsl as e}from"../shaderModules/interfaces.js";function i(i){i.vertex.uniforms.add("cameraPosition","vec3").add("perScreenPixelRatio","float").add("screenSize","float"),i.vertex.code.add(e`float computeRenderPixelSizeAt( vec3 pWorld ){
|
|
6
6
|
vec3 viewForward = - vec3(view[0][2], view[1][2], view[2][2]);
|
|
7
|
-
float viewDirectionDistance = abs(dot(viewForward, pWorld -
|
|
7
|
+
float viewDirectionDistance = abs(dot(viewForward, pWorld - cameraPosition));
|
|
8
8
|
return viewDirectionDistance*perScreenPixelRatio;
|
|
9
9
|
}
|
|
10
10
|
vec3 screenSizeScaling(vec3 position, vec3 anchor){
|
|
@@ -2,9 +2,9 @@
|
|
|
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{glsl as i}from"../shaderModules/interfaces.js";import{VertexAttribute as
|
|
5
|
+
import{glsl as i}from"../shaderModules/interfaces.js";import{VertexAttribute as e}from"../../lib/VertexAttribute.js";function o(o,t=!0){o.attributes.add(e.POSITION,"vec2"),t&&o.varyings.add("uv","vec2"),o.vertex.code.add(i`
|
|
6
6
|
void main(void) {
|
|
7
7
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
8
8
|
${t?i`uv = position * 0.5 + vec2(0.5);`:""}
|
|
9
9
|
}
|
|
10
|
-
`)}export{
|
|
10
|
+
`)}export{o as ScreenSpacePass};
|
package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{c as e}from"../../../../../../chunks/vec3f64.js";import{ShaderOutput as r}from"../ShaderOutputOptions.js";import{DoublePrecision as i}from"../util/DoublePrecision.glsl.js";import{glsl as o}from"../../shaderModules/interfaces.js";import{VertexAttribute as n}from"../../../lib/
|
|
5
|
+
import{c as e}from"../../../../../../chunks/vec3f64.js";import{ShaderOutput as r}from"../ShaderOutputOptions.js";import{DoublePrecision as i}from"../util/DoublePrecision.glsl.js";import{glsl as o}from"../../shaderModules/interfaces.js";import{VertexAttribute as n}from"../../../lib/VertexAttribute.js";import{encodeDoubleArraySplit as t}from"../../../../../webgl/doublePrecisionUtils.js";function a(e,t){t.instanced&&t.instancedDoublePrecision&&(e.attributes.add(n.MODELORIGINHI,"vec3"),e.attributes.add(n.MODELORIGINLO,"vec3"),e.attributes.add(n.MODEL,"mat3"),e.attributes.add(n.MODELNORMAL,"mat3")),t.instancedDoublePrecision&&(e.vertex.include(i,t),e.vertex.uniforms.add("viewOriginHi","vec3"),e.vertex.uniforms.add("viewOriginLo","vec3"));const a=[o`
|
|
6
6
|
vec3 calculateVPos() {
|
|
7
7
|
${t.instancedDoublePrecision?"return model * localPosition().xyz;":"return localPosition().xyz;"}
|
|
8
8
|
}
|
|
@@ -25,4 +25,4 @@ import{c as e}from"../../../../../../chunks/vec3f64.js";import{ShaderOutput as r
|
|
|
25
25
|
${t.instancedDoublePrecision?"return vec4(modelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
26
26
|
|
|
27
27
|
}
|
|
28
|
-
`:o``];e.vertex.code.add(a[0]),e.vertex.code.add(a[1]),e.vertex.code.add(a[2]),t.output===r.Normal&&e.vertex.code.add(a[3]),e.vertex.code.add(a[4])}class c{}function
|
|
28
|
+
`:o``];e.vertex.code.add(a[0]),e.vertex.code.add(a[1]),e.vertex.code.add(a[2]),t.output===r.Normal&&e.vertex.code.add(a[3]),e.vertex.code.add(a[4])}class c{}function d(e,r){t(r,s,l,3),e.setUniform3fv("viewOriginHi",s),e.setUniform3fv("viewOriginLo",l)}const s=e(),l=e();export{a as InstancedDoublePrecision,c as InstancedDoublePrecisionUniforms,d as bindCustomOrigin};
|
|
@@ -2,10 +2,10 @@
|
|
|
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{DecodeNormal as e}from"../util/DecodeNormal.glsl.js";import{glsl as r}from"../../shaderModules/interfaces.js";import{VertexAttribute as t}from"../../../lib/
|
|
5
|
+
import{DecodeNormal as e}from"../util/DecodeNormal.glsl.js";import{glsl as r}from"../../shaderModules/interfaces.js";import{VertexAttribute as t}from"../../../lib/VertexAttribute.js";function o(o,d){d.normalType===i.Attribute&&(o.attributes.add(t.NORMAL,"vec3"),o.vertex.code.add(r`vec3 normalModel() {
|
|
6
6
|
return normal;
|
|
7
|
-
}`)),d.normalType===
|
|
7
|
+
}`)),d.normalType===i.CompressedAttribute&&(o.include(e),o.attributes.add(t.NORMALCOMPRESSED,"vec2"),o.vertex.code.add(r`vec3 normalModel() {
|
|
8
8
|
return decodeNormal(normalCompressed);
|
|
9
|
-
}`)),d.normalType===
|
|
9
|
+
}`)),d.normalType===i.ScreenDerivative&&(o.extensions.add("GL_OES_standard_derivatives"),o.fragment.code.add(r`vec3 screenDerivativeNormal(vec3 positionView) {
|
|
10
10
|
return normalize(cross(dFdx(positionView), dFdy(positionView)));
|
|
11
|
-
}`))}
|
|
11
|
+
}`))}var i;!function(e){e[e.Attribute=0]="Attribute",e[e.CompressedAttribute=1]="CompressedAttribute",e[e.Ground=2]="Ground",e[e.ScreenDerivative=3]="ScreenDerivative",e[e.COUNT=4]="COUNT"}(i||(i={}));export{o as NormalAttribute,i as NormalAttributeType};
|
|
@@ -2,7 +2,7 @@
|
|
|
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{PositionAttribute as e}from"./PositionAttribute.glsl.js";import{glsl as o}from"../../shaderModules/interfaces.js";import{VertexAttribute as r}from"../../../lib/
|
|
5
|
+
import{PositionAttribute as e}from"./PositionAttribute.glsl.js";import{glsl as o}from"../../shaderModules/interfaces.js";import{VertexAttribute as r}from"../../../lib/VertexAttribute.js";function i(i,t){i.attributes.add(r.FEATUREVALUE,"vec4"),i.vertex.code.add(o`bool isCapVertex() {
|
|
6
6
|
return featureValue.w == 1.0;
|
|
7
7
|
}`),i.vertex.uniforms.add("size","vec3"),t.vvSize?(i.vertex.uniforms.add("vvSizeMinSize","vec3"),i.vertex.uniforms.add("vvSizeMaxSize","vec3"),i.vertex.uniforms.add("vvSizeOffset","vec3"),i.vertex.uniforms.add("vvSizeFactor","vec3"),i.vertex.code.add(o`vec2 getSize() {
|
|
8
8
|
return size.xy*clamp(vvSizeOffset + featureValue.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).xz;
|
|
@@ -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{glsl as e}from"../../shaderModules/interfaces.js";import{VertexAttribute as
|
|
5
|
+
import{glsl as e}from"../../shaderModules/interfaces.js";import{VertexAttribute as t}from"../../../lib/VertexAttribute.js";function o(o){o.attributes.add(t.POSITION,"vec3"),o.vertex.code.add(e`vec3 positionModel() { return position; }`)}export{o as PositionAttribute};
|
|
@@ -2,7 +2,7 @@
|
|
|
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{glsl as e}from"../../shaderModules/interfaces.js";import{VertexAttribute as t}from"../../../lib/
|
|
5
|
+
import{glsl as e}from"../../shaderModules/interfaces.js";import{VertexAttribute as t}from"../../../lib/VertexAttribute.js";function v(v,i){v.vertex.uniforms.add("intrinsicWidth","float"),i.vvSize?(v.attributes.add(t.SIZEFEATUREATTRIBUTE,"float"),v.vertex.uniforms.add("vvSizeMinSize","vec3"),v.vertex.uniforms.add("vvSizeMaxSize","vec3"),v.vertex.uniforms.add("vvSizeOffset","vec3"),v.vertex.uniforms.add("vvSizeFactor","vec3"),v.vertex.code.add(e`float getSize() {
|
|
6
6
|
return intrinsicWidth * clamp(vvSizeOffset + sizeFeatureAttribute * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).x;
|
|
7
7
|
}`)):(v.attributes.add(t.SIZE,"float"),v.vertex.code.add(e`float getSize(){
|
|
8
8
|
return intrinsicWidth * size;
|
|
@@ -2,7 +2,7 @@
|
|
|
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{DecodeSymbolColor as o}from"../../../collections/Component/Material/shader/DecodeSymbolColor.glsl.js";import{glsl as e}from"../../shaderModules/interfaces.js";import{VertexAttribute as r}from"../../../lib/
|
|
5
|
+
import{DecodeSymbolColor as o}from"../../../collections/Component/Material/shader/DecodeSymbolColor.glsl.js";import{glsl as e}from"../../shaderModules/interfaces.js";import{VertexAttribute as r}from"../../../lib/VertexAttribute.js";function l(l,d){d.symbolColor?(l.include(o),l.attributes.add(r.SYMBOLCOLOR,"vec4"),l.varyings.add("colorMixMode","mediump float")):l.fragment.uniforms.add("colorMixMode","int"),d.symbolColor?l.vertex.code.add(e`int symbolColorMixMode;
|
|
6
6
|
vec4 getSymbolColor() {
|
|
7
7
|
return decodeSymbolColor(symbolColor, symbolColorMixMode) * 0.003921568627451;
|
|
8
8
|
}
|
package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
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{glsl as e}from"../../shaderModules/interfaces.js";import{VertexAttribute as t}from"../../../lib/
|
|
5
|
+
import{glsl as e}from"../../shaderModules/interfaces.js";import{VertexAttribute as t}from"../../../lib/VertexAttribute.js";function r(r,d){d.attributeTextureCoordinates===a.Default&&(r.attributes.add(t.UV0,"vec2"),r.varyings.add("vuv0","vec2"),r.vertex.code.add(e`void forwardTextureCoordinates() {
|
|
6
6
|
vuv0 = uv0;
|
|
7
|
-
}`)),d.attributeTextureCoordinates===
|
|
7
|
+
}`)),d.attributeTextureCoordinates===a.Atlas&&(r.attributes.add(t.UV0,"vec2"),r.varyings.add("vuv0","vec2"),r.attributes.add(t.UVREGION,"vec4"),r.varyings.add("vuvRegion","vec4"),r.vertex.code.add(e`void forwardTextureCoordinates() {
|
|
8
8
|
vuv0 = uv0;
|
|
9
9
|
vuvRegion = uvRegion;
|
|
10
|
-
}`)),d.attributeTextureCoordinates===
|
|
10
|
+
}`)),d.attributeTextureCoordinates===a.None&&r.vertex.code.add(e`void forwardTextureCoordinates() {}`)}var a;!function(e){e[e.None=0]="None",e[e.Default=1]="Default",e[e.Atlas=2]="Atlas",e[e.COUNT=3]="COUNT"}(a||(a={}));export{r as TextureCoordinateAttribute,a as TextureCoordinateAttributeType};
|
|
@@ -2,5 +2,5 @@
|
|
|
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{glsl as o}from"../../shaderModules/interfaces.js";import{VertexAttribute as r}from"../../../lib/
|
|
5
|
+
import{glsl as o}from"../../shaderModules/interfaces.js";import{VertexAttribute as r}from"../../../lib/VertexAttribute.js";function e(e,d){d.attributeColor?(e.attributes.add(r.COLOR,"vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(o`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(o`void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }`)):e.vertex.code.add(o`void forwardVertexColor() {}
|
|
6
6
|
void forwardNormalizedVertexColor() {}`)}export{e as VertexColor};
|