@arcgis/core 4.23.0-next.20220106 → 4.23.0-next.20220118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/components/assets/calcite-date-picker/nls/bg.json +31 -0
- package/assets/components/assets/calcite-icon/centerAlign16.json +1 -0
- package/assets/components/assets/calcite-icon/centerAlign24.json +1 -0
- package/assets/components/assets/calcite-icon/centerAlign32.json +1 -0
- package/assets/components/assets/calcite-icon/checkSquareF16.json +1 -0
- package/assets/components/assets/calcite-icon/checkSquareF24.json +1 -0
- package/assets/components/assets/calcite-icon/checkSquareF32.json +1 -0
- package/assets/components/assets/calcite-icon/convert16.json +1 -0
- package/assets/components/assets/calcite-icon/convert24.json +1 -0
- package/assets/components/assets/calcite-icon/convert32.json +1 -0
- package/assets/components/assets/calcite-icon/explore16.json +1 -0
- package/assets/components/assets/calcite-icon/explore24.json +1 -0
- package/assets/components/assets/calcite-icon/explore32.json +1 -0
- package/assets/components/assets/calcite-icon/formDropdown16.json +1 -0
- package/assets/components/assets/calcite-icon/formDropdown24.json +1 -0
- package/assets/components/assets/calcite-icon/formDropdown32.json +1 -0
- package/assets/components/assets/calcite-icon/language16.json +1 -0
- package/assets/components/assets/calcite-icon/language24.json +1 -0
- package/assets/components/assets/calcite-icon/language32.json +1 -0
- package/assets/components/assets/calcite-icon/languageTranslate16.json +1 -0
- package/assets/components/assets/calcite-icon/languageTranslate24.json +1 -0
- package/assets/components/assets/calcite-icon/languageTranslate32.json +1 -0
- package/assets/components/assets/calcite-icon/leftAlign16.json +1 -0
- package/assets/components/assets/calcite-icon/leftAlign24.json +1 -0
- package/assets/components/assets/calcite-icon/leftAlign32.json +1 -0
- package/assets/components/assets/calcite-icon/lineSolid4.json +1 -0
- package/assets/components/assets/calcite-icon/partlyCloudy16.json +1 -0
- package/assets/components/assets/calcite-icon/partlyCloudy24.json +1 -0
- package/assets/components/assets/calcite-icon/partlyCloudy32.json +1 -0
- package/assets/components/assets/calcite-icon/rightAlign16.json +1 -0
- package/assets/components/assets/calcite-icon/rightAlign24.json +1 -0
- package/assets/components/assets/calcite-icon/rightAlign32.json +1 -0
- package/assets/components/assets/calcite-icon/screenshotMode16.json +1 -0
- package/assets/components/assets/calcite-icon/screenshotMode24.json +1 -0
- package/assets/components/assets/calcite-icon/screenshotMode32.json +1 -0
- package/assets/components/assets/calcite-icon/squareF16.json +1 -0
- package/assets/components/assets/calcite-icon/squareF24.json +1 -0
- package/assets/components/assets/calcite-icon/squareF32.json +1 -0
- package/assets/components/assets/calcite-icon/terminal16.json +1 -0
- package/assets/components/assets/calcite-icon/terminal24.json +1 -0
- package/assets/components/assets/calcite-icon/terminal32.json +1 -0
- package/assets/components/assets/calcite-icon/touch16.json +1 -0
- package/assets/components/assets/calcite-icon/touch24.json +1 -0
- package/assets/components/assets/calcite-icon/touch32.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagon16.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagon24.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagon32.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagonF16.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagonF24.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagonF32.json +1 -0
- package/assets/components/assets/calcite-icon/xOctagonF16.json +1 -0
- package/assets/components/assets/calcite-icon/xOctagonF24.json +1 -0
- package/assets/components/assets/calcite-icon/xOctagonF32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +1 -0
- package/assets/esri/core/workers/chunks/09da224052976e290828.js +1 -0
- package/assets/esri/core/workers/chunks/{2c9af2ebd72d9b55329b.js → 0f254c3e91e8fee55f28.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce5ca5e95b2378ec55b9.js → 1305ef8717da6e902a55.js} +1 -1
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +1 -0
- package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +1 -0
- package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +1 -0
- package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +1 -0
- package/assets/esri/core/workers/chunks/{9c417740bf3707a0d465.js → 2c607d30ff8ca1b61286.js} +1 -1
- package/assets/esri/core/workers/chunks/2d947080a27db6ce0d75.js +1 -0
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +1 -0
- package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +1 -0
- package/assets/esri/core/workers/chunks/37a7bd30352b1309b8f8.js +1 -0
- package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +1 -0
- package/assets/esri/core/workers/chunks/{3d5169ea9810d10caf0d.js → 3a9740dccda6a733313c.js} +1 -1
- package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +1 -0
- package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +1 -0
- package/assets/esri/core/workers/chunks/{f52b6d5037e4205b035c.js → 47395d225229d237f0ac.js} +1 -1
- package/assets/esri/core/workers/chunks/4b69129c0557852d9b3d.js +1 -0
- package/assets/esri/core/workers/chunks/4c301ca9c493b96df746.js +1 -0
- package/assets/esri/core/workers/chunks/57c67e260267a1dbc5e3.js +1 -0
- package/assets/esri/core/workers/chunks/5ac4c1d54b94c7d87835.js +1 -0
- package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +1 -0
- package/assets/esri/core/workers/chunks/631c5b514bb73782c570.js +1 -0
- package/assets/esri/core/workers/chunks/{3a2b2dc3e938d53faa30.js → 64276aacaafa4c8a15bd.js} +1 -1
- package/assets/esri/core/workers/chunks/{75466e0c8c8da499b150.js → 662d13f68cf3ec92439b.js} +1 -1
- package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +1 -0
- package/assets/esri/core/workers/chunks/6cdfe175c965918b741b.js +1 -0
- package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +1 -0
- package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js → 7a8764ae8a0041e1151d.js} +2 -2
- package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js.LICENSE.txt → 7a8764ae8a0041e1151d.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{b4ed7856cd9c98434477.js → 7c9d2638693d5f798b23.js} +1 -1
- package/assets/esri/core/workers/chunks/7e596478507466953e65.js +1 -0
- package/assets/esri/core/workers/chunks/85b34d91cf07567d6873.js +1 -0
- package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +1 -0
- package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +1 -0
- package/assets/esri/core/workers/chunks/89de05207744149fb58b.js +1 -0
- package/assets/esri/core/workers/chunks/8cbb04a9065aa3756638.js +1 -0
- package/assets/esri/core/workers/chunks/{9846098704ee38bf6350.js → 8fdd5bca3716816d359b.js} +1 -1
- package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +1 -0
- package/assets/esri/core/workers/chunks/987182b3a578fc7de251.js +1 -0
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +1 -0
- package/assets/esri/core/workers/chunks/9d77467aa71d345fc1b6.js +1 -0
- package/assets/esri/core/workers/chunks/{4beba242e7540ee3182b.js → 9d9dffc8884d66a258e4.js} +1 -1
- package/assets/esri/core/workers/chunks/9f8b7b6b4e95f9a794fc.js +1 -0
- package/assets/esri/core/workers/chunks/{a721342a32541717324d.js → a28b53c61bddefb6616e.js} +1 -1
- package/assets/esri/core/workers/chunks/{9b7c51ff3d2b42aa62f5.js → a7b1b75643ed31489495.js} +1 -1
- package/assets/esri/core/workers/chunks/a8b13fb804bb775e4967.js +1 -0
- package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +1 -0
- package/assets/esri/core/workers/chunks/a960074644c3722be71e.js +1 -0
- package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +1 -0
- package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +1 -0
- package/assets/esri/core/workers/chunks/b10fcbe1393c812fc219.js +1 -0
- package/assets/esri/core/workers/chunks/{2a39d520b192b8e552b5.js → b2ae5fc4f787ea568b88.js} +1 -1
- package/assets/esri/core/workers/chunks/{b51261a9a9ab62388839.js → b99e69302ea701fff0ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{b87bc1481a49b38109f4.js → b9c177524b3e7de1ffd1.js} +1 -1
- package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +1 -0
- package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +1 -0
- package/assets/esri/core/workers/chunks/{7c1b9ae141112a63b446.js → ba6654a885be4b7a43f0.js} +1 -1
- package/assets/esri/core/workers/chunks/bc790b2f964144d10abe.js +1 -0
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +1 -0
- package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +1 -0
- package/assets/esri/core/workers/chunks/c36f84daa7736878418d.js +1 -0
- package/assets/esri/core/workers/chunks/{b58eba403bd517a7bb15.js → c3eca92d02958732e141.js} +1 -1
- package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +1 -0
- package/assets/esri/core/workers/chunks/cbb291412fd1a5261aa9.js +1 -0
- package/assets/esri/core/workers/chunks/d1454155ee1b8a421cbb.js +1 -0
- package/assets/esri/core/workers/chunks/{0cd583c3233573cb8468.js → d24c4fbc567486b1188f.js} +1 -1
- package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +1 -0
- package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +1 -0
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +1 -0
- package/assets/esri/core/workers/chunks/e2d68bcd2f99a65387bf.js +1 -0
- package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +1 -0
- package/assets/esri/core/workers/chunks/{2f66fcb8670b108af549.js → ed0bcc66fb1e0ee75a4b.js} +1 -1
- package/assets/esri/core/workers/chunks/{6deac533bb455be4004b.js → ef8b75b92cf549e0507e.js} +1 -1
- package/assets/esri/core/workers/chunks/f7fc4c993536e62f7f3e.js +1 -0
- package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.svg +1 -0
- package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.ttf +0 -0
- package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.woff +0 -0
- package/assets/esri/themes/base/icons/selection.json +1 -1
- package/assets/esri/themes/base/icons/style.css +4 -0
- package/assets/esri/themes/base/icons/style.scss +6 -0
- package/assets/esri/themes/base/icons/variables.scss +1 -0
- package/assets/esri/themes/base/widgets/_Weather.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/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/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +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_nb.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.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/ElevationProfile/t9n/ElevationProfile_ja.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ar.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bg.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bs.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ca.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_cs.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_da.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_de.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_el.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_es.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_et.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fi.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fr.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_he.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hr.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hu.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_id.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_it.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ja.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ko.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lt.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lv.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nb.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nl.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pl.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ro.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ru.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sk.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sl.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sr.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sv.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_th.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_tr.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_uk.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_vi.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
- package/chunks/Clouds.glsl.js +14 -14
- package/chunks/HUDMaterial.glsl.js +22 -21
- package/chunks/RibbonLine.glsl.js +10 -14
- package/chunks/persistableUrlUtils.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vec42.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/urlUtils.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/geometry/support/buffer/math/common.js +1 -1
- package/interfaces.d.ts +99 -56
- package/layers/FeatureLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/ogc/crsUtils.js +5 -0
- package/layers/support/RasterFunction.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/package.json +5 -5
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/request.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/ImageIdentifyParameters.js +1 -1
- package/rest/support/StatisticDefinition.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/featureFlags.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/ExtrudeSymbol3DLayer.js +1 -1
- package/symbols/Font.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/PathSymbol3DLayer.js +1 -1
- package/symbols/TextSymbol.js +1 -1
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/Symbol3DMaterial.js +1 -1
- package/symbols/support/constants.js +5 -0
- package/symbols/support/utils.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +1 -1
- package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
- package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +5 -0
- package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
- package/views/2d/engine/webgl/MaterialManager.js +1 -1
- package/views/2d/engine/webgl/alignmentUtils.js +1 -1
- package/views/2d/engine/webgl/effects/BlendEffect.js +1 -1
- package/views/2d/engine/webgl/materialKey/MaterialKey.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/BlendPrograms.js +1 -1
- package/views/2d/engine/webgl/shaders/MaterialPrograms.js +1 -1
- package/views/2d/layers/BaseLayerView2D.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/WMSLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/support/engineHelpers.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/environment/CloudyWeather.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FoggyWeather.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.js +1 -1
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/WMSLayerView3D.js +1 -1
- package/views/3d/layers/WMTSLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicLikeLayerView.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
- package/views/3d/support/debugFlags.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +19 -14
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/InstanceParameters.js +5 -0
- package/views/3d/webgl-engine/lib/{localOrigin.js → LocalOriginFactory.js} +0 -0
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/MapView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/layers/OGCFeatureLayerView.js +1 -1
- package/views/layers/RefreshableLayerView.js +1 -1
- package/views/overlay/ViewOverlay.js +1 -1
- package/views/support/WatchUpdatingTracking.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/ContextState.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/ProgramCache.js +1 -1
- package/views/webgl/ProgramTemplate.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/views/webgl/UniformBufferLayout.js +5 -0
- package/views/webgl/UniformBufferObject.js +5 -0
- package/views/webgl/enums.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/views/webgl/storageLayouts.js +5 -0
- package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/views/webgl/testSamplerPrecision.js +1 -1
- package/views/webgl/tests/SimpleDraw.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesViewModel.js +1 -1
- package/widgets/Editor/BatchCreateWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureForm/InputFieldGroup.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList/support/layerListUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Weather/CoverageSlider.js +5 -0
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/assets/esri/core/workers/chunks/0881ce46b10362861f87.js +0 -1
- package/assets/esri/core/workers/chunks/0c0a02770eeeb3e28ea1.js +0 -1
- package/assets/esri/core/workers/chunks/0d2effbd84a9482eb639.js +0 -1
- package/assets/esri/core/workers/chunks/0f04246c1b591a3ac74d.js +0 -1
- package/assets/esri/core/workers/chunks/1ac6be0dc25e16c75d06.js +0 -1
- package/assets/esri/core/workers/chunks/1f8110ea12d65ca94b55.js +0 -1
- package/assets/esri/core/workers/chunks/2025d0fd61a64876c81b.js +0 -1
- package/assets/esri/core/workers/chunks/241859d74c0daac62e11.js +0 -1
- package/assets/esri/core/workers/chunks/331be347c1b1ca0be2d2.js +0 -1
- package/assets/esri/core/workers/chunks/39af317388ecebb4387d.js +0 -1
- package/assets/esri/core/workers/chunks/39be2893a7dbdecfd65a.js +0 -1
- package/assets/esri/core/workers/chunks/3a20f66b0b7d08064e34.js +0 -1
- package/assets/esri/core/workers/chunks/445099d037affd139ed0.js +0 -1
- package/assets/esri/core/workers/chunks/45848fecec88ed2da33d.js +0 -1
- package/assets/esri/core/workers/chunks/48d3a3abc53abe6a4017.js +0 -1
- package/assets/esri/core/workers/chunks/5005b8c1fdd5cb9a4c19.js +0 -1
- package/assets/esri/core/workers/chunks/52e4c367c72ea7cc3457.js +0 -1
- package/assets/esri/core/workers/chunks/5d8170f6207dbeb4de1b.js +0 -1
- package/assets/esri/core/workers/chunks/642c38ac00a962f35d44.js +0 -1
- package/assets/esri/core/workers/chunks/64459604505647e9c714.js +0 -1
- package/assets/esri/core/workers/chunks/653d1550dd1a4867a9fc.js +0 -1
- package/assets/esri/core/workers/chunks/65f73fbbc3c7c60c6d3d.js +0 -1
- package/assets/esri/core/workers/chunks/6db7081d344bea26ef64.js +0 -1
- package/assets/esri/core/workers/chunks/6e13dab8ec43f7494297.js +0 -1
- package/assets/esri/core/workers/chunks/7bd4c3ee43fb038b88d8.js +0 -1
- package/assets/esri/core/workers/chunks/803de5097a8a2c4b58a8.js +0 -1
- package/assets/esri/core/workers/chunks/8298231a0fd0129b0d5c.js +0 -1
- package/assets/esri/core/workers/chunks/8500c6c011400af1b7bd.js +0 -1
- package/assets/esri/core/workers/chunks/8b322a2a47dfdbb59b45.js +0 -1
- package/assets/esri/core/workers/chunks/8f83bebef9174c3f15da.js +0 -1
- package/assets/esri/core/workers/chunks/904332faa22bc0e876cb.js +0 -1
- package/assets/esri/core/workers/chunks/950565d1e682fc4072e1.js +0 -1
- package/assets/esri/core/workers/chunks/a247ddd84245c81112c8.js +0 -1
- package/assets/esri/core/workers/chunks/a9ffa806df20130ecfb6.js +0 -1
- package/assets/esri/core/workers/chunks/af13e534e4160636bd3d.js +0 -1
- package/assets/esri/core/workers/chunks/b2f62234ebb8b6158baa.js +0 -1
- package/assets/esri/core/workers/chunks/b5bb7cfa26b1f0cec67a.js +0 -1
- package/assets/esri/core/workers/chunks/b8666d1a4e4fff7a4703.js +0 -1
- package/assets/esri/core/workers/chunks/bea1da9e3f878e0e2c83.js +0 -1
- package/assets/esri/core/workers/chunks/c1b6c31fa3ec1542f996.js +0 -1
- package/assets/esri/core/workers/chunks/c32a4fbdc87225f84019.js +0 -1
- package/assets/esri/core/workers/chunks/c67fea81f69a60c0eaef.js +0 -1
- package/assets/esri/core/workers/chunks/d336afd5890dcdbf5341.js +0 -1
- package/assets/esri/core/workers/chunks/da69e3e5949fe1716e34.js +0 -1
- package/assets/esri/core/workers/chunks/daa9c450b2e2a5371249.js +0 -1
- package/assets/esri/core/workers/chunks/dd63ba77b7e4c3c9c594.js +0 -1
- package/assets/esri/core/workers/chunks/dfa57982d28c9aeb97b9.js +0 -1
- package/assets/esri/core/workers/chunks/e01812116b27874948f0.js +0 -1
- package/assets/esri/core/workers/chunks/e5c9d8482b913cf3580a.js +0 -1
- package/assets/esri/core/workers/chunks/eeadd92f0bede9fc8745.js +0 -1
- package/assets/esri/core/workers/chunks/fbb67cb6224aed2cce16.js +0 -1
- package/assets/esri/core/workers/chunks/feeaf61424336e9eac88.js +0 -1
- package/assets/esri/core/workers/chunks/ff02295329a8986d0568.js +0 -1
- package/views/2d/engine/webgl/mesh/templates/meshUtils.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Logger.js";import{isSome as i,isNone as s,destroyMaybe as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Logger.js";import{isSome as i,isNone as s,applySome as o,destroyMaybe as l}from"../../../core/maybe.js";import{initial as n}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{WhereClause as d}from"../../../core/sql/WhereClause.js";import h from"../../../layers/support/FeatureFilter.js";import p from"../../../rest/support/Query.js";import{I3SMeshView3D as c}from"./I3SMeshView3D.js";import{ForAllFeaturesVisibilityMode as y}from"./II3SMeshView3D.js";import{LayerView3D as f}from"./LayerView3D.js";import{createInteractiveEditSession as g,processAttributeEdits as m}from"./i3s/attributeEditing.js";import{createGetFeatureExtent as F}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as v}from"./i3s/I3SMeshViewFilter.js";import{NodeFilterImpact as _}from"./i3s/I3SNode.js";import w from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as S}from"./i3s/I3SQueryFeatureAdapter.js";import j from"./i3s/I3SQueryFeatureStore.js";import{getIndexCrs as I}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as E}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as b}from"./support/fieldProperties.js";import{PopupSceneLayerView as C}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as x}from"./support/SceneLayerViewRequiredFields.js";import{updatingProgress as Q}from"../support/updatingProperties.js";import q from"../../layers/SceneLayerView.js";import{getFloorFilterClause as D}from"../../support/floorFilterUtils.js";import{TaskPriority as L}from"../../support/Scheduler.js";const A=r.getLogger("esri.views.3d.layers.SceneLayerView3D"),O=b();let V=class extends(c(E(C(f(q))))){constructor(){super(...arguments),this.type="scene-layer-3d",this.lodFactor=1,this.progressiveLoadFactor=1,this._elevationContext="scene",this._isIntegratedMesh=!1,this._supportsLabeling=!0,this._interactiveEditingSessions=new Map,this._queryEngine=null}get filter(){return i(this.viewFilter)?this.viewFilter.filter:null}set filter(e){!s(e)&&v.checkSupport(e)?i(this.viewFilter)?this.viewFilter.filter=e:this.viewFilter=new v({filter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),applyFilters:()=>this._applyFilters(!0),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError)}):this.viewFilter=null}get requiredFields(){var e,t;return null!=(e=null==(t=this.fieldsHelper)?void 0:t.requiredFields)?e:[]}get floorFilterClause(){const e=D(this);return i(e)?d.create(e,this.layer.fieldsIndex):null}get lodCrossfadeinDuration(){var e,t;return null!=(e=null==(t=this.view)?void 0:t.qualitySettings.sceneService["3dObject"].lodCrossfadeinDuration)?e:0}get lodCrossfadeoutDuration(){var e,t;return null!=(e=null==(t=this.view)?void 0:t.qualitySettings.sceneService["3dObject"].lodCrossfadeoutDuration)?e:0}get lodCrossfadeUncoveredDuration(){var e,t;return null!=(e=null==(t=this.view)?void 0:t.qualitySettings.sceneService["3dObject"].lodCrossfadeUncoveredDuration)?e:0}initialize(){this.fieldsHelper=new x({layerView:this}),this.updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),n),this.updatingHandles.add((()=>this.layer.renderer),(e=>this.updatingHandles.addPromise(this._rendererChange(e))),n),this.updatingHandles.add((()=>[this.parsedDefinitionExpression,this.filter,this.floorFilterClause,o(this.viewFilter,(e=>[e.parsedWhereClause,e.parsedGeometry,e.sortedObjectIds]))]),(()=>this._filterChange())),this.updatingHandles.add((()=>[this.filter,o(this.viewFilter,(e=>e.parsedGeometry))]),(()=>this._geometryFilterChange())),this.handles.add(this.layer.on("apply-edits",(e=>this.updatingHandles.addPromise(e.result)))),this.handles.add(this.layer.on("edits",(e=>this._handleEdits(e))))}destroy(){this.fieldsHelper=l(this.fieldsHelper)}_rangeInfosChanged(e){null!=e&&e.length>0&&A.warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return i(this.filter)?this.filter.createQuery(e):new p(e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),null==t?void 0:t.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),null==t?void 0:t.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),null==t?void 0:t.signal).then((e=>{if(null==e||!e.features)return e;const t=this.layer;for(const r of e.features)r.layer=t,r.sourceLayer=t;return e}))}queryObjectIds(e,t){return this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),null==t?void 0:t.signal)}_ensureQueryEngine(){return this._queryEngine||(this._queryEngine=this._createQueryEngine()),this._queryEngine}_createQueryEngine(){const e=F(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new w({layerView:this,priority:L.FEATURE_QUERY_ENGINE,spatialIndex:new j({featureAdapter:new S({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures(((t,r,i)=>e({id:t,index:r,meta:i})),t,y.ALL_IN_CLIPPING_AREA),getFeatureExtent:e,sourceSpatialReference:I(this.layer),viewSpatialReference:this.view.spatialReference})})}highlight(e){const t=this._highlights;if(e instanceof p){const{set:r,handle:i}=t.acquireSet();return this.queryObjectIds(e).then((e=>t.setFeatureIds(r,e))),i}return super.highlight(e)}createInteractiveEditSession(e){return g(this.attributeEditingContext,e)}_createLayerGraphic(e){const r=new t(null,null,e);return r.layer=this.layer,r.sourceLayer=this.layer,r}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}getFilters(){const e=super.getFilters();return this.floorFilterClause&&this.addSqlFilter(e,this.floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),i(this.viewFilter)&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}_ensureQuery(e){return this._addDefinitionExpressionToQuery(s(e)?this.createQuery():p.from(e))}get attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),forEachNode:e=>this._forAllNodes((t=>i(t)?e(t.node,t.featureIds):null)),attributeStorageInfo:this.i3slayer.attributeStorageInfo,attributeOverrides:this.attributeOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}_handleEdits(e){m(this.attributeEditingContext,e)}get hasGeometryFilter(){const e=this.viewFilter;return i(e)&&i(e.parsedGeometry)}computeNodeFiltering(e){const t=this.viewFilter;return s(t)||t.isMBSGeoemtryVisible(e,this.view.spatialReference,this._controller.crsIndex)?_.Unmodified:_.Culled}};e([a({aliasOf:"layer"})],V.prototype,"i3slayer",void 0),e([a(Q)],V.prototype,"updatingProgress",void 0),e([a({type:h})],V.prototype,"filter",null),e([a()],V.prototype,"viewFilter",void 0),e([a(O.requiredFields)],V.prototype,"requiredFields",null),e([a(O.availableFields)],V.prototype,"availableFields",void 0),e([a()],V.prototype,"fieldsHelper",void 0),e([a()],V.prototype,"floorFilterClause",null),e([a({readOnly:!0,aliasOf:"view.qualitySettings.sceneService.3dObject.lodFactor"})],V.prototype,"lodFactor",void 0),e([a({readOnly:!0,aliasOf:"_controller.updatingProgress"})],V.prototype,"updatingProgressValue",void 0),V=e([u("esri.views.3d.layers.SceneLayerView3D")],V);const R=V;export{R as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{isNone as i,disposeMaybe as r,destroyMaybe as l}from"../../../core/maybe.js";import{isAborted as s}from"../../../core/promiseUtils.js";import{whenTrueOnce as o}from"../../../core/watchUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import h from"../../2d/engine/vectorTiles/SchemaHelper.js";import c from"../../2d/engine/vectorTiles/TileHandler3D.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{isNone as i,disposeMaybe as r,destroyMaybe as l}from"../../../core/maybe.js";import{isAborted as s}from"../../../core/promiseUtils.js";import{whenTrueOnce as o}from"../../../core/watchUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import h from"../../2d/engine/vectorTiles/SchemaHelper.js";import c from"../../2d/engine/vectorTiles/TileHandler3D.js";import p from"../../2d/engine/vectorTiles/VTLPainter3D.js";import m from"../../2d/engine/vectorTiles/style/StyleRepository.js";import{LayerView3D as d}from"./LayerView3D.js";import{TiledLayerView3D as y}from"./TiledLayerView3D.js";import{test as f}from"../terrain/terrainUtils.js";import u from"../../layers/LayerView.js";let g=class extends(y(d(u))){constructor(){super(...arguments),this.type="vector-tile-3d"}initialize(){if(i(this.layer.fullExtent))return void this.addResolvingPromise(Promise.reject(new t("vectortilelayerview:full-extent-undefined","This layer view's layer does not define a fullExtent.")));const e=f.force512VTL?this.layer.tileInfo:this.layer.compatibleTileInfo256,r=this._getTileInfoSupportError(e,this.layer.fullExtent);if(r)return this.addResolvingPromise(Promise.reject(r));const{basemapTerrain:l,spatialReference:n,pixelRatio:a}=this.view,d=o(this.view,"basemapTerrain.tilingSchemeLocked").then((()=>{const e=l.tilingScheme,t=e.pixelSize;let i;this.schemaHelper=new h(t,n.isGeographic),i=256===t?this.layer.compatibleTileInfo256:this.view.spatialReference.isGeographic?this.layer.compatibleTileInfo512:this.layer.tileInfo;const r=this._getTileInfoCompatibilityError(i,e);if(r)throw r;this._set("tileInfo",i)}));this._tileHandlerController=new AbortController;const y=this.view.resourceController;this._memCache=y.memoryController.newCache(this.layer.uid,(e=>{e.release()}));const{style:u}=this.layer.currentStyleInfo,g=new m(u),_=l.mapTileRequester;this._tileHandler=new c(this.layer,g,a,this._memCache,_);const v=this._tileHandlerController.signal,H=e=>y.schedule(e),w=this._tileHandler.start({signal:v,schedule:H}),C=this._tileHandler.spriteMosaic;C.then((e=>{!s(v)&&this._tileHandler&&(this.painter=new p(e,this._tileHandler.glyphMosaic))})),w.then((()=>this._tileHandlerController=null));const T=()=>{this._tileHandlerController&&this._tileHandlerController.abort(),this._tileHandlerController=new AbortController,this._memCache.clear();const{style:e}=this.layer.currentStyleInfo,t=new m(e),i=new c(this.layer,t,a,this._memCache,_),r=i.start({signal:this._tileHandlerController.signal,schedule:H}),l=i.spriteMosaic;r.then((()=>this._tileHandlerController=null)),this.updatingHandles.addPromise(Promise.all([r,l]).then((([,e])=>{const t=this._tileHandler,r=this.painter;this.painter=new p(e,i.glyphMosaic),this._tileHandler=i,this.emit("data-changed"),t.destroy(),r&&r.dispose()})))};this.updatingHandles.add((()=>[this.layer.currentStyleInfo,this.view.pixelRatio]),T);const j=Promise.all([d,w,C]);this.addResolvingPromise(j)}destroy(){this.painter=r(this.painter),this._tileHandlerController&&(this._tileHandlerController.abort(),this._tileHandlerController=null),l(this._tileHandler),this._memCache=l(this._memCache),this._tileHandler=null}get dataLevelRange(){const e=this.tileInfo.lods,t=e[0].scale,i=e[e.length-1].scale,r=this.levelRangeFromScaleRange(t,i);return 1===r.minLevel&&256===this.tileInfo.size[0]&&(r.minLevel=0),r}async fetchTile(e,t,i,r){return this._tileHandler.getVectorTile(e,t,i,r)}};e([n({aliasOf:"layer.fullExtent"})],g.prototype,"fullExtent",void 0),e([n()],g.prototype,"layer",void 0),e([n()],g.prototype,"tileInfo",void 0),e([n()],g.prototype,"dataLevelRange",null),e([n()],g.prototype,"updatingProgressValue",void 0),g=e([a("esri.views.3d.layers.VectorTileLayerView3D")],g);const _=g;export{_ as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/set.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import s from"../../../geometry/Extent.js";import i from"./DynamicLayerView3D.js";import{WMSLayerView as o}from"../../layers/WMSLayerView.js";let a=class extends(o(i)){constructor(){super(...arguments),this.type="wms-3d"}initialize(){this.layer.supportsSpatialReference(this.view.spatialReference)||this.addResolvingPromise(Promise.reject(new t("layerview:spatial-reference-incompatible","The spatial references supported by this WMS layer are incompatible with the spatial reference of the view"))),this.updatingHandles.add((()=>{var e;return null==(e=this.exportImageParameters)?void 0:e.version}),(()=>{this.updatingHandles.addPromise(this.refreshDebounced())}))}createFetchPopupFeaturesQuery(e){const t=this.findExtentInfoAt(e),r=t.extent,i=new s(r[0],r[1],r[2],r[3],this._spatialReference),o=t.imageSize,a=o.width,n=o.height,p=i.width/a;return{extent:i,width:a,height:n,x:Math.round((e.x-i.xmin)/p),y:Math.round((i.ymax-e.y)/p)}}getFetchOptions(){return{timeExtent:this.timeExtent}}};a=e([r("esri.views.3d.layers.WMSLayerView3D")],a);const n=a;export{n as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{whenTrueOnce as r}from"../../../core/watchUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{TiledLayerView3D as l}from"./TiledLayerView3D.js";import n from"../../layers/LayerView.js";import{RefreshableLayerView as h}from"../../layers/RefreshableLayerView.js";const p=i.getLogger("esri.views.3d.layers.WMTSLayerView3d");let c=class extends(h(l(a(n)))){constructor(){super(...arguments),this.type="wmts-3d"}get hasMixedImageFormats(){return!0}initialize(){const e=r(this.view,"basemapTerrain.tilingSchemeDone").then((()=>{const e=()=>new t("layerview:no-compatible-tiling-scheme","None of the tiling schemes supported by the service are compatible with the scene.");if(!this.view.basemapTerrain.tilingSchemeLocked)throw e();const i=this.view.basemapTerrain.tilingScheme,r=this.layer.activeLayer;let s;if(r&&r.tileMatrixSet){s=r.tileMatrixSet;const e=s.tileInfo,t=this._getTileInfoSupportError(e,s.fullExtent)||this._getTileInfoCompatibilityError(e,i);if(t)throw t}else{if(s=this._getCompatibleTileMatrixSet(),!s)throw e();r.tileMatrixSetId=s.id}this._set("tileInfo",s.tileInfo),this._set("fullExtent",s.fullExtent),this.layer.fullExtent=s.fullExtent}));this.addResolvingPromise(e),this.when((()=>this._initialized()))}refresh(){this.emit("data-changed")}canResume(){if(!super.canResume())return!1;const e=this.layer.activeLayer.tileMatrixSet;return e&&!this._getTileInfoError(e.tileInfo,e.fullExtent)}async doRefresh(){this.suspended||this.emit("data-changed")}_initialized(){this.updatingHandles.add(this
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{whenTrueOnce as r}from"../../../core/watchUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{TiledLayerView3D as l}from"./TiledLayerView3D.js";import n from"../../layers/LayerView.js";import{RefreshableLayerView as h}from"../../layers/RefreshableLayerView.js";const p=i.getLogger("esri.views.3d.layers.WMTSLayerView3d");let c=class extends(h(l(a(n)))){constructor(){super(...arguments),this.type="wmts-3d"}get hasMixedImageFormats(){return!0}initialize(){const e=r(this.view,"basemapTerrain.tilingSchemeDone").then((()=>{const e=()=>new t("layerview:no-compatible-tiling-scheme","None of the tiling schemes supported by the service are compatible with the scene.");if(!this.view.basemapTerrain.tilingSchemeLocked)throw e();const i=this.view.basemapTerrain.tilingScheme,r=this.layer.activeLayer;let s;if(r&&r.tileMatrixSet){s=r.tileMatrixSet;const e=s.tileInfo,t=this._getTileInfoSupportError(e,s.fullExtent)||this._getTileInfoCompatibilityError(e,i);if(t)throw t}else{if(s=this._getCompatibleTileMatrixSet(),!s)throw e();r.tileMatrixSetId=s.id}this._set("tileInfo",s.tileInfo),this._set("fullExtent",s.fullExtent),this.layer.fullExtent=s.fullExtent}));this.addResolvingPromise(e),this.when((()=>this._initialized()))}refresh(){this.emit("data-changed")}canResume(){if(!super.canResume())return!1;const e=this.layer.activeLayer.tileMatrixSet;return e&&!this._getTileInfoError(e.tileInfo,e.fullExtent)}async doRefresh(){this.suspended||this.emit("data-changed")}_initialized(){this.updatingHandles.add((()=>{var e,t;return null==(e=this.layer)||null==(t=e.activeLayer)?void 0:t.styleId}),(()=>this.refresh())),this.updatingHandles.add((()=>{var e;return null==(e=this.layer)?void 0:e.activeLayer}),(e=>{let t=e.tileMatrixSet;if(t){const e=this._getTileInfoError(t.tileInfo,t.fullExtent);e&&(p.error("The selected tile matrix set is not compatible with the view",e),t=null)}else t=this._getCompatibleTileMatrixSet(),t?e.tileMatrixSetId=t.id:p.error("The layer does not provide a tiling scheme that is compatible with the view");this.notifyChange("suspended"),this.canResume()&&this.refresh()}))}_getCompatibleTileMatrixSet(){return this.layer.activeLayer.tileMatrixSets.find((e=>{const t=e.tileInfo;return!this._getTileInfoError(t,e.fullExtent)}))}_getTileInfoError(e,t){return this._getTileInfoSupportError(e,t)||this._getTileInfoCompatibilityError(e,this.view.basemapTerrain.tilingScheme)}};e([s({readOnly:!0})],c.prototype,"hasMixedImageFormats",null),e([s()],c.prototype,"fullExtent",void 0),e([s()],c.prototype,"layer",void 0),e([s()],c.prototype,"suspended",void 0),e([s()],c.prototype,"tileInfo",void 0),c=e([o("esri.views.3d.layers.WMTSLayerView3D")],c);const m=c;export{m as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as s}from"../../../../core/mathUtils.js";import{isNone as e,isSome as r}from"../../../../core/maybe.js";import a from"../../../../core/PooledArray.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{a as n}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{a as l}from"../../../../chunks/vec2f64.js";import{m as p,a as u,s as d,g as f}from"../../../../chunks/vec3.js";import{Z as m,c as g}from"../../../../chunks/vec3f64.js";import{s as b,t as v,b as y}from"../../../../chunks/vec4.js";import{c as _}from"../../../../chunks/vec4f64.js";import{getReferenceEllipsoid as G}from"../../../../geometry/projectionEllipsoid.js";import{create as S,empty as B,offset as w,width as D,height as N,expand as j,intersects as I}from"../../../../geometry/support/aaBoundingRect.js";import{c as V,a as P,e as C}from"../../../../chunks/boundedPlane.js";import{create as A}from"../../../../geometry/support/ray.js";import{d as O,g as x,e as M,c as T}from"../../../../chunks/sphere.js";import{drawAccelerationStruct as z,prepare as E,drawPoly as F}from"./deconflictorDebug.js";import{VisibilityGroup as X,VisibilityFlag as R}from"./enums.js";import L from"../../support/debugFlags.js";import{VertexAttribute as Y}from"../../webgl-engine/lib/basicInterfaces.js";import k from"../../webgl-engine/lib/Camera.js";import{applyPrecomputedScaleFactor as W}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{HUDMaterial as U}from"../../webgl-engine/materials/HUDMaterial.js";const H=g(),Z=_(),q=_(),J=g(),K=h(),Q=T(),$=A(),ii=g(),ti=S();class si{constructor(){this.aabr=S(),this.distance=0,this.culled=!1,this.visible=!1}}class ei{constructor(i,t,s={}){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this.info=s}}class ri{constructor(){this.active=new Map,this.visible=new Map}clear(){this.active.clear(),this.visible.clear()}}class ai{}class oi{constructor(){this.sortArray=new a({allocator:i=>i||new ai})}}var ci;!function(i){i[i.Idle=0]="Idle",i[i.Process=1]="Process",i[i.Sort=2]="Sort",i[i.Deconflict=3]="Deconflict",i[i.NumStates=4]="NumStates"}(ci||(ci={}));class ni{constructor(){this.camera=new k,this.slicePlane=V(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),P(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let hi=class extends t{constructor(){super(...arguments),this._dirty=!1,this._runningViewState=new ni,this._state=ci.Idle,this.graphics=new ri,this.iterators=new oi,this.accBinsNumX=15,this.accBinsNumY=20,this.accBinsSizeX=0,this.accBinsSizeY=0,this.accBins=null,this.accNumTests=0}get dirty(){return this._dirty}get state(){return this._state}destroy(){this.graphics.clear(),this.iterators=null}setDirty(){!this._dirty&&this.graphics.active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==ci.Idle||this._dirty}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ci.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ci.Idle:this._startUpdate(),i.madeProgress();case ci.Process:if(this._state=ci.Process,!this._processActiveGraphics(i))return;case ci.Sort:if(this._state=ci.Sort,!this._sortVisibleGraphics(i))return;case ci.Deconflict:if(this._state=ci.Deconflict,!this._deconflictVisibleGraphics(i))return;default:z(this,this.graphics.visible),this._state=ci.Idle,this.notifyChange("updating")}}modifyGraphics(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i))),this.setDirty()}layerSupportsDeconfliction(i){if(e(i)||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?t.geometryRecords.length:0))return!1;return t.geometryRecords[0].material instanceof U}_startUpdate(){E(this.view),this._dirty=!1,this._runningViewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._runningViewState.camera;this._initBins(i,t),this._resetIterators()}addToActiveGraphics(i){i.info[this.visibilityGroup]=new si,this.graphics.active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){this._removeFromVisibleGraphics(i),li(i,this.visibilityGroup),delete i.info[this.visibilityGroup],this.graphics.active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}_addToVisibleGraphics(i){this.graphics.visible.set(i.graphics3DGraphic.graphic.uid,i)}_removeFromVisibleGraphics(i){this.graphics.visible.delete(i.graphics3DGraphic.graphic.uid)}_processActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),s=n(K,this._runningViewState.camera.projectionMatrix),e="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._runningViewState.camera.relativeElevation>0?Q:null;let a=0;for(r(e)&&(p(e,m,this._runningViewState.camera.viewMatrix),e[3]=G(this.view.spatialReference).radius,a=O(e,m));!i.done;){i.madeProgress();const r=t.next();if(r.done)return this._resetActiveGraphicsIterator(),!0;const o=r.value,c=o&&o.info[this.visibilityGroup];c&&(this._collectGraphics3DGraphics(o,s,e,a),c.culled?this._removeFromVisibleGraphics(o):this._addToVisibleGraphics(o))}return!1}_sortVisibleGraphics(i){const t=this._ensureSortGraphicsIterator();for(;!i.done;){const s=t.next();if(i.madeProgress(),s.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(i){const t=this._ensureVisibleGraphicsIterator(),s=this.visibilityGroup===X.LABEL;for(;!i.done;){i.madeProgress();const e=t.next();if(e.done)return this._resetVisibleGraphicsIterator(),!0;const r=e.value,a=r.info[this.visibilityGroup];if(!a||a.culled)continue;const o=r.graphics3DGraphic,c=(!s||o.isVisible())&&!this._isConflicted(r);c&&this._addToBins(r),a.visible=c,this._setGraphicVisibility(r,c),F(a,c)}return!1}_resetIterators(){this.iterators.active=null,this.iterators.visible=null,this.iterators.sort=null}_ensureActiveGraphicsIterator(){return this.iterators.active||(this.iterators.active=pi(this.graphics.active)),this.iterators.active}_resetActiveGraphicsIterator(){this.iterators.active=null}_ensureVisibleGraphicsIterator(){return this.iterators.visible||(this.iterators.visible=pi(this.graphics.visible)),this.iterators.visible}_resetVisibleGraphicsIterator(){this.iterators.visible=null}_ensureSortGraphicsIterator(){return this.iterators.sort||(this.iterators.sort=ui(this.graphics.visible,this.iterators.sortArray,this.visibilityGroup)),this.iterators.sort}_resetSortGraphicsIterator(){this.iterators.sort=null}_collectGraphics3DGraphics(i,t,s,a){const o=i.graphics3DGraphic;if(o.destroyed)return;const c=i.info[this.visibilityGroup];if(!o.isVisible(X.GRAPHIC,R.DECONFLICTION))return void(c.culled=!0);const n=this.getGraphicsLayers(o);B(c.aabr);let h=null;for(const l of n){if(!this.layerSupportsDeconfliction(l))continue;const o=l.stageObject.geometryRecords[0].material;if(e(h)){if(h=this._getProjectionInfo(l,t,mi),h.isOutsideScreen||this._isCulledBySlice(i,H)||r(s)&&this._isCulledByHorizon(h,s,a))return void(c.culled=!0);!L.TESTS_DISABLE_OPTIMIZATIONS&&c.visible&&(h.distance*=.7)}this._expandBoundingRect(c,l,o,h)}e(h)?c.culled=!0:(c.distance=h.distance,c.culled=!1)}_getProjectionInfo(i,t,s){const e=this._runningViewState.camera,r=i.stageObject,a=r.geometryRecords[0],o=a.material,c=x(r.boundingVolumeWorldSpace.bounds);p(H,c,e.viewMatrix);const n=a.geometry.vertexAttributes,h=n.get(Y.NORMAL).data,l=n.get(Y.AUXPOS1).data;return o.applyShaderOffsetsView(H,h,r.transformation,l,e,s.scaleInfo,H),b(Z,H[0],H[1],H[2],1),v(q,Z,e.projectionMatrix),u(s.positionNDC,q,1/q[3]),o.applyShaderOffsetsNDC(s.positionNDC,l,e,s.positionNDC,J),s.distanceWithoutPolygonOffset=e.depthNDCToWorld(J[2]),s.distance=J[2]===s.positionNDC[2]?s.distanceWithoutPolygonOffset:e.depthNDCToWorld(s.positionNDC[2]),b(q,s.positionNDC[0],s.positionNDC[1],s.positionNDC[2],1),v(Z,q,t),y(Z,Z,1/Z[3]),d(s.positionView,H[0],H[1],H[2]),s}_isCulledByHorizon(i,t,s){return f($.direction,i.positionView),d($.origin,0,0,0),!!M(t,$,ii)&&i.distanceWithoutPolygonOffset>s}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._runningViewState.slicePlaneEnabled&&C(this._runningViewState.slicePlane,t)}_expandBoundingRect(i,t,e,{positionNDC:r,scaleInfo:a}){const o=this._runningViewState.camera,c=t.getScreenSize(di);W(c,a.factor,c),c[0]*=o.pixelRatio,c[1]*=o.pixelRatio;const n=w(e.calculateRelativeScreenBounds(c,a.factorAlignment.scale,ti),s(0,o.fullWidth,.5+.5*r[0]),s(0,o.fullHeight,.5+.5*r[1])),h=this.iconMarginFactor;if(0!==h){const i=h*Math.min(D(n),N(n));n[0]-=i,n[1]-=i,n[2]+=i,n[3]+=i}j(i.aabr,n,i.aabr)}_isConflicted(i){const t=i.graphics3DGraphic.graphic.uid,s=i.info[this.visibilityGroup];for(let e=Math.floor(s.aabr[0]/this.accBinsSizeX);e<=Math.floor(s.aabr[2]/this.accBinsSizeX);e++)if(!(e<0||e>=this.accBinsNumX))for(let i=Math.floor(s.aabr[1]/this.accBinsSizeY);i<=Math.floor(s.aabr[3]/this.accBinsSizeY);i++){if(i<0||i>=this.accBinsNumY)continue;const r=this.accBins[e][i];for(let i=0;i<r.length;i++){const e=r.data[i],a=e.info[this.visibilityGroup];if(a&&a.visible&&(e.graphics3DGraphic.graphic.uid!==t&&(this.accNumTests++,I(a.aabr,s.aabr))))return!0}}return!1}_initBins(i,t){if(null==this.accBins){this.accBins=[];for(let i=0;i<this.accBinsNumX;i++){this.accBins.push([]);const i=this.accBins[this.accBins.length-1];for(let t=0;t<this.accBinsNumY;t++)i.push(new a)}}else for(let s=0;s<this.accBinsNumX;s++)for(let i=0;i<this.accBinsNumY;i++)this.accBins[s][i].clear();this.accBinsSizeX=i/this.accBinsNumX,this.accBinsSizeY=t/this.accBinsNumY,this.accNumTests=0}_addToBins(i){const t=i.info[this.visibilityGroup],s=Math.floor(t.aabr[0]/this.accBinsSizeX),e=Math.floor(t.aabr[2]/this.accBinsSizeX),r=Math.floor(t.aabr[1]/this.accBinsSizeY),a=Math.floor(t.aabr[3]/this.accBinsSizeY);for(let o=s;o<=e;o++)if(!(o<0||o>=this.accBinsNumX))for(let t=r;t<=a;t++)t<0||t>=this.accBinsNumY||this.accBins[o][t].push(i)}_setGraphicVisibility(i,t){const s=i.graphics3DGraphic;s.destroyed||(s.setVisibilityFlag(R.DECONFLICTION,t,this.visibilityGroup),this.visibilityGroup===X.LABEL&&this.view.labeler.setLabelGraphicVisibility(s,t))}};function li(i,t){const s=i.graphics3DGraphic;s.destroyed||s.clearVisibilityFlag(R.DECONFLICTION,t)}function*pi(i){if(Map.prototype.entries){const t=i.entries();for(let i=t.next();!i.done;i=t.next())yield i.value[1]}else yield*i.values()}function*ui(i,t,s){t.clear(),i.forEach(((i,e)=>{const r=t.pushNew();r.id=e,r.prio=i.info?-i.info[s].distance:Number.MAX_VALUE})),yield;const e=t.iterableSort(((i,t)=>t.prio-i.prio));for(let r=e.next();!r.done;r=e.next())yield;t.forAll((t=>{const s=i.get(t.id);s&&(i.delete(t.id),i.set(t.id,s))})),t.clear()}i([o({constructOnly:!0})],hi.prototype,"view",void 0),i([o({type:Boolean,readOnly:!0})],hi.prototype,"updating",null),hi=i([c("esri.views.3d.layers.graphics.Deconflictor")],hi);const di=l();class fi{constructor(){this.positionView=g(),this.positionNDC=g(),this.distance=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}}}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1}}const mi=new fi;export{hi as Deconflictor,ei as DeconflictorGraphic,ni as DeconflictorViewState,ci as State};
|
|
5
|
+
import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as s}from"../../../../core/mathUtils.js";import{isNone as e,isSome as r}from"../../../../core/maybe.js";import a from"../../../../core/PooledArray.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{a as n}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{a as l}from"../../../../chunks/vec2f64.js";import{m as p,a as u,s as d,g as f}from"../../../../chunks/vec3.js";import{Z as m,c as g}from"../../../../chunks/vec3f64.js";import{s as b,t as v,b as y}from"../../../../chunks/vec4.js";import{c as _}from"../../../../chunks/vec4f64.js";import{getReferenceEllipsoid as G}from"../../../../geometry/projectionEllipsoid.js";import{create as S,empty as B,offset as w,width as D,height as N,expand as j,intersects as I}from"../../../../geometry/support/aaBoundingRect.js";import{c as V,a as P,e as C}from"../../../../chunks/boundedPlane.js";import{create as A}from"../../../../geometry/support/ray.js";import{d as O,g as x,e as M,c as T}from"../../../../chunks/sphere.js";import{drawAccelerationStruct as z,prepare as E,drawPoly as F}from"./deconflictorDebug.js";import{VisibilityGroup as X,VisibilityFlag as R}from"./enums.js";import L from"../../support/debugFlags.js";import{VertexAttribute as Y}from"../../webgl-engine/lib/basicInterfaces.js";import k from"../../webgl-engine/lib/Camera.js";import{applyPrecomputedScaleFactor as W}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{HUDMaterial as U}from"../../webgl-engine/materials/HUDMaterial.js";const H=g(),Z=_(),q=_(),J=g(),K=h(),Q=T(),$=A(),ii=g(),ti=S();class si{constructor(){this.aabr=S(),this.distance=0,this.culled=!1,this.visible=!1}}class ei{constructor(i,t,s={}){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this.info=s}}class ri{constructor(){this.active=new Map,this.visible=new Map}clear(){this.active.clear(),this.visible.clear()}}class ai{}class oi{constructor(){this.sortArray=new a({allocator:i=>i||new ai})}}var ci;!function(i){i[i.Idle=0]="Idle",i[i.Process=1]="Process",i[i.Sort=2]="Sort",i[i.Deconflict=3]="Deconflict",i[i.NumStates=4]="NumStates"}(ci||(ci={}));class ni{constructor(){this.camera=new k,this.slicePlane=V(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),P(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let hi=class extends t{constructor(){super(...arguments),this._dirty=!1,this._runningViewState=new ni,this._state=ci.Idle,this.graphics=new ri,this.iterators=new oi,this.accBinsNumX=15,this.accBinsNumY=20,this.accBinsSizeX=0,this.accBinsSizeY=0,this.accBins=null,this.accNumTests=0}get dirty(){return this._dirty}get state(){return this._state}destroy(){this.graphics.clear(),this.iterators=null}setDirty(){!this._dirty&&this.graphics.active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==ci.Idle||this._dirty}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ci.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ci.Idle:this._startUpdate(),i.madeProgress();case ci.Process:if(this._state=ci.Process,!this._processActiveGraphics(i))return;case ci.Sort:if(this._state=ci.Sort,!this._sortVisibleGraphics(i))return;case ci.Deconflict:if(this._state=ci.Deconflict,!this._deconflictVisibleGraphics(i))return;default:z(this,this.graphics.visible),this._state=ci.Idle,this.notifyChange("updating")}}modifyGraphics(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i))),this.setDirty()}layerSupportsDeconfliction(i){if(e(i)||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?t.geometryRecords.length:0))return!1;return t.geometryRecords[0].material instanceof U}_startUpdate(){E(this.view),this._dirty=!1,this._runningViewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._runningViewState.camera;this._initBins(i,t),this._resetIterators()}addToActiveGraphics(i){i.info[this.visibilityGroup]=new si,this.graphics.active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){this._removeFromVisibleGraphics(i),li(i,this.visibilityGroup),delete i.info[this.visibilityGroup],this.graphics.active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}_addToVisibleGraphics(i){this.graphics.visible.set(i.graphics3DGraphic.graphic.uid,i)}_removeFromVisibleGraphics(i){this.graphics.visible.delete(i.graphics3DGraphic.graphic.uid)}_processActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),s=n(K,this._runningViewState.camera.projectionMatrix),e="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._runningViewState.camera.relativeElevation>0?Q:null;let a=0;for(r(e)&&(p(e,m,this._runningViewState.camera.viewMatrix),e[3]=G(this.view.spatialReference).radius,a=O(e,m));!i.done;){i.madeProgress();const r=t.next();if(!0===r.done)return this._resetActiveGraphicsIterator(),!0;const o=r.value,c=o&&o.info[this.visibilityGroup];c&&(this._collectGraphics3DGraphics(o,s,e,a),c.culled?this._removeFromVisibleGraphics(o):this._addToVisibleGraphics(o))}return!1}_sortVisibleGraphics(i){const t=this._ensureSortGraphicsIterator();for(;!i.done;){const s=t.next();if(i.madeProgress(),!0===s.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(i){const t=this._ensureVisibleGraphicsIterator(),s=this.visibilityGroup===X.LABEL;for(;!i.done;){i.madeProgress();const e=t.next();if(!0===e.done)return this._resetVisibleGraphicsIterator(),!0;const r=e.value,a=r.info[this.visibilityGroup];if(!a||a.culled)continue;const o=r.graphics3DGraphic,c=(!s||o.isVisible())&&!this._isConflicted(r);c&&this._addToBins(r),a.visible=c,this._setGraphicVisibility(r,c),F(a,c)}return!1}_resetIterators(){this.iterators.active=null,this.iterators.visible=null,this.iterators.sort=null}_ensureActiveGraphicsIterator(){return this.iterators.active||(this.iterators.active=pi(this.graphics.active)),this.iterators.active}_resetActiveGraphicsIterator(){this.iterators.active=null}_ensureVisibleGraphicsIterator(){return this.iterators.visible||(this.iterators.visible=pi(this.graphics.visible)),this.iterators.visible}_resetVisibleGraphicsIterator(){this.iterators.visible=null}_ensureSortGraphicsIterator(){return this.iterators.sort||(this.iterators.sort=ui(this.graphics.visible,this.iterators.sortArray,this.visibilityGroup)),this.iterators.sort}_resetSortGraphicsIterator(){this.iterators.sort=null}_collectGraphics3DGraphics(i,t,s,a){const o=i.graphics3DGraphic;if(o.destroyed)return;const c=i.info[this.visibilityGroup];if(!o.isVisible(X.GRAPHIC,R.DECONFLICTION))return void(c.culled=!0);const n=this.getGraphicsLayers(o);B(c.aabr);let h=null;for(const l of n){if(!this.layerSupportsDeconfliction(l))continue;const o=l.stageObject.geometryRecords[0].material;if(e(h)){if(h=this._getProjectionInfo(l,t,mi),h.isOutsideScreen||this._isCulledBySlice(i,H)||r(s)&&this._isCulledByHorizon(h,s,a))return void(c.culled=!0);!L.TESTS_DISABLE_OPTIMIZATIONS&&c.visible&&(h.distance*=.7)}this._expandBoundingRect(c,l,o,h)}e(h)?c.culled=!0:(c.distance=h.distance,c.culled=!1)}_getProjectionInfo(i,t,s){const e=this._runningViewState.camera,r=i.stageObject,a=r.geometryRecords[0],o=a.material,c=x(r.boundingVolumeWorldSpace.bounds);p(H,c,e.viewMatrix);const n=a.geometry.vertexAttributes,h=n.get(Y.NORMAL).data,l=n.get(Y.AUXPOS1).data;return o.applyShaderOffsetsView(H,h,r.transformation,l,e,s.scaleInfo,H),b(Z,H[0],H[1],H[2],1),v(q,Z,e.projectionMatrix),u(s.positionNDC,q,1/q[3]),o.applyShaderOffsetsNDC(s.positionNDC,l,e,s.positionNDC,J),s.distanceWithoutPolygonOffset=e.depthNDCToWorld(J[2]),s.distance=J[2]===s.positionNDC[2]?s.distanceWithoutPolygonOffset:e.depthNDCToWorld(s.positionNDC[2]),b(q,s.positionNDC[0],s.positionNDC[1],s.positionNDC[2],1),v(Z,q,t),y(Z,Z,1/Z[3]),d(s.positionView,H[0],H[1],H[2]),s}_isCulledByHorizon(i,t,s){return f($.direction,i.positionView),d($.origin,0,0,0),!!M(t,$,ii)&&i.distanceWithoutPolygonOffset>s}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._runningViewState.slicePlaneEnabled&&C(this._runningViewState.slicePlane,t)}_expandBoundingRect(i,t,e,{positionNDC:r,scaleInfo:a}){const o=this._runningViewState.camera,c=t.getScreenSize(di);W(c,a.factor,c),c[0]*=o.pixelRatio,c[1]*=o.pixelRatio;const n=w(e.calculateRelativeScreenBounds(c,a.factorAlignment.scale,ti),s(0,o.fullWidth,.5+.5*r[0]),s(0,o.fullHeight,.5+.5*r[1])),h=this.iconMarginFactor;if(0!==h){const i=h*Math.min(D(n),N(n));n[0]-=i,n[1]-=i,n[2]+=i,n[3]+=i}j(i.aabr,n,i.aabr)}_isConflicted(i){const t=i.graphics3DGraphic.graphic.uid,s=i.info[this.visibilityGroup];for(let e=Math.floor(s.aabr[0]/this.accBinsSizeX);e<=Math.floor(s.aabr[2]/this.accBinsSizeX);e++)if(!(e<0||e>=this.accBinsNumX))for(let i=Math.floor(s.aabr[1]/this.accBinsSizeY);i<=Math.floor(s.aabr[3]/this.accBinsSizeY);i++){if(i<0||i>=this.accBinsNumY)continue;const r=this.accBins[e][i];for(let i=0;i<r.length;i++){const e=r.data[i],a=e.info[this.visibilityGroup];if(a&&a.visible&&(e.graphics3DGraphic.graphic.uid!==t&&(this.accNumTests++,I(a.aabr,s.aabr))))return!0}}return!1}_initBins(i,t){if(null==this.accBins){this.accBins=[];for(let i=0;i<this.accBinsNumX;i++){this.accBins.push([]);const i=this.accBins[this.accBins.length-1];for(let t=0;t<this.accBinsNumY;t++)i.push(new a)}}else for(let s=0;s<this.accBinsNumX;s++)for(let i=0;i<this.accBinsNumY;i++)this.accBins[s][i].clear();this.accBinsSizeX=i/this.accBinsNumX,this.accBinsSizeY=t/this.accBinsNumY,this.accNumTests=0}_addToBins(i){const t=i.info[this.visibilityGroup],s=Math.floor(t.aabr[0]/this.accBinsSizeX),e=Math.floor(t.aabr[2]/this.accBinsSizeX),r=Math.floor(t.aabr[1]/this.accBinsSizeY),a=Math.floor(t.aabr[3]/this.accBinsSizeY);for(let o=s;o<=e;o++)if(!(o<0||o>=this.accBinsNumX))for(let t=r;t<=a;t++)t<0||t>=this.accBinsNumY||this.accBins[o][t].push(i)}_setGraphicVisibility(i,t){const s=i.graphics3DGraphic;s.destroyed||(s.setVisibilityFlag(R.DECONFLICTION,t,this.visibilityGroup),this.visibilityGroup===X.LABEL&&this.view.labeler.setLabelGraphicVisibility(s,t))}};function li(i,t){const s=i.graphics3DGraphic;s.destroyed||s.clearVisibilityFlag(R.DECONFLICTION,t)}function*pi(i){if(Map.prototype.entries){const t=i.entries();for(let i=t.next();!i.done;i=t.next())yield i.value[1]}else yield*i.values()}function*ui(i,t,s){t.clear(),i.forEach(((i,e)=>{const r=t.pushNew();r.id=e,r.prio=i.info?-i.info[s].distance:Number.MAX_VALUE})),yield;const e=t.iterableSort(((i,t)=>t.prio-i.prio));for(let r=e.next();!r.done;r=e.next())yield;t.forAll((t=>{const s=i.get(t.id);s&&(i.delete(t.id),i.set(t.id,s))})),t.clear()}i([o({constructOnly:!0})],hi.prototype,"view",void 0),i([o({type:Boolean,readOnly:!0})],hi.prototype,"updating",null),hi=i([c("esri.views.3d.layers.graphics.Deconflictor")],hi);const di=l();class fi{constructor(){this.positionView=g(),this.positionNDC=g(),this.distance=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}}}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1}}const mi=new fi;export{hi as Deconflictor,ei as DeconflictorGraphic,ni as DeconflictorViewState,ci as State};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import{neverReached as s}from"../../../../core/compilerUtils.js";import r from"../../../../core/Handles.js";import{logOnError as n}from"../../../../core/promiseUtils.js";import{init as a}from"../../../../core/watchUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as p}from"../../../../core/accessorSupport/diffUtils.js";import{canProject as h,project as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import{neverReached as s}from"../../../../core/compilerUtils.js";import r from"../../../../core/Handles.js";import{logOnError as n}from"../../../../core/promiseUtils.js";import{init as a}from"../../../../core/watchUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as p}from"../../../../core/accessorSupport/diffUtils.js";import{canProject as h,project as d}from"../../../../geometry/support/webMercatorUtils.js";import c from"../../../../rest/support/Query.js";import{SUSPEND_RESUME_EXTENT_OPTIMISM as u}from"./constants.js";import{Graphics3DCore as g}from"./Graphics3DCore.js";import y from"./Graphics3DElevationAlignment.js";import{Graphics3DFilterVisibility as m}from"./Graphics3DFilterVisibility.js";import f from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as b}from"./Graphics3DObjectStates.js";import w from"./Graphics3DScaleVisibility.js";import{enlargeExtent as x}from"./graphicUtils.js";import{attributeLookup as E}from"../support/attributeUtils.js";import{Object3DState as C}from"../../webgl-engine/lib/basicInterfaces.js";import{WatchUpdatingTracking as v}from"../../../support/WatchUpdatingTracking.js";let V=class extends i{constructor(t){super(t),this.type="graphics-3d",this._handles=new r,this.watchUpdatingTracking=new v,this.suspendResumeExtentMode="computed",this.dataExtent=null,this.suspendResumeExtent=null}get suspended(){var t;return null==(t=this.scaleVisibility)?void 0:t.suspended}get suspendInfo(){var t,e;const i={};return null!=(t=this.scaleVisibility)&&t.suspended&&(i.outsideScaleRange=!0),null!=(e=this.frustumVisibility)&&e.suspended&&(i.outsideOfView=!0),i}get updating(){var t,e,i;return!!(null!=(t=this.graphicsCore)&&t.updating||null!=(e=this.frustumVisibility)&&e.updating||null!=(i=this.watchUpdatingTracking)&&i.updating)}get featureStore(){var t;return null==(t=this.graphicsCore)?void 0:t.featureStore}normalizeCtorArgs(t){const e=t.frustumVisibilityEnabled?new f:null,i=t.scaleVisibilityEnabled?new w:null,s=(t.filterVisibilityEnabled||t.timeExtentVisibilityEnabled)&&"multipatch"!==t.layer.geometryType?new m:null,r=t.elevationAlignmentEnabled?new y:null,n=new g({owner:t.owner,layer:t.layer,preferredUpdatePolicy:t.preferredUpdatePolicy,elevationFeatureExpressionEnabled:t.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:t.owner.hasZ,hasM:t.owner.hasM}),{updateClippingExtent:a,suspendResumeExtentMode:o,dataExtent:l}=t;return{graphicsCore:n,frustumVisibility:e,scaleVisibility:i,filterVisibility:s,elevationAlignment:r,updateClippingExtent:a,suspendResumeExtentMode:o,dataExtent:l}}initialize(){this.scaleVisibility&&this.watchUpdatingTracking.add((()=>this.layer.effectiveScaleRange),(()=>this.scaleVisibility.layerMinMaxScaleChangeHandler())),this.filterVisibility&&(this.watchUpdatingTracking.add((()=>this.owner.filter),(()=>this.filterVisibility.filterChanged())),this.watchUpdatingTracking.add((()=>this.owner&&"feature-3d"===this.owner.type&&this.owner.timeExtent),(()=>this.filterVisibility.filterChanged()))),this.elevationAlignment&&this.watchUpdatingTracking.add((()=>this.layer.elevationInfo),((t,e)=>{p(t,e)&&this.watchUpdatingTracking.addPromise(this.graphicsCore.elevationInfoChange())})),this.watchUpdatingTracking.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this.watchUpdatingTracking.add((()=>this.layer.labelingInfo),((t,e)=>{p(t,e)&&this.graphicsCore.updateLabelingInfo()}))}async setup(){this.frustumVisibility&&this.frustumVisibility.setup(this.owner);const t=this.owner,e=this.owner.view.basemapTerrain,i=(t,e,i)=>this.graphicsCore.spatialIndex.queryGraphicUIDsInExtent(t,e,i);if(this.scaleVisibility&&this.scaleVisibility.setup(t,this.layer,i,this.graphicsCore,e),this.filterVisibility&&("filter"in t||"timeExtent"in t)&&this.filterVisibility.setup(t,this.graphicsCore),this.elevationAlignment){const e=t.view.elevationProvider;this.elevationAlignment.setup(t,i,this.graphicsCore,e)}this._set("objectStates",new b(this.graphicsCore)),this._set("labeling",this.owner.view.labeler.addGraphicsOwner(this.graphicsCore,this.scaleVisibility)),this._set("deconfliction",t.view.deconflictor.addGraphicsOwner(this.graphicsCore)),await n(this.graphicsCore.setup({elevationAlignment:this.elevationAlignment,scaleVisibility:this.scaleVisibility,filterVisibility:this.filterVisibility,deconflictor:this.deconfliction,labeler:this.labeling,objectStates:this.objectStates})),this.watchUpdatingTracking.add((()=>this.layer.renderer),(t=>this.watchUpdatingTracking.addPromise(this.graphicsCore.rendererChange(t)))),this.watchUpdatingTracking.add((()=>t.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this.watchUpdatingTracking.add((()=>t.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await n(this.graphicsCore.updateLabelingInfo())}destroy(){this._handles&&(this._handles.destroy(),this._handles=null);const t=["watchUpdatingTracking","frustumVisibility","scaleVisibility","filterVisibility","elevationAlignment","objectStates","graphicsCore"];for(const e of t){const t=this[e];t&&(t.destroy(),this._set(e,null))}this._set("layer",null),this._set("owner",null)}maskOccludee(t){const{set:e,handle:i}=this.objectStates.acquireSet(C.MaskOccludee,null);return this.objectStates.setUid(e,t.uid),i}highlight(t,i){if(t instanceof c){const{set:e,handle:s}=this.objectStates.acquireSet(C.Highlight,i);return this.owner.queryObjectIds(t).then((t=>this.objectStates.setObjectIds(e,t))),s}if("number"==typeof t||"string"==typeof t)return this.highlight([t],i);if(t instanceof e)return this.highlight([t],i);if("toArray"in t&&(t=t.toArray()),Array.isArray(t)&&t.length>0){if(t[0]instanceof e){const e=t;if(null==E(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map((t=>t.uid)),{set:i,handle:s}=this.objectStates.acquireSet(C.Highlight,null);return this.objectStates.setUids(i,t),s}t=e.map((t=>E(this.layer.fieldsIndex,t.attributes,i)))}if("number"==typeof t[0]||"string"==typeof t[0]){const e=t,{set:s,handle:r}=this.objectStates.acquireSet(C.Highlight,i);return this.objectStates.setObjectIds(s,e),r}}return U}_updateClippingExtent(){const t=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(t,this.owner.view.spatialReference)&&(this.updateClippingExtent(t)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this._handles.add(a(this,"suspendResumeExtentMode",(()=>{switch(this._handles.remove(S),this.suspendResumeExtentMode){case"computed":this._handles.add([a(this.graphicsCore,"computedExtent",(t=>this._updateSuspendResumeExtent(t))),this.graphicsCore.watch("extentPadding",(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],S);break;case"data":this._handles.add([a(this,"dataExtent",(t=>this._updateSuspendResumeExtent(t))),this.graphicsCore.watch("extentPadding",(()=>this._updateSuspendResumeExtent(this.dataExtent)))],S);break;default:s(this.suspendResumeExtentMode)}})))}_updateSuspendResumeExtent(t){t?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(t,this.suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(t,e){const i=this.owner.view.spatialReference;if(!t.spatialReference.equals(i)){if(!h(t,i))return;t=d(t,i)}return x(t,e,u,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(t){this.frustumVisibility&&this.frustumVisibility.setExtent(t),this.scaleVisibility&&this.scaleVisibility.setExtent(t)}};t([o()],V.prototype,"type",void 0),t([o({aliasOf:"graphicsCore.layer"})],V.prototype,"layer",void 0),t([o({aliasOf:"graphicsCore.owner"})],V.prototype,"owner",void 0),t([o({constructOnly:!0})],V.prototype,"updateClippingExtent",void 0),t([o({constructOnly:!0})],V.prototype,"graphicsCore",void 0),t([o({constructOnly:!0})],V.prototype,"scaleVisibility",void 0),t([o({constructOnly:!0})],V.prototype,"filterVisibility",void 0),t([o({constructOnly:!0})],V.prototype,"elevationAlignment",void 0),t([o({constructOnly:!0})],V.prototype,"frustumVisibility",void 0),t([o({readOnly:!0})],V.prototype,"deconfliction",void 0),t([o({readOnly:!0})],V.prototype,"labeling",void 0),t([o({readOnly:!0})],V.prototype,"objectStates",void 0),t([o({readOnly:!0})],V.prototype,"watchUpdatingTracking",void 0),t([o()],V.prototype,"suspendResumeExtentMode",void 0),t([o()],V.prototype,"dataExtent",void 0),t([o({readOnly:!0})],V.prototype,"suspended",null),t([o({readOnly:!0})],V.prototype,"suspendInfo",null),t([o({readOnly:!0,dependsOn:["graphicsCore.updating","frustumVisibility.updating","watchUpdatingTracking.updating"]})],V.prototype,"updating",null),t([o()],V.prototype,"featureStore",null),V=t([l("esri.views.3d.layers.graphics.Graphics3DFeatureLikeLayerView")],V);const j=V,S="suspendResumeExtentMode",U={remove(){},pause(){},resume(){}};export{j as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import s from"../../../../core/Collection.js";import r from"../../../../core/Handles.js";import{isSome as a,destroyMaybe as o,isNone as n}from"../../../../core/maybe.js";import{isAbortError as c}from"../../../../core/promiseUtils.js";import{init as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import s from"../../../../core/Collection.js";import r from"../../../../core/Handles.js";import{isSome as a,destroyMaybe as o,isNone as n}from"../../../../core/maybe.js";import{isAbortError as c}from"../../../../core/promiseUtils.js";import{init as p}from"../../../../core/watchUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as d}from"../../../../core/accessorSupport/diffUtils.js";import u from"../../../../layers/Layer.js";import{hydrateGraphic as g}from"../../../../layers/graphics/hydratedFeatures.js";import m from"../../../../rest/support/Query.js";import{SUSPEND_RESUME_EXTENT_OPTIMISM as y}from"./constants.js";import{Graphics3DCore as f}from"./Graphics3DCore.js";import b from"./Graphics3DElevationAlignment.js";import{Graphics3DObjectStates as j}from"./Graphics3DObjectStates.js";import w from"./Graphics3DScaleVisibility.js";import{enlargeExtent as C}from"./graphicUtils.js";import{UpdatePolicy as S,Object3DState as v}from"../../webgl-engine/lib/basicInterfaces.js";import{WatchUpdatingTracking as x}from"../../../support/WatchUpdatingTracking.js";let E=class extends i{constructor(t){super(t),this.type="graphics-3d",this.graphicsCore=null,this.elevationAlignment=new b,this.watchUpdatingTracking=new x,this.handles=new r,this.suspendResumeExtent=null}normalizeCtorArgs(t){let e=null;t.scaleVisibilityEnabled&&(delete(t={...t}).scaleVisibilityEnabled,e=new w);const i=new f({owner:t.owner,layer:t.layer,preferredUpdatePolicy:S.SYNC,graphicSymbolSupported:!0});return{...t,graphicsCore:i,scaleVisibility:e}}initialize(){const{layer:t,scaleVisibility:e}=this;a(e)&&"graphics"===t.type&&this.watchUpdatingTracking.add((()=>t.effectiveScaleRange),(()=>e.layerMinMaxScaleChangeHandler())),"graphics"===t.type&&this.watchUpdatingTracking.add((()=>t.elevationInfo),((t,e)=>{d(t,e)&&this.watchUpdatingTracking.addPromise(this.graphicsCore.elevationInfoChange())}))}async setup(){const t=(t,e,i)=>this.graphicsCore.spatialIndex.queryGraphicUIDsInExtent(t,e,i);if(this.elevationAlignment.setup(this.owner,t,this.graphicsCore,this.view.elevationProvider),a(this.scaleVisibility)&&"effectiveScaleRange"in this.layer){const e=this.owner.view.basemapTerrain;this.scaleVisibility.setup(this.owner,this.layer,t,this.graphicsCore,e)}this._set("objectStates",new j(this.graphicsCore));try{await this.graphicsCore.setup({elevationAlignment:this.elevationAlignment,scaleVisibility:this.scaleVisibility,objectStates:this.objectStates})}catch(e){if(c(e))return;throw e}this.destroyed||(this.handles.add(this.view.watch("clippingArea",(()=>this._updateClippingExtent()),!0)),this._updateClippingExtent(),this._setupSuspendResumeExtent(),this.graphicsCore.startCreateGraphics())}destroy(){this.handles=o(this.handles),this.watchUpdatingTracking.destroy(),this._set("elevationAlignment",o(this.elevationAlignment)),this._set("scaleVisibility",o(this.scaleVisibility)),this._set("objectStates",o(this.objectStates)),this._set("graphicsCore",o(this.graphicsCore))}get suspended(){return!(!a(this.scaleVisibility)||!this.scaleVisibility.suspended)}get updating(){var t,e;return!!(null!=(t=this.graphicsCore)&&t.updating||a(this.scaleVisibility)&&this.scaleVisibility.updating||null!=(e=this.watchUpdatingTracking)&&e.updating)}getGraphicFromGraphicUid(t){if(this.owner.loadedGraphics){const e=this.owner.loadedGraphics.find((e=>e.uid===t));if(e){const t=this.layer instanceof u?this.layer:null;return g(e,t)}}}whenGraphicBounds(t,e){return this.graphicsCore?this.graphicsCore.whenGraphicBounds(t,e):Promise.reject()}computeAttachmentOrigin(t,e){return this.graphicsCore?this.graphicsCore.computeAttachmentOrigin(t,e):null}getSymbolLayerSize(t,e){return this.graphicsCore?this.graphicsCore.getSymbolLayerSize(t,e):null}maskOccludee(t){const{set:e,handle:i}=this.objectStates.acquireSet(v.MaskOccludee,null);return this.objectStates.setUid(e,t.uid),i}highlight(t){if(t instanceof m)return V;if("number"==typeof t)return this.highlight([t]);if(t instanceof e)return this.highlight([t]);if(t instanceof s&&(t=t.toArray()),Array.isArray(t)&&t.length>0){if(t[0]instanceof e){const e=t.map((t=>t.uid)),{set:i,handle:s}=this.objectStates.acquireSet(v.Highlight,null);return this.objectStates.setUids(i,e),s}if("number"==typeof t[0]){const e=t,{set:i,handle:s}=this.objectStates.acquireSet(v.Highlight,null);return this.objectStates.setObjectIds(i,e),s}}return V}_updateClippingExtent(){const t=this.view.clippingArea;this.graphicsCore.setClippingExtent(t,this.view.spatialReference)&&this.graphicsCore.recreateAllGraphics()}_updateSuspendResumeExtent(){n(this.scaleVisibility)||(this.suspendResumeExtent=C(this.graphicsCore.computedExtent,this.suspendResumeExtent,y,this.graphicsCore.extentPadding),this.scaleVisibility.setExtent(this.suspendResumeExtent))}_setupSuspendResumeExtent(){n(this.scaleVisibility)||(p(this.graphicsCore,"computedExtent",(t=>this._updateSuspendResumeExtent()),!0),this.graphicsCore.watch("extentPadding",(t=>this._updateSuspendResumeExtent())))}};t([h()],E.prototype,"type",void 0),t([h({constructOnly:!0})],E.prototype,"owner",void 0),t([h({constructOnly:!0})],E.prototype,"layer",void 0),t([h({readOnly:!0,aliasOf:"owner.view"})],E.prototype,"view",void 0),t([h({constructOnly:!0})],E.prototype,"graphicsCore",void 0),t([h({constructOnly:!0})],E.prototype,"scaleVisibility",void 0),t([h({readOnly:!0})],E.prototype,"elevationAlignment",void 0),t([h({readOnly:!0})],E.prototype,"objectStates",void 0),t([h({readOnly:!0})],E.prototype,"watchUpdatingTracking",void 0),t([h({readOnly:!0})],E.prototype,"suspended",null),t([h({readOnly:!0})],E.prototype,"updating",null),E=t([l("esri.views.3d.layers.graphics.Graphics3DGraphicLikeLayerView")],E);const V={remove(){},pause(){},resume(){}},A=E;export{A as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{result as r}from"../../../../core/asyncUtils.js";import{destroyMaybe as t}from"../../../../core/maybe.js";import{throwIfAborted as
|
|
5
|
+
import{result as r}from"../../../../core/asyncUtils.js";import{destroyMaybe as t,isSome as a}from"../../../../core/maybe.js";import{throwIfAborted as e}from"../../../../core/promiseUtils.js";import{make as o}from"./Graphics3DCalloutSymbolLayerFactory.js";import l from"./Graphics3DSymbol.js";class s extends l{constructor(r,t,a){super(r,t,a),this.calloutSymbolLayer=null,this.symbol.hasVisibleCallout()&&(this.calloutSymbolLayer=o(this.symbol,t))}async doLoad(t){const a=this.calloutSymbolLayer?r(this.calloutSymbolLayer.load()):null;try{await super.doLoad(t),e(t)}catch(l){var o;throw null==(o=this.calloutSymbolLayer)||o.abortLoad(),l}a&&await a}destroy(){super.destroy(),this.calloutSymbolLayer=t(this.calloutSymbolLayer)}createGraphics3DGraphic(r,t){const e=super.createGraphics3DGraphic(r,t);if(a(this.calloutSymbolLayer)&&a(e)){const t=this._createCalloutGraphic(r);a(t)&&e.addAuxiliaryGraphic(t)}return e}globalPropertyChanged(r,t){return!!super.globalPropertyChanged(r,t)&&(!this.calloutSymbolLayer||this.calloutSymbolLayer.globalPropertyChanged(r,t,(r=>this._getCalloutGraphicLayer(r))))}updateGeometry(r,t){const a=super.updateGeometry(r,t);if(a&&this.calloutSymbolLayer){const a=this._getCalloutGraphicLayer(r);if(a)return this.calloutSymbolLayer.updateGeometry(a,t)}return a}_createCalloutGraphic(r){const t=r.renderingInfo,a={renderer:t.renderer,symbol:t.symbol,translation:[0,0,0],centerOffset:[0,0,0,0],screenOffset:[0,0],centerOffsetUnits:"world",elevationOffset:0,materialCollection:null};return r.renderingInfo=a,this.calloutSymbolLayer.createGraphics3DGraphic(r)}_getCalloutGraphicLayer(r){for(const t of r._auxiliaryGraphics)if(t.graphics3DSymbolLayer===this.calloutSymbolLayer)return t}}export{s as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Error.js";import{isNone as t,get as r,isSome as n}from"../../../../core/maybe.js";import{pt2px as s}from"../../../../core/screenUtils.js";import{a as
|
|
5
|
+
import e from"../../../../core/Error.js";import{isNone as t,get as r,isSome as n}from"../../../../core/maybe.js";import{pt2px as s}from"../../../../core/screenUtils.js";import{a as o}from"../../../../chunks/vec2f64.js";import{isCalloutSupport as i}from"../../../../symbols/callouts/calloutUtils.js";import{perObjectElevationAligner as a}from"./ElevationAligners.js";import{SymbolUpdateType as l,needsElevationUpdates2D as c}from"./elevationAlignmentUtils.js";import{ElevationContext as h}from"./ElevationContext.js";import{Graphics3DObject3DGraphicLayer as d}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as m}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as f,namedAnchorToHUDMaterialAnchorPos as p}from"./graphicUtils.js";import{placePointOnGeometry as g,createStageObjectForHUD as u,extendPointGraphicElevationContext as y}from"./pointUtils.js";import b from"../../webgl-engine/lib/GeometryUtil.js";import{TextRenderParameters as x}from"../../webgl-engine/lib/TextRenderParameters.js";import v from"../../webgl-engine/lib/TextTexture.js";import{HUDMaterial as O}from"../../webgl-engine/materials/HUDMaterial.js";const w=[0,0,1];class P extends m{constructor(e,t,r,n){super(e,t,r,n),this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!1},this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const t=f(this.symbolLayer.size);if(t)throw new e("graphics3dtextsymbollayer:invalid-size",t)}await this._createTextRenderParameters()}async _createTextRenderParameters(){const e=this._context.layerView.view.pixelRatio;this._textRenderParameters=await x.fromSymbol(this.symbolLayer,e)}destroy(){super.destroy()}createGraphics3DGraphic(e){const r=e.graphic,n=g(r.geometry);if(t(n))return this.logger.warn(`unsupported geometry type for text symbol: ${r.geometry.type}`),null;const s=this.symbolLayer.text;if(t(s)||""===s)return null;const o=i(this.symbol)&&this.symbol.hasVisibleVerticalOffset()?this.symbol:null,a={..._,anchor:this._anchorFromAlignment(this.symbolLayer.horizontalAlignment,this.symbolLayer.verticalAlignment)};return this._createAs3DShape(r,n,s,o,a)}createLabel(e,r,n,s){const o=e.graphic,i=g(o.geometry);if(t(i))return this.logger.warn(`unsupported geometry type for label: ${o.geometry.type}`),null;const a=r.text;return!a||/^\s+$/.test(a)?null:this._createAs3DShape(o,i,a,r,r,n,s)}setGraphicElevationContext(e,t,r=0){const n=super.setGraphicElevationContext(e,t);return n.addOffsetRenderUnits(r),n}layerOpacityChanged(){return this.logger.warn("layer opacity change not yet implemented in Graphics3DTextSymbolLayer"),!1}layerElevationInfoChanged(e,t){return E(e,t,((e,t)=>{this.updateGraphicElevationContext(t,e)})),l.UPDATE}slicePlaneEnabledChanged(e,t){return E(e,t,(e=>{for(const t of e.stageObject.geometryRecords)t.material.setParameters({slicePlaneEnabled:this._context.slicePlaneEnabled})})),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!1}updateGraphicElevationContext(e,t){this.setGraphicElevationContext(e,t.elevationContext,t.metadata.elevationOffset),t.needsElevationUpdates=c(t.elevationContext.mode)||"absolute-height"===t.elevationContext.mode}_defaultElevationInfoNoZ(){return S}_createAs3DShape(e,i,l,m,f=_,g,x){const P=this.setGraphicElevationContext(e,new h,f.elevationOffset),E="polyline"===r(e.geometry,"type"),S=e.uid,j=this._context.stage.renderView.renderingContext,L=f.anchor in p?f.anchor:"center",C=p[L],G=t(x)?new v(j,l,this._textRenderParameters):null,D={occlusionTest:!0,screenOffset:f.screenOffset,anchorPos:C,polygonOffset:!0,color:[1,1,1,1],centerOffsetUnits:f.centerOffsetUnits,debugDrawLabelBorder:f.debugDrawLabelBorder,drawInSecondSlot:!0};if(n(G)&&(D.textureId=G.id,D.texCoordScale=G.texcoordScale),n(x)&&(D.textureId=x.id),n(m)&&n(m.verticalOffset)){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=m.verticalOffset;D.verticalOffset={screenLength:s(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0}}if(this._context.screenSizePerspectiveEnabled){const{screenSizePerspectiveSettings:e,screenSizePerspectiveSettingsLabels:t}=this._context.sharedResources;D.screenSizePerspective=t.overridePadding(this._textRenderParameters.haloSize),D.screenSizePerspectiveAlignment=e}let U;if(E&&(D.shaderPolygonOffset=1e-4),D.slicePlaneEnabled=this._context.slicePlaneEnabled,n(g)){const e=JSON.stringify(D);U=g.get(e),t(U)&&(U=new O(D),g.add(e,U))}else U=new O(D);const A=[U],R=f.translation,z=n(G)?[G.displayWidth,G.displayHeight]:[0,0],T=f.centerOffset,W=w,I=[0,0],B=[b.createPointGeometry(W,R,null,z,T,I,null)],H=this._context.layer.uid,V=u(this._context,i,B,A,P,H,S);if(null===V)return null;const $=new d(this,V.object,B,t(g)?A:null,n(G)?[G]:null,a,P);$.alignedSampledElevation=V.sampledElevation,$.needsElevationUpdates=c(P.mode)||"absolute-height"===P.mode;const{displayWidth:F,displayHeight:N}=n(G)?G:f;$.getScreenSize=(e=o())=>(e[0]=F,e[1]=N,e);const k={labelText:l,elevationOffset:f.elevationOffset};return $.metadata=k,y($,i,this._context.elevationProvider),$}_anchorFromAlignment(e,t){switch(t){case"bottom":return"left"===e?"bottom-left":"right"===e?"bottom-right":"bottom";case"baseline":case"middle":return"justify"===e?"center":e;case"top":return"left"===e?"top-left":"right"===e?"top-right":"top"}}}function E(e,t,r){e&&e.forEach((e=>{const s=t(e);n(s)&&r(s,e.graphic)}))}const S={mode:"relative-to-ground",offset:0},_={text:null,translation:[0,0,0],elevationOffset:0,centerOffset:[0,0,0,1],screenOffset:[0,0],anchor:"center",verticalOffset:null,centerOffsetUnits:null,debugDrawLabelBorder:!1,displayWidth:0,displayHeight:0};export{P as Graphics3DTextSymbolLayer,P as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{forEach as s,result as l}from"../../../../core/asyncUtils.js";import a from"../../../../core/Handles.js";import i from"../../../../core/Logger.js";import{someMap as r}from"../../../../core/MapUtils.js";import{destroyMaybe as o,disposeMaybe as n,isNone as c,unwrap as h}from"../../../../core/maybe.js";import{throwIfAborted as b,isAbortError as d}from"../../../../core/promiseUtils.js";import{property as p}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as g}from"../../../../layers/graphics/hydratedFeatures.js";import{createLabelFunction as y}from"../../../../layers/support/labelFormatUtils.js";import{areLabelsVisible as f}from"../../../../layers/support/layerUtils.js";import{isCalloutSupport as _}from"../../../../symbols/callouts/calloutUtils.js";import{VisibilityFlag as m,VisibilityGroup as C}from"./enums.js";import{make as x}from"./Graphics3DCalloutSymbolLayerFactory.js";import v from"./Graphics3DGraphicCreationContext.js";import{getGraphics3DSymbol as T}from"./graphicSymbolUtils.js";import{get as L}from"./labelPlacement.js";import G from"../../support/debugFlags.js";import{MaterialCollection as D}from"../../webgl-engine/lib/MaterialCollection.js";import{TextRenderer as R}from"../../webgl-engine/lib/TextRenderer.js";import{TextRenderParameters as A}from"../../webgl-engine/lib/TextRenderParameters.js";import w from"../../webgl-engine/lib/TextTextureAtlas.js";import{WebGLLayer as S}from"../../webgl-engine/lib/WebGLLayer.js";import{TaskPriority as I}from"../../../support/Scheduler.js";const O=i.getLogger("esri.views.3d.layers.graphics.Labeler");let j=class extends t{constructor(){super(...arguments),this._dirty=!1,this._labels=new Map,this._labelsToAdd=new Map,this._labelsToRemove=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this._handles=new a,this._handles.add([this.view.watch("state.camera",(()=>this.setDirty())),this.view.watch("pixelRatio",(()=>this._resetAllLabels())),this.view.resourceController.scheduler.registerTask(I.LABELER,this)]),this._textTextureAtlas=new w({view:this.view}),this._hudMaterialCollection=new D(this.view._stage),this._calloutMaterialCollection=new D(this.view._stage)}dispose(){this._handles=o(this._handles),this._textTextureAtlas=n(this._textTextureAtlas),this._hudMaterialCollection=n(this._hudMaterialCollection),this._calloutMaterialCollection=n(this._calloutMaterialCollection),this._labelingContexts.length=0,this._labels.clear(),this._labelsToAdd.clear(),this._labelsToRemove.clear()}_activateLabelingContext(e){e.labels.forEach(((e,t)=>{this._labels.set(t,e),e.graphics3DGraphic.setVisibilityFlag(m.USER_SETTING,!0,C.LABEL)})),e.active=!0}_deactivateLabelingContext(e){e.labels.forEach(((e,t)=>{e.graphics3DGraphic.setVisibilityFlag(m.USER_SETTING,!1,C.LABEL),this.setLabelGraphicVisibility(e.graphics3DGraphic,!1),this._labels.delete(t)})),e.active=!1}_addLabelTextureToAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const s=e.textRenderers[t._labelIndex];s&&this._textTextureAtlas.addTextTexture(s,t.stageObject)}e.rendered=!0}_removeLabelTextureFromAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const s=e.textRenderers[t._labelIndex];s&&this._textTextureAtlas.removeTextTexture(s,t.stageObject)}e.rendered=!1}get running(){var e;return this.view.ready&&(this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.running)}runTask(e){this._updateLabels(e),!this._dirty&&this.deconflictor.running&&this.deconflictor.runTask(e)}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(E(t)){if(!V(t)){if(F(t)){this._deactivateLabelingContext(t);continue}if(this._createLabelClassContext(t),P(t)){this._dirty=!0;continue}if(!V(t))continue}r(t.labelsToInitialize,((s,l)=>(this._ensureGraphics3DResources(s)&&(this._labels.set(l,s),this.deconflictor.setDirty(),e.madeProgress()),(s.visible&&s.hasTextTextureResources||!s.visible&&s.hasGraphics3DResources)&&(t.labelsToInitialize.delete(l),e.madeProgress()),e.done)))&&(this._dirty=!0)}this._labelsToRemove.forEach((e=>this._removeLabelTextureFromAtlas(e))),this._labelsToAdd.forEach((e=>this._addLabelTextureToAtlas(e))),this._labelsToRemove.clear(),this._labelsToAdd.clear(),this._dirty||this.notifyChange("updating")}}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController.signal;await e.layer.when(),b(t),e.scaleVisibility&&e.scaleVisibility.updateScaleRangeActive();const a=e.graphics3DCore,i=a.layer,r=i.labelingInfo&&i.labelingInfo.filter((e=>!!e.symbol));if(!r||0===r.length)return;const o=new Array(r.length);let n=!1;await s(r,(async(s,i)=>{const r=s.symbol,h=T(a.getOrCreateGraphics3DSymbol(r));if(c(h))return void O.error("Failed to create Graphics3DSymbol for label");await h.load(),b(t);let d=null;_(r)&&r.hasVisibleCallout()&&(d=x(r,a.symbolCreationContext),await d.load(),b(t));const p=await l(y(s,e.layer.fieldsIndex,this.view.spatialReference));b(t),!0===p.ok?o[i]={labelClass:s,labelFunction:p.value,graphics3DSymbol:h,graphics3DCalloutSymbolLayer:d,calloutSymbolLayerIndex:0,textRenderParameters:this._createTextRenderParameters(h.symbol)}:(O.error(`Label expression failed to evaluate: ${p.error}`),n=!0)})),b(t),n||(e.labelClassContexts=o)}async _createLabelClassContext(e){return e.labelClassPromise||(e.labelClassPromise=this._createLabelClassContextAsync(e).catch((t=>{if(d(t))throw t;e.labelClassContexts=null})).then((()=>{e.labelClassAbortController=null,this.notifyChange("updating")})).catch((()=>{})),this.notifyChange("updating")),e.labelClassPromise}_createTextRenderParameters(e){const t=e.symbolLayers.getItemAt(0);return t&&"text"===t.type?A.fromSymbol(t,this.view.pixelRatio):null}_destroyLabelClassContext(e){for(const s of e.labelClassContexts)--s.graphics3DSymbol.referenced,s.graphics3DSymbol=null;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,t&&t.abort(),e.labelClassContexts=[],e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,s,l,a){const i={text:e.text,centerOffset:s.centerOffset,translation:s.translation,elevationOffset:s.elevationOffset,screenOffset:s.screenOffset,anchor:s.anchor,centerOffsetUnits:s.centerOffsetUnits,verticalOffset:s.verticalOffset,debugDrawBorder:G.LABELS_SHOW_BORDER,displayWidth:e.displayWidth,displayHeight:e.displayHeight};return M.graphic=t,M.renderingInfo=null,M.layer=l,a.createLabel(M,i,this._hudMaterialCollection,this._textTextureAtlas)}_createLineCalloutGraphic(e,t,s,l,a){const i={symbol:t,translation:l.translation,elevationOffset:l.elevationOffset,screenOffset:l.screenOffset,centerOffset:l.centerOffset,centerOffsetUnits:l.centerOffsetUnits,materialCollection:this._calloutMaterialCollection};return M.graphic=e,M.renderingInfo=i,M.layer=a,s.createGraphics3DGraphic(M)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const s=e.labelingContext,l=s.labelClassContexts;if(!l||0===l.length||!s.emptySymbolLabelSupported&&0===t.graphics.length)return!1;let a=!1;const i=t.graphic,r=s.layer,o=f(s.layer),n=this.view._stage;for(let h=0;h<l.length;h++){const b=e.textRenderers[h];if(!b)continue;const d=l[h],p=d.graphics3DSymbol;let u=null;p.symbol&&"label-3d"===p.symbol.type&&(u=p.symbol);const g=p.symbolLayers[0];if(!g)continue;const y=d.labelClass,f=s.disablePlacement,_=L({graphics3DGraphic:t,labelSymbol:u,labelClass:y,disablePlacement:f});if(c(_))continue;g.setElevationInfoOverride(s.elevationInfoOverride);const x=this._createTextSymbolGraphic(b,i,_,r,g);if(!x)return!1;x._labelClass=y,x._labelIndex=h,t.addLabelGraphic(x,n,s.stageLayer),t.setVisibilityFlag(m.USER_SETTING,o,C.LABEL),t.clearVisibilityFlag(m.SCALE_RANGE,C.LABEL),t.setVisibilityFlag(m.DECONFLICTION,!1,C.LABEL),a=!0;const v=d.graphics3DCalloutSymbolLayer;if(v&&_.hasLabelVerticalOffset){v.setElevationInfoOverride(s.elevationInfoOverride);const e=this._createLineCalloutGraphic(i,u,v,_,r);e&&(d.calloutSymbolLayerIndex=t.labelGraphics.length,t.addLabelGraphic(e,n,s.stageLayer))}break}return s.scaleVisibility&&a&&s.scaleVisibility.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const s of e.graphics3DGraphic.labelGraphics){if(null==s._labelClass)continue;const e=t[s._labelIndex].graphics3DSymbol.symbolLayers[0];null!=e&&e.onRemoveGraphic(s)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){if(e.hasTextTextureResources)return;const t=e.labelingContext,s=t.labelClassContexts;if(!s||0===s.length)return;const l=e.graphics3DGraphic.graphic;for(let i=0;i<s.length;i++){const r=s[i];if(e.textRenderers[i]=null,!r.textRenderParameters)continue;const o=r.labelFunction;let n;if("arcade"===o.type)try{const e=o.needsHydrationToEvaluate()?g(l,t.layer):l;n=o.evaluate(e)}catch(a){n=null}else n=o.evaluate(l);c(n)||""===n||/^\s+$/.test(n)||(e.textRenderers[i]=new R(n,r.textRenderParameters))}e.hasTextTextureResources=!0}_destroyTextTextureResources(e){e.textRenderers=[],e.hasTextTextureResources=!1}_addGraphic(e,t){const s={hasGraphics3DResources:!1,hasTextTextureResources:!1,visible:!1,rendered:!1,labelingContext:e,graphics3DGraphic:t,textRenderers:[]},l=t.graphic.uid;e.labels.set(l,s),e.labelsToInitialize.set(l,s),this.setDirty(),this.deconflictor.setDirty()}_removeGraphic(e,t){const s=t.graphic.uid,l=e.labels.get(s);l&&(this._destroyGraphic(l,s),e.labels.delete(s),e.labelsToInitialize.delete(s),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.has(t)&&(this._labels.delete(t),this._labelsToAdd.delete(t),this._labelsToRemove.delete(t)),e.hasTextTextureResources&&(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.labels.get(s);t&&(this._removeGraphic(e,t.graphics3DGraphic),this._addGraphic(e,t.graphics3DGraphic))}}_globalPropertyChanged(e,t){for(const s of t.labelClassContexts){const l=new Map;t.labels.forEach((e=>{const t=e.graphics3DGraphic;l.set(t.graphic.uid,t)}));const a=e=>e.labelGraphics[0];if(h(s.graphics3DSymbol.symbolLayers[0]).globalPropertyChanged(e,l,a),s.graphics3DCalloutSymbolLayer){const t=e=>e.labelGraphics[s.calloutSymbolLayerIndex];s.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,l,t)}}}_visibilityInfoChange(e){const t=e.layer.labelsVisible;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.labels.forEach(((t,s)=>{this._destroyGraphic(t,s),t.visible=!1,t.rendered=!1,e.labelsToInitialize.set(s,t)})),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 l=s&&s.emptySymbolLabelSupported||!1,a=s&&s.elevationInfoOverride||null,i=s&&s.disablePlacement||null;if(this._findLabelingContext(e))return;const r=e.layer,o={graphics3DCore:e,layer:r,scaleVisibility:t,emptySymbolLabelSupported:l,elevationInfoOverride:a,disablePlacement:i,active:r.labelsVisible,labelClassPromise:null,labelClassAbortController:new AbortController,labelClassContexts:[],labels:new Map,labelsToInitialize:new Map,stageLayer:new S({isPickable:!0},r.uid)};return this.view._stage.add(o.stageLayer),this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),featureReductionChange:()=>{},layerLabelsEnabled:()=>f(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),clear:()=>{}}}removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const s=this._labelingContexts.indexOf(t);this._labelingContexts.splice(s,1),t.labels.forEach((e=>this._removeGraphic(t,e.graphics3DGraphic))),this.view._stage.remove(t.stageLayer),t.stageLayer=null,this.setDirty()}setLabelGraphicVisibility(e,t){const s=e.graphic.uid,l=this._labels.get(s);l&&l.visible!==t&&(t&&!l.rendered?(this._labelsToAdd.set(s,l),this._labelsToRemove.delete(s),l.hasTextTextureResources||l.labelingContext.labelsToInitialize.set(s,l)):!t&&l.rendered&&(this._labelsToRemove.set(s,l),this._labelsToAdd.delete(s)),l.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){var e;return this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.updating||this._labelingContexts.some((e=>P(e)))}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce(((e,t)=>e+(P(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 test(){return{textTextureAtlas:this._textTextureAtlas,resetAllLabels:()=>this._resetAllLabels()}}};function E(e){return e.active&&f(e.layer)}function P(e){return e.labelClassPromise&&!!e.labelClassAbortController}function V(e){return e.labelClassContexts&&e.labelClassContexts.length}function F(e){return null===e.labelClassContexts}e([p({constructOnly:!0})],j.prototype,"view",void 0),e([p({constructOnly:!0})],j.prototype,"deconflictor",void 0),e([p()],j.prototype,"_textTextureAtlas",void 0),e([p({type:Boolean,readOnly:!0})],j.prototype,"updating",null),j=e([u("esri.views.3d.layers.graphics.Labeler")],j);const M=new v(null,null,null);export{j as Labeler};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{forEach as s,result as l}from"../../../../core/asyncUtils.js";import a from"../../../../core/Handles.js";import i from"../../../../core/Logger.js";import{someMap as r}from"../../../../core/MapUtils.js";import{destroyMaybe as o,disposeMaybe as n,isNone as c,isSome as h,unwrap as b}from"../../../../core/maybe.js";import{throwIfAborted as d,isAbortError as p}from"../../../../core/promiseUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as g}from"../../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as y}from"../../../../layers/graphics/hydratedFeatures.js";import{createLabelFunction as f}from"../../../../layers/support/labelFormatUtils.js";import{areLabelsVisible as _}from"../../../../layers/support/layerUtils.js";import{isCalloutSupport as m}from"../../../../symbols/callouts/calloutUtils.js";import{VisibilityFlag as C,VisibilityGroup as x}from"./enums.js";import{make as v}from"./Graphics3DCalloutSymbolLayerFactory.js";import T from"./Graphics3DGraphicCreationContext.js";import{getGraphics3DSymbol as L}from"./graphicSymbolUtils.js";import{get as G}from"./labelPlacement.js";import D from"../../support/debugFlags.js";import{MaterialCollection as R}from"../../webgl-engine/lib/MaterialCollection.js";import{TextRenderer as A}from"../../webgl-engine/lib/TextRenderer.js";import{TextRenderParameters as w}from"../../webgl-engine/lib/TextRenderParameters.js";import S from"../../webgl-engine/lib/TextTextureAtlas.js";import{WebGLLayer as I}from"../../webgl-engine/lib/WebGLLayer.js";import{TaskPriority as O}from"../../../support/Scheduler.js";const j=i.getLogger("esri.views.3d.layers.graphics.Labeler");let E=class extends t{constructor(){super(...arguments),this._dirty=!1,this._labels=new Map,this._labelsToAdd=new Map,this._labelsToRemove=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this._handles=new a,this._handles.add([this.view.watch("state.camera",(()=>this.setDirty())),this.view.watch("pixelRatio",(()=>this._resetAllLabels())),this.view.resourceController.scheduler.registerTask(O.LABELER,this)]),this._textTextureAtlas=new S({view:this.view}),this._hudMaterialCollection=new R(this.view._stage),this._calloutMaterialCollection=new R(this.view._stage)}dispose(){this._handles=o(this._handles),this._textTextureAtlas=n(this._textTextureAtlas),this._hudMaterialCollection=n(this._hudMaterialCollection),this._calloutMaterialCollection=n(this._calloutMaterialCollection),this._labelingContexts.length=0,this._labels.clear(),this._labelsToAdd.clear(),this._labelsToRemove.clear()}_activateLabelingContext(e){e.labels.forEach(((e,t)=>{this._labels.set(t,e),e.graphics3DGraphic.setVisibilityFlag(C.USER_SETTING,!0,x.LABEL)})),e.active=!0}_deactivateLabelingContext(e){e.labels.forEach(((e,t)=>{e.graphics3DGraphic.setVisibilityFlag(C.USER_SETTING,!1,x.LABEL),this.setLabelGraphicVisibility(e.graphics3DGraphic,!1),this._labels.delete(t)})),e.active=!1}_addLabelTextureToAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const s=e.textRenderers[t._labelIndex];s&&this._textTextureAtlas.addTextTexture(s,t.stageObject)}e.rendered=!0}_removeLabelTextureFromAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const s=e.textRenderers[t._labelIndex];s&&this._textTextureAtlas.removeTextTexture(s,t.stageObject)}e.rendered=!1}get running(){var e;return this.view.ready&&(this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.running)}runTask(e){this._updateLabels(e),!this._dirty&&this.deconflictor.running&&this.deconflictor.runTask(e)}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(P(t)){if(!F(t)){if(M(t)){this._deactivateLabelingContext(t);continue}if(this._createLabelClassContext(t),V(t)){this._dirty=!0;continue}if(!F(t))continue}r(t.labelsToInitialize,((s,l)=>(this._ensureGraphics3DResources(s)&&(this._labels.set(l,s),this.deconflictor.setDirty(),e.madeProgress()),(s.visible&&s.hasTextTextureResources||!s.visible&&s.hasGraphics3DResources)&&(t.labelsToInitialize.delete(l),e.madeProgress()),e.done)))&&(this._dirty=!0)}this._labelsToRemove.forEach((e=>this._removeLabelTextureFromAtlas(e))),this._labelsToAdd.forEach((e=>this._addLabelTextureToAtlas(e))),this._labelsToRemove.clear(),this._labelsToAdd.clear(),this._dirty||this.notifyChange("updating")}}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController.signal;await e.layer.when(),d(t),e.scaleVisibility&&e.scaleVisibility.updateScaleRangeActive();const a=e.graphics3DCore,i=a.layer,r=i.labelingInfo&&i.labelingInfo.filter((e=>!!e.symbol));if(!r||0===r.length)return;const o=new Array(r.length);let n=!1;await s(r,(async(s,i)=>{const r=s.symbol,h=L(a.getOrCreateGraphics3DSymbol(r));if(c(h))return void j.error("Failed to create Graphics3DSymbol for label");await h.load(),d(t);let b=null;m(r)&&r.hasVisibleCallout()&&(b=v(r,a.symbolCreationContext),await b.load(),d(t));const p=await l(f(s,e.layer.fieldsIndex,this.view.spatialReference));if(d(t),!0===p.ok){const e=await this._createTextRenderParameters(h.symbol);d(t),o[i]={labelClass:s,labelFunction:p.value,graphics3DSymbol:h,graphics3DCalloutSymbolLayer:b,calloutSymbolLayerIndex:0,textRenderParameters:e}}else j.error(`Label expression failed to evaluate: ${p.error}`),n=!0})),d(t),n||(e.labelClassContexts=o)}async _createLabelClassContext(e){return e.labelClassPromise||(e.labelClassPromise=this._createLabelClassContextAsync(e).catch((t=>{if(p(t))throw t;e.labelClassContexts=null})).then((()=>{e.labelClassAbortController=null,this.notifyChange("updating")})).catch((()=>{})),this.notifyChange("updating")),e.labelClassPromise}async _createTextRenderParameters(e){const t=e.symbolLayers.getItemAt(0);return t&&"text"===t.type?w.fromSymbol(t,this.view.pixelRatio):null}_destroyLabelClassContext(e){for(const s of e.labelClassContexts)--s.graphics3DSymbol.referenced,s.graphics3DSymbol=null;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,t&&t.abort(),e.labelClassContexts=[],e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,s,l,a){const i={text:e.text,centerOffset:s.centerOffset,translation:s.translation,elevationOffset:s.elevationOffset,screenOffset:s.screenOffset,anchor:s.anchor,centerOffsetUnits:s.centerOffsetUnits,verticalOffset:s.verticalOffset,debugDrawLabelBorder:D.LABELS_SHOW_BORDER,displayWidth:e.displayWidth,displayHeight:e.displayHeight};return U.graphic=t,U.renderingInfo=null,U.layer=l,a.createLabel(U,i,this._hudMaterialCollection,this._textTextureAtlas)}_createLineCalloutGraphic(e,t,s,l,a){const i={symbol:t,translation:l.translation,elevationOffset:l.elevationOffset,screenOffset:l.screenOffset,centerOffset:l.centerOffset,centerOffsetUnits:l.centerOffsetUnits,materialCollection:this._calloutMaterialCollection};return U.graphic=e,U.renderingInfo=i,U.layer=a,s.createGraphics3DGraphic(U)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const s=e.labelingContext,l=s.labelClassContexts;if(!l||0===l.length||!s.emptySymbolLabelSupported&&0===t.graphics.length)return!1;let a=!1;const i=t.graphic,r=s.layer,o=_(s.layer),n=this.view._stage;for(let b=0;b<l.length;b++){const d=e.textRenderers[b];if(!d)continue;const p=l[b],u=p.graphics3DSymbol;let g=null;u.symbol&&"label-3d"===u.symbol.type&&(g=u.symbol);const y=u.symbolLayers[0];if(!y)continue;const f=p.labelClass,_=s.disablePlacement,m=G({graphics3DGraphic:t,labelSymbol:g,labelClass:f,disablePlacement:_});if(c(m))continue;y.setElevationInfoOverride(s.elevationInfoOverride);const v=this._createTextSymbolGraphic(d,i,m,r,y);if(!v)return!1;v._labelClass=f,v._labelIndex=b,t.addLabelGraphic(v,n,s.stageLayer),t.setVisibilityFlag(C.USER_SETTING,o,x.LABEL),t.clearVisibilityFlag(C.SCALE_RANGE,x.LABEL),t.setVisibilityFlag(C.DECONFLICTION,!1,x.LABEL),a=!0;const T=p.graphics3DCalloutSymbolLayer;if(T&&m.hasLabelVerticalOffset){T.setElevationInfoOverride(s.elevationInfoOverride);const e=this._createLineCalloutGraphic(i,g,T,m,r);h(e)&&(p.calloutSymbolLayerIndex=t.labelGraphics.length,t.addLabelGraphic(e,n,s.stageLayer))}break}return s.scaleVisibility&&a&&s.scaleVisibility.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const s of e.graphics3DGraphic.labelGraphics){if(null==s._labelClass)continue;const e=t[s._labelIndex].graphics3DSymbol.symbolLayers[0];null!=e&&e.onRemoveGraphic(s)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){if(e.hasTextTextureResources)return;const t=e.labelingContext,s=t.labelClassContexts;if(!s||0===s.length)return;const l=e.graphics3DGraphic.graphic;for(let i=0;i<s.length;i++){const r=s[i];if(e.textRenderers[i]=null,!r.textRenderParameters)continue;const o=r.labelFunction;let n;if("arcade"===o.type)try{const e=o.needsHydrationToEvaluate()?y(l,t.layer):l;n=o.evaluate(e)}catch(a){n=null}else n=o.evaluate(l);c(n)||""===n||/^\s+$/.test(n)||(e.textRenderers[i]=new A(n,r.textRenderParameters))}e.hasTextTextureResources=!0}_destroyTextTextureResources(e){e.textRenderers=[],e.hasTextTextureResources=!1}_addGraphic(e,t){const s={hasGraphics3DResources:!1,hasTextTextureResources:!1,visible:!1,rendered:!1,labelingContext:e,graphics3DGraphic:t,textRenderers:[]},l=t.graphic.uid;e.labels.set(l,s),e.labelsToInitialize.set(l,s),this.setDirty(),this.deconflictor.setDirty()}_removeGraphic(e,t){const s=t.graphic.uid,l=e.labels.get(s);l&&(this._destroyGraphic(l,s),e.labels.delete(s),e.labelsToInitialize.delete(s),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.has(t)&&(this._labels.delete(t),this._labelsToAdd.delete(t),this._labelsToRemove.delete(t)),e.hasTextTextureResources&&(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.labels.get(s);t&&(this._removeGraphic(e,t.graphics3DGraphic),this._addGraphic(e,t.graphics3DGraphic))}}_globalPropertyChanged(e,t){for(const s of t.labelClassContexts){const l=new Map;t.labels.forEach((e=>{const t=e.graphics3DGraphic;l.set(t.graphic.uid,t)}));const a=e=>e.labelGraphics[0];if(b(s.graphics3DSymbol.symbolLayers[0]).globalPropertyChanged(e,l,a),s.graphics3DCalloutSymbolLayer){const t=e=>e.labelGraphics[s.calloutSymbolLayerIndex];s.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,l,t)}}}_visibilityInfoChange(e){const t=e.layer.labelsVisible;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.labels.forEach(((t,s)=>{this._destroyGraphic(t,s),t.visible=!1,t.rendered=!1,e.labelsToInitialize.set(s,t)})),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 l=s&&s.emptySymbolLabelSupported||!1,a=s&&s.elevationInfoOverride||null,i=s&&s.disablePlacement||null;if(this._findLabelingContext(e))return;const r=e.layer,o={graphics3DCore:e,layer:r,scaleVisibility:t,emptySymbolLabelSupported:l,elevationInfoOverride:a,disablePlacement:i,active:r.labelsVisible,labelClassPromise:null,labelClassAbortController:new AbortController,labelClassContexts:[],labels:new Map,labelsToInitialize:new Map,stageLayer:new I({isPickable:!0},r.uid)};return this.view._stage.add(o.stageLayer),this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),featureReductionChange:()=>{},layerLabelsEnabled:()=>_(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),clear:()=>{}}}removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const s=this._labelingContexts.indexOf(t);this._labelingContexts.splice(s,1),t.labels.forEach((e=>this._removeGraphic(t,e.graphics3DGraphic))),this.view._stage.remove(t.stageLayer),t.stageLayer=null,this.setDirty()}setLabelGraphicVisibility(e,t){const s=e.graphic.uid,l=this._labels.get(s);l&&l.visible!==t&&(t&&!l.rendered?(this._labelsToAdd.set(s,l),this._labelsToRemove.delete(s),l.hasTextTextureResources||l.labelingContext.labelsToInitialize.set(s,l)):!t&&l.rendered&&(this._labelsToRemove.set(s,l),this._labelsToAdd.delete(s)),l.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){var e;return this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.updating||this._labelingContexts.some((e=>V(e)))}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce(((e,t)=>e+(V(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 test(){return{textTextureAtlas:this._textTextureAtlas,resetAllLabels:()=>this._resetAllLabels()}}};function P(e){return e.active&&_(e.layer)}function V(e){return e.labelClassPromise&&!!e.labelClassAbortController}function F(e){return e.labelClassContexts&&e.labelClassContexts.length}function M(e){return null===e.labelClassContexts}e([u({constructOnly:!0})],E.prototype,"view",void 0),e([u({constructOnly:!0})],E.prototype,"deconflictor",void 0),e([u()],E.prototype,"_textTextureAtlas",void 0),e([u({type:Boolean,readOnly:!0})],E.prototype,"updating",null),E=e([g("esri.views.3d.layers.graphics.Labeler")],E);const U=new T(null,null,null);export{E as Labeler};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import r from"../../../../core/Accessor.js";import{isNone as t}from"../../../../core/maybe.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import n from"../../../../geometry/Extent.js";import o from"../../../../layers/graphics/data/QueryEngine.js";import i from"../../../../rest/support/FeatureSet.js";import u from"../../../../rest/support/Query.js";import{featureGeometryTypeKebabDictionary as y}from"../../../../geometry/support/typeUtils.js";const c=o;let l=class extends r{constructor(e){super(e),this._dataQueryEngineInstance=null}get queryGeometryType(){switch(this.layer.geometryType){case"multipoint":case"point":case"polygon":case"polyline":return this.layer.geometryType;case"mesh":return"polygon";default:return}}get defaultQueryJSON(){return new u({outSpatialReference:this.spatialReference}).toJSON()}get dataQueryEngine(){return this._ensureDataQueryEngine()}destroy(){this.clear()}clear(){return!!this._dataQueryEngineInstance&&(this._dataQueryEngineInstance.destroy(),this._dataQueryEngineInstance=null,!0)}async executeQueryForIdSet(e,r){return this.dataQueryEngine.executeQueryForIdSet(this._ensureQueryJSON(e),r)}async executeQueryForCount(e,r){return this.dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),r)}async executeQueryForExtent(e,r){const{count:t,extent:s}=await this.dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),r);return{count:t,extent:n.fromJSON(s)}}async executeQueryForIds(e,r){return this.dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),r)}async executeQueryForLatestObservations(e,r){const t=await this.dataQueryEngine.executeQueryForLatestObservations(this._ensureQueryJSON(e),r),s=i.fromJSON(t);return s.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),s}async executeQuery(e,r){const t=await this.dataQueryEngine.executeQuery(this._ensureQueryJSON(e),r),s=i.fromJSON(t);return s.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),s}_ensureQueryJSON(e){return t(e)?this.defaultQueryJSON:("outSpatialReference"in e&&!e.outSpatialReference&&(e.outSpatialReference=this.spatialReference),e.toJSON())}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e="timeInfo"in this.layer&&this.layer.timeInfo&&this.layer.timeInfo.toJSON()||null,r=this.layer.objectIdField,t=y.toJSON(this.queryGeometryType),s=this.layer.fields.map((e=>e.toJSON())),a=this.layerView.view.resourceController.scheduler,n=this.priority,o=this.spatialReference.toJSON(),i=this.layerView.graphics3d.
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import r from"../../../../core/Accessor.js";import{isNone as t}from"../../../../core/maybe.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import n from"../../../../geometry/Extent.js";import o from"../../../../layers/graphics/data/QueryEngine.js";import i from"../../../../rest/support/FeatureSet.js";import u from"../../../../rest/support/Query.js";import{featureGeometryTypeKebabDictionary as y}from"../../../../geometry/support/typeUtils.js";const c=o;let l=class extends r{constructor(e){super(e),this._dataQueryEngineInstance=null}get queryGeometryType(){switch(this.layer.geometryType){case"multipoint":case"point":case"polygon":case"polyline":return this.layer.geometryType;case"mesh":return"polygon";default:return}}get defaultQueryJSON(){return new u({outSpatialReference:this.spatialReference}).toJSON()}get dataQueryEngine(){return this._ensureDataQueryEngine()}destroy(){this.clear()}clear(){return!!this._dataQueryEngineInstance&&(this._dataQueryEngineInstance.destroy(),this._dataQueryEngineInstance=null,!0)}async executeQueryForIdSet(e,r){return this.dataQueryEngine.executeQueryForIdSet(this._ensureQueryJSON(e),r)}async executeQueryForCount(e,r){return this.dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),r)}async executeQueryForExtent(e,r){const{count:t,extent:s}=await this.dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),r);return{count:t,extent:n.fromJSON(s)}}async executeQueryForIds(e,r){return this.dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),r)}async executeQueryForLatestObservations(e,r){const t=await this.dataQueryEngine.executeQueryForLatestObservations(this._ensureQueryJSON(e),r),s=i.fromJSON(t);return s.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),s}async executeQuery(e,r){const t=await this.dataQueryEngine.executeQuery(this._ensureQueryJSON(e),r),s=i.fromJSON(t);return s.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),s}_ensureQueryJSON(e){return t(e)?this.defaultQueryJSON:("outSpatialReference"in e&&!e.outSpatialReference&&(e.outSpatialReference=this.spatialReference),e.toJSON())}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e="timeInfo"in this.layer&&this.layer.timeInfo&&this.layer.timeInfo.toJSON()||null,r=this.layer.objectIdField,t=y.toJSON(this.queryGeometryType),s=this.layer.fields.map((e=>e.toJSON())),a=this.layerView.view.resourceController.scheduler,n=this.priority,o=this.spatialReference.toJSON(),i=this.layerView.graphics3d.featureStore,{hasZ:u,hasM:l}=this.layerView;return this._dataQueryEngineInstance=new c({hasZ:u,hasM:l,geometryType:t,fields:s,timeInfo:e,spatialReference:o,objectIdField:r,featureStore:i,scheduler:a,priority:n}),this._dataQueryEngineInstance}};e([s({constructOnly:!0})],l.prototype,"layerView",void 0),e([s({constructOnly:!0})],l.prototype,"priority",void 0),e([s({readOnly:!0,aliasOf:"layerView.view.spatialReference"})],l.prototype,"spatialReference",void 0),e([s({readOnly:!0,aliasOf:"layerView.layer"})],l.prototype,"layer",void 0),e([s({readOnly:!0})],l.prototype,"queryGeometryType",null),e([s({readOnly:!0})],l.prototype,"defaultQueryJSON",null),l=e([a("esri.views.3d.layers.graphics.QueryEngine")],l);const p=l;export{l as QueryEngine,p as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import e from"../../../../core/Handles.js";import{
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import e from"../../../../core/Handles.js";import{initial as r}from"../../../../core/reactiveUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{TileTreeDebugger as i}from"../../../support/TileTreeDebugger.js";import{WatchUpdatingTracking as a}from"../../../support/WatchUpdatingTracking.js";import n from"../../../../geometry/Polygon.js";let p=class extends i{constructor(t){super(t),this.watchUpdatingTracking=new a,this.handles=new e}initialize(){const{featureTiles:t}=this.view;this.handles.add(t.addClient()),this.watchUpdatingTracking.addOnCollectionChange((()=>null==t?void 0:t.tiles),(()=>this.update()),r)}destroy(){this.handles&&(this.handles.destroy(),this.handles=null),this.watchUpdatingTracking.destroy()}getTiles(){const t=t=>{const[e,r,o]=t.lij;return n.fromExtent(this.view.featureTiles.tilingScheme.getExtentGeometry(e,r,o))};return this.view.featureTiles.tiles.toArray().sort(((t,e)=>t.loadPriority-e.loadPriority)).map((e=>({...e,geometry:t(e)})))}};t([o({readOnly:!0})],p.prototype,"watchUpdatingTracking",void 0),t([o({readOnly:!0,aliasOf:"watchUpdatingTracking.updating"})],p.prototype,"updating",void 0),t([o()],p.prototype,"view",void 0),p=t([s("esri.views.3d.layers.support.FeatureTileTree3DDebugger")],p);const c=p;export{p as FeatureTileTree3DDebugger,c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import{acosClamped as i,clamp as s}from"../../../../core/mathUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{property as e}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as a,e as n}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{c as p}from"../../../../chunks/vec2.js";import{a as c}from"../../../../chunks/vec2f64.js";import{g as m,f as l,l as v,n as u,b as C,a as P,d as f,c as E,m as d}from"../../../../chunks/vec3.js";import{c as w}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as R}from"../../../../geometry/projectionEllipsoid.js";import{applyAll as T}from"../../camera/constraintUtils.js";import{ConstraintTypes as j,InteractionType as y,TiltMode as O}from"../../camera/constraintUtils/common.js";import{TiltDefault as U}from"../Constraints.js";import{InteractiveController as M}from"./InteractiveController.js";import{normalizeCoordinate as D,decideNavigationMode as V,NavigationMode as g}from"../utils/navigationUtils.js";var x;!function(t){t[t.CENTER=0]="CENTER",t[t.EYE=1]="EYE"}(x||(x={}));const N=7,A=90;let S=class extends M{constructor(t){super(t),this.view=null,this.pivot=x.CENTER,this.lastPoint=c(),this.tmpWorldUp=w(),this.tmpViewDir=w(),this.tmpRotCurPoint=c(),this.tmpTransf=h(),this.tmpAxis=w(),this.tmpPivotPoint=w(),this.pivotPos=w(),this.constraintOptions={selection:j.ALL,interactionType:y.TUMBLE,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:O.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}initialize(){this.rotScale=this.pivot===x.CENTER?3:1.5}begin(t){if(this.active){switch(this.pivot){case x.EYE:m(this.pivotPos,this.startCamera.eye),this.constraintOptions.interactionType=y.LOOK_AROUND,this.constraintOptions.tiltMode=O.LOOK_AROUND,this.constraintOptions.selection=j.NONE;break;case x.CENTER:this.intersectionHelper.intersectRayFreePointFallback(this.startCamera.ray,this.pivotPos)||m(this.pivotPos,this.startCamera.center),this._constrainPivotPoint(t),this.startCamera.center=this.pivotPos,this.constraintOptions.interactionType=y.TUMBLE,this.constraintOptions.tiltMode=O.TUMBLE,this.constraintOptions.selection=j.ALL&~j.DISTANCE}this.constraintOptions.interactionStartCamera=this.startCamera,D(this.startCamera,t,this.lastPoint)}}_constrainPivotPoint(t){const i=this.startCamera,s=w();l(s,this.pivotPos,i.eye);let e=v(s);this.view.camera.position.hasZ&&(e=Math.min(e,N*Math.abs(this.view.camera.position.z)));const r=R(this.view.spatialReference),a=o(i.width/i.pixelRatio*.5,i.height/i.pixelRatio*.5),n=V(this.startCamera,a,!0,r);let h=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),i.fullWidth/i.pixelRatio*.5,i.fullHeight/i.pixelRatio*.5,i,2.5*A,A),p=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),t[0],t[1],i,A);void 0===h&&void 0===p||(h=void 0===h?p:h,p=void 0===p||n===g.Horizontal?h:p,e=h>p?p:h),u(s,s),m(this.pivotPos,C(this.tmpPivotPoint,i.eye,P(this.tmpPivotPoint,s,e)))}update(t){if(this.active){switch(this.pivot){case x.EYE:this.currentCamera.center=this._applyRotation(this.currentCamera,t,this.currentCamera.center,this.pivotPos);break;case x.CENTER:this.currentCamera.center=this.pivotPos,this.currentCamera.eye=this._applyRotation(this.currentCamera,t,this.currentCamera.eye,this.pivotPos)}T(this.view,this.currentCamera,this.constraintOptions)}}end(){this.active&&this.finishController()}_applyRotation(t,o,e,r){this.view.renderCoordsHelper.worldUpAtPosition(r,this.tmpWorldUp),D(t,o,this.tmpRotCurPoint);let h=(this.lastPoint[1]-this.tmpRotCurPoint[1])*this.rotScale,c=(this.tmpRotCurPoint[0]-this.lastPoint[0])*this.rotScale;l(this.tmpViewDir,e,r);const m=v(this.tmpViewDir),u=i(f(this.tmpViewDir,this.tmpWorldUp)/m);if(this.pivot===x.EYE){h*=-.5;const t=.5*Math.PI-u,i=.5*Math.PI*.99;h=t-Math.max(-i,Math.min(i,t+h))}return h=s(h+u,U.min,U.max)-u,E(this.tmpAxis,t.up,this.tmpViewDir),this.pivot===x.CENTER&&(c=-c),a(this.tmpTransf,c,this.tmpWorldUp),n(this.tmpTransf,this.tmpTransf,h,this.tmpAxis),d(this.tmpViewDir,this.tmpViewDir,this.tmpTransf),t.up=d(k,t.up,this.tmpTransf),C(k,r,this.tmpViewDir),p(this.lastPoint,this.tmpRotCurPoint),k}};t([e({constructOnly:!0})],S.prototype,"view",void 0),t([e()],S.prototype,"pivot",void 0),S=t([r("esri.views.3d.state.controllers.RotateController")],S);const k=w();export{x as PivotPoint,S as RotateController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{deg2rad as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as e,screenPointObjectToArray as n,createRenderScreenPointArray3 as s}from"../../../../../core/screenUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../../chunks/vec2.js";import{g as m,o as h,l as c,f as p,n as u,b as l,a as P,d}from"../../../../../chunks/vec3.js";import{c as g}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as v}from"../../../../../geometry/projectionEllipsoid.js";import{wrapAxisAngle as M}from"../../../../../geometry/support/axisAngle.js";import{create as C,fromPositionAndNormal as S,normal as w}from"../../../../../geometry/support/plane.js";import{c as b}from"../../../../../chunks/sphere.js";import{disableContextNavigation as f}from"../../../../../support/featureFlags.js";import{pixelDistanceToInteractionFactor as j,applyAll as E}from"../../../camera/constraintUtils.js";import{ConstraintTypes as O,InteractionType as y,TiltMode as k}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as A}from"../../../input/util.js";import{InteractiveController as z}from"../InteractiveController.js";import{PanPlanarMomentumController as R}from"../momentum/PanPlanarMomentumController.js";import{PanSphericalMomentumController as x}from"../momentum/PanSphericalMomentumController.js";import{RotationMomentumController as _}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as H}from"../momentum/ZoomPlanarMomentumController.js";import{ZoomSphericalMomentumController as F}from"../momentum/ZoomSphericalMomentumController.js";import{NavigationMode as T,pickPointAndInitSphere as U,decideNavigationMode as D,sphereOrPlanePointFromScreenPoint as I,intersectPlaneFromScreenPointAtEye as L,applyZoomOnSphere as Z,preserveHeadingThreshold as N,applyPanSphericalPreserveHeading as B,applyPanSphericalDirectRotation as G,normalizeRotationDelta as V,applyRotation as q,applyPanPlanar as J,applyZoomToPoint as K}from"../../utils/navigationUtils.js";import{cyclicalPI as Q}from"../../../support/mathUtils.js";import W from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as X}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{PanSphericalMomentumEstimator as Y}from"../../../../navigation/PanSphericalMomentumEstimator.js";import{RotationMomentumEstimator as $}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as tt}from"../../../../navigation/ZoomMomentumEstimator.js";let it=class extends z{constructor(t){super(t),this.view=null,this.smoothRotation=new A(.05),this.rotationAxis=g(),this.panningPlane=C(),this.smoothScaling=new A(.05),this.zoomCenterScreen=e(),this.zoomMomentumEstimator=new tt,this.rotationMomentumEstimator=new $,this.panSphericalMomentumEstimator=new Y,this.panPlanarMomentumEstimator=new X,this.adjustedSphere=b(),this.tmp3d=g(),this.tmpScreenPointArray=e(),this.beginScreenPoint=e(),this.beginScenePoint=g(),this.screenPickPoint=e(),this.navMode=T.Horizontal,this.tmpInteractionDirection=g(),this.constraintOptions={selection:O.ALL,interactionType:y.NONE,interactionFactor:0,interactionStartCamera:new W,interactionDirection:null,tiltMode:k.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const e=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=e,this.rotationMomentumEstimator.enabled=e,this.panPlanarMomentumEstimator.enabled=e,this.panSphericalMomentumEstimator.enabled=e,this.beginHeading=-Q.normalize(i(this.view.camera.heading)),this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.smoothRotation.reset(),n(t.center,this.screenPickPoint),a(this.beginScreenPoint,this.screenPickPoint);const s=v(this.view.spatialReference),o=U(this.intersectionHelper,this.startCamera,this.screenPickPoint,!0,s);this.scenePickPoint=o.scenePickPoint,this.sphere=o.sphere,m(this.beginScenePoint,this.scenePickPoint),this.navMode=D(this.startCamera,this.screenPickPoint,o.hasGeometryIntersection,s),this.navMode===T.Vertical&&this._preparePlanarPanMode(t),this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}_preparePlanarPanMode(t){const i=h(this.tmp3d,this.startCamera.viewForward);S(this.scenePickPoint,i,this.panningPlane);const o=e(this.screenPickPoint[0],0),r=g(),a=c(this.startCamera.eye);this.adjustedSphere[3]=a<this.sphere[3]?a-100:this.sphere[3],I(this.adjustedSphere,this.startCamera,o,r);const v=s();this.startCamera.projectToRenderScreen(r,v);const M=.9*v[1];if(this.screenPickPoint[1]=Math.min(this.screenPickPoint[1],M),this.intersectionHelper.intersectScreen(this.screenPickPoint,this.scenePickPoint)&&S(this.scenePickPoint,w(this.panningPlane),this.panningPlane),!f()){const t=g(),i=g(),e=g(),n=80,s=5,o=50;p(t,this.scenePickPoint,this.currentCamera.eye),u(t,t);const r=s*Math.max(Math.abs(this.view.camera.position.z),o),a=this.view._stage.renderView.getMinimalDepthForArea(null,this.screenPickPoint[0],this.screenPickPoint[1],this.view.state.camera,n),h=a?Math.min(a,r):r;m(e,l(i,this.currentCamera.eye,P(i,t,h))),this.panningPlane[3]=-d(this.panningPlane,e),this.startCamera.center=l(i,this.startCamera.eye,P(i,this.startCamera.viewForward,h))}const C=n(t.center,this.tmpScreenPointArray);L(this.panningPlane,this.startCamera,C,this.beginScenePoint)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1;this.navMode===T.Horizontal?(i&&this._zoomSpherical(t),this._panningSpherical(t),i&&this._rotateSpherical(t)):(i&&this._zoomPlanar(t),this._panningPlanar(t),i&&this._rotatePlanar(t))}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return this.navMode===T.Horizontal?new F({view:this.view,momentum:i,screenCenter:this.zoomCenterScreen,sceneCenter:this.beginScenePoint,radius:this.sphere[3]}):new H({view:this.view,momentum:i,zoomCenter:this.beginScenePoint});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new _({view:this.view,momentum:e,center:this.sphere,axis:this.rotationAxis});if(this.navMode===T.Horizontal){const t=this.panSphericalMomentumEstimator.evaluateMomentum();if(t)return new x({view:this.view,momentum:t})}else{const t=this.panPlanarMomentumEstimator.evaluateMomentum();if(t)return new R({view:this.view,momentum:t})}return null}_zoomSpherical(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),Z(this.sphere,this.currentCamera,this.smoothScaling.value),n(t.center,this.zoomCenterScreen),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),this.constraintOptions.interactionType=y.ZOOM,this.constraintOptions.interactionFactor=j(t.radius-this.beginRadius),E(this.view,this.currentCamera,this.constraintOptions)}_panningSpherical(t){const i=n(t.center,this.tmpScreenPointArray);I(this.sphere,this.currentCamera,i,this.tmp3d),N(this.beginScenePoint,d(this.currentCamera.up,this.beginScenePoint),this.sphere[3],this.beginHeading,this.view.camera.tilt,this.startCamera)?(B(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.beginHeading,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumPreserveHeading(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere,this.beginHeading,this.view.camera.tilt)):(G(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumDirectRotation(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere[3],this.view.camera.tilt)),this.constraintOptions.interactionType=y.PAN,this.constraintOptions.interactionFactor=j(this.screenPickPoint,i),E(this.view,this.currentCamera,this.constraintOptions)}_rotateSpherical(t){u(this.rotationAxis,this.scenePickPoint),this.currentCamera.aboveGround||h(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value,e=i+V(t.angle-i),n=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=n,this.smoothRotation.update(e);const s=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(s,.001*t.timestamp),q(this.currentCamera,this.sphere,M(this.rotationAxis,s)),this.constraintOptions.interactionType=y.TUMBLE,this.constraintOptions.interactionFactor=j(t.radius*e),E(this.view,this.currentCamera,this.constraintOptions)}_panningPlanar(t){const i=n(t.center,this.tmpScreenPointArray);L(this.panningPlane,this.currentCamera,i,this.tmp3d)&&(J(this.currentCamera,this.beginScenePoint,this.tmp3d),this.panPlanarMomentumEstimator.add(i,this.tmp3d,.001*t.timestamp),this.constraintOptions.interactionType=y.PAN,this.constraintOptions.interactionFactor=j(this.beginScreenPoint,i),this.constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this.tmpInteractionDirection),E(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null)}_zoomPlanar(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),K(this.currentCamera,this.beginScenePoint,this.smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this.constraintOptions.interactionType=y.ZOOM,this.constraintOptions.interactionFactor=j(t.radius-this.beginRadius),E(this.view,this.currentCamera,this.constraintOptions)}_rotatePlanar(t){m(this.rotationAxis,this.beginScenePoint),this.currentCamera.aboveGround||h(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value;let e=t.angle-i;e=V(e);const n=i+e,s=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=s,this.smoothRotation.update(n);const o=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(o,.001*t.timestamp),q(this.currentCamera,this.sphere,M(this.rotationAxis,o)),this.constraintOptions.interactionType=y.TUMBLE,this.constraintOptions.interactionFactor=j(t.radius*o),E(this.view,this.currentCamera,this.constraintOptions)}};t([o({constructOnly:!0})],it.prototype,"view",void 0),it=t([r("esri.views.3d.state.controllers.global.PinchAndPanController")],it);export{it as PinchAndPanController};
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{deg2rad as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as e,screenPointObjectToArray as n,createRenderScreenPointArray3 as s}from"../../../../../core/screenUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../../chunks/vec2.js";import{g as m,o as h,l as c,f as p,n as l,b as u,a as P,d}from"../../../../../chunks/vec3.js";import{c as g}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as v}from"../../../../../geometry/projectionEllipsoid.js";import{wrapAxisAngle as M}from"../../../../../geometry/support/axisAngle.js";import{create as C,fromPositionAndNormal as S,normal as w}from"../../../../../geometry/support/plane.js";import{c as b}from"../../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as f,applyAll as j}from"../../../camera/constraintUtils.js";import{ConstraintTypes as E,InteractionType as O,TiltMode as y}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as k}from"../../../input/util.js";import{InteractiveController as A}from"../InteractiveController.js";import{PanPlanarMomentumController as z}from"../momentum/PanPlanarMomentumController.js";import{PanSphericalMomentumController as R}from"../momentum/PanSphericalMomentumController.js";import{RotationMomentumController as x}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as _}from"../momentum/ZoomPlanarMomentumController.js";import{ZoomSphericalMomentumController as H}from"../momentum/ZoomSphericalMomentumController.js";import{NavigationMode as F,pickPointAndInitSphere as T,decideNavigationMode as U,sphereOrPlanePointFromScreenPoint as D,intersectPlaneFromScreenPointAtEye as I,applyZoomOnSphere as L,preserveHeadingThreshold as Z,applyPanSphericalPreserveHeading as N,applyPanSphericalDirectRotation as B,normalizeRotationDelta as G,applyRotation as V,applyPanPlanar as q,applyZoomToPoint as J}from"../../utils/navigationUtils.js";import{cyclicalPI as K}from"../../../support/mathUtils.js";import Q from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as W}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{PanSphericalMomentumEstimator as X}from"../../../../navigation/PanSphericalMomentumEstimator.js";import{RotationMomentumEstimator as Y}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as $}from"../../../../navigation/ZoomMomentumEstimator.js";let tt=class extends A{constructor(t){super(t),this.view=null,this.smoothRotation=new k(.05),this.rotationAxis=g(),this.panningPlane=C(),this.smoothScaling=new k(.05),this.zoomCenterScreen=e(),this.zoomMomentumEstimator=new $,this.rotationMomentumEstimator=new Y,this.panSphericalMomentumEstimator=new X,this.panPlanarMomentumEstimator=new W,this.adjustedSphere=b(),this.tmp3d=g(),this.tmpScreenPointArray=e(),this.beginScreenPoint=e(),this.beginScenePoint=g(),this.screenPickPoint=e(),this.navMode=F.Horizontal,this.tmpInteractionDirection=g(),this.constraintOptions={selection:E.ALL,interactionType:O.NONE,interactionFactor:0,interactionStartCamera:new Q,interactionDirection:null,tiltMode:y.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const e=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=e,this.rotationMomentumEstimator.enabled=e,this.panPlanarMomentumEstimator.enabled=e,this.panSphericalMomentumEstimator.enabled=e,this.beginHeading=-K.normalize(i(this.view.camera.heading)),this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.smoothRotation.reset(),n(t.center,this.screenPickPoint),a(this.beginScreenPoint,this.screenPickPoint);const s=v(this.view.spatialReference),o=T(this.intersectionHelper,this.startCamera,this.screenPickPoint,!0,s);this.scenePickPoint=o.scenePickPoint,this.sphere=o.sphere,m(this.beginScenePoint,this.scenePickPoint),this.navMode=U(this.startCamera,this.screenPickPoint,o.hasGeometryIntersection,s),this.navMode===F.Vertical&&this._preparePlanarPanMode(t),this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}_preparePlanarPanMode(t){const i=h(this.tmp3d,this.startCamera.viewForward);S(this.scenePickPoint,i,this.panningPlane);const o=e(this.screenPickPoint[0],0),r=g(),a=c(this.startCamera.eye);this.adjustedSphere[3]=a<this.sphere[3]?a-100:this.sphere[3],D(this.adjustedSphere,this.startCamera,o,r);const v=s();this.startCamera.projectToRenderScreen(r,v);const M=.9*v[1];this.screenPickPoint[1]=Math.min(this.screenPickPoint[1],M),this.intersectionHelper.intersectScreen(this.screenPickPoint,this.scenePickPoint)&&S(this.scenePickPoint,w(this.panningPlane),this.panningPlane);const C=g(),b=g(),f=g(),j=80,E=5,O=50;p(C,this.scenePickPoint,this.currentCamera.eye),l(C,C);const y=E*Math.max(Math.abs(this.view.camera.position.z),O),k=this.view._stage.renderView.getMinimalDepthForArea(null,this.screenPickPoint[0],this.screenPickPoint[1],this.view.state.camera,j),A=k?Math.min(k,y):y;m(f,u(b,this.currentCamera.eye,P(b,C,A))),this.panningPlane[3]=-d(this.panningPlane,f),this.startCamera.center=u(b,this.startCamera.eye,P(b,this.startCamera.viewForward,A));const z=n(t.center,this.tmpScreenPointArray);I(this.panningPlane,this.startCamera,z,this.beginScenePoint)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1;this.navMode===F.Horizontal?(i&&this._zoomSpherical(t),this._panningSpherical(t),i&&this._rotateSpherical(t)):(i&&this._zoomPlanar(t),this._panningPlanar(t),i&&this._rotatePlanar(t))}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return this.navMode===F.Horizontal?new H({view:this.view,momentum:i,screenCenter:this.zoomCenterScreen,sceneCenter:this.beginScenePoint,radius:this.sphere[3]}):new _({view:this.view,momentum:i,zoomCenter:this.beginScenePoint});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new x({view:this.view,momentum:e,center:this.sphere,axis:this.rotationAxis});if(this.navMode===F.Horizontal){const t=this.panSphericalMomentumEstimator.evaluateMomentum();if(t)return new R({view:this.view,momentum:t})}else{const t=this.panPlanarMomentumEstimator.evaluateMomentum();if(t)return new z({view:this.view,momentum:t})}return null}_zoomSpherical(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),L(this.sphere,this.currentCamera,this.smoothScaling.value),n(t.center,this.zoomCenterScreen),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),this.constraintOptions.interactionType=O.ZOOM,this.constraintOptions.interactionFactor=f(t.radius-this.beginRadius),j(this.view,this.currentCamera,this.constraintOptions)}_panningSpherical(t){const i=n(t.center,this.tmpScreenPointArray);D(this.sphere,this.currentCamera,i,this.tmp3d),Z(this.beginScenePoint,d(this.currentCamera.up,this.beginScenePoint),this.sphere[3],this.beginHeading,this.view.camera.tilt,this.startCamera)?(N(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.beginHeading,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumPreserveHeading(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere,this.beginHeading,this.view.camera.tilt)):(B(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumDirectRotation(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere[3],this.view.camera.tilt)),this.constraintOptions.interactionType=O.PAN,this.constraintOptions.interactionFactor=f(this.screenPickPoint,i),j(this.view,this.currentCamera,this.constraintOptions)}_rotateSpherical(t){l(this.rotationAxis,this.scenePickPoint),this.currentCamera.aboveGround||h(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value,e=i+G(t.angle-i),n=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=n,this.smoothRotation.update(e);const s=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(s,.001*t.timestamp),V(this.currentCamera,this.sphere,M(this.rotationAxis,s)),this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.interactionFactor=f(t.radius*e),j(this.view,this.currentCamera,this.constraintOptions)}_panningPlanar(t){const i=n(t.center,this.tmpScreenPointArray);I(this.panningPlane,this.currentCamera,i,this.tmp3d)&&(q(this.currentCamera,this.beginScenePoint,this.tmp3d),this.panPlanarMomentumEstimator.add(i,this.tmp3d,.001*t.timestamp),this.constraintOptions.interactionType=O.PAN,this.constraintOptions.interactionFactor=f(this.beginScreenPoint,i),this.constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this.tmpInteractionDirection),j(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null)}_zoomPlanar(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),J(this.currentCamera,this.beginScenePoint,this.smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this.constraintOptions.interactionType=O.ZOOM,this.constraintOptions.interactionFactor=f(t.radius-this.beginRadius),j(this.view,this.currentCamera,this.constraintOptions)}_rotatePlanar(t){m(this.rotationAxis,this.beginScenePoint),this.currentCamera.aboveGround||h(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value;let e=t.angle-i;e=G(e);const n=i+e,s=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=s,this.smoothRotation.update(n);const o=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(o,.001*t.timestamp),V(this.currentCamera,this.sphere,M(this.rotationAxis,o)),this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.interactionFactor=f(t.radius*o),j(this.view,this.currentCamera,this.constraintOptions)}};t([o({constructOnly:!0})],tt.prototype,"view",void 0),tt=t([r("esri.views.3d.state.controllers.global.PinchAndPanController")],tt);export{tt as PinchAndPanController};
|