@arcgis/core 5.2.0-next.112 → 5.2.0-next.114
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/Ground.js +1 -1
- package/arcgisGlobal.d.ts +6 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +1 -0
- package/assets/esri/core/workers/chunks/{f5a988bb850f7a7af143.js → 05b373a663cb5d4d722f.js} +1 -1
- package/assets/esri/core/workers/chunks/{36f8caeb574dcd5c0ed5.js → 0b727d7bf3e36e146725.js} +1 -1
- package/assets/esri/core/workers/chunks/0c65862e3dd810015491.js +1 -0
- package/assets/esri/core/workers/chunks/0e3e58ba8e2d358121a5.js +1 -0
- package/assets/esri/core/workers/chunks/0edebc6c516f0b9dac7b.js +1 -0
- package/assets/esri/core/workers/chunks/1004e77593dfa506cd5d.js +1 -0
- package/assets/esri/core/workers/chunks/184942ea601237c8241a.js +1 -0
- package/assets/esri/core/workers/chunks/20de0ea9fa08a6545978.js +1 -0
- package/assets/esri/core/workers/chunks/214d63813d268afc265d.js +1 -0
- package/assets/esri/core/workers/chunks/22e85819e23202a8ba90.js +1 -0
- package/assets/esri/core/workers/chunks/{6e677505d257e0848075.js → 23f9ab77e4e263f82636.js} +1 -1
- package/assets/esri/core/workers/chunks/28a04887ecaee5445d14.js +1 -0
- package/assets/esri/core/workers/chunks/{2fc5c1504691badc7792.js → 2ac2d0a7623dd060c144.js} +1 -1
- package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +1 -0
- package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +1 -0
- package/assets/esri/core/workers/chunks/36a7e19f43517aa94577.js +1 -0
- package/assets/esri/core/workers/chunks/{6e6cdff4bbe1ff2f44ac.js → 3ab25279aaa30f035038.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6dae16208f6978b59e0.js → 3b499cfc89c8f87cdb20.js} +1 -1
- package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +1 -0
- package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 4bf2cc4d092601ff2b86.js} +1 -1
- package/assets/esri/core/workers/chunks/{d45483dd0dc2853b18b7.js → 4bfd63f3cf9208eb839b.js} +33 -33
- package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +1 -0
- package/assets/esri/core/workers/chunks/510a190a6f0a60ae38c3.js +1 -0
- package/assets/esri/core/workers/chunks/{89a785f8b61263e2d592.js → 552c92b01a5f02a115c5.js} +1 -1
- package/assets/esri/core/workers/chunks/564fdf0d663b773806cc.js +1 -0
- package/assets/esri/core/workers/chunks/{d9270f4935eb0d044db3.js → 57328c206f1e699ac06f.js} +1 -1
- package/assets/esri/core/workers/chunks/{50951fb13013b11b8a24.js → 58e62c8ce1292f4d3b06.js} +1 -1
- package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +1 -0
- package/assets/esri/core/workers/chunks/5b9925f23d4b10a7087e.js +1 -0
- package/assets/esri/core/workers/chunks/5f79ba5639067f734791.js +1 -0
- package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 60c61f34733063730386.js} +1 -1
- package/assets/esri/core/workers/chunks/62b1f94f4fa978d4da48.js +1 -0
- package/assets/esri/core/workers/chunks/6b264006b96cbf93d8ed.js +1 -0
- package/assets/esri/core/workers/chunks/6b9d29ca568590358478.js +1 -0
- package/assets/esri/core/workers/chunks/{7c5310e0104c22da0261.js → 6c7cb7974969e3167f2b.js} +1 -1
- package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +1 -0
- package/assets/esri/core/workers/chunks/{e98b785e8f4edc8bd3ff.js → 6eceeca33fac8e900d9d.js} +1 -1
- package/assets/esri/core/workers/chunks/7232fc11b23777b6be94.js +1 -0
- package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +1 -0
- package/assets/esri/core/workers/chunks/785206da3962ba23de16.js +1 -0
- package/assets/esri/core/workers/chunks/{1c70620f40be02f532b5.js → 7b169eabafcc03bfaee6.js} +1 -1
- package/assets/esri/core/workers/chunks/7bbc3d22383388d11345.js +1 -0
- package/assets/esri/core/workers/chunks/{082069f80eee0407b828.js → 7edf57e31ff07af9032b.js} +1 -1
- package/assets/esri/core/workers/chunks/83ed38468e316302b157.js +1 -0
- package/assets/esri/core/workers/chunks/85c876ee9e63d5732937.js +1 -0
- package/assets/esri/core/workers/chunks/8f0ecf4d06ec7b67d4ed.js +1 -0
- package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +1 -0
- package/assets/esri/core/workers/chunks/{a1916bca1af5c65be4b0.js → 90ab3c47138875070a53.js} +1 -1
- package/assets/esri/core/workers/chunks/{10389c87d9c6a43363ce.js → 917dec9c004218c58950.js} +1 -1
- package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +1 -0
- package/assets/esri/core/workers/chunks/943d0026ca4d49eb3ac2.js +1 -0
- package/assets/esri/core/workers/chunks/982a396bd4fffa62e911.js +1 -0
- package/assets/esri/core/workers/chunks/98a5327fd96d9542b39f.js +1 -0
- package/assets/esri/core/workers/chunks/9b9a60f1e0c48aa701f0.js +1 -0
- package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +1 -0
- package/assets/esri/core/workers/chunks/9df379041e8860fe7f01.js +1 -0
- package/assets/esri/core/workers/chunks/{1e8ceb4a4b28625236e3.js → a42505b978d54d36d3b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfbe6ff786435fe1e7cf.js → a86a4e550a92f770d6d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{a34eee4c9d4c1c2b8c49.js → ab60f3bc18b5ea504f70.js} +1 -1
- package/assets/esri/core/workers/chunks/{18b9ec6ba7a6c0fa2ac6.js → b1880d9f5eafd50ce84b.js} +1 -1
- package/assets/esri/core/workers/chunks/{777fc163530448eea13e.js → b4222152efaf73b37b53.js} +1 -1
- package/assets/esri/core/workers/chunks/b6ca73c1384f07b30b74.js +1 -0
- package/assets/esri/core/workers/chunks/bb4cbf6b7c35e8c78cc7.js +1 -0
- package/assets/esri/core/workers/chunks/bb831d23422acfb00ae2.js +1 -0
- package/assets/esri/core/workers/chunks/c0855be20ffcd52c7026.js +1 -0
- package/assets/esri/core/workers/chunks/{a0f742fd947104662d37.js → c6277236ec47586dca00.js} +1 -1
- package/assets/esri/core/workers/chunks/{3be33a129d3ae7dc4f06.js → caf38cf4d8542fb11c46.js} +1 -1
- package/assets/esri/core/workers/chunks/{2728eda8178e02fbca47.js → cd0f5cd0fefe7f49e3d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{48a53bfeef11c32dadcc.js → d25fb32a233d2128afbe.js} +1 -1
- package/assets/esri/core/workers/chunks/d629708bf23da24ee523.js +1 -0
- package/assets/esri/core/workers/chunks/db141122060d8d9b38da.js +1 -0
- package/assets/esri/core/workers/chunks/dc1944a7601b518a9c48.js +1 -0
- package/assets/esri/core/workers/chunks/{573ee2e59d26bc75201e.js → dc8670f32bb0b93c1473.js} +1 -1
- package/assets/esri/core/workers/chunks/e164acd876bbd42ed658.js +1 -0
- package/assets/esri/core/workers/chunks/e1f2b07be33e33117313.js +1 -0
- package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +1 -0
- package/assets/esri/core/workers/chunks/e5906b28b981199fd489.js +1 -0
- package/assets/esri/core/workers/chunks/{b3293ee9f221423a6825.js → e611e452f04a9ce64cf8.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f20c458f873564faff2.js → ec4f887153c24ab83f2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{707b4ae689c4329cad3b.js → f40ceb5e03c699605302.js} +1 -1
- package/assets/esri/core/workers/chunks/{547a073c789fdfb78310.js → f42243c62dd0b6993816.js} +1 -1
- package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +1 -0
- package/assets/esri/core/workers/chunks/fdf5ceffec9d5185953d.js +1 -0
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/Expand/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Features/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Features/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/support/GridControls/t9n/messages.pt-BR.json +1 -1
- package/chunks/DeepSky.glsl.js +2 -2
- package/chunks/FocusArea.glsl.js +1 -1
- package/chunks/GaussianSplatDepth.glsl.js +3 -3
- package/chunks/RibbonLine.glsl.js +15 -13
- package/config.js +1 -1
- package/core/Evented.d.ts +1 -1
- package/form/elements/AttachmentElement.d.ts +5 -5
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -1
- package/geometry/Extent.js +1 -1
- package/geometry/operators/affineTransformOperator.d.ts +9 -3
- package/geometry/operators/affineTransformOperator.js +1 -1
- package/geometry/operators/alphaShapeOperator.d.ts +14 -4
- package/geometry/operators/alphaShapeOperator.js +1 -1
- package/geometry/operators/areaOperator.d.ts +11 -3
- package/geometry/operators/areaOperator.js +1 -1
- package/geometry/operators/autoCompleteOperator.d.ts +6 -2
- package/geometry/operators/autoCompleteOperator.js +1 -1
- package/geometry/operators/boundaryOperator.d.ts +9 -3
- package/geometry/operators/boundaryOperator.js +1 -1
- package/geometry/operators/bufferOperator.d.ts +19 -5
- package/geometry/operators/bufferOperator.js +1 -1
- package/geometry/operators/centroidOperator.d.ts +6 -2
- package/geometry/operators/centroidOperator.js +1 -1
- package/geometry/operators/clipOperator.d.ts +9 -3
- package/geometry/operators/clipOperator.js +1 -1
- package/geometry/operators/containsOperator.d.ts +9 -3
- package/geometry/operators/containsOperator.js +1 -1
- package/geometry/operators/convexHullOperator.d.ts +17 -5
- package/geometry/operators/convexHullOperator.js +1 -1
- package/geometry/operators/crossesOperator.d.ts +9 -3
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/cutOperator.d.ts +6 -2
- package/geometry/operators/cutOperator.js +1 -1
- package/geometry/operators/densifyOperator.d.ts +14 -4
- package/geometry/operators/densifyOperator.js +1 -1
- package/geometry/operators/differenceOperator.d.ts +9 -3
- package/geometry/operators/differenceOperator.js +1 -1
- package/geometry/operators/disjointOperator.d.ts +9 -3
- package/geometry/operators/disjointOperator.js +1 -1
- package/geometry/operators/distanceOperator.d.ts +11 -3
- package/geometry/operators/distanceOperator.js +1 -1
- package/geometry/operators/equalsOperator.d.ts +9 -3
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/extendOperator.d.ts +11 -3
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/generalizeOperator.d.ts +14 -4
- package/geometry/operators/generalizeOperator.js +1 -1
- package/geometry/operators/geodesicBufferOperator.d.ts +25 -7
- package/geometry/operators/geodesicBufferOperator.js +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +28 -8
- package/geometry/operators/geodesicProximityOperator.js +1 -1
- package/geometry/operators/geodeticAreaOperator.d.ts +17 -5
- package/geometry/operators/geodeticAreaOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.d.ts +20 -6
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +17 -5
- package/geometry/operators/geodeticDistanceOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.d.ts +17 -5
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +17 -5
- package/geometry/operators/geodeticUtilsOperator.js +1 -1
- package/geometry/operators/graphicBufferOperator.d.ts +11 -3
- package/geometry/operators/graphicBufferOperator.js +1 -1
- package/geometry/operators/integrateOperator.d.ts +6 -2
- package/geometry/operators/integrateOperator.js +1 -1
- package/geometry/operators/intersectionOperator.d.ts +12 -4
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/intersectsOperator.d.ts +9 -3
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/isNearOperator.d.ts +11 -3
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/bufferOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/convexHullOperator.js +1 -1
- package/geometry/operators/json/crossesOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/json/generalizeOperator.js +1 -1
- package/geometry/operators/json/geodesicBufferOperator.js +1 -1
- package/geometry/operators/json/graphicBufferOperator.js +1 -1
- package/geometry/operators/json/intersectionOperator.js +1 -1
- package/geometry/operators/json/intersectsOperator.js +1 -1
- package/geometry/operators/json/lengthOperator.js +1 -1
- package/geometry/operators/json/offsetOperator.js +1 -1
- package/geometry/operators/json/overlapsOperator.js +1 -1
- package/geometry/operators/json/projectOperator.js +1 -1
- package/geometry/operators/json/simplifyOperator.js +1 -1
- package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
- package/geometry/operators/json/touchesOperator.js +1 -1
- package/geometry/operators/json/unionOperator.js +1 -1
- package/geometry/operators/json/withinOperator.js +1 -1
- package/geometry/operators/labelPointOperator.d.ts +9 -3
- package/geometry/operators/labelPointOperator.js +1 -1
- package/geometry/operators/lengthOperator.d.ts +11 -3
- package/geometry/operators/lengthOperator.js +1 -1
- package/geometry/operators/linesToPolygonsOperator.d.ts +6 -2
- package/geometry/operators/linesToPolygonsOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +6 -2
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +14 -4
- package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +11 -3
- package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
- package/geometry/operators/offsetOperator.d.ts +14 -4
- package/geometry/operators/offsetOperator.js +1 -1
- package/geometry/operators/overlapsOperator.d.ts +9 -3
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/polygonOverlayOperator.d.ts +11 -3
- package/geometry/operators/polygonOverlayOperator.js +1 -1
- package/geometry/operators/polygonSlicerOperator.d.ts +22 -6
- package/geometry/operators/polygonSlicerOperator.js +1 -1
- package/geometry/operators/projectOperator.d.ts +15 -5
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/proximityOperator.d.ts +22 -6
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.d.ts +12 -4
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.d.ts +6 -2
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.d.ts +20 -6
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +3 -1
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/geometry/operators/simplifyOperator.d.ts +12 -4
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
- package/geometry/operators/support/deprecatedOperator.js +2 -0
- package/geometry/operators/symmetricDifferenceOperator.d.ts +9 -3
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/touchesOperator.d.ts +9 -3
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/unionOperator.d.ts +9 -3
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/operators/withinOperator.d.ts +9 -3
- package/geometry/operators/withinOperator.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/list/BasemapItemCollection.d.ts +40 -14
- package/layers/list/BasemapItemCollection.js +1 -1
- package/layers/list/CatalogItemCollection.d.ts +29 -11
- package/layers/list/CatalogItemCollection.js +1 -1
- package/layers/list/Item.d.ts +66 -122
- package/layers/list/Item.js +1 -1
- package/layers/list/ItemPanel.d.ts +23 -34
- package/layers/list/LayerItemCollection.d.ts +33 -43
- package/layers/list/LayerItemCollection.js +1 -1
- package/layers/list/TableItem.d.ts +42 -53
- package/layers/list/TableItem.js +1 -1
- package/layers/list/TableItemCollection.d.ts +25 -55
- package/layers/list/TableItemCollection.js +1 -1
- package/layers/list/TableItemPanel.d.ts +25 -23
- package/layers/list/support/layerListUtils.js +1 -1
- package/layers/list/types.d.ts +158 -37
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/FeatureFilter.d.ts +2 -1
- package/layers/support/FeatureFilter.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +2 -2
- package/layers/support/FeatureReductionCluster.d.ts +2 -2
- package/layers/support/SubtypeSublayer.d.ts +1 -1
- package/package.json +3 -3
- package/popup/FeatureContent.d.ts +7 -7
- package/portal/schemas/definitions.js +1 -1
- package/portal/types.d.ts +1 -1
- package/renderers/DotDensityRenderer.d.ts +2 -2
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +0 -1
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +1 -1
- package/rest/knowledgeGraphService.d.ts +2 -2
- package/rest/support/Query.d.ts +1 -3
- package/rest/support/RelationshipQuery.d.ts +1 -1
- package/support/revision.js +1 -1
- package/symbols/LineSymbol3D.js +1 -1
- package/symbols/LineSymbol3DLayer.d.ts +9 -3
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/OverrideHelper.js +1 -1
- package/symbols/cim/Rasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/dashUtils.js +2 -0
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/fromCIMFontStyle.js +2 -0
- package/symbols/cim/richTextUtils.js +1 -1
- package/symbols/cim/types.d.ts +32 -0
- package/symbols/cim/utils.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +10 -4
- package/symbols/patterns/LinePattern3D.js +1 -1
- package/symbols/patterns/LineTemplatePattern3D.d.ts +48 -0
- package/symbols/patterns/LineTemplatePattern3D.js +2 -0
- package/symbols/patterns/utils.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/decorGlyphRect.js +2 -0
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/MultiHighlightGradient.js +1 -1
- package/views/2d/engine/webgl/hashMosaic.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHighlight.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/AggregateStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/bins/BinLevelState.js +1 -1
- package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +1 -1
- package/views/2d/layers/features/processor/tracks/TrackLevelState.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
- package/views/2d/layers/support/FilterSchema.js +2 -0
- package/views/2d/layers/support/HighlightRegistry.js +2 -0
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/navigation/Navigation3D.d.ts +16 -0
- package/views/3d/navigation/Navigation3D.js +2 -0
- package/views/3d/navigation/modes/DefaultNavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/DefaultNavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/GroundNavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/NavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/NavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/NavigationMode3DUnion.d.ts +5 -0
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/effects/AmbientIllumination.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/BlurEmission.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.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/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +12 -8
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/BreakpointsOwner.d.ts +2 -2
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.d.ts +24 -24
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/interactive/support/types.d.ts +0 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.d.ts +8 -0
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +5 -1
- package/widgets/BasemapLayerList/types.d.ts +15 -2
- package/widgets/BasemapLayerList.d.ts +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +14 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +29 -2
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.d.ts +1 -5
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -2
- package/widgets/Editor.d.ts +2 -2
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +6 -6
- package/widgets/FeatureTable/support/FeatureStore.d.ts +2 -2
- package/widgets/FeatureTable.d.ts +5 -5
- package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/LayerListVisibleElements.d.ts +4 -1
- package/widgets/LayerList/ListItem.d.ts +4 -0
- package/widgets/LayerList/ListItemPanel.d.ts +3 -0
- package/widgets/OrientedImageryViewer/types.d.ts +2 -2
- package/widgets/OrientedImageryViewer.d.ts +20 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/03601be8b0763f82e88f.js +0 -1
- package/assets/esri/core/workers/chunks/0bff8d589312be6588fe.js +0 -1
- package/assets/esri/core/workers/chunks/0de90b1ad8118457fd5a.js +0 -1
- package/assets/esri/core/workers/chunks/0e1a067ab243900d0371.js +0 -1
- package/assets/esri/core/workers/chunks/0ee6109e6578395a7900.js +0 -1
- package/assets/esri/core/workers/chunks/0ee7376c29e0fd8f676c.js +0 -1
- package/assets/esri/core/workers/chunks/13551987fbeaae154df8.js +0 -1
- package/assets/esri/core/workers/chunks/186350d720352bd5ff33.js +0 -1
- package/assets/esri/core/workers/chunks/25ecf94d776c3b6db0f3.js +0 -1
- package/assets/esri/core/workers/chunks/262052dfaec3af8a58b9.js +0 -1
- package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +0 -1
- package/assets/esri/core/workers/chunks/307297e025eed110095f.js +0 -1
- package/assets/esri/core/workers/chunks/33422dca6f4bcaa0ea74.js +0 -1
- package/assets/esri/core/workers/chunks/33e583166ab3943ecf0e.js +0 -1
- package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +0 -1
- package/assets/esri/core/workers/chunks/3daddcb106a7009c5a70.js +0 -1
- package/assets/esri/core/workers/chunks/3de6e54b6ed0feae1940.js +0 -1
- package/assets/esri/core/workers/chunks/448f068a14f24f2f8a43.js +0 -1
- package/assets/esri/core/workers/chunks/4c088c26d5d546c95c90.js +0 -1
- package/assets/esri/core/workers/chunks/5134241be1f1bf25231a.js +0 -1
- package/assets/esri/core/workers/chunks/56163189fbe63aa11e94.js +0 -1
- package/assets/esri/core/workers/chunks/571cf99c3eab8e517542.js +0 -1
- package/assets/esri/core/workers/chunks/5762746cfb02a4119d82.js +0 -1
- package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +0 -1
- package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +0 -1
- package/assets/esri/core/workers/chunks/5c8f423812a23c02c1fd.js +0 -1
- package/assets/esri/core/workers/chunks/5eb726317b6602f1e206.js +0 -1
- package/assets/esri/core/workers/chunks/6e2075bd4832ff0db68c.js +0 -1
- package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +0 -1
- package/assets/esri/core/workers/chunks/7610dd0b46948b7bd840.js +0 -1
- package/assets/esri/core/workers/chunks/7737ab739eba6d81282d.js +0 -1
- package/assets/esri/core/workers/chunks/7be56ac60e580c806a5d.js +0 -1
- package/assets/esri/core/workers/chunks/7d9468e38f3bf006f86e.js +0 -1
- package/assets/esri/core/workers/chunks/7efc51324cfc8e08c756.js +0 -1
- package/assets/esri/core/workers/chunks/84dc2afd89263a311b81.js +0 -1
- package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +0 -1
- package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +0 -1
- package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +0 -1
- package/assets/esri/core/workers/chunks/be69e2dda75b079362b2.js +0 -1
- package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +0 -1
- package/assets/esri/core/workers/chunks/c18de0f6cbeecee4ce34.js +0 -1
- package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +0 -1
- package/assets/esri/core/workers/chunks/d33d08cb6856cd2eb35e.js +0 -1
- package/assets/esri/core/workers/chunks/e688e6e816824b53a25e.js +0 -1
- package/assets/esri/core/workers/chunks/ea068c797e3e462f4518.js +0 -1
- package/assets/esri/core/workers/chunks/eaf1d38f09744b7e84f5.js +0 -1
- package/assets/esri/core/workers/chunks/eff99e45d818e58fd443.js +0 -1
- package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +0 -1
- package/assets/esri/core/workers/chunks/f60d5ce49c173d5381ec.js +0 -1
- package/assets/esri/core/workers/chunks/f72f4413fc7461e11a2a.js +0 -1
- package/assets/esri/core/workers/chunks/f834aa732c3f06525089.js +0 -1
- package/assets/esri/core/workers/chunks/fae14e30fa7d81bf706e.js +0 -1
- package/assets/esri/core/workers/chunks/fb6f1b562ee0983c8c6e.js +0 -1
- package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +0 -1
- package/graphic/graphicOrigins.js +0 -2
- package/views/2d/engine/webgl/Utils.js +0 -2
- package/views/2d/layers/support/HighlightCounter.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{isSome as s}from"../../../../core/arrayUtils.js";import has from"../../../../core/has.js";import{IdentifiableMixin as r}from"../../../../core/Identifiable.js";import{assertIsSome as i}from"../../../../core/maybe.js";import{ignoreAbortErrors as o,throwIfAborted as a}from"../../../../core/promiseUtils.js";import{watch as n}from"../../../../core/reactiveUtils.js";import{property as h,subclass as d}from"../../../../core/accessorSupport/decorators.js";import{create as c}from"../../../../geometry/support/aaBoundingRect.js";import{isPolyline as l,isPolygon as p,isExtent as u,getJsonType as m}from"../../../../geometry/support/jsonTypeUtils.js";import f from"../../../../layers/support/FieldsIndex.js";import{symbolToCIM as g,CIMSymbolHelper as y}from"../../../../symbols/cim/CIMSymbolHelper.js";import{OverrideHelper as _}from"../../../../symbols/cim/OverrideHelper.js";import{errorPointSymbol2D as b,errorPolylineSymbol2D as w,errorPolygonSymbol2D as S}from"../../../../symbols/support/defaults.js";import{filterFlag0 as I}from"../../engine/webgl/definitions.js";import{FeatureTile as v}from"../../engine/webgl/FeatureTile.js";import{MeshData as T}from"../../engine/webgl/mesh/MeshData.js";import{ResourceProxy as M}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{createGraphicSymbolMeshSchemas as R}from"../../engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js";import{createStorageSchema as j}from"../features/schema/processor/StorageSchema.js";import{AttributeStore as x}from"../features/support/AttributeStore.js";import{ComputedAttributeStorage as U}from"../features/support/ComputedAttributeStorage.js";import{GraphicsMetadata as C}from"../features/support/FeatureMetadata.js";import{GraphicsReader as q}from"../features/support/GraphicsReader.js";import G from"./GraphicStore.js";import{FeatureCommandQueue as F}from"../support/FeatureCommandQueue.js";import{UpdateTracking2D as k}from"../support/UpdateTracking2D.js";class P{static getOrCreate(e,t,s){let r=t.get(e.id);return r||(r=new P(e,s),t.set(e.id,r)),r}static fromItems(e,t,s){const r=new P(e,s);for(const i of t)r.append(i);return r}constructor(e,t){this.tile=e,this.metadata=t,this.addedOrModified=[],this.removed=[],this.objectIdMap=null}get reader(){return this._reader||(this._reader=q.from(this.addedOrModified,this.tile,this.metadata)),this._reader}append(e){this.addedOrModified.push(e),e.hasAnimations&&(this.objectIdMap=this.objectIdMap||{},this.objectIdMap[e.displayId]=e.objectId)}}let E=class extends(r(t)){constructor(e){super(e),this._attached=!1,this._tiles=new Map,this._controller=new AbortController,this._hashToSymbolInfo=new Map,this._lastCleanup=performance.now(),this._cleanupRequired=!0,this.lastUpdateId=-1,this.renderer=null,this._updateTracking=new k({debugName:"GraphicsView2D"}),this.updateRequested=!1,this.defaultPointSymbolEnabled=!0,this._commandQueue=new F({process:e=>{if("update"===e.type)return this._update();throw new Error("InternalError: Unsupported command")}}),this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}destroy(){this.container.destroy(),this.view=null,this.renderer=null,this._set("graphics",null),this._controller.abort(),this._graphicStore.clear(),this._graphicStore.destroy(),this._attributeStore=null,this._hashToSymbolInfo.clear(),this._updateTracking.destroy(),this._commandQueue.destroy()}_initAttributeStore(){this._storage=new U({spatialReference:this.view.spatialReference,fields:new f}),this._attributeStore=new x({isLocal:!0,update:e=>{has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateStart`,{message:e}),this.container.attributeView.requestUpdate(e),this.container.requestRender(),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateEnd`,{message:e})}});const e=j(null,[]);this._attributeStore.update(e,this._storage,null),this.container.checkHighlight=()=>this._attributeStore.hasHighlight}initialize(){this._initAttributeStore(),this._metadata=C.createGraphics(this.view.spatialReference),this._resourceProxy=new M({fetch:e=>Promise.all(e.map(e=>this.view.stage.textureManager.rasterizeItem(e))),fetchDictionary:e=>{throw new Error("InternalError: Graphics do not support Dictionary requests")},fetchMesh:e=>{throw new Error("InternalError: Graphics do not support Mesh requests")}}),this.addHandles([n(()=>this._effectiveRenderer,()=>this._pushUpdate()),this.view.graphicsTileStore.on("update",this._onTileUpdate.bind(this)),this.container.on("attach",()=>{this.addHandles([this.graphics.on("change",()=>this._pushUpdate())]),this._graphicStore?.destroy(),this._graphicStore=new G(this.view.spatialReference,this._cimResourceManager,this.view.featuresTilingScheme,this.view.state.scale,this._attributeStore),this._attached=!0,this.requestUpdate(),this._pushUpdate()})]),this._updateTracking.addUpdateTracking("CommandQueue",this._commandQueue.updateTracking);const e=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:e,removed:[]})}get _effectiveRenderer(){return"function"==typeof this.renderer?this.renderer():this.renderer}get _cimResourceManager(){return this.view.stage.textureManager.resourceManager}get updating(){return!this._attached||this._updateTracking.updating}hitTest(e,t){if(!this.view||this.view.suspended)return[];const{resolution:r,rotation:i}=this.view.state,o=this._graphicStore.hitTest(e,t,r,i),a=new Set(o),n=this.graphics.items.reduce((e,t)=>(a.has(t.uid)&&e.set(t.uid,t),e),new Map);return o.map(e=>n.get(e)).filter(s)}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback()),this.notifyChange("updating")}processUpdate(e){this.updateRequested&&(this.updateRequested=!1,this.update(e))}viewChange(){this.requestUpdate()}setHighlight(e){const t=[];for(const{objectId:s,highlightFlags:r}of e){const e=this._graphicStore.getItem(s)?.displayId;t.push({objectId:s,highlightFlags:r,displayId:e})}this._attributeStore.setHighlight(t,e),this._pushUpdate()}graphicUpdateHandler(e){this._pushUpdate()}update(e){this.updateRequested=!1,this._attached&&this._graphicStore.updateLevel(e.state.resolution)&&this.pushUpdate()}pushUpdate(){this._pushUpdate()}_pushUpdate(){o(this._commandQueue.push({type:"update"}))}async _update(){try{if(has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView._update start`),this.graphics.destroyed)return;const e=await this._graphicStore.update(this.graphics,e=>this._getSymbolForGraphic(e),e=>this._ensureSymbolResource(e));for(const s of e.updated)this.container.restartAnimation(s.objectId);if(!e.hasAnyUpdate())return void this._attributeStore.sendUpdates();e.removed.length&&(this._cleanupRequired=!0),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView updateMessage`,e);const t=this._createTileMessages(e);await this._densifyItemsForDisplay(t),await this._fetchResources(t),this._write(t);for(const s of e.added)this._setFilterState(s);for(const s of e.updated)this._setFilterState(s);has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate`,e),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate.await`,e)}catch(e){}this._cleanupSharedResources()}_createTileMessages(e){const t=new Map;for(const s of e.added){const e=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const r of e){P.getOrCreate(r,t,this._metadata).append(s)}}for(const s of e.updated){const e=this.view.graphicsTileStore.getIntersectingTiles(s.prevSymbolBounds),r=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const i of e){P.getOrCreate(i,t,this._metadata).removed.push(s.displayId)}for(const i of r){P.getOrCreate(i,t,this._metadata).append(s)}}for(const s of e.removed){const e=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const r of e){P.getOrCreate(r,t,this._metadata).removed.push(s.displayId)}}return Array.from(t.values())}async _densifyItemsForDisplay(e){const t=new Map;for(const s of e)for(const e of s.addedOrModified)t.has(e)||t.set(e,e.densifyCurvedGeometryForDisplay(this.view.spatialReference));await Promise.all(t.values())}async _fetchResources(e){const t={timeZone:null,timeExtent:null};for(const{tile:s,reader:r}of e){has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${s.id}] GraphicsView fetchResources`,e);const i=r.getCursor();for(;i.next();)for(const e of i.getMeshWriters())e.enqueueRequest(this._resourceProxy,i,s.createArcadeEvaluationOptions(t))}await this._resourceProxy.fetchEnqueuedResources()}_write(e){for(const t of e){has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${t.tile.id}] GraphicsView write`,t);const e=this._writeMeshes(t);let s=this._tiles.get(t.tile.key);s||(s=this._createFeatureTile(t.tile.key)),has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${t.tile.id}] GraphicsView onTileData`,t),this.container.onTileData(s,{type:"update",modify:e,remove:t.removed,end:!1,attributeEpoch:this._attributeStore.epoch,objectIdMap:t.objectIdMap}),this.container.requestRender()}}_writeMeshes(e){const t={timeZone:null,timeExtent:null},s=new T(e.tile.id),r=e.reader.getCursor();for(;r.next();){s.entityStart(r.getDisplayId(),r.getZOrder());for(const i of r.getMeshWriters())i.write(s,this._resourceProxy,r,e.tile.createArcadeEvaluationOptions(t),e.tile.level);s.entityEnd()}return{...s.serialize().message,tileId:e.tile.id,requiresRefresh:!1}}_setFilterState(e){const t=e.displayId,s=this._attributeStore.getHighlightFlags(e.objectId);this._attributeStore.setData(t,0,0,s|(e.visible?I:0))}_getSymbolForGraphic(e){return null!=e.symbol?e.symbol:null!=this._effectiveRenderer?this._effectiveRenderer.getSymbol(e):this._getNullSymbol(e)}async _ensureSymbolResource(e){if(!e.symbol)return;const t=await this._getSymbolInfo(e.symbol);if(!t)return;const s=t.linearCIM.filter(e=>"text"===e.type);if(s.length>0){const r=await this._getTextResources(e,s);return void(e.symbolResource={symbolInfo:t,textInfo:r})}e.symbolResource={symbolInfo:t}}_getSymbolInfo(e){const t=e.hash();return this._hashToSymbolInfo.has(t)||this._hashToSymbolInfo.set(t,this._createSymbolInfo(t,e).catch(e=>null)),this._hashToSymbolInfo.get(t)}async _createSymbolInfo(e,t){const s=await this._convertToCIMSymbol(t),r=await this._createLinearCIM(s);return{hash:e,cimSymbol:s,linearCIM:r,meshWriters:await this._createMeshWriters(s,r)}}async _convertToCIMSymbol(e){const t=g(e);return"web-style"===t.type?this._convertToCIMSymbol(await t.fetchSymbol({acceptedFormats:["cim","web"]})):t}async _createLinearCIM(e){return await y.normalizeSymbolAndFetchResources(e.symbol,this._cimResourceManager),this.view.stage.cimAnalyzer.analyzeSymbolReference(e,!1)}async _createMeshWriters(e,t){a(this._controller.signal);const s=this.container.instanceStore,r=this.view.stage.meshWriterRegistry,i=await R(e,t,s);return Promise.all(i.map(e=>r.createMeshWriter(this._storage,this._resourceProxy,{tileInfo:this.view.featuresTilingScheme.tileInfo},e,null)))}_onTileUpdate(e){if(e.added&&e.added.length>0)for(const t of e.added)this._updateTracking.consumePromise(this._addTile(t));if(e.removed&&e.removed.length>0)for(const t of e.removed)this._removeTile(t.key)}_createFeatureTile(e){const t=this.view.featuresTilingScheme.getTileBounds(c(),e),s=this.view.featuresTilingScheme.getTileResolution(e.level),r=new v(e,s,t[0],t[3]);return r.presenting=!0,this._tiles.set(e,r),this.container.addChild(r),r}async _addTile(e){if(!this._attached)return;const t=this._graphicStore.queryItems(e);if(!t.length)return;const s=this._createFeatureTile(e.key),r=P.fromItems(e,t,this._metadata);await this._densifyItemsForDisplay([r]),await this._fetchResources([r]);const i=this._writeMeshes(r);s.update({type:"append",append:i,end:!0,attributeEpoch:this._attributeStore.epoch,objectIdMap:r.objectIdMap})}_removeTile(e){if(!this._tiles.has(e))return;const t=this._tiles.get(e);this.container.removeChild(t),t.destroy(),this._tiles.delete(e)}_getNullSymbol(e){const t=e.geometry;return t?l(t)?w:p(t)||u(t)?S:this.defaultPointSymbolEnabled?b:null:this.defaultPointSymbolEnabled?b:null}async _getTextResources(e,t){const s=new Array,r=new Array;for(let i=0;i<t.length;i++){const o=t[i],{resource:a,overrides:n}=o.textRasterizationParam;if(n?.length>0){const t=_.resolveSymbolOverrides({type:"CIMSymbolReference",primitiveOverrides:n,symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,size:a.symbol.height,anchorPointUnits:"Relative",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:a.symbol,textString:a.textString}],scaleSymbolsProportionally:!0,respectFrame:!0}]}},e,this.view.spatialReference,null,m(e.projectedGeometry),null,null);t.then(e=>{const t=e.symbolLayers[0],{textString:s}=t.markerGraphics[0];r.push({type:"cim-rasterization-info",resource:{type:"text",textString:s||"",font:a.font}}),o.text=a.textString=s||""}),s.push(t)}else r.push({type:"cim-rasterization-info",resource:a})}s.length>0&&await Promise.all(s);const o=r.map(e=>this.view.stage.textureManager.rasterizeItem(e)),a=await Promise.all(o);i(a);const n=new Map;for(let i=0;i<t.length;i++){const e=t[i];n.set(e.textRasterizationParam.resource.symbol,{text:e.text,glyphMosaicItems:a[i]})}return n}_cleanupSharedResources(){if(!this._cleanupRequired)return;const e=performance.now();if(e-this._lastCleanup<5e3)return;this._cleanupRequired=!1,this._lastCleanup=e;const t=new Set;for(const r of this._graphicStore.items()){const e=r.symbolResource?.symbolInfo.hash;t.add(e)}const s=new Set(this._hashToSymbolInfo.keys());for(const r of s.values())t.has(r)||this._hashToSymbolInfo.delete(r)}};e([h()],E.prototype,"_effectiveRenderer",null),e([h({constructOnly:!0})],E.prototype,"layerId",void 0),e([h({constructOnly:!0})],E.prototype,"requestUpdateCallback",void 0),e([h()],E.prototype,"container",void 0),e([h({constructOnly:!0})],E.prototype,"graphics",void 0),e([h()],E.prototype,"renderer",void 0),e([h()],E.prototype,"_updateTracking",void 0),e([h()],E.prototype,"updating",null),e([h()],E.prototype,"view",void 0),e([h()],E.prototype,"updateRequested",void 0),e([h()],E.prototype,"defaultPointSymbolEnabled",void 0),E=e([d("esri.views.2d.layers.graphics.GraphicsView2D")],E);const A=E;export{A as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{isSome as s}from"../../../../core/arrayUtils.js";import has from"../../../../core/has.js";import{IdentifiableMixin as r}from"../../../../core/Identifiable.js";import{assertIsSome as i}from"../../../../core/maybe.js";import{ignoreAbortErrors as o,throwIfAborted as a}from"../../../../core/promiseUtils.js";import{watch as n}from"../../../../core/reactiveUtils.js";import{property as h,subclass as d}from"../../../../core/accessorSupport/decorators.js";import{create as c}from"../../../../geometry/support/aaBoundingRect.js";import{isPolyline as l,isPolygon as p,isExtent as u,getJsonType as m}from"../../../../geometry/support/jsonTypeUtils.js";import f from"../../../../layers/support/FieldsIndex.js";import{symbolToCIM as g,CIMSymbolHelper as y}from"../../../../symbols/cim/CIMSymbolHelper.js";import{OverrideHelper as _}from"../../../../symbols/cim/OverrideHelper.js";import{errorPointSymbol2D as b,errorPolylineSymbol2D as w,errorPolygonSymbol2D as S}from"../../../../symbols/support/defaults.js";import{filterFlag0 as I}from"../../engine/webgl/definitions.js";import{FeatureTile as v}from"../../engine/webgl/FeatureTile.js";import{MeshData as T}from"../../engine/webgl/mesh/MeshData.js";import{ResourceProxy as M}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{createGraphicSymbolMeshSchemas as R}from"../../engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js";import{createStorageSchema as j}from"../features/schema/processor/StorageSchema.js";import{AttributeStore as x}from"../features/support/AttributeStore.js";import{ComputedAttributeStorage as U}from"../features/support/ComputedAttributeStorage.js";import{GraphicsMetadata as C}from"../features/support/FeatureMetadata.js";import{GraphicsReader as q}from"../features/support/GraphicsReader.js";import F from"./GraphicStore.js";import{FeatureCommandQueue as G}from"../support/FeatureCommandQueue.js";import{UpdateTracking2D as O}from"../support/UpdateTracking2D.js";class P{static getOrCreate(e,t,s){let r=t.get(e.id);return r||(r=new P(e,s),t.set(e.id,r)),r}static fromItems(e,t,s){const r=new P(e,s);for(const i of t)r.append(i);return r}constructor(e,t){this.tile=e,this.metadata=t,this.addedOrModified=[],this.removed=[],this.objectIdMap=null}get reader(){return this._reader||(this._reader=q.from(this.addedOrModified,this.tile,this.metadata)),this._reader}append(e){this.addedOrModified.push(e),e.hasAnimations&&(this.objectIdMap=this.objectIdMap||{},this.objectIdMap[e.displayId]=e.objectId)}}let k=class extends(r(t)){constructor(e){super(e),this._attached=!1,this._tiles=new Map,this._controller=new AbortController,this._highlightFlagsByObjectId=new Map,this._hashToSymbolInfo=new Map,this._lastCleanup=performance.now(),this._cleanupRequired=!0,this.lastUpdateId=-1,this.renderer=null,this._updateTracking=new O({debugName:"GraphicsView2D"}),this.updateRequested=!1,this.defaultPointSymbolEnabled=!0,this._commandQueue=new G({process:e=>{if("update"===e.type)return this._update();throw new Error("InternalError: Unsupported command")}}),this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}destroy(){this.container.destroy(),this.view=null,this.renderer=null,this._set("graphics",null),this._controller.abort(),this._graphicStore.clear(),this._graphicStore.destroy(),this._attributeStore=null,this._hashToSymbolInfo.clear(),this._updateTracking.destroy(),this._commandQueue.destroy()}_initAttributeStore(){this._storage=new U({spatialReference:this.view.spatialReference,fields:new f}),this._attributeStore=new x({isLocal:!0,update:e=>{has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateStart`,{message:e}),this.container.attributeView.requestUpdate(e),this.container.requestRender(),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView2D.AttributeStoreView.updateEnd`,{message:e})}});const e=j(null,[]);this._attributeStore.update(e,this._storage,null)}initialize(){this._initAttributeStore(),this._metadata=C.createGraphics(this.view.spatialReference),this._resourceProxy=new M({fetch:e=>Promise.all(e.map(e=>this.view.stage.textureManager.rasterizeItem(e))),fetchDictionary:e=>{throw new Error("InternalError: Graphics do not support Dictionary requests")},fetchMesh:e=>{throw new Error("InternalError: Graphics do not support Mesh requests")}}),this.addHandles([n(()=>this._effectiveRenderer,()=>this._pushUpdate()),this.view.graphicsTileStore.on("update",this._onTileUpdate.bind(this)),this.container.on("attach",()=>{this.addHandles([this.graphics.on("change",()=>this._pushUpdate())]),this._graphicStore?.destroy(),this._graphicStore=new F(this.view.spatialReference,this._cimResourceManager,this.view.featuresTilingScheme,this.view.state.scale,this._attributeStore),this._attached=!0,this.requestUpdate(),this._pushUpdate()})]),this._updateTracking.addUpdateTracking("CommandQueue",this._commandQueue.updateTracking);const e=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:e,removed:[]})}get _effectiveRenderer(){return"function"==typeof this.renderer?this.renderer():this.renderer}get _cimResourceManager(){return this.view.stage.textureManager.resourceManager}get updating(){return!this._attached||this._updateTracking.updating}hitTest(e,t){if(!this.view||this.view.suspended)return[];const{resolution:r,rotation:i}=this.view.state,o=this._graphicStore.hitTest(e,t,r,i),a=new Set(o),n=this.graphics.items.reduce((e,t)=>(a.has(t.uid)&&e.set(t.uid,t),e),new Map);return o.map(e=>n.get(e)).filter(s)}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback()),this.notifyChange("updating")}processUpdate(e){this.updateRequested&&(this.updateRequested=!1,this.update(e))}viewChange(){this.requestUpdate()}setHighlightFilters(e){this._highlightFlagsByObjectId.clear();for(const{order:t,filters:s}of e){const e=1<<t;for(const t of s)for(const s of t.objectIds??[]){const t=this._highlightFlagsByObjectId.get(s)??0;this._highlightFlagsByObjectId.set(s,t|e)}}if(this.container.setHighlightActive(this._highlightFlagsByObjectId.size>0),this._attached)for(const t of this._graphicStore.items())this._setFilterState(t);this._pushUpdate()}graphicUpdateHandler(e){this._pushUpdate()}update(e){this.updateRequested=!1,this._attached&&this._graphicStore.updateLevel(e.state.resolution)&&this.pushUpdate()}pushUpdate(){this._pushUpdate()}_pushUpdate(){o(this._commandQueue.push({type:"update"}))}async _update(){try{if(has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView._update start`),this.graphics.destroyed)return;const e=await this._graphicStore.update(this.graphics,e=>this._getSymbolForGraphic(e),e=>this._ensureSymbolResource(e));for(const s of e.updated)this.container.restartAnimation(s.objectId);if(!e.hasAnyUpdate())return void this._attributeStore.sendUpdates();e.removed.length&&(this._cleanupRequired=!0),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView updateMessage`,e);const t=this._createTileMessages(e);await this._densifyItemsForDisplay(t),await this._fetchResources(t),this._write(t);for(const s of e.added)this._setFilterState(s);for(const s of e.updated)this._setFilterState(s);has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate`,e),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.debug(`[Id: ${this.layerId}] GraphicsView sendUpdate.await`,e)}catch(e){}this._cleanupSharedResources()}_createTileMessages(e){const t=new Map;for(const s of e.added){const e=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const r of e){P.getOrCreate(r,t,this._metadata).append(s)}}for(const s of e.updated){const e=this.view.graphicsTileStore.getIntersectingTiles(s.prevSymbolBounds),r=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const i of e){P.getOrCreate(i,t,this._metadata).removed.push(s.displayId)}for(const i of r){P.getOrCreate(i,t,this._metadata).append(s)}}for(const s of e.removed){const e=this.view.graphicsTileStore.getIntersectingTiles(s.symbolBounds);for(const r of e){P.getOrCreate(r,t,this._metadata).removed.push(s.displayId)}}return Array.from(t.values())}async _densifyItemsForDisplay(e){const t=new Map;for(const s of e)for(const e of s.addedOrModified)t.has(e)||t.set(e,e.densifyCurvedGeometryForDisplay(this.view.spatialReference));await Promise.all(t.values())}async _fetchResources(e){const t={timeZone:null,timeExtent:null};for(const{tile:s,reader:r}of e){has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${s.id}] GraphicsView fetchResources`,e);const i=r.getCursor();for(;i.next();)for(const e of i.getMeshWriters())e.enqueueRequest(this._resourceProxy,i,s.createArcadeEvaluationOptions(t))}await this._resourceProxy.fetchEnqueuedResources()}_write(e){for(const t of e){has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${t.tile.id}] GraphicsView write`,t);const e=this._writeMeshes(t);let s=this._tiles.get(t.tile.key);s||(s=this._createFeatureTile(t.tile.key)),has("esri-2d-update-debug")&&console.debug(`Id[${this.layerId}] Tile[${t.tile.id}] GraphicsView onTileData`,t),this.container.onTileData(s,{type:"update",modify:e,remove:t.removed,end:!1,attributeEpoch:this._attributeStore.epoch,objectIdMap:t.objectIdMap}),this.container.requestRender()}}_writeMeshes(e){const t={timeZone:null,timeExtent:null},s=new T(e.tile.id),r=e.reader.getCursor();for(;r.next();){s.entityStart(r.getDisplayId(),r.getZOrder());for(const i of r.getMeshWriters())i.write(s,this._resourceProxy,r,e.tile.createArcadeEvaluationOptions(t),e.tile.level);s.entityEnd()}return{...s.serialize().message,tileId:e.tile.id,requiresRefresh:!1}}_setFilterState(e){const t=e.displayId,s=this._highlightFlagsByObjectId.get(e.objectId)??0;this._attributeStore.setData(t,0,0,s|(e.visible?I:0))}_getSymbolForGraphic(e){return null!=e.symbol?e.symbol:null!=this._effectiveRenderer?this._effectiveRenderer.getSymbol(e):this._getNullSymbol(e)}async _ensureSymbolResource(e){if(!e.symbol)return;const t=await this._getSymbolInfo(e.symbol);if(!t)return;const s=t.linearCIM.filter(e=>"text"===e.type);if(s.length>0){const r=await this._getTextResources(e,s);return void(e.symbolResource={symbolInfo:t,textInfo:r})}e.symbolResource={symbolInfo:t}}_getSymbolInfo(e){const t=e.hash();return this._hashToSymbolInfo.has(t)||this._hashToSymbolInfo.set(t,this._createSymbolInfo(t,e).catch(e=>null)),this._hashToSymbolInfo.get(t)}async _createSymbolInfo(e,t){const s=await this._convertToCIMSymbol(t),r=await this._createLinearCIM(s);return{hash:e,cimSymbol:s,linearCIM:r,meshWriters:await this._createMeshWriters(s,r)}}async _convertToCIMSymbol(e){const t=g(e);return"web-style"===t.type?this._convertToCIMSymbol(await t.fetchSymbol({acceptedFormats:["cim","web"]})):t}async _createLinearCIM(e){return await y.normalizeSymbolAndFetchResources(e.symbol,this._cimResourceManager),this.view.stage.cimAnalyzer.analyzeSymbolReference(e,!1)}async _createMeshWriters(e,t){a(this._controller.signal);const s=this.container.instanceStore,r=this.view.stage.meshWriterRegistry,i=await R(e,t,s);return Promise.all(i.map(e=>r.createMeshWriter(this._storage,this._resourceProxy,{tileInfo:this.view.featuresTilingScheme.tileInfo},e,null)))}_onTileUpdate(e){if(e.added&&e.added.length>0)for(const t of e.added)this._updateTracking.consumePromise(this._addTile(t));if(e.removed&&e.removed.length>0)for(const t of e.removed)this._removeTile(t.key)}_createFeatureTile(e){const t=this.view.featuresTilingScheme.getTileBounds(c(),e),s=this.view.featuresTilingScheme.getTileResolution(e.level),r=new v(e,s,t[0],t[3]);return r.presenting=!0,this._tiles.set(e,r),this.container.addChild(r),r}async _addTile(e){if(!this._attached)return;const t=this._graphicStore.queryItems(e);if(!t.length)return;const s=this._createFeatureTile(e.key),r=P.fromItems(e,t,this._metadata);await this._densifyItemsForDisplay([r]),await this._fetchResources([r]);const i=this._writeMeshes(r);s.update({type:"append",append:i,end:!0,attributeEpoch:this._attributeStore.epoch,objectIdMap:r.objectIdMap})}_removeTile(e){if(!this._tiles.has(e))return;const t=this._tiles.get(e);this.container.removeChild(t),t.destroy(),this._tiles.delete(e)}_getNullSymbol(e){const t=e.geometry;return t?l(t)?w:p(t)||u(t)?S:this.defaultPointSymbolEnabled?b:null:this.defaultPointSymbolEnabled?b:null}async _getTextResources(e,t){const s=new Array,r=new Array;for(let i=0;i<t.length;i++){const o=t[i],{resource:a,overrides:n}=o.textRasterizationParam;if(n?.length>0){const t=_.resolveSymbolOverrides({type:"CIMSymbolReference",primitiveOverrides:n,symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,size:a.symbol.height,anchorPointUnits:"Relative",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:a.symbol,textString:a.textString}],scaleSymbolsProportionally:!0,respectFrame:!0}]}},e,this.view.spatialReference,null,m(e.projectedGeometry),null,null);t.then(e=>{const t=e.symbolLayers[0],{textString:s}=t.markerGraphics[0];r.push({type:"cim-rasterization-info",resource:{type:"text",textString:s||"",font:a.font}}),o.text=a.textString=s||""}),s.push(t)}else r.push({type:"cim-rasterization-info",resource:a})}s.length>0&&await Promise.all(s);const o=r.map(e=>this.view.stage.textureManager.rasterizeItem(e)),a=await Promise.all(o);i(a);const n=new Map;for(let i=0;i<t.length;i++){const e=t[i];n.set(e.textRasterizationParam.resource.symbol,{text:e.text,glyphMosaicItems:a[i]})}return n}_cleanupSharedResources(){if(!this._cleanupRequired)return;const e=performance.now();if(e-this._lastCleanup<5e3)return;this._cleanupRequired=!1,this._lastCleanup=e;const t=new Set;for(const r of this._graphicStore.items()){const e=r.symbolResource?.symbolInfo.hash;t.add(e)}const s=new Set(this._hashToSymbolInfo.keys());for(const r of s.values())t.has(r)||this._hashToSymbolInfo.delete(r)}};e([h()],k.prototype,"_effectiveRenderer",null),e([h({constructOnly:!0})],k.prototype,"layerId",void 0),e([h({constructOnly:!0})],k.prototype,"requestUpdateCallback",void 0),e([h()],k.prototype,"container",void 0),e([h({constructOnly:!0})],k.prototype,"graphics",void 0),e([h()],k.prototype,"renderer",void 0),e([h()],k.prototype,"_updateTracking",void 0),e([h()],k.prototype,"updating",null),e([h()],k.prototype,"view",void 0),e([h()],k.prototype,"updateRequested",void 0),e([h()],k.prototype,"defaultPointSymbolEnabled",void 0),k=e([d("esri.views.2d.layers.graphics.GraphicsView2D")],k);const A=k;export{A as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ignoreAbortErrors as e}from"../../../../core/promiseUtils.js";import{QueueProcessor as r}from"../../../../core/QueueProcessor.js";import{UpdateTracking2D as s}from"./UpdateTracking2D.js";class t{constructor(){this.type="override-batch",this.messages=[],this._resovler=Promise.withResolvers()}get promise(){return this._resovler.promise}resolve(){this._resovler.resolve()}add(e){this.messages.push(e)}}class i{constructor(e){this.updateTracking=new s({debugName:"FeatureCommandQueue"}),this.process=e.process,this._queueProcessor=new r({concurrency:1,process:async e=>{if("override-batch"===e.type){const e=this._nextOverrideBatch;if(null==e)throw new Error("InternalError: Override should be defined");return this._nextOverrideBatch=null,await this.process(e),void e.resolve()}return this.process(e)}})}destroy(){this.updateTracking.destroy(),this._queueProcessor.destroy(),this.clear()}clear(){this._queueProcessor.clear()}async push(r){return e(this.updateTracking.addPromise(this._doPush(r)))}async _doPush(e){const r=this._queueProcessor,s=r.last();switch(e.type){case"update":
|
|
2
|
+
import{ignoreAbortErrors as e}from"../../../../core/promiseUtils.js";import{QueueProcessor as r}from"../../../../core/QueueProcessor.js";import{UpdateTracking2D as s}from"./UpdateTracking2D.js";class t{constructor(){this.type="override-batch",this.messages=[],this._resovler=Promise.withResolvers()}get promise(){return this._resovler.promise}resolve(){this._resovler.resolve()}add(e){this.messages.push(e)}}class i{constructor(e){this.updateTracking=new s({debugName:"FeatureCommandQueue"}),this.process=e.process,this._queueProcessor=new r({concurrency:1,process:async e=>{if("override-batch"===e.type){const e=this._nextOverrideBatch;if(null==e)throw new Error("InternalError: Override should be defined");return this._nextOverrideBatch=null,await this.process(e),void e.resolve()}return this.process(e)}})}destroy(){this.updateTracking.destroy(),this._queueProcessor.destroy(),this.clear()}clear(){this._queueProcessor.clear()}async push(r){return e(this.updateTracking.addPromise(this._doPush(r)))}async _doPush(e){const r=this._queueProcessor,s=r.last();switch(e.type){case"update":if(s?.type===e.type)return;return r.push(e);case"override":case"edit":return this._pushOverride(e)}}_pushOverride(e){return null==this._nextOverrideBatch&&(this._nextOverrideBatch=new t,this._queueProcessor.push(this._nextOverrideBatch)),this._nextOverrideBatch.add(e),this._nextOverrideBatch.promise}}export{i as FeatureCommandQueue,t as OverrideBatch};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{maxHighlightGroups as e,effectBitIndex as i}from"../../engine/webgl/definitions.js";function r(r){const{layerFilter:t,effectFilter:l,highlightFilters:n}=r,s=n.map(({order:e,filters:i})=>({role:"highlight",bitIndex:e,filters:i,ensureCached:!0}));return t&&s.push({role:"visibility",bitIndex:e,filters:[t],ensureCached:!1}),l&&s.push({role:"effect",bitIndex:i,filters:[l],ensureCached:!1}),s}export{r as createFilterSchemas};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import t from"../../../../core/ReactiveMap.js";class e{constructor(){this._groupToFilters=new t,this._nextRegistrationId=0}get highlightGroups(){return Array.from(this._groupToFilters,([t,e])=>({name:t,filters:Array.from(e.values())}))}get highlightIds(){const t=new Set;for(const e of this._groupToFilters.values())for(const r of e.values())for(const e of r.objectIds??[])t.add(e);return Array.from(t)}get size(){let t=0;for(const e of this._groupToFilters.values())t+=e.size;return t}register(e,r){const s=this._getRegistrationId(),o=this._groupToFilters.get(e);return o?o.set(s,r):this._groupToFilters.set(e,new t([[s,r]])),s}unregister(t){for(const[e,r]of this._groupToFilters)if(r.has(t))return 1===r.size?this._groupToFilters.delete(e):r.delete(t),!0;return!1}_getRegistrationId(){const t=this._nextRegistrationId;return this._nextRegistrationId=this._nextRegistrationId===Number.MAX_SAFE_INTEGER?0:this._nextRegistrationId+1,t}}export{e as HighlightRegistry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getFontFamily as t}from"../../../../../core/fontUtils.js";import{deg2rad as n,rad2deg as o}from"../../../../../core/mathUtils.js";import{set as i,len as e,scaleAndAdd as r,dot as
|
|
2
|
+
import{getFontFamily as t}from"../../../../../core/fontUtils.js";import{deg2rad as n,rad2deg as o}from"../../../../../core/mathUtils.js";import{set as i,len as e,scaleAndAdd as r,dot as s}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as u}from"../../../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as a}from"../../../../../geometry/support/boundsUtils.js";import{fromCIMFontStyle as f}from"../../../../../symbols/cim/fromCIMFontStyle.js";import{fromCIMFontDecoration as h}from"../../../../../symbols/cim/utils.js";import m from"../../../engine/webgl/Rect.js";function l(n){const o=h(n),{style:i,weight:e}=f(n.fontStyleName);return{family:t(n.fontFamilyName),decoration:o,style:i,weight:e}}function y(t){const n=(t.symbolLayers||[]).map(t=>"CIMVectorMarker"!==t.type||t.anchorPoint||!t.frame?t:{...t,anchorPointUnits:"Absolute",anchorPoint:{x:-t.frame.xmin,y:0}});return{...t,symbolLayers:n}}function x(t,n,o){if(!t?.symbolLayers?.length)return null;const i=y(t);let e=null;for(const r of i.symbolLayers||[]){const t=M(r,n);t&&(e=e?N(e,t):t)}return e??new m(-16,-16,32,32)}function M(t,n){switch(t.type){case"CIMVectorMarker":return g(t,n);case"CIMPictureMarker":return P(t,n);default:return p(t,n)}}function g(t,n){const o=d(t.markerGraphics),i=t.frame,e=i?new m(i.xmin,i.ymin,i.xmax-i.xmin,i.ymax-i.ymin):null,r=o??e??w(t.size);if(!r)return null;const s=b(r),c=null!=i?.xmax&&null!=i?.xmin?i.xmax-i.xmin:r.width,u=null!=i?.ymax&&null!=i?.ymin?i.ymax-i.ymin:r.height,a=t.size&&u?t.size/u:1;if(e&&D(s,.5*-(i.xmax+i.xmin),.5*-(i.ymax+i.ymin)),t.anchorPoint){let n=t.anchorPoint.x,o=t.anchorPoint.y;"Absolute"!==t.anchorPointUnits?(n*=c,o*=u):0!==a&&(n/=a,o/=a),D(s,-n,-o)}return 1!==a&&T(s,a,a),I(s,t,n),E(s)}function P(t,n){const o=t.size;if(!o)return null;const i=o*(t.scaleX??1),e=b(new m(-i/2,-o/2,i,o));if(t.anchorPoint){let n=t.anchorPoint.x,r=t.anchorPoint.y;"Absolute"!==t.anchorPointUnits&&(n*=i,r*=o),D(e,-n,-r)}return I(e,t,n),E(e)}function p(t,n){const o=w(t.size);if(!o)return null;const i=b(o);if(t.anchorPoint){let n=t.anchorPoint.x,e=t.anchorPoint.y;"Absolute"!==t.anchorPointUnits&&(n*=o.width,e*=o.height),D(i,-n,-e)}return I(i,t,n),E(i)}function d(t){let n=null;for(const o of t||[]){if(!o.geometry)continue;const t=a(u(),o.geometry),i=new m(t[0],t[1],t[2]-t[0],t[3]-t[1]);n=n?N(n,i):i}return n}function w(t){return t?new m(-t/2,-t/2,t,t):null}function I(t,n,o){const i=n.rotation??0,e=(n.rotateClockwise?-i:i)*(Math.PI/180);e&&L(t,e),(n.offsetX||n.offsetY)&&D(t,n.offsetX??0,n.offsetY??0),o&&L(t,o)}function b(t){return[[t.x,t.y],[t.x+t.width,t.y],[t.x+t.width,t.y+t.height],[t.x,t.y+t.height]]}function E(t){let n=1/0,o=1/0,i=-1/0,e=-1/0;for(const[r,s]of t)n=Math.min(n,r),o=Math.min(o,s),i=Math.max(i,r),e=Math.max(e,s);return new m(n,o,i-n,e-o)}function D(t,n,o){for(const i of t)i[0]+=n,i[1]+=o}function T(t,n,o){for(const i of t)i[0]*=n,i[1]*=o}function L(t,n){for(const o of t)H(o,n)}function N(t,n){const o=Math.min(t.x,n.x),i=Math.min(t.y,n.y),e=Math.max(t.x+t.width,n.x+n.width),r=Math.max(t.y+t.height,n.y+n.height);return new m(o,i,e-o,r-i)}var X;function Y(t){const n=null==t?NaN:Number(t);return isNaN(n)?Math.PI/2:n}function A(t,n,o,r){const s=i(c(),o[0]-t[0],o[1]-t[1]);if(0===e(s))return null;const u=V(s),a=O(o,u-j(r),n,u);return a?{beginDimensionPoint:i(c(),o[0],o[1]),endDimensionPoint:a}:null}function j(t){const i=o(t);return i>=-1&&i<=1?t+n(1):i>=179&&i<=181?t-n(1):t}function S(t,n,o){const s=i(c(),n[0]-t[0],n[1]-t[1]),u=e(s);return 0===u?[t[0],t[1]]:r(c(),t,s,o/u)}function U(t){return{left:t.x,right:t.x+t.width,top:t.y+t.height,bottom:t.y}}function C(t,n){const o=U(t),i=U(n),e=o.left<=i.right&&i.left<=o.right,r=o.bottom<=i.top&&i.bottom<=o.top;return e&&r}function G(t,n,o){const i=k(t,o),e=k(n,o);return i[0]<=e[1]&&e[0]<=i[1]}function k(t,n){const o=[[t.x,t.y],[t.x+t.width,t.y],[t.x+t.width,t.y+t.height],[t.x,t.y+t.height]];let i=1/0,e=-1/0;for(const[r,c]of o){const t=s([r,c],n);i=Math.min(i,t),e=Math.max(e,t)}return[i,e]}function z(t,n){return new m(t.x*n,t.y*n,t.width*n,t.height*n)}function B(t,n,o){return new m(t.x+n,t.y+o,t.width,t.height)}function H(t,n){const o=t[0],i=t[1];t[0]=o*Math.cos(n)-i*Math.sin(n),t[1]=o*Math.sin(n)+i*Math.cos(n)}!function(t){t.objectId="OBJECTID",t.shape="SHAPE",t.dimLength="DIMLENGTH",t.beginX="BEGINX",t.beginY="BEGINY",t.endX="ENDX",t.endY="ENDY",t.textX="TEXTX",t.textY="TEXTY",t.styleId="STYLEID",t.dimX="DIMX",t.dimY="DIMY",t.customLength="CUSTOMLENGTH",t.useCustomLength="USECUSTOMLENGTH",t.dimDisplay="DIMDISPLAY",t.extDisplay="EXTDISPLAY",t.markerDisplay="MARKERDISPLAY",t.extAngle="EXTANGLE",t.dimType="DIMTYPE",t.textAngle="TEXTANGLE"}(X||(X={}));const R=1e-9;function v(t,n){return t[0]*n[1]-t[1]*n[0]}function O(t,n,o,i){return F(t,n,o,i)?.point??null}function F(t,n,o,e){const s=i(c(),Math.cos(n),Math.sin(n)),u=i(c(),Math.cos(e),Math.sin(e)),a=i(c(),o[0]-t[0],o[1]-t[1]),f=v(s,u);if(Math.abs(f)<=R)return null;const h=v(a,u)/f,m=v(a,s)/f;return{point:r(c(),t,s,h),t1:h,t2:m}}function V(t){const n=t[0],o=t[1];if(0===n&&0===o)return 0;if(0===n&&o>0)return Math.PI/2;if(0===n&&o<0)return 3*Math.PI/2;if(n<0&&0===o)return Math.PI;if(n>0&&0===o)return 0;let i=Math.atan2(o,n);return i<0&&(i+=2*Math.PI),i}export{X as DimensionRealFieldName,V as angleFromXAxis,j as capDimensionExtensionAngle,l as getFontForCIMTextSymbol,O as intersectLinesByPointsAndAngles,x as measureMarkerSymbolSize,Y as normalizeExtensionAngle,A as projectLinearDimensionPoints,k as projectRectToAxis,S as queryPointOnLine,C as rectsOverlap,G as rectsOverlapOnAxis,y as repositionMarkerSymbol,H as rotatePoint,z as scaleRect,U as toBounds,B as translateRect};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isArrayWithReadonly as t}from"../../../../core/arrayUtils.js";import{JSONMap as e}from"../../../../core/jsonMap.js";import i from"../../engine/webgl/effects/highlight/HighlightGradient.js";import{MultiHighlightGradient as n}from"../../engine/webgl/effects/highlight/MultiHighlightGradient.js";import{getFeaturePipelineState as
|
|
2
|
+
import{isArrayWithReadonly as t}from"../../../../core/arrayUtils.js";import{JSONMap as e}from"../../../../core/jsonMap.js";import i from"../../engine/webgl/effects/highlight/HighlightGradient.js";import{MultiHighlightGradient as n}from"../../engine/webgl/effects/highlight/MultiHighlightGradient.js";import{getFeaturePipelineState as r}from"../../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";const l=new e({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch",mesh:"mesh"});function s(t){return l.toJSON(t)}function o(t,e,i){const n=[],r=[];let l=0,s=0;for(const o of t){const t=s;let a=o[0][0],p=o[0][1];n[s++]=a,n[s++]=p;let h=0;for(let e=1;e<o.length;++e){const t=a,i=p;a=o[e][0],p=o[e][1],h+=p*t-a*i,n[s++]=a,n[s++]=p}e(h/2),h>0?(t-l>0&&(i(l,t,n,r),l=t),r.length=0):h<0&&t-l>0?r.push(.5*(t-l)):s=t}s-l>0&&i(l,s,n,r)}function a(t){const{bandCount:e,attributeTable:i,colormap:n,pixelType:r}=t.raster.rasterInfo;return 1===e&&(null!=i||null!=n||"u8"===r||"s8"===r)}function p(e,r){return null==r?(e?.destroy(),null):("single"===e?.type&&Array.isArray(r)&&(e.destroy(),e=null),"multi"!==e?.type||Array.isArray(r)||(e.destroy(),e=null),e||(e=Array.isArray(r)?new n:new i),t(r)?"multi"===e.type&&e.setHighlightOptions(r):"single"===e.type&&e.setHighlightOptions(r),e)}function h(t,e,i,n){const{painter:l,highlightGradient:s}=t,{highlight:o}=l.effects;if(!s)return;const a=t.passOptions,p=s.getGroupsWithGradients();for(let h=0;h<p.length;h++){const s={...t,passOptions:{type:"highlight",activeGradient:null!=n?p[n].activeGradient:p[h].activeGradient,activeGroups:p[h].activeGroups,stepType:"burn",highlightAll:e}};if(o.bind(s),i(s),h<p.length-1){let r=0;for(let t=h+1;t<p.length;t++)r|=p[t].activeGroups;i({...t,passOptions:{type:"highlight",activeGradient:null!=n?p[n].activeGradient:p[h].activeGradient,activeGroups:r,stepType:"clear",highlightAll:e}})}const a={...t,passOptions:{type:"highlight",activeGradient:null!=n?p[n].activeGradient:p[h].activeGradient,activeGroups:p[h].activeGroups,stepType:"draw",highlightAll:e}};l.setPipelineState(r(t)),l.updatePipelineState(t.context),o.draw(a),o.unbind()}t.passOptions=a}export{o as analyzeRings,a as canUseMajorityInterpolationOnDataSource,p as createOrReuseHighlightGradient,h as renderHighlight,s as toJSONGeometryType};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{screenPointObjectToArray as r}from"../../../../core/screenUtils.js";import{property as i,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{copy as o,normalize as s,scaleAndAdd as a,scale as l,add as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as m,clone as p,create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import d from"../../../../geometry/Point.js";import{create as f,fromPoints as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import has from"../../../../core/has.js";import{screenPointObjectToArray as r}from"../../../../core/screenUtils.js";import{property as i,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{copy as o,normalize as s,scaleAndAdd as a,scale as l,add as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as m,clone as p,create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import d from"../../../../geometry/Point.js";import{create as f,fromPoints as y,copy as g}from"../../../../geometry/support/ray.js";import{sv2d as w}from"../../../../geometry/support/vectorStacks.js";import{LineOfSightIntersectionResult as h,lineOfSightIntersectionContextGaussianSplat as v,lineOfSightIntersectionContextGround as I,LineOfSightIntersectionContextGraphic as j}from"./LineOfSightIntersectionResult.js";import{isGaussianSplatIntersectorResult as P}from"../../layers/i3s/Intersector.js";import{fromScreen as b}from"../../support/geometryUtils/ray.js";import{isTerrainIntersectorResult as x,isIntegratedMeshIntersectorResult as U}from"../../terrain/Intersector.js";import{Intersector as R}from"../../webgl-engine/lib/Intersector.js";import{toGraphic as L}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{terrainId as V}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{isIntegratedMeshLayerView as _}from"../../../support/layerViewUtils.js";let O=class extends t{constructor(e){super(e)}initialize(){this.intersector=new R(this.view.state.viewingMode),this.intersector.options.hud=!1,this.intersector.options.store=0}get _integratedMeshLayerViews(){return this.view.allLayerViews.items.filter(_)}get _terrainIntersectionOptionsLayerUids(){return new Set([V,...this._integratedMeshLayerViews.filter(e=>!has("enable-feature:im-as-ground")||e.layer.isUsedAsGroundLayer).map(e=>e.uid)])}getScreenPointIntersection(e){const t=r(e,w.get()),i=b(this.view.state.camera,t,H);return this._getRayIntersection(i)}getMapPointIntersection(e){const t=m(e.x,e.y,e.z??0);if(!this.view.renderCoordsHelper.toRenderCoords(t,e.spatialReference,t))return null;const r=this.view.state.camera.eye;return y(r,t,H),this._getRayIntersection(H)}_getRayIntersection(e,t){const{view:r,intersector:i}=this;if(null==e||null==r.sceneIntersectionHelper)return null;i.options.store=0,r.sceneIntersectionHelper.intersectToolIntersectorRay(e,i,t);const n=i.results.min;if(null==n.target)return null;const o=u();if(!n.getIntersectionPoint(o))return null;if(null!=t?.maxDistance&&!n.withinDistance(t.maxDistance))return null;const s=r.renderCoordsHelper.fromRenderCoords(o,new d({spatialReference:r.spatialReference}));if(P(n))return new h({context:v,id:`${n.target.layerViewUid}`,mapPoint:s,renderPoint:o,normal:p(n.target.outwardDirection),ray:g(e)});const a=p(n.normal);if(x(n))return new h({context:I,id:n.target.lij.slice(),mapPoint:s,renderPoint:o,normal:a,ray:g(e)});if(U(r,n))return new h({context:I,id:`${n.target.layerViewUid}`,mapPoint:s,renderPoint:o,normal:a,ray:g(e)});const l=L(n,r);if(null!=l){const{layer:t}=l,r=l.getObjectId()??l.uid;return new h({context:new j(l),id:`${t?.uid}/${r}`,mapPoint:s,renderPoint:o,normal:a,ray:g(e)})}const c="layerViewUid"in n.target?`${n.target.layerViewUid}`:"";return new h({context:null,id:c,mapPoint:s,renderPoint:o,normal:a,ray:g(e)})}updateFromGroundIntersection(e,t,r){const i=M,n=S,m=C;o(n,e),this.view.renderCoordsHelper.worldUpAtPosition(n,m),s(m,m);const u=this.view.groundView?.visibleElevationRange,d=(t>=0?1:-1)*((u?Math.abs(u.maxElevation-u.minElevation):100)+Math.abs(t)),f=.001*d;a(i,n,m,d-f),a(n,n,m,f),y(i,n,H);const g=this._getRayIntersection(H,{include:this._terrainIntersectionOptionsLayerUids,maxDistance:d});if(null!=g){const e=D;return l(e,m,t),c(r,g.renderPoint,e),p(g.normal)}return o(r,e),null}};e([i()],O.prototype,"view",void 0),e([i()],O.prototype,"intersector",void 0),e([i()],O.prototype,"_integratedMeshLayerViews",null),e([i()],O.prototype,"_terrainIntersectionOptionsLayerUids",null),O=e([n("esri.views.3d.analysis.LineOfSight.LineOfSightRayIntersector")],O);const M=u(),S=u(),C=u(),D=u(),H=f();export{O as LineOfSightRayIntersector};
|
|
@@ -9,7 +9,7 @@ import type { ScreenPoint } from "../../../core/types.js";
|
|
|
9
9
|
* The ShadowCastAnalysisView3D is responsible for rendering a [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/)
|
|
10
10
|
* using custom visualizations. The [getDurationAtScreen()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ShadowCastAnalysisView3D/#getDurationAtScreen) method
|
|
11
11
|
* on the analysis view provides developers with the ability to obtain the specific shadow or sunlight duration at a
|
|
12
|
-
* certain [point](https://developers.arcgis.com/javascript/latest/references/core/core/types/#ScreenPoint) on the screen or to
|
|
12
|
+
* certain [point](https://developers.arcgis.com/javascript/latest/references/core/core/types/#ScreenPoint) on the screen or to disable the tooltip attached to the cursor by setting [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ShadowCastAnalysisView3D/#interactive) to `false`.
|
|
13
13
|
*
|
|
14
14
|
* This analysis view controls the shadow or sunlight overlay produced by [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/). It does
|
|
15
15
|
* not control the scene's illumination. To change the scene lighting itself, use [SunLighting](https://developers.arcgis.com/javascript/latest/references/core/views/3d/environment/SunLighting/).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as o,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as l,initial as a}from"../../../../core/reactiveUtils.js";import{property as r,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import{ViewshedInteractionVisuals as c}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as u}from"./ViewshedSnappingController.js";import{ViewshedSubTool as h}from"./ViewshedSubTool.js";import{findSubTool as v}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as b}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as g}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import T from"../../../interactive/options/InteractiveToolOptions.js";import{enterInputModeIfAvailable as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as o,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as l,initial as a}from"../../../../core/reactiveUtils.js";import{property as r,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import{ViewshedInteractionVisuals as c}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as u}from"./ViewshedSnappingController.js";import{ViewshedSubTool as h}from"./ViewshedSubTool.js";import{findSubTool as v}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as b}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as g}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import T from"../../../interactive/options/InteractiveToolOptions.js";import{enterInputModeIfAvailable as y,makeTooltip as m}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as V}from"../../../interactive/tooltip/infos/MovePointTooltipInfo.js";let w=class extends g{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._selectedManipulator=null,this._observerToolOptions=new T({tooltips:{enabled:!0}}),this._observerTooltipConnectionHandle=null,this._updatingHandles=new d}initialize(){const{snappingManager:e,view:t}=this;this._interactionVisuals=new c({view:t}),this._snappingController=new u({snappingManager:e,view:t}),this._initializeObserverTooltip(t);const o=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=i(()=>o,({viewshedComputedData:e})=>{const t=new h({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([n(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},l),this._updatingHandles.add(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(null==e)return;const{subTool:t,observer:i,target:o}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(o,!1)},a),this._updatingHandles.add(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),a),this._updatingHandles.add(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;this._connectObserverTooltip(i),null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.observerManipulator)},a)])}destroy(){this._selectManipulator(null),this._disconnectObserverTooltip(),o(this.subToolHandles),o(this._interactionVisuals),o(this._snappingController),o(this._observerTooltip),this._updatingHandles.destroy()}get updating(){return!!this._snappingController?.updating||this._updatingHandles.updating||this.subToolHandles.some(({subTool:e})=>e.updating)}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){const t=this._selectedSubTool,i=this.selectedViewshedComputedData;if(null==t||null==i)return void this._interactionVisuals?.setVisibility(!1);const o=t.moveInteractionState,s=e?o.grabbing:o.dragging,n=t.scaleOrientInteractionState,l=e?n.grabbing:n.dragging;if(!(this.analysisViewData.visible&&(s||l)))return void this._interactionVisuals?.setVisibility(!1);const a=s?i.elevationAlignedObserverRenderSpace:i.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:a,laserlineVisible:!0,verticalLineVisible:s,intersectsWorldUp:s})}createObserverMoveSnappingPipeline(e,t,i,o=!1){return this._snappingController.createObserverMoveSnappingPipeline(e,t,i,o)}onActivate(){this.updateInteractionVisualsVisibility()}onDeactivate(){this.updateInteractionVisualsVisibility()}onInputEvent(e){if(!this.destroyed&&!y(e,this._observerTooltip))switch(e.type){case"key-down":_.cancel===e.key?this._cancelKeyHandler(e):_.delete.includes(e.key)&&this._deleteKeyHandler(e);break;case"hold":this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_initializeObserverTooltip(e){const t=this._observerToolOptions;this._observerTooltip=m(()=>({view:e,options:t.tooltips})),this._observerTooltipInfo=new V({toolOptions:t,viewType:e.type})}_connectObserverTooltip(e){if(this._disconnectObserverTooltip(),null==e)return void this._observerTooltip.clear();const t=e.observerManipulatedObject;this._observerTooltipConnectionHandle=b(this._observerTooltip,t,()=>({toolOptions:this._observerToolOptions,activeTooltipInfo:this._observerTooltipInfo,callbacks:{onBeforeUpdate:()=>this.updateInteractionVisualsVisibility(),onMoveStart:()=>{},onMove:()=>{},onMoveStop:()=>{},onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}}}))}_disconnectObserverTooltip(){this._observerTooltipConnectionHandle=s(this._observerTooltipConnectionHandle)}_cancelKeyHandler(e){this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_deleteKeyHandler(e){const t=this.selectedViewshed;null!=t&&(this.analysis.viewsheds.remove(t),e.stopPropagation())}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return v(this.subToolHandles,e)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([r({constructOnly:!0})],w.prototype,"analysis",void 0),e([r({constructOnly:!0})],w.prototype,"analysisViewData",void 0),e([r({constructOnly:!0})],w.prototype,"intersector",void 0),e([r({constructOnly:!0})],w.prototype,"snappingManager",void 0),e([r({constructOnly:!0})],w.prototype,"view",void 0),e([r()],w.prototype,"subToolHandles",void 0),e([r()],w.prototype,"removeIncompleteOnCancel",void 0),e([r()],w.prototype,"automaticManipulatorSelection",void 0),e([r()],w.prototype,"multiTouchEnabled",void 0),e([r()],w.prototype,"_selectedManipulator",void 0),e([r()],w.prototype,"_interactionVisuals",void 0),e([r()],w.prototype,"_snappingController",void 0),e([r()],w.prototype,"_observerTooltip",void 0),e([r()],w.prototype,"_observerTooltipInfo",void 0),e([r()],w.prototype,"updating",null),e([r()],w.prototype,"grabbing",null),e([r()],w.prototype,"cursor",null),e([r()],w.prototype,"selectedViewshed",null),e([r()],w.prototype,"selectedViewshedComputedData",null),e([r()],w.prototype,"_selectedSubTool",null),w=e([p("esri.views.3d.analysis.Viewshed.ViewshedEditTool")],w);export{w as ViewshedEditTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import o from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as i,throwIfAborted as n,onAbort as a}from"../../../../core/promiseUtils.js";import{watch as s,sync as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{createDrawTool as d,getFeatureReference as _}from"./placementUtils.js";import{detachToolFromView as v}from"./toolLifecycleUtils.js";import m from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as u}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as w}from"./viewshedToolUtils.js";import{vectorToRender as g}from"../../interactive/support/viewUtils.js";import{DrawManipulator3D as P}from"../../../draw/DrawManipulator3D.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{sketchKeys as f}from"../../../interactive/keybindings.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import o from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as i,throwIfAborted as n,onAbort as a}from"../../../../core/promiseUtils.js";import{watch as s,sync as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{createDrawTool as d,getFeatureReference as _}from"./placementUtils.js";import{detachToolFromView as v}from"./toolLifecycleUtils.js";import m from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as u}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as w}from"./viewshedToolUtils.js";import{vectorToRender as g}from"../../interactive/support/viewUtils.js";import{DrawManipulator3D as P}from"../../../draw/DrawManipulator3D.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{sketchKeys as f}from"../../../interactive/keybindings.js";import y from"../../../interactive/options/InteractiveToolOptions.js";const S="multiple",O=Symbol("hiddenManipulatorHandle");let T=class extends o{constructor(e){super(e),this.placementMode=S,this.observerPlacementElevationInfo=null,this.stagedViewshed=null,this._placeOperation=null,this._drawTool=null,this._renderer=null,this._toolOptions=new y({tooltips:{enabled:!1}}),this._observerScenePoint=h(),this._targetScenePoint=h(),this._mapPointVector=h()}initialize(){this.addHandles([this.view.on("key-down",e=>this._handleKeyDown(e),b.DEFAULT),s(()=>{const{stagedViewshed:e}=this;return{stagedViewshed:e,stagedViewshedInAnalysis:null!=e&&this.analysis.viewsheds.includes(e)}},({stagedViewshed:e,stagedViewshedInAnalysis:t})=>{null==e||t||this.analysis.viewsheds.add(e)},r)])}destroy(){this._cancelPlacementOperation()}get updating(){return!!this._drawTool?.updating}get active(){return!!this._drawTool?.active}get creationState(){return this._get("creationState")}set creationState(e){this._set("creationState",e),this._toolOptions.tooltips.enabled="placing-observer"===e}startPlaceOperation(e,t){this._removeStaged(),this.creationState=null,this._rejectPlaceOperation(i()),n(t);const{resolve:o,reject:s,promise:r}=Promise.withResolvers(),l=a(t,()=>this._cancelPlacementOperation());return this._placeOperation=new m({abortHandle:l,reject:s,resolve:o}),this.placementMode=e,this.observerPlacementElevationInfo=t?.elevationInfo,this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),r}cancelPlaceOperation(){null==this.creationState&&null==this._placeOperation||(this._cancelPlacementOperation(),this.callbacks.cancelTool())}_handleDeleteDuringCreation(){return null!=this.creationState&&(this._destroyDrawTool(),this._removeStaged(),this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),!0)}_handleKeyDown(e){null!=this.creationState&&(f.cancel===e.key?(this._handleCancelDuringCreation(),e.stopPropagation(),e.preventDefault()):f.delete.includes(e.key)&&(this._handleDeleteDuringCreation(),e.stopPropagation(),e.preventDefault()))}_handleCancelDuringCreation(){if(this._removeStaged()&&"multiple"===this.placementMode)return this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement();this._destroyDrawTool(),this._abortCreation()}_removeStaged(){const{stagedViewshed:e}=this;return this.stagedViewshed=null,!!e&&(this.analysis.viewsheds.remove(e),!0)}_cancelPlacementOperation(){this._destroyDrawTool(),this._removeStaged(),this.creationState=null,this._finishPlaceOperation()}_abortCreation(){this.callbacks.cancelTool(),this.creationState=null,this._finishPlaceOperation()}_handleObserverPlacementComplete(e,o,i){const n=new t({observer:e,elevationInfo:this.observerPlacementElevationInfo,feature:i});this.analysis.viewsheds.add(n),this.stagedViewshed=n,this.creationState="placing-target",this._updateStagedViewshed(o),this.callbacks.setSelectedViewshed(null)}_onCancel(e){const t=this._removeStaged();return"placing-observer"===this.creationState?t&&"multiple"===this.placementMode?(this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement()):(this._destroyDrawTool(e),void this._abortCreation()):t?(this.creationState="placing-observer",this.callbacks.setSelectedViewshed(null),void("multiple"!==this.placementMode?(this._destroyDrawTool(e),this._abortCreation()):this._startPointPlacement())):(this._destroyDrawTool(e),void this._abortCreation())}_handleTargetPlacementComplete(e){this._updateStagedViewshed(e);const t=this.stagedViewshed;this._placeOperation?.markPlacedViewshed(),this.stagedViewshed=null,this.callbacks.setSelectedViewshed(t)}_resolvePlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.resolve())}_finishPlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.finish())}_rejectPlaceOperation(e){this._clearPlaceOperationAndRun(t=>t?.reject(e))}_clearPlaceOperationAndRun(e){const t=this._placeOperation;this._placeOperation=null,this.observerPlacementElevationInfo=null,e(t)}_startObserverPlacement(){this.creationState="placing-observer",this._startPointPlacement()}_startPointPlacement(){this._drawTool&&this._destroyDrawTool(this._drawTool);const{drawTool:e,renderer:t}=d({analysisViewData:this.analysisViewData,snappingManager:this.snappingManager,view:this.view,toolOptions:this._toolOptions,elevationInfo:this._observerDrawToolElevationInfo,getSnapToSceneEnabled:()=>this._snapToSceneEnabled,onCancel:e=>this._onCancel(e),onComplete:e=>this._onComplete(e),onManipulatorCountChange:e=>this._onManipulatorCountChange(e),isPlacingObserver:()=>"placing-observer"===this.creationState});this._drawTool=e,this._renderer=t;try{this.view.addAndActivateTool(e),e.begin([u({mode:this.placementMode,onObserverComplete:(e,t)=>this._onObserverMapPointComplete(e,t),onTargetComplete:e=>this._onTargetMapPointComplete(e),onObserverPreview:e=>this._onObserverMapPointPreview(e),onTargetPreview:e=>this._onTargetMapPointPreview(e)})])}catch(o){this._destroyDrawTool(e),this._rejectPlaceOperation(o instanceof Error?o:new Error(String(o)))}}_onComplete(e){this._removeStaged(),this._resolvePlaceOperation(),this._destroyDrawTool(e),this.creationState=null}_onObserverMapPointComplete(e,t){const{intersector:o,snappingManager:i,view:n}=this,a=e.clone(),s=this._toScenePoint(e,this._targetScenePoint,this._observerDrawToolElevationInfo),r=_({intersector:o,snappingManager:i,screenPoint:t,view:n});this._renderer?.updatePlacementLocation(s),this._handleObserverPlacementComplete(a,s,r),this._setDrawToolElevationInfo(p)}_onTargetMapPointComplete(e){const t=this._toScenePoint(e,this._targetScenePoint);this._renderer?.updatePlacementLocation(t),this._handleTargetPlacementComplete(t),"multiple"===this.placementMode&&(this.creationState="placing-observer",this._setDrawToolElevationInfo(this._observerDrawToolElevationInfo),this._onObserverMapPointPreview(e))}_onObserverMapPointPreview(e){const t=e.clone(),o=this._toScenePoint(t,this._observerScenePoint,this._observerDrawToolElevationInfo);this._renderer?.updatePlacementLocation(o)}_onTargetMapPointPreview(e){const t=this._toScenePoint(e,this._targetScenePoint);this._renderer?.updatePlacementLocation(t),this._updateStagedViewshed(t)}_setDrawToolElevationInfo(e){const t=this._drawTool;t&&(t.elevationInfo=e)}get _observerDrawToolElevationInfo(){return this.observerPlacementElevationInfo??p}get _snapToSceneEnabled(){const e=this.observerPlacementElevationInfo?.mode;return("placing-observer"!==this.creationState||null==e||"absolute-height"===e)&&null}_onManipulatorCountChange(e){e.removeHandles(O);const t=[];e.manipulators.forEach(({manipulator:e})=>{e instanceof P&&t.push(e.disableDisplay())}),e.addHandles(t,O)}_destroyDrawTool(e=this._drawTool){this._drawTool=null,this._renderer=null,e&&v(this.view,e)}_toScenePoint(e,t,o=p){const{x:i,y:n,z:a,spatialReference:s}=e,r=this._mapPointVector;return r[0]=i,r[1]=n,r[2]=a??0,g(r,s,o,this.view,t)}_updateStagedViewshed(e){const t=this.stagedViewshed;if(!t)return;const o=this.callbacks.findViewshedComputedData(t);if(!o)return;const{heading:i,tilt:n,farDistance:a}=w(this.view,o,e);t.farDistance=a,t.tilt=n,t.heading=i}get test(){}};e([l({constructOnly:!0})],T.prototype,"analysis",void 0),e([l({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],T.prototype,"intersector",void 0),e([l({constructOnly:!0})],T.prototype,"snappingManager",void 0),e([l({constructOnly:!0})],T.prototype,"view",void 0),e([l({constructOnly:!0})],T.prototype,"callbacks",void 0),e([l()],T.prototype,"placementMode",void 0),e([l()],T.prototype,"observerPlacementElevationInfo",void 0),e([l()],T.prototype,"stagedViewshed",void 0),e([l()],T.prototype,"_placeOperation",void 0),e([l()],T.prototype,"_drawTool",void 0),e([l()],T.prototype,"_renderer",void 0),e([l()],T.prototype,"_toolOptions",void 0),e([l()],T.prototype,"updating",null),e([l()],T.prototype,"active",null),e([l({value:null})],T.prototype,"creationState",null),T=e([c("esri.views.3d.analysis.Viewshed.ViewshedPlacementController")],T);export{T as ViewshedPlacementController};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{cyclicalDegrees as a,Cyclical as n}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as l}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as p,initial as d}from"../../../../core/reactiveUtils.js";import{property as u,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{sub as c,len as v,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as M}from"../../../../core/support/UpdatingHandles.js";import{viewshedToolManipulatorConfiguration as m}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as _,isSideHorizontal as f,flipSide as w}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedObserverManipulatedObject3D as O}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedScaleOrientManipulation as V}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as D}from"./viewshedToolManipulatorUtils.js";import{screenToMapAtSceneSurface as y}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as j}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as S}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{createManipulatorDragEventPipeline as x,resetManipulatedObject as C,sceneSnappingAtLocation as T,dragManipulatedObject as A,sceneSnappingAtProjectedLocation as F,resetProperties as P}from"../../../interactive/dragEventPipeline.js";const H=Symbol("dragHandles");let z=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._observerManipulatedObject=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._updatingHandles=new M,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new _({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new V({view:this.view,tool:this.parentTool}),this._observerManipulator=new D(this.view,this.parentTool),this._observerManipulatedObject=new O({view:this.view,subTool:this}),this.addHandles([s(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},p),this._updatingHandles.add(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=o(90-e))},d),this._updatingHandles.add(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace,operations:this._observerManipulatedObject.operations}},({viewshedComputedData:e,observer:i,operations:a},n)=>{this._grabbing&&i!==n?.observer||(this.removeHandles(H),e?.valid&&null!=a&&this.addHandles([this._buildObserverManipulatorDragPipeline(e),this._buildMoveManipulationDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),H))},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},d),this._updatingHandles.add(()=>{const{viewshedComputedData:e,analysisViewData:i}=this,t=i.visible&&(e?.valid??!1),a=i.selectedViewshed===e?.viewshed,n=t&&a,r=e?.effectiveElevationInfo.mode;return{controlsAvailable:n,selected:a,visibleAndValid:t,zManipulationAvailable:n&&"on-the-ground"!==r}},({controlsAvailable:e,selected:i,visibleAndValid:t,zManipulationAvailable:a})=>{this._moveManipulation.available=e,this._moveManipulation.zManipulation.available=a,this._scaleOrientManipulation.available=e,this._observerManipulator.available=t,this._observerManipulator.collisionPriority=i?2:0,this._fieldOfViewManipulation.available=e},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},d)]);const e=e=>{this.addHandles([e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i===e||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._observerManipulatedObject=l(this._observerManipulatedObject),this._moveManipulation=l(this._moveManipulation),this._fieldOfViewManipulation=l(this._fieldOfViewManipulation),this._scaleOrientManipulation=l(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=l(this._observerManipulator),this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get observerManipulator(){return this._observerManipulator}get observerManipulatedObject(){return this._observerManipulatedObject}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e||this._observerManipulator.dragging,grabbing:i||this._observerManipulator.grabbing}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._observerManipulator.interactive=i?e:e(this._observerManipulator),this._forEachManipulation(t=>{t.interactive=i?e:t.someManipulator(e)})}onManipulatorSelectionChanged(){if(!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null)}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._observerManipulator.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_createMoveManipulation(){return new S({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:j})}_buildObserverManipulatorDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;if(null==a)return null;const n=a.data.spatialReference;return x(this._observerManipulator,(e,r,o,l)=>{const s=a.data.geometry;if("point"!==s.type)return;o=o.next(C(t));const p=this.parentTool.createObserverMoveSnappingPipeline(0,l,i,!0);let d=r.next(y(this.view,s,i,n)).next(T(this.view,i));if(null!=p){const{snappingStep:e,cancelSnapping:i}=p;o.next(i),d=d.next(...e)}d.next(A(t))})}_buildMoveManipulationDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;return null==a?null:this._moveManipulation.createDragPipeline((e,a,n,r,o)=>{r=r.next(C(t));const l=this.parentTool.createObserverMoveSnappingPipeline(e,o,i);if(null!=l){const{snappingStep:e,cancelSnapping:a}=l;return r=r.next(a),{steps:n=n.next(F(this.view,i)).next(...e).next(A(t)),cancel:r}}return{steps:n=n.next(A(t)),cancel:r}},i,a.data.spatialReference,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((n,r,o)=>{if(null==e)return{steps:r,cancel:o};const l=e.viewshed;let s=null;o=o.next(P(l,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:r.next(n=>{"start"===n.action&&(s=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const r=n.deltaAngle;if(null==s&&0!==r){const e="bottom"===n.side||"left"===n.side?r>0:r<0;s=f(n.side)?0===i&&e||360===i&&!e:0===t&&e}const o=s?w(n.side):n.side;let p=0;switch(o){case"left":p=i/2-r;break;case"right":p=i/2+r;break;case"top":p=t+2*r;break;case"bottom":p=t-2*r}return f(o)?(p=a.normalize(p),p=p>270?0:p>180?180:p,l.horizontalFieldOfView=2*p):l.verticalFieldOfView=p,n}),cancel:o}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const n=(i,t)=>(a,n,r)=>{if(null==e)return{steps:n,cancel:r};const o=e.viewshed;return r=r.next(P(o,[i])),{steps:n=n.next(t(o,e)),cancel:r}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(n("heading",(i,n)=>n=>("start"===n.action&&(t=e.heading),i.heading=a.normalize(t+n.deltaAngle),n)),e),this._scaleOrientManipulation.createTiltDragPipeline(n("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=I.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(n("farDistance",(e,i)=>t=>{const a=c(E,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=v(a)*i.metersPerUnit,r=b(a,i.targetDirection)<0?m.scaleOrientMinDistance:n;return e.farDistance=r,t}),e)])}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{observerManipulator:this._observerManipulator,moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData}}};e([u({constructOnly:!0})],z.prototype,"analysis",void 0),e([u({constructOnly:!0})],z.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],z.prototype,"parentTool",void 0),e([u({constructOnly:!0,nonNullable:!0})],z.prototype,"view",void 0),e([u()],z.prototype,"updating",null),e([u()],z.prototype,"viewshed",null),e([u()],z.prototype,"_grabbing",void 0),e([u()],z.prototype,"grabbing",null),e([u()],z.prototype,"viewshedComputedData",void 0),e([u()],z.prototype,"observer",null),e([u()],z.prototype,"elevationAlignedObserverRenderSpace",null),z=e([h("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],z);const E=g(),I=new n(0,180);export{z as ViewshedSubTool};
|
|
2
|
+
import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{cyclicalDegrees as a,Cyclical as n}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as l,syncAndInitial as p,initial as d}from"../../../../core/reactiveUtils.js";import{property as u,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{sub as h,len as v,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as M}from"../../../../core/support/UpdatingHandles.js";import{getFeatureReference as m}from"./placementUtils.js";import{viewshedToolManipulatorConfiguration as f}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as _,isSideHorizontal as w,flipSide as O}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedObserverManipulatedObject3D as V}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedScaleOrientManipulation as D}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as y}from"./viewshedToolManipulatorUtils.js";import{screenToMapAtSceneSurface as j}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as x}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as S}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{createManipulatorDragEventPipeline as C,resetManipulatedObject as T,sceneSnappingAtLocation as A,dragManipulatedObject as F,sceneSnappingAtProjectedLocation as P,resetProperties as H}from"../../../interactive/dragEventPipeline.js";const E=Symbol("dragHandles");let z=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._observerManipulatedObject=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._updatingHandles=new M,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new _({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new D({view:this.view,tool:this.parentTool}),this._observerManipulator=new y(this.view,this.parentTool),this._observerManipulatedObject=new V({view:this.view,subTool:this}),this.addHandles([l(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},p),this._updatingHandles.add(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=o(90-e))},d),this._updatingHandles.add(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace,operations:this._observerManipulatedObject.operations}},({viewshedComputedData:e,observer:i,operations:a},n)=>{this._grabbing&&i!==n?.observer||(this.removeHandles(E),e?.valid&&null!=a&&this.addHandles([this._buildObserverManipulatorDragPipeline(e),this._buildMoveManipulationDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),E))},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},d),this._updatingHandles.add(()=>{const{viewshedComputedData:e,analysisViewData:i}=this,t=i.visible&&(e?.valid??!1),a=i.selectedViewshed===e?.viewshed,n=t&&a,r=e?.effectiveElevationInfo.mode;return{controlsAvailable:n,selected:a,visibleAndValid:t,zManipulationAvailable:n&&"on-the-ground"!==r}},({controlsAvailable:e,selected:i,visibleAndValid:t,zManipulationAvailable:a})=>{this._moveManipulation.available=e,this._moveManipulation.zManipulation.available=a,this._scaleOrientManipulation.available=e,this._observerManipulator.available=t,this._observerManipulator.collisionPriority=i?2:0,this._fieldOfViewManipulation.available=e},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},d)]);const e=e=>{this.addHandles([e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i===e||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._observerManipulatedObject=s(this._observerManipulatedObject),this._moveManipulation=s(this._moveManipulation),this._fieldOfViewManipulation=s(this._fieldOfViewManipulation),this._scaleOrientManipulation=s(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=s(this._observerManipulator),this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get observerManipulator(){return this._observerManipulator}get observerManipulatedObject(){return this._observerManipulatedObject}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e||this._observerManipulator.dragging,grabbing:i||this._observerManipulator.grabbing}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._observerManipulator.interactive=i?e:e(this._observerManipulator),this._forEachManipulation(t=>{t.interactive=i?e:t.someManipulator(e)})}onManipulatorSelectionChanged(){if(!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null)}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._observerManipulator.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_createMoveManipulation(){return new S({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:x})}_buildObserverManipulatorDragPipeline(e){const{effectiveElevationInfo:i,viewshed:t}=e,a=this._observerManipulatedObject,n=a.operations;if(null==n)return null;const r=n.data.spatialReference;return C(this._observerManipulator,(e,o,s,l)=>{const{parentTool:p,view:d}=this,{intersector:u,snappingManager:c}=p,{geometry:h}=n.data;if("point"!==h.type)return;const v=t.feature,b=T(a);s=s.next(e=>(t.feature=v,b(e)));const g=p.createObserverMoveSnappingPipeline(0,l,i,!0);let M=o.next(j(d,h,i,r)).next(A(d,i));if(null!=g){const{snappingStep:e,cancelSnapping:i}=g;s.next(i),M=M.next(...e)}M.next(e=>(t.feature=m({intersector:u,snappingManager:c,screenPoint:e.screenEnd,view:d}),e)).next(F(a))})}_buildMoveManipulationDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;return null==a?null:this._moveManipulation.createDragPipeline((e,a,n,r,o)=>{r=r.next(T(t));const s=this.parentTool.createObserverMoveSnappingPipeline(e,o,i);if(null!=s){const{snappingStep:e,cancelSnapping:a}=s;return r=r.next(a),{steps:n=n.next(P(this.view,i)).next(...e).next(F(t)),cancel:r}}return{steps:n=n.next(F(t)),cancel:r}},i,a.data.spatialReference,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((n,r,o)=>{if(null==e)return{steps:r,cancel:o};const s=e.viewshed;let l=null;o=o.next(H(s,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:r.next(n=>{"start"===n.action&&(l=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const r=n.deltaAngle;if(null==l&&0!==r){const e="bottom"===n.side||"left"===n.side?r>0:r<0;l=w(n.side)?0===i&&e||360===i&&!e:0===t&&e}const o=l?O(n.side):n.side;let p=0;switch(o){case"left":p=i/2-r;break;case"right":p=i/2+r;break;case"top":p=t+2*r;break;case"bottom":p=t-2*r}return w(o)?(p=a.normalize(p),p=p>270?0:p>180?180:p,s.horizontalFieldOfView=2*p):s.verticalFieldOfView=p,n}),cancel:o}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const n=(i,t)=>(a,n,r)=>{if(null==e)return{steps:n,cancel:r};const o=e.viewshed;return r=r.next(H(o,[i])),{steps:n=n.next(t(o,e)),cancel:r}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(n("heading",(i,n)=>n=>("start"===n.action&&(t=e.heading),i.heading=a.normalize(t+n.deltaAngle),n)),e),this._scaleOrientManipulation.createTiltDragPipeline(n("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=R.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(n("farDistance",(e,i)=>t=>{const a=h(I,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=v(a)*i.metersPerUnit,r=b(a,i.targetDirection)<0?f.scaleOrientMinDistance:n;return e.farDistance=r,t}),e)])}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{observerManipulator:this._observerManipulator,moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData}}};e([u({constructOnly:!0})],z.prototype,"analysis",void 0),e([u({constructOnly:!0})],z.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],z.prototype,"parentTool",void 0),e([u({constructOnly:!0,nonNullable:!0})],z.prototype,"view",void 0),e([u()],z.prototype,"updating",null),e([u()],z.prototype,"viewshed",null),e([u()],z.prototype,"_grabbing",void 0),e([u()],z.prototype,"grabbing",null),e([u()],z.prototype,"viewshedComputedData",void 0),e([u()],z.prototype,"observer",null),e([u()],z.prototype,"elevationAlignedObserverRenderSpace",null),z=e([c("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],z);const I=g(),R=new n(0,180);export{z as ViewshedSubTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import{detachToolFromView as r}from"./toolLifecycleUtils.js";import{ViewshedEditTool as p}from"./ViewshedEditTool.js";import{ViewshedPlacementController as d}from"./ViewshedPlacementController.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import{detachToolFromView as r}from"./toolLifecycleUtils.js";import{ViewshedEditTool as p}from"./ViewshedEditTool.js";import{ViewshedPlacementController as d}from"./ViewshedPlacementController.js";import{newToolIntersector as c}from"../../../interactive/ToolIntersector.js";import{acquire as h}from"../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as g}from"../../../interactive/snapping/snappingUtils.js";let u=class extends e{constructor(t){super(t),this._editTool=null,this._updatingHandles=new l}initialize(){const{view:t}=this,e=c(t.state.viewingMode);this._snappingManagerResult=h(t),this.addHandles(this._snappingManagerResult),this._placementController=new d({analysis:this.analysis,analysisViewData:this.analysisViewData,intersector:e,snappingManager:this._snappingManager,view:t,callbacks:{cancelTool:()=>{null!=t.activeTool&&(t.activeTool=null)},findViewshedComputedData:t=>this._findViewshedComputedData(t),isToolDestroyed:()=>this.destroyed,setSelectedViewshed:t=>{this.analysisViewData.selectedViewshed=t}}}),g(this),this.addHandles([s(()=>({creationState:this._placementController.creationState,interactive:this.analysisViewData.interactive}),({creationState:i,interactive:s})=>{if(!s)return this._placementController.cancelPlaceOperation(),void this._destroyEditTool();null==i?this._editTool||(this._editTool=new p({analysis:this.analysis,analysisViewData:this.analysisViewData,intersector:e,snappingManager:this._snappingManager,view:t}),t.tools.add(this._editTool)):this._destroyEditTool()},a),this._updatingHandles.add(()=>t.activeTool,t=>{null!=t&&t!==this._editTool&&null==this._placementController.creationState&&(this.analysisViewData.selectedViewshed=null)})])}destroy(){this._destroyEditTool(),i(this._placementController),this._updatingHandles.destroy()}get selectedViewshedComputedData(){return this._editTool?.selectedViewshedComputedData}get stagedViewshed(){return this._placementController.stagedViewshed}get active(){return this._placementController.active||(this._editTool?.active??!1)}get updating(){return this._updatingHandles.updating||this._placementController.updating||!!this._editTool?.updating}get creating(){return null!=this._placementController.creationState}get snappingOptions(){return this._snappingManager.options}set snappingOptions(t){this._snappingManager.options=t}get _snappingManager(){return this._snappingManagerResult.snappingManager}async place(t,e){if(this.analysisViewData.interactive=!0,this._destroyEditTool(),await this._placementController.startPlaceOperation(t,e),"single"===t)return{}}_findViewshedComputedData(t){return this.analysisViewData.viewshedComputedDataHandles?.find(e=>e.viewshedComputedData.viewshed===t)?.viewshedComputedData}_destroyEditTool(){const t=this._editTool;this._editTool=null,null!=t&&(r(this.view,t),i(t))}get test(){}};t([o({constructOnly:!0})],u.prototype,"view",void 0),t([o({constructOnly:!0})],u.prototype,"analysis",void 0),t([o({constructOnly:!0})],u.prototype,"analysisViewData",void 0),t([o()],u.prototype,"_placementController",void 0),t([o()],u.prototype,"_editTool",void 0),t([o()],u.prototype,"_snappingManagerResult",void 0),t([o()],u.prototype,"selectedViewshedComputedData",null),t([o()],u.prototype,"stagedViewshed",null),t([o()],u.prototype,"active",null),t([o()],u.prototype,"updating",null),t([o()],u.prototype,"creating",null),t([o()],u.prototype,"snappingOptions",null),u=t([n("esri.views.3d.analysis.Viewshed.ViewshedTool")],u);const m=u;export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as r,sync as o,initial as t}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{ViewshedDrawToolRenderer as a}from"./ViewshedDrawToolRenderer.js";import{isValidIntersectorResult as s}from"../../webgl-engine/lib/IntersectorResult.js";import{toGraphic as l}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{DrawTool as c}from"../../../draw/DrawTool.js";
|
|
2
|
+
import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as r,sync as o,initial as t}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{ViewshedDrawToolRenderer as a}from"./ViewshedDrawToolRenderer.js";import{isValidIntersectorResult as s}from"../../webgl-engine/lib/IntersectorResult.js";import{toGraphic as l}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{DrawTool as c}from"../../../draw/DrawTool.js";function d(i){const{analysisViewData:s,snappingManager:l,view:d,toolOptions:p,elevationInfo:u,getSnapToSceneEnabled:b,onCancel:m,onComplete:g,onManipulatorCountChange:j,isPlacingObserver:f}=i,w=new a({view:d,isPlacingObserver:f}),I=new c({elevationInfo:u,enableVertexVisuals:!1,hasZ:!0,renderer:w,toolOptions:p,snappingManager:l,view:d});return I.addHandles([e(w),I.on("cancel",()=>m(I)),I.on("complete",()=>g(I)),n(()=>[I.surfaceManager,b()],([e,n])=>{e&&(e.snapToSceneEnabled=n)},r),n(()=>I.manipulators.length,()=>j(I),o),n(()=>s.visible,e=>w.analysisVisible=e,t)]),{drawTool:I,renderer:w}}function p({intersector:e,snappingManager:n,screenPoint:r,view:o}){const t=n.getMainFeatureCandidate();return t?b(t):r?u(r,o,e):null}function u(e,n,r){n.sceneIntersectionHelper.intersectToolIntersectorScreen(i(e.x,e.y),r);const o=r.results.min;return s(o)?l(o,n):null}function b(e){const n={id:e.layer.id,objectIdField:"objectIdField"in e.layer?e.layer.objectIdField:void 0};return{attributes:{[n.objectIdField??"ObjectId"]:e.objectId},layer:n,objectId:e.objectId,uid:null}}export{d as createDrawTool,p as getFeatureReference};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as t}from"tslib";import o from"../../../core/Accessor.js";import"../../../core/has.js";import{destroyMaybe as e}from"../../../core/maybe.js";import{watch as r,initial as i,syncAndInitial as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as s}from"../../../core/accessorSupport/decorators.js";import{DoubleClickZoom as d}from"./handlers/DoubleClickZoom.js";import{DragRotate as m}from"./handlers/DragRotate.js";import{DragZoom as p}from"./handlers/DragZoom.js";import{DragZoomBox as g}from"./handlers/DragZoomBox.js";import{GamepadNavigation as h}from"./handlers/GamepadNavigation.js";import{KeyboardNavigation as l}from"./handlers/KeyboardNavigation.js";import{MouseWheelFov as u}from"./handlers/MouseWheelFov.js";import{MouseWheelZoom as c}from"./handlers/MouseWheelZoom.js";import{PinchAndPanNavigation as v}from"./handlers/PinchAndPanNavigation.js";import{PointerDownCancelAnimation as w}from"./handlers/PointerDownCancelAnimation.js";import{TwoFingerTilt as f}from"./handlers/TwoFingerTilt.js";import{GroundNavigation as _}from"./handlers/ground/GroundNavigation.js";import{BrowserEventSource as y}from"../../input/BrowserEventSource.js";import{InputManager as D,ViewEventPriorities as j}from"../../input/InputManager.js";import{PreventContextMenu as N}from"../../input/handlers/PreventContextMenu.js";import{PreventTouchSelection as P}from"../../input/handlers/PreventTouchSelection.js";import{getPointerActions as A}from"../../input/handlers/support.js";import{Drag as M}from"../../input/recognizers/Drag.js";import{ImmediateDoubleClick as b}from"../../input/recognizers/ImmediateDoubleClick.js";import{PointerClickHoldAndDrag as R}from"../../input/recognizers/PointerClickHoldAndDrag.js";import{SingleAndDoubleClick as T}from"../../input/recognizers/SingleAndDoubleClick.js";import{VerticalTwoFingerDrag as k}from"../../input/recognizers/VerticalTwoFingerDrag.js";const I="modeDependentNavigation";let S=class extends o{constructor(){super(...arguments),this.mode="default",this._keys={fov:"Shift",pan:{left:"ArrowLeft",right:"ArrowRight",forward:"ArrowUp",backward:"ArrowDown",up:["u","U"],down:["j","J"]},lookAround:{headingLeft:["a","A"],headingRight:["d","D"],tiltUp:["w","W"],tiltDown:["s","S"]},modifier:["b","B"],zoom:{zoomIn:["+","="],zoomOut:["-","_"]},reset:{heading:["n","N"],tilt:["p","P"]},precisionPanModifier:"Alt",coarsePanModifier:"Shift"},this._updateMode=({mode:t,dragPrimary:o,dragSecondary:e,dragTertiary:r})=>{"pro"===t&&(e="zoom",r="pan"===o?"rotate":"pan");const i={dragPrimary:o,dragSecondary:e,dragTertiary:r};this._modeDragPan&&(this._modeDragPan.pointerActions=A("pan",i)),this._modeGroundNavigation&&(this._modeGroundNavigation.pointerActions=A("pan",i)),this._modeDragRotate&&(this._modeDragRotate.pointerActions=A("rotate",i)),this._modeGroundNavigationDragRotate&&(this._modeGroundNavigationDragRotate.pointerActions=A("rotate",i)),this._modeDragZoom&&(this._modeDragZoom.pointerActions=A("zoom",i))}}destroy(){this.disconnect()}get primaryDragAction(){return this.view.navigation.actionMap.dragPrimary}set primaryDragAction(t){const{actionMap:o}=this.view.navigation;o.dragPrimary=t,o.dragSecondary="pan"===t?"rotate":"pan"}get updating(){return!!this._inputManager?.updating}get latestPointerInfo(){return this._inputManager?.latestPointerInfo}get latestPenInfo(){return this._inputManager?.latestPenInfo}get multiTouchActive(){return this._inputManager?.multiTouchActive??!1}disconnect(){this.removeAllHandles(),this.view.viewEvents.disconnect(),this._modeDragPan=null,this._modeGroundNavigation=null,this._modeDragRotate=null,this._modeGroundNavigationDragRotate=null,this._modeDragZoom=null,this._modeKeyboardNavigation=null,this._inputManager=e(this._inputManager),this._source=e(this._source)}connect(){const t=this.view;this._source=new y(this.view.surface,t.input);const o=[new b,new R,new T,new M(this.view.navigation),new k],e=new D({eventSource:this._source,recognizers:o});this._inputManager=e,e.installHandlers("prevent-context-menu",[new N],j.INTERNAL),e.installHandlers("prevent-touch-text-selection-gesture",[new P(this.view)],j.INTERNAL),this._modeDragPan=new v(t,["primary"]),this._modeDragRotate=new m(t,["secondary"],0),this._modeDragZoom=new p(t,["tertiary"],this._keys.fov),this._modeKeyboardNavigation=new l(t,this._keys);const a=[new w(t),new d(t),new h(t),new u(t,this._keys.fov),new c(t),new g(t),new m(t,["primary"],1,this._keys.modifier),new _(t,["secondary"],this._keys.modifier),this._modeDragRotate,this._modeDragZoom,this._modeDragPan,this._modeKeyboardNavigation,new f(t)];this._modeGroundNavigation=new _(t,["primary"]),this._modeGroundNavigationDragRotate=new m(t,["secondary"],1);const s=[this._modeGroundNavigation,new u(t,this._keys.fov),new _(t,["tertiary"]),this._modeGroundNavigationDragRotate,this._modeKeyboardNavigation];this.view.viewEvents.connect(e),this.addHandles([r(()=>this.view.navigation.mode,t=>{switch(e.hasHandlers(I)&&e.uninstallHandlers(I),t.type){case"default":e.installHandlers(I,a,j.INTERNAL);break;case"ground":e.installHandlers(I,s,j.INTERNAL)}},{initial:!0}),r(()=>this.view.navigation?.browserTouchPanEnabled,t=>{this._source.browserTouchPanningEnabled=!t},i),r(()=>{const{actionMap:t}=this.view.navigation,{dragPrimary:o,dragSecondary:e,dragTertiary:r}=t;return{mode:this.mode,dragPrimary:o,dragSecondary:e,dragTertiary:r}},this._updateMode,n)])}isModifierKeyDown(t){return this._inputManager?.isModifierKeyDown(t)??!1}get test(){}};t([a()],S.prototype,"view",void 0),t([a({type:["default","pro"]})],S.prototype,"mode",void 0),t([a({readOnly:!0})],S.prototype,"updating",null),t([a()],S.prototype,"latestPointerInfo",null),t([a()],S.prototype,"latestPenInfo",null),t([a()],S.prototype,"multiTouchActive",null),t([a()],S.prototype,"_inputManager",void 0),S=t([s("esri.views.3d.input.SceneInputManager")],S);const G=S;export{G as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{GroundNavigationController as t}from"../../../state/controllers/GroundNavigationController.js";import{InputHandler as e}from"../../../../input/InputHandler.js";import{eventMatchesMousePointerActions as s}from"../../../../input/handlers/support.js";class r extends e{constructor(t,e,s){super(!0),this._view=t,this.pointerActions=e,this._lastEndTimestamp=0,this._lastTimestamp=0,this.registerIncoming("drag",s,t=>this._handleDrag(t))}_handleDrag(t){if("mouse"===t.data.pointerType&&!s(t.data,this.pointerActions))return;const e=t.timestamp-this._lastEndTimestamp,r=40,i=this._momentum&&this._momentum.running&&e<r;switch(t.data.action){case"start":case"update":if(i)break;this._controller&&this._controller.running?t.data.timestamp-this._lastTimestamp>2&&(this._controller.update(t.data),this._lastTimestamp=t.timestamp):this._startController(t);break;case"end":case"removed":this._endController(t,!0);break;case"added":this._endController(t,!1),this._startController(t)}t.stopPropagation()}_endController(t,e){if(this._controller?.running){this._lastEndTimestamp=t.timestamp;const s=this._controller.end(t.data);e&&s&&(this._momentum=s,this._view.state.switchCameraController(this._momentum))}this._controller=null}_startController(t){this._controller=this._createController(),this._view.state.switchCameraController(this._controller),this._controller.begin(t.data),this._lastTimestamp=t.timestamp}_createController(){return new t({view:this._view})}}export{r as GroundNavigation};
|
|
2
|
+
import"../../../../../core/has.js";import{GroundNavigationController as t}from"../../../state/controllers/GroundNavigationController.js";import{InputHandler as e}from"../../../../input/InputHandler.js";import{eventMatchesMousePointerActions as s}from"../../../../input/handlers/support.js";class r extends e{constructor(t,e,s){super(!0),this._view=t,this.pointerActions=e,this._modifiers=s,this._lastEndTimestamp=0,this._lastTimestamp=0,this.registerIncoming("drag",s,t=>this._handleDrag(t))}_handleDrag(t){if("mouse"===t.data.pointerType&&!s(t.data,this.pointerActions))return;const e=t.timestamp-this._lastEndTimestamp,r=40,i=this._momentum&&this._momentum.running&&e<r;switch(t.data.action){case"start":case"update":if(i)break;this._controller&&this._controller.running?t.data.timestamp-this._lastTimestamp>2&&(this._controller.update(t.data),this._lastTimestamp=t.timestamp):this._startController(t);break;case"end":case"removed":this._endController(t,!0);break;case"added":this._endController(t,!1),this._startController(t)}t.stopPropagation()}_endController(t,e){if(this._controller?.running){this._lastEndTimestamp=t.timestamp;const s=this._controller.end(t.data);e&&s&&(this._momentum=s,this._view.state.switchCameraController(this._momentum))}this._controller=null}_startController(t){this._controller=this._createController(),this._view.state.switchCameraController(this._controller),this._controller.begin(t.data),this._lastTimestamp=t.timestamp}_createController(){return new t({view:this._view})}get test(){}}export{r as GroundNavigation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{abortMaybe as i,removeMaybe as s,destroyMaybe as a}from"../../../core/maybe.js";import{throwIfAborted as r}from"../../../core/promiseUtils.js";import{watch as n,whenOnce as l,initial as o}from"../../../core/reactiveUtils.js";import{isUint32Array as h}from"../../../core/typedArrayUtil.js";import{unitFromRESTJSON as d,convertUnit as u}from"../../../core/units.js";import{property as c,subclass as p}from"../../../core/accessorSupport/decorators.js";import{fromValues as m}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{getReferenceEllipsoid as f}from"../../../geometry/ellipsoidUtils.js";import g from"../../../geometry/HeightModelInfo.js";import{create as _}from"../../../geometry/support/aaBoundingBox.js";import{isCompatible as y}from"../../../geometry/support/heightModelInfoUtils.js";import{isPlateCarree as w,isWebMercator as b,equals as v,isGeographic as S}from"../../../geometry/support/spatialReferenceUtils.js";import C from"../../../geometry/support/WKIDUnitConversion.js";import{validateEntity3D as M,makeCacheKey as T,getHeightModelInfoFromVCS as I}from"../../../layers/support/tiles3DUtils.js";import{getElevationOffsetInMeters as x}from"../../../support/elevationInfoUtils.js";import{getMetersPerUnit as H}from"../../../symbols/support/unitConversionUtils.js";import{GaussianSplatLayerViewPerformanceInfo as P}from"./GaussianSplatLayerViewPerformanceInfo.js";import{LayerView3D as A}from"./LayerView3D.js";import{addLayerViewToWasm as F,getLyr3DWasm as R,removeLayerViewFromWasm as V}from"./Lyr3DWasm.js";import{LayerElevationProvider as j}from"./i3s/LayerElevationProvider.js";import{ElevationRange as E}from"../support/ElevationRange.js";import{projectToBoundingBox as G}from"../support/extentUtils.js";import{Obb as U}from"../support/orientedBoundingBox.js";import{splatPageSizeInU32 as B,gaussiansPerPage as O,packedGaussianSizeInU32 as D,splatAtlasTextureWidth as z}from"../support/gaussianSplatting/GaussianSplatAtlasPages.js";import{GaussianSplatDataStore as L}from"../support/gaussianSplatting/GaussianSplatDataStore.js";import{GaussianSplatFadeHelper as k}from"../support/gaussianSplatting/GaussianSplatFadeHelper.js";import{GaussianSplatIntersectionHandler as q}from"../support/gaussianSplatting/GaussianSplatIntersectionHandler.js";import{GaussianTile as W}from"../support/gaussianSplatting/GaussianTile.js";import{GaussianSplatDepthRenderer as $}from"../webgl-engine/lib/GaussianSplatDepthRenderer.js";import{GaussianSplatRenderer as N}from"../webgl-engine/lib/GaussianSplatRenderer.js";import{GaussianSplatShadows as X}from"../webgl-engine/lib/GaussianSplatShadows.js";import Z from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as K,isInEffectiveScaleRange as Y}from"../../support/layerViewUtils.js";import{TaskPriority as J}from"../../support/Scheduler.js";var Q;const ee=()=>t.getLogger("esri.views.3d.layers.GaussianSplatLayerView3D"),te=3,ie=te*te,se=255,ae=(()=>{const e=new Int16Array(se+1);e[0]=-255;for(let t=1;t<e.length;t++)e[t]=Math.round(16*Math.log(t/se));return e})();let re=class extends(A(Z)){static{Q=this}static{this.createRenderableBatchSize=64}static{this.uploadBatchPageCount=16}constructor(e){super(e),this.type="gaussian-splat-3d",this.ignoresMemoryFactor=!1,this._tileHandles=new Map,this._pageBuffer=new Uint32Array(B*Q.uploadBatchPageCount),this._tmpTilesWithChangedVisibility=new Array,this._renderablesBeingCreated=new Set,this._currentLyr3dVisibilityChange=0,this._tileFadeInsAwaitingInitialSort=new Map,this._tileFadeOutsAwaitingInitialSort=new Map,this._fadeDurationPerVisibilityChange=new Map,this._tmpSortedTileHandles=new Set,this._createRenderableAbortController=new AbortController,this._initializationController=null,this._wasmLayerId=-1,this._metersPerVCSUnit=1,this._usedTileMemory=0,this._cacheTileMemory=0,this._useEsriCrs=!1,this.fullExtentInLocalViewSpatialReference=null,this._suspendedHandle=null,this._conversionBuffer=new ArrayBuffer(4),this._u32View=new Uint32Array(this._conversionBuffer),this._f32View=new Float32Array(this._conversionBuffer);const t=e.view.resourceController;this._memCache=t.memoryController.newCache(`GaussianSplat-${this.uid}`,e=>this._deleteTile(e)),this._frameTask=t.scheduler.registerTask(J.GAUSSIAN_SPLAT_TEXTURE_ATLAS)}get _clippingBox(){if(!this.view?.clippingArea)return null;const e=_();return G(this.view.clippingArea,e,this.view.renderSpatialReference)?e:null}get clippingBox(){return this._renderer?.clippingBox??null}initialize(){const{view:e}=this;this.addHandles([n(()=>e.qualitySettings.fadeDuration,e=>{this.data&&(this.fadeHelper.onFadeDurationChanged(e),this.updateFadingTexture())})]),this.addResolvingPromise(this._initializeAsync(e))}async _initializeAsync(e){this._initializationController=new AbortController;const{signal:t}=this._initializationController;if(await l(()=>e?.defaultsFromMap.heightModelInfoReady,t),r(t),!this._canProjectWithoutEngine())throw K("layer",this.layer.spatialReference.wkid,e.renderSpatialReference?.wkid);this._wasmLayerId=await F(this,t),r(t),this._renderer=new N({view:e,layerView:this}),this.data=new L(this._renderer,(e,t)=>this._onSortComplete(e,t),()=>this._freeInvisibleTiles()),this._shadows=new X({view:e,layerView:this}),this.fadeHelper=new k(this),this._depthRenderer=new $({view:e,layerView:this});const i=new q(this);this._intersectionHandler=i,e.sceneIntersectionHelper.addIntersectionHandler(i),this._elevationProvider=new j({view:e,layerElevationSource:this,intersectionHandler:i}),e.elevationProvider.register(2,this._elevationProvider),this.addHandles([n(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e)),n(()=>this.slicePlaneEnabled,e=>this._slicePlaneEnabledChanged(e),o)]),this._suspendedHandle=n(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),o),this.addHandles([n(()=>this._clippingBox,e=>{this._renderer&&(this._renderer.clippingBox=e)},o),n(()=>this.maximumGaussianCount,e=>this._wasm?.setMaximumGaussianSplatCount(Math.min(e,this.data.textureAtlas.maximumSupportedVisibleGaussians)),o)]),this._initializationController=null}get wasmLayerId(){return this._wasmLayerId}get metersPerVCSUnit(){return this._metersPerVCSUnit}get tileHandles(){return this._tileHandles}updateFadingTexture(){this.data.fadingTexture.updateTexture(this.data.textureAtlas.pageAllocator.pageCount)}get _wasm(){return R(this.view)}get usedMemory(){return this._usedTileMemory+(this.data?.usedMemory??0)}get cachedMemory(){return this._cacheTileMemory}get unloadedMemory(){return 0}get useEsriCrs(){return this._useEsriCrs}get elevationProvider(){return this._elevationProvider}get elevationOffset(){return x(this.layer.elevationInfo)}get elevationRange(){const e=this.fullExtent;return e?.zmin&&e?.zmax?new E(e.zmin,e.zmax):null}getElevationRange(e){return this._intersectionHandler.getElevationRange(e)}get fullExtent(){return this.layer.fullExtent}get visibleAtCurrentScale(){return Y(this.layer.effectiveScaleRange,this.view.scale)}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&(e.isUpdating(this._wasmLayerId)||this.data.updating||this.fadeHelper.updating)}updatingFlagChanged(){this.notifyChange("updating")}async createRenderable(e){if(this.destroyed||this.destroying)throw new Error("IntegratedMesh3DTilesLayerView3D: createRenderable called after destroy");const{entity3d:t}=e;if(!M(t))throw new Error("entity3D not valid");const i=t.desc.geometry.prims[t.validPrimitiveIndices[0]].atrbs[0],s=t.assets[i.assetId];if(!s)throw new Error("entity3D not valid");const a=s.count;if(0===a)return ee().warnOnce("encountered tile with zero Gaussians"),()=>({memUsageBytes:0,numGaussians:0});let r=null;if("U32"!==s.dataType||!h(s.data))throw new Error("unexpected GaussianSplat Entity3D asset.data format");r=s.data;const n=this.extractHeader(r),l=2.048,o=n.tileOrigin.x*l,d=n.tileOrigin.y*l,u=n.tileOrigin.z*l,c=t.desc,p=c.obb.quaternion,g=new U(c.obb.center,c.obb.halfSize,m(...p)),_=this.view.state.isGlobal,y=_?f(this.view.spatialReference).radius:0,w={handle:e.handle,bufferView:r,totalGaussians:a,packedHeader:n.packedHeader,tileOrigin:{x:o,y:d,z:u},invPosScale:n.invPosScale,obb:g,origin:{x:g.centerX,y:g.centerY,z:g.centerZ},isGlobal:_,ellipsoidRadius:y};let b;this._renderablesBeingCreated.add(e.handle);try{b=await this._frameTask.scheduleGenerator(e=>this._createRenderableTask(w,e),this._createRenderableAbortController.signal)}catch(v){throw this._renderablesBeingCreated.delete(e.handle),v}return this._renderablesBeingCreated.delete(e.handle),()=>b}*_createRenderableTask(e,t){const{handle:i,bufferView:s,totalGaussians:a,packedHeader:r,tileOrigin:n,invPosScale:l,obb:o,origin:h,isGlobal:d,ellipsoidRadius:u}=e,c=n.x,p=n.y,m=n.z,f=h.x,g=h.y,_=h.z,y=new Float32Array(3*a),w=new Uint32Array(a),b=new Uint32Array(a),v=new Array,S=Math.ceil(a/O);let C=1/0,M=-1/0,T=1/0,I=-1/0,x=0,H=-1,P=0,A=0;for(let E=0;E<a;E++){const e=E*D,i=s[e],a=s[e+1],r=s[e+2],n=s[e+3],o=16383&a,h=a>>>14&16383,u=a>>>28&15|(1023&r)<<4,v=n>>>24,S=ae[v],F=(r>>>10&255)+S,R=(r>>>18&255)+S,V=(r>>>26&63|(3&n)<<6)+S,j=F>0?F:0,G=R>0?R:0,U=V>0?V:0,B=j|G<<8|U<<16,O=Math.max(j,G,U),z=o*l+c,L=h*l+p,k=u*l+m;if(y[x]=z-f,y[x+1]=L-g,y[x+2]=k-_,d){const e=z*z+L*L+k*k;T=Math.min(T,e),I=Math.max(I,e)}else C=Math.min(C,k),M=Math.max(M,k);w[E]=i,b[E]=B,O>H&&(H=O),v>P&&(P=v),x+=3,A++,A===Q.createRenderableBatchSize&&(A=0,t.madeProgress()&&(t=yield))}A>0&&t.madeProgress(),d&&(C=Math.sqrt(T)-u,M=Math.sqrt(I)-u);const F=this._extractGaussianSplatMbsRadiusSquared(H),{fullExtent:R}=this.layer;R?.hasZ&&R.zmax&&R.zmin&&(C=Math.max(C,R.zmin),M=Math.min(M,R.zmax));const V=new E(C,M),j=this.data.textureAtlas,G=this.data.headerTexture;try{for(let e=0;e<S;e+=Q.uploadBatchPageCount){const t=Math.min(S,e+Q.uploadBatchPageCount);for(let i=e;i<t;i++){let e=j.allocatePage();if(null===e&&(this._freeInvisibleTiles(),e=j.allocatePage()),null===e)throw new Error("ran out of gaussian splat memory");v.push(e)}for(let i=e;i<t;){const e=v[i];let n=i+1;for(;n<t&&v[n]===v[n-1]+1;)n++;const l=n-i,o=a-i*O,h=Math.min(o,l*O),d=i*B,u=h*D;this._pageBuffer.set(s.subarray(d,d+u));const c=e*O,p=c%z,m=Math.floor(c/z);j.update(p,m,this._pageBuffer,l),G.update(e,r,l),i=n}}}catch(L){throw j.freePages(v),L}const U=new W(i,o,v,y,w,b,a,F,P/se,V);return this._tileHandles.set(i,U),this._cacheTileMemory+=U.usedMemory,this._memCache.put(`${U.handle}`,U),{memUsageBytes:U.usedMemory,numGaussians:a}}_extractGaussianSplatMbsRadiusSquared(e){return Math.exp(e/8-20)*ie}freeRenderable(e){this._tileFadeInsAwaitingInitialSort.delete(e),this._tileFadeOutsAwaitingInitialSort.delete(e);const t=this.data?.textureAtlas;let i=!1;const s=this._tileHandles.get(e);if(s){0!==s.lifecycleState?(i=!0,this.fadeHelper.onTileDiscarded(s),this._usedTileMemory-=s.usedMemory,this._intersectionHandler.removeTile(s)):this._cacheTileMemory-=s.usedMemory,t&&s.pageIds.forEach(e=>t.freePage(e)),this.freeObject(s),this._tileHandles.delete(e)}i&&this.updateGaussians()}freeObject(e){this._memCache.pop(`${e.handle}`)}notifyTileObbsChanged(e){this._elevationProvider&&this._elevationProvider.notifyObjectsChangedFunctional(e.length,t=>{for(const{obb:i}of e)if(!t(i))break})}setRenderableVisibility(e,t,i){const s=this._currentLyr3dVisibilityChange+1,a=this.fadeHelper.updateFadeDuration();this._fadeDurationPerVisibilityChange.set(s,a);let r=!1;for(let n=0;n<i;n++){const i=this._tileHandles.get(e[n]);if(!i)continue;const l=t[n]?this._prepareTileFadeIn(i,s,a):this._prepareTileFadeOut(i,s);r||=l}r?(this._currentLyr3dVisibilityChange=s,this.updateGaussians()):this._fadeDurationPerVisibilityChange.delete(s)}_prepareTileFadeIn(e,t,i){const s=this._tileFadeOutsAwaitingInitialSort.delete(e.handle);return 2===e.lifecycleState?(this.fadeHelper.fadeTile(e,0,i),!1):this._tileFadeInsAwaitingInitialSort.get(e.handle)!==t?(0===e.lifecycleState&&this._popTileFromCache(e),e.lifecycleState=1,this._tileFadeInsAwaitingInitialSort.set(e.handle,t),!0):s}_prepareTileFadeOut(e,t){const i=this._tileFadeInsAwaitingInitialSort.delete(e.handle);return i&&1===e.lifecycleState&&(this.moveTileToCache(e),e.lifecycleState=0),2!==e.lifecycleState?i:this._tileFadeOutsAwaitingInitialSort.get(e.handle)!==t?(this._tileFadeOutsAwaitingInitialSort.set(e.handle,t),!0):i}_onSortComplete(e,t){const i=this._tmpTilesWithChangedVisibility;i.length=0;const s=this._tmpSortedTileHandles;s.clear();for(let r=0;r<e.length;r++){const t=e[r];s.add(t.handle)}this._triggerFadeIns(t,s,i);const a=this._triggerFadeOuts(t,i);s.clear(),i.length>0&&this.notifyTileObbsChanged(i),a&&this.updateGaussians(),this._cleanupVisibilityChangeFadeDurations(t)}_triggerFadeIns(e,t,i){for(const[s,a]of this._tileFadeInsAwaitingInitialSort){if(a>e||!t.has(s))continue;const r=this._tileHandles.get(s);if(!r){this._tileFadeInsAwaitingInitialSort.delete(s);continue}const n=this._getFadeDurationForPendingVisibilityChange(a),l=0===r.lifecycleState;2!==r.lifecycleState&&(r.lifecycleState=2,l&&this._popTileFromCache(r),i.push(r)),this.fadeHelper.fadeTile(r,0,n),this._tileFadeInsAwaitingInitialSort.delete(s)}}_triggerFadeOuts(e,t){let i=!1;for(const[s,a]of this._tileFadeOutsAwaitingInitialSort){if(a>e)continue;const r=this._tileHandles.get(s);if(r){const e=2===r.lifecycleState,s=this._getFadeDurationForPendingVisibilityChange(a);this.fadeHelper.fadeTile(r,1,s),e&&0===r.lifecycleState&&(t.push(r),i=!0)}this._tileFadeOutsAwaitingInitialSort.delete(s)}return i}_getFadeDurationForPendingVisibilityChange(e){return this._fadeDurationPerVisibilityChange.get(e)??this.fadeHelper.baseFadeDuration}_cleanupVisibilityChangeFadeDurations(e){if(0!==this._fadeDurationPerVisibilityChange.size)for(const t of this._fadeDurationPerVisibilityChange.keys())t<=e&&this._fadeDurationPerVisibilityChange.delete(t)}_popTileFromCache(e){this._usedTileMemory+=e.usedMemory,this._cacheTileMemory-=e.usedMemory,this._intersectionHandler.addTile(e),this._memCache.pop(T(e.handle))}moveTileToCache(e){this._usedTileMemory-=e.usedMemory,this._cacheTileMemory+=e.usedMemory,this._intersectionHandler.removeTile(e),this._memCache.put(T(e.handle),e)}destroy(){this._initializationController=i(this._initializationController),this._createRenderableAbortController.abort(),V(this),this._suspendedHandle&&(this._suspendedHandle=s(this._suspendedHandle)),this._intersectionHandler&&(this.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler),this._intersectionHandler=null),this._elevationProvider&&this.view.elevationProvider&&(this._elevationProvider.notifyObjectsChangedFunctional(this._tileHandles.size,e=>{for(const{obb:t}of this._tileHandles.values())if(!e(t))break}),this.view.elevationProvider.unregister(this._elevationProvider),this._elevationProvider=null),this._frameTask.remove(),this._shadows=a(this._shadows),this._depthRenderer=a(this._depthRenderer),this._renderer=a(this._renderer),this._memCache.destroy(),this.data=a(this.data)}_canProjectWithoutEngine(){if(1===this.view.state.viewingMode)return!0;if(w(this.view.renderSpatialReference)||b(this.view.renderSpatialReference))return!0;if(this.layer.esriCrsSpatialReference&&v(this.layer.esriCrsSpatialReference,this.view.renderSpatialReference)){if(115700===this.layer.esriCrsSpatialReference.vcsWkid)return!1;let e=I(this.layer.esriCrsSpatialReference);if(!e){const t=this.layer.esriCrsSpatialReference;let i="meters";!S(t)&&t.wkid&&-1!==t.wkid&&(i=d(C.units[C[t.wkid]])),i&&(e=new g({heightModel:"gravity-related-height",heightUnit:i}))}const t=this.view.heightModelInfo;return this._useEsriCrs=0===y(e,t,!1),this._useEsriCrs&&(e&&(this._metersPerVCSUnit=u(1,e.heightUnit,"meters")),this.fullExtentInLocalViewSpatialReference=this.layer.esriCrsFullExtent),this._useEsriCrs}return!1}_elevationInfoChanged(e){if(e?.offset)if(this._useEsriCrs){const t=H(e?.unit)/this._metersPerVCSUnit,i=e?.offset??0;this._wasm?.setLayerOffset(this,i*t)}else this._wasm?.setLayerOffset(this,x(e));else this._wasm?.setLayerOffset(this,0)}_slicePlaneEnabledChanged(e){this._renderer&&(this._renderer.slicePlaneEnabled=e),this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=e)}updateGaussians(){const e=new Array;for(const t of this._tileHandles.values())0!==t.lifecycleState&&e.push(t);this.data.updateGaussianVisibility(e,this._currentLyr3dVisibilityChange),this.notifyChange("updating")}get maximumGaussianCount(){return this.view.qualitySettings.gaussianSplat.maximumNumberOfGaussians*this.view.quality}set maximumGaussianCount(e){this._set("maximumGaussianCount",e)}_freeInvisibleTiles(){for(const e of this._tileHandles.values())0!==e.lifecycleState||this._renderablesBeingCreated.has(e.handle)||this._deleteTile(e)}extractHeader(e){const t=e.length-4,i=this.reinterpretU32AsFloat(e[t]),s=this.reinterpretU32AsFloat(e[t+1]),a=this.reinterpretU32AsFloat(e[t+2]),r=1/(1<<(255&e[t+3]));return{packedHeader:e.subarray(t,t+4),tileOrigin:{x:i,y:s,z:a},invPosScale:r}}_deleteTile(e){this._renderablesBeingCreated.has(e.handle)||this._wasm?.onRenderableEvicted(this,e.handle,e.usedMemory),this.freeRenderable(e.handle)}reinterpretU32AsFloat(e){return this._u32View[0]=e,this._f32View[0]}get performanceInfo(){let e=0,t=0;this._tileHandles.forEach(i=>{0===i.lifecycleState?t++:e++});const i=this.data?.textureAtlasMemory??0,s=this.data?.headerTextureMemory??0,a=this.data?.orderTextureMemory??0,r=this.data?.fadingTextureMemory??0,n=this.data?.sortBufferMemory??0;return new P(this.usedMemory,e,this._usedTileMemory,t,this._cacheTileMemory,i,s,a,r,n)}get test(){}};e([c()],re.prototype,"layer",void 0),e([c({readOnly:!0})],re.prototype,"_clippingBox",null),e([c()],re.prototype,"elevationOffset",null),e([c({readOnly:!0})],re.prototype,"visibleAtCurrentScale",null),e([c()],re.prototype,"fullExtentInLocalViewSpatialReference",void 0),e([c()],re.prototype,"maximumGaussianCount",null),re=Q=e([p("esri.views.3d.layers.GaussianSplatLayerView3D")],re);const ne=re;export{ne as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{abortMaybe as i,removeMaybe as s,destroyMaybe as a}from"../../../core/maybe.js";import{throwIfAborted as r}from"../../../core/promiseUtils.js";import{watch as n,whenOnce as l,initial as o}from"../../../core/reactiveUtils.js";import{isUint32Array as h}from"../../../core/typedArrayUtil.js";import{unitFromRESTJSON as d,convertUnit as u}from"../../../core/units.js";import{property as c,subclass as p}from"../../../core/accessorSupport/decorators.js";import{fromValues as m}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{getReferenceEllipsoid as f}from"../../../geometry/ellipsoidUtils.js";import g from"../../../geometry/HeightModelInfo.js";import{create as _}from"../../../geometry/support/aaBoundingBox.js";import{isCompatible as y}from"../../../geometry/support/heightModelInfoUtils.js";import{isPlateCarree as w,isWebMercator as b,equals as v,isGeographic as S}from"../../../geometry/support/spatialReferenceUtils.js";import C from"../../../geometry/support/WKIDUnitConversion.js";import{validateEntity3D as M,makeCacheKey as T,getHeightModelInfoFromVCS as I}from"../../../layers/support/tiles3DUtils.js";import{getElevationOffsetInMeters as x}from"../../../support/elevationInfoUtils.js";import{getMetersPerUnit as H}from"../../../symbols/support/unitConversionUtils.js";import{GaussianSplatLayerViewPerformanceInfo as P}from"./GaussianSplatLayerViewPerformanceInfo.js";import{LayerView3D as A}from"./LayerView3D.js";import{addLayerViewToWasm as F,getLyr3DWasm as R,removeLayerViewFromWasm as V}from"./Lyr3DWasm.js";import{LayerElevationProvider as j}from"./i3s/LayerElevationProvider.js";import{ElevationRange as E}from"../support/ElevationRange.js";import{projectToBoundingBox as G}from"../support/extentUtils.js";import{Obb as U}from"../support/orientedBoundingBox.js";import{splatPageSizeInU32 as B,gaussiansPerPage as O,packedGaussianSizeInU32 as D,splatAtlasTextureWidth as z}from"../support/gaussianSplatting/GaussianSplatAtlasPages.js";import{GaussianSplatDataStore as L}from"../support/gaussianSplatting/GaussianSplatDataStore.js";import{GaussianSplatFadeHelper as k}from"../support/gaussianSplatting/GaussianSplatFadeHelper.js";import{GaussianSplatIntersectionHandler as q}from"../support/gaussianSplatting/GaussianSplatIntersectionHandler.js";import{GaussianTile as W}from"../support/gaussianSplatting/GaussianTile.js";import{GaussianSplatDepthRenderer as $}from"../webgl-engine/lib/GaussianSplatDepthRenderer.js";import{GaussianSplatRenderer as N}from"../webgl-engine/lib/GaussianSplatRenderer.js";import{GaussianSplatShadows as X}from"../webgl-engine/lib/GaussianSplatShadows.js";import Z from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as K,isInEffectiveScaleRange as Y}from"../../support/layerViewUtils.js";import{TaskPriority as J}from"../../support/Scheduler.js";var Q;const ee=()=>t.getLogger("esri.views.3d.layers.GaussianSplatLayerView3D"),te=3,ie=te*te,se=255,ae=(()=>{const e=new Int16Array(se+1);e[0]=-255;for(let t=1;t<e.length;t++)e[t]=Math.round(16*Math.log(t/se));return e})();let re=class extends(A(Z)){static{Q=this}static{this.createRenderableBatchSize=64}static{this.uploadBatchPageCount=16}constructor(e){super(e),this.type="gaussian-splat-3d",this.ignoresMemoryFactor=!1,this._tileHandles=new Map,this._pageBuffer=new Uint32Array(B*Q.uploadBatchPageCount),this._tmpTilesWithChangedVisibility=new Array,this._renderablesBeingCreated=new Set,this._currentLyr3dVisibilityChange=0,this._tileFadeInsAwaitingInitialSort=new Map,this._tileFadeOutsAwaitingInitialSort=new Map,this._fadeDurationPerVisibilityChange=new Map,this._tmpSortedTileHandles=new Set,this._createRenderableAbortController=new AbortController,this._initializationController=null,this._wasmLayerId=-1,this._metersPerVCSUnit=1,this._usedTileMemory=0,this._cacheTileMemory=0,this._useEsriCrs=!1,this.fullExtentInLocalViewSpatialReference=null,this._suspendedHandle=null,this._conversionBuffer=new ArrayBuffer(4),this._u32View=new Uint32Array(this._conversionBuffer),this._f32View=new Float32Array(this._conversionBuffer);const t=e.view.resourceController;this._memCache=t.memoryController.newCache(`GaussianSplat-${this.uid}`,e=>this._deleteTile(e)),this._frameTask=t.scheduler.registerTask(J.GAUSSIAN_SPLAT_TEXTURE_ATLAS)}get _clippingBox(){if(!this.view?.clippingArea)return null;const e=_();return G(this.view.clippingArea,e,this.view.renderSpatialReference)?e:null}get clippingBox(){return this._renderer?.clippingBox??null}initialize(){const{view:e}=this;this.addHandles([n(()=>e.qualitySettings.fadeDuration,e=>{this.data&&(this.fadeHelper.onFadeDurationChanged(e),this.updateFadingTexture())})]),this.addResolvingPromise(this._initializeAsync(e))}async _initializeAsync(e){this._initializationController=new AbortController;const{signal:t}=this._initializationController;if(await l(()=>e?.defaultsFromMap.heightModelInfoReady,t),r(t),!this._canProjectWithoutEngine())throw K("layer",this.layer.spatialReference.wkid,e.renderSpatialReference?.wkid);this._wasmLayerId=await F(this,t),r(t),this._renderer=new N({view:e,layerView:this}),this.data=new L(this._renderer,(e,t)=>this._onSortComplete(e,t),()=>this._freeInvisibleTiles()),this._shadows=new X({view:e,layerView:this}),this.fadeHelper=new k(this),this._depthRenderer=new $({view:e,layerView:this});const i=new q(this);this._intersectionHandler=i,e.sceneIntersectionHelper.addIntersectionHandler(i),this._elevationProvider=new j({view:e,layerElevationSource:this,intersectionHandler:i}),e.elevationProvider.register(2,this._elevationProvider),this.addHandles([n(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e)),n(()=>this.slicePlaneEnabled,e=>this._slicePlaneEnabledChanged(e),o)]),this._suspendedHandle=n(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),o),this.addHandles([n(()=>this._clippingBox,e=>{this._renderer&&(this._renderer.clippingBox=e)},o),n(()=>this.maximumGaussianCount,e=>this._wasm?.setMaximumGaussianSplatCount(Math.min(e,this.data.textureAtlas.maximumSupportedVisibleGaussians)),o)]),this._initializationController=null}get wasmLayerId(){return this._wasmLayerId}get metersPerVCSUnit(){return this._metersPerVCSUnit}get tileHandles(){return this._tileHandles}updateFadingTexture(){this.data.fadingTexture.updateTexture(this.data.textureAtlas.pageAllocator.pageCount)}get _wasm(){return R(this.view)}get usedMemory(){return this._usedTileMemory+(this.data?.usedMemory??0)}get cachedMemory(){return this._cacheTileMemory}get unloadedMemory(){return 0}get useEsriCrs(){return this._useEsriCrs}get elevationProvider(){return this._elevationProvider}get elevationOffset(){return x(this.layer.elevationInfo)}get elevationRange(){const e=this.fullExtent;return e?.zmin&&e?.zmax?new E(e.zmin,e.zmax):null}getElevationRange(e){return this._intersectionHandler.getElevationRange(e)}get fullExtent(){return this.layer.fullExtent}get visibleAtCurrentScale(){return Y(this.layer.effectiveScaleRange,this.view.scale)}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&(e.isUpdating(this._wasmLayerId)||this.data.updating||this.fadeHelper.updating)}updatingFlagChanged(){this.notifyChange("updating")}async createRenderable(e){if(this.destroyed||this.destroying)throw new Error("IntegratedMesh3DTilesLayerView3D: createRenderable called after destroy");const{entity3d:t}=e;if(!M(t))throw new Error("entity3D not valid");const i=t.desc.geometry.prims[t.validPrimitiveIndices[0]].atrbs[0],s=t.assets[i.assetId];if(!s)throw new Error("entity3D not valid");const a=s.count;if(0===a)return ee().warnOnce("encountered tile with zero Gaussians"),()=>({memUsageBytes:0,numGaussians:0});let r=null;if("U32"!==s.dataType||!h(s.data))throw new Error("unexpected GaussianSplat Entity3D asset.data format");r=s.data;const n=this.extractHeader(r),l=2.048,o=n.tileOrigin.x*l,d=n.tileOrigin.y*l,u=n.tileOrigin.z*l,c=t.desc,p=c.obb.quaternion,g=new U(c.obb.center,c.obb.halfSize,m(...p)),_=this.view.state.isGlobal,y=_?f(this.view.spatialReference).radius:0,w={handle:e.handle,bufferView:r,totalGaussians:a,packedHeader:n.packedHeader,tileOrigin:{x:o,y:d,z:u},invPosScale:n.invPosScale,obb:g,origin:{x:g.centerX,y:g.centerY,z:g.centerZ},isGlobal:_,ellipsoidRadius:y};let b;this._renderablesBeingCreated.add(e.handle);try{b=await this._frameTask.scheduleGenerator(e=>this._createRenderableTask(w,e),this._createRenderableAbortController.signal)}catch(v){throw this._renderablesBeingCreated.delete(e.handle),v}return this._renderablesBeingCreated.delete(e.handle),()=>b}*_createRenderableTask(e,t){const{handle:i,bufferView:s,totalGaussians:a,packedHeader:r,tileOrigin:n,invPosScale:l,obb:o,origin:h,isGlobal:d,ellipsoidRadius:u}=e,c=n.x,p=n.y,m=n.z,f=h.x,g=h.y,_=h.z,y=new Float32Array(3*a),w=new Uint32Array(a),b=new Uint32Array(a),v=new Array,S=Math.ceil(a/O);let C=1/0,M=-1/0,T=1/0,I=-1/0,x=0,H=-1,P=0,A=0;for(let E=0;E<a;E++){const e=E*D,i=s[e],a=s[e+1],r=s[e+2],n=s[e+3],o=16383&a,h=a>>>14&16383,u=a>>>28&15|(1023&r)<<4,v=n>>>24,S=ae[v],F=(r>>>10&255)+S,R=(r>>>18&255)+S,V=(r>>>26&63|(3&n)<<6)+S,j=F>0?F:0,G=R>0?R:0,U=V>0?V:0,B=j|G<<8|U<<16,O=Math.max(j,G,U),z=o*l+c,L=h*l+p,k=u*l+m;if(y[x]=z-f,y[x+1]=L-g,y[x+2]=k-_,d){const e=z*z+L*L+k*k;T=Math.min(T,e),I=Math.max(I,e)}else C=Math.min(C,k),M=Math.max(M,k);w[E]=i,b[E]=B,O>H&&(H=O),v>P&&(P=v),x+=3,A++,A===Q.createRenderableBatchSize&&(A=0,t.madeProgress()&&(t=yield))}A>0&&t.madeProgress()&&(t=yield),d&&(C=Math.sqrt(T)-u,M=Math.sqrt(I)-u);const F=this._extractGaussianSplatMbsRadiusSquared(H),{fullExtent:R}=this.layer;R?.hasZ&&R.zmax&&R.zmin&&(C=Math.max(C,R.zmin),M=Math.min(M,R.zmax));const V=new E(C,M),j=this.data.textureAtlas,G=this.data.headerTexture;try{for(let e=0;e<S;e+=Q.uploadBatchPageCount){const i=Math.min(S,e+Q.uploadBatchPageCount);for(let t=e;t<i;t++){let e=j.allocatePage();if(null===e&&(this._freeInvisibleTiles(),e=j.allocatePage()),null===e)throw new Error("ran out of gaussian splat memory");v.push(e)}for(let t=e;t<i;){const e=v[t];let n=t+1;for(;n<i&&v[n]===v[n-1]+1;)n++;const l=n-t,o=a-t*O,h=Math.min(o,l*O),d=t*B,u=h*D;this._pageBuffer.set(s.subarray(d,d+u));const c=e*O,p=c%z,m=Math.floor(c/z);j.update(p,m,this._pageBuffer,l),G.update(e,r,l),t=n}t.madeProgress()&&(t=yield)}}catch(L){throw j.freePages(v),L}const U=new W(i,o,v,y,w,b,a,F,P/se,V);return this._tileHandles.set(i,U),this._cacheTileMemory+=U.usedMemory,this._memCache.put(`${U.handle}`,U),{memUsageBytes:U.usedMemory,numGaussians:a}}_extractGaussianSplatMbsRadiusSquared(e){return Math.exp(e/8-20)*ie}freeRenderable(e){this._tileFadeInsAwaitingInitialSort.delete(e),this._tileFadeOutsAwaitingInitialSort.delete(e);const t=this.data?.textureAtlas;let i=!1;const s=this._tileHandles.get(e);if(s){0!==s.lifecycleState?(i=!0,this.fadeHelper.onTileDiscarded(s),this._usedTileMemory-=s.usedMemory,this._intersectionHandler.removeTile(s)):this._cacheTileMemory-=s.usedMemory,t&&s.pageIds.forEach(e=>t.freePage(e)),this.freeObject(s),this._tileHandles.delete(e)}i&&this.updateGaussians()}freeObject(e){this._memCache.pop(`${e.handle}`)}notifyTileObbsChanged(e){this._elevationProvider&&this._elevationProvider.notifyObjectsChangedFunctional(e.length,t=>{for(const{obb:i}of e)if(!t(i))break})}setRenderableVisibility(e,t,i){const s=this._currentLyr3dVisibilityChange+1,a=this.fadeHelper.updateFadeDuration();this._fadeDurationPerVisibilityChange.set(s,a);let r=!1;for(let n=0;n<i;n++){const i=this._tileHandles.get(e[n]);if(!i)continue;const l=t[n]?this._prepareTileFadeIn(i,s,a):this._prepareTileFadeOut(i,s);r||=l}r?(this._currentLyr3dVisibilityChange=s,this.updateGaussians()):this._fadeDurationPerVisibilityChange.delete(s)}_prepareTileFadeIn(e,t,i){const s=this._tileFadeOutsAwaitingInitialSort.delete(e.handle);return 2===e.lifecycleState?(this.fadeHelper.fadeTile(e,0,i),!1):this._tileFadeInsAwaitingInitialSort.get(e.handle)!==t?(0===e.lifecycleState&&this._popTileFromCache(e),e.lifecycleState=1,this._tileFadeInsAwaitingInitialSort.set(e.handle,t),!0):s}_prepareTileFadeOut(e,t){const i=this._tileFadeInsAwaitingInitialSort.delete(e.handle);return i&&1===e.lifecycleState&&(this.moveTileToCache(e),e.lifecycleState=0),2!==e.lifecycleState?i:this._tileFadeOutsAwaitingInitialSort.get(e.handle)!==t?(this._tileFadeOutsAwaitingInitialSort.set(e.handle,t),!0):i}_onSortComplete(e,t){const i=this._tmpTilesWithChangedVisibility;i.length=0;const s=this._tmpSortedTileHandles;s.clear();for(let r=0;r<e.length;r++){const t=e[r];s.add(t.handle)}this._triggerFadeIns(t,s,i);const a=this._triggerFadeOuts(t,i);s.clear(),i.length>0&&this.notifyTileObbsChanged(i),a&&this.updateGaussians(),this._cleanupVisibilityChangeFadeDurations(t)}_triggerFadeIns(e,t,i){for(const[s,a]of this._tileFadeInsAwaitingInitialSort){if(a>e||!t.has(s))continue;const r=this._tileHandles.get(s);if(!r){this._tileFadeInsAwaitingInitialSort.delete(s);continue}const n=this._getFadeDurationForPendingVisibilityChange(a),l=0===r.lifecycleState;2!==r.lifecycleState&&(r.lifecycleState=2,l&&this._popTileFromCache(r),i.push(r)),this.fadeHelper.fadeTile(r,0,n),this._tileFadeInsAwaitingInitialSort.delete(s)}}_triggerFadeOuts(e,t){let i=!1;for(const[s,a]of this._tileFadeOutsAwaitingInitialSort){if(a>e)continue;const r=this._tileHandles.get(s);if(r){const e=2===r.lifecycleState,s=this._getFadeDurationForPendingVisibilityChange(a);this.fadeHelper.fadeTile(r,1,s),e&&0===r.lifecycleState&&(t.push(r),i=!0)}this._tileFadeOutsAwaitingInitialSort.delete(s)}return i}_getFadeDurationForPendingVisibilityChange(e){return this._fadeDurationPerVisibilityChange.get(e)??this.fadeHelper.baseFadeDuration}_cleanupVisibilityChangeFadeDurations(e){if(0!==this._fadeDurationPerVisibilityChange.size)for(const t of this._fadeDurationPerVisibilityChange.keys())t<=e&&this._fadeDurationPerVisibilityChange.delete(t)}_popTileFromCache(e){this._usedTileMemory+=e.usedMemory,this._cacheTileMemory-=e.usedMemory,this._intersectionHandler.addTile(e),this._memCache.pop(T(e.handle))}moveTileToCache(e){this._usedTileMemory-=e.usedMemory,this._cacheTileMemory+=e.usedMemory,this._intersectionHandler.removeTile(e),this._memCache.put(T(e.handle),e)}destroy(){this._initializationController=i(this._initializationController),this._createRenderableAbortController.abort(),V(this),this._suspendedHandle&&(this._suspendedHandle=s(this._suspendedHandle)),this._intersectionHandler&&(this.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler),this._intersectionHandler=null),this._elevationProvider&&this.view.elevationProvider&&(this._elevationProvider.notifyObjectsChangedFunctional(this._tileHandles.size,e=>{for(const{obb:t}of this._tileHandles.values())if(!e(t))break}),this.view.elevationProvider.unregister(this._elevationProvider),this._elevationProvider=null),this._frameTask.remove(),this._shadows=a(this._shadows),this._depthRenderer=a(this._depthRenderer),this._renderer=a(this._renderer),this._memCache.destroy(),this.data=a(this.data)}_canProjectWithoutEngine(){if(1===this.view.state.viewingMode)return!0;if(w(this.view.renderSpatialReference)||b(this.view.renderSpatialReference))return!0;if(this.layer.esriCrsSpatialReference&&v(this.layer.esriCrsSpatialReference,this.view.renderSpatialReference)){if(115700===this.layer.esriCrsSpatialReference.vcsWkid)return!1;let e=I(this.layer.esriCrsSpatialReference);if(!e){const t=this.layer.esriCrsSpatialReference;let i="meters";!S(t)&&t.wkid&&-1!==t.wkid&&(i=d(C.units[C[t.wkid]])),i&&(e=new g({heightModel:"gravity-related-height",heightUnit:i}))}const t=this.view.heightModelInfo;return this._useEsriCrs=0===y(e,t,!1),this._useEsriCrs&&(e&&(this._metersPerVCSUnit=u(1,e.heightUnit,"meters")),this.fullExtentInLocalViewSpatialReference=this.layer.esriCrsFullExtent),this._useEsriCrs}return!1}_elevationInfoChanged(e){if(e?.offset)if(this._useEsriCrs){const t=H(e?.unit)/this._metersPerVCSUnit,i=e?.offset??0;this._wasm?.setLayerOffset(this,i*t)}else this._wasm?.setLayerOffset(this,x(e));else this._wasm?.setLayerOffset(this,0)}_slicePlaneEnabledChanged(e){this._renderer&&(this._renderer.slicePlaneEnabled=e),this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=e)}updateGaussians(){const e=new Array;for(const t of this._tileHandles.values())0!==t.lifecycleState&&e.push(t);this.data.updateGaussianVisibility(e,this._currentLyr3dVisibilityChange),this.notifyChange("updating")}get maximumGaussianCount(){return this.view.qualitySettings.gaussianSplat.maximumNumberOfGaussians*this.view.quality}set maximumGaussianCount(e){this._set("maximumGaussianCount",e)}_freeInvisibleTiles(){for(const e of this._tileHandles.values())0!==e.lifecycleState||this._renderablesBeingCreated.has(e.handle)||this._deleteTile(e)}extractHeader(e){const t=e.length-4,i=this.reinterpretU32AsFloat(e[t]),s=this.reinterpretU32AsFloat(e[t+1]),a=this.reinterpretU32AsFloat(e[t+2]),r=1/(1<<(255&e[t+3]));return{packedHeader:e.subarray(t,t+4),tileOrigin:{x:i,y:s,z:a},invPosScale:r}}_deleteTile(e){this._renderablesBeingCreated.has(e.handle)||this._wasm?.onRenderableEvicted(this,e.handle,e.usedMemory),this.freeRenderable(e.handle)}reinterpretU32AsFloat(e){return this._u32View[0]=e,this._f32View[0]}get performanceInfo(){let e=0,t=0;this._tileHandles.forEach(i=>{0===i.lifecycleState?t++:e++});const i=this.data?.textureAtlasMemory??0,s=this.data?.headerTextureMemory??0,a=this.data?.orderTextureMemory??0,r=this.data?.fadingTextureMemory??0,n=this.data?.sortBufferMemory??0;return new P(this.usedMemory,e,this._usedTileMemory,t,this._cacheTileMemory,i,s,a,r,n)}get test(){}};e([c()],re.prototype,"layer",void 0),e([c({readOnly:!0})],re.prototype,"_clippingBox",null),e([c()],re.prototype,"elevationOffset",null),e([c({readOnly:!0})],re.prototype,"visibleAtCurrentScale",null),e([c()],re.prototype,"fullExtentInLocalViewSpatialReference",void 0),e([c()],re.prototype,"maximumGaussianCount",null),re=Q=e([p("esri.views.3d.layers.GaussianSplatLayerView3D")],re);const ne=re;export{ne as default};
|