@arcgis/core 5.1.0-next.70 → 5.1.0-next.72
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/PopupTemplate.js +1 -1
- package/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/icon/addToLivestreamVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer32.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer32.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture16.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture24.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture32.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12316.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12324.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12332.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/busTravelMode16.json +1 -0
- package/assets/components/assets/icon/busTravelMode16F.json +1 -0
- package/assets/components/assets/icon/busTravelMode24.json +1 -0
- package/assets/components/assets/icon/busTravelMode24F.json +1 -0
- package/assets/components/assets/icon/busTravelMode32.json +1 -0
- package/assets/components/assets/icon/busTravelMode32F.json +1 -0
- package/assets/components/assets/icon/carTravelMode16.json +1 -0
- package/assets/components/assets/icon/carTravelMode16F.json +1 -0
- package/assets/components/assets/icon/carTravelMode24.json +1 -0
- package/assets/components/assets/icon/carTravelMode24F.json +1 -0
- package/assets/components/assets/icon/carTravelMode32.json +1 -0
- package/assets/components/assets/icon/carTravelMode32F.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown16.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown24.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown32.json +1 -0
- package/assets/components/assets/icon/emergency16.json +1 -0
- package/assets/components/assets/icon/emergency16F.json +1 -0
- package/assets/components/assets/icon/emergency24.json +1 -0
- package/assets/components/assets/icon/emergency24F.json +1 -0
- package/assets/components/assets/icon/emergency32.json +1 -0
- package/assets/components/assets/icon/emergency32F.json +1 -0
- package/assets/components/assets/icon/eyedropper16.json +1 -1
- package/assets/components/assets/icon/eyedropper24.json +1 -1
- package/assets/components/assets/icon/eyedropper32.json +1 -1
- package/assets/components/assets/icon/featureDetailsSet16.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet24.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet32.json +1 -0
- package/assets/components/assets/icon/fileBim16.json +1 -0
- package/assets/components/assets/icon/fileBim24.json +1 -0
- package/assets/components/assets/icon/fileBim32.json +1 -0
- package/assets/components/assets/icon/fileDwg16.json +1 -0
- package/assets/components/assets/icon/fileDwg24.json +1 -0
- package/assets/components/assets/icon/fileDwg32.json +1 -0
- package/assets/components/assets/icon/fileRvt16.json +1 -0
- package/assets/components/assets/icon/fileRvt24.json +1 -0
- package/assets/components/assets/icon/fileRvt32.json +1 -0
- package/assets/components/assets/icon/gradient16.json +1 -0
- package/assets/components/assets/icon/gradient24.json +1 -0
- package/assets/components/assets/icon/gradient32.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting16.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting24.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/publish16.json +1 -0
- package/assets/components/assets/icon/publish24.json +1 -0
- package/assets/components/assets/icon/publish32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32F.json +1 -0
- package/assets/components/assets/icon/velocityServer16.json +1 -0
- package/assets/components/assets/icon/velocityServer24.json +1 -0
- package/assets/components/assets/icon/velocityServer32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32F.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/003fd7745966fe03510c.js +1 -0
- package/assets/esri/core/workers/chunks/00bae4b7e179336e0362.js +1 -0
- package/assets/esri/core/workers/chunks/026d3fa331caec1ea3d2.js +1 -0
- package/assets/esri/core/workers/chunks/027c3ea756db68e51f0a.js +1 -0
- package/assets/esri/core/workers/chunks/{81b2985b83be8f8f1090.js → 02876e434dc91c42b2f4.js} +1 -1
- package/assets/esri/core/workers/chunks/041c372e98a6fba90b36.js +1 -0
- package/assets/esri/core/workers/chunks/0783890816bac45277b9.js +1 -0
- package/assets/esri/core/workers/chunks/07aac6245a0d1adbb2d4.js +1 -0
- package/assets/esri/core/workers/chunks/0839da55707f7c4cf780.js +1 -0
- package/assets/esri/core/workers/chunks/0b1454a77a6a682541dc.js +2 -0
- package/assets/esri/core/workers/chunks/{d82b543c96f09ded3bf9.js.LICENSE.txt → 0b1454a77a6a682541dc.js.LICENSE.txt} +6 -1
- package/assets/esri/core/workers/chunks/0c00e5e4bd18467bcecd.js +1 -0
- package/assets/esri/core/workers/chunks/{478879ba965798f61bf3.js → 0d96e39380fd84cea9ba.js} +1 -1
- package/assets/esri/core/workers/chunks/0dad0bca8d58b2c63d22.js +1 -0
- package/assets/esri/core/workers/chunks/0ef93722524620023f69.js +1 -0
- package/assets/esri/core/workers/chunks/{03e20ac54d6f141b5001.js → 11241781baaed346af52.js} +1 -1
- package/assets/esri/core/workers/chunks/127cd8fee3717a473fc5.js +1 -0
- package/assets/esri/core/workers/chunks/1286f41f245ef22b3a26.js +1 -0
- package/assets/esri/core/workers/chunks/161d60fdac2013c15543.js +1 -0
- package/assets/esri/core/workers/chunks/1661684357912726a72a.js +1 -0
- package/assets/esri/core/workers/chunks/168de44a789d1cecc1f8.js +1 -0
- package/assets/esri/core/workers/chunks/1961b59756933e0a82f2.js +1 -0
- package/assets/esri/core/workers/chunks/1c7183551f5269bdcf13.js +30 -0
- package/assets/esri/core/workers/chunks/1d9560eb8b21b9e76616.js +1 -0
- package/assets/esri/core/workers/chunks/1d9d7915cf7449e5d468.js +1 -0
- package/assets/esri/core/workers/chunks/{b364ec104dd59faa41b6.js → 1f82a0f134ea912fc686.js} +1 -1
- package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +1 -0
- package/assets/esri/core/workers/chunks/2171aaa147aa4d9fc5b5.js +1 -0
- package/assets/esri/core/workers/chunks/235cb82952a18ff8d206.js +1 -0
- package/assets/esri/core/workers/chunks/260d4571722cb1ff1366.js +1 -0
- package/assets/esri/core/workers/chunks/266ba61b72a278d93a26.js +1 -0
- package/assets/esri/core/workers/chunks/27b80c386cebadcaca3c.js +1 -0
- package/assets/esri/core/workers/chunks/29d3890a5a43d934067a.js +1 -0
- package/assets/esri/core/workers/chunks/{333a0038d782d8a34d58.js → 2abf124e2956e4f76688.js} +1 -1
- package/assets/esri/core/workers/chunks/2f17438d215bea3ce70f.js +1 -0
- package/assets/esri/core/workers/chunks/30e710ec4d22c43d4e7e.js +1 -0
- package/assets/esri/core/workers/chunks/356cb86606b8c674f947.js +1 -0
- package/assets/esri/core/workers/chunks/3697e51e1e4cf442f39a.js +1 -0
- package/assets/esri/core/workers/chunks/398e0dd2bc7e1ab84831.js +1 -0
- package/assets/esri/core/workers/chunks/3a58708217a9c11836ab.js +1 -0
- package/assets/esri/core/workers/chunks/3b1052aa30af3f6186cc.js +1 -0
- package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +1 -0
- package/assets/esri/core/workers/chunks/3cd9bd20e75ba4d5b294.js +1 -0
- package/assets/esri/core/workers/chunks/3e87e3ad857d72f6ecbb.js +1 -0
- package/assets/esri/core/workers/chunks/3ea5a18b264628dc37f0.js +1 -0
- package/assets/esri/core/workers/chunks/41809c16544ec25120fa.js +1 -0
- package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +1 -0
- package/assets/esri/core/workers/chunks/427dec43ef2d67467699.js +1 -0
- package/assets/esri/core/workers/chunks/42e483fde18f12da32a6.js +1 -0
- package/assets/esri/core/workers/chunks/43ab44d37bc0ea97ef98.js +1 -0
- package/assets/esri/core/workers/chunks/{746b3e98bad32c366a27.js → 444f0f51b3ee0b9845a5.js} +1 -1
- package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +1 -0
- package/assets/esri/core/workers/chunks/47f2113357b2aa4f4f37.js +1 -0
- package/assets/esri/core/workers/chunks/488ed9584b527ec47be3.js +1 -0
- package/assets/esri/core/workers/chunks/4ad32580e0c0699fde1f.js +1 -0
- package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +1 -0
- package/assets/esri/core/workers/chunks/{f209a7076d67cbf4d205.js → 4e676e888a935c507d90.js} +1 -1
- package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +1 -0
- package/assets/esri/core/workers/chunks/50d5d6654ada9f28345d.js +1 -0
- package/assets/esri/core/workers/chunks/54c6e870262469d0d702.js +1 -0
- package/assets/esri/core/workers/chunks/54d07eadf113f0e4e506.js +1 -0
- package/assets/esri/core/workers/chunks/54ed37ec9682ea739deb.js +1 -0
- package/assets/esri/core/workers/chunks/55369c5bd65bcaf78da1.js +1 -0
- package/assets/esri/core/workers/chunks/56fd3da911c2c4511e5d.js +1 -0
- package/assets/esri/core/workers/chunks/58c79e15ca95238a4b43.js +1 -0
- package/assets/esri/core/workers/chunks/59592bb25f226865e88a.js +1 -0
- package/assets/esri/core/workers/chunks/5a4d7ba6dc1d4b41d80d.js +1 -0
- package/assets/esri/core/workers/chunks/5d55b4449bcb24cd72b6.js +1 -0
- package/assets/esri/core/workers/chunks/5d8fe41a3c06ddb4094b.js +1 -0
- package/assets/esri/core/workers/chunks/5ef37f37e405b3bb5450.js +1 -0
- package/assets/esri/core/workers/chunks/608d707fd9d9f9088473.js +1 -0
- package/assets/esri/core/workers/chunks/61ef14e42bc09b787d89.js +1 -0
- package/assets/esri/core/workers/chunks/628f56c09838eb9c573b.js +1 -0
- package/assets/esri/core/workers/chunks/656d6963e8f837fbf28f.js +1 -0
- package/assets/esri/core/workers/chunks/68b47a5a50e0b5fffca2.js +1 -0
- package/assets/esri/core/workers/chunks/6a0352d20596ca3f4b64.js +1 -0
- package/assets/esri/core/workers/chunks/6c7ff968bd4fc816442d.js +1 -0
- package/assets/esri/core/workers/chunks/6dac8dfcd63fc757ae2d.js +1 -0
- package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +1 -0
- package/assets/esri/core/workers/chunks/6e70e922331704b92a08.js +1 -0
- package/assets/esri/core/workers/chunks/6ea8b0d68881d16a2432.js +1 -0
- package/assets/esri/core/workers/chunks/6f67c9f68101a084b683.js +30 -0
- package/assets/esri/core/workers/chunks/6f9ea461c268c421f9c9.js +1 -0
- package/assets/esri/core/workers/chunks/7027d93dc5a4595d70c6.js +1 -0
- package/assets/esri/core/workers/chunks/70b35b2446558d5280e3.js +1 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/7349cb45a93e6916f115.js +1 -0
- package/assets/esri/core/workers/chunks/74be994d789c57031631.js +1 -0
- package/assets/esri/core/workers/chunks/751609831b283903ba48.js +1 -0
- package/assets/esri/core/workers/chunks/76edaeaf8fe344bb77a8.js +1 -0
- package/assets/esri/core/workers/chunks/76fe5b821d6b54db5721.js +1 -0
- package/assets/esri/core/workers/chunks/7bacdd65a6cc4d284e0a.js +2 -0
- package/assets/esri/core/workers/chunks/7c7c11c0fde8b63e330b.js +1 -0
- package/assets/esri/core/workers/chunks/7e6ccf9f3e756186e93e.js +1 -0
- package/assets/esri/core/workers/chunks/81d30c9062ad0120a863.js +1 -0
- package/assets/esri/core/workers/chunks/824051af00e7a1f05ed0.js +1 -0
- package/assets/esri/core/workers/chunks/84772b023d04e415f17f.js +1 -0
- package/assets/esri/core/workers/chunks/85edbb072a2ce6c1bb30.js +2 -0
- package/assets/esri/core/workers/chunks/{2d2c10c31cc1460dd96a.js → 88827e23f8938342781c.js} +1 -1
- package/assets/esri/core/workers/chunks/88b480a1d1fb01778798.js +267 -0
- package/assets/esri/core/workers/chunks/88c5f7c712c6b89b5109.js +1 -0
- package/assets/esri/core/workers/chunks/88e469b82d2594f23649.js +1 -0
- package/assets/esri/core/workers/chunks/8a14e3db28c403b046cf.js +1 -0
- package/assets/esri/core/workers/chunks/8a48a6760c33ed50b650.js +1 -0
- package/assets/esri/core/workers/chunks/8a664451845a47048859.js +1 -0
- package/assets/esri/core/workers/chunks/8a8242e7cc7e6a9e7876.js +1 -0
- package/assets/esri/core/workers/chunks/8acee3fba488f202f82f.js +1 -0
- package/assets/esri/core/workers/chunks/8b73f4d2f99c0b54cced.js +1 -0
- package/assets/esri/core/workers/chunks/91a0227a64a944af3286.js +596 -0
- package/assets/esri/core/workers/chunks/943cf0653a2b7de16a4f.js +1 -0
- package/assets/esri/core/workers/chunks/9444ed8ea117861ae89b.js +1 -0
- package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +1 -0
- package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +1 -0
- package/assets/esri/core/workers/chunks/9a38fd68b02b617c45d3.js +1 -0
- package/assets/esri/core/workers/chunks/{e0a63b5861e8c975097e.js → 9aaf78b831f8739bc127.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d378d4e021a33b0047e.js → 9be4438ce2c7180adadf.js} +1 -1
- package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +1 -0
- package/assets/esri/core/workers/chunks/9f4b97204def91567e3c.js +1 -0
- package/assets/esri/core/workers/chunks/a169d9fe66b5865911d9.js +1 -0
- package/assets/esri/core/workers/chunks/a37c28e3c4a2be9fd1d5.js +1 -0
- package/assets/esri/core/workers/chunks/a37fc886227365f7ecd5.js +1 -0
- package/assets/esri/core/workers/chunks/a5d8d6f3c0c8de474efd.js +1 -0
- package/assets/esri/core/workers/chunks/a65d576e90179a2b5400.js +1 -0
- package/assets/esri/core/workers/chunks/a8d7f59927bdad564141.js +1 -0
- package/assets/esri/core/workers/chunks/{678c9f15712cf3d3bb9e.js → aa1a3a849aba84cf585b.js} +1 -1
- package/assets/esri/core/workers/chunks/abc06d10c7ac8ba5b0e4.js +1 -0
- package/assets/esri/core/workers/chunks/abe22ae8ee0dcc9efbb7.js +1 -0
- package/assets/esri/core/workers/chunks/ae0a572cbbdd9815ee2e.js +1 -0
- package/assets/esri/core/workers/chunks/af5db0372d526e592fcc.js +1 -0
- package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +1 -0
- package/assets/esri/core/workers/chunks/b2983f521d8c96becd8a.js +1 -0
- package/assets/esri/core/workers/chunks/{915a5e8aecf25f3bc72b.js → b475f5492c6e3fd4cca8.js} +1 -1
- package/assets/esri/core/workers/chunks/b495f14d90abe8d1a558.js +1 -0
- package/assets/esri/core/workers/chunks/{f11ea0d3de93ec0392af.js → b54b7cc6b23a70fed700.js} +1 -1
- package/assets/esri/core/workers/chunks/b702279c48f3009f6dd8.js +1 -0
- package/assets/esri/core/workers/chunks/b79058f5bda6fcac22f8.js +1 -0
- package/assets/esri/core/workers/chunks/b801631b58e6fc6cec8a.js +1 -0
- package/assets/esri/core/workers/chunks/b92794def31592a6a25f.js +1 -0
- package/assets/esri/core/workers/chunks/bc53ce9a643f82d516c2.js +1 -0
- package/assets/esri/core/workers/chunks/be1d6a571f76933dfbb0.js +1 -0
- package/assets/esri/core/workers/chunks/bea70be8e38b8c83ccd2.js +1 -0
- package/assets/esri/core/workers/chunks/bfcdc5c315131aae34d8.js +1 -0
- package/assets/esri/core/workers/chunks/c0f624a2ca0d07ef8f8c.js +1 -0
- package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +1 -0
- package/assets/esri/core/workers/chunks/c1838822b096d5f36a8b.js +1 -0
- package/assets/esri/core/workers/chunks/c3381b9a36299210ee47.js +1 -0
- package/assets/esri/core/workers/chunks/c46a4adea39636a96d03.js +1 -0
- package/assets/esri/core/workers/chunks/{c2882a9e67124b7c18be.js → c503c79ba5761f7abbeb.js} +1 -1
- package/assets/esri/core/workers/chunks/c6030271bd6d39b6e1db.js +1 -0
- package/assets/esri/core/workers/chunks/c9065cee85eb8dde6a42.js +1 -0
- package/assets/esri/core/workers/chunks/c961aff385e38b081204.js +1 -0
- package/assets/esri/core/workers/chunks/cb5e4b9b4a59c2622eb5.js +1 -0
- package/assets/esri/core/workers/chunks/cca095f0c623e037002d.js +1 -0
- package/assets/esri/core/workers/chunks/ce2aa75e084ee56f5e29.js +1 -0
- package/assets/esri/core/workers/chunks/cf826787ab8d4b27ad80.js +1 -0
- package/assets/esri/core/workers/chunks/d05a7ce6c1d4b883ed4c.js +30 -0
- package/assets/esri/core/workers/chunks/d201a5dff18a5bb467ab.js +1 -0
- package/assets/esri/core/workers/chunks/d2aa75816e84b1e7fd25.js +1 -0
- package/assets/esri/core/workers/chunks/d4a9eb4470cc6a1f67fc.js +2 -0
- package/assets/esri/core/workers/chunks/{8ccf2f65d8ed3c48ffff.js → d950d5c2844206502ff0.js} +1 -1
- package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +1 -0
- package/assets/esri/core/workers/chunks/db588bf3256e95c977b7.js +1 -0
- package/assets/esri/core/workers/chunks/dbc9249dae41096d750d.js +1 -0
- package/assets/esri/core/workers/chunks/dcc719e15b2e0cce1f3b.js +1 -0
- package/assets/esri/core/workers/chunks/{6bb090f3e5c18604cb39.js → dd5b362bded458afa2d6.js} +1 -1
- package/assets/esri/core/workers/chunks/de583214195eff13cb00.js +1140 -0
- package/assets/esri/core/workers/chunks/dec6d41d614105e6fd93.js +1 -0
- package/assets/esri/core/workers/chunks/df8143b72ef94806c992.js +1 -0
- package/assets/esri/core/workers/chunks/dfdd474fddcd1d6091ce.js +1 -0
- package/assets/esri/core/workers/chunks/e0b47b08ae2c36c76fa2.js +1 -0
- package/assets/esri/core/workers/chunks/e235ea4293d5d463acfb.js +1 -0
- package/assets/esri/core/workers/chunks/e43486113aaf72ac4dc1.js +1 -0
- package/assets/esri/core/workers/chunks/ea4c3393c5757e309a71.js +1 -0
- package/assets/esri/core/workers/chunks/ed216ddeb7f59f510bd0.js +1 -0
- package/assets/esri/core/workers/chunks/ef8886dff54063928bcb.js +1 -0
- package/assets/esri/core/workers/chunks/f05932aea4eb267cba4d.js +1 -0
- package/assets/esri/core/workers/chunks/f09a41ad239d467d9438.js +2 -0
- package/assets/esri/core/workers/chunks/f1673e723b336204ad77.js +1 -0
- package/assets/esri/core/workers/chunks/f5223ffb3be548c9b0a1.js +1 -0
- package/assets/esri/core/workers/chunks/f52443cd203e687551da.js +1 -0
- package/assets/esri/core/workers/chunks/f6912532aae1638cbe8f.js +1 -0
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
- package/assets/esri/core/workers/chunks/ffcd4fca7f67e1f943f1.js +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/CheckerBoard.glsl.js +3 -5
- package/chunks/ColorMaterial.glsl.js +4 -6
- package/chunks/ComponentShader.glsl.js +42 -44
- package/chunks/DefaultMaterial.glsl.js +21 -23
- package/chunks/EdgeShader.glsl.js +9 -11
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/ImageMaterial.glsl.js +5 -7
- package/chunks/LineCallout.glsl.js +9 -12
- package/chunks/LineMarker.glsl.js +24 -26
- package/chunks/OITDim.glsl.js +3 -4
- package/chunks/Path.glsl.js +15 -17
- package/chunks/Pattern.glsl.js +25 -27
- package/chunks/RealisticTree.glsl.js +11 -13
- package/chunks/RibbonLine.glsl.js +42 -45
- package/chunks/ShadedColorMaterial.glsl.js +8 -9
- package/chunks/Water.glsl.js +18 -20
- package/config.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/triangulationUtilsDeprecated.js +1 -1
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/FlatFeature.js +1 -1
- package/layers/graphics/FlatFeatureSet.js +1 -1
- package/layers/graphics/OptimizedFeature.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/labelUtils.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +3 -3
- package/popup/Feature.d.ts +2 -0
- package/popup/Feature.js +1 -1
- package/popup/actions.js +1 -1
- package/popupTemplateUtils.js +2 -0
- package/renderers/visualVariables/SizeVariable.js +1 -1
- package/renderers/visualVariables/support/sizeVariableUtils.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/rest/support/OutDistance.js +2 -0
- package/rest/support/Query.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/support/renderInfoUtils/polygonDeprecated.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.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/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +20 -32
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +5 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SamplerRepository.js +2 -0
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/ViewAnimation.d.ts +2 -21
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/rasterHitTestUtils.js +2 -0
- package/views/video/VideoOperationalDataView.js +1 -1
- package/views/webgl/Sampler.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +19 -3
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/VisibleElements.d.ts +15 -1
- package/widgets/FeatureTable/VisibleElements.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +15 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/01be1315c60810651783.js +0 -1
- package/assets/esri/core/workers/chunks/0dd12d6af0cf7707109c.js +0 -2
- package/assets/esri/core/workers/chunks/0e2e4cb34ac6aac88ebf.js +0 -1
- package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +0 -1
- package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +0 -1
- package/assets/esri/core/workers/chunks/171cca726a763c770469.js +0 -1
- package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +0 -1
- package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +0 -1
- package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +0 -1
- package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +0 -1
- package/assets/esri/core/workers/chunks/1ae4e43a399e1974f106.js +0 -1
- package/assets/esri/core/workers/chunks/1c742bfe3b0aa51823d1.js +0 -1
- package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +0 -1
- package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +0 -1
- package/assets/esri/core/workers/chunks/205e957ffd7e95f530f7.js +0 -1
- package/assets/esri/core/workers/chunks/20e715e3aeb1c3265901.js +0 -1
- package/assets/esri/core/workers/chunks/210629f3c28d4339c655.js +0 -1
- package/assets/esri/core/workers/chunks/21a8e2a11ffacc226e2b.js +0 -1
- package/assets/esri/core/workers/chunks/27643750dce502fedef3.js +0 -1
- package/assets/esri/core/workers/chunks/29b1a4ce7646b403008e.js +0 -1
- package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +0 -1
- package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +0 -1
- package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +0 -1
- package/assets/esri/core/workers/chunks/3158a3487d3e8a61b680.js +0 -1
- package/assets/esri/core/workers/chunks/35217befc8f9882d139e.js +0 -1
- package/assets/esri/core/workers/chunks/38328a785365c4783b1e.js +0 -1
- package/assets/esri/core/workers/chunks/3a2ecb883fdb5c598544.js +0 -30
- package/assets/esri/core/workers/chunks/3eef3c2e94aa2a00d76a.js +0 -1
- package/assets/esri/core/workers/chunks/40d6ad030614099155cd.js +0 -1414
- package/assets/esri/core/workers/chunks/41396724040180d2537f.js +0 -1
- package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +0 -1
- package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +0 -1
- package/assets/esri/core/workers/chunks/453280ea87a696a4df81.js +0 -1
- package/assets/esri/core/workers/chunks/499b899bf88aaf29230d.js +0 -1
- package/assets/esri/core/workers/chunks/4b0d6309abf273f1f79f.js +0 -1
- package/assets/esri/core/workers/chunks/4e07827ab870c65377d3.js +0 -1
- package/assets/esri/core/workers/chunks/51852ef71ac04954fdae.js +0 -1
- package/assets/esri/core/workers/chunks/53b797e384be9628fc94.js +0 -1
- package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +0 -1
- package/assets/esri/core/workers/chunks/54c0306082d30d59cba2.js +0 -1
- package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +0 -1
- package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +0 -1
- package/assets/esri/core/workers/chunks/5a1d975b3e9e6b7eff67.js +0 -1
- package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +0 -1
- package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +0 -1
- package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +0 -1
- package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +0 -1
- package/assets/esri/core/workers/chunks/60d0f8a949b130baff81.js +0 -1
- package/assets/esri/core/workers/chunks/61778185d702da468b00.js +0 -1
- package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +0 -1
- package/assets/esri/core/workers/chunks/621ea864e2774f160d1c.js +0 -1
- package/assets/esri/core/workers/chunks/679086351352756b33c9.js +0 -1
- package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +0 -1
- package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +0 -1
- package/assets/esri/core/workers/chunks/6a567755b67c06d16f21.js +0 -1
- package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +0 -1
- package/assets/esri/core/workers/chunks/70263c2182dc43046742.js +0 -1
- package/assets/esri/core/workers/chunks/71326d16b5cc35c3ff7f.js +0 -1
- package/assets/esri/core/workers/chunks/73a045061e69a22b6869.js +0 -1
- package/assets/esri/core/workers/chunks/73e000cc3c4da10e9937.js +0 -1
- package/assets/esri/core/workers/chunks/75669912cddcb5db52c8.js +0 -1
- package/assets/esri/core/workers/chunks/78fbfc03d9b827c3f767.js +0 -1
- package/assets/esri/core/workers/chunks/7d0350f459844162d3a7.js +0 -1
- package/assets/esri/core/workers/chunks/7e39e9d4d68843b60e4c.js +0 -1
- package/assets/esri/core/workers/chunks/823127b23bec07e1f9d0.js +0 -2
- package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +0 -1
- package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +0 -1
- package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +0 -1
- package/assets/esri/core/workers/chunks/888f6387e795d45a7ad3.js +0 -2
- package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +0 -1
- package/assets/esri/core/workers/chunks/8969788c57bcc11bf77b.js +0 -1
- package/assets/esri/core/workers/chunks/8d6da6573d07385f4ed5.js +0 -1
- package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +0 -1
- package/assets/esri/core/workers/chunks/8fb336c2066113300d0d.js +0 -1
- package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +0 -1
- package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +0 -1
- package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +0 -1
- package/assets/esri/core/workers/chunks/9a235c92f21df2c17aa8.js +0 -1
- package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +0 -1
- package/assets/esri/core/workers/chunks/9d7ffd83f69d6e639f09.js +0 -1
- package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +0 -1
- package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +0 -1
- package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +0 -1
- package/assets/esri/core/workers/chunks/a061a17b62686f945e81.js +0 -1
- package/assets/esri/core/workers/chunks/a30815a0155a3b8790b4.js +0 -1
- package/assets/esri/core/workers/chunks/a43decc8ede8b4910553.js +0 -1
- package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +0 -1
- package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +0 -1
- package/assets/esri/core/workers/chunks/a520f83ae0c3c3e78858.js +0 -1
- package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +0 -1
- package/assets/esri/core/workers/chunks/a73e8b80760dc88f926f.js +0 -1
- package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +0 -1
- package/assets/esri/core/workers/chunks/aa7aaeae31ddb259e55e.js +0 -1
- package/assets/esri/core/workers/chunks/b014f0b2385dc82dc683.js +0 -2
- package/assets/esri/core/workers/chunks/b2120c4c56656be941ae.js +0 -1
- package/assets/esri/core/workers/chunks/b3950d5f1f3352521504.js +0 -1
- package/assets/esri/core/workers/chunks/b3f0600729227b458a75.js +0 -1
- package/assets/esri/core/workers/chunks/b8005b1996f42dee8237.js +0 -1
- package/assets/esri/core/workers/chunks/b85c9ceeece1bae67a16.js +0 -1
- package/assets/esri/core/workers/chunks/b8a11d32a4847513619b.js +0 -1
- package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +0 -1
- package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +0 -1
- package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +0 -1
- package/assets/esri/core/workers/chunks/bbdf27bc34fadbe8e6fe.js +0 -1
- package/assets/esri/core/workers/chunks/bc2c7cb99e227ddbd3a6.js +0 -1
- package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +0 -1
- package/assets/esri/core/workers/chunks/bcefdf9753d9d2f6f1be.js +0 -1
- package/assets/esri/core/workers/chunks/be42fe0b7ba0e27030b2.js +0 -1
- package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +0 -1
- package/assets/esri/core/workers/chunks/be61ea8e1883b915bbb1.js +0 -1
- package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +0 -1
- package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +0 -1
- package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +0 -1
- package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +0 -1
- package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +0 -1
- package/assets/esri/core/workers/chunks/c79827f879d1d58d3f1b.js +0 -1
- package/assets/esri/core/workers/chunks/c7ca47f5d4b2f3885239.js +0 -1
- package/assets/esri/core/workers/chunks/cb903ccbce87172a0757.js +0 -1
- package/assets/esri/core/workers/chunks/cda2e445eb2ac269abdf.js +0 -1
- package/assets/esri/core/workers/chunks/d024278a1c2aa7d22be3.js +0 -1
- package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +0 -1
- package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +0 -1
- package/assets/esri/core/workers/chunks/d4e55eb75fa4d3ac1e84.js +0 -1
- package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +0 -1
- package/assets/esri/core/workers/chunks/d635f97b7b82a37482d6.js +0 -1
- package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +0 -1
- package/assets/esri/core/workers/chunks/d816d1a4220d827faf63.js +0 -1
- package/assets/esri/core/workers/chunks/d82b543c96f09ded3bf9.js +0 -2
- package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +0 -1
- package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +0 -1
- package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +0 -1
- package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +0 -1
- package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +0 -1
- package/assets/esri/core/workers/chunks/e5801b0f3893d4d4f5b0.js +0 -1
- package/assets/esri/core/workers/chunks/e59f5dc8c85bcea66e98.js +0 -1
- package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +0 -1
- package/assets/esri/core/workers/chunks/e62d08f5488a74cbda82.js +0 -1
- package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +0 -1
- package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +0 -1
- package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +0 -1
- package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +0 -1
- package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +0 -1
- package/assets/esri/core/workers/chunks/edc2e87968c958bc852b.js +0 -1
- package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +0 -1
- package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +0 -1
- package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +0 -1
- package/assets/esri/core/workers/chunks/f09446b9ff937a84d6d3.js +0 -1
- package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +0 -1
- package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +0 -1
- package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +0 -1
- package/assets/esri/core/workers/chunks/f9cde38cb56c547e87e5.js +0 -1
- package/assets/esri/core/workers/chunks/fb9a889ec9fd23739a14.js +0 -1
- package/assets/esri/core/workers/chunks/fc64ae69581e4c38fa8a.js +0 -1
- package/assets/esri/core/workers/chunks/fd6bbe47773bbd9f7dd9.js +0 -1
- package/assets/esri/core/workers/chunks/fe1b67ab7748a3aef231.js +0 -1
- package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +0 -1
- package/chunks/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +0 -8
- package/views/3d/webgl-engine/effects/fboFormatUtils.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +0 -2
- /package/assets/esri/core/workers/chunks/{0dd12d6af0cf7707109c.js.LICENSE.txt → 7bacdd65a6cc4d284e0a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{823127b23bec07e1f9d0.js.LICENSE.txt → 85edbb072a2ce6c1bb30.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{888f6387e795d45a7ad3.js.LICENSE.txt → d4a9eb4470cc6a1f67fc.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b014f0b2385dc82dc683.js.LICENSE.txt → f09a41ad239d467d9438.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 t}from"tslib";import e from"../../../../../core/Accessor.js";import{resizeFilled as r}from"../../../../../core/arrayUtils.js";import{deg2rad as o}from"../../../../../core/mathUtils.js";import{abortMaybe as s}from"../../../../../core/maybe.js";import{debounce as i,throwIfAborted as n}from"../../../../../core/promiseUtils.js";import{valueInUnit as a}from"../../../../../core/quantity.js";import{lengthUnitFromSpatialReference as l,areaUnitFromSpatialReference as d}from"../../../../../core/units.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import{e as m}from"../../../../../chunks/earcut.js";import{set as c}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as _,set as g,cross as f,subtract as P,dot as j,scale as x,add as v}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as C}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import y from"../../../../../geometry/Polygon.js";import R from"../../../../../geometry/SpatialReference.js";import{isPCPF as U}from"../../../../../geometry/spatialReferenceEllipsoidUtils.js";import{i as W,e as M}from"../../../../../chunks/simplifyOperator.js";import{projectDirection as D}from"../../../../../geometry/projection/projectDirection.js";import{projectPointToVector as A}from"../../../../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as V}from"../../../../../geometry/projection/projectVectorToVector.js";import{compactIndices as b}from"../../../../../geometry/support/Indices.js";import{Sphere as F}from"../../../../../geometry/support/sphere.js";import{triangulate as S}from"../../../../../geometry/support/triangulationUtilsDeprecated.js";import{bestFitPlane as I,planePointDistance as T,boundingSphere as O}from"../../support/measurementUtils.js";import{getElevationAtPoint as k}from"../../../support/ElevationProvider.js";import{midpoint3d as z,makeOrthonormal as q}from"../../../support/mathUtils.js";import{flatten2DVertexDataToArray as E}from"../../../../support/euclideanAreaMeasurementUtils.js";import{computeEuclideanMeasurementSR as H}from"../../../../support/measurementUtils.js";import{MeasurementWorkerHandle as L}from"../../../../support/MeasurementWorkerHandle.js";import{autoMeasurementMode as B}from"../../../../support/measurementWorkerUtils.js";class G{constructor(t){this.positionsWorld=[],this.positionsRender=[],this.positionsFittedRender=[],this.positionsFittedRenderComplex=[],this.positionsFittedWorldPlaneProjectedComplex=[],this.triangleIndices=null,this.areaPolygon=new y({rings:[[]],spatialReference:t}),this.positionsFittedWorldPlaneProjected=this.areaPolygon.rings[0],this.trianglePositions=this.positionsFittedRender,this.triangleUvs=this.positionsFittedWorldPlaneProjected}}class Z{constructor(t,e=null,r=null,o=null,s=null,i=null,n=null){this.mode=t,this.area=e,this.geodesicArea=r,this.perimeter=o,this.geodesicPerimeter=s,this.areaCentroidRenderCoords=i,this.geodesicAreaCentroidRenderCoords=n}}let J=class extends e{get numVertices(){return this._length}get hasStagedVertex(){return null!=this._lastCursorPoint}get fittingMode(){return this._fittingMode}get measurements(){return this._measurements}get updateId(){return this._updateId}constructor(t){super(t),this._length=0,this._lastCursorPoint=null,this._fittingMode=null,this._measurements=null,this._updateId=0,this._centroidRenderCoords=w(),this._planeWorldCoords=C(),this._worldUp=w(),this._worldTangent=w(),this._frame=[w(),w(),w()],this._worldOrigin=w(),this._updateAxisU=w(),this._updateAxisV=w(),this._updateWorldOrigin=w(),this._lastPathVersion=-1,this._mode=null,this._tempU=w(),this._tempV=w(),this._tempVec3=w(),this._tempSphere=new F,this._measurementWorker=new L({preloadGeodetic:!0}),this._updateAbortController=null,this._updateMeasurements=i(async(t,e,r,o,s,i)=>{const a=t.spatialReference,l=0===B(a);_(this._updateAxisU,this._frame[0]),_(this._updateAxisV,this._frame[1]),_(this._updateWorldOrigin,this._worldOrigin);const d=(e,r)=>(e&&t.renderCoordsHelper.toRenderCoords(e,r)||g(r,0,0,0),r),h=e.areaMeasurement?.geometry,p=l&&1!==r&&h?await this._measurementWorker.geodeticLength(h,{stagedPoint:o?s:null}):null;n(i);const m=this._calculateMode(r,p),c="geodesic"===m,[u,f]=await Promise.all([c?null:this._measurementWorker.area2D(this.vertexData.areaPolygon,{unit:this._areaMeasurementUnit,lengthUnit:this._lengthMeasurementUnit,returnCentroid:!0,returnLength:!0}),c&&h?await this._measurementWorker.geodeticArea(h,{stagedPoint:o?s:null,returnCentroid:!0}):null]);n(i);const P=c?null:w();P&&u?.centroid&&this._projectWorldPlaneProjectedPointToRender(P,this._updateWorldOrigin,[u.centroid?.x??0,u.centroid?.y??0],this._updateAxisU,this._updateAxisV,this.view.renderSpatialReference,this._measurementSR);const j=f?.centroid?d(f.centroid,w()):null;this._measurements=new Z(m,c?null:u?.area,c?f?.area:null,c?null:u?.length,c?p:null,c?null:P,c?j:null)});const e=H(t.view.spatialReference);this._measurementSR=e,this._lengthMeasurementUnit=l(e)??"meters",this._areaMeasurementUnit=d(e)??"square-meters";const r=U(e)?R.WebMercator:e;this.vertexData=new G(r)}destroy(){this._measurementWorker.destroy()}update(t,e,r,o,s,i,n){const a=this._lastPathVersion===t.version,l=e?e.equals(this._lastCursorPoint):null==this._lastCursorPoint,d=this._mode===s;return!(a&&!i&&d&&l)&&(this._lastPathVersion=t.version,this._lastCursorPoint=e,this._update(t,e,r,o,s,n),!0)}_update(t,e,r,o,i,n){const a=this.view.renderSpatialReference,l=this._measurementSR;let d=t.numVertices;const h=!(null==e||e.equals(t.lastPoint)||d>2&&e.equals(t.firstPoint)||t.polygonIsClosed);h&&(d+=1);const p=!t.polygonIsClosed&&d>2,m=t.polygonIsClosed||p;this._resize(d);const{positionsWorld:c,positionsRender:u}=this.vertexData,_=(t,e)=>{K(r.elevationProvider,t),A(t,c[e],l),A(t,u[e],a)};if(t.forEachVertexPosition((t,e)=>_(t,e)),h&&_(e,d-1),this.vertexData.areaPolygon.clearCache(),!m)return this._measurements=null,this.vertexData.triangleIndices=null,this._updateId++,void(this._updateAbortController=s(this._updateAbortController));this._updateVertexData(r,a,l,o),this._updateId++,this._updateAbortController??=new AbortController,n.consumePromise(this._updateMeasurements(r,t,i,h,e,this._updateAbortController.signal))}_resize(t){const{positionsWorld:e,positionsRender:o,positionsFittedWorldPlaneProjected:s,positionsFittedRender:i}=this.vertexData;r(e,t,w),r(o,t,w),r(s,t,u),r(i,t,w),this._length=t}_updateVertexData(t,e,r,o){const s=t.renderCoordsHelper,{positionsWorld:i,positionsRender:n}=this.vertexData,a=this._planeWorldCoords,l=this._centroidRenderCoords;z(n,l),s.worldUpAtPosition(l,this._worldUp),s.worldBasisAtPosition(l,0,this._worldTangent),D(l,this._worldUp,e,this._worldUp,r),D(l,this._worldTangent,e,this._worldTangent,r),i.length>2&&I(i,a),this._fittingMode=this._selectFittingMode(a,i,this._worldUp,o);let d=0;if("horizontal"===this._fittingMode){let t=-1/0;n.forEach((e,r)=>{const o=s.getAltitude(n[r]);o>t&&(t=o,d=r)})}const{_worldOrigin:h}=this;_(this._worldOrigin,i[d]);let p=a,m=this._worldTangent;"horizontal"===this._fittingMode?p=this._worldUp:"vertical"===this._fittingMode&&(p=this._tempVec3,m=this._worldUp,q(a,this._worldUp,p));const u=this._frame[0],g=this._frame[1];_(this._frame[2],p),q(m,p,u),f(g,u,this._frame[2]);const{positionsFittedRender:x,positionsFittedWorldPlaneProjected:v}=this.vertexData,w=this._tempVec3;for(let _=0;_<this._length;++_){const t=v[_],o=x[_];P(w,i[_],h),c(t,j(u,w),j(g,w)),this._projectWorldPlaneProjectedPointToRender(o,h,t,u,g,e,r)}this._triangulate(new Q(h,u,g,e,r))}_triangulate(t){!W(this.vertexData.areaPolygon)&&this._triangulateComplexPolygon(t)||this._triangulateSimplePolygon()}_triangulateSimplePolygon(){const{positionsFittedWorldPlaneProjected:t}=this.vertexData;this.vertexData.triangleIndices=b(m(E(t),[],2)),this.vertexData.trianglePositions=this.vertexData.positionsFittedRender,this.vertexData.triangleUvs=t,this.vertexData.positionsFittedWorldPlaneProjectedComplex.length=0,this.vertexData.positionsFittedRenderComplex.length=0}_triangulateComplexPolygon({worldOrigin:t,axisU:e,axisV:o,renderSR:s,worldSR:i}){const{positionsFittedWorldPlaneProjectedComplex:n,positionsFittedRenderComplex:a,areaPolygon:l}=this.vertexData,d=M(l);if(!d)return!1;const{position:h,faces:p}=S(d),m=h.length/3;r(n,m,u),r(a,m,w);for(let r=0,u=0;r<h.length;r+=3,u++){const l=n[u];c(l,h[r],h[r+1]);const d=a[u];this._projectWorldPlaneProjectedPointToRender(d,t,l,e,o,s,i)}return this.vertexData.triangleIndices=p,this.vertexData.trianglePositions=a,this.vertexData.triangleUvs=n,!0}_projectWorldPlaneProjectedPointToRender(t,e,r,o,s,i,n){const a=this._tempU,l=this._tempV;x(a,o,r[0]),x(l,s,r[1]),v(t,a,l),v(t,t,e),V(t,n,t,i)}_selectFittingMode(t,e,r,s){const i=e.map(e=>Math.abs(T(t,e))).reduce((t,e)=>Math.max(t,e),0);O(e,this._tempSphere);const n=i/(2*this._tempSphere.radius),a=n<s.maxRelativeErrorCoplanar,l=n<s.maxRelativeErrorAlmostCoplanar;let d="horizontal";if(a)d="oblique";else if(l){d=Math.abs(j(r,t))>Math.cos(o(s.verticalAngleThreshold))?"horizontal":"vertical"}return d}_calculateMode(t,e){return null!=e&&0===t?a(e,"meters")>N?"geodesic":"euclidean":null==e||1===t?"euclidean":"geodesic"}};function K(t,e){e.hasZ||(e.z=k(t,e,"ground")??0)}t([h()],J.prototype,"_measurements",void 0),t([h()],J.prototype,"_updateId",void 0),t([h()],J.prototype,"view",void 0),J=t([p("esri.views.3d.analysis.AreaMeasurement.support.MeasurementData")],J);const N=1e5;class Q{constructor(t,e,r,o,s){this.worldOrigin=t,this.axisU=e,this.axisV=r,this.renderSR=o,this.worldSR=s}}export{Z as AreaMeasurementQuantities,J as MeasurementData};
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{resizeFilled as r}from"../../../../../core/arrayUtils.js";import{deg2rad as s}from"../../../../../core/mathUtils.js";import{abortMaybe as i}from"../../../../../core/maybe.js";import{debounce as o,throwIfAborted as n,isPromiseLike as a}from"../../../../../core/promiseUtils.js";import{valueInUnit as l}from"../../../../../core/quantity.js";import{lengthUnitFromSpatialReference as d,areaUnitFromSpatialReference as h}from"../../../../../core/units.js";import{property as p}from"../../../../../core/accessorSupport/decorators/property.js";import{subclass as u}from"../../../../../core/accessorSupport/decorators/subclass.js";import{set as c}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as _,set as g,cross as f,subtract as P,dot as j,scale as y,add as v}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as R}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as x}from"../../../../../core/support/UpdatingHandles.js";import U from"../../../../../geometry/Polygon.js";import C from"../../../../../geometry/SpatialReference.js";import{isPCPF as A}from"../../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectDirection as S}from"../../../../../geometry/projection/projectDirection.js";import{projectPointToVector as M}from"../../../../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as W}from"../../../../../geometry/projection/projectVectorToVector.js";import{Sphere as V}from"../../../../../geometry/support/sphere.js";import{bestFitPlane as b,planePointDistance as D,boundingSphere as T}from"../../support/measurementUtils.js";import{getElevationAtPoint as I}from"../../../support/ElevationProvider.js";import{midpoint3d as L,makeOrthonormal as F}from"../../../support/mathUtils.js";import{polygonToRenderInfoNotElevationAligned as O}from"../../../support/renderInfoUtils/polygon.js";import{computeEuclideanMeasurementSR as H}from"../../../../support/measurementUtils.js";import{MeasurementWorkerHandle as k}from"../../../../support/MeasurementWorkerHandle.js";import{autoMeasurementMode as z}from"../../../../support/measurementWorkerUtils.js";class q{constructor(t){this.positionsWorld=[],this.positionsRender=[],this.positionsFittedRender=[],this.triangleIndices=null,this.areaPolygon=new U({rings:[[]],spatialReference:t}),this.positionsFittedWorldPlaneProjected=this.areaPolygon.rings[0],this.trianglePositions=this.positionsFittedRender,this.triangleUvs=this.positionsFittedWorldPlaneProjected}}class E{constructor(t,e=null,r=null,s=null,i=null,o=null,n=null){this.mode=t,this.area=e,this.geodesicArea=r,this.perimeter=s,this.geodesicPerimeter=i,this.areaCentroidRenderCoords=o,this.geodesicAreaCentroidRenderCoords=n}}let B=class extends e{get numVertices(){return this._length}get hasStagedVertex(){return null!=this._lastCursorPoint}get fittingMode(){return this._fittingMode}get measurements(){return this._measurements}get updating(){return this._updatingHandles.updating}get renderSpatialReference(){return this.view.renderSpatialReference}get updateId(){return this._updateId}constructor(t){super(t),this._length=0,this._lastCursorPoint=null,this._lastPath=null,this._lastPathVersion=-1,this._lastMode=null,this._updatingHandles=new x,this._fittingMode=null,this._measurements=null,this._updateId=0,this._centroidRenderCoords=w(),this._planeWorldCoords=R(),this._worldUp=w(),this._worldTangent=w(),this._frame=[w(),w(),w()],this._worldOrigin=w(),this._updateAxisU=w(),this._updateAxisV=w(),this._updateWorldOrigin=w(),this._tempU=w(),this._tempV=w(),this._tempVec3=w(),this._tempSphere=new V,this._measurementWorker=new k({preloadGeodetic:!0}),this._retryAfterLoadScheduled=!1,this._updateAbortController=null,this._retryAfterTessellationLoad=()=>{if(this._retryAfterLoadScheduled=!1,this.destroyed)return;const t=this._lastPath,e=this._lastCursorPoint,r=this._lastMode;t&&null!=r&&this._update(t,e,r)},this._updateMeasurements=o(async(t,e,r,s,i)=>{const o=this.view.spatialReference,a=0===z(o);_(this._updateAxisU,this._frame[0]),_(this._updateAxisV,this._frame[1]),_(this._updateWorldOrigin,this._worldOrigin);const l=(t,e)=>(t&&this.view.renderCoordsHelper.toRenderCoords(t,e)||g(e,0,0,0),e),d=t.areaMeasurement?.geometry,h=a&&1!==e&&d?await this._measurementWorker.geodeticLength(d,{stagedPoint:r?s:null}):null;n(i);const p=this._calculateMode(e,h),u="geodesic"===p,[c,m]=await Promise.all([u?null:this._measurementWorker.area2D(this.vertexData.areaPolygon,{unit:this._areaMeasurementUnit,lengthUnit:this._lengthMeasurementUnit,returnCentroid:!0,returnLength:!0}),u&&d?await this._measurementWorker.geodeticArea(d,{stagedPoint:r?s:null,returnCentroid:!0}):null]);n(i);const f=u?null:w();f&&c?.centroid&&this._projectWorldPlaneProjectedPointToRender(f,this._updateWorldOrigin,[c.centroid?.x??0,c.centroid?.y??0],this._updateAxisU,this._updateAxisV,this.view.renderSpatialReference,this._measurementSR);const P=m?.centroid?l(m.centroid,w()):null;this._measurements=new E(p,u?null:c?.area,u?m?.area:null,u?null:c?.length,u?h:null,u?null:f,u?P:null)});const e=H(t.view.spatialReference);this._measurementSR=e,this._lengthMeasurementUnit=d(e)??"meters",this._areaMeasurementUnit=h(e)??"square-meters";const r=A(e)?C.WebMercator:e;this.vertexData=new q(r)}destroy(){this._measurementWorker.destroy(),this._updatingHandles.destroy()}update(t,e,r){const s=this._lastPathVersion===t.version,i=e?e.equals(this._lastCursorPoint):null==this._lastCursorPoint,o=this._lastMode===r;return!(s&&o&&i)&&(this._lastPath=t,this._lastPathVersion=t.version,this._lastCursorPoint=e,this._lastMode=r,this._update(t,e,r),!0)}_scheduleRetryAfterTessellationLoad(t){this._retryAfterLoadScheduled||(this._retryAfterLoadScheduled=!0,this._updatingHandles.consumePromise(t.then(()=>this._retryAfterTessellationLoad(),()=>{this._retryAfterLoadScheduled=!1})))}_update(t,e,r){const s=this._measurementSR;let o=t.numVertices;const n=!(null==e||e.equals(t.lastPoint)||o>2&&e.equals(t.firstPoint)||t.polygonIsClosed);n&&(o+=1);const a=!t.polygonIsClosed&&o>2,l=t.polygonIsClosed||a;this._resize(o);const{positionsWorld:d,positionsRender:h}=this.vertexData,p=(t,e)=>{G(this.view.elevationProvider,t),M(t,d[e],s),M(t,h[e],this.renderSpatialReference)};if(t.forEachVertexPosition((t,e)=>p(t,e)),n&&p(e,o-1),this.vertexData.areaPolygon.clearCache(),!l)return this._measurements=null,this.vertexData.triangleIndices=null,this._updateId++,void(this._updateAbortController=i(this._updateAbortController));this._updateVertexData()&&(this._updateId++,this._updateAbortController??=new AbortController,this._updatingHandles.consumePromise(this._updateMeasurements(t,r,n,e,this._updateAbortController.signal)))}_resize(t){const{positionsWorld:e,positionsRender:s,positionsFittedWorldPlaneProjected:i,positionsFittedRender:o}=this.vertexData;r(e,t,w),r(s,t,w),r(i,t,m),r(o,t,w),this._length=t}_updateVertexData(){const t=this._measurementSR,e=this.view.renderCoordsHelper,{positionsWorld:r,positionsRender:s}=this.vertexData,i=this._planeWorldCoords,o=this._centroidRenderCoords;L(s,o),e.worldUpAtPosition(o,this._worldUp),e.worldBasisAtPosition(o,0,this._worldTangent),S(o,this._worldUp,this.renderSpatialReference,this._worldUp,t),S(o,this._worldTangent,this.renderSpatialReference,this._worldTangent,t),r.length>2&&b(r,i),this._fittingMode=this._selectFittingMode(i,r,this._worldUp,this.fittingSettings);let n=0;if("horizontal"===this._fittingMode){let t=-1/0;s.forEach((r,i)=>{const o=e.getAltitude(s[i]);o>t&&(t=o,n=i)})}const{_worldOrigin:a}=this;_(this._worldOrigin,r[n]);let l=i,d=this._worldTangent;"horizontal"===this._fittingMode?l=this._worldUp:"vertical"===this._fittingMode&&(l=this._tempVec3,d=this._worldUp,F(i,this._worldUp,l));const h=this._frame[0],p=this._frame[1];_(this._frame[2],l),F(d,l,h),f(p,h,this._frame[2]);const{positionsFittedRender:u,positionsFittedWorldPlaneProjected:m}=this.vertexData,g=this._tempVec3;for(let _=0;_<this._length;++_){const e=m[_],s=u[_];P(g,r[_],a),c(e,j(h,g),j(p,g)),this._projectWorldPlaneProjectedPointToRender(s,a,e,h,p,this.renderSpatialReference,t)}return this._triangulate(new J(a,h,p,this.renderSpatialReference,t))}_triangulate(t){const{worldOrigin:e,axisU:s,axisV:i,renderSR:o,worldSR:n}=t,{areaPolygon:l}=this.vertexData,d=O(l);if(a(d))return this._scheduleRetryAfterTessellationLoad(d),!1;const h=d;if(null==h)return!0;const{positions:p,polygonIndices:u,vertexCount:_}=h,g=[],f=[];r(f,_,w),r(g,_,m);for(let r=0,a=0;r<p.length;r+=3,a++){const t=f[a],l=g[a];c(l,p[r],p[r+1]),this._projectWorldPlaneProjectedPointToRender(t,e,l,s,i,o,n)}return this.vertexData.trianglePositions=f,this.vertexData.triangleIndices=u,this.vertexData.triangleUvs=g,!0}_projectWorldPlaneProjectedPointToRender(t,e,r,s,i,o,n){const a=this._tempU,l=this._tempV;y(a,s,r[0]),y(l,i,r[1]),v(t,a,l),v(t,t,e),W(t,n,t,o)}_selectFittingMode(t,e,r,i){const o=e.map(e=>Math.abs(D(t,e))).reduce((t,e)=>Math.max(t,e),0);T(e,this._tempSphere);const n=o/(2*this._tempSphere.radius),a=n<i.maxRelativeErrorCoplanar,l=n<i.maxRelativeErrorAlmostCoplanar;let d="horizontal";if(a)d="oblique";else if(l){d=Math.abs(j(r,t))>Math.cos(s(i.verticalAngleThreshold))?"horizontal":"vertical"}return d}_calculateMode(t,e){return null!=e&&0===t?l(e,"meters")>Z?"geodesic":"euclidean":null==e||1===t?"euclidean":"geodesic"}};function G(t,e){e.hasZ||(e.z=I(t,e,"ground")??0)}t([p()],B.prototype,"_measurements",void 0),t([p()],B.prototype,"updating",null),t([p()],B.prototype,"renderSpatialReference",null),t([p()],B.prototype,"_updateId",void 0),t([p()],B.prototype,"view",void 0),t([p({constructOnly:!0})],B.prototype,"fittingSettings",void 0),B=t([u("esri.views.3d.analysis.AreaMeasurement.support.MeasurementData")],B);const Z=1e5;class J{constructor(t,e,r,s,i){this.worldOrigin=t,this.axisU=e,this.axisV=r,this.renderSR=s,this.worldSR=i}}export{E as AreaMeasurementQuantities,B as MeasurementData};
|
|
@@ -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}from"../../../../core/promiseUtils.js";import{createVolume as n}from"../../../../core/quantity.js";import{whenOnce as s,watch as a,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as u,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sqrDist as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as g,clone as f,create as y}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import v from"../../../../geometry/Multipoint.js";import{projectOrLoad as w}from"../../../../geometry/projectionUtils.js";import{e as j}from"../../../../chunks/containsOperator.js";import{e as E}from"../../../../chunks/convexHullOperator.js";import{e as b}from"../../../../chunks/simplifyOperator.js";import{e as R}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as x}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as C}from"../../../../geometry/projection/projectBoundingRect.js";import{fromExtent as T,intersects as G,create as L,empty as O}from"../../../../geometry/support/aaBoundingRect.js";import{isClockwise as D}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as P}from"../../../../geometry/support/DoubleArray.js";import{t as H}from"../../../../chunks/vec3.js";import M from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as V}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as I}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as U,VolumeMeasurementPerimeterTooLargeError as N,VolumeMeasurementUnsupportedCoordinateSystemError as k,VolumeMeasurementUnsupportedLayerTransparencyError as A}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as F}from"./VolumeMeasurementRawResult.js";import S from"./VolumeMeasurementResult.js";import{ElevationContext as W}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as z}from"../../support/ElevationProvider.js";import{polygonToRenderInfoElevationAligned as q}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as B}from"../../terrain/tileUtils.js";import{CutFillComputationRenderNode as Z,TargetGeometryRenderInfo as J}from"../../webgl-engine/lib/CutFillComputationRenderNode.js";import{isIntegratedMeshLayerView as K}from"../../../support/layerViewUtils.js";import{MeasurementWorkerHandle as Q}from"../../../support/MeasurementWorkerHandle.js";let X=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new Q,this._getElevationProvider=()=>this.view.elevationProvider,this.depthExtremaPositions=null,this._updatingHandles=new _,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new B,this._intersectingObbs=[],this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computationRenderNode.done)return;const{renderCoordsHelper:i}=this.view,n=new I({extent:t,localOrigin:r,renderCoordsHelper:i});this._computationRenderNode.update(n,o),this._determineDataCoverage(n);const[a]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),s(()=>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"===a.status?a.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 Z({view:e}),this.addHandles([this._createElevationUpdateHandle(),a(()=>({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))},l)])}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=b(e),r=w(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&V(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?g(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return Y(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,n=q(e,o,i,W.fromElevationInfo(new M({mode:"absolute-height"})));if(null==n)return null;const{positions:s,polygonIndices:a,vertexCount:l}=n,u=P(3*l),p=m(),c=m();return x(t.spatialReference,r,p,i.spatialReference),c[12]=-p[12],c[13]=-p[13],c[14]=-p[14],H(u,s,c),new J(u,a)}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 S({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=>K(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new U}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 N:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new N:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new k:null}get _unsupportedLayerTransparencyError(){return this.view.map.ground&&this.view.map.ground.opacity<1?new A: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=ee(te(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&&(C(e.extent,e.spatialReference,oe,this.view.spatialReference),T(t,ie),G(oe,ie)&&(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:s},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(s/t.height),p=$(t.cut.totalDepth,a,l)*u,m=$(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new F({cutVolume:n(Math.abs(p*c),"cubic-meters"),fillVolume:n(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,g=f(s);return 0!==d&&(h(g,g,l,r*(m/t.width-.5)),h(g,g,a,o*(c/t.height-.5))),h(g,g,u,-$(p,i,n)),g};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 v({spatialReference:o});if(this._intersectingObbs.forEach(e=>{if(re(e.radius,t)&&(e.getCorners(se),n.points.length=0,se.forEach(e=>{const t=r.fromRenderCoords(e,ae,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=E(n);"polygon"===e?.type&&i.push(e)}}),!i.length)return!1;const s=R(i);return!!s&&j(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;if(this._intersectingTiles.length=0,!e.extent)return;T(e.extent,ne);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(ne)?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=>re(t.radius*r,e))}};function Y(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=z(e,t,"ground")??0))}function $(e,t,r){return e*(r-t)+t}function ee(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+=c(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=c(r,t)),Math.sqrt(o)}function*te(e){const t=d();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([u()],X.prototype,"_projectedGeometry",null),e([u()],X.prototype,"_localOrigin",null),e([u()],X.prototype,"_getElevationProvider",void 0),e([u()],X.prototype,"elevationAlignedGeometry",null),e([u()],X.prototype,"targetGeometry",null),e([u()],X.prototype,"_targetGeometryRenderInfo",null),e([u({constructOnly:!0})],X.prototype,"analysis",void 0),e([u({constructOnly:!0})],X.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],X.prototype,"view",void 0),e([u()],X.prototype,"updating",null),e([u()],X.prototype,"result",null),e([u()],X.prototype,"depthExtremaPositions",void 0),e([u()],X.prototype,"error",null),e([u()],X.prototype,"_imLayerViewsAffectingMeasurement",null),e([u()],X.prototype,"_insufficientDataError",null),e([u()],X.prototype,"_perimeterTooLargeError",null),e([u()],X.prototype,"_perimeterTooLargeLocalError",null),e([u()],X.prototype,"_perimeterTooLargeGlobalError",null),e([u()],X.prototype,"_unsupportedCoordinateSystemError",null),e([u()],X.prototype,"_unsupportedLayerTransparencyError",null),e([u()],X.prototype,"_perimeterForError",null),e([u()],X.prototype,"_computationRenderNode",void 0),e([u({readOnly:!0})],X.prototype,"_updatingHandles",void 0),e([u()],X.prototype,"_rawResult",void 0),e([u()],X.prototype,"_sufficientDataCoverage",void 0),X=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],X);const re=(e,t)=>e<(t.width+t.height)/2,oe=O(),ie=O(),ne=L(),se=new Array(8).fill(0).map(()=>y()),ae=y();export{X 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{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 M}from"../../../../chunks/vec3.js";import V from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as I}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{isIntegratedMeshLayerView as Q}from"../../../support/layerViewUtils.js";import{MeasurementWorkerHandle as X}from"../../../support/MeasurementWorkerHandle.js";let Y=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new X,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&&I(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 V({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],M(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=>Q(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{formatDecimal as c,preferredVolumePrecision as u}from"../../../../core/quantityFormatUtils.js";import{watch as d,initial as m}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as h}from"../../../../core/units.js";import{property as p,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as _,normalize as f,subtract as v,cross as j,dot as L}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,fromValues as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as w}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{angleAroundAxis as G}from"../../../../geometry/support/vector.js";import{t as V}from"../../../../chunks/vec3.js";import P from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as x}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as R}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as O}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as M}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as A}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as D}from"../../layers/graphics/extrudeUtils.js";import{polygonToRenderInfoElevationAligned as F}from"../../support/renderInfoUtils/polygon.js";import{CutFillVisualizationRenderNode as E,VolumeGeometry as U}from"../../webgl-engine/lib/CutFillVisualizationRenderNode.js";import{createStipplePatternSimple as S}from"../../webgl-engine/materials/lineStippleUtils.js";let N=class extends r{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}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._elevationContext=A.fromElevationInfo(new P({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 O({...r,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new O(r);const n={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:3},l={...n,stipplePattern:S(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),c=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new R({...n,color:a}),this._occludedCutProjectionLines=new R({...l,color:a}),this._fillProjectionLines=new R({...n,color:c,renderOccluded:8}),this._occludedFillProjectionLines=new R({...l,color:c});const u={...i,attached:!0};this._cutVolumeLabel=new x({...u,distance:s.labelDistance}),this._fillVolumeLabel=new x({...u,distance:-s.labelDistance}),this._renderNode=new E({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([d(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},m),d(()=>({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},m),d(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),m),d(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},m),d(()=>[this.analysisViewData.targetGeometry,this._extrusionHeights,this._polygonRenderInfo],()=>this._updateCutFillGeometry(),m),d(()=>this.visible&&this.view.state.camera.aboveGround&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),m),d(()=>{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)),d(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),m),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()}_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=_(b(),o[0],o[1],o[2]);s.toRenderCoords(r,u,r);const n=t.rings[d][e],l=_(b(),n[0],n[1],n[2]);s.toRenderCoords(l,u,l);const a=new M(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 H(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:B(r,n.cutVolume,a)}),u=i(o.labels.fill,{volume:B(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;return null==i?null:F(i,t,e,this._elevationContext,{outlineOutput:"tessellated-indices"})}_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=C(o.x,o.y,0),n=b();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=b(),n=1===s.viewingMode;s.worldUpAtPosition(i,r);const{_polygonRenderInfo:l}=this;if(null==l)return null;const a=D(l,{height:e,worldUp:r,spherical:n,requireElevation:!1,requireNormals:!0,requireSizes:!1});if(null==a)return null;const c=y(),u=y();if(w(o,t,c,s.spatialReference),u[12]=-c[12],u[13]=-c[13],u[14]=-c[14],V(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 U(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 B(e,t,i){if(!t||!e)return null;const s=h(t.value,t.unit,i),o=u(s);return c(e,t,s,o)}e([p({constructOnly:!0})],N.prototype,"view",void 0),e([p({constructOnly:!0})],N.prototype,"analysis",void 0),e([p({constructOnly:!0})],N.prototype,"analysisViewData",void 0),e([p()],N.prototype,"unitsMessages",void 0),e([p()],N.prototype,"messages",void 0),e([p()],N.prototype,"loadingMessages",void 0),e([p({readOnly:!0})],N.prototype,"visible",null),e([p()],N.prototype,"updating",null),e([p()],N.prototype,"hasUnsupportedError",null),e([p()],N.prototype,"_extrusionHeights",null),e([p()],N.prototype,"_polygonRenderInfo",null),N=e([g("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],N);class H{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=b(),this._n2=b();const o=f(I,v(I,e.endRenderSpace,e.startRenderSpace));f(this._n1,j(this._n1,o,f(T,v(T,t.startRenderSpace,e.startRenderSpace)))),f(this._n2,j(this._n2,o,f(T,v(T,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=l.normalize(G(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){v(I,this.segment.startRenderSpace,e.eye);const t=L(this._n1,I)<0,i=L(this._n2,I)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const I=b(),T=b();export{N 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{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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{throwIfAborted as l,throwIfAbortError as a}from"../../../core/promiseUtils.js";import{syncAndInitial as n,initial as o}from"../../../core/reactiveUtils.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import p from"../../../core/sql/WhereClause.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{throwIfAborted as l,throwIfAbortError as a}from"../../../core/promiseUtils.js";import{syncAndInitial as n,initial as o}from"../../../core/reactiveUtils.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import p from"../../../core/sql/WhereClause.js";import{fallbackObjectIDAttribute as h}from"../../../layers/LayerConstants.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import y from"../../../layers/support/FeatureFilter.js";import{fixFields as c,unpackFieldNames as g,populateMissingFields as f}from"../../../layers/support/fieldUtils.js";import m from"../../../rest/support/Query.js";import{isNumber as F}from"../../../support/guards.js";import{BuildingSublayerView3DMixin as b}from"./BuildingSublayerView3D.js";import{I3SMeshView3D as _}from"./I3SMeshView3D.js";import{applyFilterMode as w}from"./i3s/BuildingFilterUtil.js";import{createGetFeatureExtent as E}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as x}from"./i3s/I3SMeshViewFilter.js";import{I3SQueryEngine as S}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as j,I3SQueryFeature as v}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as I}from"./i3s/I3SQueryFeatureStore.js";import{findFieldsCaseInsensitive as Q,getIndexCrs as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as L}from"./support/DefinitionExpressionSceneLayerView.js";import{TemporalSceneLayerView as R}from"./support/TemporalSceneLayerView.js";import O from"../../layers/BuildingComponentSublayerView.js";import{hasPopupTemplate as V,getRequiredFields as U,getFetchPopupTemplate as C}from"../../layers/support/popupUtils.js";import{isInEffectiveScaleRange as A}from"../../support/layerViewUtils.js";import{TaskPriority as H}from"../../support/Scheduler.js";let D=class extends(R(L(_(b(O))))){constructor(e){super(e),this.type="building-component-sublayer-3d",this._elevationContext=2,this._supportsLabeling=!1,this.requiredFields=[],this.progressiveLoadFactor=1,this._queryEngine=null}get i3slayer(){return this.sublayer}get layerViewUid(){return this.layerView.uid}get layerId(){return this.sublayer.layer.id}get sublayerId(){return this.sublayer.id}get layerPopupEnabledAndHasTemplate(){return this.sublayer.popupEnabled&&V(this.sublayer,this.layerView.view.popup?.defaultPopupTemplateEnabled)}initialize(){this._updatingHandles.add(()=>this.mergedFilter,e=>{null!=e&&x.checkSupport(e)?null==this._i3sFilter?this._i3sFilter=new x({viewFilter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,r)=>this.addSqlFilter(e,r,this.logError),addTimeFilter:(e,r)=>this.addTimeFilter(e,r)}):this._i3sFilter.viewFilter=e:this._i3sFilter=s(this._i3sFilter)},n),this._updatingHandles.add(()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields],()=>this._updateRequiredFields()),this._updatingHandles.add(()=>this.sublayer.renderer,e=>this._rendererChange(e),o);const e=()=>this._filterChange();this._updatingHandles.add(()=>this.parsedDefinitionExpression,e),this._updatingHandles.add(()=>this._i3sFilter?.sortedObjectIds,e),this._updatingHandles.add(()=>this._i3sFilter?.parsedWhereClause,e),this._updatingHandles.add(()=>this.getTimeFilterDependencies(),e),this._updatingHandles.add(()=>this.mergedFilter,e),this._updatingHandles.add(()=>[this._i3sFilter?.parsedGeometry,this.filter?.spatialRelationship],()=>this._geometryFilterChange()),this._updatingHandles.add(()=>this.parsedFilterExpressions,()=>this._updateSymbologyOverride(),o),this.addResolvingPromise(this._updateRequiredFields())}get lodFactor(){return this.view.qualitySettings.sceneService.objectLoDFactor}get parsedFilterExpressions(){return"Overview"===this.sublayer.modelName?[]:this.layerView.filterExpressions.map(([e,r])=>{let t;try{t=p.create(e,{fieldsIndex:this.sublayer.fieldsIndex})}catch(a){return i.getLogger(this).error("Failed to parse filterExpression: "+a),null}if(!t.isStandardized)return i.getLogger(this).error("filterExpression is using non standard function"),null;const s=[],l=t.fieldNames;return Q(l,this.sublayer.fieldsIndex,{missingFields:s}),s.length>0?(i.getLogger(this).error(`filterExpression references unknown fields: ${s.join(", ")}`),null):[t,r]}).filter(e=>null!=e)}get filter(){return this._get("filter")}set filter(e){this._set("filter",x.checkSupport(e)?e:null)}isUpdating(){return super.isUpdating()||(this._i3sFilter?.updating??!1)}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride((r,t)=>{for(const[s,l]of e)try{if(s.testFeature(r))return w(t,l)}catch(i){this.logError(i)}return w(t,null)},this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return c(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce((e,[r])=>e.concat(r.fieldNames),new Array))}get availableFields(){const e=this.sublayer,r=e.fieldsIndex;let t=this.requiredFields;if(e.outFields||e.layer.outFields){const i=[...e.outFields||[],...e.layer.outFields||[]];t=[...g(r,i),...t]}return t=[...t,e.objectIdField??h],c(r,t)}get _graphicOrigin(){return this.sublayer.graphicOrigin}_createLayerGraphic(e){return new r({attributes:e,layer:this.sublayer.layer,sourceLayer:this.sublayer,origin:this._graphicOrigin})}canResume(){return super.canResume()&&A(this.i3slayer.effectiveScaleRange,this.view.scale)&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeaturesFromGraphics(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;if(0===e.length)return[];const s=[],n=[],o=null!=this.sublayer.associatedLayer?await this.sublayer.associatedLayer.load(r):this.sublayer,u=g(this.sublayer.fieldsIndex,await U(o,C(this.sublayer,r)));l(r);const d=new Set;for(const i of e)f(i,u,d)?n.push(i):s.push(i);return 0===n.length?s:(null!=this.sublayer.associatedLayer&&await this.sublayer.associatedLayer.load().catch(()=>i.getLogger(this).warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes.")),this.whenGraphicAttributes(n,Array.from(d)).catch(e=>(a(e),n)).then(e=>s.concat(e)))}async _updateRequiredFields(){const e=c(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields,...this.filterExpressionFields]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:r}=this,{popupEnabled:i}=r;return i?C(r,e)?void 0:new t("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:r}):new t("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:r})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),this._i3sFilter?.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new m(e)}queryExtent(e,r){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),r?.signal)}queryFeatureCount(e,r){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),r?.signal)}queryFeatures(e,r){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),r?.signal).then(e=>{if(!e?.features)return e;const r=this.sublayer,t=r.layer,i=this._graphicOrigin;for(const s of e.features)s.layer=t,s.sourceLayer=r,s.origin=i;return e})}async queryObjectIds(e,r){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),r?.signal)).filter(F)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=E(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new S({layerView:this,priority:H.FEATURE_QUERY_ENGINE,spatialIndex:new I({featureAdapter:new j({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,r)=>this._forAllFeatures((r,t,i)=>e(new v(r,t,i)),r,2),getFeatureExtent:e,sourceSpatialReference:q(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():m.from(e))}};e([u()],D.prototype,"i3slayer",null),e([u()],D.prototype,"layerView",void 0),e([u()],D.prototype,"lodFactor",null),e([u({readOnly:!0})],D.prototype,"parsedFilterExpressions",null),e([u({type:y})],D.prototype,"filter",null),e([u()],D.prototype,"_i3sFilter",void 0),e([u({type:[String],readOnly:!0})],D.prototype,"filterExpressionFields",null),e([u({type:[String],readOnly:!0})],D.prototype,"requiredFields",void 0),e([u({type:[String],readOnly:!0})],D.prototype,"availableFields",null),e([u()],D.prototype,"_graphicOrigin",null),D=e([d("esri.views.3d.layers.BuildingComponentSublayerView3D")],D);export{D 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 r from"../../../core/Error.js";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a,subclass as u}from"../../../core/accessorSupport/decorators.js";import{getObjectId as o}from"../../../layers/graphics/dehydratedFeatures.js";import{packFields as n}from"../../../layers/support/fieldUtils.js";import{FeatureLikeLayerViewBase3D as p}from"./FeatureLikeLayerViewBase3D.js";import{FeatureGraphics3DGraphicsPipeline as l}from"./graphics/FeatureGraphics3DGraphicsPipeline.js";import{updatingProgress as d}from"../support/updatingProperties.js";const
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../../../core/Error.js";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a,subclass as u}from"../../../core/accessorSupport/decorators.js";import{getObjectId as o}from"../../../layers/graphics/dehydratedFeatures.js";import{packFields as n}from"../../../layers/support/fieldUtils.js";import{FeatureLikeLayerViewBase3D as p}from"./FeatureLikeLayerViewBase3D.js";import{FeatureGraphics3DGraphicsPipeline as l}from"./graphics/FeatureGraphics3DGraphicsPipeline.js";import{updatingProgress as d}from"../support/updatingProperties.js";const m=m=>{const c=p(m);let h=class extends c{initialize(){this._defaultReturnZ=!0,this.addHandles(i(()=>this._updatingRequiredPromise,e=>this._updatingHandles.addPromise(e),s))}destroy(){this._updatingHandles.removeAll(),this._fetcherContext=t(this._fetcherContext)}get maximumNumberOfFeatures(){return this.graphicsPipeline.maximumNumberOfFeatures}set maximumNumberOfFeatures(e){this.graphicsPipeline.maximumNumberOfFeatures=e}get maximumNumberOfFeaturesExceeded(){return null!=this.graphicsPipeline&&!this.suspended&&this.graphicsPipeline.maximumNumberOfFeaturesExceeded}get updatingProgressValue(){return this.graphicsPipeline?.updatingProgressValue??0}get updatePolicy(){return this.graphicsPipeline?.updatePolicy??0}get snappingComplexityExceeded(){return this.graphicsPipeline?.snappingComplexityExceeded??!0}get availableFieldsForQuery(){return n(this.layer.fieldsIndex,this.availableFields)}setVisibility(e,r){this.graphicsPipeline?.setVisibility(e,r)}queryFeatures(e,r){const t=()=>super.queryFeatures(e,r);return"mesh"===this.layer.geometryType?this._queryFeaturesMesh(this._ensureQuery(e),t):t()}async createGraphicsPipeline(){return new l({layerView:this})}async doRefresh(e){return await this.graphicsPipeline.doRefresh(e)}_popupFeatureHasRequiredFields(e,r){if(!super._popupFeatureHasRequiredFields(e,r))return!1;const t=o(e,this.layer.objectIdField);if(null==t)return!0;const i=this.graphicsPipeline.getMissingAttributesForFeature(t);if(null==i)return!0;for(const s of r)if(i.has(s))return!1;return!0}get usedMemory(){return this.graphicsPipeline?.usedMemory??0}get unloadedMemory(){return this.graphicsPipeline?.unloadedMemory??0}get ignoresMemoryFactor(){return this.graphicsPipeline?.ignoresMemoryFactor??!1}async _queryFeaturesMesh(e,r){this._validateQueryFeaturesMesh(e);const t=await r(),i=this.graphicsPipeline;if(e?.outStatistics||null==i)return t;const s=this.layer.objectIdField,a=[];for(const u of t.features)if(u.geometry){const e=i.getHydratedGeometry(u.attributes[s]);e&&(u.geometry=e,a.push(u))}else a.push(u);return t.features=a,t}_validateQueryFeaturesMesh(e){if(!e)return;const t=e=>{throw new r("feature-layer-view:unsupported-query",`Queries on Mesh feature collection layers do not support '${e}'`)},i=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const r of i)null!=e[r]&&t(r);"returnM"in e&&e.returnM&&t("returnM"),"returnCentroid"in e&&e.returnCentroid&&t("returnCentroid"),null==e.outSpatialReference||e.outSpatialReference.equals(this.view.spatialReference)||t("outSpatialReference")}get test(){}};return e([a()],h.prototype,"layer",void 0),e([a()],h.prototype,"graphicsPipeline",void 0),e([a()],h.prototype,"maximumNumberOfFeatures",null),e([a()],h.prototype,"maximumNumberOfFeaturesExceeded",null),e([a(d)],h.prototype,"updatingProgress",void 0),e([a({readOnly:!0})],h.prototype,"updatingProgressValue",null),e([a({readOnly:!0})],h.prototype,"updatePolicy",null),e([a()],h.prototype,"snappingComplexityExceeded",null),e([a()],h.prototype,"availableFieldsForQuery",null),h=e([u("esri.views.3d.layers.FeatureLikeLayerView3D")],h),h};export{m as FeatureLikeLayerView3D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{transformMat3 as e}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{decompressNormal as
|
|
2
|
+
import{transformMat3 as e}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{decompressNormal as r,compressNormal as n}from"../webgl-engine/lib/Normals.js";import{DataType as o}from"../../webgl/enums.js";import{VertexElementDescriptor as s}from"../../webgl/VertexElementDescriptor.js";class c{constructor(e,t){this.data=e,this.indices=t}}function f(e,t,r,n,o){return!n||r.some(({name:e})=>"normal"===e||"normalCompressed"===e)?a(e,t,r,o):i(e,t,r,o)}function a(o,s,f,a){const i=new c(o.slice().buffer,s);if(a){const o=f[0].stride,s=i.data.byteLength/o;for(const c of f)if("normalCompressed"===c.name){const{offset:f}=c,l=new Int16Array(i.data),d=t();for(let t=0;t<s;++t)r(d,l,t,o/2,f/2),e(d,d,a),n(l,t,d[0],d[1],d[2],o/2,f/2)}else if("normal"===c.name){const{offset:r}=c,n=new Float32Array(i.data),f=t();for(let t=0;t<s;++t){const s=(t*o+r)/4;f[0]=n[s],f[1]=n[s+1],f[2]=n[s+2],e(f,f,a),n[s]=f[0],n[s+1]=f[1],n[s+2]=f[2]}}}return i}function i(e,t,r,n){const c=r[0].stride,f=c/4,a=new Float32Array(e.buffer,e.byteOffset,e.byteLength/4),i=t.length/3,y=e.byteLength/c,{faceNormals:m,faceAreas:A,faceEdges:w,edgeFaces:h,vertexFaces:g,vertexFaceCountAndOffset:b}=d(a,f,y,t,i,n);u(t,i,m,A,w,h);const $=c+4;return r.forEach(e=>e.stride=$),r.push(new s("normalCompressed",2,o.SHORT,c,$,!0)),l(a,f,i,y,t,c,$,m,A,g,b)}function l(e,t,r,n,o,s,f,a,i,l,d){const u=3*r,y=new(u<256?Uint8Array:u<65536?Uint16Array:Uint32Array)(o);let m=n;const A=new(n<256?Uint8Array:n<65536?Uint16Array:Uint32Array)(u-n),h=new ArrayBuffer(4*u),g=new Int16Array(h),b=new Uint32Array(h),$=new Uint32Array(e.buffer,e.byteOffset,e.length);let U=0,v=0;const x=new Uint32Array(r);let F=0;const M=1-w;for(let c=0;c<n;++c){U=d[2*c+1],v=U+d[2*c];let e=c;for(;U<v;){{const t=l[--v],r=3*t,n=a[r],o=a[r+1],s=a[r+2];F=0,x[F++]=t;let c=U;for(;c<v;){const e=l[c],t=3*e;if(n*a[t]+o*a[t+1]+s*a[t+2]>M){x[F++]=e;const t=--v;if(c<t){l[c]=l[t];continue}}++c}let f=0,d=0,u=0;if(1===F)f=n,d=o,u=s;else{for(let t=0;t<F;++t){const e=x[t],r=i[e],n=3*e;f+=a[n]*r,d+=a[n+1]*r,u+=a[n+2]*r}const e=Math.sqrt(f*f+d*d+u*u)||1;f/=e,d/=e,u/=e}{const t=1/(Math.abs(f)+Math.abs(d)+Math.abs(u)),r=f*t,n=d*t;let o=r,s=n;u<=0&&(o=(r>=0?1:-1)*(1-Math.abs(n)),s=(n>=0?1:-1)*(1-Math.abs(r)));const c=2*e,a=Math.round(32767*o),i=Math.round(32767*s);g[c]=a<-32767?-32767:a>32767?32767:a,g[c+1]=i<-32767?-32767:i>32767?32767:i}}if(e!==c)for(let t=0;t<F;++t){const r=3*x[t];y[r]===c&&(y[r]=e),y[r+1]===c&&(y[r+1]=e),y[r+2]===c&&(y[r+2]=e)}if(U>=v)break;e=m++,A[e-n]=c}}const p=m,E=f/4,I=new Float32Array(p*E),j=new Uint32Array(I.buffer),C=s/4;for(let c=0;c<n;++c){const e=c*t,r=c*E;for(let n=0;n<t;++n)j[r+n]=$[e+n];j[r+C]=b[c]}for(let c=n;c<p;++c){const e=A[c-n]*t,r=c*E;for(let n=0;n<t;++n)j[r+n]=$[e+n];j[r+C]=b[c]}return new c(I.buffer,y)}function d(e,t,r,n,o,s){const c=new Float32Array(3*o),f=new Float32Array(o),a=new Uint32Array(3*o),i=new Int32Array(2*(3*o)),l=3*o,d=new Uint32Array(l),u=new Uint32Array(2*r);for(let m=0;m<o;++m){const A=3*m;for(let w=0;w<3;++w){++u[2*n[A+w]]}}{let h=0;for(let g=0;g<r;++g){const b=2*g;u[b+1]=h;h+=u[b]}for(let $=0;$<o;++$){const U=3*$;for(let v=0;v<3;++v){d[u[2*n[U+v]+1]++]=$}}for(let x=0;x<r;++x)u[2*x+1]-=u[2*x]}let y=0;{const F=new Uint32Array(2*l*2),M=new Uint32Array(2*r);for(let E=0;E<r;++E){const I=2*E,j=4*u[I+1];M[I]=j,M[I+1]=j}function p(e,t,r){const n=Math.min(e,t),o=Math.max(e,t),s=e<t?0:1,c=2*n,f=M[c],a=M[c+1];let l=-1;for(let i=f;i<a;i+=2)if(F[i]===o){l=F[i+1];break}return-1===l&&(l=y++,F[a]=o,F[a+1]=l,M[c+1]=a+2,i[2*l+(1-s)]=-1),i[2*l+s]=r,l}for(let C=0;C<n.length;C+=3){const O=n[C],q=O*t,L=e[q],N=e[q+1],k=e[q+2],B=n[C+1],D=B*t,H=e[D],P=e[D+1],R=e[D+2],S=n[C+2],T=S*t,V=L-H,z=N-P,G=k-R,J=L-e[T],K=N-e[T+1],Q=k-e[T+2],W=z*Q-G*K,X=G*J-V*Q,Y=V*K-z*J,Z=Math.sqrt(W*W+X*X+Y*Y)||1,_=C/3;f[_]=.5*Z;const ee=1/Z;if(s){const oe=s[0]*W+s[3]*X+s[6]*Y,se=s[1]*W+s[4]*X+s[7]*Y,ce=s[2]*W+s[5]*X+s[8]*Y;c[3*_]=oe*ee,c[3*_+1]=se*ee,c[3*_+2]=ce*ee}else c[3*_]=W*ee,c[3*_+1]=X*ee,c[3*_+2]=Y*ee;const te=p(O,B,_),re=p(B,S,_),ne=p(S,O,_);a[3*_]=te,a[3*_+1]=re,a[3*_+2]=ne}}return{faceNormals:c,faceAreas:f,faceEdges:a,vertexFaces:d,vertexFaceCountAndOffset:u,edgeFaces:i}}function u(e,t,r,n,o,s){const c=new Uint8Array(t),f=new Uint32Array(t),a=new Uint32Array(3*t);let i=0;const l=new Uint32Array(t);let d=0;for(let u=0;u<e.length;u+=3){const e=u/3;if(1===c[e])continue;c[e]=1;const t=r[3*e],y=r[3*e+1],m=r[3*e+2];for(d=0,l[d++]=e,a[0]=o[3*e],a[1]=o[3*e+1],a[2]=o[3*e+2],i=3,f[e]=e+1;i>0;){const n=a[--i];for(let u=0;u<2;++u){const w=s[2*n+u];if(-1===w||f[w]===e+1)continue;f[w]=e+1;const h=r[3*w],g=r[3*w+1],b=r[3*w+2];if(Math.abs(1-(t*h+y*g+m*b))<A){l[d++]=w,c[w]=1;for(let e=0;e<3;++e){const t=o[3*w+e];t!==n&&(a[i++]=t)}}}}if(d>1){let e=0,t=0,o=0,s=0;for(let f=0;f<d;++f){const c=l[f],a=n[c];e+=a,t+=r[3*c]*a,o+=r[3*c+1]*a,s+=r[3*c+2]*a}const c=Math.sqrt(t*t+o*o+s*s)||1;t/=c,o/=c,s/=c;for(let f=0;f<d;++f){const c=l[f];r[3*c]=t,r[3*c+1]=o,r[3*c+2]=s,n[c]=e}}}}function y(e,t,r,n,o,s,c,f,a,i){const l=new Uint32Array(2*n);for(let d=0;d<r;++d){const e=a[2*d],t=a[2*d+1];for(let o=e;o<t;o+=2){const e=i[o],t=i[o+1];t>=n||t<0?console.error(`Invalid edge index ${t} for vertex ${d}`):e>=r||e<0||e<d?console.error(`Invalid vertex ${e} for edge ${t}`):(l[2*t]=d,l[2*t+1]=e)}}for(let d=0;d<t;++d){const t=[e[3*d],e[3*d+1],e[3*d+2]],r=[f[3*d],f[3*d+1],f[3*d+2]];for(const e of t){const t=o[2*e+1];m(s,t,t+o[2*e],1,d)||console.error(`Face ${d} not found in vertexFaces for vertex ${e}`)}for(const e of r){const t=c[2*e],r=c[2*e+1];-1!==t||-1!==r?d!==t&&d!==r&&console.error(`Edge ${e} of face ${d} does not list it as a face`):console.error(`Edge ${e} of face ${d} has no faces`)}}for(let d=0;d<n;++d){const e=c[2*d],t=c[2*d+1];if(-1===e&&-1===t){console.error(`Edge ${d} has no faces`);continue}for(const s of[e,t].filter(e=>-1!==e)){const e=f[3*s],t=f[3*s+1],r=f[3*s+2];d!==e&&d!==t&&d!==r&&console.error(`Edge ${d} not found in edgesPerFace for face ${s}`)}const r=l[2*d],n=l[2*d+1];r===n&&console.error(`Edge ${d} is degenerate with identical vertices ${r}`);const o=Math.min(r,n);m(i,a[2*o]+1,a[2*o+1],2,d)||console.error(`Edge ${d} not found in edgeMap for vertex ${o}`)}for(let d=0;d<r;++d){const r=o[2*d+1],n=o[2*d];for(let o=r;o<r+n;++o){const r=s[o];(r<0||r>=t)&&console.error(`Invalid face ${r} in vertexFaces for vertex ${d}`),m(e,3*r,3*r+3,1,d)||console.error(`Face ${r} in vertexFaces for vertex ${d} does not reference it in indices`)}}}function m(e,t,r,n,o){for(let s=t;s<r;s+=n)if(e[s]===o)return!0;return!1}const A=.04,w=.8;export{f as addNormals,y as checkTopology};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{generateUID as n}from"../../../core/uid.js";import{property as l,subclass as d}from"../../../core/accessorSupport/decorators.js";import{set as u}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as h,create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as g}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as m,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as I}from"../../../layers/graphics/dehydratedFeatures.js";import{ImmutableDehydratedPoint as x}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import O from"../../../layers/support/FeatureFilter.js";import j from"../../../rest/support/Query.js";import{isBasemapLayerView as N}from"../../../support/basemapUtils.js";import{isGraphic as C}from"../../../support/graphicInstanceUtils.js";import{I3SPointsWorkerHandle as D}from"./I3SPointsWorkerHandle.js";import{LayerView3D as F}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as S}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as G}from"./graphics/QueryEngine.js";import{QueryEngineContext as A}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as V,normalizeEditResultsEvent as P,processAttributeEdits as L}from"./i3s/featureEditing.js";import{getCachedAttributeValue as R}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as H}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as M}from"./i3s/I3SOverrides.js";import{checkRecyclable as U,checkSpatialReferences as Q,containsDraco as q,whenGraphicAttributes as T}from"./i3s/I3SUtil.js";import{attributeLookup as B}from"./support/attributeUtils.js";import{DefinitionExpressionSceneLayerView as k}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as z}from"./support/fieldProperties.js";import{normalizeHighlightTarget as W,emptyHighlightHandle as K,isObjectId as Z}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as $}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as Y}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as J}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as X}from"./support/TemporalSceneLayerView.js";import{debugFlags as ee}from"../support/debugFlags.js";import{compute as te}from"../support/orientedBoundingBox.js";import{updatingProgress as re}from"../support/updatingProperties.js";import{Vertices as ie}from"../webgl-engine/lib/Attribute.js";import se from"../../layers/SceneLayerView.js";import{hasPopupTemplate as oe}from"../../layers/support/popupUtils.js";import{getHighlightName as ae}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as ne,isInEffectiveScaleRange as le}from"../../support/layerViewUtils.js";import{TaskPriority as de}from"../../support/Scheduler.js";const ue=z();class he{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get usedMemory(){return this.graphics.reduce((e,t)=>I(t)+e,i(this.featureIds)+1024)}}let pe=class extends(X(k(Y(F(se))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new H((e,t,r)=>ye(e,t,r),e=>this.processor.graphicsCore.recreateGraphics(e),this.logError),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),U(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()}):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:this.layer,memoryController:e}),Q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new J({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o),this._updatingHandles.add(()=>this.layer.renderer,(e,t)=>this._rendererChange(e,t)),this._updatingHandles.add(()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds],()=>this._filterChange()),this._set("processor",new S({owner:this,preferredUpdatePolicy:0,scaleVisibilityEnabled:!ne(),filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t)),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),q(this.layer.geometryDefinitions)&&(this._workerHandle=new D(e=>this.view.resourceController.immediate.schedule(e))),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles([this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.consumePromise(t)}),a(()=>ee.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&ee.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||!this._treeDebugger||ee.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)},o)]),this.when(()=>{this._setupQueryEngine(),this._updatingHandles.add(()=>this.availableFields,()=>this._queryEngine?.clear()),this._updatingHandles.add(()=>this.maximumNumberOfFeatures,e=>this._controller.featureTarget=e,o),this._updatingHandles.add(()=>this.suspended,e=>{e&&this._removeAllNodeData()})})}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._workerHandle=r(this._workerHandle),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return ne()?le(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.pointLoDFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get _graphicOrigin(){return this.layer.graphicOrigin}async whenGraphicAttributes(e,t){return T(this.layer,e,this._getObjectIdField(),t,()=>[...this.loadedGraphics.nodes()])}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find(t=>t.uid===e),this.layer,this._graphicOrigin),r=this._getObjectIdField();return null==t?.attributes?.[r]?null:{type:"graphic",graphic:t,layer:t.layer}}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){const r=ae(t),i=this.layer.objectIdField,s=W(e);if(0===s.length)return K;if(C(s[0])){const e=s;if(null!=B(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map(e=>B(this.layer.fieldsIndex,e.attributes,i));return this.processor.highlightByObjectIds(t,i,r)}return this.processor.highlightByGraphics(e,r)}return Z(s[0])?this.processor.highlightByObjectIds(s,i,r):K}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return V(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._workerHandle&&(this._workerHandle=new D(e=>this.view.resourceController.immediate.schedule(e)));const i=await this._workerHandle.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!me(r)&&!ge(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?_e(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=me(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=me(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new he(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),fe(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const g=this.view.stage.renderView.olidRenderHelper;if(g){const e=N(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];g.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&oe(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0),e.serviceObbInIndexSR=te(new ie(t,3)),i.isGeographic&&(g(e.serviceObbInIndexSR.center,s,ve,i),e.serviceObbInIndexSR.center=ve)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:h,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??be[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;u(ve,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?m(s,ve):y(s,ve))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(ve[0],ve[1],ve[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=new x(u,t[g],t[g+1],m),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(Ie.property="geometry",Ie.graphic=f,Ie.oldValue=f.geometry,Ie.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(Ie),xe()),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)}),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributeInfo=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),fe(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode(t=>e.push(t.node.id)),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode(t=>e.push(t.node)),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode((t,r)=>e.push(r))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){fe(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach(e=>e.nodeIndex===t&&i.push(e.uid)),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every((e,t)=>s[t]===o[t])||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode(e=>this._filterNode(e))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(Ie.graphic=s,Ie.property="visible",Ie.oldValue=e,Ie.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(Ie),xe())}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new j(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():j.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new A(s,e,o,()=>this.processor.featureStore,i,r,()=>this.availableFields);this._queryEngine=new G({context:a,priority:de.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await P(t,e);L(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode(t=>e(t.node,t.featureIds)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new $(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],pe.prototype,"processor",void 0),e([l({type:O})],pe.prototype,"filter",void 0),e([l()],pe.prototype,"loadedGraphics",void 0),e([l()],pe.prototype,"i3slayer",null),e([l()],pe.prototype,"layerViewUid",null),e([l()],pe.prototype,"_controller",void 0),e([l()],pe.prototype,"updating",void 0),e([l()],pe.prototype,"suspended",void 0),e([l(re)],pe.prototype,"updatingProgress",void 0),e([l()],pe.prototype,"updatingProgressValue",null),e([l({readOnly:!0})],pe.prototype,"visibleAtCurrentScale",null),e([l(ue.requiredFields)],pe.prototype,"requiredFields",null),e([l(ue.availableFields)],pe.prototype,"availableFields",void 0),e([l()],pe.prototype,"_fieldsHelper",void 0),e([l({type:Number})],pe.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],pe.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],pe.prototype,"_excludeObjectIds",null),e([l({readOnly:!0})],pe.prototype,"lodFactor",null),e([l({readOnly:!0})],pe.prototype,"hasM",null),e([l({readOnly:!0})],pe.prototype,"hasZ",null),e([l()],pe.prototype,"contentVisible",null),e([l({readOnly:!0})],pe.prototype,"legendEnabled",null),e([l()],pe.prototype,"_graphicOrigin",null),pe=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],pe);const ce=pe;function ge(e){return"pointData"in e}function me(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ye(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=R(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function fe(e){const t=e.attributeInfo;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=R(t.attributeData[e],i))}}}function _e(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const be={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},ve=p(),Ie={graphic:null,property:null,oldValue:null,newValue:null};function xe(){Ie.graphic=null,Ie.property=null,Ie.oldValue=null,Ie.newValue=null}export{ce as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a,sync as n}from"../../../core/reactiveUtils.js";import{generateUID as l}from"../../../core/uid.js";import{property as d,subclass as u}from"../../../core/accessorSupport/decorators.js";import{set as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as p,create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as g}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as m}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as y,extentContainsCoords2D as f}from"../../../geometry/support/contains.js";import{newDoubleArray as _,doubleArrayFrom as b}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as v}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as I}from"../../../layers/LayerConstants.js";import{estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{ImmutableDehydratedPoint as E}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as w}from"../../../layers/graphics/hydratedFeatures.js";import O from"../../../layers/graphics/controllers/I3SOnDemandController.js";import j from"../../../layers/support/FeatureFilter.js";import N from"../../../rest/support/Query.js";import{isBasemapLayerView as C}from"../../../support/basemapUtils.js";import{isGraphic as D}from"../../../support/graphicInstanceUtils.js";import{I3SPointsWorkerHandle as F}from"./I3SPointsWorkerHandle.js";import{LayerView3D as S}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as G}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as A}from"./graphics/QueryEngine.js";import{QueryEngineContext as V}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as P,normalizeEditResultsEvent as L,processAttributeEdits as R}from"./i3s/featureEditing.js";import{getCachedAttributeValue as H}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as M}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as U}from"./i3s/I3SOverrides.js";import{checkRecyclable as Q,checkSpatialReferences as q,containsDraco as T,whenGraphicAttributes as B}from"./i3s/I3SUtil.js";import{attributeLookup as k}from"./support/attributeUtils.js";import{DefinitionExpressionSceneLayerView as z}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import{normalizeHighlightTarget as K,emptyHighlightHandle as Z,isObjectId as $}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as Y}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as J}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as X}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as ee}from"./support/TemporalSceneLayerView.js";import{debugFlags as te}from"../support/debugFlags.js";import{compute as re}from"../support/orientedBoundingBox.js";import{updatingProgress as ie}from"../support/updatingProperties.js";import{Vertices as se}from"../webgl-engine/lib/Attribute.js";import oe from"../../layers/SceneLayerView.js";import{hasPopupTemplate as ae}from"../../layers/support/popupUtils.js";import{getHighlightName as ne}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as le,isInEffectiveScaleRange as de}from"../../support/layerViewUtils.js";import{TaskPriority as ue}from"../../support/Scheduler.js";const he=W();class pe{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get usedMemory(){return this.graphics.reduce((e,t)=>x(t)+e,i(this.featureIds)+1024)}}let ce=class extends(ee(z(J(S(oe))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new M((e,t,r)=>fe(e,t,r),e=>this.processor.graphicsCore.recreateGraphics(e),this.logError),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),Q(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new U({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()}):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new U({view:this.view,layer:this.layer,memoryController:e}),q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new X({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o),this._updatingHandles.add(()=>this.layer.renderer,(e,t)=>this._rendererChange(e,t)),this._updatingHandles.add(()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds],()=>this._filterChange()),this._set("processor",new G({owner:this,preferredUpdatePolicy:0,scaleVisibilityEnabled:!le(),filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t)),this.supportsHeightUnitConversion&&(this._verticalScale=v("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new O({layerView:this}),T(this.layer.geometryDefinitions)&&(this._workerHandle=new F(e=>this.view.resourceController.immediate.schedule(e))),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles([this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.consumePromise(t)}),a(()=>te.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&te.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||!this._treeDebugger||te.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)},o)]),this.when(()=>{this._setupQueryEngine(),this._updatingHandles.add(()=>this.availableFields,()=>this._queryEngine?.clear(),n),this._updatingHandles.add(()=>this.maximumNumberOfFeatures,e=>this._controller.featureTarget=e,o),this._updatingHandles.add(()=>this.suspended,e=>{e&&this._removeAllNodeData()})})}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._workerHandle=r(this._workerHandle),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return le()?de(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.pointLoDFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get _graphicOrigin(){return this.layer.graphicOrigin}async whenGraphicAttributes(e,t){return B(this.layer,e,this._getObjectIdField(),t,()=>[...this.loadedGraphics.nodes()])}getHit(e){if(!this.loadedGraphics)return null;const t=w(this.loadedGraphics.find(t=>t.uid===e),this.layer,this._graphicOrigin),r=this._getObjectIdField();return null==t?.attributes?.[r]?null:{type:"graphic",graphic:t,layer:t.layer}}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){const r=ne(t),i=this.layer.objectIdField,s=K(e);if(0===s.length)return Z;if(D(s[0])){const e=s;if(null!=k(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map(e=>k(this.layer.fieldsIndex,e.attributes,i));return this.processor.highlightByObjectIds(t,i,r)}return this.processor.highlightByGraphics(e,r)}return $(s[0])?this.processor.highlightByObjectIds(s,i,r):Z}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return P(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._workerHandle&&(this._workerHandle=new F(e=>this.view.resourceController.immediate.schedule(e)));const i=await this._workerHandle.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!ye(r)&&!me(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?be(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=ye(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;g(a,l,0,a,d,0,o.length);const u=ye(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new pe(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),_e(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const c=this.view.stage.renderView.olidRenderHelper;if(c){const e=C(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];c.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&ae(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;g(t,r,0,t,s,0),e.serviceObbInIndexSR=re(new se(t,3)),i.isGeographic&&(m(e.serviceObbInIndexSR.center,s,Ie,i),e.serviceObbInIndexSR.center=Ie)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=_(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:p,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?b(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=_(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??ve[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;h(Ie,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?y(s,Ie):f(s,Ie))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(Ie[0],Ie[1],Ie[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),n=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??l(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=new E(u,t[g],t[g+1],m),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(xe.property="geometry",xe.graphic=f,xe.oldValue=f.geometry,xe.newValue=y,f.geometry=y,f.level=i,n.graphicUpdateHandler(xe),Ee()),d.push(f);else{const e=l();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)}),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributeInfo=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),_e(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode(t=>e.push(t.node.id)),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode(t=>e.push(t.node)),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode((t,r)=>e.push(r))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){_e(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach(e=>e.nodeIndex===t&&i.push(e.uid)),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||I}_getGlobalIdField(){return this.layer.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every((e,t)=>s[t]===o[t])||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode(e=>this._filterNode(e))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(xe.graphic=s,xe.property="visible",xe.oldValue=e,xe.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(xe),Ee())}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new N(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():N.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new V(s,e,o,()=>this.processor.featureStore,i,r,()=>this.availableFields);this._queryEngine=new A({context:a,priority:ue.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await L(t,e);R(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode(t=>e(t.node,t.featureIds)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new Y(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([d()],ce.prototype,"processor",void 0),e([d({type:j})],ce.prototype,"filter",void 0),e([d()],ce.prototype,"loadedGraphics",void 0),e([d()],ce.prototype,"i3slayer",null),e([d()],ce.prototype,"layerViewUid",null),e([d()],ce.prototype,"_controller",void 0),e([d()],ce.prototype,"updating",void 0),e([d()],ce.prototype,"suspended",void 0),e([d(ie)],ce.prototype,"updatingProgress",void 0),e([d()],ce.prototype,"updatingProgressValue",null),e([d({readOnly:!0})],ce.prototype,"visibleAtCurrentScale",null),e([d(he.requiredFields)],ce.prototype,"requiredFields",null),e([d(he.availableFields)],ce.prototype,"availableFields",void 0),e([d()],ce.prototype,"_fieldsHelper",void 0),e([d({type:Number})],ce.prototype,"maximumNumberOfFeatures",null),e([d({readOnly:!0})],ce.prototype,"maximumNumberOfFeaturesExceeded",null),e([d()],ce.prototype,"_excludeObjectIds",null),e([d({readOnly:!0})],ce.prototype,"lodFactor",null),e([d({readOnly:!0})],ce.prototype,"hasM",null),e([d({readOnly:!0})],ce.prototype,"hasZ",null),e([d()],ce.prototype,"contentVisible",null),e([d({readOnly:!0})],ce.prototype,"legendEnabled",null),e([d()],ce.prototype,"_graphicOrigin",null),ce=e([u("esri.views.3d.layers.SceneLayerGraphicsView3D")],ce);const ge=ce;function me(e){return"pointData"in e}function ye(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function fe(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=H(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function _e(e){const t=e.attributeInfo;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=H(t.attributeData[e],i))}}}function be(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const ve={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},Ie=c(),xe={graphic:null,property:null,oldValue:null,newValue:null};function Ee(){xe.graphic=null,xe.property=null,xe.oldValue=null,xe.newValue=null}export{ge 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 r from"../../../core/Error.js";import{watch as t}from"../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../core/accessorSupport/decorators.js";import o from"../../../rest/support/Query.js";import{isNumber as n}from"../../../support/guards.js";import{FeatureLikeLayerViewBase3D as a}from"./FeatureLikeLayerViewBase3D.js";import{StreamController as p}from"./graphics/StreamController.js";import{StreamGraphics3DGraphicsPipeline as c}from"./graphics/StreamGraphics3DGraphicsPipeline.js";import l from"../../layers/StreamLayerView.js";let
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../../../core/Error.js";import{watch as t}from"../../../core/reactiveUtils.js";import{property as i,subclass as s}from"../../../core/accessorSupport/decorators.js";import o from"../../../rest/support/Query.js";import{isNumber as n}from"../../../support/guards.js";import{FeatureLikeLayerViewBase3D as a}from"./FeatureLikeLayerViewBase3D.js";import{StreamController as p}from"./graphics/StreamController.js";import{StreamGraphics3DGraphicsPipeline as c}from"./graphics/StreamGraphics3DGraphicsPipeline.js";import l from"../../layers/StreamLayerView.js";let u=class extends(a(l)){constructor(){super(...arguments),this.type="stream-3d",this.updatePolicy=0}initialize(){this.addHandles(t(()=>this.suspended,e=>{this.graphicsPipeline&&this._onSuspendedChange(e)}))}get connectionError(){const e=this.graphicsPipeline?.connection?.errorString;return e?new r("stream-controller",e):null}get graphicOrigin(){return this.layer.graphicOrigin}createQuery(){return new o({outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference})}queryLatestObservations(e,r){return this.graphicsPipeline.graphicsQuery.executeQueryForLatestObservations(this._ensureQuery(e),r?.signal)}async queryObjectIds(e,r){return(await super.queryObjectIds(e,r)).filter(n)}setVisibility(e,r){}get _streamConnectionStatus(){return this.graphicsPipeline?.connection?.connectionStatus??"disconnected"}async createGraphicsPipeline(){return new c({layerView:this})}createController(){return new p({layer:this.layer,layerView:this})}beforeSetController(){}_doPause(){this.graphicsPipeline?.pause()}_doResume(){this.graphicsPipeline?.resume()}_doDisconnect(){this.graphicsPipeline?.disconnect(),this._doPause()}_doConnect(){this.graphicsPipeline?.connect(),this.resume()}_doClear(){this.graphicsPipeline?.clear()}};e([i({readOnly:!0})],u.prototype,"updatePolicy",void 0),e([i({readOnly:!0})],u.prototype,"connectionError",null),e([i()],u.prototype,"graphicsPipeline",void 0),e([i()],u.prototype,"graphicOrigin",null),e([i({readOnly:!0})],u.prototype,"_streamConnectionStatus",null),u=e([s("esri.views.3d.layers.StreamLayerView3D")],u);const h=u;export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{clone as e}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as t}from"../../../../core/units.js";import{e as r}from"../../../../chunks/earcut.js";import{normalFromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as o,invertOrIdentity as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as l,sub as c,cross as m,add as p,normalize as h,transformMat4 as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as u,create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as f,ZEROS as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as b}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as _,fromBuffer as x,intersectsClippingArea as j}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as w}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as S,getZeroIndexArray as v}from"../../../../geometry/support/Indices.js";import{t as C}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as P,SnappingCandidateEdge as E}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as I}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as A,SampleElevationInfo as D}from"./elevationAlignmentUtils.js";import{extrudePolygon as U}from"./extrudeUtilsDeprecated.js";import{Object3DEdgeState as M,Graphics3DObject3DGraphicLayer as O}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as L}from"./graphicUtils.js";import{geometryAsPolygon as G}from"./polygonUtils.js";import{createMaterial as V}from"../support/edgeUtils.js";import{encodeNaNUInt8 as B}from"../support/symbolColorUtils.js";import{debugFlags as R}from"../../support/debugFlags.js";import{SamplePosition as F}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as T}from"../../support/renderInfoUtils/polygonDeprecated.js";import{Attribute as H}from"../../webgl-engine/lib/Attribute.js";import{Geometry as N}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as W}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as k,compressNormal as q}from"../../webgl-engine/lib/Normals.js";import{Object3D as Z}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as J}from"../../webgl-engine/materials/DefaultMaterial.js";const K=["polygon","extent"];class Q extends z{constructor(e,t,r,s){super(e,t,r,s,re(t)),this.ensureDrapedStatus(!1)}async doLoad(){const e=this.symbolLayer,t=e?.material,r=this.symbolLayer.material?.color?.a,s=this._hasDrivenColorOrOpacity,i=this.needsDrivenTransparentPass||s&&null!=r&&r<1,o=t?.emissive,n=("color"===o?.source?o?.strength:void 0)??0,a=!s&&(null==r||0===r),l=s?f:this._materialColor?.toUnitRGBA()??y,c={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,useIndexing:!0,ambient:u,diffuse:u,externalColor:l,opacity:a?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:i,hasSymbolColors:s,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:e.castShadows,emissiveStrengthFromSymbol:n,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},m=new J(c,this._context),p=new J({...c,cullFace:2},this._context);this._materials[0]=m,this._materials[1]=p,this._updateTransparentDepedentMaterialParameters()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,K,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(e.renderingInfo,this._materialColor,!1);B(r,r);const s=this.createElevationContextForGraphic(t);return this._createAs3DShape(t,e.renderingInfo,r,s,t.uid)}layerOpacityChanged(e,t){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),e?.forEach(e=>t(e)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,A)}slicePlaneEnabledChanged(e,t){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e?.forEach(e=>{const r=t(e);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const e={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(e),this._materials[1]?.setParameters(e),!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?I(e.size.output,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?0:1}async queryForSnapping(r,s,i,o){const n=this._getExtrusionSize(i)*this._context.renderCoordsHelper.unitInMeters/t(s),{objectId:a,target:l}=r,c=e(l);switch(c.z=(c.z??0)+n,r.type){case"edge":{const{start:t,end:s}=r,i=e(t),o=e(s);return i.z=(i.z??0)+n,o.z=(o.z??0)+n,[new E(a,c,1/0,i,o)]}case"vertex":return[new P(a,c,1/0),new E(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,t,n,l,c){const m=G(e.geometry);if(null==m)return null;if(0===m.rings.length||!m.rings.some(e=>e.length>0))return this._logGeometryValidationWarnings(m.rings,"rings","ExtrudeSymbol3DLayer"),null;const p=T(m,this._context.elevationProvider,this._context.renderCoordsHelper,l);this._logGeometryCreationWarnings(p,m.rings,"rings","ExtrudeSymbol3DLayer");const h=L(m);if(null==h)return null;const d=new Array,u=new Array,f=_(),y=a(),v=g(),P=1===this._context.renderCoordsHelper.viewingMode;P||this._context.renderCoordsHelper.worldUpAtPosition(null,v),b(m.spatialReference,[h.x,h.y,0],y,this._context.renderCoordsHelper.spatialReference);const E=a();o(E,y);const I=i();s(I,E);const{polygons:D,mapPositions:z,position:B}=p,R=new Map,F=this._materials[0];for(const s of D){const e=s.count;if(this._context.clippingExtent&&(x(s.mapPositions,f),!j(f,this._context.clippingExtent)))continue;const i=r(s.mapPositions,s.holeIndices,3);if(0===i.length)continue;const o=i.length,a=6*e,l=S(a+o),m=S(o),p=w(3*a),h=w(3*a),g=w(3*a),b=w(a),_=this._getExtrusionSize(t);U(B,z,i,s,p,g,h,b,l,m,_,v,P),C(p,p,E);const I=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:this._context.layerViewUid}),A=new me(p,g,k(h),b),D=X(F,l,l.length-m.length,A,n,I),M=e,O=e,L=2*s.count,G=new pe(M,O,L,o/3);te(D,G,y),R.set(D,G),d.push(D,X(this._materials[1],m,0,A,n,I)),u.push(A.heights)}if(0===d.length)return null;const H=new Z({geometries:d,layerViewUid:this._context.layerViewUid,graphicUid:c,isElevationSource:!0});H.transformation=y;const N=V(this.symbolLayer,{opacity:this._getLayerOpacity()}),W=N?new M(this._materials[0],N,this._context.slicePlaneEnabled):null,q=new O(this,H,null,(e,t,r,s,i)=>ee(e,t,r,s,i,u,R),l,W);return q.alignedSampledElevation=p.sampledElevation,q.needsElevationUpdates=A(l.mode),q}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const e=this._materials[0];e&&e.setParameters({cullFace:e.transparent?0:2})}}function X(e,t,r,s,i,o){const{attributeIndices:n,drawIndices:a}=Y(t),l=[["position",new H(s.positions,n,3,!0)],["normalCompressed",new H(s.normals,n,2,!0)]];if(e.parameters.hasSymbolColors){const e=v(n.length);l.push(["symbolColor",new H(i,e,4,!0)])}return new N(e,l,s.elevation,0,o,r,null,a)}function Y(e){const t=new Array,r=new Map,s=new Array;for(let i=0;i<e.length;++i){const o=e[i];let n=r.get(o);null==n&&(n=t.length,t.push(o),r.set(o,n)),s.push(n)}return{attributeIndices:t,drawIndices:s}}const $=g();function ee(e,t,r,s,i,o,c){const m=e.stageObject,p=m.geometries,h=p.length,u="absolute-height"!==t.mode;let g=0;const f=m.transformation,y=n(a(),f);for(let n=0;n<h;n+=2){const e=p[n];if(!W(e))continue;const t=e.getMutableAttribute("position").data,a=o[n/2],h=new F(e.mapPositions),b=t.length/3;let _=!1,x=0;{let e=0;for(let o=0;o<b;o++){$[0]=t[e],$[1]=t[e+1],$[2]=t[e+2],s(h,oe),u&&(x+=oe.sampledElevation),R.ENABLE_OPTIMIZATIONS?(l(se,t[e],t[e+1],t[e+2]),d(se,se,f),i.setAltitude(se,oe.z+a[e/3]),d(se,se,y)):(l(se,h.array[h.offset],h.array[h.offset+1],oe.z+a[e/3]),null!=r&&i.toRenderCoords(se,r,se),d(se,se,y)),t[e]=se[0],t[e+1]=se[1],t[e+2]=se[2];const o=ne/i.unitInMeters;(Math.abs($[0]-t[e])>=o||Math.abs($[1]-t[e+1])>=o||Math.abs($[2]-t[e+2])>=o)&&(_=!0),h.offset+=3,e+=3}}if(_){const t=c.get(e);t&&te(e,t,f),m.geometryVertexAttributeUpdated(p[n],"normalCompressed"),e.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n],"position"),p[n+1].invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n+1],"position")}g+=x/b}return g/h}function te(e,t,r){const s=e.getMutableAttribute("position"),i=e.getMutableAttribute("normalCompressed").data,o=s.data,n=e.primitivePositionIndices,{topVertexStart:a,topVertexCount:u,topFaceStart:g,topFaceCount:f}=t,y=g+f,b=a+u,_=ae,x=le,j=ce,w=ie,S=se;l(S,0,0,0);const v=(e,t)=>{const s=3*e;l(t,o[s+0],o[s+1],o[s+2]),d(t,t,r)};for(let l=g;l<y;++l){const e=3*l;v(n[e+0],_[0]),v(n[e+1],_[1]),v(n[e+2],_[2]),c(x,_[1],_[0]),c(j,_[2],_[0]),m(w,x,j),p(S,S,w)}h(S,S);for(let l=a;l<b;++l){const e=S[0],t=S[1],r=S[2];q(i,l,e,t,r)}}function re(e){return 1===(e.material?.color?.a??0)}const se=g(),ie=g(),oe=new D,ne=.01,ae=[g(),g(),g()],le=g(),ce=g();class me{constructor(e,t,r,s){this.positions=e,this.elevation=t,this.normals=r,this.heights=s}}class pe{constructor(e,t,r,s){this.topVertexStart=e,this.topVertexCount=t,this.topFaceStart=r,this.topFaceCount=s}}export{Q as Graphics3DExtrudeSymbolLayer};
|
|
2
|
+
import{clone as e}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as t}from"../../../../core/units.js";import{normalFromMat4 as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as s,invertOrIdentity as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as a,sub as l,cross as c,add as m,normalize as p,transformMat4 as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as d,create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as g,ZEROS as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as f}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as b,fromBuffer as _,intersectsClippingArea as x}from"../../../../geometry/support/aaBoundingBox.js";import{getZeroIndexArray as v}from"../../../../geometry/support/Indices.js";import{t as w}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as C,SnappingCandidateEdge as S}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as j}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as P,SampleElevationInfo as E}from"./elevationAlignmentUtils.js";import{extrudePolygon as I}from"./extrudeUtils.js";import{Object3DEdgeState as A,Graphics3DObject3DGraphicLayer as U}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as O}from"./graphicUtils.js";import{geometryAsPolygon as D}from"./polygonUtils.js";import{createMaterial as M}from"../support/edgeUtils.js";import{encodeNaNUInt8 as L}from"../support/symbolColorUtils.js";import{debugFlags as G}from"../../support/debugFlags.js";import{SamplePosition as V}from"../../support/ElevationProvider.js";import{loadTessellationUtils as B,preloadedPolygonToRenderInfoElevationAligned as R}from"../../support/renderInfoUtils/polygon.js";import{Attribute as F}from"../../webgl-engine/lib/Attribute.js";import{Geometry as T}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as N}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as H,compressNormal as q}from"../../webgl-engine/lib/Normals.js";import{Object3D as W}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as k}from"../../webgl-engine/materials/DefaultMaterial.js";const Z=["polygon","extent"];class J extends z{constructor(e,t,r,i){super(e,t,r,i,ee(t)),this.ensureDrapedStatus(!1)}async doLoad(){const e=this.symbolLayer,t=e?.material,r=this.symbolLayer.material?.color?.a,i=this._hasDrivenColorOrOpacity,s=this.needsDrivenTransparentPass||i&&null!=r&&r<1,o=t?.emissive,n=("color"===o?.source?o?.strength:void 0)??0,a=!i&&(null==r||0===r),l=i?g:this._materialColor?.toUnitRGBA()??y,c={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,useIndexing:!0,ambient:d,diffuse:d,externalColor:l,opacity:a?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:s,hasSymbolColors:i,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:e.castShadows,emissiveStrengthFromSymbol:n,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},m=new k(c,this._context),p=new k({...c,cullFace:2},this._context);this._materials[0]=m,this._materials[1]=p,this._updateTransparentDepedentMaterialParameters(),await B()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,Z,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(e.renderingInfo,this._materialColor,!1);L(r,r);const i=this.createElevationContextForGraphic(t);return this._createAs3DShape(t,e.renderingInfo,r,i,t.uid)}layerOpacityChanged(e,t){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),e?.forEach(e=>t(e)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,P)}slicePlaneEnabledChanged(e,t){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e?.forEach(e=>{const r=t(e);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const e={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(e),this._materials[1]?.setParameters(e),!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?j(e.size.output,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?0:1}async queryForSnapping(r,i,s,o){const n=this._getExtrusionSize(s)*this._context.renderCoordsHelper.unitInMeters/t(i),{objectId:a,target:l}=r,c=e(l);switch(c.z=(c.z??0)+n,r.type){case"edge":{const{start:t,end:i}=r,s=e(t),o=e(i);return s.z=(s.z??0)+n,o.z=(o.z??0)+n,[new S(a,c,1/0,s,o)]}case"vertex":return[new C(a,c,1/0),new S(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,t,o,a,l){const c=D(e.geometry);if(null==c)return null;if(0===c.rings.length||!c.rings.some(e=>e.length>0))return this._logGeometryValidationWarnings(c.rings,"rings","ExtrudeSymbol3DLayer"),null;const m=R(c,this._context.elevationProvider,this._context.renderCoordsHelper,a,{outlineOutput:"tessellated-indices"});if(null==m)return;this._logGeometryCreationWarnings(m,c.rings,"rings","ExtrudeSymbol3DLayer");const p=O(c);if(null==p)return null;const h=new Array,d=new Array,g=b(),y=n(),v=u(),C=1===this._context.renderCoordsHelper.viewingMode;C||this._context.renderCoordsHelper.worldUpAtPosition(null,v),f(c.spatialReference,[p.x,p.y,0],y,this._context.renderCoordsHelper.spatialReference);const S=n();s(S,y);const j=i();r(j,S);const E=new Map,z=this._materials[0];if(this._context.clippingExtent&&(_(m.mapPositions,g),!x(g,this._context.clippingExtent)))return;if(0===m.polygonIndexCount)return;const L=this._getExtrusionSize(t),G=I(m,{height:L,worldUp:v,spherical:C,requireElevation:!0,requireNormals:!0,requireSizes:!0});if(null==G)return;w(G.vertices,G.vertices,S);const V=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:l,layerViewUid:this._context.layerViewUid}),B=new le(G.vertices,G.elevation,H(G.normals),G.sizes),F=K(z,G.indices,G.indices.length-G.bottomIndices.length,B,o,V),T=m.vertexCount,N=T,q=T,k=2*m.outlineSegmentCount,Z=m.polygonIndexCount/3,J=new ce(N,q,k,Z);if($(F,J,y),E.set(F,J),h.push(F,K(this._materials[1],G.bottomIndices,0,B,o,V)),d.push(B.heights),0===h.length)return null;const Q=new W({geometries:h,layerViewUid:this._context.layerViewUid,graphicUid:l,isElevationSource:!0});Q.transformation=y;const X=M(this.symbolLayer,{opacity:this._getLayerOpacity()}),ee=X?new A(this._materials[0],X,this._context.slicePlaneEnabled):null,te=new U(this,Q,null,(e,t,r,i,s)=>Y(e,t,r,i,s,d,E),a,ee);return te.alignedSampledElevation=m.sampledElevation,te.needsElevationUpdates=P(a.mode),te}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const e=this._materials[0];e&&e.setParameters({cullFace:e.transparent?0:2})}}function K(e,t,r,i,s,o){const{attributeIndices:n,drawIndices:a}=Q(t),l=[["position",new F(i.positions,n,3,!0)],["normalCompressed",new F(i.normals,n,2,!0)]];if(e.parameters.hasSymbolColors){const e=v(n.length);l.push(["symbolColor",new F(s,e,4,!0)])}return new T(e,l,i.elevation,0,o,r,null,a)}function Q(e){const t=new Array,r=new Map,i=new Array;for(let s=0;s<e.length;++s){const o=e[s];let n=r.get(o);null==n&&(n=t.length,t.push(o),r.set(o,n)),i.push(n)}return{attributeIndices:t,drawIndices:i}}const X=u();function Y(e,t,r,i,s,l,c){const m=e.stageObject,p=m.geometries,d=p.length,u="absolute-height"!==t.mode;let g=0;const y=m.transformation,f=o(n(),y);for(let o=0;o<d;o+=2){const e=p[o];if(!N(e))continue;const t=e.getMutableAttribute("position").data,n=l[o/2],d=new V(e.mapPositions),b=t.length/3;let _=!1,x=0;{let e=0;for(let o=0;o<b;o++){X[0]=t[e],X[1]=t[e+1],X[2]=t[e+2],i(d,ie),u&&(x+=ie.sampledElevation),G.ENABLE_OPTIMIZATIONS?(a(te,t[e],t[e+1],t[e+2]),h(te,te,y),s.setAltitude(te,ie.z+n[e/3]),h(te,te,f)):(a(te,d.array[d.offset],d.array[d.offset+1],ie.z+n[e/3]),null!=r&&s.toRenderCoords(te,r,te),h(te,te,f)),t[e]=te[0],t[e+1]=te[1],t[e+2]=te[2];const o=se/s.unitInMeters;(Math.abs(X[0]-t[e])>=o||Math.abs(X[1]-t[e+1])>=o||Math.abs(X[2]-t[e+2])>=o)&&(_=!0),d.offset+=3,e+=3}}if(_){const t=c.get(e);t&&$(e,t,y),m.geometryVertexAttributeUpdated(p[o],"normalCompressed"),e.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[o],"position"),p[o+1].invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[o+1],"position")}g+=x/b}return g/d}function $(e,t,r){const i=e.getMutableAttribute("position"),s=e.getMutableAttribute("normalCompressed").data,o=i.data,n=e.primitivePositionIndices,{topVertexStart:d,topVertexCount:u,topFaceStart:g,topFaceCount:y}=t,f=g+y,b=d+u,_=oe,x=ne,v=ae,w=re,C=te;a(C,0,0,0);const S=(e,t)=>{const i=3*e;a(t,o[i+0],o[i+1],o[i+2]),h(t,t,r)};for(let a=g;a<f;++a){const e=3*a;S(n[e+0],_[0]),S(n[e+1],_[1]),S(n[e+2],_[2]),l(x,_[1],_[0]),l(v,_[2],_[0]),c(w,x,v),m(C,C,w)}p(C,C);for(let a=d;a<b;++a){const e=C[0],t=C[1],r=C[2];q(s,a,e,t,r)}}function ee(e){return 1===(e.material?.color?.a??0)}const te=u(),re=u(),ie=new E,se=.01,oe=[u(),u(),u()],ne=u(),ae=u();class le{constructor(e,t,r,i){this.positions=e,this.elevation=t,this.normals=r,this.heights=i}}class ce{constructor(e,t,r,i){this.topVertexStart=e,this.topVertexCount=t,this.topFaceStart=r,this.topFaceCount=i}}export{J as Graphics3DExtrudeSymbolLayer};
|