@arcgis/core 4.28.0-next.20230821 → 4.28.0-next.20230823
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/Basemap.js +1 -1
- package/WebScene.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/portalUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0746319459dbcd3ab6f7.js +1 -0
- package/assets/esri/core/workers/chunks/{587437526ea77f764986.js → 0759d4ab9695096d2bbd.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0c4367a197b193e95d4.js → 10c014a6d8767ae8a666.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ffabd1a90c5b08109aa.js → 196937631ac20795e0ae.js} +1 -1
- package/assets/esri/core/workers/chunks/{e05b54a0b834b4e4268e.js → 1c2b69dfcd0db58150e2.js} +1 -1
- package/assets/esri/core/workers/chunks/1c2f7c95825fdac790be.js +1 -0
- package/assets/esri/core/workers/chunks/1f9c80815f90fd0886d7.js +1 -0
- package/assets/esri/core/workers/chunks/217910f88fe2c03e6bdd.js +1 -0
- package/assets/esri/core/workers/chunks/238966b2fc6cc3dfcc05.js +1 -0
- package/assets/esri/core/workers/chunks/2c9f709d64954b3c1650.js +1 -0
- package/assets/esri/core/workers/chunks/35faede04d4539aab6e8.js +1 -0
- package/assets/esri/core/workers/chunks/3e3edcbacf8eaf275b97.js +1 -0
- package/assets/esri/core/workers/chunks/{b78dc6cbe14e5817b4d9.js → 4968018bc693c053fdd2.js} +1 -1
- package/assets/esri/core/workers/chunks/{c35b850fbfcb28133235.js → 49a1ba3e7ea204adeddb.js} +1 -1
- package/assets/esri/core/workers/chunks/{12b8fe0374fa9ab4ca09.js → 49cf3ae224f56f45f65b.js} +1 -1
- package/assets/esri/core/workers/chunks/5330040eeacc9c03fbdb.js +1 -0
- package/assets/esri/core/workers/chunks/54aaa21144431b29b6ed.js +1 -0
- package/assets/esri/core/workers/chunks/{6c40f16e6d10321295d8.js → 5b13d28cf5efc312a21c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d6c96a20e9640b433719.js → 67c6618339d323460d45.js} +57 -57
- package/assets/esri/core/workers/chunks/{dd86f43505b636eb41c0.js → 7714c16f9c8860efd461.js} +1 -1
- package/assets/esri/core/workers/chunks/{752d389c7bdcbe7004dc.js → 83e0af5522a672c2c73b.js} +1 -1
- package/assets/esri/core/workers/chunks/{873111ddf4813cdd4903.js → 872d0d4bf364be43a92e.js} +1 -1
- package/assets/esri/core/workers/chunks/8a784ddd5607f1ddbb5b.js +1 -0
- package/assets/esri/core/workers/chunks/{0cad2b991d0d0fd07846.js → 8c9c4162617f31e3f5f2.js} +1 -1
- package/assets/esri/core/workers/chunks/8db3ee2931be5cca3f5e.js +1 -0
- package/assets/esri/core/workers/chunks/{fd3920159ab9748402a2.js → 92350664e2719a9e860e.js} +1 -1
- package/assets/esri/core/workers/chunks/{ff755962fd1c771f5be5.js → a3b461174984a1cb92b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd4c6d000222798a0317.js → a47aff9c97c5ce52d0dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{028534e3d4e13c9ea687.js → a645f08a7678f2ca037c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d9fe6cfbc9ad2920ca9c.js → aca45e54ec925002df9a.js} +1 -1
- package/assets/esri/core/workers/chunks/{40ff0e7c948615b8bfc0.js → b07d32a60307d04391fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdc703330bf194a48e0e.js → b086e798f43dacb0175f.js} +1 -1
- package/assets/esri/core/workers/chunks/bd0b9647880cbbec95e2.js +1 -0
- package/assets/esri/core/workers/chunks/{ab420bacdd63ee8fbd8b.js → bf9b5e2803a5444bd944.js} +1 -1
- package/assets/esri/core/workers/chunks/{c58ca2685eb7e559f428.js → c0a2a737a3085690afc5.js} +1 -1
- package/assets/esri/core/workers/chunks/{e04e8af4224fff8c3ec3.js → c34615c0b7ad83d1ad24.js} +1 -1
- package/assets/esri/core/workers/chunks/{05ab09713d599687afa3.js → d105ee2e394e2c48303c.js} +1 -1
- package/assets/esri/core/workers/chunks/{ef03b78659c72de93076.js → d183144fa504064d23d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f5207abb034375927c7.js → d8495c6dcd4d9bec8dd6.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a485d63330f5e7fe4e3.js → dba61fa8cbb57dde54b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a306e3aa210861b8c17.js → deb0bd575c63d9dbcde5.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0a2f9ca338b60f2ba2a.js → e302fe771d92ccf945a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb0a5bc6deaa98026bb5.js → ed0dea88b2865fc6e06b.js} +1 -1
- package/assets/esri/core/workers/chunks/ed733eea5d065131b159.js +1 -0
- package/assets/esri/core/workers/chunks/{1c51c52fb2233153d7ae.js → f3ec53ee9567bb7e4d2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{4922a0fed7cbc6895882.js → f701a5afa1b730c51a49.js} +1 -1
- package/assets/esri/t9n/common.json +1 -1
- package/assets/esri/t9n/common_ar.json +1 -1
- package/assets/esri/t9n/common_bg.json +1 -1
- package/assets/esri/t9n/common_ca.json +1 -1
- package/assets/esri/t9n/common_cs.json +1 -1
- package/assets/esri/t9n/common_da.json +1 -1
- package/assets/esri/t9n/common_de.json +1 -1
- package/assets/esri/t9n/common_el.json +1 -1
- package/assets/esri/t9n/common_en.json +1 -1
- package/assets/esri/t9n/common_es.json +1 -1
- package/assets/esri/t9n/common_et.json +1 -1
- package/assets/esri/t9n/common_fi.json +1 -1
- package/assets/esri/t9n/common_fr.json +1 -1
- package/assets/esri/t9n/common_he.json +1 -1
- package/assets/esri/t9n/common_hr.json +1 -1
- package/assets/esri/t9n/common_hu.json +1 -1
- package/assets/esri/t9n/common_id.json +1 -1
- package/assets/esri/t9n/common_it.json +1 -1
- package/assets/esri/t9n/common_ja.json +1 -1
- package/assets/esri/t9n/common_ko.json +1 -1
- package/assets/esri/t9n/common_lt.json +1 -1
- package/assets/esri/t9n/common_lv.json +1 -1
- package/assets/esri/t9n/common_nb.json +1 -1
- package/assets/esri/t9n/common_nl.json +1 -1
- package/assets/esri/t9n/common_pl.json +1 -1
- package/assets/esri/t9n/common_pt-BR.json +1 -1
- package/assets/esri/t9n/common_pt-PT.json +1 -1
- package/assets/esri/t9n/common_ro.json +1 -1
- package/assets/esri/t9n/common_ru.json +1 -1
- package/assets/esri/t9n/common_sk.json +1 -1
- package/assets/esri/t9n/common_sl.json +1 -1
- package/assets/esri/t9n/common_sr.json +1 -1
- package/assets/esri/t9n/common_sv.json +1 -1
- package/assets/esri/t9n/common_th.json +1 -1
- package/assets/esri/t9n/common_tr.json +1 -1
- package/assets/esri/t9n/common_uk.json +1 -1
- package/assets/esri/t9n/common_vi.json +1 -1
- package/assets/esri/t9n/common_zh-CN.json +1 -1
- package/assets/esri/t9n/common_zh-TW.json +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +10 -17
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ar.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bg.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bs.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ca.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_cs.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_da.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_de.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_el.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_es.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_et.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fi.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fr.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_he.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hr.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hu.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_id.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_it.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ja.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ko.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lt.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lv.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nb.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nl.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pl.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-BR.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-PT.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ro.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ru.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sk.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sl.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sr.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sv.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_th.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_tr.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_uk.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_vi.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-CN.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-HK.json +1 -0
- package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-TW.json +1 -0
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
- package/chunks/ChapmanAtmosphere.glsl.js +1 -1
- package/chunks/Clouds.glsl.js +1 -1
- package/chunks/CloudsComposition.glsl.js +2 -2
- package/chunks/ComponentShader.glsl.js +36 -36
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/LaserlinePath.glsl.js +1 -1
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/NativeLine.glsl.js +8 -20
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/Precipitation.glsl.js +2 -2
- package/chunks/SSAOBlur.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/chunks/ShadowHighlight.glsl.js +1 -1
- package/chunks/Stars.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +35 -35
- package/chunks/TextureOnly.glsl.js +1 -1
- package/chunks/Theme.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsPlanar.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/chartUtilsAm5.js +1 -1
- package/chunks/mat3.js +1 -1
- package/chunks/mat3f64.js +1 -1
- package/chunks/mat4.js +1 -1
- package/chunks/mat4f64.js +1 -1
- package/chunks/quat.js +1 -1
- package/chunks/quat2.js +1 -1
- package/chunks/quatf64.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/terrainUtilsPlanar.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vec3f64.js +1 -1
- package/chunks/vec4.js +1 -1
- package/chunks/vec4f64.js +1 -1
- package/core/VectorStack.js +1 -1
- package/core/accessorSupport/decorators/persistable.js +1 -1
- package/core/accessorSupport/testSupport.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat3f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat4f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec3f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
- package/core/libs/gl-matrix-2/math/mat3.js +1 -1
- package/core/libs/gl-matrix-2/math/mat4.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/core/mathUtils.js +1 -1
- package/core/perspectiveUtils.js +1 -1
- package/form/elements/inputs/DatePickerInput.d.ts +4 -0
- package/form/elements/inputs/DatePickerInput.js +5 -0
- package/form/elements/inputs/DateTimeOffsetPickerInput.d.ts +4 -0
- package/form/elements/inputs/DateTimeOffsetPickerInput.js +5 -0
- package/form/elements/inputs/TimePickerInput.d.ts +4 -0
- package/form/elements/inputs/TimePickerInput.js +5 -0
- package/form/elements/support/inputs.js +1 -1
- package/geometry/projection/computeTranslationToOriginAndRotation.js +1 -1
- package/geometry/projection/projectDirection.js +1 -1
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/axisAngle.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/clipRay.js +1 -1
- package/geometry/support/coordinateSystem.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/lineSegment.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/offset.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/geometry/support/meshUtils/projection.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/ray.js +1 -1
- package/geometry/support/triangle.js +1 -1
- package/geometry/support/vector.js +1 -1
- package/interfaces.d.ts +405 -7
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/SceneFilter.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/layers/voxel/voxelPlaneUtils.js +1 -1
- package/package.json +1 -1
- package/portal/support/resourceExtension.js +1 -1
- package/portal/support/resourceUtils.js +1 -1
- package/portal/support/utils.js +5 -0
- package/smartMapping/popup/support/utils.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMImageColorSubstitutionHelper.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/views/2d/ViewState.js +1 -1
- package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
- package/views/2d/engine/imagery/RasterVFTile.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayContainer.js +1 -1
- package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
- package/views/2d/engine/webgl/WGLTile.js +1 -1
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/RotateManipulation.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/2d/navigation/actions/Pan.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/images/Factory.js +5 -0
- package/views/3d/analysis/support/measurementUtils.js +1 -1
- package/views/3d/analysis/support/viewUtils.js +1 -1
- package/views/3d/animation/pointToPoint/Animation.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/altitude.js +1 -1
- package/views/3d/camera/constraintUtils/common.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/LocalAtmosphere.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/environment/StarsTechnique.js +1 -1
- package/views/3d/externalRenderers.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/lineGraphicVisualElementUtils.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/support/Segment.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelParameters.js +1 -1
- package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
- package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SProjectionUtil.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LoDUtil.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/I3STreeDebugger.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/edgeUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/layers/support/uvUtils.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomController.js +1 -1
- package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/PanPlanarMomentumController.js +1 -1
- package/views/3d/state/controllers/momentum/PanSphericalMomentumController.js +1 -1
- package/views/3d/state/controllers/momentum/RotationMomentumController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/state/utils/viewUtils.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/LaserlinePathData.js +1 -1
- package/views/3d/support/RenderCoordsHelper.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/support/TextureCollection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/cameraUtilsInternal.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/geometryUtils/ray.js +1 -1
- package/views/3d/support/intersectionUtils.js +1 -1
- package/views/3d/support/mathUtils.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayContent.js +5 -0
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TextureReference.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileOverlayData.js +1 -1
- package/views/3d/terrain/TileRenderInfo.js +1 -1
- package/views/3d/terrain/interfaces.js +1 -1
- package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +32 -53
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/CascadeCamera.js +1 -1
- package/views/3d/webgl-engine/lib/ContentObject.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/ITexture.js +5 -0
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
- package/views/3d/webgl-engine/lib/LocalOriginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/Path.js +1 -1
- package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineDrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
- package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/DrawManipulator.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/draw/support/surfaceCoordinateSystems.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/ManipulatorCollection.js +1 -1
- package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/sketch/normalizedPoint.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
- package/views/interactive/support/viewUtils.js +1 -1
- package/views/interactive/tooltip/constraintUtils.js +1 -1
- package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/navigation/gamepadAndKeyboardUtils.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/views/support/layerViewUtils.js +1 -1
- package/webdoc/support/saveUtils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
- package/widgets/ElevationProfile/support/constants.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.d.ts +4 -0
- package/widgets/smartMapping/BinaryColorSizeSlider.d.ts +4 -0
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/templateUtils.js +5 -0
- package/assets/esri/core/workers/chunks/19857e5420cdf23c5f2e.js +0 -1
- package/assets/esri/core/workers/chunks/26289742b9280f0b5247.js +0 -1
- package/assets/esri/core/workers/chunks/46f6b77e586d78aeb75c.js +0 -1
- package/assets/esri/core/workers/chunks/4e39252f40bc57be9d12.js +0 -1
- package/assets/esri/core/workers/chunks/54513578f735d274a20e.js +0 -1
- package/assets/esri/core/workers/chunks/8dab0acdbbd5c282645a.js +0 -1
- package/assets/esri/core/workers/chunks/8e4b01a0cb8c8926f2b6.js +0 -1
- package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +0 -1
- package/assets/esri/core/workers/chunks/b2d4a56197dcabdbae35.js +0 -1
- package/assets/esri/core/workers/chunks/be0565d923afba7ca300.js +0 -1
- package/assets/esri/core/workers/chunks/c99fa4189a114370b004.js +0 -1
- package/assets/esri/core/workers/chunks/daa79c14150c12d8bc3d.js +0 -1
- package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +0 -1
- package/assets/esri/core/workers/chunks/f67388c4b7103fda6633.js +0 -1
- package/views/3d/analysis/Slice/images/Factory.js +0 -5
- /package/assets/esri/views/3d/analysis/{Slice/images → images}/heading-rotate.ts.svg +0 -0
- /package/assets/esri/views/3d/analysis/{Slice/images → images}/tilt-rotate.ts.svg +0 -0
- /package/views/3d/analysis/{Slice/images → images}/generateTextures.js +0 -0
- /package/views/3d/analysis/{Slice/images → images}/heading-rotate-svg.js +0 -0
- /package/views/3d/analysis/{Slice/images → images}/tilt-rotate-svg.js +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Error.js";import{isPromiseLike as t}from"../../../../core/promiseUtils.js";import{pt2px as n}from"../../../../core/screenUtils.js";import{f as r,Z as s,a as i}from"../../../../chunks/vec2f64.js";import{hasCalloutSupport as
|
|
5
|
+
import e from"../../../../core/Error.js";import{isPromiseLike as t}from"../../../../core/promiseUtils.js";import{pt2px as n}from"../../../../core/screenUtils.js";import{f as r,Z as s,a as i}from"../../../../chunks/vec2f64.js";import{hasCalloutSupport as o,textSymbolLayerSupportsVerticalOffset as l}from"../../../../symbols/callouts/calloutUtils.js";import{perObjectElevationAligner as a}from"./ElevationAligners.js";import{SymbolUpdateType as c,needsElevationUpdates2D as m}from"./elevationAlignmentUtils.js";import{ElevationContext as h}from"./ElevationContext.js";import{Graphics3DObject3DGraphicLayer as p}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DObjectMetadata as u}from"./Graphics3DObjectMetadata.js";import{Graphics3DSymbolLayer as f}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as d}from"./graphicUtils.js";import{LabelPlacement as g,LabelParameters as y}from"./LabelParameters.js";import{verticalScreenOffsetFromAlignment as x,verticalPlacementFromAlignment as v,textRenderAlignmentFromHorizontalPlacement as b,horizontalPlacementToAnchorX as P,anchorFromPlacements as O,namedAnchorToHUDMaterialAnchorPos as w}from"./placementUtils.js";import{placePointOnGeometry as j,createStageObject as S,extendPointGraphicElevationContext as E}from"./pointUtils.js";import{getFontMetrics as _}from"../../webgl-engine/lib/FontMetrics.js";import{createPointGeometry as L}from"../../webgl-engine/lib/GeometryUtil.js";import{TextRenderParameters as z}from"../../webgl-engine/lib/TextRenderParameters.js";import C from"../../webgl-engine/lib/TextTextureFactory.js";import{HUDMaterial as G}from"../../webgl-engine/materials/HUDMaterial.js";const U=[0,0,1];class R extends f{constructor(e,t,n,r){super(e,t,n,r),this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!1},this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const t=d(this.symbolLayer.size);if(t)throw new e("graphics3dtextsymbollayer:invalid-size",t)}await this._createTextRenderParameters()}async _createTextRenderParameters(){const e=this._context.graphicsCoreOwner.view.state.rasterPixelRatio;this._textRenderParameters=await z.fromSymbol(this.symbolLayer,e)}destroy(){super.destroy()}createGraphics3DGraphic(e){const t=e.graphic,n=j(t.geometry);if(null==n)return this.logger.warn(`unsupported geometry type for text symbol: ${t.geometry.type}`),null;const r=this.symbolLayer.text;if(null==r||""===r)return null;const s=o(this.symbol)&&this.symbol.hasVisibleVerticalOffset()?this.symbol.verticalOffset:null;if(null!=s&&!l(this.symbolLayer))return this.logger.errorOncePerTick(`Callouts and vertical offset on text symbols are currently only supported with 'center' horizontal alignment (not with '${this.symbolLayer.horizontalAlignment}' alignment)`),null;const{verticalAlignment:i}=this.symbolLayer,a=new g(s);x(i,a.screenOffset);const c=new y(a,this.symbolLayer.horizontalAlignment,v(i));return this._createAs3DShape(t,n,r,c)}createLabel(e,t,n,r,s){const i=e.graphic,o=j(i.geometry);if(null==o)return this.logger.warn(`unsupported geometry type for label: ${i.geometry.type}`),null;const l=t.text;return!l||/^\s+$/.test(l)?null:this._createAs3DShape(i,o,l,t,n,r,s)}setGraphicElevationContext(e,t,n=0){return super.setGraphicElevationContext(e,t),t.addOffsetRenderUnits(n),t}layerOpacityChanged(){return this.logger.warn("layer opacity change not yet implemented in Graphics3DTextSymbolLayer"),!1}layerElevationInfoChanged(e,t){return D(e,t,((e,t)=>{this.updateGraphicElevationContext(t,e)})),c.UPDATE}slicePlaneEnabledChanged(e,t){return D(e,t,(e=>{for(const t of e.stageObject.geometries)t.material.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})})),!0}physicalBasedRenderingChanged(){return!0}get pixelRatioChanged(){return!1}updateGraphicElevationContext(e,t){const n=t.elevationContext;this.setGraphicElevationContext(e,n,null!=t.metadata?t.metadata.elevationOffset:0),t.needsElevationUpdates=m(n.mode)||"absolute-height"===n.mode}_defaultElevationInfoNoZ(){return T}_createAs3DShape(e,o,l,c,f=null,d=null,g=(()=>c.placement.elevationOffset)){const y=this.setGraphicElevationContext(e,new h,c.placement.elevationOffset),x="polyline"===e.geometry?.type,v=e.uid;let P=null,O=null;if(null==d){const e=b(c.horizontalPlacement);P=new C(l,e,this._textRenderParameters);let n=null;if(null!=this._context.sharedResources.textures){O=this._context.sharedResources.textures.fromData(P.key,(()=>P.create())),O.texture.events.on("unloaded",(()=>n?.release()));const e=this._context.stage.renderView.textureRepository.acquire(O.texture.id);if(null==e||t(e))return O.release(),null;n=e}}const w=A(P,c),j={occlusionTest:!0,screenOffset:c.placement.screenOffset,anchorPosition:w,polygonOffset:!0,color:[1,1,1,1],centerOffsetUnits:c.placement.centerOffsetUnits,drawInSecondSlot:!0};if(d?j.textureId=d.id:O&&(j.textureId=O.texture.id),null!=c.placement.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=c.placement.verticalOffset;j.verticalOffset={screenLength:n(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0}}if(this._context.screenSizePerspectiveEnabled){const{screenSizePerspectiveSettings:e,screenSizePerspectiveSettingsLabels:t}=this._context.sharedResources,n=_(this._textRenderParameters);j.screenSizePerspective=t.overrideFontHeight(n.maxHeight),j.screenSizePerspectiveAlignment=e}x&&(j.shaderPolygonOffset=1e-4),j.hasSlicePlane=this._context.slicePlaneEnabled;const z=(e,t)=>{const n=JSON.stringify(t);let r=e.get(n);return null==r&&(r=new G(t),e.add(n,r)),r},R=f?z(f,j):new G(j),D=c.placement.translation,T=P?r(P.displayWidth,P.displayHeight):s,W=c.placement.centerOffset,H=L(R,U,D,null,T,W,[0,0],null),I=S(this._context,o,H,y,v);if(null==I)return null;const $=(t,n,r,s,i,o)=>{const l=g()||c.placement.elevationOffset,m=this.setGraphicElevationContext(e,n,l);return a(t,m,r,s,i,o)},k=new p(this,I.object,[H],null==f?[R]:null,O,$,y);k.alignedSampledElevation=I.sampledElevation,k.needsElevationUpdates=m(y.mode)||"absolute-height"===y.mode,k.getScreenSize=(e=i())=>(e[0]=P?P.displayWidth:c.displaySize[0],e[1]=P?P.displayHeight:c.displaySize[1],e);const F=new u(c.placement.elevationOffset,l);return k.metadata=F,E(k,o,this._context.elevationProvider),k}}function D(e,t,n){e&&e.forEach((e=>{const r=t(e);null!=r&&n(r,e.graphic)}))}function A(e,t){if("baseline"===t.verticalPlacement){const n=P[t.horizontalPlacement],s=null!=e?e.baselineAnchorY:0;return r(n,s)}const n=O(t.horizontalPlacement,t.verticalPlacement);return w[n]}const T={mode:"relative-to-ground",offset:0};export{R as Graphics3DTextSymbolLayer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{a as t}from"../../../../chunks/vec2f64.js";import{c as s}from"../../../../chunks/vec3f64.js";import{
|
|
5
|
+
import{a as t}from"../../../../chunks/vec2f64.js";import{c as s}from"../../../../chunks/vec3f64.js";import{a as e}from"../../../../chunks/vec4f64.js";class c{constructor(c,i="center",r=!1,a=t(),n=e(0,0,0,-1),h="world",f=s(),o=0){this.verticalOffset=c,this.anchor=i,this.hasLabelVerticalOffset=r,this.screenOffset=a,this.centerOffset=n,this.centerOffsetUnits=h,this.translation=f,this.elevationOffset=o}}class i{constructor(s,e="center",c="center",i=null,r=t()){this.placement=s,this.horizontalPlacement=e,this.verticalPlacement=c,this.text=i,this.displaySize=r}}export{i as LabelParameters,c as LabelPlacement};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{h as e}from"../../../../chunks/mat4.js";import{a as t}from"../../../../chunks/mat4f64.js";import{c as n}from"../../../../chunks/vec3f64.js";import{computeTranslationToOriginAndRotation as o}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as r}from"../../../../geometry/projection/projectBuffer.js";import{isDehydratedPoint as i}from"../../../../layers/graphics/dehydratedFeatureUtils.js";import{updateVertexAttributeAuxpos1w as s}from"./graphicUtils.js";import{isSamplePosition as a,getElevationAtPoint as l}from"../../support/ElevationProvider.js";function u(e,t,n,o,i,s,a,l,u,c,f){const d=j[f.mode];let m,p,g=0;if(r(e,t,n,o,u.spatialReference,i,l))return d.requiresAlignment(f)?(g=d.applyElevationAlignmentBuffer(o,i,s,a,l,u,c,f),m=s,p=a):(m=o,p=i),r(m,u.spatialReference,p,s,c.spatialReference,a,l)?g:void 0}function c(e,t,n,o,r){const s=(i(e)?e.z:a(e)?e.array[e.offset+2]:e[2])||0;switch(n.mode){case"on-the-ground":{const n=l(t,e,"ground")??0;return r.verticalDistanceToGround=0,r.sampledElevation=n,void(r.z=n)}case"relative-to-ground":{const i=l(t,e,"ground")??0,a=n.geometryZWithOffset(s,o);return r.verticalDistanceToGround=a,r.sampledElevation=i,void(r.z=a+i)}case"relative-to-scene":{const i=l(t,e,"scene")??0,a=n.geometryZWithOffset(s,o);return r.verticalDistanceToGround=a,r.sampledElevation=i,void(r.z=a+i)}case"absolute-height":{const i=n.geometryZWithOffset(s,o),a=l(t,e,"ground")??0;return r.verticalDistanceToGround=i-a,r.sampledElevation=a,void(r.z=i)}default:return void(r.z=0)}}function f(e,t,n,o){return c(e,t,n,o,x),x.z}function d(e,t,n){return null==t||null==n?e.definedChanged:"on-the-ground"===t&&"on-the-ground"===n?e.staysOnTheGround:t===n||"on-the-ground"!==t&&"on-the-ground"!==n?T.UPDATE:e.onTheGroundChanged}function m(e){return"relative-to-ground"===e||"relative-to-scene"===e}function p(e){return"absolute-height"!==e}function g(t,n,r,i,a){c(n,r,a,i,x),s(t,x.verticalDistanceToGround);const l=x.sampledElevation,u=e(O,t.transformation);z[0]=n.x,z[1]=n.y,z[2]=x.z;return o(n.spatialReference,z,u,i.spatialReference)?t.transformation=u:console.warn("Could not locate symbol object properly, it might be misplaced"),l}function v(e,t,n,o,r,i){let s=0;const a=i.spatialReference;t*=3,o*=3;for(let l=0;l<r;++l){const r=e[t],l=e[t+1],u=e[t+2],c=i.getElevation(r,l,u,a,"ground")??0;s+=c,n[o]=r,n[o+1]=l,n[o+2]=c,t+=3,o+=3}return s/r}function h(e,t,n,o,r,i,s,a){let l=0;const u=a.calculateOffsetRenderUnits(s),c=a.featureExpressionInfoContext,f=i.spatialReference;t*=3,o*=3;for(let d=0;d<r;++d){const r=e[t],s=e[t+1],a=e[t+2],d=i.getElevation(r,s,a,f,"ground")??0;l+=d,n[o]=r,n[o+1]=s,n[o+2]=null==c?a+d+u:d+u,t+=3,o+=3}return l/r}function E(e,t,n,o,r,i,s,a){let l=0;const u=a.calculateOffsetRenderUnits(s),c=a.featureExpressionInfoContext,f=i.spatialReference;t*=3,o*=3;for(let d=0;d<r;++d){const r=e[t],s=e[t+1],a=e[t+2],d=i.getElevation(r,s,a,f,"scene")??0;l+=d,n[o]=r,n[o+1]=s,n[o+2]=null==c?a+d+u:d+u,t+=3,o+=3}return l/r}function y(e){const t=e.meterUnitOffset,n=e.featureExpressionInfoContext;return 0!==t||null!=n}function A(e,t,n,o,r,i,s,a){const l=a.calculateOffsetRenderUnits(s),u=a.featureExpressionInfoContext;t*=3,o*=3;for(let c=0;c<r;++c){const r=e[t],i=e[t+1],s=e[t+2];n[o]=r,n[o+1]=i,n[o+2]=null==u?s+l:l,t+=3,o+=3}return 0}class R{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}}var T;!function(e){e[e.NONE=0]="NONE",e[e.UPDATE=1]="UPDATE",e[e.RECREATE=2]="RECREATE"}(T||(T={}));const j={"absolute-height":{applyElevationAlignmentBuffer:A,requiresAlignment:y},"on-the-ground":{applyElevationAlignmentBuffer:v,requiresAlignment:()=>!0},"relative-to-ground":{applyElevationAlignmentBuffer:h,requiresAlignment:()=>!0},"relative-to-scene":{applyElevationAlignmentBuffer:E,requiresAlignment:()=>!0}},O=t(),x=new R,z=n();export{R as SampleElevationInfo,T as SymbolUpdateType,g as applyElevationAlignmentForHUD,u as applyPerVertexElevationAlignment,d as elevationModeChangeUpdateType,f as evaluateElevationAlignmentAtPoint,c as evaluateElevationInfoAtPoint,m as needsElevationUpdates2D,p as needsElevationUpdates3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getMetersPerUnitForSR as t}from"../../../../core/unitUtils.js";import{o as
|
|
5
|
+
import{getMetersPerUnitForSR as t}from"../../../../core/unitUtils.js";import{o as e,r as n,n as r}from"../../../../chunks/mat4.js";import{a as o}from"../../../../chunks/mat4f64.js";import{e as i,O as s}from"../../../../chunks/vec3f64.js";import{s as l}from"../../../../chunks/vec4.js";import{d as u,O as a}from"../../../../chunks/vec4f64.js";import{projectPoint as m}from"../../../../geometry/projection.js";import{width as c,depth as f,height as p}from"../../../../geometry/support/aaBoundingBox.js";import{create as h}from"../../../../geometry/support/aaBoundingRect.js";import{ringsCentroid as g}from"../../../../geometry/support/centroid.js";import{getPointOnPath as y,getPathLength as d}from"../../../../geometry/support/coordsUtils.js";import{makeDehydratedPoint as x}from"../../../../layers/graphics/dehydratedPoint.js";import{isHydratedGeometry as j,clonePoint as b}from"../../../../layers/graphics/hydratedFeatures.js";import{VertexAttribute as v}from"../../webgl-engine/lib/VertexAttribute.js";function w(t,e){if("point"===t.type)return P(t,e,!1);if(j(t))switch(t.type){case"extent":return P(t.center,e,!1);case"polygon":return P(t.centroid,e,!1);case"polyline":return P(z(t),e,!0);case"mesh":return P(t.origin,e,!1)}else switch(t.type){case"extent":return P(A(t),e,!0);case"polygon":return P(M(t),e,!0);case"polyline":return P(z(t),e,!0)}}function z(t){const e=t.paths[0];if(!e||0===e.length)return null;const n=y(e,d(e)/2);return x(n[0],n[1],n[2],t.spatialReference)}function A(t){return x(.5*(t.xmax+t.xmin),.5*(t.ymax+t.ymin),null!=t.zmin&&null!=t.zmax&&isFinite(t.zmin)&&isFinite(t.zmax)?.5*(t.zmax+t.zmin):void 0,t.spatialReference)}function M(t){const e=t.rings[0];if(!e||0===e.length)return null;const n=g(t.rings,!!t.hasZ);return x(n[0],n[1],n[2],t.spatialReference)}function P(t,e,n){const r=n?t:b(t);return e&&t?m(t,r,e)?r:null:r}function R(t,e,n,r=0){if(t){e||(e=h());const o=t;let i=.5*o.width*(n-1),s=.5*o.height*(n-1);return o.width<1e-7*o.height?i+=s/20:o.height<1e-7*o.width&&(s+=i/20),l(e,o.xmin-i-r,o.ymin-s-r,o.xmax+i+r,o.ymax+s+r),e}return null}function k(t,e){for(let n=0;n<t.geometries.length;++n){const r=t.geometries[n].getMutableAttribute(v.AUXPOS1);r&&r.data[3]!==e&&(r.data[3]=e,t.geometryVertexAttrsUpdated(t.geometries[n]))}}function F(t,e,n=null){const r=u(a);return null!=t&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),null!=e?r[3]=e:null!=t&&t.length>3&&(r[3]=t[3]),n&&(r[0]*=n,r[1]*=n,r[2]*=n,r[3]*=n),r}function U(t,e,n,r,o,i=[0,0,0,0]){for(let s=0;s<3;++s)null!=t&&null!=t[s]?i[s]=t[s]:null!=n&&null!=n[s]?i[s]=n[s]:i[s]=o[s];return i[3]=null!=e?e:null!=r?r:o[3],i}function B(t=s,e,n,r=1){const o=new Array(3);if(null==e||null==n)o[0]=1,o[1]=1,o[2]=1;else{let r,i=0;for(let s=2;s>=0;s--){const l=t[s];let u;const a=null!=l,m=0===s&&!r&&!a,c=n[s];"symbol-value"===l||m?u=0!==c?e[s]/c:1:a&&"proportional"!==l&&isFinite(l)&&(u=0!==c?l/c:1),null!=u&&(o[s]=u,r=u,i=Math.max(i,Math.abs(u)))}for(let t=2;t>=0;t--)null==o[t]?o[t]=r:0===o[t]&&(o[t]=.001*i)}for(let i=2;i>=0;i--)o[i]/=r;return i(o)}function D(t){return null!=t.isPrimitive}function I(t){return O(D(t)?[t.width,t.depth,t.height]:t)?null:"Symbol sizes may not be negative values"}function O(t){const e=t=>null==t||t>=0;return Array.isArray(t)?t.every(e):e(t)}function S(t,i,s,l=o()){return t&&e(l,l,-t/180*Math.PI),i&&n(l,l,i/180*Math.PI),s&&r(l,l,s/180*Math.PI),l}function V(e,n,r){if(null!=r.minDemResolution)return r.minDemResolution;const o=t(n),i=c(e)*o,s=f(e)*o,l=p(e)*(n.isGeographic?1:o);return 0===i&&0===s&&0===l?r.minDemResolutionForPoints:.01*Math.max(i,s,l)}export{w as computeCentroid,S as computeObjectRotation,B as computeObjectScale,V as demResolutionForBoundingBox,R as enlargeExtent,O as isValidSize,F as mixinColorAndOpacity,U as overrideColor,k as updateVertexAttributeAuxpos1w,I as validateSymbolLayerSize};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{adjustStaticAGOUrl as e}from"../../../../core/devEnvironmentUtils.js";import{
|
|
5
|
+
import{adjustStaticAGOUrl as e}from"../../../../core/devEnvironmentUtils.js";import{n as t}from"../../../../chunks/mat3.js";import{a as r}from"../../../../chunks/mat3f64.js";import{i as o}from"../../../../chunks/mat4.js";import{a as s}from"../../../../chunks/mat4f64.js";import{e as i,f as n,B as l,l as a,n as u,p as c}from"../../../../chunks/vec3.js";import{c as m}from"../../../../chunks/vec3f64.js";import{empty as f,expandWithVec3 as d}from"../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as p}from"../../../../geometry/support/FloatArray.js";import{BufferViewVec4f as g,BufferViewVec4u8 as x,BufferViewVec4u16 as b,BufferViewVec3f as h,BufferViewVec3u8 as T,BufferViewVec3u16 as y}from"../../../../geometry/support/buffer/BufferView.js";import{t as R,a as w,s as v}from"../../../../chunks/vec32.js";import{t as M,s as j}from"../../../../chunks/vec42.js";import{n as B}from"../../../../chunks/vec22.js";import{c as F}from"../../../../chunks/vec33.js";import{c as L}from"../../../../chunks/vec43.js";import{DefaultLoadingContext as S}from"../../glTF/DefaultLoadingContext.js";import{loadGLTF as O}from"../../glTF/loader.js";import{convertPrimitiveToTriangles as A}from"../../glTF/internal/indexUtils.js";import{isEncodedMeshTexture as I}from"../../glTF/internal/resourceUtils.js";import{getTransformMatrix as k}from"../../glTF/internal/TextureTransformUtils.js";import{ProcessedObjectResource as C}from"./ProcessedObjectResource.js";import{load as E,processLoadResult as N}from"./wosrLoader.js";import{NormalType as P}from"../../webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{Attribute as U}from"../../webgl-engine/lib/Attribute.js";import{AlphaDiscardMode as V,DepthTestFunction as D,CullFaceOptions as _}from"../../webgl-engine/lib/basicInterfaces.js";import{Geometry as G}from"../../webgl-engine/lib/Geometry.js";import{Texture as H}from"../../webgl-engine/lib/Texture.js";import{VertexAttribute as q}from"../../webgl-engine/lib/VertexAttribute.js";import{DefaultMaterial as W}from"../../webgl-engine/materials/DefaultMaterial.js";import{COLOR_GAMMA as $}from"../../webgl-engine/materials/DefaultMaterial_COLOR_GAMMA.js";import{defaultEsriSymbologyMRRFactors as z,defaultAdvancedMRRFactors as K,useSchematicPBR as Q,defaultSchematicMRRFactors as J}from"../../webgl-engine/materials/pbrUtils.js";async function X(t,r){const o=Y(e(t));if("wosr"===o.fileType){const e=await(r.cache?r.cache.loadWOSR(o.url,r):E(o.url,r)),{engineResources:t,referenceBoundingBox:s}=N(e,r);return{lods:t,referenceBoundingBox:s,isEsriSymbolResource:!1,isWosr:!0}}const s=await(r.cache?r.cache.loadGLTF(o.url,r,!!r.usePBR):O(new S(r.streamDataRequester),o.url,r,r.usePBR)),i=s.model.meta?.ESRI_proxyEllipsoid,n=s.meta.isEsriSymbolResource&&null!=i&&s.meta.uri.includes("/RealisticTrees/");n&&!s.customMeta.esriTreeRendering&&(s.customMeta.esriTreeRendering=!0,se(s,i));const l=!!r.usePBR,a=s.meta.isEsriSymbolResource?{usePBR:l,isSchematic:!1,treeRendering:n,mrrFactors:[...z]}:{usePBR:l,isSchematic:!1,treeRendering:!1,mrrFactors:[...K]},u={...r.materialParamsMixin,treeRendering:n},{engineResources:c,referenceBoundingBox:m}=Z(s,a,u,r.skipHighLods&&null==o.specifiedLodIndex?{skipHighLods:!0}:{skipHighLods:!1,singleLodIndex:o.specifiedLodIndex});return{lods:c,referenceBoundingBox:m,isEsriSymbolResource:s.meta.isEsriSymbolResource,isWosr:!1}}function Y(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);if(t)return{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null};return e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}function Z(e,t,r,o){const s=e.model,i=new Array,n=new Map,l=new Map,a=s.lods.length,u=f();return s.lods.forEach(((e,c)=>{const m=!0===o.skipHighLods&&(a>1&&0===c||a>3&&1===c)||!1===o.skipHighLods&&null!=o.singleLodIndex&&c!==o.singleLodIndex;if(m&&0!==c)return;const f=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach((e=>{const o=m?new W({}):ee(s,e,f,t,r,n,l),{geometry:i,vertexCount:a}=te(e,null!=o?o:new W({})),p=i.boundingInfo;null!=p&&0===c&&(d(u,p.bbMin),d(u,p.bbMax)),null!=o&&(f.stageResources.geometries.push(i),f.numberOfVertices+=a)})),m||i.push(f)})),{engineResources:i,referenceBoundingBox:u}}function ee(e,t,r,o,s,i,n){const l=t.material+(t.attributes.normal?"_normal":"")+(t.attributes.color?"_color":"")+(t.attributes.texCoord0?"_texCoord0":"")+(t.attributes.tangent?"_tangent":""),a=e.materials.get(t.material),u=null!=t.attributes.texCoord0,c=null!=t.attributes.normal;if(null==a)return null;const m=oe(a.alphaMode);if(!i.has(l)){if(u){const t=(t,r=!1)=>{if(null!=t&&!n.has(t)){const o=e.textures.get(t);if(null!=o){const e=o.data;n.set(t,new H(I(e)?e.data:e,{...o.parameters,preMultiplyAlpha:!I(e)&&r,encoding:I(e)&&null!=e.encoding?e.encoding:void 0}))}}};t(a.textureColor,m!==V.Opaque),t(a.textureNormal),t(a.textureOcclusion),t(a.textureEmissive),t(a.textureMetallicRoughness)}const r=a.color[0]**(1/$),f=a.color[1]**(1/$),d=a.color[2]**(1/$),p=a.emissiveFactor[0]**(1/$),g=a.emissiveFactor[1]**(1/$),x=a.emissiveFactor[2]**(1/$),b=null!=a.textureColor&&u?n.get(a.textureColor):null,h=Q({normalTexture:a.textureNormal,metallicRoughnessTexture:a.textureMetallicRoughness,metallicFactor:a.metallicFactor,roughnessFactor:a.roughnessFactor,emissiveTexture:a.textureEmissive,emissiveFactor:a.emissiveFactor,occlusionTexture:a.textureOcclusion});i.set(l,new W({...o,transparent:m===V.Blend,customDepthTest:D.Lequal,textureAlphaMode:m,textureAlphaCutoff:a.alphaCutoff,diffuse:[r,f,d],ambient:[r,f,d],opacity:a.opacity,doubleSided:a.doubleSided,doubleSidedType:"winding-order",cullFace:a.doubleSided?_.None:_.Back,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:c?P.Attribute:P.ScreenDerivative,castShadows:!0,textureId:null!=b?b.id:void 0,colorMixMode:a.colorMixMode,normalTextureId:null!=a.textureNormal&&u?n.get(a.textureNormal).id:void 0,textureAlphaPremultiplied:null!=b&&!!b.parameters.preMultiplyAlpha,occlusionTextureId:null!=a.textureOcclusion&&u?n.get(a.textureOcclusion).id:void 0,emissiveTextureId:null!=a.textureEmissive&&u?n.get(a.textureEmissive).id:void 0,metallicRoughnessTextureId:null!=a.textureMetallicRoughness&&u?n.get(a.textureMetallicRoughness).id:void 0,emissiveFactor:[p,g,x],mrrFactors:h?[...J]:[a.metallicFactor,a.roughnessFactor,o.mrrFactors[2]],isSchematic:h,colorTextureTransformMatrix:k(a.colorTextureTransform),normalTextureTransformMatrix:k(a.normalTextureTransform),occlusionTextureTransformMatrix:k(a.occlusionTextureTransform),emissiveTextureTransformMatrix:k(a.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:k(a.metallicRoughnessTextureTransform),...s}))}const f=i.get(l);if(r.stageResources.materials.push(f),u){const e=e=>{null!=e&&r.stageResources.textures.push(n.get(e))};e(a.textureColor),e(a.textureNormal),e(a.textureOcclusion),e(a.textureEmissive),e(a.textureMetallicRoughness)}return f}function te(e,r){const o=e.attributes.position.count,s=A(e.indices||o,e.primitiveType),i=p(3*o),{typedBuffer:n,typedBufferStride:l}=e.attributes.position;R(i,n,e.transform,3,l);const a=[[q.POSITION,new U(i,3,!0)]],u=[[q.POSITION,s]];if(null!=e.attributes.normal){const r=p(3*o),{typedBuffer:i,typedBufferStride:n}=e.attributes.normal;t(re,e.transform),w(r,i,re,3,n),a.push([q.NORMAL,new U(r,3,!0)]),u.push([q.NORMAL,s])}if(null!=e.attributes.tangent){const r=p(4*o),{typedBuffer:i,typedBufferStride:n}=e.attributes.tangent;t(re,e.transform),M(r,i,re,4,n),a.push([q.TANGENT,new U(r,4,!0)]),u.push([q.TANGENT,s])}if(null!=e.attributes.texCoord0){const t=p(2*o),{typedBuffer:r,typedBufferStride:i}=e.attributes.texCoord0;B(t,r,2,i),a.push([q.UV0,new U(t,2,!0)]),u.push([q.UV0,s])}if(null!=e.attributes.color){const t=new Uint8Array(4*o);4===e.attributes.color.elementCount?e.attributes.color instanceof g?j(t,e.attributes.color,255):e.attributes.color instanceof x?L(t,e.attributes.color):e.attributes.color instanceof b&&j(t,e.attributes.color,1/256):(t.fill(255),e.attributes.color instanceof h?v(t,e.attributes.color,255,4):e.attributes.color instanceof T?F(t,e.attributes.color.typedBuffer,4,e.attributes.color.typedBufferStride):e.attributes.color instanceof y&&v(t,e.attributes.color,1/256,4)),a.push([q.COLOR,new U(t,4,!0)]),u.push([q.COLOR,s])}return{geometry:new G(r,a,u),vertexCount:o}}const re=r();function oe(e){switch(e){case"BLEND":return V.Blend;case"MASK":return V.Mask;case"OPAQUE":case null:case void 0:return V.Opaque}}function se(e,t){for(let r=0;r<e.model.lods.length;++r){const f=e.model.lods[r];for(const d of f.parts){const f=d.attributes.normal;if(null==f)return;const p=d.attributes.position,g=p.count,b=m(),T=m(),y=m(),R=new Uint8Array(4*g),w=new Float64Array(3*g),v=o(s(),d.transform);let M=0,j=0;for(let o=0;o<g;o++){p.getVec(o,T),f.getVec(o,b),i(T,T,d.transform),n(y,T,t.center),l(y,y,t.radius);const s=y[2],m=a(y),g=Math.min(.45+.55*m*m,1);l(y,y,t.radius),null!==v&&i(y,y,v),u(y,y),r+1!==e.model.lods.length&&e.model.lods.length>1&&c(y,y,b,s>-1?.2:Math.min(-4*s-3.8,1)),w[M]=y[0],w[M+1]=y[1],w[M+2]=y[2],M+=3,R[j]=255*g,R[j+1]=255*g,R[j+2]=255*g,R[j+3]=255,j+=4}d.attributes.normal=new h(w),d.attributes.color=new x(R)}}}export{X as fetch,Z as gltfToEngineResources,Y as parseUrl};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../request.js";import{result as t}from"../../../../core/asyncUtils.js";import{estimateNestedObjectSize as r}from"../../../../core/byteSizeEstimations.js";import n from"../../../../core/Error.js";import s from"../../../../core/Logger.js";import{NestedMap as a}from"../../../../core/NestedMap.js";import{throwIfAbortError as o}from"../../../../core/promiseUtils.js";import{Version as i}from"../../../../core/Version.js";import{
|
|
5
|
+
import e from"../../../../request.js";import{result as t}from"../../../../core/asyncUtils.js";import{estimateNestedObjectSize as r}from"../../../../core/byteSizeEstimations.js";import n from"../../../../core/Error.js";import s from"../../../../core/Logger.js";import{NestedMap as a}from"../../../../core/NestedMap.js";import{throwIfAbortError as o}from"../../../../core/promiseUtils.js";import{Version as i}from"../../../../core/Version.js";import{e as l}from"../../../../chunks/vec3f64.js";import{empty as u,expandWithVec3 as c}from"../../../../geometry/support/aaBoundingBox.js";import{requestImage as p}from"../../../../support/requestImageUtils.js";import{Attribute as m}from"../../webgl-engine/lib/Attribute.js";import{CullFaceOptions as f,AlphaDiscardMode as d}from"../../webgl-engine/lib/basicInterfaces.js";import{Geometry as g}from"../../webgl-engine/lib/Geometry.js";import{Texture as y}from"../../webgl-engine/lib/Texture.js";import{VertexAttribute as b}from"../../webgl-engine/lib/VertexAttribute.js";import{DefaultMaterial as w}from"../../webgl-engine/materials/DefaultMaterial.js";import{TextureWrapMode as x}from"../../../webgl/enums.js";const h=s.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");async function v(e,t){const n=await A(e,t),s=await T(n.textureDefinitions??{},t);let a=0;for(const r in s)if(s.hasOwnProperty(r)){const e=s[r];a+=e?.image?e.image.width*e.image.height*4:0}return{resource:n,textures:s,size:a+r(n)}}async function A(r,n){const s=null!=n&&n.streamDataRequester;if(s)return j(r,s,n);const a=await t(e(r,n));if(!0===a.ok)return a.value.data;o(a.error),M(a.error)}async function j(e,r,n){const s=await t(r.request(e,"json",n));if(!0===s.ok)return s.value;o(s.error),M(s.error.details.url)}function M(e){throw new n("",`Request for object resource failed: ${e}`)}function P(e){const t=e.params,r=t.topology;let n=!0;switch(t.vertexAttributes||(h.warn("Geometry must specify vertex attributes"),n=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t&&t.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(h.warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),n=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(h.warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),n=!1)):(h.warn(`Indexed geometry does not specify face indices for '${r}' attribute`),n=!1)}}else h.warn("Indexed geometries must specify faces"),n=!1;break}default:h.warn(`Unsupported topology '${r}'`),n=!1}e.params.material||(h.warn("Geometry requires material"),n=!1);const s=e.params.vertexAttributes;for(const a in s){s[a].values||(h.warn("Geometries with externally defined attributes are not yet supported"),n=!1)}return n}function I(e,t){const r=new Array,n=new Array,s=new Array,o=new a,u=e.resource,c=i.parse(u.version||"1.0","wosr");O.validate(c);const p=u.model.name,d=u.model.geometries,x=u.materialDefinitions??{},h=e.textures;let v=0;const A=new Map;for(let a=0;a<d.length;a++){const e=d[a];if(!P(e))continue;const i=k(e),u=e.params.vertexAttributes,c=[];for(const t in u){const e=u[t],r=e.values;c.push([t,new m(r,e.valuesPerElement,!0)])}const p=[];if("PerAttributeArray"!==e.params.topology){const t=e.params.faces;for(const e in t)p.push([e,t[e].values])}const j=i.texture,M=h&&h[j];if(M&&!A.has(j)){const{image:e,parameters:t}=M,r=new y(e,t);n.push(r),A.set(j,r)}const I=A.get(j),U=I?I.id:void 0,T=i.material;let O=o.get(T,j);if(null==O){const e=x[T.substring(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=M&&M.alphaChannelUsage,n=e.transparency>0||"transparency"===r||"maskAndTransparency"===r,s=M?E(M.alphaChannelUsage):void 0,a={ambient:l(e.diffuse),diffuse:l(e.diffuse),opacity:1-(e.transparency||0),transparent:n,textureAlphaMode:s,textureAlphaCutoff:.33,textureId:U,initTextureTransparent:!0,doubleSided:!0,cullFace:f.None,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:M?.parameters.preMultiplyAlpha??!1};null!=t&&t.materialParamsMixin&&Object.assign(a,t.materialParamsMixin),O=new w(a),o.set(T,j,O)}s.push(O);const q=new g(O,c,p);v+=p.find((e=>e[0]===b.POSITION))?.[1].length??0,r.push(q)}return{engineResources:[{name:p,stageResources:{textures:n,materials:s,geometries:r},pivotOffset:u.model.pivotOffset,numberOfVertices:v,lodThreshold:null}],referenceBoundingBox:U(r)}}function U(e){const t=u();return e.forEach((e=>{const r=e.boundingInfo;null!=r&&(c(t,r.bbMin),c(t,r.bbMax))})),t}async function T(e,t){const r=new Array;for(const a in e){const n=e[a],s=n.images[0].data;if(!s){h.warn("Externally referenced texture data is not yet supported");continue}const o=n.encoding+";base64,"+s,i="/textureDefinitions/"+a,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",u={noUnpackFlip:!0,wrap:{s:x.REPEAT,t:x.REPEAT},preMultiplyAlpha:E(l)!==d.Opaque},c=null!=t&&t.disableTextures?Promise.resolve(null):p(o,t);r.push(c.then((e=>({refId:i,image:e,parameters:u,alphaChannelUsage:l}))))}const n=await Promise.all(r),s={};for(const a of n)s[a.refId]=a;return s}function E(e){switch(e){case"mask":return d.Mask;case"maskAndTransparency":return d.MaskBlend;case"none":return d.Opaque;default:return d.Blend}}function k(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const O=new i(1,2,"wosr");export{T as createTextureResources,v as load,I as processLoadResult};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Error.js";import{assertIsSome as t}from"../../../../core/maybe.js";import{MIN_PRIORITY as o}from"../../../../core/MemCache.js";import{throwIfAborted as n}from"../../../../core/promiseUtils.js";import{generateUUID as r}from"../../../../core/uuid.js";import{
|
|
5
|
+
import e from"../../../../core/Error.js";import{assertIsSome as t}from"../../../../core/maybe.js";import{MIN_PRIORITY as o}from"../../../../core/MemCache.js";import{throwIfAborted as n}from"../../../../core/promiseUtils.js";import{generateUUID as r}from"../../../../core/uuid.js";import{n as s}from"../../../../chunks/mat3.js";import{a}from"../../../../chunks/mat3f64.js";import{h as i}from"../../../../chunks/vec3.js";import{O as l}from"../../../../chunks/vec3f64.js";import{projectBoundingSphere as d}from"../../../../geometry/projection/projectBoundingSphere.js";import{k as u}from"../../../../chunks/sphere.js";import{ViewingMode as c}from"../../../ViewingMode.js";import{convertMeshMaterialToPBRMaterial as m}from"./I3SClientMaterialUtil.js";class h{constructor(e,t,o,n,r,s){this._uid=e,this._indexSR=t,this._renderSR=o,this._viewingMode=n,this._worker=s,this._id2Meta=new Map,this._oid2Meta=new Map,this._memCache=r.newCache(`sl-client-mesh-data-${this._uid}`)}get indexSR(){return this._indexSR}get renderSR(){return this._renderSR}createMeshNodeInfo(e,t){const o=`mesh${t}`,n=e.extent,r=n.spatialReference,s=this._indexSR,a=f(n,e.origin);d(a,r,a,s);return{type:"mesh",id:o,version:M(e),oid:t,mbs:a,componentNodeIds:[],unloadedMesh:e,nodeIndex:null,loadMeshPromise:null}}addMeshNode(t,o){if(null!=this.getMeshNodeIndex(o.oid))throw new e(`I3SClientNodeLoader: client side mesh for feature oid=${o.oid} already exists`);o.nodeIndex=t,this._id2Meta.set(o.id,o),this._oid2Meta.set(o.oid,o)}getMeshNodeIndex(e){const t=this._oid2Meta.get(e);return null==t||"mesh"!==t.type?null:t.nodeIndex}removeNode(e){const t=this._id2Meta.get(e);null!=t&&(this._id2Meta.delete(e),"mesh"===t.type&&this._oid2Meta.delete(t.oid))}async loadNodeJSON(t){const o=this._id2Meta.get(t);if(null==o)throw new e(`I3SClientNodeLoader::loadNodeJSON unable to find node ${t}`);switch(o.type){case"mesh":return this._loadMeshNodeJSON(o);case"mesh-component":return this._loadMeshComponentNodeJSON(o);default:throw new e(`I3SClientNodeLoader::loadNodeJSON unable to handle node ${t}`)}}async _loadMeshNodeJSON(e){const t=e.id,o=(await this._getMeshData(e)).loadedMesh;if(null==o.components||0===o.components.length)return{id:t,version:null,mbs:e.mbs,obb:null,sharedResource:null,geometryData:null,attributeData:null,featureData:null,children:null};const n=[],r=o.components;for(let s=0;s<r.length;++s){const o=`${t}-component${s}`,r={type:"mesh-component",id:o,mbs:e.mbs,componentIndex:s,meshNodeInfo:e,textureData:new Map};this._id2Meta.set(r.id,r),e.componentNodeIds.push(o),n.push({id:r.id,href:null,mbs:r.mbs,obb:null})}return{id:t,version:null,mbs:e.mbs,obb:null,sharedResource:null,geometryData:null,attributeData:null,featureData:null,children:n}}updateNodeIndex(e,t,o){const n=this._id2Meta.get(e);n&&"mesh"===n.type&&(n.nodeIndex=o)}async _loadMeshComponentNodeJSON(e){return{id:e.id,version:e.meshNodeInfo.version,mbs:e.mbs,obb:null,sharedResource:null,geometryData:null,attributeData:null,featureData:null,children:null,isEmpty:!1}}async loadNodeData(o,r){const s=o.id,a=this._id2Meta.get(s);if(null==a||"mesh-component"!==a.type)throw new e(`Failed to load client node data for node ${o.id} (unexpected node info)`);const i=a.meshNodeInfo,l=await this._getMeshData(i),d=l.loadedMesh,u=i.oid;if(null==d.components)throw new e(`Failed to load client node data for node ${o.id} (unexpected null reference)`);const h=d.components[a.componentIndex],{material:f,requiredTextures:x,textureData:M}=await m(h.material);if(null!=M)for(const e of M)null!=e&&a.textureData.set(e.id,e);const g={params:{material:f},type:"ArrayBufferView"},{vertexSpace:w,origin:_,transform:N}=d,b=[_.x,_.y,_.z??0],S={featureDataPosition:b,featureIds:[],geometries:[g]},D={attributeData:{},loadedAttributes:[]};l.projectionPromise||(t(this._worker,"SceneLayerWorker is needed to project mesh"),l.projectionPromise=this._worker.project({positions:d.vertexAttributes.position,localMatrix:N?.localMatrix,vertexSpace:w.toJSON(),origin:b,inSpatialReference:d.spatialReference.toJSON(),outSpatialReference:this._indexSR.toJSON(),local:this._viewingMode===c.Local},r));const{projected:v,original:I}=await l.projectionPromise;d.vertexAttributes.position=I;const{transformed:j,original:A}=await p(h,l,this._worker,r);d.vertexAttributes.normal=A,n(r);const{geometryBuffer:R,geometryDescriptor:P}=y(v,h.faces,j,d.vertexAttributes.uv,d.vertexAttributes.color,u);return{geometryData:S,attributeDataInfo:D,geometryBuffer:R,geometryDescriptor:P,requiredTextures:x,textureData:M}}async loadAttributes(e,t,o){const n=e.numFeatures,r={};for(const{field:{name:s}}of t)r[s]=new Array(n);return r}async loadTextures(e,t,o){const n=e.id,r=this._id2Meta.get(n);if(null==r||"mesh-component"!==r.type)throw new Error(`Failed to load textures for node ${e.id} (unexpected node info)`);const s=[];for(const a of t)s.push(r.textureData.get(a.id)||null);return s}async _getMeshData(e){const t=e.version,n=this._memCache.get(t);if(null==n){if(null!=e.loadMeshPromise)return e.loadMeshPromise;const n=async(n,r)=>{const s=e.unloadedMesh.clone();try{await s.load()}catch(l){r(l)}const a=s.memoryUsage,i={loadedMesh:s,projectionPromise:null,normalsTransformPromise:null,usedMemoryInBytes:a};this._memCache.put(t,i,a,o),e.loadMeshPromise=null,n(i)};return e.loadMeshPromise=new Promise(((e,t)=>n(e,t))),e.loadMeshPromise}return n}}function f(e,t){const{spatialReference:o}=e,n=[1,-1],r=[.5*e.width,.5*e.height,e.hasZ?.5*(e.zmax-e.zmin):0],s=o.isGeographic?o.metersPerUnit:1,a=e.center;let i=0;if(e.hasZ)for(let l=0;l<2;++l)for(let e=0;e<2;++e)for(let o=0;o<2;++o){const d=(a.x+n[l]*r[0]-t.x)*s,u=(a.y+n[e]*r[1]-t.y)*s,c=a.z+n[o]*r[2]-t.z;i=Math.max(d*d+u*u+c*c,i)}else for(let l=0;l<2;++l)for(let e=0;e<2;++e){const o=(a.x+n[l]*r[0]-t.x)*s,d=(a.y+n[e]*r[1]-t.y)*s;i=Math.max(o*o+d*d,i)}return u([t.x,t.y,t.z],Math.sqrt(i))}async function p(e,o,n,r){const{transform:d,vertexAttributes:u}=o.loadedMesh,c="source"===e.shading?u.normal:null;if(!(null!=c&&null!=d&&(0!==d.rotationAngle||!i(d.scale,l))))return{transformed:c,original:u.normal};if(!o.normalsTransformPromise){t(n,"SceneLayerWorker is needed to transform mesh normals");const e=a();s(e,d.localMatrix),o.normalsTransformPromise=n.transformNormals({normalMatrix:e,normals:c},r)}return o.normalsTransformPromise}function y(e,t,o,n,r,s){const a=1,i=t.length/3,l=3*i;let d=0,u=0,c=!1,m=0,h=!1,f=0,p=!1,y=0,M=0,b=0;d+=g,d+=g,u=d,d+=3*l*w,null!=o&&(c=!0,m=d,d+=3*l*w),null!=n&&(h=!0,f=d,d+=2*l*w),null!=r&&(p=!0,y=d,d+=4*l*_),M=d,d+=a*N,b=d,d+=2*a*g;const S=new ArrayBuffer(d),D=new Uint8Array(S);x(D,0,l),x(D,g,a);const v=new Float32Array(S,u),I=null!=o?new Float32Array(S,m):null,j=null!=n?new Float32Array(S,f):null,A=null!=r?new Uint8Array(S,y):null;for(let x=0;x<i;++x){const s=3*x;for(let a=0;a<3;++a){const i=t[s+a],l=3*i,d=9*x+3*a;if(v[d]=e[l],v[d+1]=e[l+1],v[d+2]=e[l+2],null!=I&&(I[d]=o[l],I[d+1]=o[l+1],I[d+2]=o[l+2]),null!=j){const e=2*i,t=6*x+2*a;j[t]=n[e],j[t+1]=n[e+1]}if(null!=A){const e=4*i,t=12*x+4*a;A[t]=r[e],A[t+1]=r[e+1],A[t+2]=r[e+2],A[t+3]=r[e+3]}}}x(D,M,s),x(D,M+g,s/2**32),x(D,b,0),x(D,b+g,i-1);return{geometryBuffer:S,geometryDescriptor:{isDraco:!1,isLegacy:!0,color:p,normal:c,uv0:h,uvRegion:!1,featureIndex:!0}}}function x(e,t,o){e[t]=255&o,e[t+1]=255&o>>8,e[t+2]=255&o>>16,e[t+3]=255&o>>24}function M(e){const t=e.metadata.displaySource?.source;if(null==t||!Array.isArray(t)||!t.length||t[0]instanceof File)return r();const o=t;let n="";for(const r of o)n+=r.makeHash();return n+JSON.stringify(null!=e.transform?e.transform.toJSON():"")+(e.vertexSpace.isRelative?JSON.stringify(e.vertexSpace.origin):"")}const g=4,w=4,_=1,N=8;export{h as I3SClientNodeLoader,f as createSphereFromExtent,p as transformNormals};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Evented.js";import s from"../../../../core/Logger.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{F as n}from"../../../../chunks/mat4.js";import{
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Evented.js";import s from"../../../../core/Logger.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{F as n}from"../../../../chunks/mat4.js";import{a}from"../../../../chunks/mat4f64.js";import{e as l}from"../../../../chunks/vec3.js";import{c}from"../../../../chunks/vec3f64.js";import{projectBoundingSphere as p}from"../../../../geometry/projection/projectBoundingSphere.js";import{empty as h,expand as m}from"../../../../geometry/support/aaBoundingRect.js";import{f as d}from"../../../../chunks/sphere.js";import{newIntersector as u}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as f}from"../../webgl-engine/lib/IntersectorInterfaces.js";const v=h(),g=a(),_=d(0,0,0,0),x=c(),y=c(),E=c();let j=class extends(r.EventedMixin(t)){get spatialReference(){return this.view?.elevationProvider?.spatialReference}constructor(e){super(e),this._tmpEvent={spatialReference:null,extent:v,context:"scene"}}initialize(){this.view=this.layerView.view,this._renderCoordsHelper=this.view.renderCoordsHelper,this._intersector=u(this.view.state.viewingMode),this._intersector.options.store=f.MIN;const e=this.layerView.i3slayer.fullExtent;null==e?s.getLogger(this).error("I3SElevationProvider expected fullExtent on I3SLayer."):(this._zmin=e.zmin,this._zmax=e.zmax),this._tmpEvent.context=this.intersectionHandler.isGround?"ground":"scene"}getElevation(e,t,r,i){if(x[0]=e,x[1]=t,x[2]=r,!this._renderCoordsHelper.toRenderCoords(x,i,x))return s.getLogger(this).error("could not project point to compute elevation"),null;const o=this.layerView.elevationOffset,n=this._zmin+o,a=this._zmax+o;return this._renderCoordsHelper.setAltitude(y,a,x),this._renderCoordsHelper.setAltitude(E,n,x),this._intersector.reset(y,E,null),this.intersectionHandler.intersect(this._intersector,null,y,E),this._intersector.results.min.getIntersectionPoint(x)?this._renderCoordsHelper.getAltitude(x):null}getSphereElevationBounds(e,t){return p(e,t,_,this._renderCoordsHelper.spatialReference),this.layerView.getElevationRange(_)}getRootElevationBounds(){const e=this.layerView.i3slayer.fullExtent;return e?.hasZ?{min:e.zmin,max:e.zmax}:null}layerChanged(){this.spatialReference&&(this._tmpEvent.extent=this._computeLayerExtent(),this._tmpEvent.spatialReference=this.spatialReference,this.emit("elevation-change",this._tmpEvent))}objectChanged(e){this.spatialReference&&(this._tmpEvent.extent=this._computeObjectExtent(e),this._tmpEvent.spatialReference=this.spatialReference,this.emit("elevation-change",this._tmpEvent))}_computeObjectExtent(e){return h(v),this._expandExtent(e,v),v}_computeLayerExtent(){h(v);for(const e of this.layerView.getVisibleNodes())this._expandExtent(e,v);return v}_expandExtent(e,t){const r=this.spatialReference;if(null==r)return;const s=this.layerView.getNodeComponentObb(e);if(null!=s){n(g,s.quaternion),g[12]=s.center[0],g[13]=s.center[1],g[14]=s.center[2];for(let e=0;e<8;++e)x[0]=1&e?s.halfSize[0]:-s.halfSize[0],x[1]=2&e?s.halfSize[1]:-s.halfSize[1],x[2]=4&e?s.halfSize[2]:-s.halfSize[2],l(x,x,g),this._renderCoordsHelper.fromRenderCoords(x,x,r),m(t,x,t)}}};e([i({constructOnly:!0})],j.prototype,"layerView",void 0),e([i({constructOnly:!0})],j.prototype,"intersectionHandler",void 0),e([i()],j.prototype,"view",void 0),e([i()],j.prototype,"spatialReference",null),j=e([o("esri.views.3d.layers.i3s.I3SElevationProvider")],j);const w=j;export{w as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{t,e}from"../../../../chunks/vec3.js";import{c as r}from"../../../../chunks/vec3f64.js";import{projectBuffer as o}from"../../../../geometry/projection/projectBuffer.js";import{create as n,set as a,NEGATIVE_INFINITY as m,expandWithBuffer as s,ZERO as f}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as u}from"../../../../geometry/support/DoubleArray.js";function c(t,e,r){const n=u(24);return u=>{let c=u.meta.featureExtents;if(null==c){c=new Float64Array(6*u.meta.featureIds.length),u.meta.featureExtents=c;for(let t=0;t<c.length;t+=6)c[t]=Number.POSITIVE_INFINITY}const p=new Float64Array(c.buffer,6*u.index*Float64Array.BYTES_PER_ELEMENT,6);return p[0]===Number.POSITIVE_INFINITY&&(i(u.index,r,u.meta.objectHandle,n,0),o(n,e,0,n,t,0,8)?(a(p,m),s(p,n,0,8)):a(p,f)),p}}function i(r,o,n,a,m){const s=o.getComponentAabb(n,r,l),f=o.getObjectTransform(n);for(let u=0;u<8;++u)I[0]=1&u?s[0]:s[3],I[1]=2&u?s[1]:s[4],I[2]=4&u?s[2]:s[5],t(I,I,f.rotationScale),e(I,I,f.position),a[m++]=I[0],a[m++]=I[1],a[m++]=I[2];return a}const p=24,l=n(),I=r();export{p as BOUNDING_BOX_CORNERS_POINTS_STRIDE,i as boundingBoxCornerPoints,c as createGetFeatureExtent};
|
|
5
|
+
import{t,g as e}from"../../../../chunks/vec3.js";import{c as r}from"../../../../chunks/vec3f64.js";import{projectBuffer as o}from"../../../../geometry/projection/projectBuffer.js";import{create as n,set as a,NEGATIVE_INFINITY as m,expandWithBuffer as s,ZERO as f}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as u}from"../../../../geometry/support/DoubleArray.js";function c(t,e,r){const n=u(24);return u=>{let c=u.meta.featureExtents;if(null==c){c=new Float64Array(6*u.meta.featureIds.length),u.meta.featureExtents=c;for(let t=0;t<c.length;t+=6)c[t]=Number.POSITIVE_INFINITY}const p=new Float64Array(c.buffer,6*u.index*Float64Array.BYTES_PER_ELEMENT,6);return p[0]===Number.POSITIVE_INFINITY&&(i(u.index,r,u.meta.objectHandle,n,0),o(n,e,0,n,t,0,8)?(a(p,m),s(p,n,0,8)):a(p,f)),p}}function i(r,o,n,a,m){const s=o.getComponentAabb(n,r,l),f=o.getObjectTransform(n);for(let u=0;u<8;++u)I[0]=1&u?s[0]:s[3],I[1]=2&u?s[1]:s[4],I[2]=4&u?s[2]:s[5],t(I,I,f.rotationScale),e(I,I,f.position),a[m++]=I[0],a[m++]=I[1],a[m++]=I[2];return a}const p=24,l=n(),I=r();export{p as BOUNDING_BOX_CORNERS_POINTS_STRIDE,i as boundingBoxCornerPoints,c as createGetFeatureExtent};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import t from"../../../../core/Accessor.js";import{PositionHint as r,indexOf as i}from"../../../../core/arrayUtils.js";import s from"../../../../core/Logger.js";import{clamp as n}from"../../../../core/mathUtils.js";import{unwrapUpdating as o,updating as a,isUpdating as l}from"../../../../core/maybeUpdating.js";import{whenOnce as c}from"../../../../core/reactiveUtils.js";import{getUnitString as p}from"../../../../core/unitUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import{subclass as g}from"../../../../core/accessorSupport/decorators/subclass.js";import{t as m,e as f,s as d}from"../../../../chunks/vec3.js";import{WhereClause as y}from"../../../../core/sql/WhereClause.js";import{getReferenceEllipsoid as h}from"../../../../geometry/ellipsoidUtils.js";import{load as j,project as S}from"../../../../geometry/projection.js";import{projectBoundingSphere as R}from"../../../../geometry/projection/projectBoundingSphere.js";import{projectVectorToVector as w}from"../../../../geometry/projection/projectVectorToVector.js";import{create as E}from"../../../../geometry/support/aaBoundingBox.js";import{fromValues as b,expandWithNestedArray as v,expand as F}from"../../../../geometry/support/aaBoundingRect.js";import{doubleArrayFrom as _}from"../../../../geometry/support/DoubleArray.js";import{earth as k}from"../../../../geometry/support/Ellipsoid.js";import{isWGS84 as I,isWebMercator as M}from"../../../../geometry/support/spatialReferenceUtils.js";import{f as T}from"../../../../chunks/sphere.js";import{project as D}from"../../../../geometry/support/webMercatorUtils.js";import G from"../../../../layers/support/FeatureFilter.js";import{objectIdFilter as C,filterInPlace as A}from"./I3SUtil.js";import x from"../../../../geometry/SpatialReference.js";const O="esri.views.3d.layers.i3s.I3SMeshViewFilter",B=s.getLogger(O);let L=class extends t{constructor(e){super(e),this._projectionEngineLoaded=!1}initialize(){c((()=>this.viewFilter?.geometry||null!=this.layerFilter)).then((()=>this.loadAsyncModule(import("../../../../geometry/geometryEngine.js").then((e=>{this.destroyed||(this._geometryEngine=e)})))))}get sortedObjectIds(){if(null==this.viewFilter||null==this.viewFilter.objectIds)return null;const e=_(this.viewFilter.objectIds);return e.sort(),e}get parsedWhereClause(){const e=null!=this.viewFilter?this.viewFilter.where:null;if(null==e||!e)return null;try{return y.create(e,this.layerFieldsIndex)}catch(t){B.error(`Failed to parse filter where clause: ${t}`)}return null}addFilters(e,t,r,i){const s=this.sortedObjectIds;null!=s&&e.push((e=>C(s,!0,e))),this.addSqlFilter(e,this.parsedWhereClause);const n=o(this._layerMaskGeometries),a=this._geometryEngine;if(null!=n&&null!=this.layerFilter&&null!=a){const s=this.layerFilter.spatialRelationship;e.push(((e,o)=>q(a,e,o,i,t,r,n,s)))}const l=o(this._viewMaskGeometries);if(null!=l&&null!=this.viewFilter&&null!=a){const s=this.viewFilter.spatialRelationship;e.push(((e,n)=>q(a,e,n,i,t,r,l,s)))}}isMBSGeometryVisible(e,t,r){const i=o(this._layerMaskGeometries),s=this._geometryEngine;if(null!=i&&null!=this.layerFilter&&null!=s){const n=this.layerFilter.spatialRelationship,o=i[0].spatialReference||t;if(!R(e,r,N,o))return B.warnOnce("SceneLayer.mask geometry is using unsupported SpatialReference, skipping geometry filter for MBS"),!0;return V(s,N,i,o,n)}const n=o(this._viewMaskGeometries);if(null!=n&&null!=this.viewFilter&&null!=s){const i=this.viewFilter.spatialRelationship,o=n[0].spatialReference||t;if(!R(e,r,N,o))return B.warnOnce("SceneLayerView.filter.geometry is using unsupported SpatialReference, skipping geometry filter for MBS"),!0;return V(s,N,n,o,i)}return!0}get parsedGeometry(){const e=o(this._viewMaskGeometries),t=o(this._layerMaskGeometries);return null==e||null==t?e||t:t.concat(e)}get _layerMaskGeometries(){const e=this.layerFilter;return null==e?null:null==this._geometryEngine?a:"disjoint"===e.spatialRelationship?e.geometries.map((e=>({type:"polygon",rings:e.rings,spatialReference:e.spatialReference,cache:{}}))):[e.geometries.reduce(((e,t)=>(e.rings=[...e.rings,...t.rings],e)),{type:"polygon",rings:[],spatialReference:e.geometries[0].spatialReference,cache:{}})]}get _viewMaskGeometries(){if(null==this.viewFilter)return null;const{geometry:e}=this.viewFilter;if(null==e)return null;if(null==this.viewFilter||null==this._geometryEngine)return a;const{distance:t,units:r}=this.viewFilter,i=this.viewFilter.spatialRelationship,s="mesh"===e.type?e.extent:e;if(null==t||0===t)return W(this._geometryEngine,s,i);const n=r||p(s.spatialReference);if(s.spatialReference.isWGS84){const e=this._geometryEngine.geodesicBuffer(s,t,n);return W(this._geometryEngine,e,i)}const o=D(s,x.WGS84);if(null!=o){const e=D(this._geometryEngine.geodesicBuffer(o,t,n),s.spatialReference);return W(this._geometryEngine,e,i)}if(!this._projectionEngineLoaded&&(this.loadAsyncModule(j().then((()=>this._projectionEngineLoaded=!0))),!this._projectionEngineLoaded))return null;let l=null;try{l=S(s,x.WGS84)}catch(c){}if(l)try{l=S(this._geometryEngine.geodesicBuffer(l,t,n),s.spatialReference)}catch(c){l=null}return l||B.error(`Filter by geodesic buffer (distance) unsupported, failed to project input geometry (${s.spatialReference.wkid}) to WGS84.`),W(this._geometryEngine,l,i)}get updating(){return l(this._layerMaskGeometries)||l(this._viewMaskGeometries)}static checkSupport(e){return null!=e&&(e.timeExtent?(B.warn("Filters with a timeExtent are not supported for mesh scene layers"),!1):!!U(e.spatialRelationship)||(B.warn(`Filters with spatialRelationship other than ${P.join(", ")} are not supported for mesh scene layers`),!1))}};e([u()],L.prototype,"layerFilter",void 0),e([u({type:G})],L.prototype,"viewFilter",void 0),e([u()],L.prototype,"layerFieldsIndex",void 0),e([u()],L.prototype,"loadAsyncModule",void 0),e([u()],L.prototype,"addSqlFilter",void 0),e([u({readOnly:!0})],L.prototype,"sortedObjectIds",null),e([u({readOnly:!0})],L.prototype,"parsedWhereClause",null),e([u({readOnly:!0})],L.prototype,"parsedGeometry",null),e([u({readOnly:!0})],L.prototype,"_layerMaskGeometries",null),e([u({readOnly:!0})],L.prototype,"_viewMaskGeometries",null),e([u()],L.prototype,"updating",null),e([u()],L.prototype,"_projectionEngineLoaded",void 0),e([u()],L.prototype,"_geometryEngine",void 0),L=e([g(O)],L);const P=(e=>e)(["contains","intersects","disjoint"]);function U(e){return null!=e&&P.includes(e)}var K;function W(e,t,s){if(null==t)return null;if("disjoint"===s&&"polygon"===t.type){const s=t.rings.length,n=t.spatialReference,o=new Array(s);for(let e=0;e<s;++e){const r=b(1/0,1/0,-1/0,-1/0);v(r,t.rings[e]),o[e]={type:"polygon",rings:[t.rings[e]],spatialReference:n,cache:{},aabr:r}}o.sort(((e,t)=>e.aabr[0]-t.aabr[0]));const a=new Set,l=new r;for(let t=0;t<o.length;++t){const r=o[t],s=r.aabr[0];a.forEach((t=>{if(s>=t.aabr[2])return void a.delete(t);if(r.aabr[1]>t.aabr[3]||r.aabr[3]<t.aabr[1]||!e.intersects(r,t))return;r.rings=r.rings.concat(t.rings),F(r.aabr,t.aabr,r.aabr),r.cache={},a.delete(t);const n=i(o,t,o.length,l);o.splice(n,1)})),a.add(r)}for(const e of o)e.aabr=void 0;return o}return[t]}function V(e,t,r,i,s){if(t[3]>=.5*(t[2]+h(i).radius))return!0;const n=z(e,t,i);return r.every((t=>H(e,t,n,s)!==K.DISCARD))}function q(e,t,r,i,s,n,o,a){const l=o[0].spatialReference||s.spatialReference;if(!R(r.node.mbs,n,N,l))return void B.warnOnce("SceneLayerView.filter.geometry is using unsupported SpatialReference, skipping geometry filter");const c=z(e,N,l),p=$(a,s,l,i,r.objectHandle);for(const u of o){if(0===t.length)return;switch(H(e,u,c,a)){case K.DISCARD:return void(t.length=0);case K.KEEP:continue}A(t,r.featureIds,(t=>Q(e,u,t,p)))}}!function(e){e[e.KEEP=0]="KEEP",e[e.DISCARD=1]="DISCARD",e[e.TEST=2]="TEST"}(K||(K={}));const N=T(0,0,0,0);function $(e,t,r,i,s){const n=t.renderSpatialReference,o=new Map,a={type:"polygon",rings:[[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]],spatialReference:r};a.rings[0][3]=a.rings[0][0];const l={indices:null,data:null,stride:0,startIndex:0,endIndex:0};let c,p;switch(e){case"intersects":c=(e,t,r)=>e.intersects(t,r)?K.KEEP:K.TEST,p=Z;break;case"contains":c=(e,t,r)=>e.contains(t,r)?K.TEST:K.DISCARD,p=Z;break;default:c=(e,t,r)=>e.disjoint(t,r)?K.TEST:K.DISCARD,p=J}return{collection:i,object:s,type:e,maskSR:r,renderSR:n,aabbCache:o,triangle:a,positions:l,triangleTest:c,geometryTest:p}}function z(e,t,r){const i={type:"point",x:t[0],y:t[1],hasZ:!1,hasM:!1,spatialReference:r},s=!I(r)&&!M(r),o=Number.isNaN(t[3])?0:n(t[3],0,2*k.radius),a=s?e.buffer(i,o,1):e.geodesicBuffer(i,o,1);return a.type="polygon",a}function H(e,t,r,i){switch(i){case"intersects":case"contains":return Z(e,t,r);case"disjoint":return J(e,t,r)}}function Z(e,t,r){return e.intersects(t,r)?e.contains(t,r)?K.KEEP:K.TEST:K.DISCARD}function J(e,t,r){return e.intersects(t,r)?e.contains(t,r)?K.DISCARD:K.TEST:K.KEEP}function Q(e,t,r,i){const{collection:s,object:n,renderSR:o,maskSR:a,geometryTest:l,aabbCache:c}=i;let p=c.get(r);if(!p){const e=s.getObjectTransform(n);s.getComponentAabb(n,r,X);const t=[[X[0],X[1],0],[X[0],X[4],0],[X[3],X[4],0],[X[3],X[1],0]];for(let r=0;r<4;++r)m(t[r],t[r],e.rotationScale),f(t[r],t[r],e.position),w(t[r],o,t[r],a);p={type:"polygon",rings:[t],spatialReference:a,cache:{}},p.rings[0][4]=p.rings[0][0],c.set(r,p)}switch(l(e,t,p)){case K.DISCARD:return!1;case K.KEEP:return!0}const{triangle:u,triangleTest:g,positions:y}=i,h=u.rings[0][0],j=u.rings[0][1],S=u.rings[0][2],R=s.getObjectTransform(n);s.getComponentPositions(n,r,y);const{indices:E,data:b,stride:v,startIndex:F,endIndex:_}=y;for(let k=F;k<_;k+=3){const r=v*E[k],i=v*E[k+1],s=v*E[k+2];switch(d(h,b[r],b[r+1],b[r+2]),d(j,b[i],b[i+1],b[i+2]),d(S,b[s],b[s+1],b[s+2]),m(h,h,R.rotationScale),m(j,j,R.rotationScale),m(S,S,R.rotationScale),f(h,h,R.position),f(j,j,R.position),f(S,S,R.position),w(h,o,h,a),w(j,o,j,a),w(S,o,S,a),g(e,t,u)){case K.DISCARD:return!1;case K.KEEP:return!0}}return"intersects"!==i.type}const X=E();export{L as I3SMeshViewFilter};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import t from"../../../../core/Accessor.js";import{PositionHint as r,indexOf as i}from"../../../../core/arrayUtils.js";import s from"../../../../core/Logger.js";import{clamp as n}from"../../../../core/mathUtils.js";import{unwrapUpdating as o,updating as a,isUpdating as l}from"../../../../core/maybeUpdating.js";import{whenOnce as c}from"../../../../core/reactiveUtils.js";import{getUnitString as p}from"../../../../core/unitUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import{subclass as g}from"../../../../core/accessorSupport/decorators/subclass.js";import{t as m,g as f,s as d}from"../../../../chunks/vec3.js";import{WhereClause as y}from"../../../../core/sql/WhereClause.js";import{getReferenceEllipsoid as h}from"../../../../geometry/ellipsoidUtils.js";import{load as j,project as S}from"../../../../geometry/projection.js";import{projectBoundingSphere as R}from"../../../../geometry/projection/projectBoundingSphere.js";import{projectVectorToVector as w}from"../../../../geometry/projection/projectVectorToVector.js";import{create as E}from"../../../../geometry/support/aaBoundingBox.js";import{fromValues as b,expandWithNestedArray as v,expand as F}from"../../../../geometry/support/aaBoundingRect.js";import{doubleArrayFrom as _}from"../../../../geometry/support/DoubleArray.js";import{earth as k}from"../../../../geometry/support/Ellipsoid.js";import{isWGS84 as I,isWebMercator as M}from"../../../../geometry/support/spatialReferenceUtils.js";import{f as T}from"../../../../chunks/sphere.js";import{project as D}from"../../../../geometry/support/webMercatorUtils.js";import G from"../../../../layers/support/FeatureFilter.js";import{objectIdFilter as C,filterInPlace as A}from"./I3SUtil.js";import x from"../../../../geometry/SpatialReference.js";const O="esri.views.3d.layers.i3s.I3SMeshViewFilter",B=s.getLogger(O);let L=class extends t{constructor(e){super(e),this._projectionEngineLoaded=!1}initialize(){c((()=>this.viewFilter?.geometry||null!=this.layerFilter)).then((()=>this.loadAsyncModule(import("../../../../geometry/geometryEngine.js").then((e=>{this.destroyed||(this._geometryEngine=e)})))))}get sortedObjectIds(){if(null==this.viewFilter||null==this.viewFilter.objectIds)return null;const e=_(this.viewFilter.objectIds);return e.sort(),e}get parsedWhereClause(){const e=null!=this.viewFilter?this.viewFilter.where:null;if(null==e||!e)return null;try{return y.create(e,this.layerFieldsIndex)}catch(t){B.error(`Failed to parse filter where clause: ${t}`)}return null}addFilters(e,t,r,i){const s=this.sortedObjectIds;null!=s&&e.push((e=>C(s,!0,e))),this.addSqlFilter(e,this.parsedWhereClause);const n=o(this._layerMaskGeometries),a=this._geometryEngine;if(null!=n&&null!=this.layerFilter&&null!=a){const s=this.layerFilter.spatialRelationship;e.push(((e,o)=>q(a,e,o,i,t,r,n,s)))}const l=o(this._viewMaskGeometries);if(null!=l&&null!=this.viewFilter&&null!=a){const s=this.viewFilter.spatialRelationship;e.push(((e,n)=>q(a,e,n,i,t,r,l,s)))}}isMBSGeometryVisible(e,t,r){const i=o(this._layerMaskGeometries),s=this._geometryEngine;if(null!=i&&null!=this.layerFilter&&null!=s){const n=this.layerFilter.spatialRelationship,o=i[0].spatialReference||t;if(!R(e,r,N,o))return B.warnOnce("SceneLayer.mask geometry is using unsupported SpatialReference, skipping geometry filter for MBS"),!0;return V(s,N,i,o,n)}const n=o(this._viewMaskGeometries);if(null!=n&&null!=this.viewFilter&&null!=s){const i=this.viewFilter.spatialRelationship,o=n[0].spatialReference||t;if(!R(e,r,N,o))return B.warnOnce("SceneLayerView.filter.geometry is using unsupported SpatialReference, skipping geometry filter for MBS"),!0;return V(s,N,n,o,i)}return!0}get parsedGeometry(){const e=o(this._viewMaskGeometries),t=o(this._layerMaskGeometries);return null==e||null==t?e||t:t.concat(e)}get _layerMaskGeometries(){const e=this.layerFilter;return null==e?null:null==this._geometryEngine?a:"disjoint"===e.spatialRelationship?e.geometries.map((e=>({type:"polygon",rings:e.rings,spatialReference:e.spatialReference,cache:{}}))):[e.geometries.reduce(((e,t)=>(e.rings=[...e.rings,...t.rings],e)),{type:"polygon",rings:[],spatialReference:e.geometries[0].spatialReference,cache:{}})]}get _viewMaskGeometries(){if(null==this.viewFilter)return null;const{geometry:e}=this.viewFilter;if(null==e)return null;if(null==this.viewFilter||null==this._geometryEngine)return a;const{distance:t,units:r}=this.viewFilter,i=this.viewFilter.spatialRelationship,s="mesh"===e.type?e.extent:e;if(null==t||0===t)return W(this._geometryEngine,s,i);const n=r||p(s.spatialReference);if(s.spatialReference.isWGS84){const e=this._geometryEngine.geodesicBuffer(s,t,n);return W(this._geometryEngine,e,i)}const o=D(s,x.WGS84);if(null!=o){const e=D(this._geometryEngine.geodesicBuffer(o,t,n),s.spatialReference);return W(this._geometryEngine,e,i)}if(!this._projectionEngineLoaded&&(this.loadAsyncModule(j().then((()=>this._projectionEngineLoaded=!0))),!this._projectionEngineLoaded))return null;let l=null;try{l=S(s,x.WGS84)}catch(c){}if(l)try{l=S(this._geometryEngine.geodesicBuffer(l,t,n),s.spatialReference)}catch(c){l=null}return l||B.error(`Filter by geodesic buffer (distance) unsupported, failed to project input geometry (${s.spatialReference.wkid}) to WGS84.`),W(this._geometryEngine,l,i)}get updating(){return l(this._layerMaskGeometries)||l(this._viewMaskGeometries)}static checkSupport(e){return null!=e&&(e.timeExtent?(B.warn("Filters with a timeExtent are not supported for mesh scene layers"),!1):!!U(e.spatialRelationship)||(B.warn(`Filters with spatialRelationship other than ${P.join(", ")} are not supported for mesh scene layers`),!1))}};e([u()],L.prototype,"layerFilter",void 0),e([u({type:G})],L.prototype,"viewFilter",void 0),e([u()],L.prototype,"layerFieldsIndex",void 0),e([u()],L.prototype,"loadAsyncModule",void 0),e([u()],L.prototype,"addSqlFilter",void 0),e([u({readOnly:!0})],L.prototype,"sortedObjectIds",null),e([u({readOnly:!0})],L.prototype,"parsedWhereClause",null),e([u({readOnly:!0})],L.prototype,"parsedGeometry",null),e([u({readOnly:!0})],L.prototype,"_layerMaskGeometries",null),e([u({readOnly:!0})],L.prototype,"_viewMaskGeometries",null),e([u()],L.prototype,"updating",null),e([u()],L.prototype,"_projectionEngineLoaded",void 0),e([u()],L.prototype,"_geometryEngine",void 0),L=e([g(O)],L);const P=(e=>e)(["contains","intersects","disjoint"]);function U(e){return null!=e&&P.includes(e)}var K;function W(e,t,s){if(null==t)return null;if("disjoint"===s&&"polygon"===t.type){const s=t.rings.length,n=t.spatialReference,o=new Array(s);for(let e=0;e<s;++e){const r=b(1/0,1/0,-1/0,-1/0);v(r,t.rings[e]),o[e]={type:"polygon",rings:[t.rings[e]],spatialReference:n,cache:{},aabr:r}}o.sort(((e,t)=>e.aabr[0]-t.aabr[0]));const a=new Set,l=new r;for(let t=0;t<o.length;++t){const r=o[t],s=r.aabr[0];a.forEach((t=>{if(s>=t.aabr[2])return void a.delete(t);if(r.aabr[1]>t.aabr[3]||r.aabr[3]<t.aabr[1]||!e.intersects(r,t))return;r.rings=r.rings.concat(t.rings),F(r.aabr,t.aabr,r.aabr),r.cache={},a.delete(t);const n=i(o,t,o.length,l);o.splice(n,1)})),a.add(r)}for(const e of o)e.aabr=void 0;return o}return[t]}function V(e,t,r,i,s){if(t[3]>=.5*(t[2]+h(i).radius))return!0;const n=z(e,t,i);return r.every((t=>H(e,t,n,s)!==K.DISCARD))}function q(e,t,r,i,s,n,o,a){const l=o[0].spatialReference||s.spatialReference;if(!R(r.node.mbs,n,N,l))return void B.warnOnce("SceneLayerView.filter.geometry is using unsupported SpatialReference, skipping geometry filter");const c=z(e,N,l),p=$(a,s,l,i,r.objectHandle);for(const u of o){if(0===t.length)return;switch(H(e,u,c,a)){case K.DISCARD:return void(t.length=0);case K.KEEP:continue}A(t,r.featureIds,(t=>Q(e,u,t,p)))}}!function(e){e[e.KEEP=0]="KEEP",e[e.DISCARD=1]="DISCARD",e[e.TEST=2]="TEST"}(K||(K={}));const N=T(0,0,0,0);function $(e,t,r,i,s){const n=t.renderSpatialReference,o=new Map,a={type:"polygon",rings:[[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]],spatialReference:r};a.rings[0][3]=a.rings[0][0];const l={indices:null,data:null,stride:0,startIndex:0,endIndex:0};let c,p;switch(e){case"intersects":c=(e,t,r)=>e.intersects(t,r)?K.KEEP:K.TEST,p=Z;break;case"contains":c=(e,t,r)=>e.contains(t,r)?K.TEST:K.DISCARD,p=Z;break;default:c=(e,t,r)=>e.disjoint(t,r)?K.TEST:K.DISCARD,p=J}return{collection:i,object:s,type:e,maskSR:r,renderSR:n,aabbCache:o,triangle:a,positions:l,triangleTest:c,geometryTest:p}}function z(e,t,r){const i={type:"point",x:t[0],y:t[1],hasZ:!1,hasM:!1,spatialReference:r},s=!I(r)&&!M(r),o=Number.isNaN(t[3])?0:n(t[3],0,2*k.radius),a=s?e.buffer(i,o,1):e.geodesicBuffer(i,o,1);return a.type="polygon",a}function H(e,t,r,i){switch(i){case"intersects":case"contains":return Z(e,t,r);case"disjoint":return J(e,t,r)}}function Z(e,t,r){return e.intersects(t,r)?e.contains(t,r)?K.KEEP:K.TEST:K.DISCARD}function J(e,t,r){return e.intersects(t,r)?e.contains(t,r)?K.DISCARD:K.TEST:K.KEEP}function Q(e,t,r,i){const{collection:s,object:n,renderSR:o,maskSR:a,geometryTest:l,aabbCache:c}=i;let p=c.get(r);if(!p){const e=s.getObjectTransform(n);s.getComponentAabb(n,r,X);const t=[[X[0],X[1],0],[X[0],X[4],0],[X[3],X[4],0],[X[3],X[1],0]];for(let r=0;r<4;++r)m(t[r],t[r],e.rotationScale),f(t[r],t[r],e.position),w(t[r],o,t[r],a);p={type:"polygon",rings:[t],spatialReference:a,cache:{}},p.rings[0][4]=p.rings[0][0],c.set(r,p)}switch(l(e,t,p)){case K.DISCARD:return!1;case K.KEEP:return!0}const{triangle:u,triangleTest:g,positions:y}=i,h=u.rings[0][0],j=u.rings[0][1],S=u.rings[0][2],R=s.getObjectTransform(n);s.getComponentPositions(n,r,y);const{indices:E,data:b,stride:v,startIndex:F,endIndex:_}=y;for(let k=F;k<_;k+=3){const r=v*E[k],i=v*E[k+1],s=v*E[k+2];switch(d(h,b[r],b[r+1],b[r+2]),d(j,b[i],b[i+1],b[i+2]),d(S,b[s],b[s+1],b[s+2]),m(h,h,R.rotationScale),m(j,j,R.rotationScale),m(S,S,R.rotationScale),f(h,h,R.position),f(j,j,R.position),f(S,S,R.position),w(h,o,h,a),w(j,o,j,a),w(S,o,S,a),g(e,t,u)){case K.DISCARD:return!1;case K.KEEP:return!0}}return"intersects"!==i.type}const X=E();export{L as I3SMeshViewFilter};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{a as t}from"../../../../chunks/mat4f64.js";import{c as o}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as n}from"../../../../geometry/ellipsoidUtils.js";import{computeTranslationToOriginAndRotation as a}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";function r(o,n,r,s){const i=c(o,n,r),h=t();return a(r,i,h,s),h}const s=1,i=5-s;function c(t,a,r){const c=o(),h=t[3],e=2**(Math.ceil(Math.log(h)*Math.LOG2E/i)*i+s);if(r.isGeographic){const o=e/n(r).radius*180/Math.PI,a=Math.round(t[1]/o),s=Math.max(-90,Math.min(90,a*o)),i=o/Math.cos((Math.abs(s)-o/2)/180*Math.PI),h=Math.round(t[0]/i)*i;c[0]=h,c[1]=s}else{const o=Math.round(t[0]/e),n=Math.round(t[1]/e);c[0]=o*e,c[1]=n*e}const m=t[2]+a,M=Math.round(m/e);return c[2]=M*e,c}export{r as computeGlobalTransformation,c as getLocalOrigin};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../request.js";import{binaryIndexOf as t,splitIntoChunks as r}from"../../../../core/arrayUtils.js";import n from"../../../../core/Error.js";import has from"../../../../core/has.js";import{isInt16Array as o,isInt32Array as a}from"../../../../core/typedArrayUtil.js";import{a as i}from"../../../../chunks/mat3.js";import{c as s}from"../../../../chunks/mat3f64.js";import{a as l}from"../../../../chunks/mat4.js";import{c}from"../../../../chunks/mat4f64.js";import{c as u,m as f,a as p}from"../../../../chunks/quat.js";import{b as m}from"../../../../chunks/quatf64.js";import{s as h,i as d,A as y,y as g,b,e as S,m as w}from"../../../../chunks/vec3.js";import{c as T}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as E}from"../../../../geometry/ellipsoidUtils.js";import{canProjectWithoutEngine as v}from"../../../../geometry/projection.js";import j from"../../../../geometry/SpatialReference.js";import{getSphericalPCPF as M}from"../../../../geometry/spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as I}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as x}from"../../../../geometry/projection/projectVectorToVector.js";import{create as q,empty as k,expandPointInPlace as C,intersects as U}from"../../../../geometry/support/aaBoundingRect.js";import{isPlateCarree as N}from"../../../../geometry/support/spatialReferenceUtils.js";import z from"../../../../rest/support/Query.js";import{readBinaryAttribute as A}from"./I3SBinaryReader.js";import{computeGlobalTransformation as W}from"./I3SProjectionUtil.js";import{createSolidEdgeMaterial as D,createMaterialFromEdges as F}from"../support/edgeUtils.js";import{parseColorMixMode as O,ColorMixModeEnum as _}from"../support/symbolColorUtils.js";import{create as L,compute as G,corners as K}from"../../support/orientedBoundingBox.js";import{Attribute as B}from"../../webgl-engine/lib/Attribute.js";function P(e){return e?parseInt(e.substring(e.lastIndexOf("/")+1,e.length),10):void 0}function $(e){if(has("disable-feature:i3s-draco")||!e)return!1;for(const t of e)for(const e of t.geometryBuffers)if("draco"===e.compressedAttributes?.encoding)return!0;return!1}function V(e,t,r,n){r.traverse(t,(t=>{const r=t.mbs;return(null!=r&&Y(e,r))!==X.OUTSIDE&&(n(t),!0)}))}function Q(e,t,r){let n=0,o=0;for(let a=0;a<t.length&&n<e.length;a++)e[n]===t[a]&&(r(a)&&(e[o]=e[n],o++),n++);e.length=o}function Z(e,r,n){let o=0,a=0;for(;o<n.length;){t(e,n[o])>=0===r&&(n[a]=n[o],a++),o++}n.length=a}const H=q();function J(e,t){if(0===t.rotationScale[1]&&0===t.rotationScale[2]&&0===t.rotationScale[3]&&0===t.rotationScale[5]&&0===t.rotationScale[6]&&0===t.rotationScale[7])return H[0]=(e[0]-t.position[0])/t.rotationScale[0],H[1]=(e[1]-t.position[1])/t.rotationScale[4],H[2]=(e[2]-t.position[0])/t.rotationScale[0],H[3]=(e[3]-t.position[1])/t.rotationScale[4],H}var X;function Y(e,t){const r=t[0],n=t[1],o=t[3],a=e[0]-r,i=r-e[2],s=e[1]-n,l=n-e[3],c=Math.max(a,i,0),u=Math.max(s,l,0),f=c*c+u*u;if(f>o*o)return X.OUTSIDE;if(f>0)return X.INTERSECTS_CENTER_OUTSIDE;return-Math.max(a,i,s,l)>o?X.INSIDE:X.INTERSECTS_CENTER_INSIDE}function ee(e,t,r){const n=[],o=r&&r.missingFields,a=r&&r.originalFields;for(const i of e){const e=i.toLowerCase();let r=!1;for(const o of t)if(e===o.name.toLowerCase()){n.push(o.name),r=!0,a&&a.push(i);break}!r&&o&&o.push(i)}return n}async function te(e,t,r,o,a){if(0===t.length)return[];const i=e.attributeStorageInfo;if(null!=e.associatedLayer)try{return await ne(e.associatedLayer,t,r,o)}catch(s){if(e.associatedLayer.loaded)throw s}if(i){const s=re(t,r,a);if(null==s)throw new n("scenelayer:features-not-loaded","Tried to query attributes for unloaded features");const l=e.parsedUrl.path;return(await Promise.all(s.map((e=>ae(l,i,e.node,e.indices,o).then((t=>{for(let r=0;r<e.graphics.length;r++){const n=e.graphics[r],o=t[r];if(n.attributes)for(const e in n.attributes)e in o||(o[e]=n.attributes[e]);n.attributes=o}return e.graphics})))))).flat()}throw new n("scenelayer:no-attribute-source","This scene layer does not have a source for attributes available")}function re(e,t,r){const n=new Map,o=[],a=r();for(const i of e){const e=i.attributes[t];for(let t=0;t<a.length;t++){const r=a[t],s=r.featureIds.indexOf(e);if(s>=0){let e=n.get(r.node);e||(e={node:r.node,indices:[],graphics:[]},o.push(e),n.set(r.node,e)),e.indices.push(s),e.graphics.push(i);for(let r=t;r>0;r--)a[r]=a[r-1];a[0]=r;break}}}return o}async function ne(e,t,r,n){t.sort(((e,t)=>e.attributes[r]-t.attributes[r]));const o=t.map((e=>e.attributes[r])),a=[],i=ee(n,e.fields,{originalFields:a}),s=await oe(e,o,i);for(let l=0;l<t.length;l++){const e=t[l],r=s[l],n={};if(e.attributes)for(const t in e.attributes)n[t]=e.attributes[t];for(let t=0;t<a.length;t++)n[a[t]]=r[i[t]];e.attributes=n}return t}function oe(e,t,o){const a=e.capabilities.query.maxRecordCount;if(null!=a&&t.length>a){const n=r(t,a);return Promise.all(n.map((t=>oe(e,t,o)))).then((e=>e.flat()))}const i=new z({objectIds:t,outFields:o,orderByFields:[e.objectIdField]});return e.queryFeatures(i).then((e=>{if(e&&e.features&&e.features.length===t.length)return e.features.map((e=>e.attributes));throw new n("scenelayer:feature-not-in-associated-layer","Feature not found in associated feature layer")}))}function ae(e,t,r,n,o){return ie(e,t,r.resources.attributes,n,o)}async function ie(t,r,n,o,a){const i=[];for(const e of r)if(e&&a.includes(e.name)){const r=`${t}/nodes/${n}/attributes/${e.key}/0`;i.push({url:r,storageInfo:e})}const s=await Promise.allSettled(i.map((t=>e(t.url,{responseType:"array-buffer"}).then((e=>A(t.storageInfo,e.data)))))),l=[];for(const e of o){const t={};for(let r=0;r<s.length;r++){const n=s[r];if("fulfilled"===n.status){const o=n.value;t[i[r].storageInfo.name]=ce(o,e)}}l.push(t)}return l}!function(e){e[e.OUTSIDE=0]="OUTSIDE",e[e.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",e[e.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",e[e.INSIDE=3]="INSIDE"}(X||(X={}));const se=-32768,le=-(2**31);function ce(e,t){if(!e)return null;const r=e[t];if(o(e))return r===se?null:r;if(a(e))return r===le?null:r;return r!=r?null:r}function ue(e){const t=e.store,r=t.indexCRS||t.geographicCRS,o=void 0===r?t.indexWKT:void 0;if(o){if(!e.spatialReference)throw new n("layerview:no-store-spatial-reference-wkt-index-and-no-layer-spatial-reference","Found indeWKT in the scene layer store but no layer spatial reference",{});if(o!==e.spatialReference.wkt)throw new n("layerview:store-spatial-reference-wkt-index-incompatible","The indeWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const a=r?new j(P(r)):e.spatialReference;return a.equals(e.spatialReference)?e.spatialReference:a}function fe(e){const t=e.store,r=t.vertexCRS||t.projectedCRS,o=void 0===r?t.vertexWKT:void 0;if(o){if(!e.spatialReference)throw new n("layerview:no-store-spatial-reference-wkt-vertex-and-no-layer-spatial-reference","Found vertexWKT in the scene layer store but no layer spatial reference",{});if(o!==e.spatialReference.wkt)throw new n("layerview:store-spatial-reference-wkt-vertex-incompatible","The vertexWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const a=r?new j(P(r)):e.spatialReference;return a.equals(e.spatialReference)?e.spatialReference:a}function pe(e,t){return null==t?"@null":t===M(t)?"@ECEF":e.equals(t)?"":null!=t.wkid?"@"+t.wkid:null}function me(e,t,r){if(!v(e,t))throw new n("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{});if("local"===r&&!de(e,t))throw new n("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{})}function he(e,t,r){if(e.serviceUpdateTimeStamp?.lastUpdate!==t.serviceUpdateTimeStamp?.lastUpdate||!r.isEmpty||e.associatedLayer?.url!==t.associatedLayer?.url)throw new n("layerview:recycle-failed")}function de(e,t){return e.equals(t)||e.isWGS84&&t.isWebMercator||e.isWebMercator&&t.isWGS84}function ye(e,t,r){const n=ue(e),o=fe(e);me(n,t,r),me(o,t,r)}function ge(e){return(null==e.geometryType||"triangles"===e.geometryType)&&((null==e.topology||"PerAttributeArray"===e.topology)&&(null!=e.vertexAttributes&&null!=e.vertexAttributes.position))}function be(e){if(null==e.store||null==e.store.defaultGeometrySchema||!ge(e.store.defaultGeometrySchema))throw new n("scenelayer:unsupported-geometry-schema","The geometry schema of this scene layer is not supported.",{url:e.parsedUrl.path})}function Se(e,t){ye(e,t.spatialReference,t.viewingMode)}function we(e){return null!=e.geometryType&&"points"===e.geometryType&&((null==e.topology||"PerAttributeArray"===e.topology)&&((null==e.encoding||""===e.encoding||"lepcc-xyz"===e.encoding)&&(null!=e.vertexAttributes&&null!=e.vertexAttributes.position)))}function Te(e){if(null==e.store||null==e.store.defaultGeometrySchema||!we(e.store.defaultGeometrySchema))throw new n("pointcloud:unsupported-geometry-schema","The geometry schema of this point cloud scene layer is not supported.",{})}function Ee(e,t){me(e.spatialReference,t.spatialReference,t.viewingMode)}function ve(e){return"simple"===e.type||"class-breaks"===e.type||"unique-value"===e.type}function je(e){return"mesh-3d"===e.type}function Me(e){if(null==e||!ve(e))return!0;if(("unique-value"===e.type||"class-breaks"===e.type)&&null==e.defaultSymbol)return!0;const t=e.getSymbols();if(0===t.length)return!0;for(const r of t){if(!je(r)||0===r.symbolLayers.length)return!0;for(const e of r.symbolLayers.items)if("fill"!==e.type||null==e.material||null==e.material.color||"replace"!==e.material.colorMixMode)return!0}return!1}const Re=D({color:[0,0,0,0],opacity:0});class Ie{constructor(){this.edgeMaterial=null,this.material=null,this.castShadows=!0}}function xe(e){const t=new Ie;let r=!1,n=!1;for(const o of e.symbolLayers.items)if("fill"===o.type&&o.enabled){const e=o.material,a=o.edges;if(null!=e&&!r){const n=e.color,a=O(e.colorMixMode);t.material=null!=n?{color:[n.r/255,n.g/255,n.b/255],alpha:n.a,colorMixMode:a}:{color:[1,1,1],alpha:1,colorMixMode:_.Multiply},t.castShadows=o.castShadows,r=!0}null==a||n||(t.edgeMaterial=F(a,{}),n=!0)}return t.material||(t.material={color:[1,1,1],alpha:1,colorMixMode:_.Multiply}),t}function qe(e,t){return(0|e)+(0|t)|0}function ke(e,t,r,n,o=0){n===M(n)?t.isGeographic?_e(e,r,t,o):Oe(e,r,t,o):t.isWGS84&&(n.isWebMercator||N(n))?Ce(t,e,n,r,o):t.isWebMercator&&N(n)?De(t,e,n,r,o):e===r?(r.center[2]+=o,I(r.center,t,0,r.center,n,0,1)):(h(r.center,e.center[0],e.center[1],e.center[2]+o),I(r.center,t,0,r.center,n,0,1),u(r.quaternion,e.quaternion),d(r.halfSize,e.halfSize))}function Ce(e,t,r,n,o){d(Ae,t.center),Ae[2]+=o;const a=M(r);I(Ae,e,0,Ae,a,0,1),Fe(a,t,Ae,r,n)}const Ue=new Array(24),Ne=new B(Ue,3,!0),ze=T(),Ae=T(),We=s();function De(e,t,r,n,o){d(Ae,t.center),Ae[2]+=o,Fe(e,t,Ae,r,n)}function Fe(e,t,r,n,o){const a=i(We,t.quaternion);for(let i=0;i<8;++i){for(let e=0;e<3;++e)ze[e]=t.halfSize[e]*(0!=(i&1<<e)?-1:1);for(let e=0;e<3;++e){let t=r[e];for(let r=0;r<3;++r)t+=ze[r]*a[3*r+e];Ue[3*i+e]=t}}I(Ue,e,0,Ue,n,0,8),G(Ne,o)}function Oe(e,t,r,n){K(e,Qe),h(t.center,e.center[0],e.center[1],e.center[2]+n),R(r,t.center,$e,M(r)),h(t.center,$e[12],$e[13],$e[14]);const o=2*Math.sqrt(1+$e[0]+$e[5]+$e[10]);Ve[0]=($e[6]-$e[9])/o,Ve[1]=($e[8]-$e[2])/o,Ve[2]=($e[1]-$e[4])/o,Ve[3]=.25*o,f(t.quaternion,Ve,e.quaternion),p(Ve,t.quaternion);let a=0,i=0,s=0;for(const l of Qe)l[2]+=n,I(l,r,0,l,M(r),0,1),y(Xe,l,t.center),g(Xe,Xe,Ve),a=Math.max(a,Math.abs(Xe[0])),i=Math.max(i,Math.abs(Xe[1])),s=Math.max(s,Math.abs(Xe[2]));h(t.halfSize,a,i,s)}function _e(e,t,r,n){const o=E(r),a=1+Math.max(0,n)/(o.radius+e.center[2]);h(t.center,e.center[0],e.center[1],e.center[2]+n),I(t.center,r,0,t.center,M(r),0,1),u(t.quaternion,e.quaternion),p(Ve,e.quaternion),h(Xe,0,0,1),g(Xe,Xe,Ve),h(Xe,e.halfSize[0]*Math.abs(Xe[0]),e.halfSize[1]*Math.abs(Xe[1]),e.halfSize[2]*Math.abs(Xe[2])),b(Xe,Xe,o.inverseFlattening),S(t.halfSize,e.halfSize,Xe),b(t.halfSize,t.halfSize,a)}function Le(e,t,r,n,o,a){if(!a||0===a.length||null==t||!e.mbs)return null;const i=W(e.mbs,o,r,t);l(et,i);let s=null;const c=()=>{if(!s)if(s=Qe,k(He),null!=e.serviceObb){ke(e.serviceObb,r,Je,t,o),K(Je,s);for(const e of s)w(e,e,et),C(He,e)}else{const n=e.mbs;if(!n)return;const a=n[3];x(n,r,Xe,t),w(Xe,Xe,et),Xe[2]+=o;for(let e=0;e<8;++e){const t=1&e?a:-a,r=2&e?a:-a,n=4&e?a:-a,o=s[e];d(o,[Xe[0]+t,Xe[1]+r,Xe[2]+n]),C(He,o)}}};let u=1/0,f=-1/0;const p=e=>{if("replace"!==e.type)return;const r=e.geometry;if(!r?.hasZ)return;k(Ze);const o=r.spatialReference||n,a=r.rings.reduce(((e,r)=>r.reduce(((e,r)=>(x(r,o,Xe,t),w(Xe,Xe,et),C(Ze,Xe),Math.min(Xe[2],e))),e)),1/0);c(),U(He,Ze)&&(u=Math.min(u,a),f=Math.max(f,a))};if(a.forEach((e=>p(e))),u===1/0)return null;const m=(e,t,r)=>{w(Xe,r,i),e[t]=Xe[0],e[t+1]=Xe[1],e[t+2]=Xe[2],t+=24,r[2]=u,w(Xe,r,i),e[t]=Xe[0],e[t+1]=Xe[1],e[t+2]=Xe[2],t+=24,r[2]=f,w(Xe,r,i),e[t]=Xe[0],e[t+1]=Xe[1],e[t+2]=Xe[2]};for(let l=0;l<8;++l)m(Ye.data,3*l,s[l]);return G(Ye)}function Ge(e){return null!=e&&e.halfSize[0]>=0}function Ke(e){return e[3]>=0}function Be(e){null!=e&&(e.halfSize[0]=-1)}function Pe(e){null!=e&&(e[3]=-1)}const $e=c(),Ve=m(),Qe=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Ze=q(),He=q(),Je=L(),Xe=T(),Ye={data:new Array(72),size:3,exclusive:!0,stride:3},et=c();export{X as MbsIntersectResult,Ie as SymbolInfo,qe as addWraparound,Ee as checkPointCloudLayerCompatibleWithView,Te as checkPointCloudLayerValid,he as checkRecyclable,Se as checkSceneLayerCompatibleWithView,be as checkSceneLayerValid,me as checkSpatialReference,ye as checkSpatialReferences,Le as computeVisibilityObb,$ as containsDraco,P as extractWkid,Q as filterInPlace,ee as findFieldsCaseInsensitive,V as findIntersectingNodes,pe as getCacheKeySuffix,ce as getCachedAttributeValue,J as getClipRect,ue as getIndexCrs,xe as getSymbolInfo,fe as getVertexCrs,Y as intersectBoundingRectWithMbs,Pe as invalidateMbs,Be as invalidateObb,de as isSupportedLocalModeProjection,Ke as isValidMbs,Ge as isValidObb,Z as objectIdFilter,ie as queryAttributesFromCachedAttributesId,Me as rendererNeedsTextures,ke as transformObb,Re as transparentEdgeMaterial,te as whenGraphicAttributes};
|
|
5
|
+
import e from"../../../../request.js";import{binaryIndexOf as t,splitIntoChunks as r}from"../../../../core/arrayUtils.js";import n from"../../../../core/Error.js";import has from"../../../../core/has.js";import{isInt16Array as o,isInt32Array as a}from"../../../../core/typedArrayUtil.js";import{b as i}from"../../../../chunks/mat3.js";import{a as s}from"../../../../chunks/mat3f64.js";import{i as l}from"../../../../chunks/mat4.js";import{a as c}from"../../../../chunks/mat4f64.js";import{c as u,m as f,a as p}from"../../../../chunks/quat.js";import{a as m}from"../../../../chunks/quatf64.js";import{s as h,c as d,r as y,u as g,i as b,g as S,e as w}from"../../../../chunks/vec3.js";import{c as T}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as E}from"../../../../geometry/ellipsoidUtils.js";import{canProjectWithoutEngine as v}from"../../../../geometry/projection.js";import j from"../../../../geometry/SpatialReference.js";import{getSphericalPCPF as M}from"../../../../geometry/spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as I}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as x}from"../../../../geometry/projection/projectVectorToVector.js";import{create as q,empty as k,expandPointInPlace as C,intersects as U}from"../../../../geometry/support/aaBoundingRect.js";import{isPlateCarree as N}from"../../../../geometry/support/spatialReferenceUtils.js";import z from"../../../../rest/support/Query.js";import{readBinaryAttribute as W}from"./I3SBinaryReader.js";import{computeGlobalTransformation as A}from"./I3SProjectionUtil.js";import{createSolidEdgeMaterial as D,createMaterialFromEdges as F}from"../support/edgeUtils.js";import{parseColorMixMode as O,ColorMixModeEnum as _}from"../support/symbolColorUtils.js";import{create as L,compute as G,corners as K}from"../../support/orientedBoundingBox.js";import{Attribute as B}from"../../webgl-engine/lib/Attribute.js";function P(e){return e?parseInt(e.substring(e.lastIndexOf("/")+1,e.length),10):void 0}function $(e){if(has("disable-feature:i3s-draco")||!e)return!1;for(const t of e)for(const e of t.geometryBuffers)if("draco"===e.compressedAttributes?.encoding)return!0;return!1}function V(e,t,r,n){r.traverse(t,(t=>{const r=t.mbs;return(null!=r&&Y(e,r))!==X.OUTSIDE&&(n(t),!0)}))}function Q(e,t,r){let n=0,o=0;for(let a=0;a<t.length&&n<e.length;a++)e[n]===t[a]&&(r(a)&&(e[o]=e[n],o++),n++);e.length=o}function Z(e,r,n){let o=0,a=0;for(;o<n.length;){t(e,n[o])>=0===r&&(n[a]=n[o],a++),o++}n.length=a}const H=q();function J(e,t){if(0===t.rotationScale[1]&&0===t.rotationScale[2]&&0===t.rotationScale[3]&&0===t.rotationScale[5]&&0===t.rotationScale[6]&&0===t.rotationScale[7])return H[0]=(e[0]-t.position[0])/t.rotationScale[0],H[1]=(e[1]-t.position[1])/t.rotationScale[4],H[2]=(e[2]-t.position[0])/t.rotationScale[0],H[3]=(e[3]-t.position[1])/t.rotationScale[4],H}var X;function Y(e,t){const r=t[0],n=t[1],o=t[3],a=e[0]-r,i=r-e[2],s=e[1]-n,l=n-e[3],c=Math.max(a,i,0),u=Math.max(s,l,0),f=c*c+u*u;if(f>o*o)return X.OUTSIDE;if(f>0)return X.INTERSECTS_CENTER_OUTSIDE;return-Math.max(a,i,s,l)>o?X.INSIDE:X.INTERSECTS_CENTER_INSIDE}function ee(e,t,r){const n=[],o=r&&r.missingFields,a=r&&r.originalFields;for(const i of e){const e=i.toLowerCase();let r=!1;for(const o of t)if(e===o.name.toLowerCase()){n.push(o.name),r=!0,a&&a.push(i);break}!r&&o&&o.push(i)}return n}async function te(e,t,r,o,a){if(0===t.length)return[];const i=e.attributeStorageInfo;if(null!=e.associatedLayer)try{return await ne(e.associatedLayer,t,r,o)}catch(s){if(e.associatedLayer.loaded)throw s}if(i){const s=re(t,r,a);if(null==s)throw new n("scenelayer:features-not-loaded","Tried to query attributes for unloaded features");const l=e.parsedUrl.path;return(await Promise.all(s.map((e=>ae(l,i,e.node,e.indices,o).then((t=>{for(let r=0;r<e.graphics.length;r++){const n=e.graphics[r],o=t[r];if(n.attributes)for(const e in n.attributes)e in o||(o[e]=n.attributes[e]);n.attributes=o}return e.graphics})))))).flat()}throw new n("scenelayer:no-attribute-source","This scene layer does not have a source for attributes available")}function re(e,t,r){const n=new Map,o=[],a=r();for(const i of e){const e=i.attributes[t];for(let t=0;t<a.length;t++){const r=a[t],s=r.featureIds.indexOf(e);if(s>=0){let e=n.get(r.node);e||(e={node:r.node,indices:[],graphics:[]},o.push(e),n.set(r.node,e)),e.indices.push(s),e.graphics.push(i);for(let r=t;r>0;r--)a[r]=a[r-1];a[0]=r;break}}}return o}async function ne(e,t,r,n){t.sort(((e,t)=>e.attributes[r]-t.attributes[r]));const o=t.map((e=>e.attributes[r])),a=[],i=ee(n,e.fields,{originalFields:a}),s=await oe(e,o,i);for(let l=0;l<t.length;l++){const e=t[l],r=s[l],n={};if(e.attributes)for(const t in e.attributes)n[t]=e.attributes[t];for(let t=0;t<a.length;t++)n[a[t]]=r[i[t]];e.attributes=n}return t}function oe(e,t,o){const a=e.capabilities.query.maxRecordCount;if(null!=a&&t.length>a){const n=r(t,a);return Promise.all(n.map((t=>oe(e,t,o)))).then((e=>e.flat()))}const i=new z({objectIds:t,outFields:o,orderByFields:[e.objectIdField]});return e.queryFeatures(i).then((e=>{if(e&&e.features&&e.features.length===t.length)return e.features.map((e=>e.attributes));throw new n("scenelayer:feature-not-in-associated-layer","Feature not found in associated feature layer")}))}function ae(e,t,r,n,o){return ie(e,t,r.resources.attributes,n,o)}async function ie(t,r,n,o,a){const i=[];for(const e of r)if(e&&a.includes(e.name)){const r=`${t}/nodes/${n}/attributes/${e.key}/0`;i.push({url:r,storageInfo:e})}const s=await Promise.allSettled(i.map((t=>e(t.url,{responseType:"array-buffer"}).then((e=>W(t.storageInfo,e.data)))))),l=[];for(const e of o){const t={};for(let r=0;r<s.length;r++){const n=s[r];if("fulfilled"===n.status){const o=n.value;t[i[r].storageInfo.name]=ce(o,e)}}l.push(t)}return l}!function(e){e[e.OUTSIDE=0]="OUTSIDE",e[e.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",e[e.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",e[e.INSIDE=3]="INSIDE"}(X||(X={}));const se=-32768,le=-(2**31);function ce(e,t){if(!e)return null;const r=e[t];if(o(e))return r===se?null:r;if(a(e))return r===le?null:r;return r!=r?null:r}function ue(e){const t=e.store,r=t.indexCRS||t.geographicCRS,o=void 0===r?t.indexWKT:void 0;if(o){if(!e.spatialReference)throw new n("layerview:no-store-spatial-reference-wkt-index-and-no-layer-spatial-reference","Found indeWKT in the scene layer store but no layer spatial reference",{});if(o!==e.spatialReference.wkt)throw new n("layerview:store-spatial-reference-wkt-index-incompatible","The indeWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const a=r?new j(P(r)):e.spatialReference;return a.equals(e.spatialReference)?e.spatialReference:a}function fe(e){const t=e.store,r=t.vertexCRS||t.projectedCRS,o=void 0===r?t.vertexWKT:void 0;if(o){if(!e.spatialReference)throw new n("layerview:no-store-spatial-reference-wkt-vertex-and-no-layer-spatial-reference","Found vertexWKT in the scene layer store but no layer spatial reference",{});if(o!==e.spatialReference.wkt)throw new n("layerview:store-spatial-reference-wkt-vertex-incompatible","The vertexWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const a=r?new j(P(r)):e.spatialReference;return a.equals(e.spatialReference)?e.spatialReference:a}function pe(e,t){return null==t?"@null":t===M(t)?"@ECEF":e.equals(t)?"":null!=t.wkid?"@"+t.wkid:null}function me(e,t,r){if(!v(e,t))throw new n("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{});if("local"===r&&!de(e,t))throw new n("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{})}function he(e,t,r){if(e.serviceUpdateTimeStamp?.lastUpdate!==t.serviceUpdateTimeStamp?.lastUpdate||!r.isEmpty||e.associatedLayer?.url!==t.associatedLayer?.url)throw new n("layerview:recycle-failed")}function de(e,t){return e.equals(t)||e.isWGS84&&t.isWebMercator||e.isWebMercator&&t.isWGS84}function ye(e,t,r){const n=ue(e),o=fe(e);me(n,t,r),me(o,t,r)}function ge(e){return(null==e.geometryType||"triangles"===e.geometryType)&&((null==e.topology||"PerAttributeArray"===e.topology)&&(null!=e.vertexAttributes&&null!=e.vertexAttributes.position))}function be(e){if(null==e.store||null==e.store.defaultGeometrySchema||!ge(e.store.defaultGeometrySchema))throw new n("scenelayer:unsupported-geometry-schema","The geometry schema of this scene layer is not supported.",{url:e.parsedUrl.path})}function Se(e,t){ye(e,t.spatialReference,t.viewingMode)}function we(e){return null!=e.geometryType&&"points"===e.geometryType&&((null==e.topology||"PerAttributeArray"===e.topology)&&((null==e.encoding||""===e.encoding||"lepcc-xyz"===e.encoding)&&(null!=e.vertexAttributes&&null!=e.vertexAttributes.position)))}function Te(e){if(null==e.store||null==e.store.defaultGeometrySchema||!we(e.store.defaultGeometrySchema))throw new n("pointcloud:unsupported-geometry-schema","The geometry schema of this point cloud scene layer is not supported.",{})}function Ee(e,t){me(e.spatialReference,t.spatialReference,t.viewingMode)}function ve(e){return"simple"===e.type||"class-breaks"===e.type||"unique-value"===e.type}function je(e){return"mesh-3d"===e.type}function Me(e){if(null==e||!ve(e))return!0;if(("unique-value"===e.type||"class-breaks"===e.type)&&null==e.defaultSymbol)return!0;const t=e.getSymbols();if(0===t.length)return!0;for(const r of t){if(!je(r)||0===r.symbolLayers.length)return!0;for(const e of r.symbolLayers.items)if("fill"!==e.type||null==e.material||null==e.material.color||"replace"!==e.material.colorMixMode)return!0}return!1}const Re=D({color:[0,0,0,0],opacity:0});class Ie{constructor(){this.edgeMaterial=null,this.material=null,this.castShadows=!0}}function xe(e){const t=new Ie;let r=!1,n=!1;for(const o of e.symbolLayers.items)if("fill"===o.type&&o.enabled){const e=o.material,a=o.edges;if(null!=e&&!r){const n=e.color,a=O(e.colorMixMode);t.material=null!=n?{color:[n.r/255,n.g/255,n.b/255],alpha:n.a,colorMixMode:a}:{color:[1,1,1],alpha:1,colorMixMode:_.Multiply},t.castShadows=o.castShadows,r=!0}null==a||n||(t.edgeMaterial=F(a,{}),n=!0)}return t.material||(t.material={color:[1,1,1],alpha:1,colorMixMode:_.Multiply}),t}function qe(e,t){return(0|e)+(0|t)|0}function ke(e,t,r,n,o=0){n===M(n)?t.isGeographic?_e(e,r,t,o):Oe(e,r,t,o):t.isWGS84&&(n.isWebMercator||N(n))?Ce(t,e,n,r,o):t.isWebMercator&&N(n)?De(t,e,n,r,o):e===r?(r.center[2]+=o,I(r.center,t,0,r.center,n,0,1)):(h(r.center,e.center[0],e.center[1],e.center[2]+o),I(r.center,t,0,r.center,n,0,1),u(r.quaternion,e.quaternion),d(r.halfSize,e.halfSize))}function Ce(e,t,r,n,o){d(We,t.center),We[2]+=o;const a=M(r);I(We,e,0,We,a,0,1),Fe(a,t,We,r,n)}const Ue=new Array(24),Ne=new B(Ue,3,!0),ze=T(),We=T(),Ae=s();function De(e,t,r,n,o){d(We,t.center),We[2]+=o,Fe(e,t,We,r,n)}function Fe(e,t,r,n,o){const a=i(Ae,t.quaternion);for(let i=0;i<8;++i){for(let e=0;e<3;++e)ze[e]=t.halfSize[e]*(0!=(i&1<<e)?-1:1);for(let e=0;e<3;++e){let t=r[e];for(let r=0;r<3;++r)t+=ze[r]*a[3*r+e];Ue[3*i+e]=t}}I(Ue,e,0,Ue,n,0,8),G(Ne,o)}function Oe(e,t,r,n){K(e,Qe),h(t.center,e.center[0],e.center[1],e.center[2]+n),R(r,t.center,$e,M(r)),h(t.center,$e[12],$e[13],$e[14]);const o=2*Math.sqrt(1+$e[0]+$e[5]+$e[10]);Ve[0]=($e[6]-$e[9])/o,Ve[1]=($e[8]-$e[2])/o,Ve[2]=($e[1]-$e[4])/o,Ve[3]=.25*o,f(t.quaternion,Ve,e.quaternion),p(Ve,t.quaternion);let a=0,i=0,s=0;for(const l of Qe)l[2]+=n,I(l,r,0,l,M(r),0,1),y(Xe,l,t.center),g(Xe,Xe,Ve),a=Math.max(a,Math.abs(Xe[0])),i=Math.max(i,Math.abs(Xe[1])),s=Math.max(s,Math.abs(Xe[2]));h(t.halfSize,a,i,s)}function _e(e,t,r,n){const o=E(r),a=1+Math.max(0,n)/(o.radius+e.center[2]);h(t.center,e.center[0],e.center[1],e.center[2]+n),I(t.center,r,0,t.center,M(r),0,1),u(t.quaternion,e.quaternion),p(Ve,e.quaternion),h(Xe,0,0,1),g(Xe,Xe,Ve),h(Xe,e.halfSize[0]*Math.abs(Xe[0]),e.halfSize[1]*Math.abs(Xe[1]),e.halfSize[2]*Math.abs(Xe[2])),b(Xe,Xe,o.inverseFlattening),S(t.halfSize,e.halfSize,Xe),b(t.halfSize,t.halfSize,a)}function Le(e,t,r,n,o,a){if(!a||0===a.length||null==t||!e.mbs)return null;const i=A(e.mbs,o,r,t);l(et,i);let s=null;const c=()=>{if(!s)if(s=Qe,k(He),null!=e.serviceObb){ke(e.serviceObb,r,Je,t,o),K(Je,s);for(const e of s)w(e,e,et),C(He,e)}else{const n=e.mbs;if(!n)return;const a=n[3];x(n,r,Xe,t),w(Xe,Xe,et),Xe[2]+=o;for(let e=0;e<8;++e){const t=1&e?a:-a,r=2&e?a:-a,n=4&e?a:-a,o=s[e];d(o,[Xe[0]+t,Xe[1]+r,Xe[2]+n]),C(He,o)}}};let u=1/0,f=-1/0;const p=e=>{if("replace"!==e.type)return;const r=e.geometry;if(!r?.hasZ)return;k(Ze);const o=r.spatialReference||n,a=r.rings.reduce(((e,r)=>r.reduce(((e,r)=>(x(r,o,Xe,t),w(Xe,Xe,et),C(Ze,Xe),Math.min(Xe[2],e))),e)),1/0);c(),U(He,Ze)&&(u=Math.min(u,a),f=Math.max(f,a))};if(a.forEach((e=>p(e))),u===1/0)return null;const m=(e,t,r)=>{w(Xe,r,i),e[t]=Xe[0],e[t+1]=Xe[1],e[t+2]=Xe[2],t+=24,r[2]=u,w(Xe,r,i),e[t]=Xe[0],e[t+1]=Xe[1],e[t+2]=Xe[2],t+=24,r[2]=f,w(Xe,r,i),e[t]=Xe[0],e[t+1]=Xe[1],e[t+2]=Xe[2]};for(let l=0;l<8;++l)m(Ye.data,3*l,s[l]);return G(Ye)}function Ge(e){return null!=e&&e.halfSize[0]>=0}function Ke(e){return e[3]>=0}function Be(e){null!=e&&(e.halfSize[0]=-1)}function Pe(e){null!=e&&(e[3]=-1)}const $e=c(),Ve=m(),Qe=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Ze=q(),He=q(),Je=L(),Xe=T(),Ye={data:new Array(72),size:3,exclusive:!0,stride:3},et=c();export{X as MbsIntersectResult,Ie as SymbolInfo,qe as addWraparound,Ee as checkPointCloudLayerCompatibleWithView,Te as checkPointCloudLayerValid,he as checkRecyclable,Se as checkSceneLayerCompatibleWithView,be as checkSceneLayerValid,me as checkSpatialReference,ye as checkSpatialReferences,Le as computeVisibilityObb,$ as containsDraco,P as extractWkid,Q as filterInPlace,ee as findFieldsCaseInsensitive,V as findIntersectingNodes,pe as getCacheKeySuffix,ce as getCachedAttributeValue,J as getClipRect,ue as getIndexCrs,xe as getSymbolInfo,fe as getVertexCrs,Y as intersectBoundingRectWithMbs,Pe as invalidateMbs,Be as invalidateObb,de as isSupportedLocalModeProjection,Ke as isValidMbs,Ge as isValidObb,Z as objectIdFilter,ie as queryAttributesFromCachedAttributesId,Me as rendererNeedsTextures,ke as transformObb,Re as transparentEdgeMaterial,te as whenGraphicAttributes};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{a as e,
|
|
5
|
+
import{a as e,m as t,l as i,i as s,j as r,o as n,f as o,g as a}from"../../../../chunks/vec3.js";import{c as h}from"../../../../chunks/vec3f64.js";import{c}from"../../../../chunks/vec4.js";import{getReferenceEllipsoid as l}from"../../../../geometry/ellipsoidUtils.js";import{getSphericalPCPF as m}from"../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingSphere as p}from"../../../../geometry/projection/projectBoundingSphere.js";import{create as u,fromMatrix as _,intersectsSphere as d}from"../../../../geometry/support/frustum.js";import{isPlateCarree as g}from"../../../../geometry/support/spatialReferenceUtils.js";import{w as v}from"../../../../chunks/sphere.js";import{makeDehydratedPoint as b}from"../../../../layers/graphics/dehydratedPoint.js";import{evaluateElevationAlignmentAtPoint as x}from"../graphics/elevationAlignmentUtils.js";import{ElevationContext as f}from"../graphics/ElevationContext.js";import{createContextWithoutExpressionSupport as M,extractExpressionInfo as R}from"../graphics/featureExpressionInfoUtils.js";import{expandElevationRange as C,LodMetric as D}from"./I3SNode.js";import{isValidMbs as S,isValidObb as E,transformObb as P,intersectBoundingRectWithMbs as O,MbsIntersectResult as L}from"./I3SUtil.js";import{create as j,computeOffsetObb as B,isVisible as F}from"../../support/orientedBoundingBox.js";const y=1e5;class I{constructor(e,t,i,s,r,n,o,a,c={}){this._indexSR=e,this._renderCoordsHelper=t,this._clippingArea=r,this._elevationProvider=n,this._viewingMode=o,this._options=c,this._frustum=u(),this._useFrustumCulling=!1,this._poi=h(),this._elevationContext=null,this.minDistance=1/0,this.maxDistance=0,this.maxLodLevel=2,this._tmpObb=j(),this._tmp1=h(),this._tmp2=h(),this._tmp3=h(),this._tmp0=h(),this._screenspaceErrorBias=c.screenspaceErrorBias||1,this._progressiveLoadFactor=c.progressiveLoadFactor||1,this.updateCamera(i,s),this.engineSR=this._renderCoordsHelper.spatialReference,this.updateElevationInfo(a),this._tmpPoint=b(0,0,0,e),this._isECEFOBBInLocalMode=this._indexSR.isWGS84&&(this.engineSR.isWebMercator||g(this.engineSR)),this._indexSREllipsoidRadius=l(this._indexSR).radius}updateElevationInfo(e){null!=e?(this._elevationContext=f.fromElevationInfo(e),this._elevationContext.updateFeatureExpressionInfoContext(M(R(e,!1)))):this._elevationContext=null}updateCamera(e,t){this._useFrustumCulling=t,t&&_(e.viewMatrix,e.projectionMatrix,this._frustum),this._screenSizeFactor=1/(e.perScreenPixelRatio/2),this._camPos=e.eye,this.minDistance=1/0,this.maxDistance=0}setPointOfInterest(e){this._poi=e}updateScreenSpaceErrorBias(e){const t=this._screenspaceErrorBias;return this._screenspaceErrorBias=e,t}updateClippingArea(e){this._clippingArea=e}expandElevationRange(e,t,i){if(null==this._elevationContext)return;const s=e.mbs;if(!s)return;if(t&&this._elevationProvider.getSphereElevationBounds){const e=this._elevationProvider.getSphereElevationBounds?.(s,this._indexSR);return void(e&&C(i,e.min,e.max))}const r=s[0],n=s[1],o=s[2],a="relative-to-scene"===this._elevationContext.mode?"scene":"ground",h=this._elevationProvider.getElevation(r,n,o,this._indexSR,a);h&&C(i,h,h);const c=t?null:this._elevationProvider.getRootElevationBounds?.();c&&C(i,c.min,c.max)}getRenderMbs(e){const t=e.renderMbs;if(S(t))return t;e.mbs&&c(t,e.mbs);const i=e.elevationRangeMin;if(this._elevationContext&&Number.isFinite(i)){let s=0,r=0;const n=e.elevationRangeMax;switch(this._elevationContext.mode){case"relative-to-ground":s=this._elevationContext.geometryZWithOffset(t[2],this._renderCoordsHelper)+i-t[2],r=n-i;break;case"on-the-ground":s=i-t[2],r=n-i}t[2]+=s+.5*r,t[3]+=.5*r}else this._elevationContext&&t[3]<y&&(this._tmpPoint.x=t[0],this._tmpPoint.y=t[1],this._tmpPoint.z=t[2],t[2]=x(this._tmpPoint,this._elevationProvider,this._elevationContext,this._renderCoordsHelper));return p(t,this._indexSR,t,this.engineSR),t}getVisibilityObb(e){if(null!=e.visibilityObb)return e.visibilityObb;const t=e.serviceObb,i=.01*this._indexSREllipsoidRadius;return null==t||!e.mbs||!E(t)||this._isECEFOBBInLocalMode&&t.halfSize.some((e=>e>i))?null:(e.serviceObbInRenderSR=this._computeRenderObb(t,e.serviceObbInRenderSR,e.mbs[3],e.elevationRangeMin,e.elevationRangeMax),e.serviceObbInRenderSR)}_computeRenderObb(e,t,i,s,r){if(null==t)t=j();else if(E(t))return t;let n=0,o=0;if(this._elevationContext&&!Number.isNaN(s)&&Number.isFinite(s))switch(this._elevationContext.mode){case"relative-to-ground":n=this._elevationContext.geometryZWithOffset(e.center[2],this._renderCoordsHelper)+s-e.center[2],o=r-s;break;case"on-the-ground":n=s-e.center[2],o=r-s}else this._elevationContext&&i<y&&(this._tmpPoint.x=e.center[0],this._tmpPoint.y=e.center[1],this._tmpPoint.z=e.center[2],n=x(this._tmpPoint,this._elevationProvider,this._elevationContext,this._renderCoordsHelper)-e.center[2]);return o>0?(P(e,this._indexSR,this._tmpObb,this.engineSR,n),B(this._tmpObb,0,o,this._viewingMode,t)):P(e,this._indexSR,t,this.engineSR,n),t}isNodeVisible(e){const t=this.getRenderMbs(e);if(!this._isMBSinClippingArea(t))return!1;if(!this._useFrustumCulling)return!0;const i=this.getVisibilityObb(e);return null!=i?F(i,this._frustum):d(this._frustum,v(t))}isGeometryVisible(e){if(!this._useFrustumCulling)return!0;const t=e.geometryObb;return null!=t?F(t,this._frustum):this.isNodeVisible(e)}_isMBSinClippingArea(e){return null==this._clippingArea||O(this._clippingArea,e)!==L.OUTSIDE}_screenSpaceDiameterMbs(t,i){const s=this.getRenderMbs(t),r=Math.sqrt(e(s,this._camPos)),n=r-s[3];return this._updateMinMaxDistance(r),n<0?.5*Number.MAX_VALUE:i/n*this._screenSizeFactor}calcCameraDistance(e){return this.calcCameraDistanceToCenter(e)-this.getRenderMbs(e)[3]}calcCameraDistanceToCenter(e){const i=this.getRenderMbs(e),s=t(i,this._camPos);return this._updateMinMaxDistance(s),s}calcAngleDependentLoD(e){const s=this.getRenderMbs(e),r=s[3],n=(Math.abs(s[0]*(s[0]-this._camPos[0])+s[1]*(s[1]-this._camPos[1])+s[2]*(s[2]-this._camPos[2]))/i(s)+r)/t(s,this._camPos);return Math.min(1,n)}hasLOD(e){return e.lodMetric!==D.None}_getDistancePlanarMode(e,t){const i=e[0]-t[0],s=e[1]-t[1],r=e[2]-t[2],n=i*i+s*s,o=t[3];if(n<=o*o)return Math.abs(r);const a=Math.sqrt(n)-o;return Math.sqrt(r*r+a*a)}_getDistanceGlobeMode(h,c){const l=i(c),m=i(h)-l;s(this._tmp0,h,r(h,c)/n(h));const p=e(c,this._tmp0),u=c[3];if(p<=u*u)return Math.abs(m);{const e=s(this._tmp0,c,1/l),n=l,p=u*u/2/n,_=s(this._tmp1,e,n-p),d=h,g=o(this._tmp2,d,_),v=o(this._tmp2,g,s(this._tmp3,e,r(e,g))),b=a(this._tmp2,_,s(this._tmp2,v,u/i(v)));let x=t(d,b);if(m>=2e5){const t=o(this._tmp1,d,b);let s=r(t,e)/i(t);s<.08&&(s=1e-4),x/=s}return x}}_getDistance(e,t){return this.engineSR===m(this.engineSR)?this._getDistanceGlobeMode(e,t):this._getDistancePlanarMode(e,t)}_updateMinMaxDistance(e){e>0?(this.minDistance=Math.min(this.minDistance,e),this.maxDistance=Math.max(this.maxDistance,e)):(this.minDistance=0,this.maxDistance=Math.max(this.maxDistance,-e))}getLodLevel(e){if(e.lodMetric===D.None)return 0;if(0===e.childCount)return this.maxLodLevel;if(this._useFrustumCulling&&this._progressiveLoadFactor<1){const t=this._progressiveLoadFactor*this._screenspaceErrorBias,i=this._screenspaceErrorBias;return this.evaluateLODmetric(e,t)?this.evaluateLODmetric(e,i)?2:1:0}return this.evaluateLODmetric(e,this._screenspaceErrorBias)?this.maxLodLevel:0}evaluateLODmetric(e,t){switch(e.lodMetric){case D.ScreenSpaceRelative:{const i=this.getRenderMbs(e),s=this._getDistance(this._camPos,i),r=2*s/this._screenSizeFactor,n=s+i[3];return this._updateMinMaxDistance(n),e.maxError*t<=r}case D.MaxScreenThreshold:{let i=this._screenSpaceDiameterMbs(e,e.mbs[3]*t);return this._options.angleDependentLoD&&(i*=this.calcAngleDependentLoD(e)),i<e.maxError}case D.RemovedFeatureDiameter:return this._screenSpaceDiameterMbs(e,e.maxError)*t<10;case D.DistanceRangeFromDefaultCamera:return this.calcCameraDistance(e)>e.maxError*t}return!1}distToPOI(e){const i=this.getRenderMbs(e);return t(i,this._poi)-i[3]}distCameraToPOI(){return t(this._camPos,this._poi)}}export{I as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{j as e}from"../../../../chunks/vec3.js";function t(e,t,g){for(let n=0;n<t.length;n++)r[n]=!1,o[n]=null;for(let r=0;r<e.length;r++)n[r]=!1,l[r]=null;for(let n=0;n<t.length;n++){const o=h(t[n],e,g);o>=0&&(r[n]=!0,null!=l[o]?l[o].push(t[n]):l[o]=[t[n]])}for(let l=0;l<e.length;l++){const r=h(e[l],t,g);r>=0&&(n[l]=!0,null!=o[r]?o[r].push(e[l]):o[r]=[e[l]])}const u=[];for(let r=0;r<e.length;r++)null!=l[r]||n[r]||u.push({load:[],remove:[e[r]]});for(let n=0;n<t.length;n++)null!=o[n]||r[n]||u.push({load:[t[n]],remove:[]});for(let n=0;n<t.length;n++)null!=o[n]&&(o[n].length>1||o[n][0]!==t[n])&&u.push({load:[t[n]],remove:o[n]});for(let n=0;n<e.length;n++)null!=l[n]&&(l[n].length>1||l[n][0]!==e[n])&&u.push({load:l[n],remove:[e[n]]});return u}const n=[!1],l=[null],r=[!1],o=[null];function h(e,t,n){let l=e;for(;l>0;){const e=t.indexOf(l);if(e>=0)return e;l=n.getParentId(l)}return t.indexOf(l)}function g(t,n,l){return t.sort(((t,r)=>{if(0===t.load.length&&0===r.load.length)return 0;if(0===t.load.length)return-1;if(0===r.load.length)return 1;if(0===t.remove.length&&0===r.remove.length){const o=l.getRenderCenter(t.load[0]),h=l.getRenderCenter(r.load[0]);return e(o,n)-e(h,n)}if(0===t.remove.length)return-1;if(0===r.remove.length)return 1;if(1===t.load.length&&1===r.load.length){const o=l.getRenderCenter(t.load[0]),h=l.getRenderCenter(r.load[0]);return e(o,n)-e(h,n)}if(1===t.load.length)return-1;if(1===r.load.length)return 1;{const o=l.getRenderCenter(t.remove[0]),h=l.getRenderCenter(r.remove[0]);return e(o,n)-e(h,n)}}))}function u(e,t,n){for(let l=0;l<e.length;++l){const r=e[l];r.load.length>t&&1===r.remove.length&&d(e,r,n)}}function d(e,t,n){const l=[t.remove[0]],r=[];for(;1===l.length;){const e=l.pop();r.length=0;for(let o=0;o<t.load.length;o++){let h=t.load[o],g=n.getParentId(h);for(;g!==e;)h=g,g=n.getParentId(h);let u=l.indexOf(h);u<0&&(u=l.length,l.push(h),r.push([])),r[u].push(t.load[o])}}t.load=l;for(let o=0;o<l.length;o++)r[o].length>1?e.push({remove:[l[o]],load:r[o]}):l[o]=r[o][0]}export{t as nodeDiff,g as sortFrontToBack,u as splitWorkEntries,d as splitWorkEntry};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{disposeMaybe as t}from"../../../../core/maybe.js";import s from"../../../../core/PooledArray.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{disposeMaybe as t}from"../../../../core/maybe.js";import s from"../../../../core/PooledArray.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{f as n,l as o,i as a,E as l,j as h,o as c}from"../../../../chunks/vec3.js";import{c as u}from"../../../../chunks/vec3f64.js";import{s as d}from"../../../../chunks/vec4.js";import{create as p,offset as m,contains as g,containsPoint as _,set as f,POSITIVE_INFINITY as P,equals as b}from"../../../../geometry/support/aaBoundingBox.js";import{create as S}from"../../../../geometry/support/plane.js";import{fromPoints as x}from"../../../../geometry/support/ray.js";import{PclTarget as z}from"./Intersector.js";import{PointHighlights as w}from"./PointHighlights.js";import{minimumDistancePlane as R,maximumDistancePlane as j,intersectLine as y,toAaBoundingBox as q}from"../../support/orientedBoundingBox.js";import{ShaderOutput as A}from"../../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SyncPrepareRenderPlugin as I}from"../../webgl-engine/effects/RenderPlugin.js";import{Default3D as v}from"../../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{newIntersectorResult as E}from"../../webgl-engine/lib/Intersector.js";import{IntersectorType as F,StoreResults as C}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{RenderSlot as O}from"../../webgl-engine/lib/RenderSlot.js";import{VertexArrayObject as T}from"../../webgl-engine/lib/VertexArrayObject.js";import{VertexAttribute as L}from"../../webgl-engine/lib/VertexAttribute.js";import{P as N,a as H,g as B}from"../../../../chunks/PointRenderer.glsl.js";import{PointRendererTechnique as M}from"../../webgl-engine/shaders/PointRendererTechnique.js";import{PointRendererTechniqueConfiguration as D}from"../../webgl-engine/shaders/PointRendererTechniqueConfiguration.js";import{BufferObject as U}from"../../../webgl/BufferObject.js";import{DataType as V,PrimitiveType as W,Usage as k}from"../../../webgl/enums.js";import{VertexElementDescriptor as G}from"../../../webgl/VertexElementDescriptor.js";const Q={positions:[new G(L.POSITION,3,V.FLOAT,0,12)],colors:[new G(L.COLOR,3,V.UNSIGNED_BYTE,0,3,!0)]};let Y=class extends I{constructor(e){super(e),this.type=F.PCL,this.isGround=!1,this.renderSlots=[O.OPAQUE_MATERIAL],this._passParameters=new N,this._highlights=new w({forEachNode:e=>this.forEachNode(e),addHighlight:(e,t,s)=>this._addHighlight(e,t,s),removeHighlight:(e,t)=>this._removeHighlight(e,t)}),this.layerUid="",this._slicePlaneEnabled=!1,this._techniqueConfig=new D,this._nodes=new s}produces(e,t){return t!==A.Highlight||!this._highlights.empty}initializeRenderContext(e){this._context=e,e.requestRender()}uninitializeRenderContext(){}intersect(e,t,s,i){const r=u(),f=u(),P=u(),b=u(),w=S(),A=e.camera.perScreenPixelRatio/2,I=e.camera.near;n(f,i,s);const v=1/o(f);a(f,f,v),l(P,f),d(w,f[0],f[1],f[2],-h(f,s));const F=new ie,O=new ie,T=new Array,L=p(),N=p(this._passParameters.clipBox);m(N,-s[0],-s[1],-s[2],N),this._nodes.forAll((o=>{const a=o.splatSize*this._passParameters.scaleFactor;let l=R(o.obb,w),u=j(o.obb,w);l-=Z(a,l+I,this._passParameters,A,o.isLeaf),u-=Z(a,u+I,this._passParameters,A,o.isLeaf);const d=u<0,p=null!=F.dist&&null!=O.dist&&F.dist<l*v&&O.dist>u*v;if(d||p)return;const S=X(a,u+I,this._passParameters,A,o.isLeaf);if(!y(o.obb,s,f,S))return;const x=S*S;q(o.obb,L),m(L,-s[0],-s[1],-s[2],L);const z=!g(N,L);n(b,o.origin,s);const E=o.coordinates.length/3;for(let n=0;n<E;n++){if(r[0]=b[0]+o.coordinates[3*n],r[1]=b[1]+o.coordinates[3*n+1],r[2]=b[2]+o.coordinates[3*n+2],z&&!_(N,r))continue;const l=h(r,f),u=c(r)-l*l;if(u>x)continue;let d=l+I;const p=Z(a,d,this._passParameters,A,o.isLeaf);if(l-p<0)continue;d-=p;const m=X(a,d,this._passParameters,A,o.isLeaf);if(u>m*m)continue;const g=(l-p)*v,S=e=>(e.point=$(o,n,e.point),e.dist=g,e.normal=P,e.node=o,e.pointId=n,e.layerUid=this.layerUid,e);if((null==F.dist||g<F.dist)&&(null==t||t(s,i,g))&&S(F),e.options.store!==C.MIN&&(null==O.dist||g>O.dist)&&(null==t||t(s,i,g))&&S(O),e.options.store===C.ALL&&(null==t||t(s,i,g))){const e=new ie;T.push(S(e))}}}));const H=e=>{const{layerUid:t,node:s,pointId:i}=e;return new z(e.point,t,i,(()=>this.createGraphic(s,i,e.point)))},B=(e,t)=>{const s=H(t);e.set(this.type,s,t.dist,t.normal)};if(re(F)){const t=e.results.min;(null==t.dist||F.dist<t.dist)&&B(t,F)}if(re(O)&&e.options.store!==C.MIN){const t=e.results.max;(null==t.dist||O.dist>t.dist)&&B(t,O)}if(e.options.store===C.ALL){const t=x(s,i);for(const s of T){const i=E(t);B(i,s),e.results.all.push(i)}}}prepareTechnique(e){return 0===this._nodes.length||e.output!==A.Color&&e.output!==A.Depth&&e.output!==A.Highlight?null:(this._nodes.forAll((t=>{null==t.vao&&this._initNode(e,t)})),this._techniqueConfig.drawScreenSize=this._passParameters.drawScreenSpace,this._techniqueConfig.useFixedSizes=this._passParameters.useFixedSizes,this._techniqueConfig.hasSlicePlane=this._slicePlaneEnabled,this._techniqueConfig.hasOccludees=e.bindParameters.hasOccludees,this._techniqueConfig.clippingEnabled=this._clippingEnabled,this._techniqueConfig.output=e.output===A.Depth?A.Depth:e.output===A.Highlight?A.Highlight:A.Color,this._context.techniqueRepository.releaseAndAcquire(M,this._techniqueConfig,this._technique))}render(e,t){const s=e.rctx,i=s.bindTechnique(t,this._passParameters,e.bindParameters),r=e.output===A.Highlight;this._nodes.forAll((t=>{0===t.coordinates.length||r&&!t.highlights||(i.bindDraw(t,e.bindParameters,this._passParameters),s.bindVAO(t.vao),r?this._renderHighlightFragments(s,t):s.drawArrays(W.POINTS,0,t.coordinates.length/3))}))}_renderHighlightFragments(e,t){const s=t.highlights;if(null==s)return;let i=s[0].component,r=i+1;for(let o=1;o<s.length;o++){const t=s[o].component;if(t!==r){const s=r-i;s>0&&e.drawArrays(W.POINTS,i,s),i=t}r=t+1}const n=r-i;n>0&&e.drawArrays(W.POINTS,i,n)}set useFixedSizes(e){this._passParameters.useFixedSizes!==e&&(this._passParameters.useFixedSizes=e,this._requestRender())}get useFixedSizes(){return this._passParameters.useFixedSizes}set scaleFactor(e){this._passParameters.scaleFactor!==e&&(this._passParameters.scaleFactor=e,this._requestRender())}get scaleFactor(){return this._passParameters.scaleFactor}set minSizePx(e){this._passParameters.minSizePx!==e&&(this._passParameters.minSizePx=e,this._requestRender())}get minSizePx(){return this._passParameters.minSizePx}set useRealWorldSymbolSizes(e){this._passParameters.useRealWorldSymbolSizes!==e&&(this._passParameters.useRealWorldSymbolSizes=e,this._requestRender())}get useRealWorldSymbolSizes(){return this._passParameters.useRealWorldSymbolSizes}set size(e){this._passParameters.size!==e&&(this._passParameters.size=e,this._requestRender())}get size(){return this._passParameters.size}set sizePx(e){this._passParameters.sizePx!==e&&(this._passParameters.sizePx=e,this._requestRender())}get sizePx(){return this._passParameters.sizePx}set clippingBox(e){f(this._passParameters.clipBox,e||P)}get _clippingEnabled(){return!b(this._passParameters.clipBox,P,((e,t)=>e===t))}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(e){this._slicePlaneEnabled!==e&&(this._slicePlaneEnabled=e,this._requestRender())}addNode(e){this._nodes.push(e),this._highlights.nodeAdded(e),this._requestRender()}removeNode(e){let s=null;return this._nodes.filterInPlace((i=>i.id!==e||(s=i,i.vao=t(i.vao),this._highlights.nodeRemoved(i),!1))),this._requestRender(),s}forEachNode(e){this._nodes.forAll(e)}removeAll(){this._nodes.forAll((e=>e.vao=t(e.vao))),this._highlights.removeAll(),this._nodes.clear(),this._requestRender()}highlight(e){return this._highlights.add(e)}_addHighlight(e,t,s){e.highlights=te(e.highlights,t,s),this._requestRender()}_removeHighlight(e,t){e.highlights=se(e.highlights,t),this._requestRender()}_initNode(e,t){const s=e.rctx;t.vao=new T(s,v,Q,{positions:U.createVertex(s,k.STATIC_DRAW,t.coordinates),colors:U.createVertex(s,k.STATIC_DRAW,t.rgb)})}_requestRender(){this._context&&this._context.requestRender()}};e([i({constructOnly:!0})],Y.prototype,"createGraphic",void 0),Y=e([r("esri.views.3d.layers.i3s.PointRenderer")],Y);class J extends H{constructor(e,t,s,i,r,n,o,a,l=null,h=null){super(s,r,t),this.id=e,this.obb=i,this.coordinates=n,this.rgb=o,this.attributes=a,this.pointIdFilterMap=l,this.highlights=h}}function K(e){return e.hasOwnProperty("splatSize")}function X(e,t,s,i,r){if(s.drawScreenSpace)return s.fixedSize*t*i;const n=B(r)*t*i;return s.useFixedSizes?Math.min(s.fixedSize/2,n):s.screenMinSize>0?Math.min(Math.max(s.screenMinSize*t*i,e/2),n):Math.min(e/2,n)}function Z(e,t,s,i,r){return s.drawScreenSpace?0:X(e,t,s,i,r)}function $(e,t,s){return null==s&&(s=u()),s[0]=e.origin[0]+e.coordinates[3*t],s[1]=e.origin[1]+e.coordinates[3*t+1],s[2]=e.origin[2]+e.coordinates[3*t+2],s}function ee(e){return null!=e.component?e.component:-1}function te(e,t,s){null==e&&(e=[]);const i={component:t,id:s};e.push(i);const r=ee(i);let n=e.length-1;for(;n>0&&r<ee(e[n-1]);)[e[n-1],e[n]]=[e[n],e[n-1]],--n;return e}function se(e,t){if(null==e)return e;const s=e.filter((e=>e.id!==t));return 0===s.length?null:s}class ie{constructor(){this.node=null,this.pointId=null,this.point=null,this.dist=null,this.normal=null,this.layerUid=""}}function re(e){return null!=e.dist&&null!=e.point&&null!=e.pointId&&null!=e.node}export{Y as PointRenderer,J as PointRendererNode,K as isInstanceOfNode};
|