@arcgis/core 5.0.0-next.63 → 5.0.0-next.64
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/Ground.d.ts +2 -1
- package/Ground.js +1 -1
- package/WebDocument2D.js +1 -1
- package/WebLinkChart.js +1 -1
- package/WebMap.d.ts +1 -1
- package/WebMap.js +1 -1
- package/WebScene.d.ts +1 -1
- package/WebScene.js +1 -1
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +18 -0
- package/applications/KnowledgeStudio/dataModelVisualization.js +5 -0
- package/applications/MapViewer/templateUtils.d.ts +2 -2
- package/applications/Urban/LineImagePattern3D.d.ts +8 -0
- package/applications/Urban/LineImagePattern3D.js +5 -0
- package/applications/Urban/imagePatternUtils.d.ts +23 -0
- package/applications/Urban/imagePatternUtils.js +5 -0
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{61707c22b029c2a7a397.js → 049c125085028ffdd0dd.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bd73a66baea2f52e8a6.js → 07639f406b71bb49ffd6.js} +1 -1
- package/assets/esri/core/workers/chunks/{df0e5570174bf0942d7a.js → 0d9e1ccc3ba8b5ed3287.js} +1 -1
- package/assets/esri/core/workers/chunks/{4404b6f931f681cca342.js → 0e5cd0cf6ab7cb37d723.js} +1 -1
- package/assets/esri/core/workers/chunks/{a624dd283d264dce35a8.js → 0f5693541111fcae0c2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{f56906c443ce8ff68a27.js → 13d61d34e55c80e4ecdf.js} +1 -1
- package/assets/esri/core/workers/chunks/{28b235b56a83c498d73f.js → 168ec8fca2702617a543.js} +1 -1
- package/assets/esri/core/workers/chunks/{831b8282380844a7c4d5.js → 1967239713b58dccfd81.js} +1 -1
- package/assets/esri/core/workers/chunks/1b838638e66e82d76cf3.js +1 -0
- package/assets/esri/core/workers/chunks/{2209550b6510e25da375.js → 226acd251ad7d7ee3b57.js} +1 -1
- package/assets/esri/core/workers/chunks/22dd5cecc7e2d4d0baf8.js +316 -0
- package/assets/esri/core/workers/chunks/2402d305a77fef4694a0.js +1 -0
- package/assets/esri/core/workers/chunks/{893a5ab0c2df9262efd8.js → 251eb6e00f99a816d55c.js} +1 -1
- package/assets/esri/core/workers/chunks/{e47535f795b15608a6cb.js → 27f096c434f049b8df01.js} +1 -1
- package/assets/esri/core/workers/chunks/29b09db309ff75fb3e97.js +1 -0
- package/assets/esri/core/workers/chunks/{bef2a70d382515b3c84e.js → 310f3268582e61cd86da.js} +1 -1
- package/assets/esri/core/workers/chunks/{02cf735176f286a48dd2.js → 3371935a4fd6346d3a17.js} +1 -1
- package/assets/esri/core/workers/chunks/{36d15c35fbbd4dedd5cb.js → 3c3d311b88f5400951ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf3a9ead26629f3508b3.js → 3c4f8597f602779174f1.js} +1 -1
- package/assets/esri/core/workers/chunks/43d28c6509c21b8917a8.js +1 -0
- package/assets/esri/core/workers/chunks/{951e3c911a3486b1e609.js → 45b898367b6224dda46f.js} +1 -1
- package/assets/esri/core/workers/chunks/{57302b92e9899cce4ba3.js → 4785cd108e2dec6e1697.js} +1 -1
- package/assets/esri/core/workers/chunks/{153ff2ceefccd946498b.js → 47bfe8dd5d2bac4307ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{2abc205f81f26fc4852b.js → 49a1b7f700b8a42de817.js} +4 -4
- package/assets/esri/core/workers/chunks/4d6d962d25aa836f53ee.js +1 -0
- package/assets/esri/core/workers/chunks/{454c15367cccbf63af7a.js → 4e9a8fce55cad841c731.js} +1 -1
- package/assets/esri/core/workers/chunks/{b93f2bd6429879f92143.js → 536c492fdda30f2f1288.js} +1 -1
- package/assets/esri/core/workers/chunks/5cee6c3ff23fb93f857a.js +1 -0
- package/assets/esri/core/workers/chunks/6035daa65fc3ebf86515.js +1 -0
- package/assets/esri/core/workers/chunks/62b28f73f814413c10fc.js +1 -0
- package/assets/esri/core/workers/chunks/{0bc01d71ed1ab8c3af3c.js → 6599cc702a46f81a5634.js} +1 -1
- package/assets/esri/core/workers/chunks/6925f09d44cc38480d53.js +1 -0
- package/assets/esri/core/workers/chunks/{72e3a48aa365542b0689.js → 6a782e8475bff4d56dbc.js} +1 -1
- package/assets/esri/core/workers/chunks/6ba3c2b9f699d94d62b8.js +1 -0
- package/assets/esri/core/workers/chunks/{f44f358db5c56d5bbc0c.js → 7306b5b66e738a281d83.js} +1 -1
- package/assets/esri/core/workers/chunks/{2da13c2269ab90281143.js → 7694abe44d55dae8872d.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b34a010f76e5f289868.js → 7bf491b468cd74a4166c.js} +1 -1
- package/assets/esri/core/workers/chunks/{05ab54b81c366e98138f.js → 7d8664aeff66e34138bd.js} +1 -1
- package/assets/esri/core/workers/chunks/822ef6a043c7e147b4b6.js +1 -0
- package/assets/esri/core/workers/chunks/878010ca23da0bca9405.js +1 -0
- package/assets/esri/core/workers/chunks/892157696e8f9e38c472.js +1 -0
- package/assets/esri/core/workers/chunks/{d2abfcb0c8bf894c7f72.js → 8dca61f8ba6689379f86.js} +1 -1
- package/assets/esri/core/workers/chunks/{bce81df760f5e34c01d7.js → 964de713042f52d71e42.js} +1 -1
- package/assets/esri/core/workers/chunks/990341f7c47bd656c782.js +1 -0
- package/assets/esri/core/workers/chunks/9d6945cda99d14af83ac.js +1 -0
- package/assets/esri/core/workers/chunks/{5180b15f1a865756a02e.js → a3836f6a93924ee4816e.js} +1 -1
- package/assets/esri/core/workers/chunks/{d13b2ce8a89938b0472b.js → a6dcd13c792b6538ac50.js} +1 -1
- package/assets/esri/core/workers/chunks/{522a6787d9e0f520ac79.js → a893f8db2477cf677ac8.js} +1 -1
- package/assets/esri/core/workers/chunks/{983356eb4fd0a0dcf3fd.js → abc236e99b52be1c83b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{b11c0e80e583f2b7c5de.js → ac83c2999a3d2ffb4356.js} +1 -1
- package/assets/esri/core/workers/chunks/{5873c7b65d0fb04998fb.js → acea42d268b53ceb2bfd.js} +1 -1
- package/assets/esri/core/workers/chunks/{8628bf45a33af786cd49.js → b65fcfde62d49de1fa54.js} +1 -1
- package/assets/esri/core/workers/chunks/ba7f57788847cc0f68df.js +1 -0
- package/assets/esri/core/workers/chunks/{12f700b932a241e59071.js → bcf612eabe7577540953.js} +1 -1
- package/assets/esri/core/workers/chunks/{75e9759290f0f67b2128.js → bf06250be7a7a36306b1.js} +1 -1
- package/assets/esri/core/workers/chunks/c3007b916ba933137709.js +1 -0
- package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +1 -0
- package/assets/esri/core/workers/chunks/cc5c1887e6d7079e5fe3.js +1 -0
- package/assets/esri/core/workers/chunks/ce8f075c814a8378c00c.js +1 -0
- package/assets/esri/core/workers/chunks/{f91e63d7842c427c7f72.js → d30cfc5fa302cc08d862.js} +1 -1
- package/assets/esri/core/workers/chunks/d3325ed8d224e2350db7.js +1 -0
- package/assets/esri/core/workers/chunks/{1800994523d7cdfb73af.js → de71db3b0fb947b13c97.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff7df6fb78fa2c0e9247.js → df92239eefff04471a0b.js} +1 -1
- package/assets/esri/core/workers/chunks/e69255e38ff200dda14b.js +1 -0
- package/assets/esri/core/workers/chunks/ee2ca25048a920e43743.js +1 -0
- package/assets/esri/core/workers/chunks/{609919428305d8c8c243.js → f9370830051865a3435b.js} +1 -1
- package/assets/esri/core/workers/chunks/fc00d7278b43df813c54.js +1 -0
- package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +7 -18
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/RibbonLine.glsl.js +99 -61
- package/chunks/libtess-f32.js +5 -0
- package/chunks/libtess-f64.js +5 -0
- package/config.js +1 -1
- package/core/Version.d.ts +1 -1
- package/core/Version.js +1 -1
- package/core/has.js +1 -1
- package/core/workers/registry.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/form/elements/inputs/SwitchInput.d.ts +2 -1
- package/geometry/Mesh.d.ts +2 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/support/MeshVertexAttributes.d.ts +1 -1
- package/geometry/support/MeshVertexAttributes.js +1 -1
- package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/ground/NavigationConstraint.d.ts +1 -1
- package/ground/NavigationConstraint.js +1 -1
- package/interfaces.d.ts +163 -158
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.d.ts +1 -1
- package/layers/ElevationLayer.d.ts +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +1 -5
- package/layers/Layer.d.ts +1 -2
- package/layers/ParquetLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/knowledgeGraph/dataModelVisualizationUtils.d.ts +11 -0
- package/layers/knowledgeGraph/dataModelVisualizationUtils.js +5 -0
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/mixins/BlendLayer.d.ts +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/functions/ColormapToRGBFunction.js +1 -1
- package/layers/raster/functions/surfaceUtils.js +1 -1
- package/layers/support/CodedValue.d.ts +1 -1
- package/layers/support/CodedValue.js +1 -1
- package/layers/support/CodedValueDomain.d.ts +2 -1
- package/layers/support/CodedValueDomain.js +1 -1
- package/layers/support/ElevationTileData.d.ts +1 -1
- package/layers/support/ElevationTileData.js +1 -1
- package/layers/support/FeatureReduction.d.ts +1 -1
- package/layers/support/FeatureReduction.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +1 -1
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionSelection.d.ts +1 -1
- package/layers/support/FeatureReductionSelection.js +1 -1
- package/layers/support/KMLMapImage.d.ts +1 -1
- package/layers/support/KMLMapImage.js +1 -1
- package/layers/support/ParquetGeometryEncodingBase.d.ts +1 -1
- package/layers/support/ParquetGeometryEncodingBase.js +1 -1
- package/layers/support/ParquetGeometryEncodingLocation.d.ts +1 -1
- package/layers/support/ParquetGeometryEncodingLocation.js +1 -1
- package/layers/support/ParquetGeometryEncodingWkb.d.ts +1 -1
- package/layers/support/ParquetGeometryEncodingWkb.js +1 -1
- package/layers/support/PixelBlock.d.ts +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/SimpleBandStatistics.d.ts +1 -1
- package/layers/support/SimpleBandStatistics.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/featureReductionUtils.js +1 -1
- package/layers/support/source/DataLayerSource.d.ts +6 -3
- package/layers/support/source/DataLayerSource.js +1 -1
- package/layers/support/source/MapLayerSource.d.ts +1 -1
- package/layers/support/source/MapLayerSource.js +1 -1
- package/layers/support/source/QueryTableDataSource.d.ts +1 -1
- package/layers/support/source/QueryTableDataSource.js +1 -1
- package/layers/support/source/RasterDataSource.d.ts +1 -1
- package/layers/support/source/RasterDataSource.js +1 -1
- package/layers/support/source/TableDataSource.d.ts +1 -1
- package/layers/support/source/TableDataSource.js +1 -1
- package/layers/support/source/types.d.ts +1 -1
- package/layers/types.d.ts +7 -1
- package/package.json +1 -1
- package/popup/content/MediaContent.d.ts +2 -2
- package/popup/content/types.d.ts +9 -0
- package/portal/Portal.d.ts +3 -3
- package/portal/PortalGroup.d.ts +1 -1
- package/portal/PortalItem.d.ts +2 -2
- package/portal/PortalItemResource.d.ts +1 -1
- package/portal/PortalQueryParams.d.ts +1 -1
- package/portal/PortalUser.d.ts +5 -5
- package/portal/schemas/definitions.js +1 -1
- package/portal/support/resourceUtils.d.ts +1 -1
- package/renderers/HeatmapRenderer.d.ts +2 -1
- package/renderers/HeatmapRenderer.js +1 -1
- package/renderers/PieChartRenderer.d.ts +2 -1
- package/renderers/PieChartRenderer.js +1 -1
- package/renderers/support/AuthoringInfo.d.ts +2 -1
- package/renderers/support/AuthoringInfo.js +1 -1
- package/renderers/support/AuthoringInfoClassBreakInfo.d.ts +1 -1
- package/renderers/support/AuthoringInfoClassBreakInfo.js +1 -1
- package/renderers/support/AuthoringInfoFieldInfo.d.ts +3 -2
- package/renderers/support/AuthoringInfoFieldInfo.js +1 -1
- package/renderers/support/DictionaryScriptEvaluator.js +1 -1
- package/renderers/support/HeatmapLegendOptions.d.ts +1 -1
- package/renderers/support/HeatmapLegendOptions.js +1 -1
- package/renderers/support/OthersCategory.d.ts +1 -1
- package/renderers/support/OthersCategory.js +1 -1
- package/rest/featureService/types.d.ts +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
- package/rest/support/ArealUnit.d.ts +1 -1
- package/rest/support/BaseImageMeasureResultValue.d.ts +1 -1
- package/rest/support/BaseImageMeasureResultValue.js +1 -1
- package/rest/support/BufferParameters.d.ts +1 -1
- package/rest/support/ClosestFacilityParameters.d.ts +1 -1
- package/rest/support/DataLayer.d.ts +1 -1
- package/rest/support/DensifyParameters.d.ts +1 -1
- package/rest/support/DirectionLine.d.ts +1 -1
- package/rest/support/DirectionPoint.d.ts +1 -1
- package/rest/support/DirectionsString.d.ts +1 -1
- package/rest/support/DistanceParameters.d.ts +1 -1
- package/rest/support/GPMessage.d.ts +1 -1
- package/rest/support/ImageAreaParameters.d.ts +1 -1
- package/rest/support/ImageAreaResult.d.ts +4 -2
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageDistanceResult.d.ts +4 -2
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageHeightResult.d.ts +2 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageMeasureResultAngleValue.d.ts +3 -2
- package/rest/support/ImageMeasureResultAngleValue.js +1 -1
- package/rest/support/ImageMeasureResultAreaValue.d.ts +3 -2
- package/rest/support/ImageMeasureResultAreaValue.js +1 -1
- package/rest/support/ImageMeasureResultLengthValue.d.ts +4 -3
- package/rest/support/ImageMeasureResultLengthValue.js +1 -1
- package/rest/support/JobInfo.d.ts +1 -1
- package/rest/support/LinearUnit.d.ts +1 -1
- package/rest/support/LocateSetting.d.ts +1 -1
- package/rest/support/NAMessage.d.ts +1 -1
- package/rest/support/NetworkAttribute.d.ts +1 -1
- package/rest/support/OffsetParameters.d.ts +1 -1
- package/rest/support/PointBarrier.d.ts +1 -1
- package/rest/support/PolygonBarrier.d.ts +1 -1
- package/rest/support/PolylineBarrier.d.ts +1 -1
- package/rest/support/RouteParameters.d.ts +1 -1
- package/rest/support/ServiceAreaParameters.d.ts +1 -1
- package/rest/support/Stop.d.ts +1 -1
- package/rest/support/TravelMode.d.ts +1 -1
- package/smartMapping/renderers/pieChart.js +1 -1
- package/smartMapping/renderers/relationship.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/support/tests/meshUtils.js +1 -1
- package/symbols/ExtrudeSymbol3DLayer.d.ts +2 -1
- package/symbols/ExtrudeSymbol3DLayer.js +1 -1
- package/symbols/FillSymbol3DLayer.d.ts +4 -2
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.d.ts +23 -4
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/LineSymbol3DLayer.d.ts +2 -1
- package/symbols/LineSymbol3DLayer.js +1 -1
- package/symbols/ObjectSymbol3DLayer.d.ts +6 -3
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/PathSymbol3DLayer.d.ts +2 -1
- package/symbols/PathSymbol3DLayer.js +1 -1
- package/symbols/TextSymbol3DLayer.d.ts +21 -3
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/patterns/LinePattern3D.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
- package/symbols/support/OccludedVisibility.d.ts +27 -0
- package/symbols/support/Symbol3DAnchorPosition2D.d.ts +1 -1
- package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition3D.d.ts +1 -1
- package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
- package/symbols/support/Symbol3DFillMaterial.d.ts +3 -2
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DHalo.d.ts +1 -1
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/Symbol3DIconOutline.d.ts +1 -1
- package/symbols/support/Symbol3DIconOutline.js +1 -1
- package/symbols/support/Symbol3DMaterial.d.ts +1 -1
- package/symbols/support/Symbol3DMaterial.js +1 -1
- package/symbols/support/Symbol3DOutline.d.ts +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/symbols/support/Symbol3DTextBackground.d.ts +1 -1
- package/symbols/support/Symbol3DTextBackground.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/primitives.js +5 -0
- package/symbols/support/types.d.ts +2 -0
- package/symbols/support/utils.js +1 -1
- package/views/2d/analysis/AnalysisView2D.d.ts +2 -2
- package/views/2d/analysis/AnalysisView2D.js +1 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +1 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +1 -1
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/brushes.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/ClipMesh.js +5 -0
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
- package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/meshing/SimpleMesh.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ClipShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/textureUtils.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/analysis/AnalysisView3D.d.ts +2 -2
- package/views/3d/analysis/AnalysisView3D.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/DimensionAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/constraints/AltitudeConstraint.d.ts +1 -1
- package/views/3d/constraints/AltitudeConstraint.js +1 -1
- package/views/3d/constraints/ClipDistanceConstraint.d.ts +1 -1
- package/views/3d/constraints/ClipDistanceConstraint.js +1 -1
- package/views/3d/constraints/Constraints.d.ts +7 -4
- package/views/3d/constraints/Constraints.js +1 -1
- package/views/3d/constraints/TiltConstraint.d.ts +1 -1
- package/views/3d/constraints/TiltConstraint.js +1 -1
- package/views/3d/environment/LocalAtmosphere.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/ObjectSymbolLayerRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/factoryUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +3 -2
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl/ManagedColorAttachment.d.ts +2 -2
- package/views/3d/webgl/ManagedColorAttachment.js +1 -1
- package/views/3d/webgl/ManagedDepthAttachment.d.ts +2 -2
- package/views/3d/webgl/ManagedDepthAttachment.js +1 -1
- package/views/3d/webgl/ManagedDepthTexture.js +1 -1
- package/views/3d/webgl/ManagedFBO.d.ts +8 -6
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl/ManagedFBOAttachment.d.ts +2 -2
- package/views/3d/webgl/ManagedFBOAttachment.js +1 -1
- package/views/3d/webgl/ManagedFBOResource.d.ts +1 -1
- package/views/3d/webgl/ManagedFBOResource.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +55 -23
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
- package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.d.ts +1 -2
- package/views/MapView.d.ts +10 -15
- package/views/PopupView.d.ts +6 -6
- package/views/SceneView.d.ts +3 -4
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.d.ts +11 -13
- package/views/View2D.d.ts +37 -37
- package/views/analysis/AnalysisView.d.ts +1 -1
- package/views/analysis/AnalysisView.js +1 -1
- package/views/draw/{input/CursorUpdateEvent.d.ts → CursorUpdateEvent.d.ts} +1 -1
- package/views/draw/{input/CursorUpdateEvent.js → CursorUpdateEvent.js} +1 -1
- package/views/draw/{input/DrawCompleteEvent.d.ts → DrawCompleteEvent.d.ts} +1 -1
- package/views/draw/{input/DrawCompleteEvent.js → DrawCompleteEvent.js} +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/MultipointDrawAction.d.ts +4 -4
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.d.ts +2 -2
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.d.ts +4 -4
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.d.ts +4 -4
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.d.ts +3 -3
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/{input/VertexAddEvent.d.ts → VertexAddEvent.d.ts} +1 -1
- package/views/draw/{input/VertexAddEvent.js → VertexAddEvent.js} +1 -1
- package/views/draw/{input/VertexRemoveEvent.d.ts → VertexRemoveEvent.d.ts} +1 -1
- package/views/draw/VertexRemoveEvent.js +5 -0
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/sketch/Units.d.ts +3 -0
- package/views/layers/HighlightLayerViewMixin.d.ts +1 -3
- package/views/layers/ImageryLayerViewMixin.d.ts +1 -3
- package/views/layers/KMLLayerView.d.ts +1 -1
- package/views/layers/MediaLayerViewMixin.d.ts +3 -2
- package/views/layers/MediaLayerViewMixin.js +1 -1
- package/views/support/GeodesicMeasurementWorker.js +5 -0
- package/views/support/GeodesicMeasurementWorkerHandle.js +5 -0
- package/views/support/HighlightOptions.d.ts +0 -1
- package/views/support/TextureCompressionHelper.js +1 -1
- package/views/support/automaticAreaMeasurementUtils.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/types.d.ts +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/views/webgl/textureTracer.js +5 -0
- package/webdoc/support/SlideThumbnail.d.ts +1 -1
- package/webdoc/support/SlideThumbnail.js +1 -1
- package/webmap/Bookmark.d.ts +2 -1
- package/webmap/Bookmark.js +1 -1
- package/webmap/Version.d.ts +2 -2
- package/webmap/Version.js +1 -1
- package/webmap/utils.js +1 -1
- package/webscene/Slide.d.ts +6 -3
- package/webscene/Slide.js +1 -1
- package/webscene/Version.d.ts +2 -2
- package/webscene/Version.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/webscene/support/SlideEnvironment.d.ts +1 -1
- package/webscene/support/SlideEnvironment.js +1 -1
- package/webscene/support/SlideVisibleLayer.d.ts +1 -1
- package/webscene/support/SlideVisibleLayer.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BatchAttributeForm/VisibleElements.d.ts +1 -1
- package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm.d.ts +2 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/ActionColumn.d.ts +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +2 -2
- package/widgets/FeatureTable/FieldColumn.d.ts +1 -1
- package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
- package/widgets/FeatureTable/support/FieldColumnTemplate.d.ts +1 -1
- package/widgets/FeatureTable/support/GroupColumnTemplate.d.ts +1 -1
- package/widgets/FeatureTable/support/TableTemplate.d.ts +1 -1
- package/widgets/FeatureTable/support/{interfaces.d.ts → types.d.ts} +1 -1
- package/widgets/FeatureTable.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/PanoramicViewer/support/importUtils.js +1 -1
- package/widgets/Print/PrintViewModel.d.ts +1 -1
- package/widgets/Sketch/CreateToolVisibilityMap.d.ts +1 -1
- package/widgets/Sketch/CreateToolVisibilityMap.js +1 -1
- package/widgets/Sketch/SelectionToolVisibilityMap.d.ts +1 -1
- package/widgets/Sketch/SelectionToolVisibilityMap.js +1 -1
- package/widgets/Sketch/VisibleElements.d.ts +5 -3
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.d.ts +2 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice/SliceViewModel.d.ts +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/support/AnalysisViewModel.d.ts +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModel.d.ts +1 -1
- package/widgets/support/InteractiveToolViewModel.js +1 -1
- package/assets/esri/core/libs/libtess/libtess.wasm +0 -0
- package/assets/esri/core/workers/chunks/00e407d262c49890afa8.js +0 -1
- package/assets/esri/core/workers/chunks/19db60a3b4b09d445bd1.js +0 -1
- package/assets/esri/core/workers/chunks/1e55f152b60145f33b61.js +0 -1
- package/assets/esri/core/workers/chunks/294acaaebfedb05fe81e.js +0 -1
- package/assets/esri/core/workers/chunks/31eda00e6842005d0ec8.js +0 -1
- package/assets/esri/core/workers/chunks/3d49c6427120edc8eac9.js +0 -1
- package/assets/esri/core/workers/chunks/404229f10aef5ac23c87.js +0 -1
- package/assets/esri/core/workers/chunks/4278b35fb6fd578c403e.js +0 -1
- package/assets/esri/core/workers/chunks/46b63a65484b102e9ccb.js +0 -1
- package/assets/esri/core/workers/chunks/4f03d19a70dca6c507be.js +0 -316
- package/assets/esri/core/workers/chunks/5686220aed9a74dbd2b1.js +0 -1
- package/assets/esri/core/workers/chunks/5a2933ae19345b7d5aa7.js +0 -1
- package/assets/esri/core/workers/chunks/5e9fdd4eff7189f45932.js +0 -1
- package/assets/esri/core/workers/chunks/67a45faa80316f43c51b.js +0 -1
- package/assets/esri/core/workers/chunks/68ee11589de0da7fed08.js +0 -1
- package/assets/esri/core/workers/chunks/82ced9254b27707522ef.js +0 -1
- package/assets/esri/core/workers/chunks/bb5373ff7cdad7270095.js +0 -1
- package/assets/esri/core/workers/chunks/bddaa83fcb9fdb1e1856.js +0 -1
- package/assets/esri/core/workers/chunks/d048e4926e78458afa3e.js +0 -1
- package/assets/esri/core/workers/chunks/d199deff988eaefe18b4.js +0 -1
- package/assets/esri/core/workers/chunks/d77f56576a49a998164a.js +0 -1
- package/assets/esri/core/workers/chunks/dae09fb8da0faa6dede4.js +0 -1
- package/assets/esri/core/workers/chunks/e16e88de4e93b0f48b2c.js +0 -1
- package/chunks/libtess-asm.js +0 -5
- package/chunks/libtess.js +0 -5
- package/layers/BlendMode.d.ts +0 -2
- package/layers/LayerListMode.d.ts +0 -2
- package/layers/LayerType.d.ts +0 -2
- package/popup/content/support/mediaInfoTypes.d.ts +0 -7
- package/support/modeUtils.d.ts +0 -2
- package/views/SelectionManager.d.ts +0 -1
- package/views/draw/input/VertexRemoveEvent.js +0 -5
- package/views/webgl/Texture.d.ts +0 -6
- /package/portal/{interfaces.d.ts → types.d.ts} +0 -0
- /package/rest/support/{interfaces.d.ts → types.d.ts} +0 -0
- /package/views/draw/{input/VertexUpdateEvent.js → VertexUpdateEvent.js} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{unique as r}from"../../../core/arrayUtils.js";import{EventEmitter as t}from"../../../core/Evented.js";import"../../../core/has.js";import{someMap as s,everyMap as i}from"../../../core/MapUtils.js";import{disposeMaybe as n}from"../../../core/maybe.js";import o from"../../../core/PooledArray.js";import{watch as a,on as h,syncAndInitial as d,initial as l}from"../../../core/reactiveUtils.js";import{someSet as c}from"../../../core/SetUtils.js";import{property as u,subclass as p}from"../../../core/accessorSupport/decorators.js";import{ortho as _,fromTranslation as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{h as m}from"../../../chunks/vec32.js";import{ones as y}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{debugFlags as f}from"../support/debugFlags.js";import{Overlay as R}from"./Overlay.js";import{OverlayRenderTargets as v}from"./OverlayRenderTargets.js";import x from"../webgl/RenderCamera.js";import{T as w}from"../../../chunks/TextureOnly.glsl.js";import{SyncRenderPlugin as T}from"../webgl-engine/effects/RenderPlugin.js";import{trackHighlightOptions as b,renderHighlightBuffer as O}from"../webgl-engine/effects/highlight/Highlight.js";import{GLMaterialRepository as S}from"../webgl-engine/lib/GLMaterialRepository.js";import{GridLocalOriginFactory as D}from"../webgl-engine/lib/GridLocalOriginFactory.js";import{RenderContext as C,defaultRenderOccludedMask as P}from"../webgl-engine/lib/RenderContext.js";import{ShadowMap as j}from"../webgl-engine/lib/ShadowMap.js";import{TextureTechnique as E}from"../webgl-engine/lib/TextureTechnique.js";import{TextureTechniqueConfiguration as M}from"../webgl-engine/lib/TextureTechniqueConfiguration.js";import{AmbientLight as F}from"../webgl-engine/lighting/Lightsources.js";import{O as W}from"../../../chunks/OverlayCompositing.glsl.js";import{OverlayCompositingTechnique as q}from"../webgl-engine/shaders/OverlayCompositingTechnique.js";import{TaskPriority as V,noBudget as A}from"../../support/Scheduler.js";import{Texture as k}from"../../webgl/Texture.js";import{TextureDescriptor as G}from"../../webgl/TextureDescriptor.js";let I=class extends T{constructor(e){super(e),this._overlays=null,this._renderTargets=null,this._overlayParameters=new W,this.hasHighlights=!1,this.renderOccludedFlags=1,this._hasWater=!1,this._renderers=new Map,this._sortedDrapeSourceRenderersDirty=!1,this._sortedRenderers=new o,this._passParameters=new w,this._screenToWorldRatio=1,this._localOriginFactory=null,this.unloadedMemory=0,this.ignoresMemoryFactor=!1,this._camera=new x,this.events=new t,this.longitudeCyclical=null,this.produces=new Map([[19,e=>8!==e||this.hasHighlights],[20,()=>this._hasWater]]),this._hasTargetWithoutRasterImage=!1,this._hasDrapedFeatureSource=!1,this._hasDrapedRasterSource=!1,this._hasDrapedFlowSource=!1}initialize(){const e=this._view,r=e.stage,t=r.renderer.fboCache,{waterTextures:s,techniques:i}=r.renderView;this._renderContext=new C(this._rctx,new j(t,e.state.viewingMode),i),this.addHandles([a(()=>s.updating,()=>this.events.emit("content-changed"),d),a(()=>this._spatialReference,e=>this._localOriginFactory=new D(e),d),h(()=>e.allLayerViews,"after-changes",()=>this._sortedDrapeSourceRenderersDirty=!0),a(()=>b(e.state.highlights),()=>this._sortedDrapeSourceRenderersDirty=!0,l),a(()=>e.state.highlights,r=>{this._bindParameters.highlights=r,this._bindParameters.highlightOrderMap=e.state.highlightOrderMap},l),e.resourceController.scheduler.registerTask(V.OVERLAY_RENDERER,this)]);const n=this._camera;n.near=1,n.far=1e4,n.relativeElevation=null,this._bindParameters.slot=19,this._bindParameters.camera=n,this._bindParameters.updateLighting([new F(y())],0,0,0)}destroy(){this._renderers.forEach(e=>e.destroy()),this._renderers.clear(),this._passParameters.texture=n(this._passParameters.texture),this.disposeOverlays(),this._renderContext=null,this._sortedRenderers.prune()}get _bindParameters(){return this._renderContext.bind}get _rctx(){return this._stage.renderView.renderingContext}get _view(){return this.parent.view}get _stage(){return this.parent.view.stage}get _spatialReference(){return this.parent.spatialReference}get _techniques(){return this._stage.renderView.techniques}get rctx(){return this._rctx}get materials(){return this._pluginContext.materials}get screenToWorldRatio(){return this._screenToWorldRatio}get localOriginFactory(){return this._localOriginFactory}set time(e){this._renderContext.time=e}get pluginContext(){return this._pluginContext}initializeRenderContext(e){const r=new S(this._view.stage.renderView.textures,this._techniques,()=>{this._onMaterialOrContentChanged(),this.events.emit("content-changed"),this.notifyChange("updating"),this.notifyChange("isEmpty")},()=>this.events.emit("content-changed"));this._pluginContext={...e,materials:r},this._techniques.precompile(q)}uninitializeRenderContext(){}acquireTechniques(){return[]}render(){}get updating(){return this._sortedDrapeSourceRenderersDirty||s(this._renderers,e=>e.updating||e.canCompact)}get hasOverlays(){return null!=this._overlays&&null!=this._renderTargets}getMaterialRenderer(e){for(const r of this._renderers.values()){const t=r.getMaterialRenderer(e);if(t)return t}return null}get layers(){return this._sortedDrapeSourceRenderersDirty&&this._updateSortedDrapeSourceRenderers(),r(this._sortedRenderers.map(e=>e.drapeSource.layer).filter(e=>!!e))}registerDrapeSource(e,r){const t=this._renderers.get(e);null!=t&&t.destroy(),this._renderers.set(e,r),this._sortedDrapeSourceRenderersDirty=!0,"fullOpacity"in e&&this.addHandles(a(()=>e.fullOpacity,()=>this.events.emit("content-changed")),e)}removeDrapeSourceRenderer(e){if(null==e)return;const r=this._renderers.get(e);null!=r&&(this._sortedDrapeSourceRenderersDirty=!0,this._renderers.delete(e),this.removeHandles(e),r.destroy())}computeValidity(){return this._renderTargets?.computeValidity()??0}releaseRenderTargets(e){this._renderTargets?.dispose(e)}get overlays(){return this._overlays??[]}ensureDrapeTargets(e){this._hasTargetWithoutRasterImage=!!this._overlays&&c(e,e=>1===e.drapeTargetType)}ensureDrapeSources(e){this._overlays?(this._hasDrapedFeatureSource=c(e,e=>1===e.drapeSourceType),this._hasDrapedRasterSource=c(e,e=>0===e.drapeSourceType),this._hasDrapedFlowSource=c(e,e=>2===e.drapeSourceType)):this._hasDrapedFeatureSource=this._hasDrapedRasterSource=this._hasDrapedFlowSource=!1}get _needsColorWithoutRasterImage(){return this._hasDrapedRasterSource&&this._hasDrapedFeatureSource&&this._hasTargetWithoutRasterImage}ensureOverlays(e,r,t=this._bindParameters.overlayStretch){null==this._overlays&&(this._renderTargets=new v(this._stage.renderer.fboCache),this._overlays=[new R,new R]),this.ensureDrapeTargets(e),this.ensureDrapeSources(r),this._bindParameters.overlayStretch=t}disposeOverlays(){this._overlays=null,this._renderTargets?.dispose(1),this._renderTargets=null,this.events.emit("textures-disposed")}_useOverlayColorInsteadOfColorNoRasterImage(e){return 1===e&&!this._needsColorWithoutRasterImage&&this._hasDrapedFeatureSource}getTexture(e){const r=this._useOverlayColorInsteadOfColorNoRasterImage(e);return this._renderTargets?.getTexture(r?0:e)}get readyToRun(){return this.updating}runTask(e){this._processDrapeSources(e,()=>!0)}_onMaterialOrContentChanged(){this.renderOccludedFlags=s(this._renderers,e=>e.hasOccluders)?L:1}_processDrapeSources(e,r){let t=!1;for(const[s,i]of this._renderers){if(e.done)break;(s.destroyed||r(s))&&(i.commitChanges()&&(t=!0,e.madeProgress()))}this._sortedDrapeSourceRenderersDirty&&(this._sortedDrapeSourceRenderersDirty=!1,t=!0,this._updateSortedDrapeSourceRenderers(),e.madeProgress()),this.compact(e),t&&(null!=this._overlays&&0===this._renderers.size&&this.disposeOverlays(),this.notifyChange("updating"),this.notifyChange("isEmpty"),this._onMaterialOrContentChanged(),this.hasHighlights=s(this._renderers,e=>e.hasHighlights),this.events.emit("content-changed"))}compact(e){let r=!1;for(const t of this._renderers.values()){if(e.done)break;r=t.compact(e)||r}return r&&this.notifyChange("updating"),r}hasHighlight(e){return s(this._renderers,r=>r.hasHighlight(e))}processSyncDrapeSources(){this._processDrapeSources(A,e=>1===e.updatePolicy)}get isEmpty(){return!f.OVERLAY_DRAW_DEBUG_TEXTURE&&i(this._renderers,e=>e.isEmpty)}get hasWater(){const e=s(this._renderers,({hasWater:e})=>e);return e!==this._hasWater&&(this._hasWater=e,this.events.emit("has-water")),this._hasWater}renders(e){if(f.OVERLAY_DRAW_DEBUG_TEXTURE&&4!==e&&2!==e)return!0;if(!this._overlays)return!1;const r=this._overlays[0];for(const i of this._overlays)i.setupGeometryViews(this.longitudeCyclical);if(!r.hasSomeSizedView())return!1;const t=this._setOutput(this._renderTargets?.targets.find(r=>r.content===e)?.output??0);++this._techniques.precompiling;const s=this._sortedRenderers.some(({renderer:e})=>e.precompile(this._renderContext));return--this._techniques.precompiling,this._setOutput(t),s}_setOutput(e){const r=this._renderContext.output;return this._renderContext.output=e,this._bindParameters.slot=2===e?20:19,r}get mode(){return this.isEmpty?0:this.hasWater&&this.renders(3)?2:this._renderTargets?.getTexture(0)?1:0}updateAnimation(e){let r=!1;return this._renderers.forEach(t=>r=t.updateAnimation(e)||r),r&&this.parent.requestRender(0),r}updateDrapeSourceOrder(){this._sortedDrapeSourceRenderersDirty=!0}precompileShaders(e){if(!this._overlays||!this._renderTargets)return!1;const r=this._bindParameters;r.alignPixelEnabled=e.alignPixelEnabled,++this._techniques.precompiling;for(const t of this._renderTargets.targets){if(1===t.content&&!this._needsColorWithoutRasterImage)continue;const{output:e}=t;this._setOutput(e),8===e&&(r.highlightMixTexture=r.highlights.length>1?this._rctx.emptyTexture:null);const s=this._renderContext.renderOccludedMask;4===t.content&&(this._renderContext.renderOccludedMask=L),this._sortedRenderers.forAll(({drapeSource:e,renderer:r})=>{1===t.content&&0===e.drapeSourceType||4===t.content&&r.hasOnlyOccluders||r.precompile(this._renderContext)}),this._renderContext.renderOccludedMask=s,r.highlightMixTexture=null}return--this._techniques.precompiling,!0}drawOverlays(e,r){if(!this._overlays||!this._renderTargets)return;for(const s of this._overlays)s.setupGeometryViews(this.longitudeCyclical);this._bindParameters.alignPixelEnabled=e.alignPixelEnabled;const t=this.allSourcesOccluders;for(const s of this._renderTargets.targets){if(!(0===s.content&&this._hasDrapedFlowSource)&&!s.handleRenderRequest(r)||1===s.content&&!this._needsColorWithoutRasterImage||4===s.content&&t)continue;const e=this._drawTarget(0,s),i=this._drawTarget(1,s);(e||i)&&s.fbo.generateMipMap()}}_drawTarget(e,r){const t=this._overlays[e],s=t.canvasGeometries;if(0===s.numViews)return!1;const i=this._view.state.contentPixelRatio;this._screenToWorldRatio=i*t.mapUnitsPerPixel/this._bindParameters.overlayStretch;const{output:n,content:o}=r;if(this.isEmpty||2===n&&!this.hasWater||!t.hasSomeSizedView())return!1;const{_rctx:a,_camera:h,_renderContext:d,_bindParameters:l}=this;if(h.pixelRatio=t.pixelRatio*i,this._setOutput(n),l.screenToWorldRatio=this._screenToWorldRatio,l.screenToPCSRatio=this._screenToWorldRatio*this.parent.worldToPCSRatio,4===o&&(d.renderOccludedMask=L),!this.renders(o))return d.renderOccludedMask=P,!1;const{resolution:c}=t,u=0===e,p=u?0:c;a.setViewport(p,0,c,c),this._bindTargetFBO(r),u&&(8===n?a.gl.clearBufferuiv(a.gl.COLOR,0,[0,0,0,0]):(a.setClearColor(0,0,0,0),a.clear(16384)));if(f.OVERLAY_DRAW_DEBUG_TEXTURE&&4!==o&&2!==o){this._techniques.precompile(E,z);const r=this._techniques.get(E,z);for(let i=0;i<s.numViews;i++)this._setViewParameters(s.extents[i],t),this._ensureDebugPatternResources(t.resolution,B[e]),a.bindTechnique(r,l,this._passParameters),a.screen.draw()}if(8===n){const{fboCache:t}=this._stage.renderer,s=this._resolution;this._bindTargetFBO(r),O(a,t,{width:s,height:s},l,()=>this._renderAllGeometry(e,r),p)}else this._renderAllGeometry(e,r);return a.bindFramebuffer(null),d.renderOccludedMask=P,!0}get allSourcesOccluders(){return i(this._renderers,e=>e.hasOnlyOccluders)}_renderAllGeometry(e,r){const t=this._overlays[e],s=t.canvasGeometries;this._sortedRenderers.forAll(({drapeSource:i,renderer:n})=>{if(1===r.content&&0===i.drapeSourceType)return;const{fullOpacity:o}=i,a=null!=o&&o<1&&0===r.output&&this._bindTemporaryFBO();for(let e=0;e<s.numViews;e++)this._setViewParameters(s.extents[e],t),n.render(this._renderContext);if(a){this._bindTargetFBO(r),this._overlayParameters.texture=a.getTexture(),this._overlayParameters.opacity=o,this._overlayParameters.overlayIndex=e;const t=this._techniques.get(q);this._rctx.bindTechnique(t,this._bindParameters,this._overlayParameters),this._rctx.screen.draw(),a.release()}})}_bindTargetFBO(e){const r=this._resolution,t=2*r;e.fbo.ensureFramebuffer(t,r),e.fbo.bind(this._rctx)}_bindTemporaryFBO(){const e=this._resolution,r=2*e,t=this._stage.renderer.fboCache,s=t.acquire(r,e,"overlay tmp");return t.rctx.bindFramebuffer(s.fbo),t.rctx.clear(16384),s}get _resolution(){return this._overlays?.[0].resolution??0}notifyContentChanged(){this.events.emit("content-changed")}intersect(e,r,t,s){this._sortedDrapeSourceRenderersDirty&&this._updateSortedDrapeSourceRenderers();let i=0;for(const{renderer:n}of this._sortedRenderers)i=n.intersect?.(e,r,t,s,i)??i}_updateSortedDrapeSourceRenderers(){if(this._sortedRenderers.clear(),0===this._renderers.size)return;const e=this._view.map.allLayers.map(e=>e.uid),r=e.length;this._renderers.forEach((t,s)=>{const i=e.indexOf(s.layer?.uid),n=i>=0,o=s.renderGroup??(n?0:1),a=s.drapeSourcePriorityOffset??0,h=r*o+(n?i:0)+a;this._sortedRenderers.push(new U(s,t,h))}),this._sortedRenderers.sort((e,r)=>e.index-r.index)}_setViewParameters(e,r){const t=this._camera;t.viewport=[0,0,r.resolution,r.resolution],_(t.projectionMatrix,0,e[2]-e[0],0,e[3]-e[1],t.near,t.far),g(t.viewMatrix,[-e[0],-e[1],0])}_ensureDebugPatternResources(e,r){if(m(this._passParameters.color,r[0],r[1],r[2]),this._passParameters.texture)return;const t=new Uint8Array(e*e*4);let s=0;for(let n=0;n<e;n++)for(let r=0;r<e;r++){const i=Math.floor(r/10),o=Math.floor(n/10);i<2||o<2||10*i>e-20||10*o>e-20?(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=255):(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=1&i&&1&o?1&r^1&n?0:255:1&i^1&o?0:128)}const i=new G(e);i.samplingMode=9728,this._passParameters.texture=new k(this._rctx,i,t)}get test(){}};e([u()],I.prototype,"hasHighlights",void 0),e([u()],I.prototype,"renderOccludedFlags",void 0),e([u()],I.prototype,"_sortedDrapeSourceRenderersDirty",void 0),e([u({constructOnly:!0})],I.prototype,"parent",void 0),e([u({readOnly:!0})],I.prototype,"_techniques",null),e([u({type:Boolean,readOnly:!0})],I.prototype,"updating",null),e([u()],I.prototype,"isEmpty",null),I=e([p("esri.views.3d.terrain.OverlayRenderer")],I);class U{constructor(e,r,t){this.drapeSource=e,this.renderer=r,this.index=t}}const B=[[1,.5,.5],[.5,.5,1]],H=-2,L=4,z=new M;z.hasAlpha=!0;export{I as OverlayRenderer,H as drapedZ,L as overlayRenderOccludedFlag};
|
|
5
|
+
import{__decorate as e}from"tslib";import{unique as r}from"../../../core/arrayUtils.js";import{EventEmitter as t}from"../../../core/Evented.js";import"../../../core/has.js";import{someMap as s,everyMap as i}from"../../../core/MapUtils.js";import{disposeMaybe as n}from"../../../core/maybe.js";import o from"../../../core/PooledArray.js";import{watch as a,on as h,syncAndInitial as d,initial as l}from"../../../core/reactiveUtils.js";import{someSet as c}from"../../../core/SetUtils.js";import{property as u,subclass as p}from"../../../core/accessorSupport/decorators.js";import{ortho as _,fromTranslation as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{h as m}from"../../../chunks/vec32.js";import{ones as y}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{debugFlags as f}from"../support/debugFlags.js";import{Overlay as R}from"./Overlay.js";import{OverlayRenderTargets as v}from"./OverlayRenderTargets.js";import x from"../webgl/RenderCamera.js";import{T as w}from"../../../chunks/TextureOnly.glsl.js";import{SyncRenderPlugin as T}from"../webgl-engine/effects/RenderPlugin.js";import{trackHighlightOptions as b,renderHighlightBuffer as O}from"../webgl-engine/effects/highlight/Highlight.js";import{GLMaterialRepository as S}from"../webgl-engine/lib/GLMaterialRepository.js";import{GridLocalOriginFactory as D}from"../webgl-engine/lib/GridLocalOriginFactory.js";import{RenderContext as C,defaultRenderOccludedMask as P}from"../webgl-engine/lib/RenderContext.js";import{ShadowMap as j}from"../webgl-engine/lib/ShadowMap.js";import{TextureTechnique as E}from"../webgl-engine/lib/TextureTechnique.js";import{TextureTechniqueConfiguration as M}from"../webgl-engine/lib/TextureTechniqueConfiguration.js";import{AmbientLight as F}from"../webgl-engine/lighting/Lightsources.js";import{O as W}from"../../../chunks/OverlayCompositing.glsl.js";import{OverlayCompositingTechnique as q}from"../webgl-engine/shaders/OverlayCompositingTechnique.js";import{TaskPriority as V,noBudget as A}from"../../support/Scheduler.js";import k from"../../webgl/Texture.js";import{TextureDescriptor as G}from"../../webgl/TextureDescriptor.js";let I=class extends T{constructor(e){super(e),this._overlays=null,this._renderTargets=null,this._overlayParameters=new W,this.hasHighlights=!1,this.renderOccludedFlags=1,this._hasWater=!1,this._renderers=new Map,this._sortedDrapeSourceRenderersDirty=!1,this._sortedRenderers=new o,this._passParameters=new w,this._screenToWorldRatio=1,this._localOriginFactory=null,this.unloadedMemory=0,this.ignoresMemoryFactor=!1,this._camera=new x,this.events=new t,this.longitudeCyclical=null,this.produces=new Map([[19,e=>8!==e||this.hasHighlights],[20,()=>this._hasWater]]),this._hasTargetWithoutRasterImage=!1,this._hasDrapedFeatureSource=!1,this._hasDrapedRasterSource=!1,this._hasDrapedFlowSource=!1}initialize(){const e=this._view,r=e.stage,t=r.renderer.fboCache,{waterTextures:s,techniques:i}=r.renderView;this._renderContext=new C(this._rctx,new j(t,e.state.viewingMode),i),this.addHandles([a(()=>s.updating,()=>this.events.emit("content-changed"),d),a(()=>this._spatialReference,e=>this._localOriginFactory=new D(e),d),h(()=>e.allLayerViews,"after-changes",()=>this._sortedDrapeSourceRenderersDirty=!0),a(()=>b(e.state.highlights),()=>this._sortedDrapeSourceRenderersDirty=!0,l),a(()=>e.state.highlights,r=>{this._bindParameters.highlights=r,this._bindParameters.highlightOrderMap=e.state.highlightOrderMap},l),e.resourceController.scheduler.registerTask(V.OVERLAY_RENDERER,this)]);const n=this._camera;n.near=1,n.far=1e4,n.relativeElevation=null,this._bindParameters.slot=19,this._bindParameters.camera=n,this._bindParameters.updateLighting([new F(y())],0,0,0)}destroy(){this._renderers.forEach(e=>e.destroy()),this._renderers.clear(),this._passParameters.texture=n(this._passParameters.texture),this.disposeOverlays(),this._renderContext=null,this._sortedRenderers.prune()}get _bindParameters(){return this._renderContext.bind}get _rctx(){return this._stage.renderView.renderingContext}get _view(){return this.parent.view}get _stage(){return this.parent.view.stage}get _spatialReference(){return this.parent.spatialReference}get _techniques(){return this._stage.renderView.techniques}get rctx(){return this._rctx}get materials(){return this._pluginContext.materials}get screenToWorldRatio(){return this._screenToWorldRatio}get localOriginFactory(){return this._localOriginFactory}set time(e){this._renderContext.time=e}get pluginContext(){return this._pluginContext}initializeRenderContext(e){const r=new S(this._view.stage.renderView.textures,this._techniques,()=>{this._onMaterialOrContentChanged(),this.events.emit("content-changed"),this.notifyChange("updating"),this.notifyChange("isEmpty")},()=>this.events.emit("content-changed"));this._pluginContext={...e,materials:r},this._techniques.precompile(q)}uninitializeRenderContext(){}acquireTechniques(){return[]}render(){}get updating(){return this._sortedDrapeSourceRenderersDirty||s(this._renderers,e=>e.updating||e.canCompact)}get hasOverlays(){return null!=this._overlays&&null!=this._renderTargets}getMaterialRenderer(e){for(const r of this._renderers.values()){const t=r.getMaterialRenderer(e);if(t)return t}return null}get layers(){return this._sortedDrapeSourceRenderersDirty&&this._updateSortedDrapeSourceRenderers(),r(this._sortedRenderers.map(e=>e.drapeSource.layer).filter(e=>!!e))}registerDrapeSource(e,r){const t=this._renderers.get(e);null!=t&&t.destroy(),this._renderers.set(e,r),this._sortedDrapeSourceRenderersDirty=!0,"fullOpacity"in e&&this.addHandles(a(()=>e.fullOpacity,()=>this.events.emit("content-changed")),e)}removeDrapeSourceRenderer(e){if(null==e)return;const r=this._renderers.get(e);null!=r&&(this._sortedDrapeSourceRenderersDirty=!0,this._renderers.delete(e),this.removeHandles(e),r.destroy())}computeValidity(){return this._renderTargets?.computeValidity()??0}releaseRenderTargets(e){this._renderTargets?.dispose(e)}get overlays(){return this._overlays??[]}ensureDrapeTargets(e){this._hasTargetWithoutRasterImage=!!this._overlays&&c(e,e=>1===e.drapeTargetType)}ensureDrapeSources(e){this._overlays?(this._hasDrapedFeatureSource=c(e,e=>1===e.drapeSourceType),this._hasDrapedRasterSource=c(e,e=>0===e.drapeSourceType),this._hasDrapedFlowSource=c(e,e=>2===e.drapeSourceType)):this._hasDrapedFeatureSource=this._hasDrapedRasterSource=this._hasDrapedFlowSource=!1}get _needsColorWithoutRasterImage(){return this._hasDrapedRasterSource&&this._hasDrapedFeatureSource&&this._hasTargetWithoutRasterImage}ensureOverlays(e,r,t=this._bindParameters.overlayStretch){null==this._overlays&&(this._renderTargets=new v(this._stage.renderer.fboCache),this._overlays=[new R,new R]),this.ensureDrapeTargets(e),this.ensureDrapeSources(r),this._bindParameters.overlayStretch=t}disposeOverlays(){this._overlays=null,this._renderTargets?.dispose(1),this._renderTargets=null,this.events.emit("textures-disposed")}_useOverlayColorInsteadOfColorNoRasterImage(e){return 1===e&&!this._needsColorWithoutRasterImage&&this._hasDrapedFeatureSource}getTexture(e){const r=this._useOverlayColorInsteadOfColorNoRasterImage(e);return this._renderTargets?.getTexture(r?0:e)}get readyToRun(){return this.updating}runTask(e){this._processDrapeSources(e,()=>!0)}_onMaterialOrContentChanged(){this.renderOccludedFlags=s(this._renderers,e=>e.hasOccluders)?L:1}_processDrapeSources(e,r){let t=!1;for(const[s,i]of this._renderers){if(e.done)break;(s.destroyed||r(s))&&(i.commitChanges()&&(t=!0,e.madeProgress()))}this._sortedDrapeSourceRenderersDirty&&(this._sortedDrapeSourceRenderersDirty=!1,t=!0,this._updateSortedDrapeSourceRenderers(),e.madeProgress()),this.compact(e),t&&(null!=this._overlays&&0===this._renderers.size&&this.disposeOverlays(),this.notifyChange("updating"),this.notifyChange("isEmpty"),this._onMaterialOrContentChanged(),this.hasHighlights=s(this._renderers,e=>e.hasHighlights),this.events.emit("content-changed"))}compact(e){let r=!1;for(const t of this._renderers.values()){if(e.done)break;r=t.compact(e)||r}return r&&this.notifyChange("updating"),r}hasHighlight(e){return s(this._renderers,r=>r.hasHighlight(e))}processSyncDrapeSources(){this._processDrapeSources(A,e=>1===e.updatePolicy)}get isEmpty(){return!f.OVERLAY_DRAW_DEBUG_TEXTURE&&i(this._renderers,e=>e.isEmpty)}get hasWater(){const e=s(this._renderers,({hasWater:e})=>e);return e!==this._hasWater&&(this._hasWater=e,this.events.emit("has-water")),this._hasWater}renders(e){if(f.OVERLAY_DRAW_DEBUG_TEXTURE&&4!==e&&2!==e)return!0;if(!this._overlays)return!1;const r=this._overlays[0];for(const i of this._overlays)i.setupGeometryViews(this.longitudeCyclical);if(!r.hasSomeSizedView())return!1;const t=this._setOutput(this._renderTargets?.targets.find(r=>r.content===e)?.output??0);++this._techniques.precompiling;const s=this._sortedRenderers.some(({renderer:e})=>e.precompile(this._renderContext));return--this._techniques.precompiling,this._setOutput(t),s}_setOutput(e){const r=this._renderContext.output;return this._renderContext.output=e,this._bindParameters.slot=2===e?20:19,r}get mode(){return this.isEmpty?0:this.hasWater&&this.renders(3)?2:this._renderTargets?.getTexture(0)?1:0}updateAnimation(e){let r=!1;return this._renderers.forEach(t=>r=t.updateAnimation(e)||r),r&&this.parent.requestRender(0),r}updateDrapeSourceOrder(){this._sortedDrapeSourceRenderersDirty=!0}precompileShaders(e){if(!this._overlays||!this._renderTargets)return!1;const r=this._bindParameters;r.alignPixelEnabled=e.alignPixelEnabled,++this._techniques.precompiling;for(const t of this._renderTargets.targets){if(1===t.content&&!this._needsColorWithoutRasterImage)continue;const{output:e}=t;this._setOutput(e),8===e&&(r.highlightMixTexture=r.highlights.length>1?this._rctx.emptyTexture:null);const s=this._renderContext.renderOccludedMask;4===t.content&&(this._renderContext.renderOccludedMask=L),this._sortedRenderers.forAll(({drapeSource:e,renderer:r})=>{1===t.content&&0===e.drapeSourceType||4===t.content&&r.hasOnlyOccluders||r.precompile(this._renderContext)}),this._renderContext.renderOccludedMask=s,r.highlightMixTexture=null}return--this._techniques.precompiling,!0}drawOverlays(e,r){if(!this._overlays||!this._renderTargets)return;for(const s of this._overlays)s.setupGeometryViews(this.longitudeCyclical);this._bindParameters.alignPixelEnabled=e.alignPixelEnabled;const t=this.allSourcesOccluders;for(const s of this._renderTargets.targets){if(!(0===s.content&&this._hasDrapedFlowSource)&&!s.handleRenderRequest(r)||1===s.content&&!this._needsColorWithoutRasterImage||4===s.content&&t)continue;const e=this._drawTarget(0,s),i=this._drawTarget(1,s);(e||i)&&s.fbo.generateMipMap()}}_drawTarget(e,r){const t=this._overlays[e],s=t.canvasGeometries;if(0===s.numViews)return!1;const i=this._view.state.contentPixelRatio;this._screenToWorldRatio=i*t.mapUnitsPerPixel/this._bindParameters.overlayStretch;const{output:n,content:o}=r;if(this.isEmpty||2===n&&!this.hasWater||!t.hasSomeSizedView())return!1;const{_rctx:a,_camera:h,_renderContext:d,_bindParameters:l}=this;if(h.pixelRatio=t.pixelRatio*i,this._setOutput(n),l.screenToWorldRatio=this._screenToWorldRatio,l.screenToPCSRatio=this._screenToWorldRatio*this.parent.worldToPCSRatio,4===o&&(d.renderOccludedMask=L),!this.renders(o))return d.renderOccludedMask=P,!1;const{resolution:c}=t,u=0===e,p=u?0:c;a.setViewport(p,0,c,c),this._bindTargetFBO(r),u&&(8===n?a.gl.clearBufferuiv(a.gl.COLOR,0,[0,0,0,0]):(a.setClearColor(0,0,0,0),a.clear(16384)));if(f.OVERLAY_DRAW_DEBUG_TEXTURE&&4!==o&&2!==o){this._techniques.precompile(E,z);const r=this._techniques.get(E,z);for(let i=0;i<s.numViews;i++)this._setViewParameters(s.extents[i],t),this._ensureDebugPatternResources(t.resolution,B[e]),a.bindTechnique(r,l,this._passParameters),a.screen.draw()}if(8===n){const{fboCache:t}=this._stage.renderer,s=this._resolution;this._bindTargetFBO(r),O(a,t,{width:s,height:s},l,()=>this._renderAllGeometry(e,r),p)}else this._renderAllGeometry(e,r);return a.bindFramebuffer(null),d.renderOccludedMask=P,!0}get allSourcesOccluders(){return i(this._renderers,e=>e.hasOnlyOccluders)}_renderAllGeometry(e,r){const t=this._overlays[e],s=t.canvasGeometries;this._sortedRenderers.forAll(({drapeSource:i,renderer:n})=>{if(1===r.content&&0===i.drapeSourceType)return;const{fullOpacity:o}=i,a=null!=o&&o<1&&0===r.output&&this._bindTemporaryFBO();for(let e=0;e<s.numViews;e++)this._setViewParameters(s.extents[e],t),n.render(this._renderContext);if(a){this._bindTargetFBO(r),this._overlayParameters.texture=a.getTexture(),this._overlayParameters.opacity=o,this._overlayParameters.overlayIndex=e;const t=this._techniques.get(q);this._rctx.bindTechnique(t,this._bindParameters,this._overlayParameters),this._rctx.screen.draw(),a.release()}})}_bindTargetFBO(e){const r=this._resolution,t=2*r;e.fbo.ensureFramebuffer(t,r),e.fbo.bind(this._rctx)}_bindTemporaryFBO(){const e=this._resolution,r=2*e,t=this._stage.renderer.fboCache,s=t.acquire(r,e,"overlay tmp");return t.rctx.bindFramebuffer(s.fbo),t.rctx.clear(16384),s}get _resolution(){return this._overlays?.[0].resolution??0}notifyContentChanged(){this.events.emit("content-changed")}intersect(e,r,t,s){this._sortedDrapeSourceRenderersDirty&&this._updateSortedDrapeSourceRenderers();let i=0;for(const{renderer:n}of this._sortedRenderers)i=n.intersect?.(e,r,t,s,i)??i}_updateSortedDrapeSourceRenderers(){if(this._sortedRenderers.clear(),0===this._renderers.size)return;const e=this._view.map.allLayers.map(e=>e.uid),r=e.length;this._renderers.forEach((t,s)=>{const i=e.indexOf(s.layer?.uid),n=i>=0,o=s.renderGroup??(n?0:1),a=s.drapeSourcePriorityOffset??0,h=r*o+(n?i:0)+a;this._sortedRenderers.push(new U(s,t,h))}),this._sortedRenderers.sort((e,r)=>e.index-r.index)}_setViewParameters(e,r){const t=this._camera;t.viewport=[0,0,r.resolution,r.resolution],_(t.projectionMatrix,0,e[2]-e[0],0,e[3]-e[1],t.near,t.far),g(t.viewMatrix,[-e[0],-e[1],0])}_ensureDebugPatternResources(e,r){if(m(this._passParameters.color,r[0],r[1],r[2]),this._passParameters.texture)return;const t=new Uint8Array(e*e*4);let s=0;for(let n=0;n<e;n++)for(let r=0;r<e;r++){const i=Math.floor(r/10),o=Math.floor(n/10);i<2||o<2||10*i>e-20||10*o>e-20?(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=255):(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=1&i&&1&o?1&r^1&n?0:255:1&i^1&o?0:128)}const i=new G(e);i.samplingMode=9728,this._passParameters.texture=new k(this._rctx,i,t)}get test(){}};e([u()],I.prototype,"hasHighlights",void 0),e([u()],I.prototype,"renderOccludedFlags",void 0),e([u()],I.prototype,"_sortedDrapeSourceRenderersDirty",void 0),e([u({constructOnly:!0})],I.prototype,"parent",void 0),e([u({readOnly:!0})],I.prototype,"_techniques",null),e([u({type:Boolean,readOnly:!0})],I.prototype,"updating",null),e([u()],I.prototype,"isEmpty",null),I=e([p("esri.views.3d.terrain.OverlayRenderer")],I);class U{constructor(e,r,t){this.drapeSource=e,this.renderer=r,this.index=t}}const B=[[1,.5,.5],[.5,.5,1]],H=-2,L=4,z=new M;z.hasAlpha=!0;export{I as OverlayRenderer,H as drapedZ,L as overlayRenderOccludedFlag};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{ZEROS as r}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{VectorTileRendererHelper3D as i}from"../../2d/engine/vectorTiles/VectorTileRendererHelper3D.js";import{BlendLayersTechnique as s}from"./BlendLayersTechnique.js";import{BlendLayersTechniqueConfiguration as o}from"./BlendLayersTechniqueConfiguration.js";import{RasterColorizerTechnique as n}from"./RasterColorizerTechnique.js";import{RasterColorizerTechniqueConfiguration as a}from"./RasterColorizerTechniqueConfiguration.js";import{MultiSizeFramebuffer as h}from"./support/MultiSizeFramebuffer.js";import{BindParameters as l}from"../webgl-engine/lib/BindParameters.js";import{createQuadVAO as c}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as u}from"../../webgl/enums.js";import
|
|
5
|
+
import e from"../../../core/Logger.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{ZEROS as r}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{VectorTileRendererHelper3D as i}from"../../2d/engine/vectorTiles/VectorTileRendererHelper3D.js";import{BlendLayersTechnique as s}from"./BlendLayersTechnique.js";import{BlendLayersTechniqueConfiguration as o}from"./BlendLayersTechniqueConfiguration.js";import{RasterColorizerTechnique as n}from"./RasterColorizerTechnique.js";import{RasterColorizerTechniqueConfiguration as a}from"./RasterColorizerTechniqueConfiguration.js";import{MultiSizeFramebuffer as h}from"./support/MultiSizeFramebuffer.js";import{BindParameters as l}from"../webgl-engine/lib/BindParameters.js";import{createQuadVAO as c}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as u}from"../../webgl/enums.js";import d from"../../webgl/Texture.js";const _=()=>e.getLogger("esri.views.3d.terrain");class f{constructor(e,t){this._rctx=e,this._techniques=t,this._fbos=[],this._vectorTileHelper=new i,this._bindParameters=new l(null),this._blendConfiguration=new o,this._current=0,this._lastUsedIds=new Array,this._lastCreatedBufferId=0,this._onHoldIds=new Array,this._vao=c(this._rctx,1)}dispose(){this._fbos.forEach(t),this._fbos=null,this._vtFBO=t(this._vtFBO),this._vao=t(this._vao),this._vectorTileHelper=t(this._vectorTileHelper)}updateHeading(e){this._vectorTileHelper?.updateHeading(e)}_acquireBlendTechnique(e,t,r,i=!1,o=0){return this._blendConfiguration.output=t,this._blendConfiguration.blendMode=e,this._blendConfiguration.applyBaseOpacity=r,this._blendConfiguration.premultipliedAlphaSource=i,this._blendConfiguration.background=o,this._techniques.precompile(s,this._blendConfiguration),this._techniques.get(s,this._blendConfiguration)}drawBackground(e,t){const r=this._acquireBlendTechnique(0,t?2:3,!1,!1,1),i=this._rctx.bindTechnique(r,this._bindParameters,e);this._render(i)}_render(e){this._rctx.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),this._rctx.drawArrays(u.TRIANGLE_STRIP,0,this._vao.vertexCount("geometry"))}drawGroup(e,t,r,i,s=!0){1===t&&(e.fboTexture=this._fbos[this.getLastOnHoldId()].get(r).colorTexture,null==e.fboTexture&&(e.fboTexture=this._rctx.emptyTexture)),e.texture=this.currentFBO(r).colorTexture,this.closeGroup(r);const o=e.baseOpacity<1,n=this._acquireBlendTechnique(i,t,o,s),a=this._rctx.bindTechnique(n,this._bindParameters,e);this._render(a)}drawImageData(e,t,r,i,s=!1){if(null==e.texture)return;const o=e.baseOpacity<1;e.fboTexture=4===t||0===i&&!o&&!s?null:this.switch(r).colorTexture,null==e.fboTexture&&(e.fboTexture=this._rctx.emptyTexture);const n=this._acquireBlendTechnique(i,t,o,s),a=this._rctx.bindTechnique(n,this._bindParameters,e);this._render(a)}drawRasterData(e,t,r,i,s){const o=s.sourceLayerInfo.data;if(!o.source)return;if(s.tile.surface.layerViewByIndex(s.layerIndex,1).ensureSymbolizerParameters(o),!o.bind(this._rctx))return;const n=e.baseOpacity<1;e.fboTexture=0!==i||n?this.switch(r).colorTexture:null;const a=this._acquireRasterTechnique(o,t,i,n);if(!a)return;o.opacity=e.opacity;const h=o.getUniforms(this._rctx);h.scale=s.scale,h.offset=s.offset,h.backgroundColor=e.backgroundColor,h.fboTexture=e.fboTexture,h.baseOpacity=e.baseOpacity;const l=this._rctx.bindTechnique(a,this._bindParameters,h);this._render(l)}_acquireRasterTechnique(e,t,r,i){if(!this._rctx.capabilities.colorBufferFloat)return null;const s=e.symbolizerParameters,o=["stretch","lut","hillshade"].indexOf(s.type);return this._rasterConfiguration??=new a,this._rasterConfiguration.output=t,this._rasterConfiguration.blendMode=r,this._rasterConfiguration.applyBaseOpacity=i,this._rasterConfiguration.colorizerType=o,this._rasterConfiguration.applyColormap=!!s.colormap,this._rasterConfiguration.requireBilinearWithNN=e.isBilinearWithStretchColorRamp,this._rasterConfiguration.stretchType=e.hasStretchTypeNone()?0:1,this._techniques.precompile(n,this._rasterConfiguration),this._techniques.get(n,this._rasterConfiguration)}drawVectorData(e,t,i,s,o,n,a,l){const c=this._rctx,u=o.sourceLayerInfo.data,d=o.tile.surface.layerViewByIndex(o.layerIndex,1),f=e.baseOpacity<1,p=f||e.opacity<1||0!==s||1!==t,b=p,g=this._acquireBlendTechnique(s,t,f,b);c.setPipelineState(g.getPipeline(this._bindParameters));let m=null,x=null;p?(x=this.currentFBO(i),null==this._vtFBO&&(this._vtFBO=new h(this._rctx)),m=this._vtFBO.get(i),c.bindFramebuffer(m),this._clearCurrentFBO()):l&&c.clear(256);try{this._vectorTileHelper.renderBackground(c,o.sourceLod,d.painter,d.layer.styleRepository,d.schemaHelper,Math.round(1/o.scale),o.offset,a,n,d.contentZoom),u&&this._vectorTileHelper.renderContent(c,o.sourceLod,u,o.vtlNeighborInfos,d.painter,d.layer.styleRepository,d.schemaHelper,Math.round(1/o.scale),o.offset,a,n,d.contentZoom)}catch(T){_().warnOnce("A render call containing vector tiles did not resolve correctly.",T)}return!m||(c.bindFramebuffer(x),e.texture=m.colorTexture,e.offset=r,e.scale=1,this.drawImageData(e,t,i,s,b),l)}copyFBOToTexture(e){const t=this._rctx,r=t.bindTexture(e.texture,d.TEXTURE_UNIT_FOR_UPDATES),i=e.descriptor;t.gl.copyTexImage2D(3553,0,i.pixelFormat,0,0,i.width,i.height,0),e.generateMipmap(),t.bindTexture(r,d.TEXTURE_UNIT_FOR_UPDATES)}_clearCurrentFBO(){this._rctx.setStencilWriteMask(255),this._rctx.setClearColor(0,0,0,0),this._rctx.setClearDepth(1),this._rctx.setClearStencil(0),this._rctx.clear(17664)}_initFBO(e,t,r){this._rctx.bindFramebuffer(e),r&&(this._rctx.setViewport(0,0,t,t),this._clearCurrentFBO())}ensureBuffer(e){this._lastUsedIds.length=0,this._lastUsedIds.push(1),this._lastCreatedBufferId=1,this._onHoldIds.length=0,this.bind(e)}bind(e,t=0,r=!0){if(this._current=t,t>=this._fbos.length)for(let i=this._fbos.length;i<=t;i++)this._fbos.push(new h(this._rctx));this._initFBO(this._fbos[t].get(e),e,r)}_bindNextFreeBuffer(e){this._lastUsedIds.length>0?this.bind(e,this._lastUsedIds.pop()):(this._lastCreatedBufferId++,this.bind(e,this._lastCreatedBufferId))}openGroup(e){this._onHoldIds.push(this._current),this._bindNextFreeBuffer(e)}switch(e){const t=this.currentFBO(e),r=this._current;return this._bindNextFreeBuffer(e),this._lastUsedIds.push(r),t}getLastOnHoldId(){return this._onHoldIds[this._onHoldIds.length-1]}closeGroup(e){const t=this._current;this._bindNextFreeBuffer(e),this._lastUsedIds.push(t),this._lastUsedIds.push(this._onHoldIds.pop())}unbind(){this._rctx.bindFramebuffer(null)}currentFBO(e){return this._fbos[this._current].get(e)}}export{f as TileCompositor};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../core/has.js";import{disposeMaybe as e,releaseMaybe as t}from"../../../core/maybe.js";import{set as r,copy as s}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as o}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isBaseLayer as a,isGroupLayer as n,isReferenceLayer as c}from"../../../layers/support/layerUtils.js";import{isLayerViewWithFlowRenderer as u}from"../support/flowUtils.js";import{BlendLayersPassParameters as l}from"./BlendLayersTechnique.js";import{isImageWithType as p}from"./TerrainData.js";import{isBlendableLayerView as h,isVectorTileLayerView as d,isVectorTileRenderInfo as m,isImageryTileRenderInfo as f,isImageSourceRenderInfo as _,isTextureTileRenderInfo as x,isVectorTilePerLayerInfo as T}from"./terrainUtils.js";import{TextureReference as b}from"./TextureReference.js";import{TileCompositor as y}from"./TileCompositor.js";import{TileRenderInfo as g}from"./TileRenderInfo.js";import{TileTexture as w,getCacheKey as k}from"./TileTexture.js";import{fallsWithinLayerView as I}from"./tileUtils.js";import{blendModeFromString as j}from"../webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{createEmptyTexture as O}from"../webgl-engine/lib/glUtil3D.js";import{isCompressible as P}from"../../support/TextureCompressionWorkerHandle.js";import
|
|
5
|
+
import"../../../core/has.js";import{disposeMaybe as e,releaseMaybe as t}from"../../../core/maybe.js";import{set as r,copy as s}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as o}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isBaseLayer as a,isGroupLayer as n,isReferenceLayer as c}from"../../../layers/support/layerUtils.js";import{isLayerViewWithFlowRenderer as u}from"../support/flowUtils.js";import{BlendLayersPassParameters as l}from"./BlendLayersTechnique.js";import{isImageWithType as p}from"./TerrainData.js";import{isBlendableLayerView as h,isVectorTileLayerView as d,isVectorTileRenderInfo as m,isImageryTileRenderInfo as f,isImageSourceRenderInfo as _,isTextureTileRenderInfo as x,isVectorTilePerLayerInfo as T}from"./terrainUtils.js";import{TextureReference as b}from"./TextureReference.js";import{TileCompositor as y}from"./TileCompositor.js";import{TileRenderInfo as g}from"./TileRenderInfo.js";import{TileTexture as w,getCacheKey as k}from"./TileTexture.js";import{fallsWithinLayerView as I}from"./tileUtils.js";import{blendModeFromString as j}from"../webgl-engine/core/shaderLibrary/output/BlendOptions.js";import{createEmptyTexture as O}from"../webgl-engine/lib/glUtil3D.js";import{isCompressible as P}from"../../support/TextureCompressionWorkerHandle.js";import L from"../../webgl/Texture.js";import{TextureDescriptor as B}from"../../webgl/TextureDescriptor.js";class C{constructor(e,t,r,s,o,i){this.start=e,this.end=t,this.blendMode=r,this.opacity=s,this.output=o,this.baseOpacity=i}}class M{constructor(e,t,r,s,o){this._rctx=e,this.tileSize=t,this._techniques=r,this._cache=s,this._compressionTracker=o,this._passParameters=new l,this._backgroundColor=null,this._maxAnisotropy=this._rctx.parameters.maxMaxAnisotropy,this._compositor=new y(this._rctx,this._techniques)}dispose(){this._compositor=e(this._compositor),this._backgroundTexture=t(this._backgroundTexture)}get backgroundIsGrid(){return null==this._backgroundColor}get backgroundColor(){return this._backgroundColor}updateHeading(e){this._compositor?.updateHeading(e)}updateTileTexture(e,t){if(!e.renderData)return;const r=e.surface,s=r.baseOpacity;let o=0,i=0,l=this.tileSize,p=!1,m=!1;const f=r.view.state.contentPixelRatio;let _=!1;A.clear(),S.length=0;const x=e.layerInfo[1];let T=0,b=null;for(;T<x.length;T++){const t=r.layerViewByIndex(T,1),y=t.layer,g=!I(e,t),w=y.opacity,k=t.fullOpacity;if(m=m||a(y),u(t))continue;if(h(t)){let e="normal"!==t.layer.blendMode;if(n(y.parent)){const t=y.parent.uid;null!=t&&""!==t&&(e=U(y.parent)||e)}e&&(_=e,p=!1)}if((g||0===w)&&!_){x[T].pendingUpdates&=-1;continue}++i;const j=d(t),O=D(e,T,j);if(O){if(x[T].pendingUpdates&=-1,n(y.parent)){const e=y.parent.uid;null!=e&&""!==e&&v(y.parent,T)}j?l=Math.max(l,this.tileSize*f):1===s&&1===k&&(t.isOpaque||this._dataToTexture(O,c(y))&&O.sourceLayerInfo.data.descriptor.isOpaque)&&(p=!0),++o,null===b&&(b=T)}}const y=l/this.tileSize;0!==o&&null!==b?1===o&&!_&&this._useLayerTexture(e,b)||this._composeLayers(e,t,T-1,m,l,y,!p||_,A,_):this._useBackgroundTexture(e,i,0!==t)}setBackground(e){this._backgroundColor!==e&&(this._backgroundColor=e,this._backgroundTexture&&this._drawBackgroundTexture(this._backgroundTexture))}_ensureBackgroundTexture(){return null==this._backgroundTexture&&(this._backgroundTexture=this._buildTexture(this.tileSize,!1),this._drawBackgroundTexture(this._backgroundTexture)),this._backgroundTexture}_drawBackgroundTexture(e){this._compositor.bind(this.tileSize),this._passParameters.offset=o,this._passParameters.scale=1,this._passParameters.opacity=1,this.backgroundColor&&(this._passParameters.backgroundColor=this.backgroundColor),this._compositor.drawBackground(this._passParameters,null!=this.backgroundColor),this._compositor.copyFBOToTexture(e),this._compositor.unbind()}_useBackgroundTexture(e,t,r){const s=e.renderData,o=!r&&null!=s.textureReference&&(e.surface.view.layerViewManager.updating||t>0)?5e3:0,i=this._ensureBackgroundTexture();s.setTextureReference(new b(i,0,E,e.surface.baseOpacity,0,1),o)}_useLayerTexture(e,t){const r=e.surface.layerViewByIndex(t,1),s=a(r.layer),o=s?e.surface.baseOpacity:1,n=s?1:e.surface.baseOpacity,u=r.fullOpacity,l=D(e,t,!1);return!!this._dataToTexture(l,c(r.layer))&&(e.renderData.setTextureReference(new b(l.sourceLayerInfo.data,0,i(l.offset[0],l.offset[1],l.scale,l.scale),o,n,u)),!0)}_composeLayers(e,t,r,s,i,n,l,p,_){this._compositor.ensureBuffer(i);const x=e.surface.baseOpacity;let T=!1,y=9987,g=!1,w=0;for(let b=r;b>=0;b--){const t=e.surface.layerViewByIndex(b,1),r=t.layer,k=d(t),O=D(e,b,k),P=r.opacity,L=!I(e,t);if(!O||(0===P||L)&&!_)continue;if(u(t))continue;const B=!a(r)&&!T;T||=B;let C=!1;p.forEach(e=>{e.start===b&&(e.output=s?1:l&&B?this.backgroundIsGrid?3:2:1,e.baseOpacity=B?x:1,S.push(e),this._compositor.openGroup(i),C=!0)});const M=C?4:l&&0===w?this.backgroundIsGrid?3:2:1,U=j[h(t)?t.layer.blendMode:"normal"];for(this._passParameters.baseOpacity=B&&!C&&x<1?x:1,this._passParameters.opacity=P,m(O)?g=this._compositor.drawVectorData(this._passParameters,M,i,U,O,n,this.tileSize,g):f(O)?(this._compositor.drawRasterData(this._passParameters,M,i,U,O),R(O)&&(y=9728)):this._dataToTexture(O,c(r))&&(this._passParameters.texture=O.sourceLayerInfo.data.texture,this._passParameters.offset=O.offset,this._passParameters.scale=O.scale,this._compositor.drawImageData(this._passParameters,M,i,U));S.length>0&&S[S.length-1].end===b;){const e=S.pop();this._passParameters.baseOpacity=e.baseOpacity,this._passParameters.opacity=e.opacity,this._passParameters.offset=o,this._passParameters.scale=1,this._compositor.drawGroup(this._passParameters,e.output,i,j[e.blendMode])}w++}const k=e.renderData,O=_||T&&x<1,P=k.ensureTexture(i,O,t,()=>this._buildTexture(i,O,y));this._compositor.copyFBOToTexture(P),this._compositor.unbind(),k.setTextureReference(new b(P,t,E,T?1:x,0,1))}_dataToTexture(e,t){if(_(e)){const r=e.sourceLayerInfo,s=1===e.scale&&!t;r.data=this._buildTexture(r.data,!0,s,e.tile.onCompressionFinished),e.tile.setMemoryDirty()}return x(e)}_buildTexture(e,t,r=9987,s=()=>{}){if(null==e)return null;const o=new B;o.wrapMode=33071,o.samplingMode="boolean"==typeof r?9987:r,o.maxAnisotropy=this._maxAnisotropy,o.preMultiplyAlpha=!0,o.flipped=!0,o.hasMipmap=!0,t||(o.pixelFormat=6407);const i=this._rctx,a="boolean"==typeof r&&r;let n;if("number"==typeof e)o.width=o.height=e,n=this._buildTileTexture(o);else if(p(e))o.isOpaque=e.isOpaque,o.isOpaque&&(o.pixelFormat=6407),o.width=e.element.width,o.height=e.element.height,n=this._buildTileTexture(o,a,s,e.element);else try{o.width=e.width,o.height=e.height,n=this._buildTileTexture(o,a,s,e)}catch(u){n=new w(O(i)),console.warn("TileRenderer: failed to execute 'texImage2D', cross-origin image may not be loaded.")}const c=i.bindTexture(n.texture,L.TEXTURE_UNIT_FOR_UPDATES);return n.generateMipmap(),i.bindTexture(c,L.TEXTURE_UNIT_FOR_UPDATES),n}_buildTileTexture(e,t=!1,r=()=>{},s){const o=this._cache.pop(k(e,!1))??this._cache.pop(k(e,!0));if(t&&=P(s,e),o)return o.retain(),t?o.texture.enableCompression({compressionTracker:this._compressionTracker,compressionCallback:r}):o.texture.disableCompression(),o.texture.setData(s),o;e.compress=t?{compressionTracker:this._compressionTracker,compressionCallback:r}:void 0;const i=new L(this._rctx,e,s);return new w(i,this._cache)}get test(){}}function D(e,t,o){q.layerIndex=t,q.vtlNeighborInfos.clear();const i=e.layerInfo[1][t];if(r(q.offset,0,0),q.tile=e,q.scale=1,q.sourceLod=e.lij,q.sourceLayerInfo=i,q.isVTLBackground=o,i.data)return o&&e.forEachLoadedNeighbor((r,s)=>{if(r.level!==e.level)return;const o=r.layerInfo[1][t];if(!T(o)||i.data===o.data)return;const a=q.vtlNeighborInfos.pushNew();a.offset=z[s],a.sourceLod=r.lij,a.sourceLayerInfo=o}),q;const a=i.upsampleInfo,n=a?.tile?.layerInfo[1][t];return n&&a.tile?(q.tile=a.tile,s(q.offset,a.offset),q.scale=a.scale,q.sourceLod=a.tile.lij,q.sourceLayerInfo=n,q):o?q:null}function R(e){const t=e.sourceLayerInfo.data;return!!t.source&&"nearest"===t.interpolation}function U(e){let t="normal"!==e.blendMode;return n(e.parent)&&(t=U(e.parent)||t),t}function v(e,t){n(e.parent)&&v(e.parent,t);const r=e.uid;if(null!=r&&""!==r){const s=A.get(r);s?s.start=t:A.set(r,new C(t,t,e.blendMode,e.opacity,1,1))}}const A=new Map,S=new Array,q=new g,E=i(0,0,1,1),z=new Array;function F(){q.sourceLayerInfo=null,q.tile=null,q.vtlNeighborInfos.prune()}z[0]=[0,-1],z[1]=[-1,-1],z[2]=[-1,0],z[3]=[-1,1],z[4]=[0,1],z[5]=[1,1],z[6]=[1,0],z[7]=[1,-1];export{C as GroupInfo,M as TileRenderer,F as cleanupTileRenderer};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type ManagedFBOAttachment from "./ManagedFBOAttachment.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Describes a single attachment of a managed framebuffer. A managed color
|
|
5
5
|
* attachment is also memory managed by the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
|
|
6
6
|
*/
|
|
7
|
-
export abstract class ManagedColorAttachment extends ManagedFBOAttachment {}
|
|
7
|
+
export default abstract class ManagedColorAttachment extends ManagedFBOAttachment {}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import t from"./ManagedFBOAttachment.js";class e extends t{constructor(t,e,s){super(t,e,s),this.attachment=e,this.type=2}}export{e as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type ManagedFBOAttachment from "./ManagedFBOAttachment.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Describes the depth attachment of a managed framebuffer. The depth attachment is memory managed by
|
|
5
5
|
* the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
|
|
6
6
|
*/
|
|
7
|
-
export abstract class ManagedDepthAttachment extends ManagedFBOAttachment {}
|
|
7
|
+
export default abstract class ManagedDepthAttachment extends ManagedFBOAttachment {}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import t from"./ManagedFBOAttachment.js";class e extends t{constructor(){super(...arguments),this.type=1}}export{e as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import t from"./ManagedDepthAttachment.js";class e extends t{constructor(t,e,n){super(t,e,n),this.attachment=e}}function n(t){return 1===t?.attachment.type}export{e as ManagedDepthTexture,n as isManagedDepthTexture};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import type ManagedColorAttachment from "./ManagedColorAttachment.js";
|
|
2
|
+
import type ManagedDepthAttachment from "./ManagedDepthAttachment.js";
|
|
3
|
+
import type ManagedFBOResource from "./ManagedFBOResource.js";
|
|
1
4
|
import type { RenderNodeInput } from "../webgl.js";
|
|
2
|
-
import type { ManagedColorAttachment } from "./ManagedColorAttachment.js";
|
|
3
|
-
import type { ManagedDepthAttachment } from "./ManagedDepthAttachment.js";
|
|
4
|
-
import type { ManagedFBOResource } from "./ManagedFBOResource.js";
|
|
5
|
-
import type { Texture } from "../../webgl/Texture.js";
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* ManagedFBO is an interface to represent a framebuffer object resource of the [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
|
|
@@ -76,7 +75,7 @@ export default abstract class ManagedFBO extends ManagedFBOResource {
|
|
|
76
75
|
*
|
|
77
76
|
* @param attachment - a WebGL color or depth attachment point.
|
|
78
77
|
*/
|
|
79
|
-
getTexture(attachment?: number):
|
|
78
|
+
getTexture(attachment?: number): FBOTexture | null | undefined;
|
|
80
79
|
/** Detach the attached depth buffer texture and return ownership to the caller. */
|
|
81
80
|
obtainDepthTexture(): any | null | undefined;
|
|
82
81
|
/**
|
|
@@ -91,4 +90,7 @@ export default abstract class ManagedFBO extends ManagedFBOResource {
|
|
|
91
90
|
* You can use this functionality to hold framebuffer contents for several frames and then release the framebuffer.
|
|
92
91
|
*/
|
|
93
92
|
retain(): void;
|
|
94
|
-
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Encapsulates a WebGL texture. */
|
|
96
|
+
export interface FBOTexture {}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{someMap as t}from"../../../core/MapUtils.js";import{releaseMaybe as e}from"../../../core/maybe.js";import{RenderCategory as h}from"../webgl.js";import{isManagedDepthTexture as o}from"./ManagedDepthTexture.js";import
|
|
5
|
+
import{someMap as t}from"../../../core/MapUtils.js";import{releaseMaybe as e}from"../../../core/maybe.js";import{RenderCategory as h}from"../webgl.js";import{isManagedDepthTexture as o}from"./ManagedDepthTexture.js";import r from"./ManagedFBOResource.js";import{ColorAttachment0 as s,DepthStencilAttachment as i}from"../../webgl/enums.js";class a extends r{constructor(t,e,o,r,s,i){super(t,i),this.fbo=o,this.type=0,this._colors=new Map,this._name=h.COMPOSITE,this.acquireColor=null,this.acquireDepth=null,this._name=e,this.acquireColor=r,this.acquireDepth=s}dispose(){this.fbo?.dispose()}get usedMemory(){return this.fbo?.usedMemory||0}get numberOfColorAttachments(){return this._colors.size}get name(){return this._name}setName(t){this._name=t}getTexture(t=s){return t===i?this.fbo?.depthStencilTexture:this.fbo?.getColorTexture(t)}get depthTexture(){return this.getTexture(i)}getAttachment(t=s){return t===i?this._depth:this._colors.get(t)}hasAttachment(e){return t(this._colors,t=>t.name===e)}attachDepth(t){return t?.retain(),this.detachDepth(),t&&this.fbo?.attachDepthStencil(t.attachment),this._depth=t,this}detachDepth(){this.fbo?.detachDepthStencilTexture(),this.fbo?.detachDepthStencilBuffer(),this._depth=e(this._depth)}obtainDepthTexture(){const t=this._depth;return o(t)?(this.fbo?.detachDepthStencilTexture(),this._depth=null,t):null}attachColor(t,e){return t.retain(),this.detachColor(e),this.fbo?.attachColorTexture(t.attachment,e),this._colors.set(e,t),this}detachColor(t){this.fbo?.detachColorTexture(t);const e=this._colors.get(t);this._colors.delete(t),e?.release()}detachAllColors(){this._colors.forEach((t,e)=>this.detachColor(e))}detachAll(){this.detachAllColors(),this.detachDepth()}detachAllColorsBut0(){this._colors.forEach((t,e)=>{e!==s&&this.detachColor(e)})}detachAllButColor0(){this.detachAllColorsBut0(),this.detachDepth()}}export{a as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type ManagedFBOResource from "./ManagedFBOResource.js";
|
|
2
2
|
|
|
3
|
-
export abstract class ManagedFBOAttachment extends ManagedFBOResource {}
|
|
3
|
+
export default abstract class ManagedFBOAttachment extends ManagedFBOResource {}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import t from"./ManagedFBOResource.js";class e extends t{constructor(t,e,s){super(t,s),this.attachment=e}dispose(){this.attachment.dispose()}get usedMemory(){return this.attachment.usedMemory}get name(){return this.attachment.debugName??""}set name(t){this.attachment.debugName=t}}export{e as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../core/has.js";class e{constructor(e,t){this.key=e,this._free=t,this.incarnation=0,this._refCount=1}retain(e=1){this._refCount+=e}release(){return 0===this._refCount?(console.log(`Releasing already released FBO attachment "${this.name}" in ${(new Error).stack}`),!0):(--this._refCount,0===this._refCount&&(this._free(),!0))}get test(){}}export{e as
|
|
5
|
+
import"../../../core/has.js";class e{constructor(e,t){this.key=e,this._free=t,this.incarnation=0,this._refCount=1}retain(e=1){this._refCount+=e}release(){return 0===this._refCount?(console.log(`Releasing already released FBO attachment "${this.name}" in ${(new Error).stack}`),!0):(--this._refCount,0===this._refCount&&(this._free(),!0))}get test(){}}export{e as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{invert as t,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{a as n,t as i,q as o}from"../../../../../chunks/vec32.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as r}from"../../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as h}from"../../../../../geometry/support/FloatArray.js";import{compactIndices as m,getContinuousIndexArray as p}from"../../../../../geometry/support/Indices.js";import{ComponentObjectElevationAgnosticComponentBVH as c}from"./ComponentObjectElevationAgnosticBVH.js";import{ComponentObjectFixedBVH as l}from"./ComponentObjectFixedBVH.js";class _{constructor(t,s,e,n){this.viewingMode=t,this.
|
|
5
|
+
import{invert as t,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{a as n,t as i,q as o}from"../../../../../chunks/vec32.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as r}from"../../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as h}from"../../../../../geometry/support/FloatArray.js";import{compactIndices as m,getContinuousIndexArray as p}from"../../../../../geometry/support/Indices.js";import{ComponentObjectElevationAgnosticComponentBVH as c}from"./ComponentObjectElevationAgnosticBVH.js";import{ComponentObjectFixedBVH as l}from"./ComponentObjectFixedBVH.js";class _{constructor(t,s,e,n){this.viewingMode=t,this._components=e,this._needsElevationAlignment=n,this.verticalOffset=null,this.componentVerticalOffsets=null,this._planetCenter=a(),this._componentBvh=null,this._aabb=r();const{indices:i,positions:o}=s;this._indices=i?m(i):p(o.length/3),this._positions=Float32Array.from(o)}destroy(){this._positions=null,this._indices=null,this._perComponentAabbs=null,this._componentBvh=null}getComponentAabb(t,s){const e=this._ensureComponentAabbs(),n=6*t;return s[0]=e[n],s[1]=e[n+1],s[2]=e[n+2],s[3]=e[n+3],s[4]=e[n+4],s[5]=e[n+5],s}getComponentAabbs(){return this._ensureComponentAabbs()}_ensureComponentAabbs(){return this._perComponentAabbs||(this._perComponentAabbs=this._computePerComponentAabbs()),this._perComponentAabbs}getComponentPositions(t,s){s.indices=this._indices,s.data=this._positions,s.stride=3,s.startIndex=this._components.offsets[t],s.endIndex=this._components.offsets[t+1]}intersect(e,a,r,h,m,p,c){this.verticalOffset=r,this.componentVerticalOffsets=h;const{position:l}=m,_=n(b,e,l),C=n(u,a,l),M=t(f,m.rotationScale);i(_,_,M),i(C,C,M);const A=s(g,M);if(1===this.viewingMode){const t=this._planetCenter;o(t,l),i(t,t,M)}const v=(t,s,e,n)=>{c(e,t,n?i(d,n,A):null,s)};this._intersectComponents(_,C,h,r,v,p)}_computePerComponentAabbs(){const t=this._aabb,s=.5*(t[0]+t[3]),e=.5*(t[1]+t[4]),n=.5*(t[2]+t[5]),i=this._components.count,o=h(6*i),a=this._indices,r=this._positions,m=this._components.offsets;let p=0,c=1/0,l=1/0,_=1/0,b=-1/0,u=-1/0,f=-1/0;for(let h=0;h<i;h++){const t=m[h],i=m[h+1];let d=1/0,g=1/0,C=1/0,M=-1/0,A=-1/0,v=-1/0;if(t<i)for(let s=t;s<i;s++){const t=3*a[s],e=r[t],n=r[t+1],i=r[t+2];d=Math.min(d,e),g=Math.min(g,n),C=Math.min(C,i),M=Math.max(M,e),A=Math.max(A,n),v=Math.max(v,i)}else d=s,g=e,C=n,M=s,A=e,v=n;o[p++]=d,o[p++]=g,o[p++]=C,o[p++]=M,o[p++]=A,o[p++]=v,c=Math.min(c,d),l=Math.min(l,g),_=Math.min(_,C),b=Math.max(b,M),u=Math.max(u,A),f=Math.max(f,v)}return this._aabb[0]=c,this._aabb[1]=l,this._aabb[2]=_,this._aabb[3]=b,this._aabb[4]=u,this._aabb[5]=f,o}_intersectComponents(t,s,e,n,i,o){let a=this._componentBvh;null==a&&(a=this._needsElevationAlignment?new c(this._positions,C,this._indices,this._components,this._ensureComponentAabbs(),this.geometryMinZ,this.planetCenterZ,this.localMode):new l(this._positions,C,this._indices,this.numTriangles,this._components.offsets),this._componentBvh=a),a.intersectRay(t,s,o,i,e??void 0,n??void 0)}get geometryMinZ(){return this._aabb[2]}get planetCenterZ(){return this._planetCenter[2]}get numTriangles(){return this._indices.length/3}get localMode(){return 2===this.viewingMode}get positions(){return this._positions}get indices(){return this._indices}get aabb(){return this._ensureComponentAabbs(),this._aabb}}const b=a(),u=a(),f=e(),d=a(),g=e(),C=3;export{_ as IntersectionGeometry};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";import e from"../../../../core/Logger.js";import
|
|
5
|
+
import"../../../../core/has.js";import e from"../../../../core/Logger.js";import t from"../../webgl/ManagedColorAttachment.js";import{ManagedDepthTexture as a}from"../../webgl/ManagedDepthTexture.js";import r from"../../webgl/ManagedFBO.js";import{isDepthFormat as c,formatString as h,DepthTextureFormats as s,ColorFormats as i}from"./FBOCacheFormats.js";import{FBOPool as o}from"./FBOPool.js";import{DepthStencilAttachment as n,ColorAttachment0 as l}from"../../../webgl/enums.js";import{FramebufferObject as u}from"../../../webgl/FramebufferObject.js";import m from"../../../webgl/Texture.js";class d{constructor(e){this.rctx=e,this._interactive=!1,this._usage=new Map,this._acquired=new Set,this._cache=new o(e.newCache,"FBOCache"),this._depthCache=new o(e.newCache,"DepthAttachmentCache"),this._colorCache=new o(e.newCache,"ColorAttachmentCache")}destroy(){this._cache.destroy(),this._depthCache.destroy(),this._colorCache.destroy()}clean(){this._cache.clean(),this._colorCache.clean(),this._depthCache.clean()}frameStart(){this._cache.frame(),this._colorCache.frame(),this._depthCache.frame(),this.debugCallback?.(),this._usage.clear()}frameEnd(){const{debugCallback:e}=this;e&&this._acquired.forEach(t=>e(t.name,t.fbo,this._usage))}get usedMemory(){return Array.from(this._acquired.values()).reduce((e,t)=>e+t.usedMemory,this._cache.usedMemory+this._colorCache.usedMemory+this._depthCache.usedMemory)}set interactive(e){this._cache.interactive=this._colorCache.interactive=this._depthCache.interactive=e,this._interactive=e}get interactive(){return this._interactive}acquire(t,a,s,i=5){const o=f(i,t,a);let m=this._cache.pop(o);const{rctx:d}=this;if(m){m.retain(),m.setName(s);const t=m.getAttachment(n);t&&(t.name=g);const a=m.getAttachment(l);a&&(a.name=_(0));const r=m.fbo;r?d.temporaryBindFramebufferObject(r,()=>{d.setDrawBuffers([l]),d.unbindTexture(r.colorTexture)}):e.getLogger("esri.views.3d.webgl-engine.core.FBOCache").errorOnce("Encountered an invalid cached framebuffer")}else{const e=new u(d),h=(e,r,c)=>{r??=5;const h=this._acquireColor(r,t,a,c??_(e-l));return this.rctx.unbindTexture(h.attachment),m.attachColor(h,e),h.release(),m},p=e=>{e??=14;const r=this.acquireDepth(e,t,a,g);return m.attachDepth(r),r.release(),m},f=()=>{if(!m)return;this.debugCallback?.(m.name,m.fbo),this._acquired.delete(m);const e=c(i);e&&null!=m.getAttachment(n)||!e&&null!=m.getAttachment(l)?(e?(m.fbo?.invalidateAttachments([n]),m.detachAllColors()):(m.fbo?.invalidateAttachments([l]),m.detachAllButColor0()),this._cache.put(m)):m.dispose()};m=new r(o,s,e,h,p,f),c(i)?m.acquireDepth(i):m.acquireColor(l,i)}return this._trackUsage(m,"fbo "+h(i),t,a),this._trackHandle(m)}acquireDepth(e,t,r,c){const i=f(e,t,r);let o=this._depthCache.pop(i);if(o)o.retain(),o.attachment.setShadowFiltering(!1);else{const c=new m(this.rctx,{...s[e],width:t,height:r});o=new a(i,c,()=>this._depthCache.put(o))}return o.name=c,this._trackUsage(o,"depth "+h(e),t,r),o}_acquireColor(e,a,r,c){const s=f(e,a,r);let o=this._colorCache.pop(s);if(o)o.retain();else{const c=new m(this.rctx,{...i[e],width:a,height:r,isImmutable:!0});o=new t(s,c,()=>this._colorCache.put(o))}return o.name=c,this._trackUsage(o,"color "+h(e),a,r),o}_trackHandle(e){return this._acquired.add(e),e}_trackUsage(e,t,a,r){this.debugCallback&&(this._usage.has(e)?this._usage.get(e)[2].push(e.name):this._usage.set(e,[t,`${a}x${r}`,[e.name]]))}get test(){return null}}function _(e=0){return`color${e}`}const g="depth",p=new r("default","default",null,()=>p,()=>p,()=>{});function f(e,t,a){return`${t}x${a}:${e}`}p.release=()=>!1;export{d as FBOCache,p as defaultWebGLFBO};
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{MixExternalColor as e}from"../util/MixExternalColor.glsl.js";import{NoPerspectiveRead as t}from"../util/NoPerspective.glsl.js";import{addCameraPosition as o,addPixelRatio as i}from"../util/View.glsl.js";import{Float4PassUniform as r}from"../../shaderModules/Float4PassUniform.js";import{FloatBindUniform as l}from"../../shaderModules/FloatBindUniform.js";import{FloatPassUniform as a}from"../../shaderModules/FloatPassUniform.js";import{glsl as p,If as s}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as n}from"../../shaderModules/Texture2DPassUniform.js";import{isImagePattern as d}from"../../../materials/lineStippleUtils.js";import{computeTextureSize as c}from"../../../materials/stippleTextureRepository.js";import{ensureColor4 as f}from"../../../shaders/ensureColor4.js";function m(d,c){if(!c.stippleEnabled)return void d.fragment.code.add(p`float getStippleAlpha(float lineWidth) { return 1.0; }
|
|
6
6
|
void discardByStippleAlpha(float stippleAlpha, float threshold) {}
|
|
7
|
-
vec4 blendStipple(vec4 color, float stippleAlpha) { return color; }`);const
|
|
7
|
+
vec4 blendStipple(vec4 color, float stippleAlpha) { return color; }`);const m=!(c.draped&&c.stipplePreferContinuous),{vertex:u,fragment:v}=d;c.draped||(o(u,c),u.uniforms.add(new l("worldToScreenPerDistanceRatio",({camera:e})=>1/e.perScreenPixelRatio)).code.add(p`float computeWorldToScreenRatio(vec3 segmentCenter) {
|
|
8
8
|
float segmentDistanceToCamera = length(segmentCenter - cameraPosition);
|
|
9
9
|
return worldToScreenPerDistanceRatio / segmentDistanceToCamera;
|
|
10
|
-
}`)),
|
|
10
|
+
}`)),d.varyings.add("vStippleDistance","float"),d.varyings.add("vStippleDistanceLimits","vec2"),d.varyings.add("vStipplePatternStretch","float"),u.code.add(p`
|
|
11
11
|
float discretizeWorldToScreenRatio(float worldToScreenRatio) {
|
|
12
|
-
float step = ${
|
|
12
|
+
float step = ${p.float(g)};
|
|
13
13
|
|
|
14
14
|
float discreteWorldToScreenRatio = log(worldToScreenRatio);
|
|
15
15
|
discreteWorldToScreenRatio = ceil(discreteWorldToScreenRatio / step) * step;
|
|
16
16
|
discreteWorldToScreenRatio = exp(discreteWorldToScreenRatio);
|
|
17
17
|
return discreteWorldToScreenRatio;
|
|
18
18
|
}
|
|
19
|
-
`),
|
|
19
|
+
`),i(u),u.code.add(p`
|
|
20
20
|
vec2 computeStippleDistanceLimits(float startPseudoScreen, float segmentLengthPseudoScreen, float segmentLengthScreen, float patternLength) {
|
|
21
21
|
|
|
22
22
|
// First check if the segment is long enough to support fully screen space patterns.
|
|
23
23
|
// Force sparse mode for segments that are very large in screen space even if it is not allowed,
|
|
24
24
|
// to avoid imprecision from calculating with large floats.
|
|
25
|
-
if (segmentLengthPseudoScreen >= ${
|
|
25
|
+
if (segmentLengthPseudoScreen >= ${m?"patternLength":"1e4"}) {
|
|
26
26
|
// Round the screen length to get an integer number of pattern repetitions (minimum 1).
|
|
27
27
|
float repetitions = segmentLengthScreen / (patternLength * pixelRatio);
|
|
28
28
|
float flooredRepetitions = max(1.0, floor(repetitions + 0.5));
|
|
@@ -38,31 +38,63 @@ return worldToScreenPerDistanceRatio / segmentDistanceToCamera;
|
|
|
38
38
|
}
|
|
39
39
|
return vec2(startPseudoScreen, startPseudoScreen + segmentLengthPseudoScreen);
|
|
40
40
|
}
|
|
41
|
-
`),
|
|
42
|
-
float stippleDistanceClamped = noPerspectiveRead(clamp(vStippleDistance, vStippleDistanceLimits.x, vStippleDistanceLimits.y));
|
|
43
|
-
float lineSizeInv = noPerspectiveRead(vLineSizeInv);
|
|
41
|
+
`),v.uniforms.add(new n("stipplePatternTexture",e=>e.stippleTexture),new a("stipplePatternPixelSizeInv",e=>1/S(e))),c.stippleOffColorEnabled&&v.uniforms.add(new r("stippleOffColor",e=>f(e.stippleOffColor))),d.include(t),c.worldSizedImagePattern?(d.varyings.add("vStippleV","float"),d.fragment.include(e),v.code.add(p`vec4 getStippleColor(out bool isClamped) {
|
|
44
42
|
vec2 aaCorrectedLimits = vStippleDistanceLimits + vec2(1.0, -1.0) / gl_FragCoord.w;
|
|
45
43
|
isClamped = vStippleDistance < aaCorrectedLimits.x || vStippleDistance > aaCorrectedLimits.y;
|
|
46
|
-
float u =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return (sdf - 0.5) * vStipplePatternStretch + 0.5;
|
|
44
|
+
float u = vStippleDistance * stipplePatternPixelSizeInv;
|
|
45
|
+
float v = vStippleV == -1.0 ? 0.5 : vStippleV;
|
|
46
|
+
return texture(stipplePatternTexture, vec2(u, v));
|
|
50
47
|
}
|
|
51
|
-
|
|
48
|
+
vec4 getStippleColor() {
|
|
52
49
|
bool ignored;
|
|
53
|
-
return
|
|
50
|
+
return getStippleColor(ignored);
|
|
51
|
+
}
|
|
52
|
+
float getStippleSDF() {
|
|
53
|
+
vec4 color = getStippleColor();
|
|
54
|
+
return color.a == 0.0 ? -0.5 : 0.5;
|
|
54
55
|
}
|
|
55
56
|
float getStippleAlpha(float lineWidth) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
return getStippleColor().a;
|
|
58
|
+
}
|
|
59
|
+
vec4 blendStipple(vec4 color, float stippleAlpha) {
|
|
60
|
+
vec4 stippleColor = getStippleColor();
|
|
61
|
+
int mixMode = 1;
|
|
62
|
+
vec3 col = mixExternalColor(color.rgb, vec3(1.0), stippleColor.rgb, mixMode);
|
|
63
|
+
float opacity = mixExternalOpacity(color.a, 1.0, stippleColor.a, mixMode);
|
|
64
|
+
return vec4(col, opacity);
|
|
65
|
+
}`)):v.code.add(p`
|
|
66
|
+
float getStippleSDF(out bool isClamped) {
|
|
67
|
+
float stippleDistanceClamped = noPerspectiveRead(clamp(vStippleDistance, vStippleDistanceLimits.x, vStippleDistanceLimits.y));
|
|
68
|
+
float lineSizeInv = noPerspectiveRead(vLineSizeInv);
|
|
69
|
+
|
|
70
|
+
vec2 aaCorrectedLimits = vStippleDistanceLimits + vec2(1.0, -1.0) / gl_FragCoord.w;
|
|
71
|
+
isClamped = vStippleDistance < aaCorrectedLimits.x || vStippleDistance > aaCorrectedLimits.y;
|
|
72
|
+
|
|
73
|
+
float u = stippleDistanceClamped * stipplePatternPixelSizeInv * lineSizeInv;
|
|
74
|
+
u = fract(u);
|
|
75
|
+
|
|
76
|
+
float sdf = texture(stipplePatternTexture, vec2(u, 0.5)).r;
|
|
77
|
+
|
|
78
|
+
return (sdf - 0.5) * vStipplePatternStretch + 0.5;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
float getStippleSDF() {
|
|
82
|
+
bool ignored;
|
|
83
|
+
return getStippleSDF(ignored);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
float getStippleAlpha(float lineWidth) {
|
|
87
|
+
bool isClamped;
|
|
88
|
+
float stippleSDF = getStippleSDF(isClamped);
|
|
89
|
+
float antiAliasedResult = clamp(stippleSDF * lineWidth + 0.5, 0.0, 1.0);
|
|
90
|
+
return isClamped ? floor(antiAliasedResult + 0.5) : antiAliasedResult;
|
|
63
91
|
}
|
|
64
92
|
|
|
65
93
|
vec4 blendStipple(vec4 color, float stippleAlpha) {
|
|
66
94
|
return ${c.stippleOffColorEnabled?"mix(color, stippleOffColor, stippleAlpha)":"vec4(color.rgb, color.a * stippleAlpha)"};
|
|
67
95
|
}
|
|
68
|
-
`)
|
|
96
|
+
`),v.code.add(p`
|
|
97
|
+
void discardByStippleAlpha(float stippleAlpha, float threshold) {
|
|
98
|
+
${s(!c.stippleOffColorEnabled,"if (stippleAlpha < threshold) { discard; }")}
|
|
99
|
+
}
|
|
100
|
+
`)}function S(e){const t=e.stipplePattern;return d(t)?t.length:t?c(t)/t.pixelRatio:1}const g=.4;export{m as LineStipple,S as computePixelSize};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{releaseMaybe as t,disposeMaybe as i}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as h}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as l}from"../../../webgl.js";import a from"../../../webgl/RenderNode.js";import{HighlightApplyTechnique as g}from"./HighlightApplyTechnique.js";import{HighlightBlurTechnique as c}from"./HighlightBlurTechnique.js";import{HighlightDownsampleTechnique as u}from"./HighlightDownsampleTechnique.js";import{HighlightPassParameters as p}from"./HighlightPassParameters.js";import{HighlightToSingleTechnique as m}from"./HighlightToSingleTechnique.js";import{NoVertex as d}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as f}from"../../lib/VertexArrayObject.js";import{H as b}from"../../../../../chunks/HighlightBlur.glsl.js";import{H as w,g as x}from"../../../../../chunks/HighlightDownsample.glsl.js";import{BufferObject as T}from"../../../../webgl/BufferObject.js";import{PrimitiveType as _,DataType as v}from"../../../../webgl/enums.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{releaseMaybe as t,disposeMaybe as i}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as h}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as l}from"../../../webgl.js";import a from"../../../webgl/RenderNode.js";import{HighlightApplyTechnique as g}from"./HighlightApplyTechnique.js";import{HighlightBlurTechnique as c}from"./HighlightBlurTechnique.js";import{HighlightDownsampleTechnique as u}from"./HighlightDownsampleTechnique.js";import{HighlightPassParameters as p}from"./HighlightPassParameters.js";import{HighlightToSingleTechnique as m}from"./HighlightToSingleTechnique.js";import{NoVertex as d}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as f}from"../../lib/VertexArrayObject.js";import{H as b}from"../../../../../chunks/HighlightBlur.glsl.js";import{H as w,g as x}from"../../../../../chunks/HighlightDownsample.glsl.js";import{BufferObject as T}from"../../../../webgl/BufferObject.js";import{PrimitiveType as _,DataType as v}from"../../../../webgl/enums.js";import C from"../../../../webgl/Texture.js";import{TextureDescriptor as H}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as j}from"../../../../webgl/VertexBuffer.js";let q=class extends a{constructor(){super(...arguments),this.produces=l.HIGHLIGHTS,this.consumes={required:[l.HIGHLIGHTS,"highlights"]},this._downsampleDrawParameters=new w,this._passParameters=new p,this._highlightBlurDrawParameters=new b,this._grid=new P}initialize(){this.addHandles([r(()=>this._updateOptionsTexture(),()=>{},s)])}destroy(){this._grid.coverage=t(this._grid.coverage),this._grid.vao=i(this._grid.vao),this._passParameters.highlightOptionsTexture=t(this._passParameters.highlightOptionsTexture)}_updateOptionsTexture(){if(null==this._passParameters.highlightOptionsTexture){const e=new H(16,2);e.internalFormat=6408,e.samplingMode=9728,this._passParameters.highlightOptionsTexture=new C(this.renderingContext,e,null)}this._passParameters.highlightOptionsTexture.setData(O(this.view.state.highlights)),this.requestRender(1)}precompile(){this.techniques.precompile(u),this.techniques.precompile(m),this.techniques.precompile(c),this.techniques.precompile(g)}render(e){const t=e.find(({name:e})=>e===l.HIGHLIGHTS),{techniques:i,bindParameters:r}=this;if(!r.decorations)return t;if(!i.get(u).compiled)return this.requestRender(1),t;const s=e.find(({name:e})=>"highlights"===e).getTexture();return this._renderHighlightPostprocess(s,t),t}_prepareAndDownSample(e){this._gridUpdateResources(e);const t=this.techniques.get(u),i=this._gridComputeCoverage(t,e),{horizontalCellCount:r,verticalCellCount:s}=i,o=this._passParameters;return o.horizontalCellCount=r,o.verticalCellCount=s,o.coverageTexture=i.coverage?.getTexture(),i}_renderGrid(e){const t=e.verticalCellCount*e.horizontalCellCount;this.renderingContext.bindVAO(e.vao),this.renderingContext.drawElementsInstanced(_.TRIANGLES,6,v.UNSIGNED_BYTE,0,t)}_renderHighlightPostprocess(e,t){const{fboCache:i,techniques:r,bindParameters:s,_passParameters:o,renderingContext:h}=this,l=r.get(m),a=r.get(c),u=r.get(g);if(!u.compiled||!a.compiled||!l.compiled)return void this.requestRender(1);o.highlightTexture=e;const p=this._prepareAndDownSample(e),{width:d,height:f}=e.descriptor;o.highlightTexture=e;const{camera:b}=s,{fullWidth:w,fullHeight:x,pixelRatio:T,fullViewport:_}=b,v=Math.ceil(w/T),C=Math.ceil(x/T),{_highlightBlurDrawParameters:H}=this,j=this.view.stage.renderView.renderer,{highlights:q}=s;for(let g=0;g<q.length;++g){const{name:e}=q[g];if(!j.hasHighlight(e))continue;o.highlightLevel=g,h.setClearColor(0,0,0,0);const r=i.acquire(d,f,"single highlight",2);h.bindFramebuffer(r.fbo),h.setViewport(0,0,d,f),h.clear(16384),h.bindTechnique(l,s,o),this._renderGrid(p),H.blurInput=r.getTexture(),n(H.blurSize,1/v,0);const c=i.acquire(v,C,"single highlight blur",2);h.unbindTexture(c.fbo?.colorTexture),h.bindFramebuffer(c.fbo),h.setViewport(0,0,v,C),h.clear(16384),h.bindTechnique(a,s,o,H),this._renderGrid(p),r.release(),n(H.blurSize,0,1/C),o.highlightBlurTexture=c.getTexture(),h.bindFramebuffer(t.fbo),h.setViewport4fv(_),h.bindTechnique(u,s,o,H),this._renderGrid(p),c.release()}o.coverageTexture=o.highlightTexture=null}_gridUpdateResources(e){const t=this._grid,{width:i,height:r}=e.descriptor;if(t.horizontalCellCount=Math.ceil(i/x),t.verticalCellCount=Math.ceil(r/x),t.vao)return;const s=this.renderingContext,o=T.createIndex(s,35044,I);t.vao=new f(s,new j(s,d),o)}_gridComputeCoverage(e,t){const i=this.renderingContext,r=this._grid,s=t.descriptor,o=Math.ceil(s.width/x),h=Math.ceil(s.height/x);this._downsampleDrawParameters.input=t;const{highlights:n}=this.bindParameters;r.coverage?.release();const l=this.fboCache.acquire(o,h,"highlight coverage",n.length>G?3:1);return r.coverage=l,i.bindFramebuffer(l.fbo),i.bindTechnique(e,this.bindParameters,this._passParameters,this._downsampleDrawParameters),i.setViewport(0,0,o,h),i.screen.draw(),r}get test(){}};e([o()],q.prototype,"produces",void 0),e([o()],q.prototype,"consumes",void 0),q=e([h("esri.views.3d.webgl-engine.effects.highlight.Highlight")],q);class P{constructor(){this.coverage=null,this.vao=null,this.verticalCellCount=0,this.horizontalCellCount=0,this.viewportWidth=0,this.viewportHeight=0}}function O(e){const t=new Uint8Array(128);let i=0;for(const r of e){const e=4*i,s=4*i+64;++i;const{color:o}=r,h=r.haloColor??o;t[e+0]=o.r,t[e+1]=o.g,t[e+2]=o.b,t[e+3]=r.fillOpacity*o.a*255,t[s+0]=h.r,t[s+1]=h.g,t[s+2]=h.b,t[s+3]=r.haloOpacity*h.a*255}return t}let D=0;function y(e){let t=0;for(const r of e){const{name:e}=r;t+=e.length;const{color:i,fillOpacity:s,haloColor:o,haloOpacity:h}=r;t+=i.r+i.g+i.b+i.a+s,t+=o?o.r+o.g+o.b+o.a+h:0}const i=e.at(0);if(i){const{shadowOpacity:e,shadowDifference:r,shadowColor:s}=i;t+=e+r+s.r+s.g+s.b+s.a}return D+++(t>=0?0:1)}const I=new Uint8Array([0,1,2,2,1,3]);function S(e,t,i,r,s,o=0){const{highlights:h}=r,l=h.length>1?t.acquire(i.width,i.height,"highlight mix",h.length>G?3:1):null,{gl:a}=e;if(l){const t=e.getBoundFramebufferObject();e.bindFramebuffer(l.fbo),a.clearBufferuiv(a.COLOR,0,[0,0,0,0]),e.bindFramebuffer(t)}const g=l?.getTexture();r.highlightMixTexture=g,n(r.highlightMixOrigin,o,0),h.forEach((t,h)=>{if(h>0){const t=C.TEXTURE_UNIT_FOR_UPDATES;e.bindTexture(g,t),e.setActiveTexture(t),a.copyTexSubImage2D(3553,0,0,0,o,0,i.width,i.height),e.bindTexture(null,t)}e.clear(256),r.highlightLevel=h,s()}),r.highlightLevel=null,r.highlightMixTexture=null,l?.release()}const G=4;export{q as Highlight,G as maxHighlightsPerChannel,S as renderHighlightBuffer,y as trackHighlightOptions};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{createTask as s}from"../../../../../core/asyncUtils.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as t,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{createScreenPointArray as o,createRenderScreenPointArray as m,screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{isSVG as h}from"../../../../../core/urlUtils.js";import{property as l,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as p}from"../../../../../request/image.js";import{InternalRenderCategory as c}from"../../../webgl.js";import _ from"../../../webgl/RenderNode.js";import{MagnifierTechnique as g}from"./MagnifierTechnique.js";import{createQuadVAO as d}from"../../lib/glUtil3D.js";import{M as f}from"../../../../../chunks/Magnifier.glsl.js";import{loadMagnifierResources as v}from"../../../../magnifier/resources.js";import{PrimitiveType as T}from"../../../../webgl/enums.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import{createTask as s}from"../../../../../core/asyncUtils.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as t,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{createScreenPointArray as o,createRenderScreenPointArray as m,screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{isSVG as h}from"../../../../../core/urlUtils.js";import{property as l,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as p}from"../../../../../request/image.js";import{InternalRenderCategory as c}from"../../../webgl.js";import _ from"../../../webgl/RenderNode.js";import{MagnifierTechnique as g}from"./MagnifierTechnique.js";import{createQuadVAO as d}from"../../lib/glUtil3D.js";import{M as f}from"../../../../../chunks/Magnifier.glsl.js";import{loadMagnifierResources as v}from"../../../../magnifier/resources.js";import{PrimitiveType as T}from"../../../../webgl/enums.js";import k from"../../../../webgl/Texture.js";import{TextureDescriptor as P}from"../../../../webgl/TextureDescriptor.js";let y=class extends _{constructor(){super(...arguments),this.produces=c.MAGNIFIER,this.consumes={required:[c.MAGNIFIER]},this._imageSources=null,this._imageLoadTask=null,this._passParameters=new f,this._magnifier=null,this._tmpScreenPoint=o(),this._tmpRenderPoint=m()}initialize(){this.addHandles([t(()=>this.view.magnifier,e=>this._update(e),a)])}_update(e){if(e===this._magnifier)return;this.removeAllHandles(),this._magnifier=e;const s=()=>{const e=this._validMagnifier;e?(this._loadResources(e),this.produces=c.MAGNIFIER):this.produces="disabled",this.requestRender()};this._magnifier&&this.addHandles(t(()=>this._magnifier?.version,s)),s()}get _validMagnifier(){return this._magnifier?.visible&&this._magnifier?.position&&this._magnifier?.size>0?this._magnifier:null}get _factor(){return this._magnifier?.factor||1}destroy(){this._magnifier=null,null!=this._imageLoadTask&&(this._imageLoadTask.task.abort(),this._imageLoadTask=null),this._disposeTextures(),this._vao=r(this._vao)}_disposeTextures(){this._passParameters.mask=r(this._passParameters.mask),this._passParameters.overlay=r(this._passParameters.overlay),this._passParameters.input=r(this._passParameters.input)}precompile(){this._imageSources&&this.techniques.precompile(g)}render(e){const s=this._validMagnifier,r=e.find(({name:e})=>e===c.MAGNIFIER);if(null==s)return r;if(null==this._imageSources)return this.requestRender(1),r;const t=this.renderingContext,a=this.camera.pixelRatio,o=Math.ceil(a*s.size);this._vao??=d(t,0,0,1);const m=this.techniques.get(g);if(this._ensureTextureResources(t,o),!m.compiled||!this._passParameters.input)return this.requestRender(1),r;const h=Math.ceil(1/this._factor*o),l=this._passParameters.input;l.resize(h,h),n(s.position,this._tmpScreenPoint);const u=this.camera.screenToRender(this._tmpScreenPoint,this._tmpRenderPoint),p=this.camera.fullWidth,_=this.camera.fullHeight,f=.5*h,v=.5*h;u[0]=i(u[0],f,p-f-1),u[1]=i(u[1],v,_-v-1);const k=Math.floor(u[0]-f),P=Math.floor(u[1]-v);t.bindFramebuffer(r.fbo);return m.program.bindTexture("textureInput",l),t.gl.copyTexImage2D(l.descriptor.target,0,l.descriptor.pixelFormat,k,P,h,h,0),this._passParameters.magnifier=s,t.bindTechnique(m,this.bindParameters,this._passParameters),t.bindVAO(this._vao),t.drawArrays(T.TRIANGLE_STRIP,0,4),r}_loadResources(e){const{maskUrl:i,overlayUrl:r}=e;this._imageLoadTask?.maskUrl===i&&this._imageLoadTask?.overlayUrl===r||(this._imageLoadTask?.task.abort(),this._imageLoadTask=this._imageSources=null),this._imageSources||this._imageLoadTask||(this._imageLoadTask={maskUrl:i,overlayUrl:r,task:s(async e=>{const s=null==i||null==r?v(e):null,t=null!=i?p(i,{signal:e}):s.then(e=>e.mask),a=null!=r?p(r,{signal:e}):s.then(e=>e.overlay);this._imageSources={mask:await t,overlay:await a}})})}_ensureTextureResources(e,s){null==this._imageSources||this._passParameters.size===s&&this._passParameters.input&&this._passParameters.mask&&this._passParameters.overlay||(this._disposeTextures(),this._imageSources.overlay.width=this._imageSources.mask.width=s,this._imageSources.overlay.height=this._imageSources.mask.height=s,this._passParameters.overlay=new k(e,this._createTextureDescriptor(s,6408,this._imageSources.overlay),this._imageSources.overlay),this._passParameters.mask=new k(e,this._createTextureDescriptor(s,6406,this._imageSources.mask),this._imageSources.mask),this._passParameters.input=new k(e,this._createTextureDescriptor(s,6408,null)))}_createTextureDescriptor(e,s,i){const r=this.renderingContext,t=new P(e);return t.pixelFormat=t.internalFormat=s,t.wrapMode=33071,t.flipped=!!i,t.preMultiplyAlpha=!(6408!==s||!i||h(i.src)&&r.driverTest.svgPremultipliesAlpha.result),t}};e([l()],y.prototype,"produces",void 0),e([l()],y.prototype,"consumes",void 0),e([l()],y.prototype,"_imageSources",void 0),e([l()],y.prototype,"_imageLoadTask",void 0),y=e([u("esri.views.3d.webgl-engine.effects.magnifier.Magnifier")],y);export{y as Magnifier};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import r from"../../../../../core/Logger.js";import{abortMaybe as t,disposeMaybe as s}from"../../../../../core/maybe.js";import{throwIfAborted as i,isAbortError as a}from"../../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as h,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as u}from"../../../../../request/image.js";import{RenderCategory as c,InternalRenderCategory as m}from"../../../webgl.js";import d from"../../../webgl/RenderNode.js";import{SMAABlendWeightsTechnique as p}from"./SMAABlendWeightsTechnique.js";import{SMAABlurTechnique as b}from"./SMAABlurTechnique.js";import{SMAAEdgeDetectTechnique as f}from"./SMAAEdgeDetectTechnique.js";import{SMAAPassParameters as T}from"./SMAAPassParameters.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../../../../core/Logger.js";import{abortMaybe as t,disposeMaybe as s}from"../../../../../core/maybe.js";import{throwIfAborted as i,isAbortError as a}from"../../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as h,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as u}from"../../../../../request/image.js";import{RenderCategory as c,InternalRenderCategory as m}from"../../../webgl.js";import d from"../../../webgl/RenderNode.js";import{SMAABlendWeightsTechnique as p}from"./SMAABlendWeightsTechnique.js";import{SMAABlurTechnique as b}from"./SMAABlurTechnique.js";import{SMAAEdgeDetectTechnique as f}from"./SMAAEdgeDetectTechnique.js";import{SMAAPassParameters as T}from"./SMAAPassParameters.js";import x from"../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../webgl/TextureDescriptor.js";let g=class extends d{constructor(e){super(e),this.produces="disabled",this.consumes={required:[m.ANTIALIASING],optional:[c.COMPOSITE]},this._areaTexture=null,this._searchTexture=null,this._smaaParameters=new T}initialize(){this.addHandles([o(()=>this.isEnabled(),e=>e?this.enable():this.disable(),n)])}async enable(){if(this.destroyed)return;if(this.produces=m.ANTIALIASING,this.requestRender(1),this._abortController||this._areaTexture&&this._searchTexture)return;this._abortController=new AbortController;const e=this._abortController.signal;try{const r=await import("./SMAAData.js");i(e),await this._loadTextures(r,e),i(e),this.requestRender(1)}catch(t){a(t)||r.getLogger(this).errorOnce(t)}this._abortController=null}async _loadTextures(e,r){i(r);const[t,s]=await Promise.allSettled([u(e.areaTexture,{signal:r}),u(e.searchTexure,{signal:r})]);if(i(r),"fulfilled"!==t.status||"fulfilled"!==s.status)return;const a=this.renderingContext;this._areaTexture=w(a,9729,6407,t.value),this._searchTexture=w(a,9728,6409,s.value)}disable(){this.produces="disabled",this.requestRender(1)}destroy(){this._abortController=t(this._abortController),this._searchTexture=s(this._searchTexture),this._areaTexture=s(this._areaTexture)}precompile(){this.techniques.precompile(f),this.techniques.precompile(p),this.techniques.precompile(b)}render(e){const r=e.find(({name:e})=>e===m.ANTIALIASING),t=e.find(({name:e})=>e===c.COMPOSITE);if(!t)return r;if(!this._areaTexture||!this._searchTexture)return this.view.stage.renderer.blitFBO(t,r,!1),this.requestRender(1),r;const s=this.techniques.get(f),i=this.techniques.get(p),a=this.techniques.get(b);if(!s.compiled||!i.compiled||!a.compiled)return this.view.stage.renderer.blitFBO(t,r,!1),this.requestRender(1),r;const o=t.fbo.width,n=t.fbo.height,h=this.renderingContext;h.setViewport(0,0,o,n);const l=this.fboCache.acquire(o,n,"smaa edges",2);h.bindFramebuffer(l.fbo),h.setClearColor(0,0,0,1),h.clear(16384),this._smaaParameters.color=t.getTexture();const u=this.bindParameters;h.bindTechnique(s,u,this._smaaParameters),h.screen.draw();const d=this.fboCache.acquire(o,n,"smaa blend");return h.bindFramebuffer(d.fbo),h.setClearColor(0,0,1,1),h.clear(16384),this._smaaParameters.inputTexture=l.getTexture(),this._smaaParameters.areaTexture=this._areaTexture,this._smaaParameters.searchTexture=this._searchTexture,h.bindTechnique(i,u,this._smaaParameters),h.screen.draw(),l.release(),h.bindFramebuffer(r.fbo),h.setClearColor(0,1,0,1),h.clear(16384),this._smaaParameters.inputTexture=d.getTexture(),h.bindTechnique(a,u,this._smaaParameters),h.screen.draw(),d.release(),r}};function w(e,r,t,s){const i=new _(s.width,s.height);return i.pixelFormat=t,i.wrapMode=33071,i.samplingMode=r,new x(e,i,s)}e([h()],g.prototype,"produces",void 0),e([h()],g.prototype,"consumes",void 0),e([h({constructOnly:!0})],g.prototype,"isEnabled",void 0),e([h()],g.prototype,"_abortController",void 0),g=e([l("esri.views.3d.webgl-engine.effects.smaa.SMAA")],g);export{g as SMAA};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{clamp as r}from"../../../../../core/mathUtils.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as s}from"../../../../../core/reactiveUtils.js";import{Milliseconds as i}from"../../../../../core/time.js";import{property as a,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as m}from"../../../webgl.js";import p from"../../../webgl/RenderNode.js";import{distanceFadeEnd as c,distanceFadeStart as h}from"../../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{SSAOBlurTechnique as l}from"./SSAOBlurTechnique.js";import{noiseData as u}from"./SSAONoiseData.js";import{SSAOPassParameters as d,BlurDrawParameters as f}from"./SSAOParameters.js";import{SSAOTechnique as b}from"./SSAOTechnique.js";import{g as w}from"../../../../../chunks/SSAO.glsl.js";import{DepthStencilAttachment as S}from"../../../../webgl/enums.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import{clamp as r}from"../../../../../core/mathUtils.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as s}from"../../../../../core/reactiveUtils.js";import{Milliseconds as i}from"../../../../../core/time.js";import{property as a,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as m}from"../../../webgl.js";import p from"../../../webgl/RenderNode.js";import{distanceFadeEnd as c,distanceFadeStart as h}from"../../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{SSAOBlurTechnique as l}from"./SSAOBlurTechnique.js";import{noiseData as u}from"./SSAONoiseData.js";import{SSAOPassParameters as d,BlurDrawParameters as f}from"./SSAOParameters.js";import{SSAOTechnique as b}from"./SSAOTechnique.js";import{g as w}from"../../../../../chunks/SSAO.glsl.js";import{DepthStencilAttachment as S}from"../../../../webgl/enums.js";import _ from"../../../../webgl/Texture.js";import{TextureDescriptor as T}from"../../../../webgl/TextureDescriptor.js";const P=2;let g=class extends p{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=m.SSAO,this.isEnabled=()=>!1,this._enableTime=i(0),this._passParameters=new d,this._drawParameters=new f}initialize(){const e=Uint8Array.from(atob(u),e=>e.charCodeAt(0)),r=new T(32);r.wrapMode=33071,r.pixelFormat=6407,r.wrapMode=10497,r.hasMipmap=!0,this._passParameters.noiseTexture=new _(this.renderingContext,r,e),this.techniques.precompile(b),this.techniques.precompile(l),this.addHandles(s(()=>this.isEnabled(),()=>this._enableTime=i(0)))}destroy(){this._passParameters.noiseTexture=t(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),s=t?.getTexture(),a=t?.getTexture(S);if(!s||!a)return;const o=this.techniques.get(b),p=this.techniques.get(l);if(!o.compiled||!p.compiled)return this._enableTime=i(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=i(performance.now()));const u=this.renderingContext,d=this.view.qualitySettings.fadeDuration,f=this.bindParameters,_=f.camera,T=_.relativeElevation,g=r((c-T)/(c-h),0,1),j=d>0?Math.min(d,performance.now()-this._enableTime)/d:1,q=j*g;this._passParameters.normalTexture=s,this._passParameters.depthTexture=a,this._passParameters.projScale=1/_.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*x/w(_)**6*q;const v=_.fullViewport[2],A=_.fullViewport[3],y=this.fboCache.acquire(v,A,"ssao input",2);u.bindFramebuffer(y.fbo),u.setViewport(0,0,v,A),u.bindTechnique(o,f,this._passParameters,this._drawParameters),u.screen.draw();const C=Math.round(v/P),O=Math.round(A/P),V=this.fboCache.acquire(C,O,"ssao blur",0);u.bindFramebuffer(V.fbo),this._drawParameters.colorTexture=y.getTexture(),n(this._drawParameters.blurSize,0,P/A),u.bindTechnique(p,f,this._passParameters,this._drawParameters),u.setViewport(0,0,C,O),u.screen.draw(),y.release();const M=this.fboCache.acquire(C,O,m.SSAO,0);return u.bindFramebuffer(M.fbo),u.setViewport(0,0,v,A),u.setClearColor(1,1,1,0),u.clear(16384),this._drawParameters.colorTexture=V.getTexture(),n(this._drawParameters.blurSize,P/v,0),u.bindTechnique(p,f,this._passParameters,this._drawParameters),u.setViewport(0,0,C,O),u.screen.draw(),u.setViewport4fv(_.fullViewport),V.release(),j<1&&this.requestRender(2),M}};e([a()],g.prototype,"consumes",void 0),e([a()],g.prototype,"produces",void 0),e([a({constructOnly:!0})],g.prototype,"isEnabled",void 0),g=e([o("esri.views.3d.webgl-engine.effects.ssao.SSAO")],g);const x=.5;export{g as SSAO,P as blurSizePixels};
|