@arcgis/core 5.0.0-next.1 → 5.0.0-next.11
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/Map.js +1 -1
- package/PopupTemplate.js +1 -1
- package/analysis/ElevationProfileAnalysis.js +1 -1
- package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.js +1 -1
- package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +5 -0
- package/analysis/VolumeMeasurementAnalysis.js +1 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +4 -0
- package/applications/KnowledgeStudio/generalSdkInternalAccess.js +5 -0
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +1 -0
- package/applications/KnowledgeStudio/generalSharedKgUtils.js +1 -1
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +2 -0
- package/applications/KnowledgeStudio/layerInternalAccessUtils.js +1 -1
- package/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/AttributeFilter.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/actions/Top.js +1 -1
- package/arcade/featureset/sources/Empty.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/featureset/support/stats.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{1a713dcc9971e1935401.js → 0030d68d9edf42b4af57.js} +1 -1
- package/assets/esri/core/workers/chunks/00c77f03dd511c6dbff2.js +1 -0
- package/assets/esri/core/workers/chunks/01d460398f3ba6767a37.js +1 -0
- package/assets/esri/core/workers/chunks/0200637e0503556a3b97.js +1 -0
- package/assets/esri/core/workers/chunks/022c854eff2c2c2aed6b.js +1 -0
- package/assets/esri/core/workers/chunks/{14ace5dc4b8984212a57.js → 042cd64e1f4eb326c30f.js} +1 -1
- package/assets/esri/core/workers/chunks/{66db5f77e09d25e33951.js → 063905fbf9a0c6586949.js} +1 -1
- package/assets/esri/core/workers/chunks/06f75c5b6b50934d72a6.js +1 -0
- package/assets/esri/core/workers/chunks/092d72caf3269e696d1c.js +1 -0
- package/assets/esri/core/workers/chunks/{89027f6800e17fab8973.js → 0a5d74414dd02a2fb8e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{3815ffa13e7b439bca6e.js → 0d5212f59e9b62c16164.js} +1 -1
- package/assets/esri/core/workers/chunks/{388482cea4b9fdeaf06e.js → 0f30a9514571c7be9978.js} +1 -1
- package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
- package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{e032f3d2ee19790f8c79.js → 11e96a312f1294d34c50.js} +1 -1
- package/assets/esri/core/workers/chunks/{309c5f69ea06f3081d83.js → 1257c37bf04d39c27b62.js} +1 -1
- package/assets/esri/core/workers/chunks/125e71b0e29d1d132777.js +1 -0
- package/assets/esri/core/workers/chunks/{1e4e7aedf4b779241a02.js → 15c7c10ff9ac63f0e792.js} +1 -1
- package/assets/esri/core/workers/chunks/15f969836d63c7fe2d9d.js +1 -0
- package/assets/esri/core/workers/chunks/18c5d79d5ee1136e0a57.js +1 -0
- package/assets/esri/core/workers/chunks/{f03635ddf56e2ef90e4c.js → 1d06fcae4c2f02fb1c95.js} +1 -1
- package/assets/esri/core/workers/chunks/{651b9144abb1895cc510.js → 1e848d9da1c61a27cf18.js} +1 -1
- package/assets/esri/core/workers/chunks/{8cea114168d849c38b1b.js → 20278683bddc8c2d8136.js} +1 -1
- package/assets/esri/core/workers/chunks/{d84373a6ec94dcfec8c2.js → 24cd7b84cd0f3de4bff2.js} +1 -1
- package/assets/esri/core/workers/chunks/27e6a6c5610007ac6a54.js +1 -0
- package/assets/esri/core/workers/chunks/2857bcb68df874e9aa62.js +1 -0
- package/assets/esri/core/workers/chunks/{94c9d3094c93f7760433.js → 29286234be26680245f6.js} +1 -1
- package/assets/esri/core/workers/chunks/292daac70bb828e4923f.js +1 -0
- package/assets/esri/core/workers/chunks/2ddcf3cea0efe4052618.js +1 -0
- package/assets/esri/core/workers/chunks/2e8a4df83c43f86d7361.js +1 -0
- package/assets/esri/core/workers/chunks/{4f01be74dd26e639330f.js → 2f24017e72d41c259faa.js} +1 -1
- package/assets/esri/core/workers/chunks/2f2e4f81f3daa3fb8527.js +1 -0
- package/assets/esri/core/workers/chunks/30e220f4f843681a4cdd.js +1 -0
- package/assets/esri/core/workers/chunks/3109f0a6914e7be088ed.js +1 -0
- package/assets/esri/core/workers/chunks/{5d3661d1fe46dd29aae9.js → 311b564e44ae637c960d.js} +1 -1
- package/assets/esri/core/workers/chunks/31bb1ee9370c2753ce9d.js +1 -0
- package/assets/esri/core/workers/chunks/329fccd7f5cb8401e0c3.js +1 -0
- package/assets/esri/core/workers/chunks/37c1f155da14de91565a.js +1 -0
- package/assets/esri/core/workers/chunks/37f2ef14399546e697e6.js +1 -0
- package/assets/esri/core/workers/chunks/38ee69125da60464d5a1.js +1 -0
- package/assets/esri/core/workers/chunks/38f6b9288c82dac9a800.js +1 -0
- package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 3ac7562ea90f91a9f30c.js} +1 -1
- package/assets/esri/core/workers/chunks/3b1848713ee25f750242.js +1 -0
- package/assets/esri/core/workers/chunks/4291681d067ebdf86e73.js +1 -0
- package/assets/esri/core/workers/chunks/{e9311386f58f3cb95c22.js → 42a1e71d09e8583a7327.js} +1 -1
- package/assets/esri/core/workers/chunks/442973ff4dda923def62.js +1 -0
- package/assets/esri/core/workers/chunks/443dfe7029ec208f670c.js +1 -0
- package/assets/esri/core/workers/chunks/44f27eac92c5ccc57e12.js +1 -0
- package/assets/esri/core/workers/chunks/4941bfd3aae7f6bdac97.js +1 -0
- package/assets/esri/core/workers/chunks/{b75930d60449eceb0f1c.js → 4baf6f6e7ddedb25f806.js} +1 -1
- package/assets/esri/core/workers/chunks/4bd2cc65f7db0d261543.js +1 -0
- package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
- package/assets/esri/core/workers/chunks/4fbe2a8d742065cbaea3.js +1 -0
- package/assets/esri/core/workers/chunks/4fe4feeb251f2916a339.js +1 -0
- package/assets/esri/core/workers/chunks/509392131ec473d6b988.js +1 -0
- package/assets/esri/core/workers/chunks/{2ea6985da4eb0107bb9d.js → 51ab2acac4ecc1ca9c34.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc4417d1260b717a9385.js → 52282f767bd0e99ddca0.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc06014fb484fc8c697e.js → 53654edd766d9b4ef750.js} +1 -1
- package/assets/esri/core/workers/chunks/55eb6a0f1e4569a65f2a.js +1 -0
- package/assets/esri/core/workers/chunks/{ed8a85efbd90241512bb.js → 588533c3abe876f20f62.js} +1 -1
- package/assets/esri/core/workers/chunks/591e459f9fce34f519ca.js +1 -0
- package/assets/esri/core/workers/chunks/59514624daf188a8030f.js +1 -0
- package/assets/esri/core/workers/chunks/5c09d98b41f71a036e2a.js +1 -0
- package/assets/esri/core/workers/chunks/{72846fb9c87c6642daf0.js → 5e2ce34def5e053913b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7a17927e14f502006b4.js → 5ea0c62016d56990787b.js} +1 -1
- package/assets/esri/core/workers/chunks/605b9643b1baeff16149.js +1 -0
- package/assets/esri/core/workers/chunks/{2ce4a0fe4fae63c43a81.js → 61d970ed75c2c358b1e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a6a96edc892d7060b7d.js → 629127877042ad784ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{00aa85ae6419aad183ea.js → 6293e33f304c4952f88c.js} +1 -1
- package/assets/esri/core/workers/chunks/655beaf83e9845a02334.js +1 -0
- package/assets/esri/core/workers/chunks/664ae441617afe4b17ec.js +1 -0
- package/assets/esri/core/workers/chunks/67f03d042455cd0f7009.js +1 -0
- package/assets/esri/core/workers/chunks/{ec13053af1999701464a.js → 6826fe54562dcdc054d7.js} +1 -1
- package/assets/esri/core/workers/chunks/6cf391b5ed7351601a2a.js +1 -0
- package/assets/esri/core/workers/chunks/{8215015f11221a354273.js → 6d049182bec34a22abcd.js} +1 -1
- package/assets/esri/core/workers/chunks/6d9f2b113d6bde936a04.js +1 -0
- package/assets/esri/core/workers/chunks/{5132ca68e8c7af111a47.js → 6e22b02a9715c10578d0.js} +1 -1
- package/assets/esri/core/workers/chunks/6e25ef5ad6d6b3f88343.js +1 -0
- package/assets/esri/core/workers/chunks/{deb2854bb7d082a26f52.js → 7005d956c990a04ee8b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{c73def15ccfb2a32afa8.js → 7290e7a819eb291b1df2.js} +4 -4
- package/assets/esri/core/workers/chunks/731f7b552dde0fb325cd.js +1 -0
- package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
- package/assets/esri/core/workers/chunks/{24921d31efa8d222ad2d.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/759321045c264bc6964e.js +1 -0
- package/assets/esri/core/workers/chunks/773f2c6c9d38db76dfed.js +1 -0
- package/assets/esri/core/workers/chunks/7803495f8862d9025bcd.js +1 -0
- package/assets/esri/core/workers/chunks/79dbfa2b9b332ca0002f.js +1 -0
- package/assets/esri/core/workers/chunks/7a23ab84e1144f081c92.js +1 -0
- package/assets/esri/core/workers/chunks/7e3f27ebf366d4266350.js +1 -0
- package/assets/esri/core/workers/chunks/826072cfc0ac8e36f03c.js +1 -0
- package/assets/esri/core/workers/chunks/826fa0dfb63df77bfd95.js +1 -0
- package/assets/esri/core/workers/chunks/8372f142c4d7a65c7954.js +1 -0
- package/assets/esri/core/workers/chunks/87921f3fa9001f5801ed.js +1 -0
- package/assets/esri/core/workers/chunks/8cd03b54b2859b52fb81.js +1 -0
- package/assets/esri/core/workers/chunks/{0086a09441627842d34a.js → 8f3503b2fb6cd38757b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{e7638b9ab6674bc8a18f.js → 91dfd29e2dba200eab09.js} +1 -1
- package/assets/esri/core/workers/chunks/{de1f75c907152df7e788.js → 9698f36c143953a975d4.js} +1 -1
- package/assets/esri/core/workers/chunks/9b0c2f4311fe9bca370a.js +1 -0
- package/assets/esri/core/workers/chunks/9c48d8d17831aa57f8a4.js +1 -0
- package/assets/esri/core/workers/chunks/9f28b2800945903bc165.js +1 -0
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/a091623bbfb3d771c8d8.js +1 -0
- package/assets/esri/core/workers/chunks/a27e74117c37f3efcbca.js +1 -0
- package/assets/esri/core/workers/chunks/a41ba05c09a59d1eb35f.js +1 -0
- package/assets/esri/core/workers/chunks/a470f662d73aa8d5d90f.js +1 -0
- package/assets/esri/core/workers/chunks/a93ebd076bc55aa6eab0.js +1 -0
- package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/aaed35a6414859233678.js +1 -0
- package/assets/esri/core/workers/chunks/acd0564ad1544f452f3f.js +1 -0
- package/assets/esri/core/workers/chunks/{135e270b4f03c4270870.js → af47272aaaef0ea57e71.js} +1 -1
- package/assets/esri/core/workers/chunks/b0f43191a431c9de16e5.js +1 -0
- package/assets/esri/core/workers/chunks/b193de09e005b0976a6a.js +1 -0
- package/assets/esri/core/workers/chunks/{bc3bcf88b252760e2574.js → b3028b1ff75eafd0c358.js} +1 -1
- package/assets/esri/core/workers/chunks/b320bb76c7e9998fe53b.js +1 -0
- package/assets/esri/core/workers/chunks/{79968c183135281d2a6f.js → b3613a38178cad2ebc82.js} +1 -1
- package/assets/esri/core/workers/chunks/b6853c6a25eaabc9a7f6.js +1 -0
- package/assets/esri/core/workers/chunks/b8a3f1e60e24a13749c1.js +1 -0
- package/assets/esri/core/workers/chunks/ba4571d2637a74a59552.js +1 -0
- package/assets/esri/core/workers/chunks/bb7976e2f883b544add6.js +1 -0
- package/assets/esri/core/workers/chunks/{56916e56c20465428dd4.js → be3b874f86f627f4fa98.js} +1 -1
- package/assets/esri/core/workers/chunks/c29486c4eeb3e72effff.js +1 -0
- package/assets/esri/core/workers/chunks/{2b94623cabc6ae0f86ce.js → c37f7756d48ff9af2656.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c52999a6392370844a6.js → c4090a60d149a5962179.js} +1 -1
- package/assets/esri/core/workers/chunks/c61c61dac1e8d6188749.js +1 -0
- package/assets/esri/core/workers/chunks/c84caf81bfaa4a8b5aa1.js +1 -0
- package/assets/esri/core/workers/chunks/c8c8cf43fd640d2f5cb1.js +1 -0
- package/assets/esri/core/workers/chunks/{73c1d43070b4fe1e5c1e.js → c8e686efe344a33a0258.js} +1 -1
- package/assets/esri/core/workers/chunks/{6bb5158de43c4b59107f.js → c9b16fd41cd59d452522.js} +1 -1
- package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/d048e4926e78458afa3e.js +1 -0
- package/assets/esri/core/workers/chunks/d07f911d40bf05fc0306.js +1 -0
- package/assets/esri/core/workers/chunks/d1ca7c3a32ce00ed8b81.js +1 -0
- package/assets/esri/core/workers/chunks/{630efe10c871425b6a95.js → d1e97cce5047f1791e22.js} +1 -1
- package/assets/esri/core/workers/chunks/d28670cb11164e318e45.js +1 -0
- package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js → d391bfbaf0e790cd10d6.js} +2 -2
- package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d56ac52a5288e06365e7.js +1 -0
- package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{d570c75a425aa29672c8.js → da24ad57747714ac5eda.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e43c105f1cfc44b7bd0.js → dc51438b832551924a9e.js} +1 -1
- package/assets/esri/core/workers/chunks/dc66490520f97eef15bf.js +316 -0
- package/assets/esri/core/workers/chunks/ddca92e18e96ea1c9d89.js +1 -0
- package/assets/esri/core/workers/chunks/{cfa3164e7fa1884dc2b9.js → ddfd01bb9ba8577c3ffc.js} +1 -1
- package/assets/esri/core/workers/chunks/ded9747ae04ab889d52a.js +1 -0
- package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
- package/assets/esri/core/workers/chunks/df8279e1baf378faf85f.js +1 -0
- package/assets/esri/core/workers/chunks/dff2df259f140b7d97a9.js +1 -0
- package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
- package/assets/esri/core/workers/chunks/e3434f91f47f551d9e02.js +1 -0
- package/assets/esri/core/workers/chunks/{da573ecc68e6aa8f6da9.js → e767f83f9e2de6650f80.js} +1 -1
- package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
- package/assets/esri/core/workers/chunks/{91df8638b8b904e6d8c5.js → ead8d0cbcebd12dbfad7.js} +1 -1
- package/assets/esri/core/workers/chunks/eb6c3dd440ede4adf603.js +1 -0
- package/assets/esri/core/workers/chunks/eb9c166db0db6fa60e95.js +1 -0
- package/assets/esri/core/workers/chunks/edc671b9b83c8e19cb42.js +1 -0
- package/assets/esri/core/workers/chunks/{16d66770ef841564ee3f.js → ee5aa11750c51b220f1e.js} +1 -1
- package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
- package/assets/esri/core/workers/chunks/f141c9f7f0d9b2322bf6.js +1 -0
- package/assets/esri/core/workers/chunks/{5875a51b97ee9bd438a0.js → f34e3fa0c5b28531e289.js} +1 -1
- package/assets/esri/core/workers/chunks/f57401a759f420596b2c.js +1 -0
- package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
- package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{fa4411e0a5ac3fcba365.js → f65c0102af17390a50ac.js} +1 -1
- package/assets/esri/core/workers/chunks/f6c11c8ac687de3ef1ab.js +1 -0
- package/assets/esri/core/workers/chunks/f7a1f48c53422c6e2028.js +1 -0
- package/assets/esri/core/workers/chunks/f7f002ea5ff5fe7f6249.js +1 -0
- package/assets/esri/core/workers/chunks/f80f5dbf96c343ac4df6.js +1 -0
- package/assets/esri/core/workers/chunks/f8e889be4b45f6f0667e.js +1 -0
- package/assets/esri/core/workers/chunks/fbd796c88f07bb6755dc.js +1 -0
- package/assets/esri/core/workers/chunks/fbd8d2f61f8a15bcf3db.js +1 -0
- package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
- package/assets/esri/core/workers/chunks/{2f78861afe0e9037dd8d.js → fe49321dca22dc60d105.js} +1 -1
- package/assets/esri/core/workers/chunks/fec3897ed7e8691387ed.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +17 -18
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +2 -0
- package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
- package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +14 -4
- package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
- 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/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
- package/chunks/ComponentShader.glsl.js +72 -39
- package/chunks/Envelope.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OITBlend.glsl.js +3 -3
- package/chunks/Point2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/bundle.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/densifyOperator.js +1 -1
- package/chunks/differenceOperator.js +1 -1
- package/chunks/intersectsOperator.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/config.js +1 -1
- package/core/Identifiable.js +1 -1
- package/core/MultiOriginJSONSupport.js +1 -1
- package/core/NumericIdentifiable.js +5 -0
- package/core/QueueProcessor.js +1 -1
- package/core/SetUtils.js +1 -1
- package/core/WriteableMultiOriginJSONMixin.js +5 -0
- package/core/dedupeResult.js +5 -0
- package/core/has.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/{views/3d/support/ImageWithType.js → core/performance.js} +1 -1
- package/core/sanitizerUtils.js +1 -1
- package/core/scheduling.js +1 -1
- package/core/unitUtils.js +1 -1
- package/core/workers/Connection.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/core/workers/utils.js +1 -1
- package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
- package/form/FormTemplate.js +1 -1
- package/form/elements/Element.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/form/elements/GroupElement.js +1 -1
- package/geohash/GeohashCell.js +1 -1
- package/geohash/geohashUtils.js +1 -1
- package/geometry/Extent.js +1 -1
- package/geometry/Geometry.js +1 -1
- package/geometry/GeometryCursor.js +1 -1
- package/geometry/Point.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/geometryCursorCollectUtils.js +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/jsonUtils.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/normalizeUtilsSync.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/polygonUtils.js +1 -1
- package/geometry/support/triangulationUtils.js +1 -1
- package/identity/Credential.js +1 -1
- package/identity/IdentityManager.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +2091 -462
- package/intl/date.js +1 -1
- package/intl.d.ts +2 -0
- package/intl.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/OptimizedFeature.js +1 -1
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/centroid.js +1 -1
- package/layers/graphics/contains.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/FeatureStore.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/geometryUtils.js +1 -1
- package/layers/graphics/data/spatialQuerySupport.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.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/support/MemorySourceWorker.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/save/groupLayerUtils.js +1 -1
- package/layers/support/DateTimeFieldFormat.js +1 -1
- package/layers/support/FieldFormat.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/layers/support/NumberFieldFormat.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/RasterInfo.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterSensorInfo.js +1 -1
- package/layers/support/RasterStorageInfo.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/arcgisLayerUrl.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/fieldFormatUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/rasterFieldUtils.js +1 -1
- package/layers/support/rasterFunctions/pixelTransformUtils.js +5 -0
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/support/source/DataLayerSource.js +1 -1
- package/networks/CircuitManager.d.ts +4 -0
- package/networks/UnitIdentifierManager.d.ts +4 -0
- package/networks/support/Circuit.d.ts +4 -0
- package/networks/support/CircuitLocation.d.ts +4 -0
- package/networks/support/CircuitPath.d.ts +4 -0
- package/networks/support/CircuitPathConnectivityElement.d.ts +4 -0
- package/networks/support/CircuitSection.d.ts +4 -0
- package/networks/support/Subcircuit.d.ts +4 -0
- package/package.json +5 -5
- package/popup/ExpressionInfo.js +1 -1
- package/popup/FieldInfo.js +1 -1
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/BarChartMediaInfo.js +1 -1
- package/popup/content/ColumnChartMediaInfo.js +1 -1
- package/popup/content/Content.js +1 -1
- package/popup/content/CustomContent.js +1 -1
- package/popup/content/ExpressionContent.js +1 -1
- package/popup/content/FieldsContent.js +1 -1
- package/popup/content/ImageMediaInfo.js +1 -1
- package/popup/content/LineChartMediaInfo.js +1 -1
- package/popup/content/MediaContent.js +1 -1
- package/popup/content/PieChartMediaInfo.js +1 -1
- package/popup/content/RelationshipContent.js +1 -1
- package/popup/content/TextContent.js +1 -1
- package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
- package/popup/content/mixins/ChartMediaInfo.js +1 -1
- package/popup/content/mixins/MediaInfo.js +1 -1
- package/popup/content.js +1 -1
- package/popup/support/FieldInfoFormat.js +1 -1
- package/processRequest.js +5 -0
- package/request.js +1 -1
- package/requestConfig.js +5 -0
- package/requestQueue.js +5 -0
- package/rest/geometryService/utils.js +1 -1
- package/rest/networks/circuits/support/CircuitTraceResult.d.ts +4 -0
- package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +4 -0
- package/rest/networks/support/TelecomNetworkElement.d.ts +4 -0
- package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +4 -0
- package/rest/print.js +1 -1
- package/rest/query/executeForCount.js +1 -1
- package/rest/query/executeForExtent.js +1 -1
- package/rest/query/executeForIds.js +1 -1
- package/rest/query/executeQueryJSON.js +1 -1
- package/rest/query/executeQueryPBF.js +1 -1
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryZScale.js +1 -1
- package/rest/support/BaseImageMeasureResultValue.js +5 -0
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageMeasureResultAngleValue.js +5 -0
- package/rest/support/ImageMeasureResultAreaValue.js +5 -0
- package/rest/support/ImageMeasureResultLengthValue.js +5 -0
- package/rest/support/ImageWithType.js +5 -0
- package/rest/support/imageMeasureUtils.js +1 -1
- package/rest/versionManagement/getVersionInfos.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/statistics/histogram.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/basemapDefinitions.js +1 -1
- package/support/elevationInfoUtils.js +1 -1
- package/support/requestImageUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/time/TimeExtent.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/2d/GoToManager.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/constraints/RotationConstraint.js +1 -1
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/Mesh2D.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/aggregation/GridCell.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/schema/ExceedsLimitCache.js +5 -0
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/sources/strategies/constants.js +5 -0
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +5 -0
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/glTF/DefaultLoadingContext.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.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/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.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/Labeler.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/PBFPointFeatureSetView.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
- package/views/3d/layers/graphics/pipeline/fetching/Tile3DFetcher.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SDataRequester.js +5 -0
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +5 -0
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/fetchTile.js +1 -1
- package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/flow/FlowWorker.js +1 -1
- package/views/3d/support/flow/StreamlineResources3D.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
- package/views/3d/support/flow/constants.js +1 -1
- package/views/3d/support/flow/geometryUtils.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileOverlayData.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/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js +5 -0
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConstructionContext.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +10 -4
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileLayerUtils.js +5 -0
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/MultipointDrawAction.js +1 -1
- package/views/draw/PointDrawAction.js +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/input/CursorUpdateEvents.js +5 -0
- package/views/draw/input/DrawCompleteEvent.js +5 -0
- package/views/draw/input/VertexAddEvent.js +5 -0
- package/views/draw/input/VertexRemoveEvent.js +5 -0
- package/views/draw/input/VertexUpdateEvent.js +5 -0
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/reshapeUtils.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/CheckpointingEditGeometryOperations.js +5 -0
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/operations/ReplayableAppendVertex.js +5 -0
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/fields/TooltipField.js +1 -1
- package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/Directions/css.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.d.ts +4 -0
- package/widgets/Editor/MergeFeaturesWorkflow.js +5 -0
- package/widgets/Editor/MergeFeaturesWorkflowData.d.ts +4 -0
- package/widgets/Editor/MergeFeaturesWorkflowData.js +5 -0
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/UploadDetails.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/errors.js +5 -0
- package/widgets/Editor/support/mergeFeaturesUtils.js +5 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
- package/widgets/Feature/FeatureFields.js +1 -1
- package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/InputBase.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
- package/widgets/Print.js +1 -1
- package/widgets/Search/LayerSearchSource.js +1 -1
- package/widgets/Sketch/CreateToolVisibilityMap.js +5 -0
- package/widgets/Sketch/SelectionToolVisibilityMap.js +5 -0
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/jsxWidgetSupport.js +1 -1
- package/assets/esri/core/workers/chunks/01642fe19e81bfa33eb5.js +0 -1
- package/assets/esri/core/workers/chunks/039ec0fbe3b4b398b8c6.js +0 -1
- package/assets/esri/core/workers/chunks/0429c1a3690f20647c9f.js +0 -1
- package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
- package/assets/esri/core/workers/chunks/065f2bbcaeef1f13fd48.js +0 -1
- package/assets/esri/core/workers/chunks/0731e588afd1f561ec3b.js +0 -1
- package/assets/esri/core/workers/chunks/09de8be660174a229efb.js +0 -1
- package/assets/esri/core/workers/chunks/0eaa4dccba0d844b9da3.js +0 -1
- package/assets/esri/core/workers/chunks/0f9bb3187306f89e3d63.js +0 -1
- package/assets/esri/core/workers/chunks/1019fa4818624ba292ef.js +0 -1
- package/assets/esri/core/workers/chunks/10fb29ba6f3f81353fbc.js +0 -1
- package/assets/esri/core/workers/chunks/147ad5fdd02f46b6da24.js +0 -1
- package/assets/esri/core/workers/chunks/17103e6542aae53c7301.js +0 -1
- package/assets/esri/core/workers/chunks/188272af9a6470ccfe31.js +0 -1
- package/assets/esri/core/workers/chunks/18da83afbc324fef9fd8.js +0 -316
- package/assets/esri/core/workers/chunks/1a9f544f20f643161a36.js +0 -1
- package/assets/esri/core/workers/chunks/1cfcadaa98ac528fea37.js +0 -1
- package/assets/esri/core/workers/chunks/1db0bf570a04687b3130.js +0 -1
- package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
- package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +0 -2
- package/assets/esri/core/workers/chunks/24c14e4a1d2a2267097e.js +0 -1
- package/assets/esri/core/workers/chunks/25639559336109ff3df1.js +0 -1
- package/assets/esri/core/workers/chunks/2a5f331c0f18d8574b4e.js +0 -1
- package/assets/esri/core/workers/chunks/2a900a632a1231deb713.js +0 -1
- package/assets/esri/core/workers/chunks/31c6e951b99315e8e68a.js +0 -1
- package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
- package/assets/esri/core/workers/chunks/35491fbdd287470d40a4.js +0 -1
- package/assets/esri/core/workers/chunks/36247c6f6fc2891df2cf.js +0 -1
- package/assets/esri/core/workers/chunks/36fe6b8228e622407ec2.js +0 -1
- package/assets/esri/core/workers/chunks/3d22fe2f2c40abbc246e.js +0 -1
- package/assets/esri/core/workers/chunks/3d53307efbc3f07d7bf2.js +0 -1
- package/assets/esri/core/workers/chunks/3d65b8a2fbe1df050a25.js +0 -1
- package/assets/esri/core/workers/chunks/40b81d1c2d53cf598b8e.js +0 -1
- package/assets/esri/core/workers/chunks/42a72e1d963e4636323b.js +0 -1
- package/assets/esri/core/workers/chunks/456161a323be7d640c61.js +0 -1
- package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
- package/assets/esri/core/workers/chunks/4c4227b0ea21a5e429ab.js +0 -1
- package/assets/esri/core/workers/chunks/4eebd74ebc20579dade8.js +0 -1
- package/assets/esri/core/workers/chunks/500d09d2191127371081.js +0 -1
- package/assets/esri/core/workers/chunks/50864c1924030e62497d.js +0 -1
- package/assets/esri/core/workers/chunks/5707713c2f27588b9194.js +0 -1
- package/assets/esri/core/workers/chunks/5713f96bade5ebb54c81.js +0 -1
- package/assets/esri/core/workers/chunks/5718cf135e105e1e026b.js +0 -1
- package/assets/esri/core/workers/chunks/5c585b338a9e9aa0e205.js +0 -1
- package/assets/esri/core/workers/chunks/5d1d909354c90cb8eb60.js +0 -1
- package/assets/esri/core/workers/chunks/5ea03f53d4d64d9e7cae.js +0 -1
- package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
- package/assets/esri/core/workers/chunks/620a94b54be3ed78350d.js +0 -1
- package/assets/esri/core/workers/chunks/63019a7eb5222dc5e420.js +0 -1
- package/assets/esri/core/workers/chunks/64629ddcf008349eaf41.js +0 -1
- package/assets/esri/core/workers/chunks/64ee8d2acae2d6fce608.js +0 -1
- package/assets/esri/core/workers/chunks/650c94c0e8ab9721015e.js +0 -1
- package/assets/esri/core/workers/chunks/67f305b0c72e77a6331a.js +0 -1
- package/assets/esri/core/workers/chunks/6e5b3bbee054d072b594.js +0 -1
- package/assets/esri/core/workers/chunks/6f4bd0ee85e7e5a74340.js +0 -1
- package/assets/esri/core/workers/chunks/72ecf49d03bb24bf0998.js +0 -1
- package/assets/esri/core/workers/chunks/7421f9575487cdc9e28e.js +0 -1
- package/assets/esri/core/workers/chunks/77a11d7d53325d108ed8.js +0 -1
- package/assets/esri/core/workers/chunks/7c5c272612198db83851.js +0 -1
- package/assets/esri/core/workers/chunks/7d9882ddfa6495f72baa.js +0 -1
- package/assets/esri/core/workers/chunks/7fffad8ff6878fa1fd56.js +0 -1
- package/assets/esri/core/workers/chunks/81bbe5251ed13c0d91cc.js +0 -1
- package/assets/esri/core/workers/chunks/85622fe99f4d08afe875.js +0 -1
- package/assets/esri/core/workers/chunks/8b16aa50d879b92a5375.js +0 -1
- package/assets/esri/core/workers/chunks/8bc64fc7c4b9eb8fca4d.js +0 -1
- package/assets/esri/core/workers/chunks/8eefa133c36a004c054c.js +0 -1
- package/assets/esri/core/workers/chunks/91afee11072471e4eefe.js +0 -1
- package/assets/esri/core/workers/chunks/929ece362604dc301229.js +0 -1
- package/assets/esri/core/workers/chunks/9834bc11586a2d8d6f35.js +0 -1
- package/assets/esri/core/workers/chunks/9a723d739ac44b45432c.js +0 -1
- package/assets/esri/core/workers/chunks/9c6fc4fe2c46f40d63d9.js +0 -1
- package/assets/esri/core/workers/chunks/a5a67216e0d0cee95a55.js +0 -1
- package/assets/esri/core/workers/chunks/a5f25104938ab33e7a85.js +0 -1
- package/assets/esri/core/workers/chunks/a7bd294996e6c8b8354a.js +0 -1
- package/assets/esri/core/workers/chunks/a87521ebe632bf783ef4.js +0 -1
- package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
- package/assets/esri/core/workers/chunks/abf4f018c692c18c3320.js +0 -1
- package/assets/esri/core/workers/chunks/ae6066ea6cb373dc6db3.js +0 -1
- package/assets/esri/core/workers/chunks/b0b2670596d6d8c32b5e.js +0 -1
- package/assets/esri/core/workers/chunks/b1f667006cba60ef4aa7.js +0 -1
- package/assets/esri/core/workers/chunks/b2add7338258ca7c24dd.js +0 -1
- package/assets/esri/core/workers/chunks/b2d9f4e057af26a538fb.js +0 -1
- package/assets/esri/core/workers/chunks/b62807c6fcfb70a87cd4.js +0 -1
- package/assets/esri/core/workers/chunks/b8339c1d60847a9eed3e.js +0 -1
- package/assets/esri/core/workers/chunks/bc6619307f312f9241bf.js +0 -1
- package/assets/esri/core/workers/chunks/bfc1e8aec7aace3ff30e.js +0 -1
- package/assets/esri/core/workers/chunks/c0feec6e2f0e45900ae0.js +0 -1
- package/assets/esri/core/workers/chunks/c362fbbafec91c44eeb2.js +0 -1
- package/assets/esri/core/workers/chunks/c368a8e8d2f1535af446.js +0 -1
- package/assets/esri/core/workers/chunks/c55c096669677321a227.js +0 -1
- package/assets/esri/core/workers/chunks/c7a3a44cca5a7d52cca9.js +0 -1
- package/assets/esri/core/workers/chunks/c941d15190fc08523d0d.js +0 -1
- package/assets/esri/core/workers/chunks/cc70a4a915b0b2ccb2a0.js +0 -1
- package/assets/esri/core/workers/chunks/d121045cddbe55c2ecb2.js +0 -1
- package/assets/esri/core/workers/chunks/d2120a623b1bd91b9ed9.js +0 -1
- package/assets/esri/core/workers/chunks/d466f3f0d3824c77da7c.js +0 -1
- package/assets/esri/core/workers/chunks/d48af7bc06b4bb176534.js +0 -1
- package/assets/esri/core/workers/chunks/d78c2833cdc4730a88a3.js +0 -1
- package/assets/esri/core/workers/chunks/dabc5a38a472c9719df9.js +0 -1
- package/assets/esri/core/workers/chunks/dc31865edea480f0ebba.js +0 -1
- package/assets/esri/core/workers/chunks/df438b62702007267798.js +0 -1
- package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
- package/assets/esri/core/workers/chunks/e6fc278e2390d2787345.js +0 -1
- package/assets/esri/core/workers/chunks/f4eb090bcc3eca64306a.js +0 -1
- package/assets/esri/core/workers/chunks/f7846523adacbfe5047e.js +0 -1
- package/assets/esri/core/workers/chunks/f839b86bee15deaf84e4.js +0 -1
- package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +0 -1
- package/assets/esri/core/workers/chunks/fa5c87889c2f0bef896b.js +0 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +0 -5
- package/views/3d/layers/i3s/I3SStreamDataController.js +0 -5
- package/views/3d/support/StreamDataLoader.js +0 -5
- package/views/3d/support/StreamDataRequester.js +0 -5
- package/views/3d/support/downloadSlots.js +0 -5
- package/views/draw/input/DrawEvents.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";import{clone as t}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as e}from"../../../../core/unitUtils.js";import{e as r}from"../../../../chunks/earcut.js";import{normalFromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as n,invertOrIdentity as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as l,t as c,a as p,i as m,n as h,d as u,e as d}from"../../../../chunks/vec32.js";import{ONES as g,create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as y}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as b,fromBuffer as _,intersectsClippingArea as x}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as j}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as S,getZeroIndexArray as P}from"../../../../geometry/support/Indices.js";import{t as v}from"../../../../chunks/vec3.js";import{makeVertexCandidate as C,makeEdgeCandidate as w}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as E}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as A,SampleElevationInfo as D}from"./elevationAlignmentUtils.js";import{Object3DEdgeState as I,Graphics3DObject3DGraphicLayer as U}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as L}from"./Graphics3DSymbolLayer.js";import{computeCentroid as z}from"./graphicUtils.js";import{geometryAsPolygon as M}from"./polygonUtils.js";import{createMaterial as O}from"../support/edgeUtils.js";import{encodeNaNUInt8 as G}from"../support/symbolColorUtils.js";import{debugFlags as V}from"../../support/debugFlags.js";import{SamplePosition as T}from"../../support/ElevationProvider.js";import{geometryToRenderInfo as B}from"../../support/renderInfoUtils/polygon.js";import{Attribute as R}from"../../webgl-engine/lib/Attribute.js";import{Geometry as F}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as H}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as k,compressNormal as N}from"../../webgl-engine/lib/Normals.js";import{Object3D as W}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as q}from"../../webgl-engine/materials/DefaultMaterial.js";const Z=["polygon","extent"];class J extends L{constructor(t,e,r,s){super(t,e,r,s,pt(e)),this.ensureDrapedStatus(!1)}async doLoad(){const t=this.symbolLayer,e=t?.material,r=this.symbolLayer.material?.color?.a,s=this.needsDrivenTransparentPass||null!=r&&1!==r,o=e?.emissive,n=!this._hasDrivenColorOrOpacity&&(null==r||0===r),i={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,ambient:g,diffuse:g,opacity:n?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:s,hasSymbolColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:t.castShadows,emissiveStrength:o?.strength??0,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},a=new q(i,this._context),l=new q({...i,cullFace:2},this._context);this._materials[0]=a,this._materials[1]=l,this._updateTransparentDepedentMaterialParameters()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(t){const e=t.graphic;if(!this._validateGeometry(e.geometry,Z,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(t.renderingInfo,this._materialColor,!1);G(r,r);const s=this.createElevationContextForGraphic(e);return this._createAs3DShape(e,t.renderingInfo,r,s,e.uid)}layerOpacityChanged(t,e){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),t?.forEach(t=>e(t)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(t,e){return this.updateGraphics3DGraphicElevationInfo(t,e,A)}slicePlaneEnabledChanged(t,e){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),t?.forEach(t=>{const r=e(t);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const t={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(t),this._materials[1]?.setParameters(t),!0}_getExtrusionSize(t){let e;return e=t.size&&this._drivenProperties.size?E(t.size,2)??0:this._getSymbolSize(),e/=this._context.renderCoordsHelper.unitInMeters,e}applyRendererDiff(t,e){return this._drivenPropertiesChanged(e)?0:1}async queryForSnapping(r,s,o,n){const i=this._getExtrusionSize(o)*this._context.renderCoordsHelper.unitInMeters/e(s),{objectId:a,target:l}=r,c=t(l);switch(c.z=(c.z??0)+i,r.type){case"edge":{const{start:e,end:s}=r,o=t(e),n=t(s);return o.z=(o.z??0)+i,n.z=(n.z??0)+i,[w(a,c,1/0,o,n)]}case"vertex":return[C(a,c,1/0),w(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(t,e,i,l,c){const p=M(t.geometry);if(null==p)return null;if(0===p.rings.length||!p.rings.some(t=>t.length>0))return this._logGeometryValidationWarnings(p.rings,"rings","ExtrudeSymbol3DLayer"),null;const m=B(p,this._context.elevationProvider,this._context.renderCoordsHelper,l);this._logGeometryCreationWarnings(m,p.rings,"rings","ExtrudeSymbol3DLayer");const h=z(p);if(null==h)return null;const u=new Array,d=new Array,g=b(),P=a(),C=f(),w=1===this._context.renderCoordsHelper.viewingMode;w||this._context.renderCoordsHelper.worldUpAtPosition(null,C),y(p.spatialReference,[h.x,h.y,0],P,this._context.renderCoordsHelper.spatialReference);const E=a();n(E,P);const D=o();s(D,E);const{polygons:L,mapPositions:G,position:V}=m,T=new Map,R=this._materials[0];for(const s of L){const t=s.count;if(this._context.clippingExtent&&(_(s.mapPositions,g),!x(g,this._context.clippingExtent)))continue;const o=r(s.mapPositions,s.holeIndices,3);if(0===o.length)continue;const n=o.length,a=6*t,l=S(a+n),p=S(n),m=j(3*a),h=j(3*a),f=j(3*a),y=j(a);Q(V,G,o,s,m,f,h,y,l,p,this._getExtrusionSize(e),C,w),v(m,m,E);const b=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:this._context.layerViewUid}),A=new jt(m,f,k(h),y),D=K(R,l,l.length-p.length,A,i,b),I=t,U=t,L=2*s.count,z=new St(I,U,L,n/3);ct(D,z,P),T.set(D,z),u.push(D,K(this._materials[1],p,0,A,i,b)),d.push(A.heights)}if(0===u.length)return null;const F=new W({geometries:u,layerViewUid:this._context.layerViewUid,graphicUid:c,isElevationSource:!0});F.transformation=P;const H=O(this.symbolLayer,{opacity:this._getLayerOpacity()}),N=H?new I(this._materials[0],H,this._context.slicePlaneEnabled):null,q=new U(this,F,null,(t,e,r,s,o)=>lt(t,e,r,s,o,d,T),l,N);return q.alignedSampledElevation=m.sampledElevation,q.needsElevationUpdates=A(l.mode),q}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const t=this._materials[0];t&&t.setParameters({cullFace:t.transparent?0:2})}}function K(t,e,r,s,o,n){const i=P(e.length),a=[["position",new R(s.positions,e,3,!0)],["normalCompressed",new R(s.normals,e,2,!0)],["symbolColor",new R(o,i,4,!0)]];return new F(t,a,s.elevation,0,n,r)}function Q(t,e,r,s,o,n,i,a,l,c,p,m,h){const u=r.length/3;let d=2*s.count;X(t,e,s.index,s.count,r,0,u,o,n,i,a,l,c,d,p,m,h);let g=0,f=2*s.count;d=0;const y=s.pathLengths[0];tt(o,n,a,i,g,y,s.count,f,l,d,p),f+=4*y,d+=2*y,g+=y;for(let b=1;b<s.pathLengths.length;++b){const t=s.pathLengths[b];tt(o,n,a,i,g,t,s.count,f,l,d,p),f+=4*t,d+=2*t,g+=t}}function X(t,e,r,s,o,n,i,a,l,c,p,m,d,g,f,y,b){u(ht,y),l??=[],c??=[],p??=[];const _=f>0?1:-1;let x=3*r,j=0,S=3*j,P=s,v=3*P;for(let u=0;u<s;++u){const r=t[x],s=t[x+1],o=t[x+2];b&&(ht[0]=r,ht[1]=s,ht[2]=o,h(ht,ht)),a[S+0]=r,a[S+1]=s,a[S+2]=o;const n=e[x+0],i=e[x+1],m=e[x+2];l[S+0]=n,l[S+1]=i,l[S+2]=m,c[S+0]=-_*ht[0],c[S+1]=-_*ht[1],c[S+2]=-_*ht[2],p[j]=0,a[v+0]=r+f*ht[0],a[v+1]=s+f*ht[1],a[v+2]=o+f*ht[2],l[v+0]=n,l[v+1]=i,l[v+2]=m,p[P]=f,S+=3,v+=3,x+=3,j+=1,P+=1}x=3*n,S=0,v=3*g;const C=f<0?gt:dt,w=f<0?dt:gt;for(let h=0;h<i;++h)d[S]=o[x+C[0]],d[S+1]=o[x+C[1]],d[S+2]=o[x+C[2]],m[v]=o[x+w[0]]+s,m[v+1]=o[x+w[1]]+s,m[v+2]=o[x+w[2]]+s,S+=3,v+=3,x+=3}function Y(t,e,r,s,o,n,i){s[n]=s[i],i*=3,t[n*=3]=t[i],t[n+1]=t[i+1],t[n+2]=t[i+2],e[n]=e[i],e[n+1]=e[i+1],e[n+2]=e[i+2],r[n]=o[0],r[n+1]=o[1],r[n+2]=o[2]}const $=f();function tt(t,e,r,s,o,n,i,a,l,c,p){e??=[],r??=[],s??=[];let m=o,h=o+1,u=o+i,d=o+i+1,g=a,f=a+1,y=a+2*n,b=a+2*n+1;p<0&&(m=o+i+1,d=o);let _=3*c;for(let x=0;x<n;++x)x===n-1&&(h=o,p>0?d=o+i:m=o+i),it(t,m,h,u,$),Y(t,e,s,r,$,g,m),Y(t,e,s,r,$,f,h),Y(t,e,s,r,$,y,u),Y(t,e,s,r,$,b,d),l[_]=g,l[_+1]=y,l[_+2]=b,l[_+3]=g,l[_+4]=b,l[_+5]=f,_+=6,m++,h++,u++,d++,g+=2,f+=2,y+=2,b+=2}const et=f(),rt=f(),st=f(),ot=f(),nt=f();function it(t,e,r,s,o){e*=3,r*=3,s*=3,l(et,t[e++],t[e++],t[e++]),l(rt,t[r++],t[r++],t[r++]),l(st,t[s++],t[s++],t[s++]),d(ot,rt,et),d(nt,st,et),m(o,nt,ot),h(o,o)}const at=f();function lt(t,e,r,s,o,n,p){const m=t.stageObject,h=m.geometries,u=h.length,d="absolute-height"!==e.mode;let g=0;const f=m.transformation,y=i(a(),f);for(let i=0;i<u;i+=2){const t=h[i];if(!H(t))continue;const e=t.getMutableAttribute("position").data,a=n[i/2],u=new T(t.mapPositions),b=e.length/3;let _=!1,x=0;{let t=0;for(let n=0;n<b;n++){at[0]=e[t],at[1]=e[t+1],at[2]=e[t+2],s(u,ut),d&&(x+=ut.sampledElevation),V.TESTS_DISABLE_OPTIMIZATIONS?(l(mt,u.array[u.offset],u.array[u.offset+1],ut.z+a[t/3]),null!=r&&o.toRenderCoords(mt,r,mt),c(mt,mt,y)):(l(mt,e[t],e[t+1],e[t+2]),c(mt,mt,f),o.setAltitude(mt,ut.z+a[t/3]),c(mt,mt,y)),e[t]=mt[0],e[t+1]=mt[1],e[t+2]=mt[2];const n=ft/o.unitInMeters;(Math.abs(at[0]-e[t])>=n||Math.abs(at[1]-e[t+1])>=n||Math.abs(at[2]-e[t+2])>=n)&&(_=!0),u.offset+=3,t+=3}}if(_){const e=p.get(t);e&&ct(t,e,f),m.geometryVertexAttributeUpdated(h[i],"normalCompressed"),t.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(h[i],"position"),h[i+1].invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(h[i+1],"position")}g+=x/b}return g/u}function ct(t,e,r){const s=t.getMutableAttribute("position"),o=t.getMutableAttribute("normalCompressed").data,{topVertexStart:n,topVertexCount:i,topFaceStart:a,topFaceCount:u}=e,d=s.data,g=i,f=t.attributes.get("position").indices,y=a+u,b=n+i,_=j(3*g);for(let l=0;l<g;++l){const t=3*l;_[t+0]=0,_[t+1]=0,_[t+2]=0}const x=yt,S=bt,P=_t,v=xt,C=ht;for(let j=a;j<y;++j){const t=3*j;for(let e=0;e<3;++e){const s=f[t+e];v[e]=s;const o=3*s;l(mt,d[o+0],d[o+1],d[o+2]),c(x[e],mt,r)}p(S,x[1],x[0]),p(P,x[2],x[0]),m(C,S,P),h(C,C);for(let e=0;e<3;++e){const t=3*(v[e]-n);_[t+0]+=C[0],_[t+1]+=C[1],_[t+2]+=C[2]}}for(let l=n;l<b;++l){const t=3*(l-n),e=_[t+0],r=_[t+1],s=_[t+2],i=Math.sqrt(e*e+r*r+s*s);N(o,l,e/i,r/i,s/i)}}function pt(t){return 1===(t.material?.color?.a??0)}const mt=f(),ht=f(),ut=new D,dt=[0,2,1],gt=[0,1,2],ft=.01,yt=[f(),f(),f()],bt=f(),_t=f(),xt=[0,0,0];class jt{constructor(t,e,r,s){this.positions=t,this.elevation=e,this.normals=r,this.heights=s}}class St{constructor(t,e,r,s){this.topVertexStart=t,this.topVertexCount=e,this.topFaceStart=r,this.topFaceCount=s}}export{J as Graphics3DExtrudeSymbolLayer,Q as extrudePolygon};
|
|
5
|
+
import"../../../../core/has.js";import{clone as t}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as e}from"../../../../core/unitUtils.js";import{e as r}from"../../../../chunks/earcut.js";import{normalFromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as i,invertOrIdentity as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as l,a as c,i as p,g as m,n as h,t as u,d,e as g}from"../../../../chunks/vec32.js";import{ONES as f,create as y}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as b}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as _,fromBuffer as x,intersectsClippingArea as j}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as S}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as P,getZeroIndexArray as v}from"../../../../geometry/support/Indices.js";import{t as C}from"../../../../chunks/vec3.js";import{makeVertexCandidate as w,makeEdgeCandidate as E}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as A}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as D,SampleElevationInfo as I}from"./elevationAlignmentUtils.js";import{Object3DEdgeState as U,Graphics3DObject3DGraphicLayer as L}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as O}from"./graphicUtils.js";import{geometryAsPolygon as M}from"./polygonUtils.js";import{createMaterial as G}from"../support/edgeUtils.js";import{encodeNaNUInt8 as V}from"../support/symbolColorUtils.js";import{debugFlags as T}from"../../support/debugFlags.js";import{SamplePosition as B}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as R}from"../../support/renderInfoUtils/polygon.js";import{Attribute as F}from"../../webgl-engine/lib/Attribute.js";import{Geometry as H}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as k}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as N,compressNormal as W}from"../../webgl-engine/lib/Normals.js";import{Object3D as q}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as Z}from"../../webgl-engine/materials/DefaultMaterial.js";const J=["polygon","extent"];class K extends z{constructor(t,e,r,s){super(t,e,r,s,mt(e)),this.ensureDrapedStatus(!1)}async doLoad(){const t=this.symbolLayer,e=t?.material,r=this.symbolLayer.material?.color?.a,s=this.needsDrivenTransparentPass||null!=r&&1!==r,o=e?.emissive,i=!this._hasDrivenColorOrOpacity&&(null==r||0===r),n={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,ambient:f,diffuse:f,opacity:i?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:s,hasSymbolColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:t.castShadows,emissiveStrength:o?.strength??0,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},a=new Z(n,this._context),l=new Z({...n,cullFace:2},this._context);this._materials[0]=a,this._materials[1]=l,this._updateTransparentDepedentMaterialParameters()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(t){const e=t.graphic;if(!this._validateGeometry(e.geometry,J,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(t.renderingInfo,this._materialColor,!1);V(r,r);const s=this.createElevationContextForGraphic(e);return this._createAs3DShape(e,t.renderingInfo,r,s,e.uid)}layerOpacityChanged(t,e){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),t?.forEach(t=>e(t)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(t,e){return this.updateGraphics3DGraphicElevationInfo(t,e,D)}slicePlaneEnabledChanged(t,e){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),t?.forEach(t=>{const r=e(t);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const t={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(t),this._materials[1]?.setParameters(t),!0}_getExtrusionSize(t){let e;return e=t.size&&this._drivenProperties.size?A(t.size,2)??0:this._getSymbolSize(),e/=this._context.renderCoordsHelper.unitInMeters,e}applyRendererDiff(t,e){return this._drivenPropertiesChanged(e)?0:1}async queryForSnapping(r,s,o,i){const n=this._getExtrusionSize(o)*this._context.renderCoordsHelper.unitInMeters/e(s),{objectId:a,target:l}=r,c=t(l);switch(c.z=(c.z??0)+n,r.type){case"edge":{const{start:e,end:s}=r,o=t(e),i=t(s);return o.z=(o.z??0)+n,i.z=(i.z??0)+n,[E(a,c,1/0,o,i)]}case"vertex":return[w(a,c,1/0),E(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(t,e,n,l,c){const p=M(t.geometry);if(null==p)return null;if(0===p.rings.length||!p.rings.some(t=>t.length>0))return this._logGeometryValidationWarnings(p.rings,"rings","ExtrudeSymbol3DLayer"),null;const m=R(p,this._context.elevationProvider,this._context.renderCoordsHelper,l);this._logGeometryCreationWarnings(m,p.rings,"rings","ExtrudeSymbol3DLayer");const h=O(p);if(null==h)return null;const u=new Array,d=new Array,g=_(),f=a(),v=y(),w=1===this._context.renderCoordsHelper.viewingMode;w||this._context.renderCoordsHelper.worldUpAtPosition(null,v),b(p.spatialReference,[h.x,h.y,0],f,this._context.renderCoordsHelper.spatialReference);const E=a();i(E,f);const A=o();s(A,E);const{polygons:I,mapPositions:z,position:V}=m,T=new Map,B=this._materials[0];for(const s of I){const t=s.count;if(this._context.clippingExtent&&(x(s.mapPositions,g),!j(g,this._context.clippingExtent)))continue;const o=r(s.mapPositions,s.holeIndices,3);if(0===o.length)continue;const i=o.length,a=6*t,l=P(a+i),p=P(i),m=S(3*a),h=S(3*a),y=S(3*a),b=S(a);X(V,z,o,s,m,y,h,b,l,p,this._getExtrusionSize(e),v,w),C(m,m,E);const _=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:this._context.layerViewUid}),A=new jt(m,y,N(h),b),D=Q(B,l,l.length-p.length,A,n,_),I=t,U=t,L=2*s.count,O=new St(I,U,L,i/3);pt(D,O,f),T.set(D,O),u.push(D,Q(this._materials[1],p,0,A,n,_)),d.push(A.heights)}if(0===u.length)return null;const F=new q({geometries:u,layerViewUid:this._context.layerViewUid,graphicUid:c,isElevationSource:!0});F.transformation=f;const H=G(this.symbolLayer,{opacity:this._getLayerOpacity()}),k=H?new U(this._materials[0],H,this._context.slicePlaneEnabled):null,W=new L(this,F,null,(t,e,r,s,o)=>ct(t,e,r,s,o,d,T),l,k);return W.alignedSampledElevation=m.sampledElevation,W.needsElevationUpdates=D(l.mode),W}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const t=this._materials[0];t&&t.setParameters({cullFace:t.transparent?0:2})}}function Q(t,e,r,s,o,i){const n=v(e.length),a=[["position",new F(s.positions,e,3,!0)],["normalCompressed",new F(s.normals,e,2,!0)],["symbolColor",new F(o,n,4,!0)]];return new H(t,a,s.elevation,0,i,r)}function X(t,e,r,s,o,i,n,a,l,c,p,m,h){const u=r.length/3;let d=2*s.count;Y(t,e,s.index,s.count,r,0,u,o,i,n,a,l,c,d,p,m,h);let g=0,f=2*s.count;d=0;const y=s.pathLengths[0];et(o,i,a,n,g,y,s.count,f,l,d,p),f+=4*y,d+=2*y,g+=y;for(let b=1;b<s.pathLengths.length;++b){const t=s.pathLengths[b];et(o,i,a,n,g,t,s.count,f,l,d,p),f+=4*t,d+=2*t,g+=t}}function Y(t,e,r,s,o,i,n,a,l,c,p,m,u,g,f,y,b){d(ut,y),l??=[],c??=[],p??=[];const _=f>0?1:-1;let x=3*r,j=0,S=3*j,P=s,v=3*P;for(let d=0;d<s;++d){const r=t[x],s=t[x+1],o=t[x+2];b&&(ut[0]=r,ut[1]=s,ut[2]=o,h(ut,ut)),a[S+0]=r,a[S+1]=s,a[S+2]=o;const i=e[x+0],n=e[x+1],m=e[x+2];l[S+0]=i,l[S+1]=n,l[S+2]=m,c[S+0]=-_*ut[0],c[S+1]=-_*ut[1],c[S+2]=-_*ut[2],p[j]=0,a[v+0]=r+f*ut[0],a[v+1]=s+f*ut[1],a[v+2]=o+f*ut[2],l[v+0]=i,l[v+1]=n,l[v+2]=m,p[P]=f,S+=3,v+=3,x+=3,j+=1,P+=1}x=3*i,S=0,v=3*g;const C=f<0?ft:gt,w=f<0?gt:ft;for(let h=0;h<n;++h)u[S]=o[x+C[0]],u[S+1]=o[x+C[1]],u[S+2]=o[x+C[2]],m[v]=o[x+w[0]]+s,m[v+1]=o[x+w[1]]+s,m[v+2]=o[x+w[2]]+s,S+=3,v+=3,x+=3}function $(t,e,r,s,o,i,n){s[i]=s[n],n*=3,t[i*=3]=t[n],t[i+1]=t[n+1],t[i+2]=t[n+2],e[i]=e[n],e[i+1]=e[n+1],e[i+2]=e[n+2],r[i]=o[0],r[i+1]=o[1],r[i+2]=o[2]}const tt=y();function et(t,e,r,s,o,i,n,a,l,c,p){e??=[],r??=[],s??=[];let m=o,h=o+1,u=o+n,d=o+n+1,g=a,f=a+1,y=a+2*i,b=a+2*i+1;p<0&&(m=o+n+1,d=o);let _=3*c;for(let x=0;x<i;++x)x===i-1&&(h=o,p>0?d=o+n:m=o+n),at(t,m,h,u,tt),$(t,e,s,r,tt,g,m),$(t,e,s,r,tt,f,h),$(t,e,s,r,tt,y,u),$(t,e,s,r,tt,b,d),l[_]=g,l[_+1]=y,l[_+2]=b,l[_+3]=g,l[_+4]=b,l[_+5]=f,_+=6,m++,h++,u++,d++,g+=2,f+=2,y+=2,b+=2}const rt=y(),st=y(),ot=y(),it=y(),nt=y();function at(t,e,r,s,o){e*=3,r*=3,s*=3,l(rt,t[e++],t[e++],t[e++]),l(st,t[r++],t[r++],t[r++]),l(ot,t[s++],t[s++],t[s++]),g(it,st,rt),g(nt,ot,rt),p(o,nt,it),h(o,o)}const lt=y();function ct(t,e,r,s,o,i,c){const p=t.stageObject,m=p.geometries,h=m.length,d="absolute-height"!==e.mode;let g=0;const f=p.transformation,y=n(a(),f);for(let n=0;n<h;n+=2){const t=m[n];if(!k(t))continue;const e=t.getMutableAttribute("position").data,a=i[n/2],h=new B(t.mapPositions),b=e.length/3;let _=!1,x=0;{let t=0;for(let i=0;i<b;i++){lt[0]=e[t],lt[1]=e[t+1],lt[2]=e[t+2],s(h,dt),d&&(x+=dt.sampledElevation),T.TESTS_DISABLE_OPTIMIZATIONS?(l(ht,h.array[h.offset],h.array[h.offset+1],dt.z+a[t/3]),null!=r&&o.toRenderCoords(ht,r,ht),u(ht,ht,y)):(l(ht,e[t],e[t+1],e[t+2]),u(ht,ht,f),o.setAltitude(ht,dt.z+a[t/3]),u(ht,ht,y)),e[t]=ht[0],e[t+1]=ht[1],e[t+2]=ht[2];const i=yt/o.unitInMeters;(Math.abs(lt[0]-e[t])>=i||Math.abs(lt[1]-e[t+1])>=i||Math.abs(lt[2]-e[t+2])>=i)&&(_=!0),h.offset+=3,t+=3}}if(_){const e=c.get(t);e&&pt(t,e,f),p.geometryVertexAttributeUpdated(m[n],"normalCompressed"),t.invalidateBoundingInfo(),p.geometryVertexAttributeUpdated(m[n],"position"),m[n+1].invalidateBoundingInfo(),p.geometryVertexAttributeUpdated(m[n+1],"position")}g+=x/b}return g/h}function pt(t,e,r){const s=t.getMutableAttribute("position"),o=t.getMutableAttribute("normalCompressed").data,i=s.data,n=t.attributes.get("position").indices,{topVertexStart:a,topVertexCount:d,topFaceStart:g,topFaceCount:f}=e,y=g+f,b=a+d,_=bt,x=_t,j=xt,S=ut,P=ht;l(P,0,0,0);const v=(t,e)=>{const s=3*t;l(e,i[s+0],i[s+1],i[s+2]),u(e,e,r)};for(let l=g;l<y;++l){const t=3*l;v(n[t+0],_[0]),v(n[t+1],_[1]),v(n[t+2],_[2]),c(x,_[1],_[0]),c(j,_[2],_[0]),p(S,x,j),m(P,P,S)}h(P,P);for(let l=a;l<b;++l){const t=P[0],e=P[1],r=P[2];W(o,l,t,e,r)}}function mt(t){return 1===(t.material?.color?.a??0)}const ht=y(),ut=y(),dt=new I,gt=[0,2,1],ft=[0,1,2],yt=.01,bt=[y(),y(),y()],_t=y(),xt=y();class jt{constructor(t,e,r,s){this.positions=t,this.elevation=e,this.normals=r,this.heights=s}}class St{constructor(t,e,r,s){this.topVertexStart=t,this.topVertexCount=e,this.topFaceStart=r,this.topFaceCount=s}}export{K as Graphics3DExtrudeSymbolLayer,X as extrudePolygon};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{EventEmitter as r}from"../../../../core/Evented.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{projectPoint as s}from"../../../../geometry/projectionUtils.js";import{create as a}from"../../../../geometry/support/aaBoundingBox.js";import{getObjectId as
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{EventEmitter as r}from"../../../../core/Evented.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{projectPoint as s}from"../../../../geometry/projectionUtils.js";import{create as a}from"../../../../geometry/support/aaBoundingBox.js";import{getObjectId as p}from"../../../../layers/graphics/dehydratedFeatures.js";import{OptimizedFeature as c}from"../../../../layers/graphics/OptimizedFeature.js";import n from"../../../../layers/graphics/OptimizedGeometry.js";import{optimizedFeatureQueryEngineAdapter as h}from"../../../../layers/graphics/data/optimizedFeatureQueryEngineAdapter.js";const u=a();let d=class extends e{constructor(t){super(t),this.events=new r,this.hasZ=null,this.hasM=null,this.objectIdField=null,this.featureAdapter={getAttribute:(t,e)=>"graphic"in t?t.graphic.attributes[e]:h.getAttribute(t,e),getAttributeAsTimestamp(t,e){const r=this.getAttribute(t,e);return"number"==typeof r?r:new Date(r).getTime()},getAttributes:t=>"graphic"in t?t.graphic.attributes:h.getAttributes(t),getObjectId:t=>"graphic"in t?p(t.graphic,this.objectIdField)??void 0:h.getObjectId(t),getGeometry:t=>"graphic"in t?t.getAsOptimizedGeometry(this.hasZ,this.hasM):h.getGeometry(t),getCentroid:(t,e)=>{if("graphic"in t){let r=null;null!=t.centroid?r=t.centroid:"point"===t.graphic.geometry.type&&s(t.graphic.geometry,l,this.viewSpatialReference)&&(r=l);const o=new Array(2+(e.hasZ?1:0)+(e.hasM?1:0));return null==r?(o[0]=0,o[1]=0,o[2]=0,o[3]=0):(o[0]=r.x,o[1]=r.y,e.hasZ&&(o[2]=r.hasZ?r.z:0),e.hasM&&(o[e.hasZ?3:2]=r.hasM?r.m:0)),new n([],o,e.hasZ,e.hasM)}return h.getCentroid(t,e)},cloneWithGeometry:(t,e)=>"graphic"in t?new c(e,this.featureAdapter.getAttributes(t),null,this.featureAdapter.getObjectId(t)):h.cloneWithGeometry(t,e)}}forEachInBounds(t,e){this.getSpatialIndex().forEachInBounds(t,e)}forEachBounds(t,e){const r=this.getSpatialIndex();for(const o of t){const t=this.featureAdapter.getObjectId(o);null!=r.getBounds(t,u)&&e(u)}}};t([o({constructOnly:!0})],d.prototype,"getSpatialIndex",void 0),t([o({constructOnly:!0})],d.prototype,"forEach",void 0),t([o({constructOnly:!0})],d.prototype,"hasZ",void 0),t([o({constructOnly:!0})],d.prototype,"hasM",void 0),t([o({constructOnly:!0})],d.prototype,"objectIdField",void 0),t([o({constructOnly:!0})],d.prototype,"viewSpatialReference",void 0),t([o({constructOnly:!0})],d.prototype,"featureSpatialReference",void 0),d=t([i("esri.views.3d.layers.graphics.Graphics3DFeatureStore")],d);const l={type:"point",x:0,y:0,hasZ:!1,hasM:!1,spatialReference:null};export{d as Graphics3DFeatureStore};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../Color.js";import{result as t,createTask as r}from"../../../../core/asyncUtils.js";import i from"../../../../core/Error.js";import has from"../../../../core/has.js";import{clone as s}from"../../../../core/lang.js";import{abortMaybe as o,releaseMaybe as a}from"../../../../core/maybe.js";import{throwIfAbortError as n,throwIfAborted as l}from"../../../../core/promiseUtils.js";import{pt2px as c,px2pt as h}from"../../../../core/screenUtils.js";import{numericHash as u}from"../../../../core/string.js";import{dataComponents as m}from"../../../../core/urlUtils.js";import{fromValues as p,create as d}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as _,create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as y,ZEROS as g,fromValues as x}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectPointToVector as b}from"../../../../geometry/projection/projectPointToVector.js";import{containsPoint as v}from"../../../../geometry/support/aaBoundingBox.js";import S from"../../../../layers/support/FieldsIndex.js";import{createRendererExpression as P}from"../../../../support/ArcadeExpression.js";import{CIMSymbolHelper as w}from"../../../../symbols/cim/CIMSymbolHelper.js";import{evaluateValueOrFunction as z}from"../../../../symbols/cim/utils.js";import{scaleCIMSymbol as C}from"../../../../symbols/support/cimSymbolUtils.js";import{defaultPrimitive as R}from"../../../../symbols/support/IconSymbol3DLayerResource.js";import{Symbol3DAnchorPosition2D as M}from"../../../../symbols/support/Symbol3DAnchorPosition2D.js";import{getIconHref as I}from"../../../../symbols/support/utils.js";import{transparentUnit as O}from"./constants.js";import{perObjectElevationAligner as j}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as F,needsElevationUpdates2D as T}from"./elevationAlignmentUtils.js";import{focusAreaHUDColor as E}from"./focusAreaStyle.js";import{Graphics3DDrapedGraphicLayer as U}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as D}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as V}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as G}from"./graphicUtils.js";import{namedAnchorToHUDMaterialAnchorPos as L}from"./placementUtils.js";import{placePointOnGeometry as A,updateStageObjectGeometry as H,getLocalOriginForPoint as k,extendPointGraphicElevationContext as B,createStageObject as $}from"./pointUtils.js";import{initFastSymbolUpdatesState as N,updateFastSymbolUpdatesState as q,evaluateModelTransformScale as J,ConvertOptions as Z}from"../support/FastSymbolUpdates.js";import{createTexture as W,requiresHalfTexelOffset as K,defaultBoundingBox as Q,defaultSymbolSizeRatio as X,defaultTexSize as Y}from"../../support/engineContent/sdfPrimitives.js";import{drapedZ as ee}from"../../terrain/OverlayRenderer.js";import{VerticalOffsetParameters as te}from"../../webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{createPointGeometry as re}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderGeometry as ie}from"../../webgl-engine/lib/RenderGeometry.js";import{Texture as se}from"../../webgl-engine/lib/Texture.js";import{HUDMaterial as oe}from"../../webgl-engine/materials/HUDMaterial.js";const ae=_(0,0,1),ne=16,le=1.5,ce=[Y*X,Y*X];class he extends V{static{this.PRIMITIVE_SIZE=ce}getCachedSize(){return{size:this._getIconSize()}}static{this.elevationModeChangeTypes={definedChanged:1,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i,ye(t)),this._cimData=null,this._overrideHelperClass=null,this._arcadeInfo=null,this._cimSymbolMaterials=new Map,this._cimSymbolTextures=new Map,this._cimMaterialParametersInfo=null,this._cimScaleFactorOrFunction=null,this._size=null,this._symbolTextureRatio=1,this._outlineSize=0,this._textureHandle=null,this._patchTask=null,this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!0}}async doLoad(e){this._validateOrThrow();const t=this._prepareMaterialParameters(),r=this._getPrimitive();if(null!=r)this._prepareResourcesPrimitive(t,r);else{const r=I(this.symbolLayer),i=pe(r);null!=i?await this._prepareResourcesCIM(t,JSON.parse(i),e):await this._prepareResourcesHref(t,r,e)}}_validateOrThrow(){if(this._drivenProperties.size)return;const e=G(this._getIconSize());if(e)throw new i("graphics3diconsymbollayer:invalid-size",e)}_getIconSize(){const e=this.symbolLayer,t=Math.round(null!=e.size?c(e.size):ne);return this._drivenProperties.size?Math.max(t,64):t}_generateTextureCIM(e,t){const r=this._overrideHelperClass;let i=this._cimData;if(r&&i&&i.symbol||this.logger.error("Can't create texture, CIM data is undefined"),i.primitiveOverrides){i=s(i);const o=i.primitiveOverrides;r.evaluateOverrides(o,e,this._arcadeInfo.geometryType,null,null,t.layer.fieldsIndex),r.applyOverrides(i.symbol,o)}const o=u(JSON.stringify(i));let a=this._cimSymbolTextures.get(o);if(a)return a;const n=this._context.sharedResources.cimSymbolRasterizer,l=this._context.renderer&&"dictionary"===this._context.renderer.type?this._context.renderer.fieldMap:null;l&&r.applyDictionaryTextOverrides(i.symbol,e,l,null);const c=null!=this._cimScaleFactorOrFunction?z(this._cimScaleFactorOrFunction,e):1;1!==c&&i.symbol&&C(i.symbol,c,!0);const h=w.getEnvelope(i,null,n.resourceManager);if(h?.width&&h.height){const e=h.x+h.width/2,t=h.y+h.height/2,r=n.rasterize({type:"cim",data:i},h.width,h.height,e,t,1,"esriGeometryPoint",0,null,this._context.graphicsCoreOwner.view.state.rasterPixelRatio),s=new M({x:-h.x/h.width-.5,y:(h.height+h.y)/h.height-.5});this._cimMaterialParametersInfo.anchorPosition=de("relative",s),a=new se(r,{width:r?.width??1,height:r?.height??1,reloadable:!0})}else a=new se(new ImageData(1,1),{width:1,height:1,reloadable:!0});return this._cimSymbolTextures.set(o,a),this._context.stage.addTexture(a),a}_prepareMaterialParameters(){const e={anchorPosition:de(this.symbolLayer.anchor,this.symbolLayer.anchorPosition),rotation:this.symbolLayer.angle},t=this.symbol;ue(t)&&(e.verticalOffset=new te(t.verticalOffset)),this._context.screenSizePerspectiveEnabled&&(e.screenSizePerspective=this.view.screenSizePerspective.parameters),(0!==e.rotation||this._drivenProperties.rotation)&&(e.hasRotation=!0);const r=!!has("enable-feature:non-occluded-hud");return e.occlusionTest=!r,e.occludedFragmentFade=r,e.horizonCullingEnabled=r&&this._context.spherical,e.hasSlicePlane=this._context.slicePlaneEnabled,e}_prepareResourcesPrimitive(e,t){const r=this._getOutlineSize();if(me(t)&&0===r)throw new Error("Nothing to render");if(this._outlineSize=r,e.color=this._getFillColor(),e.outlineColor=this._getOutlineColor(),e.outlineSize=this._outlineSize,null!=this._context.sharedResources.textures){const r=this._context.sharedResources.textures.fromData(`${t}-icon`,()=>W(t));this._textureHandle=r,e.textureId=r.texture.id}e.textureIsSignedDistanceField=!0,e.sampleSignedDistanceFieldTexelCenter=K(t),e.distanceFieldBoundingBox=Q;const i=this._getIconSize();this._size=[i,i],this._symbolTextureRatio=1/X,this._createMaterial(e)}async _prepareResourcesHref(e,r,s){this._outlineSize=this._getOutlineSize(),e.color=this._getFillColor(),e.outlineColor=this._getOutlineColor(),e.outlineSize=this._outlineSize,e.textureIsSignedDistanceField=!1;const o=this._getIconSize(),a=o*this._context.graphicsCoreOwner.view.state.rasterPixelRatio;if(null!=this._context.sharedResources.textures){const l=await t(this._context.sharedResources.textures.fromUrl(r,a,{signal:s}));if(!1===l.ok){n(l.error);throw new i("graphics3diconsymbollayer:request-failed",`Failed to load (Request for icon resource failed: ${r})`)}this._textureHandle=l.value;const c=l.value.texture;this._size=_e(c,o),e.textureId=c.id}this._createMaterial(e)}async _prepareResourcesCIM(e,t,r){const{OverrideHelper:i}=await import("../../../../symbols/cim/OverrideHelper.js");if(this._overrideHelperClass=i,this._cimData=t,!this._context.sharedResources.cimSymbolRasterizer){const e=(await import("../../../../symbols/cim/CIMSymbolRasterizer.js")).CIMSymbolRasterizer;l(r),this._context.sharedResources.cimSymbolRasterizer||(this._context.sharedResources.cimSymbolRasterizer=new e(this._context.renderCoordsHelper.spatialReference))}const s=this._context.sharedResources.cimSymbolRasterizer,o=[],a=t,n=a?.symbol;w.fetchResources(n,s.resourceManager,o,r),w.fetchFonts(n,s.resourceManager,o);const c=this._context.layer.fields?this._context.layer.fields.map(e=>e.toJSON()):[],h=this._context.renderCoordsHelper.spatialReference;if(this._arcadeInfo={spatialReference:h,fields:c,geometryType:"esriGeometryPoint"},a?.primitiveOverrides&&o.push(i.createRenderExpressions(a.primitiveOverrides,this._arcadeInfo)),o.length>0&&(await Promise.all(o),l(r)),this._context.renderer&&"dictionary"===this._context.renderer.type&&this._context.renderer.scaleExpression){const e=this._context.renderer;if(e.scaleExpression){const t=e.scaleExpression,r=await P(t,this._context.layer.spatialReference),{default:i}=await import("../../../2d/arcade/callExpressionWithFeature.js"),s=new S(c);this._cimScaleFactorOrFunction=(e,t,o)=>{const a=i(r,e,{$view:o},"esriGeometryPoint",s,t);return null!==a?a:1}}}l(r),this._cimMaterialParametersInfo=e,this._cimMaterialParametersInfo.color=this._getFillColor(),this._cimMaterialParametersInfo.outlineColor=[0,0,0,0],this._cimMaterialParametersInfo.outlineSize=0,this._cimMaterialParametersInfo.textureIsSignedDistanceField=!1}_getPrimitive(){return fe(this.symbolLayer)}_getOutlineSize(){let e=0;const t=this.symbolLayer;if(null!=t.outline?.size)return Math.max(c(t.outline.size),0);return e=me(this._getPrimitive())?le:0,Math.max(e,0)}_getOutlineColor(){const t=this._getLayerOpacity(),r=this.symbolLayer,i=r?.outline?.color;if(null!=i){const r=e.toUnitRGB(i),s=i.a*t;return[r[0],r[1],r[2],s]}return[0,0,0,0]}_getFillColor(){if(me(this._getPrimitive()))return O;const e=null==this._getPrimitive(),t=this._materialColor;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}get _materialColor(){return this.symbolLayer.material?.color}get _fastVisualVariableFallbackColor(){const t=this._materialColor;if(null==t){return null==this._getPrimitive()?y:g}return e.toUnitRGBA(t)}_getFallbackSize(){const e=this._getIconSize(),{symbolLayer:{size:t}}=this;return(null!=t?Math.round(c(t)):ne)/e}_createMaterial(e){const t=this._context.spherical;if(this._cimData){this._fastUpdates=null;let r=e.textureId?this._cimSymbolMaterials.get(e.textureId):null;return r||(r=new oe(e,t),this._cimSymbolMaterials.set(e.textureId??0,r)),r}this._fastUpdates=N(this._context.renderer,this._fastVisualVariableConvertOptions()),this._fastUpdates&&(e={...e,...this._fastUpdates.materialParameters}),this._materials[0]=new oe(e,t),e.isFocused=!1;const r=this.view.map?.focusAreas.style;return e.color=E(e.color,r),e.outlineColor=E(e.outlineColor,r),this._materials[1]=new oe(e,t),this._materials[0]}_setDrapingDependentMaterialParameters(){this.draped&&(this._forEachMaterial(e=>{e.setParameters({verticalOffset:null,screenSizePerspective:null,occlusionTest:!1,hasSlicePlane:!1,shaderPolygonOffset:0,draped:this.draped})}),this.layerOpacityChanged())}destroy(){super.destroy(),this._patchTask=o(this._patchTask),this._materials.length=0,this._cimSymbolMaterials.clear(),this._cimSymbolTextures.forEach(e=>this._context.stage.removeTexture(e)),this._cimSymbolTextures.clear(),this._textureHandle=a(this._textureHandle)}_getScaleFactor({size:e},t){if(!this._drivenProperties.size)return 1;if(null==e)return this._getFallbackSize();const[r,i,s]=e;return"symbol-value"===r?1:"number"==typeof r&&isFinite(r)?c(r)/t:"number"==typeof s&&isFinite(s)?c(s)/t:1}_getDrivenRotation(e){return this._drivenProperties.rotation?e.heading??0:0}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry))return null;const r=A(t.geometry);if(null==r)return this.logger.warn(`unsupported geometry type for text symbol: ${t.geometry.type}`),null;let i,s=[0,0];const o=this.view.focusAreasView?.containsGeometry(r)??!0;if(this._cimData){if(!this._cimData.symbol)return null;const r=this._generateTextureCIM(t,e),a={textureId:r.id,isFocused:o,...this._cimMaterialParametersInfo};i=this._createMaterial(a);const n=this._context.graphicsCoreOwner.view.state.rasterPixelRatio;s=[r.parameters.width/n,r.parameters.height/n]}else s=this._size,i=o?this._materials[0]:this._materials[1];if(null==r)return this.logger.warn(`unsupported geometry type for icon symbol: ${t.geometry.type}`),null;const a=e.renderingInfo,n=this._getDrivenUInt8Color(a,this._materialColor,null==this._getPrimitive()),l=this._getDrivenRotation(a);let c=1;if(!this._fastUpdates?.visualVariables.size){const e=s[0]>s[1]?s[0]:s[1];c=this._getScaleFactor(a,e)}c*=this._symbolTextureRatio;const h=p(s[0]*c,s[1]*c),u=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===u.mode)&&this._setDrapingDependentMaterialParameters(),this.draped?this._createAsOverlay(t,r,i,n,l,h):this._createAs3DShape(t,r,i,n,l,h,u,t.uid)}layerOpacityChanged(){const e=this._getFillColor(),t=this._getOutlineColor();this._forEachMaterial(r=>{r.setParameters({color:e}),r.setParameters({outlineColor:t})})}layerScreenSizePerspectiveChanged(){const e=this._context.screenSizePerspectiveEnabled&&!this.draped?this.view.screenSizePerspective.parameters:null;this._forEachMaterial(t=>{t.setParameters({screenSizePerspective:e})})}updateGeometry(e,t){const r=e.geometry;if(this.draped||!r||!this._validateGeometry(r))return!1;const{elevationContext:i,stageObject:s}=t;if(i.mode!==this.getGeometryElevationMode(r))return!1;const o=A(r);if(!o)return!1;i.updateFeatureExpressionFeature(e,this._context.layer);const a=H(s,this._context,o,i);if(null==a)return!1;const n=k(this._context,o);return s.geometries[0].localOrigin===n&&(t.alignedSampledElevation=a,B(t,o,this._context.elevationProvider),!0)}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,s=F(he.elevationModeChangeTypes,r,i);if(1!==s)return s;const o=T(i)||"absolute-height"===i;return this.updateGraphics3DGraphicElevationInfo(e,t,()=>o)}slicePlaneEnabledChanged(){return this.draped||this._forEachMaterial(e=>{e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})}),!0}physicalBasedRenderingChanged(){return!0}get pixelRatioChanged(){return null!=this._getPrimitive()}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;if(!q(this._fastUpdates,t,this._fastVisualVariableConvertOptions()))return 0;this._materials[0]?.setParameters(this._fastUpdates.materialParameters)}return 2}get needsUpdateFocus(){return!0}prepareSymbolLayerPatch(e){if(this._patchTask?.abort(),"partial"!==e.diff.type)return;const t=e.diff.diff;this._preparePatchResource(e,t),this._preparePatchRotation(e,t)}_preparePatchResource(e,s){if(!s.resource||"partial"!==s.resource.type)return;const c=s.resource.diff;if("complete"!==c?.href?.type)return;const h=c.href.newValue,{textures:u}=this._context.sharedResources;if(null==h||null==u||null!=pe(h))return;const m=this._getIconSize(),p=m*this._context.graphicsCoreOwner.view.state.pixelRatio;e.symbolLayerStatePatches.push(()=>{this._patchTask=o(this._patchTask),this._patchTask=r(e=>this._context.schedule(async(e,r)=>{const s=await t(u.fromUrl(h,p,{signal:r}));l(r);const o=!s.ok;if(o&&n(s.error),this._textureHandle=a(this._textureHandle),this._patchTask=null,o){this._forEachMaterial(e=>{e.visible=!1,e.setParameters({textureId:null})});const e=`Failed to load (Request for icon resource failed: ${h})`;return void this.logger.error(new i("graphics3diconsymbollayer:request-failed",e))}this._textureHandle=s.value;const c=s.value.texture;this._size=_e(c,m),this._forEachMaterial(e=>{e.setParameters({textureId:c.id}),e.visible=!0})},e))}),delete c.href}_preparePatchRotation(e,t){if(!t.angle||"complete"!==t.angle.type)return;const r=t.angle.newValue??0,i=0!==r||this._drivenProperties.rotation;e.symbolLayerStatePatches.push(()=>{this._forEachMaterial(e=>e.setParameters({rotation:r,hasRotation:i}))}),delete t.angle}_defaultElevationInfoNoZ(){return ge}_createAs3DShape(e,t,r,i,s,o,a,n){const l=this.getFastUpdateAttrValues(e),c=this._context.layerViewUid,h=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:n,layerViewUid:c}),u=re(r,{normal:ae,color:i,rotation:s,size:o,centerOffsetAndDistance:xe,featureAttribute:l,olidColor:h}),m=$(this._context,t,u,a,n);if(null==m)return null;const p=new D(this,m.object,null,j,a);return p.alignedSampledElevation=m.sampledElevation,p.needsElevationUpdates=T(a.mode)||"absolute-height"===a.mode,p.getScreenSize=this._createScreenSizeGetter(o,l),p.calculateRelativeScreenBounds=e=>r.calculateRelativeScreenBounds(p.getScreenSize(),1,e),B(p,t,this._context.elevationProvider),p}_createAsOverlay(e,t,r,i,s,o){r.renderPriority=this._renderPriority;const a=f();b(t,a,this._context.overlaySR),a[2]=ee;const n=this._context.clippingExtent;if(null!=n&&!v(n,a))return null;const l=this.getFastUpdateAttrValues(e),c=e.uid,h=this._context.layerViewUid,u=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:h}),m=re(r,{normal:ae,position:a,color:i,rotation:s,size:o,featureAttribute:l,olidColor:u}),p=new ie(m,{layerViewUid:h,graphicUid:c}),d=new U(this,[p],null,this._context.drapeSourceRenderer);return d.getScreenSize=this._createScreenSizeGetter(o,l),d.calculateRelativeScreenBounds=e=>r.calculateRelativeScreenBounds(d.getScreenSize(),1,e),d}_createScreenSizeGetter(e,t){const r=this._outlineSize+2;if(this._fastUpdates&&t){const i=e[0]/this._symbolTextureRatio,s=e[1]/this._symbolTextureRatio;return(e=d())=>{const[o,a]=J(be,this._fastUpdates.materialParameters,t);return e[0]=o*i+r,e[1]=a*s+r,e}}const i=e[0]/this._symbolTextureRatio+r,s=e[1]/this._symbolTextureRatio+r;return(e=d())=>(e[0]=i,e[1]=s,e)}_fastVisualVariableConvertOptions(){const e=Math.max(this._size[0],this._size[1]),t=_(e,e,e),r=h(1),i=e*r,s=_(i,i,i),o=this._getFallbackSize();return new Z({supports:{size:!0,color:!0,rotation:!0,opacity:!1},modelSize:t,symbolSize:s,unitInMeters:r,fallbackColor:this._fastVisualVariableFallbackColor,fallbackSize:_(o,o,o)})}_forEachMaterial(e){this._materials.forEach(e),this._cimSymbolMaterials.forEach(e)}test(){return{...super.test(),material:this._materials[0]}}}function ue(e){return e&&"point-3d"===e.type&&e.hasVisibleVerticalOffset()}function me(e){return null!=e&&("cross"===e||"x"===e)}function pe(e){const t=m(e);return"application/json"===t?.mediaType?t.data:void 0}function de(e,t){return"relative"===e?p((t.x||0)+.5,.5-(t.y||0)):e in L?L[e]:L.center}function _e({parameters:e},t){const r=(e.width??1)/(e.height??1);return r>1?[t,Math.round(t/r)]:[Math.round(t*r),t]}function fe(e){return e.resource?.href?null:e.resource?.primitive??R}function ye(e){return 1===(e.material?.color?.a??0)&&null!=fe(e)}const ge={mode:"relative-to-ground",offset:0},xe=x(0,0,0,1),be=f();export{he as Graphics3DIconSymbolLayer};
|
|
5
|
+
import e from"../../../../Color.js";import{result as t,createTask as r}from"../../../../core/asyncUtils.js";import i from"../../../../core/Error.js";import has from"../../../../core/has.js";import{clone as s}from"../../../../core/lang.js";import{abortMaybe as o,releaseMaybe as a}from"../../../../core/maybe.js";import{throwIfAbortError as n,throwIfAborted as l}from"../../../../core/promiseUtils.js";import{pt2px as c,px2pt as h}from"../../../../core/screenUtils.js";import{numericHash as u}from"../../../../core/string.js";import{dataComponents as m}from"../../../../core/urlUtils.js";import{fromValues as p,create as d}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as _,create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as y,ZEROS as g,fromValues as x}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectPointToVector as b}from"../../../../geometry/projection/projectPointToVector.js";import{containsPoint as v}from"../../../../geometry/support/aaBoundingBox.js";import S from"../../../../layers/support/FieldsIndex.js";import{createRendererExpression as P}from"../../../../support/ArcadeExpression.js";import{CIMSymbolHelper as w,forEachSymbolLayer as z}from"../../../../symbols/cim/CIMSymbolHelper.js";import{evaluateValueOrFunction as C}from"../../../../symbols/cim/utils.js";import{scaleCIMSymbol as R}from"../../../../symbols/support/cimSymbolUtils.js";import{defaultPrimitive as M}from"../../../../symbols/support/IconSymbol3DLayerResource.js";import{Symbol3DAnchorPosition2D as I}from"../../../../symbols/support/Symbol3DAnchorPosition2D.js";import{getIconHref as O}from"../../../../symbols/support/utils.js";import{transparentUnit as j}from"./constants.js";import{perObjectElevationAligner as F}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as T,needsElevationUpdates2D as E}from"./elevationAlignmentUtils.js";import{focusAreaHUDColor as U}from"./focusAreaStyle.js";import{Graphics3DDrapedGraphicLayer as D}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as V}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as G}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as L}from"./graphicUtils.js";import{namedAnchorToHUDMaterialAnchorPos as A}from"./placementUtils.js";import{placePointOnGeometry as H,updateStageObjectGeometry as k,getLocalOriginForPoint as B,extendPointGraphicElevationContext as $,createStageObject as N}from"./pointUtils.js";import{initFastSymbolUpdatesState as q,updateFastSymbolUpdatesState as J,evaluateModelTransformScale as Z,ConvertOptions as W}from"../support/FastSymbolUpdates.js";import{createTexture as K,requiresHalfTexelOffset as Q,defaultBoundingBox as X,defaultSymbolSizeRatio as Y,defaultTexSize as ee}from"../../support/engineContent/sdfPrimitives.js";import{drapedZ as te}from"../../terrain/OverlayRenderer.js";import{VerticalOffsetParameters as re}from"../../webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{createPointGeometry as ie}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderGeometry as se}from"../../webgl-engine/lib/RenderGeometry.js";import{Texture as oe}from"../../webgl-engine/lib/Texture.js";import{HUDMaterial as ae}from"../../webgl-engine/materials/HUDMaterial.js";const ne=_(0,0,1),le=16,ce=1.5,he=[ee*Y,ee*Y];class ue extends G{static{this.PRIMITIVE_SIZE=he}getCachedSize(){return{size:this._getIconSize()}}static{this.elevationModeChangeTypes={definedChanged:1,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i,ge(t)),this._cimData=null,this._overrideHelperClass=null,this._arcadeInfo=null,this._cimSymbolMaterials=new Map,this._cimSymbolTextures=new Map,this._cimMaterialParametersInfo=null,this._cimScaleFactorOrFunction=null,this._size=null,this._symbolTextureRatio=1,this._outlineSize=0,this._textureHandle=null,this._patchTask=null,this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!0}}async doLoad(e){this._validateOrThrow();const t=this._prepareMaterialParameters(),r=this._getPrimitive();if(null!=r)this._prepareResourcesPrimitive(t,r);else{const r=O(this.symbolLayer),i=de(r);null!=i?await this._prepareResourcesCIM(t,JSON.parse(i),e):await this._prepareResourcesHref(t,r,e)}}_validateOrThrow(){if(this._drivenProperties.size)return;const e=L(this._getIconSize());if(e)throw new i("graphics3diconsymbollayer:invalid-size",e)}_getIconSize(){const e=this.symbolLayer,t=Math.round(null!=e.size?c(e.size):le);return this._drivenProperties.size?Math.max(t,64):t}_generateTextureCIM(e,t){const r=this._overrideHelperClass;let i=this._cimData;if(r&&i&&i.symbol||this.logger.error("Can't create texture, CIM data is undefined"),i.primitiveOverrides){i=s(i);const o=i.primitiveOverrides;r.evaluateOverrides(o,e,this._arcadeInfo.geometryType,null,null,t.layer.fieldsIndex),r.applyOverrides(i.symbol,o)}const o=u(JSON.stringify(i));let a=this._cimSymbolTextures.get(o);if(a)return a;const n=this._context.sharedResources.cimSymbolRasterizer,l=this._context.renderer&&"dictionary"===this._context.renderer.type?this._context.renderer.fieldMap:null;l&&r.applyDictionaryTextOverrides(i.symbol,e,l,null);const c=null!=this._cimScaleFactorOrFunction?C(this._cimScaleFactorOrFunction,e):1;1!==c&&i.symbol&&R(i.symbol,c,!0);const h=w.getEnvelope(i,null,n.resourceManager);if(h?.width&&h.height){const e=h.x+h.width/2,t=h.y+h.height/2,r=n.rasterize({type:"cim",data:i},h.width,h.height,e,t,1,"esriGeometryPoint",0,null,this._context.graphicsCoreOwner.view.state.rasterPixelRatio),s=new I({x:-h.x/h.width-.5,y:(h.height+h.y)/h.height-.5});this._cimMaterialParametersInfo.anchorPosition=_e("relative",s),a=new oe(r,{width:r?.width??1,height:r?.height??1,reloadable:!0})}else a=new oe(new ImageData(1,1),{width:1,height:1,reloadable:!0});return this._cimSymbolTextures.set(o,a),this._context.stage.addTexture(a),a}_prepareMaterialParameters(){const e={anchorPosition:_e(this.symbolLayer.anchor,this.symbolLayer.anchorPosition),rotation:this.symbolLayer.angle},t=this.symbol;me(t)&&(e.verticalOffset=new re(t.verticalOffset)),this._context.screenSizePerspectiveEnabled&&(e.screenSizePerspective=this.view.screenSizePerspective.parameters),(0!==e.rotation||this._drivenProperties.rotation)&&(e.hasRotation=!0);const r=!!has("enable-feature:non-occluded-hud");return e.occlusionTest=!r,e.occludedFragmentFade=r,e.horizonCullingEnabled=r&&this._context.spherical,e.hasSlicePlane=this._context.slicePlaneEnabled,e}_prepareResourcesPrimitive(e,t){const r=this._getOutlineSize();if(pe(t)&&0===r)throw new Error("Nothing to render");if(this._outlineSize=r,e.color=this._getFillColor(),e.outlineColor=this._getOutlineColor(),e.outlineSize=this._outlineSize,null!=this._context.sharedResources.textures){const r=this._context.sharedResources.textures.fromData(`${t}-icon`,()=>K(t));this._textureHandle=r,e.textureId=r.texture.id}e.textureIsSignedDistanceField=!0,e.sampleSignedDistanceFieldTexelCenter=Q(t),e.distanceFieldBoundingBox=X;const i=this._getIconSize();this._size=[i,i],this._symbolTextureRatio=1/Y,this._createMaterial(e)}async _prepareResourcesHref(e,r,s){this._outlineSize=this._getOutlineSize(),e.color=this._getFillColor(),e.outlineColor=this._getOutlineColor(),e.outlineSize=this._outlineSize,e.textureIsSignedDistanceField=!1;const o=this._getIconSize(),a=o*this._context.graphicsCoreOwner.view.state.rasterPixelRatio;if(null!=this._context.sharedResources.textures){const l=await t(this._context.sharedResources.textures.fromUrl(r,a,{signal:s}));if(!1===l.ok){n(l.error);throw new i("graphics3diconsymbollayer:request-failed",`Failed to load (Request for icon resource failed: ${r})`)}this._textureHandle=l.value;const c=l.value.texture;this._size=fe(c,o),e.textureId=c.id}this._createMaterial(e)}async _prepareResourcesCIM(e,t,r){const{OverrideHelper:i}=await import("../../../../symbols/cim/OverrideHelper.js");if(this._overrideHelperClass=i,this._cimData=t,!this._context.sharedResources.cimSymbolRasterizer){const e=(await import("../../../../symbols/cim/CIMSymbolRasterizer.js")).CIMSymbolRasterizer;l(r),this._context.sharedResources.cimSymbolRasterizer??=new e(this._context.renderCoordsHelper.spatialReference)}const s=this._context.sharedResources.cimSymbolRasterizer,o=[],a=t,n=a?.symbol;w.fetchResources(n,s.resourceManager,o,r),w.fetchFonts(n,s.resourceManager,o);const c=this._context.layer.fields?this._context.layer.fields.map(e=>e.toJSON()):[],h=this._context.renderCoordsHelper.spatialReference;if(this._arcadeInfo={spatialReference:h,fields:c,geometryType:"esriGeometryPoint"},a?.primitiveOverrides&&o.push(i.createRenderExpressions(a.primitiveOverrides,this._arcadeInfo)),o.length>0&&(await Promise.all(o),l(r)),this._context.renderer&&"dictionary"===this._context.renderer.type&&this._context.renderer.scaleExpression){const e=this._context.renderer;if(e.scaleExpression){const t=e.scaleExpression,r=await P(t,this._context.layer.spatialReference),{default:i}=await import("../../../2d/arcade/callExpressionWithFeature.js"),s=new S(c);this._cimScaleFactorOrFunction=(e,t,o)=>{const a=i(r,e,{$view:o},"esriGeometryPoint",s,t);return null!==a?a:1}}}l(r),this._cimMaterialParametersInfo=e,this._cimMaterialParametersInfo.color=this._getFillColor(),this._cimMaterialParametersInfo.outlineColor=[0,0,0,0],this._cimMaterialParametersInfo.outlineSize=0,this._cimMaterialParametersInfo.textureIsSignedDistanceField=!1}_getPrimitive(){return ye(this.symbolLayer)}_getOutlineSize(){let e=0;const t=this.symbolLayer;if(null!=t.outline?.size)return Math.max(c(t.outline.size),0);return e=pe(this._getPrimitive())?ce:0,Math.max(e,0)}_getOutlineColor(){const t=this._getLayerOpacity(),r=this.symbolLayer,i=r?.outline?.color;if(null!=i){const r=e.toUnitRGB(i),s=i.a*t;return[r[0],r[1],r[2],s]}return[0,0,0,0]}_getFillColor(){if(pe(this._getPrimitive()))return j;const e=null==this._getPrimitive(),t=this._materialColor;return this._getCombinedOpacityAndColor(t,{hasIntrinsicColor:e})}get _materialColor(){return this.symbolLayer.material?.color}get _fastVisualVariableFallbackColor(){const t=this._materialColor;if(null==t){return null==this._getPrimitive()?y:g}return e.toUnitRGBA(t)}_getFallbackSize(){const e=this._getIconSize(),{symbolLayer:{size:t}}=this;return(null!=t?Math.round(c(t)):le)/e}_createMaterial(e){const t=this._context.spherical;if(this._cimData){this._fastUpdates=null;let r=e.textureId?this._cimSymbolMaterials.get(e.textureId):null;return r||(r=new ae(e,t),this._cimSymbolMaterials.set(e.textureId??0,r)),r}this._fastUpdates=q(this._context.renderer,this._fastVisualVariableConvertOptions()),this._fastUpdates&&(e={...e,...this._fastUpdates.materialParameters}),this._materials[0]=new ae(e,t),e.isFocused=!1;const r=this.view.map?.focusAreas.style;return e.color=U(e.color,r),e.outlineColor=U(e.outlineColor,r),this._materials[1]=new ae(e,t),this._materials[0]}_setDrapingDependentMaterialParameters(){this.draped&&(this._forEachMaterial(e=>{e.setParameters({verticalOffset:null,screenSizePerspective:null,occlusionTest:!1,hasSlicePlane:!1,shaderPolygonOffset:0,draped:this.draped})}),this.layerOpacityChanged())}destroy(){super.destroy(),this._patchTask=o(this._patchTask),this._materials.length=0,this._cimSymbolMaterials.clear(),this._cimSymbolTextures.forEach(e=>this._context.stage.removeTexture(e)),this._cimSymbolTextures.clear(),this._textureHandle=a(this._textureHandle)}_getScaleFactor({size:e},t){if(!this._drivenProperties.size)return 1;if(null==e)return this._getFallbackSize();const[r,i,s]=e;return"symbol-value"===r?1:"number"==typeof r&&isFinite(r)?c(r)/t:"number"==typeof s&&isFinite(s)?c(s)/t:1}_getDrivenRotation(e){return this._drivenProperties.rotation?e.heading??0:0}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry))return null;const r=H(t.geometry);if(null==r)return this.logger.warn(`unsupported geometry type for text symbol: ${t.geometry.type}`),null;let i,s=[0,0];const o=this.view.focusAreasView?.containsGeometry(r)??!0;let a=!1;if(this._cimData){if(!this._cimData.symbol)return null;z(this._cimData.symbol,e=>{e.colorLocked&&(a=!0)});const r=this._generateTextureCIM(t,e),n={textureId:r.id,isFocused:o,...this._cimMaterialParametersInfo};i=this._createMaterial(n);const l=this._context.graphicsCoreOwner.view.state.rasterPixelRatio;s=[r.parameters.width/l,r.parameters.height/l]}else s=this._size,i=o?this._materials[0]:this._materials[1];if(null==r)return this.logger.warn(`unsupported geometry type for icon symbol: ${t.geometry.type}`),null;const n=e.renderingInfo,l=a?x(255,255,255,255):this._getDrivenUInt8Color(n,this._materialColor,null==this._getPrimitive()),c=this._getDrivenRotation(n);let h=1;if(!this._fastUpdates?.visualVariables.size){const e=s[0]>s[1]?s[0]:s[1];h=this._getScaleFactor(n,e)}h*=this._symbolTextureRatio;const u=p(s[0]*h,s[1]*h),m=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===m.mode)&&this._setDrapingDependentMaterialParameters(),this.draped?this._createAsOverlay(t,r,i,l,c,u):this._createAs3DShape(t,r,i,l,c,u,m,t.uid)}layerOpacityChanged(){const e=this._getFillColor(),t=this._getOutlineColor();this._forEachMaterial(r=>{r.setParameters({color:e}),r.setParameters({outlineColor:t})})}layerScreenSizePerspectiveChanged(){const e=this._context.screenSizePerspectiveEnabled&&!this.draped?this.view.screenSizePerspective.parameters:null;this._forEachMaterial(t=>{t.setParameters({screenSizePerspective:e})})}updateGeometry(e,t){const r=e.geometry;if(this.draped||!r||!this._validateGeometry(r))return!1;const{elevationContext:i,stageObject:s}=t;if(i.mode!==this.getGeometryElevationMode(r))return!1;const o=H(r);if(!o)return!1;i.updateFeatureExpressionFeature(e,this._context.layer);const a=k(s,this._context,o,i);if(null==a)return!1;const n=B(this._context,o);return s.geometries[0].localOrigin===n&&(t.alignedSampledElevation=a,$(t,o,this._context.elevationProvider),!0)}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,s=T(ue.elevationModeChangeTypes,r,i);if(1!==s)return s;const o=E(i)||"absolute-height"===i;return this.updateGraphics3DGraphicElevationInfo(e,t,()=>o)}slicePlaneEnabledChanged(){return this.draped||this._forEachMaterial(e=>{e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})}),!0}physicalBasedRenderingChanged(){return!0}get pixelRatioChanged(){return null!=this._getPrimitive()}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;if(!J(this._fastUpdates,t,this._fastVisualVariableConvertOptions()))return 0;this._materials[0]?.setParameters(this._fastUpdates.materialParameters)}return 2}get needsUpdateFocus(){return!0}prepareSymbolLayerPatch(e){if(this._patchTask?.abort(),"partial"!==e.diff.type)return;const t=e.diff.diff;this._preparePatchResource(e,t),this._preparePatchRotation(e,t)}_preparePatchResource(e,s){if(!s.resource||"partial"!==s.resource.type)return;const c=s.resource.diff;if("complete"!==c?.href?.type)return;const h=c.href.newValue,{textures:u}=this._context.sharedResources;if(null==h||null==u||null!=de(h))return;const m=this._getIconSize(),p=m*this._context.graphicsCoreOwner.view.state.pixelRatio;e.symbolLayerStatePatches.push(()=>{this._patchTask=o(this._patchTask),this._patchTask=r(e=>this._context.schedule(async(e,r)=>{const s=await t(u.fromUrl(h,p,{signal:r}));l(r);const o=!s.ok;if(o&&n(s.error),this._textureHandle=a(this._textureHandle),this._patchTask=null,o){this._forEachMaterial(e=>{e.visible=!1,e.setParameters({textureId:null})});const e=`Failed to load (Request for icon resource failed: ${h})`;return void this.logger.error(new i("graphics3diconsymbollayer:request-failed",e))}this._textureHandle=s.value;const c=s.value.texture;this._size=fe(c,m),this._forEachMaterial(e=>{e.setParameters({textureId:c.id}),e.visible=!0})},e))}),delete c.href}_preparePatchRotation(e,t){if(!t.angle||"complete"!==t.angle.type)return;const r=t.angle.newValue??0,i=0!==r||this._drivenProperties.rotation;e.symbolLayerStatePatches.push(()=>{this._forEachMaterial(e=>e.setParameters({rotation:r,hasRotation:i}))}),delete t.angle}_defaultElevationInfoNoZ(){return xe}_createAs3DShape(e,t,r,i,s,o,a,n){const l=this.getFastUpdateAttrValues(e),c=this._context.layerViewUid,h=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:n,layerViewUid:c}),u=ie(r,{normal:ne,color:i,rotation:s,size:o,centerOffsetAndDistance:be,featureAttribute:l,olidColor:h}),m=N(this._context,t,u,a,n);if(null==m)return null;const p=new V(this,m.object,null,F,a);return p.alignedSampledElevation=m.sampledElevation,p.needsElevationUpdates=E(a.mode)||"absolute-height"===a.mode,p.getScreenSize=this._createScreenSizeGetter(o,l),p.calculateRelativeScreenBounds=e=>r.calculateRelativeScreenBounds(p.getScreenSize(),1,e),$(p,t,this._context.elevationProvider),p}_createAsOverlay(e,t,r,i,s,o){r.renderPriority=this._renderPriority;const a=f();b(t,a,this._context.overlaySR),a[2]=te;const n=this._context.clippingExtent;if(null!=n&&!v(n,a))return null;const l=this.getFastUpdateAttrValues(e),c=e.uid,h=this._context.layerViewUid,u=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:h}),m=ie(r,{normal:ne,position:a,color:i,rotation:s,size:o,featureAttribute:l,olidColor:u}),p=new se(m,{layerViewUid:h,graphicUid:c}),d=new D(this,[p],null,this._context.drapeSourceRenderer);return d.getScreenSize=this._createScreenSizeGetter(o,l),d.calculateRelativeScreenBounds=e=>r.calculateRelativeScreenBounds(d.getScreenSize(),1,e),d}_createScreenSizeGetter(e,t){const r=this._outlineSize+2;if(this._fastUpdates&&t){const i=e[0]/this._symbolTextureRatio,s=e[1]/this._symbolTextureRatio;return(e=d())=>{const[o,a]=Z(ve,this._fastUpdates.materialParameters,t);return e[0]=o*i+r,e[1]=a*s+r,e}}const i=e[0]/this._symbolTextureRatio+r,s=e[1]/this._symbolTextureRatio+r;return(e=d())=>(e[0]=i,e[1]=s,e)}_fastVisualVariableConvertOptions(){const e=Math.max(this._size[0],this._size[1]),t=_(e,e,e),r=h(1),i=e*r,s=_(i,i,i),o=this._getFallbackSize();return new W({supports:{size:!0,color:!0,rotation:!0,opacity:!1},modelSize:t,symbolSize:s,unitInMeters:r,fallbackColor:this._fastVisualVariableFallbackColor,fallbackSize:_(o,o,o)})}_forEachMaterial(e){this._materials.forEach(e),this._cimSymbolMaterials.forEach(e)}test(){return{...super.test(),material:this._materials[0]}}}function me(e){return e&&"point-3d"===e.type&&e.hasVisibleVerticalOffset()}function pe(e){return null!=e&&("cross"===e||"x"===e)}function de(e){const t=m(e);return"application/json"===t?.mediaType?t.data:void 0}function _e(e,t){return"relative"===e?p((t.x||0)+.5,.5-(t.y||0)):e in A?A[e]:A.center}function fe({parameters:e},t){const r=(e.width??1)/(e.height??1);return r>1?[t,Math.round(t/r)]:[Math.round(t*r),t]}function ye(e){return e.resource?.href?null:e.resource?.primitive??M}function ge(e){return 1===(e.material?.color?.a??0)&&null!=ye(e)}const xe={mode:"relative-to-ground",offset:0},be=x(0,0,0,1),ve=f();export{ue as Graphics3DIconSymbolLayer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../Color.js";import t from"../../../../core/Error.js";import{px2pt as r,pt2px as i}from"../../../../core/screenUtils.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as s}from"../../../../chunks/vec42.js";import{ZEROS as o,ones as l,clone as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import c from"../../../../geometry/Extent.js";import h from"../../../../geometry/Polygon.js";import{create as p,fromBuffer as m,intersectsClippingArea as y,empty as u,expandWithAABB as _,expandWithBuffer as d}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as f}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as g}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as b,needsElevationUpdates2D as v}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as C}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as P}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as M,nanFallbackColor as k}from"./Graphics3DSymbolLayer.js";import{parseCapType as w,parseLineMarkerStyle as L}from"./lineUtils.js";import{initFastSymbolUpdatesState as S,updateFastSymbolUpdatesState as x,getAttributeValue as z,ConvertOptions as U}from"../support/FastSymbolUpdates.js";import{debugFlags as j}from"../../support/debugFlags.js";import{createGeometry as V}from"../../support/engineContent/line.js";import{geometryToRenderInfo as O,geometryToRenderInfoDraped as E}from"../../support/renderInfoUtils/line.js";import{Object3D as A}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as G}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as D}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as F}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";const I=["polyline","polygon","extent"];class W extends M{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i,T(t))}async doLoad(){this._fastUpdates=S(this._context.renderer,this._fastVisualVariableConvertOptions());const e=!0;if(this._fastMarkerUpdates=S(this._context.renderer,this._fastVisualVariableConvertOptions(e)),!this._drivenProperties.size){if((null!=this.symbolLayer.size?this.symbolLayer.size:r(1))<0)throw new t("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values")}}_getMaterialParameters(e,t){const r=this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null,i={...this._getMaterialColorParameters(t),width:this._computeMaterialWidth(this.symbolLayer?.size),hasPolygonOffset:!0,join:this.symbolLayer.join||"miter",cap:w(this.symbolLayer.cap||"butt"),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:F(this.symbolLayer.pattern),emissiveStrength:this._emissiveStrength??0,screenSizePerspective:r};return 4===t&&this._fastMarkerUpdates?.visualVariables?{...i,...this._fastMarkerUpdates.materialParameters}:this._fastUpdates?.visualVariables?{...i,...this._fastUpdates.materialParameters}:i}_getMaterialColorParameters(e){const t=4===e,r=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);return this._patternHidesLine&&!t&&(r[3]=0),{color:r}}get _materialColor(){return this.symbolLayer.material?.color}get _emissiveStrength(){return this.symbolLayer.material?.emissive?.strength}get _markerColor(){return this.symbolLayer.marker?.color}get _lineMaterial(){return null==this._materials[0]&&(this._materials[0]=new R(this._getMaterialParameters(!1,0),this.view.state.isGlobal)),this._materials[0]}get _ringMaterial(){return null==this._materials[1]&&(this._materials[1]=new R(this._getMaterialParameters(!0,1),this.view.state.isGlobal)),this._materials[1]}get _wireframeLineMaterial(){return null==this._materials[2]&&(this._materials[2]=new R({...this._getMaterialParameters(!1,2),wireframe:!0},this.view.state.isGlobal)),this._materials[2]}get _wireframeRingMaterial(){return null==this._materials[3]&&(this._materials[3]=new R({...this._getMaterialParameters(!0,3),wireframe:!0},this.view.state.isGlobal)),this._materials[3]}get _markerMaterial(){return null==this._materials[4]&&null!=this.symbolLayer.marker&&(this._materials[4]=new D({...this._getMaterialParameters(!1,4),placement:this.symbolLayer.marker.placement,markerPrimitive:L(this.symbolLayer.marker.style)},this.view.state.isGlobal)),this._materials[4]}_getDrivenSize(e){if(this._drivenProperties.size){const t=e.size;return null!=t?i(f(t)):this._getFallbackSize()}return 1}_getDrivenColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(s(r,e??this._getFallbackOpacityAndColor(o)),null==t)||this._drivenProperties.opacity&&(e||this._materialColor)&&(r[3]=t??this._getFallbackOpacity()),r}_getDrivenMarkerColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(s(r,e??this._getFallbackMarkerOpacityAndColor(o)),null==t)||this._drivenProperties.opacity&&(e||this._markerColor||this._materialColor)&&(r[3]=t??this._getFallbackMarkerOpacity()),r}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,I,this.symbolLayer.type))return null;const r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.draped?this._createAsOverlay(e):this._createAs3DShape(e,r,t.uid)}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;{const e=this._fastUpdates;if(!x(e,t,this._fastVisualVariableConvertOptions()))return 0;for(const t of this._materials)t instanceof R&&t.setParameters(e.materialParameters);const r=this._fastMarkerUpdates,i=!0;if(!x(r,t,this._fastVisualVariableConvertOptions(i)))return 0;for(const t of this._materials)t instanceof D&&t.setParameters(r.materialParameters)}}return 2}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff,r={};"complete"===t.size?.type&&(r.width=this._computeMaterialWidth(t.size.newValue),delete t.size),"complete"===t.cap?.type&&(r.cap=w(t.cap.newValue??"butt"),delete t.cap);const i=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,i),e.symbolLayerStatePatches.push(()=>{for(const e of this._materials)e?.setParameters(r)})}layerOpacityChanged(){for(let e=0;e<5;e++)this._materials[e]?.setParameters(this._getMaterialColorParameters(e))}layerScreenSizePerspectiveChanged(){const e=this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null;for(const t of this._materials)t?.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=b(W.elevationModeChangeTypes,r,i);if(1!==a)return a;const s=v(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>s)}slicePlaneEnabledChanged(){const e={hasSlicePlane:this._context.slicePlaneEnabled};for(const t of this._materials)t?.setParameters(e);return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,r){const i=H(e.graphic.geometry),a="polygon"===i.type?i.rings:i.paths,s=new Array,o=p(),l=O(i,this._context.elevationProvider,this._context.renderCoordsHelper,t),n="polygon"===i.type?"rings":"paths";this._logGeometryCreationWarnings(l,a,n,"LineSymbol3DLayer");for(let p=0;p<l.lines.length;p++){const t=l.lines[p],a=t.position,n=t.mapPositions;if(null!=this._context.clippingExtent&&(m(n,o),!y(o,this._context.clippingExtent)))continue;const c=this._createGeometry("polygon"===i.type?this._ringMaterial:this._lineMaterial,e,a,n,i.type,1,r);if(s.push(c),j.LINE_WIREFRAMES&&s.push(c.instantiate({material:"polygon"===i.type?this._wireframeRingMaterial:this._wireframeLineMaterial})),null!=this._markerMaterial){const t=c.instantiate({material:this._markerMaterial});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),s.push(t)}}if(0===s.length)return null;const c=this._context.layerViewUid,h=new A({geometries:s,castShadow:!1,layerViewUid:c,graphicUid:r}),u=new P(this,h,null,g,t);return u.alignedSampledElevation=l.sampledElevation,u.needsElevationUpdates=v(t.mode),u}_createGeometry(e,t,r,i,a,s,o){const l=0===s?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,n="polygon"===a,c=this._fastUpdates?.visualVariables.color,h=this._fastUpdates?.visualVariables.size,p=this._fastUpdates?.visualVariables.opacity,m=this._context.layerViewUid,y=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:o,layerViewUid:m}),u={position:r,size:h?null:this._getDrivenSize(t.renderingInfo),color:c?null:this._getDrivenColor(t.renderingInfo),sizeFeature:h?z(h.field,t.graphic):null,colorFeature:c?z(c.field,t.graphic):null,opacityFeature:p?z(p.field,t.graphic):null};return V(e,{overlayInfo:l,removeDuplicateStartEnd:n,mapPositions:i,attributeData:u},y)}_createAsOverlay(e){const t=e.graphic,r=H(t.geometry),i="polygon"===r.type?r.rings:r.paths,a="polygon"===r.type?this._ringMaterial:this._lineMaterial;a.renderPriority=this._renderPriority;const s=j.LINE_WIREFRAMES?"polygon"===r.type?this._wireframeRingMaterial:this._wireframeLineMaterial:null,o=this._markerMaterial;null!=s&&(s.renderPriority=this._renderPriority-.001),null!=o&&(o.renderPriority=this._renderPriority-.002);const l=new Array,n=p(),c=u(),h=E(r,this._context.overlaySR),f="polygon"===r.type?"rings":"paths";this._logGeometryCreationWarnings(h,i,f,"LineSymbol3DLayer");for(const p of h.lines){if(m(p.position,n),!y(n,this._context.clippingExtent))continue;_(c,n);const i=this._createGeometry(a,e,p.position,void 0,r.type,0,t.uid),h=e=>{const r=this._context.layerViewUid,i=new G(e,{layerViewUid:r,graphicUid:t.uid});l.push(i)};if(null!=o){const t=i.instantiate({material:o});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),h(t);const r=this.symbolLayer.marker.placement;"begin"!==r&&"begin-end"!==r||d(n,p.position,0,1),"end"!==r&&"begin-end"!==r||d(n,p.position,p.position.length-3,1)}h(i),j.LINE_WIREFRAMES&&h(i.instantiate({material:s}))}return new C(this,l,c,this._context.drapeSourceRenderer)}get _patternHidesLine(){const e=this.symbolLayer.pattern;return null!=e&&"style"===e.type&&"none"===e.style}_computeMaterialWidth(e){return e=e??r(1),this._drivenProperties.size?this._fastUpdates?.visualVariables.size?i(1):1:i(e)}_prepareMaterialPatch(e,t,r){const i=t.material;if(null==i)return void(r.changed&&r.useMaterialColor&&B(this._getCombinedOpacityAndColor(this._materialColor),this._materials[4],e));if("collection"===i.type)return;const a="complete"===i.type?i.newValue?.color:"complete"===i.diff.color?.type?i.diff.color.newValue:null,s=this._getCombinedOpacityAndColor(a);r.useMaterialColor&&B(n(s),this._materials[4],e),this._patternHidesLine&&(s[3]=0),B(s,this._materials[0],e),delete t.material}_prepareMarkerPatch(e,t){const r=t.marker,i=this._markerMaterial;if(null==r||"partial"!==r.type||null==r.diff||null!=r.diff.placement||null!=r.diff.style&&"complete"!==r.diff.style.type||null!=r.diff.color&&"complete"!==r.diff.color.type||null==i)return{changed:!1,useMaterialColor:null==this._markerColor};const a=r.diff.color,s=null!=a,o=s?a.newValue:null,l=null==o&&null==this._markerColor;o&&B(this._getCombinedOpacityAndColor(o),i,e);const n=r.diff.style?.newValue;return n&&e.symbolLayerStatePatches.push(()=>i.setParameters({markerPrimitive:L(n)})),delete t.marker,{changed:s,useMaterialColor:l}}_fastVisualVariableConvertOptions(e=!1){const t=this._getFallbackSize();return new U({supports:{size:!0,color:!0,rotation:!1,opacity:!0},fallbackColor:e?this._getFallbackMarkerOpacityAndColor(k):this._getFallbackOpacityAndColor(k),fallbackSize:a(t,t,t)})}_getFallbackOpacityAndColor(t){return e.toUnitRGBA(this._materialColor)??t}_getFallbackOpacity(){return this._materialColor?.a??0}_getFallbackMarkerOpacityAndColor(t){const r=this.symbolLayer?.marker?.color;return e.toUnitRGBA(r)??this._getFallbackOpacityAndColor(t)}_getFallbackMarkerOpacity(){return this.symbolLayer?.marker?.color?.a??this._getFallbackOpacity()}_getFallbackSize(){const e=this.symbolLayer?.size;return null!=e?i(e):1}}function H(e){switch(e.type){case"extent":if(e instanceof c)return h.fromExtent(e);break;case"polygon":case"polyline":return e}return null}function B(e,t,r){null!=t&&r.symbolLayerStatePatches.push(()=>t.setParameters({color:e}))}function T(e){const t=e.material?.color,r=e.marker?.color??t;return 1===(t?.a??0)&&1===(r?.a??0)}export{W as Graphics3DLineSymbolLayer};
|
|
5
|
+
import e from"../../../../Color.js";import t from"../../../../core/Error.js";import{px2pt as r,pt2px as i}from"../../../../core/screenUtils.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as s}from"../../../../chunks/vec42.js";import{ZEROS as o,ones as l,clone as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import c from"../../../../geometry/Extent.js";import h from"../../../../geometry/Polygon.js";import{create as p,fromBuffer as m,intersectsClippingArea as y,empty as _,expandWithAABB as d,expandWithBuffer as u}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as g}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as f}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as b,needsElevationUpdates2D as v}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as C}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as P}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as M,nanFallbackColor as k}from"./Graphics3DSymbolLayer.js";import{parseCapType as w,parseLineMarkerStyle as L}from"./lineUtils.js";import{initFastSymbolUpdatesState as S,updateFastSymbolUpdatesState as x,getAttributeValue as z,ConvertOptions as U}from"../support/FastSymbolUpdates.js";import{debugFlags as j}from"../../support/debugFlags.js";import{createGeometry as V}from"../../support/engineContent/line.js";import{geometryToRenderInfo as O,geometryToRenderInfoDraped as A}from"../../support/renderInfoUtils/line.js";import{Object3D as E}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as G}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as D}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as F}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";const I=["polyline","polygon","extent"];class W extends M{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i,T(t))}async doLoad(){this._fastUpdates=S(this._context.renderer,this._fastVisualVariableConvertOptions());const e=!0;if(this._fastMarkerUpdates=S(this._context.renderer,this._fastVisualVariableConvertOptions(e)),!this._drivenProperties.size){if((null!=this.symbolLayer.size?this.symbolLayer.size:r(1))<0)throw new t("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values")}}_getMaterialParameters(e,t){const r=this._screenSizePerspective,i={...this._getMaterialColorParameters(t),width:this._computeMaterialWidth(this.symbolLayer?.size),hasPolygonOffset:!0,join:this.symbolLayer.join||"miter",cap:w(this.symbolLayer.cap||"butt"),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:F(this.symbolLayer.pattern),emissiveStrength:this._emissiveStrength??0,screenSizePerspective:r};return 4===t&&this._fastMarkerUpdates?.visualVariables?{...i,...this._fastMarkerUpdates.materialParameters}:this._fastUpdates?.visualVariables?{...i,...this._fastUpdates.materialParameters}:i}_getMaterialColorParameters(e){const t=4===e,r=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);return this._patternHidesLine&&!t&&(r[3]=0),{color:r}}get _materialColor(){return this.symbolLayer.material?.color}get _emissiveStrength(){return this.symbolLayer.material?.emissive?.strength}get _markerColor(){return this.symbolLayer.marker?.color}get _lineMaterial(){return null==this._materials[0]&&(this._materials[0]=new R(this._getMaterialParameters(!1,0),this.view.state.isGlobal)),this._materials[0]}get _ringMaterial(){return null==this._materials[1]&&(this._materials[1]=new R(this._getMaterialParameters(!0,1),this.view.state.isGlobal)),this._materials[1]}get _wireframeLineMaterial(){return null==this._materials[2]&&(this._materials[2]=new R({...this._getMaterialParameters(!1,2),wireframe:!0},this.view.state.isGlobal)),this._materials[2]}get _wireframeRingMaterial(){return null==this._materials[3]&&(this._materials[3]=new R({...this._getMaterialParameters(!0,3),wireframe:!0},this.view.state.isGlobal)),this._materials[3]}get _markerMaterial(){return null==this._materials[4]&&null!=this.symbolLayer.marker&&(this._materials[4]=new D({...this._getMaterialParameters(!1,4),placement:this.symbolLayer.marker.placement,markerPrimitive:L(this.symbolLayer.marker.style)},this.view.state.isGlobal)),this._materials[4]}_getDrivenSize(e){if(this._drivenProperties.size){const t=e.size;return null!=t?i(g(t)):this._getFallbackSize()}return 1}_getDrivenColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(s(r,e??this._getFallbackOpacityAndColor(o)),null==t)||this._drivenProperties.opacity&&(e||this._materialColor)&&(r[3]=t??this._getFallbackOpacity()),r}_getDrivenMarkerColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(s(r,e??this._getFallbackMarkerOpacityAndColor(o)),null==t)||this._drivenProperties.opacity&&(e||this._markerColor||this._materialColor)&&(r[3]=t??this._getFallbackMarkerOpacity()),r}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,I,this.symbolLayer.type))return null;const r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.draped?this._createAsOverlay(e):this._createAs3DShape(e,r,t.uid)}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;{const e=this._fastUpdates;if(!x(e,t,this._fastVisualVariableConvertOptions()))return 0;for(const t of this._materials)t instanceof R&&t.setParameters(e.materialParameters);const r=this._fastMarkerUpdates,i=!0;if(!x(r,t,this._fastVisualVariableConvertOptions(i)))return 0;for(const t of this._materials)t instanceof D&&t.setParameters(r.materialParameters)}}return 2}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff,r={};"complete"===t.size?.type&&(r.width=this._computeMaterialWidth(t.size.newValue),delete t.size),"complete"===t.cap?.type&&(r.cap=w(t.cap.newValue??"butt"),delete t.cap);const i=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,i),e.symbolLayerStatePatches.push(()=>{for(const e of this._materials)e?.setParameters(r)})}layerOpacityChanged(){for(let e=0;e<5;e++)this._materials[e]?.setParameters(this._getMaterialColorParameters(e))}get _screenSizePerspective(){return!this.draped&&this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null}layerScreenSizePerspectiveChanged(){const e=this._screenSizePerspective;for(const t of this._materials)t?.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=b(W.elevationModeChangeTypes,r,i);if(1!==a)return a;const s=v(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>s)}slicePlaneEnabledChanged(){const e={hasSlicePlane:this._context.slicePlaneEnabled};for(const t of this._materials)t?.setParameters(e);return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,r){const i=H(e.graphic.geometry),a="polygon"===i.type?i.rings:i.paths,s=new Array,o=p(),l=O(i,this._context.elevationProvider,this._context.renderCoordsHelper,t),n="polygon"===i.type?"rings":"paths";this._logGeometryCreationWarnings(l,a,n,"LineSymbol3DLayer");for(let p=0;p<l.lines.length;p++){const t=l.lines[p],a=t.position,n=t.mapPositions;if(null!=this._context.clippingExtent&&(m(n,o),!y(o,this._context.clippingExtent)))continue;const c=this._createGeometry("polygon"===i.type?this._ringMaterial:this._lineMaterial,e,a,n,i.type,1,r);if(s.push(c),j.LINE_WIREFRAMES&&s.push(c.instantiate({material:"polygon"===i.type?this._wireframeRingMaterial:this._wireframeLineMaterial})),null!=this._markerMaterial){const t=c.instantiate({material:this._markerMaterial});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),s.push(t)}}if(0===s.length)return null;const c=this._context.layerViewUid,h=new E({geometries:s,castShadow:!1,layerViewUid:c,graphicUid:r}),_=new P(this,h,null,f,t);return _.alignedSampledElevation=l.sampledElevation,_.needsElevationUpdates=v(t.mode),_}_createGeometry(e,t,r,i,a,s,o){const l=0===s?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,n="polygon"===a,c=this._fastUpdates?.visualVariables.color,h=this._fastUpdates?.visualVariables.size,p=this._fastUpdates?.visualVariables.opacity,m=this._context.layerViewUid,y=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:o,layerViewUid:m}),_={position:r,size:h?null:this._getDrivenSize(t.renderingInfo),color:c?null:this._getDrivenColor(t.renderingInfo),sizeFeature:h?z(h.field,t.graphic):null,colorFeature:c?z(c.field,t.graphic):null,opacityFeature:p?z(p.field,t.graphic):null};return V(e,{overlayInfo:l,removeDuplicateStartEnd:n,mapPositions:i,attributeData:_},y)}_createAsOverlay(e){const t=e.graphic,r=H(t.geometry),i="polygon"===r.type?r.rings:r.paths,a="polygon"===r.type?this._ringMaterial:this._lineMaterial;a.renderPriority=this._renderPriority;const s=j.LINE_WIREFRAMES?"polygon"===r.type?this._wireframeRingMaterial:this._wireframeLineMaterial:null,o=this._markerMaterial;null!=s&&(s.renderPriority=this._renderPriority-.001),null!=o&&(o.renderPriority=this._renderPriority-.002);const l=new Array,n=p(),c=_(),h=A(r,this._context.overlaySR),g="polygon"===r.type?"rings":"paths";this._logGeometryCreationWarnings(h,i,g,"LineSymbol3DLayer");for(const p of h.lines){if(m(p.position,n),!y(n,this._context.clippingExtent))continue;d(c,n);const i=this._createGeometry(a,e,p.position,void 0,r.type,0,t.uid),h=e=>{const r=this._context.layerViewUid,i=new G(e,{layerViewUid:r,graphicUid:t.uid});l.push(i)};if(null!=o){const t=i.instantiate({material:o});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),h(t);const r=this.symbolLayer.marker.placement;"begin"!==r&&"begin-end"!==r||u(n,p.position,0,1),"end"!==r&&"begin-end"!==r||u(n,p.position,p.position.length-3,1)}h(i),j.LINE_WIREFRAMES&&h(i.instantiate({material:s}))}return new C(this,l,c,this._context.drapeSourceRenderer)}get _patternHidesLine(){const e=this.symbolLayer.pattern;return null!=e&&"style"===e.type&&"none"===e.style}_computeMaterialWidth(e){return e=e??r(1),this._drivenProperties.size?this._fastUpdates?.visualVariables.size?i(1):1:i(e)}_prepareMaterialPatch(e,t,r){const i=t.material;if(null==i)return void(r.changed&&r.useMaterialColor&&B(this._getCombinedOpacityAndColor(this._materialColor),this._materials[4],e));if("collection"===i.type)return;const a="complete"===i.type?i.newValue?.color:"complete"===i.diff.color?.type?i.diff.color.newValue:null,s=this._getCombinedOpacityAndColor(a);r.useMaterialColor&&B(n(s),this._materials[4],e),this._patternHidesLine&&(s[3]=0),B(s,this._materials[0],e),delete t.material}_prepareMarkerPatch(e,t){const r=t.marker,i=this._markerMaterial;if(null==r||"partial"!==r.type||null==r.diff||null!=r.diff.placement||null!=r.diff.style&&"complete"!==r.diff.style.type||null!=r.diff.color&&"complete"!==r.diff.color.type||null==i)return{changed:!1,useMaterialColor:null==this._markerColor};const a=r.diff.color,s=null!=a,o=s?a.newValue:null,l=null==o&&null==this._markerColor;o&&B(this._getCombinedOpacityAndColor(o),i,e);const n=r.diff.style?.newValue;return n&&e.symbolLayerStatePatches.push(()=>i.setParameters({markerPrimitive:L(n)})),delete t.marker,{changed:s,useMaterialColor:l}}_fastVisualVariableConvertOptions(e=!1){const t=this._getFallbackSize();return new U({supports:{size:!0,color:!0,rotation:!1,opacity:!0},fallbackColor:e?this._getFallbackMarkerOpacityAndColor(k):this._getFallbackOpacityAndColor(k),fallbackSize:a(t,t,t)})}_getFallbackOpacityAndColor(t){return e.toUnitRGBA(this._materialColor)??t}_getFallbackOpacity(){return this._materialColor?.a??0}_getFallbackMarkerOpacityAndColor(t){const r=this.symbolLayer?.marker?.color;return e.toUnitRGBA(r)??this._getFallbackOpacityAndColor(t)}_getFallbackMarkerOpacity(){return this.symbolLayer?.marker?.color?.a??this._getFallbackOpacity()}_getFallbackSize(){const e=this.symbolLayer?.size;return null!=e?i(e):1}}function H(e){switch(e.type){case"extent":if(e instanceof c)return h.fromExtent(e);break;case"polygon":case"polyline":return e}return null}function B(e,t,r){null!=t&&r.symbolLayerStatePatches.push(()=>t.setParameters({color:e}))}function T(e){const t=e.material?.color,r=e.marker?.color??t;return 1===(t?.a??0)&&1===(r?.a??0)}export{W as Graphics3DLineSymbolLayer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../Color.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{pt2px as s}from"../../../../core/screenUtils.js";import{identity as r,scale as i,translate as a,copy as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{b as l,u as c,d as h,C as d,g as m,j as u}from"../../../../chunks/vec32.js";import{fromArray as p,ONES as f,create as y,ZEROS as _,fromValues as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ZEROS as b,ONES as v,create as P}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as x}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as R}from"../../../../geometry/projection/projectPointToVector.js";import{create as S,size as C,containsPoint as L,center as w}from"../../../../geometry/support/aaBoundingBox.js";import{getEmissiveMode as O}from"../../../../symbols/support/materialUtils.js";import{defaultPrimitive as j}from"../../../../symbols/support/ObjectSymbol3DLayerResource.js";import{objectSymbolLayerPrimitiveBoundingBox as U,objectSymbolLayerSizeWithResourceSize as E}from"../../../../symbols/support/symbolLayerUtils3D.js";import{estimateNumVerticesForLods as T,defaultSymbolLayerMemoryComplexity as G}from"./defaultSymbolComplexity.js";import{perLodInstanceElevationAligner as B}from"./ElevationAligners.js";import{needsElevationUpdates3D as z,SampleElevationInfo as D,evaluateElevationInfoAtPoint as V}from"./elevationAlignmentUtils.js";import{Graphics3DLodInstanceGraphicLayer as A}from"./Graphics3DLodInstanceGraphicLayer.js";import{Graphics3DSymbolLayer as F,nanFallbackColor as I}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as k,computeObjectScale as H,computeObjectRotation as M}from"./graphicUtils.js";import{makeLodResources as W}from"./lodResourceUtils.js";import{fetch as q}from"./objectResourceUtils.js";import{placePointOnGeometry as N,extendPointGraphicElevationContext as $}from"./pointUtils.js";import{isValidPrimitive as Z,primitiveLodResources as J}from"./primitiveObjectSymbolUtils.js";import{SymbolComplexity as K}from"./SymbolComplexity.js";import{getResourceUrlFromSymbolStyle as Q}from"./webStyleUtils.js";import{initFastSymbolUpdatesState as X,updateFastSymbolUpdatesState as Y,ConvertOptions as ee,evaluateModelTransformScale as te,evaluateModelTransform as se}from"../support/FastSymbolUpdates.js";import{VerticalOffsetParameters as re}from"../../webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{LodRenderer as ie}from"../../webgl-engine/lib/lodRendering/LodRenderer.js";import{DefaultMaterial as ae}from"../../webgl-engine/materials/DefaultMaterial.js";import{schematicMRRFactors as oe}from"../../webgl-engine/materials/pbrUtils.js";class ne{constructor(e,t,s,r,i,a,o,n,l,c,h=null){this.lodResources=e,this.lodRenderer=t,this.stageResources=s,this.resourceSize=r,this.isEsriSymbolResource=i,this.isWosr=a,this.resourceBoundingBox=o,this.symbolSize=n,this.extentPadding=l,this.physicalBasedRenderingEnabled=c,this.pivotOffset=h}}class le extends F{getCachedSize(){const[e,t,s]=null!=this._resources?this._resources.symbolSize:[1,1,1];return{width:e,depth:t,height:s}}constructor(e,t,s,r){super(e,t,s,r,de(t)),this._resources=null,this._instanceIndexToGraphicUid=new Map,this._hasLoadedPBRTextures=!1,this._disposeResourceHandles=new Array,this.skipHighSymbolLodsChanged=!1,this.ensureDrapedStatus(!1),this._hasLoadedPBRTextures=s.physicalBasedRenderingEnabled}async doLoad(e){if(!this._drivenProperties.size){const e=k(this.symbolLayer);if(e)throw new Error(e)}if(this._isPrimitive){const t=this.symbolLayer.resource,s=t&&Z(t?.primitive)?t.primitive:j;this._resources=await this._createResourcesForPrimitive(s,e)}else{const t=await Q(this.symbol.styleOrigin),s=t?.href??this.symbolLayer.resource?.href;this._resources=await this._createResourcesForUrl(s,e)}this.layerOpacityChanged(),this.slicePlaneEnabledChanged(),this.physicalBasedRenderingChanged(),this.updateComplexity()}get extentPadding(){return null!=this._resources?this._resources.extentPadding:0}get _isPrimitive(){return null!=this._primitive}get lodRenderer(){return this._resources?.lodRenderer}get materials(){return this._resources?.stageResources.materials??[]}async _createResourcesForPrimitive(t,s){const r=this.symbolLayer,i=S(U(t)),a=p(C(i)),o=p(E(a,r)),n=l(o),c=!1,h=!1,d=r?.material,m={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:oe,ambient:f,diffuse:f,opacity:1,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:r.castShadows,emissiveStrength:d?.emissive?.strength??0,emissiveSource:1,offsetTransparentBackfaces:!1,drivenOpacity:this.needsDrivenTransparentPass},u=!!m.usePBR,y=this.symbol;"point-3d"===y.type&&y.verticalOffset&&(m.verticalOffset=new re(y.verticalOffset),m.castShadows=!1),this._context.screenSizePerspectiveEnabled&&(m.screenSizePerspective=this.view.screenSizePerspective.parameters),this._hasDrivenColorOrOpacity?m.externalColor=I:m.externalColor=e.toUnitRGBA(this._materialColor)??b,this._fastUpdates=X(this._context.renderer,this._fastVisualVariableConvertOptions(i,o,a,null)),m.instanced=!0,this._fastUpdates?(Object.assign(m,this._fastUpdates.materialParameters),m.instancedFeatureAttribute=!0):this._hasDrivenColorOrOpacity&&(m.instancedColor=!0);const _=new ae(m,this._context);_.setParameters({cullFace:me(_.transparent)});const g=J(t,_);if(!g)throw new Error(`Unknown object symbol primitive: ${t}`);const v=await this._createStageResources(g,u,s),P=await this._createLodRenderer(g,s);return new ne(g,P,v,a,c,h,i,o,n,u)}async _createResourcesForUrl(e,t){const r={instanced:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows},i={spherical:this._context.spherical,materialParameters:r,streamDataRequester:this._context.streamDataRequester,cache:this._context.sharedResources.objectResourceCache,compressionOptions:{compressionTracker:this._context.compressionTracker,compressionCallback:()=>this.updateComplexity()}};this._fastUpdates=X(this._context.renderer,this._fastVisualVariableConvertOptions(null,null,null,null)),this._fastUpdates?(Object.assign(i.materialParameters,this._fastUpdates.materialParameters),i.materialParameters.instancedFeatureAttribute=!0):this._hasDrivenColorOrOpacity&&(i.materialParameters.instancedColor=!0);const a=this.symbol;if("point-3d"===a.type&&a.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=a.verticalOffset;i.materialParameters.verticalOffset={screenLength:s(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0},i.materialParameters.castShadows=!1}const o=this._context.physicalBasedRenderingEnabled;i.signal=t,i.usePBR=o,i.skipHighLods=this._context.skipHighSymbolLods;const n=await q(e,i),c=n.isEsriSymbolResource,h=n.isWosr,d=W(n.lods),m=this._context,u=this.symbolLayer.material,f=this._getExternalColorParameters(u),y=this.needsDrivenTransparentPass,_=d.getMaterials();_.forEach(e=>{e.setParameters({...f,drivenOpacity:y}),m.screenSizePerspectiveEnabled&&e.setParameters({screenSizePerspective:this.view.screenSizePerspective.parameters})});const g=n.referenceBoundingBox,b=p(C(g)),v=p(d.levels[0].pivotOffset),P=p(E(b,this.symbolLayer)),x=l(P),R=this._fastUpdates;Y(R,this._context.renderer,this._fastVisualVariableConvertOptions(g,P,b,v))&&_.forEach(e=>e.setParameters(R.materialParameters));const S=await this._createStageResources(d,o,t),L=await this._createLodRenderer(d,t);return new ne(d,L,S,b,c,h,g,P,x,o,v)}_addDisposeResource(e){this._disposeResourceHandles.push(e)}async _createStageResources(e,s,r){const i=this._context.stage,a=e.getMaterials();s!==this._context.physicalBasedRenderingEnabled&&this.physicalBasedRenderingChanged();const o=e.getTextures();i.addTextures(o),this._addDisposeResource(()=>{o.forEach(e=>e.unload()),i.removeTextures(o)}),await Promise.all(o.map(e=>this._context.stage.schedule(()=>e.load(i.renderView.renderingContext),r))),t(r);const n=e.getEngineGeometries();return{materials:a,textures:o,geometries:n}}async _createLodRenderer(e,t){const s=this._context.stage,r={layerViewUid:this._context.layerViewUid,graphicUid:e=>this._instanceIndexToGraphicUid.get(e),notifyGraphicGeometryChanged:e=>this._context.notifyGraphicGeometryChanged(this._instanceIndexToGraphicUid.get(e)),notifyGraphicVisibilityChanged:e=>this._context.notifyGraphicVisibilityChanged(this._instanceIndexToGraphicUid.get(e))},i=this._fastUpdates,a=new ie({symbol:e,metadata:r,shaderTransformation:i?{applyTransform:(e,t,s)=>{e.getFeatureAttribute(t,ye),o(s,se(i.materialParameters,ye,s))},scaleFactor:(e,t,s)=>{t.getFeatureAttribute(s,ye),te(e,i.materialParameters,ye)}}:null},this._context.scheduler);return a.slicePlaneEnabled=this._context.slicePlaneEnabled,this._addDisposeResource(()=>{s.removeRenderPlugin(a),a.destroy()}),await s.addRenderPlugin(a,t),a}_getExternalColorParameters(t){const s={};if(s.externalColor=I,!this._drivenProperties.color&&null!=t?.color){const r=e.toUnitRGBA(t.color);this._drivenProperties.opacity&&(r[3]=NaN),s.externalColor=r}return s.emissiveStrength=t?.emissive?.strength??1,s.emissiveSource=O(t?.emissive?.source??"emissive"),s}destroy(){super.destroy(),this._cleanupResources()}_cleanupResources(){this._disposeResourceHandles.forEach(e=>e()),this._disposeResourceHandles.length=0,this._resources=null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry))return null;const s=N(t.geometry);if(null==s)return this.logger.warn(`unsupported geometry type for object symbol: ${t.geometry.type}`),null;const r=this.createElevationContextForGraphic(t),i=e.renderingInfo;return this._createAs3DShape(t,s,i,r,t.uid)}notifyDestroyGraphicLayer(e){this._instanceIndexToGraphicUid.delete(e.instanceIndex)}graphicLayerToGraphicId(){return 0}layerOpacityChanged(){if(null==this._resources)return;const e=this._getLayerOpacity(),t=this._resources.stageResources.materials;for(let s=0;s<t.length;s++){const r=t[s];r.setParameters({layerOpacity:e}),this._isPrimitive&&r.setParameters({cullFace:me(r.transparent)})}}layerScreenSizePerspectiveChanged(){if(null==this._resources)return;const e=this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null;for(const t of this._resources.stageResources.materials)t.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,z)}slicePlaneEnabledChanged(){if(null==this._resources)return!0;this._resources.lodRenderer.slicePlaneEnabled=this._context.slicePlaneEnabled;for(const e of this._resources.stageResources.materials)e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled});return!0}physicalBasedRenderingChanged(){if(null==this._resources)return!0;const{stageResources:e,isWosr:t}=this._resources;for(const s of e.materials)this._isPrimitive?s.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}):t||s.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!1});return!1!==this._hasLoadedPBRTextures||!0!==this._context.physicalBasedRenderingEnabled||(this._hasLoadedPBRTextures=!0,!1)}applyRendererDiff(e,t){if(null==this._resources)return 0;const{stageResources:{materials:s},lodRenderer:r,resourceBoundingBox:i,symbolSize:a,resourceSize:o,pivotOffset:n}=this._resources;for(const l in e.diff){if("visualVariables"!==l)return 0;if(!Y(this._fastUpdates,t,this._fastVisualVariableConvertOptions(i,a,o,n)))return 0;for(const e of s)e.setParameters(this._fastUpdates.materialParameters);r.notifyShaderTransformationChanged()}return 2}computeComplexity(){if(null==this._resources)return super.computeComplexity();const e=this._resources.lodResources,t=T(e.levels),s=e.computeUsedMemory(),r={...G(this.symbol,this.symbolLayer),resourceBytes:s};return new K({verticesPerFeature:t,memory:r})}_hasLodRenderer(){return null!=this._resources}_createAs3DShape(e,t,s,r,i){if(!this._hasLodRenderer()||null==this._resources)return null;const a=this.getFastUpdateAttrValues(e),o=this._context.clippingExtent;if(R(t,ue,this._context.elevationProvider.spatialReference),null!=o&&!L(o,ue))return null;const n=he(r),l=this._computeGlobalTransform(t,r,fe,_e),c=this._computeLocalTransform(this._resources,this.symbolLayer,s,pe),h=this._resources.lodRenderer.instanceData,d=h.addInstance();this._instanceIndexToGraphicUid.set(d,i),h.setLocalTransform(d,c,!1),h.setGlobalTransform(d,l),a&&h.setFeatureAttribute(d,a),null==this._fastUpdates&&this._hasDrivenColorOrOpacity&&h.setColor(d,this._getDrivenUInt8ColorWithNaNSupport(s,this._materialColor,!this._isPrimitive));const m=this._context.stage.renderView.olidRenderHelper;if(m){const e=m.getObjectAndLayerIdColor({graphicUid:i,layerViewUid:this._context.layerViewUid});h.setObjectAndLayerIdColor(d,e)}const u=new A(this,d,B,r,this._context.stage.view.state.highlightOrderMap);return n&&(u.alignedSampledElevation=_e.sampledElevation),u.needsElevationUpdates=z(r.mode),$(u,t,this._context.elevationProvider),u}_computeGlobalTransform(e,t,s,r){return V(e,this._context.elevationProvider,t,this._context.renderCoordsHelper,r),ue[0]=e.x,ue[1]=e.y,ue[2]=r.z,x(e.spatialReference,ue,s,this._context.renderCoordsHelper.spatialReference),s}_computeLocalTransform(e,t,s,i){return r(i),this._applyObjectRotation(s,!1,i),this._applyObjectRotation(t,!0,i),this._applyObjectScale(e,s,i),this._applyAnchor(e,t,i),i}_applyObjectScale(e,t,s){if(this._fastUpdates?.requiresShaderTransformation)return;const r=this._drivenProperties.size&&t.size?t.size:e.symbolSize,a=H(r,e.symbolSize,e.resourceSize,this._context.renderCoordsHelper.unitInMeters);1===a[0]&&1===a[1]&&1===a[2]||i(s,s,a)}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff;this._preparePatchTransform(e,t),this._preparePatchColor(e,t)}updateGeometry(e,t){if(null==this._resources)return!0;const s=e.geometry;if(!s)return!1;const r=N(s);if(null==r)return!1;const i=this.getGeometryElevationMode(s),{elevationContext:a}=t;return a.mode===i&&(a.updateFeatureExpressionFeature(e,this._context.layer),this._computeGlobalTransform(r,a,fe,_e),he(a)&&(t.alignedSampledElevation=_e.sampledElevation),this._resources.lodRenderer.instanceData.setGlobalTransform(t.instanceIndex,fe,!0),$(t,r,this._context.elevationProvider),!0)}_preparePatchTransform(e,t){if(!(t.heading||t.tilt||t.roll||t.width||t.height||t.depth||t.anchor||t.anchorPosition))return;if(null==this._resources)return;const s=(e,t,s)=>(null!=e&&"complete"===e.type?e.newValue:t)??s,r=s(t.heading,this.symbolLayer.heading,0),i=s(t.tilt,this.symbolLayer.tilt,0),a=s(t.roll,this.symbolLayer.roll,0),o=s(t.width,this.symbolLayer.width,void 0),n=s(t.height,this.symbolLayer.height,void 0),l=s(t.depth,this.symbolLayer.depth,void 0),c=s(t.anchor,this.symbolLayer.anchor,void 0),h=s(t.anchorPosition,this.symbolLayer.anchorPosition,void 0);delete t.heading,delete t.tilt,delete t.roll,delete t.width,delete t.height,delete t.depth,delete t.anchor,delete t.anchorPosition;const d={heading:r,tilt:i,roll:a,anchor:c,anchorPosition:h},m=this._resources;1===this.loadStatus&&e.symbolLayerStatePatches.push(()=>{m.symbolSize=p(E(m.resourceSize,{width:o,height:n,depth:l,isPrimitive:this._isPrimitive}))}),e.graphics3DGraphicPatches.push(({instanceIndex:e},t)=>{const s=this._computeLocalTransform(m,d,t,pe);m.lodRenderer.instanceData.setLocalTransform(e,s,!0)})}_preparePatchColor(t,s){if(!s.material||"partial"!==s.material.type)return;const r=s.material.diff;if(!r.color||"complete"!==r.color.type||null==r.color.newValue||null==r.color.oldValue)return;const i=r.color.newValue,a=null!=i?e.toUnitRGBA(i):v;delete r.color;const o=this._resources;if(null==o)return;const n=this._isPrimitive;t.graphics3DGraphicPatches.push(({instanceIndex:e})=>{if(this._hasDrivenColorOrOpacity)o.lodRenderer.instanceData.setColor(e,a);else{const e={externalColor:a};for(const t of o.stageResources.materials)t.setParameters(e),n&&t.setParameters({cullFace:me(t.transparent)})}})}_applyObjectRotation(e,t,s){if(!this._fastUpdates?.requiresShaderTransformation||!t)return M(e.heading,e.tilt,e.roll,s)}_applyAnchor(e,t,s){if(this._fastUpdates?.requiresShaderTransformation)return;const r=ce(e.resourceBoundingBox,e.pivotOffset,t);r&&a(s,s,r)}_fastVisualVariableConvertOptions(e,t,s,r){const i=null!=e?p(C(e)):f,a=null!=e?ce(e,r,this.symbolLayer):_,o=this._context.renderCoordsHelper.unitInMeters,n=H(null!=t?t:void 0,t,s,o),l=g(this.symbolLayer.tilt||0,this.symbolLayer.roll||0,this.symbolLayer.heading||0);return new ee({supports:{size:!0,color:!0,rotation:!0,opacity:!1},modelSize:i,symbolSize:t??f,unitInMeters:o,anchor:a,scale:n,rotation:l,fallbackColor:this._getFallbackOpacityAndColor(),fallbackSize:n})}get _primitive(){const{resource:e}=this.symbolLayer;return null!=e?.href?null:e?.primitive??j}_getFallbackOpacityAndColor(){return e.toUnitRGBA(this._materialColor)??(this._isPrimitive?b:I)}get _materialColor(){return this.symbolLayer.material?.color}}function ce(e,t,s){const r=y();switch(s.anchor){case"center":h(r,w(e)),c(r,r);break;case"top":{const t=w(e);u(r,-t[0],-t[1],-e[5]);break}case"bottom":{const t=w(e);u(r,-t[0],-t[1],-e[2]);break}case"relative":{const t=w(e),i=C(e),a=s.anchorPosition,o=a?g(a.x,a.y,a.z):_;d(r,i,o),m(r,r,t),c(r,r);break}default:null!=t?c(r,t):h(r,_)}return r}function he(e){return"absolute-height"!==e.mode}function de(e){return 1===(e.material?.color?.a??0)&&null==e.resource?.href}function me(e){return e?0:2}const ue=y(),pe=n(),fe=n(),ye=P(),_e=new D;export{le as Graphics3DObjectSymbolLayer};
|
|
5
|
+
import e from"../../../../Color.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{pt2px as s}from"../../../../core/screenUtils.js";import{identity as r,scale as i,translate as a,copy as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{b as l,u as c,d as h,C as d,g as m,j as u}from"../../../../chunks/vec32.js";import{fromArray as p,ONES as f,create as y,ZEROS as _,fromValues as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ZEROS as b,ONES as v,create as P}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as x}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as R}from"../../../../geometry/projection/projectPointToVector.js";import{create as S,size as C,containsPoint as L,center as w}from"../../../../geometry/support/aaBoundingBox.js";import{getEmissiveMode as O}from"../../../../symbols/support/materialUtils.js";import{defaultPrimitive as j}from"../../../../symbols/support/ObjectSymbol3DLayerResource.js";import{objectSymbolLayerPrimitiveBoundingBox as U,objectSymbolLayerSizeWithResourceSize as E}from"../../../../symbols/support/symbolLayerUtils3D.js";import{estimateNumVerticesForLods as T,defaultSymbolLayerMemoryComplexity as G}from"./defaultSymbolComplexity.js";import{perLodInstanceElevationAligner as B}from"./ElevationAligners.js";import{needsElevationUpdates3D as z,SampleElevationInfo as D,evaluateElevationInfoAtPoint as V}from"./elevationAlignmentUtils.js";import{Graphics3DLodInstanceGraphicLayer as A}from"./Graphics3DLodInstanceGraphicLayer.js";import{Graphics3DSymbolLayer as F,nanFallbackColor as I}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as k,computeObjectScale as H,computeObjectRotation as M}from"./graphicUtils.js";import{makeLodResources as W}from"./lodResourceUtils.js";import{fetch as N}from"./objectResourceUtils.js";import{placePointOnGeometry as q,extendPointGraphicElevationContext as $}from"./pointUtils.js";import{isValidPrimitive as Z,primitiveLodResources as J}from"./primitiveObjectSymbolUtils.js";import{SymbolComplexity as K}from"./SymbolComplexity.js";import{getResourceUrlFromSymbolStyle as Q}from"./webStyleUtils.js";import{initFastSymbolUpdatesState as X,updateFastSymbolUpdatesState as Y,ConvertOptions as ee,evaluateModelTransformScale as te,evaluateModelTransform as se}from"../support/FastSymbolUpdates.js";import{VerticalOffsetParameters as re}from"../../webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{LodRenderer as ie}from"../../webgl-engine/lib/lodRendering/LodRenderer.js";import{DefaultMaterial as ae}from"../../webgl-engine/materials/DefaultMaterial.js";import{schematicMRRFactors as oe}from"../../webgl-engine/materials/pbrUtils.js";class ne{constructor(e,t,s,r,i,a,o,n,l,c,h=null){this.lodResources=e,this.lodRenderer=t,this.stageResources=s,this.resourceSize=r,this.isEsriSymbolResource=i,this.isWosr=a,this.resourceBoundingBox=o,this.symbolSize=n,this.extentPadding=l,this.physicalBasedRenderingEnabled=c,this.pivotOffset=h}}class le extends F{getCachedSize(){const[e,t,s]=null!=this._resources?this._resources.symbolSize:[1,1,1];return{width:e,depth:t,height:s}}constructor(e,t,s,r){super(e,t,s,r,de(t)),this._resources=null,this._instanceIndexToGraphicUid=new Map,this._hasLoadedPBRTextures=!1,this._disposeResourceHandles=new Array,this.skipHighSymbolLodsChanged=!1,this.ensureDrapedStatus(!1),this._hasLoadedPBRTextures=s.physicalBasedRenderingEnabled}async doLoad(e){if(!this._drivenProperties.size){const e=k(this.symbolLayer);if(e)throw new Error(e)}if(this._isPrimitive){const t=this.symbolLayer.resource,s=t&&Z(t?.primitive)?t.primitive:j;this._resources=await this._createResourcesForPrimitive(s,e)}else{const t=await Q(this.symbol.styleOrigin),s=t?.href??this.symbolLayer.resource?.href;this._resources=await this._createResourcesForUrl(s,e)}this.layerOpacityChanged(),this.slicePlaneEnabledChanged(),this.physicalBasedRenderingChanged(),this.updateComplexity()}get extentPadding(){return null!=this._resources?this._resources.extentPadding:0}get _isPrimitive(){return null!=this._primitive}get lodRenderer(){return this._resources?.lodRenderer}get materials(){return this._resources?.stageResources.materials??[]}async _createResourcesForPrimitive(t,s){const r=this.symbolLayer,i=S(U(t)),a=p(C(i)),o=p(E(a,r)),n=l(o),c=!1,h=!1,d=r?.material,m={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:oe,ambient:f,diffuse:f,opacity:1,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:r.castShadows,emissiveStrength:d?.emissive?.strength??0,emissiveSource:1,offsetTransparentBackfaces:!1,drivenOpacity:this.needsDrivenTransparentPass},u=!!m.usePBR,y=this.symbol;"point-3d"===y.type&&y.verticalOffset&&(m.verticalOffset=new re(y.verticalOffset),m.castShadows=!1),this._context.screenSizePerspectiveEnabled&&(m.screenSizePerspective=this.view.screenSizePerspective.parameters),this._hasDrivenColorOrOpacity?m.externalColor=I:m.externalColor=e.toUnitRGBA(this._materialColor)??b,this._fastUpdates=X(this._context.renderer,this._fastVisualVariableConvertOptions(i,o,a,null)),m.instanced=!0,this._fastUpdates?(Object.assign(m,this._fastUpdates.materialParameters),m.instancedFeatureAttribute=!0):this._hasDrivenColorOrOpacity&&(m.instancedColor=!0);const _=new ae(m,this._context);_.setParameters({cullFace:me(_.transparent)});const g=J(t,_);if(!g)throw new Error(`Unknown object symbol primitive: ${t}`);const v=await this._createStageResources(g,u,s),P=await this._createLodRenderer(g,s);return new ne(g,P,v,a,c,h,i,o,n,u)}async _createResourcesForUrl(e,t){const r={instanced:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows},i={spherical:this._context.spherical,materialParameters:r,cache:this._context.sharedResources.objectResourceCache,compressionOptions:{compressionTracker:this._context.compressionTracker,compressionCallback:()=>this.updateComplexity()}};this._fastUpdates=X(this._context.renderer,this._fastVisualVariableConvertOptions(null,null,null,null)),this._fastUpdates?(Object.assign(i.materialParameters,this._fastUpdates.materialParameters),i.materialParameters.instancedFeatureAttribute=!0):this._hasDrivenColorOrOpacity&&(i.materialParameters.instancedColor=!0);const a=this.symbol;if("point-3d"===a.type&&a.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=a.verticalOffset;i.materialParameters.verticalOffset={screenLength:s(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0},i.materialParameters.castShadows=!1}const o=this._context.physicalBasedRenderingEnabled;i.signal=t,i.usePBR=o,i.skipHighLods=this._context.skipHighSymbolLods;const n=await N(e,i),c=n.isEsriSymbolResource,h=n.isWosr,d=W(n.lods),m=this._context,u=this.symbolLayer.material,f=this._getExternalColorParameters(u),y=this.needsDrivenTransparentPass,_=d.getMaterials();_.forEach(e=>{e.setParameters({...f,drivenOpacity:y}),m.screenSizePerspectiveEnabled&&e.setParameters({screenSizePerspective:this.view.screenSizePerspective.parameters})});const g=n.referenceBoundingBox,b=p(C(g)),v=p(d.levels[0].pivotOffset),P=p(E(b,this.symbolLayer)),x=l(P),R=this._fastUpdates;Y(R,this._context.renderer,this._fastVisualVariableConvertOptions(g,P,b,v))&&_.forEach(e=>e.setParameters(R.materialParameters));const S=await this._createStageResources(d,o,t),L=await this._createLodRenderer(d,t);return new ne(d,L,S,b,c,h,g,P,x,o,v)}_addDisposeResource(e){this._disposeResourceHandles.push(e)}async _createStageResources(e,s,r){const i=this._context.stage,a=e.getMaterials();s!==this._context.physicalBasedRenderingEnabled&&this.physicalBasedRenderingChanged();const o=e.getTextures();i.addTextures(o),this._addDisposeResource(()=>{o.forEach(e=>e.unload()),i.removeTextures(o)}),await Promise.all(o.map(e=>this._context.stage.schedule(()=>e.load(i.renderView.renderingContext),r))),t(r);const n=e.getEngineGeometries();return{materials:a,textures:o,geometries:n}}async _createLodRenderer(e,t){const s=this._context.stage,r={layerViewUid:this._context.layerViewUid,graphicUid:e=>this._instanceIndexToGraphicUid.get(e),notifyGraphicGeometryChanged:e=>this._context.notifyGraphicGeometryChanged(this._instanceIndexToGraphicUid.get(e)),notifyGraphicVisibilityChanged:e=>this._context.notifyGraphicVisibilityChanged(this._instanceIndexToGraphicUid.get(e))},i=this._fastUpdates,a=new ie({symbol:e,metadata:r,shaderTransformation:i?{applyTransform:(e,t,s)=>{e.getFeatureAttribute(t,ye),o(s,se(i.materialParameters,ye,s))},scaleFactor:(e,t,s)=>{t.getFeatureAttribute(s,ye),te(e,i.materialParameters,ye)}}:null},this._context.scheduler);return a.slicePlaneEnabled=this._context.slicePlaneEnabled,this._addDisposeResource(()=>{s.removeRenderPlugin(a),a.destroy()}),await s.addRenderPlugin(a,t),a}_getExternalColorParameters(t){const s={};if(s.externalColor=I,!this._drivenProperties.color&&null!=t?.color){const r=e.toUnitRGBA(t.color);this._drivenProperties.opacity&&(r[3]=NaN),s.externalColor=r}return s.emissiveStrength=t?.emissive?.strength??1,s.emissiveSource=O(t?.emissive?.source??"emissive"),s}destroy(){super.destroy(),this._cleanupResources()}_cleanupResources(){this._disposeResourceHandles.forEach(e=>e()),this._disposeResourceHandles.length=0,this._resources=null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry))return null;const s=q(t.geometry);if(null==s)return this.logger.warn(`unsupported geometry type for object symbol: ${t.geometry.type}`),null;const r=this.createElevationContextForGraphic(t),i=e.renderingInfo;return this._createAs3DShape(t,s,i,r,t.uid)}notifyDestroyGraphicLayer(e){this._instanceIndexToGraphicUid.delete(e.instanceIndex)}graphicLayerToGraphicId(){return 0}layerOpacityChanged(){if(null==this._resources)return;const e=this._getLayerOpacity(),t=this._resources.stageResources.materials;for(let s=0;s<t.length;s++){const r=t[s];r.setParameters({layerOpacity:e}),this._isPrimitive&&r.setParameters({cullFace:me(r.transparent)})}}layerScreenSizePerspectiveChanged(){if(null==this._resources)return;const e=this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null;for(const t of this._resources.stageResources.materials)t.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,z)}slicePlaneEnabledChanged(){if(null==this._resources)return!0;this._resources.lodRenderer.slicePlaneEnabled=this._context.slicePlaneEnabled;for(const e of this._resources.stageResources.materials)e.setParameters({hasSlicePlane:this._context.slicePlaneEnabled});return!0}physicalBasedRenderingChanged(){if(null==this._resources)return!0;const{stageResources:e,isWosr:t}=this._resources;for(const s of e.materials)this._isPrimitive?s.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}):t||s.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!1});return!1!==this._hasLoadedPBRTextures||!0!==this._context.physicalBasedRenderingEnabled||(this._hasLoadedPBRTextures=!0,!1)}applyRendererDiff(e,t){if(null==this._resources)return 0;const{stageResources:{materials:s},lodRenderer:r,resourceBoundingBox:i,symbolSize:a,resourceSize:o,pivotOffset:n}=this._resources;for(const l in e.diff){if("visualVariables"!==l)return 0;if(!Y(this._fastUpdates,t,this._fastVisualVariableConvertOptions(i,a,o,n)))return 0;for(const e of s)e.setParameters(this._fastUpdates.materialParameters);r.notifyShaderTransformationChanged()}return 2}computeComplexity(){if(null==this._resources)return super.computeComplexity();const e=this._resources.lodResources,t=T(e.levels),s=e.computeUsedMemory(),r={...G(this.symbol,this.symbolLayer),resourceBytes:s};return new K({verticesPerFeature:t,memory:r})}_hasLodRenderer(){return null!=this._resources}_createAs3DShape(e,t,s,r,i){if(!this._hasLodRenderer()||null==this._resources)return null;const a=this.getFastUpdateAttrValues(e),o=this._context.clippingExtent;if(R(t,ue,this._context.elevationProvider.spatialReference),null!=o&&!L(o,ue))return null;const n=he(r),l=this._computeGlobalTransform(t,r,fe,_e),c=this._computeLocalTransform(this._resources,this.symbolLayer,s,pe),h=this._resources.lodRenderer.instanceData,d=h.addInstance();this._instanceIndexToGraphicUid.set(d,i),h.setLocalTransform(d,c,!1),h.setGlobalTransform(d,l),a&&h.setFeatureAttribute(d,a),null==this._fastUpdates&&this._hasDrivenColorOrOpacity&&h.setColor(d,this._getDrivenUInt8ColorWithNaNSupport(s,this._materialColor,!this._isPrimitive));const m=this._context.stage.renderView.olidRenderHelper;if(m){const e=m.getObjectAndLayerIdColor({graphicUid:i,layerViewUid:this._context.layerViewUid});h.setObjectAndLayerIdColor(d,e)}const u=new A(this,d,B,r,this._context.stage.view.state.highlightOrderMap);return n&&(u.alignedSampledElevation=_e.sampledElevation),u.needsElevationUpdates=z(r.mode),$(u,t,this._context.elevationProvider),u}_computeGlobalTransform(e,t,s,r){return V(e,this._context.elevationProvider,t,this._context.renderCoordsHelper,r),ue[0]=e.x,ue[1]=e.y,ue[2]=r.z,x(e.spatialReference,ue,s,this._context.renderCoordsHelper.spatialReference),s}_computeLocalTransform(e,t,s,i){return r(i),this._applyObjectRotation(s,!1,i),this._applyObjectRotation(t,!0,i),this._applyObjectScale(e,s,i),this._applyAnchor(e,t,i),i}_applyObjectScale(e,t,s){if(this._fastUpdates?.requiresShaderTransformation)return;const r=this._drivenProperties.size&&t.size?t.size:e.symbolSize,a=H(r,e.symbolSize,e.resourceSize,this._context.renderCoordsHelper.unitInMeters);1===a[0]&&1===a[1]&&1===a[2]||i(s,s,a)}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff;this._preparePatchTransform(e,t),this._preparePatchColor(e,t)}updateGeometry(e,t){if(null==this._resources)return!0;const s=e.geometry;if(!s)return!1;const r=q(s);if(null==r)return!1;const i=this.getGeometryElevationMode(s),{elevationContext:a}=t;return a.mode===i&&(a.updateFeatureExpressionFeature(e,this._context.layer),this._computeGlobalTransform(r,a,fe,_e),he(a)&&(t.alignedSampledElevation=_e.sampledElevation),this._resources.lodRenderer.instanceData.setGlobalTransform(t.instanceIndex,fe,!0),$(t,r,this._context.elevationProvider),!0)}_preparePatchTransform(e,t){if(!(t.heading||t.tilt||t.roll||t.width||t.height||t.depth||t.anchor||t.anchorPosition))return;if(null==this._resources)return;const s=(e,t,s)=>(null!=e&&"complete"===e.type?e.newValue:t)??s,r=s(t.heading,this.symbolLayer.heading,0),i=s(t.tilt,this.symbolLayer.tilt,0),a=s(t.roll,this.symbolLayer.roll,0),o=s(t.width,this.symbolLayer.width,void 0),n=s(t.height,this.symbolLayer.height,void 0),l=s(t.depth,this.symbolLayer.depth,void 0),c=s(t.anchor,this.symbolLayer.anchor,void 0),h=s(t.anchorPosition,this.symbolLayer.anchorPosition,void 0);delete t.heading,delete t.tilt,delete t.roll,delete t.width,delete t.height,delete t.depth,delete t.anchor,delete t.anchorPosition;const d={heading:r,tilt:i,roll:a,anchor:c,anchorPosition:h},m=this._resources;1===this.loadStatus&&e.symbolLayerStatePatches.push(()=>{m.symbolSize=p(E(m.resourceSize,{width:o,height:n,depth:l,isPrimitive:this._isPrimitive}))}),e.graphics3DGraphicPatches.push(({instanceIndex:e},t)=>{const s=this._computeLocalTransform(m,d,t,pe);m.lodRenderer.instanceData.setLocalTransform(e,s,!0)})}_preparePatchColor(t,s){if(!s.material||"partial"!==s.material.type)return;const r=s.material.diff;if(!r.color||"complete"!==r.color.type||null==r.color.newValue||null==r.color.oldValue)return;const i=r.color.newValue,a=null!=i?e.toUnitRGBA(i):v;delete r.color;const o=this._resources;if(null==o)return;const n=this._isPrimitive;t.graphics3DGraphicPatches.push(({instanceIndex:e})=>{if(this._hasDrivenColorOrOpacity)o.lodRenderer.instanceData.setColor(e,a);else{const e={externalColor:a};for(const t of o.stageResources.materials)t.setParameters(e),n&&t.setParameters({cullFace:me(t.transparent)})}})}_applyObjectRotation(e,t,s){if(!this._fastUpdates?.requiresShaderTransformation||!t)return M(e.heading,e.tilt,e.roll,s)}_applyAnchor(e,t,s){if(this._fastUpdates?.requiresShaderTransformation)return;const r=ce(e.resourceBoundingBox,e.pivotOffset,t);r&&a(s,s,r)}_fastVisualVariableConvertOptions(e,t,s,r){const i=null!=e?p(C(e)):f,a=null!=e?ce(e,r,this.symbolLayer):_,o=this._context.renderCoordsHelper.unitInMeters,n=H(null!=t?t:void 0,t,s,o),l=g(this.symbolLayer.tilt||0,this.symbolLayer.roll||0,this.symbolLayer.heading||0);return new ee({supports:{size:!0,color:!0,rotation:!0,opacity:!1},modelSize:i,symbolSize:t??f,unitInMeters:o,anchor:a,scale:n,rotation:l,fallbackColor:this._getFallbackOpacityAndColor(),fallbackSize:n})}get _primitive(){const{resource:e}=this.symbolLayer;return null!=e?.href?null:e?.primitive??j}_getFallbackOpacityAndColor(){return e.toUnitRGBA(this._materialColor)??(this._isPrimitive?b:I)}get _materialColor(){return this.symbolLayer.material?.color}}function ce(e,t,s){const r=y();switch(s.anchor){case"center":h(r,w(e)),c(r,r);break;case"top":{const t=w(e);u(r,-t[0],-t[1],-e[5]);break}case"bottom":{const t=w(e);u(r,-t[0],-t[1],-e[2]);break}case"relative":{const t=w(e),i=C(e),a=s.anchorPosition,o=a?g(a.x,a.y,a.z):_;d(r,i,o),m(r,r,t),c(r,r);break}default:null!=t?c(r,t):h(r,_)}return r}function he(e){return"absolute-height"!==e.mode}function de(e){return 1===(e.material?.color?.a??0)&&null==e.resource?.href}function me(e){return e?0:2}const ue=y(),pe=n(),fe=n(),ye=P(),_e=new D;export{le as Graphics3DObjectSymbolLayer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../Color.js";import{pt2px as t}from"../../../../core/screenUtils.js";import{e as i}from"../../../../chunks/earcut.js";import{ZEROS as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromBuffer as s,create as o,intersectsClippingArea as n,empty as a,expandWithAABB as l}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as c,doubleSubArray as p}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as h,floatSubArray as u}from"../../../../geometry/support/FloatArray.js";import{elevationModeChangeUpdateType as d,needsElevationUpdates2D as m}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as _}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as g}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as y}from"./Graphics3DSymbolLayer.js";import{mixinColorAndOpacity as f}from"./graphicUtils.js";import{parseCapType as v}from"./lineUtils.js";import{geometryAsPolygon as b,createIndices3D as x,createColorGeometry as C,PolygonCreationDataBase as S}from"./polygonUtils.js";import{initFastSymbolUpdatesState as P,updateFastSymbolUpdatesState as D,getAttributeValue as O,ConvertOptions as U}from"../support/FastSymbolUpdates.js";import{createMaterial as j,uvElevationAligner as w}from"../support/patternUtils.js";import{createMapSpaceUVCoords as G,createMapSpaceUVCoordsDraped as A}from"../support/uvUtils.js";import{createGeometry as E}from"../../support/engineContent/line.js";import{
|
|
5
|
+
import e from"../../../../Color.js";import{pt2px as t}from"../../../../core/screenUtils.js";import{e as i}from"../../../../chunks/earcut.js";import{ZEROS as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromBuffer as s,create as o,intersectsClippingArea as n,empty as a,expandWithAABB as l}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as c,doubleSubArray as p}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as h,floatSubArray as u}from"../../../../geometry/support/FloatArray.js";import{elevationModeChangeUpdateType as d,needsElevationUpdates2D as m}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as _}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as g}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as y}from"./Graphics3DSymbolLayer.js";import{mixinColorAndOpacity as f}from"./graphicUtils.js";import{parseCapType as v}from"./lineUtils.js";import{geometryAsPolygon as b,createIndices3D as x,createColorGeometry as C,PolygonCreationDataBase as S}from"./polygonUtils.js";import{initFastSymbolUpdatesState as P,updateFastSymbolUpdatesState as D,getAttributeValue as O,ConvertOptions as U}from"../support/FastSymbolUpdates.js";import{createMaterial as j,uvElevationAligner as w}from"../support/patternUtils.js";import{createMapSpaceUVCoords as G,createMapSpaceUVCoordsDraped as A}from"../support/uvUtils.js";import{createGeometry as E}from"../../support/engineContent/line.js";import{polygonToRenderInfo as M,polygonToRenderInfoDraped as V}from"../../support/renderInfoUtils/polygon.js";import{Object3D as L}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as R}from"../../webgl-engine/lib/RenderGeometry.js";import{isScreenSizePerspectiveEnabled as z}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{getStipplePatternForLinePattern as B}from"../../webgl-engine/materials/lineStippleUtils.js";import{PatternMaterial as F}from"../../webgl-engine/materials/PatternMaterial.js";import{RibbonLineMaterial as I}from"../../webgl-engine/materials/RibbonLineMaterial.js";const T=["polyline","polygon","extent"];class H extends y{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,i,r){super(e,t,i,r,K(t)),this._needsUV=!1,this._materials=[]}async doLoad(){this._fastUpdates=P(this._context.renderer,this._vvConvertOptions)}get _materialColor(){return this.symbolLayer.material?.color}_createMaterials(){if(this._materials.length>0)return;const e=this._materialColor,i=this._getCombinedOpacityAndColor(e);this._materials[0]=j(this.symbolLayer,{color:i,forceTransparentMode:this.needsDrivenTransparentPass,discardInvisibleFragments:!0,polygonOffset:!1,hasVertexColors:!0,draped:this.draped,hasSlicePlane:this._context.slicePlaneEnabled,...this._fastUpdates?.materialParameters}),this._needsUV=this._materials[0]instanceof F;const r=this.symbolLayer.outline;if(J(r)){const e=B(r.pattern);this._materials[1]=new I({width:t(r.size),color:this._getOutlineColor(),hasPolygonOffset:!0,hasSlicePlane:this._context.slicePlaneEnabled,isClosed:!0,stipplePattern:e,cap:v(r.patternCap||"butt"),screenSizePerspective:this._outlineScreenSizePerspective},this.view.state.isGlobal)}}get _outlineScreenSizePerspective(){return!this.draped&&z(this._context.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,T,this.symbolLayer.type))return null;const i=this._getDrivenUInt8Color(e.renderingInfo,this._materialColor,!1),r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===r.mode),this._createMaterials(),this.draped?this._createAsOverlay(t,i):this._createAs3DShape(t,i,r)}applyRendererDiff(e,t){for(const i in e.diff){if("visualVariables"!==i)return 0;if(!D(this._fastUpdates,t,this._vvConvertOptions))return 0;this._materials[0]?.setParameters(this._fastUpdates.materialParameters)}return 2}layerOpacityChanged(){if(null!=this._materials[0]){const e=this._materials[0].parameters.color,t=this._materialColor,i=this._getCombinedOpacity(t);this._materials[0].setParameters({color:[e[0],e[1],e[2],i],forceTransparentMode:this.needsDrivenTransparentPass})}if(null!=this._materials[1]){const e=this._materials[1].parameters.color;this._materials[1].setParameters({color:[e[0],e[1],e[2],this._getOutlineOpacity()]})}}layerScreenSizePerspectiveChanged(){this._materials[1]?.setParameters({screenSizePerspective:this._outlineScreenSizePerspective})}layerElevationInfoChanged(e,t,i){const r=this._elevationContext.mode,s=d(H.elevationModeChangeTypes,i,r);if(1!==s)return s;const o=m(r);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>o)}slicePlaneEnabledChanged(){if(this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]){const e={hasSlicePlane:this._context.slicePlaneEnabled};this._materials[1].setParameters(e)}return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,i){const r=b(e.geometry);if(!r)return null;const s=M(r,this._context.elevationProvider,this._context.renderCoordsHelper,i),o=new W(s,t,this._context.layerViewUid,e.uid),n=o.renderData.position.length/3;if(this._needsUV&&(o.uvMapSpace=h(4*n,!0),o.boundingRect=c(9*n),G(o.uvMapSpace,o.boundingRect,o.renderData.position,this._context.renderCoordsHelper)),o.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(o),this._createAs3DShapeFill(e,o),this._materials[1]&&this._createAs3DShapeOutline(o),this._logGeometryCreationWarnings(o.renderData,r.rings,"rings","FillSymbol3DLayer"),0===o.outGeometries.length)return null;const a=new L({geometries:o.outGeometries,castShadow:!1,layerViewUid:this._context.layerViewUid,graphicUid:e.uid}),l=new g(this,a,null,w,i);return l.alignedSampledElevation=o.renderData.sampledElevation,l.needsElevationUpdates=m(i.mode),l}_createAs3DShapeFill(e,t){const i=t.renderData.polygons;for(const{position:r,mapPositions:o,holeIndices:a,index:l,count:c}of i){if(null!=this._context.clippingExtent&&(s(o,k),!n(k,this._context.clippingExtent)))continue;const i=x(o,a,this._context.elevationProvider.spatialReference);if(0===i.length)continue;const h=this._fastUpdates?.visualVariables.color,d=C({material:this._materials[0],indices:i,mapPositions:o,attributeData:{position:r,color:h?null:t.color,colorFeature:h?O(h.field,e):null,uvMapSpace:this._needsUV?u(t.uvMapSpace,4*l,4*c):null,boundingRect:this._needsUV?p(t.boundingRect,9*l,9*c):null,olidColor:t.olidColor}});t.outGeometries.push(d)}}_createAs3DShapeOutline(e){if(null==this._materials[1])return;const t=e.renderData.outlines;for(const{mapPositions:i,position:r}of t){if(null!=this._context.clippingExtent&&(s(i,k),!n(k,this._context.clippingExtent)))continue;const t=E(this._materials[1],{overlayInfo:null,removeDuplicateStartEnd:!0,mapPositions:i,attributeData:{position:r}},e.olidColor);e.outGeometries.push(t)}}_createAsOverlay(e,t){const i=b(e.geometry);if(null==i)return null;this._materials[0].renderPriority=this._renderPriority+this._renderPriorityStep/2,null!=this._materials[1]&&(this._materials[1].renderPriority=this._renderPriority);const r=V(i,this._context.overlaySR),s=new q(r,t,this._context.layerViewUid,e.uid),o=s.renderData.position.length/3;return this._needsUV&&(s.uvMapSpace=h(4*o,!0),A(s.uvMapSpace,s.renderData.position,this._context.overlaySR,this._context.graphicsCoreOwner.view.state.viewingMode)),s.outBoundingBox=a(),s.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(s),this._createAsOverlayFill(e,s),this._materials[1]&&this._createAsOverlayOutline(s),this._logGeometryCreationWarnings(s.renderData,i.rings,"rings","FillSymbol3DLayer"),0===s.outGeometries.length?null:new _(this,s.outGeometries,s.outBoundingBox,this._context.drapeSourceRenderer)}_createAsOverlayFill(e,t){const r=t.renderData.polygons;for(const{position:o,holeIndices:a,index:c,count:p}of r){const r=s(o,k);if(!n(r,this._context.clippingExtent))continue;const h=i(o,a,3);if(0===h.length)continue;l(t.outBoundingBox,r);const d=this._fastUpdates?.visualVariables.color,m=C({material:this._materials[0],indices:h,attributeData:{position:o,color:d?null:t.color,colorFeature:d?O(d.field,e):null,uvMapSpace:this._needsUV?u(t.uvMapSpace,4*c,4*p):null,olidColor:t.olidColor}});t.outGeometries.push(new R(m,t))}}_createAsOverlayOutline(e){if(null==this._materials[1])return;const t=e.renderData.outlines;for(let i=0;i<t.length;++i){const{position:r}=t[i];if(s(r,k),!n(k,this._context.clippingExtent))continue;l(e.outBoundingBox,k);const o=E(this._materials[1],{overlayInfo:{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper},removeDuplicateStartEnd:!0,attributeData:{position:r}},e.olidColor);e.outGeometries.push(new R(o,e))}}_getOutlineOpacity(){const e=this.symbolLayer?.outline?.color;return(this.draped?1:this._getLayerOpacity())*(null!=e?e.a:0)}_getOutlineColor(){const t=this.symbolLayer?.outline?.color,i=this._getOutlineOpacity();return f(null!=t?e.toUnitRGB(t):null,i)}test(){return{...super.test(),createAsOverlay:(e,t)=>this._createAsOverlay(e,t),createAs3DShape:(e,t,i)=>this._createAs3DShape(e,t,i)}}get _vvConvertOptions(){return new U({supports:{size:!1,color:!0,rotation:!1,opacity:!1},fallbackColor:e.toUnitRGBA(this._materialColor)??r})}}const k=o();class W extends S{constructor(e,t,i,r){super(e,i,r),this.color=t}}class q extends S{constructor(e,t,i,r){super(e,i,r),this.color=t}}function J(e){return null!=e?.size&&e.size>0&&null!=e.color&&(null==e.pattern||"style"!==e.pattern.type||"none"!==e.pattern.style)}function K(e){return 1===(e.material?.color?.a??0)}export{H as Graphics3DPolygonFillSymbolLayer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
class e{constructor(e,s,i,r){this.scheduler=e,this.schedule=s,this.layerViewUid=i,this.compressionTracker=r,this.sharedResources=null,this.
|
|
5
|
+
class e{constructor(e,s,i,r){this.scheduler=e,this.schedule=s,this.layerViewUid=i,this.compressionTracker=r,this.sharedResources=null,this.elevationProvider=null,this.renderer=null,this.stage=null,this.clippingExtent=null,this.renderCoordsHelper=null,this.overlaySR=null,this.layer=null,this.drapeSourceRenderer=null,this.graphicsCoreOwner=null,this.localOriginFactory=null,this.featureExpressionInfoContext=null,this.screenSizePerspectiveEnabled=!0,this.slicePlaneEnabled=!1,this.physicalBasedRenderingEnabled=!1,this.skipHighSymbolLods=!1,this.isAsync=!1}get spherical(){return 1===this.stage.view.state.viewingMode}}class s{constructor(){this.renderPriority=0,this.renderPriorityStep=1,this.ignoreDrivers=!1}}export{e as Graphics3DSymbolCreationContext,s as Graphics3DSymbolLayerCreationContext};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../Color.js";import{getMetersPerUnitForSR as t}from"../../../../core/unitUtils.js";import{e as r}from"../../../../chunks/earcut.js";import{set as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as o,create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c as s}from"../../../../chunks/vec42.js";import{toRadian as a}from"../../../../core/libs/gl-matrix-2/math/common.js";import{fromBuffer as l,create as c,intersectsClippingArea as h,empty as p,expandWithAABB as m}from"../../../../geometry/support/aaBoundingBox.js";import{empty as u,create as d,expandPointInPlace as g}from"../../../../geometry/support/aaBoundingRect.js";import{newFloatArray as y,floatSubArray as f}from"../../../../geometry/support/FloatArray.js";import{perVertexElevationAligner as v}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as x,needsElevationUpdates2D as _}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as w}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as D}from"./Graphics3DSymbolLayer.js";import{geometryAsPolygon as S,createWaterGeometry as C,PolygonCreationDataBase as j}from"./polygonUtils.js";import{
|
|
5
|
+
import e from"../../../../Color.js";import{getMetersPerUnitForSR as t}from"../../../../core/unitUtils.js";import{e as r}from"../../../../chunks/earcut.js";import{set as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as o,create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c as s}from"../../../../chunks/vec42.js";import{toRadian as a}from"../../../../core/libs/gl-matrix-2/math/common.js";import{fromBuffer as l,create as c,intersectsClippingArea as h,empty as p,expandWithAABB as m}from"../../../../geometry/support/aaBoundingBox.js";import{empty as u,create as d,expandPointInPlace as g}from"../../../../geometry/support/aaBoundingRect.js";import{newFloatArray as y,floatSubArray as f}from"../../../../geometry/support/FloatArray.js";import{perVertexElevationAligner as v}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as x,needsElevationUpdates2D as _}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as w}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as D}from"./Graphics3DSymbolLayer.js";import{geometryAsPolygon as S,createWaterGeometry as C,PolygonCreationDataBase as j}from"./polygonUtils.js";import{polygonToRenderInfo as G,polygonToRenderInfoDraped as P}from"../../support/renderInfoUtils/polygon.js";import{Object3D as L}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as O}from"../../webgl-engine/lib/RenderGeometry.js";import{Parameters as A,WaterMaterial as E}from"../../webgl-engine/materials/WaterMaterial.js";import{wavePresets as T}from"../../webgl-engine/materials/internal/waterMaterialUtils.js";const U=["polyline","polygon","extent"];class B extends D{static{this.unitSizeOfTexture=100}static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i)}async doLoad(){}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,U,this.symbolLayer.type))return null;const r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.ensureMaterial(),this.draped?this._createAsOverlay(t):this._createAs3DShape(t,r,t.uid)}ensureMaterial(){if(this._materials[0])return;const t=new A,r=e.toUnitRGBA(this.symbolLayer.color);r[3]*=this._getLayerOpacity(),t.color=r,t.transparent=r[3]<1||this.needsDrivenTransparentPass,t.waveDirection=null!=this.symbolLayer.waveDirection?M(this.symbolLayer.waveDirection):o(0,0);const i=this.symbolLayer.waveStrength+"-"+this.symbolLayer.waterbodySize,n=T[i];t.waveStrength=n.waveStrength,t.waveTextureRepeat=n.textureRepeat,t.waveVelocity=n.waveVelocity,t.flowStrength=n.perturbationStrength,t.hasSlicePlane=this._context.slicePlaneEnabled,t.draped=this.draped,this._materials[0]=new E(t,this._context)}layerOpacityChanged(){if(null==this._materials[0])return;const e=this._materials[0].parameters.color,t=this.symbolLayer.color.a*this._getLayerOpacity(),r=t<1||this.needsDrivenTransparentPass;this._materials[0].setParameters({color:[e[0],e[1],e[2],t],transparent:r})}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,o=x(B.elevationModeChangeTypes,r,i);if(1!==o)return o;const n=_(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>n)}slicePlaneEnabledChanged(){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return!0}get needsDrivenTransparentPass(){return!1}_createAs3DShape(e,t,r){const i=S(e.geometry);if(null==i)return null;const o=G(i,this._context.elevationProvider,this._context.renderCoordsHelper,t),n=o.position.length/3,s=y(2*n);R(s,o.mapPositions,n,this._context.elevationProvider.spatialReference);const a=new k(o,s,this._context.layerViewUid,e.uid);if(a.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(a),this._create3DShapeGeometries(a),this._logGeometryCreationWarnings(a.renderData,i.rings,"rings","WaterSymbol3DLayer"),0===a.outGeometries.length)return null;const l=new L({geometries:a.outGeometries,castShadow:!1,layerViewUid:this._context.layerViewUid,graphicUid:r}),c=new b(this,l,null,v,t);return c.alignedSampledElevation=a.renderData.sampledElevation,c.needsElevationUpdates=_(t.mode),c}_create3DShapeGeometries(e){const t=e.renderData.polygons,i=e.uvCoords;for(const{count:o,index:n,position:s,mapPositions:a,holeIndices:c}of t){if(null!=this._context.clippingExtent&&(l(a,W),!h(W,this._context.clippingExtent)))continue;const t=r(a,c,3);if(0===t.length)continue;const p=f(i,2*n,2*o),m=C({material:this._materials[0],indices:t,mapPositions:a,attributeData:{position:s,uv0:p}},e.olidColor);e.outGeometries.push(m)}}_createAsOverlay(e){const t=S(e.geometry);if(null==t)return null;this._materials[0].renderPriority=this._renderPriority;const r=P(t,this._context.overlaySR),i=r.position.length/3,o=y(2*i);R(o,r.position,i,this._context.overlaySR);const n=new F(r,o,this._context.layerViewUid,e.uid);return n.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(n),n.outBoundingBox=p(),this._createAsOverlayWater(n),this._logGeometryCreationWarnings(n.renderData,t.rings,"rings","WaterSymbol3DLayer"),0===n.outGeometries.length?null:new w(this,n.outGeometries,n.outBoundingBox,this._context.drapeSourceRenderer)}_createAsOverlayWater(e){const t=e.uvCoords,i=e.renderData.polygons;for(const{position:o,holeIndices:n,index:s,count:a}of i){if(l(o,W),!h(W,this._context.clippingExtent))continue;m(e.outBoundingBox,W);const i=r(o,n,3);if(0===i.length)continue;const c=f(t,2*s,2*a),p=C({material:this._materials[0],indices:i,attributeData:{position:o,uv0:c}},e.olidColor);e.outGeometries.push(new O(p,e))}}test(){return{...super.test(),create3DShape:e=>this._createAs3DShape(e.graphic,e.elevationContext,e.graphicUid),ensureMaterial:()=>this.ensureMaterial()}}}function M(e){const t=n(),r=a(e);return t[0]=Math.sin(r),t[1]=Math.cos(r),t}function R(e,r,o,n){const a=t(n);u(z);for(let t=0;t<o;t++)i(I,r[3*t],r[3*t+1]),g(z,I);s(z,z,a);const l=z[0]%B.unitSizeOfTexture,c=z[1]%B.unitSizeOfTexture;V[0]=z[0]-l,V[1]=z[1]-c;for(let t=0;t<o;t++)e[2*t]=(r[3*t]*a-V[0])/B.unitSizeOfTexture,e[2*t+1]=(r[3*t+1]*a-V[1])/B.unitSizeOfTexture}const V=n(),z=d(),I=n(),W=c();class k extends j{constructor(e,t,r,i){super(e,r,i),this.uvCoords=t}}class F extends j{constructor(e,t,r,i){super(e,r,i),this.uvCoords=t}}export{B as Graphics3DWaterSymbolLayer,M as headingVectorFromAngle};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{forEach as s,result as i}from"../../../../core/asyncUtils.js";import"../../../../core/has.js";import a from"../../../../core/Logger.js";import{disposeMaybe as l,abortMaybe as r}from"../../../../core/maybe.js";import{throwIfAborted as o,isAbortError as n}from"../../../../core/promiseUtils.js";import c from"../../../../core/Queue.js";import{watch as h}from"../../../../core/reactiveUtils.js";import{property as b}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromValues as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{hydrateGraphic as d}from"../../../../layers/graphics/hydratedFeatures.js";import{createLabelFunction as y}from"../../../../layers/support/labelFormatUtils.js";import{hasCalloutSupport as g}from"../../../../symbols/callouts/calloutUtils.js";import{make as f}from"./Graphics3DCalloutSymbolLayerFactory.js";import{LineCalloutCreationContext as m,LineCalloutSymbolLayerRenderingInfo as C}from"./Graphics3DLineCalloutSymbolLayer.js";import{getGraphics3DSymbol as x}from"./graphicSymbolUtils.js";import{LabelInfo as _}from"./LabelInfo.js";import{LabelParameters as L}from"./LabelParameters.js";import{horizontalPlacementFromAnchor as v,verticalPlacementFromAnchor as G,textRenderAlignmentFromHorizontalPlacement as w}from"./placementUtils.js";import{placePointOnGeometry as A}from"./pointUtils.js";import{TextRenderer as D}from"../../webgl-engine/lib/TextRenderer.js";import{TextRenderParameters as T}from"../../webgl-engine/lib/TextRenderParameters.js";import{TextTextureAtlas as I}from"../../webgl-engine/lib/TextTextureAtlas.js";import{WebGLLayer as S}from"../../webgl-engine/lib/WebGLLayer.js";import{hasLayerBasedScaleVisibility as P,isInEffectiveScaleRange as R}from"../../../support/layerViewUtils.js";import{TaskPriority as j}from"../../../support/Scheduler.js";import{Yield as V}from"../../../support/Yield.js";class O{constructor(e,t){this.labelingContext=e,this.graphics3DGraphic=t,this.hasGraphics3DResources=!1,this.visible=!1,this.textureAtlasHandles=[],this.textInitialized=!1,this.textRenderers=new Array,this.textLabelPlacements=new Array}}class z{constructor(e,t,s,i,a){this.labelClass=e,this.graphics3DSymbol=t,this.graphics3DCalloutSymbolLayer=s,this.textRenderParameters=i,this.labelFunction=a,this.calloutSymbolLayerIndex=0,this.graphics=new Map,this.scaleVisibility=null}}class E{constructor(e,t,s,i,a,l,r,o){this.layer=t,this.graphics3DCore=s,this.scaleVisibility=i,this.emptySymbolLabelSupported=a,this.elevationInfoOverride=l,this.disablePlacement=r,this.active=o,this.labelClassAbortController=new AbortController,this._labelClassContexts=new Array,this.graphics=new Map,this.labelsToInitialize=new Map,this.stageLayer=new S(e,{pickable:!0},s.owner.layerViewUid)}destroy(){this.stageLayer.destroy()}get labelClassContexts(){return this._labelClassContexts}setLabelClassContext(e,t){this._labelClassContexts[e]=t}resetLabelClassContext(){this._labelClassContexts.length=0}}let F=class extends t{constructor(e){super(e),this._hudMaterials=new Map,this._calloutMaterials=new Map,this._dirty=!1,this._focusAreasLabelsQueue=new c,this._labels=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this.addHandles([h(()=>this.view.state?.camera,()=>this.setDirty()),h(()=>this.view.state?.rasterPixelRatio,()=>this._resetAllLabels()),h(()=>this.view.focusAreasView?.polygons,()=>this._updateFocus()),this.view.resourceController.scheduler.registerTask(j.LABELER,this)]),P()&&this.addHandles(h(()=>this.view.scale,()=>this._updateScaleVisibility())),this._textTextureAtlas=new I({view:this.view})}dispose(){this.removeAllHandles(),this._textTextureAtlas=l(this._textTextureAtlas),this._hudMaterials.clear(),this._calloutMaterials.clear(),this._labelingContexts.length=0,this._labels.clear()}destroy(){this.dispose(),B.graphic=null,B.renderingInfo=null,B.layer=null}_updateFocus(){this._focusAreasLabelsQueue.clear(),this._labelingContexts.forEach(e=>{e.graphics.forEach(t=>{this._focusAreasLabelsQueue.push({graphic3DGraphic:t,labelingContext:e})})})}_activateLabelingContext(e){e.graphics.forEach((t,s)=>{const i=new O(e,t);this._labels.set(s,i),e.labelsToInitialize.set(s,i),t.setVisibilityFlag(16,1,!0)}),e.active=!0}_deactivateLabelingContext(e){e.graphics.forEach((e,t)=>{e.setVisibilityFlag(16,1,!1),this.setLabelGraphicVisibility(e,!1),e.clearLabelGraphics(),this._labels.delete(t)}),e.active=!1}_addLabelTextureToAtlas(e){if(this._textTextureAtlas)for(const t of e.graphics3DGraphic.labelLayers){if(!t.labelClass)continue;const s=e.textRenderers[t.labelClassContextIndex];s&&(e.textureAtlasHandles.push(this._textTextureAtlas.addText(s,e=>U(t.stageObject,e))),M(t.stageObject,s))}}_removeLabelTextureFromAtlas(e){e.textureAtlasHandles.forEach(e=>e.remove()),e.textureAtlasHandles.length=0}get readyToRun(){return this.view.ready&&(this._dirty||this.deconflictor.readyToRun||this._focusAreasLabelsQueue.length>0)}runTask(e){return this._updateLabels(e),this._applyFocusAreasUpdates(e),!this._dirty&&this.deconflictor.readyToRun&&this.deconflictor.runTask(e),V}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(t.active)if(H(t))this._dirty=!0;else if(Q(t.labelClassContexts)){if(null===t.labelClassContexts){this._deactivateLabelingContext(t);continue}this._createLabelClassContext(t),this._dirty=!0}else for(const[s,i]of t.labelsToInitialize)if(this._ensureGraphics3DResources(i)&&(this._labels.set(s,i),this.deconflictor.setDirty(),e.madeProgress()),(i.visible&&i.textInitialized||!i.visible&&i.hasGraphics3DResources)&&(t.labelsToInitialize.delete(s),e.madeProgress()),e.done){this._dirty=!0;break}this._dirty||this.notifyChange("updating")}}_applyFocusAreasUpdates(e){for(;this._focusAreasLabelsQueue.length>0&&!e.done;){e.madeProgress();const{graphic3DGraphic:t,labelingContext:s}=this._focusAreasLabelsQueue.pop();if(0===t.labelLayers.length||!s.active)continue;const i=A(t.graphic.geometry);if(null==i)continue;const a=this.view.focusAreasView?.containsGeometry(i)??!0;t.labelLayers.forEach(e=>{e.stageObject.geometries.some(e=>e.material.parameters.isFocused!==a)&&(this._removeGraphic(s,t),this._addGraphic(s,t),this.setDirty())})}0===this._focusAreasLabelsQueue.length&&(this.notifyChange("readyToRun"),this.notifyChange("updating"))}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController?.signal;e.layer.when&&await e.layer.when(),o(t),e.scaleVisibility?.updateScaleRangeActive();const l=e.graphics3DCore,r=l.layer,n=r.labelingInfo?.filter(e=>!!e.symbol);if(!n||0===n.length)return;let c=!1;await s(n,async(s,r)=>{const n=s.symbol,h=x(l.getOrCreateGraphics3DSymbol(n));if(null==h)return void a.getLogger(this).error("Failed to create Graphics3DSymbol for label");await h.load(),o(t);let b=null;g(n)&&n.hasVisibleCallout()&&(b=f(n,l.symbolCreationContext),await b.load(),o(t));const u=await i(y(s,e.layer.fieldsIndex,this.view.spatialReference));if(o(t),!0===u.ok){const i=await this._createTextRenderParameters(h.symbol);o(t);const a=new z(s,h,b,i,u.value);this._updateLabelClassContextVisibility(a),e.setLabelClassContext(r,a)}else a.getLogger(this).error(`Label expression failed to evaluate: ${u.error}`),c=!0}),o(t)}async _createLabelClassContext(e){return null==e.labelClassPromise&&(e.labelClassPromise=this._createLabelClassContextAsync(e).catch(t=>{if(n(t))throw t;e.resetLabelClassContext()}).then(()=>{e.labelClassAbortController=null,this.notifyChange("updating")}).catch(()=>{}),this.notifyChange("updating")),e.labelClassPromise}async _createTextRenderParameters(e){const t=e.symbolLayers.at(0);return"text"!==t?.type?null:T.fromSymbol(t,this.view.state.rasterPixelRatio)}_destroyLabelClassContext(e){for(const s of e.labelClassContexts)--s.graphics3DSymbol.referenced;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,r(t),e.resetLabelClassContext(),e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,s,i,a,l){if(!this._textTextureAtlas)return null;const r=new L(s,v(s.anchor),G(s.anchor),e.text,p(e.displayWidth,e.displayHeight));return B.graphic=t,B.layer=i,B.renderingInfo=null,a.createLabel(B,r,this._hudMaterials,this._textTextureAtlas,()=>l.placement?.elevationOffset??null)}_createLineCalloutGraphic(e,t,s,i,a){B.graphic=e,B.layer=a;const l=i.screenOffset[0];return B.renderingInfo=new C(null,t,i.translation,i.centerOffset,l,i.centerOffsetUnits,i.elevationOffset),s.createGraphics3DGraphic(B,this._calloutMaterials)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const s=e.labelingContext,i=s.labelClassContexts;if(Q(i)||!s.emptySymbolLabelSupported&&0===t.layers.length)return!1;let a=!1;const l=t.graphic,r=s.layer,o=W(s.layer);for(let n=0;n<i.length;n++){const c=e.textRenderers[n],h=e.textLabelPlacements[n];if(null==c||null==h)continue;const b=i[n],u=b.graphics3DSymbol,p=k(u),d=u.symbolLayers[0];if(!d)continue;d.setElevationInfoOverride(s.elevationInfoOverride);const y=new _(t,p,b.labelClass),g=this._createTextSymbolGraphic(c,l,h,r,d,y);if(null==g)return!1;g.labelClass=b.labelClass,g.labelClassContextIndex=n,t.addLabelGraphic(g,s.stageLayer),this.deconflictor.setPriority(t,b.textRenderParameters?.definition.size??0),t.setVisibilityFlag(16,1,o),t.setVisibilityFlag(16,2,b.scaleVisibility??!0),t.setVisibilityFlag(16,8,!1),P()&&b.graphics.set(l.uid,t),a=!0;const f=b.graphics3DCalloutSymbolLayer;if(f&&h.hasLabelVerticalOffset){f.setElevationInfoOverride(s.elevationInfoOverride);const e=this._createLineCalloutGraphic(l,p,f,h,r);null!=e&&(b.calloutSymbolLayerIndex=t.labelLayers.length,t.addLabelGraphic(e,s.stageLayer))}break}return a&&s.scaleVisibility?.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const s of e.graphics3DGraphic.labelLayers){if(null==s.labelClass)continue;const e=t[s.labelClassContextIndex].graphics3DSymbol.symbolLayers[0];e?.onRemoveGraphic(s)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){if(e.textInitialized)return;const t=e.labelingContext,s=t.labelClassContexts;if(Q(s))return;const i=e.graphics3DGraphic.graphic;for(let l=0;l<s.length;l++){const r=s[l];if(e.textRenderers[l]=null,e.textLabelPlacements[l]=null,null==r?.textRenderParameters)continue;const o=r.labelFunction;let n;if("arcade"===o.type)try{const e=o.needsHydrationToEvaluate()?d(i,t.layer,null):i;n=o.evaluate(e)}catch(a){n=null}else n=o.evaluate(i);if(null==n||""===n||/^\s+$/.test(n))continue;const c=r.graphics3DSymbol;if(!c.symbolLayers[0])continue;const h=e.graphics3DGraphic,b="label-3d"===c.symbol?.type?c.symbol:null,u=r.labelClass,p=t.disablePlacement,y=new _(h,b,u,p).placement;if(null==y)continue;const g=v(y.anchor),f=w(g);e.textRenderers[l]=new D(n,f,r.textRenderParameters,I.maxSize),e.textLabelPlacements[l]=y}e.textInitialized=!0}_destroyTextTextureResources(e){e.textInitialized=!1,e.textRenderers.length=0,e.textLabelPlacements.length=0}_addGraphic(e,t){const s=t.graphic.uid;if(e.graphics.set(s,t),e.active){const i=new O(e,t);this._labels.set(s,i),e.labelsToInitialize.set(s,i)}this.setDirty(),this.deconflictor.setDirty()}_updateGraphicGeometry(e,t){const s=t.graphic.uid,i=this._labels.get(s);if(!i)return!0;for(const a of i.graphics3DGraphic.labelLayers){if(null==a.labelClass)continue;if(!e.labelClassContexts[a.labelClassContextIndex].graphics3DSymbol.symbolLayers[0].updateGeometry(t.graphic,a))return!1}return this.setDirty(),this.deconflictor.setDirty(),!0}_removeGraphic(e,t){const s=t.graphic.uid,i=this._labels.get(s);e.graphics.delete(s),e.labelClassContexts.forEach(e=>e.graphics.delete(s)),i&&(this._destroyGraphic(i,s),e.labelsToInitialize.delete(s),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.delete(t),e.textureAtlasHandles.length&&this._removeLabelTextureFromAtlas(e),this._destroyTextTextureResources(e),e.hasGraphics3DResources&&this._destroyGraphics3DResources(e)}async _labelingInfoChange(e,t){if(!t)return this._visibilityInfoChange(e),this._resetLabels(e),this._createLabelClassContext(e);for(const s of t){const t=e.graphics.get(s);t&&(this._removeGraphic(e,t),this._addGraphic(e,t))}}_globalPropertyChanged(e,t){for(const s of t.labelClassContexts){const i=new Map;t.graphics.forEach(e=>i.set(e.graphic.uid,e));const a=e=>e.labelLayers[0];if(s.graphics3DSymbol.symbolLayers[0].globalPropertyChanged(e,i,a),s.graphics3DCalloutSymbolLayer){const t=e=>e.labelLayers[s.calloutSymbolLayerIndex];s.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,i,t)}}}_visibilityInfoChange(e){const t=W(e.layer);t&&!e.active&&this._activateLabelingContext(e),!t&&e.active&&this._deactivateLabelingContext(e),this.setDirty()}_resetAllLabels(){for(const e of this._labelingContexts)this._resetLabels(e)}_resetLabels(e){e.graphics.forEach((t,s)=>{const i=this._labels.get(s);i&&(this._destroyGraphic(i,s),i.visible=!1,e.labelsToInitialize.set(s,i))}),this._destroyLabelClassContext(e),this.setDirty(),this.deconflictor.setDirty()}_findLabelingContext(e){for(const t of this._labelingContexts)if(t.graphics3DCore===e)return t;return null}addGraphicsOwner(e,t,s){const i=s?.emptySymbolLabelSupported||!1,a=s?.elevationInfoOverride||null,l=s?.disablePlacement||null;if(this._findLabelingContext(e))return;const r=e.layer,o=new E(this.view.stage,r,e,t,i,a,l,W(r));return this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),updateGraphicGeometry:e=>this._updateGraphicGeometry(o,e),layerLabelsEnabled:()=>W(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),screenSizePerspectiveEnabledChanged:()=>this._globalPropertyChanged("screenSizePerspectiveEnabled",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),remove:()=>this._removeGraphicsOwner(e),setDirty:()=>this.setDirty()}}_removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const s=this._labelingContexts.indexOf(t);this._labelingContexts.splice(s,1),t.graphics.forEach(e=>this._removeGraphic(t,e)),t.destroy(),this.setDirty()}_updateScaleVisibility(){for(const e of this._labelingContexts)if(e.active&&!H(e))for(const t of e.labelClassContexts)this._updateLabelClassContextVisibility(t)}_updateLabelClassContextVisibility(e){if(!P())return;const{labelClass:t,graphics:s}=e,i={minScale:t.minScale,maxScale:t.maxScale},a=R(i,this.view.scale),l=null==e.scaleVisibility||e.scaleVisibility!==a;e.scaleVisibility=a,l&&s.size&&(s.forEach(e=>e.setVisibilityFlag(16,2,a)),this.deconflictor.setDirty(),this.setDirty())}setLabelGraphicVisibility(e,t){const s=e.graphic.uid,i=this._labels.get(s);i&&i.visible!==t&&(t&&!i.textureAtlasHandles.length?(this._addLabelTextureToAtlas(i),i.textInitialized||i.labelingContext.labelsToInitialize.set(s,i)):!t&&i.textureAtlasHandles.length&&this._removeLabelTextureFromAtlas(i),i.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._dirty||this._textTextureAtlas?.updating||this.deconflictor.updating||this._labelingContexts.some(e=>H(e))||this._focusAreasLabelsQueue.length>0}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce((e,t)=>e+(H(t)?0:1),0)/this._labelingContexts.length:1;return(this._dirty?0:.3)+(this._textTextureAtlas.updating?0:.1)+.1*e+.5*this.deconflictor.updatingProgress}get usedMemory(){return this._textTextureAtlas?.usedMemory??0}get test(){}};function M(e,t){e.geometries[0].setAttributeData("size",[t.displayWidth,t.displayHeight]),e.geometryVertexAttributeUpdated(e.geometries[0],"size")}function U(e,t){e.geometries[0].setAttributeData("uvi",t),e.geometryVertexAttributeUpdated(e.geometries[0],"uvi",!0)}function H(e){return!!e.labelClassPromise&&!!e.labelClassAbortController}function Q(e){return!e||0===e.length}function k(e){return"label-3d"===e.symbol?.type?e.symbol:null}function W(e){return!!e.labelsVisible&&!!e.labelingInfo?.some(e=>!!e.symbol)}e([b({constructOnly:!0})],F.prototype,"view",void 0),e([b({constructOnly:!0})],F.prototype,"deconflictor",void 0),e([b()],F.prototype,"_textTextureAtlas",void 0),e([b({type:Boolean,readOnly:!0})],F.prototype,"updating",null),F=e([u("esri.views.3d.layers.graphics.Labeler")],F);const B=new m(null,null,null);export{F as Labeler,W as areLabelsVisible};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{forEach as s,result as i}from"../../../../core/asyncUtils.js";import"../../../../core/has.js";import a from"../../../../core/Logger.js";import{disposeMaybe as l,abortMaybe as r}from"../../../../core/maybe.js";import{throwIfAborted as o,isAbortError as n}from"../../../../core/promiseUtils.js";import c from"../../../../core/Queue.js";import{watch as h}from"../../../../core/reactiveUtils.js";import{property as b}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromValues as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{hydrateGraphic as d}from"../../../../layers/graphics/hydratedFeatures.js";import{createLabelFunction as y}from"../../../../layers/support/labelFormatUtils.js";import{hasCalloutSupport as g}from"../../../../symbols/callouts/calloutUtils.js";import{make as f}from"./Graphics3DCalloutSymbolLayerFactory.js";import{LineCalloutCreationContext as m,LineCalloutSymbolLayerRenderingInfo as C}from"./Graphics3DLineCalloutSymbolLayer.js";import{getGraphics3DSymbol as x}from"./graphicSymbolUtils.js";import{LabelInfo as _}from"./LabelInfo.js";import{LabelParameters as L}from"./LabelParameters.js";import{horizontalPlacementFromAnchor as v,verticalPlacementFromAnchor as G,textRenderAlignmentFromHorizontalPlacement as w}from"./placementUtils.js";import{placePointOnGeometry as A}from"./pointUtils.js";import{TextRenderer as D}from"../../webgl-engine/lib/TextRenderer.js";import{TextRenderParameters as T}from"../../webgl-engine/lib/TextRenderParameters.js";import{TextTextureAtlas as I}from"../../webgl-engine/lib/TextTextureAtlas.js";import{WebGLLayer as S}from"../../webgl-engine/lib/WebGLLayer.js";import{hasLayerBasedScaleVisibility as P,isInEffectiveScaleRange as R}from"../../../support/layerViewUtils.js";import{TaskPriority as j}from"../../../support/Scheduler.js";import{Yield as V}from"../../../support/Yield.js";class O{constructor(e,t){this.labelingContext=e,this.graphics3DGraphic=t,this.hasGraphics3DResources=!1,this.visible=!1,this.textureAtlasHandles=[],this.textInitialized=!1,this.textRenderers=new Array,this.textLabelPlacements=new Array}}class z{constructor(e,t,s,i,a){this.labelClass=e,this.graphics3DSymbol=t,this.graphics3DCalloutSymbolLayer=s,this.textRenderParameters=i,this.labelFunction=a,this.calloutSymbolLayerIndex=0,this.graphics=new Map,this.scaleVisibility=null}}class E{constructor(e,t,s,i,a,l,r,o){this.layer=t,this.graphics3DCore=s,this.scaleVisibility=i,this.emptySymbolLabelSupported=a,this.elevationInfoOverride=l,this.disablePlacement=r,this.active=o,this.labelClassAbortController=new AbortController,this._labelClassContexts=new Array,this.graphics=new Map,this.labelsToInitialize=new Map,this.stageLayer=new S(e,{pickable:!0},s.owner.layerViewUid)}destroy(){this.stageLayer.destroy()}get labelClassContexts(){return this._labelClassContexts}setLabelClassContext(e,t){this._labelClassContexts[e]=t}resetLabelClassContext(){this._labelClassContexts.length=0}}let F=class extends t{constructor(e){super(e),this._hudMaterials=new Map,this._calloutMaterials=new Map,this._dirty=!1,this._focusAreasLabelsQueue=new c,this._labels=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this.addHandles([h(()=>this.view.state?.camera,()=>this.setDirty()),h(()=>this.view.state?.rasterPixelRatio,()=>this._resetAllLabels()),h(()=>this.view.focusAreasView?.polygons,()=>this._updateFocus()),this.view.resourceController.scheduler.registerTask(j.LABELER,this)]),P()&&this.addHandles(h(()=>this.view.scale,()=>this._updateScaleVisibility())),this._textTextureAtlas=new I({view:this.view})}dispose(){this.removeAllHandles(),this._textTextureAtlas=l(this._textTextureAtlas),this._hudMaterials.clear(),this._calloutMaterials.clear(),this._labelingContexts.length=0,this._labels.clear()}destroy(){this.dispose(),B.graphic=null,B.renderingInfo=null,B.layer=null}_updateFocus(){this._focusAreasLabelsQueue.clear(),this._labelingContexts.forEach(e=>{e.graphics.forEach(t=>{this._focusAreasLabelsQueue.push({graphic3DGraphic:t,labelingContext:e})})})}_activateLabelingContext(e){e.graphics.forEach((t,s)=>{const i=new O(e,t);this._labels.set(s,i),e.labelsToInitialize.set(s,i),t.setVisibilityFlag(16,1,!0)}),e.active=!0}_deactivateLabelingContext(e){e.graphics.forEach((e,t)=>{e.setVisibilityFlag(16,1,!1),this.setLabelGraphicVisibility(e,!1),e.clearLabelGraphics(),this._labels.delete(t)}),e.active=!1}_addLabelTextureToAtlas(e){if(this._textTextureAtlas)for(const t of e.graphics3DGraphic.labelLayers){if(!t.labelClass)continue;const s=e.textRenderers[t.labelClassContextIndex];s&&(e.textureAtlasHandles.push(this._textTextureAtlas.addText(s,e=>U(t.stageObject,e))),M(t.stageObject,s))}}_removeLabelTextureFromAtlas(e){e.textureAtlasHandles.forEach(e=>e.remove()),e.textureAtlasHandles.length=0}get readyToRun(){return this.view.ready&&(this._dirty||this.deconflictor.readyToRun||this._focusAreasLabelsQueue.length>0)}runTask(e){return this._updateLabels(e),this._applyFocusAreasUpdates(e),!this._dirty&&this.deconflictor.readyToRun&&this.deconflictor.runTask(e),V}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(t.active)if(H(t))this._dirty=!0;else if(Q(t.labelClassContexts)){if(null===t.labelClassContexts){this._deactivateLabelingContext(t);continue}this._createLabelClassContext(t),this._dirty=!0}else for(const[s,i]of t.labelsToInitialize)if(this._ensureGraphics3DResources(i)&&(this._labels.set(s,i),this.deconflictor.setDirty(),e.madeProgress()),(i.visible&&i.textInitialized||!i.visible&&i.hasGraphics3DResources)&&(t.labelsToInitialize.delete(s),e.madeProgress()),e.done){this._dirty=!0;break}this._dirty||this.notifyChange("updating")}}_applyFocusAreasUpdates(e){for(;this._focusAreasLabelsQueue.length>0&&!e.done;){e.madeProgress();const{graphic3DGraphic:t,labelingContext:s}=this._focusAreasLabelsQueue.pop();if(0===t.labelLayers.length||!s.active)continue;const i=A(t.graphic.geometry);if(null==i)continue;const a=this.view.focusAreasView?.containsGeometry(i)??!0;t.labelLayers.forEach(e=>{e.stageObject.geometries.some(e=>e.material.parameters.isFocused!==a)&&(this._removeGraphic(s,t),this._addGraphic(s,t),this.setDirty())})}0===this._focusAreasLabelsQueue.length&&(this.notifyChange("readyToRun"),this.notifyChange("updating"))}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController?.signal;e.layer.when&&await e.layer.when(),o(t),e.scaleVisibility?.updateScaleRangeActive();const l=e.graphics3DCore,r=l.layer,n=r.labelingInfo?.filter(e=>!!e.symbol);if(!n||0===n.length)return;let c=!1;await s(n,async(s,r)=>{const n=s.symbol,h=x(l.getOrCreateGraphics3DSymbol(n));if(null==h)return void a.getLogger(this).error("Failed to create Graphics3DSymbol for label");await h.load(),o(t);let b=null;g(n)&&n.hasVisibleCallout()&&(b=f(n,l.symbolCreationContext),await b.load(),o(t));const u=await i(y(s,e.layer.fieldsIndex,this.view.spatialReference));if(o(t),!0===u.ok){const i=await this._createTextRenderParameters(h.symbol);o(t);const a=new z(s,h,b,i,u.value);this._updateLabelClassContextVisibility(a),e.setLabelClassContext(r,a)}else a.getLogger(this).error(`Label expression failed to evaluate: ${u.error}`),c=!0}),o(t)}async _createLabelClassContext(e){return null==e.labelClassPromise&&(e.labelClassPromise=this._createLabelClassContextAsync(e).catch(t=>{if(n(t))throw t;e.resetLabelClassContext()}).then(()=>{e.labelClassAbortController=null,this.notifyChange("updating")}).catch(()=>{}),this.notifyChange("updating")),e.labelClassPromise}async _createTextRenderParameters(e){const t=e.symbolLayers.at(0);return"text"!==t?.type?null:T.fromSymbol(t,this.view.state.rasterPixelRatio)}_destroyLabelClassContext(e){for(const s of e.labelClassContexts)s&&--s.graphics3DSymbol.referenced;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,r(t),e.resetLabelClassContext(),e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,s,i,a,l){if(!this._textTextureAtlas)return null;const r=new L(s,v(s.anchor),G(s.anchor),e.text,p(e.displayWidth,e.displayHeight));return B.graphic=t,B.layer=i,B.renderingInfo=null,a.createLabel(B,r,this._hudMaterials,this._textTextureAtlas,()=>l.placement?.elevationOffset??null)}_createLineCalloutGraphic(e,t,s,i,a){B.graphic=e,B.layer=a;const l=i.screenOffset[0];return B.renderingInfo=new C(null,t,i.translation,i.centerOffset,l,i.centerOffsetUnits,i.elevationOffset),s.createGraphics3DGraphic(B,this._calloutMaterials)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const s=e.labelingContext,i=s.labelClassContexts;if(Q(i)||!s.emptySymbolLabelSupported&&0===t.layers.length)return!1;let a=!1;const l=t.graphic,r=s.layer,o=W(s.layer);for(let n=0;n<i.length;n++){const c=e.textRenderers[n],h=e.textLabelPlacements[n],b=i[n];if(null==c||null==h||null==b)continue;const u=b.graphics3DSymbol,p=k(u),d=u.symbolLayers[0];if(!d)continue;d.setElevationInfoOverride(s.elevationInfoOverride);const y=new _(t,p,b.labelClass),g=this._createTextSymbolGraphic(c,l,h,r,d,y);if(null==g)return!1;g.labelClass=b.labelClass,g.labelClassContextIndex=n,t.addLabelGraphic(g,s.stageLayer),this.deconflictor.setPriority(t,b.textRenderParameters?.definition.size??0),t.setVisibilityFlag(16,1,o),t.setVisibilityFlag(16,2,b.scaleVisibility??!0),t.setVisibilityFlag(16,8,!1),P()&&b.graphics.set(l.uid,t),a=!0;const f=b.graphics3DCalloutSymbolLayer;if(f&&h.hasLabelVerticalOffset){f.setElevationInfoOverride(s.elevationInfoOverride);const e=this._createLineCalloutGraphic(l,p,f,h,r);null!=e&&(b.calloutSymbolLayerIndex=t.labelLayers.length,t.addLabelGraphic(e,s.stageLayer))}break}return a&&s.scaleVisibility?.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const s of e.graphics3DGraphic.labelLayers){if(null==s.labelClass)continue;const e=t[s.labelClassContextIndex].graphics3DSymbol.symbolLayers[0];e?.onRemoveGraphic(s)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){if(e.textInitialized)return;const t=e.labelingContext,s=t.labelClassContexts;if(Q(s))return;const i=e.graphics3DGraphic.graphic;for(let l=0;l<s.length;l++){const r=s[l];if(e.textRenderers[l]=null,e.textLabelPlacements[l]=null,null==r?.textRenderParameters)continue;const o=r.labelFunction;let n;if("arcade"===o.type)try{const e=o.needsHydrationToEvaluate()?d(i,t.layer,null):i;n=o.evaluate(e)}catch(a){n=null}else n=o.evaluate(i);if(null==n||""===n||/^\s+$/.test(n))continue;const c=r.graphics3DSymbol;if(!c.symbolLayers[0])continue;const h=e.graphics3DGraphic,b="label-3d"===c.symbol?.type?c.symbol:null,u=r.labelClass,p=t.disablePlacement,y=new _(h,b,u,p).placement;if(null==y)continue;const g=v(y.anchor),f=w(g);e.textRenderers[l]=new D(n,f,r.textRenderParameters,I.maxSize),e.textLabelPlacements[l]=y}e.textInitialized=!0}_destroyTextTextureResources(e){e.textInitialized=!1,e.textRenderers.length=0,e.textLabelPlacements.length=0}_addGraphic(e,t){const s=t.graphic.uid;if(e.graphics.set(s,t),e.active){const i=new O(e,t);this._labels.set(s,i),e.labelsToInitialize.set(s,i)}this.setDirty(),this.deconflictor.setDirty()}_updateGraphicGeometry(e,t){const s=t.graphic.uid,i=this._labels.get(s);if(!i)return!0;for(const a of i.graphics3DGraphic.labelLayers){if(null==a.labelClass)continue;if(!e.labelClassContexts[a.labelClassContextIndex].graphics3DSymbol.symbolLayers[0].updateGeometry(t.graphic,a))return!1}return this.setDirty(),this.deconflictor.setDirty(),!0}_removeGraphic(e,t){const s=t.graphic.uid,i=this._labels.get(s);e.graphics.delete(s),e.labelClassContexts.forEach(e=>e?.graphics.delete(s)),i&&(this._destroyGraphic(i,s),e.labelsToInitialize.delete(s),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.delete(t),e.textureAtlasHandles.length&&this._removeLabelTextureFromAtlas(e),this._destroyTextTextureResources(e),e.hasGraphics3DResources&&this._destroyGraphics3DResources(e)}async _labelingInfoChange(e,t){if(!t)return this._visibilityInfoChange(e),this._resetLabels(e),this._createLabelClassContext(e);for(const s of t){const t=e.graphics.get(s);t&&(this._removeGraphic(e,t),this._addGraphic(e,t))}}_globalPropertyChanged(e,t){for(const s of t.labelClassContexts){if(!s)continue;const i=new Map;t.graphics.forEach(e=>i.set(e.graphic.uid,e));const a=e=>e.labelLayers[0];if(s.graphics3DSymbol.symbolLayers[0].globalPropertyChanged(e,i,a),s.graphics3DCalloutSymbolLayer){const t=e=>e.labelLayers[s.calloutSymbolLayerIndex];s.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,i,t)}}}_visibilityInfoChange(e){const t=W(e.layer);t&&!e.active&&this._activateLabelingContext(e),!t&&e.active&&this._deactivateLabelingContext(e),this.setDirty()}_resetAllLabels(){for(const e of this._labelingContexts)this._resetLabels(e)}_resetLabels(e){e.graphics.forEach((t,s)=>{const i=this._labels.get(s);i&&(this._destroyGraphic(i,s),i.visible=!1,e.labelsToInitialize.set(s,i))}),this._destroyLabelClassContext(e),this.setDirty(),this.deconflictor.setDirty()}_findLabelingContext(e){for(const t of this._labelingContexts)if(t.graphics3DCore===e)return t;return null}addGraphicsOwner(e,t,s){const i=s?.emptySymbolLabelSupported||!1,a=s?.elevationInfoOverride||null,l=s?.disablePlacement||null;if(this._findLabelingContext(e))return;const r=e.layer,o=new E(this.view.stage,r,e,t,i,a,l,W(r));return this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),updateGraphicGeometry:e=>this._updateGraphicGeometry(o,e),layerLabelsEnabled:()=>W(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),screenSizePerspectiveEnabledChanged:()=>this._globalPropertyChanged("screenSizePerspectiveEnabled",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),remove:()=>this._removeGraphicsOwner(e),setDirty:()=>this.setDirty()}}_removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const s=this._labelingContexts.indexOf(t);this._labelingContexts.splice(s,1),t.graphics.forEach(e=>this._removeGraphic(t,e)),t.destroy(),this.setDirty()}_updateScaleVisibility(){for(const e of this._labelingContexts)if(e.active&&!H(e))for(const t of e.labelClassContexts)this._updateLabelClassContextVisibility(t)}_updateLabelClassContextVisibility(e){if(!e||!P())return;const{labelClass:t,graphics:s}=e,i={minScale:t.minScale,maxScale:t.maxScale},a=R(i,this.view.scale),l=null==e.scaleVisibility||e.scaleVisibility!==a;e.scaleVisibility=a,l&&s.size&&(s.forEach(e=>e.setVisibilityFlag(16,2,a)),this.deconflictor.setDirty(),this.setDirty())}setLabelGraphicVisibility(e,t){const s=e.graphic.uid,i=this._labels.get(s);i&&i.visible!==t&&(t&&!i.textureAtlasHandles.length?(this._addLabelTextureToAtlas(i),i.textInitialized||i.labelingContext.labelsToInitialize.set(s,i)):!t&&i.textureAtlasHandles.length&&this._removeLabelTextureFromAtlas(i),i.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._dirty||this._textTextureAtlas?.updating||this.deconflictor.updating||this._labelingContexts.some(e=>H(e))||this._focusAreasLabelsQueue.length>0}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce((e,t)=>e+(H(t)?0:1),0)/this._labelingContexts.length:1;return(this._dirty?0:.3)+(this._textTextureAtlas.updating?0:.1)+.1*e+.5*this.deconflictor.updatingProgress}get usedMemory(){return this._textTextureAtlas?.usedMemory??0}get test(){}};function M(e,t){e.geometries[0].setAttributeData("size",[t.displayWidth,t.displayHeight]),e.geometryVertexAttributeUpdated(e.geometries[0],"size")}function U(e,t){e.geometries[0].setAttributeData("uvi",t),e.geometryVertexAttributeUpdated(e.geometries[0],"uvi",!0)}function H(e){return!!e.labelClassPromise&&!!e.labelClassAbortController}function Q(e){return 0===(e?.length??0)}function k(e){return"label-3d"===e.symbol?.type?e.symbol:null}function W(e){return!!e.labelsVisible&&!!e.labelingInfo?.some(e=>!!e.symbol)}e([b({constructOnly:!0})],F.prototype,"view",void 0),e([b({constructOnly:!0})],F.prototype,"deconflictor",void 0),e([b()],F.prototype,"_textTextureAtlas",void 0),e([b({type:Boolean,readOnly:!0})],F.prototype,"updating",null),F=e([u("esri.views.3d.layers.graphics.Labeler")],F);const B=new m(null,null,null);export{F as Labeler,W as areLabelsVisible};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{removeMaybe as t}from"../../../../core/maybe.js";import{throwIfAborted as o,onAbort as r}from"../../../../core/promiseUtils.js";import{DefaultLoadingContext as e}from"../../glTF/DefaultLoadingContext.js";import{load as s}from"./wosrLoader.js";class a{constructor(t){this._gltfLoading=new Map,this._wosrLoading=new Map,this._gltfCache=t("gltf-resources",()=>{}),this._wosrCache=t("wosr-resources",()=>{})}destroy(){this._gltfLoading.forEach(t=>t.abortController.abort()),this._wosrLoading.forEach(t=>t.abortController.abort()),this._gltfCache.destroy(),this._wosrCache.destroy()}loadGLTF(t,o,r){const s=r?`gltfPBR:${t}`:`gltf:${t}`,a=this._gltfCache.get(s);return a?Promise.resolve(a):l(this._gltfLoading,this._gltfCache,s,async o=>{const{loadGLTF:s}=await import("../../glTF/loader.js");return s(new e
|
|
5
|
+
import{removeMaybe as t}from"../../../../core/maybe.js";import{throwIfAborted as o,onAbort as r}from"../../../../core/promiseUtils.js";import{DefaultLoadingContext as e}from"../../glTF/DefaultLoadingContext.js";import{load as s}from"./wosrLoader.js";class a{constructor(t){this._gltfLoading=new Map,this._wosrLoading=new Map,this._gltfCache=t("gltf-resources",()=>{}),this._wosrCache=t("wosr-resources",()=>{})}destroy(){this._gltfLoading.forEach(t=>t.abortController.abort()),this._wosrLoading.forEach(t=>t.abortController.abort()),this._gltfCache.destroy(),this._wosrCache.destroy()}loadGLTF(t,o,r){const s=r?`gltfPBR:${t}`:`gltf:${t}`,a=this._gltfCache.get(s);return a?Promise.resolve(a):l(this._gltfLoading,this._gltfCache,s,async o=>{const{loadGLTF:s}=await import("../../glTF/loader.js");return s(new e,t,o,r)},o)}loadWOSR(t,o){const r=`wosr:${t}:${o.disableTextures}`,e=this._wosrCache.get(r);return e?Promise.resolve(e):l(this._wosrLoading,this._wosrCache,r,o=>s(t,o),o)}}async function l(e,s,a,l,i){o(i);const c=r(i,()=>n(e,a));let f=e.get(a);if(f)f.refCount++;else{const t=new AbortController;f={refCount:1,abortController:t,promise:l({...i,signal:t.signal})},e.set(a,f)}try{const t=await f.promise;return s.put(a,t),e.delete(a),o(i),t}finally{t(c)}}function n(t,o){const r=t.get(o);if(null!=r){if(--r.refCount>0)return}t.delete(o),null!=r&&r.abortController.abort()}export{a as ObjectResourceCache};
|