@arcgis/core 6.0.0-next.41 → 6.0.0-next.43
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/Basemap.js +1 -1
- package/Camera.js +1 -1
- package/Graphic.js +1 -1
- package/Ground.js +1 -1
- package/WebDocument2D.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +1 -0
- package/analysis/ElevationProfileAnalysis.d.ts +15 -0
- package/analysis/LineOfSightAnalysis.d.ts +6 -1
- package/analysis/ShadowCastAnalysis.d.ts +18 -22
- package/analysis/ShadowCastAnalysis.js +1 -1
- package/analysis/ViewshedAnalysis.d.ts +6 -1
- package/applications/Components/analysisUtils.d.ts +6 -0
- package/applications/Components/analysisUtils.js +1 -1
- package/arcade/ArcadeModuleResolver.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcgisGlobal.d.ts +0 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{2f54e4feb554c1a7b9c4.js → 02debe67e6fef9d88bdd.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd046399e05e759e0bc2.js → 035204000954973b0ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/05225506fdba0c827407.js +1 -0
- package/assets/esri/core/workers/chunks/075fe33152fd79fe6d72.js +1 -0
- package/assets/esri/core/workers/chunks/077b755688346e0dc8d3.js +1 -0
- package/assets/esri/core/workers/chunks/0c1d8e0c2eae21f97fc0.js +1 -0
- package/assets/esri/core/workers/chunks/105865a4d8cb4ddf8a8a.js +1 -0
- package/assets/esri/core/workers/chunks/11877d4dc97f756e4711.js +1 -0
- package/assets/esri/core/workers/chunks/{afe3e89737fb45189a99.js → 14ed0c34b910eba3434e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f67b37253d6d05d1e339.js → 14ef986665b4a1f6ccdc.js} +1 -1
- package/assets/esri/core/workers/chunks/158cbf4075d3eca83a6a.js +1 -0
- package/assets/esri/core/workers/chunks/{a03f15f2cbc3fed291c2.js → 15f2b27b8edc0d53e399.js} +1 -1
- package/assets/esri/core/workers/chunks/181d24ced5ef6b1f959b.js +1 -0
- package/assets/esri/core/workers/chunks/18dbee576b7b9dbe69fb.js +1 -0
- package/assets/esri/core/workers/chunks/1aebb8fe0692058bf2fb.js +1 -0
- package/assets/esri/core/workers/chunks/1cdb55d9a5ab1a5e3f08.js +1 -0
- package/assets/esri/core/workers/chunks/{cf2e5f827cea7d7319ce.js → 1e5c5029b0653047a769.js} +1 -1
- package/assets/esri/core/workers/chunks/20db6e844708d3e71437.js +1 -0
- package/assets/esri/core/workers/chunks/21a4c3d8265aca775616.js +1 -0
- package/assets/esri/core/workers/chunks/23fff0505e02fd364909.js +1 -0
- package/assets/esri/core/workers/chunks/{14d81280807a3d3c1b7e.js → 244ffdb91237d1cbade3.js} +1 -1
- package/assets/esri/core/workers/chunks/286e3e050b29e6158e6f.js +1 -0
- package/assets/esri/core/workers/chunks/29ef9d357e30082d267a.js +1 -0
- package/assets/esri/core/workers/chunks/29feef121b0916fb90bf.js +1 -0
- package/assets/esri/core/workers/chunks/2ef91e8da260454f46d8.js +1 -0
- package/assets/esri/core/workers/chunks/32b9bedd4bb0504f0b1d.js +1 -0
- package/assets/esri/core/workers/chunks/348f28d7ab46df878c6f.js +1 -0
- package/assets/esri/core/workers/chunks/{279089a6a3f08022c678.js → 361d620b3f91868b1490.js} +1 -1
- package/assets/esri/core/workers/chunks/37c16e20f022ca27cdae.js +1 -0
- package/assets/esri/core/workers/chunks/380aefa522dfeccb8c65.js +1 -0
- package/assets/esri/core/workers/chunks/394ae3199c78a94c6a2a.js +1 -0
- package/assets/esri/core/workers/chunks/39c23a52d7c3e1ee121c.js +1 -0
- package/assets/esri/core/workers/chunks/{fdd2b35388f9fe42b623.js → 3a90b6eafa92f1a68ac5.js} +1 -1
- package/assets/esri/core/workers/chunks/{6a65fc1a2931230fe994.js → 3bb1e06861cd0563ed9f.js} +1 -1
- package/assets/esri/core/workers/chunks/3f92afa58c895bf87e62.js +1 -0
- package/assets/esri/core/workers/chunks/422784ceae0d511868a0.js +1 -0
- package/assets/esri/core/workers/chunks/44782e8318dc47cb08a0.js +1 -0
- package/assets/esri/core/workers/chunks/{5882f349f3771868e67f.js → 4521f72ab0ea872e5d7c.js} +1 -1
- package/assets/esri/core/workers/chunks/45b5a61c4e9fbd9ca0b3.js +1 -0
- package/assets/esri/core/workers/chunks/47af220003adfca2167e.js +1 -0
- package/assets/esri/core/workers/chunks/487500443a6037d3599f.js +1 -0
- package/assets/esri/core/workers/chunks/4a4fab74442c3d914505.js +1 -0
- package/assets/esri/core/workers/chunks/4a8903fb1a5d30a68df9.js +1 -0
- package/assets/esri/core/workers/chunks/{46504fc81f357bc7465a.js → 4d62877f521cc9663535.js} +1 -1
- package/assets/esri/core/workers/chunks/4d818b231e6d1fa73cc5.js +1 -0
- package/assets/esri/core/workers/chunks/{e0cf6e1e21d0ee739009.js → 4e03aa5518d46a36661c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a614bac5db42c6263f8.js → 4fe10650ba3cd30aa9a2.js} +1 -1
- package/assets/esri/core/workers/chunks/50b8b1cce0a5f77c8372.js +1 -0
- package/assets/esri/core/workers/chunks/5470a29a69010c8361c4.js +1 -0
- package/assets/esri/core/workers/chunks/564d7f2e58fbc16853c0.js +1 -0
- package/assets/esri/core/workers/chunks/5c2e79f2ca401741bf3e.js +1 -0
- package/assets/esri/core/workers/chunks/5c9ab86bec07264dc9f2.js +1 -0
- package/assets/esri/core/workers/chunks/{04d55ed51e8b2683c4b4.js → 5d908a823b324bafda1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{54de7dc0597fc80d7a52.js → 5dea74fe52583e77f3ce.js} +1 -1
- package/assets/esri/core/workers/chunks/5e6d6676a5c47c0e132a.js +1 -0
- package/assets/esri/core/workers/chunks/5fd4d3cb3c9350131a59.js +1 -0
- package/assets/esri/core/workers/chunks/60637f38159e9bf68d4e.js +1 -0
- package/assets/esri/core/workers/chunks/69b73251257088ce7099.js +1 -0
- package/assets/esri/core/workers/chunks/6cd17c3a254a0b5c2476.js +1 -0
- package/assets/esri/core/workers/chunks/{06102715e9a8f218e07c.js → 6f3732e7ba2d031ba789.js} +1 -1
- package/assets/esri/core/workers/chunks/7191ab31fa040a7c561e.js +1 -0
- package/assets/esri/core/workers/chunks/71ba848c3352ea3ff96f.js +1 -0
- package/assets/esri/core/workers/chunks/76dc8e3264a456f33e61.js +1 -0
- package/assets/esri/core/workers/chunks/77d80b6d65d761214a7c.js +1 -0
- package/assets/esri/core/workers/chunks/{e2430bc3a1edeb5c3266.js → 78a69594c82d37aecbfb.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ec772eaa63eb6937231.js → 8140ed6e44c3d8536d3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{787c1a8bda7d745633f2.js → 81b9894e81cce3490984.js} +1 -1
- package/assets/esri/core/workers/chunks/85cd525705eec6803dd3.js +1 -0
- package/assets/esri/core/workers/chunks/863f04cacdc843d3f208.js +1 -0
- package/assets/esri/core/workers/chunks/8766832c7253557da8fe.js +1 -0
- package/assets/esri/core/workers/chunks/87992070008812f8ae6f.js +1 -0
- package/assets/esri/core/workers/chunks/892fd2c3533ce46a9258.js +1 -0
- package/assets/esri/core/workers/chunks/89b9d716d96135d4f057.js +1 -0
- package/assets/esri/core/workers/chunks/{4b2d392ad8e381bfd6b3.js → 89e9ebc8d5c1022cb265.js} +1 -1
- package/assets/esri/core/workers/chunks/8b38798ac6d774185238.js +1 -0
- package/assets/esri/core/workers/chunks/8b53369cace136ed1329.js +1 -0
- package/assets/esri/core/workers/chunks/8ba4f5e1912edf397947.js +1 -0
- package/assets/esri/core/workers/chunks/{987424121cf30b0f3c50.js → 8d3e92a3367a3ddc02bd.js} +1 -1
- package/assets/esri/core/workers/chunks/8e7a3b1b088c160f4db7.js +1 -0
- package/assets/esri/core/workers/chunks/8f4fba4d2339c91c8b3f.js +1 -0
- package/assets/esri/core/workers/chunks/{45aaefbdffe5e15dfb24.js → 919a6aedf38e9631ee09.js} +1 -1
- package/assets/esri/core/workers/chunks/{487c46d5245cfb35c4bb.js → 921917e53bac82693ec8.js} +1 -1
- package/assets/esri/core/workers/chunks/92809b209b68abcb97ee.js +1 -0
- package/assets/esri/core/workers/chunks/{beccbfff549902733c4e.js → 9869c696e6321c8db0a9.js} +1 -1
- package/assets/esri/core/workers/chunks/98957dba728c93506e50.js +1 -0
- package/assets/esri/core/workers/chunks/99ffb839407cb3c26ad8.js +1 -0
- package/assets/esri/core/workers/chunks/9b517c8d26a86dedb921.js +1 -0
- package/assets/esri/core/workers/chunks/{cb2329d1ea72ce5cc057.js → 9c3f56f22e9baa80a387.js} +1 -1
- package/assets/esri/core/workers/chunks/9d0976f5979c4f9154dc.js +1 -0
- package/assets/esri/core/workers/chunks/9fe1812aad6e566aea31.js +1 -0
- package/assets/esri/core/workers/chunks/a1602995ef96beb7df29.js +1 -0
- package/assets/esri/core/workers/chunks/{dff845574c0037a1dca6.js → a332e31165b65a6fb92e.js} +1 -1
- package/assets/esri/core/workers/chunks/a553478664a688f32488.js +1 -0
- package/assets/esri/core/workers/chunks/a7937b06f4b0860c7671.js +1 -0
- package/assets/esri/core/workers/chunks/a95186214f1206efd8ed.js +1 -0
- package/assets/esri/core/workers/chunks/{853563c66ecf58d53d36.js → ab60e8fbe0f92340616a.js} +1 -1
- package/assets/esri/core/workers/chunks/acea0946049136578354.js +1 -0
- package/assets/esri/core/workers/chunks/{342a97974a78007b25e0.js → ad94f54b4c88b3a047bc.js} +1 -1
- package/assets/esri/core/workers/chunks/ae29fec228e70a93ced1.js +1 -0
- package/assets/esri/core/workers/chunks/ae6dc159be974ca0e8da.js +1 -0
- package/assets/esri/core/workers/chunks/ae70972bf88d586fd453.js +1 -0
- package/assets/esri/core/workers/chunks/b021fa4654ede1d04279.js +1 -0
- package/assets/esri/core/workers/chunks/b03f32f02858244c6cd0.js +1 -0
- package/assets/esri/core/workers/chunks/b2d922ecc2c4899dbee1.js +1 -0
- package/assets/esri/core/workers/chunks/b42e50ec6b819f669400.js +1 -0
- package/assets/esri/core/workers/chunks/b6a82775b83d20599635.js +1 -0
- package/assets/esri/core/workers/chunks/b6d365b9198b74b05338.js +1 -0
- package/assets/esri/core/workers/chunks/bc21241bc9acb83d1b1c.js +1 -0
- package/assets/esri/core/workers/chunks/bd02d927b0b4991b61c5.js +1 -0
- package/assets/esri/core/workers/chunks/bdf1c4c038d556527483.js +1 -0
- package/assets/esri/core/workers/chunks/c1273f14a5ef3d81de0d.js +1 -0
- package/assets/esri/core/workers/chunks/c752f1e732bb019f657d.js +1 -0
- package/assets/esri/core/workers/chunks/{5504ec9bd9ee4d10af07.js → c7f49493bd548d5dc1e0.js} +1 -1
- package/assets/esri/core/workers/chunks/c86d3af148b28ded5875.js +1121 -0
- package/assets/esri/core/workers/chunks/{692f0093c444fcc752b5.js → cadd60fa4370284c7ae3.js} +1 -1
- package/assets/esri/core/workers/chunks/{947f3a1cad976bba9738.js → cb62326b6526cde429c1.js} +1 -1
- package/assets/esri/core/workers/chunks/cd8304b1db83d48c57db.js +1 -0
- package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +1 -0
- package/assets/esri/core/workers/chunks/d00dd961a5b79f563123.js +1 -0
- package/assets/esri/core/workers/chunks/d893c3bb093104d3db95.js +1 -0
- package/assets/esri/core/workers/chunks/d8fb1d9da16492574a11.js +1 -0
- package/assets/esri/core/workers/chunks/{520f499d79fa71f262c7.js → dd7e4c94a88452425750.js} +1 -1
- package/assets/esri/core/workers/chunks/ddb4689624d091922471.js +1 -0
- package/assets/esri/core/workers/chunks/df32a3fe81d60f0d7462.js +1 -0
- package/assets/esri/core/workers/chunks/dfc6b33f51dc81f3a7be.js +1 -0
- package/assets/esri/core/workers/chunks/e55934eb4a17a5b24c94.js +1 -0
- package/assets/esri/core/workers/chunks/{5473409fee59db80f87d.js → e5bdfef7c2cc5354be52.js} +1 -1
- package/assets/esri/core/workers/chunks/e8cdec961e9cff1cb73b.js +1 -0
- package/assets/esri/core/workers/chunks/{6738b3d6bce34a1e8be2.js → eaf720dfdf6ceca31249.js} +1 -1
- package/assets/esri/core/workers/chunks/ef274db3fa260eadf371.js +1 -0
- package/assets/esri/core/workers/chunks/efca82a4dc494f57380b.js +1 -0
- package/assets/esri/core/workers/chunks/f05990e6fb378e2e1a3b.js +1 -0
- package/assets/esri/core/workers/chunks/f0fc89cdf50a40913c02.js +1 -0
- package/assets/esri/core/workers/chunks/{8b5dcc4282772bf6b675.js → f11eaab5354cc6aa9569.js} +1 -1
- package/assets/esri/core/workers/chunks/f1c2f7c7ce4bd4096eb0.js +1 -0
- package/assets/esri/core/workers/chunks/f4e63c5f82b8c2bbfacb.js +1 -0
- package/assets/esri/core/workers/chunks/f86ff791a10c802879ec.js +1 -0
- package/assets/esri/core/workers/chunks/{7452b5ae971a9ff2e6e9.js → fdffefd7de540272a8a6.js} +1 -1
- package/assets/esri/core/workers/chunks/fe0248af95d3f37e099e.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/_core.scss +0 -2
- 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/languageUtils.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/Collection.js +1 -1
- package/core/LRUCache.js +1 -1
- package/core/Logger.js +1 -1
- package/core/MapUtils.js +1 -1
- package/core/Version.js +1 -1
- package/core/asyncUtils.js +1 -1
- package/core/deprecate.js +1 -1
- package/core/fontUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/sql/SqlInterval.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/writeUtils.js +1 -1
- package/core/sql.js +1 -1
- package/core/types.d.ts +0 -5
- package/core/urlUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
- package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
- package/geometry/Point.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/support/webMercatorUtils.js +1 -1
- package/interfaces.d.ts +0 -17
- package/kernel.js +1 -1
- package/layers/BuildingSceneLayer.js +1 -1
- package/layers/ElevationLayer.d.ts +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.d.ts +5 -1
- package/layers/GeoRSSLayer.js +1 -1
- package/layers/GeospatialPDFLayer.js +1 -1
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.d.ts +4 -3
- package/layers/IntegratedMeshLayer.d.ts +4 -3
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/KMLLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/LineOfSightLayer.d.ts +6 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/PointCloudLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/VectorTileLayer.d.ts +53 -0
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/ViewshedLayer.d.ts +6 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/WebTileLayer.js +1 -1
- package/layers/effects/jsonUtils.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/projectionSupport.js +1 -1
- package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/graphics/sources/parquet/FileProvider.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/graphics/sources/support/uploads.js +1 -1
- package/layers/knowledgeGraph/cypherUtils.js +1 -1
- package/layers/mixins/refresh.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/parquet.js +1 -1
- package/layers/raster/datasets/BaseRaster.js +1 -1
- package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
- package/layers/raster/datasets/ImageServerRaster.js +1 -1
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/raster/datasets/ZarrRaster.js +2 -0
- package/layers/raster/datasets/datasetUtils.js +1 -1
- package/layers/raster/datasets/wcsCoverageParser.js +1 -1
- package/layers/raster/datasets/zarrParser.js +2 -0
- package/layers/raster/datasets/zarrUtils.js +2 -0
- package/layers/raster/formats/Lerc.js +1 -1
- package/layers/raster/formats/pixelRangeUtils.js +1 -1
- package/layers/support/ClientSideConnection.js +1 -1
- package/layers/support/ElevationSampler.js +1 -1
- package/layers/support/MultidimensionalSubset.js +1 -1
- package/layers/support/SceneModifications.d.ts +1 -3
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/SpriteSource.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/infoFor3D.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/legend/ActiveLayerInfo.js +1 -1
- package/libs/lyr3d/Lyr3DModule.js +1 -1
- package/linkChart/utils.js +1 -1
- package/networks/support/Circuit.js +1 -1
- package/networks/support/CircuitSection.js +1 -1
- package/package.json +3 -3
- package/portal/Portal.js +1 -1
- package/portal/PortalItemResource.js +1 -1
- package/portal/PortalQueryParams.js +1 -1
- package/renderers/HeatmapRenderer.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/rest/query/operations/queryAttachments.js +1 -1
- package/support/LayersMixin.d.ts +2 -2
- package/symbols/PictureFillSymbol.js +1 -1
- package/symbols/PictureMarkerSymbol.js +1 -1
- package/symbols/SimpleFillSymbol.js +1 -1
- package/symbols/SimpleLineSymbol.js +1 -1
- package/symbols/SimpleMarkerSymbol.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/TextSymbol.js +1 -1
- package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
- package/symbols/cim/types.d.ts +15 -11
- package/symbols/support/previewSymbol3D.js +1 -1
- package/tables/support/templateUtils.js +1 -1
- package/views/2d/engine/vectorTiles/SourceLayerData.js +1 -1
- package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
- package/views/2d/engine/vectorTiles/TileManager.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileSourceData.js +2 -0
- package/views/2d/engine/vectorTiles/WorkerTile.js +1 -1
- package/views/2d/engine/vectorTiles/WorkerTileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
- package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
- package/views/2d/engine/vectorTiles/style/Filter.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +4 -4
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/support/TileStore.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/2d/tiling/TileStrategy.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionComputation.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/images/generateTextures.js +1 -1
- package/views/3d/environment/EnvironmentView.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/MeshFastUpdateProcessor.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +2 -0
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/layers/support/createTileBVHForLayer.js +2 -0
- package/views/3d/layers/support/tileBoundingVolumeUtils.js +2 -0
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/controllers/GroundNavigationController.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/TextureCollection.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatSortCoordinator.js +2 -0
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFill.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedMaterialConfiguration.js +2 -0
- package/views/SceneView.d.ts +2 -4
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/View.d.ts +1 -3
- package/views/View2D.d.ts +2 -2
- package/views/analysis/ElevationProfile/ElevationProfileChart.js +2 -2
- package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/support/PluginContext.js +1 -1
- package/views/interactive/options/ViewOptions.d.ts +0 -2
- package/views/interactive/sketch/normalizedPoint.js +1 -1
- package/views/interactive/tooltip/fields/TooltipFieldElevation.js +1 -1
- package/views/interactive/tooltip/fields/TooltipFieldOrientation.js +1 -1
- package/views/interactive/tooltip/fields/TooltipFieldSize.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Compass/CompassViewModel.js +1 -1
- package/widgets/CoordinateConversion/support/Format.js +1 -1
- package/widgets/CoordinateConversion/support/formatUtils.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +0 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor.d.ts +0 -1
- package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/Expand/ExpandViewModel.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
- package/widgets/Histogram/HistogramViewModel.js +1 -1
- package/widgets/Histogram.js +1 -1
- package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
- package/widgets/Home/HomeViewModel.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/card/CardView.js +1 -1
- package/widgets/Legend/styles/classic/ClassicView.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/DiscreteOptions.js +1 -1
- package/widgets/ShadowCast/DurationOptions.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/ShadowCast/ThresholdOptions.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +0 -1
- package/widgets/Sketch.d.ts +0 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/TableList/TableListViewModel.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/Zoom/ZoomViewModel.js +1 -1
- package/widgets/support/AnalysisViewModelMixin.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/00d43f02119167531d1b.js +0 -1
- package/assets/esri/core/workers/chunks/059cda6f11a91dbc9e28.js +0 -1
- package/assets/esri/core/workers/chunks/0696fa44a04b99738d7b.js +0 -1
- package/assets/esri/core/workers/chunks/073f0232135f71b6c7a5.js +0 -1
- package/assets/esri/core/workers/chunks/091ec4fe83038f3558f4.js +0 -1
- package/assets/esri/core/workers/chunks/098ac10877d92fde1006.js +0 -1
- package/assets/esri/core/workers/chunks/0a29d87b6e58a3c6df8f.js +0 -1
- package/assets/esri/core/workers/chunks/0bf43d80cb40c2b43333.js +0 -1
- package/assets/esri/core/workers/chunks/0d04353843ccb7440342.js +0 -1
- package/assets/esri/core/workers/chunks/1132e28aaa5825b10b6e.js +0 -1
- package/assets/esri/core/workers/chunks/123541f79be7adff0818.js +0 -1
- package/assets/esri/core/workers/chunks/1380cec385426673f294.js +0 -1
- package/assets/esri/core/workers/chunks/1866f832e5f52958bc97.js +0 -1
- package/assets/esri/core/workers/chunks/19e51cbb354954ddafbd.js +0 -1
- package/assets/esri/core/workers/chunks/1b24a40c0fa197014873.js +0 -1
- package/assets/esri/core/workers/chunks/1c7096eb48a3a7f27d4f.js +0 -1
- package/assets/esri/core/workers/chunks/1cc03067f8405285057c.js +0 -1
- package/assets/esri/core/workers/chunks/1deca3de77b1a9a07da4.js +0 -1
- package/assets/esri/core/workers/chunks/1f76f6dcdae9f55389cb.js +0 -1
- package/assets/esri/core/workers/chunks/1fd82fcba2758741996a.js +0 -1
- package/assets/esri/core/workers/chunks/21e1d423ee33f916547e.js +0 -1
- package/assets/esri/core/workers/chunks/23f3692c7426173e8352.js +0 -1
- package/assets/esri/core/workers/chunks/247617c0dbae2386ab3b.js +0 -1
- package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +0 -1
- package/assets/esri/core/workers/chunks/2853606099602f73d379.js +0 -1
- package/assets/esri/core/workers/chunks/28ed020d9995b6577be5.js +0 -1
- package/assets/esri/core/workers/chunks/2b27d3bc492e000bbe58.js +0 -1
- package/assets/esri/core/workers/chunks/2d64a13c2303e9cae613.js +0 -1
- package/assets/esri/core/workers/chunks/2dfe6af28cd1b29d5ebc.js +0 -1
- package/assets/esri/core/workers/chunks/305eeaac0b4d5b79ebde.js +0 -1
- package/assets/esri/core/workers/chunks/353976c812ebf0c98549.js +0 -1
- package/assets/esri/core/workers/chunks/3b5e9e0b180dc10491ec.js +0 -1
- package/assets/esri/core/workers/chunks/46edd6c9ed6701e6b975.js +0 -1
- package/assets/esri/core/workers/chunks/4caebb64a365da18453f.js +0 -1
- package/assets/esri/core/workers/chunks/4d8833f48348cbbcc947.js +0 -1
- package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +0 -1
- package/assets/esri/core/workers/chunks/4e4f747de424941a0bfa.js +0 -1
- package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +0 -1
- package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +0 -1
- package/assets/esri/core/workers/chunks/553a8bf5bc5c56d1bcaf.js +0 -1
- package/assets/esri/core/workers/chunks/55c0c074e4afe05f5d4d.js +0 -1
- package/assets/esri/core/workers/chunks/598ba405e93ebccf7b2d.js +0 -1
- package/assets/esri/core/workers/chunks/5bfb962ca192f90a2724.js +0 -1
- package/assets/esri/core/workers/chunks/60c8eedd06080edab3e3.js +0 -1
- package/assets/esri/core/workers/chunks/61d36730564c5ac5edab.js +0 -1
- package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +0 -1
- package/assets/esri/core/workers/chunks/661c6324529dd17b297e.js +0 -1
- package/assets/esri/core/workers/chunks/6699fac01ccd842851ba.js +0 -1
- package/assets/esri/core/workers/chunks/672a5390182b20d632be.js +0 -1
- package/assets/esri/core/workers/chunks/67caef2ecf0dc5f2eed3.js +0 -1
- package/assets/esri/core/workers/chunks/68dd1fd2025c7125ead1.js +0 -1
- package/assets/esri/core/workers/chunks/68fd7b314377d27aaa54.js +0 -1
- package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +0 -1
- package/assets/esri/core/workers/chunks/6f2e7e663229b223b4df.js +0 -1
- package/assets/esri/core/workers/chunks/7390af96250e89194332.js +0 -1
- package/assets/esri/core/workers/chunks/7b45ac83e279fe9516a5.js +0 -1
- package/assets/esri/core/workers/chunks/7e0ed6e8f7b77e43f628.js +0 -1
- package/assets/esri/core/workers/chunks/832c887fdc5af4c08cf2.js +0 -1
- package/assets/esri/core/workers/chunks/84fb27e3425515cd0e3f.js +0 -1
- package/assets/esri/core/workers/chunks/8502274806ea52308822.js +0 -1
- package/assets/esri/core/workers/chunks/8b0be232723424dda320.js +0 -1
- package/assets/esri/core/workers/chunks/8b0efcc30184593a0812.js +0 -1121
- package/assets/esri/core/workers/chunks/8b38fad017c4c0d9e1ec.js +0 -1
- package/assets/esri/core/workers/chunks/8c3779de09291170497f.js +0 -1
- package/assets/esri/core/workers/chunks/8e391b5b82429f39791e.js +0 -1
- package/assets/esri/core/workers/chunks/8e6276ddd8d094c61f08.js +0 -1
- package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +0 -1
- package/assets/esri/core/workers/chunks/96f87c8efd4b11b37686.js +0 -1
- package/assets/esri/core/workers/chunks/9826baa3c15ea2062669.js +0 -1
- package/assets/esri/core/workers/chunks/98958203a5ca45b24d72.js +0 -1
- package/assets/esri/core/workers/chunks/9c3de54513bf8619271c.js +0 -1
- package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +0 -1
- package/assets/esri/core/workers/chunks/a18c3cbe505a19d29569.js +0 -1
- package/assets/esri/core/workers/chunks/a5f17e9a025ac2b6e1bf.js +0 -1
- package/assets/esri/core/workers/chunks/a6e846361bf5dd3a11c7.js +0 -1
- package/assets/esri/core/workers/chunks/ac107079342251a984dd.js +0 -1
- package/assets/esri/core/workers/chunks/acf4737ba509cbd73cce.js +0 -1
- package/assets/esri/core/workers/chunks/af2087b75225d7d7dbd8.js +0 -1
- package/assets/esri/core/workers/chunks/b386e921c273de3ac7a5.js +0 -1
- package/assets/esri/core/workers/chunks/b3aa29589dcfb5b93106.js +0 -1
- package/assets/esri/core/workers/chunks/b7205620ca248f4efc88.js +0 -1
- package/assets/esri/core/workers/chunks/c0eb27263f608dc3684b.js +0 -1
- package/assets/esri/core/workers/chunks/c5364ff8dd1358af3603.js +0 -1
- package/assets/esri/core/workers/chunks/ca21786e519c914fc9e1.js +0 -1
- package/assets/esri/core/workers/chunks/cd46d9b4a8de644e7332.js +0 -1
- package/assets/esri/core/workers/chunks/da1e6962ba0c85c37953.js +0 -1
- package/assets/esri/core/workers/chunks/dcdf837a452dc0cac582.js +0 -1
- package/assets/esri/core/workers/chunks/e0864ca82ffa3c9a0776.js +0 -1
- package/assets/esri/core/workers/chunks/e69cd62f824ce7a22fa0.js +0 -1
- package/assets/esri/core/workers/chunks/e9457a67befc61e11095.js +0 -1
- package/assets/esri/core/workers/chunks/efc1a90742813b55602e.js +0 -1
- package/assets/esri/core/workers/chunks/f190a3124d6d03417d73.js +0 -1
- package/assets/esri/core/workers/chunks/f4135779bfdaf349352a.js +0 -1
- package/assets/esri/core/workers/chunks/f6bd7b52745b82ba73dc.js +0 -1
- package/assets/esri/core/workers/chunks/f6f5937a1308f28bb959.js +0 -1
- package/assets/esri/core/workers/chunks/fc77eb7683e708774168.js +0 -1
- package/assets/esri/core/workers/chunks/fd967a9f3cf0e2890dbb.js +0 -1
- package/assets/esri/core/workers/chunks/fe24e039385473bf77f9.js +0 -1
- package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +0 -1
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +0 -46
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ar.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.bg.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.bs.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ca.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.cs.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.da.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.de.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.el.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.en.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.es.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.et.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.fi.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.fr.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.he.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.hr.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.hu.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.id.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.it.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ja.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ko.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.lt.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.lv.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.nl.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.no.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pl.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pt-BR.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pt-PT.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ro.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ru.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sk.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sl.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sr.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sv.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.th.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.tr.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.uk.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.vi.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-CN.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-HK.json +0 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-TW.json +0 -1
- package/views/2d/engine/vectorTiles/style/VectorTilePbfWriter.js +0 -2
- package/views/2d/engine/vectorTiles/style/encodeVectorTileFeatures.js +0 -2
- package/views/2d/layers/features/support/FeatureSetReaderVectorTileFeatureCursor.js +0 -2
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +0 -72
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +0 -2
- package/widgets/UtilityNetworkValidateTopology.d.ts +0 -130
- package/widgets/UtilityNetworkValidateTopology.js +0 -2
- /package/views/2d/engine/vectorTiles/{Feature.js → PbfFeature.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{isSome as n}from"../../../../core/arrayUtils.js";import r from"../../../../core/Error.js";import"../../../../core/has.js";import i from"../../../../core/Logger.js";import{findInMap as a}from"../../../../core/MapUtils.js";import{abortMaybe as o,removeMaybe as s,destroyMaybe as c}from"../../../../core/maybe.js";import{MinPriority as l}from"../../../../core/MemCache.js";import u from"../../../../core/PooledArray.js";import{throwIfAborted as d,ignoreAbortErrors as f,isAbortError as p}from"../../../../core/promiseUtils.js";import m from"../../../../core/Queue.js";import{when as h,watch as g,on as ee,syncAndInitial as te,whenOnce as _}from"../../../../core/reactiveUtils.js";import{schedule as v}from"../../../../core/scheduling.js";import{property as y,subclass as ne}from"../../../../core/accessorSupport/decorators.js";import{diff as b,isEmpty as re}from"../../../../core/accessorSupport/diffUtils.js";import{runUntracked as x}from"../../../../core/accessorSupport/tracking.js";import{set as S,add as C,scale as w}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as T}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import ie from"../../../../geometry/Extent.js";import ae from"../../../../geometry/Point.js";import{canProjectWithoutEngine as oe}from"../../../../geometry/projectionUtils.js";import{projectBuffer as E}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as D}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as O}from"../../../../geometry/projection/projectXYZToVector.js";import{center as se,fromRect as ce,create as k,equals as le}from"../../../../geometry/support/aaBoundingBox.js";import{create as ue}from"../../../../geometry/support/aaBoundingRect.js";import{equals as de}from"../../../../geometry/support/spatialReferenceUtils.js";import{isPopupProvider as fe}from"../../../../graphic/getPopupProvider.js";import pe from"../../../../layers/Layer.js";import{getObjectId as A,computeAABB as j,hasGeometry as M}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as N}from"../../../../layers/graphics/hydratedFeatures.js";import P from"../../../../renderers/UniqueValueRenderer.js";import{isSupportedRenderer3D as F,validateTo3D as I}from"../../../../renderers/support/rendererConversion.js";import{RenderingInfo as L}from"../../../../renderers/support/RenderingInfo.js";import{isBasemapLayerView as R}from"../../../../support/basemapUtils.js";import{loadArcade as z}from"../../../../support/loadArcade.js";import B from"../../../../symbols/LabelSymbol3D.js";import me from"../../../../symbols/TextSymbol.js";import he from"../../../../symbols/WebStyleSymbol.js";import{getDefaultSymbol3D as ge}from"../../../../symbols/support/defaults3D.js";import{to3D as V}from"../../../../symbols/support/symbolConversion.js";import{aggregateSymbolComplexity as _e,defaultSymbolComplexity as ve}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as ye}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as be}from"./ElevationQuery.js";import{extractExpressionInfo as H,createContext as U}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as xe}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as Se}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as Ce}from"./Graphics3DSymbolCreationContext.js";import{make as we}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as Te}from"./Graphics3DWebStyleSymbol.js";import{GraphicsCorePerformanceInfo as Ee}from"./GraphicsCorePerformanceInfo.js";import{GraphicStateTracking as De}from"./GraphicStateTracking.js";import{computeCentroid as Oe}from"./graphicUtils.js";import{placePointOnGeometry as ke}from"./pointUtils.js";import{SpatialIndex2D as Ae}from"./SpatialIndex2D.js";import{AggregateSymbolComplexity as je}from"./SymbolComplexity.js";import{StageLayerElevationProvider as Me}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as Ne}from"../../support/extentUtils.js";import{affectsGeometry as Pe}from"../../webgl-engine/lib/affectsGeometry.js";import{GridLocalOriginFactory as Fe}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{isScreenSizePerspectiveEnabled as W}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{WebGLLayer as Ie}from"../../webgl-engine/lib/WebGLLayer.js";import{HUDMaterial as Le}from"../../webgl-engine/materials/HUDMaterial.js";import{hasPopupTemplate as Re}from"../../../layers/support/popupUtils.js";import{PromiseQueue as G}from"../../../support/PromiseQueue.js";import{PropertiesPool as ze}from"../../../support/PropertiesPool.js";import{ImmediateTask as K,noBudget as Be,TaskPriority as Ve}from"../../../support/Scheduler.js";import{TextureCompressionTracker as He}from"../../../support/TextureCompressionTracker.js";import{Yield as Ue}from"../../../support/Yield.js";import{alphaCutoff as q}from"../../../../webscene/support/AlphaCutoff.js";var J;const Y=T(),We=k();let X=class extends t{static{J=this}static{this.tmpVec=T()}get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new Ae({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get deconflictor(){return this._deconflictor}get labeler(){return this._labeler}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return this.currentRenderer!=null&&this.currentRenderer.type===`dictionary`?0:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this.dataUpdating||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._frameTaskHandle.updating||this._updateQueue.updating||this.readyToRun)}get dataUpdating(){return!!(this._graphicsWaitingForSymbol.size>0||this._pendingUpdates.size>0||this._spatialIndex?.updating||this._updatingPendingLoadedGraphicsChange||this._dataUpdateQueue.updating||this._loadingSymbols>0||this.compressionTracker.compressing)}get readyToRun(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating||this._dataUpdateQueue.readyToRun||this._updateQueue.readyToRun||this._focusAreasGraphicsQueue.length>0}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return x(()=>this.updating?this._pendingUpdates.size+(this._spatialIndex?.updatingRemaining||0)*.1+(this._elevationAlignment?.updatingRemaining||0)*.1:0)}get displayFeatureLimit(){let e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,n=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,i=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,o=Math.max(1,a?.verticesPerFeature??1),s=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:n,c=Math.ceil(i/o),l=Math.max(t,Math.min(n,c,s)),u=this._get(`displayFeatureLimit`);return u&&u.maximumTotalNumberOfVertices===i&&u.averageSymbolComplexity===a&&u.maximumNumberOfFeatures===l?u:new ye(i,l,a)}get averageSymbolComplexity(){return x(()=>{let e=this._averageSymbolComplexities,t=this._get(`averageSymbolComplexity`);return e.numComplexities===0||t!=null&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e})}get _averageSymbolComplexities(){let e=this._totalSymbolComplexities;return e.numComplexities>0&&(e.verticesPerFeature/=e.numComplexities,e.verticesPerCoordinate/=e.numComplexities,e.drawCallsPerFeature/=e.numComplexities,e.memory.bytesPerFeature/=e.numComplexities,e.memory.bytesPerFeatureLabel/=e.numComplexities,e.memory.resourceBytes/=e.numComplexities,e.memory.draped.bytesPerFeature/=e.numComplexities,e.memory.draped.bytesPerFeatureLabel/=e.numComplexities),e}get _totalSymbolComplexities(){let e=new je;return this._forEachSymbolComplexity(t=>_e(t,e)),e}get usedMemory(){let e=this.labelsEnabled?(this.averageSymbolComplexity?.memory.bytesPerFeatureLabel??0)*this._numberOfGraphics:0,t=0;if(this._forEachSymbolComplexityUsed(e=>t+=e?.memory.resourceBytes??0),this._symbolMaterials==null){this._symbolMaterials=[];for(let e of this._symbols.values())if(e!=null){for(let t of e.symbolLayers)if(t)for(let e of t.materials)e&&this._symbolMaterials.push(e)}}let n=this.owner.view.stage.renderer,r=this.owner.view.overlayManager.renderer,i=this._symbolMaterials.reduce((e,t)=>e+((n.getMaterialRenderer(t)||r.getMaterialRenderer(t))?.usedMemory??0),0);return this._usedMemory+e+t+i}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){let e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(this.averageSymbolComplexity!=null){let e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}_forEachSymbolComplexity(e){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(e):this._forEachSymbolComplexityUsed(e)}get visible(){return this._visible}_getConvertedSymbol(e){let t=e;if(t.type===`web-style`)return t.clone();let n=this._symbolConversionCache.get(t.id);if(n!=null)return n;let r=V(t,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(t),cimFallbackEnabled:!0}),a=r.symbol||null;return a==null&&r.error&&i.getLogger(this).error(r.error.message),this._symbolConversionCache.set(t.id,a),a}_getSymbolComplexitiesUsedOrRenderer(e){let t=this.currentRenderer;if(t==null)return;let n=t.symbols,r=`backgroundFillSymbol`in t?t.backgroundFillSymbol:null;if(!r&&!n.length)return;let i=this._getSymbolComplexityUsedOrRenderer(r);i!=null&&e(i);for(let t of n){let n=this._getSymbolComplexityUsedOrRenderer(t);n!=null&&e(n)}}_getSymbolComplexityUsedOrRenderer(e){if(e==null)return null;let t=this._symbols.get(e.id);if(t!=null)return t.complexity;let n=this._getConvertedSymbol(e);return n==null?null:ve(n)}_forEachSymbolComplexityUsed(e){this._symbols.forEach(t=>{e(t?.complexity)})}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new ze({computedExtent:()=>new ie},this),this.computedExtent=null,this.currentRenderer=null,this.rendererRequiresHydratedGraphic=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTaskHandle=K,this._dataUpdateQueue=new G,this._updateQueue=new G,this._focusAreasGraphicsQueue=new m,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._elevationAlignment=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this.compressionTracker=new He,this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new u,this.preferredUpdatePolicy=1,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.reportGraphicSourceMemory=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this._notifyMemoryChange=e=>{this._usedMemory+=e},this._unusedSymbolsCache=e.owner.view.resourceController.memoryController.newCache(`graphics-3d-unused-symbols`,e=>e.destroy()),this.symbolCreationContext=new Ce(e.owner.view.resourceController.scheduler,(e,t)=>this._updateQueue.push(e,t),e.owner.layerViewUid,this.compressionTracker)}initialize(){this._featureStore=new xe({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});let e=(e,t,n)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,n),{componentFactories:t}=this;this._elevationAlignment=t.elevationAlignment?.(this,e),this._scaleVisibility=t.scaleVisibility?.(this,e),this._filterVisibility=t.filterVisibility?.({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities(t=>t.setVisibilityFlag(1,4,e(A(t.graphic,this._objectIdField)))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities(t=>t.setVisibilityFlag(1,4,e)),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities(e=>e.setVisibilityFlag(1,4,!0))}),this._deconflictor=t.deconflictor?.(this),this._labeler=t.labeler?.(this,this._scaleVisibility),this._objectStates=t.objectStates?.(this),this._initializeAbortController=new AbortController,this.addHandles(h(()=>this.owner.view.state.highlights,()=>{let{highlightOrderMap:e}=this.owner.view.state;this.graphics3DGraphics.forEach(t=>t.updateHighlights(e))})),this._initializePromise=this._initializeAsync()}async _initializeAsync(){let e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new be(this._viewSpatialReference,t),this._initializeStage(t,this.owner.layerViewUid);let n=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=n,this.currentRenderer!=null&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new Fe(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e),this.symbolCreationContext.focusAreaStyle=t.map?.focusAreas.style??null;let r=H(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await U(r,this._viewSpatialReference,e,i.getLogger(this)),d(e),this.symbolCreationContext.screenSizePerspectiveEnabled=W(this.layer.screenSizePerspectiveEnabled),this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,`drapeSourceType`in this.owner){let{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.overlayManager.registerGeometryDrapeSource(e)}this.addHandles([g(()=>this.suspendedOrOutsideOfView,()=>this._updateQueue.unshift(()=>this._updateLayerVisibility(),null).catch(f)),g(()=>W(this.layer?.screenSizePerspectiveEnabled),e=>{e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._screenSizePerspectiveEnabledChange())}),g(()=>this.owner.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(!!e)),g(()=>this.owner.view.state?.rasterPixelRatio,()=>this._pixelRatioChange()),g(()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,e=>this._physicalBasedRenderingChange(e)),g(()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,e=>this._skipHighSymbolLoDsChange(e)),g(()=>this.owner.view.focusAreasView?.polygons,()=>this._updateFocusedLabels()),g(()=>this.owner.view.timeZone,()=>{this.currentRenderer?.arcadeRequired&&this.recreateAllGraphics()}),g(()=>this.owner.view.map?.focusAreas.style,e=>{this.symbolCreationContext.focusAreaStyle=e??null,this.recreateAllGraphicsAndSymbols()}),h(()=>t.basemapTerrain?.tilingScheme,e=>{let n=t.groundView?.spatialReference;!e.spatialReference.equals(this.symbolCreationContext.overlaySR)&&n!=null&&(this.symbolCreationContext.overlaySR=n),this.hasHandles(`loaded-graphics`)?this.recreateAllGraphics():this.addHandles([ee(()=>this.owner?.loadedGraphics,`change`,e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()},{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],`loaded-graphics`)},{initial:!0}),g(()=>this.effectiveUpdatePolicy,e=>{this.stageLayer!=null&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===0,e===1&&this.runTask(Be)},te)]),this._frameTaskHandle=t.resourceController.scheduler.registerTask(Ve.GRAPHICS_CORE,this),this.layer&&`featureReduction`in this.layer&&this.addHandles(g(()=>this.layer.featureReduction,()=>this._deconflictor?.featureReductionChange())),this.notifyChange(`averageSymbolComplexity`),this.rendererChange(this.owner.renderer).catch(()=>{}),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController=o(this._initializeAbortController)}_updateFocusedLabels(){this._focusAreasGraphicsQueue.clear(),this.forEachGraphics3DSymbol((e,t)=>{t&&e.needsUpdateFocus&&t.forEach(e=>{this._focusAreasGraphicsQueue.push(e)})})}destroy(){if(this._unusedSymbolsCache.destroy(),this._abortInitialize(),this._rendererChangeAbortController=o(this._rendererChangeAbortController),this._abortElevationInfoChange(),this._frameTaskHandle.remove(),this._frameTaskHandle=K,this._dataUpdateQueue.cancelAll(),this._updateQueue.cancelAll(),this._deconflictor=s(this._deconflictor),this._labeler=s(this._labeler),this._elevationAlignment=c(this._elevationAlignment),this._scaleVisibility=c(this._scaleVisibility),this._filterVisibility=c(this._filterVisibility),this._objectStates=c(this._objectStates),this.clear(),`drapeSourceType`in this.owner){let{owner:e}=this;this.stage.view.overlayManager.unregisterDrapeSource(e)}this._featureStore=c(this._featureStore),this._updatingPendingLoadedGraphicsChange=s(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=c(this._graphicStateTracking),this.stage&&=(this.stageLayer=c(this.stageLayer),null),this._set(`owner`,null);for(let e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r(`graphic:layer-destroyed`,`Layer has been destroyed`));this._whenGraphics3DGraphicRequests=null,this._propertiesPool=c(this._propertiesPool),this._whenSymbolRemoved.prune(),this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=c(this._spatialIndex),this._symbolMaterials=null}clear(){this._objectStates?.allGraphicsDeleted(),this._graphicStateTracking!=null&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach(e=>e.destroy()),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(c),this._symbols.clear(),this._symbolMaterials&&=(this._symbolMaterials.length=0,null),this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange(`dataUpdating`),this.notifyChange(`readyToRun`),this.notifyChange(`updatingRemaining`),this._featureStore.events.emit(`changed`),this.owner.notifyContentGeometryUpdate?.()}_initializeStage(e,t){this.stage=e.stage,this.stageLayer=new Ie(this.stage,{visible:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);let n=this.stageLayer.events;n.on(`transformationChanged`,e=>this.notifyGraphicGeometryChanged(e.graphicUid)),n.on(`shaderTransformationChanged`,e=>this.notifyGraphicGeometryChanged(e.graphicUid)),n.on(`visibilityChanged`,e=>this.notifyGraphicVisibilityChanged(e.graphicUid)),n.on(`geometriesChanged`,e=>this.notifyGraphicGeometryChanged(e.object.graphicUid)),n.on(`attributesChanged`,e=>Pe(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid))}notifyGraphicGeometryChanged(e){if(this.owner.notifyContentGeometryUpdate?.(),this._graphicStateTracking==null||e==null)return;let t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(this.owner.notifyContentGeometryUpdate?.(),this._graphicStateTracking==null||e==null)return;let t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){let e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*Ge,n=!this.suspendedOrOutsideOfView&&!t;n!==this._visible&&(this._visible=n,this._updateStageLayerVisibility())}_updateStageLayerVisibility(){let e=this._visible&&(this.layer.opacity==null||this.layer.opacity>=q);this.stageLayer.visible!==e&&(this.stageLayer.visible=e,e?this.updateGraphicsVisibilities():this._hideAllGraphics(),this.owner.notifyContentGeometryUpdate?.())}getGraphics3DGraphicById(e){return e==null?void 0:this.graphics3DGraphics.get(e)}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return A(e,t)}get graphics3DGraphicsByObjectID(){let e=this.owner.layer?.objectIdField;if(!e)return;let t=new Map;return this.graphics3DGraphics.forEach(n=>{if(!n)return;let r=n.graphic,i=this._getGraphicObjectID(r,e);i!=null&&t.set(i,n)}),t}get labelsEnabled(){return!!this._labeler?.layerLabelsEnabled()}async updateLabelingInfo(e){let t=this._deconflictor?.labelingInfoChange(e),n=this._labeler?.labelingInfoChange(e);await Promise.allSettled([t,n])}updateVisibilityInfo(){this._deconflictor?.labelingInfoChange(),this._labeler?.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return`unknown`;let e=!1,t=!1;for(let[n,r]of this._symbols)if(r!=null)switch(r.getFastUpdateStatus()){case 3:return`unknown`;case 1:this._graphicsBySymbol.has(n)&&(t=!0);break;case 0:this._graphicsBySymbol.has(n)&&(e=!0);break;case 2:this._graphicsBySymbol.has(n)&&(t=e=!0)}return t?e?`mixed`:`fast`:e?`slow`:`mixed`}runTask(e){if(this._dataUpdateQueue.runTask(e),this._updateQueue.runTask(e),this._applyPendingUpdates(e),this._applyFocusAreasUpdates(e),this.notifyChange(`readyToRun`),this.readyToRun||this.notifyChange(`dataUpdating`),this.notifyChange(`updatingRemaining`),!e.hasProgressed)return Ue}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);let n=this._findGraphics3DGraphicByObjectId(e);n!=null&&this._updateUserVisibility(n)}_findGraphics3DGraphicByObjectId(e){return a(this.graphics3DGraphics,t=>this._getGraphicObjectID(t.graphic)===e)}_updateUserVisibility(e){if(e==null)return!1;let t=e.graphic,n=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&this.stageLayer.visible&&(n==null||!this._objectIdInvisibleSet.has(n));return e.setVisibilityFlag(1,1,r)}_whenGraphics3DGraphic(e){let t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);let n=this._whenGraphics3DGraphicRequests[e.uid];if(n)return n.promise;let r=Promise.withResolvers();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){let n=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,i=this.owner.view.groundView.spatialReference,a=(e,t,i)=>E(e,r,t,e,n,t,i),o=(e,t,r)=>E(e,i,t,e,n,t,r),s=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:t!=null&&!!t.useViewElevation,minDemResolution:t==null?null:t.minDemResolution,minDemResolutionForPoints:this.owner.view.resolution}:null,c=await e.getProjectedBoundingBox(a,o,s,t?.signal);if(!c)return null;let l=c.boundingBox;if(c.requiresDrapedElevation){let e=this.symbolCreationContext.elevationProvider;if(e){se(l,Y);let t=e.getElevation(Y[0],Y[1],0,n,`ground`)??0;l[2]=Math.min(l[2],t),l[5]=Math.max(l[5],t)}}return{boundingBox:l,screenSpaceObjects:c.screenSpaceObjects}}async whenGraphicBounds(e,t){await _(()=>this.owner?.loadedGraphics);let n=this.owner.layer?.objectIdField,i=this.owner.loadedGraphics.find(t=>t===e||n!=null&&t.attributes!=null&&e.attributes&&t.attributes[n]===e.attributes[n]);if(!i)throw new r(`internal:graphic-not-part-of-view`,`Graphic is not part of this view`);let a=await this._whenGraphics3DGraphic(i);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){let n=this.graphics3DGraphics.get(e.uid);if(!n)return null;let r=n.computeAttachmentOrigin();if(r.render.num===0&&r.draped.num===0)return null;S(Q,0,0,0);let i=0;if(r.render.num>0){if(!D(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,$,t))return null;C(Q,Q,$),i++}if(r.draped.num>0){let[e,n]=r.draped.origin,a=this.owner.view.groundView.spatialReference,o=this.owner.view.elevationProvider.getElevation(e,n,0,a,`ground`)??0;if(S($,e,n,o),!D($,a,$,t))return null;C(Q,Q,$),i++}return i>1&&w(Q,Q,1/i),new ae({x:Q[0],y:Q[1],z:Q[2],spatialReference:t})}getSymbolLayerSize(e,t){let n=this._symbols.get(e.id);if(n==null)throw new r(`internal:symbol-not-part-of-view`,`Symbol is not part of this view`);let i=e.symbolLayers.indexOf(t);if(i===-1)throw new r(`internal:missing-symbol-layer`,`Symbol layer is not in symbol`);let a=n.getSymbolLayerSize(i);if(a==null)throw new r(`internal:missing-size`,`Symbol layer has no valid size`);return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){let t=e.graphic.uid,n=this.graphics3DGraphics.get(t);if(n!=null||this._graphicsWithoutSymbol.get(t)!=null){switch(e.property){case`visible`:this._graphicUpdateVisibleHandler(n);break;case`geometry`:this._graphicUpdateGeometryHandler(n,e.graphic);break;case`symbol`:this._graphicUpdateSymbolHandler(n,e);break;case`attributes`:this.symbolCreationContext.featureExpressionInfoContext?.arcade?this._graphicUpdateGeometryHandler(n,e.graphic):n?.updateAttributes();break;case`popupTemplate`:break;case`origin-transform`:this._graphicUpdateTransformHandler(n,e)}this.owner.notifyContentGeometryUpdate?.()}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,()=>e!=null&&e.updateGeometry()&&(this._labeler?.updateGraphicGeometry(e)??!0)?(this._labeler?.setDirty(),this._deconflictor?.setDirty(),!0):!1);let n=t.geometry;n!=null&&this._expandComputedExtent(n)}_graphicUpdateTransformHandler(e,t){let n=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t.graphic,()=>t.newValue==null||e==null||n?.type!==`mesh`?!1:e.graphics3DSymbol.updateMeshTransform(e,n,t.newValue,()=>this.graphicUpdateHandler({...t,action:1}),t.action))}_graphicUpdateGeometryOrTransformHandler(e,t,n){if(t.geometry==null)this._recreateGraphic(t);else if(e==null){let e=t.symbol?.id;if(e){let t=this._symbols.get(e);if(t!=null&&t.loadStatus===0)return}this._recreateGraphic(t)}else if(!n()){let n=this._deconflictor?.getState(e);this._recreateGraphic(t);let r=this.graphics3DGraphics.get(t.uid);r&&n!=null&&this._deconflictor?.setState(r,n)}}_graphicUpdateSymbolHandler(e,t){let n=t.graphic,r=e==null?t.oldValue==null?null:this._symbols.get(t.oldValue.id):e.graphics3DSymbol;if(r==null||t.newValue==null){this._recreateGraphic(n);return}let i=r.symbol,a=this._getConvertedSymbol(t.newValue);if(a!=null&&(a.type!==i.type||a.type===`web-style`)||i.type===`web-style`){this._recreateGraphic(n);return}let o=this._graphicsBySymbol.get(i.id);if(o&&o.size!==1){this._recreateGraphic(n);return}let s=b(i,a);if(s==null){this._updateSymbolMapping(i.id,a);return}let c={diff:s,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(c),!re(c.diff)){this._recreateGraphic(n);return}let l=this._getRenderingInfo(n,!1);if(l==null){this._recreateGraphic(n);return}let u=r.extentPadding;for(let e of c.symbolStatePatches)e();if(u!==r.extentPadding&&this._recomputeExtentPadding(),e!=null)for(let t of c.graphics3DGraphicPatches)t(e,l);this._updateSymbolMapping(i.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===1&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){let t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),this._graphicsWaitingForSymbol.size===1&&this.notifyChange(`dataUpdating`),t}_endGraphicUpdate(e,t){e&&(t&&this._graphicStateTracking?.updateGraphicError(e,t),this._graphicsWaitingForSymbol.delete(e.uid),this._graphicsWaitingForSymbol.size===0&&(this._cleanupSymbols(),this.notifyChange(`dataUpdating`)))}_recomputeExtentPadding(){let e=0;this._symbols.forEach(t=>{t!=null&&(e=Math.max(e,t.extentPadding))}),this._set(`extentPadding`,e)}_expandComputedExtent(e){let t=We,n=e.spatialReference;j(e,t);let r=this._viewSpatialReference,i=J.tmpVec;if(de(n,r)||O(t[0],t[1],0,n,i,r)&&(t[0]=i[0],t[1]=i[1],O(t[3],t[4],0,n,i,r),t[3]=i[0],t[4]=i[1]),!isFinite(t[0])||!isFinite(t[3])||!isFinite(t[1])||!isFinite(t[4]))return;let a=this.computedExtent,o=null,s=isFinite(t[2])&&isFinite(t[5]),c=s&&(a?.zmin==null||t[2]<a.zmin),l=s&&(a?.zmax==null||t[5]>a.zmax);a?(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||c||l)&&(o=this._propertiesPool.get(`computedExtent`),o.xmin=Math.min(t[0],a.xmin),o.ymin=Math.min(t[1],a.ymin),o.xmax=Math.max(t[3],a.xmax),o.ymax=Math.max(t[4],a.ymax),o.spatialReference=r):(o=this._propertiesPool.get(`computedExtent`),o.xmin=t[0],o.ymin=t[1],o.xmax=t[3],o.ymax=t[4],o.spatialReference=r),o&&(c&&(o.zmin=t[2]),l&&(o.zmax=t[5]),this._set(`computedExtent`,o))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&=(this._elevationInfoChangeAbortController.abort(),null)}async elevationInfoChange(){this._abortElevationInfoChange();let e=new AbortController;this._elevationInfoChangeAbortController=e;let t=H(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await U(t,this._viewSpatialReference,e.signal,i.getLogger(this)),d(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol((e,t,n)=>{e.globalPropertyChanged(`elevationInfo`,t)?t?.forEach(e=>{let t=e.graphic,n=e.labelLayers;for(let e of n)e.graphics3DSymbolLayer.graphics3DGraphicLayerElevationInfoChanged(t,e)}):this._recreateSymbol(n)}),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo?.mode===`relative-to-scene`||this._numberOfGraphicsProvidingElevation===0)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=c(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&this.layer.elevationInfo.mode!==`relative-to-scene`)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new Me({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register(2,this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),this._filterVisibility!=null&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&=(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),c(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;let{loadedGraphics:t,view:n}=this.owner,r=n.basemapTerrain?.tilingScheme&&t?.length?t.toArray():null;(e||!r)&&this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=W(this.layer.screenSizePerspectiveEnabled),this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set(`computedExtent`,null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){let t=this._graphicsBySymbol.get(e),n=[];t&&(t.forEach((e,t)=>{this._conditionalRemove(e,t),this._spatialIndex?.remove(e),n.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,e),this._updateLayerVisibility(),this._featureStore.events.emit(`changed`),this.owner.notifyContentGeometryUpdate?.()}),this._graphicsBySymbol.set(e,new Map));let r=this._symbols.get(e);c(r),this._symbols.delete(e),this._symbolMaterials=null,c(this._unusedSymbolsCache.pop(e)),this.add(n)}_recreateGraphicsForSymbol(e){let t=this._graphicsBySymbol.get(e);if(t){let e=[];t.forEach(t=>e.push(t.graphic)),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),this._graphicStateTracking!=null&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&e.length!==0&&(this.owner.view.basemapTerrain?.tilingScheme?(this._updatePolicyForGraphics(e)===0?this._addDelayed(e):this._addImmediate(e),this.notifyChange(`dataUpdating`)):i.getLogger(this).error(`#add()`,`Cannot add graphics before terrain surface has been initialized`))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===1&&(this.layer.geometryType===`mesh`||this.layer.geometryType==null)){for(let t of e)if(t.geometry!=null&&t.geometry.type===`mesh`&&!t.geometry.loaded)return 0}return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(let t of e)this._addGraphic(t,this._getRenderingInfo(t),1);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_addDelayed(e){for(let t of e){let e=t.uid,n=this._pendingUpdates.get(e);n?n.add?n.state!==0&&n.abortController?.abort():this._pendingAdds++:(n=new Z,this._pendingAdds++,this._pendingUpdates.set(e,n)),n.add=t}this.notifyChange(`readyToRun`),this.notifyChange(`updatingRemaining`),this.notifyChange(`dataUpdating`)}remove(e){this.effectiveUpdatePolicy===0?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange(`dataUpdating`)}_removeImmediate(e){for(let t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_removeDelayed(e){for(let t of e){let e=t.uid,n=this._pendingUpdates.get(e);if(n)n.add&&(n.remove?n.add=null:this._pendingUpdates.delete(e),n.state===1&&n.abortController?.abort(),this._pendingAdds--);else{let n=new Z;n.remove=t,this._pendingUpdates.set(e,n),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}this._pendingUpdates.size===0&&this._finishPendingUpdates(),this.notifyChange(`readyToRun`),this.notifyChange(`updatingRemaining`),this.notifyChange(`dataUpdating`)}_finishPendingUpdates(){this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&i.getLogger(this).warn(`pendingAdds/Removes in inconsistent state!`),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyFocusAreasUpdates(e){for(;this._focusAreasGraphicsQueue.length>0&&!e.done;){e.madeProgress();let t=this._focusAreasGraphicsQueue.pop(),n=ke(t.graphic.geometry);if(n==null)continue;let r=this.stage.view.focusAreasView?.containsGeometry(n)??!0;t.layers.forEach(e=>{(e?.type===`object3d`||e?.type===`buffer`)&&e.stageObject.geometries.some(e=>e.material instanceof Le&&e.material.parameters.focusAreaStyle==null!==r)&&this.recreateGraphics([t.graphic])})}this._focusAreasGraphicsQueue.length===0&&this.notifyChange(`readyToRun`)}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,this._pendingUpdates.size===0&&this._spatialIndex?.updating)this._spatialIndex.update(),e.madeProgress();else{if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(let[t,n]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(n.remove&&!n.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(n.remove),n.remove=null,this._pendingUpdates.delete(t),this._pendingRemoves===0))break}}for(let[t,n]of this._pendingUpdates){if(e.done)break;n.add&&n.state===0&&this._processPendingUpdateNew(n);let r=this.effectiveUpdatePolicy;if(n.remove&&(!n.add||n.state===2)&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(n.remove),n.remove=null,r=1),n.add)switch(n.state){case 2:this._addGraphic(n.add,n.renderingInfo,r),n.add=null,this._pendingAdds--,e.madeProgress();break;case 3:n.add=null,this._pendingAdds--}n.remove==null&&n.add==null&&this._pendingUpdates.delete(t)}this._pendingUpdates.size===0&&(this._finishPendingUpdates(),this.notifyChange(`readyToRun`),this.notifyChange(`dataUpdating`))}}_processPendingUpdateNew(e){if(!e.add){e.state=2;return}let t=e.add.geometry;t!=null&&t.type===`mesh`&&!t.loaded?this._processPendingUpdateNewMesh(e,t):this._processPendingUpdateNewRenderingInfo(e)}async _processPendingUpdateNewMesh(e,t){e.state=1,e.abortController=new AbortController;let n=e.abortController.signal;try{await t.load({signal:n})}catch(t){return this._processPendingUpdateNewError(e,t)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,e.state=p(t)?0:3}async _processPendingUpdateNewRenderingInfo(e){if(this.layer.renderer==null||this.layer.renderer.type!==`dictionary`){e.renderingInfo=this._getRenderingInfo(e.add),e.state=2;return}e.state=1,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(t){e.abortController=null,e.state=p(t)?0:3;return}t?.symbol==null?(this._symbolWarningLogged||(this._symbolWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=2}_addGraphic(e,t,n){if(this._graphicsWithoutSymbol.set(e.uid,e),t?.symbol==null||!M(e))return;let r=this.stage.renderView.olidRenderHelper;if(r&&this.setUidToIdOnAdd){let t=R(this.owner.view,this.owner.layerViewUid);r.setUidToObjectAndLayerId(A(e,this._objectIdField),e.uid,this.layer.id,this.owner.layerViewUid,fe(this.layer)&&!!this.layer.popupEnabled&&!t&&Re(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}let i=t.symbol,a=this.getOrCreateGraphics3DSymbol(i,t.renderer);if(a==null)return;this._expandComputedExtent(e.geometry);let o=this._beginGraphicUpdate(e),s=new Se(e,t,this.layer,this.reportGraphicSourceMemory),c=!1,l=e=>{e===a.symbol.id&&(c=!0)};this._whenSymbolRemoved.push(l);let u=()=>{if(--this._loadingSymbols,!this.destroyed){if(this._whenSymbolRemoved.removeUnordered(l),this._graphicsWaitingForSymbol.get(e.uid)===o&&!c&&!a.destroyed&&(!this.graphicSymbolSupported||!e.symbol||e.symbol.id===a.symbol.id)){let t=this._createGraphics3DGraphic(a,s);this._spatialIndex&&t!=null&&this._spatialIndex.add(t),--a.referenced,this._endGraphicUpdate(e)}else--a.referenced,this._cleanupSymbols();this._featureStore.events.emit(`changed`),this.owner.notifyContentGeometryUpdate?.(),this._labeler?.setDirty()}},d=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(l),c||(p(t)?this.add([e]):a.destroyed||this._endGraphicUpdate(e,t)))};++this._loadingSymbols,n===0?a.load(()=>this._dataUpdateQueue.push(u,null).catch(f),e=>this._dataUpdateQueue.push(()=>d(e),null).catch(f)):a.load(u,d)}_removeGraphic(e){let t=e.uid,n=this.graphics3DGraphics.get(t);if(n){n.graphics3DSymbol.onRemoveGraphic(n);let e=n.isElevationSource;this._conditionalRemove(n,t),this._spatialIndex?.remove(n);let r=n.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(r)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,n,e),n.destroy(),this._featureStore.events.emit(`changed`),this.owner.notifyContentGeometryUpdate?.()}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),this._graphicsWaitingForSymbol.size===0&&(this._cleanupSymbols(),this.notifyChange(`dataUpdating`))}_hasLabelingContext(e){if(e instanceof B||e instanceof me){let t=this.symbolCreationContext.layer;return t.labelingInfo?t.labelingInfo.some(t=>t.symbol===e):!1}return!1}_hasValidSymbolCreationContext(e){return e instanceof B&&!this._hasLabelingContext(e)?(i.getLogger(this).error(`LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported.`),!1):!0}_getRenderingInfo(e,t=!0){let n=e.geometry;if(n==null)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!oe(n.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&e.symbol!=null)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;let r=this.rendererRequiresHydratedGraphic?N(e,this.layer,null):e,a;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||this.currentRenderer!=null))a=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{let e=r.symbol||ge(r.geometry);a=new L(null,e)}return a?.symbol==null?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):a}_getRenderingInfoAsync(e,t){if(e.geometry==null)return this._geometryWarningLogged||(this._geometryWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&e.symbol!=null)return this._symbolWarningLogged||(this._symbolWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;let n=this.rendererRequiresHydratedGraphic?N(e,this.layer,null):e;return this.owner.getRenderingInfoAsync(n,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;let n=this._getConvertedSymbol(e);if(!n)return null;let r;if(t!=null&&`backgroundFillSymbol`in t&&t.backgroundFillSymbol){let e=V(t.backgroundFillSymbol,{ignoreDrivers:!0});e.symbol!=null&&(r=e.symbol.symbolLayers)}let i=we(n,this.symbolCreationContext,r);return i.load(()=>{let e=i.extentPadding;e>this.extentPadding&&this._set(`extentPadding`,e),this.notifyChange(`averageSymbolComplexity`)},()=>{}),i}getOrCreateGraphics3DSymbol(e,t){let n=this._symbols.get(e.id);return n===void 0&&(n=this._unusedSymbolsCache.pop(e.id)??(e instanceof he?new Te(e,e=>this._dataUpdateQueue.push(e,null),e=>this._createGraphics3DSymbol(e,t)):this._createGraphics3DSymbol(e,t)),this._symbols.set(e.id,n),this._symbolMaterials=null),n!=null&&++n.referenced,n}trackGraphicState(e){return this._graphicStateTracking??=new De(this),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,e.notifyMemoryChange=this._notifyMemoryChange,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,n=!1){t.notifyMemoryChange=void 0,this._usedMemory-=t.usedMemory,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,n&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){let{graphic:n}=t;if(this._graphicsWithoutSymbol.delete(n.uid),!this._symbols.has(e.symbol.id))return this.add([n]),null;if(this.graphics3DGraphics.has(n.uid))return null;let r=e.createGraphics3DGraphic(t);if(r==null)return null;this._addGraphics3DGraphic(r);let i=e.symbol.id;if(this._graphicsBySymbol.has(i)||this._graphicsBySymbol.set(i,new Map),this._graphicsBySymbol.get(i).set(n.uid,r),r.isDraped&&this._graphicsDrapedUids.add(n.uid),r.centroid=null,n.geometry!=null&&n.geometry.type!==`point`&&(r.centroid=Oe(n.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),this._scaleVisibility!=null&&this._scaleVisibility.updateVisibility(r),this._filterVisibility!=null){let{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(1,4,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),r.initialize(this.stageLayer),this._graphicStateTracking!=null&&this._graphicStateTracking.addGraphic(r);let a=this._whenGraphics3DGraphicRequests[n.uid];return a&&(delete this._whenGraphics3DGraphicRequests[n.uid],a.resolve(r)),this._symbolMaterials=null,r}async rendererChange(e){if(this._rendererChangeAbortController=o(this._rendererChangeAbortController),e!==this.currentRenderer){if(this._validateRenderer(e),e??this._currentRendererChange(null,!1),!F(e))this._currentRendererChange(e,!1);else if(e?.arcadeRequired){let t=new AbortController;this._rendererChangeAbortController=t;let{arcadeUtils:n}=await this._ensureArcade();d(t);let r=n.hasGeometryOperations(e),i=r||await this._rendererUsesFieldsRequiringArcadeTypeConversion(e);d(t),r&&(await n.enableGeometryOperations(),d(t)),this.effectiveUpdatePolicy===0?await this._updateQueue.push(()=>this._currentRendererChange(e,i),t.signal):this._currentRendererChange(e,i),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===0){let t=new AbortController;this._rendererChangeAbortController=t,await this._updateQueue.push(()=>this._currentRendererChange(e,!1),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1)}}async _ensureArcade(){return this._arcadeOnDemand??=await z(),this._arcadeOnDemand}async _rendererUsesFieldsRequiringArcadeTypeConversion(e){let{fieldsIndex:t}=this.layer;return t!=null&&(await e.getRequiredFields(t)).some(e=>{switch(t.get(e)?.type){case`date`:case`date-only`:case`time-only`:case`timestamp-offset`:return!0;default:return!1}})}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererRequiresHydratedGraphic=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;let n=this.symbolCreationContext.renderer;if(e===n)return;if(this._symbolConversionCache.clear(),this._unusedSymbolsCache.clear(),e==null){this.symbolCreationContext.renderer=null,this.recreateAllGraphicsAndSymbols();return}let r=b(n,e);this._updateUnchangedSymbolMappings(r,e,n),this.symbolCreationContext.renderer=e,r!=null&&(r.type===`complete`?this.recreateAllGraphicsAndSymbols():r.type===`partial`&&(this._applyRendererDiff(r,e,n)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange(`averageSymbolComplexity`))}_diffHasSymbolChange(e){for(let t in e.diff)switch(t){case`visualVariables`:case`defaultSymbol`:case`uniqueValueInfos`:break;case`uniqueValueGroups`:case`authoringInfo`:case`fieldDelimiter`:delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,n){e||=[],t||=[];let r=[];for(let i of t){let t=this._graphicsBySymbol.get(i.id);t&&t.forEach((a,o)=>{let s=a.graphic,c=this.layer instanceof pe?this.layer:null,l=this._arcadeOnDemand;if(i===n.defaultSymbol&&n.getSymbol(N(s,c,null),{arcade:l})===n.defaultSymbol)return;e.length||n.defaultSymbol?r.push(s):this._graphicsWithoutSymbol.set(o,s);let u=this.graphics3DGraphics.get(o);this._conditionalRemove(u,o),a.destroy(),t.delete(o),this._removeGraphics3DGraphic(o,u),this._updateLayerVisibility()}),this._whenSymbolRemoved.forAll(e=>e(i.id))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach(e=>r.push(e)),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_applyUniqueValueRendererDiff(e,t,r){let i=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(i||a){let o=a?.changed,s=a?.unchanged;if(o&&s&&o.some(e=>s.some(t=>t.oldValue.symbol?.id===e.oldValue.symbol?.id)))return!1;let c=a?a.added.map(e=>e.symbol).filter(n):[],l=a?a.removed.map(e=>e.symbol).filter(n):[];if(o)for(let e=0;e<o.length;e++)c.push(o[e].newValue.symbol),l.push(o[e].oldValue.symbol);return i?(r.defaultSymbol&&l.push(r.defaultSymbol),t.defaultSymbol&&c.push(t.defaultSymbol)):r.defaultSymbol&&c.length&&l.push(t.defaultSymbol),this._applySymbolSetDiff(c,l,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,n){if(t?.type!==`unique-value`||n?.type!==`unique-value`||e!=null&&e.type!==`partial`)return[];let r=e=>e==null?null:e.id,i=e&&e.diff,a=i?.defaultSymbol,o=i&&i.uniqueValueInfos,s;if(o)s=o.unchanged.map(e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)}));else{s=[];for(let e of n.uniqueValueInfos??[]){let n=r(e.symbol),i=t.uniqueValueInfos?.find(t=>t.value===e.value);i&&n!==r(i.symbol)&&s.push({oldId:n,newId:r(i.symbol)})}}return!a&&n.defaultSymbol&&s.push({oldId:r(n.defaultSymbol),newId:r(t.defaultSymbol)}),s}_updateSymbolMapping(e,t){let n=t!=null&&t?typeof t==`string`?t:t.id:null;if(e==null||e===n)return;let r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),r!==void 0&&this._graphicsBySymbol.set(n,r);let i=this._symbols.get(e);if(i!==void 0&&(this._symbols.delete(e),this._symbols.set(n,i),this._symbolMaterials=null,i!=null)){let e=typeof t==`string`?null:t;e==null?i.symbol.id=n:i.symbol=e}}_updateUnchangedSymbolMappings(e,t,n){let r=this._calculateUnchangedSymbolMapping(e,t,n);for(let{oldId:e,newId:t}of r)this._updateSymbolMapping(e,t)}_applyRendererDiff(e,t,n){if(this._diffHasSymbolChange(e))return!1;if(t instanceof P&&n instanceof P&&this._applyUniqueValueRendererDiff(e,t,n)&&Object.keys(e.diff).length===0)return!0;for(let n of this._graphicsBySymbol.keys()){let r=this._symbols.get(n);if(r!=null)switch(r.applyRendererDiff(e,t)){case 0:this._recreateSymbol(n);break;case 1:this._recreateGraphicsForSymbol(n)}}return!0}opacityChange(){this._updateStageLayerVisibility(),this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged(`opacity`,t))}_screenSizePerspectiveEnabledChange(){this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged(`screenSizePerspectiveEnabled`,t)),this._labeler?.screenSizePerspectiveEnabledChanged(),this._deconflictor?.screenSizePerspectiveEnabledChanged()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged(`slicePlaneEnabled`,t)),this._deconflictor?.slicePlaneEnabledChange(),this._labeler?.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol((e,t,n)=>{e.globalPropertyChanged(`physicalBasedRenderingEnabled`,t)||this._recreateSymbol(n)})}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol((e,t,n)=>{e.globalPropertyChanged(`skipHighSymbolLods`,t)||this._recreateSymbol(n)})}_pixelRatioChange(){this.forEachGraphics3DSymbol((e,t,n)=>{e.globalPropertyChanged(`pixelRatio`,t)||this._recreateSymbol(n)})}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=v(()=>{this._updatingPendingLoadedGraphicsChange=null})}setClippingExtent(e,t){let n=this.symbolCreationContext.clippingExtent,r=ue();return Ne(e,r,t)?this.symbolCreationContext.clippingExtent=ce(k(),r):this.symbolCreationContext.clippingExtent=null,!le(this.symbolCreationContext.clippingExtent,n)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach(n=>{e(n)&&(t=!0)}),t&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}forEachGraphics3DSymbol(e,t){for(let[t,n]of this._symbols){if(n==null)return;e(n,this._graphicsBySymbol.get(t)||Ke,t)}if(!t?.excludeUnused)for(let t of this._unusedSymbolsCache)e(t,void 0,t.symbol.id)}updateGraphicsVisibilities(){this._filterVisibility!=null&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities(e=>{let t=this._updateUserVisibility(e),n=!!this._scaleVisibility?.updateVisibility(e);return t||n})}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities(e=>e.setVisibilityFlag(1,1,!1))}_validateRenderer(e){let t=()=>`'${this.layer.title?`${this.layer.title}, `:``}id:${this.layer.id}'`,n=I(e,{geometryType:this.layer?.geometryType,logWarning:(e,n)=>i.getLogger(this).warn(e,`Symbology conversion for layer ${t()}: ${n}`)});if(n){let e=`Renderer for layer ${t} is not supported in a SceneView`;i.getLogger(this).warn(e,n.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach((t,n)=>{if(t==null||t.referenced>0)return;let r=this._graphicsBySymbol.get(n);r&&r.size!==0||(this._graphicsBySymbol.delete(n),this._symbols.delete(n),this._symbolMaterials=null,this._unusedSymbolsCache.put(n,t,l),e=!0)}),e&&(this._recomputeExtentPadding(),this.notifyChange(`averageSymbolComplexity`))}get test(){}get performanceInfo(){return new Ee(this.graphics3DGraphics.size,this.graphics3DGraphics.values().reduce((e,t)=>e+ +!!t.isVisible(),0),this._graphicsWithoutSymbol.size,this._pendingUpdates.size)}};e([y({readOnly:!0})],X.prototype,`computedExtent`,void 0),e([y()],X.prototype,`currentRenderer`,void 0),e([y()],X.prototype,`rendererRequiresHydratedGraphic`,void 0),e([y()],X.prototype,`_frameTaskHandle`,void 0),e([y()],X.prototype,`_dataUpdateQueue`,void 0),e([y()],X.prototype,`_updateQueue`,void 0),e([y({readOnly:!0})],X.prototype,`_viewSpatialReference`,null),e([y()],X.prototype,`_rendererChangeAbortController`,void 0),e([y()],X.prototype,`_elevationInfoChangeAbortController`,void 0),e([y()],X.prototype,`_initializeAbortController`,void 0),e([y()],X.prototype,`_elevationAlignment`,void 0),e([y()],X.prototype,`_scaleVisibility`,void 0),e([y()],X.prototype,`_filterVisibility`,void 0),e([y()],X.prototype,`_initializePromise`,void 0),e([y()],X.prototype,`_spatialIndex`,void 0),e([y({readOnly:!0})],X.prototype,`extentPadding`,void 0),e([y()],X.prototype,`_updatingPendingLoadedGraphicsChange`,void 0),e([y()],X.prototype,`_featureStore`,void 0),e([y()],X.prototype,`_objectStates`,void 0),e([y()],X.prototype,`_loadingSymbols`,void 0),e([y({constructOnly:!0})],X.prototype,`compressionTracker`,void 0),e([y()],X.prototype,`preferredUpdatePolicy`,void 0),e([y()],X.prototype,`_forcedUpdatePolicy`,void 0),e([y({readOnly:!0})],X.prototype,`effectiveUpdatePolicy`,null),e([y({constructOnly:!0})],X.prototype,`elevationFeatureExpressionEnabled`,void 0),e([y({constructOnly:!0})],X.prototype,`owner`,void 0),e([y({constructOnly:!0})],X.prototype,`layer`,void 0),e([y({constructOnly:!0})],X.prototype,`graphicSymbolSupported`,void 0),e([y({constructOnly:!0})],X.prototype,`getRenderingInfoWithoutRenderer`,void 0),e([y({constructOnly:!0})],X.prototype,`componentFactories`,void 0),e([y({constructOnly:!0})],X.prototype,`setUidToIdOnAdd`,void 0),e([y({constructOnly:!0})],X.prototype,`reportGraphicSourceMemory`,void 0),e([y()],X.prototype,`featureStore`,null),e([y()],X.prototype,`initializePromise`,null),e([y()],X.prototype,`scaleVisibility`,null),e([y()],X.prototype,`elevationAlignment`,null),e([y()],X.prototype,`objectStates`,null),e([y()],X.prototype,`filterVisibility`,null),e([y({readOnly:!0})],X.prototype,`updating`,null),e([y({readOnly:!0})],X.prototype,`dataUpdating`,null),e([y({readOnly:!0})],X.prototype,`readyToRun`,null),e([y({readOnly:!0})],X.prototype,`suspendedOrOutsideOfView`,null),e([y({readOnly:!0})],X.prototype,`updatingRemaining`,null),e([y({readOnly:!0})],X.prototype,`displayFeatureLimit`,null),e([y({readOnly:!0})],X.prototype,`averageSymbolComplexity`,null),e([y({constructOnly:!0})],X.prototype,`hasZ`,void 0),e([y({constructOnly:!0})],X.prototype,`hasM`,void 0),e([y()],X.prototype,`_objectIdField`,null),X=J=e([ne(`esri.views.3d.layers.graphics.Graphics3DCore`)],X);class Z{constructor(){this.add=null,this.renderingInfo=null,this.state=0,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=0,this.abortController=null,this.remove=null}}const Ge=10,Q=T(),$=T(),Ke=new Map;export{X as Graphics3DCore};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{isSome as n}from"../../../../core/arrayUtils.js";import r from"../../../../core/Error.js";import"../../../../core/has.js";import i from"../../../../core/Logger.js";import{findInMap as a}from"../../../../core/MapUtils.js";import{abortMaybe as o,removeMaybe as s,destroyMaybe as c}from"../../../../core/maybe.js";import{MinPriority as l}from"../../../../core/MemCache.js";import u from"../../../../core/PooledArray.js";import{throwIfAborted as d,ignoreAbortErrors as f,isAbortError as p}from"../../../../core/promiseUtils.js";import m from"../../../../core/Queue.js";import{when as h,watch as g,on as ee,syncAndInitial as te,whenOnce as _}from"../../../../core/reactiveUtils.js";import{schedule as v}from"../../../../core/scheduling.js";import{property as y,subclass as ne}from"../../../../core/accessorSupport/decorators.js";import{diff as b,isEmpty as re}from"../../../../core/accessorSupport/diffUtils.js";import{runUntracked as x}from"../../../../core/accessorSupport/tracking.js";import{set as S,add as C,scale as w}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as T}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import ie from"../../../../geometry/Extent.js";import ae from"../../../../geometry/Point.js";import{canProjectWithoutEngine as oe}from"../../../../geometry/projectionUtils.js";import{projectBuffer as E}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as D}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as O}from"../../../../geometry/projection/projectXYZToVector.js";import{center as se,fromRect as ce,create as k,equals as le}from"../../../../geometry/support/aaBoundingBox.js";import{create as ue}from"../../../../geometry/support/aaBoundingRect.js";import{equals as de}from"../../../../geometry/support/spatialReferenceUtils.js";import{isPopupProvider as fe}from"../../../../graphic/getPopupProvider.js";import pe from"../../../../layers/Layer.js";import{getObjectId as A,computeAABB as j,hasGeometry as M}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as N}from"../../../../layers/graphics/hydratedFeatures.js";import P from"../../../../renderers/UniqueValueRenderer.js";import{isSupportedRenderer3D as F,validateTo3D as I}from"../../../../renderers/support/rendererConversion.js";import{RenderingInfo as L}from"../../../../renderers/support/RenderingInfo.js";import{isBasemapLayerView as R}from"../../../../support/basemapUtils.js";import{loadArcade as z}from"../../../../support/loadArcade.js";import B from"../../../../symbols/LabelSymbol3D.js";import me from"../../../../symbols/TextSymbol.js";import he from"../../../../symbols/WebStyleSymbol.js";import{getDefaultSymbol3D as ge}from"../../../../symbols/support/defaults3D.js";import{to3D as V}from"../../../../symbols/support/symbolConversion.js";import{aggregateSymbolComplexity as _e,defaultSymbolComplexity as ve}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as ye}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as be}from"./ElevationQuery.js";import{extractExpressionInfo as H,createContext as U}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as xe}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as Se}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as Ce}from"./Graphics3DSymbolCreationContext.js";import{make as we}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as Te}from"./Graphics3DWebStyleSymbol.js";import{GraphicsCorePerformanceInfo as Ee}from"./GraphicsCorePerformanceInfo.js";import{GraphicStateTracking as De}from"./GraphicStateTracking.js";import{computeCentroid as Oe}from"./graphicUtils.js";import{placePointOnGeometry as ke}from"./pointUtils.js";import{SpatialIndex2D as Ae}from"./SpatialIndex2D.js";import{AggregateSymbolComplexity as je}from"./SymbolComplexity.js";import{StageLayerElevationProvider as Me}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as Ne}from"../../support/extentUtils.js";import{affectsGeometry as Pe}from"../../webgl-engine/lib/affectsGeometry.js";import{GridLocalOriginFactory as Fe}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{isScreenSizePerspectiveEnabled as W}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{WebGLLayer as Ie}from"../../webgl-engine/lib/WebGLLayer.js";import{HUDMaterial as Le}from"../../webgl-engine/materials/HUDMaterial.js";import{hasPopupTemplate as Re}from"../../../layers/support/popupUtils.js";import{PromiseQueue as G}from"../../../support/PromiseQueue.js";import{PropertiesPool as ze}from"../../../support/PropertiesPool.js";import{ImmediateTask as K,noBudget as Be,TaskPriority as Ve}from"../../../support/Scheduler.js";import{TextureCompressionTracker as He}from"../../../support/TextureCompressionTracker.js";import{Yield as Ue}from"../../../support/Yield.js";import{alphaCutoff as q}from"../../../../webscene/support/AlphaCutoff.js";var J;const Y=T(),We=k();let X=class extends t{static{J=this}static{this.tmpVec=T()}get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new Ae({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get deconflictor(){return this._deconflictor}get labeler(){return this._labeler}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return this.currentRenderer!=null&&this.currentRenderer.type===`dictionary`?0:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this.dataUpdating||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._frameTaskHandle.updating||this._updateQueue.updating||this.readyToRun)}get dataUpdating(){return!!(this._graphicsWaitingForSymbol.size>0||this._pendingUpdates.size>0||this._spatialIndex?.updating||this._updatingPendingLoadedGraphicsChange||this._dataUpdateQueue.updating||this._loadingSymbols>0||this.compressionTracker.compressing)}get readyToRun(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating||this._dataUpdateQueue.readyToRun||this._updateQueue.readyToRun||this._focusAreasGraphicsQueue.length>0}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return x(()=>this.updating?this._pendingUpdates.size+(this._spatialIndex?.updatingRemaining||0)*.1+(this._elevationAlignment?.updatingRemaining||0)*.1:0)}get displayFeatureLimit(){let e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,n=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,i=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,o=Math.max(1,a?.verticesPerFeature??1),s=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:n,c=Math.ceil(i/o),l=Math.max(t,Math.min(n,c,s)),u=this._get(`displayFeatureLimit`);return u&&u.maximumTotalNumberOfVertices===i&&u.averageSymbolComplexity===a&&u.maximumNumberOfFeatures===l?u:new ye(i,l,a)}get averageSymbolComplexity(){return x(()=>{let e=this._averageSymbolComplexities,t=this._get(`averageSymbolComplexity`);return e.numComplexities===0||t!=null&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e})}get _averageSymbolComplexities(){let e=this._totalSymbolComplexities;return e.numComplexities>0&&(e.verticesPerFeature/=e.numComplexities,e.verticesPerCoordinate/=e.numComplexities,e.drawCallsPerFeature/=e.numComplexities,e.memory.bytesPerFeature/=e.numComplexities,e.memory.bytesPerFeatureLabel/=e.numComplexities,e.memory.resourceBytes/=e.numComplexities,e.memory.draped.bytesPerFeature/=e.numComplexities,e.memory.draped.bytesPerFeatureLabel/=e.numComplexities),e}get _totalSymbolComplexities(){let e=new je;return this._forEachSymbolComplexity(t=>_e(t,e)),e}get usedMemory(){let e=this.labelsEnabled?(this.averageSymbolComplexity?.memory.bytesPerFeatureLabel??0)*this._numberOfGraphics:0,t=0;if(this._forEachSymbolComplexityUsed(e=>t+=e?.memory.resourceBytes??0),this._symbolMaterials==null){this._symbolMaterials=[];for(let e of this._symbols.values())if(e!=null){for(let t of e.symbolLayers)if(t)for(let e of t.materials)e&&this._symbolMaterials.push(e)}}let n=this.owner.view.stage.renderer,r=this.owner.view.overlayManager.renderer,i=this._symbolMaterials.reduce((e,t)=>e+((n.getMaterialRenderer(t)||r.getMaterialRenderer(t))?.usedMemory??0),0);return this._usedMemory+e+t+i}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){let e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(this.averageSymbolComplexity!=null){let e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}_forEachSymbolComplexity(e){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(e):this._forEachSymbolComplexityUsed(e)}get visible(){return this._visible}_getConvertedSymbol(e){let t=e;if(t.type===`web-style`)return t.clone();let n=this._symbolConversionCache.get(t.id);if(n!=null)return n;let r=V(t,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(t),cimFallbackEnabled:!0}),a=r.symbol||null;return a==null&&r.error&&i.getLogger(this).error(r.error.message),this._symbolConversionCache.set(t.id,a),a}_getSymbolComplexitiesUsedOrRenderer(e){let t=this.currentRenderer;if(t==null)return;let n=t.symbols,r=`backgroundFillSymbol`in t?t.backgroundFillSymbol:null;if(!r&&!n.length)return;let i=this._getSymbolComplexityUsedOrRenderer(r);i!=null&&e(i);for(let t of n){let n=this._getSymbolComplexityUsedOrRenderer(t);n!=null&&e(n)}}_getSymbolComplexityUsedOrRenderer(e){if(e==null)return null;let t=this._symbols.get(e.id);if(t!=null)return t.complexity;let n=this._getConvertedSymbol(e);return n==null?null:ve(n)}_forEachSymbolComplexityUsed(e){this._symbols.forEach(t=>{e(t?.complexity)})}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new ze({computedExtent:()=>new ie},this),this.computedExtent=null,this.currentRenderer=null,this.rendererRequiresHydratedGraphic=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTaskHandle=K,this._dataUpdateQueue=new G,this._updateQueue=new G,this._focusAreasGraphicsQueue=new m,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._elevationAlignment=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this.compressionTracker=new He,this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new u,this.preferredUpdatePolicy=1,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.reportGraphicSourceMemory=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this._notifyMemoryChange=e=>{this._usedMemory+=e},this._unusedSymbolsCache=e.owner.view.resourceController.memoryController.newCache(`graphics-3d-unused-symbols`,e=>e.destroy()),this.symbolCreationContext=new Ce(e.owner.view.resourceController.scheduler,(e,t)=>this._updateQueue.push(e,t),e.owner.layerViewUid,this.compressionTracker)}initialize(){this._featureStore=new xe({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});let e=(e,t,n)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,n),{componentFactories:t}=this;this._elevationAlignment=t.elevationAlignment?.(this,e),this._scaleVisibility=t.scaleVisibility?.(this,e),this._filterVisibility=t.filterVisibility?.({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities(t=>t.setVisibilityFlag(1,4,e(A(t.graphic,this._objectIdField)))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities(t=>t.setVisibilityFlag(1,4,e)),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities(e=>e.setVisibilityFlag(1,4,!0))}),this._deconflictor=t.deconflictor?.(this),this._labeler=t.labeler?.(this,this._scaleVisibility),this._objectStates=t.objectStates?.(this),this._initializeAbortController=new AbortController,this.addHandles(h(()=>this.owner.view.state.highlights,()=>{let{highlightOrderMap:e}=this.owner.view.state;this.graphics3DGraphics.forEach(t=>t.updateHighlights(e))})),this._initializePromise=this._initializeAsync()}async _initializeAsync(){let e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new be(this._viewSpatialReference,t),this._initializeStage(t,this.owner.layerViewUid);let n=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=n,this.currentRenderer!=null&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new Fe(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e),this.symbolCreationContext.focusAreaStyle=t.map?.focusAreas.style??null;let r=H(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await U(r,this._viewSpatialReference,e,i.getLogger(this)),d(e),this.symbolCreationContext.screenSizePerspectiveEnabled=W(this.layer.screenSizePerspectiveEnabled),this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,`drapeSourceType`in this.owner){let{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.overlayManager.registerGeometryDrapeSource(e)}this.addHandles([g(()=>this.suspendedOrOutsideOfView,()=>this._updateQueue.unshift(()=>this._updateLayerVisibility(),null).catch(f)),g(()=>W(this.layer?.screenSizePerspectiveEnabled),e=>{e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._screenSizePerspectiveEnabledChange())}),g(()=>this.owner.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(!!e)),g(()=>this.owner.view.state?.rasterPixelRatio,()=>this._pixelRatioChange()),g(()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,e=>this._physicalBasedRenderingChange(e)),g(()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,e=>this._skipHighSymbolLoDsChange(e)),g(()=>this.owner.view.focusAreasView?.polygons,()=>this._updateFocusedLabels()),g(()=>this.owner.view.timeZone,()=>{this.currentRenderer?.arcadeRequired&&this.recreateAllGraphics()}),g(()=>this.owner.view.map?.focusAreas.style,e=>{this.symbolCreationContext.focusAreaStyle=e??null,this.recreateAllGraphicsAndSymbols()}),h(()=>t.basemapTerrain?.tilingScheme,e=>{let n=t.groundView?.spatialReference;!e.spatialReference.equals(this.symbolCreationContext.overlaySR)&&n!=null&&(this.symbolCreationContext.overlaySR=n),this.hasHandles(`loaded-graphics`)?this.recreateAllGraphics():this.addHandles([ee(()=>this.owner?.loadedGraphics,`change`,e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()},{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],`loaded-graphics`)},{initial:!0}),g(()=>this.effectiveUpdatePolicy,e=>{this.stageLayer!=null&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===0,e===1&&this.runTask(Be)},te)]),this._frameTaskHandle=t.resourceController.scheduler.registerTask(Ve.GRAPHICS_CORE,this),this.layer&&`featureReduction`in this.layer&&this.addHandles(g(()=>this.layer.featureReduction,()=>this._deconflictor?.featureReductionChange())),this.notifyChange(`averageSymbolComplexity`),this.rendererChange(this.owner.renderer).catch(()=>{}),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController=o(this._initializeAbortController)}_updateFocusedLabels(){this._focusAreasGraphicsQueue.clear(),this.forEachGraphics3DSymbol((e,t)=>{t&&e.needsUpdateFocus&&t.forEach(e=>{this._focusAreasGraphicsQueue.push(e)})})}destroy(){if(this._unusedSymbolsCache.destroy(),this._abortInitialize(),this._rendererChangeAbortController=o(this._rendererChangeAbortController),this._abortElevationInfoChange(),this._frameTaskHandle.remove(),this._frameTaskHandle=K,this._dataUpdateQueue.cancelAll(),this._updateQueue.cancelAll(),this._deconflictor=s(this._deconflictor),this._labeler=s(this._labeler),this._elevationAlignment=c(this._elevationAlignment),this._scaleVisibility=c(this._scaleVisibility),this._filterVisibility=c(this._filterVisibility),this._objectStates=c(this._objectStates),this.clear(),`drapeSourceType`in this.owner){let{owner:e}=this;this.stage.view.overlayManager.unregisterDrapeSource(e)}this._featureStore=c(this._featureStore),this._updatingPendingLoadedGraphicsChange=s(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=c(this._graphicStateTracking),this.stage&&=(this.stageLayer=c(this.stageLayer),null),this._set(`owner`,null);for(let e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r(`graphic:layer-destroyed`,`Layer has been destroyed`));this._whenGraphics3DGraphicRequests=null,this._propertiesPool=c(this._propertiesPool),this._whenSymbolRemoved.prune(),this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=c(this._spatialIndex),this._symbolMaterials=null}clear(){this._objectStates?.allGraphicsDeleted(),this._graphicStateTracking!=null&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach(e=>e.destroy()),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(c),this._symbols.clear(),this._symbolMaterials&&=(this._symbolMaterials.length=0,null),this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange(`dataUpdating`),this.notifyChange(`readyToRun`),this.notifyChange(`updatingRemaining`),this._featureStore.events.emit(`changed`),this.owner.notifyContentGeometryUpdate?.()}_initializeStage(e,t){this.stage=e.stage,this.stageLayer=new Ie(this.stage,{visible:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);let n=this.stageLayer.events;n.on(`transformationChanged`,e=>this.notifyGraphicGeometryChanged(e.graphicUid)),n.on(`shaderTransformationChanged`,e=>this.notifyGraphicGeometryChanged(e.graphicUid)),n.on(`visibilityChanged`,e=>this.notifyGraphicVisibilityChanged(e.graphicUid)),n.on(`geometriesChanged`,e=>this.notifyGraphicGeometryChanged(e.object.graphicUid)),n.on(`attributesChanged`,e=>Pe(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid))}notifyGraphicGeometryChanged(e){if(this.owner.notifyContentGeometryUpdate?.(),this._graphicStateTracking==null||e==null)return;let t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(this.owner.notifyContentGeometryUpdate?.(),this._graphicStateTracking==null||e==null)return;let t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){let e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*Ge,n=!this.suspendedOrOutsideOfView&&!t;n!==this._visible&&(this._visible=n,this._updateStageLayerVisibility())}_updateStageLayerVisibility(){let e=this._visible&&(this.layer.opacity==null||this.layer.opacity>=q);this.stageLayer.visible!==e&&(this.stageLayer.visible=e,e?this.updateGraphicsVisibilities():this._hideAllGraphics(),this.owner.notifyContentGeometryUpdate?.())}getGraphics3DGraphicById(e){return e==null?void 0:this.graphics3DGraphics.get(e)}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return A(e,t)}get graphics3DGraphicsByObjectID(){let e=this.owner.layer?.objectIdField;if(!e)return;let t=new Map;return this.graphics3DGraphics.forEach(n=>{if(!n)return;let r=n.graphic,i=this._getGraphicObjectID(r,e);i!=null&&t.set(i,n)}),t}get labelsEnabled(){return!!this._labeler?.layerLabelsEnabled()}async updateLabelingInfo(e){let t=this._deconflictor?.labelingInfoChange(e),n=this._labeler?.labelingInfoChange(e);await Promise.allSettled([t,n])}updateVisibilityInfo(){this._deconflictor?.labelingInfoChange(),this._labeler?.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return`unknown`;let e=!1,t=!1;for(let[n,r]of this._symbols)if(r!=null)switch(r.getFastUpdateStatus()){case 3:return`unknown`;case 1:this._graphicsBySymbol.has(n)&&(t=!0);break;case 0:this._graphicsBySymbol.has(n)&&(e=!0);break;case 2:this._graphicsBySymbol.has(n)&&(t=e=!0)}return t?e?`mixed`:`fast`:e?`slow`:`mixed`}runTask(e){if(this._dataUpdateQueue.runTask(e),this._updateQueue.runTask(e),this._applyPendingUpdates(e),this._applyFocusAreasUpdates(e),this.notifyChange(`readyToRun`),this.readyToRun||this.notifyChange(`dataUpdating`),this.notifyChange(`updatingRemaining`),!e.hasProgressed)return Ue}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);let n=this._findGraphics3DGraphicByObjectId(e);n!=null&&this._updateUserVisibility(n)}_findGraphics3DGraphicByObjectId(e){return a(this.graphics3DGraphics,t=>this._getGraphicObjectID(t.graphic)===e)}_updateUserVisibility(e){if(e==null)return!1;let t=e.graphic,n=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&this.stageLayer.visible&&(n==null||!this._objectIdInvisibleSet.has(n));return e.setVisibilityFlag(1,1,r)}_whenGraphics3DGraphic(e){let t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);let n=this._whenGraphics3DGraphicRequests[e.uid];if(n)return n.promise;let r=Promise.withResolvers();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){let n=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,i=this.owner.view.groundView.spatialReference,a=(e,t,i)=>E(e,r,t,e,n,t,i),o=(e,t,r)=>E(e,i,t,e,n,t,r),s=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:t!=null&&!!t.useViewElevation,minDemResolution:t==null?null:t.minDemResolution,minDemResolutionForPoints:this.owner.view.resolution}:null,c=await e.getProjectedBoundingBox(a,o,s,t?.signal);if(!c)return null;let l=c.boundingBox;if(c.requiresDrapedElevation){let e=this.symbolCreationContext.elevationProvider;if(e){se(l,Y);let t=e.getElevation(Y[0],Y[1],0,n,`ground`)??0;l[2]=Math.min(l[2],t),l[5]=Math.max(l[5],t)}}return{boundingBox:l,screenSpaceObjects:c.screenSpaceObjects}}async whenGraphicBounds(e,t){await _(()=>this.owner?.loadedGraphics);let n=this.owner.layer?.objectIdField,i=this.owner.loadedGraphics.find(t=>t===e||n!=null&&t.attributes!=null&&e.attributes&&t.attributes[n]===e.attributes[n]);if(!i)throw new r(`internal:graphic-not-part-of-view`,`Graphic is not part of this view`);let a=await this._whenGraphics3DGraphic(i);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){let n=this.graphics3DGraphics.get(e.uid);if(!n)return null;let r=n.computeAttachmentOrigin();if(r.render.num===0&&r.draped.num===0)return null;S(Q,0,0,0);let i=0;if(r.render.num>0){if(!D(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,$,t))return null;C(Q,Q,$),i++}if(r.draped.num>0){let[e,n]=r.draped.origin,a=this.owner.view.groundView.spatialReference,o=this.owner.view.elevationProvider.getElevation(e,n,0,a,`ground`)??0;if(S($,e,n,o),!D($,a,$,t))return null;C(Q,Q,$),i++}return i>1&&w(Q,Q,1/i),new ae({x:Q[0],y:Q[1],z:Q[2],spatialReference:t})}getSymbolLayerSize(e,t){let n=this._symbols.get(e.id);if(n==null)throw new r(`internal:symbol-not-part-of-view`,`Symbol is not part of this view`);let i=e.symbolLayers.indexOf(t);if(i===-1)throw new r(`internal:missing-symbol-layer`,`Symbol layer is not in symbol`);let a=n.getSymbolLayerSize(i);if(a==null)throw new r(`internal:missing-size`,`Symbol layer has no valid size`);return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){let t=e.graphic.uid,n=this.graphics3DGraphics.get(t);if(n!=null||this._graphicsWithoutSymbol.get(t)!=null){switch(e.property){case`visible`:this._graphicUpdateVisibleHandler(n);break;case`geometry`:this._graphicUpdateGeometryHandler(n,e.graphic);break;case`symbol`:this._graphicUpdateSymbolHandler(n,e);break;case`attributes`:this.symbolCreationContext.featureExpressionInfoContext?.arcade?this._graphicUpdateGeometryHandler(n,e.graphic):n?.updateAttributes();break;case`popupTemplate`:break;case`origin-transform`:this._graphicUpdateTransformHandler(n,e)}this.owner.notifyContentGeometryUpdate?.()}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,()=>e!=null&&e.updateGeometry()&&(this._labeler?.updateGraphicGeometry(e)??!0)?(this._labeler?.setDirty(),this._deconflictor?.setDirty(),!0):!1);let n=t.geometry;n!=null&&this._expandComputedExtent(n)}_graphicUpdateTransformHandler(e,t){let n=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t.graphic,()=>t.newValue==null||e==null||n?.type!==`mesh`?!1:e.graphics3DSymbol.updateMeshTransform(e,n,t.newValue,()=>this.graphicUpdateHandler({...t,action:1}),t.action))}_graphicUpdateGeometryOrTransformHandler(e,t,n){if(t.geometry==null)this._recreateGraphic(t);else if(e==null){let e=t.symbol?.id;if(e){let t=this._symbols.get(e);if(t!=null&&t.loadStatus===0)return}this._recreateGraphic(t)}else if(!n()){let n=this._deconflictor?.getState(e);this._recreateGraphic(t);let r=this.graphics3DGraphics.get(t.uid);r&&n!=null&&this._deconflictor?.setState(r,n)}}_graphicUpdateSymbolHandler(e,t){let n=t.graphic,r=e==null?t.oldValue==null?null:this._symbols.get(t.oldValue.id):e.graphics3DSymbol;if(r==null||t.newValue==null){this._recreateGraphic(n);return}let i=r.symbol,a=this._getConvertedSymbol(t.newValue);if(a!=null&&(a.type!==i.type||a.type===`web-style`)||i.type===`web-style`){this._recreateGraphic(n);return}let o=this._graphicsBySymbol.get(i.id);if(o&&o.size!==1){this._recreateGraphic(n);return}let s=b(i,a);if(s==null){this._updateSymbolMapping(i.id,a);return}let c={diff:s,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(c),!re(c.diff)){this._recreateGraphic(n);return}let l=this._getRenderingInfo(n,!1);if(l==null){this._recreateGraphic(n);return}let u=r.extentPadding;for(let e of c.symbolStatePatches)e();if(u!==r.extentPadding&&this._recomputeExtentPadding(),e!=null)for(let t of c.graphics3DGraphicPatches)t(e,l);this._updateSymbolMapping(i.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===1&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){let t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),this._graphicsWaitingForSymbol.size===1&&this.notifyChange(`dataUpdating`),t}_endGraphicUpdate(e,t){e&&(t&&this._graphicStateTracking?.updateGraphicError(e,t),this._graphicsWaitingForSymbol.delete(e.uid),this._graphicsWaitingForSymbol.size===0&&(this._cleanupSymbols(),this.notifyChange(`dataUpdating`)))}_recomputeExtentPadding(){let e=0;this._symbols.forEach(t=>{t!=null&&(e=Math.max(e,t.extentPadding))}),this._set(`extentPadding`,e)}_expandComputedExtent(e){let t=We,n=e.spatialReference;j(e,t);let r=this._viewSpatialReference,i=J.tmpVec;if(de(n,r)||O(t[0],t[1],0,n,i,r)&&(t[0]=i[0],t[1]=i[1],O(t[3],t[4],0,n,i,r),t[3]=i[0],t[4]=i[1]),!isFinite(t[0])||!isFinite(t[3])||!isFinite(t[1])||!isFinite(t[4]))return;let a=this.computedExtent,o=null,s=isFinite(t[2])&&isFinite(t[5]),c=s&&(a?.zmin==null||t[2]<a.zmin),l=s&&(a?.zmax==null||t[5]>a.zmax);a?(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||c||l)&&(o=this._propertiesPool.get(`computedExtent`),o.xmin=Math.min(t[0],a.xmin),o.ymin=Math.min(t[1],a.ymin),o.xmax=Math.max(t[3],a.xmax),o.ymax=Math.max(t[4],a.ymax),o.spatialReference=r):(o=this._propertiesPool.get(`computedExtent`),o.xmin=t[0],o.ymin=t[1],o.xmax=t[3],o.ymax=t[4],o.spatialReference=r),o&&(c&&(o.zmin=t[2]),l&&(o.zmax=t[5]),this._set(`computedExtent`,o))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&=(this._elevationInfoChangeAbortController.abort(),null)}async elevationInfoChange(){this._abortElevationInfoChange();let e=new AbortController;this._elevationInfoChangeAbortController=e;let t=H(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await U(t,this._viewSpatialReference,e.signal,i.getLogger(this)),d(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol((e,t,n)=>{e.globalPropertyChanged(`elevationInfo`,t)?t?.forEach(e=>{let t=e.graphic,n=e.labelLayers;for(let e of n)e.graphics3DSymbolLayer.graphics3DGraphicLayerElevationInfoChanged(t,e)}):this._recreateSymbol(n)}),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo?.mode===`relative-to-scene`||this._numberOfGraphicsProvidingElevation===0)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=c(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&this.layer.elevationInfo.mode!==`relative-to-scene`)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new Me({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register(2,this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),this._filterVisibility!=null&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&=(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),c(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;let{loadedGraphics:t,view:n}=this.owner,r=n.basemapTerrain?.tilingScheme&&t?.length?t.toArray():null;(e||!r)&&this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=W(this.layer.screenSizePerspectiveEnabled),this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set(`computedExtent`,null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){let t=this._graphicsBySymbol.get(e),n=[];t&&(t.forEach((e,t)=>{this._conditionalRemove(e,t),this._spatialIndex?.remove(e),n.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,e),this._updateLayerVisibility(),this._featureStore.events.emit(`changed`),this.owner.notifyContentGeometryUpdate?.()}),this._graphicsBySymbol.set(e,new Map));let r=this._symbols.get(e);c(r),this._symbols.delete(e),this._symbolMaterials=null,c(this._unusedSymbolsCache.pop(e)),this.add(n)}_recreateGraphicsForSymbol(e){let t=this._graphicsBySymbol.get(e);if(t){let e=[];t.forEach(t=>e.push(t.graphic)),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),this._graphicStateTracking!=null&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&e.length!==0&&(this.owner.view.basemapTerrain?.tilingScheme?(this._updatePolicyForGraphics(e)===0?this._addDelayed(e):this._addImmediate(e),this.notifyChange(`dataUpdating`)):i.getLogger(this).error(`#add()`,`Cannot add graphics before terrain surface has been initialized`))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===1&&(this.layer.geometryType===`mesh`||this.layer.geometryType==null)){for(let t of e)if(t.geometry!=null&&t.geometry.type===`mesh`&&!t.geometry.loaded)return 0}return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(let t of e)this._addGraphic(t,this._getRenderingInfo(t),1);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_addDelayed(e){for(let t of e){let e=t.uid,n=this._pendingUpdates.get(e);n?n.add?n.state!==0&&n.abortController?.abort():this._pendingAdds++:(n=new Z,this._pendingAdds++,this._pendingUpdates.set(e,n)),n.add=t}this.notifyChange(`readyToRun`),this.notifyChange(`updatingRemaining`),this.notifyChange(`dataUpdating`)}remove(e){this.effectiveUpdatePolicy===0?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange(`dataUpdating`)}_removeImmediate(e){for(let t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_removeDelayed(e){for(let t of e){let e=t.uid,n=this._pendingUpdates.get(e);if(n)n.add&&(n.remove?n.add=null:this._pendingUpdates.delete(e),n.state===1&&n.abortController?.abort(),this._pendingAdds--);else{let n=new Z;n.remove=t,this._pendingUpdates.set(e,n),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}this._pendingUpdates.size===0&&this._finishPendingUpdates(),this.notifyChange(`readyToRun`),this.notifyChange(`updatingRemaining`),this.notifyChange(`dataUpdating`)}_finishPendingUpdates(){this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&i.getLogger(this).warn(`pendingAdds/Removes in inconsistent state!`),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyFocusAreasUpdates(e){for(;this._focusAreasGraphicsQueue.length>0&&!e.done;){e.madeProgress();let t=this._focusAreasGraphicsQueue.pop(),n=ke(t.graphic.geometry);if(n==null)continue;let r=this.stage.view.focusAreasView?.containsGeometry(n)??!0;t.layers.forEach(e=>{(e?.type===`object3d`||e?.type===`buffer`)&&e.stageObject.geometries.some(e=>e.material instanceof Le&&e.material.parameters.focusAreaStyle==null!==r)&&this.recreateGraphics([t.graphic])})}this._focusAreasGraphicsQueue.length===0&&this.notifyChange(`readyToRun`)}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,this._pendingUpdates.size===0&&this._spatialIndex?.updating)this._spatialIndex.update(),e.madeProgress();else{if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(let[t,n]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(n.remove&&!n.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(n.remove),n.remove=null,this._pendingUpdates.delete(t),this._pendingRemoves===0))break}}for(let[t,n]of this._pendingUpdates){if(e.done)break;n.add&&n.state===0&&this._processPendingUpdateNew(n);let r=this.effectiveUpdatePolicy;if(n.remove&&(!n.add||n.state===2)&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(n.remove),n.remove=null,r=1),n.add)switch(n.state){case 2:this._addGraphic(n.add,n.renderingInfo,r),n.add=null,this._pendingAdds--,e.madeProgress();break;case 3:n.add=null,this._pendingAdds--}n.remove==null&&n.add==null&&this._pendingUpdates.delete(t)}this._pendingUpdates.size===0&&(this._finishPendingUpdates(),this.notifyChange(`readyToRun`),this.notifyChange(`dataUpdating`))}}_processPendingUpdateNew(e){if(!e.add){e.state=2;return}let t=e.add.geometry;t!=null&&t.type===`mesh`&&!t.loaded?this._processPendingUpdateNewMesh(e,t):this._processPendingUpdateNewRenderingInfo(e)}async _processPendingUpdateNewMesh(e,t){e.state=1,e.abortController=new AbortController;let n=e.abortController.signal;try{await t.load({signal:n})}catch(t){return this._processPendingUpdateNewError(e,t)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,e.state=p(t)?0:3}async _processPendingUpdateNewRenderingInfo(e){if(this.layer.renderer==null||this.layer.renderer.type!==`dictionary`){e.renderingInfo=this._getRenderingInfo(e.add),e.state=2;return}e.state=1,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(t){e.abortController=null,e.state=p(t)?0:3;return}t?.symbol==null?(this._symbolWarningLogged||(this._symbolWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=2}_addGraphic(e,t,n){if(this._graphicsWithoutSymbol.set(e.uid,e),t?.symbol==null||!M(e))return;let r=this.stage.renderView.olidRenderHelper;if(r&&this.setUidToIdOnAdd){let t=R(this.owner.view,this.owner.layerViewUid);r.setUidToObjectAndLayerId(A(e,this._objectIdField),e.uid,this.layer.id,this.owner.layerViewUid,fe(this.layer)&&!!this.layer.popupEnabled&&!t&&Re(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}let i=t.symbol,a=this.getOrCreateGraphics3DSymbol(i,t.renderer);if(a==null)return;this._expandComputedExtent(e.geometry);let o=this._beginGraphicUpdate(e),s=new Se(e,t,this.layer,this.reportGraphicSourceMemory),c=!1,l=e=>{e===a.symbol.id&&(c=!0)};this._whenSymbolRemoved.push(l);let u=()=>{if(--this._loadingSymbols,!this.destroyed){if(this._whenSymbolRemoved.removeUnordered(l),this._graphicsWaitingForSymbol.get(e.uid)===o&&!c&&!a.destroyed&&(!this.graphicSymbolSupported||!e.symbol||e.symbol.id===a.symbol.id)){let t=this._createGraphics3DGraphic(a,s);this._spatialIndex&&t!=null&&this._spatialIndex.add(t),--a.referenced,this._endGraphicUpdate(e)}else--a.referenced,this._cleanupSymbols();this._featureStore.events.emit(`changed`),this.owner.notifyContentGeometryUpdate?.(),this._labeler?.setDirty()}},d=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(l),c||(p(t)?this.add([e]):a.destroyed||this._endGraphicUpdate(e,t)))};++this._loadingSymbols,n===0?a.load(()=>this._dataUpdateQueue.push(u,null).catch(f),e=>this._dataUpdateQueue.push(()=>d(e),null).catch(f)):a.load(u,d)}_removeGraphic(e){let t=e.uid,n=this.graphics3DGraphics.get(t);if(n){n.graphics3DSymbol.onRemoveGraphic(n);let e=n.isElevationSource;this._conditionalRemove(n,t),this._spatialIndex?.remove(n);let r=n.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(r)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,n,e),n.destroy(),this._featureStore.events.emit(`changed`),this.owner.notifyContentGeometryUpdate?.()}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),this._graphicsWaitingForSymbol.size===0&&(this._cleanupSymbols(),this.notifyChange(`dataUpdating`))}_hasLabelingContext(e){if(e instanceof B||e instanceof me){let t=this.symbolCreationContext.layer;return t.labelingInfo?t.labelingInfo.some(t=>t.symbol===e):!1}return!1}_hasValidSymbolCreationContext(e){return e instanceof B&&!this._hasLabelingContext(e)?(i.getLogger(this).error(`LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported.`),!1):!0}_getRenderingInfo(e,t=!0){let n=e.geometry;if(n==null)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!oe(n.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&e.symbol!=null)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;let r=this.rendererRequiresHydratedGraphic?N(e,this.layer,null):e,a;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||this.currentRenderer!=null))a=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{let e=r.symbol||ge(r.geometry);a=new L(null,e)}return a?.symbol==null?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):a}_getRenderingInfoAsync(e,t){if(e.geometry==null)return this._geometryWarningLogged||(this._geometryWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&e.symbol!=null)return this._symbolWarningLogged||(this._symbolWarningLogged=!0,i.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;let n=this.rendererRequiresHydratedGraphic?N(e,this.layer,null):e;return this.owner.getRenderingInfoAsync(n,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;let n=this._getConvertedSymbol(e);if(!n)return null;let r;if(t!=null&&`backgroundFillSymbol`in t&&t.backgroundFillSymbol){let e=V(t.backgroundFillSymbol,{ignoreDrivers:!0});e.symbol!=null&&(r=e.symbol.symbolLayers)}let a=we(n,this.symbolCreationContext,r);return a.load(()=>{let e=a.extentPadding;e>this.extentPadding&&this._set(`extentPadding`,e),this.notifyChange(`averageSymbolComplexity`)},e=>{p(e)||i.getLogger(this).warnOncePerTick(`Graphics symbol load failed:`,e.message)}),a}getOrCreateGraphics3DSymbol(e,t){let n=this._symbols.get(e.id);return n===void 0&&(n=this._unusedSymbolsCache.pop(e.id)??(e instanceof he?new Te(e,e=>this._dataUpdateQueue.push(e,null),e=>this._createGraphics3DSymbol(e,t)):this._createGraphics3DSymbol(e,t)),this._symbols.set(e.id,n),this._symbolMaterials=null),n!=null&&++n.referenced,n}trackGraphicState(e){return this._graphicStateTracking??=new De(this),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,e.notifyMemoryChange=this._notifyMemoryChange,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,n=!1){t.notifyMemoryChange=void 0,this._usedMemory-=t.usedMemory,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,n&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){let{graphic:n}=t;if(this._graphicsWithoutSymbol.delete(n.uid),!this._symbols.has(e.symbol.id))return this.add([n]),null;if(this.graphics3DGraphics.has(n.uid))return null;let r=e.createGraphics3DGraphic(t);if(r==null)return null;this._addGraphics3DGraphic(r);let i=e.symbol.id;if(this._graphicsBySymbol.has(i)||this._graphicsBySymbol.set(i,new Map),this._graphicsBySymbol.get(i).set(n.uid,r),r.isDraped&&this._graphicsDrapedUids.add(n.uid),r.centroid=null,n.geometry!=null&&n.geometry.type!==`point`&&(r.centroid=Oe(n.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),this._scaleVisibility!=null&&this._scaleVisibility.updateVisibility(r),this._filterVisibility!=null){let{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(1,4,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),r.initialize(this.stageLayer),this._graphicStateTracking!=null&&this._graphicStateTracking.addGraphic(r);let a=this._whenGraphics3DGraphicRequests[n.uid];return a&&(delete this._whenGraphics3DGraphicRequests[n.uid],a.resolve(r)),this._symbolMaterials=null,r}async rendererChange(e){if(this._rendererChangeAbortController=o(this._rendererChangeAbortController),e!==this.currentRenderer){if(this._validateRenderer(e),e??this._currentRendererChange(null,!1),!F(e))this._currentRendererChange(e,!1);else if(e?.arcadeRequired){let t=new AbortController;this._rendererChangeAbortController=t;let{arcadeUtils:n}=await this._ensureArcade();d(t);let r=n.hasGeometryOperations(e),i=r||await this._rendererUsesFieldsRequiringArcadeTypeConversion(e);d(t),r&&(await n.enableGeometryOperations(),d(t)),this.effectiveUpdatePolicy===0?await this._updateQueue.push(()=>this._currentRendererChange(e,i),t.signal):this._currentRendererChange(e,i),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===0){let t=new AbortController;this._rendererChangeAbortController=t,await this._updateQueue.push(()=>this._currentRendererChange(e,!1),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1)}}async _ensureArcade(){return this._arcadeOnDemand??=await z(),this._arcadeOnDemand}async _rendererUsesFieldsRequiringArcadeTypeConversion(e){let{fieldsIndex:t}=this.layer;return t!=null&&(await e.getRequiredFields(t)).some(e=>{switch(t.get(e)?.type){case`date`:case`date-only`:case`time-only`:case`timestamp-offset`:return!0;default:return!1}})}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererRequiresHydratedGraphic=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;let n=this.symbolCreationContext.renderer;if(e===n)return;if(this._symbolConversionCache.clear(),this._unusedSymbolsCache.clear(),e==null){this.symbolCreationContext.renderer=null,this.recreateAllGraphicsAndSymbols();return}let r=b(n,e);this._updateUnchangedSymbolMappings(r,e,n),this.symbolCreationContext.renderer=e,r!=null&&(r.type===`complete`?this.recreateAllGraphicsAndSymbols():r.type===`partial`&&(this._applyRendererDiff(r,e,n)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange(`averageSymbolComplexity`))}_diffHasSymbolChange(e){for(let t in e.diff)switch(t){case`visualVariables`:case`defaultSymbol`:case`uniqueValueInfos`:break;case`uniqueValueGroups`:case`authoringInfo`:case`fieldDelimiter`:delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,n){e||=[],t||=[];let r=[];for(let i of t){let t=this._graphicsBySymbol.get(i.id);t&&t.forEach((a,o)=>{let s=a.graphic,c=this.layer instanceof pe?this.layer:null,l=this._arcadeOnDemand;if(i===n.defaultSymbol&&n.getSymbol(N(s,c,null),{arcade:l})===n.defaultSymbol)return;e.length||n.defaultSymbol?r.push(s):this._graphicsWithoutSymbol.set(o,s);let u=this.graphics3DGraphics.get(o);this._conditionalRemove(u,o),a.destroy(),t.delete(o),this._removeGraphics3DGraphic(o,u),this._updateLayerVisibility()}),this._whenSymbolRemoved.forAll(e=>e(i.id))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach(e=>r.push(e)),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_applyUniqueValueRendererDiff(e,t,r){let i=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(i||a){let o=a?.changed,s=a?.unchanged;if(o&&s&&o.some(e=>s.some(t=>t.oldValue.symbol?.id===e.oldValue.symbol?.id)))return!1;let c=a?a.added.map(e=>e.symbol).filter(n):[],l=a?a.removed.map(e=>e.symbol).filter(n):[];if(o)for(let e=0;e<o.length;e++)c.push(o[e].newValue.symbol),l.push(o[e].oldValue.symbol);return i?(r.defaultSymbol&&l.push(r.defaultSymbol),t.defaultSymbol&&c.push(t.defaultSymbol)):r.defaultSymbol&&c.length&&l.push(t.defaultSymbol),this._applySymbolSetDiff(c,l,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,n){if(t?.type!==`unique-value`||n?.type!==`unique-value`||e!=null&&e.type!==`partial`)return[];let r=e=>e==null?null:e.id,i=e&&e.diff,a=i?.defaultSymbol,o=i&&i.uniqueValueInfos,s;if(o)s=o.unchanged.map(e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)}));else{s=[];for(let e of n.uniqueValueInfos??[]){let n=r(e.symbol),i=t.uniqueValueInfos?.find(t=>t.value===e.value);i&&n!==r(i.symbol)&&s.push({oldId:n,newId:r(i.symbol)})}}return!a&&n.defaultSymbol&&s.push({oldId:r(n.defaultSymbol),newId:r(t.defaultSymbol)}),s}_updateSymbolMapping(e,t){let n=t!=null&&t?typeof t==`string`?t:t.id:null;if(e==null||e===n)return;let r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),r!==void 0&&this._graphicsBySymbol.set(n,r);let i=this._symbols.get(e);if(i!==void 0&&(this._symbols.delete(e),this._symbols.set(n,i),this._symbolMaterials=null,i!=null)){let e=typeof t==`string`?null:t;e==null?i.symbol.id=n:i.symbol=e}}_updateUnchangedSymbolMappings(e,t,n){let r=this._calculateUnchangedSymbolMapping(e,t,n);for(let{oldId:e,newId:t}of r)this._updateSymbolMapping(e,t)}_applyRendererDiff(e,t,n){if(this._diffHasSymbolChange(e))return!1;if(t instanceof P&&n instanceof P&&this._applyUniqueValueRendererDiff(e,t,n)&&Object.keys(e.diff).length===0)return!0;for(let n of this._graphicsBySymbol.keys()){let r=this._symbols.get(n);if(r!=null)switch(r.applyRendererDiff(e,t)){case 0:this._recreateSymbol(n);break;case 1:this._recreateGraphicsForSymbol(n)}}return!0}opacityChange(){this._updateStageLayerVisibility(),this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged(`opacity`,t))}_screenSizePerspectiveEnabledChange(){this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged(`screenSizePerspectiveEnabled`,t)),this._labeler?.screenSizePerspectiveEnabledChanged(),this._deconflictor?.screenSizePerspectiveEnabledChanged()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged(`slicePlaneEnabled`,t)),this._deconflictor?.slicePlaneEnabledChange(),this._labeler?.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol((e,t,n)=>{e.globalPropertyChanged(`physicalBasedRenderingEnabled`,t)||this._recreateSymbol(n)})}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol((e,t,n)=>{e.globalPropertyChanged(`skipHighSymbolLods`,t)||this._recreateSymbol(n)})}_pixelRatioChange(){this.forEachGraphics3DSymbol((e,t,n)=>{e.globalPropertyChanged(`pixelRatio`,t)||this._recreateSymbol(n)})}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=v(()=>{this._updatingPendingLoadedGraphicsChange=null})}setClippingExtent(e,t){let n=this.symbolCreationContext.clippingExtent,r=ue();return Ne(e,r,t)?this.symbolCreationContext.clippingExtent=ce(k(),r):this.symbolCreationContext.clippingExtent=null,!le(this.symbolCreationContext.clippingExtent,n)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach(n=>{e(n)&&(t=!0)}),t&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}forEachGraphics3DSymbol(e,t){for(let[t,n]of this._symbols){if(n==null)return;e(n,this._graphicsBySymbol.get(t)||Ke,t)}if(!t?.excludeUnused)for(let t of this._unusedSymbolsCache)e(t,void 0,t.symbol.id)}updateGraphicsVisibilities(){this._filterVisibility!=null&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities(e=>{let t=this._updateUserVisibility(e),n=!!this._scaleVisibility?.updateVisibility(e);return t||n})}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities(e=>e.setVisibilityFlag(1,1,!1))}_validateRenderer(e){let t=()=>`'${this.layer.title?`${this.layer.title}, `:``}id:${this.layer.id}'`,n=I(e,{geometryType:this.layer?.geometryType,logWarning:(e,n)=>i.getLogger(this).warn(e,`Symbology conversion for layer ${t()}: ${n}`)});if(n){let e=`Renderer for layer ${t} is not supported in a SceneView`;i.getLogger(this).warn(e,n.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach((t,n)=>{if(t==null||t.referenced>0)return;let r=this._graphicsBySymbol.get(n);r&&r.size!==0||(this._graphicsBySymbol.delete(n),this._symbols.delete(n),this._symbolMaterials=null,this._unusedSymbolsCache.put(n,t,l),e=!0)}),e&&(this._recomputeExtentPadding(),this.notifyChange(`averageSymbolComplexity`))}get test(){}get performanceInfo(){return new Ee(this.graphics3DGraphics.size,this.graphics3DGraphics.values().reduce((e,t)=>e+ +!!t.isVisible(),0),this._graphicsWithoutSymbol.size,this._pendingUpdates.size)}};e([y({readOnly:!0})],X.prototype,`computedExtent`,void 0),e([y()],X.prototype,`currentRenderer`,void 0),e([y()],X.prototype,`rendererRequiresHydratedGraphic`,void 0),e([y()],X.prototype,`_frameTaskHandle`,void 0),e([y()],X.prototype,`_dataUpdateQueue`,void 0),e([y()],X.prototype,`_updateQueue`,void 0),e([y({readOnly:!0})],X.prototype,`_viewSpatialReference`,null),e([y()],X.prototype,`_rendererChangeAbortController`,void 0),e([y()],X.prototype,`_elevationInfoChangeAbortController`,void 0),e([y()],X.prototype,`_initializeAbortController`,void 0),e([y()],X.prototype,`_elevationAlignment`,void 0),e([y()],X.prototype,`_scaleVisibility`,void 0),e([y()],X.prototype,`_filterVisibility`,void 0),e([y()],X.prototype,`_initializePromise`,void 0),e([y()],X.prototype,`_spatialIndex`,void 0),e([y({readOnly:!0})],X.prototype,`extentPadding`,void 0),e([y()],X.prototype,`_updatingPendingLoadedGraphicsChange`,void 0),e([y()],X.prototype,`_featureStore`,void 0),e([y()],X.prototype,`_objectStates`,void 0),e([y()],X.prototype,`_loadingSymbols`,void 0),e([y({constructOnly:!0})],X.prototype,`compressionTracker`,void 0),e([y()],X.prototype,`preferredUpdatePolicy`,void 0),e([y()],X.prototype,`_forcedUpdatePolicy`,void 0),e([y({readOnly:!0})],X.prototype,`effectiveUpdatePolicy`,null),e([y({constructOnly:!0})],X.prototype,`elevationFeatureExpressionEnabled`,void 0),e([y({constructOnly:!0})],X.prototype,`owner`,void 0),e([y({constructOnly:!0})],X.prototype,`layer`,void 0),e([y({constructOnly:!0})],X.prototype,`graphicSymbolSupported`,void 0),e([y({constructOnly:!0})],X.prototype,`getRenderingInfoWithoutRenderer`,void 0),e([y({constructOnly:!0})],X.prototype,`componentFactories`,void 0),e([y({constructOnly:!0})],X.prototype,`setUidToIdOnAdd`,void 0),e([y({constructOnly:!0})],X.prototype,`reportGraphicSourceMemory`,void 0),e([y()],X.prototype,`featureStore`,null),e([y()],X.prototype,`initializePromise`,null),e([y()],X.prototype,`scaleVisibility`,null),e([y()],X.prototype,`elevationAlignment`,null),e([y()],X.prototype,`objectStates`,null),e([y()],X.prototype,`filterVisibility`,null),e([y({readOnly:!0})],X.prototype,`updating`,null),e([y({readOnly:!0})],X.prototype,`dataUpdating`,null),e([y({readOnly:!0})],X.prototype,`readyToRun`,null),e([y({readOnly:!0})],X.prototype,`suspendedOrOutsideOfView`,null),e([y({readOnly:!0})],X.prototype,`updatingRemaining`,null),e([y({readOnly:!0})],X.prototype,`displayFeatureLimit`,null),e([y({readOnly:!0})],X.prototype,`averageSymbolComplexity`,null),e([y({constructOnly:!0})],X.prototype,`hasZ`,void 0),e([y({constructOnly:!0})],X.prototype,`hasM`,void 0),e([y()],X.prototype,`_objectIdField`,null),X=J=e([ne(`esri.views.3d.layers.graphics.Graphics3DCore`)],X);class Z{constructor(){this.add=null,this.renderingInfo=null,this.state=0,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=0,this.abortController=null,this.remove=null}}const Ge=10,Q=T(),$=T(),Ke=new Map;export{X as Graphics3DCore};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{clone as e}from"../../../../core/lang.js";import{estimateArrayMemory as t}from"../../../../core/memoryEstimations.js";import{getMetersPerVerticalUnitForSR as n}from"../../../../core/units.js";import{normalFromMat4 as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as a,invertOrIdentity as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as c,sub as l,cross as u,add as d,normalize as f,transformMat4 as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as m,create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as g,ZEROS as _}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as v}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as y,fromBuffer as b,intersectsClippingArea as x}from"../../../../geometry/support/aaBoundingBox.js";import{getZeroIndexArray as S}from"../../../../geometry/support/Indices.js";import{t as C}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as w,SnappingCandidateEdge as T}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as E}from"../../../../renderers/support/renderingInfoUtils.js";import{isDrivenOpacityFallbackAlwaysOpaque as D}from"../../../../renderers/visualVariables/support/visualVariableUtils.js";import{needsElevationUpdates3D as O,SampleElevationInfo as k}from"./elevationAlignmentUtils.js";import{extrudePolygon as A}from"./extrudePolygon.js";import{Object3DEdgeState as ee,Graphics3DObject3DGraphicLayer as j}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as M}from"./Graphics3DSymbolLayer.js";import{computeCentroid as N}from"./graphicUtils.js";import{addOlidAttribute as P}from"./olidUtils.js";import{geometryAsPolygon as te}from"./polygonUtils.js";import{createMaterial as ne}from"../support/edgeUtils.js";import{encodeNaNUInt8 as F}from"../support/symbolColorUtils.js";import{debugFlags as I}from"../../support/debugFlags.js";import{SamplePosition as L}from"../../support/ElevationProvider.js";import{loadTessellationUtils as R,preloadedPolygonToRenderInfoElevationAligned as z}from"../../support/renderInfoUtils/polygon.js";import{Attribute as B}from"../../webgl-engine/lib/Attribute.js";import{Geometry as V}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as H}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as re,compressNormal as U}from"../../webgl-engine/lib/Normals.js";import{Object3D as ie}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as W}from"../../webgl-engine/materials/DefaultMaterial.js";const G=[`polygon`,`extent`];class K extends M{constructor(e,t,n,r){super(e,t,n,r,D(t)),this.ensureDrapedStatus(!1)}async doLoad(){let e=this.symbolLayer,t=e?.material,n=this.symbolLayer.material?.color?.a,r=this._hasDrivenColorOrOpacity,i=this.needsDrivenTransparentPass||r&&n!=null&&n<1,a=t?.emissive,o=(a?.source===`color`?a?.strength:void 0)??0,s=!r&&(n==null||n===0),c=r?g:this._materialColor?.toUnitRGBA()??_,l={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,useIndexing:!0,ambient:m,diffuse:m,externalColor:c,opacity:+!s,layerOpacity:this._getLayerOpacity(),drivenOpacity:i,hasSymbolColors:r,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:e.castShadows,emissiveStrengthFromSymbol:o,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},u=new W(l,this._context),d=new W({...l,cullFace:2},this._context);this._materials[0]=u,this._materials[1]=d,this._updateTransparentDepedentMaterialParameters(),await R()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validateGeometry(t.geometry,G,this.symbolLayer.type))return null;let n=this._getDrivenUInt8ColorWithNaNSupport(e.renderingInfo,this._materialColor,!1);F(n,n);let r=this.createElevationContextForGraphic(t);return this._createAs3DShape(t,e.renderingInfo,n,r,t.uid)}layerOpacityChanged(e,t){let n=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:n}),this._materials[1]?.setParameters({layerOpacity:n}),this._updateTransparentDepedentMaterialParameters(),e?.forEach(e=>t(e)?.layerOpacityChanged(n,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,O)}slicePlaneEnabledChanged(e,t){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e?.forEach(e=>{t(e)?.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){let e={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(e),this._materials[1]?.setParameters(e),!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?E(e.size.output,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}_containsRenderableGeometry(e){return`polygonIndexCount`in e&&`outlineIndexCount`in e?e.polygonIndexCount>0||e.outlineIndexCount>0:super._containsRenderableGeometry(e)}applyRendererDiff(e,t){return+!this._drivenPropertiesChanged(t)}async queryForSnapping(t,r,i,a){let o=this._getExtrusionSize(i)*this._context.renderCoordsHelper.unitInMeters/n(r),{objectId:s,target:c}=t,l=e(c);switch(l.z=(l.z??0)+o,t.type){case`edge`:{let{start:n,end:r}=t,i=e(n),a=e(r);return i.z=(i.z??0)+o,a.z=(a.z??0)+o,[new T(s,l,1/0,i,a)]}case`vertex`:return[new w(s,l,1/0),new T(s,c,1/0,c,l)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,n,o,c,l){let u=te(e.geometry);if(u==null)return null;if(u.rings.length===0||!u.rings.some(e=>e.length>0))return this._logGeometryValidationWarnings(u.rings,`rings`,`ExtrudeSymbol3DLayer`),null;let d=z(u,this._context.elevationProvider,this._context.renderCoordsHelper,c,{outlineOutput:`tessellated-indices`,owner:this._context.layer});if(d==null)return;this._logGeometryCreationWarnings(d,u.rings,`rings`,`ExtrudeSymbol3DLayer`);let f=N(u);if(f==null)return null;let p=[],m=[],g=y(),_=s(),S=h(),w=this._context.renderCoordsHelper.viewingMode===1;w||this._context.renderCoordsHelper.worldUpAtPosition(null,S),v(u.spatialReference,[f.x,f.y,0],_,this._context.renderCoordsHelper.spatialReference);let T=s();a(T,_);let E=i();r(E,T);let D=new Map,k=this._materials[0];if(this._context.clippingExtent&&(b(d.mapPositions,g),!x(g,this._context.clippingExtent))||d.polygonIndexCount===0&&d.outlineIndexCount===0)return;let M=this._getExtrusionSize(n),P=A(d,{height:M,worldUp:S,spherical:w,requireElevation:!0,requireNormals:!0,requireSizes:!0});if(P==null)return;C(P.vertices,P.vertices,T);let F=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:l,layerViewUid:this._context.layerViewUid}),I=new ue(P.vertices,P.elevation,re(P.normals),P.sizes),L=q(k,P.indices,P.indices.length-P.bottomIndices.length,I,o,F),R=d.vertexCount,B=d.outlineSegmentCount*2,V=d.polygonIndexCount/3,H=new de(R,B,V);if(X(L,H,_),D.set(L,H),p.push(L),P.bottomIndices.length>0&&p.push(q(this._materials[1],P.bottomIndices,0,I,o,F)),m.push(I.heights),p.length===0)return null;let U=new ie({geometries:p,layerViewUid:this._context.layerViewUid,graphicUid:l,isElevationSource:!0});U.transformation=_;let W=ne(this.symbolLayer,{opacity:this._getLayerOpacity()}),G=W?new ee(this._materials[0],W,this._context.slicePlaneEnabled):null,K=new j(this,U,null,(e,t,n,r,i)=>ae(e,t,n,r,i,m,D),c,G,m.reduce((e,n)=>e+t(n,8),0));return K.alignedSampledElevation=d.sampledElevation,K.needsElevationUpdates=O(c.mode),K}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){let e=this._materials[0];e&&e.setParameters({cullFace:e.transparent?0:2})}}function q(e,t,n,r,i,a){let{attributeIndices:o,drawIndices:s}=J(t),c=[[`position`,new B(r.positions,o,3,!0)],[`normalCompressed`,new B(r.normals,o,2,!0)]],l=null;return e.parameters.hasSymbolColors&&(l=S(o.length),c.push([`symbolColor`,new B(i,l,4,!0)])),a!=null&&(l??=S(o.length),P(c,a,l)),new V(e,c,r.elevation,n,null,s)}function J(e){if(e.length===0)return{attributeIndices:[],drawIndices:[]};let t=new Map,n=Array(e.length).fill(0);for(let r=0;r<e.length;++r){let i=e[r],a=t.get(i);a??(a=t.size,t.set(i,a)),n[r]=a}let r=Array(t.size).fill(0);for(let[e,n]of t)r[n]=e;return{attributeIndices:r,drawIndices:n}}const Y=h();function ae(e,t,n,r,i,a,l){let u=e.stageObject,d=u.geometries,f=d.length,m=t.mode!==`absolute-height`,h=0,g=u.transformation,_=o(s(),g);for(let e=0,t=0;e<f;++e){let o=d[e],s=l.get(o);if(!s||!H(o))continue;let f=o.getMutableAttribute(`position`).data,v=a[t++],y=new L(o.mapPositions),b=f.length/3,x=!1,S=0;{let e=0;for(let t=0;t<b;t++){Y[0]=f[e],Y[1]=f[e+1],Y[2]=f[e+2],r(y,Q),m&&(S+=Q.sampledElevation),I.ENABLE_OPTIMIZATIONS?(c(Z,f[e],f[e+1],f[e+2]),p(Z,Z,g),i.setAltitude(Z,Q.z+v[e/3]),p(Z,Z,_)):(c(Z,y.array[y.offset],y.array[y.offset+1],Q.z+v[e/3]),n!=null&&i.toRenderCoords(Z,n,Z),p(Z,Z,_)),f[e]=Z[0],f[e+1]=Z[1],f[e+2]=Z[2];let t=se/i.unitInMeters;(Math.abs(Y[0]-f[e])>=t||Math.abs(Y[1]-f[e+1])>=t||Math.abs(Y[2]-f[e+2])>=t)&&(x=!0),y.offset+=3,e+=3}}if(x){X(o,s,g),u.geometryVertexAttributeUpdated(d[e],`normalCompressed`),o.invalidateBoundingInfo(),u.geometryVertexAttributeUpdated(d[e],`position`);let t=d[e+1],n=!l.has(t);t&&n&&(t.invalidateBoundingInfo(),u.geometryVertexAttributeUpdated(t,`position`))}h+=S/b}return h/f}function X(e,t,n){let r=e.getMutableAttribute(`normalCompressed`).data,i=e.readPrimitivePosition,{plateVertexCount:a,topFaceStart:o,topFaceCount:s}=t,m=o+s,h=ce,g=le,_=$,v=oe,y=Z;c(y,0,0,0);let b=(e,t)=>{p(t,i(t,e),n)};for(let e=o;e<m;++e){let t=e*3;b(t,h[0]),b(t+1,h[1]),b(t+2,h[2]),l(g,h[1],h[0]),l(_,h[2],h[0]),u(v,g,_),d(y,y,v)}f(y,y);for(let e=0;e<a;++e){let t=y[0],n=y[1],i=y[2];U(r,e,-t,-n,-i),U(r,e+a,t,n,i)}}const Z=h(),oe=h(),Q=new k,se=.01,ce=[h(),h(),h()],le=h(),$=h();class ue{constructor(e,t,n,r){this.positions=e,this.elevation=t,this.normals=n,this.heights=r}}class de{constructor(e,t,n){this.plateVertexCount=e,this.topFaceStart=t,this.topFaceCount=n}}export{K as Graphics3DExtrudeSymbolLayer,J as remapIndicesToAttributeSubset};
|
|
2
|
+
import{clone as e}from"../../../../core/lang.js";import{estimateArrayMemory as t}from"../../../../core/memoryEstimations.js";import{getMetersPerVerticalUnitForSR as n}from"../../../../core/units.js";import{normalFromMat4 as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as a,invertOrIdentity as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as c,sub as l,cross as u,add as d,normalize as f,transformMat4 as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as m,create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as g,ZEROS as _}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as v}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as y,fromBuffer as b,intersectsClippingArea as x}from"../../../../geometry/support/aaBoundingBox.js";import{getZeroIndexArray as S}from"../../../../geometry/support/Indices.js";import{t as C}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as w,SnappingCandidateEdge as T}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as E}from"../../../../renderers/support/renderingInfoUtils.js";import{isDrivenOpacityFallbackAlwaysOpaque as D}from"../../../../renderers/visualVariables/support/visualVariableUtils.js";import{needsElevationUpdates3D as O,SampleElevationInfo as k}from"./elevationAlignmentUtils.js";import{extrudePolygon as A}from"./extrudePolygon.js";import{Object3DEdgeState as ee,Graphics3DObject3DGraphicLayer as j}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as M}from"./Graphics3DSymbolLayer.js";import{computeCentroid as N}from"./graphicUtils.js";import{addOlidAttribute as P}from"./olidUtils.js";import{geometryAsPolygon as te}from"./polygonUtils.js";import{createMaterial as ne}from"../support/edgeUtils.js";import{encodeNaNUInt8 as F}from"../support/symbolColorUtils.js";import{debugFlags as I}from"../../support/debugFlags.js";import{SamplePosition as L}from"../../support/ElevationProvider.js";import{loadTessellationUtils as R,preloadedPolygonToRenderInfoElevationAligned as z}from"../../support/renderInfoUtils/polygon.js";import{Attribute as B}from"../../webgl-engine/lib/Attribute.js";import{Geometry as V}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as H}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as re,compressNormal as U}from"../../webgl-engine/lib/Normals.js";import{Object3D as ie}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as W}from"../../webgl-engine/materials/DefaultMaterial.js";const G=[`polygon`,`extent`];class K extends M{constructor(e,t,n,r){super(e,t,n,r,D(t)),this.ensureDrapedStatus(!1)}async doLoad(){let e=this.symbolLayer,t=e?.material,n=this.symbolLayer.material?.color?.a,r=this._hasDrivenColorOrOpacity,i=this.needsDrivenTransparentPass||r&&n!=null&&n<1,a=t?.emissive,o=(a?.source===`color`?a?.strength:void 0)??0,s=!r&&(n==null||n===0),c=r?g:this._materialColor?.toUnitRGBA()??_,l={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,useIndexing:!0,ambient:m,diffuse:m,externalColor:c,opacity:+!s,layerOpacity:this._getLayerOpacity(),drivenOpacity:i,hasSymbolColors:r,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:e.castShadows,emissiveStrengthFromSymbol:o,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},u=new W(l,this._context.spherical),d=new W({...l,cullFace:2},this._context.spherical);this._materials[0]=u,this._materials[1]=d,this._updateTransparentDepedentMaterialParameters(),await R()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validateGeometry(t.geometry,G,this.symbolLayer.type))return null;let n=this._getDrivenUInt8ColorWithNaNSupport(e.renderingInfo,this._materialColor,!1);F(n,n);let r=this.createElevationContextForGraphic(t);return this._createAs3DShape(t,e.renderingInfo,n,r,t.uid)}layerOpacityChanged(e,t){let n=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:n}),this._materials[1]?.setParameters({layerOpacity:n}),this._updateTransparentDepedentMaterialParameters(),e?.forEach(e=>t(e)?.layerOpacityChanged(n,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,O)}slicePlaneEnabledChanged(e,t){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e?.forEach(e=>{t(e)?.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){let e={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(e),this._materials[1]?.setParameters(e),!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?E(e.size.output,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}_containsRenderableGeometry(e){return`polygonIndexCount`in e&&`outlineIndexCount`in e?e.polygonIndexCount>0||e.outlineIndexCount>0:super._containsRenderableGeometry(e)}applyRendererDiff(e,t){return+!this._drivenPropertiesChanged(t)}async queryForSnapping(t,r,i,a){let o=this._getExtrusionSize(i)*this._context.renderCoordsHelper.unitInMeters/n(r),{objectId:s,target:c}=t,l=e(c);switch(l.z=(l.z??0)+o,t.type){case`edge`:{let{start:n,end:r}=t,i=e(n),a=e(r);return i.z=(i.z??0)+o,a.z=(a.z??0)+o,[new T(s,l,1/0,i,a)]}case`vertex`:return[new w(s,l,1/0),new T(s,c,1/0,c,l)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,n,o,c,l){let u=te(e.geometry);if(u==null)return null;if(u.rings.length===0||!u.rings.some(e=>e.length>0))return this._logGeometryValidationWarnings(u.rings,`rings`,`ExtrudeSymbol3DLayer`),null;let d=z(u,this._context.elevationProvider,this._context.renderCoordsHelper,c,{outlineOutput:`tessellated-indices`,owner:this._context.layer});if(d==null)return;this._logGeometryCreationWarnings(d,u.rings,`rings`,`ExtrudeSymbol3DLayer`);let f=N(u);if(f==null)return null;let p=[],m=[],g=y(),_=h(),S=this._context.renderCoordsHelper.viewingMode===1;S||this._context.renderCoordsHelper.worldUpAtPosition(null,_);let w=s();v(u.spatialReference,[f.x,f.y,0],w,this._context.renderCoordsHelper.spatialReference);let T=s();a(T,w);let E=i();r(E,T);let D=new Map,k=this._materials[0];if(this._context.clippingExtent&&(b(d.mapPositions,g),!x(g,this._context.clippingExtent))||d.polygonIndexCount===0&&d.outlineIndexCount===0)return;let M=this._getExtrusionSize(n),P=A(d,{height:M,worldUp:_,spherical:S,requireElevation:!0,requireNormals:!0,requireSizes:!0});if(P==null)return;C(P.vertices,P.vertices,T);let F=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:l,layerViewUid:this._context.layerViewUid}),I=new ue(P.vertices,P.elevation,re(P.normals),P.sizes),L=q(k,P.indices,P.indices.length-P.bottomIndices.length,I,o,F),R=d.vertexCount,B=d.outlineSegmentCount*2,V=d.polygonIndexCount/3,H=new de(R,B,V);if(X(L,H,w),D.set(L,H),p.push(L),P.bottomIndices.length>0&&p.push(q(this._materials[1],P.bottomIndices,0,I,o,F)),m.push(I.heights),p.length===0)return null;let U=new ie({geometries:p,layerViewUid:this._context.layerViewUid,graphicUid:l,isElevationSource:!0});U.transformation=w;let W=ne(this.symbolLayer,{opacity:this._getLayerOpacity()}),G=W?new ee(this._materials[0],W,this._context.slicePlaneEnabled):null,K=new j(this,U,null,(e,t,n,r,i)=>ae(e,t,n,r,i,m,D),c,G,m.reduce((e,n)=>e+t(n,8),0));return K.alignedSampledElevation=d.sampledElevation,K.needsElevationUpdates=O(c.mode),K}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){let e=this._materials[0];e?.setParameters({cullFace:e.transparent?0:2})}}function q(e,t,n,r,i,a){let{attributeIndices:o,drawIndices:s}=J(t),c=[[`position`,new B(r.positions,o,3,!0)],[`normalCompressed`,new B(r.normals,o,2,!0)]],l=null;return e.parameters.hasSymbolColors&&(l=S(o.length),c.push([`symbolColor`,new B(i,l,4,!0)])),a!=null&&(l??=S(o.length),P(c,a,l)),new V(e,c,r.elevation,n,null,s)}function J(e){if(e.length===0)return{attributeIndices:[],drawIndices:[]};let t=new Map,n=Array(e.length).fill(0);for(let r=0;r<e.length;++r){let i=e[r],a=t.get(i);a??(a=t.size,t.set(i,a)),n[r]=a}let r=Array(t.size).fill(0);for(let[e,n]of t)r[n]=e;return{attributeIndices:r,drawIndices:n}}const Y=h();function ae(e,t,n,r,i,a,l){let u=e.stageObject,d=u.geometries,f=d.length,m=t.mode!==`absolute-height`,h=0,g=u.transformation,_=o(s(),g);for(let e=0,t=0;e<f;++e){let o=d[e],s=l.get(o);if(!s||!H(o))continue;let f=o.getMutableAttribute(`position`).data,v=a[t++],y=new L(o.mapPositions),b=f.length/3,x=!1,S=0;{let e=0;for(let t=0;t<b;t++){Y[0]=f[e],Y[1]=f[e+1],Y[2]=f[e+2],r(y,Q),m&&(S+=Q.sampledElevation),I.ENABLE_OPTIMIZATIONS?(c(Z,f[e],f[e+1],f[e+2]),p(Z,Z,g),i.setAltitude(Z,Q.z+v[e/3]),p(Z,Z,_)):(c(Z,y.array[y.offset],y.array[y.offset+1],Q.z+v[e/3]),n!=null&&i.toRenderCoords(Z,n,Z),p(Z,Z,_)),f[e]=Z[0],f[e+1]=Z[1],f[e+2]=Z[2];let t=se/i.unitInMeters;(Math.abs(Y[0]-f[e])>=t||Math.abs(Y[1]-f[e+1])>=t||Math.abs(Y[2]-f[e+2])>=t)&&(x=!0),y.offset+=3,e+=3}}if(x){X(o,s,g),u.geometryVertexAttributeUpdated(d[e],`normalCompressed`),o.invalidateBoundingInfo(),u.geometryVertexAttributeUpdated(d[e],`position`);let t=d[e+1],n=!l.has(t);t&&n&&(t.invalidateBoundingInfo(),u.geometryVertexAttributeUpdated(t,`position`))}h+=S/b}return h/f}function X(e,t,n){let r=e.getMutableAttribute(`normalCompressed`).data,i=e.readPrimitivePosition,{plateVertexCount:a,topFaceStart:o,topFaceCount:s}=t,m=o+s,h=ce,g=le,_=$,v=oe,y=Z;c(y,0,0,0);let b=(e,t)=>{p(t,i(t,e),n)};for(let e=o;e<m;++e){let t=e*3;b(t,h[0]),b(t+1,h[1]),b(t+2,h[2]),l(g,h[1],h[0]),l(_,h[2],h[0]),u(v,g,_),d(y,y,v)}f(y,y);for(let e=0;e<a;++e){let t=y[0],n=y[1],i=y[2];U(r,e,-t,-n,-i),U(r,e+a,t,n,i)}}const Z=h(),oe=h(),Q=new k,se=.01,ce=[h(),h(),h()],le=h(),$=h();class ue{constructor(e,t,n,r){this.positions=e,this.elevation=t,this.normals=n,this.heights=r}}class de{constructor(e,t,n){this.plateVertexCount=e,this.topFaceStart=t,this.topFaceCount=n}}export{K as Graphics3DExtrudeSymbolLayer,J as remapIndicesToAttributeSubset};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{XXH as t}from"../../../../arcade/functions/hash.js";import{createTask as n}from"../../../../core/asyncUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{EsriPromise as a}from"../../../../core/Promise.js";import{logOnError as o,throwIfAborted as s}from"../../../../core/promiseUtils.js";import{watch as c,initial as l,when as u}from"../../../../core/reactiveUtils.js";import{property as d,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{diff as p}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as m}from"../../../../core/support/UpdatingHandles.js";import{canProject as h,project as g}from"../../../../geometry/support/webMercatorUtils.js";import{RenderingInfoVisualVariableInfo as _}from"../../../../renderers/support/RenderingInfo.js";import{getRenderingInfo as v,getRenderingInfoAsync as y}from"../../../../renderers/support/renderingInfoUtils.js";import{matchRandomRotationExpression as b}from"../../../../support/arcadeExpressionUtils.js";import{suspendResumeExtentOptimism as x}from"./constants.js";import{DisplayFeatureLimit as S}from"./DisplayFeatureLimit.js";import{Graphics3DCore as C}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as w}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as T}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as E}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as D}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as O}from"./graphicUtils.js";import{FeatureVisibilityFilter as k}from"../support/FeatureVisibilityFilter.js";import{emptyHighlightHandle as A}from"../support/highlightUtils.js";let j=class extends a{constructor(e){super(e),this.type=`graphics-3d`,this.reportGraphicSourceMemory=!0,this._updatingHandles=new m,this.elevationFeatureExpressionEnabled=!1,this.scaleVisibilityEnabled=!1,this.filterVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this.elevationAlignmentEnabled=!1,this.timeExtentEnabled=!1,this.setUidToIdOnAdd=!0,this.dataExtent=null,this.drapeSourceType=1,this.preferredUpdatePolicy=0,this._suspendResumeExtent=null}initialize(){let e=this.owner,t=(this.filterVisibilityEnabled||this.timeExtentEnabled)&&e.layer.geometryType!==`multipatch`,r=new C({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:e.hasZ,hasM:e.hasM,setUidToIdOnAdd:this.setUidToIdOnAdd,reportGraphicSourceMemory:this.reportGraphicSourceMemory,componentFactories:{deconflictor:t=>e.view.deconflictor.addGraphicsOwner(t),labeler:(t,n)=>e.view.labeler.addGraphicsOwner(t,n),elevationAlignment:this.elevationAlignmentEnabled?(t,n)=>new w({graphicsCoreOwner:this,graphicsCore:t,queryGraphicUIDsInExtent:n,elevationProvider:e.view.elevationProvider}):null,scaleVisibility:this.scaleVisibilityEnabled?(t,n)=>new D({graphicsCoreOwner:this,layer:this.layer,queryGraphicUIDsInExtent:n,graphicsCore:t,basemapTerrain:e.view.basemapTerrain}):null,filterVisibility:t?t=>new k({context:{...t,configuration:e}}):null,objectStates:e=>new E(e)}});this._set(`graphicsCore`,r),this.frustumVisibilityEnabled&&this._set(`frustumVisibility`,new T({graphicsCoreOwner:this})),this.elevationAlignment&&this._updatingHandles.add(()=>this.layer.elevationInfo,(e,t)=>{p(e,t)&&this._updatingHandles.consumePromise(this.graphicsCore.elevationInfoChange())}),this._updatingHandles.add(()=>this.layer.labelsVisible,()=>this.graphicsCore.updateVisibilityInfo()),this._updatingHandles.add(()=>this.layer.labelingInfo,(e,t)=>{p(e,t)&&this.graphicsCore.updateLabelingInfo()}),this._updatingHandles.add(()=>this.preferredUpdatePolicy,e=>this.graphicsCore.preferredUpdatePolicy=e),this.addResolvingTask(n(e=>this._initializeAsync(e)))}async _initializeAsync(e){await o(this.graphicsCore.initializePromise),s(e);let t=this.owner;this._updatingHandles.add(()=>this.renderer,e=>this._updatingHandles.addPromise(this.graphicsCore.rendererChange(e))),this._updatingHandles.add(()=>t.fullOpacity,()=>this.graphicsCore.opacityChange()),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this._updatingHandles.add(()=>t.view.clippingArea,()=>this._updateClippingExtent()),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&(await o(this.graphicsCore.updateLabelingInfo()),s(e))}destroy(){this._updatingHandles.destroy(),this._set(`frustumVisibility`,i(this.frustumVisibility)),this._set(`graphicsCore`,i(this.graphicsCore)),this._set(`owner`,null)}get layer(){return this.owner.layer}get layerViewUid(){return this.owner.layerViewUid}get dataUpdating(){return this.graphicsCore?.dataUpdating??!1}get renderer(){let{renderer:e,objectIdField:t}=this.layer;if(!e||!t||e.type===`heatmap`||!e.visualVariables)return e;let n=e.visualVariables.findIndex(e=>e.type===`rotation`&&e.valueExpression!=null&&b(e.valueExpression)===t&&(e.axis==null||e.axis===`heading`)&&e.rotationType===`geographic`);if(n<0)return e;let r=e.clone();return r.visualVariables?(r.visualVariables.splice(n,1),this._randomRotationRenderers??=new WeakMap,this._randomRotationRenderers.set(r,t),r):e}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get filterVisibility(){return this.graphicsCore?.filterVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get suspendResumeExtentMode(){return this.owner.suspendResumeExtentMode??`computed`}get scaleVisibilitySuspended(){return this.scaleVisibility!=null&&this.scaleVisibility.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return this.frustumVisibility==null||!this.frustumVisibility.suspended}get suspendInfo(){let e={};return this.scaleVisibilitySuspended&&(e.outsideScaleRange=!0),this.frustumVisibility!=null&&this.frustumVisibility.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||this.frustumVisibility?.updating||this._updatingHandles.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return`filter`in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get featureSpatialReference(){return`featureSpatialReference`in this.owner?this.owner.featureSpatialReference:this.owner.view.spatialReference}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){let e=this.view.quality,t=this.graphicsCore?.displayFeatureLimit;if(e===1)return t;let n=Math.ceil(t.maximumNumberOfFeatures*e);return new S(t.maximumTotalNumberOfVertices,n,t.averageSymbolComplexity)}get usedMemory(){return this.graphicsCore?.usedMemory??0}get loadedFeatures(){return this.graphicsCore?.numberOfGraphics??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return this.graphicsCore.performanceInfo}maskOccludee(e){let t=this.graphicsCore?.objectStates;if(!t)return r();let{set:n,handle:i}=t.acquireOccludeeSet(null);return t.setUid(n,e.uid),i}highlightByGraphics(e,t){let n=this.graphicsCore?.objectStates;if(!n)return A;let r=e.map(e=>e.uid),{set:i,handle:a}=n.acquireHighlightSet(t,null);return n.setUids(i,r),a}highlightByObjectIds(e,t=null,n){let r=this.graphicsCore?.objectStates;if(!r)return A;let{set:i,handle:a}=r.acquireHighlightSet(n,t);return r.setObjectIds(i,e),a}resetObjectStates(){this.graphicsCore?.objectStates?.reset()}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}notifyContentGeometryUpdate(){this.owner.notifyContentGeometryUpdate?.()}getRenderingInfo(e,n,r){let i=v(e,{renderer:n,arcade:r,timeZone:this.view.timeZone});if(i?.color){let e=i.color.output;e[0]/=255,e[1]/=255,e[2]/=255}if(i!=null&&n!=null&&this._randomRotationRenderers?.has(n)){let r=this._randomRotationRenderers.get(n),a=e.attributes[r],o=new t(0);o.updateFloatArray([a]),o.updateUint8Array([173]);let s=o.digest()*8.381e-8;i.heading=new _(s,s)}return i}getRenderingInfoAsync(e,t,n,r){return y(e,{renderer:t,arcade:n,timeZone:this.view.timeZone,...r})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}refreshFilter(){this.filterVisibility!=null&&this.filterVisibility.reapply()}getGraphics3DGraphicByObjectId(e){return this.graphicsCore?.getGraphics3DGraphicByObjectId(e)}_updateClippingExtent(){let e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.addHandles(c(()=>this.suspendResumeExtentMode,()=>{switch(this.removeHandles(M),this.suspendResumeExtentMode){case`computed`:this.addHandles([c(()=>this.graphicsCore.computedExtent,e=>this._updateSuspendResumeExtent(e),l),c(()=>this.graphicsCore.extentPadding,()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent))],M);break;case`data`:this.addHandles([u(()=>this.dataExtent,e=>this._updateSuspendResumeExtent(e),l),c(()=>this.graphicsCore.extentPadding,()=>this._updateSuspendResumeExtent(this.dataExtent))],M);break;default:this.suspendResumeExtentMode}},l))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this._suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){let n=this.owner.view.spatialReference;if(!e.spatialReference.equals(n)){if(!h(e,n))return;e=g(e,n)}return O(e,t,x,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){this.frustumVisibility!=null&&this.frustumVisibility.setExtent(e),this.scaleVisibility!=null&&this.scaleVisibility.setExtent(e)}};e([d()],j.prototype,`type`,void 0),e([d({constructOnly:!0})],j.prototype,`owner`,void 0),e([d({constructOnly:!0})],j.prototype,`reportGraphicSourceMemory`,void 0),e([d()],j.prototype,`layer`,null),e([d()],j.prototype,`layerViewUid`,null),e([d({readOnly:!0})],j.prototype,`dataUpdating`,null),e([d()],j.prototype,`renderer`,null),e([d({constructOnly:!0})],j.prototype,`updateClippingExtent`,void 0),e([d({constructOnly:!0})],j.prototype,`elevationFeatureExpressionEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`graphicsCore`,void 0),e([d({constructOnly:!0})],j.prototype,`scaleVisibilityEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`filterVisibilityEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`frustumVisibilityEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`elevationAlignmentEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`timeExtentEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`setUidToIdOnAdd`,void 0),e([d()],j.prototype,`scaleVisibility`,null),e([d()],j.prototype,`filterVisibility`,null),e([d()],j.prototype,`elevationAlignment`,null),e([d({constructOnly:!0})],j.prototype,`frustumVisibility`,void 0),e([d()],j.prototype,`suspendResumeExtentMode`,null),e([d()],j.prototype,`dataExtent`,void 0),e([d()],j.prototype,`scaleVisibilitySuspended`,null),e([d()],j.prototype,`suspended`,null),e([d()],j.prototype,`legendEnabled`,null),e([d()],j.prototype,`suspendInfo`,null),e([d()],j.prototype,`updating`,null),e([d()],j.prototype,`updatingRemaining`,null),e([d()],j.prototype,`featureStore`,null),e([d()],j.prototype,`view`,null),e([d()],j.prototype,`loadedGraphics`,null),e([d()],j.prototype,`fullOpacity`,null),e([d()],j.prototype,`filter`,null),e([d()],j.prototype,`slicePlaneEnabled`,null),e([d()],j.prototype,`drapeSourceType`,void 0),e([d()],j.prototype,`updatePolicy`,null),e([d()],j.prototype,`preferredUpdatePolicy`,void 0),e([d({readOnly:!0})],j.prototype,`displayFeatureLimit`,null),j=e([f(`esri.views.3d.layers.graphics.Graphics3DFeatureProcessor`)],j);const M=`suspendResumeExtentMode`;export{j as Graphics3DFeatureProcessor};
|
|
2
|
+
import{__decorate as e}from"tslib";import{XXH as t}from"../../../../arcade/functions/hash.js";import{createTask as n}from"../../../../core/asyncUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{EsriPromise as a}from"../../../../core/Promise.js";import{logOnError as o,throwIfAborted as s}from"../../../../core/promiseUtils.js";import{watch as c,initial as l,when as u}from"../../../../core/reactiveUtils.js";import{property as d,subclass as f}from"../../../../core/accessorSupport/decorators.js";import{diff as p}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as m}from"../../../../core/support/UpdatingHandles.js";import{canProject as h,projectIfNeeded as g}from"../../../../geometry/support/webMercatorUtils.js";import{RenderingInfoVisualVariableInfo as _}from"../../../../renderers/support/RenderingInfo.js";import{getRenderingInfo as v,getRenderingInfoAsync as y}from"../../../../renderers/support/renderingInfoUtils.js";import{matchRandomRotationExpression as b}from"../../../../support/arcadeExpressionUtils.js";import{suspendResumeExtentOptimism as x}from"./constants.js";import{DisplayFeatureLimit as S}from"./DisplayFeatureLimit.js";import{Graphics3DCore as C}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as w}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as T}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as E}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as D}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as O}from"./graphicUtils.js";import{FeatureVisibilityFilter as k}from"../support/FeatureVisibilityFilter.js";import{emptyHighlightHandle as A}from"../support/highlightUtils.js";let j=class extends a{constructor(e){super(e),this.type=`graphics-3d`,this.reportGraphicSourceMemory=!0,this._updatingHandles=new m,this.elevationFeatureExpressionEnabled=!1,this.scaleVisibilityEnabled=!1,this.filterVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this.elevationAlignmentEnabled=!1,this.timeExtentEnabled=!1,this.setUidToIdOnAdd=!0,this.dataExtent=null,this.drapeSourceType=1,this.preferredUpdatePolicy=0,this._suspendResumeExtent=null}initialize(){let e=this.owner,t=(this.filterVisibilityEnabled||this.timeExtentEnabled)&&e.layer.geometryType!==`multipatch`,r=new C({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:e.hasZ,hasM:e.hasM,setUidToIdOnAdd:this.setUidToIdOnAdd,reportGraphicSourceMemory:this.reportGraphicSourceMemory,componentFactories:{deconflictor:t=>e.view.deconflictor.addGraphicsOwner(t),labeler:(t,n)=>e.view.labeler.addGraphicsOwner(t,n),elevationAlignment:this.elevationAlignmentEnabled?(t,n)=>new w({graphicsCoreOwner:this,graphicsCore:t,queryGraphicUIDsInExtent:n,elevationProvider:e.view.elevationProvider}):null,scaleVisibility:this.scaleVisibilityEnabled?(t,n)=>new D({graphicsCoreOwner:this,layer:this.layer,queryGraphicUIDsInExtent:n,graphicsCore:t,basemapTerrain:e.view.basemapTerrain}):null,filterVisibility:t?t=>new k({context:{...t,configuration:e}}):null,objectStates:e=>new E(e)}});this._set(`graphicsCore`,r),this.frustumVisibilityEnabled&&this._set(`frustumVisibility`,new T({graphicsCoreOwner:this})),this.elevationAlignment&&this._updatingHandles.add(()=>this.layer.elevationInfo,(e,t)=>{p(e,t)&&this._updatingHandles.consumePromise(this.graphicsCore.elevationInfoChange())}),this._updatingHandles.add(()=>this.layer.labelsVisible,()=>this.graphicsCore.updateVisibilityInfo()),this._updatingHandles.add(()=>this.layer.labelingInfo,(e,t)=>{p(e,t)&&this.graphicsCore.updateLabelingInfo()}),this._updatingHandles.add(()=>this.preferredUpdatePolicy,e=>this.graphicsCore.preferredUpdatePolicy=e),this.addResolvingTask(n(e=>this._initializeAsync(e)))}async _initializeAsync(e){await o(this.graphicsCore.initializePromise),s(e);let t=this.owner;this._updatingHandles.add(()=>this.renderer,e=>this._updatingHandles.addPromise(this.graphicsCore.rendererChange(e))),this._updatingHandles.add(()=>t.fullOpacity,()=>this.graphicsCore.opacityChange()),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this._updatingHandles.add(()=>t.view.clippingArea,()=>this._updateClippingExtent()),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&(await o(this.graphicsCore.updateLabelingInfo()),s(e))}destroy(){this._updatingHandles.destroy(),this._set(`frustumVisibility`,i(this.frustumVisibility)),this._set(`graphicsCore`,i(this.graphicsCore)),this._set(`owner`,null)}get layer(){return this.owner.layer}get layerViewUid(){return this.owner.layerViewUid}get dataUpdating(){return this.graphicsCore?.dataUpdating??!1}get renderer(){let{renderer:e,objectIdField:t}=this.layer;if(!e||!t||e.type===`heatmap`||!e.visualVariables)return e;let n=e.visualVariables.findIndex(e=>e.type===`rotation`&&e.valueExpression!=null&&b(e.valueExpression)===t&&(e.axis==null||e.axis===`heading`)&&e.rotationType===`geographic`);if(n<0)return e;let r=e.clone();return r.visualVariables?(r.visualVariables.splice(n,1),this._randomRotationRenderers??=new WeakMap,this._randomRotationRenderers.set(r,t),r):e}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get filterVisibility(){return this.graphicsCore?.filterVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get suspendResumeExtentMode(){return this.owner.suspendResumeExtentMode??`computed`}get scaleVisibilitySuspended(){return this.scaleVisibility!=null&&this.scaleVisibility.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return this.frustumVisibility==null||!this.frustumVisibility.suspended}get suspendInfo(){let e={};return this.scaleVisibilitySuspended&&(e.outsideScaleRange=!0),this.frustumVisibility!=null&&this.frustumVisibility.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||this.frustumVisibility?.updating||this._updatingHandles.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return`filter`in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get featureSpatialReference(){return`featureSpatialReference`in this.owner?this.owner.featureSpatialReference:this.owner.view.spatialReference}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){let e=this.view.quality,t=this.graphicsCore?.displayFeatureLimit;if(e===1)return t;let n=Math.ceil(t.maximumNumberOfFeatures*e);return new S(t.maximumTotalNumberOfVertices,n,t.averageSymbolComplexity)}get usedMemory(){return this.graphicsCore?.usedMemory??0}get loadedFeatures(){return this.graphicsCore?.numberOfGraphics??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return this.graphicsCore.performanceInfo}maskOccludee(e){let t=this.graphicsCore?.objectStates;if(!t)return r();let{set:n,handle:i}=t.acquireOccludeeSet(null);return t.setUid(n,e.uid),i}highlightByGraphics(e,t){let n=this.graphicsCore?.objectStates;if(!n)return A;let r=e.map(e=>e.uid),{set:i,handle:a}=n.acquireHighlightSet(t,null);return n.setUids(i,r),a}highlightByObjectIds(e,t=null,n){let r=this.graphicsCore?.objectStates;if(!r)return A;let{set:i,handle:a}=r.acquireHighlightSet(n,t);return r.setObjectIds(i,e),a}resetObjectStates(){this.graphicsCore?.objectStates?.reset()}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}notifyContentGeometryUpdate(){this.owner.notifyContentGeometryUpdate?.()}getRenderingInfo(e,n,r){let i=v(e,{renderer:n,arcade:r,timeZone:this.view.timeZone});if(i?.color){let e=i.color.output;e[0]/=255,e[1]/=255,e[2]/=255}if(i!=null&&n!=null&&this._randomRotationRenderers?.has(n)){let r=this._randomRotationRenderers.get(n),a=e.attributes[r],o=new t(0);o.updateFloatArray([a]),o.updateUint8Array([173]);let s=o.digest()*8.381e-8;i.heading=new _(s,s)}return i}getRenderingInfoAsync(e,t,n,r){return y(e,{renderer:t,arcade:n,timeZone:this.view.timeZone,...r})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}refreshFilter(){this.filterVisibility!=null&&this.filterVisibility.reapply()}getGraphics3DGraphicByObjectId(e){return this.graphicsCore?.getGraphics3DGraphicByObjectId(e)}_updateClippingExtent(){let e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.addHandles(c(()=>this.suspendResumeExtentMode,()=>{switch(this.removeHandles(M),this.suspendResumeExtentMode){case`computed`:this.addHandles([c(()=>this.graphicsCore.computedExtent,e=>this._updateSuspendResumeExtent(e),l),c(()=>this.graphicsCore.extentPadding,()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent))],M);break;case`data`:this.addHandles([u(()=>this.dataExtent,e=>this._updateSuspendResumeExtent(e),l),c(()=>this.graphicsCore.extentPadding,()=>this._updateSuspendResumeExtent(this.dataExtent))],M);break;default:this.suspendResumeExtentMode}},l))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this._suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){let n=this.owner.view.spatialReference;if(!e.spatialReference.equals(n)){if(!h(e,n))return;e=g(e,n)}return O(e,t,x,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){this.frustumVisibility!=null&&this.frustumVisibility.setExtent(e),this.scaleVisibility!=null&&this.scaleVisibility.setExtent(e)}};e([d()],j.prototype,`type`,void 0),e([d({constructOnly:!0})],j.prototype,`owner`,void 0),e([d({constructOnly:!0})],j.prototype,`reportGraphicSourceMemory`,void 0),e([d()],j.prototype,`layer`,null),e([d()],j.prototype,`layerViewUid`,null),e([d({readOnly:!0})],j.prototype,`dataUpdating`,null),e([d()],j.prototype,`renderer`,null),e([d({constructOnly:!0})],j.prototype,`updateClippingExtent`,void 0),e([d({constructOnly:!0})],j.prototype,`elevationFeatureExpressionEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`graphicsCore`,void 0),e([d({constructOnly:!0})],j.prototype,`scaleVisibilityEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`filterVisibilityEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`frustumVisibilityEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`elevationAlignmentEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`timeExtentEnabled`,void 0),e([d({constructOnly:!0})],j.prototype,`setUidToIdOnAdd`,void 0),e([d()],j.prototype,`scaleVisibility`,null),e([d()],j.prototype,`filterVisibility`,null),e([d()],j.prototype,`elevationAlignment`,null),e([d({constructOnly:!0})],j.prototype,`frustumVisibility`,void 0),e([d()],j.prototype,`suspendResumeExtentMode`,null),e([d()],j.prototype,`dataExtent`,void 0),e([d()],j.prototype,`scaleVisibilitySuspended`,null),e([d()],j.prototype,`suspended`,null),e([d()],j.prototype,`legendEnabled`,null),e([d()],j.prototype,`suspendInfo`,null),e([d()],j.prototype,`updating`,null),e([d()],j.prototype,`updatingRemaining`,null),e([d()],j.prototype,`featureStore`,null),e([d()],j.prototype,`view`,null),e([d()],j.prototype,`loadedGraphics`,null),e([d()],j.prototype,`fullOpacity`,null),e([d()],j.prototype,`filter`,null),e([d()],j.prototype,`slicePlaneEnabled`,null),e([d()],j.prototype,`drapeSourceType`,void 0),e([d()],j.prototype,`updatePolicy`,null),e([d()],j.prototype,`preferredUpdatePolicy`,void 0),e([d({readOnly:!0})],j.prototype,`displayFeatureLimit`,null),j=e([f(`esri.views.3d.layers.graphics.Graphics3DFeatureProcessor`)],j);const M=`suspendResumeExtentMode`;export{j as Graphics3DFeatureProcessor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../../Color.js";import{linearize as t}from"../../../../colorUtils.js";import{deg2rad as n}from"../../../../core/mathUtils.js";import{releaseMaybe as r}from"../../../../core/maybe.js";import{isPromiseLike as i}from"../../../../core/promiseUtils.js";import{normalFromMat4 as a,fromMat4 as o}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromTranslation as c,multiply as l,invert as u,getTranslation as d}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as p,clone as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ONES as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as g,add as _,scale as v,transformMat4 as y,transformMat3 as b,normalize as x,scaleAndAdd as ee,subtract as S,cross as te,dot as ne}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as re,ZEROS as ie,ONES as ae,create as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as oe}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{canProjectWithoutEngine as se}from"../../../../geometry/projectionUtils.js";import{computeTranslationToOriginAndRotation as w}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as ce}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as le}from"../../../../geometry/projection/projectVectorToVector.js";import{fromBuffer as ue,intersectsClippingArea as de,create as fe}from"../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as T}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as E,getContinuousIndexArray as pe}from"../../../../geometry/support/Indices.js";import me from"../../../../geometry/support/MeshComponent.js";import he from"../../../../geometry/support/MeshMaterialMetallicRoughness.js";import ge from"../../../../geometry/support/MeshTextureTransform.js";import{isRelativeVertexSpace as _e,isAbsoluteVertexSpace as ve}from"../../../../geometry/support/meshVertexSpaceUtils.js";import{equals as D,isPlateCarree as O}from"../../../../geometry/support/spatialReferenceUtils.js";import{t as k}from"../../../../chunks/vec3.js";import{transformNormal as A,transformVectorENUPlateCarree as j,transformVectorWMPlateCarree as M,projectNormalToPCPF as ye,transformTangent as N,projectTangentToPCPF as be}from"../../../../geometry/support/meshUtils/projection.js";import{projectMeshVertexPositions as xe}from"../../../../geometry/support/meshUtils/projectMeshVertexPositions.js";import{projectLocalVertexSpaceToPCPF as Se}from"../../../../geometry/support/meshUtils/vertexSpaceConversion.js";import{isDrivenOpacityFallbackAlwaysOpaque as Ce}from"../../../../renderers/visualVariables/support/visualVariableUtils.js";import{getEmissiveMode as we}from"../../../../symbols/support/materialUtils.js";import{isEncodedMeshTexture as Te}from"../../glTF/internal/resourceUtils.js";import{getTransformMatrix as P}from"../../glTF/internal/TextureTransformUtils.js";import{defaultSymbolLayerMemoryComplexity as Ee}from"./defaultSymbolComplexity.js";import{perObjectElevationAligner as F}from"./ElevationAligners.js";import{needsElevationUpdates3D as I,evaluateElevationInfoAtPoint as L}from"./elevationAlignmentUtils.js";import{preparePatchEmissiveStrength as De}from"./emissiveUtils.js";import{Graphics3DMeshObject3DGraphicLayer as Oe}from"./Graphics3DMeshObject3DGraphicLayer.js";import{Object3DEdgeState as ke}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as Ae,nanFallbackColor as je}from"./Graphics3DSymbolLayer.js";import{MaterialInfoCache as Me,MeshFastUpdateProcessor as Ne}from"./MeshFastUpdateProcessor.js";import{addOlidAttribute as Pe}from"./olidUtils.js";import{SymbolComplexity as Fe}from"./SymbolComplexity.js";import{hasEdges as Ie,createMaterial as Le}from"../support/edgeUtils.js";import{debugFlags as Re}from"../../support/debugFlags.js";import{Attribute as R}from"../../webgl-engine/lib/Attribute.js";import{Geometry as z}from"../../webgl-engine/lib/Geometry.js";import{ManagedTexture as ze}from"../../webgl-engine/lib/ManagedTexture.js";import{Object3D as Be}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as Ve}from"../../webgl-engine/materials/DefaultMaterial.js";import{NativeLineMaterial as B}from"../../webgl-engine/materials/NativeLineMaterial.js";import{useSchematicPBR as He,advancedMRRFactors as Ue,schematicMRRFactors as We}from"../../webgl-engine/materials/pbrUtils.js";const Ge=[`mesh`];class Ke extends Ae{constructor(e,t,n,r){super(e,t,n,r,Ce(t)),this._materialInfoCache=new Me,this._fastUpdateProcessor=new Ne,this._textures=new Map,this.ensureDrapedStatus(!1)}async doLoad(){Re.DRAW_MESH_GEOMETRY_NORMALS&&(this._debugVertexNormalMaterial=new B({color:[1,0,1,1]}),this._debugTangentNormalMaterial=new B({color:[1,.5,0,1]}),this._debugFaceNormalMaterial=new B({color:[0,1,1,1]})),this.updateComplexity()}destroy(){super.destroy(),this._textures.forEach(e=>e.unload()),this._context.stage.removeTextures(Array.from(this._textures.values())),this._materialInfoCache.clear(),this._textures.clear(),this._fastUpdateProcessor.destroy()}get materials(){return this._materialInfoCache.materials}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validateGeometry(t.geometry,Ge,`fill on mesh-3d`))return null;let n=this.createElevationContextForGraphic(t),r=e.renderingInfo;return this._createAs3DShape(t,r,n,t.uid)}onRemoveGraphic(e){this._fastUpdateProcessor.onRemoveGraphic(e,this._materialInfoCache)}layerOpacityChanged(e,t){let n=this._getLayerOpacity();this._updateMaterialParameters(e=>{e.material.setParameters({layerOpacity:n});let t=e.material.parameters;this._setMaterialTextureAlphaMode(t,e)}),e?.forEach(e=>t(e)?.layerOpacityChanged(n,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,I)}slicePlaneEnabledChanged(e,t){return this._updateMaterialParameters(({material:e})=>{e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})}),e?.forEach(e=>t(e)?.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)),!0}physicalBasedRenderingChanged(){let e=this._usePBR();return this._updateMaterialParameters(({material:t})=>t.setParameters({usePBR:e})),!0}updateMeshTransform(e,t,n,r,i){if(!e.fastTransformUpdatesAllowed)return!1;let a=e.fastTransformUpdatesEnabled;switch(i){case 0:if(a)return!0;break;case 1:if(!a)return!0}let o=this._context.renderCoordsHelper.spatialReference,s=at,{origin:c,transform:l}=n;if(!w(t.spatialReference,g(J,c.x,c.y,c.z??0),s,o))return!1;switch(i){case void 0:a||this._fastUpdateProcessor.enable(e,this._materialInfoCache,this._context,!0);break;case 0:this._fastUpdateProcessor.enable(e,this._materialInfoCache,this._context);break;case 1:if(this._fastUpdateProcessor.disable(e,this._materialInfoCache),t.vertexSpace.type===`local`)return!1}e.updateFastLocalOrigin(s,l,this._context.localOriginFactory,!1);let{elevationContext:u}=e;u.centerInElevationSR=this._getCenterInElevationSR(s);let{elevationProvider:d,renderCoordsHelper:f}=this._context;return e.alignedSampledElevation=F(e,u,d.spatialReference,(e,t)=>L(e,d,u,f,t),f,s),e.updateTransform(s,l,this._context.isAsync,r),!0}computeComplexity(){if(!this._textures||this._textures.size===0)return super.computeComplexity();let e=0;for(let t of this._textures.values())e+=t.usedMemory;let t={...Ee(this.symbol,this.symbolLayer),resourceBytes:e},n=Ie(this.symbolLayer)?2:0;return new Fe({drawCallsPerFeature:n,memory:t})}_requiresSymbolVertexColors(){return this._hasDrivenColorOrOpacity}_materialPropertiesDefault(e,t){let n=this._requiresSymbolVertexColors(),r=!!e.vertexAttributes.color,i=!!e.vertexAttributes.tangent;return{hasSymbolVertexColors:n,hasVertexColors:r,hasVertexTangents:i,unlit:!1,uid:`vc:${r},vt:${i},vct${t},svc:${n}`}}_materialProperties(e,t,n){let r=this._materialPropertiesDefault(e,n);if(!t.material)return r;let{color:i,colorTexture:a,colorTextureTransform:o,normalTexture:s,normalTextureTransform:c,doubleSided:l,alphaCutoff:u,alphaMode:d}=t.material,f=G(i),p=G(a),m=K(o),h=G(s),g=K(c);if(r.color=i,r.colorTexture=a,r.normalTexture=s,r.uid=`${r.uid},cmuid:${f},ctmuid:${p},cttuid:${m},ntmuid:${h},nttuid:${g},ds:${l},ac:${u},am:${d}`,t.material instanceof he){let{metallic:e,roughness:n,metallicRoughnessTexture:i,metallicRoughnessTextureTransform:a,emissiveColor:s,emissiveStrength:l,emissiveTexture:u,emissiveTextureTransform:d,occlusionTexture:f,occlusionTextureTransform:p,unlit:m}=t.material,h=G(i),g=K(a),_=G(s),v=G(u),y=K(d),b=G(f),x=K(p);r.uid=[r.uid,`mrm:${e}`,`mrr:${n}`,`mrt:${h}`,`mrtt:${g}`,`emuid:${_}`,`ems:${l}`,`etmuid:${v}`,`ett:${y}`,`otmuid:${b}`,`ott:${x}`,`unlit:${m}`].join(`,`),r.metallic=e,r.roughness=n,r.metallicRoughnessTexture=i,r.emissiveColor=m?void 0:s,r.emissiveStrength=l,r.emissiveTexture=m?void 0:u,r.occlusionTexture=f,r.unlit=m,r.colorTextureTransform=U(o),r.normalTextureTransform=U(c),r.emissiveTextureTransform=U(d),r.occlusionTextureTransform=U(p),r.metallicRoughnessTextureTransform=U(a)}return r}_getInternalTexture(e,t=!1,n=1){let a=nt(e);if(!a)return null;let o=`${e.contentHash}/${n}`,s=this._textures.get(o);if(s){let e=this._context.stage.renderView.textures,t=null,n=e.acquire(s.id);return n!=null&&!i(n)&&(s.events.on(`unloaded`,()=>t=r(t)),t=n),s}let c=null,l=this._context.stage.renderView.renderingContext.parameters.maxMaxAnisotropy,u={wrap:$e(e.wrap),noUnpackFlip:!0,maxAnisotropy:l,mipmap:l>1};return Te(a)?(c=a.data,u.preMultiplyAlpha=!1,u.encoding=a.encoding):(c=a,u.preMultiplyAlpha=n!==1,u.compressionOptions=t?{compressionTracker:this._context.compressionTracker,compressionCallback:()=>this.updateComplexity()}:void 0),s=new ze(c,u),this._textures.set(o,s),s.events.on(`loaded`,()=>this.updateComplexity()),s.load(this._context.stage.renderView.renderingContext),this._context.stage.addTexture(s),s.events.on(`unloaded`,()=>{this._textures.delete(o)}),s}_setInternalMaterialTextureParameters(e,n){if(e.colorTexture!=null){let t=n.textureAlphaMode!==1,r=this._getInternalTexture(e.colorTexture,t,n.textureAlphaMode);r?(n.textureId=r.id,n.textureAlphaPremultiplied=!!r.parameters.preMultiplyAlpha):n.textureId=void 0}if(e.normalTexture&&(n.normalTextureId=this._getInternalTexture(e.normalTexture)?.id),e.emissiveColor){let r=e.emissiveColor?.toUnitRGB();n.emissiveBaseColor=re(t(r[0]),t(r[1]),t(r[2]))}e.emissiveStrength&&(n.emissiveStrengthKHR=e.emissiveStrength),e.emissiveTexture&&(n.emissiveTextureId=this._getInternalTexture(e.emissiveTexture)?.id),e.occlusionTexture&&(n.occlusionTextureId=this._getInternalTexture(e.occlusionTexture,!0)?.id),e.metallicRoughnessTexture&&(n.metallicRoughnessTextureId=this._getInternalTexture(e.metallicRoughnessTexture,!0)?.id)}_setInternalMaterialParameters(e,t,n){e.color!=null&&tt(e.color,t,n),this._setInternalMaterialTextureParameters(e,t),t.colorTextureTransformMatrix=P(e.colorTextureTransform),t.normalTextureTransformMatrix=P(e.normalTextureTransform);let r=e.normalTextureTransform?.scale==null?h:e.normalTextureTransform?.scale;t.scale=[r[0],r[1]],t.occlusionTextureTransformMatrix=P(e.occlusionTextureTransform),t.emissiveTextureTransformMatrix=P(e.emissiveTextureTransform),t.metallicRoughnessTextureTransformMatrix=P(e.metallicRoughnessTextureTransform)}_setExternalMaterialParameters(e,t=this._materialColor){let n=this._drivenProperties.color,r=this._drivenProperties.opacity;if(n)e.externalColor=oe;else{let n=t??null;if(n){let t=n.toUnitRGBA();r&&(t[3]=1),e.externalColor=t}else e.externalColor=je}e.colorMixMode=this.symbolLayer.material?.colorMixMode??`multiply`,e.castShadows=!!this.symbolLayer.castShadows,e.emissiveStrengthFromSymbol=this.symbolLayer?.material?.emissive?.strength??1,e.emissiveSource=we(this.symbolLayer?.material?.emissive?.source??`emissive`)}_getOrCreateMaterial(e,t){let n=t.material?.color,r=t.material?.colorTexture,i=t.material?.alphaMode,a=i===`blend`,o=i!==`opaque`&&(et(e)||n!=null&&n.a<1||r?.transparent||a),s=this._materialProperties(e,t,o),c=this._materialInfoCache.byUid(s.uid);if(c)return this._setInternalMaterialTextureParameters(s,c.material.parameters),c.material;let l={uid:s.uid,material:null,isComponentTransparent:o,alphaMode:t.material?t.material.alphaMode:`opaque`},u=He({normalTexture:s.normalTexture,metallicRoughnessTexture:s.metallicRoughnessTexture,metallicFactor:s.metallic,roughnessFactor:s.roughness,emissiveTexture:s.unlit?void 0:s.emissiveTexture,emissiveFactor:s.unlit?ie:s.emissiveColor?.toUnitRGB(),occlusionTexture:s.occlusionTexture}),d={usePBR:this._usePBR(),isSchematic:u,hasVertexColors:s.hasVertexColors,hasSymbolColors:s.hasSymbolVertexColors,hasVertexTangents:s.hasVertexTangents,ambient:ie,diffuse:ae,opacity:1,doubleSided:!0,doubleSidedType:`winding-order`,cullFace:0,unlit:s.unlit,layerOpacity:this._getLayerOpacity(),hasSlicePlane:this._context.slicePlaneEnabled,drivenOpacity:this.needsDrivenTransparentPass||l.isComponentTransparent};d.mrrFactors=u?We:[s.metallic,s.roughness,Ue[2]],t.material&&(d.doubleSided=t.material.doubleSided,d.cullFace=t.material.doubleSided?0:2,d.textureAlphaCutoff=t.material.alphaCutoff),this._setExternalMaterialParameters(d),this._setMaterialTextureAlphaMode(d,l),this._setInternalMaterialParameters(s,d,l);let f=new Ve(d,this._context);return l.material=f,this._materialInfoCache.set(s.uid,l),f}prepareSymbolLayerPatch(e){if(e.diff.type!==`partial`)return;let t=e.diff.diff;this._preparePatchColor(e,t),this._preparePatchEmissive(e,t)}_preparePatchColor(e,t){if(!t.material||t.material.type!==`partial`)return;let n=t.material.diff;if(!n.color||n.color.type!==`complete`||n.color.newValue==null||n.color.oldValue==null)return;let r=n.color.newValue;delete n.color,e.symbolLayerStatePatches.push(()=>{this._updateMaterialParameters(e=>{let t=e.material.parameters;this._setExternalMaterialParameters(t,r),this._setMaterialTextureAlphaMode(t,e),e.material.setParameters({externalColor:t.externalColor})})})}_preparePatchEmissive(e,t){return De(e,t,e=>{this._updateMaterialParameters(t=>{t.material.setParameters({emissiveStrengthFromSymbol:e??1})})},this.view.stage.renderView.renderingContext.driverTest.floatBufferBlend.result)}_usePBR(){return this._context.physicalBasedRenderingEnabled}_setMaterialTextureAlphaMode(e,t){e.textureAlphaMode=t.alphaMode===`auto`?this.needsDrivenTransparentPass||t.isComponentTransparent||(e.layerOpacity??1)<1||(e.opacity??1)<1||(e.externalColor?.[3]??1)<1?3:1:t.alphaMode===`opaque`?1:t.alphaMode===`mask`?2:0}_createFaceDebugNormals(e,t){let n=t.length,r=e.spatialReference.isGeographic?20015077/180:1,i=.1*Math.max(e.extent.width*r,e.extent.height*r,e.extent.zmax-e.extent.zmin),o=[],c=[],l=t[0].transformation,u=a(s(),l);for(let e=0;e<n;e++){let n=t[e].attributes.get(`position`);if(!n)continue;let r=n.data,a=n.indices;for(let e=0;e<a.length;e+=3)H(r,a,e,Z),Qe(r,a,e,J,Y,X),_(J,J,Y),_(J,J,X),v(J,J,1/3),y(J,J,l),o.push(...J),b(Z,Z,u),x(Z,Z),ee(J,J,Z,i),o.push(...J),c.push(c.length),c.push(c.length)}return o.length?new z(this._debugFaceNormalMaterial,[[`position`,new R(o,c,3,!0)]],null):null}_createPerVertexDebugVectors(e,t,n,r,i){let c=t.length,l=e.spatialReference.isGeographic?20015077/180:1,u=i*.1*Math.max(e.extent.width*l,e.extent.height*l,e.extent.zmax-e.extent.zmin),d=[],f=[],p=t[0].transformation,m=a(s(),p);n===`tangent`&&o(m,p);for(let e=0;e<c;e++){let r=t[e],i=r.attributes.get(`position`),a=r.attributes.get(n);if(!i||!a)continue;let o=i.data,s=i.indices,c=a.data,l=a.indices;for(let e=0;e<s.length;e++){let t=s[e]*3,n=l[e]*a.stride;g(J,o[t+0],o[t+1],o[t+2]),y(J,J,p),d.push(...J),g(Y,c[n+0],c[n+1],c[n+2]),b(Y,Y,m),x(Y,Y),ee(J,J,Y,u),d.push(...J),f.push(f.length),f.push(f.length)}}return d.length?new z(r,[[`position`,new R(d,f,3,!0)]],null):null}_createAs3DShape(e,t,n,r){let i=e.geometry;if(i.type!==`mesh`)return null;let a=this._createGeometryInfo(i,t,r);if(a==null)return null;let{geometries:o,objectTransformation:s}=a;if(Re.DRAW_MESH_GEOMETRY_NORMALS){let e=this._createPerVertexDebugVectors(i,o,`normal`,this._debugVertexNormalMaterial,1),t=this._createPerVertexDebugVectors(i,o,`tangent`,this._debugTangentNormalMaterial,.5),n=this._createFaceDebugNormals(i,o);e&&o.push(e),t&&o.push(t),n&&o.push(n)}let c=this._context.layerViewUid,l=new Be({geometries:o,layerViewUid:c,graphicUid:r,isElevationSource:!0});l.transformation=s;let u=Le(this.symbolLayer,{opacity:this._getLayerOpacity()}),d=u?new ke(o[0].material,u,this._context.slicePlaneEnabled):null,f=new Oe(this,l,null,F,n,d);this._fastUpdateProcessor.onAddGraphic(),f.needsElevationUpdates=I(n.mode),f.useObjectOriginAsAttachmentOrigin=!0,f.fastTransformUpdatesAllowed=this._fastTransformUpdatesAllowed(i),n.centerInElevationSR=this._getCenterInElevationSR(l.transformation);let{elevationProvider:p,renderCoordsHelper:m}=this._context;return f.alignedSampledElevation=F(f,n,p.spatialReference,(e,t)=>L(e,p,n,m,t),m),f}_fastTransformUpdatesAllowed(e){let{vertexSpace:t,spatialReference:n}=e;if(!_e(t))return!1;let{type:r}=t,{view:i}=this._context.graphicsCoreOwner,{viewingMode:a}=i.state,o=i.spatialReference;return a===1&&r===`local`||a===2&&D(o,n)&&r===`georeferenced`&&!n.isGeographic}_getElevationSR(){return this._context.elevationProvider.spatialReference??null}_getCenterInElevationSR(e){let t=C(),n=g(st,e[12],e[13],e[14]);return le(n,this._context.renderCoordsHelper.spatialReference,t,this._getElevationSR()),t}_passthroughReprojectionInfo(e){return e.reprojection===0&&!!e.objectTransformation}_createPositionBuffer(e,t,n){let r=n.position,i=r,a;if(t.reprojection===0)return{position:i,georeferencedPositionBuffer:a};let o=t.reprojection===1?t.transformBeforeProject:null;o&&(i=k(new Float64Array(i.length),i,o));let{normal:s,tangent:c}=n;!this._passthroughReprojectionInfo(t)&&(s||c)&&(a=i);let l=i===r||i===a?new Float64Array(i.length):i;return ce(i,e.spatialReference,0,l,this._context.renderCoordsHelper.spatialReference,0),{position:l,georeferencedPositionBuffer:a}}_createNormalBuffer(e,t,n,r,i){let a=i.normal;if(a==null)return null;let o=a,s=r.reprojection===1?r.transformBeforeProject:null;s&&(o=A(o,new Float32Array(o.length),s));let c=this._context.graphicsCoreOwner.view.viewingMode;if(r.reprojection===0)return o;if(c===`local`){if(!O(this._context.renderCoordsHelper.spatialReference))return o;if(n==null)return null;if(e.spatialReference.isGeographic){let e=o===a?new Float32Array(o.length):o;return j(o,0,n,e)}if(e.spatialReference.isWebMercator){let e=o===a?new Float32Array(o.length):o;return M(o,0,n,e)}return o}if(n==null)return null;let l=o===a?new Float32Array(o.length):o,u=this._context.renderCoordsHelper.spatialReference;return ye(o,n,e.spatialReference,t,u,l)}_createTangentBuffer(e,t,n,r,i){let a=i.tangent;if(a==null)return null;let o=a,s=r.reprojection===1?r.transformBeforeProject:null;s&&(o=N(o,new Float32Array(o.length),s));let c=this._context.graphicsCoreOwner.view.viewingMode;if(r.reprojection===0)return o;if(c===`local`){if(!O(this._context.renderCoordsHelper.spatialReference))return o;if(n==null)return null;if(e.spatialReference.isGeographic){let e=o===a?new Float32Array(o.length):o;return j(o,1,n,e)}if(e.spatialReference.isWebMercator){let e=o===a?new Float32Array(o.length):o;return M(o,1,n,e)}return o}if(n==null)return null;let l=o===a?new Float32Array(o.length):o,u=this._context.renderCoordsHelper.spatialReference;return be(o,n,e.spatialReference,t,u,l)}_createSymbolColorBuffer(e){return this._requiresSymbolVertexColors()?new Uint8Array(this._getDrivenUInt8ColorWithNaNSupport(e,this._materialColor,!0)):null}_createBuffers(e,t){let n=e.vertexAttributes&&e.vertexAttributes.position;if(!n)return this.logger.warn(`Mesh geometry must contain position vertex attributes`),null;let r=e.vertexAttributes.normal,i=e.vertexAttributes.uv,a=e.vertexAttributes.tangent;if(r&&r.length!==n.length)return this.logger.warn(`Mesh normal vertex buffer must contain the same number of elements as the position buffer`),null;if(a&&a.length/4!=n.length/3)return this.logger.warn(`Mesh tangent vertex buffer must contain the same number of elements as the position buffer`),null;if(i&&i.length/2!=n.length/3)return this.logger.warn(`Mesh uv vertex buffer must contain the same number of elements as the position buffer`),null;let o=this._computeReprojectionInfo(e),s=o.reprojection===1&&o.convertLocalVertexSpace,c=s&&e.vertexSpace.type===`local`?Se(e,e.vertexSpace,this._context.renderCoordsHelper.spatialReference):null;if(s&&!c)return this.logger.warn(`Local mesh vertex space could not be converted for rendering`),null;let{position:l,georeferencedPositionBuffer:u}=c?{position:c.position,georeferencedPositionBuffer:null}:this._createPositionBuffer(e,o,e.vertexAttributes),d=rt(e),f=this._createSymbolColorBuffer(t),p=c?c.normal:this._createNormalBuffer(e,l,u,o,e.vertexAttributes),m=c?c.tangent:this._createTangentBuffer(e,l,u,o,e.vertexAttributes),h=i,{geometryTransformation:g}=o,{transformation:_,position:v,normal:y,tangent:b}=this._passthroughReprojectionInfo(o)?{transformation:o.objectTransformation,position:l,normal:p,tangent:m}:this._expressInOriginLocalSpace(e,l,p,m,g);return{positionBuffer:v,normalBuffer:y,tangentBuffer:b,uvBuffer:h,colorBuffer:d,symbolColorBuffer:f,objectTransformation:_,geometryTransformation:g}}_computeReprojectionInfo(e){let{vertexSpace:t}=e,n=t.type===`georeferenced`,r=t.type===`local`&&this._context.graphicsCoreOwner.view.state.viewingMode===1,i=n?+!D(this._context.renderCoordsHelper.spatialReference,e.spatialReference):+!!r;if(ve(t))return{reprojection:i,geometryTransformation:f()};let a=t.origin,o=e.transform?.localMatrix??p;if(i===0){let t=f();return w(e.spatialReference,a,t,this._context.renderCoordsHelper.spatialReference),{reprojection:i,objectTransformation:t,geometryTransformation:m(o)}}if(r)return{reprojection:i,convertLocalVertexSpace:!0,geometryTransformation:m(o)};let s=c(f(),a);return l(s,s,o),{reprojection:i,transformBeforeProject:s,geometryTransformation:f()}}_expressInOriginLocalSpace(e,t,n,r,i){let a=this._context.renderCoordsHelper.spatialReference,o=e.origin;q[0]=o.x,q[1]=o.y,q[2]=o.z??0;let s=f();w(e.spatialReference,q,s,a),l(Q,s,i),u(Q,Q);let{position:c,normal:d,tangent:p}=e.vertexAttributes,m=t===c?new Float64Array(t.length):t;k(m,t,Q);let h=n?n===d?new Float32Array(n.length):n:null,g=r?r===p?new Float32Array(r.length):r:null;return n&&h&&A(n,h,Q),r&&g&&N(r,g,Q),{transformation:s,position:m,normal:h,tangent:g}}_validateFaces(e,t){let n=e.vertexAttributes.position.length/3,r=t.faces;if(r&&r.length>0){let e=-1;for(let t=0;t<r.length;t++){let n=r[t];n>e&&(e=n)}if(n<=e)return this.logger.warn(`Vertex index ${e} is out of bounds of the mesh position buffer`),!1}else if(n%3!=0)return this.logger.warn(`Mesh position buffer length must be a multiple of 9 if no component faces are defined (3 values per vertex * 3 vertices per triangle)`),!1;return!0}_isOutsideClippingArea(e){if(!this._context.clippingExtent||!e.vertexAttributes?.position)return!1;let t=this._context.elevationProvider.spatialReference,n=xe(e,t??e.spatialReference);return n?(ue(n,$),!de($,this._context.clippingExtent)):!1}_createGeometryInfo(e,t,n){if(!se(e.spatialReference,this._context.renderCoordsHelper.spatialReference))return this.logger.warn(`Geometry spatial reference is not compatible with the view`),null;if(!this._validateVertexSpace(e)||this._isOutsideClippingArea(e))return null;let r=this._createBuffers(e,t);if(r==null)return null;let{positionBuffer:i,uvBuffer:a,colorBuffer:o,symbolColorBuffer:s,normalBuffer:c,tangentBuffer:l,objectTransformation:u,geometryTransformation:f}=r,p=e.components??ot,m=[],h=!1,g=d(J,u),_=this._context.localOriginFactory.getOrigin(g);for(let t of p){if(!this._validateFaces(e,t))return null;let r=qe(e,t);if(r.length===0)continue;let u=Je(i,c,t,r);u.didFlipNormals&&(h=!0);let d=[[`position`,new R(i,r,3,!0)],[`normal`,new R(u.normals,u.indices,3,!0)]];o&&d.push([`color`,new R(o,r,4,!0)]);let p=null;s&&(p=E(r.length),d.push([`symbolColor`,new R(s,p,4,!0)])),a&&d.push([`uv0`,new R(a,r,2,!0)]),l&&d.push([`tangent`,new R(l,r,4,!0)]);let g=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:n,layerViewUid:this._context.layerViewUid});g&&(p??=E(r.length),Pe(d,g,p));let v=this._getOrCreateMaterial(e,t),y=new z(v,d,null);y.transformation=f,y.localOrigin=_,m.push(y)}return h&&this.logger.warn(`Normals have been automatically flipped to be consistent with the counter clock wise face winding order. It is better to generate mesh geometries that have consistent normals.`),m.length===0?null:{geometries:m,objectTransformation:u}}_updateMaterialParameters(e){this._materialInfoCache.forEachMaterialInfo(e),this._fastUpdateProcessor.forEachMaterialInfo(e),this._fastUpdateProcessor.forEachClonedMaterial((e,t)=>{t.setParameters(e.parameters)})}_validateVertexSpace(e){let{_context:{graphicsCoreOwner:{view:{state:{viewingMode:t}}}}}=this,{vertexSpace:n}=e;return t===2&&n.type===`local`?(this.logger.warn(`Displaying a mesh with a local vertex space in a view in local viewing mode is not supported.`),!1):!0}test(){return{...super.test(),materials:this._materialInfoCache.materials}}get _materialColor(){return this.symbolLayer.material?.color}}class V{constructor(e,t,n){this.normals=e,this.indices=t,this.didFlipNormals=n}}function qe(e,t){return t.faces??pe(e.vertexAttributes.position.length/3)}function Je(e,t,n,r){switch(n.shading||`flat`){default:case`source`:return Xe(e,t,n,r);case`flat`:return Ye(e,r);case`smooth`:return Ze(e,r)}}function Ye(e,t){let n=T(t.length),r=Array(t.length*3);for(let i=0;i<t.length;i+=3){let a=H(e,t,i,Z);for(let e=0;e<3;e++)n[i+e]=a[e],r[i+e]=i/3}return new V(n,r,!1)}function Xe(e,t,n,r){if(t==null)return Ye(e,r);let i=!1;if(!n.trustSourceNormals)for(let n=0;n<r.length;n+=3){H(e,r,n,Z);for(let e=0;e<3;e++){let a=r[n+e]*3;J[0]=t[a],J[1]=t[a+1],J[2]=t[a+2],ne(Z,J)<0&&(t[a]=-t[a],t[a+1]=-t[a+1],t[a+2]=-t[a+2],i=!0)}}return new V(t,r,i)}function Ze(e,t){let n={};for(let r=0;r<t.length;r+=3){let i=H(e,t,r,Z);for(let e=0;e<3;e++){let a=t[r+e],o=n[a];o||(o={normal:C(),count:0},n[a]=o),_(o.normal,o.normal,i),o.count++}}let r=T(t.length*3),i=Array(t.length*3);for(let e=0;e<t.length;e++){let a=n[t[e]];a.count!==1&&(x(a.normal,a.normal),a.count=1);for(let t=0;t<3;t++)r[e*3+t]=a.normal[t];i[e]=e}return new V(r,i,!1)}function Qe(e,t,n,r,i,a){let o=t[n]*3,s=t[n+1]*3,c=t[n+2]*3;r[0]=e[o],r[1]=e[o+1],r[2]=e[o+2],i[0]=e[s],i[1]=e[s+1],i[2]=e[s+2],a[0]=e[c],a[1]=e[c+1],a[2]=e[c+2]}function H(e,t,n,r){return Qe(e,t,n,J,Y,X),S(Y,Y,J),S(X,X,J),te(J,Y,X),x(r,J),r}function U(e){if(!e)return null;let{scale:t,offset:r,rotation:i}=e;return{scale:t,offset:r,rotation:n(i)}}function $e(e=`repeat`){if(typeof e==`string`){let t=W(e);return{s:t,t}}return{s:W(e.horizontal),t:W(e.vertical)}}function W(e){switch(e){case`clamp`:return 33071;case`mirror`:return 33648;default:return 10497}}function et(e){let t=e.vertexAttributes.color;if(t==null)return!1;for(let e=3;e<t.length;e+=4)if(t[e]!==255)return!0;return!1}function tt(e,t,n){t.diffuse=e.toUnitRGB(),t.opacity=n.alphaMode===`opaque`?1:e.a}function nt(e){return e.data??e.url}function G(t){return t==null?`-`:t instanceof e?t.toHex():t.contentHash}function K(e){let{offset:t,scale:n,rotation:r}=e??it;return`${t[0]},${t[1]},${r},${n[0]},${n[1]}`}function rt(e){return e.vertexAttributes.color}const it=new ge,q=C(),J=C(),Y=C(),X=C(),Z=C(),Q=f(),at=f(),$=fe(),ot=[new me],st=C();export{Ke as Graphics3DMeshFillSymbolLayer};
|
|
2
|
+
import e from"../../../../Color.js";import{linearize as t}from"../../../../colorUtils.js";import{deg2rad as n}from"../../../../core/mathUtils.js";import{releaseMaybe as r}from"../../../../core/maybe.js";import{isPromiseLike as i}from"../../../../core/promiseUtils.js";import{normalFromMat4 as a,fromMat4 as o}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromTranslation as c,multiply as l,invert as u,getTranslation as d}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as p,clone as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ONES as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as g,add as _,scale as v,transformMat4 as y,transformMat3 as b,normalize as x,scaleAndAdd as ee,subtract as S,cross as te,dot as ne}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as re,ZEROS as ie,ONES as ae,create as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as oe}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{canProjectWithoutEngine as se}from"../../../../geometry/projectionUtils.js";import{computeTranslationToOriginAndRotation as w}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as ce}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as le}from"../../../../geometry/projection/projectVectorToVector.js";import{fromBuffer as ue,intersectsClippingArea as de,create as fe}from"../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as T}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as E,getContinuousIndexArray as pe}from"../../../../geometry/support/Indices.js";import me from"../../../../geometry/support/MeshComponent.js";import he from"../../../../geometry/support/MeshMaterialMetallicRoughness.js";import ge from"../../../../geometry/support/MeshTextureTransform.js";import{isRelativeVertexSpace as _e,isAbsoluteVertexSpace as ve}from"../../../../geometry/support/meshVertexSpaceUtils.js";import{equals as D,isPlateCarree as O}from"../../../../geometry/support/spatialReferenceUtils.js";import{t as k}from"../../../../chunks/vec3.js";import{transformNormal as A,transformVectorENUPlateCarree as j,transformVectorWMPlateCarree as M,projectNormalToPCPF as ye,transformTangent as N,projectTangentToPCPF as be}from"../../../../geometry/support/meshUtils/projection.js";import{projectMeshVertexPositions as xe}from"../../../../geometry/support/meshUtils/projectMeshVertexPositions.js";import{projectLocalVertexSpaceToPCPF as Se}from"../../../../geometry/support/meshUtils/vertexSpaceConversion.js";import{isDrivenOpacityFallbackAlwaysOpaque as Ce}from"../../../../renderers/visualVariables/support/visualVariableUtils.js";import{getEmissiveMode as we}from"../../../../symbols/support/materialUtils.js";import{isEncodedMeshTexture as Te}from"../../glTF/internal/resourceUtils.js";import{getTransformMatrix as P}from"../../glTF/internal/TextureTransformUtils.js";import{defaultSymbolLayerMemoryComplexity as Ee}from"./defaultSymbolComplexity.js";import{perObjectElevationAligner as F}from"./ElevationAligners.js";import{needsElevationUpdates3D as I,evaluateElevationInfoAtPoint as L}from"./elevationAlignmentUtils.js";import{preparePatchEmissiveStrength as De}from"./emissiveUtils.js";import{Graphics3DMeshObject3DGraphicLayer as Oe}from"./Graphics3DMeshObject3DGraphicLayer.js";import{Object3DEdgeState as ke}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as Ae,nanFallbackColor as je}from"./Graphics3DSymbolLayer.js";import{MaterialInfoCache as Me,MeshFastUpdateProcessor as Ne}from"./MeshFastUpdateProcessor.js";import{addOlidAttribute as Pe}from"./olidUtils.js";import{SymbolComplexity as Fe}from"./SymbolComplexity.js";import{hasEdges as Ie,createMaterial as Le}from"../support/edgeUtils.js";import{debugFlags as Re}from"../../support/debugFlags.js";import{Attribute as R}from"../../webgl-engine/lib/Attribute.js";import{Geometry as z}from"../../webgl-engine/lib/Geometry.js";import{ManagedTexture as ze}from"../../webgl-engine/lib/ManagedTexture.js";import{Object3D as Be}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as Ve}from"../../webgl-engine/materials/DefaultMaterial.js";import{NativeLineMaterial as B}from"../../webgl-engine/materials/NativeLineMaterial.js";import{useSchematicPBR as He,advancedMRRFactors as Ue,schematicMRRFactors as We}from"../../webgl-engine/materials/pbrUtils.js";const Ge=[`mesh`];class Ke extends Ae{constructor(e,t,n,r){super(e,t,n,r,Ce(t)),this._materialInfoCache=new Me,this._fastUpdateProcessor=new Ne,this._textures=new Map,this.ensureDrapedStatus(!1)}async doLoad(){Re.DRAW_MESH_GEOMETRY_NORMALS&&(this._debugVertexNormalMaterial=new B({color:[1,0,1,1]}),this._debugTangentNormalMaterial=new B({color:[1,.5,0,1]}),this._debugFaceNormalMaterial=new B({color:[0,1,1,1]})),this.updateComplexity()}destroy(){super.destroy(),this._textures.forEach(e=>e.unload()),this._context.stage.removeTextures(Array.from(this._textures.values())),this._materialInfoCache.clear(),this._textures.clear(),this._fastUpdateProcessor.destroy()}get materials(){return this._materialInfoCache.materials}createGraphics3DGraphic(e){let t=e.graphic;if(!this._validateGeometry(t.geometry,Ge,`fill on mesh-3d`))return null;let n=this.createElevationContextForGraphic(t),r=e.renderingInfo;return this._createAs3DShape(t,r,n,t.uid)}onRemoveGraphic(e){this._fastUpdateProcessor.onRemoveGraphic(e,this._materialInfoCache)}layerOpacityChanged(e,t){let n=this._getLayerOpacity();this._updateMaterialParameters(e=>{e.material.setParameters({layerOpacity:n});let t=e.material.parameters;this._setMaterialTextureAlphaMode(t,e)}),e?.forEach(e=>t(e)?.layerOpacityChanged(n,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,I)}slicePlaneEnabledChanged(e,t){return this._updateMaterialParameters(({material:e})=>{e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})}),e?.forEach(e=>t(e)?.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)),!0}physicalBasedRenderingChanged(){let e=this._usePBR();return this._updateMaterialParameters(({material:t})=>t.setParameters({usePBR:e})),!0}updateMeshTransform(e,t,n,r,i){if(!e.fastTransformUpdatesAllowed)return!1;let a=e.fastTransformUpdatesEnabled;switch(i){case 0:if(a)return!0;break;case 1:if(!a)return!0}let o=this._context.renderCoordsHelper.spatialReference,s=at,{origin:c,transform:l}=n;if(!w(t.spatialReference,g(J,c.x,c.y,c.z??0),s,o))return!1;switch(i){case void 0:a||this._fastUpdateProcessor.enable(e,this._materialInfoCache,this._context,!0);break;case 0:this._fastUpdateProcessor.enable(e,this._materialInfoCache,this._context);break;case 1:if(this._fastUpdateProcessor.disable(e,this._materialInfoCache),t.vertexSpace.type===`local`)return!1}e.updateFastLocalOrigin(s,l,this._context.localOriginFactory,!1);let{elevationContext:u}=e;u.centerInElevationSR=this._getCenterInElevationSR(s);let{elevationProvider:d,renderCoordsHelper:f}=this._context;return e.alignedSampledElevation=F(e,u,d.spatialReference,(e,t)=>L(e,d,u,f,t),f,s),e.updateTransform(s,l,this._context.isAsync,r),!0}computeComplexity(){if(!this._textures||this._textures.size===0)return super.computeComplexity();let e=0;for(let t of this._textures.values())e+=t.usedMemory;let t={...Ee(this.symbol,this.symbolLayer),resourceBytes:e},n=Ie(this.symbolLayer)?2:0;return new Fe({drawCallsPerFeature:n,memory:t})}_requiresSymbolVertexColors(){return this._hasDrivenColorOrOpacity}_materialPropertiesDefault(e,t){let n=this._requiresSymbolVertexColors(),r=!!e.vertexAttributes.color,i=!!e.vertexAttributes.tangent;return{hasSymbolVertexColors:n,hasVertexColors:r,hasVertexTangents:i,unlit:!1,uid:`vc:${r},vt:${i},vct${t},svc:${n}`}}_materialProperties(e,t,n){let r=this._materialPropertiesDefault(e,n);if(!t.material)return r;let{color:i,colorTexture:a,colorTextureTransform:o,normalTexture:s,normalTextureTransform:c,doubleSided:l,alphaCutoff:u,alphaMode:d}=t.material,f=G(i),p=G(a),m=K(o),h=G(s),g=K(c);if(r.color=i,r.colorTexture=a,r.normalTexture=s,r.uid=`${r.uid},cmuid:${f},ctmuid:${p},cttuid:${m},ntmuid:${h},nttuid:${g},ds:${l},ac:${u},am:${d}`,t.material instanceof he){let{metallic:e,roughness:n,metallicRoughnessTexture:i,metallicRoughnessTextureTransform:a,emissiveColor:s,emissiveStrength:l,emissiveTexture:u,emissiveTextureTransform:d,occlusionTexture:f,occlusionTextureTransform:p,unlit:m}=t.material,h=G(i),g=K(a),_=G(s),v=G(u),y=K(d),b=G(f),x=K(p);r.uid=[r.uid,`mrm:${e}`,`mrr:${n}`,`mrt:${h}`,`mrtt:${g}`,`emuid:${_}`,`ems:${l}`,`etmuid:${v}`,`ett:${y}`,`otmuid:${b}`,`ott:${x}`,`unlit:${m}`].join(`,`),r.metallic=e,r.roughness=n,r.metallicRoughnessTexture=i,r.emissiveColor=m?void 0:s,r.emissiveStrength=l,r.emissiveTexture=m?void 0:u,r.occlusionTexture=f,r.unlit=m,r.colorTextureTransform=U(o),r.normalTextureTransform=U(c),r.emissiveTextureTransform=U(d),r.occlusionTextureTransform=U(p),r.metallicRoughnessTextureTransform=U(a)}return r}_getInternalTexture(e,t=!1,n=1){let a=nt(e);if(!a)return null;let o=`${e.contentHash}/${n}`,s=this._textures.get(o);if(s){let e=this._context.stage.renderView.textures,t=null,n=e.acquire(s.id);return n!=null&&!i(n)&&(s.events.on(`unloaded`,()=>t=r(t)),t=n),s}let c=null,l=this._context.stage.renderView.renderingContext.parameters.maxMaxAnisotropy,u={wrap:$e(e.wrap),noUnpackFlip:!0,maxAnisotropy:l,mipmap:l>1};return Te(a)?(c=a.data,u.preMultiplyAlpha=!1,u.encoding=a.encoding):(c=a,u.preMultiplyAlpha=n!==1,u.compressionOptions=t?{compressionTracker:this._context.compressionTracker,compressionCallback:()=>this.updateComplexity()}:void 0),s=new ze(c,u),this._textures.set(o,s),s.events.on(`loaded`,()=>this.updateComplexity()),s.load(this._context.stage.renderView.renderingContext),this._context.stage.addTexture(s),s.events.on(`unloaded`,()=>{this._textures.delete(o)}),s}_setInternalMaterialTextureParameters(e,n){if(e.colorTexture!=null){let t=n.textureAlphaMode!==1,r=this._getInternalTexture(e.colorTexture,t,n.textureAlphaMode);r?(n.textureId=r.id,n.textureAlphaPremultiplied=!!r.parameters.preMultiplyAlpha):n.textureId=void 0}if(e.normalTexture&&(n.normalTextureId=this._getInternalTexture(e.normalTexture)?.id),e.emissiveColor){let r=e.emissiveColor?.toUnitRGB();n.emissiveBaseColor=re(t(r[0]),t(r[1]),t(r[2]))}e.emissiveStrength&&(n.emissiveStrengthKHR=e.emissiveStrength),e.emissiveTexture&&(n.emissiveTextureId=this._getInternalTexture(e.emissiveTexture)?.id),e.occlusionTexture&&(n.occlusionTextureId=this._getInternalTexture(e.occlusionTexture,!0)?.id),e.metallicRoughnessTexture&&(n.metallicRoughnessTextureId=this._getInternalTexture(e.metallicRoughnessTexture,!0)?.id)}_setInternalMaterialParameters(e,t,n){e.color!=null&&tt(e.color,t,n),this._setInternalMaterialTextureParameters(e,t),t.colorTextureTransformMatrix=P(e.colorTextureTransform),t.normalTextureTransformMatrix=P(e.normalTextureTransform);let r=e.normalTextureTransform?.scale==null?h:e.normalTextureTransform?.scale;t.scale=[r[0],r[1]],t.occlusionTextureTransformMatrix=P(e.occlusionTextureTransform),t.emissiveTextureTransformMatrix=P(e.emissiveTextureTransform),t.metallicRoughnessTextureTransformMatrix=P(e.metallicRoughnessTextureTransform)}_setExternalMaterialParameters(e,t=this._materialColor){let n=this._drivenProperties.color,r=this._drivenProperties.opacity;if(n)e.externalColor=oe;else{let n=t??null;if(n){let t=n.toUnitRGBA();r&&(t[3]=1),e.externalColor=t}else e.externalColor=je}e.colorMixMode=this.symbolLayer.material?.colorMixMode??`multiply`,e.castShadows=!!this.symbolLayer.castShadows,e.emissiveStrengthFromSymbol=this.symbolLayer?.material?.emissive?.strength??1,e.emissiveSource=we(this.symbolLayer?.material?.emissive?.source??`emissive`)}_getOrCreateMaterial(e,t){let n=t.material?.color,r=t.material?.colorTexture,i=t.material?.alphaMode,a=i===`blend`,o=i!==`opaque`&&(et(e)||n!=null&&n.a<1||r?.transparent||a),s=this._materialProperties(e,t,o),c=this._materialInfoCache.byUid(s.uid);if(c)return this._setInternalMaterialTextureParameters(s,c.material.parameters),c.material;let l={uid:s.uid,material:null,isComponentTransparent:o,alphaMode:t.material?t.material.alphaMode:`opaque`},u=He({normalTexture:s.normalTexture,metallicRoughnessTexture:s.metallicRoughnessTexture,metallicFactor:s.metallic,roughnessFactor:s.roughness,emissiveTexture:s.unlit?void 0:s.emissiveTexture,emissiveFactor:s.unlit?ie:s.emissiveColor?.toUnitRGB(),occlusionTexture:s.occlusionTexture}),d={usePBR:this._usePBR(),isSchematic:u,hasVertexColors:s.hasVertexColors,hasSymbolColors:s.hasSymbolVertexColors,hasVertexTangents:s.hasVertexTangents,ambient:ie,diffuse:ae,opacity:1,doubleSided:!0,doubleSidedType:`winding-order`,cullFace:0,unlit:s.unlit,layerOpacity:this._getLayerOpacity(),hasSlicePlane:this._context.slicePlaneEnabled,drivenOpacity:this.needsDrivenTransparentPass||l.isComponentTransparent};d.mrrFactors=u?We:[s.metallic,s.roughness,Ue[2]],t.material&&(d.doubleSided=t.material.doubleSided,d.cullFace=t.material.doubleSided?0:2,d.textureAlphaCutoff=t.material.alphaCutoff),this._setExternalMaterialParameters(d),this._setMaterialTextureAlphaMode(d,l),this._setInternalMaterialParameters(s,d,l);let f=new Ve(d,this._context.spherical);return l.material=f,this._materialInfoCache.set(s.uid,l),f}prepareSymbolLayerPatch(e){if(e.diff.type!==`partial`)return;let t=e.diff.diff;this._preparePatchColor(e,t),this._preparePatchEmissive(e,t)}_preparePatchColor(e,t){if(!t.material||t.material.type!==`partial`)return;let n=t.material.diff;if(!n.color||n.color.type!==`complete`||n.color.newValue==null||n.color.oldValue==null)return;let r=n.color.newValue;delete n.color,e.symbolLayerStatePatches.push(()=>{this._updateMaterialParameters(e=>{let t=e.material.parameters;this._setExternalMaterialParameters(t,r),this._setMaterialTextureAlphaMode(t,e),e.material.setParameters({externalColor:t.externalColor})})})}_preparePatchEmissive(e,t){return De(e,t,e=>{this._updateMaterialParameters(t=>{t.material.setParameters({emissiveStrengthFromSymbol:e??1})})},this.view.stage.renderView.renderingContext.driverTest.floatBufferBlend.result)}_usePBR(){return this._context.physicalBasedRenderingEnabled}_setMaterialTextureAlphaMode(e,t){e.textureAlphaMode=t.alphaMode===`auto`?this.needsDrivenTransparentPass||t.isComponentTransparent||(e.layerOpacity??1)<1||(e.opacity??1)<1||(e.externalColor?.[3]??1)<1?3:1:t.alphaMode===`opaque`?1:t.alphaMode===`mask`?2:0}_createFaceDebugNormals(e,t){let n=t.length,r=e.spatialReference.isGeographic?20015077/180:1,i=.1*Math.max(e.extent.width*r,e.extent.height*r,e.extent.zmax-e.extent.zmin),o=[],c=[],l=t[0].transformation,u=a(s(),l);for(let e=0;e<n;e++){let n=t[e].attributes.get(`position`);if(!n)continue;let r=n.data,a=n.indices;for(let e=0;e<a.length;e+=3)H(r,a,e,Z),Qe(r,a,e,J,Y,X),_(J,J,Y),_(J,J,X),v(J,J,1/3),y(J,J,l),o.push(...J),b(Z,Z,u),x(Z,Z),ee(J,J,Z,i),o.push(...J),c.push(c.length),c.push(c.length)}return o.length?new z(this._debugFaceNormalMaterial,[[`position`,new R(o,c,3,!0)]],null):null}_createPerVertexDebugVectors(e,t,n,r,i){let c=t.length,l=e.spatialReference.isGeographic?20015077/180:1,u=i*.1*Math.max(e.extent.width*l,e.extent.height*l,e.extent.zmax-e.extent.zmin),d=[],f=[],p=t[0].transformation,m=a(s(),p);n===`tangent`&&o(m,p);for(let e=0;e<c;e++){let r=t[e],i=r.attributes.get(`position`),a=r.attributes.get(n);if(!i||!a)continue;let o=i.data,s=i.indices,c=a.data,l=a.indices;for(let e=0;e<s.length;e++){let t=s[e]*3,n=l[e]*a.stride;g(J,o[t+0],o[t+1],o[t+2]),y(J,J,p),d.push(...J),g(Y,c[n+0],c[n+1],c[n+2]),b(Y,Y,m),x(Y,Y),ee(J,J,Y,u),d.push(...J),f.push(f.length),f.push(f.length)}}return d.length?new z(r,[[`position`,new R(d,f,3,!0)]],null):null}_createAs3DShape(e,t,n,r){let i=e.geometry;if(i.type!==`mesh`)return null;let a=this._createGeometryInfo(i,t,r);if(a==null)return null;let{geometries:o,objectTransformation:s}=a;if(Re.DRAW_MESH_GEOMETRY_NORMALS){let e=this._createPerVertexDebugVectors(i,o,`normal`,this._debugVertexNormalMaterial,1),t=this._createPerVertexDebugVectors(i,o,`tangent`,this._debugTangentNormalMaterial,.5),n=this._createFaceDebugNormals(i,o);e&&o.push(e),t&&o.push(t),n&&o.push(n)}let c=this._context.layerViewUid,l=new Be({geometries:o,layerViewUid:c,graphicUid:r,isElevationSource:!0});l.transformation=s;let u=Le(this.symbolLayer,{opacity:this._getLayerOpacity()}),d=u?new ke(o[0].material,u,this._context.slicePlaneEnabled):null,f=new Oe(this,l,null,F,n,d);this._fastUpdateProcessor.onAddGraphic(),f.needsElevationUpdates=I(n.mode),f.useObjectOriginAsAttachmentOrigin=!0,f.fastTransformUpdatesAllowed=this._fastTransformUpdatesAllowed(i),n.centerInElevationSR=this._getCenterInElevationSR(l.transformation);let{elevationProvider:p,renderCoordsHelper:m}=this._context;return f.alignedSampledElevation=F(f,n,p.spatialReference,(e,t)=>L(e,p,n,m,t),m),f}_fastTransformUpdatesAllowed(e){let{vertexSpace:t,spatialReference:n}=e;if(!_e(t))return!1;let{type:r}=t,{view:i}=this._context.graphicsCoreOwner,{viewingMode:a}=i.state,o=i.spatialReference;return a===1&&r===`local`||a===2&&D(o,n)&&r===`georeferenced`&&!n.isGeographic}_getElevationSR(){return this._context.elevationProvider.spatialReference??null}_getCenterInElevationSR(e){let t=C(),n=g(st,e[12],e[13],e[14]);return le(n,this._context.renderCoordsHelper.spatialReference,t,this._getElevationSR()),t}_passthroughReprojectionInfo(e){return e.reprojection===0&&!!e.objectTransformation}_createPositionBuffer(e,t,n){let r=n.position,i=r,a;if(t.reprojection===0)return{position:i,georeferencedPositionBuffer:a};let o=t.reprojection===1?t.transformBeforeProject:null;o&&(i=k(new Float64Array(i.length),i,o));let{normal:s,tangent:c}=n;!this._passthroughReprojectionInfo(t)&&(s||c)&&(a=i);let l=i===r||i===a?new Float64Array(i.length):i;return ce(i,e.spatialReference,0,l,this._context.renderCoordsHelper.spatialReference,0),{position:l,georeferencedPositionBuffer:a}}_createNormalBuffer(e,t,n,r,i){let a=i.normal;if(a==null)return null;let o=a,s=r.reprojection===1?r.transformBeforeProject:null;s&&(o=A(o,new Float32Array(o.length),s));let c=this._context.graphicsCoreOwner.view.viewingMode;if(r.reprojection===0)return o;if(c===`local`){if(!O(this._context.renderCoordsHelper.spatialReference))return o;if(n==null)return null;if(e.spatialReference.isGeographic){let e=o===a?new Float32Array(o.length):o;return j(o,0,n,e)}if(e.spatialReference.isWebMercator){let e=o===a?new Float32Array(o.length):o;return M(o,0,n,e)}return o}if(n==null)return null;let l=o===a?new Float32Array(o.length):o,u=this._context.renderCoordsHelper.spatialReference;return ye(o,n,e.spatialReference,t,u,l)}_createTangentBuffer(e,t,n,r,i){let a=i.tangent;if(a==null)return null;let o=a,s=r.reprojection===1?r.transformBeforeProject:null;s&&(o=N(o,new Float32Array(o.length),s));let c=this._context.graphicsCoreOwner.view.viewingMode;if(r.reprojection===0)return o;if(c===`local`){if(!O(this._context.renderCoordsHelper.spatialReference))return o;if(n==null)return null;if(e.spatialReference.isGeographic){let e=o===a?new Float32Array(o.length):o;return j(o,1,n,e)}if(e.spatialReference.isWebMercator){let e=o===a?new Float32Array(o.length):o;return M(o,1,n,e)}return o}if(n==null)return null;let l=o===a?new Float32Array(o.length):o,u=this._context.renderCoordsHelper.spatialReference;return be(o,n,e.spatialReference,t,u,l)}_createSymbolColorBuffer(e){return this._requiresSymbolVertexColors()?new Uint8Array(this._getDrivenUInt8ColorWithNaNSupport(e,this._materialColor,!0)):null}_createBuffers(e,t){let n=e.vertexAttributes&&e.vertexAttributes.position;if(!n)return this.logger.warn(`Mesh geometry must contain position vertex attributes`),null;let r=e.vertexAttributes.normal,i=e.vertexAttributes.uv,a=e.vertexAttributes.tangent;if(r&&r.length!==n.length)return this.logger.warn(`Mesh normal vertex buffer must contain the same number of elements as the position buffer`),null;if(a&&a.length/4!=n.length/3)return this.logger.warn(`Mesh tangent vertex buffer must contain the same number of elements as the position buffer`),null;if(i&&i.length/2!=n.length/3)return this.logger.warn(`Mesh uv vertex buffer must contain the same number of elements as the position buffer`),null;let o=this._computeReprojectionInfo(e),s=o.reprojection===1&&o.convertLocalVertexSpace,c=s&&e.vertexSpace.type===`local`?Se(e,e.vertexSpace,this._context.renderCoordsHelper.spatialReference):null;if(s&&!c)return this.logger.warn(`Local mesh vertex space could not be converted for rendering`),null;let{position:l,georeferencedPositionBuffer:u}=c?{position:c.position,georeferencedPositionBuffer:null}:this._createPositionBuffer(e,o,e.vertexAttributes),d=rt(e),f=this._createSymbolColorBuffer(t),p=c?c.normal:this._createNormalBuffer(e,l,u,o,e.vertexAttributes),m=c?c.tangent:this._createTangentBuffer(e,l,u,o,e.vertexAttributes),h=i,{geometryTransformation:g}=o,{transformation:_,position:v,normal:y,tangent:b}=this._passthroughReprojectionInfo(o)?{transformation:o.objectTransformation,position:l,normal:p,tangent:m}:this._expressInOriginLocalSpace(e,l,p,m,g);return{positionBuffer:v,normalBuffer:y,tangentBuffer:b,uvBuffer:h,colorBuffer:d,symbolColorBuffer:f,objectTransformation:_,geometryTransformation:g}}_computeReprojectionInfo(e){let{vertexSpace:t}=e,n=t.type===`georeferenced`,r=t.type===`local`&&this._context.graphicsCoreOwner.view.state.isGlobal,i=n?+!D(this._context.renderCoordsHelper.spatialReference,e.spatialReference):+!!r;if(ve(t))return{reprojection:i,geometryTransformation:f()};let a=t.origin,o=e.transform?.localMatrix??p;if(i===0){let t=f();return w(e.spatialReference,a,t,this._context.renderCoordsHelper.spatialReference),{reprojection:i,objectTransformation:t,geometryTransformation:m(o)}}if(r)return{reprojection:i,convertLocalVertexSpace:!0,geometryTransformation:m(o)};let s=c(f(),a);return l(s,s,o),{reprojection:i,transformBeforeProject:s,geometryTransformation:f()}}_expressInOriginLocalSpace(e,t,n,r,i){let a=this._context.renderCoordsHelper.spatialReference,o=e.origin;q[0]=o.x,q[1]=o.y,q[2]=o.z??0;let s=f();w(e.spatialReference,q,s,a),l(Q,s,i),u(Q,Q);let{position:c,normal:d,tangent:p}=e.vertexAttributes,m=t===c?new Float64Array(t.length):t;k(m,t,Q);let h=n?n===d?new Float32Array(n.length):n:null,g=r?r===p?new Float32Array(r.length):r:null;return n&&h&&A(n,h,Q),r&&g&&N(r,g,Q),{transformation:s,position:m,normal:h,tangent:g}}_validateFaces(e,t){let n=e.vertexAttributes.position.length/3,r=t.faces;if(r&&r.length>0){let e=-1;for(let t=0;t<r.length;t++){let n=r[t];n>e&&(e=n)}if(n<=e)return this.logger.warn(`Vertex index ${e} is out of bounds of the mesh position buffer`),!1}else if(n%3!=0)return this.logger.warn(`Mesh position buffer length must be a multiple of 9 if no component faces are defined (3 values per vertex * 3 vertices per triangle)`),!1;return!0}_isOutsideClippingArea(e){if(!this._context.clippingExtent||!e.vertexAttributes?.position)return!1;let t=this._context.elevationProvider.spatialReference,n=xe(e,t??e.spatialReference);return n?(ue(n,$),!de($,this._context.clippingExtent)):!1}_createGeometryInfo(e,t,n){if(!se(e.spatialReference,this._context.renderCoordsHelper.spatialReference))return this.logger.warn(`Geometry spatial reference is not compatible with the view`),null;if(!this._validateVertexSpace(e)||this._isOutsideClippingArea(e))return null;let r=this._createBuffers(e,t);if(r==null)return null;let{positionBuffer:i,uvBuffer:a,colorBuffer:o,symbolColorBuffer:s,normalBuffer:c,tangentBuffer:l,objectTransformation:u,geometryTransformation:f}=r,p=e.components??ot,m=[],h=!1,g=d(J,u),_=this._context.localOriginFactory.getOrigin(g);for(let t of p){if(!this._validateFaces(e,t))return null;let r=qe(e,t);if(r.length===0)continue;let u=Je(i,c,t,r);u.didFlipNormals&&(h=!0);let d=[[`position`,new R(i,r,3,!0)],[`normal`,new R(u.normals,u.indices,3,!0)]];o&&d.push([`color`,new R(o,r,4,!0)]);let p=null;s&&(p=E(r.length),d.push([`symbolColor`,new R(s,p,4,!0)])),a&&d.push([`uv0`,new R(a,r,2,!0)]),l&&d.push([`tangent`,new R(l,r,4,!0)]);let g=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:n,layerViewUid:this._context.layerViewUid});g&&(p??=E(r.length),Pe(d,g,p));let v=this._getOrCreateMaterial(e,t),y=new z(v,d,null);y.transformation=f,y.localOrigin=_,m.push(y)}return h&&this.logger.warn(`Normals have been automatically flipped to be consistent with the counter clock wise face winding order. It is better to generate mesh geometries that have consistent normals.`),m.length===0?null:{geometries:m,objectTransformation:u}}_updateMaterialParameters(e){this._materialInfoCache.forEachMaterialInfo(e),this._fastUpdateProcessor.forEachMaterialInfo(e),this._fastUpdateProcessor.forEachClonedMaterial((e,t)=>{t.setParameters(e.parameters)})}_validateVertexSpace(e){let{_context:{graphicsCoreOwner:{view:{state:{viewingMode:t}}}}}=this,{vertexSpace:n}=e;return t===2&&n.type===`local`?(this.logger.warn(`Displaying a mesh with a local vertex space in a view in local viewing mode is not supported.`),!1):!0}test(){return{...super.test(),materials:this._materialInfoCache.materials}}get _materialColor(){return this.symbolLayer.material?.color}}class V{constructor(e,t,n){this.normals=e,this.indices=t,this.didFlipNormals=n}}function qe(e,t){return t.faces??pe(e.vertexAttributes.position.length/3)}function Je(e,t,n,r){switch(n.shading||`flat`){default:case`source`:return Xe(e,t,n,r);case`flat`:return Ye(e,r);case`smooth`:return Ze(e,r)}}function Ye(e,t){let n=T(t.length),r=Array(t.length*3);for(let i=0;i<t.length;i+=3){let a=H(e,t,i,Z);for(let e=0;e<3;e++)n[i+e]=a[e],r[i+e]=i/3}return new V(n,r,!1)}function Xe(e,t,n,r){if(t==null)return Ye(e,r);let i=!1;if(!n.trustSourceNormals)for(let n=0;n<r.length;n+=3){H(e,r,n,Z);for(let e=0;e<3;e++){let a=r[n+e]*3;J[0]=t[a],J[1]=t[a+1],J[2]=t[a+2],ne(Z,J)<0&&(t[a]=-t[a],t[a+1]=-t[a+1],t[a+2]=-t[a+2],i=!0)}}return new V(t,r,i)}function Ze(e,t){let n={};for(let r=0;r<t.length;r+=3){let i=H(e,t,r,Z);for(let e=0;e<3;e++){let a=t[r+e],o=n[a];o||(o={normal:C(),count:0},n[a]=o),_(o.normal,o.normal,i),o.count++}}let r=T(t.length*3),i=Array(t.length*3);for(let e=0;e<t.length;e++){let a=n[t[e]];a.count!==1&&(x(a.normal,a.normal),a.count=1);for(let t=0;t<3;t++)r[e*3+t]=a.normal[t];i[e]=e}return new V(r,i,!1)}function Qe(e,t,n,r,i,a){let o=t[n]*3,s=t[n+1]*3,c=t[n+2]*3;r[0]=e[o],r[1]=e[o+1],r[2]=e[o+2],i[0]=e[s],i[1]=e[s+1],i[2]=e[s+2],a[0]=e[c],a[1]=e[c+1],a[2]=e[c+2]}function H(e,t,n,r){return Qe(e,t,n,J,Y,X),S(Y,Y,J),S(X,X,J),te(J,Y,X),x(r,J),r}function U(e){if(!e)return null;let{scale:t,offset:r,rotation:i}=e;return{scale:t,offset:r,rotation:n(i)}}function $e(e=`repeat`){if(typeof e==`string`){let t=W(e);return{s:t,t}}return{s:W(e.horizontal),t:W(e.vertical)}}function W(e){switch(e){case`clamp`:return 33071;case`mirror`:return 33648;default:return 10497}}function et(e){let t=e.vertexAttributes.color;if(t==null)return!1;for(let e=3;e<t.length;e+=4)if(t[e]!==255)return!0;return!1}function tt(e,t,n){t.diffuse=e.toUnitRGB(),t.opacity=n.alphaMode===`opaque`?1:e.a}function nt(e){return e.data??e.url}function G(t){return t==null?`-`:t instanceof e?t.toHex():t.contentHash}function K(e){let{offset:t,scale:n,rotation:r}=e??it;return`${t[0]},${t[1]},${r},${n[0]},${n[1]}`}function rt(e){return e.vertexAttributes.color}const it=new ge,q=C(),J=C(),Y=C(),X=C(),Z=C(),Q=f(),at=f(),$=fe(),ot=[new me],st=C();export{Ke as Graphics3DMeshFillSymbolLayer};
|