@arcgis/core 5.1.0-next.101 → 5.1.0-next.103
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/applications/Components/imageryUtils.d.ts +22 -1
- package/applications/Components/imageryUtils.js +1 -1
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/arcade.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/debug.js +1 -1
- package/arcade/deepClone.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/fieldStats.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/functions/track.js +1 -1
- package/arcade/geometry/constructors.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/geometry/operators.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcgisGlobal.d.ts +1449 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{92e7067960549733f8e6.js → 037b36d415ae27e987f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{58579c53be1a44bd08d2.js → 054ae729e7cefa2c7778.js} +1 -1
- package/assets/esri/core/workers/chunks/069459519477bb3dc91b.js +1 -0
- package/assets/esri/core/workers/chunks/{4301cb9670fa7c907460.js → 0881929a4a457f94f317.js} +1 -1
- package/assets/esri/core/workers/chunks/{abdf146b35e179b5b245.js → 0cb8bc6dbbbe3b212712.js} +1 -1
- package/assets/esri/core/workers/chunks/{b811d62284be95f4beb6.js → 0cc74bc3772be51cabc1.js} +1 -1
- package/assets/esri/core/workers/chunks/{0630ce1975c91ae362d9.js → 0e9804ece1fd2d59751b.js} +1 -1
- package/assets/esri/core/workers/chunks/{545c38789267e3487dbd.js → 10491b5b106bc5ad0b2b.js} +1 -1
- package/assets/esri/core/workers/chunks/12053c1213465d07d2f6.js +1 -0
- package/assets/esri/core/workers/chunks/{ca6c128940ddbebcaaab.js → 14b7b55c42af65ffa024.js} +1 -1
- package/assets/esri/core/workers/chunks/{702e8468836863abd81b.js → 15fa8b5b472131aaa68e.js} +1 -1
- package/assets/esri/core/workers/chunks/{852f4cd514008fee5a55.js → 176e676879666f784599.js} +1 -1
- package/assets/esri/core/workers/chunks/18201119828664373165.js +1 -0
- package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +1 -0
- package/assets/esri/core/workers/chunks/{ce3e51c799a80648e46d.js → 1c0e8808d14d8e6dde2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{bafe489e54f34d1841e6.js → 1c83e61fd9a4f8fc8372.js} +1 -1
- package/assets/esri/core/workers/chunks/1cb0c4fc315bbc2bd00b.js +1 -0
- package/assets/esri/core/workers/chunks/{5afee66e182f79a0fc46.js → 1ff61d8a8ea060e78b83.js} +1 -1
- package/assets/esri/core/workers/chunks/{19a9a555365a8363d34b.js → 23119a1b1310b7dab2aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{031ea31bbdb7f1be791e.js → 276cb6a1cdd26d0e1444.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdb7851e98e8d2ba48d3.js → 286bf3be9f524bde9529.js} +1 -1
- package/assets/esri/core/workers/chunks/{53bf9b0c2b8da12820ea.js → 29b00d07d3e1d095c590.js} +2 -2
- package/assets/esri/core/workers/chunks/{9d8e7839772029d83c93.js → 29bbc0d6d847b065d10e.js} +1 -1
- package/assets/esri/core/workers/chunks/{156efa014b6edd9ccce9.js → 2a5f6a8d282f2c391591.js} +1 -1
- package/assets/esri/core/workers/chunks/{15a65aa6969c1b383ce2.js → 2f903bd3a2611e7f0946.js} +1 -1
- package/assets/esri/core/workers/chunks/{b803e7b0d489bb628d72.js → 2f925a424b60b4a5e8e5.js} +1 -1
- package/assets/esri/core/workers/chunks/30e191d36aa95823c018.js +1 -0
- package/assets/esri/core/workers/chunks/{4b19acf8bde5b2e80692.js → 313a89b334e3518d30a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{390717f079def83a0d9c.js → 31a8bc25aa1441c70caa.js} +1 -1
- package/assets/esri/core/workers/chunks/31c01885ee6d70a2bde2.js +1 -0
- package/assets/esri/core/workers/chunks/3292b3883f203637b5a7.js +1 -0
- package/assets/esri/core/workers/chunks/{9bb2251ba58932f85d13.js → 33329f5d88e60b4ec568.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f9117d589de7caaa02d.js → 35bbd63319d8aa9f31cc.js} +1 -1
- package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +2 -0
- package/assets/esri/core/workers/chunks/{3996149146dd1eca7cc5.js → 38d7430d2370b69334d7.js} +1 -1
- package/assets/esri/core/workers/chunks/3aebbed6d4fd1b993a35.js +1 -0
- package/assets/esri/core/workers/chunks/3f1d533efe4300d19e6a.js +1 -0
- package/assets/esri/core/workers/chunks/{7db09c5bf024242becfa.js → 40caf5e09e4382d81104.js} +5 -5
- package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +1 -0
- package/assets/esri/core/workers/chunks/{bc6a809a965355eb425f.js → 44636ef119c6a576470b.js} +1 -1
- package/assets/esri/core/workers/chunks/453c9e8d438d061e1736.js +1 -0
- package/assets/esri/core/workers/chunks/479e34b0abc10499bd3a.js +1 -0
- package/assets/esri/core/workers/chunks/{54dad475dc806a38c287.js → 48440a071a37590846ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{38b1d2ffcc318ac0119d.js → 48fcc10768d93e95a04e.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa9ab152ea785b5e97e0.js → 4a41f98210f1da3b5041.js} +1 -1
- package/assets/esri/core/workers/chunks/4a65bc9091d7ea7e80df.js +1 -0
- package/assets/esri/core/workers/chunks/4cdf80e2e60501dd4756.js +1 -0
- package/assets/esri/core/workers/chunks/51edfe21d4c6ee22c83d.js +1 -0
- package/assets/esri/core/workers/chunks/52219561c144e5cb4442.js +1 -0
- package/assets/esri/core/workers/chunks/{312036c89a6a09bb06c2.js → 5570d47533efab56c732.js} +1 -1
- package/assets/esri/core/workers/chunks/{5abe34bb0110694f7b42.js → 566c36032b456ec5b5d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{34207774bc371e95ba3c.js → 56b6b68d9459b1edea43.js} +1 -1
- package/assets/esri/core/workers/chunks/593772bd8b19ac664b29.js +1 -0
- package/assets/esri/core/workers/chunks/{10ce083b38ccfa88f766.js → 594e1f633527749d92d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad329226c8b579d0964c.js → 5a6523c903b11dea77d4.js} +1 -1
- package/assets/esri/core/workers/chunks/5c44638670e40e092ce3.js +1 -0
- package/assets/esri/core/workers/chunks/{af8bc56cf1404afc3028.js → 5d60253ea3d247cdb3d1.js} +1 -1
- package/assets/esri/core/workers/chunks/5dc86a3a40d16b576bb5.js +1 -0
- package/assets/esri/core/workers/chunks/601edefd8da4eb2eda28.js +1 -0
- package/assets/esri/core/workers/chunks/6182d39e2095d4460b88.js +1 -0
- package/assets/esri/core/workers/chunks/{c798a40418e7ff38042a.js → 63513e706fe55a1def15.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8d338665fe00494c826.js → 660713adb5a845dfa2ef.js} +1 -1
- package/assets/esri/core/workers/chunks/694f9571e2723d3d4b02.js +1 -0
- package/assets/esri/core/workers/chunks/69ad5930ff6040c6c561.js +1 -0
- package/assets/esri/core/workers/chunks/{f563dd6cace047108b3c.js → 6b5d2df9123dfe7e00b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5217d676749bca59d90f.js → 6c79e8e840c1d027fbb2.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ce845c990bb4d701362.js → 6ca81e34854ce7ec6f6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{11a99ee68409a641810e.js → 6f02681bcaa9bef501fc.js} +1 -1
- package/assets/esri/core/workers/chunks/77ac243d4dcd901c2eec.js +1 -0
- package/assets/esri/core/workers/chunks/78af4b7a379c40f497a7.js +1 -0
- package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 79b64a52ff57c40c7800.js} +1 -1
- package/assets/esri/core/workers/chunks/{475409026288f0981ce2.js → 7b3642195d6d3ea9b830.js} +1 -1
- package/assets/esri/core/workers/chunks/{82b2acc6f181927de89c.js → 7bc746ea17f4e336e0b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{19fcc74d34cbbaa56a41.js → 7c86099ed17f420b0489.js} +1 -1
- package/assets/esri/core/workers/chunks/{00a25dd4b057cc9f2a7e.js → 7d571845292b1b7769c2.js} +1 -1
- package/assets/esri/core/workers/chunks/7dafe608c224b9d48ffa.js +1 -0
- package/assets/esri/core/workers/chunks/7e203e947846d40f897e.js +1 -0
- package/assets/esri/core/workers/chunks/855bf811cd79b97c169a.js +1 -0
- package/assets/esri/core/workers/chunks/{7601278ebced0c0c31cf.js → 85bba0db8a7a5fc1be44.js} +1 -1
- package/assets/esri/core/workers/chunks/{a318cf6bb900e0ee268c.js → 881234f25c7814de8753.js} +1 -1
- package/assets/esri/core/workers/chunks/895114ccd2603830960f.js +1 -0
- package/assets/esri/core/workers/chunks/8a68884d40f6f6de1d12.js +1 -0
- package/assets/esri/core/workers/chunks/{0d81409721d29d8bc276.js → 8a7682071941c35f05c1.js} +1 -1
- package/assets/esri/core/workers/chunks/8aac1155b8ac071cd2ad.js +1 -0
- package/assets/esri/core/workers/chunks/{3e2953ea62817e75d840.js → 8cbaaea72f4ca2f023be.js} +1 -1
- package/assets/esri/core/workers/chunks/{7bb17d0ab1cc2b89c035.js → 8e986167d4a393ee41ea.js} +1 -1
- package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +1 -0
- package/assets/esri/core/workers/chunks/92db9a6d273ae2862883.js +1 -0
- package/assets/esri/core/workers/chunks/{9b23d999db902d25ba58.js → 9373daa677dc767d7cf0.js} +1 -1
- package/assets/esri/core/workers/chunks/{40ffb1aa17cbfae17b23.js → 9542ef3f6c2bc7c14d85.js} +1 -1
- package/assets/esri/core/workers/chunks/{657268b3fde6da2dd735.js → 95798e3de3419fdda6ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{aad02c7417648d881129.js → 958617c3a9854ea04e06.js} +1 -1
- package/assets/esri/core/workers/chunks/{a28124bba6b43efd74cc.js → 95df6d2ebacc43ac5fa3.js} +1 -1
- package/assets/esri/core/workers/chunks/{f618ee43581e8de6ad0c.js → 970e91de5dfbbc247afb.js} +1 -1
- package/assets/esri/core/workers/chunks/978b7d10054e17161145.js +1 -0
- package/assets/esri/core/workers/chunks/{8a48a6760c33ed50b650.js → 98b4408e12684e37b395.js} +1 -1
- package/assets/esri/core/workers/chunks/9d70247d820085a2c190.js +1 -0
- package/assets/esri/core/workers/chunks/9da2f2b67837b491cfa3.js +1 -0
- package/assets/esri/core/workers/chunks/{edee616b6f1b5be8fd39.js → a0296e6d6c37b861c5fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{c19e3f6027b6526de359.js → a02ebdcb802d128c8eee.js} +1 -1
- package/assets/esri/core/workers/chunks/a0aaf14c8f9a007d88ac.js +1 -0
- package/assets/esri/core/workers/chunks/{1523883460874c352e36.js → a29cd1f5c7bb4f6a5a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf826787ab8d4b27ad80.js → a53a3e5548fef65a2710.js} +1 -1
- package/assets/esri/core/workers/chunks/{91f9e0e3662d4bf9f163.js → a913a1c83a667ed0e711.js} +1 -1
- package/assets/esri/core/workers/chunks/{359465b9726edcc70c83.js → a9c9c00432ee41ec91ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3a28c4887f802e8d96d.js → aa55923ca939a0d4606c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3b086eb9aa8c7d09048.js → aea8e0577fb48d5c9577.js} +1 -1
- package/assets/esri/core/workers/chunks/af45110f07e4b5162bae.js +1 -0
- package/assets/esri/core/workers/chunks/{76589434d573111a8fb4.js → b09ae8eb5e97fb27382f.js} +1 -1
- package/assets/esri/core/workers/chunks/b0c647af49c9d563b852.js +1 -0
- package/assets/esri/core/workers/chunks/{a320998f18922a35899f.js → b32a13972cb3de652339.js} +1 -1
- package/assets/esri/core/workers/chunks/b432a5a829e309837db6.js +1 -0
- package/assets/esri/core/workers/chunks/{9103eb0b9078019d3a26.js → b5d0898406c7d6e6a717.js} +1 -1
- package/assets/esri/core/workers/chunks/b640651c7d86cfe654bf.js +1 -0
- package/assets/esri/core/workers/chunks/{503439246250d9e1cbd5.js → b75e090a7e935ff870a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{c321bcda8e8893577948.js → b8dda9e55caba0e2b4c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{59a64d72eed8c40c63cf.js → bacf0c9d5d3e084dea61.js} +1 -1
- package/assets/esri/core/workers/chunks/{48a0e7a32ebd44045c8f.js → bb04aff0b4947408592c.js} +1 -1
- package/assets/esri/core/workers/chunks/{17de1c251242b692cf45.js → bff0c4094c14cb97b18f.js} +1 -1
- package/assets/esri/core/workers/chunks/{47dd2bfecc5c4b5f10f0.js → c0d7e4afbad0b20e2502.js} +1 -1
- package/assets/esri/core/workers/chunks/c13c532fe38ddc5d7ca6.js +1 -0
- package/assets/esri/core/workers/chunks/{cc62e5095e328bed3e01.js → c1ffb879e0283fb2815f.js} +1 -1
- package/assets/esri/core/workers/chunks/{22fa4aa2b76573bafe21.js → c476f4979048e558baa7.js} +89 -76
- package/assets/esri/core/workers/chunks/c8b96104641cb4afd4df.js +1 -0
- package/assets/esri/core/workers/chunks/{4faaf61d20e20fcf6c18.js → c91d4f1b42cfe474df52.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ae2408ac075b974e887.js → cb26966cc205bd338c76.js} +1 -1
- package/assets/esri/core/workers/chunks/{c452c74ba9de218c3e57.js → cb3004998eff7c60930e.js} +1 -1
- package/assets/esri/core/workers/chunks/cc48354c54358777e996.js +1 -0
- package/assets/esri/core/workers/chunks/{b1b8a7c00ec4d998ab84.js → cc8d55d1830d7542c3f5.js} +1 -1
- package/assets/esri/core/workers/chunks/ce0c7070eeb723a718e7.js +1 -0
- package/assets/esri/core/workers/chunks/ce3b5b83237cf37ff523.js +1 -0
- package/assets/esri/core/workers/chunks/cf3c0bee919bb509cd4f.js +1 -0
- package/assets/esri/core/workers/chunks/cf9b0ba30a75c030ca92.js +1 -0
- package/assets/esri/core/workers/chunks/d00b9c1fd0865bf8f317.js +1 -0
- package/assets/esri/core/workers/chunks/{9a29b7f9e6281ee40c37.js → d4749eb8a47869477037.js} +1 -1
- package/assets/esri/core/workers/chunks/d5423df247be82fa085a.js +1 -0
- package/assets/esri/core/workers/chunks/d610f517fb3c6cb24365.js +1 -0
- package/assets/esri/core/workers/chunks/{47656ec12401e53f4bd3.js → d9d716bfd0aab30b6caf.js} +1 -1
- package/assets/esri/core/workers/chunks/da4f7d7099ba88f31f45.js +1 -0
- package/assets/esri/core/workers/chunks/dbb1ac41fd5da4fd849b.js +1 -0
- package/assets/esri/core/workers/chunks/{176dd195f77b98cb0b0f.js → dd58bc675b85b4d90afa.js} +1 -1
- package/assets/esri/core/workers/chunks/e2bb95d601789bbda73b.js +1 -0
- package/assets/esri/core/workers/chunks/{f018ad451ee072253a1e.js → e4b2120d7ee1c998b1fc.js} +1 -1
- package/assets/esri/core/workers/chunks/e4c350dc65aae121171d.js +1 -0
- package/assets/esri/core/workers/chunks/e8518bd3596543b387f8.js +1 -0
- package/assets/esri/core/workers/chunks/{f948e4a80a7dbda70f2e.js → e973cab79ec2541cb81b.js} +1 -1
- package/assets/esri/core/workers/chunks/{7d6299ab7b0db23ab961.js → eb1d6614eeac6d26bb9c.js} +1 -1
- package/assets/esri/core/workers/chunks/f1bb426400dac02880f1.js +1 -0
- package/assets/esri/core/workers/chunks/{ffcd4fca7f67e1f943f1.js → f239a8ecad8b692d5eaa.js} +1 -1
- package/assets/esri/core/workers/chunks/{de11ebcea2b8f9dfe65d.js → f3161c47a572194f6017.js} +1 -1
- package/assets/esri/core/workers/chunks/{f66262f8582909157f01.js → f37be7e517f0892014e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{99f726f05cf80b0330ed.js → f3a9100518b044e79501.js} +1 -1
- package/assets/esri/core/workers/chunks/f3f984c62311c20a9db8.js +1 -0
- package/assets/esri/core/workers/chunks/f5bd0a4f82df5e942b70.js +1 -0
- package/assets/esri/core/workers/chunks/{85e65ced3312bf9cf162.js → f7e386ece75afb6e4be5.js} +1 -1
- package/assets/esri/core/workers/chunks/f8b884b529064df4a30a.js +1 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +125 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ar.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bg.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bs.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ca.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_cs.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_da.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_de.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_el.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_es.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_et.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fi.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_he.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hu.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_id.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_it.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ja.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ko.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lt.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lv.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_nl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_no.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-BR.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-PT.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ro.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ru.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sk.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sv.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_th.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_tr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_uk.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_vi.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-CN.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-HK.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-TW.json +1 -1
- package/chunks/AtmosphereCompositing.glsl.js +1 -1
- package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
- package/chunks/Centroid-DZi-eb9F.js +1 -1
- package/chunks/Clouds.glsl.js +1 -1
- package/chunks/Compositing.glsl.js +1 -1
- package/chunks/CutFillComposition.glsl.js +1 -1
- package/chunks/CutFillDepth.glsl.js +1 -1
- package/chunks/CutFillMask.glsl.js +1 -1
- package/chunks/CutFillReduction.glsl.js +1 -1
- package/chunks/CutFillTargetDepth.glsl.js +1 -1
- package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/FlatGeometry.js +1 -1
- package/chunks/FocusAreaColor.glsl.js +1 -1
- package/chunks/FocusAreaMask.glsl.js +1 -1
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +1 -1
- package/chunks/GaussianSplatShadow.glsl.js +1 -1
- package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
- package/chunks/GeodeticUtils.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
- package/chunks/GlobalIllumination.glsl.js +1 -1
- package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
- package/chunks/GlobalIlluminationUpscale.glsl.js +80 -65
- package/chunks/GlowBlur.glsl.js +1 -1
- package/chunks/GlowComposition.glsl.js +1 -1
- package/chunks/HazeCompositing.glsl.js +1 -1
- package/chunks/HighlightBlur.glsl.js +1 -1
- package/chunks/HighlightDownsample.glsl.js +1 -1
- package/chunks/Magnifier.glsl.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/NoiseTextureAtlas.glsl.js +1 -1
- package/chunks/OITBlend.glsl.js +2 -2
- package/chunks/OITBlendEmission.glsl.js +1 -1
- package/chunks/OITDimOpaque.glsl.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCrosses.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDensify.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorIntegrate.js +1 -1
- package/chunks/OperatorIntersects.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorOverlaps.js +1 -1
- package/chunks/OperatorProject.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingDensify.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/OperatorTouches.js +1 -1
- package/chunks/OperatorWithin.js +1 -1
- package/chunks/OverlayCompositing.glsl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/RasterColorizer.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
- package/chunks/SimpleAtmosphere.glsl.js +1 -1
- package/chunks/SpatialReference.js +1 -1
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Texture.glsl.js +1 -1
- package/chunks/Transformation2D.js +1 -1
- package/chunks/Viewshed.glsl.js +1 -1
- package/chunks/aiServices.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/constants.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/disjointOperator.js +1 -1
- package/chunks/distanceOperator.js +1 -1
- package/chunks/equalsOperator.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/chunks/pe.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/chunks/relateOperator.js +1 -1
- package/chunks/symmetricDifferenceOperator.js +1 -1
- package/chunks/unionOperator.js +1 -1
- package/chunks/vec2.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vec4.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/decorators/persistable.js +1 -1
- package/effects/FocusArea.js +1 -1
- package/form/elements/inputs/MultipleChoiceInput.d.ts +5 -5
- package/form/elements/inputs/MultipleChoiceInput.js +1 -1
- package/geometry/coordinateFormatter.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/geodeticUtils.js +1 -1
- package/geometry/operators/gx/operatorAffineTransform.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
- package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorProject.js +1 -1
- package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
- package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/geographicTransformationUtils.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/operators/support/projectionTransformation.js +1 -1
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/buffer/math/vec3.js +1 -1
- package/geometry/support/buffer/math/vec4.js +1 -1
- package/geometry/support/buffer/utils/vec2.js +1 -1
- package/geometry/support/coordinateSystem.js +1 -1
- package/geometry/support/meshUtils/extent.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/projection.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/geometry/support/vcsData.js +1 -1
- package/interfaces.d.ts +3 -0
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +29 -39
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/OrientedImageryLayer.d.ts +233 -0
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/VideoLayer.d.ts +35 -9
- package/layers/VideoLayer.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +147 -0
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/cypherUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.d.ts +12 -0
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/functions/rasterProjectionHelper.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +87 -9
- package/layers/support/FeatureReductionCluster.d.ts +87 -9
- package/layers/support/FieldConfiguration.d.ts +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/ParquetFilesData.js +1 -1
- package/layers/support/SceneFilter.js +1 -1
- package/layers/support/Sublayer.d.ts +25 -0
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.d.ts +147 -0
- package/layers/support/TelemetryData.d.ts +5 -0
- package/layers/support/TelemetryData.js +1 -1
- package/layers/support/TelemetryDisplay.d.ts +10 -2
- package/layers/support/TelemetryDisplay.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/types.d.ts +8 -1
- package/layers/video/videoUtils.js +1 -1
- package/linkChart/LinkChartProperties.js +1 -1
- package/linkChart/utils.js +1 -1
- package/package.json +2 -2
- package/portal/PortalItem.js +1 -1
- package/portal/jsonTypes.d.ts +7 -0
- package/renderers/UniqueValueRenderer.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/PrintParameters.d.ts +8 -1
- package/rest/support/PrintParameters.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/persistableUrlUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/urlUtils.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/third-party-notices.txt +188 -0
- package/views/2d/ViewStateManager.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/surface.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/focusAreaUtils.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +1 -1
- package/views/3d/state/ScreenSizePerspective.js +1 -1
- package/views/3d/support/ViewSlice.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
- package/views/3d/terrain/RasterTile.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js +3 -5
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/Clouds.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/fog/FogTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMask.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
- package/views/Viewport2DBaseMixin.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.js +1 -1
- package/widgets/Attachments.d.ts +0 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +8 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.js +2 -0
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/RelationshipElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +7 -0
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/constants.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.d.ts +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features.d.ts +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/types.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/Popup.d.ts +2 -24
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/TableList/support/tableListUtils.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +9 -0
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/support/forms/formUtils.js +1 -1
- package/assets/esri/core/workers/chunks/09630888267cde87654f.js +0 -1
- package/assets/esri/core/workers/chunks/0d9d33f29124d464a4cb.js +0 -1
- package/assets/esri/core/workers/chunks/0e333f1bce992508b68a.js +0 -1
- package/assets/esri/core/workers/chunks/0fa207c68dfd7ddee160.js +0 -1
- package/assets/esri/core/workers/chunks/13838b6c045425e73cf8.js +0 -1
- package/assets/esri/core/workers/chunks/177472a6a9beb1590934.js +0 -1
- package/assets/esri/core/workers/chunks/1d0f9f147bfa00b38d48.js +0 -1
- package/assets/esri/core/workers/chunks/1d54b71c43d9d6a5f713.js +0 -1
- package/assets/esri/core/workers/chunks/1f6b7626f333809837ef.js +0 -1
- package/assets/esri/core/workers/chunks/24646a1176ce34039155.js +0 -1
- package/assets/esri/core/workers/chunks/268ed861c882740c805b.js +0 -1
- package/assets/esri/core/workers/chunks/2b52c1c01cf568ba01fb.js +0 -1
- package/assets/esri/core/workers/chunks/3116a1c2b67a296ba86e.js +0 -1
- package/assets/esri/core/workers/chunks/32c17c299c7622ae0d71.js +0 -1
- package/assets/esri/core/workers/chunks/34f79355145c8e4c59dd.js +0 -1
- package/assets/esri/core/workers/chunks/3be111488365768fd917.js +0 -1
- package/assets/esri/core/workers/chunks/3f0483cbcd893acf240c.js +0 -1
- package/assets/esri/core/workers/chunks/40d251b6b42a41d68bd2.js +0 -1
- package/assets/esri/core/workers/chunks/43cc82373be791b7cb4c.js +0 -1
- package/assets/esri/core/workers/chunks/4a23b27bfbcfa08fd9a7.js +0 -1
- package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +0 -1
- package/assets/esri/core/workers/chunks/598271956c46e21e5c09.js +0 -1
- package/assets/esri/core/workers/chunks/5b07f3253403fe25ce5b.js +0 -1
- package/assets/esri/core/workers/chunks/5b6f2bfdcdd207d8ae42.js +0 -1
- package/assets/esri/core/workers/chunks/5c7ba4b8a9ec2e2e02b5.js +0 -1
- package/assets/esri/core/workers/chunks/60915a3708a34da1977e.js +0 -1
- package/assets/esri/core/workers/chunks/61c523dd9d8027922465.js +0 -1
- package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +0 -1
- package/assets/esri/core/workers/chunks/671826fe25105aedcce4.js +0 -1
- package/assets/esri/core/workers/chunks/6b79c254897ece95b7a3.js +0 -1
- package/assets/esri/core/workers/chunks/6c35583707f5c339ee99.js +0 -1
- package/assets/esri/core/workers/chunks/6cb467a9517f024be72f.js +0 -1
- package/assets/esri/core/workers/chunks/71119398ec91f1b209d7.js +0 -1
- package/assets/esri/core/workers/chunks/8ac8ef856ed9592c433b.js +0 -1
- package/assets/esri/core/workers/chunks/8fedb32055ac7f771419.js +0 -1
- package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +0 -1
- package/assets/esri/core/workers/chunks/9c11e1fe785e1385fdb1.js +0 -1
- package/assets/esri/core/workers/chunks/a567d001fcfa1f1cdeea.js +0 -1
- package/assets/esri/core/workers/chunks/a58662698c69190a12d8.js +0 -2
- package/assets/esri/core/workers/chunks/afdc6fc453157528cf9b.js +0 -1
- package/assets/esri/core/workers/chunks/b5ced451d331ca1ffb68.js +0 -1
- package/assets/esri/core/workers/chunks/b7f5d51ac26f37837b3b.js +0 -1
- package/assets/esri/core/workers/chunks/ba7fe21a78ea37a02b7c.js +0 -1
- package/assets/esri/core/workers/chunks/bb3ab2453ccde2f2611c.js +0 -1
- package/assets/esri/core/workers/chunks/beba9f2213d8a850ddb6.js +0 -1
- package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +0 -1
- package/assets/esri/core/workers/chunks/c9461568e1002ebac534.js +0 -1
- package/assets/esri/core/workers/chunks/d30790c69724258dab2b.js +0 -1
- package/assets/esri/core/workers/chunks/d35c475f004367e333eb.js +0 -1
- package/assets/esri/core/workers/chunks/d8c4fb66c733ab2f66d3.js +0 -1
- package/assets/esri/core/workers/chunks/d95ffd990b3a7df69e1e.js +0 -1
- package/assets/esri/core/workers/chunks/dd6efa0afe879bd11a2e.js +0 -1
- package/assets/esri/core/workers/chunks/dec51409372764e7093d.js +0 -1
- package/assets/esri/core/workers/chunks/e133840540abf20262a4.js +0 -1
- package/assets/esri/core/workers/chunks/e63e24101e7e92c62d98.js +0 -1
- package/assets/esri/core/workers/chunks/e785f76c1a75cb1d1e1f.js +0 -1
- package/assets/esri/core/workers/chunks/f27397379c6c88bc6ef4.js +0 -1
- package/assets/esri/core/workers/chunks/f53805c7a84203305b2c.js +0 -1
- package/assets/esri/core/workers/chunks/f60292d97bcdbf19165b.js +0 -1
- package/assets/esri/core/workers/chunks/f6ebec8d2248c719b89f.js +0 -1
- package/assets/esri/core/workers/chunks/fd2afff07aaac8203c18.js +0 -1
- package/assets/esri/core/workers/chunks/ff7708aaa2de720e3a47.js +0 -1
- /package/assets/esri/core/workers/chunks/{53bf9b0c2b8da12820ea.js.LICENSE.txt → 29b00d07d3e1d095c590.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a58662698c69190a12d8.js.LICENSE.txt → 35fdd62277fd06468a29.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{isSome as t,equals as i}from"../../../core/arrayUtils.js";import{createTask as s}from"../../../core/asyncUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import a from"../../../core/Logger.js";import{abortMaybe as n,destroyMaybe as o}from"../../../core/maybe.js";import{after as l,throwIfAborted as u,isPromiseLike as c}from"../../../core/promiseUtils.js";import{watch as p,syncAndInitial as d}from"../../../core/reactiveUtils.js";import{createScreenPointArray as h,createRenderScreenPointArray as m}from"../../../core/screenUtils.js";import{offsetDateUTC as g,convertTime as _}from"../../../core/timeUtils.js";import{property as y,subclass as v}from"../../../core/accessorSupport/decorators.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as w}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as D}from"../../../core/support/UpdatingHandles.js";import{g as C}from"../../../chunks/boundedPlane.js";import{polygonToVolume as b}from"../focusAreaUtils.js";import V from"./AnalysisView3D.js";import{registerAnalysisView as U,hideOtherAnalysisViews as T}from"./ShadowCast/analysisViewRegister.js";import{ShadowCastTooltip as P}from"./ShadowCast/ShadowCastTooltip.js";import{ElevationContext as O}from"../layers/graphics/ElevationContext.js";import{longitudeToTimezone as S}from"../support/earthUtils.js";import{computeDirectionsOverTime as x}from"../support/sunUtils.js";import{maxColorRampSize as z}from"../webgl-engine/shaders/colorRampParameters.js";import{breadthFirstBinaryPartitioning as j}from"../../../widgets/support/traversalUtils.js";let R=class extends V{constructor(e){super(e),this.type="shadow-cast-view-3d",this.analysis=null,this._updatingHandles=new D,this._stopPreviewingTask=null,this._updatedRecently=!1,this._tooltip=null,this._previousVolume=null}initialize(){this.addHandles([U(this.view,this),p(()=>({dependencies:this._previewDependencies,sceneUpdating:this._sceneUpdating}),()=>{n(this._stopPreviewingTask),this._updatedRecently=!0,this._stopPreviewingTask=s(async e=>{await l(B,e),u(e),this._updatedRecently=!1})},{sync:!0,initial:!0,equals:(e,t)=>H(e.dependencies,t.dependencies)&&(e.sceneUpdating===t.sceneUpdating||!e.sceneUpdating)}),p(()=>({renderer:this._renderer,visible:this.visible}),({renderer:e,visible:t})=>{t&&T(this.view,this),e?.setParameters({shadowCast:{enabled:t}})},d),p(()=>({renderer:this._renderer,parameters:this._visualizationParameters,visible:this.visible}),({renderer:e,parameters:t,visible:i})=>{L(e,i,t)},d),p(()=>({renderer:this._renderer,lightDirections:this._lightDirections,lightDirectionsContext:this._lightDirectionsContext,visible:this.visible}),({renderer:e,lightDirections:t,lightDirectionsContext:i,visible:s})=>{L(e,s,{lightDirections:t,lightDirectionsContext:i})},d),p(()=>({renderer:this._renderer,previewing:this._previewing,visible:this.visible}),({renderer:e,previewing:t,visible:i})=>{L(e,i,{previewing:t})},d),p(()=>({analysisVolume:this._analysisVolume,renderer:this._renderer,visible:this.visible}),({renderer:e,visible:t,analysisVolume:i})=>{L(e,t,{analysisVolume:i})},d)]),this.interactive=!0,this._tooltip=new P({getDuration:this.getDurationAtScreen.bind(this),getVisualizeSunlight:()=>this.analysis.visualizeSunlight,isVisible:()=>this.interactive&&this.visible,view:this.view})}destroy(){this.visible&&L(this._renderer,!0,{enabled:!1}),this._tooltip=o(this._tooltip),this._stopPreviewingTask=n(this._stopPreviewingTask),this._updatingHandles=o(this._updatingHandles)}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get updating(){return this._previewing||null!=this._stopPreviewingTask&&!this._stopPreviewingTask.finished||!0===this._tooltip?.updating||this._updatingHandles.updating}get visible(){return super.visible}set visible(e){super.visible=e}get _previewing(){return this._updatedRecently||this._sceneUpdating}get _sceneUpdating(){const{view:e}=this;if(null==e?.allLayerViews)return!0;const{stationary:t,graphicsView:i}=e;return!t||this._shadowLayerViews.some(e=>e.updating)||!i?.suspended&&!!i?.updating}get _effectiveUtcOffset(){return this.analysis.utcOffset??this._utcOffsetAuto}get _utcOffsetAuto(){const e=this._referencePosition;return null!=e?S(e[0],!1):0}get _dateUTCOffset(){let e=this.analysis.date;return e=g(e,-e.getTimezoneOffset(),"minutes"),e=g(e,-this._effectiveUtcOffset,"hours"),e}get _startDateTimeUTC(){return g(this._dateUTCOffset,this.analysis.startTimeOfDay)}get _endDateTimeUTC(){return g(this._dateUTCOffset,this.analysis.endTimeOfDay)}get _referencePosition(){return this.view?.environmentManager?.referencePositionGeographic}get _totalDurationInterval(){return this._totalDuration>0?Math.floor(this._totalDuration/(M-1)):M}get _interval(){const e=this._totalDurationInterval;switch(this.analysis.mode){case"min-duration":return this._totalDuration>0?e:0;case"total-duration":return e;case"discrete":return this.analysis.discreteOptions.interval||e}}get _intervalContext(){const{mode:e,minDurationOptions:t}=this.analysis;return"min-duration"===e&&t.contextEnabled?t.contextOptions.interval||this._totalDurationInterval:-1}get _totalDurationSampleCount(){return this._lightDirections.length}get _totalDuration(){const{startTimeOfDay:e,endTimeOfDay:t}=this.analysis;return t-e}get _lightDirections(){return this._calculateLightDirections(this._interval)}get _lightDirectionsContext(){return this._calculateLightDirections(this._intervalContext)}_calculateLightDirections(e){const{view:t}=this;if(e<=0)return[];const i="global"===t.viewingMode?I:this._referencePosition;if(null==i)return[];const s=x(this._startDateTimeUTC,this._endDateTimeUTC,e,i,t.state.viewingMode,M),r=s.length;q.length=0;const a=j(0,r,q),n=new Array(r);for(let o=0;o<r;++o)n[o]=s[a[o]];return n}get _analysisVolume(){const{geometry:e}=this.analysis;if(null==e)return this._previousVolume=null,null;try{const t=b(e,this.view,F);return null==t?(this._previousVolume=null,null):c(t)?(this._updatingHandles.consumePromise(t),this._previousVolume):(this._previousVolume=t,t)}catch(t){return a.getLogger(this).error(new r("shadowcastanalysisview3d:projection-failed","Failed to project analysis area geometry to view spatial reference",{geometry:e,error:t})),null}}get _visualizationParameters(){if(!this.visible)return null;switch(this.analysis.mode){case"min-duration":return this._minDurationVisualizationParameters;case"total-duration":return this._durationVisualizationParameters;case"discrete":return this._discreteVisualizationParameters}}get _minDurationVisualizationParameters(){const{color:e,minDuration:t}=this.analysis.minDurationOptions,i=this._totalDuration;return{visualization:2,thresholdColor:e.toUnitRGBA(),threshold:i>0?t/this._totalDuration:0,thresholdRendersSunlight:this.analysis.visualizeSunlight,...this._minDurationContextVisualizationParameters}}get _minDurationContextVisualizationParameters(){const{minDurationOptions:e}=this.analysis;return e.contextEnabled?{visualization:3,gradientColorRamp:this._getEffectiveShadowCastColorRamp(e.contextOptions.color,e.contextOptions.colorStops,1/this._lightDirectionsContext.length,this.analysis.visualizeSunlight)}:{}}get _durationVisualizationParameters(){const{color:e,colorStops:t,mode:i}=this.analysis.totalDurationOptions,s=this._totalDuration,r=s>0&&"hourly"===i?G/s:0,a=this._getEffectiveShadowCastColorRamp(e,t,1/s,this.analysis.visualizeSunlight);return 0===r?{...this._discreteVisualizationParameters,gradientColorRamp:a}:{bandedGradientColorRamp:a,visualization:1,bandSize:r}}get _discreteVisualizationParameters(){const{color:e,colorStops:t}=this.analysis.discreteOptions;return{gradientColorRamp:this._getEffectiveShadowCastColorRamp(e,t,1/this._lightDirections.length,this.analysis.visualizeSunlight),visualization:0}}get _shadowLayerViews(){return this.view.allLayerViews.items.filter(k)}get _previewDependencies(){const{view:e}=this,i=e.slice.plane,s=this._shadowLayerViews,r=s.map(e=>e.layer).filter(t),a=s.map(e=>e.suspended),n=r.map(e=>e.visible),o=r.map(e=>e.opacity),l=!!e.graphicsView?.suspended,u=r.filter(e=>"definitionExpression"in e).map(e=>e.definitionExpression),c=s.filter(e=>"filter"in e).map(e=>e.filter);return{slicePlane:i,startDateUTC:this._startDateTimeUTC,endDateUTC:this._endDateTimeUTC,layerViewSuspended:a,graphicsViewSuspended:l,layerVisibilities:n,layerOpacities:o,filters:c,definitionExpressions:u}}get _renderer(){return this.view?.stage?.renderer}get testData(){}async getDurationAtScreen(e){const{_renderer:t,_totalDurationSampleCount:i}=this;if(null==t||0===i)return 0;const s=this.view.state.camera.screenToRender(h(e.x,e.y),m()),r=t.readAccumulatedShadow(s);return(this.analysis.visualizeSunlight?1-r:r)*this._totalDuration}_getEffectiveShadowCastColorRamp(e,t,i,s){if(null!=t){t.length>z&&a.getLogger(this).warnOnce("ShadowCastAnalysis supports at most 8 color stops");const e=t.map(s?e=>[1-e.value*i,e.color.toUnitRGBA()]:e=>[e.value*i,e.color.toUnitRGBA()]);return e.sort(([e],[t])=>e-t),e}return E(e,s)}};e([y({readOnly:!0,type:["shadow-cast-view-3d"]})],R.prototype,"type",void 0),e([y({constructOnly:!0,nonNullable:!0})],R.prototype,"analysis",void 0),e([y({readOnly:!0})],R.prototype,"updating",null),e([y()],R.prototype,"_stopPreviewingTask",void 0),e([y()],R.prototype,"_updatedRecently",void 0),e([y()],R.prototype,"_tooltip",void 0),e([y()],R.prototype,"_sceneUpdating",null),e([y()],R.prototype,"_effectiveUtcOffset",null),e([y()],R.prototype,"_utcOffsetAuto",null),e([y()],R.prototype,"_dateUTCOffset",null),e([y()],R.prototype,"_startDateTimeUTC",null),e([y()],R.prototype,"_endDateTimeUTC",null),e([y()],R.prototype,"_referencePosition",null),e([y()],R.prototype,"_interval",null),e([y()],R.prototype,"_intervalContext",null),e([y()],R.prototype,"_totalDurationSampleCount",null),e([y()],R.prototype,"_totalDuration",null),e([y()],R.prototype,"_lightDirections",null),e([y()],R.prototype,"_lightDirectionsContext",null),e([y()],R.prototype,"_analysisVolume",null),e([y()],R.prototype,"_visualizationParameters",null),e([y()],R.prototype,"_minDurationVisualizationParameters",null),e([y()],R.prototype,"_minDurationContextVisualizationParameters",null),e([y()],R.prototype,"_durationVisualizationParameters",null),e([y()],R.prototype,"_discreteVisualizationParameters",null),e([y()],R.prototype,"_shadowLayerViews",null),e([y()],R.prototype,"_previewDependencies",null),e([y()],R.prototype,"_renderer",null),R=e([v("esri.views.3d.analysis.ShadowCastAnalysisView3D")],R);const A=R;function L(e,t,i){t&&null!=i&&e?.setParameters({shadowCast:i})}function E(e,t){const i=e.toUnitRGBA(),s=w(i[0],i[1],i[2],0),[r,a]=t?[i,s]:[s,i];return[[0,r],[1,a]]}function k(e){if(e.suspended)return!1;switch(e.type){case"building-scene-3d":case"csv-3d":case"elevation-3d":case"feature-3d":case"geojson-3d":case"integrated-mesh-3d":case"integrated-mesh-3dtiles":case"ogc-feature-3d":case"route-3d":case"scene-layer-3d":case"scene-layer-graphics-3d":case"stream-3d":case"wms-3d":case"catalog-footprint-3d":return!0;case"base-dynamic-3d":case"catalog-3d":case"catalog-dynamic-group-3d":case"dimension-3d":case"gaussian-splat-3d":case"imagery-3d":case"imagery-tile-3d":case"line-of-sight-3d":case"map-image-3d":case"point-cloud-3d":case"tile-3d":case"vector-tile-3d":case"viewshed-3d":case"voxel-3d":case"wfs-3d":case"wmts-3d":case"media-3d":case"group":default:return!1;case"graphics-3d":return e.layer.graphics.some(e=>{const{symbol:t}=e;return null==t||"text"!==t.type&&!("symbolLayers"in t)||"text"!==t.type&&t.symbolLayers.some(e=>"text"!==e.type)})}}function H(e,t){if(e===t)return!0;if(null==e&&null==t)return!0;if(null==e||null==t)return!1;const s=C(e.slicePlane,t.slicePlane),r=e.startDateUTC.valueOf()===t.startDateUTC.valueOf()&&e.endDateUTC.valueOf()===t.endDateUTC.valueOf(),a=i(e.layerViewSuspended,t.layerViewSuspended)&&e.graphicsViewSuspended===t.graphicsViewSuspended,n=i(e.layerVisibilities,t.layerVisibilities),o=i(e.layerOpacities,t.layerOpacities),l=i(e.filters,t.filters),u=i(e.definitionExpressions,t.definitionExpressions);return s&&r&&a&&n&&o&&l&&u}const G=_(1,"hours","milliseconds"),B=500,M=255,I=f(),q=[],F=new O;export{A as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{isSome as t,equals as i}from"../../../core/arrayUtils.js";import{createTask as s}from"../../../core/asyncUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import a from"../../../core/Logger.js";import{abortMaybe as n,destroyMaybe as o}from"../../../core/maybe.js";import{after as l,throwIfAborted as u,isPromiseLike as c}from"../../../core/promiseUtils.js";import{watch as p,syncAndInitial as d}from"../../../core/reactiveUtils.js";import{createScreenPointArray as h,createRenderScreenPointArray as m}from"../../../core/screenUtils.js";import{offsetDateUTC as g,convertTime as _}from"../../../core/timeUtils.js";import{property as y,subclass as v}from"../../../core/accessorSupport/decorators.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as w}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as D}from"../../../core/support/UpdatingHandles.js";import{n as C}from"../../../chunks/boundedPlane.js";import{polygonToVolume as b}from"../focusAreaUtils.js";import V from"./AnalysisView3D.js";import{registerAnalysisView as U,hideOtherAnalysisViews as T}from"./ShadowCast/analysisViewRegister.js";import{ShadowCastTooltip as P}from"./ShadowCast/ShadowCastTooltip.js";import{ElevationContext as O}from"../layers/graphics/ElevationContext.js";import{longitudeToTimezone as S}from"../support/earthUtils.js";import{computeDirectionsOverTime as x}from"../support/sunUtils.js";import{maxColorRampSize as z}from"../webgl-engine/shaders/colorRampParameters.js";import{breadthFirstBinaryPartitioning as j}from"../../../widgets/support/traversalUtils.js";let R=class extends V{constructor(e){super(e),this.type="shadow-cast-view-3d",this.analysis=null,this._updatingHandles=new D,this._stopPreviewingTask=null,this._updatedRecently=!1,this._tooltip=null,this._previousVolume=null}initialize(){this.addHandles([U(this.view,this),p(()=>({dependencies:this._previewDependencies,sceneUpdating:this._sceneUpdating}),()=>{n(this._stopPreviewingTask),this._updatedRecently=!0,this._stopPreviewingTask=s(async e=>{await l(B,e),u(e),this._updatedRecently=!1})},{sync:!0,initial:!0,equals:(e,t)=>H(e.dependencies,t.dependencies)&&(e.sceneUpdating===t.sceneUpdating||!e.sceneUpdating)}),p(()=>({renderer:this._renderer,visible:this.visible}),({renderer:e,visible:t})=>{t&&T(this.view,this),e?.setParameters({shadowCast:{enabled:t}})},d),p(()=>({renderer:this._renderer,parameters:this._visualizationParameters,visible:this.visible}),({renderer:e,parameters:t,visible:i})=>{L(e,i,t)},d),p(()=>({renderer:this._renderer,lightDirections:this._lightDirections,lightDirectionsContext:this._lightDirectionsContext,visible:this.visible}),({renderer:e,lightDirections:t,lightDirectionsContext:i,visible:s})=>{L(e,s,{lightDirections:t,lightDirectionsContext:i})},d),p(()=>({renderer:this._renderer,previewing:this._previewing,visible:this.visible}),({renderer:e,previewing:t,visible:i})=>{L(e,i,{previewing:t})},d),p(()=>({analysisVolume:this._analysisVolume,renderer:this._renderer,visible:this.visible}),({renderer:e,visible:t,analysisVolume:i})=>{L(e,t,{analysisVolume:i})},d)]),this.interactive=!0,this._tooltip=new P({getDuration:this.getDurationAtScreen.bind(this),getVisualizeSunlight:()=>this.analysis.visualizeSunlight,isVisible:()=>this.interactive&&this.visible,view:this.view})}destroy(){this.visible&&L(this._renderer,!0,{enabled:!1}),this._tooltip=o(this._tooltip),this._stopPreviewingTask=n(this._stopPreviewingTask),this._updatingHandles=o(this._updatingHandles)}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get updating(){return this._previewing||null!=this._stopPreviewingTask&&!this._stopPreviewingTask.finished||!0===this._tooltip?.updating||this._updatingHandles.updating}get visible(){return super.visible}set visible(e){super.visible=e}get _previewing(){return this._updatedRecently||this._sceneUpdating}get _sceneUpdating(){const{view:e}=this;if(null==e?.allLayerViews)return!0;const{stationary:t,graphicsView:i}=e;return!t||this._shadowLayerViews.some(e=>e.updating)||!i?.suspended&&!!i?.updating}get _effectiveUtcOffset(){return this.analysis.utcOffset??this._utcOffsetAuto}get _utcOffsetAuto(){const e=this._referencePosition;return null!=e?S(e[0],!1):0}get _dateUTCOffset(){let e=this.analysis.date;return e=g(e,-e.getTimezoneOffset(),"minutes"),e=g(e,-this._effectiveUtcOffset,"hours"),e}get _startDateTimeUTC(){return g(this._dateUTCOffset,this.analysis.startTimeOfDay)}get _endDateTimeUTC(){return g(this._dateUTCOffset,this.analysis.endTimeOfDay)}get _referencePosition(){return this.view?.environmentManager?.referencePositionGeographic}get _totalDurationInterval(){return this._totalDuration>0?Math.floor(this._totalDuration/(M-1)):M}get _interval(){const e=this._totalDurationInterval;switch(this.analysis.mode){case"min-duration":return this._totalDuration>0?e:0;case"total-duration":return e;case"discrete":return this.analysis.discreteOptions.interval||e}}get _intervalContext(){const{mode:e,minDurationOptions:t}=this.analysis;return"min-duration"===e&&t.contextEnabled?t.contextOptions.interval||this._totalDurationInterval:-1}get _totalDurationSampleCount(){return this._lightDirections.length}get _totalDuration(){const{startTimeOfDay:e,endTimeOfDay:t}=this.analysis;return t-e}get _lightDirections(){return this._calculateLightDirections(this._interval)}get _lightDirectionsContext(){return this._calculateLightDirections(this._intervalContext)}_calculateLightDirections(e){const{view:t}=this;if(e<=0)return[];const i="global"===t.viewingMode?I:this._referencePosition;if(null==i)return[];const s=x(this._startDateTimeUTC,this._endDateTimeUTC,e,i,t.state.viewingMode,M),r=s.length;q.length=0;const a=j(0,r,q),n=new Array(r);for(let o=0;o<r;++o)n[o]=s[a[o]];return n}get _analysisVolume(){const{geometry:e}=this.analysis;if(null==e)return this._previousVolume=null,null;try{const t=b(e,this.view,F);return null==t?(this._previousVolume=null,null):c(t)?(this._updatingHandles.consumePromise(t),this._previousVolume):(this._previousVolume=t,t)}catch(t){return a.getLogger(this).error(new r("shadowcastanalysisview3d:projection-failed","Failed to project analysis area geometry to view spatial reference",{geometry:e,error:t})),null}}get _visualizationParameters(){if(!this.visible)return null;switch(this.analysis.mode){case"min-duration":return this._minDurationVisualizationParameters;case"total-duration":return this._durationVisualizationParameters;case"discrete":return this._discreteVisualizationParameters}}get _minDurationVisualizationParameters(){const{color:e,minDuration:t}=this.analysis.minDurationOptions,i=this._totalDuration;return{visualization:2,thresholdColor:e.toUnitRGBA(),threshold:i>0?t/this._totalDuration:0,thresholdRendersSunlight:this.analysis.visualizeSunlight,...this._minDurationContextVisualizationParameters}}get _minDurationContextVisualizationParameters(){const{minDurationOptions:e}=this.analysis;return e.contextEnabled?{visualization:3,gradientColorRamp:this._getEffectiveShadowCastColorRamp(e.contextOptions.color,e.contextOptions.colorStops,1/this._lightDirectionsContext.length,this.analysis.visualizeSunlight)}:{}}get _durationVisualizationParameters(){const{color:e,colorStops:t,mode:i}=this.analysis.totalDurationOptions,s=this._totalDuration,r=s>0&&"hourly"===i?G/s:0,a=this._getEffectiveShadowCastColorRamp(e,t,1/s,this.analysis.visualizeSunlight);return 0===r?{...this._discreteVisualizationParameters,gradientColorRamp:a}:{bandedGradientColorRamp:a,visualization:1,bandSize:r}}get _discreteVisualizationParameters(){const{color:e,colorStops:t}=this.analysis.discreteOptions;return{gradientColorRamp:this._getEffectiveShadowCastColorRamp(e,t,1/this._lightDirections.length,this.analysis.visualizeSunlight),visualization:0}}get _shadowLayerViews(){return this.view.allLayerViews.items.filter(k)}get _previewDependencies(){const{view:e}=this,i=e.slice.plane,s=this._shadowLayerViews,r=s.map(e=>e.layer).filter(t),a=s.map(e=>e.suspended),n=r.map(e=>e.visible),o=r.map(e=>e.opacity),l=!!e.graphicsView?.suspended,u=r.filter(e=>"definitionExpression"in e).map(e=>e.definitionExpression),c=s.filter(e=>"filter"in e).map(e=>e.filter);return{slicePlane:i,startDateUTC:this._startDateTimeUTC,endDateUTC:this._endDateTimeUTC,layerViewSuspended:a,graphicsViewSuspended:l,layerVisibilities:n,layerOpacities:o,filters:c,definitionExpressions:u}}get _renderer(){return this.view?.stage?.renderer}get testData(){}async getDurationAtScreen(e){const{_renderer:t,_totalDurationSampleCount:i}=this;if(null==t||0===i)return 0;const s=this.view.state.camera.screenToRender(h(e.x,e.y),m()),r=t.readAccumulatedShadow(s);return(this.analysis.visualizeSunlight?1-r:r)*this._totalDuration}_getEffectiveShadowCastColorRamp(e,t,i,s){if(null!=t){t.length>z&&a.getLogger(this).warnOnce("ShadowCastAnalysis supports at most 8 color stops");const e=t.map(s?e=>[1-e.value*i,e.color.toUnitRGBA()]:e=>[e.value*i,e.color.toUnitRGBA()]);return e.sort(([e],[t])=>e-t),e}return E(e,s)}};e([y({readOnly:!0,type:["shadow-cast-view-3d"]})],R.prototype,"type",void 0),e([y({constructOnly:!0,nonNullable:!0})],R.prototype,"analysis",void 0),e([y({readOnly:!0})],R.prototype,"updating",null),e([y()],R.prototype,"_stopPreviewingTask",void 0),e([y()],R.prototype,"_updatedRecently",void 0),e([y()],R.prototype,"_tooltip",void 0),e([y()],R.prototype,"_sceneUpdating",null),e([y()],R.prototype,"_effectiveUtcOffset",null),e([y()],R.prototype,"_utcOffsetAuto",null),e([y()],R.prototype,"_dateUTCOffset",null),e([y()],R.prototype,"_startDateTimeUTC",null),e([y()],R.prototype,"_endDateTimeUTC",null),e([y()],R.prototype,"_referencePosition",null),e([y()],R.prototype,"_interval",null),e([y()],R.prototype,"_intervalContext",null),e([y()],R.prototype,"_totalDurationSampleCount",null),e([y()],R.prototype,"_totalDuration",null),e([y()],R.prototype,"_lightDirections",null),e([y()],R.prototype,"_lightDirectionsContext",null),e([y()],R.prototype,"_analysisVolume",null),e([y()],R.prototype,"_visualizationParameters",null),e([y()],R.prototype,"_minDurationVisualizationParameters",null),e([y()],R.prototype,"_minDurationContextVisualizationParameters",null),e([y()],R.prototype,"_durationVisualizationParameters",null),e([y()],R.prototype,"_discreteVisualizationParameters",null),e([y()],R.prototype,"_shadowLayerViews",null),e([y()],R.prototype,"_previewDependencies",null),e([y()],R.prototype,"_renderer",null),R=e([v("esri.views.3d.analysis.ShadowCastAnalysisView3D")],R);const A=R;function L(e,t,i){t&&null!=i&&e?.setParameters({shadowCast:i})}function E(e,t){const i=e.toUnitRGBA(),s=w(i[0],i[1],i[2],0),[r,a]=t?[i,s]:[s,i];return[[0,r],[1,a]]}function k(e){if(e.suspended)return!1;switch(e.type){case"building-scene-3d":case"csv-3d":case"elevation-3d":case"feature-3d":case"geojson-3d":case"integrated-mesh-3d":case"integrated-mesh-3dtiles":case"ogc-feature-3d":case"route-3d":case"scene-layer-3d":case"scene-layer-graphics-3d":case"stream-3d":case"wms-3d":case"catalog-footprint-3d":return!0;case"base-dynamic-3d":case"catalog-3d":case"catalog-dynamic-group-3d":case"dimension-3d":case"gaussian-splat-3d":case"imagery-3d":case"imagery-tile-3d":case"line-of-sight-3d":case"map-image-3d":case"point-cloud-3d":case"tile-3d":case"vector-tile-3d":case"viewshed-3d":case"voxel-3d":case"wfs-3d":case"wmts-3d":case"media-3d":case"group":default:return!1;case"graphics-3d":return e.layer.graphics.some(e=>{const{symbol:t}=e;return null==t||"text"!==t.type&&!("symbolLayers"in t)||"text"!==t.type&&t.symbolLayers.some(e=>"text"!==e.type)})}}function H(e,t){if(e===t)return!0;if(null==e&&null==t)return!0;if(null==e||null==t)return!1;const s=C(e.slicePlane,t.slicePlane),r=e.startDateUTC.valueOf()===t.startDateUTC.valueOf()&&e.endDateUTC.valueOf()===t.endDateUTC.valueOf(),a=i(e.layerViewSuspended,t.layerViewSuspended)&&e.graphicsViewSuspended===t.graphicsViewSuspended,n=i(e.layerVisibilities,t.layerVisibilities),o=i(e.layerOpacities,t.layerOpacities),l=i(e.filters,t.filters),u=i(e.definitionExpressions,t.definitionExpressions);return s&&r&&a&&n&&o&&l&&u}const G=_(1,"hours","milliseconds"),B=500,M=255,I=f(),q=[],F=new O;export{A as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import i from"../../../../analysis/SlicePlane.js";import t from"../../../../core/Accessor.js";import a from"../../../../core/Logger.js";import{watch as l,sync as s}from"../../../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import i from"../../../../analysis/SlicePlane.js";import t from"../../../../core/Accessor.js";import a from"../../../../core/Logger.js";import{watch as l,sync as s}from"../../../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{i as o}from"../../../../chunks/boundedPlane.js";import c from"../../../../layers/Layer.js";import h from"../../../../layers/buildingSublayers/BuildingComponentSublayer.js";import{isBuildingSceneLayerView3D as u,projectAndElevationAlignShape as d,projectedShapeToPlane as p,planeToShape as y}from"./sliceToolUtils.js";import{logFailedGeometryProjectionError as w}from"../support/projectionUtils.js";import{isTerrainSurfaceLayer as v}from"../../terrain/isTerrainSurfaceLayer.js";let f=class extends t{constructor(e){super(e),this._internalChange=!1,this._currentSlicePlane=null}initialize(){this.addHandles(this.analysis.excludedLayers.on("before-add",e=>{const i=e.item;null!=i&&(i instanceof c||i instanceof h)?i instanceof c&&v(i)?(a.getLogger(this).error("excludedLayers",`Layer '${i.title}, id:${i.id}' of type '${i.type}' can not be individually excluded from slicing. Use 'excludeGroundSurface' instead.`),e.preventDefault()):this.analysis.excludedLayers.includes(i)&&e.preventDefault():(a.getLogger(this).error("excludedLayers","Invalid layer type, layer must derive from Layer or BuildingComponentSublayer"),e.preventDefault())})),S(this.view,this),this.addHandles([l(()=>this.analysisViewData.plane,()=>{this._internalChange||this._updateSlicePlaneFromBoundedPlane(),this._updateLayerViews()},s),l(()=>this.analysis.excludeGroundSurface,()=>this._updateLayerViews(),s),this.analysis.excludedLayers.on("change",()=>this._updateLayerViews()),l(()=>[this.analysisViewData.active,this.analysisViewData.visible],()=>{this._updateActiveController(),this._updateViewSlicePlane(),this._updateViewSlicePlaneDecoration()},s),l(()=>this._allLayerAndSubLayerViews,()=>this._updateLayerViews())]),this.addHandles([l(()=>this.analysis.shape,()=>{this._internalChange||(this._updateBoundedPlaneFromSlicePlane(),this._updateViewSlicePlane())},s),l(()=>"web-scene"!==this.analysis.origin?.type,()=>this._updateViewSlicePlaneDecoration(),s)],"analysis"),this._updateActiveController(),this._updateBoundedPlaneFromSlicePlane(),this._updateViewSlicePlane(),this._updateViewSlicePlaneDecoration()}destroy(){this.analysisViewData.active&&(this.analysisViewData.active=!1,this.view.slice.plane=null,this._updateActiveController(),this._updateViewSlicePlane()),P(this.view,this),this.set("view",null)}get _allLayerAndSubLayerViews(){const e=this.view.allLayerViews.items;return e.concat(e.filter(u).flatMap(({sublayerViews:e})=>e.items))}_updateBoundedPlaneFromSlicePlane(){const e=this.analysis.shape,t=this._currentSlicePlane;if(null==t&&null==e||null!=t&&null!=e&&e.equals(t))return;let l=null,s=null;if(null!=e?.position){const t=e.position.spatialReference,n=d(e,this.view);null==n&&w(this.analysis,t,a.getLogger(this)),l=p(n,this.view,{tiltEnabled:this.analysis.tiltEnabled},o()),null!=l&&(s=new i({heading:e.heading,tilt:e.tilt,position:e.position,width:e.width,height:e.height}))}this._currentSlicePlane=s,this._internalChange=!0,this.analysisViewData.plane=l,this._internalChange=!1}_updateSlicePlaneFromBoundedPlane(){const e=this.analysisViewData.plane,t=y(e,this.view,this.view.spatialReference,new i);let a=null;null!=t&&(a=new i({heading:t.heading,tilt:t.tilt,position:t.position,width:t.width,height:t.height})),this._currentSlicePlane=a,this._internalChange=!0,this.analysis.shape=t,this._internalChange=!1,this._updateViewSlicePlane()}_updateActiveController(){if(V)return;const e=b(this.view);if(!e)return;if(this.analysisViewData.active)null!=e.activeController&&e.activeController!==this?(V=!0,e.activeController.analysisViewData.active=!1,V=!1):null!=e.activeController&&e.activeController,this._updateLayerViews(),e.activeController=this;else{if(null!=e.activeController&&e.activeController!==this)return;null!=e.activeController&&e.activeController===this&&(e.activeController=null,this._updateLayerViews())}}_updateViewSlicePlane(){_(this.view)}_updateViewSlicePlaneDecoration(){m(this.view)}_updateLayerViews(){const e=null!=this.analysisViewData.plane&&this.analysisViewData.visible&&this.analysisViewData.active,i=[],t=e=>{"layers"in e?e.layers.forEach(t):i.push(e)};this.analysis.excludedLayers.forEach(t),this.view.allLayerViews.forEach(t=>{t.destroyed||("slicePlaneEnabled"in t&&(t.slicePlaneEnabled=e&&!i.includes(t.layer)),"sublayerViews"in t&&t.sublayerViews.forEach(t=>{t.slicePlaneEnabled=e&&!i.includes(t.sublayer)}))}),null!=this.view.basemapTerrain&&(this.view.basemapTerrain.slicePlaneEnabled=e&&!this.analysis.excludeGroundSurface)}};e([n()],f.prototype,"view",void 0),e([n()],f.prototype,"analysis",void 0),e([n()],f.prototype,"analysisViewData",void 0),e([n()],f.prototype,"_allLayerAndSubLayerViews",null),f=e([r("esri.views.3d.analysis.Slice.SliceController")],f);const g=new Map;let V=!1;function _(e){const i=b(e),t=i?.activeController;null!=t?.analysisViewData.plane&&t.analysisViewData.visible?e.slice.plane=t.analysisViewData.plane:e.slice.plane=null}function m(e){const i=b(e),t=i?.activeController;e.slice.isDecoration="web-scene"!==t?.analysis.origin?.type}function S(e,i){g.has(e)||g.set(e,{all:[],activeController:null}),g.get(e)?.all.push(i)}function b(e){return g.get(e)}function P(e,i){if(!g.has(e))throw new Error("view expected in global slice register");const t=g.get(e),a=t?.all.lastIndexOf(i)??-1;if(!t||-1===a)throw new Error("controller expected in global slice register");t.all.splice(a,1),0===t.all.length&&g.delete(e)}export{f as SliceController};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../../analysis/SlicePlane.js";import{clock as i}from"../../../../core/clock.js";import{destroyMaybe as a,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as r,when as l,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../../core/scheduling.js";import{createScreenPoint as p,screenPointObjectToArray as u}from"../../../../core/screenUtils.js";import{property as c,subclass as d}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as _,fromScaling as v,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{dot as y,length as P,copy as w,scale as f,add as g,transformMat4 as M,normalize as V,set as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as T,create as D}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{clone as k,ZEROS as x}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{d as E,c as S,n as C,f as j}from"../../../../chunks/boundedPlane.js";import{signedDistance as H,create as R,intersectRay as z,getNormal as O}from"../../../../geometry/support/plane.js";import{create as G}from"../../../../geometry/support/ray.js";import{sv3d as U,sm4d as I,sv2d as K}from"../../../../geometry/support/vectorStacks.js";import{getSliceableContainer as A}from"../../../../graphic/getSliceableContainer.js";import{getRotateHeadingTexture as F,getTiltRotateTexture as B}from"../images/Factory.js";import{getOutlineColor as L,planeColor as q}from"./settings.js";import{pointerMoveTimerMs as N,planePreviewOutlineWidth as J,forceVerticalModifier as Q,forceHorizontalModifier as W,previewFadeDurationSeconds as X,previewFadeDotThreshold as Y,initialDepthOffsetFrac as Z}from"./sliceToolConfig.js";import{createGridVisualElement as $,createOutlineVisualElement as tt,planeToShape as et,createRotatePlane as it,resizePlane as at,calculatePlaneHalfSize as st,createPlane as nt,DidPointerMoveRecentlyFlag as rt,calculateBoundedPlaneTranslateRotate as lt,updateShiftRestartHandle as ot,updateRotateHeadingHandle as ht,updateRotateTiltHandle as pt,updateResizeHandle as ut,createShiftPlane as ct}from"./sliceToolUtils.js";import{calculateInputRotationTransform as dt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as _t}from"../../interactive/editingTools/dragEventPipeline3D.js";import{ResizeManipulator as vt}from"../../interactive/manipulators/ResizeManipulator.js";import{RotateManipulator as mt}from"../../interactive/manipulators/RotateManipulator.js";import{ShiftManipulator as yt}from"../../interactive/manipulators/ShiftManipulator.js";import{fromScreenNormalized as Pt}from"../../support/geometryUtils/ray.js";import{AnalysisToolBase as wt}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as ft}from"../../../interactive/dragEventPipeline.js";import{newToolIntersector as gt}from"../../../interactive/ToolIntersector.js";import{createScreenPointFromEvent as Mt}from"../../../support/screenUtils.js";var Vt;let bt=class extends wt{static{Vt=this}constructor(t){super(t),this._clock=i,this._previewPlaneOpacity=1,this.multiTouchEnabled=!1,this.removeIncompleteOnCancel=!1,this._mode="none",this.shiftManipulator=null,this.rotateHeadingManipulator=null,this.rotateTiltManipulator=null,this.resizeManipulators=null,this._frameTask=null,this._pointerMoveTimerMs=N,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=E(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=p(),this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._intersector=gt(t.view.state.viewingMode)}initialize(){if(null==this.analysis)throw new Error("SliceTool requires valid analysis, but null was provided.");const t=t=>{this._updateManipulatorsInteractive(t),t.grabbing||(null!=this.analysisViewData.plane&&S(this.analysisViewData.plane,this._startPlane),this.inputState=null)},e=new yt(this.view,1);this.shiftManipulator=e,this.manipulators.add(e),this.addHandles([this._createShiftDragPipeline(e),e.events.on("grab-changed",i=>{this._onShiftGrab(i),t(e)})]);const i=!this.view.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result,a=new mt(this.view,(t,e)=>F(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i}));this.rotateHeadingManipulator=a,this.manipulators.add(a),this.addHandles([this._createRotateHeadingDragPipeline(a),a.events.on("grab-changed",e=>{this._onRotateHeadingGrab(e),t(a)})]);const s=new mt(this.view,(t,e)=>B(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i}));this.rotateTiltManipulator=s,this.manipulators.add(s),this.addHandles([this._createRotateTiltDragPipeline(s),s.events.on("grab-changed",e=>{this._onRotateTiltGrab(e),t(s)})]),this.resizeManipulators=this._resizeHandles.map((e,i)=>{const a=new vt(this.view,e);return this.addHandles([this._createResizeDragPipeline(a),a.events.on("grab-changed",e=>{this._onResizeGrab(e,i),t(a)})]),a}),this.manipulators.addMany(this.resizeManipulators),this._previewPlaneGridVisualElement=$(this.view),this._previewPlaneOutlineVisualElement=tt(this.view),this._previewPlaneOutlineVisualElement.width=J,this.addHandles(n(()=>[this.analysisViewData.plane,this.analysis.tiltEnabled],()=>this._updateManipulators(),r)),this.addHandles([l(()=>"sliced"===this.state,()=>{this.finishToolCreation(),this.stop()},o),n(()=>this.view.state.camera,()=>this._onCameraChange())])}destroy(){this._removeFrameTask(),this._clearPointerMoveTimeout(),this._previewPlaneOutlineVisualElement=a(this._previewPlaneOutlineVisualElement),this._previewPlaneGridVisualElement=a(this._previewPlaneGridVisualElement)}get state(){const t=!!this.analysisViewData.plane,e=!!this.inputState;return t?t&&e?"slicing":t&&!e?"sliced":"ready":"ready"}get cursor(){return this.active&&(this._placingSlicePlane||"exclude"===this.mode)?"crosshair":null}set analysis(t){if(null==t)throw new Error("SliceTool requires valid analysis, but null was provided.");this.removeHandles("analysis"),this._set("analysis",t)}get mode(){return this._mode}static{this.disableEngineLayers=!1}get inputState(){return this._get("inputState")}set inputState(t){this._set("inputState",t),this.analysisViewData.showGrid=null!=t&&"resize"===t.type,this._updateMaterials()}get _placingSlicePlane(){return this.active&&!this.inputState&&"place"===this._mode}start(t){this._finishToolCreationIfValid(),this._mode=t,this.active||(this.view.activeTool=this)}stop(){this.active&&(this.view.activeTool=null)}onActivate(){this._finishToolCreationIfValid(),"none"===this._mode&&null==this.analysisViewData.plane&&(this._mode="place")}onDeactivate(){this._mode="none",this._updatePreviewPlane(null)}onShow(){this._updateVisibility(!0)}onHide(){this._updateVisibility(!1)}_updateVisibility(t){this._updateManipulators(),t||this._clearPointerMoveTimeout()}onInputEvent(t){switch(t.type){case"pointer-move":this._onPointerMove(t);break;case"immediate-click":if(!Dt(t))return;"exclude"===this._mode?t.defer(async()=>{await this._onClickExcludeLayer(t)&&t.stopPropagation()}):this._onClickPlacePlane(t)&&t.stopPropagation();break;case"drag":this.inputState&&t.stopPropagation();break;case"key-down":this._onKeyDown(t)&&t.stopPropagation();break;case"key-up":this._onKeyUp(t)&&t.stopPropagation()}}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}_onPointerMove(t){this._lastCursorPosition.x=t.x,this._lastCursorPosition.y=t.y,this._resetPointerMoveTimeout(),"touch"!==t.pointerType&&this._updatePreviewPlane(Mt(t),this._activeKeyModifiers)}_onCameraChange(){this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),this._updateManipulators()}_onClickPlacePlane(t){if(!this._placingSlicePlane)return!1;const i=Mt(t),a=E();return!!this._pickPlane(i,!1,this._activeKeyModifiers,a)&&(S(a,this._startPlane),this.analysis.shape=et(a,this.view,this.view.spatialReference,new e),this.stop(),!0)}async _onClickExcludeLayer(t){if("exclude"!==this.mode)return!1;const e=await this.view.hitTest(Mt(t)),i=e.results.at(0);if(i){const t=("graphic"===i.type?A(i.graphic.origin)??i.graphic.sourceLayer??null:null)??i.layer;t&&"subtype-sublayer"!==t.type&&this.analysis.excludedLayers.push(t)}else e.ground.layer?this.analysis.excludedLayers.push(e.ground.layer):this.analysis.excludeGroundSurface=!0;return this.stop(),!0}_onKeyDown(t){return(t.key===Q||t.key===W)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==Q&&t.key!==W||!this._activeKeyModifiers[t.key])&&(delete this._activeKeyModifiers[t.key],null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onShiftGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=Pt(this.view.state.camera,t.screenPoint,xt);S(this.analysisViewData.plane,this._startPlane),this.inputState=Tt(e,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.shiftPlane)).next(this._shiftDragAdjustSensitivity(a)).next(this._shiftDragUpdatePlane(a)),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_shiftDragAdjustSensitivity(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=.001,a=Math.min((1-Math.abs(y(C(this.analysisViewData.plane),e.ray.direction)/P(e.ray.direction)))/i,1),s=-H(this._startPlane.plane,e.renderEnd),n=-H(this._startPlane.plane,t.startPoint);return t.depth=t.depth*(1-a)+s*a-n,e}}_shiftDragUpdatePlane(t){return()=>{if(null==this.analysisViewData.plane)return;const e=w(U.get(),this._startPlane.origin),i=w(U.get(),C(this._startPlane));f(i,i,-t.depth),g(i,i,e);const a=j(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,E());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,1,R()),i=Pt(this.view.state.camera,t.screenPoint,xt),a=D();z(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_onRotateTiltGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,2,R()),i=Pt(this.view.state.camera,t.screenPoint,xt),a=D();z(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_rotateDragRenderPlaneToRotate(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=O(t.rotatePlane),a=dt(t.startPoint,e.renderEnd,this.analysisViewData.plane.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdatePlaneFromRotate(){return t=>{if(null==this.analysisViewData.plane)return;const e=_(I.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=M(U.get(),this._startPlane.basis1,e),a=M(U.get(),this._startPlane.basis2,e),s=j(this.analysisViewData.plane.origin,i,a,E());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=Pt(this.view.state.camera,t.screenPoint,xt),a=U.get();z(this.analysisViewData.plane.plane,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:T(a)})}_createResizeDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=S(this.analysisViewData.plane,E());e.next(_t(this.view,this.analysisViewData.plane.plane)).next(this._resizeDragUpdatePlane(a)),i.next(()=>{this._updateBoundedPlane(s)})})}_resizeDragUpdatePlane(t){return e=>{if(null==this.analysisViewData.plane)return;const i=this._resizeHandles[t.activeHandleIdx],a=at(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,S(this.analysisViewData.plane));this._updateBoundedPlane(a)}}_updateBoundedPlane(t){const e=this.analysisViewData;if(null==e)throw new Error("valid internal object expected");e.plane=t}_updatePreviewPlane(t,e={}){if("exclude"===this.mode)return;let i=this._previewPlane;if(this._previewPlane=null,null==t)return this._removeFrameTask(),void this._updateManipulators();if(this.active){const a=null!=i?i:E();if(i=null!=i?S(i,kt):null,this._pickPlane(t,!0,e,a)){const t=Y;let e=!1;null!=i&&(e=y(O(i.plane),O(a.plane))<t||y(V(U.get(),i.basis1),V(U.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=h({update:({deltaTime:t})=>{this._previewPlaneOpacity=Math.min(this._previewPlaneOpacity+t/(1e3*X),1),this._updateManipulators(),1===this._previewPlaneOpacity&&this._removeFrameTask()}}):null==this._previewPlane&&null!=this._frameTask?this._removeFrameTask():null!=this._previewPlane&&this._updateManipulators()}_removeFrameTask(){this._frameTask=s(this._frameTask)}_pickMinResult(t){const e=u(t,K.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=U.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(U.get()),l=this.view.state.camera;y(r,l.viewForward)>0&&f(r,r,-1);const o=st(n,l),h=(e?1:-1)*o*Z,p=f(U.get(),r,h);g(p,p,n);const u=this.analysis.tiltEnabled?3:0,c=i[Q]?2:i[W]?1:u;return nt(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=s(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=rt,this.rotateHeadingManipulator.state|=rt,this.rotateTiltManipulator.state|=rt,this._prevPointerMoveTimeout=this._clock.setTimeout(()=>{this.shiftManipulator.state&=~rt,this.rotateHeadingManipulator.state&=~rt,this.rotateTiltManipulator.state&=~rt},this._pointerMoveTimerMs)}_updateManipulators(){if(Vt.disableEngineLayers)return;let t,e,i=!1;if(null!=this.analysisViewData.plane)t=this.analysisViewData.plane,e=this._previewPlane??t,i=!1;else{if(null==this._previewPlane)return this._setManipulatorVisibility(!1),void this._setPreviewPlaneVisibility(!1);e=t=this._previewPlane,i=!0}if(this._setManipulatorVisibility(!i),!i){const e=lt(t,I.get());ot(this.shiftManipulator,e,t,this.view.state.camera),ht(this.rotateHeadingManipulator,e,t,this.view.renderCoordsHelper),pt(this.rotateTiltManipulator,e,t),this.resizeManipulators.forEach((i,a)=>ut(i,this._resizeHandles[a],e,t))}this._setPreviewPlaneVisibility(i||"place"===this._mode),this._updatePreviewPlaneTransform(e),this._updateMaterials()}_setManipulatorVisibility(t){this.shiftManipulator.available=t,this.rotateHeadingManipulator.available=t,this.rotateTiltManipulator.available=t&&this.analysis.tiltEnabled,this.resizeManipulators.forEach(e=>e.available=t)}_updatePreviewPlaneTransform(t){const e=lt(t,I.get()),i=b(U.get(),P(t.basis1),P(t.basis2),1),a=v(I.get(),i),s=m(a,e,a);this._previewPlaneOutlineVisualElement.transform=s,this._previewPlaneGridVisualElement.transform=s}_setPreviewPlaneVisibility(t){const e=this._previewPlaneOutlineVisualElement,i=this._previewPlaneGridVisualElement;t&&(e.attached=!0,i.attached=!0),e.visible=t,i.visible=t}_updateMaterials(){const t=L(this.view.effectiveTheme);t[3]*=this._previewPlaneOpacity;const e=k(q);e[3]*=this._previewPlaneOpacity,this._previewPlaneOutlineVisualElement.color=t,this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=x}_updateManipulatorsInteractive(t){if(!t.grabbing)return this.shiftManipulator.interactive=!0,this.rotateHeadingManipulator.interactive=!0,this.rotateTiltManipulator.interactive=!0,void this.resizeManipulators.forEach(t=>{t.interactive=!0});this.shiftManipulator.interactive=this.shiftManipulator===t,this.rotateHeadingManipulator.interactive=this.rotateHeadingManipulator===t,this.rotateTiltManipulator.interactive=this.rotateTiltManipulator===t,this.resizeManipulators.forEach(e=>{e.interactive=e===t})}_finishToolCreationIfValid(){this.analysis.valid&&this.finishToolCreation()}get test(){return{plane:this.analysisViewData.plane,setPointerMoveTimerMs:t=>{this._pointerMoveTimerMs=t}}}};function Tt(t,e,i){const a=ct(e,C(i),t.direction,R()),s=D();return z(a,t,s)?{type:"shift",shiftPlane:a,depth:0,startPoint:s}:null}function Dt(t){return"mouse"!==t.pointerType||0===t.button}t([c()],bt.prototype,"_clock",void 0),t([c({constructOnly:!0})],bt.prototype,"view",void 0),t([c()],bt.prototype,"analysisViewData",void 0),t([c({readOnly:!0})],bt.prototype,"state",null),t([c({readOnly:!0})],bt.prototype,"cursor",null),t([c()],bt.prototype,"analysis",null),t([c()],bt.prototype,"multiTouchEnabled",void 0),t([c()],bt.prototype,"removeIncompleteOnCancel",void 0),t([c()],bt.prototype,"_mode",void 0),t([c()],bt.prototype,"mode",null),t([c({value:null})],bt.prototype,"inputState",null),t([c()],bt.prototype,"_placingSlicePlane",null),bt=Vt=t([d("esri.views.3d.analysis.Slice.SliceTool")],bt);const kt=E(),xt=G();export{bt as default};
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../analysis/SlicePlane.js";import{clock as i}from"../../../../core/clock.js";import{destroyMaybe as a,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as r,when as l,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../../core/scheduling.js";import{createScreenPoint as p,screenPointObjectToArray as u}from"../../../../core/screenUtils.js";import{property as c,subclass as d}from"../../../../core/accessorSupport/decorators.js";import{fromRotation as _,fromScaling as v,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{dot as y,length as P,copy as w,scale as f,add as g,transformMat4 as M,normalize as V,set as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as T,create as D}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{clone as k,ZEROS as x}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{i as E,g as S,u as C,q as j}from"../../../../chunks/boundedPlane.js";import{signedDistance as H,create as R,intersectRay as z,getNormal as O}from"../../../../geometry/support/plane.js";import{create as G}from"../../../../geometry/support/ray.js";import{sv3d as U,sm4d as I,sv2d as K}from"../../../../geometry/support/vectorStacks.js";import{getSliceableContainer as A}from"../../../../graphic/getSliceableContainer.js";import{getRotateHeadingTexture as F,getTiltRotateTexture as B}from"../images/Factory.js";import{getOutlineColor as L,planeColor as q}from"./settings.js";import{pointerMoveTimerMs as N,planePreviewOutlineWidth as J,forceVerticalModifier as Q,forceHorizontalModifier as W,previewFadeDurationSeconds as X,previewFadeDotThreshold as Y,initialDepthOffsetFrac as Z}from"./sliceToolConfig.js";import{createGridVisualElement as $,createOutlineVisualElement as tt,planeToShape as et,createRotatePlane as it,resizePlane as at,calculatePlaneHalfSize as st,createPlane as nt,DidPointerMoveRecentlyFlag as rt,calculateBoundedPlaneTranslateRotate as lt,updateShiftRestartHandle as ot,updateRotateHeadingHandle as ht,updateRotateTiltHandle as pt,updateResizeHandle as ut,createShiftPlane as ct}from"./sliceToolUtils.js";import{calculateInputRotationTransform as dt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as _t}from"../../interactive/editingTools/dragEventPipeline3D.js";import{ResizeManipulator as vt}from"../../interactive/manipulators/ResizeManipulator.js";import{RotateManipulator as mt}from"../../interactive/manipulators/RotateManipulator.js";import{ShiftManipulator as yt}from"../../interactive/manipulators/ShiftManipulator.js";import{fromScreenNormalized as Pt}from"../../support/geometryUtils/ray.js";import{AnalysisToolBase as wt}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as ft}from"../../../interactive/dragEventPipeline.js";import{newToolIntersector as gt}from"../../../interactive/ToolIntersector.js";import{createScreenPointFromEvent as Mt}from"../../../support/screenUtils.js";var Vt;let bt=class extends wt{static{Vt=this}constructor(t){super(t),this._clock=i,this._previewPlaneOpacity=1,this.multiTouchEnabled=!1,this.removeIncompleteOnCancel=!1,this._mode="none",this.shiftManipulator=null,this.rotateHeadingManipulator=null,this.rotateTiltManipulator=null,this.resizeManipulators=null,this._frameTask=null,this._pointerMoveTimerMs=N,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=E(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=p(),this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._intersector=gt(t.view.state.viewingMode)}initialize(){if(null==this.analysis)throw new Error("SliceTool requires valid analysis, but null was provided.");const t=t=>{this._updateManipulatorsInteractive(t),t.grabbing||(null!=this.analysisViewData.plane&&S(this.analysisViewData.plane,this._startPlane),this.inputState=null)},e=new yt(this.view,1);this.shiftManipulator=e,this.manipulators.add(e),this.addHandles([this._createShiftDragPipeline(e),e.events.on("grab-changed",i=>{this._onShiftGrab(i),t(e)})]);const i=!this.view.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result,a=new mt(this.view,(t,e)=>F(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i}));this.rotateHeadingManipulator=a,this.manipulators.add(a),this.addHandles([this._createRotateHeadingDragPipeline(a),a.events.on("grab-changed",e=>{this._onRotateHeadingGrab(e),t(a)})]);const s=new mt(this.view,(t,e)=>B(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i}));this.rotateTiltManipulator=s,this.manipulators.add(s),this.addHandles([this._createRotateTiltDragPipeline(s),s.events.on("grab-changed",e=>{this._onRotateTiltGrab(e),t(s)})]),this.resizeManipulators=this._resizeHandles.map((e,i)=>{const a=new vt(this.view,e);return this.addHandles([this._createResizeDragPipeline(a),a.events.on("grab-changed",e=>{this._onResizeGrab(e,i),t(a)})]),a}),this.manipulators.addMany(this.resizeManipulators),this._previewPlaneGridVisualElement=$(this.view),this._previewPlaneOutlineVisualElement=tt(this.view),this._previewPlaneOutlineVisualElement.width=J,this.addHandles(n(()=>[this.analysisViewData.plane,this.analysis.tiltEnabled],()=>this._updateManipulators(),r)),this.addHandles([l(()=>"sliced"===this.state,()=>{this.finishToolCreation(),this.stop()},o),n(()=>this.view.state.camera,()=>this._onCameraChange())])}destroy(){this._removeFrameTask(),this._clearPointerMoveTimeout(),this._previewPlaneOutlineVisualElement=a(this._previewPlaneOutlineVisualElement),this._previewPlaneGridVisualElement=a(this._previewPlaneGridVisualElement)}get state(){const t=!!this.analysisViewData.plane,e=!!this.inputState;return t?t&&e?"slicing":t&&!e?"sliced":"ready":"ready"}get cursor(){return this.active&&(this._placingSlicePlane||"exclude"===this.mode)?"crosshair":null}set analysis(t){if(null==t)throw new Error("SliceTool requires valid analysis, but null was provided.");this.removeHandles("analysis"),this._set("analysis",t)}get mode(){return this._mode}static{this.disableEngineLayers=!1}get inputState(){return this._get("inputState")}set inputState(t){this._set("inputState",t),this.analysisViewData.showGrid=null!=t&&"resize"===t.type,this._updateMaterials()}get _placingSlicePlane(){return this.active&&!this.inputState&&"place"===this._mode}start(t){this._finishToolCreationIfValid(),this._mode=t,this.active||(this.view.activeTool=this)}stop(){this.active&&(this.view.activeTool=null)}onActivate(){this._finishToolCreationIfValid(),"none"===this._mode&&null==this.analysisViewData.plane&&(this._mode="place")}onDeactivate(){this._mode="none",this._updatePreviewPlane(null)}onShow(){this._updateVisibility(!0)}onHide(){this._updateVisibility(!1)}_updateVisibility(t){this._updateManipulators(),t||this._clearPointerMoveTimeout()}onInputEvent(t){switch(t.type){case"pointer-move":this._onPointerMove(t);break;case"immediate-click":if(!Dt(t))return;"exclude"===this._mode?t.defer(async()=>{await this._onClickExcludeLayer(t)&&t.stopPropagation()}):this._onClickPlacePlane(t)&&t.stopPropagation();break;case"drag":this.inputState&&t.stopPropagation();break;case"key-down":this._onKeyDown(t)&&t.stopPropagation();break;case"key-up":this._onKeyUp(t)&&t.stopPropagation()}}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}_onPointerMove(t){this._lastCursorPosition.x=t.x,this._lastCursorPosition.y=t.y,this._resetPointerMoveTimeout(),"touch"!==t.pointerType&&this._updatePreviewPlane(Mt(t),this._activeKeyModifiers)}_onCameraChange(){this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),this._updateManipulators()}_onClickPlacePlane(t){if(!this._placingSlicePlane)return!1;const i=Mt(t),a=E();return!!this._pickPlane(i,!1,this._activeKeyModifiers,a)&&(S(a,this._startPlane),this.analysis.shape=et(a,this.view,this.view.spatialReference,new e),this.stop(),!0)}async _onClickExcludeLayer(t){if("exclude"!==this.mode)return!1;const e=await this.view.hitTest(Mt(t)),i=e.results.at(0);if(i){const t=("graphic"===i.type?A(i.graphic.origin)??i.graphic.sourceLayer??null:null)??i.layer;t&&"subtype-sublayer"!==t.type&&this.analysis.excludedLayers.push(t)}else e.ground.layer?this.analysis.excludedLayers.push(e.ground.layer):this.analysis.excludeGroundSurface=!0;return this.stop(),!0}_onKeyDown(t){return(t.key===Q||t.key===W)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==Q&&t.key!==W||!this._activeKeyModifiers[t.key])&&(delete this._activeKeyModifiers[t.key],null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onShiftGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=Pt(this.view.state.camera,t.screenPoint,xt);S(this.analysisViewData.plane,this._startPlane),this.inputState=Tt(e,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.shiftPlane)).next(this._shiftDragAdjustSensitivity(a)).next(this._shiftDragUpdatePlane(a)),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_shiftDragAdjustSensitivity(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=.001,a=Math.min((1-Math.abs(y(C(this.analysisViewData.plane),e.ray.direction)/P(e.ray.direction)))/i,1),s=-H(this._startPlane.plane,e.renderEnd),n=-H(this._startPlane.plane,t.startPoint);return t.depth=t.depth*(1-a)+s*a-n,e}}_shiftDragUpdatePlane(t){return()=>{if(null==this.analysisViewData.plane)return;const e=w(U.get(),this._startPlane.origin),i=w(U.get(),C(this._startPlane));f(i,i,-t.depth),g(i,i,e);const a=j(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,E());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,1,R()),i=Pt(this.view.state.camera,t.screenPoint,xt),a=D();z(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_onRotateTiltGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=it(this.analysisViewData.plane,this.view.renderCoordsHelper,2,R()),i=Pt(this.view.state.camera,t.screenPoint,xt),a=D();z(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,E()):null;e.next(_t(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next(()=>{null!=s&&this._updateBoundedPlane(s)})})}_rotateDragRenderPlaneToRotate(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=O(t.rotatePlane),a=dt(t.startPoint,e.renderEnd,this.analysisViewData.plane.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdatePlaneFromRotate(){return t=>{if(null==this.analysisViewData.plane)return;const e=_(I.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=M(U.get(),this._startPlane.basis1,e),a=M(U.get(),this._startPlane.basis2,e),s=j(this.analysisViewData.plane.origin,i,a,E());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=Pt(this.view.state.camera,t.screenPoint,xt),a=U.get();z(this.analysisViewData.plane.plane,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:T(a)})}_createResizeDragPipeline(t){return ft(t,(t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=S(this.analysisViewData.plane,E());e.next(_t(this.view,this.analysisViewData.plane.plane)).next(this._resizeDragUpdatePlane(a)),i.next(()=>{this._updateBoundedPlane(s)})})}_resizeDragUpdatePlane(t){return e=>{if(null==this.analysisViewData.plane)return;const i=this._resizeHandles[t.activeHandleIdx],a=at(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,S(this.analysisViewData.plane));this._updateBoundedPlane(a)}}_updateBoundedPlane(t){const e=this.analysisViewData;if(null==e)throw new Error("valid internal object expected");e.plane=t}_updatePreviewPlane(t,e={}){if("exclude"===this.mode)return;let i=this._previewPlane;if(this._previewPlane=null,null==t)return this._removeFrameTask(),void this._updateManipulators();if(this.active){const a=null!=i?i:E();if(i=null!=i?S(i,kt):null,this._pickPlane(t,!0,e,a)){const t=Y;let e=!1;null!=i&&(e=y(O(i.plane),O(a.plane))<t||y(V(U.get(),i.basis1),V(U.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=h({update:({deltaTime:t})=>{this._previewPlaneOpacity=Math.min(this._previewPlaneOpacity+t/(1e3*X),1),this._updateManipulators(),1===this._previewPlaneOpacity&&this._removeFrameTask()}}):null==this._previewPlane&&null!=this._frameTask?this._removeFrameTask():null!=this._previewPlane&&this._updateManipulators()}_removeFrameTask(){this._frameTask=s(this._frameTask)}_pickMinResult(t){const e=u(t,K.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=U.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(U.get()),l=this.view.state.camera;y(r,l.viewForward)>0&&f(r,r,-1);const o=st(n,l),h=(e?1:-1)*o*Z,p=f(U.get(),r,h);g(p,p,n);const u=this.analysis.tiltEnabled?3:0,c=i[Q]?2:i[W]?1:u;return nt(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=s(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=rt,this.rotateHeadingManipulator.state|=rt,this.rotateTiltManipulator.state|=rt,this._prevPointerMoveTimeout=this._clock.setTimeout(()=>{this.shiftManipulator.state&=~rt,this.rotateHeadingManipulator.state&=~rt,this.rotateTiltManipulator.state&=~rt},this._pointerMoveTimerMs)}_updateManipulators(){if(Vt.disableEngineLayers)return;let t,e,i=!1;if(null!=this.analysisViewData.plane)t=this.analysisViewData.plane,e=this._previewPlane??t,i=!1;else{if(null==this._previewPlane)return this._setManipulatorVisibility(!1),void this._setPreviewPlaneVisibility(!1);e=t=this._previewPlane,i=!0}if(this._setManipulatorVisibility(!i),!i){const e=lt(t,I.get());ot(this.shiftManipulator,e,t,this.view.state.camera),ht(this.rotateHeadingManipulator,e,t,this.view.renderCoordsHelper),pt(this.rotateTiltManipulator,e,t),this.resizeManipulators.forEach((i,a)=>ut(i,this._resizeHandles[a],e,t))}this._setPreviewPlaneVisibility(i||"place"===this._mode),this._updatePreviewPlaneTransform(e),this._updateMaterials()}_setManipulatorVisibility(t){this.shiftManipulator.available=t,this.rotateHeadingManipulator.available=t,this.rotateTiltManipulator.available=t&&this.analysis.tiltEnabled,this.resizeManipulators.forEach(e=>e.available=t)}_updatePreviewPlaneTransform(t){const e=lt(t,I.get()),i=b(U.get(),P(t.basis1),P(t.basis2),1),a=v(I.get(),i),s=m(a,e,a);this._previewPlaneOutlineVisualElement.transform=s,this._previewPlaneGridVisualElement.transform=s}_setPreviewPlaneVisibility(t){const e=this._previewPlaneOutlineVisualElement,i=this._previewPlaneGridVisualElement;t&&(e.attached=!0,i.attached=!0),e.visible=t,i.visible=t}_updateMaterials(){const t=L(this.view.effectiveTheme);t[3]*=this._previewPlaneOpacity;const e=k(q);e[3]*=this._previewPlaneOpacity,this._previewPlaneOutlineVisualElement.color=t,this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=x}_updateManipulatorsInteractive(t){if(!t.grabbing)return this.shiftManipulator.interactive=!0,this.rotateHeadingManipulator.interactive=!0,this.rotateTiltManipulator.interactive=!0,void this.resizeManipulators.forEach(t=>{t.interactive=!0});this.shiftManipulator.interactive=this.shiftManipulator===t,this.rotateHeadingManipulator.interactive=this.rotateHeadingManipulator===t,this.rotateTiltManipulator.interactive=this.rotateTiltManipulator===t,this.resizeManipulators.forEach(e=>{e.interactive=e===t})}_finishToolCreationIfValid(){this.analysis.valid&&this.finishToolCreation()}get test(){return{plane:this.analysisViewData.plane,setPointerMoveTimerMs:t=>{this._pointerMoveTimerMs=t}}}};function Tt(t,e,i){const a=ct(e,C(i),t.direction,R()),s=D();return z(a,t,s)?{type:"shift",shiftPlane:a,depth:0,startPoint:s}:null}function Dt(t){return"mouse"!==t.pointerType||0===t.button}t([c()],bt.prototype,"_clock",void 0),t([c({constructOnly:!0})],bt.prototype,"view",void 0),t([c()],bt.prototype,"analysisViewData",void 0),t([c({readOnly:!0})],bt.prototype,"state",null),t([c({readOnly:!0})],bt.prototype,"cursor",null),t([c()],bt.prototype,"analysis",null),t([c()],bt.prototype,"multiTouchEnabled",void 0),t([c()],bt.prototype,"removeIncompleteOnCancel",void 0),t([c()],bt.prototype,"_mode",void 0),t([c()],bt.prototype,"mode",null),t([c({value:null})],bt.prototype,"inputState",null),t([c()],bt.prototype,"_placingSlicePlane",null),bt=Vt=t([d("esri.views.3d.analysis.Slice.SliceTool")],bt);const kt=E(),xt=G();export{bt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import i from"../../../../analysis/SlicePlane.js";import e from"../../../../core/Logger.js";import{rad2deg as t,deg2rad as n}from"../../../../core/mathUtils.js";import{castRenderScreenPointArray3 as o}from"../../../../core/screenUtils.js";import{fromZRotation as r,scale as s,multiply as a,rotateZ as c,rotateX as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{length as u,set as d,add as g,scale as m,copy as p,subtract as f,dot as b,normalize as h,cross as j,squaredLength as w,negate as v,sub as P}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as M,create as U}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import
|
|
2
|
+
import i from"../../../../analysis/SlicePlane.js";import e from"../../../../core/Logger.js";import{rad2deg as t,deg2rad as n}from"../../../../core/mathUtils.js";import{castRenderScreenPointArray3 as o}from"../../../../core/screenUtils.js";import{fromZRotation as r,scale as s,multiply as a,rotateZ as c,rotateX as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{length as u,set as d,add as g,scale as m,copy as p,subtract as f,dot as b,normalize as h,cross as j,squaredLength as w,negate as v,sub as P}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as M,create as U}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import x from"../../../../geometry/Extent.js";import y from"../../../../geometry/Point.js";import{tryProject as R}from"../../../../geometry/projectionUtils.js";import{i as S,x as C,u as T,C as A,q as k,s as L}from"../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as E,fromVectorsAndPoint as H}from"../../../../geometry/support/plane.js";import{create as I}from"../../../../geometry/support/ray.js";import{angleAroundAxis as z}from"../../../../geometry/support/vector.js";import{sv3d as F,sm4d as W}from"../../../../geometry/support/vectorStacks.js";import{planeColor as B,getGridColor as D,getOutlineColor as O}from"./settings.js";import{resizeHandleEdgePaddingFrac as V,planeOutlineWidth as q,planeMinBasisScreenLen2 as $,initialPlaneHalfSizeViewProportion as G,shiftRestartOffsetDistance as J,smallAngleDotThreshold as K,verticalDotThreshold as N}from"./sliceToolConfig.js";import{applyProjectionAndElevationAlignment as Q}from"../support/projectionUtils.js";import{calculateTranslateRotateFromBases as X}from"../../interactive/manipulatorUtils.js";import{LineVisualElement as Y}from"../../interactive/visualElements/LineVisualElement.js";import{SlicePlaneVisualElement as Z}from"../../interactive/visualElements/SlicePlaneVisualElement.js";import{RenderCoordsHelper as _}from"../../support/RenderCoordsHelper.js";import{fromRender as ii}from"../../support/geometryUtils/ray.js";function ei(i,e,t,n,o,r,s,a){return ni(e,s.worldUpAtPosition(i,F.get()),o,r,a.basis1,a.basis2),m(a.basis1,a.basis1,t),m(a.basis2,a.basis2,n),p(a.origin,i),H(a.basis2,a.basis1,a.origin,a.plane),a}const ti=U();function ni(i,e,t,n,o,r){const s=b(i,e),a=F.get(),c=F.get();switch(0===n?Math.abs(s)>N?1:2:n){case 2:{const n=Math.abs(s)<=K?i:v(ti,t.viewUp);j(a,e,n),p(c,e);break}case 1:j(a,t.viewUp,e),j(c,e,a);break;case 3:{const n=Math.abs(s)<=K?e:t.viewUp;j(a,n,i),j(c,i,a);break}}const l=j(F.get(),a,c);b(l,t.viewForward)>0&&m(c,c,-1),h(o,a),h(r,c)}function oi(i,e,t){const n=e.worldUpAtPosition(i.origin,F.get()),o=i.basis1,r=xi(i,n),s=Math.round(r/Li)*Li;return C(i,s-r,o,t)}function ri(i,e,t,n,o,r){const s=p(F.get(),o.origin);g(s,s,m(F.get(),o.basis1,i.direction[0]<0?1:-1)),g(s,s,m(F.get(),o.basis2,i.direction[1]<0?1:-1));const a=u(o.basis1),c=u(o.basis2),l=f(F.get(),t,s),d=f(F.get(),e,s);let h=0,j=0;if(wi(i)){const e=ji(o),t=ji(r);h=a-.5*i.direction[0]*b(o.basis1,d)/a,j=c-.5*i.direction[1]*b(o.basis2,d)/c;const n=t/e;h*=n,j*=n}const w=h+.5*i.direction[0]*b(o.basis1,l)/a,v=j+.5*i.direction[1]*b(o.basis2,l)/c,P=m(F.get(),o.basis1,w/a),M=m(F.get(),o.basis2,v/c);(w<=0||bi(r.origin,P,n)<=$)&&p(P,r.basis1),(v<=0||bi(r.origin,M,n)<=$)&&p(M,r.basis2);const U=p(F.get(),s);return g(U,U,m(F.get(),P,i.direction[0]<0?-1:1)),g(U,U,m(F.get(),M,i.direction[1]<0?-1:1)),k(U,P,M,r)}function si(i,e){return G*Math.min(e.width,e.height)*e.computeRenderPixelSizeAt(i)}function ai(i,e,t,n){const o=j(F.get(),e,t);return j(o,o,e),E(i,o,n)}function ci(i,e){return X(i.basis1,i.basis2,i.origin,e)}function li(i,e,t,n){const o=e.worldUpAtPosition(i.origin,F.get()),r=F.get();switch(t){case 1:p(r,o);break;case 2:p(r,i.basis1)}return E(i.origin,r,n)}function ui(i,e,t,n){const r=fi(t,2),s=W.get();c(s,e,r.edge*Math.PI/2);const a=h(F.get(),r.basis);let l=m(F.get(),a,r.direction*n.computeScreenPixelSizeAt(r.position)*J);g(l,l,r.position);const u=n.projectToRenderScreen(l,o(F.get())),d=di(n,u);ii(n,u,ki),h(ki.direction,ki.direction);const p=F.get();!d&&L(t,ki,p)&&(l=p),s[12]=0,s[13]=0,s[14]=0,i.modelTransform=s,i.renderLocation=M(l),d?i.state|=Ai:i.state&=~Ai}function di(i,e){if(null==e)return!1;const[t,n,o,r]=i.viewport,s=Math.min(o,r)/16;let a=!0;return e[0]<t+s?(e[0]=t+s,a=!1):e[0]>t+o-s&&(e[0]=t+o-s,a=!1),e[1]<n+s?(e[1]=n+s,a=!1):e[1]>n+r-s&&(e[1]=n+r-s,a=!1),a}function gi(i,e,t,n){const o=u(n.basis1),c=u(n.basis2),l=hi(n),p=ji(n),f=d(F.get(),0,0,0);g(f,m(F.get(),n.basis1,e.direction[0]),m(F.get(),n.basis2,e.direction[1])),g(f,n.origin,f);let b=0,h=1;if(wi(e))1===e.direction[0]&&-1===e.direction[1]?b=Li:1===e.direction[0]&&1===e.direction[1]?b=Math.PI:-1===e.direction[0]&&1===e.direction[1]&&(b=3*Math.PI/2),h=p;else{const i=0!==e.direction[0]?1:2;b=1===i?Li:0,h=(1===i?c:o)-l}const j=r(W.get(),b);s(j,j,d(F.get(),h,h,h)),a(j,t,j),j[12]=0,j[13]=0,j[14]=0,i.modelTransform=j,i.renderLocation=f}function mi(i,e,t,n){const o=n.worldUpAtPosition(t.origin,F.get()),s=fi(t,0),c=r(W.get(),s.edge*Math.PI/2);l(c,c,-xi(t,o)),a(c,e,c),c[12]=0,c[13]=0,c[14]=0,i.modelTransform=c,i.renderLocation=s.position}function pi(i,e,t){const n=fi(t,1),o=r(W.get(),n.edge*Math.PI/2);l(o,o,Li),a(o,e,o),o[12]=0,o[13]=0,o[14]=0,i.modelTransform=o,i.renderLocation=n.position}function fi(i,e){switch(e){case 0:return{basis:i.basis1,direction:1,position:g(F.get(),i.origin,i.basis1),edge:e};case 1:return{basis:i.basis2,direction:1,position:g(F.get(),i.origin,i.basis2),edge:e};case 2:return{basis:i.basis1,direction:-1,position:f(F.get(),i.origin,i.basis1),edge:e};case 3:return{basis:i.basis2,direction:-1,position:f(F.get(),i.origin,i.basis2),edge:e}}}function bi(i,e,t){const n=t.projectToRenderScreen(g(F.get(),i,e),o(F.get())),r=t.projectToRenderScreen(f(F.get(),i,e),o(F.get()));return n&&r?w(f(n,n,r)):0}function hi(i){const e=u(i.basis1),t=u(i.basis2);return V*Math.min(e,t)}function ji(i){return hi(i)}function wi(i){return 0!==i.direction[0]&&0!==i.direction[1]}function vi(i){const e=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new Y({view:i,attached:!1,color:O(i.effectiveTheme),width:q,renderOccluded:4,geometry:[e],isDecoration:!0})}function Pi(i){return new Z({view:i,attached:!1,backgroundColor:B,gridColor:D(i.effectiveTheme),gridWidth:4,renderOccluded:4,isDecoration:!0})}function Mi(e,n,o,r=new i){if(null==e)return null;const{renderCoordsHelper:s}=n,a=s.fromRenderCoords(e.origin,new y({spatialReference:n.spatialReference}));if(null==a)return null;const c=R(a,o);if(null==c)return null;r.position=c;const l=2*u(e.basis1),d=2*u(e.basis2),g=_.renderUnitScaleFactor(n.spatialReference,o);r.width=l*g,r.height=d*g;const m=s.worldUpAtPosition(e.origin,F.get());return r.tilt=t(xi(e,m)),r.heading=s.headingAtPosition(e.origin,e.basis1)-90,r}function Ui(i,e,t){if(null==i)return null;const n=i.origin,o=F.get(),r=F.get(),s=F.get(),a=F.get();let c,l,u,d,m,p;g(o,n,i.basis1),g(o,o,i.basis2),g(r,n,i.basis1),P(r,r,i.basis2),P(s,n,i.basis1),P(s,s,i.basis2),P(a,n,i.basis1),g(a,a,i.basis2);for(const g of[o,r,s,a]){const i=e.fromRenderCoords(g,g,t);if(null==i)return null;c=null==c?i[0]:Math.min(c,i[0]),l=null==l?i[0]:Math.max(l,i[0]),u=null==u?i[1]:Math.min(u,i[1]),d=null==d?i[1]:Math.max(d,i[1]),m=null==m?i[2]:Math.min(m,i[2]),p=null==p?i[2]:Math.max(p,i[2])}return new x({xmin:c,xmax:l,ymin:u,ymax:d,zmin:m,zmax:p,spatialReference:t})}function xi(i,e){return z(e,i.basis2,i.basis1)+Li}function yi(i,t,o,r,s,a,c=S()){return a.toRenderCoords(i,c.origin)?(a.worldBasisAtPosition(c.origin,0,c.basis1),a.worldBasisAtPosition(c.origin,1,c.basis2),H(c.basis2,c.basis1,c.origin,c.plane),C(c,-n(t),T(c),c),C(c,n(o),c.basis1,c),m(c.basis1,c.basis1,r/2),m(c.basis2,c.basis2,s/2),A(c),c):(e.getLogger("esri.views.3d.analysis.Slice.sliceToolUtils").error(`Failed to project slice plane position, projection from ${i.spatialReference.wkid} is not supported`),null)}function Ri(i,e){if(null==i?.position)return null;const t=Q(i.position,e.spatialReference,e.elevationProvider);if(null==t)return null;const n=_.renderUnitScaleFactor(i.position.spatialReference,e.spatialReference),o=i.width*n,r=i.height*n;return{position:t,heading:i.heading,tilt:i.tilt,renderWidth:o,renderHeight:r}}function Si(i,e,t,n=S()){const o=Ri(i,e);return null==o?null:Ci(o,e,t,n)}function Ci(i,e,t,n=S()){if(null==i)return null;const o=yi(i.position,i.heading,i.tilt,i.renderWidth,i.renderHeight,e.renderCoordsHelper,n);return t.tiltEnabled||null==o||oi(o,e.renderCoordsHelper,o),o}const Ti=16,Ai=32,ki=I(),Li=Math.PI/2,Ei=16,Hi=32;function Ii(i){return null!=("building-scene-3d"===i.type?i:null)}export{Ti as DidPointerMoveRecentlyFlag,Ai as IsShiftEdgeOnScreenFlag,ci as calculateBoundedPlaneTranslateRotate,ji as calculateDiagonalResizeHandleScale,si as calculatePlaneHalfSize,Pi as createGridVisualElement,vi as createOutlineVisualElement,ei as createPlane,li as createRotatePlane,ai as createShiftPlane,oi as forceHorizontalOrVertical,Ii as isBuildingSceneLayerView3D,wi as isDiagonalResizeHandle,ni as normalToBases,Ui as planeToExtent,Mi as planeToShape,Ri as projectAndElevationAlignShape,Ci as projectedShapeToPlane,Ei as resizeNormal,Hi as resizeOutlineOnly,ri as resizePlane,Si as shapeToPlane,gi as updateResizeHandle,mi as updateRotateHeadingHandle,pi as updateRotateTiltHandle,ui as updateShiftRestartHandle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../../../../core/Handles.js";import{handlesGroup as e}from"../../../../core/handleUtils.js";import{deg2rad as r,clamp as i}from"../../../../core/mathUtils.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{fromYRotation as s,fromXRotation as l,fromScaling as c,fromZRotation as u,fromRotation as p,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as d,sub as f,scale as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _,fromValues as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{
|
|
2
|
+
import t from"../../../../core/Handles.js";import{handlesGroup as e}from"../../../../core/handleUtils.js";import{deg2rad as r,clamp as i}from"../../../../core/mathUtils.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{watch as o,initial as n}from"../../../../core/reactiveUtils.js";import{fromYRotation as s,fromXRotation as l,fromScaling as c,fromZRotation as u,fromRotation as p,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as d,sub as f,scale as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _,fromValues as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{q as b}from"../../../../chunks/boundedPlane.js";import{viewshedToolManipulatorConfiguration as v}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as j,screenToCircleAngle as w}from"./viewshedToolUtils.js";import{Manipulator3D as A}from"../../interactive/Manipulator3D.js";import{RenderObject as V}from"../../interactive/RenderObject.js";import{InteractiveManipulation as O}from"../../interactive/editingTools/manipulations/InteractiveManipulation.js";import{createPolylineGeometry as E}from"../../webgl-engine/lib/GeometryUtil.js";import{assert as T}from"../../webgl-engine/lib/Util.js";import{RibbonLineMaterial as y}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{createManipulatorDragEventPipeline as R}from"../../../interactive/dragEventPipeline.js";class U extends O{constructor(e){super(),this._handles=new t,this._tool=e.tool,this._view=e.view,this._focusedArcMaterial=this._createArcMaterial(!0),this._unfocusedArcMaterial=this._createArcMaterial(!1),this._createManipulators(),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles=a(this._handles),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._tool=null,this._view=null,this._manipulators=null}createDragPipeline(t,r){const i=Object.values(this._manipulators);return e(i.map(({manipulator:e,side:i})=>R(e,(e,a,o,n,s)=>{const l=G(i,r),c=a.next(t=>({...t,manipulatorType:2,side:i})),u=w(c,this._view,l,r);t(e,u,o)})))}updateManipulatorsTransform(t){t.arcCentersPoints(q),this._forEachManipulatorInfo(e=>this._updateArcManipulatorTransform(e,t,q[e.side]))}updateManipulatorVisuals(t){this._forEachManipulatorInfo(e=>this._updateArcManipulatorVisuals(e,t))}_updateArcManipulatorVisuals({manipulator:t,side:e},r){const i=[];if(null!=r){const[a,o]=x(e,r,this._unfocusedArcMaterial);i.push(new V(a,1),new V(a.instantiate({material:this._focusedArcMaterial}),2)),t.collisionType={type:"line",paths:[o]}}t.renderObjects=i,t.radius=v.collisionRadius}_updateArcManipulatorTransform({manipulator:t,side:e},i,a){const o=i.horizontalFieldOfView,n=r(i.verticalFieldOfView/2),f=r(o/2),g=F(e);t.renderLocation=a;const _=h(),M=t=>{m(_,t,_)};M(s(C,r(-90))),g||M(l(C,n));const b=i.farDistanceRenderSpace;let v,w;M(c(C,d(L,b,b,b))),M(u(C,D(e))),M(j(i,C)),g?(v=f,w=i.tiltedUpVector):(w=i.rightVector,v=n),v*="right"===e||"bottom"===e?-1:1;const A=p(C,v,w);null!=A&&M(A),t.modelTransform=_}_createManipulators(){const t=this._createArcManipulator("left"),e=this._createArcManipulator("right"),r=this._createArcManipulator("top"),i=this._createArcManipulator("bottom");this._manipulators={left:t,right:e,top:r,bottom:i};[[i.manipulator,r.manipulator],[t.manipulator,e.manipulator]].forEach(([t,e])=>{t.metadata={pairedManipulator:e},e.metadata={pairedManipulator:t}})}_createArcManipulator(t){const e=new A({view:this._view,autoScaleRenderObjects:!1,worldSized:!0}),r={manipulator:e,side:t};return this._updateArcManipulatorVisuals(r),this._handles.add(e.events.on(["focus-changed","grab-changed"],t=>{const r=e.metadata?.pairedManipulator;null!=r&&(r.hovering!==e.hovering&&(r.hovering=e.hovering),r.grabbing!==e.grabbing&&(r.grabbing=e.grabbing))})),r}_createArcMaterial(t){const e=v.getFovArcWidth(t),r=new y({renderOccluded:4,isDecoration:!0,width:e},this._view.state.isGlobal);return this._handles.add(o(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),t=>r.setParameters({color:t}),n)),r}forEachManipulator(t){Object.values(this._manipulators).forEach(({manipulator:e})=>t(e,2))}_forEachManipulatorInfo(t){Object.values(this._manipulators).forEach(e=>t(e))}get test(){return{manipulators:this._manipulators}}}function x(t,e,a){const{horizontalFieldOfView:o,verticalFieldOfView:n}=e,s=F(t),l=r(i((s?n:o)/2,0,15)),c=P(-l/2,l/2,s?1:Math.max(Math.sin(r(90-n/2)),.1));return[E(a,c),c]}function P(t,e,r,i=10){T(i>1,"createArcPolylineGeometry() needs at least 2 for numVertices");const a=e-t;if(a<=0||r<=0){const t=.01;return[M(0,0,t),M(0,0,-t)]}const o=[],n=a/i;for(let s=0;s<i;s++){let a=t+s*n;s===i-1&&(a=e);const l=Math.cos(a)*r,c=Math.sin(a)*r,u=M(l-r,0,c);o.push(u)}return o}function S(t){switch(t){case"left":return 0;case"bottom":return 1;case"right":return 2;case"top":return 3}}function D(t){return S(t)*z}function F(t){return"left"===t||"right"===t}function I(t){return"left"===t?"right":"right"===t?"left":"top"===t?"bottom":"top"}function G(t,e){const{elevationAlignedObserverRenderSpace:r,elevationAlignedTargetRenderSpace:i,tiltedUpVector:a,rightVector:o,farDistanceRenderSpace:n}=e,s=f(L,i,r),l=F(t)?o:a,c=g(k,l,n);return b(r,s,c)}const z=Math.PI/2,C=h(),L=_(),k=_(),q={top:_(),bottom:_(),left:_(),right:_()};export{U as ViewshedFieldOfViewManipulation,P as createArcPolylineVertices,I as flipSide,F as isSideHorizontal,D as sideToRad};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../../../../core/Handles.js";import{deg2rad as i}from"../../../../core/mathUtils.js";import{fromScaling as e,fromTranslation as a,fromZRotation as r,mul as o,fromYRotation as n,multiply as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as m,scale as c,add as p,sub as u,len as h,dot as d,scaleAndAdd as
|
|
2
|
+
import t from"../../../../core/Handles.js";import{deg2rad as i}from"../../../../core/mathUtils.js";import{fromScaling as e,fromTranslation as a,fromZRotation as r,mul as o,fromYRotation as n,multiply as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as m,scale as c,add as p,sub as u,len as h,dot as d,scaleAndAdd as g,normalize as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{q as v}from"../../../../chunks/boundedPlane.js";import{fromValues as T}from"../../../../geometry/support/ray.js";import{displayFocusMultiplier as w}from"../Slice/sliceToolConfig.js";import{ViewshedArrowManipulator as j}from"./ViewshedArrowManipulator.js";import{viewshedToolManipulatorConfiguration as D}from"./ViewshedConfiguration.js";import{getViewshedRotationMatrix as x,screenToCircleAngle as H}from"./viewshedToolUtils.js";import{screenToRenderRay as S}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as M,discRadius as P}from"../../interactive/editingTools/manipulations/config.js";import{InteractiveManipulation as R}from"../../interactive/editingTools/manipulations/InteractiveManipulation.js";import{createManipulatorDragEventPipeline as b,dragAtLocation as y}from"../../../interactive/dragEventPipeline.js";class A extends R{constructor(i){super(),this._handles=new t,this._tool=i.tool,this._view=i.view;const e=D.scaleOrientHandleRadius;this._manipulatorHeading=new j(this._view,e),this._manipulatorTilt=new j(this._view,e),this._manipulatorDistance=new j(this._view,e),this.forEachManipulator(t=>this._tool.manipulators.add(t))}destroy(){this._handles.destroy(),this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._manipulatorHeading=null,this._manipulatorTilt=null,this._manipulatorDistance=null,this._tool=null,this._view=null}createHeadingDragPipeline(t,e){return b(this._manipulatorHeading,(a,r,o,n,s)=>{const l=this._view,{tiltParallelToSurface:m,farDistanceRenderSpace:d,upVector:g,elevationAlignedObserverRenderSpace:f,elevationAlignedTargetRenderSpace:_,rightVector:T}=e,w=Math.sin(i(m))*d,j=p(E,f,c(I,g,w)),D=u(I,_,j),x=c(L,T,h(D)),S=v(j,D,x),M=H(r,l,S,e).next(t=>({...t,manipulatorType:3}));t(a,M,o)})}createTiltDragPipeline(t,i){return b(this._manipulatorTilt,(e,a,r,o,n)=>{const{elevationAlignedObserverRenderSpace:s,farDistanceRenderSpace:l,upVector:m,targetDirection:p}=i,u=d(p,m),h=g(E,p,m,-u);c(h,f(h,h),l);const _=c(I,m,l),T=v(s,h,_),w=H(a,this._view,T,i).next(t=>({...t,manipulatorType:3}));t(e,w,r)})}createDistanceDragPipeline(t,i){return b(this._manipulatorDistance,(e,a,r,o,n)=>{const s=T(i.elevationAlignedObserverRenderSpace,i.targetDirection),l=a.next(y(this._view,e.location)).next(S(this._view,s)).next(t=>({...t,manipulatorType:2}));t(e,l,r)})}updateManipulators(t){const{elevationAlignedTargetRenderSpace:i}=t;this._manipulatorHeading.renderLocation=i,this._manipulatorTilt.renderLocation=i,this._manipulatorDistance.renderLocation=i;const p=l(),u=t=>{s(p,t,p)},h=D.scaleOrientSize*(M/P);u(e(O,m(E,h,h,h))),u(x(t,O));const d=D.scaleOrientHandleRadius*w*h,g=c(E,t.targetDirection,d);u(a(O,g));const f=r(O,-C);o(f,f,n(V,-C)),this._manipulatorHeading.modelTransform=o(l(),p,f);const _=n(O,C);o(_,_,r(V,Math.PI)),this._manipulatorTilt.modelTransform=s(l(),p,_),this._manipulatorDistance.modelTransform=p}forEachManipulator(t){t(this._manipulatorHeading,3),t(this._manipulatorTilt,3),t(this._manipulatorDistance,2)}}const O=l(),V=l(),E=_(),I=_(),L=_(),C=Math.PI/2;export{A as ViewshedScaleOrientManipulation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i,isPromiseLike as n}from"../../../../core/promiseUtils.js";import{createVolume as s}from"../../../../core/quantity.js";import{whenOnce as a,watch as l,syncAndInitial as u}from"../../../../core/reactiveUtils.js";import{property as p,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sqrDist as d}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as f,clone as y,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import w from"../../../../geometry/Multipoint.js";import{projectOrLoad as j}from"../../../../geometry/projectionUtils.js";import{e as E}from"../../../../chunks/containsOperator.js";import{e as b}from"../../../../chunks/convexHullOperator.js";import{e as R}from"../../../../chunks/simplifyOperator.js";import{e as x}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as C}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as T}from"../../../../geometry/projection/projectBoundingRect.js";import{fromExtent as G,intersects as L,create as O,empty as P}from"../../../../geometry/support/aaBoundingRect.js";import{isClockwise as D}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as H}from"../../../../geometry/support/DoubleArray.js";import{t as V}from"../../../../chunks/vec3.js";import I from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as M}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as U}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as N,VolumeMeasurementPerimeterTooLargeError as k,VolumeMeasurementUnsupportedCoordinateSystemError as A,VolumeMeasurementUnsupportedLayerTransparencyError as F}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as S}from"./VolumeMeasurementRawResult.js";import W from"./VolumeMeasurementResult.js";import{ElevationContext as z}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as q}from"../../support/ElevationProvider.js";import{polygonToRenderInfoElevationAligned as B}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as Z}from"../../terrain/tileUtils.js";import{CutFillComputationRenderNode as J,TargetGeometryRenderInfo as K}from"../../webgl-engine/lib/CutFillComputationRenderNode.js";import{GeometryWorkerHandle as Q}from"../../../support/GeometryWorkerHandle.js";import{isIntegratedMeshLayerView as X}from"../../../support/layerViewUtils.js";let Y=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new Q,this._getElevationProvider=()=>this.view.elevationProvider,this.depthExtremaPositions=null,this._updatingHandles=new v,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new Z,this._intersectingObbs=[],this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computationRenderNode.done)return;const{renderCoordsHelper:i}=this.view,n=new U({extent:t,localOrigin:r,renderCoordsHelper:i});this._computationRenderNode.update(n,o),this._determineDataCoverage(n);const[s]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),a(()=>this._computationRenderNode.done).then(()=>{this._updateDepthExtremaPositions(n,this._computationRenderNode.getResult())})]);if(this.error)return void(this._rawResult=null);const l=this._computationRenderNode.getResult();this._updateResult(n,l,"fulfilled"===s.status?s.value:null)}),this._determineDataCoverage=e=>{const{elevationAlignedGeometry:t}=this,{frustum:r}=this._computationRenderNode,{cameraDimensions:o}=e;t&&r&&(this._intersectingObbs.length=0,this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbs.length?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computationRenderNode=new J({view:e}),this.addHandles([this._createElevationUpdateHandle(),l(()=>({projectedGeometry:this._projectedGeometry,localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo}),({projectedGeometry:e,localOrigin:t,targetGeometryRenderInfo:r})=>{const o=e?.extent;if(!(e&&o&&t&&r))return this._rawResult=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(e,o,t,r))},u)])}destroy(){this._updatingHandles.destroy(),this._computationRenderNode.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=R(e),r=j(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&M(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?f(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return $(this._getElevationProvider(),t),t}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:i}=this.view,s=B(e,o,i,z.fromElevationInfo(new I({mode:"absolute-height"})));if(n(s))return this._updatingHandles.consumePromise(s),null;if(null==s)return null;const{positions:a,polygonIndices:l,vertexCount:u}=s,p=H(3*u),m=c(),d=c();return C(t.spatialReference,r,m,i.spatialReference),d[12]=-m[12],d[13]=-m[13],d[14]=-m[14],V(p,a,d),new K(p,l)}get updating(){return this._computationRenderNode.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e?new W({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>X(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new N}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeterForError,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new k:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new k:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new A:null}get _unsupportedLayerTransparencyError(){return this.view.map.ground&&this.view.map.ground.opacity<1?new F:null}get _perimeterForError(){const{targetGeometry:e}=this;if(null==e)return null;let t=null;for(const r of e.rings){if(!D(r))continue;const e=te(re(r));t=e?Math.max(t??0,e):t}return null!=t?t*e.spatialReference.metersPerUnit:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(T(e.extent,e.spatialReference,ie,this.view.spatialReference),G(t,ne),L(ie,ne)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:n},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(n/t.height),p=ee(t.cut.totalDepth,a,l)*u,m=ee(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new S({cutVolume:s(Math.abs(p*c),"cubic-meters"),fillVolume:s(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:d}=e,h=y(s);return 0!==d&&(g(h,h,l,r*(m/t.width-.5)),g(h,h,a,o*(c/t.height-.5))),g(h,h,u,-ee(p,i,n)),h};this.depthExtremaPositions={cut:p(t.cut),fill:p(t.fill)}}_findIntersectingObbs(e,t){const r=this._intersectingObbs;"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)})}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new w({spatialReference:o});if(this._intersectingObbs.forEach(e=>{if(oe(e.radius,t)&&(e.getCorners(ae),n.points.length=0,ae.forEach(e=>{const t=r.fromRenderCoords(e,le,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=b(n);"polygon"===e?.type&&i.push(e)}}),!i.length)return!1;const s=x(i);return!!s&&E(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;if(this._intersectingTiles.length=0,!e.extent)return;G(e.extent,se);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(se)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>oe(t.radius*r,e))}};function $(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=q(e,t,"ground")??0))}function ee(e,t,r){return e*(r-t)+t}function te(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1]]),r?o+=d(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=d(r,t)),Math.sqrt(o)}function*re(e){const t=h();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([p()],Y.prototype,"_projectedGeometry",null),e([p()],Y.prototype,"_localOrigin",null),e([p()],Y.prototype,"_getElevationProvider",void 0),e([p()],Y.prototype,"elevationAlignedGeometry",null),e([p()],Y.prototype,"targetGeometry",null),e([p()],Y.prototype,"_targetGeometryRenderInfo",null),e([p({constructOnly:!0})],Y.prototype,"analysis",void 0),e([p({constructOnly:!0})],Y.prototype,"analysisViewData",void 0),e([p({constructOnly:!0})],Y.prototype,"view",void 0),e([p()],Y.prototype,"updating",null),e([p()],Y.prototype,"result",null),e([p()],Y.prototype,"depthExtremaPositions",void 0),e([p()],Y.prototype,"error",null),e([p()],Y.prototype,"_imLayerViewsAffectingMeasurement",null),e([p()],Y.prototype,"_insufficientDataError",null),e([p()],Y.prototype,"_perimeterTooLargeError",null),e([p()],Y.prototype,"_perimeterTooLargeLocalError",null),e([p()],Y.prototype,"_perimeterTooLargeGlobalError",null),e([p()],Y.prototype,"_unsupportedCoordinateSystemError",null),e([p()],Y.prototype,"_unsupportedLayerTransparencyError",null),e([p()],Y.prototype,"_perimeterForError",null),e([p()],Y.prototype,"_computationRenderNode",void 0),e([p({readOnly:!0})],Y.prototype,"_updatingHandles",void 0),e([p()],Y.prototype,"_rawResult",void 0),e([p()],Y.prototype,"_sufficientDataCoverage",void 0),Y=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],Y);const oe=(e,t)=>e<(t.width+t.height)/2,ie=P(),ne=P(),se=O(),ae=new Array(8).fill(0).map(()=>_()),le=_();export{Y as VolumeMeasurementCutFillController};
|
|
2
|
+
import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i,isPromiseLike as n}from"../../../../core/promiseUtils.js";import{createVolume as s}from"../../../../core/quantity.js";import{whenOnce as a,watch as l,syncAndInitial as u}from"../../../../core/reactiveUtils.js";import{property as p,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sqrDist as d}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as f,clone as y,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import w from"../../../../geometry/Multipoint.js";import{projectOrLoad as j}from"../../../../geometry/projectionUtils.js";import{e as E}from"../../../../chunks/containsOperator.js";import{e as b}from"../../../../chunks/convexHullOperator.js";import{e as R}from"../../../../chunks/simplifyOperator.js";import{a as x}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as C}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as T}from"../../../../geometry/projection/projectBoundingRect.js";import{fromExtent as G,intersects as L,create as O,empty as P}from"../../../../geometry/support/aaBoundingRect.js";import{isClockwise as D}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as H}from"../../../../geometry/support/DoubleArray.js";import{f as V}from"../../../../chunks/vec3.js";import I from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as M}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as U}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as N,VolumeMeasurementPerimeterTooLargeError as k,VolumeMeasurementUnsupportedCoordinateSystemError as A,VolumeMeasurementUnsupportedLayerTransparencyError as F}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as S}from"./VolumeMeasurementRawResult.js";import W from"./VolumeMeasurementResult.js";import{ElevationContext as z}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as q}from"../../support/ElevationProvider.js";import{polygonToRenderInfoElevationAligned as B}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as Z}from"../../terrain/tileUtils.js";import{CutFillComputationRenderNode as J,TargetGeometryRenderInfo as K}from"../../webgl-engine/lib/CutFillComputationRenderNode.js";import{GeometryWorkerHandle as Q}from"../../../support/GeometryWorkerHandle.js";import{isIntegratedMeshLayerView as X}from"../../../support/layerViewUtils.js";let Y=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new Q,this._getElevationProvider=()=>this.view.elevationProvider,this.depthExtremaPositions=null,this._updatingHandles=new v,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new Z,this._intersectingObbs=[],this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computationRenderNode.done)return;const{renderCoordsHelper:i}=this.view,n=new U({extent:t,localOrigin:r,renderCoordsHelper:i});this._computationRenderNode.update(n,o),this._determineDataCoverage(n);const[s]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),a(()=>this._computationRenderNode.done).then(()=>{this._updateDepthExtremaPositions(n,this._computationRenderNode.getResult())})]);if(this.error)return void(this._rawResult=null);const l=this._computationRenderNode.getResult();this._updateResult(n,l,"fulfilled"===s.status?s.value:null)}),this._determineDataCoverage=e=>{const{elevationAlignedGeometry:t}=this,{frustum:r}=this._computationRenderNode,{cameraDimensions:o}=e;t&&r&&(this._intersectingObbs.length=0,this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbs.length?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computationRenderNode=new J({view:e}),this.addHandles([this._createElevationUpdateHandle(),l(()=>({projectedGeometry:this._projectedGeometry,localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo}),({projectedGeometry:e,localOrigin:t,targetGeometryRenderInfo:r})=>{const o=e?.extent;if(!(e&&o&&t&&r))return this._rawResult=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(e,o,t,r))},u)])}destroy(){this._updatingHandles.destroy(),this._computationRenderNode.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=R(e),r=j(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&M(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?f(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return $(this._getElevationProvider(),t),t}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:i}=this.view,s=B(e,o,i,z.fromElevationInfo(new I({mode:"absolute-height"})));if(n(s))return this._updatingHandles.consumePromise(s),null;if(null==s)return null;const{positions:a,polygonIndices:l,vertexCount:u}=s,p=H(3*u),m=c(),d=c();return C(t.spatialReference,r,m,i.spatialReference),d[12]=-m[12],d[13]=-m[13],d[14]=-m[14],V(p,a,d),new K(p,l)}get updating(){return this._computationRenderNode.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e?new W({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>X(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new N}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeterForError,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new k:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new k:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new A:null}get _unsupportedLayerTransparencyError(){return this.view.map.ground&&this.view.map.ground.opacity<1?new F:null}get _perimeterForError(){const{targetGeometry:e}=this;if(null==e)return null;let t=null;for(const r of e.rings){if(!D(r))continue;const e=te(re(r));t=e?Math.max(t??0,e):t}return null!=t?t*e.spatialReference.metersPerUnit:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(T(e.extent,e.spatialReference,ie,this.view.spatialReference),G(t,ne),L(ie,ne)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:n},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(n/t.height),p=ee(t.cut.totalDepth,a,l)*u,m=ee(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new S({cutVolume:s(Math.abs(p*c),"cubic-meters"),fillVolume:s(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:d}=e,h=y(s);return 0!==d&&(g(h,h,l,r*(m/t.width-.5)),g(h,h,a,o*(c/t.height-.5))),g(h,h,u,-ee(p,i,n)),h};this.depthExtremaPositions={cut:p(t.cut),fill:p(t.fill)}}_findIntersectingObbs(e,t){const r=this._intersectingObbs;"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)})}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new w({spatialReference:o});if(this._intersectingObbs.forEach(e=>{if(oe(e.radius,t)&&(e.getCorners(ae),n.points.length=0,ae.forEach(e=>{const t=r.fromRenderCoords(e,le,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=b(n);"polygon"===e?.type&&i.push(e)}}),!i.length)return!1;const s=x(i);return!!s&&E(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;if(this._intersectingTiles.length=0,!e.extent)return;G(e.extent,se);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(se)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>oe(t.radius*r,e))}};function $(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=q(e,t,"ground")??0))}function ee(e,t,r){return e*(r-t)+t}function te(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1]]),r?o+=d(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=d(r,t)),Math.sqrt(o)}function*re(e){const t=h();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([p()],Y.prototype,"_projectedGeometry",null),e([p()],Y.prototype,"_localOrigin",null),e([p()],Y.prototype,"_getElevationProvider",void 0),e([p()],Y.prototype,"elevationAlignedGeometry",null),e([p()],Y.prototype,"targetGeometry",null),e([p()],Y.prototype,"_targetGeometryRenderInfo",null),e([p({constructOnly:!0})],Y.prototype,"analysis",void 0),e([p({constructOnly:!0})],Y.prototype,"analysisViewData",void 0),e([p({constructOnly:!0})],Y.prototype,"view",void 0),e([p()],Y.prototype,"updating",null),e([p()],Y.prototype,"result",null),e([p()],Y.prototype,"depthExtremaPositions",void 0),e([p()],Y.prototype,"error",null),e([p()],Y.prototype,"_imLayerViewsAffectingMeasurement",null),e([p()],Y.prototype,"_insufficientDataError",null),e([p()],Y.prototype,"_perimeterTooLargeError",null),e([p()],Y.prototype,"_perimeterTooLargeLocalError",null),e([p()],Y.prototype,"_perimeterTooLargeGlobalError",null),e([p()],Y.prototype,"_unsupportedCoordinateSystemError",null),e([p()],Y.prototype,"_unsupportedLayerTransparencyError",null),e([p()],Y.prototype,"_perimeterForError",null),e([p()],Y.prototype,"_computationRenderNode",void 0),e([p({readOnly:!0})],Y.prototype,"_updatingHandles",void 0),e([p()],Y.prototype,"_rawResult",void 0),e([p()],Y.prototype,"_sufficientDataCoverage",void 0),Y=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],Y);const oe=(e,t)=>e<(t.width+t.height)/2,ie=P(),ne=P(),se=O(),ae=new Array(8).fill(0).map(()=>_()),le=_();export{Y as VolumeMeasurementCutFillController};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../../../intl.js";import{volumeMeasurementConfiguration as o}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import{equals as n}from"../../../../core/arrayUtils.js";import{cyclicalPI as l}from"../../../../core/Cyclical.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{isPromiseLike as c}from"../../../../core/promiseUtils.js";import{formatDecimal as u,preferredVolumePrecision as d}from"../../../../core/quantityFormatUtils.js";import{watch as m,initial as h}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as p}from"../../../../core/units.js";import{property as g,subclass as y}from"../../../../core/accessorSupport/decorators.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f,normalize as v,subtract as j,cross as L,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as C,fromValues as w}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as G}from"../../../../core/support/UpdatingHandles.js";import{computeTranslationToOriginAndRotation as P}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{angleAroundAxis as V}from"../../../../geometry/support/vector.js";import{t as x}from"../../../../chunks/vec3.js";import R from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as O}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as M}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as A}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as D}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as U}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as F}from"../../layers/graphics/extrudeUtils.js";import{polygonToRenderInfoElevationAligned as E}from"../../support/renderInfoUtils/polygon.js";import{CutFillVisualizationRenderNode as S,VolumeGeometry as H}from"../../webgl-engine/lib/CutFillVisualizationRenderNode.js";import{createStipplePatternSimple as N}from"../../webgl-engine/materials/lineStippleUtils.js";let B=class extends r{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages||this._updatingHandles.updating}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}get _extrusionHeights(){const{renderCoordsHelper:e}=this.view,{depthExtremaPositions:t,targetGeometry:i}=this.analysisViewData,{targetElevationRange:s}=o;if(!i||!t)return{cut:s,fill:-s};let r=-1/0;for(const o of i.rings)for(const e of o)r=Math.max(r,e[2]);const n=1,l=e.getAltitude(t.fill);return{cut:s,fill:Math.min(l-r,0)-n}}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._updatingHandles=new G,this._elevationContext=U.fromElevationInfo(new R({mode:"absolute-height"})),this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=o,r={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new A({...r,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new A(r);const n={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:3},l={...n,stipplePattern:N(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),c=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new M({...n,color:a}),this._occludedCutProjectionLines=new M({...l,color:a}),this._fillProjectionLines=new M({...n,color:c,renderOccluded:8}),this._occludedFillProjectionLines=new M({...l,color:c});const u={...i,attached:!0};this._cutVolumeLabel=new O({...u,distance:s.labelDistance}),this._fillVolumeLabel=new O({...u,distance:-s.labelDistance}),this._renderNode=new S({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},h),m(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._renderNode.measureType=i},h),m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),h),m(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},h),m(()=>[this.analysisViewData.targetGeometry,this._extrusionHeights,this._polygonRenderInfo],()=>this._updateCutFillGeometry(),h),m(()=>this.visible&&this.view.state.camera.aboveGround&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),h),m(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{depthExtremaPositions:s.depthExtremaPositions,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),m(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),h),t(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=a(this._elevationAlignedGeometry),this._targetGeometry=a(this._targetGeometry),this._cutProjectionLines=a(this._cutProjectionLines),this._occludedCutProjectionLines=a(this._occludedCutProjectionLines),this._fillProjectionLines=a(this._fillProjectionLines),this._occludedFillProjectionLines=a(this._occludedFillProjectionLines),this._cutVolumeLabel=a(this._cutVolumeLabel),this._fillVolumeLabel=a(this._fillVolumeLabel),this._renderNode.destroy(),this._updatingHandles.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],r=[],l=[],a=[],c=[],u=e.spatialReference;for(let d=0;d<e.rings.length;d++){const i=e.rings[d],m=i.length>1&&n(i[0],i[i.length-1]),h=i.length-(m?1:0),p=[];for(let e=0;e<h;++e){const o=i[e],r=f(C(),o[0],o[1],o[2]);s.toRenderCoords(r,u,r);const n=t.rings[d][e],l=f(C(),n[0],n[1],n[2]);s.toRenderCoords(l,u,l);const a=new D(r,l);p.push(a)}const g=this.view.state.camera;for(let e=0;e<p.length;++e){const s=p[e],n=p[0===e?p.length-1:e-1],u=p[e===p.length-1?0:e+1],m=i[e],h=t.rings[d][e],y=m[2]>h[2],_=new T(s,n,u,y);o.push(_),_.updateOccluded(g);const f=_.isOccluded;y?(f?l:r).push(s):(f?c:a).push(s)}}this._projectionLines=o,this._cutProjectionLines.setGeometryFromSegments(r),this._occludedCutProjectionLines.setGeometryFromSegments(l),this._fillProjectionLines.setGeometryFromSegments(a),this._occludedFillProjectionLines.setGeometryFromSegments(c)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,n=!1;for(const l of this._projectionLines){l.updateOccluded(e)&&(r||=l.isCut,n||=!l.isCut);const a=l.isOccluded;(l.isCut?a?i:t:a?o:s).push(l.segment)}n&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,t,i){const{geometryOutlineColor:s,cutColor:r,fillColor:n,cutColorMuted:l,fillColorMuted:a,cutProjectionLineColor:c,fillProjectionLineColor:u}=o;if(this._renderNode.cutColor=i?r:l,this._renderNode.fillColor=i?n:a,e){const e=t.toUnitRGBA();this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._renderNode.borderColor=t}else{this._targetGeometry.color=s.toUnitRGBA();const e=(i?c:l).toUnitRGBA();this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const t=(i?u:a).toUnitRGBA();this._fillProjectionLines.color=t,this._occludedFillProjectionLines.color=t,this._renderNode.borderColor=s}}_updateLabels(e){const{effectiveDisplayUnits:t,depthExtremaPositions:s,messages:o,unitsMessages:r,result:n,visible:l}=e;if(this._cutVolumeLabel.visible=l,this._fillVolumeLabel.visible=l,this._cutVolumeLabel.geometry=s?{type:"point",point:s.cut}:null,this._fillVolumeLabel.geometry=s?{type:"point",point:s.fill}:null,null==n||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=t.volume,c=i(o.labels.cut,{volume:I(r,n.cutVolume,a)}),u=i(o.labels.fill,{volume:I(r,n.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(e){e?this._renderNode.enable():this._renderNode.disable()}get _polygonRenderInfo(){const{renderCoordsHelper:e,elevationProvider:t}=this.view,{targetGeometry:i}=this.analysisViewData;if(null==i)return null;const s=E(i,t,e,this._elevationContext,{outlineOutput:"tessellated-indices"});return c(s)?(this._updatingHandles.consumePromise(s),null):s}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData,{cut:i,fill:s}=this._extrusionHeights;if(!t?.extent)return;const{center:o}=t.extent,r=w(o.x,o.y,0),n=C();e.toRenderCoords(r,t.spatialReference,n);const l=this._getExtrudedVolume(i,r,n),a=this._getExtrudedVolume(s,r,n);null!=l&&null!=a&&this._renderNode.updateGeometries(l,a,n)}_getExtrudedVolume(e,t,i){const{renderCoordsHelper:s,spatialReference:o}=this.view,r=C(),n=1===s.viewingMode;s.worldUpAtPosition(i,r);const{_polygonRenderInfo:l}=this;if(null==l)return null;const a=F(l,{height:e,worldUp:r,spherical:n,requireElevation:!1,requireNormals:!0,requireSizes:!1});if(null==a)return null;const c=_(),u=_();if(P(o,t,c,s.spatialReference),u[12]=-c[12],u[13]=-c[13],u[14]=-c[14],x(a.vertices,a.vertices,u),"stockpile"===this.analysis.measureType)for(let d=0;d<a.normals.length;d+=3)a.normals[d]=r[0],a.normals[d+1]=r[1],a.normals[d+2]=r[2];return new H(a.vertices,a.bottomIndices,a.indices,a.normals)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await s("esri/core/t9n/Units"),this.messages=await s("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function I(e,t,i){if(!t||!e)return null;const s=p(t.value,t.unit,i),o=d(s);return u(e,t,s,o)}e([g({constructOnly:!0})],B.prototype,"view",void 0),e([g({constructOnly:!0})],B.prototype,"analysis",void 0),e([g({constructOnly:!0})],B.prototype,"analysisViewData",void 0),e([g()],B.prototype,"unitsMessages",void 0),e([g()],B.prototype,"messages",void 0),e([g()],B.prototype,"loadingMessages",void 0),e([g({readOnly:!0})],B.prototype,"_updatingHandles",void 0),e([g({readOnly:!0})],B.prototype,"visible",null),e([g()],B.prototype,"updating",null),e([g()],B.prototype,"hasUnsupportedError",null),e([g()],B.prototype,"_extrusionHeights",null),e([g()],B.prototype,"_polygonRenderInfo",null),B=e([y("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],B);class T{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=C(),this._n2=C();const o=v(z,j(z,e.endRenderSpace,e.startRenderSpace));v(this._n1,L(this._n1,o,v(q,j(q,t.startRenderSpace,e.startRenderSpace)))),v(this._n2,L(this._n2,o,v(q,j(q,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=l.normalize(V(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){j(z,this.segment.startRenderSpace,e.eye);const t=b(this._n1,z)<0,i=b(this._n2,z)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const z=C(),q=C();export{B as VolumeMeasurementCutFillVisualization};
|
|
2
|
+
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../../../intl.js";import{volumeMeasurementConfiguration as o}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import{equals as n}from"../../../../core/arrayUtils.js";import{cyclicalPI as l}from"../../../../core/Cyclical.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{isPromiseLike as c}from"../../../../core/promiseUtils.js";import{formatDecimal as u,preferredVolumePrecision as d}from"../../../../core/quantityFormatUtils.js";import{watch as m,initial as h}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as p}from"../../../../core/units.js";import{property as g,subclass as y}from"../../../../core/accessorSupport/decorators.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f,normalize as v,subtract as j,cross as L,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as C,fromValues as w}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as G}from"../../../../core/support/UpdatingHandles.js";import{computeTranslationToOriginAndRotation as P}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{angleAroundAxis as V}from"../../../../geometry/support/vector.js";import{f as x}from"../../../../chunks/vec3.js";import R from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as O}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as M}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as A}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as D}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as U}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as F}from"../../layers/graphics/extrudeUtils.js";import{polygonToRenderInfoElevationAligned as E}from"../../support/renderInfoUtils/polygon.js";import{CutFillVisualizationRenderNode as S,VolumeGeometry as H}from"../../webgl-engine/lib/CutFillVisualizationRenderNode.js";import{createStipplePatternSimple as N}from"../../webgl-engine/materials/lineStippleUtils.js";let B=class extends r{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages||this._updatingHandles.updating}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}get _extrusionHeights(){const{renderCoordsHelper:e}=this.view,{depthExtremaPositions:t,targetGeometry:i}=this.analysisViewData,{targetElevationRange:s}=o;if(!i||!t)return{cut:s,fill:-s};let r=-1/0;for(const o of i.rings)for(const e of o)r=Math.max(r,e[2]);const n=1,l=e.getAltitude(t.fill);return{cut:s,fill:Math.min(l-r,0)-n}}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._updatingHandles=new G,this._elevationContext=U.fromElevationInfo(new R({mode:"absolute-height"})),this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=o,r={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new A({...r,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new A(r);const n={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:3},l={...n,stipplePattern:N(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),c=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new M({...n,color:a}),this._occludedCutProjectionLines=new M({...l,color:a}),this._fillProjectionLines=new M({...n,color:c,renderOccluded:8}),this._occludedFillProjectionLines=new M({...l,color:c});const u={...i,attached:!0};this._cutVolumeLabel=new O({...u,distance:s.labelDistance}),this._fillVolumeLabel=new O({...u,distance:-s.labelDistance}),this._renderNode=new S({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},h),m(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._renderNode.measureType=i},h),m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),h),m(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},h),m(()=>[this.analysisViewData.targetGeometry,this._extrusionHeights,this._polygonRenderInfo],()=>this._updateCutFillGeometry(),h),m(()=>this.visible&&this.view.state.camera.aboveGround&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),h),m(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{depthExtremaPositions:s.depthExtremaPositions,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),m(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),h),t(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=a(this._elevationAlignedGeometry),this._targetGeometry=a(this._targetGeometry),this._cutProjectionLines=a(this._cutProjectionLines),this._occludedCutProjectionLines=a(this._occludedCutProjectionLines),this._fillProjectionLines=a(this._fillProjectionLines),this._occludedFillProjectionLines=a(this._occludedFillProjectionLines),this._cutVolumeLabel=a(this._cutVolumeLabel),this._fillVolumeLabel=a(this._fillVolumeLabel),this._renderNode.destroy(),this._updatingHandles.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],r=[],l=[],a=[],c=[],u=e.spatialReference;for(let d=0;d<e.rings.length;d++){const i=e.rings[d],m=i.length>1&&n(i[0],i[i.length-1]),h=i.length-(m?1:0),p=[];for(let e=0;e<h;++e){const o=i[e],r=f(C(),o[0],o[1],o[2]);s.toRenderCoords(r,u,r);const n=t.rings[d][e],l=f(C(),n[0],n[1],n[2]);s.toRenderCoords(l,u,l);const a=new D(r,l);p.push(a)}const g=this.view.state.camera;for(let e=0;e<p.length;++e){const s=p[e],n=p[0===e?p.length-1:e-1],u=p[e===p.length-1?0:e+1],m=i[e],h=t.rings[d][e],y=m[2]>h[2],_=new T(s,n,u,y);o.push(_),_.updateOccluded(g);const f=_.isOccluded;y?(f?l:r).push(s):(f?c:a).push(s)}}this._projectionLines=o,this._cutProjectionLines.setGeometryFromSegments(r),this._occludedCutProjectionLines.setGeometryFromSegments(l),this._fillProjectionLines.setGeometryFromSegments(a),this._occludedFillProjectionLines.setGeometryFromSegments(c)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,n=!1;for(const l of this._projectionLines){l.updateOccluded(e)&&(r||=l.isCut,n||=!l.isCut);const a=l.isOccluded;(l.isCut?a?i:t:a?o:s).push(l.segment)}n&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,t,i){const{geometryOutlineColor:s,cutColor:r,fillColor:n,cutColorMuted:l,fillColorMuted:a,cutProjectionLineColor:c,fillProjectionLineColor:u}=o;if(this._renderNode.cutColor=i?r:l,this._renderNode.fillColor=i?n:a,e){const e=t.toUnitRGBA();this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._renderNode.borderColor=t}else{this._targetGeometry.color=s.toUnitRGBA();const e=(i?c:l).toUnitRGBA();this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const t=(i?u:a).toUnitRGBA();this._fillProjectionLines.color=t,this._occludedFillProjectionLines.color=t,this._renderNode.borderColor=s}}_updateLabels(e){const{effectiveDisplayUnits:t,depthExtremaPositions:s,messages:o,unitsMessages:r,result:n,visible:l}=e;if(this._cutVolumeLabel.visible=l,this._fillVolumeLabel.visible=l,this._cutVolumeLabel.geometry=s?{type:"point",point:s.cut}:null,this._fillVolumeLabel.geometry=s?{type:"point",point:s.fill}:null,null==n||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=t.volume,c=i(o.labels.cut,{volume:I(r,n.cutVolume,a)}),u=i(o.labels.fill,{volume:I(r,n.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(e){e?this._renderNode.enable():this._renderNode.disable()}get _polygonRenderInfo(){const{renderCoordsHelper:e,elevationProvider:t}=this.view,{targetGeometry:i}=this.analysisViewData;if(null==i)return null;const s=E(i,t,e,this._elevationContext,{outlineOutput:"tessellated-indices"});return c(s)?(this._updatingHandles.consumePromise(s),null):s}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData,{cut:i,fill:s}=this._extrusionHeights;if(!t?.extent)return;const{center:o}=t.extent,r=w(o.x,o.y,0),n=C();e.toRenderCoords(r,t.spatialReference,n);const l=this._getExtrudedVolume(i,r,n),a=this._getExtrudedVolume(s,r,n);null!=l&&null!=a&&this._renderNode.updateGeometries(l,a,n)}_getExtrudedVolume(e,t,i){const{renderCoordsHelper:s,spatialReference:o}=this.view,r=C(),n=1===s.viewingMode;s.worldUpAtPosition(i,r);const{_polygonRenderInfo:l}=this;if(null==l)return null;const a=F(l,{height:e,worldUp:r,spherical:n,requireElevation:!1,requireNormals:!0,requireSizes:!1});if(null==a)return null;const c=_(),u=_();if(P(o,t,c,s.spatialReference),u[12]=-c[12],u[13]=-c[13],u[14]=-c[14],x(a.vertices,a.vertices,u),"stockpile"===this.analysis.measureType)for(let d=0;d<a.normals.length;d+=3)a.normals[d]=r[0],a.normals[d+1]=r[1],a.normals[d+2]=r[2];return new H(a.vertices,a.bottomIndices,a.indices,a.normals)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await s("esri/core/t9n/Units"),this.messages=await s("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function I(e,t,i){if(!t||!e)return null;const s=p(t.value,t.unit,i),o=d(s);return u(e,t,s,o)}e([g({constructOnly:!0})],B.prototype,"view",void 0),e([g({constructOnly:!0})],B.prototype,"analysis",void 0),e([g({constructOnly:!0})],B.prototype,"analysisViewData",void 0),e([g()],B.prototype,"unitsMessages",void 0),e([g()],B.prototype,"messages",void 0),e([g()],B.prototype,"loadingMessages",void 0),e([g({readOnly:!0})],B.prototype,"_updatingHandles",void 0),e([g({readOnly:!0})],B.prototype,"visible",null),e([g()],B.prototype,"updating",null),e([g()],B.prototype,"hasUnsupportedError",null),e([g()],B.prototype,"_extrusionHeights",null),e([g()],B.prototype,"_polygonRenderInfo",null),B=e([y("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],B);class T{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=C(),this._n2=C();const o=v(z,j(z,e.endRenderSpace,e.startRenderSpace));v(this._n1,L(this._n1,o,v(q,j(q,t.startRenderSpace,e.startRenderSpace)))),v(this._n2,L(this._n2,o,v(q,j(q,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=l.normalize(V(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){j(z,this.segment.startRenderSpace,e.eye);const t=b(this._n1,z)<0,i=b(this._n2,z)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const z=C(),q=C();export{B as VolumeMeasurementCutFillVisualization};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isPromiseLike as r}from"../../core/promiseUtils.js";import{convertToSpatialReferenceUnit as e,convertFromSpatialReferenceUnit as t}from"../../core/units.js";import{create as o}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as s}from"../../geometry/ellipsoidUtils.js";import{project as n}from"../../geometry/projectionUtils.js";import{execute as l}from"../../geometry/operators/gx/operatorDensify.js";import{fromPolygon as m,toPolygon as p}from"../../geometry/operators/support/apiConverter.js";import{computeTranslationToOriginAndRotation as a}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{earth as c}from"../../geometry/support/Ellipsoid.js";import{
|
|
2
|
+
import{isPromiseLike as r}from"../../core/promiseUtils.js";import{convertToSpatialReferenceUnit as e,convertFromSpatialReferenceUnit as t}from"../../core/units.js";import{create as o}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as s}from"../../geometry/ellipsoidUtils.js";import{project as n}from"../../geometry/projectionUtils.js";import{execute as l}from"../../geometry/operators/gx/operatorDensify.js";import{fromPolygon as m,toPolygon as p}from"../../geometry/operators/support/apiConverter.js";import{computeTranslationToOriginAndRotation as a}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{earth as c}from"../../geometry/support/Ellipsoid.js";import{f as u}from"../../chunks/vec3.js";import{StencilGeometry as f,StencilGeometryWithOrigin as g}from"./StencilGeometry.js";import{extrudePolygon as d}from"./layers/graphics/extrudeUtils.js";import{computeCentroid as j}from"./layers/graphics/graphicUtils.js";import{polygonToRenderInfoElevationAligned as h}from"./support/renderInfoUtils/polygon.js";const y=2e4;function x(o,i,x){const M=i.renderCoordsHelper,R=1===M.viewingMode,b=i.spatialReference,C=s(b).radius/c.radius,I=e(5e5*C,"meters",b,!0);R||M.worldUpAtPosition([0,0,0],U);const A=b.equals(o.spatialReference)?o:n(o,b),E=Math.max(A.extent.width,A.extent.height),O=t(E,b,"meters",!0),P=Math.max(5*O,y*C),S=v(A,P,R?C/10:C),T=j(S);if(null==T)return null;const k=m(S),z=l(k,I,0,0),D=p(z,b);if(null==D)return null;const G=h(D,i.elevationProvider,M,x,{outlineOutput:"tessellated-indices"});if(r(G))return G;if(null==G||0===G.polygonIndexCount)return null;a(b,[T.x,T.y,0],w,M.spatialReference),q[12]=-w[12],q[13]=-w[13],q[14]=-w[14];const H=d(G,{height:P,worldUp:U,spherical:R,requireElevation:!1,requireNormals:!1,requireSizes:!1});if(null==H)return null;u(H.vertices,H.vertices,q);const N=new f(H.vertices,H.bottomIndices,H.indices,P);return new g(N,[w[12],w[13],w[14]])}function v(r,e,t){const o=-12e5*t,i=Math.max(-e/2,o),s=r.rings.map(r=>r.map(r=>[r[0],r[1],i])),n=r.clone();return n.rings=s,n.hasZ=!0,n}const U=i(),w=o(),q=o();export{x as polygonToVolume};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{rad2deg as t}from"../../../../../../core/mathUtils.js";import{rotateX as e}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{add as o,copy as r}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{
|
|
2
|
+
import{rad2deg as t}from"../../../../../../core/mathUtils.js";import{rotateX as e}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{add as o,copy as r}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{g as n}from"../../../../../../chunks/boundedPlane.js";import{create as s,intersectRay as i,getNormal as l}from"../../../../../../geometry/support/plane.js";import{sm4d as p,sv3d as u}from"../../../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as c}from"../../../../analysis/images/Factory.js";import{createRotatePlane as m}from"../../../../analysis/Slice/sliceToolUtils.js";import{calculateInputRotationTransform as d}from"../../../manipulatorUtils.js";import{screenToRenderPlane as h}from"../../dragEventPipeline3D.js";import{RotateManipulator as g}from"../../../manipulators/RotateManipulator.js";import{fromScreenNormalized as _}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as f}from"../../../../../interactive/dragEventPipeline.js";import{ExtentRotateTooltipInfo as b}from"../../../../../interactive/tooltip/infos/ExtentRotateTooltipInfo.js";class j{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e,o){this._tool=t,this._bounds=e,this._snapRotation=o,this._rotateTooltipInfo=null,this._startAngle=0,this._endAngle=0;const r=this._tool,a=r.view,n=!a.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this.rotateManipulator=new g(a,(t,e)=>c(a.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:n})),r.addHandles([this.rotateManipulator.events.on("grab-changed",t=>this._onGrabChanged(t)),this._createRotateDragPipeline(this.rotateManipulator)]),r.manipulators.add(this.rotateManipulator),r.addHandles([r.events.on("rotate-start",t=>this._startAngle=t.angle),r.events.on("rotate",t=>this._endAngle=t.angle),r.events.on("rotate-stop",()=>{this._startAngle=0,this._endAngle=0})])}destroy(){this._tool.manipulators.remove(this.rotateManipulator),this.rotateManipulator.destroy()}forEachManipulator(t){t(this.rotateManipulator,3)}updateManipulators(t,r){const a=this._bounds.mapBounds.plane[2]<0?Math.PI:0,n=e(p.get(),t,a);n[12]=0,n[13]=0,n[14]=0,this.rotateManipulator.modelTransform=n,this.rotateManipulator.renderLocation=o(u.get(),r.origin,r.basis1)}getUpdatedTooltipInfo(){return this.rotateManipulator.focused?this._computeRotateTooltipInfo():null}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo??=new b({sketchOptions:this._tool.sketchOptions});return t.angle=this._startAngle-this._endAngle,t}_onGrabChanged({action:t,screenPoint:e}){const o=this._tool,r=this._bounds;if("start"!==t||!e)return;const a=m(r.displayBounds,o.view.renderCoordsHelper,1,s()),n=_(o.view.state.camera,e);i(a,n,u.get())&&(r.backupMapBounds(),o.inputState={type:"rotate",rotatePlane:a})}_createRotateDragPipeline(e){const{_tool:o,_object:r}=this;return f(e,(e,a,n)=>{const s=o.inputState;null!=s&&(a.next(t=>("start"===t.action&&o.events.emit("rotate-start",{object:r,angle:0}),t)).next(h(o.view,s.rotatePlane)).next(this._renderPlaneToAngle()).next(...this._snapRotation()).next(this._updateGeometry()).next(e=>{const a={object:r,angle:t(e.rotateAngle)};switch(e.action){case"start":case"update":o.events.emit("rotate",a);break;case"end":o.inputState=null,o.events.emit("rotate-stop",a)}return e}),n.next(()=>{null!=o.inputState&&o.events.emit("rotate-stop",{object:r,angle:0}),o.cancelDrag()}))})}_renderPlaneToAngle(){return t=>{const e=d(t.renderStart,t.renderEnd,this._bounds.displayBounds.origin,l(t.plane));return{...t,rotateAngle:e}}}_updateGeometry(){const t=this._bounds;return e=>{const o=r(a(),t.mapBoundsStart.origin),s="start"===e.action?0:1;if(this._operations){const r=this._operations.rotate(o,e.rotateAngle,s,1);n(t.mapBoundsStart,t.mapBounds),t.updateMapBoundsFromOperation(r)}return e}}}export{j as ExtentRotate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as i,scaleAndAdd as a,subtract as o,length as r,dot as n}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as p}from"../../../../../../core/support/UpdatingHandles.js";import{d,
|
|
2
|
+
import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as i,scaleAndAdd as a,subtract as o,length as r,dot as n}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as p}from"../../../../../../core/support/UpdatingHandles.js";import{i as d,g as l}from"../../../../../../chunks/boundedPlane.js";import{intersectRay as u}from"../../../../../../geometry/support/plane.js";import{sv3d as h}from"../../../../../../geometry/support/vectorStacks.js";import{updateResizeHandle as m,isDiagonalResizeHandle as _,calculateDiagonalResizeHandleScale as f}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToRenderPlane as g}from"../../dragEventPipeline3D.js";import{mapPlaneAutoSize2D as y}from"./extentUtils.js";import{ResizeManipulator as x}from"../../../manipulators/ResizeManipulator.js";import{fromScreenNormalized as S}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as M}from"../../../../../interactive/dragEventPipeline.js";import{ExtentScaleTooltipInfo as b}from"../../../../../interactive/tooltip/infos/ExtentScaleTooltipInfo.js";import{GeometryWorkerHandle as z}from"../../../../../support/GeometryWorkerHandle.js";class j{get _object(){return this._tool.object}get _operations(){return this._object.operations}get updating(){return this._updatingHandles.updating}get zMax(){if(!this._zMaxDirty||!this._operations)return this._zMax;const t=this._operations.data;if(t.geometry.hasZ){const e=t.coordinateHelper;this._zMax=Number.NEGATIVE_INFINITY;for(const s of t.parts)for(const t of s.vertices){const s=e.getZ(t.pos)??0;this._zMax=Math.max(s,this._zMax)}}else this._zMax=0;return this._zMaxDirty=!1,this._zMax}constructor(t,e,s){this._tool=t,this._bounds=e,this._preserveAspectRatioStep=s,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._displayBoundsStart=d(),this._displayBoundsMarginStart=0,this._updatingHandles=new p,this._measurementWorker=new z({preloadGeodetic:!0}),this._zMax=0,this._zMaxDirty=!0;const i=this._tool,a=i.view;this.resizeManipulators=this._resizeHandles.map(t=>{const e=new x(a,t);return i.addHandles([e.events.on("grab-changed",t=>this._onGrabChanged(t)),this._createResizeDragPipeline(e,t)]),e}),i.manipulators.addMany(this.resizeManipulators),this._operations&&i.addHandles(this._operations.data.on("change",()=>{"resize"!==i.inputState?.type&&(this._zMaxDirty=!0)}))}destroy(){this.forEachManipulator(t=>{this._tool.manipulators.remove(t),t.destroy()}),this._measurementWorker.destroy(),this._updatingHandles.destroy()}forEachManipulator(t){this.resizeManipulators.forEach(e=>t(e,2))}updateManipulators(t,e){this.resizeManipulators.forEach((s,i)=>{m(s,this._resizeHandles[i],t,e)})}getUpdatedTooltipInfo(){if(!this.resizeManipulators.some(t=>t.focused))return null;const t=this._tooltipInfo??=new b({sketchOptions:this._tool.sketchOptions});return this.resizeManipulators.some(t=>t.dragging)||(t.xScale=1,t.yScale=1),this._updatingHandles.consumePromise(y(this._bounds.mapBounds,this.zMax,this._bounds.spatialReference,this._measurementWorker).then(({width:e,height:s})=>{t.xSize=e,t.ySize=s})),t}_onGrabChanged({action:t,screenPoint:e}){const s=this._tool,i=this._bounds;if("start"!==t||!e)return;const a=S(s.view.state.camera,e);u(i.displayBounds.plane,a,h.get())&&(i.backupMapBounds(),l(i.displayBounds,this._displayBoundsStart),this._displayBoundsMarginStart=i.displayBoundsMargin,s.inputState={type:"resize"})}_createResizeDragPipeline(t,e){const{_tool:s,_object:i}=this;return M(t,(t,a,o)=>{null!=s.inputState&&(a.next(t=>("start"===t.action&&s.events.emit("scale-start",{object:i,xScale:1,yScale:1}),{...t,handle:e})).next(g(s.view,this._displayBoundsStart.plane)).next(this._renderPlaneToFactors()).next(...this._preserveAspectRatioStep()).next(this._updateGeometry()).next(t=>{const e=this._tooltipInfo;e&&(e.xScale=t.factor1,e.yScale=t.factor2);const a={object:i,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":s.events.emit("scale",a);break;case"end":s.inputState=null,s.events.emit("scale-stop",a)}return t}),o.next(()=>{null!=s.inputState&&s.events.emit("scale-stop",{object:i,xScale:1,yScale:1}),s.cancelDrag()}))})}_renderPlaneToFactors(){const t=this._bounds;return e=>{const s=this._displayBoundsStart,c=e.handle.direction,p=t.displayBoundsMargin,d=this._displayBoundsMarginStart,l=i(h.get(),s.origin);a(l,l,s.basis1,-c[0]),a(l,l,s.basis2,-c[1]);const u=o(h.get(),e.renderEnd,l),m=o(h.get(),e.renderStart,l),g=_(e.handle),y=f(s),x=f(t.displayBounds)/y,S=(t,e)=>{if(0===t)return 1;let s=r(e),i=.5*t*n(e,u)/s;const a=i<0?-1:1;if(g){i+=(s-.5*t*n(e,m)/s)*a*x}const o=s<1.5*d?1:B;return s=Math.max(s-d,B),a>0&&(i-=p),a*Math.max(a*(i/s),o)};return{...e,factor1:S(c[0],s.basis1),factor2:S(c[1],s.basis2)}}}_updateGeometry(){const o=this._bounds;return r=>{const n=i(c(),o.mapBoundsStart.origin);a(n,n,o.mapBoundsStart.basis1,-r.handle.direction[0]),a(n,n,o.mapBoundsStart.basis2,-r.handle.direction[1]);const p=t(s(),o.mapBoundsStart.basis1[0],o.mapBoundsStart.basis1[1]);e(p,p);const d="start"===r.action?0:1;if(this._operations){const t=this._operations.scale(n,p,r.factor1,r.factor2,d,1);l(o.mapBoundsStart,o.mapBounds),o.updateMapBoundsFromOperation(t)}return r}}}const B=1e-6;export{j as ExtentScale,B as scaleEpsilon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{on as s}from"../../../../../../core/reactiveUtils.js";import{scale as t}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{add as i,subtract as o,scale as e,lerp as a,cross as n,normalize as r,dot as p,copy as d,scaleAndAdd as c}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import u from"../../../../../../geometry/Point.js";import{
|
|
2
|
+
import{on as s}from"../../../../../../core/reactiveUtils.js";import{scale as t}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{add as i,subtract as o,scale as e,lerp as a,cross as n,normalize as r,dot as p,copy as d,scaleAndAdd as c}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import u from"../../../../../../geometry/Point.js";import{i as m,g as b,C as g}from"../../../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as h,projectPoint as f}from"../../../../../../geometry/support/plane.js";import{sv3d as B}from"../../../../../../geometry/support/vectorStacks.js";import{mainAxis as y}from"../../geometryUtils.js";import{manipulatedObjectGeometry as M}from"../../manipulatedObjectUtils.js";import{evaluateElevationAlignmentAtPoint as j}from"../../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as v}from"../../../../layers/graphics/ElevationContext.js";import{apply as _,applyInverse as x,calculateOrientedBounds as C}from"../../../../../interactive/editGeometry/support/editPlaneUtils.js";class R{constructor(t,i){this._tool=t,this.mapBounds=m(),this.mapBoundsStart=m(),this.displayBounds=m(),t.addHandles(s(()=>t.object,"modified-externally",()=>this._resetMapBounds(),{onListenerAdd:()=>this._resetMapBounds()})),this._onDisplayBoundsChanged=i}get displayBoundsMargin(){const{view:s,object:t}=this._tool,i=M(t),o=s.pointsOfInterest?.centerOnSurfaceFrequent.location??i?.extent?.center;return o?D*s.pixelSizeAt(o):0}backupMapBounds(){b(this.mapBounds,this.mapBoundsStart)}updateDisplayBounds(){this._calculateDisplayBounds(),this._onDisplayBoundsChanged?.()}updateMapBoundsFromOperation(s){_(s,this.mapBounds),this.updateDisplayBounds()}updateMapBoundsFromOperationInverse(s){x(s,this.mapBounds),this.updateDisplayBounds()}_resetMapBounds(){this._calculateMapBounds(),this.updateDisplayBounds()}_calculateMapBounds(){const{view:s,attachmentOrigin:i,object:o}=this._tool,e=o.operations?.data;if(!e)return;const a=e.geometry;this.spatialReference=a.spatialReference;const n=y(a);t(n,n,-1);const r=i?s.pixelSizeAt(i,a.spatialReference):0,p=w*r,d=e.coordinateHelper.hasZ()&&"on-the-ground"!==o.elevationInfo.mode;C(n,e,p,this.mapBounds,d)}_calculateDisplayBounds(){const{view:s,attachmentOrigin:t}=this._tool,i=t?.z??j(this.mapBounds.origin,s.elevationProvider,v.fromElevationInfo(this._tool.object.elevationInfo),s.renderCoordsHelper);O(this.mapBounds,i??0,s.renderCoordsHelper,this.spatialReference,this.displayBoundsMargin,this.displayBounds)}}const D=10,w=80;function O(s,t,c,l,u=0,b){b||(b=m());const y=B.get();i(y,s.origin,s.basis1),i(y,y,s.basis2),c.toRenderCoords(y,l,y);const M=B.get();i(M,s.origin,s.basis1),o(M,M,s.basis2),c.toRenderCoords(M,l,M);const j=B.get();o(j,s.origin,s.basis1),o(j,j,s.basis2),c.toRenderCoords(j,l,j);const v=B.get();o(v,s.origin,s.basis1),i(v,v,s.basis2),c.toRenderCoords(v,l,v),i(b.origin,y,M),i(b.origin,b.origin,j),i(b.origin,b.origin,v),e(b.origin,b.origin,.25),o(y,y,b.origin),o(M,M,b.origin),o(j,j,b.origin),o(v,v,b.origin);const _=a(B.get(),y,M,.5),x=a(B.get(),j,v,.5);e(x,x,-1),a(b.basis1,_,x,.5);const C=a(B.get(),y,v,.5),R=a(B.get(),M,j,.5);e(R,R,-1),a(b.basis2,C,R,.5);const D=n(B.get(),b.basis1,b.basis2);n(b.basis2,D,b.basis1),r(b.basis1,b.basis1);const w=Math.max(Math.abs(p(b.basis1,y)),Math.abs(p(b.basis1,M)),Math.abs(p(b.basis1,j)),Math.abs(p(b.basis1,v)));r(b.basis2,b.basis2);const O=Math.max(Math.abs(p(b.basis2,y)),Math.abs(p(b.basis2,M)),Math.abs(p(b.basis2,j)),Math.abs(p(b.basis2,v)));e(b.basis1,b.basis1,w+u),e(b.basis2,b.basis2,O+u);const S=d(B.get(),s.origin);return S[2]=t,c.toRenderCoords(S,l,S),h(S,D,b.plane),f(b.plane,b.origin,b.origin),g(b),b}async function S(s,t,i,e){return o(H,o(H,s.origin,s.basis1),s.basis2),c(A,H,s.basis1,2),c(z,A,s.basis2,2),c(U,H,s.basis2,2),H[2]=A[2]=z[2]=U[2]=t,e.autoSize2D(I(P,U,i),I(k,z,i),I(F,A,i),I(E,H,i))}function I(s,t,i){return s.x=t[0],s.y=t[1],s.spatialReference=i,s}const U=l(),z=l(),A=l(),H=l(),P=new u,k=new u,F=new u,E=new u;export{R as TransformBounds,S as mapPlaneAutoSize2D};
|