@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
package/views/3d/terrain/Tile.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{toConst as e}from"../../../core/compilerUtils.js";import"../../../core/has.js";import{clamp as t}from"../../../core/mathUtils.js";import{abortMaybe as n}from"../../../core/maybe.js";import r from"../../../core/ObjectPool.js";import{subtract as i,squaredLength as a,dot as o,scale as s,add as c,length as l,copy as u}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d,unitZ as f}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../geometry/ellipsoidUtils.js";import{create as m,equals as h,rectangleContainsRectangleCyclicalAware as g,rectanglesIntersectCyclicalAware as _,width as v,height as y}from"../../../geometry/support/aaBoundingRect.js";import{Sphere as b}from"../../../geometry/support/sphere.js";import{isGroupLayer as x}from"../../../layers/support/layerUtils.js";import{isLayerViewWithFlowRenderer as S}from"../support/flowUtils.js";import{ElevationBounds as C}from"./ElevationBounds.js";import{ElevationTileAgent as w,isElevationTileAgent as T}from"./ElevationTileAgent.js";import{LayerClasses as E}from"./LayerClass.js";import{MapDataCacheItem as D}from"./MapDataCacheItem.js";import{MapTileAgent as O,isMapTileAgent as ee}from"./MapTileAgent.js";import{maxPatchTesselation as te}from"./TerrainConst.js";import{isVectorTile as k,isTileTexture as ne,isRasterTile as re,isCreateBitmapResult as ie}from"./TerrainData.js";import{weakAssert as A,isBlendableLayerView as ae,oppositeCorner as j,internalAssert as M,enableTerrainInternalChecks as N,neighborEdgeIndices as P,oppositeEdge as F,neighborCornerIndices as I,almostEquals as L,isNorth as R,isSouth as z,isWest as B,isEast as V,isWestCorner as oe,isNorthCorner as se}from"./terrainUtils.js";import{tileAgentDone as H}from"./TileAgent.js";import{TilePerLayerInfo as U}from"./TilePerLayerInfo.js";import{fallsWithinLayerView as W}from"./tileUtils.js";class ce{constructor(){this._lij=[0,0,0],this._children=[null,null,null,null],this._pendingUpdates=0,this._dirty=!0,this._previouslyRendered=!1,this._lastElevationSourceUpdateRequestSignature=null,this.extent=m(),this._elevationBoundsMin=NaN,this._elevationBoundsMax=0,this.layerInfo=[[],[]],this.extentInRadians=m(),this.centerAtSeaLevel=d(),this._center=[d(),new b,d()],this.up=f(),this._withinClippingArea=!0,this._intersectsClippingArea=!0,this._maxTesselation=0,this._usedMemory=0,this._rasterTileMemory=0,this._vectorTileMemory=0,this._mapDataRefCount=0,this.screenDepth=0,this.renderOrder=0,this._edgeLen=0,this._edgeLen2=0,this._curvatureHeight=0,this.onCompressionFinished=()=>{this.setPendingUpdate(16),this.setMemoryDirty()},this.extentMidX=0,this.extentMidY=0,this.distanceToPOI=-1,this._lastPOI=d(),this.maxLevelDeltaNeighborCount=0,this.unmergableChildCount=0}get lij(){return this._lij}get spatialReference(){return this._surface.spatialReference??this._surface.tilingScheme.spatialReference}get isDisposed(){return this._surface==null}get elevationLevelDelta(){return this._surface.getElevationLevelDelta(this.level)}_setPendingUpdateForDescendants(){let e=this._children;if(e[0])for(let t of e)t.renderData&&(t.setPendingUpdate(16),t.setMemoryDirty()),t._setPendingUpdateForDescendants()}static prune(){K.prune(0),q.prune(0),U.prune()}get _cached(){return!this.leaf&&this._mapDataRefCount<=0}get withinClippingArea(){return this._withinClippingArea}get intersectsClippingArea(){return this._intersectsClippingArea}get clippingArea(){return this._clippingArea}get parent(){return this._parent}get children(){return this._children}get surface(){return this._surface}get elevationBoundsMin(){return this._elevationBoundsMin}get elevationBoundsMax(){return this._elevationBoundsMax}get level(){return this._lij[0]}get key(){return`${this._lij[0]}/${this._lij[1]}/${this._lij[2]}`}get edgeLen(){return this._edgeLen}get radius(){return this._center[1].radius}get visible(){return this._dirty&&this.computeVisibility(),this._visible}get frustumVisibility(){return this._dirty&&this.computeVisibility(),this._frustumVisibility}checkVisibility(e){if(this._dirty)return null;let t=this._calculateVisibility(e);if(this._frustumVisibility!==t||this._visible!==(t!==2&&this._intersectsClippingArea))throw Error(`Assertion failed: waterproof.visibility-cache-mismatch: Tile[${this.lij}]`);return t}computeVisibility(){this._dirty=!1;let e=this.parent?.frustumVisibility??1;this._frustumVisibility=this._calculateVisibility(e);let t=this._frustumVisibility!==2&&this._intersectsClippingArea;t!==this._visible&&(this._visible=t,this._surface.emit(`tiles-visibility-changed`),this._surface.renderer.setDirty(),this.updateAgentSuspension())}_calculateVisibility(e){let t=this.parent;return e===0?0:t!=null&&e===2&&this._elevationBoundsMin>=t._elevationBoundsMin&&this._elevationBoundsMax<=t._elevationBoundsMax?2:this._calculateFrustumVisibility(this.surface.frustum,this._surface.view.frustum.boundingSphere)}get _loadable(){return this.visible||this._surface.view.state.fixedContentCamera}get rendered(){let e=!!this.renderData;return e!==this._previouslyRendered&&(this._surface.emit(`tiles-visibility-changed`),this._previouslyRendered=e,this._surface.renderer.setDirty()),e}init(e,t,n,r,i){this._lij[0]=e,this._lij[1]=t,this._lij[2]=n,this.ellipsoid=p(i.tilingScheme.spatialReference),i.tilingScheme.getExtent(e,t,n,this.extent),i.tilingScheme.convertExtentToRadians(this.extent,this.extentInRadians),this.extentMidX=.5*(this.extent[0]+this.extent[2]),this.extentMidY=.5*(this.extent[1]+this.extent[3]),this._withinClippingArea=!0,this._intersectsClippingArea=!0,this._clippingArea=null,this._mapDataRefCount=0,i.upsampleMapCache.pop(this.key),this._edgeLen=0,this._edgeLen2=0,this._center[1].radius=0,this.elevationLevel=e,this._lastElevationSourceUpdateRequestSignature=null,r&&!Number.isNaN(r.elevationBoundsMin)?(this._elevationBoundsMin=r.elevationBoundsMin,this._elevationBoundsMax=r.elevationBoundsMax):(this._elevationBoundsMin=0,this._elevationBoundsMax=0),this._pendingUpdates=0,this.renderData=null,this.screenDepth=0,this._visible=!1,this._previouslyRendered=!1,this._parent=r,this.clearChildren(),this._surface=i,this.updateVisibility(),this.maxLevelDeltaNeighborCount=0,this.unmergableChildCount=0;for(let e of E){let t=i.numLayers(e),n=this.layerInfo[e];for(let e of n)e.release();n.length=t;for(let r=0;r<t;r++)n[r]=U.acquire(this._surface.upsampleInfoPool),e===0&&this.findElevationBoundsForLayer(r,-1)}this.computeElevationBounds(),this._maxTesselation=Math.min(i.tilingScheme.pixelSize,te)}dispose(){A(!this.renderData,`tile.renderData was not unloaded`),this._surface?.upsampleMapCache.pop(this.key),this.layerInfo.forEach(e=>{e.forEach(e=>e.release()),e.length=0}),this._surface=this._parent=null,this.clearChildren(),this.setMemoryDirty()}refMapData(){++this._mapDataRefCount,this._cached||this._surface.upsampleMapCache.pop(this.key)}unrefMapData(){--this._mapDataRefCount,this._cached&&this.cachedMemory>0&&this._surface.upsampleMapCache.put(this.key,new D(e(this)))}setMemoryDirty(){this._usedMemory=0}get usedMemory(){return this._ensureUsedMemory()+(this._cached?0:this.mapDataMemory)}get cachedMemory(){return this._ensureUsedMemory(),this._surface==null?this.usedMemory:this._cached?this.mapDataMemory:0}get mapDataMemory(){return this._rasterTileMemory+this._vectorTileMemory}get _cpuImageMemorySize(){let e=this._surface.tilingScheme.pixelSize;return e*e*4}_ensureUsedMemory(){if(this._usedMemory>0)return this._vectorTileMemory=this.layerInfo[1].reduce((e,{data:t})=>e+(k(t)?t.usedMemoryPerReference:0),0),this._usedMemory;this._usedMemory=this._baseUsedMemory,this._rasterTileMemory=0,this._vectorTileMemory=0;for(let{data:e}of this.layerInfo[1])k(e)?this._vectorTileMemory+=e.usedMemoryPerReference:this._rasterTileMemory+=this.getTerrainDataMemory(e);for(let e of this.layerInfo[0])this._usedMemory+=e.data?this._cpuImageMemorySize:0;return this.renderData&&(this._usedMemory+=this.renderData.estimatedGeometryMemoryUsage,this._rasterTileMemory+=this.renderData.texture?.usedMemory??0),this._cached&&this._surface.upsampleMapCache.updateSize(this.key),this._usedMemory}getUsedMemoryForLayer(e,t){let n=this.layerInfo[e][t];return n?.data?e===1?this._cached?0:this.getTerrainDataMemory(n.data):e===0?this._cpuImageMemorySize:0:0}getTerrainDataMemory(e){return ne(e)?e.texture.usedMemory:re(e)?e.memoryUsage:k(e)?e.usedMemoryPerReference:ie(e)?this._cpuImageMemorySize:0}updateScreenDepth(e){let[t,n,r]=this._center[1].center,i=e,a=i[2]*t+i[6]*n+i[10]*r+i[14];this.screenDepth=a<0?0:a/(i[3]*t+i[7]*n+i[11]*r+i[15])}shouldSplit(e,t,n){if(!this.visible||e.frustum&&!(this._intersectsClippingArea&&this._calculateFrustumVisibility(e.frustum)!==2))return 0;let r=this.level;i(Q,this._center[1].center,t);let u=a(Q),d=this._closestCenterOnElevationRange(t,fe),f=i(pe,d,t),p=Math.min(u,a(f));if(this._edgeLen2>p&&r<e.maxLod)return 1;let m=Math.sqrt(p),h=e.fovX*m*2,g=this._edgeLen/h,_=()=>{if(r<e.maxLod)return this.elevationLevel=r,0;let t=r+Math.ceil(-Math.log2(e.relativeWidthLimit/g));return t===this.elevationLevel?0:(this.elevationLevel=t,2)},v=n==null?1/0:n-r;if(v<=.5)return _();let y=o(this.up,Q),b=this._elevationBoundsMax-this._elevationBoundsMin,x=b/this.edgeLen;if(e.aboveGround&&y>0&&x<.001&&y/m-Math.sin(this._curvatureHeight/(this.edgeLen*Math.SQRT1_2)*Math.PI)-x>0)return _();let S=n==null?1:3-Math.min(v,2);if(g*S<e.relativeWidthLimit||r>=e.maxLod)return _();if(r<7)return 1;s($,this.up,y),i($,$,f);let C=a($);if(C<=this.radius*this.radius)return 1;s($,$,this.radius/Math.sqrt(C)),c($,$,d),i($,t,$);let w=Math.min(1,(Math.abs(o($,this.up))+.5*b+this._curvatureHeight)/l($)),T=.1/e.angledSplitBias,E=e.fovY*m*2;return w*(this._edgeLen/E*S)<T*e.relativeHeightLimit?_():1}needsElevationSourceUpdate(){let e=this.renderData?.geometryState.samplerDataSourceLevels;if(e==null)return!1;let t=Math.max(this.elevationLevel-this.elevationLevelDelta,0);return e.some(e=>e>t)&&this._lastElevationSourceUpdateRequestSignature!==this._elevationSourceUpdateRequestSignature(e)}markElevationSourceUpdateRequested(){let e=this.renderData?.geometryState.samplerDataSourceLevels;this._lastElevationSourceUpdateRequestSignature=e==null?null:this._elevationSourceUpdateRequestSignature(e)}_elevationSourceUpdateRequestSignature(e){return`${Math.max(this.elevationLevel-this.elevationLevelDelta,0)}:${e.join(`,`)}`}createChildren(){let e=this._children,t=this.lij[0]+1,n=this.lij[1]*2,r=this.lij[2]*2;return e[0]=this.surface.createTile(t,n,r,this),e[1]=this.surface.createTile(t,n,r+1,this),e[2]=this.surface.createTile(t,n+1,r,this),e[3]=this.surface.createTile(t,n+1,r+1,this),e}clearChildren(){this._children[0]=this._children[1]=this._children[2]=this._children[3]=null}get loaded(){return this.renderData?.hasGeometry??!1}get hasGeometryState(){return this.renderData?.geometryState!=null}load(){this.refMapData();for(let e of E)this._createOrUpdateAgents(0,e);this.surface.renderer.loadTile(this)}unload(){this.renderData&&this.unrefMapData(),this.surface.renderer.unloadTile(this);for(let e of E){let t=this.layerInfo[e];for(let e of t)e.loadingAgent&&e.loadingAgent!==H&&(G(e.loadingAgent),e.loadingAgent=null),e.pendingUpdates=0}this.resetPendingUpdate(8),this.resetPendingUpdate(16),this.resetPendingUpdate(32)}unloadMapData(){let e=this.layerInfo[1];for(let t of e)t.loadingAgent&&t.loadingAgent!==H&&(G(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0,t.invalidateSourceData();this.renderData?.releaseTexture(),this.setMemoryDirty()}updateClippingStatus(e){if(h(e,this._clippingArea))return!1;let t=this._intersectsClippingArea,n=this._withinClippingArea;e==null?(this._intersectsClippingArea=!0,this._withinClippingArea=!0):(this._intersectsClippingArea=this.intersectsExtent(e),this._withinClippingArea=this._isWithinExtent(e)),this._clippingArea=e,this.updateVisibility();let r=n&&this._withinClippingArea,i=!n&&!t&&!this._withinClippingArea&&!this._intersectsClippingArea;return this.renderData&&!(r||i)&&this.setPendingUpdate(8),!0}updateVisibility(){this._dirty=!0,this._surface.setTileTreeDirty(!1)}getLayerInfo(e,t){return this.layerInfo[t][e]}hasLayerData(e,t){let n=this.layerInfo[t][e];return!(!n?.data||n.dataInvalidated)}get updating(){if(this.hasPendingUpdates)return!0;for(let e of E){let t=this.layerInfo[e];for(let e of t)if(e.loadingAgent&&e.loadingAgent!==H&&e.loadingAgent.updating)return!0}return!1}_isSuspended(e){return this.hasPendingUpdate(1)?!0:e!==0&&!this._loadable}get hasPendingUpdates(){return this._pendingUpdates!==0}hasPendingUpdate(e){return(this._pendingUpdates&e)===e}setPendingUpdate(e){let t=this._pendingUpdates;return this._pendingUpdates|=e,e===1||e===4?this._surface.setTileTreeDirty(!0):this._surface.requestUpdate(),t!==this._pendingUpdates}resetPendingUpdate(e){return this.hasPendingUpdate(e)?(this._pendingUpdates&=~e,!0):!1}requestLayerData(e,t,r){let i=this.layerInfo[t][e];if(i.waitingAgents.has(r))return console.warn(`agent already requested this piece of map data (tile %s, agent tile %s, layer: %d/%d)`,this._lij.toString(),r.tile.lij.toString(),t,e),!0;if(i.waitingAgents.push(r),i.data&&!i.dataInvalidated){console.warn(`agent requested existing data (tile %s, agent tile %s, layer: %d/%d)`,this._lij.toString(),r.tile.lij.toString(),t,e);let n=k(i.data);return r.dataArrived(this,n),!0}if(i.requestPromise)return!0;n(i.requestAbort),i.requestAbort=new AbortController;let a=this._surface.requestTileData(this,e,t,{signal:i.requestAbort.signal});if(!a)return i.requestAbort=null,!1;let o=()=>{i.requestPromise===a&&(i.requestPromise=null,i.requestAbort=null)};return i.requestPromise=a,a.then(o,o),!0}get leaf(){return this._children[0]==null}hasLij(e){return this._lij[0]===e[0]&&this._lij[1]===e[1]&&this._lij[2]===e[2]}findByLij(e){if(this.hasLij(e))return this;let t=this._children;return t[0]?t[0].findByLij(e)||t[1].findByLij(e)||t[2].findByLij(e)||t[3].findByLij(e):null}distanceToSquared(e){return a(i($,this._center[1].center,e))}containsPoint(e){let t=this.extent;return e[0]>=t[0]&&e[1]>=t[1]&&e[0]<=t[2]&&e[1]<=t[3]}containsPointXY(e,t){let n=this.extent;return e>=n[0]&&t>=n[1]&&e<=n[2]&&t<=n[3]}unrequestLayerData(e,t,n){let r=this.layerInfo[t][e],i=r.waitingAgents,a=i.removeUnordered(n)!=null;A(a,`agent has not requested this piece of map data`),i.length<1&&(r.abortRequest(),this.setMemoryDirty())}dataArrived(e,t,n){let r=k(n),i=this.layerInfo[t][e];i.data=n,i.dataInvalidated=!1,i.waitingAgents.forAll(e=>e.dataArrived(this,r)),i.waitingAgents.clear(),this.setMemoryDirty()}dataMissing(e,t){let n=this.layerInfo[t][e];n.dataMissing=!0,n.waitingAgents.forAll(e=>e.dataMissing()),n.waitingAgents.clear(),this.setMemoryDirty()}updateRenderData(e,t,n){switch(n&&this.forEachLoadedNeighbor(n=>n.updateRenderData(e,t)),e){case 1:return this._updateTexture(t);case 0:return this._updateGeometry()}}_updateTexture(e){this.renderData&&(this.resetPendingUpdate(e===0?16:32),this.setPendingUpdate(e===0?32:16))}_updateGeometry(){this.setPendingUpdate(8);for(let e of this.layerInfo[0])e.pendingUpdates|=8}invalidateLayerData(e,t){this.layerInfo[t][e].invalidateSourceData()}computeElevationBounds(){let e=this._elevationBoundsMin,t=this._elevationBoundsMax,n=1/0,r=-1/0,i=this.layerInfo[0],a=!0;for(let e of i)e.elevationBounds!=null&&(n=Math.min(n,e.elevationBounds.minElevation),r=Math.max(r,e.elevationBounds.maxElevation),e.elevationBounds.hasNoDataValues||(a=!1));a&&(n=Math.min(n,0),r=Math.max(r,0)),(e!==n||t!==r)&&(this._elevationBoundsMin=n,this._elevationBoundsMax=r,this.updateRadiusAndCenter(),this._surface.setTileTreeDirty(!1),this.renderData&&this._surface.tileElevationRangeChanged(this,e,t))}_updateCenter(){let e=this._elevationBoundsMin,t=this._elevationBoundsMax,n=.5*(e+t),r=this._center;s($,this.up,n),c(r[1].center,this.centerAtSeaLevel,$),s($,this.up,e),c(r[0],this.centerAtSeaLevel,$),s($,this.up,t),c(r[2],this.centerAtSeaLevel,$)}_closestCenterOnElevationRange(e,t){if(this._surface.viewingMode===1){if(this.level===0)return u(t,this._center[1].center);let n=o(this.up,e),r=Math.max(this.ellipsoid.radius+this._elevationBoundsMin,Math.min(this.ellipsoid.radius+this._elevationBoundsMax,n));return s(t,this.up,r)}let n=Math.max(this._elevationBoundsMin,Math.min(this._elevationBoundsMax,e[2]));return t[0]=this.centerAtSeaLevel[0],t[1]=this.centerAtSeaLevel[1],t[2]=n,t}findElevationBoundsForLayer(e,t){let n=this.layerInfo[0][e],r=this.elevationLevelDelta,i=Math.max(this.elevationLevel-r,0),a=n.elevationBounds;if(a!=null&&a.level>t&&a.level<=i)return;let o=this._surface.layerViewByIndex(e,0);if(!W(this,o))return;let s=ue,c=!1,l=n.data;if(l&&l.level<=i){let e=n.data;s.minElevation=e.samplerData.data.minValue,s.maxElevation=e.samplerData.data.maxValue,s.hasNoDataValues=e.samplerData.data.hasNoDataValues,s.level=this.level,c=!0}else{let t=0,n,a;for(let o=this._parent;o&&(!a||t<r)&&(t=this.elevationLevel-o.level,n=a||n,a=o.layerInfo[0][e].data,!(!a&&n&&o.level<=i));o=o.parent);a||=n,a&&(a.computeMinMaxValue(this._lij[0],this._lij[1],this._lij[2],s),s.minElevation!==1/0&&(s.level=a.level,c=!0))}c&&(n.elevationBounds??=new C,n.elevationBounds.copyFrom(s))}modifyLayers(e,t,n){let r=this.layerInfo[n];for(let e of r)e.loadingAgent&&e.loadingAgent!==H&&(G(e.loadingAgent),e.loadingAgent=null),e.waitingAgents.clear();for(let t=0;t<r.length;++t)e[t]===void 0&&r[t].release();let i=new Array(...r),a=t.length;r.length=a;for(let e=0;e<a;e++){let n=t[e];r[e]=n>-1?i[n]:U.acquire(this._surface.upsampleInfoPool)}this.setMemoryDirty()}restartAgents(e){this.renderData&&(this._createOrUpdateAgents(0,e),this.updateRenderData(e,0))}updateAgents(e){if(this.renderData){let t=this.layerInfo[e];for(let e of t)e.loadingAgent===H&&(e.loadingAgent=null);this._createOrUpdateAgents(0,e)}}updateAgentSuspension(){for(let e of E){let t=this._isSuspended(e);for(let n of this.layerInfo[e])n.loadingAgent&&n.loadingAgent!==H&&(n.loadingAgent.setSuspension(t),n.loadingAgent===H&&this.updateRenderData(e,0))}}removeLayerAgent(e,t){let n=this.layerInfo[t][e];n.loadingAgent&&n.loadingAgent!==H&&n.loadingAgent.dispose(),n.loadingAgent=null}agentDone(e,t){let n=this.layerInfo[t][e];n.loadingAgent=H,!n.data&&n.upsampleInfo==null&&this._createOrUpdateAgents(e+1,t)}_hasBlendableAncestor(e){return e.blendMode!==`normal`||x(e.parent)&&this._hasBlendableAncestor(e.parent)}_hasBlendModes(e,t,n){for(let r=e;r<t;++r){let e=this._surface.layerViewByIndex(r,n);if(ae(e)&&e?.layer?.blendMode!==`normal`||x(e?.layer?.parent)&&this._hasBlendableAncestor(e?.layer?.parent))return!0}return!1}_createOrUpdateAgents(e,t){let n=this.layerInfo[t];if(n.length===0)return;let r=this._isSuspended(t),i=!1;for(let a=e;a<n.length;++a){let o=n[a],s=this._surface.layerViewByIndex(a,t),c=!1;(!i||S(s))&&(o.loadingAgent?W(this,s)?(o.loadingAgent!==H&&o.loadingAgent.setSuspension(r),o.loadingAgent!==H&&(c=o.loadingAgent.update())):o.dispose():W(this,s)&&(o.loadingAgent=le(this,a,t,r),c=o.loadingAgent.startLoading(),c?o.loadingAgent===H&&this.setPendingUpdate(8):(G(o.loadingAgent),o.loadingAgent=H)),o.loadingAgent===H&&this.updateRenderData(t,0),!s.destroyed&&!this._hasBlendModes(e,n.length,t)&&c&&s.isOpaque&&(i||=!0))}}_isWithinExtent(e){let t=this.extent;return t[0]>=e[0]&&e[2]>=t[2]&&t[1]>=e[1]&&e[3]>=t[3]}intersectsExtent(e){let t=this.extent;return t[2]>=e[0]&&e[2]>=t[0]&&t[3]>=e[1]&&e[3]>=t[1]}getElevationVerticesPerSide(e){let n=this.elevationLevel-this.level,r=Math.max(this.level-e,this.elevationLevelDelta-n),i=t((this._maxTesselation>>r)+1,2,this._maxTesselation+1),a=this.minimumVerticesPerSide;return Math.max(i,a)}_findLIJ(e,t){if(!e)return null;let{rootTiles:n}=this.surface;if(n!=null){for(let r of n)if(de(r,e)){let n=r,i=e[0]-n.level-1;for(;i>=0&&!n.leaf&&!t(n);){let t=e[1]>>i&1,r=e[2]>>i&1;n=n.children[t*2+r],i--}return t(n)?n:null}}return null}findNeighborTile(e,t){let n=this._lij,r=this._getNeighborLIJ(n,e);return r?J(n,r)?t(this)?this:null:this._findLIJ(r,t):null}findCorner(e,t){let n=e===1?1:e===7?0:e===5?2:3,r=this;for(;r.children[0]&&(!t||!t(r));)r=r.children[n];return r}findNeighborCornerTileExact(e,t){return this.findNeighborTile(e,e=>t(e)||e.level===this.level)?.findCorner(j(e),t)||null}forAllSubtreeOnSide(e,t){let n=e===0?[0,1]:e===1?[1]:e===2?[1,3]:e===3?[3]:e===4?[2,3]:e===5?[2]:e===6?[0,2]:[0],r=e=>{let i=e.children;!t(e)&&i[0]&&n.forEach(e=>r(i[e]))};r(this)}getNeighborEdgeStartVertexIndex(e,t){if(!t)return 0;let n=this.level-t.level;if(M(!N||n>=0),n===0)return 0;let r=2**n,i=(e&1)==1,a=+!i,o=t.lij[a+1]*r,s=this._lij[a+1],c=s-o,l=i?r-1-c:c;return N&&(M(o<=s&&s<o+r),M(0<=l&&l<r)),l}forEachLoadedNeighbor(e){let t=this.level,n=e=>e.level===t||e.loaded;P.forEach(t=>{let r=this.findNeighborTile(t,n);r!=null&&r!==this&&r.forAllSubtreeOnSide(F(t),n=>n.loaded?(e(n,t),!0):!1)}),I.forEach(t=>{let r=this.findNeighborTile(t,n)?.findCorner(j(t),e=>e.loaded);N&&M(!r||Y(this,r,t)),r?.loaded&&e(r,t)})}_getNeighborLIJ(e,t){let n=R(t)?-1:+!!z(t),r=B(t)?-1:+!!V(t),i=[e[0],e[1]+n,e[2]+r];return i[1]<0?null:this.surface.isGlobal?this._wrapLIJ(i):i[2]<0?null:i}_wrapLIJ(e){return!e||e[1]<0||e[1]>=2**e[0]?null:this.surface.wrapEastWest(e)}isEdgeNeighbor(e,t){if(e==null)return!1;if(this.level===0&&e.level===0&&(this._eastEnd&&e._westEnd&&t===2||this._westEnd&&e._eastEnd&&t===6))return!0;let n=Math.max((this.extent[2]-this.extent[0])*1e-6,1);switch(t){case 0:return L(this.extent[3],e.extent[1],n);case 4:return L(this.extent[1],e.extent[3],n);case 2:return L(this.extent[2],e.extent[0],n)||L(this.extent[2],-e.extent[0],n);case 6:return L(this.extent[0],e.extent[2],n)||L(this.extent[0],-e.extent[2],n)}}get _eastEnd(){return this._lij[2]===this.surface.lijEastEnd(this.level)-1}get _westEnd(){return this._lij[2]===0}checkGeometryWaterproofness(){}shouldHaveNeighbor(e){let t=this.extent,{rootTilesExtent:n}=this._surface,r=(t[2]-t[0])*.25;if(R(e)&&t[3]+r>=n[3]||z(e)&&t[1]-r<=n[1])return!1;let i=this.surface.isGlobal;return!(!i&&B(e)&&t[0]-r<=n[0]||!i&&V(e)&&t[2]+r>=n[2])}updateDistanceToPOI(e){let t=this._lastPOI;if(this.distanceToPOI>=0&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return;u(this._lastPOI,e);let n=this._center[1].center,r=e[0]-n[0],i=e[1]-n[1],a=e[2]-n[2];this.distanceToPOI=r*r+i*i+a*a}updateOverlayParameters(e){let{renderData:t}=this;if(!t)return;let{overlays:n,longitudeCyclical:r}=e,i=t.overlay;if(n.length===0)this._clearTileOverlayData(0,i),this._clearTileOverlayData(1,i);else{let[e,t]=n,a=this.extent;g(e.extent,a,r)||_(a,e.extent,r)||_(a,t.extent,r)?(this._setOverlayData(n,r,a,0,i),this._setOverlayData(n,r,a,1,i)):(this._clearTileOverlayData(0,i),this._clearTileOverlayData(1,i))}}_setOverlayData(e,t,n,r,i){let a=e[r].extent,o=v(a),s=y(a),c=n[0];if(t){c=t.minimalMonotonic(a[0],c);let e=t.minimalMonotonic(a[0],n[2]);c>e&&(c=e-(n[2]-n[0]))}if(o===0||s===0){i.setOffsetAndScale(r,0,0,1,1);return}let l=v(n)/o,u=y(n)/s,d=(c-a[0])/o,f=(n[1]-a[1])/s;i.setOffsetAndScale(r,d,f,l,u)}_clearTileOverlayData(e,t){t.setOffsetAndScale(e,-1,-1,-1,-1)}}function le(e,t,n,r){let i=n===0?q.acquire():K.acquire();return i.init(e,t,n,r),i}function G(e){e.dispose(),T(e)?q.release(e):ee(e)&&K.release(e)}const K=new r(()=>new O),q=new r(()=>new w),ue=new C;function de(e,t){let n=e.lij,r=t[0]-n[0];return r<0?!1:t[1]>>r===n[1]&&t[2]>>r===n[2]}function J(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Y(e,t,n){return e==null||t==null||t===e?!1:e.level>=t.level?X(e,t,n):X(t,e,j(n))}function X(e,t,n){M(e.level>=t.level);let r=oe(n),i=se(n),a=e.extent,o=t.extent,s=[r?a[0]:a[2],i?a[3]:a[1]],c=[r?o[2]:o[0],i?o[1]:o[3]],l=(a[2]-a[0])*1e-5,u=L(s[0],c[0],l)||e.surface.isGlobal&&L(s[0],-c[0],l),d=L(s[1],c[1],l);if(u&&d)return!0;if(e.level===t.level||!u&&!d)return M(!1),!1;let f=u?Z(o[1],o[3],a[1],a[3],l):Z(o[0],o[2],a[0],a[2],l);return M(f),f}function Z(e,t,n,r,i){return e-i<=n&&n<=r&&r<=t+i}const Q=d(),fe=d(),pe=d(),$=d();export{ce as Tile,Y as isCornerNeighbor,J as lijEquals};
|
|
2
|
+
import{toConst as e}from"../../../core/compilerUtils.js";import"../../../core/has.js";import{clamp as t}from"../../../core/mathUtils.js";import{abortMaybe as n}from"../../../core/maybe.js";import r from"../../../core/ObjectPool.js";import{subtract as i,squaredLength as a,dot as o,scale as s,add as c,length as l,copy as u}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d,unitZ as f}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../geometry/ellipsoidUtils.js";import{create as m,equals as h,rectangleContainsRectangleCyclicalAware as g,rectanglesIntersectCyclicalAware as _,width as v,height as y}from"../../../geometry/support/aaBoundingRect.js";import{Sphere as b}from"../../../geometry/support/sphere.js";import{isGroupLayer as x}from"../../../layers/support/layerUtils.js";import{isLayerViewWithFlowRenderer as S}from"../support/flowUtils.js";import{ElevationBounds as C}from"./ElevationBounds.js";import{ElevationTileAgent as w,isElevationTileAgent as T}from"./ElevationTileAgent.js";import{LayerClasses as E}from"./LayerClass.js";import{MapDataCacheItem as D}from"./MapDataCacheItem.js";import{MapTileAgent as ee,isMapTileAgent as te}from"./MapTileAgent.js";import{maxPatchTesselation as ne}from"./TerrainConst.js";import{isVectorTile as O,isTileTexture as re,isRasterTile as ie,isCreateBitmapResult as ae}from"./TerrainData.js";import{weakAssert as k,isBlendableLayerView as oe,oppositeCorner as A,internalAssert as j,enableTerrainInternalChecks as M,neighborEdgeIndices as N,oppositeEdge as P,neighborCornerIndices as F,almostEquals as I,isNorth as L,isSouth as R,isWest as z,isEast as B,isWestCorner as se,isNorthCorner as ce}from"./terrainUtils.js";import{tileAgentDone as V}from"./TileAgent.js";import{TilePerLayerInfo as H}from"./TilePerLayerInfo.js";import{fallsWithinLayerView as U}from"./tileUtils.js";const le={0:[0,1],1:[1],2:[1,3],3:[3],4:[2,3],5:[2],6:[0,2],7:[0]};class ue{constructor(){this._lij=[0,0,0],this._children=[null,null,null,null],this._pendingUpdates=0,this._dirty=!0,this._previouslyRendered=!1,this._lastElevationSourceUpdateRequestSignature=null,this.extent=m(),this._elevationBoundsMin=NaN,this._elevationBoundsMax=0,this.layerInfo=[[],[]],this.extentInRadians=m(),this.centerAtSeaLevel=d(),this._center=[d(),new b,d()],this.up=f(),this._withinClippingArea=!0,this._intersectsClippingArea=!0,this._maxTesselation=0,this._usedMemory=0,this._rasterTileMemory=0,this._vectorTileMemory=0,this._mapDataRefCount=0,this.screenDepth=0,this.renderOrder=0,this._edgeLen=0,this._edgeLen2=0,this._curvatureHeight=0,this.onCompressionFinished=()=>{this.setPendingUpdate(16),this.setMemoryDirty()},this.extentMidX=0,this.extentMidY=0,this.distanceToPOI=-1,this._lastPOI=d(),this.maxLevelDeltaNeighborCount=0,this.unmergableChildCount=0}get lij(){return this._lij}get spatialReference(){return this._surface.spatialReference??this._surface.tilingScheme.spatialReference}get isDisposed(){return this._surface==null}get elevationLevelDelta(){return this._surface.getElevationLevelDelta(this.level)}_setPendingUpdateForDescendants(){let e=this._children;if(e[0])for(let t of e)t.renderData&&(t.setPendingUpdate(16),t.setMemoryDirty()),t._setPendingUpdateForDescendants()}static prune(){G.prune(0),K.prune(0),H.prune()}get _cached(){return!this.leaf&&this._mapDataRefCount<=0}get withinClippingArea(){return this._withinClippingArea}get intersectsClippingArea(){return this._intersectsClippingArea}get clippingArea(){return this._clippingArea}get parent(){return this._parent}get children(){return this._children}get surface(){return this._surface}get elevationBoundsMin(){return this._elevationBoundsMin}get elevationBoundsMax(){return this._elevationBoundsMax}get level(){return this._lij[0]}get key(){return`${this._lij[0]}/${this._lij[1]}/${this._lij[2]}`}get edgeLen(){return this._edgeLen}get radius(){return this._center[1].radius}get visible(){return this._dirty&&this.computeVisibility(),this._visible}get frustumVisibility(){return this._dirty&&this.computeVisibility(),this._frustumVisibility}checkVisibility(e){if(this._dirty)return null;let t=this._calculateVisibility(e);if(this._frustumVisibility!==t||this._visible!==(t!==2&&this._intersectsClippingArea))throw Error(`Assertion failed: waterproof.visibility-cache-mismatch: Tile[${this.lij}]`);return t}computeVisibility(){this._dirty=!1;let e=this.parent?.frustumVisibility??1;this._frustumVisibility=this._calculateVisibility(e);let t=this._frustumVisibility!==2&&this._intersectsClippingArea;t!==this._visible&&(this._visible=t,this._surface.emit(`tiles-visibility-changed`),this._surface.renderer.setDirty(),this.updateAgentSuspension())}_calculateVisibility(e){let t=this.parent;return e===0?0:t!=null&&e===2&&this._elevationBoundsMin>=t._elevationBoundsMin&&this._elevationBoundsMax<=t._elevationBoundsMax?2:this._calculateFrustumVisibility(this.surface.frustum,this._surface.view.frustum.boundingSphere)}get _loadable(){return this.visible||this._surface.view.state.fixedContentCamera}get rendered(){let e=!!this.renderData;return e!==this._previouslyRendered&&(this._surface.emit(`tiles-visibility-changed`),this._previouslyRendered=e,this._surface.renderer.setDirty()),e}init(e,t,n,r,i){this._lij[0]=e,this._lij[1]=t,this._lij[2]=n,this.ellipsoid=p(i.tilingScheme.spatialReference),i.tilingScheme.getExtent(e,t,n,this.extent),i.tilingScheme.convertExtentToRadians(this.extent,this.extentInRadians),this.extentMidX=.5*(this.extent[0]+this.extent[2]),this.extentMidY=.5*(this.extent[1]+this.extent[3]),this._withinClippingArea=!0,this._intersectsClippingArea=!0,this._clippingArea=null,this._mapDataRefCount=0,i.upsampleMapCache.pop(this.key),this._edgeLen=0,this._edgeLen2=0,this._center[1].radius=0,this.elevationLevel=e,this._lastElevationSourceUpdateRequestSignature=null,r&&!Number.isNaN(r.elevationBoundsMin)?(this._elevationBoundsMin=r.elevationBoundsMin,this._elevationBoundsMax=r.elevationBoundsMax):(this._elevationBoundsMin=0,this._elevationBoundsMax=0),this._pendingUpdates=0,this.renderData=null,this.screenDepth=0,this._visible=!1,this._previouslyRendered=!1,this._parent=r,this.clearChildren(),this._surface=i,this.updateVisibility(),this.maxLevelDeltaNeighborCount=0,this.unmergableChildCount=0;for(let e of E){let t=i.numLayers(e),n=this.layerInfo[e];for(let e of n)e.release();n.length=t;for(let r=0;r<t;r++)n[r]=H.acquire(this._surface.upsampleInfoPool),e===0&&this.findElevationBoundsForLayer(r,-1)}this.computeElevationBounds(),this._maxTesselation=Math.min(i.tilingScheme.pixelSize,ne)}dispose(){k(!this.renderData,`tile.renderData was not unloaded`),this._surface?.upsampleMapCache.pop(this.key),this.layerInfo.forEach(e=>{e.forEach(e=>e.release()),e.length=0}),this._surface=this._parent=null,this.clearChildren(),this.setMemoryDirty()}refMapData(){++this._mapDataRefCount,this._cached||this._surface.upsampleMapCache.pop(this.key)}unrefMapData(){--this._mapDataRefCount,this._cached&&this.cachedMemory>0&&this._surface.upsampleMapCache.put(this.key,new D(e(this)))}setMemoryDirty(){this._usedMemory=0}get usedMemory(){return this._ensureUsedMemory()+(this._cached?0:this.mapDataMemory)}get cachedMemory(){return this._ensureUsedMemory(),this._surface==null?this.usedMemory:this._cached?this.mapDataMemory:0}get mapDataMemory(){return this._rasterTileMemory+this._vectorTileMemory}get _cpuImageMemorySize(){let e=this._surface.tilingScheme.pixelSize;return e*e*4}_ensureUsedMemory(){if(this._usedMemory>0)return this._vectorTileMemory=this.layerInfo[1].reduce((e,{data:t})=>e+(O(t)?t.usedMemoryPerReference:0),0),this._usedMemory;this._usedMemory=this._baseUsedMemory,this._rasterTileMemory=0,this._vectorTileMemory=0;for(let{data:e}of this.layerInfo[1])O(e)?this._vectorTileMemory+=e.usedMemoryPerReference:this._rasterTileMemory+=this.getTerrainDataMemory(e);for(let e of this.layerInfo[0])this._usedMemory+=e.data?this._cpuImageMemorySize:0;return this.renderData&&(this._usedMemory+=this.renderData.estimatedGeometryMemoryUsage,this._rasterTileMemory+=this.renderData.texture?.usedMemory??0),this._cached&&this._surface.upsampleMapCache.updateSize(this.key),this._usedMemory}getUsedMemoryForLayer(e,t){let n=this.layerInfo[e][t];return n?.data?e===1?this._cached?0:this.getTerrainDataMemory(n.data):e===0?this._cpuImageMemorySize:0:0}getTerrainDataMemory(e){return re(e)?e.texture.usedMemory:ie(e)?e.memoryUsage:O(e)?e.usedMemoryPerReference:ae(e)?this._cpuImageMemorySize:0}updateScreenDepth(e){let[t,n,r]=this._center[1].center,i=e,a=i[2]*t+i[6]*n+i[10]*r+i[14];this.screenDepth=a<0?0:a/(i[3]*t+i[7]*n+i[11]*r+i[15])}shouldSplit(e,t,n){if(!this.visible||e.frustum&&!(this._intersectsClippingArea&&this._calculateFrustumVisibility(e.frustum)!==2))return 0;let r=this.level;i(Q,this._center[1].center,t);let u=a(Q),d=this._closestCenterOnElevationRange(t,me),f=i(he,d,t),p=Math.min(u,a(f));if(this._edgeLen2>p&&r<e.maxLod)return 1;let m=Math.sqrt(p),h=e.fovX*m*2,g=this._edgeLen/h,_=()=>{if(r<e.maxLod)return this.elevationLevel=r,0;let t=r+Math.ceil(-Math.log2(e.relativeWidthLimit/g));return t===this.elevationLevel?0:(this.elevationLevel=t,2)},v=n==null?1/0:n-r;if(v<=.5)return _();let y=o(this.up,Q),b=this._elevationBoundsMax-this._elevationBoundsMin,x=b/this.edgeLen;if(e.aboveGround&&y>0&&x<.001&&y/m-Math.sin(this._curvatureHeight/(this.edgeLen*Math.SQRT1_2)*Math.PI)-x>0)return _();let S=n==null?1:3-Math.min(v,2);if(g*S<e.relativeWidthLimit||r>=e.maxLod)return _();if(r<7)return 1;s($,this.up,y),i($,$,f);let C=a($);if(C<=this.radius*this.radius)return 1;s($,$,this.radius/Math.sqrt(C)),c($,$,d),i($,t,$);let w=Math.min(1,(Math.abs(o($,this.up))+.5*b+this._curvatureHeight)/l($)),T=.1/e.angledSplitBias,E=e.fovY*m*2;return w*(this._edgeLen/E*S)<T*e.relativeHeightLimit?_():1}needsElevationSourceUpdate(){let e=this.renderData?.geometryState.samplerDataSourceLevels;if(e==null)return!1;let t=Math.max(this.elevationLevel-this.elevationLevelDelta,0);return e.some(e=>e>t)&&this._lastElevationSourceUpdateRequestSignature!==this._elevationSourceUpdateRequestSignature(e)}markElevationSourceUpdateRequested(){let e=this.renderData?.geometryState.samplerDataSourceLevels;this._lastElevationSourceUpdateRequestSignature=e==null?null:this._elevationSourceUpdateRequestSignature(e)}_elevationSourceUpdateRequestSignature(e){return`${Math.max(this.elevationLevel-this.elevationLevelDelta,0)}:${e.join(`,`)}`}createChildren(){let e=this._children,t=this.lij[0]+1,n=this.lij[1]*2,r=this.lij[2]*2;return e[0]=this.surface.createTile(t,n,r,this),e[1]=this.surface.createTile(t,n,r+1,this),e[2]=this.surface.createTile(t,n+1,r,this),e[3]=this.surface.createTile(t,n+1,r+1,this),e}clearChildren(){this._children[0]=this._children[1]=this._children[2]=this._children[3]=null}get loaded(){return this.renderData?.hasGeometry??!1}get hasGeometryState(){return this.renderData?.geometryState!=null}load(){this.refMapData();for(let e of E)this._createOrUpdateAgents(0,e);this.surface.renderer.loadTile(this)}unload(){this.renderData&&this.unrefMapData(),this.surface.renderer.unloadTile(this);for(let e of E){let t=this.layerInfo[e];for(let e of t)e.loadingAgent&&e.loadingAgent!==V&&(W(e.loadingAgent),e.loadingAgent=null),e.pendingUpdates=0}this.resetPendingUpdate(8),this.resetPendingUpdate(16),this.resetPendingUpdate(32)}unloadMapData(){let e=this.layerInfo[1];for(let t of e)t.loadingAgent&&t.loadingAgent!==V&&(W(t.loadingAgent),t.loadingAgent=null),t.pendingUpdates=0,t.invalidateSourceData();this.renderData?.releaseTexture(),this.setMemoryDirty()}updateClippingStatus(e){if(h(e,this._clippingArea))return!1;let t=this._intersectsClippingArea,n=this._withinClippingArea;e==null?(this._intersectsClippingArea=!0,this._withinClippingArea=!0):(this._intersectsClippingArea=this.intersectsExtent(e),this._withinClippingArea=this._isWithinExtent(e)),this._clippingArea=e,this.updateVisibility();let r=n&&this._withinClippingArea,i=!n&&!t&&!this._withinClippingArea&&!this._intersectsClippingArea;return this.renderData&&!(r||i)&&this.setPendingUpdate(8),!0}updateVisibility(){this._dirty=!0,this._surface.setTileTreeDirty(!1)}getLayerInfo(e,t){return this.layerInfo[t][e]}hasLayerData(e,t){let n=this.layerInfo[t][e];return!(!n?.data||n.dataInvalidated)}get updating(){if(this.hasPendingUpdates)return!0;for(let e of E){let t=this.layerInfo[e];for(let e of t)if(e.loadingAgent&&e.loadingAgent!==V&&e.loadingAgent.updating)return!0}return!1}_isSuspended(e){return this.hasPendingUpdate(1)?!0:e!==0&&!this._loadable}get hasPendingUpdates(){return this._pendingUpdates!==0}hasPendingUpdate(e){return(this._pendingUpdates&e)===e}setPendingUpdate(e){let t=this._pendingUpdates;return this._pendingUpdates|=e,e===1||e===4?this._surface.setTileTreeDirty(!0):this._surface.requestUpdate(),t!==this._pendingUpdates}resetPendingUpdate(e){return this.hasPendingUpdate(e)?(this._pendingUpdates&=~e,!0):!1}requestLayerData(e,t,r){let i=this.layerInfo[t][e];if(i.waitingAgents.has(r))return console.warn(`agent already requested this piece of map data (tile %s, agent tile %s, layer: %d/%d)`,this._lij.toString(),r.tile.lij.toString(),t,e),!0;if(i.waitingAgents.push(r),i.data&&!i.dataInvalidated){console.warn(`agent requested existing data (tile %s, agent tile %s, layer: %d/%d)`,this._lij.toString(),r.tile.lij.toString(),t,e);let n=O(i.data);return r.dataArrived(this,n),!0}if(i.requestPromise)return!0;n(i.requestAbort),i.requestAbort=new AbortController;let a=this._surface.requestTileData(this,e,t,{signal:i.requestAbort.signal});if(!a)return i.requestAbort=null,!1;let o=()=>{i.requestPromise===a&&(i.requestPromise=null,i.requestAbort=null)};return i.requestPromise=a,a.then(o,o),!0}get leaf(){return this._children[0]==null}hasLij(e){return this._lij[0]===e[0]&&this._lij[1]===e[1]&&this._lij[2]===e[2]}findByLij(e){if(this.hasLij(e))return this;let t=this._children;return t[0]?t[0].findByLij(e)||t[1].findByLij(e)||t[2].findByLij(e)||t[3].findByLij(e):null}distanceToSquared(e){return a(i($,this._center[1].center,e))}containsPoint(e){let t=this.extent;return e[0]>=t[0]&&e[1]>=t[1]&&e[0]<=t[2]&&e[1]<=t[3]}containsPointXY(e,t){let n=this.extent;return e>=n[0]&&t>=n[1]&&e<=n[2]&&t<=n[3]}unrequestLayerData(e,t,n){let r=this.layerInfo[t][e],i=r.waitingAgents,a=i.removeUnordered(n)!=null;k(a,`agent has not requested this piece of map data`),i.length<1&&(r.abortRequest(),this.setMemoryDirty())}dataArrived(e,t,n){let r=O(n),i=this.layerInfo[t][e];i.data=n,i.dataInvalidated=!1,i.waitingAgents.forAll(e=>e.dataArrived(this,r)),i.waitingAgents.clear(),this.setMemoryDirty()}dataMissing(e,t){let n=this.layerInfo[t][e];n.dataMissing=!0,n.waitingAgents.forAll(e=>e.dataMissing()),n.waitingAgents.clear(),this.setMemoryDirty()}updateRenderData(e,t,n){switch(n&&this.forEachLoadedNeighbor(n=>n.updateRenderData(e,t)),e){case 1:return this._updateTexture(t);case 0:return this._updateGeometry()}}_updateTexture(e){this.renderData&&(this.resetPendingUpdate(e===0?16:32),this.setPendingUpdate(e===0?32:16))}_updateGeometry(){this.setPendingUpdate(8);for(let e of this.layerInfo[0])e.pendingUpdates|=8}invalidateLayerData(e,t){this.layerInfo[t][e].invalidateSourceData()}computeElevationBounds(){let e=this._elevationBoundsMin,t=this._elevationBoundsMax,n=1/0,r=-1/0,i=this.layerInfo[0],a=!0;for(let e of i)e.elevationBounds!=null&&(n=Math.min(n,e.elevationBounds.minElevation),r=Math.max(r,e.elevationBounds.maxElevation),e.elevationBounds.hasNoDataValues||(a=!1));a&&(n=Math.min(n,0),r=Math.max(r,0)),(e!==n||t!==r)&&(this._elevationBoundsMin=n,this._elevationBoundsMax=r,this.updateRadiusAndCenter(),this._surface.setTileTreeDirty(!1),this.renderData&&this._surface.tileElevationRangeChanged(this,e,t))}_updateCenter(){let e=this._elevationBoundsMin,t=this._elevationBoundsMax,n=.5*(e+t),r=this._center;s($,this.up,n),c(r[1].center,this.centerAtSeaLevel,$),s($,this.up,e),c(r[0],this.centerAtSeaLevel,$),s($,this.up,t),c(r[2],this.centerAtSeaLevel,$)}_closestCenterOnElevationRange(e,t){if(this._surface.viewingMode===1){if(this.level===0)return u(t,this._center[1].center);let n=o(this.up,e),r=Math.max(this.ellipsoid.radius+this._elevationBoundsMin,Math.min(this.ellipsoid.radius+this._elevationBoundsMax,n));return s(t,this.up,r)}let n=Math.max(this._elevationBoundsMin,Math.min(this._elevationBoundsMax,e[2]));return t[0]=this.centerAtSeaLevel[0],t[1]=this.centerAtSeaLevel[1],t[2]=n,t}findElevationBoundsForLayer(e,t){let n=this.layerInfo[0][e],r=this.elevationLevelDelta,i=Math.max(this.elevationLevel-r,0),a=n.elevationBounds;if(a!=null&&a.level>t&&a.level<=i)return;let o=this._surface.layerViewByIndex(e,0);if(!U(this,o))return;let s=fe,c=!1,l=n.data;if(l&&l.level<=i){let e=n.data;s.minElevation=e.samplerData.data.minValue,s.maxElevation=e.samplerData.data.maxValue,s.hasNoDataValues=e.samplerData.data.hasNoDataValues,s.level=this.level,c=!0}else{let t=0,n,a;for(let o=this._parent;o&&(!a||t<r)&&(t=this.elevationLevel-o.level,n=a||n,a=o.layerInfo[0][e].data,!(!a&&n&&o.level<=i));o=o.parent);a||=n,a&&(a.computeMinMaxValue(this._lij[0],this._lij[1],this._lij[2],s),s.minElevation!==1/0&&(s.level=a.level,c=!0))}c&&(n.elevationBounds??=new C,n.elevationBounds.copyFrom(s))}modifyLayers(e,t,n){let r=this.layerInfo[n];for(let e of r)e.loadingAgent&&e.loadingAgent!==V&&(W(e.loadingAgent),e.loadingAgent=null),e.waitingAgents.clear();for(let t=0;t<r.length;++t)e[t]===void 0&&r[t].release();let i=new Array(...r),a=t.length;r.length=a;for(let e=0;e<a;e++){let n=t[e];r[e]=n>-1?i[n]:H.acquire(this._surface.upsampleInfoPool)}this.setMemoryDirty()}restartAgents(e){this.renderData&&(this._createOrUpdateAgents(0,e),this.updateRenderData(e,0))}updateAgents(e){if(this.renderData){let t=this.layerInfo[e];for(let e of t)e.loadingAgent===V&&(e.loadingAgent=null);this._createOrUpdateAgents(0,e)}}updateAgentSuspension(){for(let e of E){let t=this._isSuspended(e);for(let n of this.layerInfo[e])n.loadingAgent&&n.loadingAgent!==V&&(n.loadingAgent.setSuspension(t),n.loadingAgent===V&&this.updateRenderData(e,0))}}removeLayerAgent(e,t){let n=this.layerInfo[t][e];n.loadingAgent&&n.loadingAgent!==V&&n.loadingAgent.dispose(),n.loadingAgent=null}agentDone(e,t){let n=this.layerInfo[t][e];n.loadingAgent=V,!n.data&&n.upsampleInfo==null&&this._createOrUpdateAgents(e+1,t)}_hasBlendableAncestor(e){return e.blendMode!==`normal`||x(e.parent)&&this._hasBlendableAncestor(e.parent)}_hasBlendModes(e,t,n){for(let r=e;r<t;++r){let e=this._surface.layerViewByIndex(r,n);if(oe(e)&&e?.layer?.blendMode!==`normal`||x(e?.layer?.parent)&&this._hasBlendableAncestor(e?.layer?.parent))return!0}return!1}_createOrUpdateAgents(e,t){let n=this.layerInfo[t];if(n.length===0)return;let r=this._isSuspended(t),i=!1;for(let a=e;a<n.length;++a){let o=n[a],s=this._surface.layerViewByIndex(a,t),c=!1;(!i||S(s))&&(o.loadingAgent?U(this,s)?(o.loadingAgent!==V&&o.loadingAgent.setSuspension(r),o.loadingAgent!==V&&(c=o.loadingAgent.update())):o.dispose():U(this,s)&&(o.loadingAgent=de(this,a,t,r),c=o.loadingAgent.startLoading(),c?o.loadingAgent===V&&this.setPendingUpdate(8):(W(o.loadingAgent),o.loadingAgent=V)),o.loadingAgent===V&&this.updateRenderData(t,0),!s.destroyed&&!this._hasBlendModes(e,n.length,t)&&c&&s.isOpaque&&(i||=!0))}}_isWithinExtent(e){let t=this.extent;return t[0]>=e[0]&&e[2]>=t[2]&&t[1]>=e[1]&&e[3]>=t[3]}intersectsExtent(e){let t=this.extent;return t[2]>=e[0]&&e[2]>=t[0]&&t[3]>=e[1]&&e[3]>=t[1]}getElevationVerticesPerSide(e){let n=this.elevationLevel-this.level,r=Math.max(this.level-e,this.elevationLevelDelta-n),i=t((this._maxTesselation>>r)+1,2,this._maxTesselation+1),a=this.minimumVerticesPerSide;return Math.max(i,a)}_findLIJ(e,t){if(!e)return null;let{rootTiles:n}=this.surface;if(n!=null){for(let r of n)if(pe(r,e)){let n=r,i=e[0]-n.level-1;for(;i>=0&&!n.leaf&&!t(n);){let t=e[1]>>i&1,r=e[2]>>i&1;n=n.children[t*2+r],i--}return t(n)?n:null}}return null}findNeighborTile(e,t){let n=this._lij,r=this._getNeighborLIJ(n,e);return r?q(n,r)?t(this)?this:null:this._findLIJ(r,t):null}findCorner(e,t){let n=e===1?1:e===7?0:e===5?2:3,r=this;for(;r.children[0]&&(!t||!t(r));)r=r.children[n];return r}findNeighborCornerTileExact(e,t){return this.findNeighborTile(e,e=>t(e)||e.level===this.level)?.findCorner(A(e),t)||null}forAllSubtreeOnSide(e,t){Z(this,le[e],t)}getNeighborEdgeStartVertexIndex(e,t){if(!t)return 0;let n=this.level-t.level;if(j(!M||n>=0),n===0)return 0;let r=2**n,i=(e&1)==1,a=+!i,o=t.lij[a+1]*r,s=this._lij[a+1],c=s-o,l=i?r-1-c:c;return M&&(j(o<=s&&s<o+r),j(0<=l&&l<r)),l}forEachLoadedNeighbor(e){let t=this.level,n=e=>e.level===t||e.loaded;N.forEach(t=>{let r=this.findNeighborTile(t,n);r!=null&&r!==this&&r.forAllSubtreeOnSide(P(t),n=>n.loaded?(e(n,t),!0):!1)}),F.forEach(t=>{let r=this.findNeighborTile(t,n)?.findCorner(A(t),e=>e.loaded);M&&j(!r||J(this,r,t)),r?.loaded&&e(r,t)})}_getNeighborLIJ(e,t){let n=L(t)?-1:+!!R(t),r=z(t)?-1:+!!B(t),i=[e[0],e[1]+n,e[2]+r];return i[1]<0?null:this.surface.isGlobal?this._wrapLIJ(i):i[2]<0?null:i}_wrapLIJ(e){return!e||e[1]<0||e[1]>=2**e[0]?null:this.surface.wrapEastWest(e)}isEdgeNeighbor(e,t){if(e==null)return!1;if(this.level===0&&e.level===0&&(this._eastEnd&&e._westEnd&&t===2||this._westEnd&&e._eastEnd&&t===6))return!0;let n=Math.max((this.extent[2]-this.extent[0])*1e-6,1);switch(t){case 0:return I(this.extent[3],e.extent[1],n);case 4:return I(this.extent[1],e.extent[3],n);case 2:return I(this.extent[2],e.extent[0],n)||I(this.extent[2],-e.extent[0],n);case 6:return I(this.extent[0],e.extent[2],n)||I(this.extent[0],-e.extent[2],n)}}get _eastEnd(){return this._lij[2]===this.surface.lijEastEnd(this.level)-1}get _westEnd(){return this._lij[2]===0}checkGeometryWaterproofness(){}shouldHaveNeighbor(e){let t=this.extent,{rootTilesExtent:n}=this._surface,r=(t[2]-t[0])*.25;if(L(e)&&t[3]+r>=n[3]||R(e)&&t[1]-r<=n[1])return!1;let i=this.surface.isGlobal;return!(!i&&z(e)&&t[0]-r<=n[0]||!i&&B(e)&&t[2]+r>=n[2])}updateDistanceToPOI(e){let t=this._lastPOI;if(this.distanceToPOI>=0&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return;u(this._lastPOI,e);let n=this._center[1].center,r=e[0]-n[0],i=e[1]-n[1],a=e[2]-n[2];this.distanceToPOI=r*r+i*i+a*a}updateOverlayParameters(e){let{renderData:t}=this;if(!t)return;let{overlays:n,longitudeCyclical:r}=e,i=t.overlay;if(n.length===0)this._clearTileOverlayData(0,i),this._clearTileOverlayData(1,i);else{let[e,t]=n,a=this.extent;g(e.extent,a,r)||_(a,e.extent,r)||_(a,t.extent,r)?(this._setOverlayData(n,r,a,0,i),this._setOverlayData(n,r,a,1,i)):(this._clearTileOverlayData(0,i),this._clearTileOverlayData(1,i))}}_setOverlayData(e,t,n,r,i){let a=e[r].extent,o=v(a),s=y(a),c=n[0];if(t){c=t.minimalMonotonic(a[0],c);let e=t.minimalMonotonic(a[0],n[2]);c>e&&(c=e-(n[2]-n[0]))}if(o===0||s===0){i.setOffsetAndScale(r,0,0,1,1);return}let l=v(n)/o,u=y(n)/s,d=(c-a[0])/o,f=(n[1]-a[1])/s;i.setOffsetAndScale(r,d,f,l,u)}_clearTileOverlayData(e,t){t.setOffsetAndScale(e,-1,-1,-1,-1)}}function de(e,t,n,r){let i=n===0?K.acquire():G.acquire();return i.init(e,t,n,r),i}function W(e){e.dispose(),T(e)?K.release(e):te(e)&&G.release(e)}const G=new r(()=>new ee),K=new r(()=>new w),fe=new C;function pe(e,t){let n=e.lij,r=t[0]-n[0];return r<0?!1:t[1]>>r===n[1]&&t[2]>>r===n[2]}function q(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function J(e,t,n){return e==null||t==null||t===e?!1:e.level>=t.level?Y(e,t,n):Y(t,e,A(n))}function Y(e,t,n){j(e.level>=t.level);let r=se(n),i=ce(n),a=e.extent,o=t.extent,s=[r?a[0]:a[2],i?a[3]:a[1]],c=[r?o[2]:o[0],i?o[1]:o[3]],l=(a[2]-a[0])*1e-5,u=I(s[0],c[0],l)||e.surface.isGlobal&&I(s[0],-c[0],l),d=I(s[1],c[1],l);if(u&&d)return!0;if(e.level===t.level||!u&&!d)return j(!1),!1;let f=u?X(o[1],o[3],a[1],a[3],l):X(o[0],o[2],a[0],a[2],l);return j(f),f}function X(e,t,n,r,i){return e-i<=n&&n<=r&&r<=t+i}function Z(e,t,n){let r=e.children;!n(e)&&r[0]&&(Z(r[t[0]],t,n),t.length===2&&Z(r[t[1]],t,n))}const Q=d(),me=d(),he=d(),$=d();export{ue as Tile,J as isCornerNeighbor,q as lijEquals};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{destroyMaybe as e}from"../../../../../core/maybe.js";import{set as t}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as r}from"../../../../../geometry/support/aaBoundingBox.js";import{encodeSymbolColor as i}from"../../../layers/support/symbolColorUtils.js";import{computeOffsetObb as a}from"../../../support/orientedBoundingBox.js";import{ComponentParametersUniform as o,ComponentParametersVarying as s}from"./ComponentDrawParameters.js";import{UniformComponentParameters as c}from"./UniformComponentParameters.js";import{olidEnabled as l}from"../../effects/geometry/olidUtils.js";import{defaultHighlightName as u}from"../../../../support/HighlightDefaults.js";class d{constructor(e,t,n,r,i,a){this._collection=e,this.transform=t,this.obb=n,this._componentData=r,this._renderable=i,this._intersectionGeometry=a,this.visible=!1,this.offsetObb=null,this._aabbInWorldCoordinates=null}destroy(){this._collection.materials.release(this._renderable.material),this._intersectionGeometry=e(this._intersectionGeometry),this._renderable=e(this._renderable),this._componentData=e(this._componentData)}get componentData(){return this._componentData}get renderable(){return this._renderable}get intersectionGeometry(){return this._intersectionGeometry}get emissions(){return this.renderable.material.emissions}updateMaterial(e,t){let{_renderable:n}=this,r=n.material,{opacity:i,useFloatBlend:a,...o}=e,s=i??n.opacity,c=this._collection.materials.acquire({...r.parameters,...o,groundTransparencyMode:e.groundTransparencyMode??r.parameters.groundTransparencyMode,isObjectTransparent:s<1},n.geometry.parameters,t??n.drawParameters.componentParameters);this._collection.materials.release(r),c!==r&&n.updateMaterial(c)}updatePolygonOffset(e){this._renderable.material.parameters.polygonOffset!==e&&this.updateMaterial({polygonOffset:e})}get opacity(){return this.renderable.opacity}updateOpacity(e,t){if(this.opacity===e){if(t===void 0||t===this.renderable.material.parameters.groundTransparencyMode)return}else this._renderable.updateOpacity(e);this.updateMaterial({opacity:e,groundTransparencyMode:t})}updateCameraDerivedParameters(e){let{eye:t}=e,{centerX:n,centerY:r,centerZ:i}=this.obb;this._renderable.meta.cameraDepthSquared=(t[0]-n)**2+(t[1]-r)**2+(t[2]-i)**2}setComponentData(e,t){let n=this._componentData,{materialDataBuffer:r,materialDataIndices:u}=n,d=new c,p=r.textureBuffer,m=p.getVec4Field(`colorAndCastShadows`),h=p.getScalarField(`elevationOffset`),g=p.getScalarField(`emissiveStrength`),_=p.getScalarField(`emissiveSourceMode`),v=p.getVec4Field(`olidColor`),y=new Uint8Array(4),b=new Uint32Array(y.buffer),x=0,S=0,C=0,w=0,T=0,E=n.verticalOffsets,D=1/0,O=-1/0,k=!1,A=!1,j=!1,M=0;for(let t=0;t<n.count;t++){e(t,d),x+=+(d.externalColor[3]<1),S+=+(d.externalColorMixMode===3&&d.externalColor[3]===1),w+=+(d.emissiveStrength>0),T+=+(d.emissiveSource===1),A||=d.emissiveStrength!==1,C+=+d.castShadows,i(d.externalColor,d.externalColorMixMode,y),y[2]=y[2]&254|d.castShadows,m.setArray(u[t],y),k||=t>0&&M!==b[0],M=b[0],j||=d.elevationOffset!==0,j&&E==null&&(E=Array(t).fill(0)),E!=null&&(E[t]=d.elevationOffset),D=Math.min(D,d.elevationOffset),O=Math.max(O,d.elevationOffset),h.set(u[t],d.elevationOffset),g.set(u[t],d.emissiveStrength),_.set(u[t],d.emissiveSource===0?0:255);let r=d.olidColor;r!=null&&v.setArray(u[t],r),d.pickable!==n.isPickable(t)&&n.updatePickabilityWithCount(t,d.pickable)}n.verticalOffsets=j?E:null,this.offsetObb=j?a(this.obb,D,O,t,this.offsetObb??this.obb.clone()):null;let N;if(k||j||l()||(A||T>0)&&w>0){let{count:e}=n;N=new s(f(x,e),f(S,e),f(w,e),f(T,e),f(C,e)),p.updateTexture(),this._renderable.updateComponentParametersVarying(N,p)}else N=new o(d.externalColor,d.externalColorMixMode,d.emissiveStrength,d.emissiveSource,d.castShadows?0:2),this._renderable.updateComponentParametersUniform(N);this.updateMaterial({},N)}addHighlight(e,t){return this._componentData.addComponentHighlight(e,t)}removeHighlight(e,t){return this._componentData.removeComponentHighlight(e,t)}clearHighlights(){this._componentData.clearHighlights()}get aabbInWorldCoordinates(){let e=this._aabbInWorldCoordinates;return e||(e=this._computeAabbInWorldCoordinates(),this._aabbInWorldCoordinates=e),e}_computeAabbInWorldCoordinates(){let e=r(),{positions:n}=this._intersectionGeometry;if(Math.floor(n.length/3)>0){let{transform:r}=this,i=1/0,a=1/0,o=1/0,s=-1/0,c=-1/0,l=-1/0,u=h;for(let e=0;e<n.length;e+=3)t(u,n[e+0],n[e+1],n[e+2]),r.applyVec3(u,u),i=Math.min(i,u[0]),a=Math.min(a,u[1]),o=Math.min(o,u[2]),s=Math.max(s,u[0]),c=Math.max(c,u[1]),l=Math.max(l,u[2]);e[0]=i,e[1]=a,e[2]=o,e[3]=s,e[4]=c,e[5]=l}return e}submit(e,t){let{componentData:n,renderable:r}=this;if(r.drawParameters.opacity<=0)return;let{geometry:i,drawParameters:a,material:o}=r,s=r.meta.cameraDepthSquared,{geometryRanges:c,highlightRangesMap:l,shadowmapRanges:d}=n,f=e=>e.submitDraw(o,a,i,c,s);switch(o.materialPass){case 0:f(e.opaque);break;case 1:f(e.transparent);break;case 2:f(e.opaque),f(e.transparent);break;case 3:f(e.integratedMesh),p(t)&&f(e.occludedGround),m(t)&&f(e.highlightIntegratedMesh);break;case 4:f(e.transparentIntegratedMesh)}if(a.castAnyShadows){if(l!=null)for(let t of l)t[0]===u&&e.highlightShadowMap.submitDraw(o,a,i,t[1],s,t[0]);d!=null&&e.defaultShadowMap.submitDraw(o,a,i,d,s),f(e.shadowMap)}if(l!=null)for(let t of l)e.highlight.submitDraw(o,a,i,t[1],s,t[0]);t.viewshedEnabled&&f(e.viewshedShadowMap)}}function f(e,t){return e===t?0:e===0?2:1}function p(e){return e.overlay?.getTexture(e.overlay?.allSourcesOccluders?1:4)!=null}function m(e){return e.overlay?.getTexture(2)!=null}const h=n();export{d as ComponentObject};
|
|
2
|
+
import has from"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{set as t}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as r}from"../../../../../geometry/support/aaBoundingBox.js";import{encodeSymbolColor as i}from"../../../layers/support/symbolColorUtils.js";import{computeOffsetObb as a}from"../../../support/orientedBoundingBox.js";import{ComponentParametersUniform as o,ComponentParametersVarying as s}from"./ComponentDrawParameters.js";import{UniformComponentParameters as c}from"./UniformComponentParameters.js";import{olidEnabled as l}from"../../effects/geometry/olidUtils.js";import{defaultHighlightName as u}from"../../../../support/HighlightDefaults.js";class d{constructor(e,t,n,r,i,a){this._collection=e,this.transform=t,this.obb=n,this._componentData=r,this._renderable=i,this._intersectionGeometry=a,this.visible=!1,this.offsetObb=null,this._aabbInWorldCoordinates=null}destroy(){this._collection.materials.release(this._renderable.material),this._intersectionGeometry=e(this._intersectionGeometry),this._renderable=e(this._renderable),this._componentData=e(this._componentData)}get componentData(){return this._componentData}get renderable(){return this._renderable}get intersectionGeometry(){return this._intersectionGeometry}get emissions(){return this.renderable.material.emissions}updateMaterial(e,t){let{_renderable:n}=this,r=n.material,{opacity:i,useFloatBlend:a,...o}=e,s=i??n.opacity,c=this._collection.materials.acquire({...r.parameters,...o,groundTransparencyMode:e.groundTransparencyMode??r.parameters.groundTransparencyMode,isObjectTransparent:s<1},n.geometry.parameters,t??n.drawParameters.componentParameters);this._collection.materials.release(r),c!==r&&n.updateMaterial(c)}updatePolygonOffset(e){this._renderable.material.parameters.polygonOffset!==e&&this.updateMaterial({polygonOffset:e})}get opacity(){return this.renderable.opacity}updateOpacity(e,t){if(this.opacity===e){if(t===void 0||t===this.renderable.material.parameters.groundTransparencyMode)return}else this._renderable.updateOpacity(e);this.updateMaterial({opacity:e,groundTransparencyMode:t})}updateCameraDerivedParameters(e){let{eye:t}=e,{centerX:n,centerY:r,centerZ:i}=this.obb;this._renderable.meta.cameraDepthSquared=(t[0]-n)**2+(t[1]-r)**2+(t[2]-i)**2}setComponentData(e,t){let n=this._componentData,{materialDataBuffer:r,materialDataIndices:u}=n,d=new c,p=r.textureBuffer,m=p.getVec4Field(`colorAndCastShadows`),h=p.getScalarField(`elevationOffset`),g=p.getScalarField(`emissiveStrength`),_=p.getScalarField(`emissiveSourceMode`),v=p.getVec4Field(`olidColor`),y=new Uint8Array(4),b=new Uint32Array(y.buffer),x=0,S=0,C=0,w=0,T=0,E=n.verticalOffsets,D=1/0,O=-1/0,k=!1,A=!1,j=!1,M=0;for(let t=0;t<n.count;t++){e(t,d),x+=+(d.externalColor[3]<1),S+=+(d.externalColorMixMode===3&&d.externalColor[3]===1),w+=+(d.emissiveStrength>0),T+=+(d.emissiveSource===1),A||=d.emissiveStrength!==1,C+=+d.castShadows,i(d.externalColor,d.externalColorMixMode,y),y[2]=y[2]&254|d.castShadows,m.setArray(u[t],y),k||=t>0&&M!==b[0],M=b[0],j||=d.elevationOffset!==0,j&&E==null&&(E=Array(t).fill(0)),E!=null&&(E[t]=d.elevationOffset),D=Math.min(D,d.elevationOffset),O=Math.max(O,d.elevationOffset),h.set(u[t],d.elevationOffset),g.set(u[t],d.emissiveStrength),_.set(u[t],d.emissiveSource===0?0:255);let r=d.olidColor;r!=null&&v.setArray(u[t],r),d.pickable!==n.isPickable(t)&&n.updatePickabilityWithCount(t,d.pickable)}n.verticalOffsets=j?E:null,this.offsetObb=j?a(this.obb,D,O,t,this.offsetObb??this.obb.clone()):null;let N;if(k||j||l()||(A||T>0)&&w>0){let{count:e}=n;N=new s(f(x,e),f(S,e),f(w,e),f(T,e),f(C,e)),p.updateTexture(),this._renderable.updateComponentParametersVarying(N,p)}else N=new o(d.externalColor,d.externalColorMixMode,d.emissiveStrength,d.emissiveSource,d.castShadows?0:2),this._renderable.updateComponentParametersUniform(N);this.updateMaterial({},N)}addHighlight(e,t){return this._componentData.addComponentHighlight(e,t)}removeHighlight(e,t){return this._componentData.removeComponentHighlight(e,t)}clearHighlights(){this._componentData.clearHighlights()}get aabbInWorldCoordinates(){let e=this._aabbInWorldCoordinates;return e||(e=this._computeAabbInWorldCoordinates(),this._aabbInWorldCoordinates=e),e}_computeAabbInWorldCoordinates(){let e=r(),{positions:n}=this._intersectionGeometry;if(Math.floor(n.length/3)>0){let{transform:r}=this,i=1/0,a=1/0,o=1/0,s=-1/0,c=-1/0,l=-1/0,u=h;for(let e=0;e<n.length;e+=3)t(u,n[e+0],n[e+1],n[e+2]),r.applyVec3(u,u),i=Math.min(i,u[0]),a=Math.min(a,u[1]),o=Math.min(o,u[2]),s=Math.max(s,u[0]),c=Math.max(c,u[1]),l=Math.max(l,u[2]);e[0]=i,e[1]=a,e[2]=o,e[3]=s,e[4]=c,e[5]=l}return e}submit(e,t){let{componentData:n,renderable:r}=this;if(r.drawParameters.opacity<=0)return;let{geometry:i,drawParameters:a,material:o}=r,s=r.meta.cameraDepthSquared,{geometryRanges:c,highlightRangesMap:l,shadowmapRanges:d}=n,f=e=>e.submitDraw(o,a,i,c,s);switch(o.materialPass){case 0:f(e.opaque);break;case 1:f(e.transparent);break;case 2:f(e.opaque),f(e.transparent);break;case 3:f(e.integratedMesh),p(t)&&f(e.occludedGround),(!has(`enable-feature:im-as-ground`)||o.isGround)&&m(t)&&f(e.highlightIntegratedMesh);break;case 4:f(e.transparentIntegratedMesh)}if(a.castAnyShadows){if(l!=null)for(let t of l)t[0]===u&&e.highlightShadowMap.submitDraw(o,a,i,t[1],s,t[0]);d!=null&&e.defaultShadowMap.submitDraw(o,a,i,d,s),f(e.shadowMap)}if(l!=null)for(let t of l)e.highlight.submitDraw(o,a,i,t[1],s,t[0]);t.viewshedEnabled&&f(e.viewshedShadowMap)}}function f(e,t){return e===t?0:e===0?2:1}function p(e){return e.overlay?.getTexture(e.overlay?.allSourcesOccluders?1:4)!=null}function m(e){return e.overlay?.getTexture(2)!=null}const h=n();export{d as ComponentObject};
|
|
@@ -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"../../../../../core/has.js";import n from"../../../../../core/Logger.js";import r from"../../../../../core/PooledArray.js";import{watch as i,sync as a}from"../../../../../core/reactiveUtils.js";import{isTypedArray as o}from"../../../../../core/typedArrayUtil.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{clone as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as l}from"../../../../../geometry/support/aaBoundingBox.js";import{compactIndices as u}from"../../../../../geometry/support/Indices.js";import{d}from"../../../../../chunks/vec3.js";import{c as f}from"../../../../../chunks/vec32.js";import{ComponentData as p}from"./ComponentData.js";import{defaultComponentParameters as m,ComponentDrawParametersImplementation as h}from"./ComponentDrawParameters.js";import{ComponentObject as g}from"./ComponentObject.js";import{IntersectionGeometry as _}from"./IntersectionGeometry.js";import{RenderableMeta as v,Renderable as y}from"./Renderable.js";import{RenderGeometry as b}from"./RenderGeometry.js";import{RenderSubmitSystem as x}from"./RenderSubmitSystem.js";import{ComponentMaterialParameters as S}from"./Material/ComponentMaterialInitParameters.js";import{ComponentMaterialRepository as C}from"./Material/ComponentMaterialRepository.js";import{SamplerRepository as w}from"../../lib/SamplerRepository.js";import{VertexArrayObject as T}from"../../lib/VertexArrayObject.js";import{getVerticalOffsetI3S as E}from"../../lib/verticalOffsetUtils.js";import{BufferManager as D}from"../../lib/TextureBackedBuffer/BufferManager.js";import{getComponentDataLayout as O,IndexGlLayout as k}from"../../materials/DefaultLayouts.js";import{BufferObject as A}from"../../../../webgl/BufferObject.js";import{PrimitiveType as j}from"../../../../webgl/enums.js";import{VertexBuffer as M}from"../../../../webgl/VertexBuffer.js";const N=()=>n.getLogger(`esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection`);let P=class extends t{constructor(e,t,n){super({}),this._renderPassManager=e,this._viewingMode=t,this._elevationRangeCacheVerticalOffset=NaN,this._elevationRangeCacheMin=NaN,this._elevationRangeCacheMax=NaN,this._highlightsInOrder=[],this._highlights=null,this._activeHighlightOptions=new Map,this._visible=new r,this._hidden=new r,this._renderSubmit=new x(this),this._renderPassManager.register(this._renderSubmit);let{rctx:o,bind:s}=e;this._componentBufferManager=new D(o,O());let c=this._viewingMode===2?0:n?1:2;this.materials=new C(s,c),this.samplers=new w(o.gl),this.addHandles(i(()=>s.useFloatBlend.value,()=>{this._visible.forAll(e=>e.updateMaterial(this.materials.globals)),this._hidden.forAll(e=>e.updateMaterial(this.materials.globals)),this._requestRender()},a))}destroy(){this._componentBufferManager.destroy(),this._componentBufferManager=null,this._visible.forAll(e=>e.destroy()),this._visible.prune(),this._hidden.forAll(e=>e.destroy()),this._hidden.prune(),this._renderSubmit.destroy(),this.samplers.dispose(),this.materials.destroy()}createObject(e,t){let{geometry:n}=e,r=new p(this._componentBufferManager,u(n.componentOffsets)),i=this._createRenderable(e,t,r),a=new _(this._viewingMode,n.positions,r,e.elevationAlignable),o=new g(this,e.transform,e.obb.clone(),r,i,a);return(o.visible?this._visible:this._hidden).push(o),o}destroyObject(e){let t=e;(t.visible?this._visible:this._hidden).removeUnordered(t),t.destroy(),this._requestRender()}setObjectVisibility(e,t){let n=e;t!==n.visible&&(t?(this._hidden.removeUnordered(n),this._visible.push(n)):(this._visible.removeUnordered(n),this._hidden.push(n)),n.visible=t,this._requestRender())}preSubmit(e){let{camera:t,highlights:n}=e;this._updateHighlightsInOrder(n),this._componentBufferManager.updateTextures(),this.visibleObjects.forAll(e=>e.updateCameraDerivedParameters(t))}getObjectOpacity(e){return e.renderable.drawParameters.opacity}updateObjectOpacity(e,t,n){let r=e;(r.opacity!==t||n!==void 0&&n!==r.renderable.material.parameters.groundTransparencyMode)&&(r.updateOpacity(t,n),this._requestRender())}isSliceplaneEnabled(e){return e.renderable.material.slicePlaneEnabled}setAllComponentVisibilities(e,t){let n=e;n.componentData.visibility.reset(t),n.componentData.markVisibilityDirty(),this._requestRender()}forEachVisibleComponent(e,t){return e.componentData.visibility.forEachComponent(t)}getComponentCount(e){let{componentData:t}=e,n=t.visibility.componentCount;return{visible:n,invisible:t.count-n}}setComponentData(e,t){e.setComponentData(t,this._viewingMode),this._elevationRangeCacheVerticalOffset=NaN,this._requestRender()}getComponentAabb(e,t,n,r=!1){e.intersectionGeometry.getComponentAabb(t,n);let i=e,a=i.componentData.verticalOffsets;if(r||a==null)return n;let o=a[t];if(this._viewingMode===2||o===0)return n[2]+=o,n[5]+=o,n;let s=E(o);return s.localOrigin=i.transform.position,s.applyToAabb(n)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,n){return e.intersectionGeometry.getComponentPositions(t,n)}_updateHighlightsInOrder(e){if(this._highlights===e)return;let{_highlightsInOrder:t}=this,n=Math.min(e.length,8),r=t.length!==n;for(let i=0;i<n;++i)if(t[i]!==e[i].name){r=!0;break}if(this._highlights=e,r){t.length=n;for(let r=0;r<n;++r)t[r]=e[r].name;this._syncHighlightedObjectHighlightOrder()}}_syncHighlightedObjectHighlightOrder(){let e=this._highlightsInOrder,t=t=>{t.componentData.componentHighlights.size>0&&t.componentData.setHighlightsInOrder(e)};this._visible.forAll(t),this._hidden.forAll(t)}expandRangeWithComponentObjectElevationRange(e,t,n,r){!Number.isNaN(this._elevationRangeCacheVerticalOffset)&&this._elevationRangeCacheVerticalOffset===t&&r.expandElevationRangeValues(this._elevationRangeCacheMin,this._elevationRangeCacheMax);let i=e,{componentData:a}=i,o=a.count,{verticalOffsets:s}=a,{intersectionGeometry:c}=i,l=this._viewingMode===2,u=c.getComponentAabbs(),d=F,f=1/0,p=-1/0;for(let e=0;e<o;e++){let a=e*6,o=s?.[e]??0,c=1/0,m=-1/0;if(l)c=u[a+2]+o+t,m=u[a+5]+o+t;else{if(d[0]=u[a],d[1]=u[a+1],d[2]=u[a+2],d[3]=u[a+3],d[4]=u[a+4],d[5]=u[a+5],o!==0){let e=E(o);e.localOrigin=i.transform.position,e.applyToAabb(d)}let e=Math.max(Math.abs(d[3]),Math.abs(d[0])),s=Math.max(Math.abs(d[4]),Math.abs(d[1])),c=t+d[5]+n;r.expandElevationRangeValues(t+d[2],Math.sqrt(e*e+s*s+c*c)-n)}r.expandElevationRangeValues(c,m),f=Math.min(f,c),p=Math.max(p,m)}this._elevationRangeCacheVerticalOffset=t,this._elevationRangeCacheMin=f,this._elevationRangeCacheMax=p}intersectRay(e,t,n,r,i,a){let{transform:o,componentData:s,intersectionGeometry:c}=e;r!=null&&(r.localOrigin=o.position),c.intersectRay(t,n,r,s.verticalOffsets,o,i,a)}*intersectScreenPolygon(e,t,n,r,i){let{transform:a,componentData:o,intersectionGeometry:s}=e;r!=null&&(r.localOrigin=a.position),yield*s.intersectScreenPolygon(t,n,r,o.verticalOffsets,a,i)}addEdges(e,t,n,r,i){let a=e,{indices:o,positions:s}=a.intersectionGeometry,c=a.componentData.offsets;return t.addComponentObject(a,s,o,c,n,r,i)}async extractEdgeInformation(e,t,n){let r=e,i=r.componentData.visibility;if(i.allInvisible()){let{extractComponentsEdgeLocationsLayout:e}=await import(`../../lib/edgeRendering/edgeProcessing.js`);return{buffer:e.createBuffer(0),origin:[0,0,0]}}let{indices:a,positions:o}=r.intersectionGeometry,s=r.componentData.offsets,{EdgeInputBufferLayout:l}=await import(`../../lib/edgeRendering/bufferLayouts.js`),u=l.createBuffer(o.length/3);f(u.position.typedBuffer,o,u.position.typedBufferStride,3),d(u.position,u.position,r.transform.rotationScale),this._setComponentIndices(u.componentIndex,a,s);let p=u.count,m=this._computeVisibilityIndices(a,i,s,p);return{origin:c(r.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:m,indicesLength:m.length,skipDeduplicate:!0,data:u,writerSettings:{reducedPrecision:!1,variants:0}},n)}}_setComponentIndices(e,t,n){let r=0;for(let i=0;i<n.length-1;i++){let a=n[i],o=n[i+1];for(let n=a;n<o;n++){let i=t?t[n]:n;e.set(i,r)}r++}}_computeVisibilityIndices(e,t,n,r){if(e&&t.allVisible())return e;let i=0;t.forEachComponentRange((e,t)=>(i+=n[t]-n[e],!0));let a=o(e)?e?.BYTES_PER_ELEMENT===2||r<=65536?new Uint16Array(i):new Uint32Array(i):Array(i),s=0;return t.forEachComponentRange((t,r)=>{let i=n[t],o=n[r];for(let t=i;t<o;t++)a[s++]=e?e[t]:t;return!0}),a}addHighlight(e,t,n){let r=e,i=this._activeHighlightOptions.get(n)??0;this._activeHighlightOptions.set(n,i+1),r.componentData.setHighlightsInOrder(this._highlightsInOrder),r.addHighlight(t,n)&&this._requestRender()}removeHighlight(e,t,n){let r=e.removeHighlight(t,n);r!==`notfound`&&(this._removeActiveHighlight(n),r&&this._requestRender())}_removeActiveHighlight(e,t=1){let n=this._activeHighlightOptions.get(e);if(n===void 0)N().warn(`Removing non-existing highlight "${e}".`);else{let r=n-t;r<0&&N().warn(`Removing non-existing highlight "${e}".`),r<=0?this._activeHighlightOptions.delete(e):this._activeHighlightOptions.set(e,r)}}clearHighlights(e){let t=e,{componentData:n}=t,{componentHighlights:r}=t.componentData;if(r.size>0){for(let e of r)this._removeActiveHighlight(e[0],e[1][n.count]);t.clearHighlights(),this._requestRender()}}hasHighlight(e){return this._activeHighlightOptions.has(e)}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._visible}_createRenderable(e,t,n){let r=this._renderPassManager.rctx,i=e.geometry,a=i.parameters.layout,{interleavedVertexData:o,indexData:s,vertexCount:c}=i.renderGeometryData,l=new M(r,a,o),u=s?A.createIndex(r,35044,s):null,d=0,f=[[`geometry`,l]];if(!t.isIntegratedMesh){let e=new Uint16Array(c);for(let t=0;t<n.count;t++){let r=n.offsets[t],i=n.offsets[t+1],a=n.materialDataIndices[t];if(s!=null)for(let t=r;t<i;t++){let n=s[t];e[n]=a}else for(let t=r;t<i;t++)e[t]=a}let t=new M(r,k,e.buffer);d+=t.usedMemory,f.push([`componentIndices`,t])}let p=new T(r,new Map(f),u),g=s?.length??c,_=new b(p,j.TRIANGLES,i.parameters,u!=null,g),x=new S(t),C=this.materials.acquire(x,_.parameters,m),w=new v(l.usedMemory+d+(u?.usedMemory??0)),E=this.samplers.addFromTexture(t.baseColorTexture?.texture),D=new h(e,t,E);return new y(C,D,_,w)}_requestRender(){this._renderPassManager.requestRender()}};P=e([s(`esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection`)],P);const F=l();export{P as ComponentObjectCollection};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import n from"../../../../../core/Logger.js";import r from"../../../../../core/PooledArray.js";import{watch as i,sync as a}from"../../../../../core/reactiveUtils.js";import{isTypedArray as o}from"../../../../../core/typedArrayUtil.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{clone as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as l}from"../../../../../geometry/support/aaBoundingBox.js";import{compactIndices as u}from"../../../../../geometry/support/Indices.js";import{d}from"../../../../../chunks/vec3.js";import{c as f}from"../../../../../chunks/vec32.js";import{ComponentData as p}from"./ComponentData.js";import{defaultComponentParameters as m,ComponentDrawParametersImplementation as h}from"./ComponentDrawParameters.js";import{ComponentObject as g}from"./ComponentObject.js";import{IntersectionGeometry as _}from"./IntersectionGeometry.js";import{RenderableMeta as v,Renderable as y}from"./Renderable.js";import{RenderGeometry as b}from"./RenderGeometry.js";import{RenderSubmitSystem as x}from"./RenderSubmitSystem.js";import{ComponentMaterialParameters as S}from"./Material/ComponentMaterialInitParameters.js";import{ComponentMaterialRepository as C}from"./Material/ComponentMaterialRepository.js";import{SamplerRepository as w}from"../../lib/SamplerRepository.js";import{VertexArrayObject as T}from"../../lib/VertexArrayObject.js";import{getVerticalOffsetI3S as E}from"../../lib/verticalOffsetUtils.js";import{BufferManager as D}from"../../lib/TextureBackedBuffer/BufferManager.js";import{getComponentDataLayout as O,IndexGlLayout as k}from"../../materials/DefaultLayouts.js";import{BufferObject as A}from"../../../../webgl/BufferObject.js";import{PrimitiveType as j}from"../../../../webgl/enums.js";import{VertexBuffer as M}from"../../../../webgl/VertexBuffer.js";const N=()=>n.getLogger(`esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection`);let P=class extends t{constructor(e,t,n){super(),this._renderPassManager=e,this._viewingMode=t,this._elevationRangeCacheVerticalOffset=NaN,this._elevationRangeCacheMin=NaN,this._elevationRangeCacheMax=NaN,this._highlightsInOrder=[],this._highlights=null,this._activeHighlightOptions=new Map,this._visible=new r,this._hidden=new r,this._renderSubmit=new x(this),this._renderPassManager.register(this._renderSubmit);let{rctx:o,bind:s}=e;this._componentBufferManager=new D(o,O());let c=this._viewingMode===2?0:n?1:2;this.materials=new C(s,c),this.samplers=new w(o.gl),this.addHandles(i(()=>s.useFloatBlend.value,()=>{this._visible.forAll(e=>e.updateMaterial(this.materials.globals)),this._hidden.forAll(e=>e.updateMaterial(this.materials.globals)),this._requestRender()},a))}destroy(){this._componentBufferManager.destroy(),this._componentBufferManager=null,this._visible.forAll(e=>e.destroy()),this._visible.prune(),this._hidden.forAll(e=>e.destroy()),this._hidden.prune(),this._renderSubmit.destroy(),this.samplers.dispose(),this.materials.destroy()}createObject(e,t){let{geometry:n}=e,r=new p(this._componentBufferManager,u(n.componentOffsets)),i=this._createRenderable(e,t,r),a=new _(this._viewingMode,n.positions,r,e.elevationAlignable),o=new g(this,e.transform,e.obb.clone(),r,i,a);return(o.visible?this._visible:this._hidden).push(o),o}destroyObject(e){let t=e;(t.visible?this._visible:this._hidden).removeUnordered(t),t.destroy(),this._requestRender()}setObjectVisibility(e,t){let n=e;t!==n.visible&&(t?(this._hidden.removeUnordered(n),this._visible.push(n)):(this._visible.removeUnordered(n),this._hidden.push(n)),n.visible=t,this._requestRender())}preSubmit(e){let{camera:t,highlights:n}=e;this._updateHighlightsInOrder(n),this._componentBufferManager.updateTextures(),this.visibleObjects.forAll(e=>e.updateCameraDerivedParameters(t))}getObjectOpacity(e){return e.renderable.drawParameters.opacity}updateObjectOpacity(e,t,n){let r=e;(r.opacity!==t||n!==void 0&&n!==r.renderable.material.parameters.groundTransparencyMode)&&(r.updateOpacity(t,n),this._requestRender())}isSliceplaneEnabled(e){return e.renderable.material.slicePlaneEnabled}setAllComponentVisibilities(e,t){let n=e;n.componentData.visibility.reset(t),n.componentData.markVisibilityDirty(),this._requestRender()}forEachVisibleComponent(e,t){return e.componentData.visibility.forEachComponent(t)}getComponentCount(e){let{componentData:t}=e,n=t.visibility.componentCount;return{visible:n,invisible:t.count-n}}setComponentData(e,t){e.setComponentData(t,this._viewingMode),this._elevationRangeCacheVerticalOffset=NaN,this._requestRender()}getComponentAabb(e,t,n,r=!1){e.intersectionGeometry.getComponentAabb(t,n);let i=e,a=i.componentData.verticalOffsets;if(r||a==null)return n;let o=a[t];if(this._viewingMode===2||o===0)return n[2]+=o,n[5]+=o,n;let s=E(o);return s.localOrigin=i.transform.position,s.applyToAabb(n)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,n){return e.intersectionGeometry.getComponentPositions(t,n)}_updateHighlightsInOrder(e){if(this._highlights===e)return;let{_highlightsInOrder:t}=this,n=Math.min(e.length,8),r=t.length!==n;for(let i=0;i<n;++i)if(t[i]!==e[i].name){r=!0;break}if(this._highlights=e,r){t.length=n;for(let r=0;r<n;++r)t[r]=e[r].name;this._syncHighlightedObjectHighlightOrder()}}_syncHighlightedObjectHighlightOrder(){let e=this._highlightsInOrder,t=t=>{t.componentData.componentHighlights.size>0&&t.componentData.setHighlightsInOrder(e)};this._visible.forAll(t),this._hidden.forAll(t)}expandRangeWithComponentObjectElevationRange(e,t,n,r){!Number.isNaN(this._elevationRangeCacheVerticalOffset)&&this._elevationRangeCacheVerticalOffset===t&&r.expandElevationRangeValues(this._elevationRangeCacheMin,this._elevationRangeCacheMax);let i=e,{componentData:a}=i,o=a.count,{verticalOffsets:s}=a,{intersectionGeometry:c}=i,l=this._viewingMode===2,u=c.getComponentAabbs(),d=F,f=1/0,p=-1/0;for(let e=0;e<o;e++){let a=e*6,o=s?.[e]??0,c=1/0,m=-1/0;if(l)c=u[a+2]+o+t,m=u[a+5]+o+t;else{if(d[0]=u[a],d[1]=u[a+1],d[2]=u[a+2],d[3]=u[a+3],d[4]=u[a+4],d[5]=u[a+5],o!==0){let e=E(o);e.localOrigin=i.transform.position,e.applyToAabb(d)}let e=Math.max(Math.abs(d[3]),Math.abs(d[0])),s=Math.max(Math.abs(d[4]),Math.abs(d[1])),c=t+d[5]+n;r.expandElevationRangeValues(t+d[2],Math.sqrt(e*e+s*s+c*c)-n)}r.expandElevationRangeValues(c,m),f=Math.min(f,c),p=Math.max(p,m)}this._elevationRangeCacheVerticalOffset=t,this._elevationRangeCacheMin=f,this._elevationRangeCacheMax=p}intersectRay(e,t,n,r,i,a){let{transform:o,componentData:s,intersectionGeometry:c}=e;r!=null&&(r.localOrigin=o.position),c.intersectRay(t,n,r,s.verticalOffsets,o,i,a)}*intersectScreenPolygon(e,t,n,r,i){let{transform:a,componentData:o,intersectionGeometry:s}=e;r!=null&&(r.localOrigin=a.position),yield*s.intersectScreenPolygon(t,n,r,o.verticalOffsets,a,i)}addEdges(e,t,n,r,i){let a=e,{indices:o,positions:s}=a.intersectionGeometry,c=a.componentData.offsets;return t.addComponentObject(a,s,o,c,n,r,i)}async extractEdgeInformation(e,t,n){let r=e,i=r.componentData.visibility;if(i.allInvisible()){let{extractComponentsEdgeLocationsLayout:e}=await import(`../../lib/edgeRendering/edgeProcessing.js`);return{buffer:e.createBuffer(0),origin:[0,0,0]}}let{indices:a,positions:o}=r.intersectionGeometry,s=r.componentData.offsets,{EdgeInputBufferLayout:l}=await import(`../../lib/edgeRendering/bufferLayouts.js`),u=l.createBuffer(o.length/3);f(u.position.typedBuffer,o,u.position.typedBufferStride,3),d(u.position,u.position,r.transform.rotationScale),this._setComponentIndices(u.componentIndex,a,s);let p=u.count,m=this._computeVisibilityIndices(a,i,s,p);return{origin:c(r.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:m,indicesLength:m.length,skipDeduplicate:!0,data:u,writerSettings:{reducedPrecision:!1,variants:0}},n)}}_setComponentIndices(e,t,n){let r=0;for(let i=0;i<n.length-1;i++){let a=n[i],o=n[i+1];for(let n=a;n<o;n++){let i=t?t[n]:n;e.set(i,r)}r++}}_computeVisibilityIndices(e,t,n,r){if(e&&t.allVisible())return e;let i=0;t.forEachComponentRange((e,t)=>(i+=n[t]-n[e],!0));let a=o(e)?e?.BYTES_PER_ELEMENT===2||r<=65536?new Uint16Array(i):new Uint32Array(i):Array(i),s=0;return t.forEachComponentRange((t,r)=>{let i=n[t],o=n[r];for(let t=i;t<o;t++)a[s++]=e?e[t]:t;return!0}),a}addHighlight(e,t,n){let r=e,i=this._activeHighlightOptions.get(n)??0;this._activeHighlightOptions.set(n,i+1),r.componentData.setHighlightsInOrder(this._highlightsInOrder),r.addHighlight(t,n)&&this._requestRender()}removeHighlight(e,t,n){let r=e.removeHighlight(t,n);r!==`notfound`&&(this._removeActiveHighlight(n),r&&this._requestRender())}_removeActiveHighlight(e,t=1){let n=this._activeHighlightOptions.get(e);if(n===void 0)N().warn(`Removing non-existing highlight "${e}".`);else{let r=n-t;r<0&&N().warn(`Removing non-existing highlight "${e}".`),r<=0?this._activeHighlightOptions.delete(e):this._activeHighlightOptions.set(e,r)}}clearHighlights(e){let t=e,{componentData:n}=t,{componentHighlights:r}=t.componentData;if(r.size>0){for(let e of r)this._removeActiveHighlight(e[0],e[1][n.count]);t.clearHighlights(),this._requestRender()}}hasHighlight(e){return this._activeHighlightOptions.has(e)}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._visible}_createRenderable(e,t,n){let r=this._renderPassManager.rctx,i=e.geometry,a=i.parameters.layout,{interleavedVertexData:o,indexData:s,vertexCount:c}=i.renderGeometryData,l=new M(r,a,o),u=s?A.createIndex(r,35044,s):null,d=0,f=[[`geometry`,l]];if(!t.isIntegratedMesh){let e=new Uint16Array(c);for(let t=0;t<n.count;t++){let r=n.offsets[t],i=n.offsets[t+1],a=n.materialDataIndices[t];if(s!=null)for(let t=r;t<i;t++){let n=s[t];e[n]=a}else for(let t=r;t<i;t++)e[t]=a}let t=new M(r,k,e.buffer);d+=t.usedMemory,f.push([`componentIndices`,t])}let p=new T(r,new Map(f),u),g=s?.length??c,_=new b(p,j.TRIANGLES,i.parameters,u!=null,g),x=new S(t),C=this.materials.acquire(x,_.parameters,m),w=new v(l.usedMemory+d+(u?.usedMemory??0)),E=this.samplers.addFromTexture(t.baseColorTexture?.texture),D=new h(e,t,E);return new y(C,D,_,w)}_requestRender(){this._renderPassManager.requestRender()}};P=e([s(`esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection`)],P);const F=l();export{P as ComponentObjectCollection};
|
|
@@ -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 n from"../../../../../core/Logger.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{Pos2 as i}from"../../lib/DefaultVertexBufferLayouts.js";import{Program as a}from"../../lib/Program.js";import{PrimitiveType as o}from"../../../../webgl/enums.js";import{makePipelineState as s,defaultColorWrite as c,premultipliedAlpha as l}from"../../../../webgl/renderState.js";import{fromLayout as u}from"../../../../webgl/VertexAttributeLocations.js";const d=()=>n.getLogger(`esri.views.3d.webgl.ShaderTechnique`);let f=class extends t{constructor(e,t,n){super(
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import n from"../../../../../core/Logger.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{Pos2 as i}from"../../lib/DefaultVertexBufferLayouts.js";import{Program as a}from"../../lib/Program.js";import{PrimitiveType as o}from"../../../../webgl/enums.js";import{makePipelineState as s,defaultColorWrite as c,premultipliedAlpha as l}from"../../../../webgl/renderState.js";import{fromLayout as u}from"../../../../webgl/VertexAttributeLocations.js";const d=()=>n.getLogger(`esri.views.3d.webgl.ShaderTechnique`);let f=class extends t{constructor(e,t,n){super(),this._context=e,this._configuration=t,this.primitiveType=o.TRIANGLES,this._unused=!0,this.ignoreUnused=!1,this.key=t.key,this.locations=u(n??i),this._pipeline=this.initializePipeline(t),this.reload=async n=>{if(n&&await this.shader.reload(),!this.key.equals(t.key)){d().warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);return}let r=this.shader.get().build(t);r.debugName=this.declaredClass,this._program=new a(e.rctx,r,this.locations),this._pipeline=this.initializePipeline(t)}}initialize(){let e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new a(this._context.rctx,e,this.locations)}get program(){return this._unused=!1,this._program}get compiled(){return this._unused=!1,this.program.compiled}get unused(){return this._unused}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t,n){return this._pipeline}initializePipeline(e){return s({blending:l,colorWrite:c})}};f=e([r(`esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique`)],f);export{f as ShaderTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{property as n,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{copy as i,add as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromRay as o,getStart as s,getEnd as c,create as l}from"../../../../../geometry/support/clipRay.js";import{intersectClipRay as u}from"../../../../../geometry/support/frustumPlanes.js";import{copy as d}from"../../../../../geometry/support/lineSegment.js";import{wrap as f}from"../../../../../geometry/support/ray.js";import{InternalRenderCategory as p}from"../../../webgl.js";import m from"../../../webgl/RenderNode.js";import{Blit as h}from"../blit/Blit.js";import{LaserlinePathData as g}from"./LaserlinePathData.js";import{LaserlinePathPassParameters as _,LaserlinePathTechnique as v}from"./LaserlinePathTechnique.js";import{LaserlinePathTechniqueConfiguration as y}from"./LaserlinePathTechniqueConfiguration.js";import{LaserlineTechnique as b}from"./LaserlineTechnique.js";import{LaserlineTechniqueConfiguration as x}from"./LaserlineTechniqueConfiguration.js";import{updateParameters as S}from"../../materials/internal/MaterialUtil.js";let C=class extends m{get requireGeometryDepth(){return!0}constructor(e){super(e),this.isDecoration=!0,this.consumes={required:[p.LASERLINES,`normals`]},this.produces=p.LASERLINES,this.
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{property as n,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{copy as i,add as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromRay as o,getStart as s,getEnd as c,create as l}from"../../../../../geometry/support/clipRay.js";import{intersectClipRay as u}from"../../../../../geometry/support/frustumPlanes.js";import{copy as d}from"../../../../../geometry/support/lineSegment.js";import{wrap as f}from"../../../../../geometry/support/ray.js";import{InternalRenderCategory as p}from"../../../webgl.js";import m from"../../../webgl/RenderNode.js";import{Blit as h}from"../blit/Blit.js";import{LaserlinePathData as g}from"./LaserlinePathData.js";import{LaserlinePathPassParameters as _,LaserlinePathTechnique as v}from"./LaserlinePathTechnique.js";import{LaserlinePathTechniqueConfiguration as y}from"./LaserlinePathTechniqueConfiguration.js";import{LaserlineTechnique as b}from"./LaserlineTechnique.js";import{LaserlineTechniqueConfiguration as x}from"./LaserlineTechniqueConfiguration.js";import{updateParameters as S}from"../../materials/internal/MaterialUtil.js";let C=class extends m{get requireGeometryDepth(){return!0}constructor(e){super(e),this.isDecoration=!0,this.consumes={required:[p.LASERLINES,`normals`]},this.produces=p.LASERLINES,this._intersectsLineInfinite=!1,this._pathVerticalPlaneEnabled=!1,this._passParameters=new _,this._configuration=new x(e.view.state.isGlobal),this._pathConfiguration=new y(e.view.state.isGlobal),this._blit=new h(e.view.stage.renderView.techniques,2)}initialize(){this._passParameters.renderCoordsHelper=this.view.renderCoordsHelper,this._configuration.contrastControlEnabled=this.contrastControlEnabled,this._pathConfiguration.contrastControlEnabled=this.contrastControlEnabled}destroy(){this._pathVerticalPlaneData=t(this._pathVerticalPlaneData)}get heightManifoldEnabled(){return this._configuration.heightManifoldEnabled}set heightManifoldEnabled(e){this._configuration.heightManifoldEnabled!==e&&(this._configuration.heightManifoldEnabled=e,this.requestRender(1))}get heightManifoldTarget(){return this._passParameters.heightManifoldTarget}set heightManifoldTarget(e){i(this._passParameters.heightManifoldTarget,e),this.requestRender(1)}get pointDistanceEnabled(){return this._configuration.pointDistanceEnabled}set pointDistanceEnabled(e){e!==this._configuration.pointDistanceEnabled&&(this._configuration.pointDistanceEnabled=e,this.requestRender(1))}get pointDistanceTarget(){return this._passParameters.pointDistanceTarget}set pointDistanceTarget(e){i(this._passParameters.pointDistanceTarget,e),this.requestRender(1)}get pointDistanceOrigin(){return this._passParameters.pointDistanceOrigin}set pointDistanceOrigin(e){i(this._passParameters.pointDistanceOrigin,e),this.requestRender(1)}get lineVerticalPlaneEnabled(){return this._configuration.lineVerticalPlaneEnabled}set lineVerticalPlaneEnabled(e){e!==this._configuration.lineVerticalPlaneEnabled&&(this._configuration.lineVerticalPlaneEnabled=e,this.requestRender(1))}get lineVerticalPlaneSegment(){return this._passParameters.lineVerticalPlaneSegment}set lineVerticalPlaneSegment(e){d(e,this._passParameters.lineVerticalPlaneSegment),this.requestRender(1)}get intersectsLineEnabled(){return this._configuration.intersectsLineEnabled}set intersectsLineEnabled(e){e!==this._configuration.intersectsLineEnabled&&(this._configuration.intersectsLineEnabled=e,this.requestRender(1))}get intersectsLineSegment(){return this._passParameters.intersectsLineSegment}set intersectsLineSegment(e){d(e,this._passParameters.intersectsLineSegment),this.requestRender(1)}get intersectsLineInfinite(){return this._intersectsLineInfinite}set intersectsLineInfinite(e){e!==this._intersectsLineInfinite&&(this._intersectsLineInfinite=e,this.requestRender(1))}get pathVerticalPlaneEnabled(){return this._pathVerticalPlaneEnabled}set pathVerticalPlaneEnabled(e){e!==this._pathVerticalPlaneEnabled&&(this._pathVerticalPlaneEnabled=e,this._pathVerticalPlaneData!=null&&this.requestRender(1))}set pathVerticalPlaneVertices(e){this._pathVerticalPlaneData??=new g(this._passParameters.renderCoordsHelper),this._pathVerticalPlaneData.vertices=e,this.pathVerticalPlaneEnabled&&this.requestRender(1)}set pathVerticalPlaneBuffers(e){this._pathVerticalPlaneData??=new g(this._passParameters.renderCoordsHelper),this._pathVerticalPlaneData.buffers=e,this.pathVerticalPlaneEnabled&&this.requestRender(1)}setParameters(e){S(this._passParameters,e)&&this.requestRender(1)}render(e){let t=this.input;if(this.isDecoration&&!this.bindParameters.decorations)return t;let n=this.renderingContext,r=e.find(({name:e})=>e===`normals`);if(this._passParameters.normals=r?.getTexture(),!this.contrastControlEnabled)return n.bindFramebuffer(t.fbo),this._renderLaserLines(),t;this._passParameters.colors=t.getTexture();let i=this.fboCache.acquire(t.fbo.width,t.fbo.height,`laser lines`);return n.bindFramebuffer(i.fbo),n.setClearColor(0,0,0,0),n.clear(16384),this._renderLaserLines(),this._blit.blend(i,t,this.bindParameters)||this.requestRender(1),i.release(),t}_renderLaserLines(){(this.heightManifoldEnabled||this.pointDistanceEnabled||this.lineVerticalPlaneSegment||this.intersectsLineEnabled)&&this._renderUnified(),this.pathVerticalPlaneEnabled&&this._renderPath()}_renderUnified(){if(!this._update())return;let e=this.techniques.getCompiled(b,this._configuration);if(e){let t=this.renderingContext;t.bindTechnique(e,this.bindParameters,this._passParameters),t.screen.draw()}else this.requestRender(1)}_renderPath(){if(this._pathVerticalPlaneData==null)return;let e=this.techniques.getCompiled(v,this._pathConfiguration);if(e){let t=this.renderingContext;this._passParameters.origin=this._pathVerticalPlaneData.origin,t.bindTechnique(e,this.bindParameters,this._passParameters),this._pathVerticalPlaneData.draw(t)}else this.requestRender(1)}_update(){if(this._configuration.hasEmissive=this._pathConfiguration.hasEmissive=this.bindParameters.emissions!==0,!this.intersectsLineEnabled)return!0;let e=this.bindParameters.camera,t=this._passParameters;if(this._intersectsLineInfinite){if(o(f(t.intersectsLineSegment.origin,t.intersectsLineSegment.vector),w),w.c0=-Number.MAX_VALUE,!u(e.frustum,w))return!1;s(w,t.lineStartWorld),c(w,t.lineEndWorld)}else i(t.lineStartWorld,t.intersectsLineSegment.origin),a(t.lineEndWorld,t.intersectsLineSegment.origin,t.intersectsLineSegment.vector);return!0}get test(){}};e([n({constructOnly:!0})],C.prototype,`contrastControlEnabled`,void 0),e([n()],C.prototype,`isDecoration`,void 0),e([n()],C.prototype,`consumes`,void 0),e([n()],C.prototype,`produces`,void 0),C=e([r(`esri.views.3d.webgl-engine.effects.laserlines.LaserLineRenderer`)],C);const w=l();export{C as LaserLineRenderer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{parameter as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as n}from"../../shaders/EmissiveTechniqueConfiguration.js";class r extends n{constructor(){super(
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as n}from"../../shaders/EmissiveTechniqueConfiguration.js";class r extends n{constructor(e){super(),this.spherical=e,this.contrastControlEnabled=!1}}e([t()],r.prototype,`contrastControlEnabled`,void 0);export{r as LaserlinePathTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{releaseMaybe as e}from"../../../../core/maybe.js";import{signal as t}from"../../../../core/signal.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import r from"../../webgl/RenderCamera.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as a}from"../effects/clouds/CloudsParameters.js";import{
|
|
2
|
+
import{releaseMaybe as e}from"../../../../core/maybe.js";import{signal as t}from"../../../../core/signal.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import r from"../../webgl/RenderCamera.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{CloudsParameters as a}from"../effects/clouds/CloudsParameters.js";import{enableOITOffset as o}from"./OrderIndependentTransparency.js";import{ReprojectionUniforms as s}from"./ReprojectionUniforms.js";import{ScreenSpaceReflectionsUniforms as c}from"./ScreenSpaceReflectionsUniforms.js";import{SceneLighting as l}from"../lighting/SceneLighting.js";class u{constructor(e,t){this.width=e,this.height=t}}class d{constructor(e){this.shadowMap=e,this.output=0,this.slot=2,this.planarDistanceToGroundRatio=1,this.metersPerRenderUnit=1,this.hasOccludees=!1,this._emissions=t(0),this.transparentWithoutDepthEmissionDimmingPass=!1,this.useFloatBlend=t(!0),this.enableFillLights=!0,this.alignPixelEnabled=!1,this.decorations=!0,this.frameRendererTarget=0,this.overlayStretch=1,this.viewshedEnabled=!1,this.laserlinesEnabled=!1,this.shadowAnalysisEnabled=!1,this.cutFillComputationEnabled=!1,this.cutFillVisualizationEnabled=!1,this._camera=t(new r),this._inverseViewport=n(),this._oldLighting=new l,this._newLighting=new l,this._fadedLighting=new l,this._lighting=this._newLighting,this.screenSpaceReflections=new c,this.reprojection=new s,this.highlights=[],this.highlightMixOrigin=n(),this.globalIlluminationEnabled=!1,this.hudRenderStyle=0,this.snowCover=0,this.clouds=new a,this.hasShadowHighlights=!1}destroy(){this._camera=this.contentCamera=null,this.mainDepth=this.overlay=this.ssao=this.shadowHighlight=null,this.depth=e(this.depth),this.shadowMap?.dispose()}get emissions(){return this._emissions.value}set emissions(e){this._emissions.value=e}get hasEmission(){switch(this.output){case 0:return this.hasOpaqueEmission;case 1:case 2:return this.hasTransparentEmission;default:return!1}}get hasOpaqueEmission(){return this.emissions===1||this.emissions===3}get hasTransparentEmission(){return this.emissions===2||this.emissions===3}get hasEmissions(){return this.emissions!==0}get camera(){return this._camera.value}set camera(e){this._camera.value=e,this._inverseViewport[0]=1/e.fullViewport[2],this._inverseViewport[1]=1/e.fullViewport[3]}get enableOITOffset(){return o(this.output,this.camera)}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(e,t,n,r){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=n,this._newLighting.set(e),this._oldLighting.updateLegacy(),r===1&&this.clouds.requestFade(),this.fadeLighting()}get hasScreenSpaceReflections(){return this.frameRendererTarget!==3&&i(this.output)&&this.screenSpaceReflections.enabled&&this.reprojection.lastFrameColor!=null}get highlight(){return this.highlightLevel==null?null:this.highlights[this.highlightLevel]}get depth(){return this._depth}set depth(e){e&&(e.name=`geometry depth`),this._depth=e}get occluder(){return this.slot===10||this.slot===11?this.slot:null}}export{d as BindParameters,u as ViewportSize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as n,syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{copy as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{InternalRenderCategory as s}from"../../webgl.js";import{glLayout as c}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import u from"../../webgl/RenderNode.js";import{VertexArrayObject as d}from"./VertexArrayObject.js";import{C as f}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as p}from"../shaders/CutFillCompositionTechnique.js";import{DefaultMaterialPassParameters as m,DefaultMaterialDrawParameters as h,DefaultMaterialTechnique as g}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as _}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as v}from"../shaders/EmissiveTechniqueConfiguration.js";import{O as y}from"../../../../chunks/OccludedGeometryDepth.glsl.js";import{OccludedGeometryDepthTechnique as b}from"../shaders/OccludedGeometryDepthTechnique.js";import{V as x}from"../../../../chunks/VolumeMask.glsl.js";import{VolumeMaskTechnique as S}from"../shaders/VolumeMaskTechnique.js";import{DepthStencilAttachment as C,PrimitiveType as w}from"../../../webgl/enums.js";import{noParameters as T}from"../../../webgl/NoParameters.js";import{VertexBuffer as E}from"../../../webgl/VertexBuffer.js";let D=class extends u{constructor(e){super(e),this.consumes={required:[s.CUTFILL,s.GROUND_DEPTH]},this.produces=s.CUTFILL,this.measureType=`cut-fill`,this._vaoCut=null,this._vaoFill=null,this._compositeConfiguration=new v,this._maskParameters=new x,this._occludedGeometryDepthParameters=new y,this._cutVolumeParameters=new m,this._fillVolumeParameters=new m,this._compositeParameters=new f,this._drawParameters=new h;let t=e.view.state.
|
|
2
|
+
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as n,syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as i,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{copy as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{InternalRenderCategory as s}from"../../webgl.js";import{glLayout as c}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import u from"../../webgl/RenderNode.js";import{VertexArrayObject as d}from"./VertexArrayObject.js";import{C as f}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as p}from"../shaders/CutFillCompositionTechnique.js";import{DefaultMaterialPassParameters as m,DefaultMaterialDrawParameters as h,DefaultMaterialTechnique as g}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as _}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as v}from"../shaders/EmissiveTechniqueConfiguration.js";import{O as y}from"../../../../chunks/OccludedGeometryDepth.glsl.js";import{OccludedGeometryDepthTechnique as b}from"../shaders/OccludedGeometryDepthTechnique.js";import{V as x}from"../../../../chunks/VolumeMask.glsl.js";import{VolumeMaskTechnique as S}from"../shaders/VolumeMaskTechnique.js";import{DepthStencilAttachment as C,PrimitiveType as w}from"../../../webgl/enums.js";import{noParameters as T}from"../../../webgl/NoParameters.js";import{VertexBuffer as E}from"../../../webgl/VertexBuffer.js";let D=class extends u{constructor(e){super(e),this.consumes={required:[s.CUTFILL,s.GROUND_DEPTH]},this.produces=s.CUTFILL,this.measureType=`cut-fill`,this._vaoCut=null,this._vaoFill=null,this._compositeConfiguration=new v,this._maskParameters=new x,this._occludedGeometryDepthParameters=new y,this._cutVolumeParameters=new m,this._fillVolumeParameters=new m,this._compositeParameters=new f,this._drawParameters=new h;let t=e.view.state.isGlobal;this._cutVolumeConfiguration=new _(t),this._cutVolumeConfiguration.customDepthTest=3,this._cutVolumeConfiguration.writeDepth=!1,this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2,this._fillVolumeConfiguration=new _(t),this._fillVolumeConfiguration.customDepthTest=1,this._fillVolumeConfiguration.cullFace=2}initialize(){this.addHandles([n(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),r),n(()=>this.measureType,()=>this.requestRender(1),r)])}destroy(){this._disposeVaos()}precompile(){this._vaoCut&&this._vaoFill&&(this.measureType===`cut-fill`?(this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2):(this._cutVolumeConfiguration.cullFace=0,this._cutVolumeConfiguration.doubleSidedMode=0),this._compositeConfiguration.hasEmissive=this.bindParameters.emissions!==0,this.techniques.precompile(S),this.techniques.precompile(b),this.techniques.precompile(g,this._cutVolumeConfiguration),this.techniques.precompile(g,this._fillVolumeConfiguration),this.techniques.precompile(p,this._compositeConfiguration))}render(e){let t=this.input;if(!this._vaoCut||!this._vaoFill)return t;let n=this._vaoCut.vertexCount(`geometry`),r=this._vaoFill.vertexCount(`geometry`),i=this.bindParameters,a=i.camera,o=a.fullViewport[2],c=a.fullViewport[3],l=this.renderingContext,u=this.fboCache,d=e.find(({name:e})=>e===s.GROUND_DEPTH),f=u.acquire(o,c,`cutfill color mask`,2).attachDepth(d.getAttachment(C));l.bindFramebuffer(f.fbo),l.setClearColor(0,0,0,1),l.clear(17408),l.setViewport(0,0,o,c);let m=this.techniques.get(S);l.bindTechnique(m,i,T,this._maskParameters),l.setFaceCullingEnabled(!1),l.setStencilTestEnabled(!0),l.setStencilOpSeparate(1028,7680,34055,7680),l.setStencilOpSeparate(1029,7680,34056,7680),l.setDepthWriteEnabled(!1),l.bindVAO(this._vaoCut),l.setDepthTestEnabled(!0),l.setStencilWriteMask(255),l.setStencilFunction(519,0,255),l.setColorMask(!1,!1,!1,!1),l.drawArrays(w.TRIANGLES,0,n),l.setDepthTestEnabled(!1),l.setStencilWriteMask(0),l.setStencilFunction(517,0,255),l.setColorMask(!0,!1,!1,!1),l.drawArrays(w.TRIANGLES,0,n),l.bindVAO(this._vaoFill),l.setDepthTestEnabled(!0),l.setStencilWriteMask(255),l.setStencilFunction(519,0,255),l.setColorMask(!1,!0,!1,!1),l.drawArrays(w.TRIANGLES,0,r);let h=u.acquire(o,c,`cutfill color cut volume`,5).acquireDepth(14);l.bindFramebuffer(h.fbo),l.setClearColor(0,0,0,0),l.setClearDepth(1),l.setColorMask(!0,!0,!0,!0),l.setDepthWriteEnabled(!0),l.clear(16640);let _=this.techniques.get(b);this._occludedGeometryDepthParameters.depthTexture=d.getTexture(C),this._occludedGeometryDepthParameters.cullFace=this._cutVolumeConfiguration.cullFace,l.bindTechnique(_,i,this._occludedGeometryDepthParameters,this._drawParameters),l.bindVAO(this._vaoCut),l.drawArrays(w.TRIANGLES,0,n);let v=this.techniques.get(g,this._cutVolumeConfiguration);l.bindTechnique(v,this.bindParameters,this._cutVolumeParameters,this._drawParameters),l.bindVAO(this._vaoCut),l.drawArrays(w.TRIANGLES,0,n),h.detachDepth();let y=u.acquire(o,c,`cutfill color fill volume`,5).acquireDepth(14);l.blitFramebuffer(t.fbo,y.fbo,256),l.bindFramebuffer(y.fbo),l.clear(16384),l.setColorMask(!0,!0,!0,!0);let x=this.techniques.get(g,this._fillVolumeConfiguration);l.bindTechnique(x,this.bindParameters,this._fillVolumeParameters,this._drawParameters),l.bindVAO(this._vaoFill),l.drawArrays(w.TRIANGLES,0,r),y.detachDepth();let E=t.obtainDepthTexture();l.bindFramebuffer(t.fbo),this._compositeParameters.cutVolume=h.getTexture(),this._compositeParameters.fillVolume=y.getTexture(),this._compositeParameters.mask=f.getTexture(),this._compositeParameters.sceneDepth=E?.attachment,this._compositeParameters.groundDepth=d.getTexture(C),this.borderColor.toUnitRGBA(this._compositeParameters.borderColor);let D=this.techniques.get(p,this._compositeConfiguration);return l.bindTechnique(D,i,this._compositeParameters),l.screen.draw(),t.attachDepth(E),E?.release(),f.release(),h.release(),y.release(),t}enable(){this.produces=s.CUTFILL,this.requestRender(1)}disable(){this.produces=`disabled`,this.requestRender(1)}updateGeometries(e,t,n){this._disposeVaos(),this._vaoCut=this._createVao(e),this._vaoFill=this._createVao(t),this._maskParameters.origin=n,o(this._drawParameters.origin,n),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=this.cutColor.toUnitRGB(),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=this.fillColor.toUnitRGB(),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){let{vertices:t,normals:n,indicesBottom:r,indicesExtruded:i}=e,a=r.length+i.length,o=this.renderingContext,s=O.createBuffer(a),{position:l,normal:u}=s,f=0;for(let e=0;e<r.length;e++){let i=3*r[e];l.set(f,0,t[i]),l.set(f,1,t[i+1]),l.set(f,2,t[i+2]),u.set(f,0,n[i]),u.set(f,1,n[i+1]),u.set(f,2,n[i+2]),f++}for(let e=0;e<i.length;e++){let r=3*i[e];l.set(f,0,t[r]),l.set(f,1,t[r+1]),l.set(f,2,t[r+2]),u.set(f,0,n[r]),u.set(f,1,n[r+1]),u.set(f,2,n[r+2]),f++}let p=new E(o,c(O),s.buffer);return new d(o,p)}_disposeVaos(){this._vaoCut=t(this._vaoCut),this._vaoFill=t(this._vaoFill)}};e([i()],D.prototype,`consumes`,void 0),e([i()],D.prototype,`produces`,void 0),e([i()],D.prototype,`cutColor`,void 0),e([i()],D.prototype,`fillColor`,void 0),e([i()],D.prototype,`borderColor`,void 0),e([i()],D.prototype,`measureType`,void 0),D=e([a(`esri.views.3d.webgl-engine.lib.CutFill`)],D);const O=l().vec3f(`position`).vec3f(`normal`).freeze();class k{constructor(e,t,n,r){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=n,this.normals=r}}export{D as CutFill,k as VolumeGeometry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o,set as s,positiveInfinity as c,equals as l}from"../../../../geometry/support/aaBoundingBox.js";import{InternalRenderCategory as u}from"../../webgl.js";import{addWraparound as d}from"../../layers/i3s/I3SUtil.js";import f from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as p,requiresPreciseColorDepth as m,prepareGaussianSplatPerspectiveParameters as h}from"./GaussianSplatRenderUtils.js";import{G as g}from"../../../../chunks/GaussianSplatComposition.glsl.js";import{GaussianSplatCompositionTechnique as _}from"../shaders/GaussianSplatCompositionTechnique.js";import{GaussianSplatCompositionTechniqueConfiguration as v}from"../shaders/GaussianSplatCompositionTechniqueConfiguration.js";import{G as y}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as b}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{GaussianSplatPassParameters as x}from"../shaders/GaussianSplatPassParameters.js";import{GaussianSplatTechnique as S}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as C}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{ColorAttachment1 as w,DepthStencilAttachment as T,PrimitiveType as E}from"../../../webgl/enums.js";let D=class extends f{constructor(e){super(e),this.consumes={required:[u.GAUSSIAN_SPLAT]},this.produces=u.GAUSSIAN_SPLAT,this._slicePlaneEnabled=!1,this.layerView=null,this._passParameters=new x,this._compositionPassParameters=new g,this._depthCompositionPassParameters=new y,this._compositionConfiguration=new v,this._clipBox=o(),this._previousSortRequestCameraDirection=a(),this._cameraSortDirty=!1,this._tileCullingRevision=0,this._sortRequestDirectionEpsilon=.01,this._configuration=new C(e.view.state.isGlobal),s(this._clipBox,c)}async initialize(){this.addHandles([t(()=>this.view.state.camera,()=>this._onCameraChange()),t(()=>this.view.state.mode===2,e=>{e&&this._cameraSortDirty&&this._requestCameraSort(this.view.state.camera.ray.direction),this.requestRender(1)})])}precompile(){this._canRender&&(this._updateConfigurations(),this.
|
|
2
|
+
import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o,set as s,positiveInfinity as c,equals as l}from"../../../../geometry/support/aaBoundingBox.js";import{InternalRenderCategory as u}from"../../webgl.js";import{addWraparound as d}from"../../layers/i3s/I3SUtil.js";import f from"../../webgl/RenderNode.js";import{canRenderGaussianSplats as p,requiresPreciseColorDepth as m,prepareGaussianSplatPerspectiveParameters as h}from"./GaussianSplatRenderUtils.js";import{G as g}from"../../../../chunks/GaussianSplatComposition.glsl.js";import{GaussianSplatCompositionTechnique as _}from"../shaders/GaussianSplatCompositionTechnique.js";import{GaussianSplatCompositionTechniqueConfiguration as v}from"../shaders/GaussianSplatCompositionTechniqueConfiguration.js";import{G as y}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as b}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{GaussianSplatPassParameters as x}from"../shaders/GaussianSplatPassParameters.js";import{GaussianSplatTechnique as S}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as C}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{ColorAttachment1 as w,DepthStencilAttachment as T,PrimitiveType as E}from"../../../webgl/enums.js";let D=class extends f{constructor(e){super(e),this.consumes={required:[u.GAUSSIAN_SPLAT]},this.produces=u.GAUSSIAN_SPLAT,this._slicePlaneEnabled=!1,this.layerView=null,this._passParameters=new x,this._compositionPassParameters=new g,this._depthCompositionPassParameters=new y,this._compositionConfiguration=new v,this._clipBox=o(),this._previousSortRequestCameraDirection=a(),this._cameraSortDirty=!1,this._tileCullingRevision=0,this._sortRequestDirectionEpsilon=.01,this._configuration=new C(e.view.state.isGlobal),s(this._clipBox,c)}async initialize(){this.addHandles([t(()=>this.view.state.camera,()=>this._onCameraChange()),t(()=>this.view.state.mode===2,e=>{e&&this._cameraSortDirty&&this._requestCameraSort(this.view.state.camera.ray.direction),this.requestRender(1)})])}precompile(){this._canRender&&(this._updateConfigurations(),this.techniques.precompile(S,this._configuration),this.techniques.precompile(_,this._compositionConfiguration),this.techniques.precompile(b))}render(){let e=this.input;if(this._fadeHelper.updateForFrame(this.view.stage.renderView.renderer.renderContext.time),!this._canRender)return e;let t=e.getAttachment(w);this._compositionConfiguration.useFloatBlend=this.bindParameters.useFloatBlend.value,this._compositionConfiguration.hasEmission=t!=null;let{fullWidth:n,fullHeight:r}=this.bindParameters.camera;this._prepareParameters();let i=this.renderingContext,a=this.fboCache,o=a.acquire(n,r,`gaussian color output`),s=e.getAttachment(T);o.attachDepth(s);let c=this.techniques.get(S,this._configuration);this._renderGaussianColorAndDepth(o,c);let l=a.acquire(n,r,this.produces);this._depthCompositionPassParameters.splatDepth=o.getTexture(w),l.attachDepth(e.getAttachment(T)),i.bindFramebuffer(l.fbo);let u=this.techniques.get(b);i.bindTechnique(u,this.bindParameters,this._depthCompositionPassParameters),i.screen.draw(),this._compositionPassParameters.color=e.getTexture(),this._compositionPassParameters.splatColor=o.getTexture(),t?(l.acquireColor(w,8,`emissive`),this._compositionPassParameters.emission=e.getTexture(w)):this._compositionPassParameters.emission=null,i.bindFramebuffer(l.fbo);let d=this.techniques.get(_,this._compositionConfiguration);return i.bindTechnique(d,this.bindParameters,this._compositionPassParameters),i.screen.draw(),o.release(),l}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this.requestRender(1))}set clippingBox(e){let t=e||c;this._hasSameClipBox(t)||(s(this._clipBox,t),this._tileCullingRevision=d(this._tileCullingRevision,1),this._data.requestSort(),this.requestRender(1))}get clippingBox(){return this._clippingEnabled?this._clipBox:null}get tileCullingRevision(){return this._tileCullingRevision}get _clippingEnabled(){return!l(this._clipBox,c,(e,t)=>e===t)}get _isIdle(){return this.view.state.mode===2}get _data(){return this.layerView.data}get _canRender(){return p(this._data)}get _fadeHelper(){return this.layerView.fadeHelper}_updateConfigurations(){this._configuration.alphaCutoff=this.view.qualitySettings.gaussianSplat.minimumOpacity,this._configuration.fadingEnabled=this._fadeHelper.fadingEnabled,this._configuration.receiveShadows=this.bindParameters.shadowMap.ready,this._configuration.fragmentShading=this._configuration.receiveShadows&&this.view.stage.renderer.isFeatureEnabled(12),this._configuration.preciseDepth=m(this.bindParameters),this._configuration.hasShadowHighlights=this._configuration.receiveShadows&&this.bindParameters.hasShadowHighlights,this._configuration.clippingEnabled=this._clippingEnabled,this._configuration.hasSlicePlane=this._slicePlaneEnabled&&this.bindParameters.slicePlane!=null,this._compositionConfiguration.useFloatBlend=this.bindParameters.useFloatBlend.value,this._compositionConfiguration.hasEmission=this.bindParameters.hasOpaqueEmission}_onCameraChange(){this._tileCullingRevision=d(this._tileCullingRevision,1);let e=this.view.state.camera.ray.direction;this._cameraSortDirty=!0,(this._isIdle||this._shouldRequestSort(e))&&this._requestCameraSort(e)}_shouldRequestSort(e){return Math.abs(e[0]-this._previousSortRequestCameraDirection[0])>this._sortRequestDirectionEpsilon||Math.abs(e[1]-this._previousSortRequestCameraDirection[1])>this._sortRequestDirectionEpsilon||Math.abs(e[2]-this._previousSortRequestCameraDirection[2])>this._sortRequestDirectionEpsilon}_requestCameraSort(e){this._data.requestSort(),i(this._previousSortRequestCameraDirection,e),this._cameraSortDirty=!1}_prepareParameters(){h(this._passParameters,this.layerView,this.bindParameters.camera)}_hasSameClipBox(e){return l(this._clipBox,e,(e,t)=>e===t)}_renderGaussianColorAndDepth(e,t){let n=this.renderingContext;e.acquireColor(w,5,`gaussian depth output`),n.bindFramebuffer(e.fbo),n.setClearColor(0,0,0,0),n.clear(16384),this.renderingContext.bindTechnique(t,this.bindParameters,this._passParameters),this.renderingContext.drawArraysInstanced(E.TRIANGLE_STRIP,0,4,this._data.visibleGaussians)}};e([n()],D.prototype,`consumes`,void 0),e([n()],D.prototype,`produces`,void 0),e([n({constructOnly:!0})],D.prototype,`layerView`,void 0),D=e([r(`esri.views.3d.webgl-engine.lib.GaussianSplatRenderer`)],D);export{D as GaussianSplatRenderer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{VisualVariablesParameters as e}from"../../layers/support/FastSymbolUpdates.js";import{
|
|
2
|
+
import{VisualVariablesParameters as e}from"../../layers/support/FastSymbolUpdates.js";import{computeAttachmentOriginLines as t}from"./geometryDataUtils.js";import{Material as n}from"./Material.js";import{configureShadedMaterial as r}from"../shaders/ShadedMaterialConfiguration.js";class i extends e{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.shadingEnabled=!1,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.isDecoration=!1,this.worldSized=!1}}class a extends n{constructor(){super(...arguments),this.primitiveVertexCount=1}updateConfiguration(e){super.updateConfiguration(e),this._configuration.pbrMode=this.parameters.shadingEnabled?2:0,this._configuration.draped=e.slot===18,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.worldSized=this.parameters.worldSized,this._configuration.emissionSource=+!!this.emissions,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasOccludees=e.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===8,r(this._configuration,e,this.parameters)}computeAttachmentOrigin(e,n,r){return t(e,n,r,this._isClosed(r))}_isClosed(e){return(this.parameters.isClosed??!1)&&e>2}}export{a as LineMaterial,i as LineMaterialParameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{unitW as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isOITColorAlpha as t}from"../core/shaderLibrary/ShaderOutput.js";import{defaultDepthWrite as n,modulateDestination as r,premultipliedAlpha as i,unpremultipliedAlphaToPremultipliedAlpha as a,separateBlendingParams as o}from"../../../webgl/renderState.js";const s=o(1,0,1,771),c=e();function l(e,t=!1,n=!1){if(n)return r;switch(e){case 0:return t?i:a;case 1:return s;default:return null}}function u(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?n:null;case 1:return null}}function d(e,n=513){return{func:t(e)?515:n}}export{l as blending,s as blendingColorAlpha,c as blendingColorAlphaClear,d as depthTest,u as depthWrite};
|
|
2
|
+
import{unitW as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isOITColorAlpha as t}from"../core/shaderLibrary/ShaderOutput.js";import{defaultDepthWrite as n,modulateDestination as r,premultipliedAlpha as i,unpremultipliedAlphaToPremultipliedAlpha as a,separateBlendingParams as o}from"../../../webgl/renderState.js";const s=o(1,0,1,771),c=e();function l(e,t=!1,n=!1){if(n)return r;switch(e){case 0:return t?i:a;case 1:return s;default:return null}}function u(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?n:null;case 1:return null}}function d(e,n=513){return{func:t(e)?515:n}}function f(e,n){return t(e)&&n.relativeElevation<5e5}export{l as blending,s as blendingColorAlpha,c as blendingColorAlphaClear,d as depthTest,u as depthWrite,f as enableOITOffset};
|
|
@@ -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{EventEmitter as n}from"../../../../core/Evented.js";import r from"../../../../core/Logger.js";import{isPromiseLike as i,isAbortError as a}from"../../../../core/promiseUtils.js";import{property as o,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{isUpdatableTexture as c}from"./IManagedTexture.js";import{TextureUpdater as l}from"./TextureUpdater.js";import{TaskPriority as u}from"../../../support/Scheduler.js";let d=class extends t{constructor(e){super(
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{EventEmitter as n}from"../../../../core/Evented.js";import r from"../../../../core/Logger.js";import{isPromiseLike as i,isAbortError as a}from"../../../../core/promiseUtils.js";import{property as o,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{isUpdatableTexture as c}from"./IManagedTexture.js";import{TextureUpdater as l}from"./TextureUpdater.js";import{TaskPriority as u}from"../../../support/Scheduler.js";let d=class extends t{constructor(e){super(),this._stage=e,this._textures=new Map,this._loadingCount=0,this.events=new n,this.updater=new l,this._frameTask=e.view.resourceController.scheduler.registerTask(u.TEXTURE_UNLOAD)}destroy(){this._frameTask.remove(),this.updater.destroy(),this._textures.forEach(e=>e.unload())}get updating(){return this._loadingCount>0||this._frameTask.updating}acquire(e){let t=this._textures.get(e);return t?(t.ref(),t.loadingPromise??t):this._createNewRef(e)}update(){this.updater.run()&&this.events.emit(`changed`,0)}_createNewRef(e){let t=this._stage.getTexture(e);if(t==null)return null;let n=t.events.on(`unloaded`,()=>{n.remove(),this._onTextureUnloaded(t)}),o=new f(t,()=>{this._frameTask.schedule(()=>{o.isUnreferenced&&t.unload()})});return this._textures.set(e,o),o.ref(),t.loaded?(this._updateGLTexture(o,t.texture),c(t)&&this.updater.add(t),o):(this._loadingCount++,o.loadingPromise=this._stage.schedule(()=>{let e=t.load(this._stage.renderView.renderingContext),n=e=>(this._loadingCount--,o.loadingPromise=null,this._updateGLTexture(o,e),c(t)&&this.updater.add(t),o);return i(e)?e.then(n,e=>(t.unload(),this._loadingCount--,o.loadingPromise=null,a(e)||r.getLogger(this).error(e),null)):n(e)}),o.loadingPromise)}_updateGLTexture(e,t){e.texture=t,this.events.emit(`changed`,1)}_onTextureUnloaded(e){this._textures.delete(e.id),this.updater.remove(e)}};e([o()],d.prototype,`_loadingCount`,void 0),e([o()],d.prototype,`_frameTask`,void 0),e([o()],d.prototype,`updating`,null),d=e([s(`esri.views.3d.webgl-engine.lib.TextureRepository`)],d);class f{constructor(e,t){this._texture=e,this._release=t,this._refCount=0}get id(){return this._texture.id}get isUnreferenced(){return this._refCount===0}ref(){++this._refCount}release(){--this._refCount,this._refCount>0||(this._refCount===0?this._release():(r.getLogger(`esri.views.3d.webgl-engine.lib.TextureRepository.RefCountedTextureImpl`).error(`Cannot dereference texture that has no references!`),this._refCount=0))}unload(){this._texture.unload()}}export{d as TextureRepository};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{clamp as e}from"../../../../core/mathUtils.js";import{estimateNumberArrayMemory as t}from"../../../../core/memoryEstimations.js";import{isFloat32Array as n}from"../../../../core/typedArrayUtil.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as i,copy as a,nan as o,fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as
|
|
2
|
+
import{clamp as e}from"../../../../core/mathUtils.js";import{estimateNumberArrayMemory as t}from"../../../../core/memoryEstimations.js";import{isFloat32Array as n}from"../../../../core/typedArrayUtil.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as i,copy as a,nan as o,fromValues as s,empty as c}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as l}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as u}from"../../../../geometry/support/FloatArray.js";import{intersectsTransformedAabb as d}from"../../../../geometry/support/frustumPlanes.js";import{newContinuousIndexArray as f}from"../../../../geometry/support/Indices.js";import{createPositionReader as p}from"./PositionReader.js";import{MeshIntersectionOptions as m,intersectRayTriangles as h}from"./RayIntersections.js";import{forEachTriangleRangeScreenPolygonHit as g}from"./screenPolygonTriangleIntersections.js";const _=1e-6;class v{constructor(t,n,i){this.globalTriangleVertexIndices=t,this.numTriangles=n,this.positions=i,this._rayDirection=r(),this._callback=T,this._intersectionOptions=w,this._screenPolygonCallback=E,this._screenPolygonDisplacement=null,this._screenPolygonIntersector=null,this._screenPolygonQuery=null,this._screenPolygonTransformation=null,this.bspNodeTree=[],this.triangleIndexMap=f(n),this._readPosition=p(i.data,t,i.stride);let{triangleAABBs:a,rootAabb:o}=S(t,n,i.data,i.stride);if(this._rootAabb=o,n<=40)return;let s=e(Math.log2(n/40),2,10),c=(e,t,n,r)=>{let i=t-e,{axis:o,midValue:l}=x(r),u=b(this.triangleIndexMap,a,e,t,o,l),d=(e,t,r)=>{if(n>s)return;let a=t-e;if(!(a<=40)&&!(a>=.8*i))return c(e,t,n+1,r)},{leftAabb:f,middleAabb:p,rightAabb:m}=u,h=new y(f,p,m,o,l,u.next,u.mid);return this.bspNodeTree.push(h),h.leftNode=d(e,u.next,f),h.rightNode=d(u.mid,t,m),h};c(0,n,0,this._rootAabb)}intersectRayTriangleRange(e,t){if(e>=t)return;let{data:n,stride:r}=this.positions;h(this._rayFrom,this._rayDirection,e,t,this.globalTriangleVertexIndices,n,r,this._intersectionOptions.normalRequired,this._callback,this.triangleIndexMap),v.numFacesTested+=t-e}forEachScreenPolygonHit(e,t,n,r,i){e.camera!=null&&(this._screenPolygonIntersector=e,this._screenPolygonTransformation=t,this._screenPolygonQuery=n,this._screenPolygonDisplacement=r,this._screenPolygonCallback=i,this._intersectScreenPolygonBSP(this.bspNodeTree[0],0,this.triangleIndexMap.length),this._screenPolygonCallback=E,this._screenPolygonDisplacement=null,this._screenPolygonQuery=null,this._screenPolygonTransformation=null,this._screenPolygonIntersector=null)}intersectRay(e,t,n,r){v.numFacesTested=0;let i=e,a=t,o=a[0]-i[0],s=a[1]-i[1],c=a[2]-i[2];if(o*o+s*s+c*c<_)return;this._rayFrom=i;let l=this._rayDirection;l[0]=o,l[1]=s,l[2]=c;let u=this.triangleIndexMap.length;this._callback=r,this._intersectionOptions=n;let d=this.bspNodeTree[0];d===void 0?C(this._rootAabb,i,l)&&this.intersectRayTriangleRange(0,u):this.intersectRayBSP(d,0,u),this._callback=T,this._intersectionOptions=w}intersectRayBSP(e,t,n){let r=this._rayFrom,i=this._rayDirection;this._traverseBSP(e,t,n,e=>C(e,r,i),e=>{let t=e.axis;return r[t]<e.d||i[t]<0},e=>{let t=e.axis;return r[t]>e.d||i[t]>0},(e,t)=>this.intersectRayTriangleRange(e,t))}_intersectScreenPolygonTriangleRange(e,t){if(e>=t)return;let n=this._screenPolygonIntersector,r=this._screenPolygonQuery;if(n!=null&&r!=null)for(let i of g(n,this._screenPolygonTransformation,r,e,t,this._readPosition,this._screenPolygonDisplacement,this.triangleIndexMap))this._screenPolygonCallback(i.distance,i.primitiveIndex,i.point)}_intersectScreenPolygonBSP(e,t,n){let r=this._screenPolygonIntersector,i=this._screenPolygonQuery;r?.camera!=null&&i!=null&&(e===void 0?this._nodeIntersectsScreenPolygonBroadPhase(this._rootAabb)&&this._intersectScreenPolygonTriangleRange(t,n):this._traverseBSP(e,t,n,e=>this._nodeIntersectsScreenPolygonBroadPhase(e),()=>!0,()=>!0,(e,t)=>this._intersectScreenPolygonTriangleRange(e,t)))}_traverseBSP(e,t,n,r,i,a,o){if(!r(this._rootAabb))return;let s=[{node:e,rangeStart:t,rangeEnd:n}];for(;s.length>0;){let{node:e,rangeStart:t,rangeEnd:n}=s.pop();i(e)&&this._traverseBSPRange(s,e.leftNode,e.leftAabb,t,e.midStartIndex,r,o),e.midStartIndex<e.rightStartIndex&&r(e.middleAabb)&&o(e.midStartIndex,e.rightStartIndex),a(e)&&this._traverseBSPRange(s,e.rightNode,e.rightAabb,e.rightStartIndex,n,r,o)}}_traverseBSPRange(e,t,n,r,i,a,o){r>=i||!a(n)||(t===void 0?o(r,i):e.push({node:t,rangeStart:r,rangeEnd:i}))}_nodeIntersectsScreenPolygonBroadPhase(e){let t=this._screenPolygonQuery;if(t==null)return!1;let n=this._screenPolygonDisplacement,r=n?n.applyToAabb(a(D,e)):e;return d(t.broadPhaseFrustum,r,this._screenPolygonTransformation)}static{this.numFacesTested=0}get estimatedMemoryUsage(){return t(this.triangleIndexMap)}}class y{constructor(e,t,n,r,i,a,o){this.leftAabb=e,this.middleAabb=t,this.rightAabb=n,this.axis=r,this.d=i,this.midStartIndex=a,this.rightStartIndex=o}}function b(e,t,n,r,i,a){let s=i+3,l=c(),u=c(),d=c(),f=n,p=n,m=r;for(;p<m;){let n=e[p],r=n*6,o=t[r+s],c;o<=a?(c=l,e[p]=e[f],e[f]=n,++f,++p):t[r+i]>=a?(c=d,--m,e[p]=e[m],e[m]=n):(c=u,++p),c[0]=Math.min(c[0],t[r]),c[1]=Math.min(c[1],t[r+1]),c[2]=Math.min(c[2],t[r+2]),c[3]=Math.max(c[3],t[r+3]),c[4]=Math.max(c[4],t[r+4]),c[5]=Math.max(c[5],t[r+5])}return{next:f,mid:m,leftAabb:n<f?l:o,middleAabb:f<m?u:o,rightAabb:m<r?d:o}}function x(e){let t=e[3]-e[0],n=e[4]-e[1],r=e[5]-e[2],i=t>n?t>r?0:n>r?1:2:n>r?1:r>t?2:0;return{axis:i,midValue:(e[i]+e[i+3])/2}}function S(e,t,r,i){let a=n(r)?u(t*6,!0):l(t*6),c=1/0,d=1/0,f=1/0,p=-1/0,m=-1/0,h=-1/0;for(let n=0;n<t;++n){let t=3*n,o=e[t]*i,s=e[t+1]*i,l=e[t+2]*i,u=Math.min(r[o],r[s],r[l]),g=Math.min(r[o+1],r[s+1],r[l+1]),_=Math.min(r[o+2],r[s+2],r[l+2]),v=Math.max(r[o],r[s],r[l]),y=Math.max(r[o+1],r[s+1],r[l+1]),b=Math.max(r[o+2],r[s+2],r[l+2]),x=n*6;a[x]=u,a[x+1]=g,a[x+2]=_,a[x+3]=v,a[x+4]=y,a[x+5]=b,c=Math.min(c,u),d=Math.min(d,g),f=Math.min(f,_),p=Math.max(p,v),m=Math.max(m,y),h=Math.max(h,b)}return{triangleAABBs:a,rootAabb:t>0?s(c,d,f,p,m,h):o}}function C(e,t,n){let r=t,i=n,a=0,o=1/0;for(let t=0;t<3;++t){{let n=e[t];if(r[t]<n){if(i[t]<=_)return!1;let e=(n-r[t])/i[t];a=Math.max(a,e)}else if(i[t]<=-1e-6){let e=(n-r[t])/i[t];o=Math.min(o,e)}if(a>o)return!1}{let n=e[t+3];if(r[t]>n){if(i[t]>=-1e-6)return!1;let e=(n-r[t])/i[t];a=Math.max(a,e)}else if(i[t]>=_){let e=(n-r[t])/i[t];o=Math.min(o,e)}if(a>o)return!1}}return!0}const w=new m,T=()=>{},E=()=>{},D=i();export{v as TriangleIntersectionData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{set as e,scale as t,add as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as r,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ZEROS as a,fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as s,scale as c}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as l}from"../../../../geometry/support/buffer/BufferView.js";import{isColorOrOLID as u,isDepth as d,is2DGeometryOutput as f}from"../core/shaderLibrary/ShaderOutput.js";import p from"../lib/GLMaterial.js";import{intersectTriangleGeometry as m}from"../lib/RayIntersections.js";import{intersectTriangleGeometryWithScreenPolygon as h}from"../lib/screenPolygonTriangleIntersections.js";import{assert as g}from"../lib/Util.js";import{applyPolygonOffsetToHit as _,intersectWithPolygonOffset as v}from"./intersectWithPolygonOffset.js";import{TriangleMaterial as y}from"./TriangleMaterial.js";import{VisualVariablePassParameters as b}from"./VisualVariablePassParameters.js";import{writeAttributes as x,writePosition as S}from"./internal/bufferWriterUtils.js";import{getLayout as C,ColorMaterialTechnique as w}from"../shaders/ColorMaterialTechnique.js";import{ColorMaterialTechniqueConfiguration as T}from"../shaders/ColorMaterialTechniqueConfiguration.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class D extends y{constructor(e){super(e,k),this._configuration=new T,this.supportsEdges=!0,this._pp0=r(0,0,1),this._pp1=r(0,0,0),this.produces=new Map([[2,e=>this._isOpaqueMaterialPass(e)],[3,e=>!this.parameters.shadingEnabled&&this._isOpaqueNoSSAODepthPass(e)],[4,e=>u(e)&&this.transparent&&this.parameters.writeDepth],[5,e=>!this.parameters.shadingEnabled&&d(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>u(e)&&this.transparent&&!this.parameters.writeDepth],[18,e=>f(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasOccludees=e.hasOccludees,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.draped=this.parameters.draped,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.emissionSource=+!!this.emissions}get visible(){return this.parameters.color[3]>=E}get transparent(){return this.parameters.color[3]<1||this.parameters.forceTransparentMode}get emissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}intersectRay(e,t,n,r,i,a){if(!this.parameters.screenSizeEnabled)return super.intersectRay(e,t,n,r,i,a);this._intersectScreenSizeRay(e,n,r,i,a)}intersectRayDraped(e,t,n,r){if(!this.parameters.screenSizeEnabled)return super.intersectRayDraped(e,t,n,r);this._pp0[0]=this._pp1[0]=n[0],this._pp0[1]=this._pp1[1]=n[1],this._intersectScreenSizeRay(e,t,this._pp0,this._pp1,r)}intersectScreenPolygon(e,t,n,r){return this.parameters.screenSizeEnabled?_(h(e,n,t,r,this._createScreenSizeVertexDisplacement(e,n)),this._configuration,n.camera
|
|
2
|
+
import{set as e,scale as t,add as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as r,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ZEROS as a,fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as s,scale as c}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as l}from"../../../../geometry/support/buffer/BufferView.js";import{isColorOrOLID as u,isDepth as d,is2DGeometryOutput as f}from"../core/shaderLibrary/ShaderOutput.js";import p from"../lib/GLMaterial.js";import{intersectTriangleGeometry as m}from"../lib/RayIntersections.js";import{intersectTriangleGeometryWithScreenPolygon as h}from"../lib/screenPolygonTriangleIntersections.js";import{assert as g}from"../lib/Util.js";import{applyPolygonOffsetToHit as _,intersectWithPolygonOffset as v}from"./intersectWithPolygonOffset.js";import{TriangleMaterial as y}from"./TriangleMaterial.js";import{VisualVariablePassParameters as b}from"./VisualVariablePassParameters.js";import{writeAttributes as x,writePosition as S}from"./internal/bufferWriterUtils.js";import{getLayout as C,ColorMaterialTechnique as w}from"../shaders/ColorMaterialTechnique.js";import{ColorMaterialTechniqueConfiguration as T}from"../shaders/ColorMaterialTechniqueConfiguration.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class D extends y{constructor(e){super(e,k),this._configuration=new T,this.supportsEdges=!0,this._pp0=r(0,0,1),this._pp1=r(0,0,0),this.produces=new Map([[2,e=>this._isOpaqueMaterialPass(e)],[3,e=>!this.parameters.shadingEnabled&&this._isOpaqueNoSSAODepthPass(e)],[4,e=>u(e)&&this.transparent&&this.parameters.writeDepth],[5,e=>!this.parameters.shadingEnabled&&d(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>u(e)&&this.transparent&&!this.parameters.writeDepth],[18,e=>f(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasOccludees=e.hasOccludees,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.draped=this.parameters.draped,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.emissionSource=+!!this.emissions}get visible(){return this.parameters.color[3]>=E}get transparent(){return this.parameters.color[3]<1||this.parameters.forceTransparentMode}get emissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}intersectRay(e,t,n,r,i,a){if(!this.parameters.screenSizeEnabled)return super.intersectRay(e,t,n,r,i,a);this._intersectScreenSizeRay(e,n,r,i,a)}intersectRayDraped(e,t,n,r){if(!this.parameters.screenSizeEnabled)return super.intersectRayDraped(e,t,n,r);this._pp0[0]=this._pp1[0]=n[0],this._pp0[1]=this._pp1[1]=n[1],this._intersectScreenSizeRay(e,t,this._pp0,this._pp1,r)}intersectScreenPolygon(e,t,n,r){return this.parameters.screenSizeEnabled?_(h(e,n,t,r,this._createScreenSizeVertexDisplacement(e,n)),this._configuration,n.camera):super.intersectScreenPolygon(e,t,n,r)}_intersectScreenSizeRay(e,t,n,r,i){m(e,t,n,r,this._createScreenSizeVertexDisplacement(e,t),v(i,this._configuration,t.camera,n,r))}_createScreenSizeVertexDisplacement(r,i){let a=r.attributes.get(`offset`).data;return{applyToVertex:(r,o,s,c,l)=>{let u=e(j,a[l*3],a[l*3+1],a[l*3+2]);e(r,o,s,c);let d=this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(u)??1);return t(u,u,d),n(r,r,u),r},applyToAabb:e=>{let t=s(e,j);return c(e,this.parameters.screenSizeScale*(i.camera?.computeScreenPixelSizeAt(t)??1))}}}_isOpaqueMaterialPass(e){return e===10||u(e)&&!this.transparent}_isOpaqueNoSSAODepthPass(e){return d(e)&&this.parameters.writeDepth&&!this.transparent}createGLMaterial(e){return new O(e)}createBufferWriter(){return new A(C(this.parameters))}}class O extends p{beginSlot(e){return this.getTechnique(w,e)}}class k extends b{constructor(){super(...arguments),this.color=a,this.shadingTint=o(0,0,0,.25),this.forceTransparentMode=!1,this.writeDepth=!0,this.hasVertexColors=!1,this.polygonOffset=0,this.hasSlicePlane=!1,this.cullFace=0,this.draped=!1,this.shadingEnabled=!1,this.screenSizeEnabled=!1,this.screenSizeScale=14,this.useIndexing=!1}}class A{constructor(e){this.layout=e}elementCount(e){return e.get(`position`).indices.length}write(e,t,n,r){if(r==null)return;x(n,this.layout,e,t,r);let i=r.buffer.getField(`offset`,l);if(i&&n.has(`offset`)){let e=n.get(`offset`);g(e.size===3),S(e,t,i,r.offset)}}}const j=i();export{D as ColorMaterial,k as Parameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{exactEquals as e,subtract as t,add as n,set as r,copy as i,normalize as a,length as o,scale as s,dot as c,transformMat3 as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as u,create as d,fromValues as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{setMin as p,getMin as m,setMax as h,getMax as g}from"../../../../geometry/support/aaBoundingBox.js";import{is3DGeometryOrShadowLike as _
|
|
2
|
+
import{exactEquals as e,subtract as t,add as n,set as r,copy as i,normalize as a,length as o,scale as s,dot as c,transformMat3 as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as u,create as d,fromValues as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{setMin as p,getMin as m,setMax as h,getMax as g}from"../../../../geometry/support/aaBoundingBox.js";import{is3DGeometryOrShadowLike as _}from"../core/shaderLibrary/ShaderOutput.js";import{GLTextureMaterial as v}from"../lib/GLTextureMaterial.js";import{Material as y}from"../lib/Material.js";import{intersectTriangleGeometry as b}from"../lib/RayIntersections.js";import{intersectTriangleGeometryWithScreenPolygon as x}from"../lib/screenPolygonTriangleIntersections.js";import{getVerticalOffsetObject3D as S}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as C}from"./DefaultBufferWriter.js";import{intersectWithPolygonOffset as w,applyPolygonOffsetToHit as T}from"./intersectWithPolygonOffset.js";import{verticalOffsetAtDistance as E}from"./internal/MaterialUtil.js";import{getLayout as D,usesVertexTangents as O,DefaultMaterialPassParameters as k,DefaultMaterialTechnique as A}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as j}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as M}from"../shaders/RealisticTreeTechnique.js";import{configureShadedMaterial as N}from"../shaders/ShadedMaterialConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class F extends y{constructor(e,t){super(e,L),this.materialType=`default`,this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>_(e)&&!this.transparent],[4,e=>_(e)&&this.transparent]]),this._layout=D(this.parameters),this._configuration=new j(t)}isVisibleForOutput(e){return e===5||e===7||e===6?this.parameters.castShadows:!0}get visible(){let{layerOpacity:e,colorMixMode:t,opacity:n,externalColor:r}=this.parameters,i=t===`replace`?1:n,a=t===`ignore`||isNaN(r[3])?1:r[3];return e*i*a>=P}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,u)}get emissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===0&&this._hasEmissiveBase||this.parameters.emissiveSource===1)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);let{parameters:t,_configuration:n}=this;n.hasNormalTexture=t.hasNormalTexture,n.hasColorTexture=t.hasColorTexture,n.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,n.hasOcclusionTexture=t.hasOcclusionTexture;let{treeRendering:r,doubleSided:i,doubleSidedType:a}=t;n.hasVertexTangents=O(t),n.instanced=t.instanced,n.instancedDoublePrecision=t.instancedDoublePrecision,n.hasVVColor=!!t.vvColor,n.hasVVSize=!!t.vvSize,n.hasVerticalOffset=t.verticalOffset!=null,n.hasScreenSizePerspective=t.screenSizePerspective!=null,n.hasSlicePlane=t.hasSlicePlane,n.alphaDiscardMode=t.textureAlphaMode,n.normalType=r?0:t.normalType,n.transparent=this.transparent,n.enableOITOffset=e.enableOITOffset,n.customDepthTest=t.customDepthTest??0,n.hasOccludees=e.hasOccludees,n.cullFace=t.hasSlicePlane?0:t.cullFace,n.hasModelTransformation=!r&&t.modelTransformation!=null,n.hasVertexColors=t.hasVertexColors,n.hasSymbolColors=t.hasSymbolColors,n.doubleSidedMode=r?2:i&&a===`normal`?1:i&&a===`winding-order`?2:0,n.instancedFeatureAttribute=t.instancedFeatureAttribute,n.instancedColor=t.instancedColor,N(n,e,t),n.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,n.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,n.emissionSource=t.emissionSource,n.offsetBackfaces=!!(this.transparent&&t.offsetTransparentBackfaces),n.snowCover=e.snowCover>0,n.hasColorTextureTransform=!!t.colorTextureTransformMatrix,n.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,n.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,n.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,n.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,n,r,i,a,o){let s=this._getMaterialVerticalOffset(n,r);s!=null&&(i=t(R,i,s),a=t(z,a,s)),o=w(o,this._configuration,r.camera,i,a),b(e,r,i,a,S(r.verticalOffset),o)}intersectScreenPolygon(e,t,n,r){return T(x(e,n,t,r,this._createScreenPolygonVertexDisplacement(t,n)),this._configuration,n.camera)}createGLMaterial(e){return new I(e)}createBufferWriter(){return new C(this._layout)}get transparent(){let{drivenOpacity:e,opacity:t,externalColor:n,layerOpacity:r,texture:i,textureId:a,textureAlphaMode:o,colorMixMode:s}=this.parameters,c=n[3];return e||t<1&&s!==`replace`||c<1&&s!==`ignore`||r<1||(i!=null||a!=null)&&o!==1&&o!==2&&s!==`replace`}_createScreenPolygonVertexDisplacement(e,t){let r=this._getMaterialVerticalOffset(e,t);return r==null?null:{applyToVertex:(e,t,n,i)=>(e[0]=t+r[0],e[1]=n+r[1],e[2]=i+r[2],e),applyToAabb:e=>(p(e,n(G,m(e,G),r)),h(e,n(G,g(e,G),r)),e)}}_getMaterialVerticalOffset(e,n){if(this.parameters.verticalOffset==null)return null;let u=n.camera;r(H,e[12],e[13],e[14]);let d=null;switch(n.viewingMode){case 1:d=a(V,H);break;case 2:d=i(V,B)}let f=t(U,H,u.eye),p=o(f),m=s(f,f,1/p),h=null;this.parameters.screenSizePerspective&&(h=c(d,m));let g=E(u,p,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective,null);return s(d,d,g),l(W,d,n.transform.inverseRotation)}}class I extends v{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});let t=this._material.parameters;this.updateTexture(t.textureId);let n=e.camera.viewInverseTransposeMatrix;return r(t.origin,n[3],n[7],n[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?M:A,e)}}class L extends k{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return this.emissiveTextureId!=null&&this.emissiveSource===0?3:this.emissiveSource===0?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||this.emissionSource===3||this.hasOcclusionTexture}}const R=d(),z=d(),B=f(0,0,1),V=d(),H=d(),U=d(),W=d(),G=d();export{I as DefaultGLMaterial,F as DefaultMaterial,L as DefaultMaterialParameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{BufferViewVec3f as e}from"../../../../geometry/support/buffer/BufferView.js";import{isColor as t,isDepth as n,isColorHighlightOLIDOrDepth as r}from"../core/shaderLibrary/ShaderOutput.js";import i from"../lib/GLMaterial.js";import{LineMaterial as a}from"../lib/LineMaterial.js";import{createVerticesView as o}from"../lib/VerticesView.js";import{VisualVariablePassParameters as s}from"./VisualVariablePassParameters.js";import{writeLineMarkerBuffer as c}from"./internal/lineMarkerBufferUtils.js";import{getLayout as l}from"../shaders/lineMarkerLayouts.js";import{LineMarkerTechnique as u}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as d}from"../shaders/LineMarkerTechniqueConfiguration.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";class p extends a{constructor(e,i){super(e,h),this.produces=new Map([[2,e=>e===10||t(e)&&this.parameters.renderOccluded===8],[3,e=>n(e)],[10,e=>r(e)&&this.parameters.renderOccluded===8],[11,e=>r(e)&&this.parameters.renderOccluded===8],[4,e=>t(e)],[18,e=>t(e)||e===10]]),this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this._configuration=new d(i)}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==0,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.worldSpace=this.parameters.worldSpace&&!this._configuration.draped,this._configuration.hasScreenSizePerspective=this.parameters.screenSizePerspective!=null&&!this._configuration.worldSized}get visible(){return this.parameters.color[3]>=f}get emissions(){return this.parameters.emissiveStrength>0?this.parameters.renderOccluded===8?1:2:0}intersectRay(){}intersectScreenPolygon(){return null}computeAttachmentOrigin(){return!1}createPrimitivePositionReader(t){let n=t.vertex.getField(`position`,e);return(e,t)=>n.getVec(t,e)}createBufferWriter(){return new g(l(this.parameters),this.parameters)}createGLMaterial(e){return new m(e)}}class m extends i{dispose(){super.dispose(),this._markerTextures?.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){let t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(u,e)}}class h extends s{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive=`arrow`,this.markerScale=1,this.placement=`end`,this.cap=0,this.anchor=0,this.hasTip=!1,this.shadingEnabled=!1,this.worldSpace=!1,this.worldSized=!1,this.hideOnShortSegments=!1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.stipplePattern=null,this.markerTexture=null}}class g{constructor(e,t){this.layout=e,this._parameters=t}elementCount(){return this._parameters.placement===`begin-end`?12:6}rebaseBuffers(e,t){t?.buffer.copyFrom(e.vertex,0,t.offset)}write(e,t,n,r){if(r==null)return;let i=n.get(`position`);c({position:o(i,3),normal:n.get(`normal`)?.data,color:n.get(`color`)?.data,size:n.get(`size`)?.data[0],colorFeature:this._parameters.vvColor?n.get(`colorFeatureAttribute`).data[0]:void 0,sizeFeature:this._parameters.vvSize?n.get(`sizeFeatureAttribute`).data[0]:void 0,opacityFeature:this._parameters.vvOpacity?n.get(`opacityFeatureAttribute`).data[0]:void 0},this._parameters,r,e)}}export{p as LineMarkerMaterial,h as Parameters};
|
|
2
|
+
import{BufferViewVec3f as e}from"../../../../geometry/support/buffer/BufferView.js";import{isColor as t,isDepth as n,isColorHighlightOLIDOrDepth as r}from"../core/shaderLibrary/ShaderOutput.js";import i from"../lib/GLMaterial.js";import{LineMaterial as a}from"../lib/LineMaterial.js";import{createVerticesView as o}from"../lib/VerticesView.js";import{VisualVariablePassParameters as s}from"./VisualVariablePassParameters.js";import{writeLineMarkerBuffer as c}from"./internal/lineMarkerBufferUtils.js";import{getLayout as l}from"../shaders/lineMarkerLayouts.js";import{LineMarkerTechnique as u}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as d}from"../shaders/LineMarkerTechniqueConfiguration.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";class p extends a{constructor(e,i){super(e,h),this.produces=new Map([[2,e=>e===10||t(e)&&this.parameters.renderOccluded===8],[3,e=>n(e)],[10,e=>r(e)&&this.parameters.renderOccluded===8],[11,e=>r(e)&&this.parameters.renderOccluded===8],[4,e=>t(e)],[18,e=>t(e)||e===10]]),this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this._configuration=new d(i)}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==0,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.worldSpace=this.parameters.worldSpace&&!this._configuration.draped,this._configuration.hasScreenSizePerspective=this.parameters.screenSizePerspective!=null&&!this._configuration.worldSized}get visible(){return this.parameters.color[3]>=f}get emissions(){return this.parameters.emissiveStrength>0?this.parameters.renderOccluded===8?1:2:0}intersectRay(){}intersectScreenPolygon(){return null}computeAttachmentOrigin(){return!1}createPrimitivePositionReader(t){let n=t.vertex.getField(`position`,e);return(e,t)=>n.getVec(t,e)}createBufferWriter(){return new g(l(this.parameters),this.parameters)}createGLMaterial(e){return new m(e)}}class m extends i{dispose(){super.dispose(),this._markerTextures?.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){let t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(u,e)}}class h extends s{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive=`arrow`,this.markerScale=1,this.placement=`end`,this.cap=0,this.anchor=0,this.hasTip=!1,this.shadingEnabled=!1,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.worldSpace=!1,this.worldSized=!1,this.hideOnShortSegments=!1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.stipplePattern=null,this.markerTexture=null}}class g{constructor(e,t){this.layout=e,this._parameters=t}elementCount(){return this._parameters.placement===`begin-end`?12:6}rebaseBuffers(e,t){t?.buffer.copyFrom(e.vertex,0,t.offset)}write(e,t,n,r){if(r==null)return;let i=n.get(`position`);c({position:o(i,3),normal:n.get(`normal`)?.data,color:n.get(`color`)?.data,size:n.get(`size`)?.data[0],colorFeature:this._parameters.vvColor?n.get(`colorFeatureAttribute`).data[0]:void 0,sizeFeature:this._parameters.vvSize?n.get(`sizeFeatureAttribute`).data[0]:void 0,opacityFeature:this._parameters.vvOpacity?n.get(`opacityFeatureAttribute`).data[0]:void 0},this._parameters,r,e)}}export{p as LineMarkerMaterial,h as Parameters};
|