@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{l as t,n as i,
|
|
5
|
+
import{l as t,n as i,c as s}from"../../../../chunks/vec3.js";import{f as o}from"../../../../chunks/vec3f64.js";import{newFloatArray as h}from"../../../../geometry/support/FloatArray.js";class e{constructor(t,i,s,e){this.vertices=t,this.positionsES=i,this.offset=e;const n=t.length,r=Math.floor(n/2),v=this.offset+3*r,g=s[v],f=s[v+1],c=s[v+2];this.origin=o(g,f,c),this.positions=h(3*n);const a=this.offset+3*n;for(let o=this.offset;o<a;o+=3)this.positions[o]=s[o]-g,this.positions[o+1]=s[o+1]-f,this.positions[o+2]=s[o+2]-c;this.updatePathVertexInformation()}updatePathVertexInformation(){const o=this.vertices.length,h=this.vertices[0];let e=this.offset;const n=this.positions;h.vRight[0]=n[e+3]-n[e],h.vRight[1]=n[e+4]-n[e+1],h.vRight[2]=n[e+5]-n[e+2],e+=3;let r=t(h.vRight);h.vMinSiblingLength=r,i(h.vRight,h.vRight);let v=h;for(let g=1;g<o;++g){const h=this.vertices[g];if(h.vLeft=v.vRight,g<o-1){h.vRight[0]=n[e+3]-n[e],h.vRight[1]=n[e+4]-n[e+1],h.vRight[2]=n[e+5]-n[e+2];const s=t(h.vRight);h.vMinSiblingLength=Math.min(r,s),r=s,i(h.vRight,h.vRight)}else s(h.vRight,h.vLeft),h.vMinSiblingLength=r;v=h,e+=3}}}export{e as Path};
|
|
@@ -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{c as s}from"../../../../chunks/mat4.js";import{a as t}from"../../../../chunks/mat4f64.js";import{g as e}from"../../../../chunks/vec2.js";import{a as r}from"../../../../chunks/vec2f64.js";import{e as i}from"../../../../chunks/vec3.js";import{c as n}from"../../../../chunks/vec3f64.js";class o{}class c{numProfilesPerJoin(){return 1}extrude(s,t,e){for(let r=0;r<t.vertices.length;++r)e(s.frame,t.vertices[r],t.normals[r],!1)}}class u{constructor(s,t){this.cutoffAngle=s,this.numBendSubdivisions=t}numProfilesPerJoin(){return this.numBendSubdivisions+1}extrude(t,r,i){const n=l,{rotationAngle:o,rotationRight:c,frame:u}=t;if(Math.abs(o)>=this.cutoffAngle){const a=t.rotationFrameUp;for(let l=0;l<this.numBendSubdivisions+1;++l){s(h,.5*-o+l*o/this.numBendSubdivisions,a),m(n,u,h);for(let s=0;s<r.vertices.length;++s){if(e(r.vertices[s],c)*o>=0)i(n,r.vertices[s],r.normals[s],!1);else{i(u,t.applyMiterStretch(f,r.vertices[s]),r.normals[s],!0)}}}}else for(let s=0;s<this.numBendSubdivisions+1;++s)for(let n=0;n<r.vertices.length;++n){const s=e(r.vertices[n],c)*o>=0;i(u,t.applyMiterStretch(f,r.vertices[n]),r.normals[n],!s)}}}class a{constructor(){this.up=n(),this.right=n()}}function m(s,t,e){i(s.up,t.up,e),i(s.right,t.right,e)}const f=r(),h=t(),l=new a;export{a as Frame2D,u as MiterExtruder,o as PathExtruder,c as SimpleExtruder};
|
|
@@ -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{s as t,h as e,e as i,g as s,a as r,i as o}from"../../../../chunks/vec2.js";import{a as n}from"../../../../chunks/vec2f64.js";import{s as a,
|
|
5
|
+
import{s as t,h as e,e as i,g as s,a as r,i as o}from"../../../../chunks/vec2.js";import{a as n}from"../../../../chunks/vec2f64.js";import{s as a,b as h}from"../../../../chunks/vec3.js";import{c as l}from"../../../../chunks/vec3f64.js";import{a as u}from"../../../../chunks/vec4f64.js";import{newFloatArray as c}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as b}from"../../../../geometry/support/Indices.js";import{Attribute as d}from"./Attribute.js";import{compressNormal as v}from"./Normals.js";import{VertexAttribute as A}from"./VertexAttribute.js";import{intersectTriangles as p}from"../materials/internal/MaterialUtil.js";class m{constructor(t){this.builder=t}onPathChanged(t){this.builder.onPathChanged()}}class x extends m{constructor(t){super(t),this.vertexAttributeColor=u(255,255,255,255),this.size=new Array,this.vertexAttributePosition=c(3*this.builder.numVerticesTotal),this.vertexAttributeNormal=new Int16Array(2*this.builder.numVerticesTotal)}bakeVertexColors(t){this.vertexAttributeColor[0]=255*t[0],this.vertexAttributeColor[1]=255*t[1],this.vertexAttributeColor[2]=255*t[2],this.vertexAttributeColor[3]=255*(t.length>3?t[3]:1)}bake(n){this.size=n;const{numVerticesTotal:l,pathVertexData:u,path:c,positions:b,profileRightAxes:d,profileUpAxes:A,profileVertexAndNormals:p}=this.builder;for(let m=0;m<l;++m){let l=u[m];const x=0===l||l===c.vertices.length-1;l*=3;const I=E;let P=0,V=0;const w=4*m,D=a(C,d[w],d[w+1],d[w+2]),L=a(N,A[w],A[w+1],A[w+2]),T=t(O,p[w]*n[0],p[w+1]*n[1]);if(x)h(I,L,D),P=d[w+3]*n[0],V=A[w+3];else{const n=f,h=R;t(n,d[w+3],A[w+3]);const l=e(n);i(n,n);const u=s(T,n);if(Math.abs(u)>l){t(h,-n[1],n[0]);const e=s(T,h);r(n,n,l*Math.sign(u)),r(h,h,e),o(T,n,h)}a(I,0,0,0)}const j=a(g,D[0]*T[0]+L[0]*T[1],D[1]*T[0]+L[1]*T[1],D[2]*T[0]+L[2]*T[1]),M=3*m;this.vertexAttributePosition[M]=b[l]+j[0]+I[0]*P,this.vertexAttributePosition[M+1]=b[l+1]+j[1]+I[1]*P,this.vertexAttributePosition[M+2]=b[l+2]+j[2]+I[2]*P;const k=t(O,p[w+2],p[w+3]);v(this.vertexAttributeNormal,m,D[0]*k[0]+L[0]*k[1]+I[0]*V,D[1]*k[0]+L[1]*k[1]+I[1]*V,D[2]*k[0]+L[2]*k[1]+I[2]*V)}}createGeometryData(){const t=this.builder.vertexIndices.length;return new P([[A.POSITION,new d(this.vertexAttributePosition,3,!0)],[A.NORMALCOMPRESSED,new d(this.vertexAttributeNormal,2,!0)],[A.COLOR,new d(this.vertexAttributeColor,4)]],[[A.POSITION,this.builder.vertexIndices],[A.NORMALCOMPRESSED,this.builder.normalIndices],[A.COLOR,b(t)]])}onPathChanged(t){super.onPathChanged(t),this.bake(this.size)}intersect(t,e,i){const s=this.builder.vertexIndices,r=new d(this.vertexAttributePosition,3),o=s.length/3;p(t,e,0,o,s,r,void 0,void 0,i)}}class I extends m{constructor(t,e,i,s){super(t),this.sizeAttributeValue=e,this.colorAttributeValue=i,this.opacityAttributeValue=s,this.vvData=null,this.baked=new x(t),this.vvData=c(4*this.builder.path.vertices.length);for(let r=0;r<this.builder.path.vertices.length;++r){this.vvData[4*r]=e,this.vvData[4*r+1]=i,this.vvData[4*r+2]=s;const t=0===r||r===this.builder.path.vertices.length-1;this.vvData[4*r+3]=t?1:0}}createGeometryData(){return new P([[A.POSITION,new d(this.builder.positions,3,!0)],[A.PROFILERIGHT,new d(this.builder.profileRightAxes,4,!0)],[A.PROFILEUP,new d(this.builder.profileUpAxes,4,!0)],[A.PROFILEVERTEXANDNORMAL,new d(this.builder.profileVertexAndNormals,4,!0)],[A.FEATUREVALUE,new d(this.vvData,4,!0)]],[[A.POSITION,this.builder.pathVertexIndices],[A.PROFILERIGHT,this.builder.vertexIndices],[A.PROFILEUP,this.builder.vertexIndices],[A.PROFILEVERTEXANDNORMAL,this.builder.vertexIndices],[A.FEATUREVALUE,this.builder.pathVertexIndices]])}onPathChanged(t){super.onPathChanged(t);const e=t.getMutableAttribute(A.POSITION);e&&(e.data=this.builder.positions)}}class P{constructor(t,e){this.vertexAttributes=t,this.indices=e}}const O=n(),f=n(),R=n(),g=l(),E=l(),C=l(),N=l();export{I as FastUpdatePathGeometry,m as PathGeometryData,x as StaticPathGeometry};
|
|
@@ -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{acosClamped as t,reciprocalClamped as s}from"../../../../core/mathUtils.js";import{s as i}from"../../../../chunks/mat2.js";import{c as r}from"../../../../chunks/mat2f64.js";import{s as h,q as e}from"../../../../chunks/vec2.js";import{U as a,a as n}from"../../../../chunks/vec2f64.js";import{
|
|
5
|
+
import{acosClamped as t,reciprocalClamped as s}from"../../../../core/mathUtils.js";import{s as i}from"../../../../chunks/mat2.js";import{c as r}from"../../../../chunks/mat2f64.js";import{s as h,q as e}from"../../../../chunks/vec2.js";import{U as a,a as n}from"../../../../chunks/vec2f64.js";import{c as o,g,n as m,i as f,j as c,f as u,b as p,E as v}from"../../../../chunks/vec3.js";import{c as l}from"../../../../chunks/vec3f64.js";import{Frame2D as M}from"./PathExtruder.js";import{UpVectorAlignment as R}from"./PathGeometry.js";class j{constructor(){this.vLeft=l(),this.vRight=l(),this.vMinSiblingLength=0,this.frame=new M}setFrameFromUpVector(t){o(this.frame.up,t),g(I,this.vLeft,this.vRight),m(I,I),f(y,this.frame.up,c(I,this.frame.up)),u(D,I,y),m(D,D),p(this.frame.right,D,this.frame.up)}get foldingAngle(){return Math.PI-this.rotationAngle}}class L extends j{get rotationFrameUp(){return this.frame.up}get rotationRight(){return a}get rotationAngle(){f(P,this.frame.up,c(this.frame.up,this.vLeft)),u(P,this.vLeft,P),v(P,P),m(P,P),f(w,this.frame.up,c(this.frame.up,this.vRight)),u(w,this.vRight,w),m(w,w),p(F,this.rotationFrameUp,this.vLeft);return Math.sign(c(F,this.vRight))*(Math.PI-t(c(P,w)))}get maxStretchDistance(){return Math.abs(this.vMinSiblingLength/Math.cos(.5*this.foldingAngle))}applyMiterStretch(t,i){const r=this.rotationAngle;if(Math.abs(r)<=0)return i;const e=s(Math.cos(.5*r));return h(t,(e-1+1)*i[0],i[1])}}class b extends j{get rotationFrameUp(){const t=Math.sign(c(this.frame.right,this.vRight));return p(S,this.vRight,this.vLeft),f(S,S,t),m(S,S)}get rotationRight(){const t=this.rotationFrameUp,s=c(t,this.frame.up),i=c(t,this.frame.right);return f(k,this.frame.up,-i),f(x,this.frame.right,s),g(k,k,x),m(k,k),A(U,this.frame,k),U}get rotationAngle(){const s=Math.sign(c(this.frame.right,this.vRight));return v(F,this.vLeft),-s*(Math.PI-t(c(F,this.vRight)))}get maxStretchDistance(){return Math.abs(this.vMinSiblingLength*s(Math.cos(.5*this.foldingAngle)))}applyMiterStretch(t,r){const h=this.rotationAngle;if(0===Math.abs(h))return r;const a=s(Math.cos(.5*h)),n=this.rotationRight,o=i(E,1+(a-1)*n[0]*n[0],(a-1)*n[0]*n[1],(a-1)*n[0]*n[1],1+(a-1)*n[1]*n[1]);return e(t,r,o)}}function A(t,s,i){h(t,c(i,s.right),c(i,s.up))}function d(t){switch(t){case R.World:return new L;case R.Path:return new b}}const S=l(),U=n(),k=l(),x=l(),F=l(),P=l(),w=l(),y=l(),I=l(),D=l(),E=r();export{j as PathVertex,d as newPathVertex};
|
|
@@ -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{generateUID as t}from"../../../../core/uid.js";import{
|
|
5
|
+
import{generateUID as t}from"../../../../core/uid.js";import{h as r,m as e}from"../../../../chunks/mat4.js";import{a as s}from"../../../../chunks/mat4f64.js";import{e as i}from"../../../../chunks/vec3.js";import{N as n,c as o}from"../../../../chunks/sphere.js";import{maxScale as a}from"../../support/mathUtils.js";class h{constructor(r,e={}){this.geometry=r,this.screenToWorldRatio=1,this._transformation=s(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerUid=e.layerUid,this.graphicUid=e.graphicUid,this.castShadow=e.castShadow??!1,null!=e.objectShaderTransformation&&this.objectShaderTransformationChanged(e.objectShaderTransformation)}get transformation(){return this._transformation}set transformation(t){r(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(t){null==t?this._shaderTransformation=null:(this._shaderTransformation??=s(),e(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=o(),i(this._boundingSphere,this.boundingInfo.center,this.shaderTransformation),this._boundingSphere[3]=this.boundingInfo.radius*a(this.shaderTransformation)),this._boundingSphere):n}get material(){return this.geometry.material}get type(){return this.geometry.type}get shaderTransformation(){return null==this._shaderTransformation?this.transformation:this._shaderTransformation}get indices(){return this.geometry.indices}get vertexAttributes(){return this.geometry.vertexAttributes}get highlights(){return this.geometry.highlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}}class m extends h{}export{h as RenderGeometry,m as ValidatedRenderGeometry};
|
|
@@ -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 r from"../../../../core/Accessor.js";import{update as t}from"../../../../core/arrayUtils.js";import{unitRGBAFromColor as s}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,disposeMaybe as a,destroyMaybe as n,releaseMaybe as h}from"../../../../core/maybe.js";import o from"../../../../core/PooledArray.js";import{watch as d,syncAndInitial as l,initial as _,sync as p}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{j as m,a as f,m as T}from"../../../../chunks/mat4.js";import{I as g,c as A}from"../../../../chunks/mat4f64.js";import{s as R}from"../../../../chunks/vec4.js";import{f as P,Z as E}from"../../../../chunks/vec4f64.js";import{a as b}from"../../../../chunks/boundedPlane.js";import{debugFlags as S}from"../../support/debugFlags.js";import{TransparencyMode as I}from"../../terrain/TerrainRenderer.js";import{FBOCache as y,ColorFormat as C,DepthFormat as w}from"../core/FBOCache.js";import{RenderPassManager as O}from"../core/renderPasses/RenderPassManager.js";import{ShaderOutput as D}from"../core/shaderLibrary/ShaderOutput.js";import{HUDRenderStyle as N}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{Highlight as H}from"../effects/highlight/Highlight.js";import{ShadowHighlight as M}from"../effects/highlight/ShadowHighlight.js";import{SMAA as x}from"../effects/smaa/SMAA.js";import{SSAO as v}from"../effects/ssao/SSAO.js";import{AnimationTimeStep as F}from"./AnimationTimeStep.js";import{Decorations as U,RenderRequestType as G,StencilBits as B}from"./basicInterfaces.js";import{BoundingInfo as j}from"./BoundingInfo.js";import{ZERO as q,union as V}from"./depthRange.js";import{depthRangeFromScene as Q}from"./depthRangeUtils.js";import{RenderOccludedFlag as k}from"./Material.js";import{OffscreenRendering as W}from"./OffscreenRendering.js";import{RenderContext as Y}from"./RenderContext.js";import{splitRenderGeometryChangeSetByMaterial as X}from"./rendererUtils.js";import{setupFeatureDefaults as z,RenderFeature as J}from"./RenderFeature.js";import{RenderSlot as K}from"./RenderSlot.js";import{ShadowAccumulator as Z}from"./ShadowAccumulator.js";import{ShadowMap as $,SnapshotSlot as ee}from"./ShadowMap.js";import re from"./SliceHelper.js";import{TransparencyPassType as te}from"./TransparencyPassType.js";import{EdgeView as se}from"./edgeRendering/EdgeView.js";import{Transparency as ie}from"./edgeRendering/interfaces.js";import{MergedRenderer as ae}from"../materials/renderers/MergedRenderer.js";import{AlphaMode as ne}from"../shaders/CompositingTechniqueConfiguration.js";import{RendererPerformanceInfo as he,PerformanceCategory as oe}from"../statistics/RendererPerformanceInfo.js";import{RenderState as de}from"../../../support/RenderState.js";import{PixelFormat as le,PixelType as _e,ClearBufferBit as pe}from"../../../webgl/enums.js";import ce from"../../../../webscene/background/ColorBackground.js";let ue=class extends r{get _bindParameters(){return this._renderContext.bindParameters}updateRenderFeatures(e=null,r=!has("disable-feature:high-quality-idle")){this._renderStateFeatures=z(r,e),this.notifyChange("_renderStateFeatures"),this.renderPlugins.renderFeatureChanged(),this._requestRender()}isFeatureEnabled(e,r=this._state){return this._renderStateFeatures.get(r,e)??!1}setFeatureEnabled(e,r,t){this._renderStateFeatures.set(r,e,t),this.notifyChange("_renderStateFeatures"),this._requestRender()}get _highQualityTransparency(){return this._highQualityTransparencyEnabled||this.isFeatureEnabled(J.HighQualityTransparency)}get hasReflections(){return this.hasWater&&(this._ssrEnabled||this.isFeatureEnabled(J.WaterReflection))}get hasDecorations(){return this._materialRenderersHas.decorations||this._renderPlugins.hasDecorations}get hasHighlights(){return this._materialRenderersHas.highlights||this.renderPlugins.produces(K.OPAQUE_MATERIAL,D.Highlight)||this.renderPlugins.produces(K.DRAPED_MATERIAL,D.Highlight)}get hasShadowHighlights(){return this._materialRenderersHas.highlights||this.renderPlugins.produces(K.OPAQUE_MATERIAL,D.ShadowHighlight)}get _magnifierEnabled(){return this._bindParameters.decorations===U.ON&&this._magnifierHelper.enabled}get fullResolutionAtmosphere(){return this._stage.view.qualitySettings.highResolutionAtmosphere||this.isFeatureEnabled(J.HighResolutionAtmosphere)}get hasWater(){return this._materialRenderersHas.water||this._hasOverlayWater}constructor(e,r,t,i,a,n,h,p){super({}),this._stage=e,this._techniqueRepository=i,this._rctx=a,this._compositingHelper=n,this._magnifierHelper=h,this._requestRender=p,this._materialRenderers=new o,this._needsTransparentPass=!1,this._materialRenderersHas={hudElements:!1,highlights:!1,water:!1,decorations:!1,occludees:!1},this._hasOverlayWater=!1,this._renderOverlay=e=>{},this._isRendering=!1,this._backgroundColor=P(0,0,0,1),this._fallbackDepthStencilTexture=null,this._sliceHelper=new re,this._state=de.IDLE,this._highQualityTransparencyEnabled=!0,this._terrainTransparency=I.Opaque,this._ssrEnabled=!1,this._hasAnimations=!1,this._animationTimestep=new F,this._renderHiddenTransparentEdges=()=>{},this._pluginInput={compositeTexture:null,normalTexture:null,highlightTexture:null},this.fboCache=new y(a),this._renderStateFeatures=z(!has("disable-feature:high-quality-idle"),e.view.qualityProfile),this._offscreen=new W(this.fboCache,this._compositingHelper),this.performanceInfo=new he(this._rctx),this._shadowMap=new $(this.fboCache,e.viewingMode),this._highlight=new H({view:e.view}),this._shadowHighlight=new M({view:e.view,viewingMode:e.viewingMode}),this._shadowAccumulator=new Z(this.fboCache,i,e,(e=>{const r=this.shadowsEnabled;this._shadowMap.enabled=!0,this._prepare(e.camera,e.contentCamera),this._renderPlugins.prepareRender(),this._shadowMap.enabled=r}),((e,r,t)=>{e.shadowMap.start(e.camera,r,t,!0,this._stage.view.qualitySettings.maximumPixelRatio),this._renderShadowCascades(D.Shadow,e.shadowMap),e.shadowMap.finish(),e.camera.setGLViewport(this._rctx),this._prepare(e.camera,e.contentCamera)}),p),this._ssao=new v({view:this._stage.view}),this._renderContext=new Y(this._rctx,this._offscreen,this._shadowMap,this._sliceHelper),this._renderPlugins=new L({renderContext:this._renderContext,techniqueRepository:i,textureRepository:t,materialRepository:r,requestRender:p,controller:e,fbos:this.fboCache,isFeatureEnabled:e=>this.isFeatureEnabled(e)}),this.renderPassManager=new O,this._renderPlugins.add(this.renderPassManager),this._smaa=new x({view:this._stage.view}),this._renderPlugins.add(this._smaa),this._renderPlugins.add(this._ssao),this._renderPlugins.add(this._highlight),this._renderPlugins.add(this._shadowHighlight),this.addHandles([d((()=>this._stage.view.state.camera),(()=>p()),l),d((()=>S.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES),(e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(ie.TRANSPARENT):()=>{},p()}),_),d((()=>this._stage.view.environment.background),(e=>{const r=e instanceof ce?s(e.color):E;R(this._backgroundColor,r[0]*r[3],r[1]*r[3],r[2]*r[3],r[3])}),l)])}normalizeCtorArgs(){return{}}destroy(){this._smaa.destroy(),this._gpuTimerHandle=i(this._gpuTimerHandle),this._materialRenderers.forAll((e=>e.dispose())),this._materialRenderers.clear(),this._offscreen.dispose(),this._fallbackDepthStencilTexture=a(this._fallbackDepthStencilTexture),this._shadowMap.dispose(),this._ssao.destroy(),this._highlight.dispose(),this._shadowHighlight.destroy(),this._shadowAccumulator.dispose(),this._edgeView=n(this._edgeView),this.renderPassManager.dispose(),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.fboCache.destroy(),j.prune()}_releaseFBOs(){this._bindParameters.ssr.lastFrameColor=h(this._bindParameters.ssr.lastFrameColor),this._bindParameters.multipassTerrain.linearDepth=h(this._bindParameters.multipassTerrain.linearDepth),this._bindParameters.multipassGeometry.linearDepth=h(this._bindParameters.multipassGeometry.linearDepth)}disposeOffscreenBuffers(){this._releaseFBOs(),this._disposeOffscreenBuffers()}_disposeOffscreenBuffers(){this._offscreen.dispose(),this._shadowMap.disposeOffscreenBuffers(),this._bindParameters.linearDepth=h(this._bindParameters.linearDepth),this._bindParameters.hudVisibility=h(this._bindParameters.hudVisibility)}get updating(){return this._smaa.updating||null!=this._edgeView&&this._edgeView.updating||this._shadowAccumulator.running||this._renderPlugins.updating||!this.isCameraFinal}ensureEdgeView(){if(null==this._edgeView){const e=this._stage.view.resourceController;this._edgeView=new se({rctx:this._rctx,renderSR:this._stage.view.renderSpatialReference,viewingMode:this._stage.viewingMode,techniqueRepository:this._techniqueRepository,setNeedsRender:()=>this._requestRender(),schedule:Ee(e)}),this.addHandles(d((()=>this._edgeView?.updating),(()=>this._requestRender()),p)),this._requestRender()}return this._edgeView}get edgeView(){return this._edgeView}get isCameraFinal(){return m(this._bindParameters.ssr.reprojectionMatrix,g)}set _reprojectionMatrix(e){t(this._bindParameters.ssr.reprojectionMatrix,e)&&this.notifyChange("isCameraFinal")}get shadowsEnabled(){return!!this._shadowMap?.enabled}setParameters(e){const{_shadowMap:r,_bindParameters:t}=this;if(void 0!==e.qualitySettings?.reflections&&this._ssrEnabled!==e.qualitySettings.reflections&&(this._ssrEnabled=e.qualitySettings.reflections,this._requestRender()),void 0!==e.shadowMap&&this._shadowMap.enabled!==e.shadowMap&&(this._shadowMap.enabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&r.maxCascades!==e.shadowMapMaxCascades&&(r.maxCascades=e.shadowMapMaxCascades,this._requestRender()),null!=e.environment){null!=e.environment.weather&&(this._bindParameters.weather=e.environment.weather,this._bindParameters.weatherVisible=!!e.weatherVisible);const r="virtual"!==e.environment.lighting.type;t.enableFillLights!==r&&(t.enableFillLights=r,this._requestRender())}void 0!==e.highQualityTransparency&&this._highQualityTransparencyEnabled!==e.highQualityTransparency&&(this._highQualityTransparencyEnabled=e.highQualityTransparency,this._requestRender()),void 0!==e.overlays&&this._bindParameters.overlays!==e.overlays&&(this._bindParameters.overlays=e.overlays,this._requestRender()),void 0!==e.hasOverlayWater&&this._hasOverlayWater!==e.hasOverlayWater&&(this._hasOverlayWater=e.hasOverlayWater,this._requestRender()),void 0!==e.renderOverlay&&this._renderOverlay!==e.renderOverlay&&(this._renderOverlay=e.renderOverlay,this._requestRender()),void 0!==e.slicePlane&&this._sliceHelper.plane!==e.slicePlane&&(this._sliceHelper.plane=e.slicePlane,this._requestRender()),void 0!==e.terrainTransparency&&this._terrainTransparency!==e.terrainTransparency&&(this._terrainTransparency=e.terrainTransparency,this._requestRender()),void 0!==e.shadowCastOptions&&this._shadowAccumulator.setOptions(e.shadowCastOptions)}get hasSlicePlane(){return!!this._sliceHelper.plane}get renderPlugins(){return this._renderPlugins}get _hasOITSupport(){return this._rctx.driverTest.floatBufferBlend.result}get _oitEnabled(){return this._highQualityTransparency&&this._hasOITSupport}modify(e,r){this._isRendering&&console.warn("Renderer.modify called while rendering");const{adds:t,removes:s,updates:i}=e;if(0===t.length&&0===s.length&&0===i.length)return;const a=X(e);let n=!1;a.forEach(((t,s)=>{if(r.done)return;let i=this._materialRenderers.find((e=>e.material===s));if(null==i&&t.adds.length>0){const e=new ae({material:s});e.initializeRenderContext(this.renderPlugins._context),i=e,this._materialRenderers.push(i)}i&&(i.modify(t),i.isEmpty&&(n=!0)),t.removes.forEach((r=>e.removes.removeUnordered(r))),t.adds.forEach((r=>e.adds.removeUnordered(r))),t.updates.forEach((r=>e.updates.removeUnordered(r))),r.madeProgress()})),n&&this._materialRenderers.filterInPlace((e=>!e.isEmpty||(e.dispose(),!1))),this._updateHasFlags(),this._requestRender()}_updateHasFlags(){const has=this._materialRenderersHas;has.decorations=!1,has.highlights=!1,has.hudElements=!1,has.water=!1,has.occludees=!1,this._materialRenderers.forAll((e=>{has.highlights||=e.hasHighlights,has.occludees||=e.hasOccludees,has.water||=e.hasWater,has.decorations||=e.isDecoration,has.hudElements||=e.produces(K.LINE_CALLOUTS_HUD_DEPTH,D.Color)||e.produces(K.HUD_MATERIAL,D.Color)||e.produces(K.LABEL_MATERIAL,D.Color)})),this._bindParameters.hasOccludees=has.occludees}updateAnimation(e){const r=this._hasAnimations;return this._hasAnimations=!1,this._materialRenderers.forAll((r=>this._hasAnimations=r.updateAnimation(e)||this._hasAnimations)),this._hasAnimations=this._renderPlugins.updateAnimation(e)||this._hasAnimations,this._hasAnimations!==r&&(this._gpuTimerHandle=r?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}render(e,r,t,s,i){this._isRendering=!0,this.performanceInfo.startFrame(),this.fboCache.resetPeakMemoryUsage();const a=this._offscreen,{camera:n,contentCamera:o,mode:d,alignPixelEnabled:l}=t;this._state=d,this._renderOverlay(i),this.performanceInfo.advance(oe.OVERLAY),this._renderContext.time=i,this._bindParameters.transparencyPassType=te.NONE,this._bindParameters.alignPixelEnabled=l,this._bindParameters.decorations=s;const _=b(this._sliceHelper.plane);s===U.OFF&&(this._sliceHelper.plane=null),this._rctx.bindFramebuffer(e),n.setGLViewport(this._rctx);const p=a.initializeFrame(n,this._backgroundColor);this.hasReflections?this._bindParameters.ssr.lastFrameColor=p:p?.release(),this._prepare(n,o),this._renderPlugins.prepareRender(),this.performanceInfo.advance(oe.PREPARE);const c=this._computeDepthRange(n);this._renderShadowMap(e,n,this._bindParameters.lighting.mainLight.direction,c),this.performanceInfo.advance(oe.SHADOW_MAP),this._ensureBindParameters(n,o);const u=this._renderPlugins.produces(K.OPAQUE_TERRAIN)&&(this._terrainTransparency===I.Semitransparent||this._terrainTransparency===I.TransparentWithDraped),m=this._highQualityTransparency&&u,f=this._needsTransparentPass||this._renderPlugins.produces(K.TRANSPARENT_MATERIAL);this._prepareShaders(m,f),this._renderLinearDepth(),this.performanceInfo.advance(oe.LINEAR_DEPTH),this._accumulateShadows(c,n,o),this.performanceInfo.advance(oe.ACCUMULATED_SHADOWS),this._ensureBindParametersSSR(i),this._renderSSAO(),this.performanceInfo.advance(oe.SSAO),this._renderContext.output=D.Color,a.bindFbo(),this._renderOpaqueGeometry(),this.performanceInfo.advance(oe.OPAQUE),this._renderTerrainLinearDepth(m),this._setMultipassTerrain(m),this._renderEdges(ie.OPAQUE),this.performanceInfo.advance(oe.OPAQUE_EDGES),a.bindFbo(),this._renderSlot(K.VOXEL),this.performanceInfo.advance(oe.VOXEL),this._renderHiddenTransparentEdges(),f&&(this._oitEnabled?this._renderOITPass(me.Geometry):this._renderTransparentGeometry()),this.performanceInfo.advance(oe.TRANSPARENT);const T=this._renderGeometryLinearDepth(m);this._renderHUDVisibility(T),m||this._renderInternalSlot(K.LINE_CALLOUTS),this.performanceInfo.advance(oe.HUD_VISIBILITY),this._renderObjectAndLayerIdColor(r),this.performanceInfo.advance(oe.OBJECT_AND_LAYER_ID_COLOR),this._renderEdges(ie.TRANSPARENT,T),T?.release(),this.performanceInfo.advance(oe.TRANSPARENT_EDGES);const g=u?this._renderTransparentTerrain():null;g&&this._bindParameters.hudVisibility&&(m?this._renderLineCallouts(N.Occluded):a.compositeToHUDVisibility(this._bindParameters,g.colorTexture),this._renderHUD(N.Occluded,a.framebuffer),this.performanceInfo.advance(oe.HUD_OCCLUDED)),this.performanceInfo.advance(oe.TRANSPARENT_TERRAIN),this._setTerrainCulling(!1),g&&(a.compositeToFramebuffer(this._bindParameters,g.colorTexture,ne.PremultipliedAlpha,1),g.release(),m&&(this._renderEdges(ie.OPAQUE),this.performanceInfo.advance(oe.OPAQUE_EDGES),f&&(this._oitEnabled?this._renderOITPass(me.Geometry):this._renderTransparentGeometry()),this.performanceInfo.advance(oe.TRANSPARENT),this._renderEdges(ie.TRANSPARENT),this.performanceInfo.advance(oe.TRANSPARENT_EDGES))),this._bindParameters.ssao=h(this._bindParameters.ssao),m&&this._renderLineCallouts(N.NotOccluded),this._setMultipassEnabled(!1),this._shadowAccumulator.render(this._bindParameters),a.bindFbo(),this._renderInternalSlot(K.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),this._renderSlot(K.POSTPROCESSING_ENVIRONMENT_TRANSPARENT),this.performanceInfo.advance(oe.ENVIRONMENT),this._renderLaserlines(),this.performanceInfo.advance(oe.LASER_LINES),this._renderOccluded(),this.performanceInfo.advance(oe.OCCLUDED);const A=this._renderAntialiasing(e),R=A?.fbo??e;this.performanceInfo.advance(oe.ANTIALIASING),this._renderHUD(N.NotOccluded,R),this.performanceInfo.advance(oe.HUD),this._renderHighlights(R,this._bindParameters),this.performanceInfo.advance(oe.HIGHLIGHTS),this._magnifierEnabled&&this._magnifierHelper.render(this._rctx,this._bindParameters),R!==e&&(this._rctx.bindFramebuffer(e),this._compositingHelper.composite(this._bindParameters,A?.colorTexture,ne.None)),A?.release(),this._releaseFBOs(),this._offscreen.releaseBuffers(),this._renderContext.lastFrameCamera.copyFrom(this._bindParameters.camera),this._sliceHelper.plane=_,this._isRendering=!1,this.onPostRender&&this.onPostRender(),this.performanceInfo.finishFrame()}_prepareShaders(e,r){this._renderContext.output=D.Color,this._prepareOpaqueGeometrySlots(),this._setMultipassTerrain(e),this._prepareSlots(K.TRANSPARENT_TERRAIN),this._setMultipassTerrain(!1),e||this._prepareInternalSlots(this._materialRenderers,K.LINE_CALLOUTS),r&&this._prepareTransparencySlots(),this._prepareInternalSlots(this._materialRenderers,K.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),this._prepareSlots(K.POSTPROCESSING_ENVIRONMENT_TRANSPARENT,K.LASERLINES),this._rctx.gl.flush()}_renderObjectAndLayerIdColor(e){if(null==e||!has("enable-feature:objectAndLayerId-rendering"))return;const r=this._renderContext.output;this._rctx.bindFramebuffer(e),this._offscreen.renderToFBO((()=>this._renderGeometryAndTransparentTerrainPass(D.ObjectAndLayerIdColor)),[0,0,0,0],!0,!0),this._rctx.bindFramebuffer(e),this._offscreen.renderToFBO((()=>{this._bindParameters.hudRenderStyle=N.NotOccluded,this._renderInternalSlot(K.HUD_MATERIAL)}),void 0,!0,!0),this._renderContext.output=r}finish(e){this._hasAnimations||this._animationTimestep.clear();const r=this.performanceInfo.gpuSamplingEnabled,t=e===G.BACKGROUND;if(t||r){const e=t?this.performanceInfo.elapsedTime:0,s=r?this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.getError(),i=Math.max(e,s);this._animationTimestep.frame(i,t)}}readDepthPixels(e,r,t){const s=this._bindParameters.linearDepth?.fbo;if(s?.colorTexture)return void s.readPixels(r[0],r[1],r[2],r[3],le.RGBA,_e.UNSIGNED_BYTE,t);const i=this.fboCache.acquire(C.RGBA,this._offscreen.width,this._offscreen.height).acquireDepth(w.DEPTH16_BUFFER);this._rctx.bindFramebuffer(i.fbo),this._ensureBindParameters(e,e),this._bindParameters.camera.setGLViewport(this._rctx),this._rctx.setClearColor(0,0,0,0);const a=pe.COLOR_BUFFER_BIT|pe.DEPTH_BUFFER_BIT|pe.STENCIL_BUFFER_BIT;this._rctx.clearSafe(a),this._renderGeometryAndTransparentTerrainPass(D.Depth),i.fbo.readPixels(r[0],r[1],r[2],r[3],le.RGBA,_e.UNSIGNED_BYTE,t),i.release()}readHUDVisibility(e,r,t,s,i){this._bindParameters.hudVisibility?.fbo.readPixels(e,r,t,s,le.RGBA,_e.UNSIGNED_BYTE,i)}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}_setMultipassTerrain(e){this._setMultipassEnabled(e),this._setTerrainCulling(e)}_setMultipassEnabled(e){this._bindParameters.multipassEnabled=e}_setTerrainCulling(e){this._bindParameters.multipassTerrain.cullAboveGround=e}_prepareSlots(...e){this._renderPlugins.prepareSlots(e)}_renderSlot(e,r=null,t=null){return this._renderPlugins.render(this._renderPlugins.prepare(e),r,t)}_renderEdges(e,r){const t=this._edgeView;if(t?.shouldRender()){const{width:s,height:i,depth:a}=this._offscreen,n=this.fboCache.acquire(C.RGBA,s,i),h=()=>t.render(this._bindParameters,e);this._offscreen.renderToTargets(h,n,r??a,Te),this._offscreen.compositeToFramebuffer(this._bindParameters,n.colorTexture,ne.Alpha,1),n.release()}}_renderShadowMap(e,r,t,s){const i=this._shadowMap;i.enabled&&(i.start(r,t,s,this.isFeatureEnabled(J.HighResolutionShadows),this._stage.view.qualitySettings.maximumPixelRatio),this._shadowHighlight.updateParameters(r,t),this._needsShadowHighlight?(this._renderShadowCascades(D.ShadowHighlight,this._shadowMap),i.moveSnapshot(ee.Highlight),i.clear(),this._renderShadowCascades(D.ShadowExcludeHighlight,this._shadowMap),i.copySnapshot(ee.Default),this._renderShadowCascades(D.ShadowHighlight,this._shadowMap)):this._renderShadowCascades(D.Shadow),i.finish(),this._rctx.bindFramebuffer(e),r.setGLViewport(this._rctx))}_renderShadowCascades(e,r=this._shadowMap){for(const t of r.cascades)t.camera.setGLViewport(this._rctx),this._prepare(t.camera,t.camera),this._renderGeometryAndTransparentTerrainPass(e)}get _needsLinearDepth(){return this._renderPlugins.consumes(D.Depth)||this.hasReflections||this._needsShadowHighlight||this._needsShadowCast}_renderLinearDepth(){this._needsLinearDepth?(this._bindParameters.linearDepth=this._offscreen.renderToCachedFBO(this._bindParameters.linearDepth,(()=>this._renderGeometryAndTransparentTerrainPass(D.Depth)),[0,0,0,0],C.RGBA,w.DEPTH24_BUFFER),this._bindParameters.linearDepth.releaseDepth(),this._offscreen.bindFbo()):this._bindParameters.linearDepth=h(this._bindParameters.linearDepth)}_renderTerrainLinearDepth(e){if(e){const e=this._renderContext.output;this._renderContext.output=D.Depth,this._bindParameters.multipassTerrain.linearDepth=this._offscreen.renderToCachedFBO(this._bindParameters.multipassTerrain.linearDepth,(()=>this._renderTransparentTerrain()),[-1e10,-1e10,-1e10,1]),this._bindParameters.multipassTerrain.linearDepth.releaseDepth(),this._renderContext.output=e}else this._bindParameters.multipassTerrain.linearDepth=h(this._bindParameters.multipassTerrain.linearDepth)}_renderGeometryLinearDepth(e){if(!e)return void(this._bindParameters.multipassGeometry.linearDepth=h(this._bindParameters.multipassGeometry.linearDepth));const r=this._renderContext.output;return this._bindParameters.multipassGeometry.linearDepth=this._offscreen.renderToCachedFBO(this._bindParameters.multipassGeometry.linearDepth,(()=>this._renderGeometryPass(D.Depth)),[1,1,1,1]),this._renderContext.output=r,this._bindParameters.multipassGeometry.linearDepth.detachDepth()}get _needsDepthRange(){return this._shadowMap.enabled||this._needsShadowCast}_computeDepthRange(e){if(!this._needsDepthRange)return q;const r=Q(e,this._materialRenderers,this._stage.layers);return V(r,this.renderPlugins.queryDepthRange(e)),r.near=Math.max(e.near,r.near),r.far=Math.min(e.far,r.far),r}_renderGeometryAndTransparentTerrainPass(e){this._renderContext.output=e,this._prepareSlots(K.TRANSPARENT_TERRAIN),this._renderGeometryPass(e),this._renderTransparentTerrain()}_renderGeometryPass(e){this._renderContext.output=e,this._prepareSlots(K.TRANSPARENT_MATERIAL),this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderSSAO(){if(!this._ssao.produces())return;const e=this._offscreen.renderToCachedFBO(null,(()=>this._renderGeometryAndTransparentTerrainPass(D.Normal)),[0,0,0,0],C.RGBA4,w.DEPTH24_BUFFER);e.releaseDepth(),this._offscreen.bindFbo(),this._pluginInput.normalTexture=e.colorTexture,this._bindParameters.ssao=this._renderSlot(K.SSAO,this._pluginInput),e.release()}_prepareOpaqueGeometrySlots(){this._prepareSlots(K.INTEGRATED_MESH,K.OPAQUE_TERRAIN,K.OPAQUE_MATERIAL,K.POSTPROCESSING_ENVIRONMENT_OPAQUE),this._prepareInternalSlots(this._materialRenderers,K.OPAQUE_MATERIAL)}_renderOpaqueGeometry(){this._renderSlot(K.INTEGRATED_MESH),this._renderSlot(K.OPAQUE_TERRAIN),this._renderInternalSlot(K.OPAQUE_MATERIAL),this._renderSlot(K.OPAQUE_MATERIAL),this._renderSlot(K.POSTPROCESSING_ENVIRONMENT_OPAQUE)}_renderTransparentGeometry(){this._renderInternalSlot(K.TRANSPARENT_MATERIAL),this._renderSlot(K.TRANSPARENT_MATERIAL)}_renderTransparentTerrain(){const e=this._renderPlugins.prepare(K.TRANSPARENT_TERRAIN);if(0===e.size)return;const r=()=>this._renderPlugins.render(e,null);if(this._renderContext.output!==D.Color)return void r();const{width:t,height:s,depth:i}=this._offscreen,a=this.fboCache.acquire(C.RGBA,t,s);return this._offscreen.renderToTargets(r,a,i,[0,0,0,0]),a}_renderHUDVisibility(e){this._prepareInternalSlots(this._materialRenderers,K.OCCLUSION_PIXELS)?(this._bindParameters.hudVisibility=this._offscreen.renderHUDVisibility(this._bindParameters.hudVisibility,(()=>this._renderInternalSlot(K.OCCLUSION_PIXELS)),e),this._offscreen.bindFbo()):this._bindParameters.hudVisibility=h(this._bindParameters.hudVisibility)}_renderLineCallouts(e){if(this._bindParameters.hudRenderStyle=e,e===N.Occluded){const e=()=>this._renderInternalSlot(K.LINE_CALLOUTS),{width:r,height:t,color:s}=this._offscreen,i=this.fboCache.acquireDepth(w.DEPTH16_BUFFER,r,t);this._offscreen.renderToTargets(e,s,i,void 0,!0,!0),i.release()}else this._renderInternalSlot(K.LINE_CALLOUTS)}_renderLaserlines(){if(this._renderSlot(K.LASERLINES),this._renderPlugins.produces(K.LASERLINES_CONTRAST_CONTROL)){const e=this._offscreen,{width:r,height:t,depth:s}=e,i=this.fboCache.acquire(C.RGBA,r,t),a=()=>this._renderSlot(K.LASERLINES_CONTRAST_CONTROL);e.renderToTargets(a,i,s,Te),e.compositeToFramebuffer(this._bindParameters,i.colorTexture,ne.PremultipliedAlpha,1),i.release()}}_renderHUD(e,r){if(this._materialRenderersHas.hudElements)if(this._oitEnabled){const t=this._renderOITPass(me.HUD,e);this._rctx.bindFramebuffer(r),this._compositingHelper.composite(this._bindParameters,t.colorTexture,ne.PremultipliedAlpha),t.release()}else if(e===N.Occluded){const r=()=>this._renderHUDElements(e),{width:t,height:s,color:i}=this._offscreen,a=this.fboCache.acquireDepth(w.DEPTH16_BUFFER,t,s);this._offscreen.renderToTargets(r,i,a,void 0,!0,!0),a.release()}else this._renderHUDElements(e)}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._prepareInternalSlots(this._materialRenderers,K.LINE_CALLOUTS_HUD_DEPTH,K.HUD_MATERIAL,K.LABEL_MATERIAL),this._renderInternalSlot(K.LINE_CALLOUTS_HUD_DEPTH),this._renderInternalSlot(K.HUD_MATERIAL),this._renderInternalSlot(K.LABEL_MATERIAL)}get _needsShadowHighlight(){return this._shadowMap.enabled&&this._renderPlugins.produces(K.SHADOW_HIGHLIGHT)&&this.hasShadowHighlights}_renderHighlights(e,r){if(!this.hasHighlights||r.decorations===U.OFF)return;const t=()=>{this._renderGeometryAndTransparentTerrainPass(D.Highlight),this._rctx.clearSafe(pe.DEPTH_BUFFER_BIT),this._renderHUDElements(N.Both)},s=this._offscreen.renderToCachedFBO(null,t,[0,0,0,0],C.RGBA4,w.DEPTH_STENCIL_TEXTURE);this._needsShadowHighlight&&(this._pluginInput.highlightTexture=s.fbo.colorTexture,this._renderSlot(K.SHADOW_HIGHLIGHT,this._pluginInput,e)),s.releaseDepth(),this.renderPlugins.produces(K.HIGHLIGHT)&&(this._pluginInput.compositeTexture=null,this._pluginInput.normalTexture=null,this._pluginInput.highlightTexture=s.fbo.colorTexture,this._renderSlot(K.HIGHLIGHT,this._pluginInput,e)),s.release()}get _needsShadowCast(){return this._shadowAccumulator.isAccumulating}_accumulateShadows(e,r,t){this._needsShadowCast&&this._bindParameters.linearDepth?.colorTexture&&this._shadowAccumulator.renderAccumulation(this._bindParameters.linearDepth,e,r,t)}_prepareTransparencySlots(){this._renderContext.output=D.Alpha,this._bindParameters.transparencyPassType=te.Alpha,this._prepareInternalSlots(this._materialRenderers,K.TRANSPARENT_MATERIAL),this._prepareSlots(K.TRANSPARENT_MATERIAL),this._renderContext.output=D.Color,this._bindParameters.transparencyPassType=te.Color,this._prepareInternalSlots(this._materialRenderers,K.TRANSPARENT_MATERIAL),this._prepareSlots(K.TRANSPARENT_MATERIAL),this._bindParameters.transparencyPassType=te.FrontFace,this._prepareInternalSlots(this._materialRenderers,K.TRANSPARENT_MATERIAL),this._prepareSlots(K.TRANSPARENT_MATERIAL),this._bindParameters.transparencyPassType=te.NONE}_renderOITPass(e,r=N.Both){const t=e===me.HUD,s=t?this.fboCache.acquire(C.RGBA,this._offscreen.width,this._offscreen.height):null,i=t?()=>this._renderHUDElements(r):()=>this._renderTransparentGeometry(),a=this._renderContext.output;this._renderContext.output=D.Alpha,this._bindParameters.transparencyPassType=te.Alpha;const n=this._offscreen.renderOITPass(i,te.Alpha,t);this._renderContext.output=D.Color,this._bindParameters.transparencyPassType=te.Color;const h=this._offscreen.renderOITPass(i,te.Color,t);this._bindParameters.transparencyPassType=te.FrontFace;const o=this._offscreen.renderOITPass(i,te.FrontFace,t);return this._offscreen.compositeTransparentOntoOpaque(this._bindParameters,h,n,o,s),s?.releaseDepth(),o.release(),h.release(),n.release(),this._bindParameters.transparencyPassType=te.NONE,this._renderContext.output=a,s}_renderOccluded(){let e=0;ge.clear(),this._materialRenderers.forAll((r=>{r.material&&r.material.isVisible()&&r.material.renderOccluded===k.OccludeAndTransparentStencil&&(e|=r.material.renderOccluded,ge.push(r))}));const r=this._offscreen,t=(t,s,i,a,n)=>{if(0==(e&s))return;const{width:h,height:o,depth:d}=r,l=this.fboCache.acquire(C.RGBA,h,o);r.renderToTargets(i,l,d,[0,0,0,0],a,n),r.compositeToFramebuffer(this._bindParameters,l.colorTexture,ne.PremultipliedAlpha,t),l.release()};0!==ge.length&&(this._prepareInternalSlots(ge,K.OCCLUDER_MATERIAL,K.TRANSPARENT_OCCLUDER_MATERIAL),this._renderInternalSlot(K.OCCLUDER_MATERIAL,ge),t(.5,k.OccludeAndTransparentStencil,(()=>this._renderInternalSlot(K.TRANSPARENT_OCCLUDER_MATERIAL,ge)),!1,!1)),ge.clear(),this._materialRenderers.forAll((r=>{r.material&&r.material.isVisible()&&(r.material.renderOccluded===k.OccludeAndTransparent||r.material.renderOccluded===k.Transparent||r.material.renderOccluded===k.Opaque)&&(e|=r.material.renderOccluded,ge.push(r))}));const s=this._renderPlugins.renderOccludedFlags;if(e|=s,!e)return;const i=e=>{this._renderContext.renderOccludedMask=e,this._prepareInternalSlots(ge,K.OPAQUE_MATERIAL,K.TRANSPARENT_MATERIAL,K.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),s>k.Occlude&&this._renderSlot(K.OCCLUDED_TERRAIN),this._renderInternalSlot(K.OPAQUE_MATERIAL,ge),this._renderInternalSlot(K.TRANSPARENT_MATERIAL,ge),this._renderInternalSlot(K.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,ge),this._renderContext.resetRenderOccludedMask()};this._renderContext.output=D.Color,t(.5,k.OccludeAndTransparent,(()=>i(k.OccludeAndTransparent)),!0,B.OutlineVisualElementMask),t(.5,k.Transparent,(()=>i(k.Transparent)),!0,B.OutlineVisualElementMask),t(1,k.Opaque,(()=>i(k.Opaque)),!0,B.OutlineVisualElementMask),ge.clear()}_renderAntialiasing(e){const r=this._offscreen,t=this._magnifierEnabled&&null==e?this.fboCache.acquire(C.RGBA,r.width,r.height).acquireDepth(w.DEPTH16_BUFFER):null,s=t?.fbo??e;this._rctx.bindFramebuffer(s);const i=this._offscreen.colorTexture;return this.renderPlugins.produces(K.ANTIALIASING)?(this._pluginInput.compositeTexture=r.colorTexture,this._pluginInput.normalTexture=null,this._pluginInput.highlightTexture=null,this._renderSlot(K.ANTIALIASING,this._pluginInput,s)):null!=i&&this._compositingHelper.composite(this._bindParameters,i,ne.None),t}_prepare(e,r){this._needsTransparentPass=this._materialRenderers.some((e=>e.produces(K.TRANSPARENT_MATERIAL,D.Color))),this._bindParameters.camera=e,this._bindParameters.contentCamera=r}_ensureBindParameters(e,r){this._bindParameters.camera=e,this._bindParameters.contentCamera=r;const t=this._renderContext.offscreenRenderingHelper;this._bindParameters.mainColor=t.colorTexture,this._bindParameters.mainDepth=t.depthTexture}_ensureBindParametersSSR(e){if(this._bindParameters.ssr.lastFrameColor){null==this._ssrEnableTime&&(this._ssrEnableTime=e),this._renderContext.lastFrameCamera.equals(this._bindParameters.camera)?this._reprojectionMatrix=g:(f(Re,this._bindParameters.camera.viewMatrix),f(Ae,this._bindParameters.camera.projectionMatrix),T(Pe,Re,Ae),T(Pe,this._renderContext.lastFrameCamera.viewMatrix,Pe),T(Pe,this._renderContext.lastFrameCamera.projectionMatrix,Pe),this._reprojectionMatrix=Pe);const r=this._stage.view.qualitySettings.fadeDuration;this._bindParameters.ssr.fadeFactor=r>0?Math.min(r,e-this._ssrEnableTime)/r:1,this._bindParameters.ssr.fadeFactor<1&&this._requestRender()}else this._reprojectionMatrix=g,this._ssrEnableTime=null}_prepareInternalSlots(e,...r){let t=!1;for(const s of r)this._bindParameters.slot=s,e.forAll((e=>{e.material.shouldRender(this._renderContext)&&(t=null!=e.prepareTechnique(this._renderContext)||t)}));return t}_renderInternalSlot(e,r=this._materialRenderers){this._bindParameters.slot=e,r.forAll((e=>{if(e.material.shouldRender(this._renderContext)){const r=e.prepareTechnique(this._renderContext);r&&e.render(this._renderContext,r)}}))}get memoryInfo(){return{fbos:this.fboCache.peakMemoryUsage,vaos:this._materialRenderers.reduce(((e,r)=>e+r.usedMemory),0),plugins:this._renderPlugins.usedMemory}}get usedMemory(){return this.fboCache.peakMemoryUsage+(this.edgeView?.usedMemory??0)+this._materialRenderers.reduce(((e,r)=>e+r.usedMemory),0)+this._renderPlugins.usedMemory}get test(){const e=this;return{offscreen:this._offscreen,shadowMap:this._shadowMap,highlight:this._highlight,lighting:this._bindParameters.lighting,materialRenderers:this._materialRenderers,shadowAccumulator:this._shadowAccumulator,weatherIsFading:this._bindParameters.cloudsFade.isFading,resetRenderStateFeatures:()=>{e._renderStateFeatures=z(),this.renderPlugins.renderFeatureChanged(),this._requestRender()},getFramebufferTexture:r=>{switch(r){case fe.Color:return e._offscreen.colorTexture;case fe.LinearDepth:return e._bindParameters.linearDepth?.colorTexture;case fe.ShadowMap:return e._shadowMap.depthTexture;case fe.HudVisibility:return e._bindParameters.hudVisibility?.colorTexture}}}}};var me,fe;e([c()],ue.prototype,"_renderPlugins",void 0),e([c()],ue.prototype,"_shadowAccumulator",void 0),e([c()],ue.prototype,"_state",void 0),e([c()],ue.prototype,"_renderStateFeatures",void 0),e([c({readOnly:!0})],ue.prototype,"fullResolutionAtmosphere",null),e([c()],ue.prototype,"_smaa",void 0),e([c({autoDestroy:!0})],ue.prototype,"_edgeView",void 0),e([c()],ue.prototype,"updating",null),e([c()],ue.prototype,"isCameraFinal",null),ue=e([u("esri.views.3d.webgl-engine.lib.Renderer")],ue),function(e){e[e.Geometry=0]="Geometry",e[e.HUD=1]="HUD"}(me||(me={})),function(e){e[e.Color=0]="Color",e[e.LinearDepth=1]="LinearDepth",e[e.ShadowMap=2]="ShadowMap",e[e.HudVisibility=3]="HudVisibility"}(fe||(fe={}));const Te=[0,0,0,0],ge=new o,Ae=A(),Re=A(),Pe=A();function Ee(e){return r=>e.immediate.schedule(r)}export{fe as FramebufferId,ue as Renderer};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import{update as t}from"../../../../core/arrayUtils.js";import{unitRGBAFromColor as s}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,disposeMaybe as a,destroyMaybe as n,releaseMaybe as h}from"../../../../core/maybe.js";import o from"../../../../core/PooledArray.js";import{watch as d,syncAndInitial as l,initial as _,sync as p}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{a as m,i as f,m as T}from"../../../../chunks/mat4.js";import{I as g,a as A}from"../../../../chunks/mat4f64.js";import{s as R}from"../../../../chunks/vec4.js";import{a as E,Z as P}from"../../../../chunks/vec4f64.js";import{a as b}from"../../../../chunks/boundedPlane.js";import{debugFlags as S}from"../../support/debugFlags.js";import{TransparencyMode as I}from"../../terrain/TerrainRenderer.js";import{FBOCache as y,ColorFormat as C,DepthFormat as w}from"../core/FBOCache.js";import{RenderPassManager as O}from"../core/renderPasses/RenderPassManager.js";import{ShaderOutput as D}from"../core/shaderLibrary/ShaderOutput.js";import{HUDRenderStyle as N}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{Highlight as M}from"../effects/highlight/Highlight.js";import{ShadowHighlight as H}from"../effects/highlight/ShadowHighlight.js";import{SMAA as x}from"../effects/smaa/SMAA.js";import{SSAO as F}from"../effects/ssao/SSAO.js";import{AnimationTimeStep as v}from"./AnimationTimeStep.js";import{Decorations as U,RenderRequestType as G,StencilBits as B}from"./basicInterfaces.js";import{BoundingInfo as j}from"./BoundingInfo.js";import{ZERO as q,union as V}from"./depthRange.js";import{depthRangeFromScene as Q}from"./depthRangeUtils.js";import{RenderOccludedFlag as k}from"./Material.js";import{OffscreenRendering as W}from"./OffscreenRendering.js";import{RenderContext as Y}from"./RenderContext.js";import{splitRenderGeometryChangeSetByMaterial as X}from"./rendererUtils.js";import{setupFeatureDefaults as z,RenderFeature as J}from"./RenderFeature.js";import{RenderSlot as K}from"./RenderSlot.js";import{ShadowAccumulator as Z}from"./ShadowAccumulator.js";import{ShadowMap as $,SnapshotSlot as ee}from"./ShadowMap.js";import re from"./SliceHelper.js";import{TransparencyPassType as te}from"./TransparencyPassType.js";import{EdgeView as se}from"./edgeRendering/EdgeView.js";import{Transparency as ie}from"./edgeRendering/interfaces.js";import{MergedRenderer as ae}from"../materials/renderers/MergedRenderer.js";import{AlphaMode as ne}from"../shaders/CompositingTechniqueConfiguration.js";import{RendererPerformanceInfo as he,PerformanceCategory as oe}from"../statistics/RendererPerformanceInfo.js";import{RenderState as de}from"../../../support/RenderState.js";import{PixelFormat as le,PixelType as _e,ClearBufferBit as pe}from"../../../webgl/enums.js";import ce from"../../../../webscene/background/ColorBackground.js";let ue=class extends r{get _bindParameters(){return this._renderContext.bindParameters}updateRenderFeatures(e=null,r=!has("disable-feature:high-quality-idle")){this._renderStateFeatures=z(r,e),this.notifyChange("_renderStateFeatures"),this.renderPlugins.renderFeatureChanged(),this._requestRender()}isFeatureEnabled(e,r=this._state){return this._renderStateFeatures.get(r,e)??!1}setFeatureEnabled(e,r,t){this._renderStateFeatures.set(r,e,t),this.notifyChange("_renderStateFeatures"),this._requestRender()}get _highQualityTransparency(){return this._highQualityTransparencyEnabled||this.isFeatureEnabled(J.HighQualityTransparency)}get hasReflections(){return this.hasWater&&(this._ssrEnabled||this.isFeatureEnabled(J.WaterReflection))}get hasDecorations(){return this._materialRenderersHas.decorations||this._renderPlugins.hasDecorations}get hasHighlights(){return this._materialRenderersHas.highlights||this.renderPlugins.produces(K.OPAQUE_MATERIAL,D.Highlight)||this.renderPlugins.produces(K.DRAPED_MATERIAL,D.Highlight)}get hasShadowHighlights(){return this._materialRenderersHas.highlights||this.renderPlugins.produces(K.OPAQUE_MATERIAL,D.ShadowHighlight)}get _magnifierEnabled(){return this._bindParameters.decorations===U.ON&&this._magnifierHelper.enabled}get fullResolutionAtmosphere(){return this._stage.view.qualitySettings.highResolutionAtmosphere||this.isFeatureEnabled(J.HighResolutionAtmosphere)}get hasWater(){return this._materialRenderersHas.water||this._hasOverlayWater}constructor(e,r,t,i,a,n,h,p){super({}),this._stage=e,this._techniqueRepository=i,this._rctx=a,this._compositingHelper=n,this._magnifierHelper=h,this._requestRender=p,this._materialRenderers=new o,this._needsTransparentPass=!1,this._materialRenderersHas={hudElements:!1,highlights:!1,water:!1,decorations:!1,occludees:!1},this._hasOverlayWater=!1,this.renderOverlay=e=>{},this._isRendering=!1,this._backgroundColor=E(0,0,0,1),this._fallbackDepthStencilTexture=null,this._sliceHelper=new re,this._state=de.IDLE,this._highQualityTransparencyEnabled=!0,this._terrainTransparency=I.Opaque,this._ssrEnabled=!1,this._hasAnimations=!1,this._animationTimestep=new v,this._renderHiddenTransparentEdges=()=>{},this._pluginInput={compositeTexture:null,normalTexture:null,highlightTexture:null},this.fboCache=new y(a),this._renderStateFeatures=z(!has("disable-feature:high-quality-idle"),e.view.qualityProfile),this._offscreen=new W(this.fboCache,this._compositingHelper),this.performanceInfo=new he(this._rctx),this._shadowMap=new $(this.fboCache,e.viewingMode),this._highlight=new M({view:e.view}),this._shadowHighlight=new H({view:e.view,viewingMode:e.viewingMode}),this._shadowAccumulator=new Z(this.fboCache,i,e,(e=>{const r=this.shadowsEnabled;this._shadowMap.enabled=!0,this._prepare(e.camera,e.contentCamera),this._renderPlugins.prepareRender(),this._shadowMap.enabled=r}),((e,r,t)=>{e.shadowMap.start(e.camera,r,t,!0,this._stage.view.qualitySettings.maximumPixelRatio),this._renderShadowCascades(D.Shadow,e.shadowMap),e.shadowMap.finish(),e.camera.setGLViewport(this._rctx),this._prepare(e.camera,e.contentCamera)}),p),this._ssao=new F({view:this._stage.view}),this._renderContext=new Y(this._rctx,this._offscreen,this._shadowMap,this._sliceHelper),this._renderPlugins=new L({renderContext:this._renderContext,techniqueRepository:i,textureRepository:t,materialRepository:r,requestRender:p,controller:e,fbos:this.fboCache,isFeatureEnabled:e=>this.isFeatureEnabled(e)}),this.renderPassManager=new O,this._renderPlugins.add(this.renderPassManager),this._smaa=new x({view:this._stage.view}),this._renderPlugins.add(this._smaa),this._renderPlugins.add(this._ssao),this._renderPlugins.add(this._highlight),this._renderPlugins.add(this._shadowHighlight),this.addHandles([d((()=>this._stage.view.state.camera),(()=>p()),l),d((()=>S.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES),(e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(ie.TRANSPARENT):()=>{},p()}),_),d((()=>this._stage.view.environment.background),(e=>{const r=e instanceof ce?s(e.color):P;R(this._backgroundColor,r[0]*r[3],r[1]*r[3],r[2]*r[3],r[3])}),l)])}normalizeCtorArgs(){return{}}destroy(){this._smaa.destroy(),this._gpuTimerHandle=i(this._gpuTimerHandle),this._materialRenderers.forAll((e=>e.dispose())),this._materialRenderers.clear(),this._offscreen.dispose(),this._fallbackDepthStencilTexture=a(this._fallbackDepthStencilTexture),this._shadowMap.dispose(),this._ssao.destroy(),this._highlight.dispose(),this._shadowHighlight.destroy(),this._shadowAccumulator.dispose(),this._edgeView=n(this._edgeView),this.renderPassManager.dispose(),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.fboCache.destroy(),j.prune()}_releaseFBOs(){this._bindParameters.ssr.lastFrameColor=h(this._bindParameters.ssr.lastFrameColor),this._bindParameters.multipassTerrain.linearDepth=h(this._bindParameters.multipassTerrain.linearDepth),this._bindParameters.multipassGeometry.linearDepth=h(this._bindParameters.multipassGeometry.linearDepth)}disposeOffscreenBuffers(){this._releaseFBOs(),this._disposeOffscreenBuffers()}_disposeOffscreenBuffers(){this._offscreen.dispose(),this._shadowMap.disposeOffscreenBuffers(),this._bindParameters.linearDepth=h(this._bindParameters.linearDepth),this._bindParameters.hudVisibility=h(this._bindParameters.hudVisibility)}get updating(){return this._smaa.updating||null!=this._edgeView&&this._edgeView.updating||this._shadowAccumulator.running||this._renderPlugins.updating||!this.isCameraFinal}ensureEdgeView(){if(null==this._edgeView){const e=this._stage.view.resourceController;this._edgeView=new se({rctx:this._rctx,renderSR:this._stage.view.renderSpatialReference,viewingMode:this._stage.viewingMode,techniqueRepository:this._techniqueRepository,setNeedsRender:()=>this._requestRender(),schedule:Pe(e)}),this.addHandles(d((()=>this._edgeView?.updating),(()=>this._requestRender()),p)),this._requestRender()}return this._edgeView}get edgeView(){return this._edgeView}get isCameraFinal(){return m(this._bindParameters.ssr.reprojectionMatrix,g)}set _reprojectionMatrix(e){t(this._bindParameters.ssr.reprojectionMatrix,e)&&this.notifyChange("isCameraFinal")}get shadowsEnabled(){return!!this._shadowMap?.enabled}setParameters(e){const{_shadowMap:r,_bindParameters:t}=this;if(void 0!==e.qualitySettings?.reflections&&this._ssrEnabled!==e.qualitySettings.reflections&&(this._ssrEnabled=e.qualitySettings.reflections,this._requestRender()),void 0!==e.shadowMap&&this._shadowMap.enabled!==e.shadowMap&&(this._shadowMap.enabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&r.maxCascades!==e.shadowMapMaxCascades&&(r.maxCascades=e.shadowMapMaxCascades,this._requestRender()),null!=e.environment){null!=e.environment.weather&&(this._bindParameters.weather=e.environment.weather,this._bindParameters.weatherVisible=!!e.weatherVisible);const r="virtual"!==e.environment.lighting.type;t.enableFillLights!==r&&(t.enableFillLights=r,this._requestRender())}void 0!==e.highQualityTransparency&&this._highQualityTransparencyEnabled!==e.highQualityTransparency&&(this._highQualityTransparencyEnabled=e.highQualityTransparency,this._requestRender()),void 0!==e.overlays&&this._bindParameters.overlays!==e.overlays&&(this._bindParameters.overlays=e.overlays,this._requestRender()),void 0!==e.hasOverlayWater&&this._hasOverlayWater!==e.hasOverlayWater&&(this._hasOverlayWater=e.hasOverlayWater,this._requestRender()),void 0!==e.slicePlane&&this._sliceHelper.plane!==e.slicePlane&&(this._sliceHelper.plane=e.slicePlane,this._requestRender()),void 0!==e.terrainTransparency&&this._terrainTransparency!==e.terrainTransparency&&(this._terrainTransparency=e.terrainTransparency,this._requestRender()),void 0!==e.shadowCastOptions&&this._shadowAccumulator.setOptions(e.shadowCastOptions)}get hasSlicePlane(){return!!this._sliceHelper.plane}get renderPlugins(){return this._renderPlugins}get _hasOITSupport(){return this._rctx.driverTest.floatBufferBlend.result}get _oitEnabled(){return this._highQualityTransparency&&this._hasOITSupport}modify(e,r){this._isRendering&&console.warn("Renderer.modify called while rendering");const{adds:t,removes:s,updates:i}=e;if(0===t.length&&0===s.length&&0===i.length)return;const a=X(e);let n=!1;a.forEach(((t,s)=>{if(r.done)return;let i=this._materialRenderers.find((e=>e.material===s));if(null==i&&t.adds.length>0){const e=new ae({material:s});e.initializeRenderContext(this.renderPlugins._context),i=e,this._materialRenderers.push(i)}i&&(i.modify(t),i.isEmpty&&(n=!0)),t.removes.forEach((r=>e.removes.removeUnordered(r))),t.adds.forEach((r=>e.adds.removeUnordered(r))),t.updates.forEach((r=>e.updates.removeUnordered(r))),r.madeProgress()})),n&&this._materialRenderers.filterInPlace((e=>!e.isEmpty||(e.dispose(),!1))),this._updateHasFlags(),this._requestRender()}_updateHasFlags(){const has=this._materialRenderersHas;has.decorations=!1,has.highlights=!1,has.hudElements=!1,has.water=!1,has.occludees=!1,this._materialRenderers.forAll((e=>{has.highlights||=e.hasHighlights,has.occludees||=e.hasOccludees,has.water||=e.hasWater,has.decorations||=e.isDecoration,has.hudElements||=e.produces(K.LINE_CALLOUTS_HUD_DEPTH,D.Color)||e.produces(K.HUD_MATERIAL,D.Color)||e.produces(K.LABEL_MATERIAL,D.Color)})),this._bindParameters.hasOccludees=has.occludees}updateAnimation(e){const r=this._hasAnimations;return this._hasAnimations=!1,this._materialRenderers.forAll((r=>this._hasAnimations=r.updateAnimation(e)||this._hasAnimations)),this._hasAnimations=this._renderPlugins.updateAnimation(e)||this._hasAnimations,this._hasAnimations!==r&&(this._gpuTimerHandle=r?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}render(e,r,t,s,i){this._isRendering=!0,this.performanceInfo.startFrame(),this.fboCache.resetPeakMemoryUsage();const a=this._offscreen,{camera:n,contentCamera:o,mode:d,alignPixelEnabled:l}=t;this._state=d,this.renderOverlay(i),this.performanceInfo.advance(oe.OVERLAY),this._renderContext.time=i,this._bindParameters.transparencyPassType=te.NONE,this._bindParameters.alignPixelEnabled=l,this._bindParameters.decorations=s;const _=b(this._sliceHelper.plane);s===U.OFF&&(this._sliceHelper.plane=null),this._rctx.bindFramebuffer(e),n.setGLViewport(this._rctx);const p=a.initializeFrame(n,this._backgroundColor);this.hasReflections?this._bindParameters.ssr.lastFrameColor=p:p?.release(),this._prepare(n,o),this._renderPlugins.prepareRender(),this.performanceInfo.advance(oe.PREPARE);const c=this._computeDepthRange(n);this._renderShadowMap(e,n,this._bindParameters.lighting.mainLight.direction,c),this.performanceInfo.advance(oe.SHADOW_MAP),this._ensureBindParameters(n,o);const u=this._renderPlugins.produces(K.OPAQUE_TERRAIN)&&(this._terrainTransparency===I.Semitransparent||this._terrainTransparency===I.TransparentWithDraped),m=this._highQualityTransparency&&u,f=this._needsTransparentPass||this._renderPlugins.produces(K.TRANSPARENT_MATERIAL);this._prepareShaders(m,f),this._renderLinearDepth(),this.performanceInfo.advance(oe.LINEAR_DEPTH),this._renderShadowAccumulation(c,n,o),this.performanceInfo.advance(oe.ACCUMULATED_SHADOWS),this._ensureBindParametersSSR(i),this._renderSSAO(),this.performanceInfo.advance(oe.SSAO),this._renderContext.output=D.Color,a.bindFbo(),this._renderOpaqueGeometry(),this.performanceInfo.advance(oe.OPAQUE),this._renderTerrainLinearDepth(m),this._setMultipassTerrain(m),this._renderEdges(ie.OPAQUE),this.performanceInfo.advance(oe.OPAQUE_EDGES),a.bindFbo(),this._renderSlot(K.VOXEL),this.performanceInfo.advance(oe.VOXEL),this._renderHiddenTransparentEdges(),f&&(this._oitEnabled?this._renderOITPass(me.Geometry):this._renderTransparentMaterial()),this.performanceInfo.advance(oe.TRANSPARENT);const T=this._renderGeometryLinearDepth(m);this._renderHUDVisibility(T),m||this._renderInternalSlot(K.LINE_CALLOUTS),this.performanceInfo.advance(oe.HUD_VISIBILITY),this._renderObjectAndLayerIdColor(r),this.performanceInfo.advance(oe.OBJECT_AND_LAYER_ID_COLOR),this._renderEdges(ie.TRANSPARENT,T),T?.release(),this.performanceInfo.advance(oe.TRANSPARENT_EDGES);const g=u?this._renderTransparentTerrain():null;g&&this._bindParameters.hudVisibility&&(m?this._renderLineCallouts(N.Occluded):a.compositeToHUDVisibility(this._bindParameters,g.colorTexture),this._renderHUD(N.Occluded,a.framebuffer),this.performanceInfo.advance(oe.HUD_OCCLUDED)),this.performanceInfo.advance(oe.TRANSPARENT_TERRAIN),this._setTerrainCulling(!1),g&&(a.compositeToFramebuffer(this._bindParameters,g.colorTexture,ne.PremultipliedAlpha,1),g.release(),m&&(this._renderEdges(ie.OPAQUE),this.performanceInfo.advance(oe.OPAQUE_EDGES),f&&(this._oitEnabled?this._renderOITPass(me.Geometry):this._renderTransparentMaterial()),this.performanceInfo.advance(oe.TRANSPARENT),this._renderEdges(ie.TRANSPARENT),this.performanceInfo.advance(oe.TRANSPARENT_EDGES))),this._bindParameters.ssao=h(this._bindParameters.ssao),m&&this._renderLineCallouts(N.NotOccluded),this._setMultipassEnabled(!1),this._shadowAccumulator.render(this._bindParameters),a.bindFbo(),this._renderInternalSlot(K.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),this._renderSlot(K.POSTPROCESSING_ENVIRONMENT_TRANSPARENT),this.performanceInfo.advance(oe.ENVIRONMENT),this._renderLaserlines(),this.performanceInfo.advance(oe.LASER_LINES),this._renderOccluded(),this.performanceInfo.advance(oe.OCCLUDED);const A=this._renderAntialiasing(e),R=A?.fbo??e;this.performanceInfo.advance(oe.ANTIALIASING),this._renderHUD(N.NotOccluded,R),this.performanceInfo.advance(oe.HUD),this._renderHighlights(R,this._bindParameters),this.performanceInfo.advance(oe.HIGHLIGHTS),this._magnifierEnabled&&this._magnifierHelper.render(this._rctx,this._bindParameters),R!==e&&(this._rctx.bindFramebuffer(e),this._compositingHelper.composite(this._bindParameters,A?.colorTexture,ne.None)),A?.release(),this._releaseFBOs(),this._offscreen.releaseBuffers(),this._renderContext.lastFrameCamera.copyFrom(this._bindParameters.camera),this._sliceHelper.plane=_,this._isRendering=!1,this.onPostRender&&this.onPostRender(),this.performanceInfo.finishFrame()}_prepareShaders(e,r){this._renderContext.output=D.Color,this._prepareOpaqueGeometrySlots(),this._setMultipassTerrain(e),this._prepareSlots(K.TRANSPARENT_TERRAIN),this._setMultipassTerrain(!1),e||this._prepareInternalSlots(this._materialRenderers,K.LINE_CALLOUTS),r&&this._prepareTransparencySlots(),this._prepareInternalSlots(this._materialRenderers,K.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),this._prepareSlots(K.POSTPROCESSING_ENVIRONMENT_TRANSPARENT,K.LASERLINES),this._rctx.gl.flush()}_renderObjectAndLayerIdColor(e){if(null==e||!has("enable-feature:objectAndLayerId-rendering"))return;const r=this._renderContext.output;this._rctx.bindFramebuffer(e),this._offscreen.renderToFBO((()=>this._renderAllGeometry(D.ObjectAndLayerIdColor)),[0,0,0,0],!0,!0),this._rctx.bindFramebuffer(e),this._offscreen.renderToFBO((()=>{this._bindParameters.hudRenderStyle=N.NotOccluded,this._renderInternalSlot(K.HUD_MATERIAL)}),void 0,!0,!0),this._renderContext.output=r}finish(e){this._hasAnimations||this._animationTimestep.clear();const r=this.performanceInfo.gpuSamplingEnabled,t=e===G.BACKGROUND;if(t||r){const e=t?this.performanceInfo.elapsedTime:0,s=r?this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.getError(),i=Math.max(e,s);this._animationTimestep.frame(i,t)}}readDepthPixels(e,r,t){const s=this._bindParameters.linearDepth?.fbo;if(s?.colorTexture)return void s.readPixels(r[0],r[1],r[2],r[3],le.RGBA,_e.UNSIGNED_BYTE,t);const i=this.fboCache.acquire(C.RGBA,this._offscreen.width,this._offscreen.height).acquireDepth(w.DEPTH16_BUFFER);this._rctx.bindFramebuffer(i.fbo),this._ensureBindParameters(e,e),this._bindParameters.camera.setGLViewport(this._rctx),this._rctx.setClearColor(0,0,0,0);const a=pe.COLOR_BUFFER_BIT|pe.DEPTH_BUFFER_BIT|pe.STENCIL_BUFFER_BIT;this._rctx.clearSafe(a),this._renderAllGeometry(D.Depth),i.fbo.readPixels(r[0],r[1],r[2],r[3],le.RGBA,_e.UNSIGNED_BYTE,t),i.release()}readHUDVisibility(e,r,t,s,i){this._bindParameters.hudVisibility?.fbo.readPixels(e,r,t,s,le.RGBA,_e.UNSIGNED_BYTE,i)}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}_setMultipassTerrain(e){this._setMultipassEnabled(e),this._setTerrainCulling(e)}_setMultipassEnabled(e){this._bindParameters.multipassEnabled=e}_setTerrainCulling(e){this._bindParameters.multipassTerrain.cullAboveGround=e}_prepareSlots(...e){this._renderPlugins.prepareSlots(e)}_renderSlot(e,r=null,t=null){return this._renderPlugins.render(this._renderPlugins.prepare(e),r,t)}_renderEdges(e,r){const t=this._edgeView;if(t?.shouldRender()){const{width:s,height:i,depth:a}=this._offscreen,n=this.fboCache.acquire(C.RGBA,s,i),h=()=>t.render(this._bindParameters,e);this._offscreen.renderToTargets(h,n,r??a,Te),this._offscreen.compositeToFramebuffer(this._bindParameters,n.colorTexture,ne.Alpha,1),n.release()}}_renderShadowMap(e,r,t,s){const i=this._shadowMap;i.enabled&&(i.start(r,t,s,this.isFeatureEnabled(J.HighResolutionShadows),this._stage.view.qualitySettings.maximumPixelRatio),this._shadowHighlight.updateParameters(r,t),this._needsShadowHighlight?(this._renderShadowCascades(D.ShadowHighlight,this._shadowMap),i.moveSnapshot(ee.Highlight),i.clear(),this._renderShadowCascades(D.ShadowExcludeHighlight,this._shadowMap),i.copySnapshot(ee.Default),this._renderShadowCascades(D.ShadowHighlight,this._shadowMap)):this._renderShadowCascades(D.Shadow),i.finish(),this._rctx.bindFramebuffer(e),r.setGLViewport(this._rctx))}_renderShadowCascades(e,r=this._shadowMap){for(const t of r.cascades)t.camera.setGLViewport(this._rctx),this._prepare(t.camera,t.camera),this._renderAllGeometry(e)}get _needsLinearDepth(){return this._renderPlugins.consumes(D.Depth)||this.hasReflections||this._needsShadowHighlight||this._needsShadowCast}_renderLinearDepth(){this._needsLinearDepth?(this._bindParameters.linearDepth=this._offscreen.renderToCachedFBO(this._bindParameters.linearDepth,(()=>this._renderAllGeometry(D.Depth)),[0,0,0,0],C.RGBA,w.DEPTH24_BUFFER),this._bindParameters.linearDepth.releaseDepth(),this._offscreen.bindFbo()):this._bindParameters.linearDepth=h(this._bindParameters.linearDepth)}_renderTerrainLinearDepth(e){if(e){const e=this._renderContext.output;this._renderContext.output=D.Depth,this._bindParameters.multipassTerrain.linearDepth=this._offscreen.renderToCachedFBO(this._bindParameters.multipassTerrain.linearDepth,(()=>this._renderTransparentTerrain()),[-1e10,-1e10,-1e10,1]),this._bindParameters.multipassTerrain.linearDepth.releaseDepth(),this._renderContext.output=e}else this._bindParameters.multipassTerrain.linearDepth=h(this._bindParameters.multipassTerrain.linearDepth)}_renderGeometryLinearDepth(e){if(!e)return void(this._bindParameters.multipassGeometry.linearDepth=h(this._bindParameters.multipassGeometry.linearDepth));const r=this._renderContext.output;return this._bindParameters.multipassGeometry.linearDepth=this._offscreen.renderToCachedFBO(this._bindParameters.multipassGeometry.linearDepth,(()=>this._renderOpaqueGeometryAndTransparentMaterial(D.Depth)),[1,1,1,1]),this._renderContext.output=r,this._bindParameters.multipassGeometry.linearDepth.detachDepth()}get _needsDepthRange(){return this._shadowMap.enabled||this._needsShadowCast}_computeDepthRange(e){if(!this._needsDepthRange)return q;const r=Q(e,this._materialRenderers,this._stage.layers);return V(r,this.renderPlugins.queryDepthRange(e)),r.near=Math.max(e.near,r.near),r.far=Math.min(e.far,r.far),r}_renderAllGeometry(e){this._renderContext.output=e,this._prepareSlots(K.TRANSPARENT_TERRAIN),this._renderOpaqueGeometryAndTransparentMaterial(e),this._renderTransparentTerrain()}_renderOpaqueGeometryAndTransparentMaterial(e){this._renderContext.output=e,this._prepareSlots(K.TRANSPARENT_MATERIAL),this._renderOpaqueGeometry(),this._renderTransparentMaterial()}_renderSSAO(){if(!this._ssao.produces())return;const e=this._offscreen.renderToCachedFBO(null,(()=>this._renderAllGeometry(D.Normal)),[0,0,0,0],C.RGBA4,w.DEPTH24_BUFFER);e.releaseDepth(),this._offscreen.bindFbo(),this._pluginInput.normalTexture=e.colorTexture,this._bindParameters.ssao=this._renderSlot(K.SSAO,this._pluginInput),e.release()}_prepareOpaqueGeometrySlots(){this._prepareSlots(K.INTEGRATED_MESH,K.OPAQUE_TERRAIN,K.OPAQUE_MATERIAL,K.POSTPROCESSING_ENVIRONMENT_OPAQUE),this._prepareInternalSlots(this._materialRenderers,K.OPAQUE_MATERIAL)}_renderOpaqueGeometry(){this._renderSlot(K.INTEGRATED_MESH),this._renderSlot(K.OPAQUE_TERRAIN),this._renderInternalSlot(K.OPAQUE_MATERIAL),this._renderSlot(K.OPAQUE_MATERIAL),this._renderSlot(K.POSTPROCESSING_ENVIRONMENT_OPAQUE)}_renderTransparentMaterial(){this._renderInternalSlot(K.TRANSPARENT_MATERIAL),this._renderSlot(K.TRANSPARENT_MATERIAL)}_renderTransparentTerrain(){const e=this._renderPlugins.prepare(K.TRANSPARENT_TERRAIN);if(0===e.size)return;const r=()=>this._renderPlugins.render(e,null);if(this._renderContext.output!==D.Color)return void r();const{width:t,height:s,depth:i}=this._offscreen,a=this.fboCache.acquire(C.RGBA,t,s);return this._offscreen.renderToTargets(r,a,i,[0,0,0,0]),a}_renderHUDVisibility(e){this._prepareInternalSlots(this._materialRenderers,K.OCCLUSION_PIXELS)?(this._bindParameters.hudVisibility=this._offscreen.renderHUDVisibility(this._bindParameters.hudVisibility,(()=>this._renderInternalSlot(K.OCCLUSION_PIXELS)),e),this._offscreen.bindFbo()):this._bindParameters.hudVisibility=h(this._bindParameters.hudVisibility)}_renderLineCallouts(e){if(this._bindParameters.hudRenderStyle=e,e===N.Occluded){const e=()=>this._renderInternalSlot(K.LINE_CALLOUTS),{width:r,height:t,color:s}=this._offscreen,i=this.fboCache.acquireDepth(w.DEPTH16_BUFFER,r,t);this._offscreen.renderToTargets(e,s,i,void 0,!0,!0),i.release()}else this._renderInternalSlot(K.LINE_CALLOUTS)}_renderLaserlines(){if(this._renderSlot(K.LASERLINES),this._renderPlugins.produces(K.LASERLINES_CONTRAST_CONTROL)){const e=this._offscreen,{width:r,height:t,depth:s}=e,i=this.fboCache.acquire(C.RGBA,r,t),a=()=>this._renderSlot(K.LASERLINES_CONTRAST_CONTROL);e.renderToTargets(a,i,s,Te),e.compositeToFramebuffer(this._bindParameters,i.colorTexture,ne.PremultipliedAlpha,1),i.release()}}_renderHUD(e,r){if(this._materialRenderersHas.hudElements)if(this._oitEnabled){const t=this._renderOITPass(me.HUD,e);this._rctx.bindFramebuffer(r),this._compositingHelper.composite(this._bindParameters,t.colorTexture,ne.PremultipliedAlpha),t.release()}else if(e===N.Occluded){const r=()=>this._renderHUDElements(e),{width:t,height:s,color:i}=this._offscreen,a=this.fboCache.acquireDepth(w.DEPTH16_BUFFER,t,s);this._offscreen.renderToTargets(r,i,a,void 0,!0,!0),a.release()}else this._renderHUDElements(e)}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._prepareInternalSlots(this._materialRenderers,K.LINE_CALLOUTS_HUD_DEPTH,K.HUD_MATERIAL,K.LABEL_MATERIAL),this._renderInternalSlot(K.LINE_CALLOUTS_HUD_DEPTH),this._renderInternalSlot(K.HUD_MATERIAL),this._renderInternalSlot(K.LABEL_MATERIAL)}get _needsShadowHighlight(){return this._shadowMap.enabled&&this._renderPlugins.produces(K.SHADOW_HIGHLIGHT)&&this.hasShadowHighlights}_renderHighlights(e,r){if(!this.hasHighlights||r.decorations===U.OFF)return;const t=()=>{this._renderAllGeometry(D.Highlight),this._rctx.clearSafe(pe.DEPTH_BUFFER_BIT),this._renderHUDElements(N.Both)},s=this._offscreen.renderToCachedFBO(null,t,[0,0,0,0],C.RGBA4,w.DEPTH_STENCIL_TEXTURE);this._needsShadowHighlight&&(this._pluginInput.highlightTexture=s.fbo.colorTexture,this._renderSlot(K.SHADOW_HIGHLIGHT,this._pluginInput,e)),s.releaseDepth(),this.renderPlugins.produces(K.HIGHLIGHT)&&(this._pluginInput.compositeTexture=null,this._pluginInput.normalTexture=null,this._pluginInput.highlightTexture=s.fbo.colorTexture,this._renderSlot(K.HIGHLIGHT,this._pluginInput,e)),s.release()}get _needsShadowCast(){return this._shadowAccumulator.isAccumulating}_renderShadowAccumulation(e,r,t){this._needsShadowCast&&this._bindParameters.linearDepth?.colorTexture&&this._shadowAccumulator.renderAccumulation(this._bindParameters.linearDepth,e,r,t)}_prepareTransparencySlots(){this._renderContext.output=D.Alpha,this._bindParameters.transparencyPassType=te.Alpha,this._prepareInternalSlots(this._materialRenderers,K.TRANSPARENT_MATERIAL),this._prepareSlots(K.TRANSPARENT_MATERIAL),this._renderContext.output=D.Color,this._bindParameters.transparencyPassType=te.Color,this._prepareInternalSlots(this._materialRenderers,K.TRANSPARENT_MATERIAL),this._prepareSlots(K.TRANSPARENT_MATERIAL),this._bindParameters.transparencyPassType=te.FrontFace,this._prepareInternalSlots(this._materialRenderers,K.TRANSPARENT_MATERIAL),this._prepareSlots(K.TRANSPARENT_MATERIAL),this._bindParameters.transparencyPassType=te.NONE}_renderOITPass(e,r=N.Both){const t=e===me.HUD,s=t?this.fboCache.acquire(C.RGBA,this._offscreen.width,this._offscreen.height):null,i=t?()=>this._renderHUDElements(r):()=>this._renderTransparentMaterial(),a=this._renderContext.output;this._renderContext.output=D.Alpha,this._bindParameters.transparencyPassType=te.Alpha;const n=this._offscreen.renderOITPass(i,te.Alpha,t);this._renderContext.output=D.Color,this._bindParameters.transparencyPassType=te.Color;const h=this._offscreen.renderOITPass(i,te.Color,t);this._bindParameters.transparencyPassType=te.FrontFace;const o=this._offscreen.renderOITPass(i,te.FrontFace,t);return this._offscreen.compositeTransparentOntoOpaque(this._bindParameters,h,n,o,s),s?.releaseDepth(),o.release(),h.release(),n.release(),this._bindParameters.transparencyPassType=te.NONE,this._renderContext.output=a,s}_renderOccluded(){let e=0;ge.clear(),this._materialRenderers.forAll((r=>{r.material&&r.material.isVisible()&&r.material.renderOccluded===k.OccludeAndTransparentStencil&&(e|=r.material.renderOccluded,ge.push(r))}));const r=this._offscreen,t=(t,s,i,a,n)=>{if(0==(e&s))return;const{width:h,height:o,depth:d}=r,l=this.fboCache.acquire(C.RGBA,h,o);r.renderToTargets(i,l,d,[0,0,0,0],a,n),r.compositeToFramebuffer(this._bindParameters,l.colorTexture,ne.PremultipliedAlpha,t),l.release()};0!==ge.length&&(this._prepareInternalSlots(ge,K.OCCLUDER_MATERIAL,K.TRANSPARENT_OCCLUDER_MATERIAL),this._renderInternalSlot(K.OCCLUDER_MATERIAL,ge),t(.5,k.OccludeAndTransparentStencil,(()=>this._renderInternalSlot(K.TRANSPARENT_OCCLUDER_MATERIAL,ge)),!1,!1)),ge.clear(),this._materialRenderers.forAll((r=>{r.material&&r.material.isVisible()&&(r.material.renderOccluded===k.OccludeAndTransparent||r.material.renderOccluded===k.Transparent||r.material.renderOccluded===k.Opaque)&&(e|=r.material.renderOccluded,ge.push(r))}));const s=this._renderPlugins.renderOccludedFlags;if(e|=s,!e)return;const i=e=>{this._renderContext.renderOccludedMask=e,this._prepareInternalSlots(ge,K.OPAQUE_MATERIAL,K.TRANSPARENT_MATERIAL,K.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),s>k.Occlude&&this._renderSlot(K.OCCLUDED_TERRAIN),this._renderInternalSlot(K.OPAQUE_MATERIAL,ge),this._renderInternalSlot(K.TRANSPARENT_MATERIAL,ge),this._renderInternalSlot(K.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL,ge),this._renderContext.resetRenderOccludedMask()};this._renderContext.output=D.Color,t(.5,k.OccludeAndTransparent,(()=>i(k.OccludeAndTransparent)),!0,B.OutlineVisualElementMask),t(.5,k.Transparent,(()=>i(k.Transparent)),!0,B.OutlineVisualElementMask),t(1,k.Opaque,(()=>i(k.Opaque)),!0,B.OutlineVisualElementMask),ge.clear()}_renderAntialiasing(e){const r=this._offscreen,t=this._magnifierEnabled&&null==e?this.fboCache.acquire(C.RGBA,r.width,r.height).acquireDepth(w.DEPTH16_BUFFER):null,s=t?.fbo??e;this._rctx.bindFramebuffer(s);const i=this._offscreen.colorTexture;return this.renderPlugins.produces(K.ANTIALIASING)?(this._pluginInput.compositeTexture=r.colorTexture,this._pluginInput.normalTexture=null,this._pluginInput.highlightTexture=null,this._renderSlot(K.ANTIALIASING,this._pluginInput,s)):null!=i&&this._compositingHelper.composite(this._bindParameters,i,ne.None),t}_prepare(e,r){this._needsTransparentPass=this._materialRenderers.some((e=>e.produces(K.TRANSPARENT_MATERIAL,D.Color))),this._bindParameters.camera=e,this._bindParameters.contentCamera=r}_ensureBindParameters(e,r){this._bindParameters.camera=e,this._bindParameters.contentCamera=r;const t=this._renderContext.offscreenRenderingHelper;this._bindParameters.mainColor=t.colorTexture,this._bindParameters.mainDepth=t.depthTexture}_ensureBindParametersSSR(e){if(this._bindParameters.ssr.lastFrameColor){null==this._ssrEnableTime&&(this._ssrEnableTime=e),this._renderContext.lastFrameCamera.equals(this._bindParameters.camera)?this._reprojectionMatrix=g:(f(Re,this._bindParameters.camera.viewMatrix),f(Ae,this._bindParameters.camera.projectionMatrix),T(Ee,Re,Ae),T(Ee,this._renderContext.lastFrameCamera.viewMatrix,Ee),T(Ee,this._renderContext.lastFrameCamera.projectionMatrix,Ee),this._reprojectionMatrix=Ee);const r=this._stage.view.qualitySettings.fadeDuration;this._bindParameters.ssr.fadeFactor=r>0?Math.min(r,e-this._ssrEnableTime)/r:1,this._bindParameters.ssr.fadeFactor<1&&this._requestRender()}else this._reprojectionMatrix=g,this._ssrEnableTime=null}_prepareInternalSlots(e,...r){let t=!1;for(const s of r)this._bindParameters.slot=s,e.forAll((e=>{e.material.shouldRender(this._renderContext)&&(t=null!=e.prepareTechnique(this._renderContext)||t)}));return t}_renderInternalSlot(e,r=this._materialRenderers){this._bindParameters.slot=e,r.forAll((e=>{if(e.material.shouldRender(this._renderContext)){const r=e.prepareTechnique(this._renderContext);r&&e.render(this._renderContext,r)}}))}get memoryInfo(){return{fbos:this.fboCache.peakMemoryUsage,vaos:this._materialRenderers.reduce(((e,r)=>e+r.usedMemory),0),plugins:this._renderPlugins.usedMemory}}get usedMemory(){return this.fboCache.peakMemoryUsage+(this.edgeView?.usedMemory??0)+this._materialRenderers.reduce(((e,r)=>e+r.usedMemory),0)+this._renderPlugins.usedMemory}get test(){const e=this;return{offscreen:this._offscreen,shadowMap:this._shadowMap,highlight:this._highlight,lighting:this._bindParameters.lighting,materialRenderers:this._materialRenderers,shadowAccumulator:this._shadowAccumulator,weatherIsFading:this._bindParameters.cloudsFade.isFading,resetRenderStateFeatures:()=>{e._renderStateFeatures=z(),this.renderPlugins.renderFeatureChanged(),this._requestRender()},getFramebufferTexture:r=>{switch(r){case fe.Color:return e._offscreen.colorTexture;case fe.LinearDepth:return e._bindParameters.linearDepth?.colorTexture;case fe.ShadowMap:return e._shadowMap.depthTexture;case fe.HudVisibility:return e._bindParameters.hudVisibility?.colorTexture}}}}};var me,fe;e([c()],ue.prototype,"_renderPlugins",void 0),e([c()],ue.prototype,"_shadowAccumulator",void 0),e([c()],ue.prototype,"_state",void 0),e([c()],ue.prototype,"_renderStateFeatures",void 0),e([c({readOnly:!0})],ue.prototype,"fullResolutionAtmosphere",null),e([c()],ue.prototype,"_smaa",void 0),e([c({autoDestroy:!0})],ue.prototype,"_edgeView",void 0),e([c()],ue.prototype,"updating",null),e([c()],ue.prototype,"isCameraFinal",null),ue=e([u("esri.views.3d.webgl-engine.lib.Renderer")],ue),function(e){e[e.Geometry=0]="Geometry",e[e.HUD=1]="HUD"}(me||(me={})),function(e){e[e.Color=0]="Color",e[e.LinearDepth=1]="LinearDepth",e[e.ShadowMap=2]="ShadowMap",e[e.HudVisibility=3]="HudVisibility"}(fe||(fe={}));const Te=[0,0,0,0],ge=new o,Ae=A(),Re=A(),Ee=A();function Pe(e){return r=>e.immediate.schedule(r)}export{fe as FramebufferId,ue as Renderer};
|
|
@@ -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{equals as i}from"../../../../core/arrayUtils.js";import{smoothstep as s}from"../../../../core/mathUtils.js";import{disposeMaybe as r,releaseMaybe as o}from"../../../../core/maybe.js";import{watch as a,syncAndInitial as n,sync as h}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import{subclass as _}from"../../../../core/accessorSupport/decorators/subclass.js";import{G as u,
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{equals as i}from"../../../../core/arrayUtils.js";import{smoothstep as s}from"../../../../core/mathUtils.js";import{disposeMaybe as r,releaseMaybe as o}from"../../../../core/maybe.js";import{watch as a,syncAndInitial as n,sync as h}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/has.js";import{subclass as _}from"../../../../core/accessorSupport/decorators/subclass.js";import{G as u,c as l}from"../../../../chunks/vec3.js";import{c as m}from"../../../../chunks/vec3f64.js";import{ReadShadowMapPassParameters as p}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{BindParameters as d}from"./BindParameters.js";import{ZERO as g}from"./depthRange.js";import{createQuadVAO as f}from"./glUtil3D.js";import{ShadowCastRenderer as b,shadowCastDisabledElevationThreshold as v,shadowCastDisableElevationMax as w,shadowCastDisableElevationMin as A}from"./ShadowCastRenderer.js";import{ShadowMap as y}from"./ShadowMap.js";import{S as R}from"../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as D}from"../shaders/ShadowCastAccumulateTechnique.js";import{TaskPriority as C}from"../../../support/Scheduler.js";import{PixelFormat as S,PixelType as F,SizedPixelFormat as j,TextureWrapMode as P,ClearBufferBit as T}from"../../../webgl/enums.js";import{FramebufferObject as x}from"../../../webgl/FramebufferObject.js";import{TextureDescriptor as E}from"../../../webgl/TextureDescriptor.js";import{vertexCount as q}from"../../../webgl/Util.js";let M=class extends t{constructor(e,t,i,s,r,o){super({}),this.fbos=e,this._stage=i,this._prepareForShadowMapPass=s,this._renderToShadowMap=r,this._requestRender=o,this._progress=0,this._sampleCount=0,this._passParameters=new p,this._cachedLightDirections=[],this._depthRange=g,this._previewing=!1,this._cameraForcedForScreenshot=!1,this._shadowAccumulatorKey="shadowAccumulator",this._rctx=e.rctx,this._bindParameters=new d(new y(e,i.viewingMode),null),this._bindParameters.shadowMap.enabled=!0,this._vao=f(this._rctx),this._accumulationRenderer=new b(t,this._rctx,this,o);const c=this._stage.view.resourceController.scheduler;this.addHandles([c.registerTask(C.SHADOW_ACCUMULATOR,this),a((()=>i.renderView),(e=>{this.removeHandles(U),null!=e&&this.addHandles(e.events.on("force-camera-for-screenshot",(()=>this._cameraForcedForScreenshot=!0)),U)}),n),a((()=>this._previewing),(()=>this._requestRenderIfEnabled()),h)],this._shadowAccumulatorKey)}normalizeCtorArgs(){return{}}dispose(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this._accumulationRenderer=r(this._accumulationRenderer),this._bindParameters.shadowMap.dispose(),this._fbo=r(this._fbo),this._vao=r(this._vao),this._accumulationTechniqueCached=o(this._accumulationTechniqueCached),this._cachedLightDirections.length=0,this._sampleCount=0}get computedSamples(){return this._progress}get shadowCastTexture(){return this._fbo?.colorTexture}get isAccumulating(){return this._isPreviewing||this._isRefining}get _accumulationTechnique(){if(null==this._accumulationTechniqueCached){const e={rctx:this._rctx,viewingMode:this._stage.viewingMode};this._accumulationTechniqueCached=new D(e)}return this._accumulationTechniqueCached}get _isRefining(){return this._isActive&&!this._isDoneAccumulating&&!this._previewing}get _isPreviewing(){return this._isActive&&this._previewing}get _isActive(){return null!=this._fbo&&this._sampleCount>0}get canAccumulate(){return null!==this._bindParameters.linearDepth?.colorTexture&&this._depthRange!==g&&this._opacityFromElevation>v}get _isDoneAccumulating(){return this._progress>=this._sampleCount}get _lightDirections(){return this._cachedLightDirections}set _lightDirections(e){const t=this._cachedLightDirections;if(i(t,e,u))return;const s=Math.min(R,e.length);t.length=s,this._sampleCount=s;for(let i=0;i<s;++i)t[i]=l(t[i]??m(),e[i]);this._invalidate()}get _opacityFromElevation(){return this._accumulationRenderer.opacityFromElevation}set _opacityFromElevation(e){this._accumulationRenderer.opacityFromElevation=e}get running(){return this._isRefining&&this.canAccumulate&&this._progress>0}runTask(e){for(this._prepareForShadowMapPass(this._bindParameters);!e.done&&!this._isDoneAccumulating;)this._accumulateShadow(),e.madeProgress();this._requestRender()}renderAccumulation(e,t,i,s){if(this._depthRange=t,this._updateCamera(i),this._bindParameters.contentCamera=s,this._bindParameters.linearDepth=e,this._passParameters.origin=this._bindParameters.camera.center,this.notifyChange("canAccumulate"),!this.isAccumulating||!this.canAccumulate)return;(this._previewing||0===this._progress||this._cameraForcedForScreenshot)&&this._clear();const r=this._cameraForcedForScreenshot?this._sampleCount:Math.min(L,this._sampleCount-this._progress);for(let o=0;o<r;++o)this._accumulateShadow();this._cameraForcedForScreenshot=!1,this._requestRender()}render(e){this._accumulationRenderer.render(e)}setOptions(e){if(void 0!==e.enabled){const t=null!=this._fbo;e.enabled!==t&&(e.enabled?this._enable():this._disable())}void 0!==e.previewing&&(this._previewing=e.previewing),void 0!==e.lightDirections&&(this._lightDirections=e.lightDirections),this._accumulationRenderer.setOptions(e)}readAccumulatedShadow(e,t){return!this._isActive||!this._fbo||this._progress<1||e<0||e>=this._fbo.width||t<0||t>=this._fbo.height?0:(this._fbo.readPixels(e,t,1,1,S.RED,F.UNSIGNED_BYTE,k),k[0]/this._progress)}_enable(){this._progress=0;const e=new E;e.pixelFormat=S.RED,e.internalFormat=j.R8,e.wrapMode=P.CLAMP_TO_EDGE,this._fbo=new x(this._rctx,e)}_disable(){this._fbo=r(this._fbo)}_invalidate(){this._progress=0,this._requestRenderIfEnabled()}_clear(){this._rctx.bindFramebuffer(this._fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clearSafe(T.COLOR_BUFFER_BIT),this._progress=0}_accumulateShadow(){this._renderToShadowMap(this._bindParameters,this._sampleLightDirection(),this._depthRange);const e=this._accumulationTechnique;this._rctx.bindFramebuffer(this._fbo),this._rctx.bindTechnique(e,this._passParameters,this._bindParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(e.primitiveType,0,q(this._vao,"geometry"))}_sampleLightDirection(){return this._progress++,this._lightDirections[this._progress*O%this._lightDirections.length]}_updateCamera(e){!e.equals(this._bindParameters.camera)&&this._fbo&&(this._bindParameters.camera.copyFrom(e),this._fbo.resize(e.fullWidth,e.fullHeight),this._opacityFromElevation=1-s(A,w,e.relativeElevation))}_requestRenderIfEnabled(){this._fbo&&this._requestRender()}get test(){const e=this;return{lightDirections:this._lightDirections,get isDone(){return e._isDoneAccumulating},get isActive(){return e._isActive}}}};e([c()],M.prototype,"_progress",void 0),e([c()],M.prototype,"_sampleCount",void 0),e([c()],M.prototype,"_fbo",void 0),e([c()],M.prototype,"_depthRange",void 0),e([c()],M.prototype,"_previewing",void 0),e([c()],M.prototype,"_accumulationRenderer",void 0),e([c()],M.prototype,"_isRefining",null),e([c()],M.prototype,"_isActive",null),e([c()],M.prototype,"canAccumulate",null),e([c()],M.prototype,"_isDoneAccumulating",null),e([c()],M.prototype,"_opacityFromElevation",null),e([c()],M.prototype,"running",null),M=e([_("esri.views.3d.webgl-engine.lib.ShadowAccumulator")],M);const L=6,U="renderView",O=104729,k=new Uint8Array(1);export{M as ShadowAccumulator};
|
|
@@ -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 s from"../../../../core/Accessor.js";import{disposeMaybe as t}from"../../../../core/maybe.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 s from"../../../../core/Accessor.js";import{disposeMaybe as t}from"../../../../core/maybe.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{h as a,c as o}from"../../../../chunks/vec4.js";import{createQuadVAO as n}from"./glUtil3D.js";import{S as h}from"../../../../chunks/ShadowCastVisualize.glsl.js";import{ShadowCastVisualizeTechnique as _}from"../shaders/ShadowCastVisualizeTechnique.js";import{ShadowCastVisualizeTechniqueConfiguration as l}from"../shaders/ShadowCastVisualizeTechniqueConfiguration.js";import{vertexCount as d}from"../../../webgl/Util.js";const u=4e4,c=5e4,p=1/512;let m=class extends s{constructor(e,s,t,i){super({}),this._techniqueRepository=e,this._rctx=s,this._data=t,this._requestRender=i,this._passParameters=new h(this._data),this._techniqueConfig=new l,this._enabled=!1,this._vao=n(s)}normalizeCtorArgs(){return{}}dispose(){this._stop(),this._vao=t(this._vao),this._techniqueRepository.release(this._technique),this._technique=null}get _visualizeShadowCastTechnique(){return this._technique=this._techniqueRepository.releaseAndAcquire(_,this._techniqueConfig,this._technique),this._technique}render(e){if(!this._showVisualization)return;this._passParameters.sampleScale=1/this._data.computedSamples;const s=this._visualizeShadowCastTechnique;this._rctx.bindVAO(this._vao),this._rctx.bindTechnique(s,this._passParameters,e),this._rctx.drawArrays(s.primitiveType,0,d(this._vao,"geometry"))}setOptions(e){void 0!==e.enabled&&this._setEnabled(e.enabled),void 0!==e.color&&this._setColor(e.color),void 0!==e.threshold&&(this._threshold=e.threshold),void 0!==e.visualization&&(this._visualization=e.visualization),void 0!==e.bandSize&&(this._bandSize=e.bandSize),void 0!==e.bandsEnabled&&(this._bandsEnabled=e.bandsEnabled)}get opacityFromElevation(){return this._passParameters.opacityFromElevation}set opacityFromElevation(e){this._passParameters.opacityFromElevation!==e&&(this._passParameters.opacityFromElevation=e,this.notifyChange("opacityFromElevation"))}get _showVisualization(){return this._enabled&&this._data.computedSamples>0&&this.opacityFromElevation>p}get _threshold(){return this._passParameters.threshold}set _threshold(e){this._threshold!==e&&(this._passParameters.threshold=e,this._requestRenderIfRunning())}get _visualization(){return this._techniqueConfig.visualization}set _visualization(e){e!==this._visualization&&(this._techniqueConfig.visualization=e,this._techniqueRepository.release(this._technique),this._technique=null,this._requestRenderIfRunning())}get _bandSize(){return this._passParameters.bandSize}set _bandSize(e){e!==this._bandSize&&(this._passParameters.bandSize=e,this._requestRenderIfRunning())}get _bandsEnabled(){return this._techniqueConfig.bandsEnabled}set _bandsEnabled(e){e!==this._bandsEnabled&&(this._techniqueConfig.bandsEnabled=e,this._techniqueRepository.release(this._technique),this._technique=null,this._requestRenderIfRunning())}_setColor(e){const s=this._passParameters.color;a(e,s)||(o(this._passParameters.color,e),this._requestRenderIfRunning())}_setEnabled(e){e!==this._enabled&&(e?this._start():this._stop())}_requestRenderIfRunning(){this._enabled&&this._requestRender()}_start(){this._enabled=!0,this._requestRender()}_stop(){this._enabled=!1,this._requestRender()}};e([i()],m.prototype,"opacityFromElevation",null),m=e([r("esri.views.3d.webgl-engine.lib.ShadowCastRenderer")],m);export{m as ShadowCastRenderer,c as shadowCastDisableElevationMax,u as shadowCastDisableElevationMin,p as shadowCastDisabledElevationThreshold};
|
|
@@ -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 has from"../../../../core/has.js";import{clamp as t,lerp as s,acosClamped as e}from"../../../../core/mathUtils.js";import{releaseMaybe as a}from"../../../../core/maybe.js";import{
|
|
5
|
+
import has from"../../../../core/has.js";import{clamp as t,lerp as s,acosClamped as e}from"../../../../core/mathUtils.js";import{releaseMaybe as a}from"../../../../core/maybe.js";import{a as i}from"../../../../chunks/mat3f64.js";import{w as r,m as h,i as n,u as c}from"../../../../chunks/mat4.js";import{a as o}from"../../../../chunks/mat4f64.js";import{s as u,i as l,a as _,l as d,k as m,c as f,g as p,n as g,e as x,j as b}from"../../../../chunks/vec2.js";import{a as M}from"../../../../chunks/vec2f64.js";import{h as w,c as C,E as j,e as T,s as y}from"../../../../chunks/vec3.js";import{c as D}from"../../../../chunks/vec3f64.js";import{s as H,t as v}from"../../../../chunks/vec4.js";import{c as S}from"../../../../chunks/vec4f64.js";import{ViewingMode as F}from"../../../ViewingMode.js";import{ColorFormat as R,DepthFormat as O}from"../core/FBOCache.js";import{CascadeCamera as E}from"./CascadeCamera.js";import{applyTextureResizeModulo as U}from"./textureUtils.js";import{assert as B,logWithBase as k,verify as L,rayRay2D as N}from"./Util.js";import{TextureType as Q,ClearBufferBit as V}from"../../../webgl/enums.js";import{Texture as A}from"../../../webgl/Texture.js";var I;!function(t){t[t.Highlight=0]="Highlight",t[t.Default=1]="Default"}(I||(I={}));class W{constructor(){this.camera=new E,this.lightMat=o()}}class z{constructor(){this.maxNumCascadesHighQuality=4,this.maxNumCascadesLowQuality=4,this.textureSizeModHighQuality=1.3,this.textureSizeModLowQuality=.9,this.splitSchemeLambda=0}}class P{get depthTexture(){return this._handle?.colorTexture}get _textureWidth(){return this._textureHeight*this._numCascades}get numCascades(){return this._numCascades}get cascadeDistances(){return H(this._usedCascadeDistances,this._cascadeDistances[0],this._numCascades>1?this._cascadeDistances[1]:1/0,this._numCascades>2?this._cascadeDistances[2]:1/0,this._numCascades>3?this._cascadeDistances[3]:1/0)}constructor(t,s){this._fbos=t,this._viewingMode=s,this._enabled=!1,this._snapshots=new Array,this._textureHeight=0,this._numCascades=1,this.settings=new z,this._projectionView=o(),this._projectionViewInverse=o(),this._modelViewLight=o(),this._cascadeDistances=[0,0,0,0,0],this._usedCascadeDistances=S(),this._cascades=[new W,new W,new W,new W],this._lastOrigin=null,this._maxTextureWidth=Math.min(has("esri-mobile")?4096:16384,t.rctx.parameters.maxTextureSize)}dispose(){this.enabled=!1,this.disposeOffscreenBuffers()}disposeOffscreenBuffers(){this._handle=a(this._handle),this._discardSnapshots()}set maxCascades(s){this.settings.maxNumCascadesHighQuality=t(Math.floor(s),1,4)}get maxCascades(){return this.settings.maxNumCascadesHighQuality}set enabled(t){this._enabled=t,t||this.disposeOffscreenBuffers()}get enabled(){return this._enabled}get ready(){return this._enabled&&null!=this.depthTexture}get cascades(){for(let t=0;t<this._numCascades;++t)st[t]=this._cascades[t];return st.length=this._numCascades,st}start(t,s,e,a,i){B(this.enabled);const{near:r,far:h}=this._clampNearFar(e);this._computeCascadeDistances(r,h,a),this._textureHeight=this._computeTextureHeight(t,i,a),this._setupMatrices(t,s);const{viewMatrix:n,projectionMatrix:c}=t;for(let o=0;o<this._numCascades;++o)this._constructCascade(o,c,n,s);this._lastOrigin=null,this.clear()}finish(){B(this.enabled),this._handle?.releaseDepth()}getShadowMapMatrices(t){if(!this._lastOrigin||!w(t,this._lastOrigin)){this._lastOrigin=this._lastOrigin||D(),C(this._lastOrigin,t);for(let s=0;s<this._numCascades;++s){r(et,this._cascades[s].lightMat,t);for(let t=0;t<16;++t)at[16*s+t]=et[t]}}return at}moveSnapshot(t){B(this.enabled),this._handle?.releaseDepth(),this._snapshots[t]?.release(),this._snapshots[t]=this._handle,this._handle=null}copySnapshot(t){const s=this._handle?.colorTexture?.descriptor;if(!this.enabled||!s)return;this._snapshots[t]?.release();const{width:e,height:a}=s;this._snapshots[t]=this._fbos.acquire(R.RGBA4,e,a);const i=this._fbos.rctx;this._bindFbo();const r=i.bindTexture(this._snapshots[t]?.colorTexture,A.TEXTURE_UNIT_FOR_UPDATES);i.gl.copyTexSubImage2D(Q.TEXTURE_2D,0,0,0,0,0,e,a),i.bindTexture(r,A.TEXTURE_UNIT_FOR_UPDATES)}getSnapshot(t){return this.enabled?this._snapshots[t]?.colorTexture:null}clear(){const t=this._fbos.rctx;this._ensureFbo(),this._bindFbo(),t.setClearColor(1,1,1,1),t.clearSafe(V.COLOR_BUFFER_BIT|V.DEPTH_BUFFER_BIT)}_computeTextureHeight(t,s,e){const a=Math.min(window.devicePixelRatio,s)/t.pixelRatio,i=e?this.settings.textureSizeModHighQuality:this.settings.textureSizeModLowQuality,r=U(Math.floor(Math.max(t.fullWidth,t.fullHeight)*a*i));return Math.min(this._maxTextureWidth,this._numCascades*r)/this._numCascades}_ensureFbo(){this._handle?.fbo.width===this._textureWidth&&this._handle?.fbo.height===this._textureHeight||(this._handle?.release(),this._handle=this._fbos.acquire(R.RGBA4,this._textureWidth,this._textureHeight)),this._handle.acquireDepth(O.DEPTH16_BUFFER)}_discardSnapshot(t){this._snapshots[t]=a(this._snapshots[t])}_discardSnapshots(){for(let t=0;t<this._snapshots.length;++t)this._discardSnapshot(t);this._snapshots.length=0}_bindFbo(){const t=this._fbos.rctx;t.unbindTexture(this.depthTexture),t.bindFramebuffer(this._handle?.fbo)}_constructCascade(t,s,e,a){const i=this._cascades[t],n=-this._cascadeDistances[t],c=-this._cascadeDistances[t+1],o=(s[10]*n+s[14])/Math.abs(s[11]*n+s[15]),u=(s[10]*c+s[14])/Math.abs(s[11]*c+s[15]);B(o<u);for(let r=0;r<8;++r){H(G,r%4==0||r%4==3?-1:1,r%4==0||r%4==1?-1:1,r<4?o:u,1);const t=X[r];v(t,G,this._projectionViewInverse),t[0]/=t[3],t[1]/=t[3],t[2]/=t[3]}j(tt,X[0]),i.camera.viewMatrix=r(q,this._modelViewLight,tt);for(let r=0;r<8;++r)T(X[r],X[r],i.camera.viewMatrix);let l=X[0][2],_=X[0][2];for(let r=1;r<8;++r)l=Math.min(l,X[r][2]),_=Math.max(_,X[r][2]);l-=200,_+=200,i.camera.near=-_,i.camera.far=-l,wt(e,a,l,_,i.camera),h(i.lightMat,i.camera.projectionMatrix,i.camera.viewMatrix);const d=this._textureHeight;i.camera.viewport=[t*d,0,d,d]}_setupMatrices(t,s){h(this._projectionView,t.projectionMatrix,t.viewMatrix),n(this._projectionViewInverse,this._projectionView);const e=this._viewingMode===F.Global?t.eye:y(tt,0,0,1);c(this._modelViewLight,[0,0,0],[-s[0],-s[1],-s[2]],e)}_clampNearFar(t){let{near:s,far:e}=t;return s<2&&(s=2),e<2&&(e=2),s>=e&&(s=2,e=4),{near:s,far:e}}_computeCascadeDistances(t,e,a){const i=a?this.settings.maxNumCascadesHighQuality:this.settings.maxNumCascadesLowQuality;this._numCascades=Math.min(1+Math.floor(k(e/t,4)),i);const r=(e-t)/this._numCascades,h=(e/t)**(1/this._numCascades);let n=t,c=t;for(let o=0;o<this._numCascades+1;++o)this._cascadeDistances[o]=s(n,c,this.settings.splitSchemeLambda),n*=h,c+=r}get test(){return{cascades:this._cascades,textureHeight:this._textureHeight}}}const q=o(),G=S(),X=[];for(let Ct=0;Ct<8;++Ct)X.push(S());const J=M(),K=M(),Y=M(),Z=M(),$=M(),tt=D(),st=[],et=o(),at=new Array(64),it=M(),rt=M(),ht=[M(),M(),M(),M()],nt=M(),ct=M(),ot=M(),ut=M(),lt=M(),_t=M(),dt=M();function mt(t,s,e,a,i,r,h,n){u(it,0,0);for(let u=0;u<4;++u)l(it,it,t[u]);_(it,it,.25),u(rt,0,0);for(let u=4;u<8;++u)l(rt,rt,t[u]);_(rt,rt,.25),d(ht[0],t[4],t[5],.5),d(ht[1],t[5],t[6],.5),d(ht[2],t[6],t[7],.5),d(ht[3],t[7],t[4],.5);let c=0,o=m(ht[0],it);for(let u=1;u<4;++u){const t=m(ht[u],it);t<o&&(o=t,c=u)}f(nt,ht[c],t[c+4]);const M=nt[0];let w,C;nt[0]=-nt[1],nt[1]=M,f(ct,rt,it),p(ct,nt)<0&&g(nt,nt),d(nt,nt,ct,e),x(nt,nt),w=C=p(f(ot,t[0],it),nt);for(let u=1;u<8;++u){const s=p(f(ot,t[u],it),nt);s<w?w=s:s>C&&(C=s)}b(a,it),_(ot,nt,w-s),l(a,a,ot);let j=-1,T=1,y=0,D=0;for(let u=0;u<8;++u){f(ut,t[u],a),x(ut,ut);const s=nt[0]*ut[1]-nt[1]*ut[0];s>0?s>j&&(j=s,y=u):s<T&&(T=s,D=u)}L(j>0,"leftArea"),L(T<0,"rightArea"),_(lt,nt,w),l(lt,lt,it),_(_t,nt,C),l(_t,_t,it),dt[0]=-nt[1],dt[1]=nt[0];const H=N(a,t[D],_t,l(ot,_t,dt),1,i),v=N(a,t[y],_t,ot,1,r),S=N(a,t[y],lt,l(ot,lt,dt),1,h),F=N(a,t[D],lt,ot,1,n);L(H,"rayRay"),L(v,"rayRay"),L(S,"rayRay"),L(F,"rayRay")}function ft(t,s){return 3*s+t}const pt=M();function gt(t,s){return u(pt,t[s],t[s+3]),pt}const xt=M(),bt=i();function Mt(t,s,e,a,i){f(xt,e,a),_(xt,xt,.5),bt[0]=xt[0],bt[1]=xt[1],bt[2]=0,bt[3]=xt[1],bt[4]=-xt[0],bt[5]=0,bt[6]=xt[0]*xt[0]+xt[1]*xt[1],bt[7]=xt[0]*xt[1]-xt[1]*xt[0],bt[8]=1,bt[ft(0,2)]=-p(gt(bt,0),t),bt[ft(1,2)]=-p(gt(bt,1),t);let r=p(gt(bt,0),e)+bt[ft(0,2)],h=p(gt(bt,1),e)+bt[ft(1,2)],n=p(gt(bt,0),a)+bt[ft(0,2)],c=p(gt(bt,1),a)+bt[ft(1,2)];r=-(r+n)/(h+c),bt[ft(0,0)]+=bt[ft(1,0)]*r,bt[ft(0,1)]+=bt[ft(1,1)]*r,bt[ft(0,2)]+=bt[ft(1,2)]*r,r=1/(p(gt(bt,0),e)+bt[ft(0,2)]),h=1/(p(gt(bt,1),e)+bt[ft(1,2)]),bt[ft(0,0)]*=r,bt[ft(0,1)]*=r,bt[ft(0,2)]*=r,bt[ft(1,0)]*=h,bt[ft(1,1)]*=h,bt[ft(1,2)]*=h,bt[ft(2,0)]=bt[ft(1,0)],bt[ft(2,1)]=bt[ft(1,1)],bt[ft(2,2)]=bt[ft(1,2)],bt[ft(1,2)]+=1,r=p(gt(bt,1),s)+bt[ft(1,2)],h=p(gt(bt,2),s)+bt[ft(2,2)],n=p(gt(bt,1),e)+bt[ft(1,2)],c=p(gt(bt,2),e)+bt[ft(2,2)],r=-.5*(r/h+n/c),bt[ft(1,0)]+=bt[ft(2,0)]*r,bt[ft(1,1)]+=bt[ft(2,1)]*r,bt[ft(1,2)]+=bt[ft(2,2)]*r,r=p(gt(bt,1),s)+bt[ft(1,2)],h=p(gt(bt,2),s)+bt[ft(2,2)],n=-h/r,bt[ft(1,0)]*=n,bt[ft(1,1)]*=n,bt[ft(1,2)]*=n,i[0]=bt[0],i[1]=bt[1],i[2]=0,i[3]=bt[2],i[4]=bt[3],i[5]=bt[4],i[6]=0,i[7]=bt[5],i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=bt[6],i[13]=bt[7],i[14]=0,i[15]=bt[8]}function wt(t,s,a,i,r){const h=1/X[0][3],n=1/X[4][3];B(h<n);let c=h+Math.sqrt(h*n);const o=Math.sin(e(t[2]*s[0]+t[6]*s[1]+t[10]*s[2]));c/=o,mt(X,c,o,J,K,Y,Z,$),Mt(J,K,Z,$,r.projectionMatrix),r.projectionMatrix[10]=2/(a-i),r.projectionMatrix[14]=-(a+i)/(a-i)}export{P as ShadowMap,I as SnapshotSlot};
|
|
@@ -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 s from"../../../../core/Evented.js";import{someMap as r}from"../../../../core/MapUtils.js";import{disposeMaybe as i,removeMaybe as n}from"../../../../core/maybe.js";import{generateUID as o}from"../../../../core/uid.js";import{property as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import s from"../../../../core/Evented.js";import{someMap as r}from"../../../../core/MapUtils.js";import{disposeMaybe as i,removeMaybe as n}from"../../../../core/maybe.js";import{generateUID as o}from"../../../../core/uid.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{s as l}from"../../../../chunks/vec4.js";import{c as d}from"../../../../chunks/vec4f64.js";import{ContentObjectType as c}from"./ContentObjectType.js";import{textTextureAtlas as m}from"./testUtils.js";import{applyTextureResizeModulo as _}from"./textureUtils.js";import{VertexAttribute as u}from"./VertexAttribute.js";import{TaskPriority as p,Task as g,noBudget as x}from"../../../support/Scheduler.js";import{TextureWrapMode as f,TextureSamplingMode as T}from"../../../webgl/enums.js";import{Texture as v}from"../../../webgl/Texture.js";import{TextureDescriptor as A}from"../../../webgl/TextureDescriptor.js";const R=4096;class y{constructor(){this.offset={x:0,y:0},this.uvMinMax=d()}}class j{constructor(e,t){this.textId=e,this.textRenderer=t,this.placement=new y,this.rendered=!1}}class z{constructor(e,t,s){this.size=e,this.cursor=t,this.lineHeight=s}resetCursor(){this.cursor.x=w,this.cursor.y=w+E,this.lineHeight=0}getUsage(){return(this.cursor.x+this.cursor.y*this.size.width)/(this.size.width*this.size.height)}}let b=class extends t{constructor(e){super(e),this.type=c.Texture,this.id=o(),this.events=new s,this._glTexture=null,this._needsClear=!1,this._elementsToAddOrUpdate=new Map,this._elementsToRemove=new Map,this._elementsToRender=new Map,this._elements=new Map,this._stageObjects=new Map,this.updating=!1}initialize(){this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id","textAtlasCanvas"),this._canvas.setAttribute("style","display:none"),this._ctx=this._canvas.getContext("2d"),this._stage=this.view._stage,this._stage.add(this),this._atlas=new z({width:R,height:256},{x:0,y:0},0),this._updateCanvasElementSize(this._atlas),this._resetAtlasCursor()}unload(){this._glTexture=i(this._glTexture),this.updating=!1,this.events.emit("unloaded")}_createDescriptor(e){const t=new A;return t.wrapMode=f.CLAMP_TO_EDGE,t.flipped=!0,t.samplingMode=T.LINEAR_MIPMAP_LINEAR,t.hasMipmap=!0,t.preMultiplyAlpha=!0,t.maxAnisotropy=e.parameters.maxMaxAnisotropy,t}get glTexture(){return this._glTexture}load(e){return this._glTexture||(this._glTexture=new v(e,this._createDescriptor(e),this._canvas),this._frameWorker=this.view.resourceController.scheduler.registerTask(p.TEXT_TEXTURE_ATLAS,this),this.setDirty()),this._glTexture}dispose(){this._elements=null,this._elementsToAddOrUpdate=null,this._elementsToRemove=null,this._elementsToRender=null,this._frameWorker=n(this._frameWorker),this._glTexture&&(this._stage.remove(this),this._glTexture=i(this._glTexture)),this._canvas.width=0,this._canvas.height=0,this._canvas=null,this._ctx=null}_updateCanvasElementSize(e){this._canvas.setAttribute("width",e.size.width.toString()),this._canvas.setAttribute("height",e.size.height.toString())}_resizeAtlas(e){const t=this._atlas;t.size.height=e,null!=this._glTexture&&this._glTexture.resize(t.size.width,t.size.height),this._updateCanvasElementSize(t)}_resetAtlasCursor(){this._atlas.resetCursor(),this._needsClear=!0}_addAtlasElement(e,t,s,r){const i=this._atlas,{renderedWidth:n,renderedHeight:o}=e.textRenderer;e.placement.offset.x=i.cursor.x,e.placement.offset.y=i.cursor.y,l(e.placement.uvMinMax,e.placement.offset.x/i.size.width,1-(e.placement.offset.y+o)/i.size.height,(e.placement.offset.x+n)/i.size.width,1-e.placement.offset.y/i.size.height),i.cursor.x+=s,i.lineHeight=Math.max(i.lineHeight,r),this._elements.set(t,e)}_removeAtlasElement(e){if(e&&this._elements.has(e.textId)){const t=e.placement.offset;this._ctx.clearRect(t.x,t.y,e.textRenderer.renderedWidth,e.textRenderer.renderedHeight),this._elements.delete(e.textId)}}_ensureStageObjects(e){const t=this._stageObjects.get(e);if(t)return t;const s=new Set;return this._stageObjects.set(e,s),s}_addStageObject(e,t){this._ensureStageObjects(e).add(t)}_removeStageObject(e,t){const s=this._stageObjects.get(e);s&&s.delete(t)&&(t.geometries[0].setAttributeData(u.SIZE,[0,0]),t.geometryVertexAttrsUpdated(t.geometries[0]))}_processAddition(e){const t=this._atlas,s=e.textId,r=e.textRenderer.renderedWidth,i=e.textRenderer.renderedHeight,n=r+w,o=i+w+E;if(t.cursor.x+n<t.size.width&&t.cursor.y+o<t.size.height)this._addAtlasElement(e,s,n,o),this._elementsToRender.set(s,e),this._elementsToAddOrUpdate.delete(s);else{if(!(t.cursor.y+o+t.lineHeight<t.size.height)){const e=t.cursor.y+o+t.lineHeight-t.size.height,s=t.size.height+e<R,r=t.size.height<R;if(s){const s=Math.ceil(t.size.height*Math.max(1.3,(e+t.size.height)/t.size.height));this._resizeAtlas(Math.min(_(s),R))}return r?(this._repack(),k.REPACK):(this._processRemovals(),k.OK)}t.cursor.x=w,t.cursor.y+=t.lineHeight,t.lineHeight=0,this._addAtlasElement(e,s,n,o),this._elementsToRender.set(s,e),this._elementsToAddOrUpdate.delete(s)}return k.OK}_processRemovals(){this._elementsToRemove.forEach(((e,t)=>{const s=this._stageObjects.get(t);s&&0!==s.size||this._removeAtlasElement(e),s&&0===s.size&&this._stageObjects.delete(t)})),this._elementsToRemove.clear()}_repack(){this._processRemovals(),this._elements.forEach(((e,t)=>{e.rendered=!1,this._elementsToAddOrUpdate.set(t,e)})),this._elements.clear(),this._resetAtlasCursor(),this._elementsToRender.clear()}_processRenderingRequest(e){this._ctx.clearRect(e.placement.offset.x,e.placement.offset.y,e.textRenderer.renderedWidth,e.textRenderer.renderedHeight),e.textRenderer.render(this._ctx,e.placement.offset.x,e.placement.offset.y);const t=this._stageObjects.get(e.textId);t&&t.forEach((t=>O(t,e))),e.rendered=!0}get running(){return this.updating}runTask(e){if(null==this._glTexture)return g.YIELD;if(r(this._elementsToAddOrUpdate,((t,s)=>{const r=this._elements.get(s);if(r?.rendered){const t=this._stageObjects.get(s);return t&&t.forEach((e=>O(e,r))),this._elementsToAddOrUpdate.delete(s),e.madeProgress(),!1}return this._processAddition(t)===k.REPACK})))return this.runTask(x),void e.madeProgress();let t=!1;this._elementsToRender.size>0&&this._needsClear&&(this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._needsClear=!1),r(this._elementsToRender,((s,r)=>(this._processRenderingRequest(s),this._elementsToRender.delete(r),t=!0,e.madeProgress(),e.done))),t&&this._glTexture.setData(this._canvas),this.updating=this._elementsToRender.size>0,!this.updating&&m.orderedRepackingEnabled&&(this._repackOrdered(),e.madeProgress())}addTextTexture(e,t){const s=e.key;this._elementsToAddOrUpdate.has(s)||this._elementsToAddOrUpdate.set(s,new j(s,e)),this._addStageObject(s,t),this._elementsToRemove.delete(s),this.setDirty()}removeTextTexture(e,t){const s=e.key;this._elementsToRemove.set(s,this._elements.get(s)),this._removeStageObject(s,t)}setDirty(){this._glTexture&&(this.updating=!0)}_repackOrdered(){if(0===this._elements.size)return;const e=[];this._elements.forEach(((t,s)=>e.push({element:t,key:s})));let t=!0;for(let s=0;s<e.length-1;s++)if(e[s].key.localeCompare(e[s+1].key)>0){t=!1;break}if(!t||0!==this._elementsToRemove.size){e.sort(((e,t)=>e.key.localeCompare(t.key))),this._elements.clear();for(const{element:t,key:s}of e)this._elements.set(s,t);this._repack(),this.setDirty()}}get test(){const{_elements:e,_stageObjects:t,_elementsToRemove:s,_atlas:r}=this,i=this;return{elements:e,stageObjects:t,elementsToRemove:s,atlas:r,resizeAtlas:e=>i._resizeAtlas(e),run:e=>i.runTask(e)}}};function O(e,t){e.geometries[0].setAttributeData(u.UV0,t.placement.uvMinMax),e.geometries[0].setAttributeData(u.SIZE,[t.textRenderer.displayWidth,t.textRenderer.displayHeight]),e.geometryVertexAttrsUpdated(e.geometries[0])}e([h({constructOnly:!0})],b.prototype,"view",void 0),e([h({type:Boolean})],b.prototype,"updating",void 0),b=e([a("esri.views.3d.webgl-engine.lib.TextTextureAtlas")],b);const w=2,E=2;var k;!function(e){e[e.OK=0]="OK",e[e.REPACK=1]="REPACK"}(k||(k={}));export{b as TextTextureAtlas};
|
|
@@ -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"../../../../core/has.js";import t from"../../../../core/Error.js";import e from"../../../../core/Evented.js";import{disposeMaybe as r,removeMaybe as a}from"../../../../core/maybe.js";import{throwIfAborted as s,onAbort as i,createAbortError as o}from"../../../../core/promiseUtils.js";import{isArrayBuffer as n,isUint8Array as l}from"../../../../core/typedArrayUtil.js";import{isBlobProtocol as m,isDataProtocol as h}from"../../../../core/urlUtils.js";import{requestImage as
|
|
5
|
+
import"../../../../core/has.js";import t from"../../../../core/Error.js";import e from"../../../../core/Evented.js";import{disposeMaybe as r,removeMaybe as a}from"../../../../core/maybe.js";import{throwIfAborted as s,onAbort as i,createAbortError as o}from"../../../../core/promiseUtils.js";import{isArrayBuffer as n,isUint8Array as l}from"../../../../core/typedArrayUtil.js";import{isBlobProtocol as m,isDataProtocol as h}from"../../../../core/urlUtils.js";import{requestImage as _}from"../../../../support/requestImageUtils.js";import{loadImageAsync as p}from"../../../../support/requestUtils.js";import{TextureEncodingMimeType as d}from"./basicInterfaces.js";import{createTextureKTX2 as c,createTextureBasis as u,estimateMemoryKTX2 as g,estimateMemoryBasis as A}from"./BasisUtil.js";import{ContentObject as E}from"./ContentObject.js";import{ContentObjectType as T}from"./ContentObjectType.js";import{createDDSTexture as f}from"./DDSUtil.js";import{assert as D}from"./Util.js";import{TextureWrapMode as x,TextureSamplingMode as y,PixelFormat as F}from"../../../webgl/enums.js";import{Texture as I}from"../../../webgl/Texture.js";import{TextureDescriptor as U}from"../../../webgl/TextureDescriptor.js";class w extends E{get parameters(){return this._parameters}constructor(t,r){super(),this._data=t,this.type=T.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new e,this._parameters=r||{},this._parameters.mipmap=!1!==this._parameters.mipmap,this._parameters.noUnpackFlip=this._parameters.noUnpackFlip||!1,this._parameters.preMultiplyAlpha=this._parameters.preMultiplyAlpha||!1,this._parameters.wrap=this._parameters.wrap||{s:x.REPEAT,t:x.REPEAT},this._startPreload(t)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(t){null!=t&&(t instanceof HTMLVideoElement?(this.frameUpdate=e=>this._frameUpdate(t,e),this._startPreloadVideoElement(t)):t instanceof HTMLImageElement&&this._startPreloadImageElement(t))}_startPreloadVideoElement(t){if(!(m(t.src)||"auto"===t.preload&&t.crossOrigin)){t.preload="auto",t.crossOrigin="anonymous";const e=!t.paused;if(t.src=t.src,e&&t.autoplay){const e=()=>{t.removeEventListener("canplay",e),t.play()};t.addEventListener("canplay",e)}}}_startPreloadImageElement(t){h(t.src)||m(t.src)||t.crossOrigin||(t.crossOrigin="anonymous",t.src=t.src)}_createDescriptor(t){const e=new U;return e.wrapMode=this._parameters.wrap??x.REPEAT,e.flipped=!this._parameters.noUnpackFlip,e.samplingMode=this._parameters.mipmap?y.LINEAR_MIPMAP_LINEAR:y.LINEAR,e.hasMipmap=!!this._parameters.mipmap,e.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,e.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?t.parameters.maxMaxAnisotropy:1),e}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.gpuMemoryUsage||N(this._data,this._parameters)}load(t){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const e=this._data;return null==e?(this._glTexture=new I(t,this._createDescriptor(t),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof e?this._loadFromURL(t,e):e instanceof Image?this._loadFromImageElement(t,e):e instanceof HTMLVideoElement?this._loadFromVideoElement(t,e):e instanceof ImageData||e instanceof HTMLCanvasElement?this._loadFromImage(t,e):(n(e)||l(e))&&this._parameters.encoding===d.DDS_ENCODING?this._loadFromDDSData(t,e):(n(e)||l(e))&&this._parameters.encoding===d.KTX2_ENCODING?this._loadFromKTX2(t,e):(n(e)||l(e))&&this._parameters.encoding===d.BASIS_ENCODING?this._loadFromBasis(t,e):l(e)?this._loadFromPixelData(t,e):n(e)?this._loadFromPixelData(t,new Uint8Array(e)):null)}_frameUpdate(t,e){return null==this._glTexture||t.readyState<H.HAVE_CURRENT_DATA||e===t.currentTime?e:(this._glTexture.setData(t),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),t.currentTime)}_loadFromDDSData(t,e){return this._glTexture=f(t,this._createDescriptor(t),e),this._glTexture}_loadFromKTX2(t,e){return this._loadAsync((()=>c(t,this._createDescriptor(t),e).then((t=>(this._glTexture=t,t)))))}_loadFromBasis(t,e){return this._loadAsync((()=>u(t,this._createDescriptor(t),e).then((t=>(this._glTexture=t,t)))))}_loadFromPixelData(t,e){D(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(t);return r.pixelFormat=1===this._parameters.components?F.LUMINANCE:3===this._parameters.components?F.RGB:F.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new I(t,r,e),this._glTexture}_loadFromURL(t,e){return this._loadAsync((async r=>{const a=await _(e,{signal:r});return s(r),this._loadFromImage(t,a)}))}_loadFromImageElement(t,e){return e.complete?this._loadFromImage(t,e):this._loadAsync((async r=>{const a=await p(e,e.src,!1,r);return s(r),this._loadFromImage(t,a)}))}_loadFromVideoElement(t,e){return e.readyState>=H.HAVE_CURRENT_DATA?this._loadFromImage(t,e):this._loadFromVideoElementAsync(t,e)}_loadFromVideoElementAsync(e,r){return this._loadAsync((s=>new Promise(((n,l)=>{const m=()=>{r.removeEventListener("loadeddata",h),r.removeEventListener("error",_),a(p)},h=()=>{r.readyState>=H.HAVE_CURRENT_DATA&&(m(),n(this._loadFromImage(e,r)))},_=e=>{m(),l(e||new t("Failed to load video"))};r.addEventListener("loadeddata",h),r.addEventListener("error",_);const p=i(s,(()=>_(o())))}))))}_loadFromImage(t,e){const r=C(e);this._parameters.width=r.width,this._parameters.height=r.height;const a=this._createDescriptor(t);return a.pixelFormat=3===this._parameters.components?F.RGB:F.RGBA,a.width=r.width,a.height=r.height,this._glTexture=new I(t,a,e),this._glTexture}_loadAsync(t){const e=new AbortController;this._loadingController=e;const r=t(e.signal);this._loadingPromise=r;const a=()=>{this._loadingController===e&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(a,a),r}unload(){if(this._glTexture=r(this._glTexture),null!=this._loadingController){const t=this._loadingController;this._loadingController=null,this._loadingPromise=null,t.abort()}this.events.emit("unloaded")}}function N(t,e){if(null==t)return 0;if(n(t)||l(t))return e.encoding===d.KTX2_ENCODING?g(t,!!e.mipmap):e.encoding===d.BASIS_ENCODING?A(t,!!e.mipmap):t.byteLength;const{width:r,height:a}=t instanceof Image||t instanceof ImageData||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?C(t):e;return(e.mipmap?4/3:1)*r*a*(e.components||4)||0}function C(t){return t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t}var H;!function(t){t[t.HAVE_NOTHING=0]="HAVE_NOTHING",t[t.HAVE_METADATA=1]="HAVE_METADATA",t[t.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",t[t.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",t[t.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA"}(H||(H={}));export{w as Texture};
|
|
@@ -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{isPromiseLike as o,isAbortError as i}from"../../../../core/promiseUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{RenderRequestType as a}from"./basicInterfaces.js";import{ContentObjectType as h}from"./ContentObjectType.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{isPromiseLike as o,isAbortError as i}from"../../../../core/promiseUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{RenderRequestType as a}from"./basicInterfaces.js";import{ContentObjectType as h}from"./ContentObjectType.js";import{isFrameUpdateTexture as p}from"./ITexture.js";import{TextureTechnique as c}from"./TextureTechnique.js";import{TextureTechniqueConfiguration as l}from"./TextureTechniqueConfiguration.js";import{assert as d}from"./Util.js";import{TaskPriority as m}from"../../../support/Scheduler.js";let _=class extends t{constructor(e,t,s){super({}),this._stage=e,this._techniqueRepository=t,this._rctx=s,this._textures=new Map,this._loadingCount=0,this._frameUpdates=new Map,this.events=new r,this._frameTask=e.view.resourceController.scheduler.registerTask(m.TEXTURE_UNLOAD)}normalizeCtorArgs(){return{}}destroy(){this._frameTask.remove(),this._stage.forEachOfType(h.Texture,(e=>e.unload()))}get updating(){return this._loadingCount>0||this._frameTask.updating}get textureTechnique(){return null==this._textureTechnique&&(this._textureTechnique=this._techniqueRepository.acquire(c,new l)),this._textureTechnique}acquire(e){const t=this._textures.get(e);return t?(t.ref(),t.loadingPromise??t):this._createNewRef(e)}update(){let e=!1;this._frameUpdates.forEach((t=>{const r=t.texture.frameUpdate(t.previousToken);r>=0&&r!==t.previousToken&&(t.previousToken=r,e=!0)})),e&&this.events.emit("changed",a.BACKGROUND)}_createNewRef(e){const t=this._stage.getObject(e);if(null==t)return d(void 0!==t),null;const r=t.events.on("unloaded",(()=>{r.remove(),this._onTextureUnloaded(e)})),n=new f(e,(()=>{this._frameTask.schedule((()=>{n.isUnreferenced&&t.unload()}))}));return this._textures.set(e,n),n.ref(),t.glTexture?(this._updateGLTexture(n,t.glTexture),p(t)&&this._frameUpdates.set(e,{texture:t,previousToken:-1}),n):(this._loadingCount++,n.loadingPromise=this._stage.schedule((()=>{const r=t.load(this._rctx),u=r=>(this._loadingCount--,n.loadingPromise=null,this._updateGLTexture(n,r),p(t)&&this._frameUpdates.set(e,{texture:t,previousToken:-1}),n),a=e=>(this._loadingCount--,n.loadingPromise=null,i(e)||s.getLogger(this).error(e),null);return o(r)?r.then(u,a):u(r)})),n.loadingPromise)}_updateGLTexture(e,t){e.glTexture=t,this.events.emit("changed",a.UPDATE)}_onTextureUnloaded(e){this._textures.delete(e),this._frameUpdates.delete(e)}};e([n()],_.prototype,"_loadingCount",void 0),e([n()],_.prototype,"_frameTask",void 0),e([n()],_.prototype,"updating",null),_=e([u("esri.views.3d.webgl-engine.lib.TextureRepository")],_);class f{constructor(e,t){this.id=e,this._release=t,this._refCount=0}get isUnreferenced(){return 0===this._refCount}ref(){++this._refCount}release(){--this._refCount,this._refCount>0||(0!==this._refCount?(s.getLogger("esri.views.3d.webgl-engine.lib.TextureRepository.RefCountedTextureImpl").error("Cannot dereference texture that has no references!"),this._refCount=0):this._release())}}export{_ as TextureRepository};
|
|
@@ -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{unpackFloatRGBA as t}from"../../../../core/floatRGBA.js";import e from"../../../../core/PooledArray.js";import{m as r,
|
|
5
|
+
import{unpackFloatRGBA as t}from"../../../../core/floatRGBA.js";import e from"../../../../core/PooledArray.js";import{m as r,h as i}from"../../../../chunks/mat4.js";import{a as n}from"../../../../chunks/mat4f64.js";import{e as s}from"../../../../chunks/vec3.js";import{l as a}from"../../../../chunks/vec4.js";import{c as o}from"../../../../chunks/vec4f64.js";import{intersectsSphere as h,create as f,copy as c}from"../../../../geometry/support/frustum.js";import{c as _}from"../../../../chunks/sphere.js";import{maxScale as l}from"../../support/mathUtils.js";import{empty as u,union as d,set as m,DepthRange as g}from"./depthRange.js";import p from"./Octree.js";import{assert as b}from"./Util.js";const w=1e4,v=100,R=500,j=500,C=.1;function A(e,r,i){return t(r,e)*(i[1]-i[0])+i[0]}function B(t,e,r){let i=0;if(!e.some((t=>(i+=t.numGeometries,i>=w))))return S.compute(t,e);const n=u();return r.forAll((e=>d(n,M(t,e)))),n}function M(t,e){if(!e.visible)return;const r=u(),i=e.getSpatialQueryAccelerator();return i?O(r,t,i):T(r,t,e.objects),r}function O(t,e,r){const i=e.eye,n=e.viewForward,s=e.frustum,a=t=>t.visible,o=r.objectCount;if(o<R)m(E,e.near,Math.min(t.near,e.far)),r.forEachInDepthRange(i,n,p.DepthOrder.FRONT_TO_BACK,E,((r,i)=>{D(t,e,r),E.far=t.near,i.setRange(E)}),s,a),m(E,Math.max(t.far,e.near),e.far),r.forEachInDepthRange(i,n,p.DepthOrder.BACK_TO_FRONT,E,((r,i)=>{D(t,e,r),E.near=t.far,i.setRange(E)}),s,a);else{const i=Math.max(Math.min(o,j),Math.ceil(o*C)),h=r.findClosest(n,p.DepthOrder.FRONT_TO_BACK,s,a,i),f=r.findClosest(n,p.DepthOrder.BACK_TO_FRONT,s,a,i);h&&f&&(x(t,e,h.boundingVolumeWorldSpace.bounds),x(t,e,f.boundingVolumeWorldSpace.bounds))}}function T(t,e,r){K.clear(),r.forAll((t=>{t.visible&&0!==t.geometries.length&&K.add(t)})),K.empty||(K.sort(e),m(E,e.near,Math.min(t.near,e.far)),K.forEachInDepthRange(E,p.DepthOrder.FRONT_TO_BACK,((r,i)=>{i<t.near&&D(t,e,r)})),m(E,Math.max(t.far,e.near),e.far),K.forEachInDepthRange(E,p.DepthOrder.BACK_TO_FRONT,((e,r,i)=>{t.far=Math.max(t.far,i)})))}function D(t,e,i){if(!i.visible)return;if(!h(e.frustum,i.boundingVolumeWorldSpace.bounds))return;const n=i.transformation,s=k;i.geometries.forEach((i=>{r(s,n,i.transformation);const a=l(s);F(t,e,i.boundingInfo,s,a)}))}function F(t,e,r,i,n){if(null==r)return;s(W,r.center,i);const{eye:a,viewForward:o}=e,f=o[0]*(W[0]-a[0])+o[1]*(W[1]-a[1])+o[2]*(W[2]-a[2]);if(W[3]=r.radius*n,!(f-W[3]>t.near&&f+W[3]<t.far)&&h(e.frustum,W))if(r.radius>v&&r.getChildren())for(const s of r.getChildren())F(t,e,s,i,n);else V.unionDepthRangeWithAABB(t,e.viewProjectionMatrix,i,r.bbMin,r.bbMax)}function x(t,e,r){const i=e.eye,n=e.viewForward,s=(r[0]-i[0])*n[0]+(r[1]-i[1])*n[1]+(r[2]-i[2])*n[2];t.near=Math.min(t.near,s-r[3]),t.far=Math.max(t.far,s+r[3])}class I{constructor(){this._items=new e({allocator:t=>t||{object:null,distance:0,near:0,far:0},deallocator:t=>(t.object=null,t.distance=0,t.near=0,t.far=0,t)})}get length(){return this._items.length}get empty(){return 0===this._items.length}clear(){this._items.clear()}add(t){this._items.pushNew().object=t}sort(t){const e=t.eye,r=t.viewForward;this._items.forAll((t=>{const i=t.object.boundingVolumeWorldSpace.bounds,n=(i[0]-e[0])*r[0]+(i[1]-e[1])*r[1]+(i[2]-e[2])*r[2];t.distance=n,t.near=n-i[3],t.far=n+i[3]})),this._items.sort(((t,e)=>t.distance-e.distance))}forEachInDepthRange(t,e,r){if(e===p.DepthOrder.FRONT_TO_BACK)for(let i=0;i<this._items.length;++i){const e=this._items.data[i];e.far<t.near||e.near>t.far||r(e.object,e.near,e.far)}else for(let i=this._items.length-1;i>=0;--i){const e=this._items.data[i];e.far<t.near||e.near>t.far||r(e.object,e.near,e.far)}}}class P{constructor(){this._view=n(),this._viewProj=n(),this._frustum=f(),this._geometries=new Array,this._near=[],this._far=[],this._nearCandidates=[],this._farCandidates=[],this._looseRange={near:0,far:0}}compute(t,e){this._reset(),i(this._view,t.viewMatrix),r(this._viewProj,t.projectionMatrix,this._view),c(this._frustum,t.frustum);const n=this._view,s=n[2],a=n[6],o=n[10],h=n[14];e.forAll((t=>t.forEachGeometry((t=>{if(!t.visible||!t.castShadow)return;const e=t.boundingSphere,r=s*e[0]+a*e[1]+o*e[2]+h,i=r-e[3],n=r+e[3];this._geometries.push(t),this._near.push(-n),this._far.push(-i)}))));const f=new g;if(0===this._geometries.length)return f;for(let r=0;r<this._geometries.length;++r)this._near[r]>f.far&&(f.far=this._near[r]),this._near[r]>2&&this._far[r]<f.near&&(f.near=this._far[r]);const _=this._looseRange;_.near=Math.max(.5*f.near,2),_.far=2*f.far;let l=0,u=0;for(let r=0;r<this._geometries.length;++r)this._near[r]<f.near&&(this._near[r]>=_.near?f.near=this._near[r]:this._nearCandidates[l++]=r),this._far[r]>f.far&&(this._far[r]<=_.far?f.far=this._far[r]:this._farCandidates[u++]=r);if(0===this._nearCandidates.length&&0===this._farCandidates.length)return f;this._nearCandidates.sort(((t,e)=>this._near[t]<this._near[e]?-1:this._near[t]>this._near[e]?1:0)),this._farCandidates.sort(((t,e)=>this._far[t]<this._far[e]?1:this._far[t]>this._far[e]?-1:0));for(let r=0;r<this._nearCandidates.length;++r){const t=this._nearCandidates[r];if(this._near[t]<f.near){const e=this._geometries[t],r=e.boundingInfo;this._includeNearBoundingInfoRec(r,e.shaderTransformation,f)}}for(let r=0;r<this._farCandidates.length;++r){const t=this._farCandidates[r];if(this._far[t]>f.far){const e=this._geometries[t],r=e.boundingInfo;this._includeFarBoundingInfoRec(r,e.shaderTransformation,f)}}return this._reset(),f}_reset(){this._geometries.length=0,this._near.length=0,this._far.length=0,this._nearCandidates.length=0,this._farCandidates.length=0}_includeNearBoundingInfoRec(t,e,r){if(null==t)return;const i=t.center;s(W,i,e);const n=l(e),a=W[0],o=W[1],h=W[2],f=t.radius*n,c=this._frustum;if(c[0][0]*a+c[0][1]*o+c[0][2]*h+c[0][3]>f||c[1][0]*a+c[1][1]*o+c[1][2]*h+c[1][3]>f||c[2][0]*a+c[2][1]*o+c[2][2]*h+c[2][3]>f||c[3][0]*a+c[3][1]*o+c[3][2]*h+c[3][3]>f)return;const _=this._view[2]*a+this._view[6]*o+this._view[10]*h+this._view[14],u=_+f;if(!(-(_-f)<2||-u>=r.near))if(-u>this._looseRange.near)r.near=-u;else{if(f>v){const i=t.getChildren();if(void 0!==i){for(const t of i)this._includeNearBoundingInfoRec(t,e,r);return}}V.unionDepthRangeWithAABB(r,this._viewProj,e,t.bbMin,t.bbMax)}}_includeFarBoundingInfoRec(t,e,r){if(null==t)return;let i=t.radius;const n=t.center;s(W,n,e);const a=l(e),o=W[0],h=W[1],f=W[2];i*=a;const c=this._frustum;if(c[0][0]*o+c[0][1]*h+c[0][2]*f+c[0][3]>i||c[1][0]*o+c[1][1]*h+c[1][2]*f+c[1][3]>i||c[2][0]*o+c[2][1]*h+c[2][2]*f+c[2][3]>i||c[3][0]*o+c[3][1]*h+c[3][2]*f+c[3][3]>i)return;const _=this._view[2]*o+this._view[6]*h+this._view[10]*f+this._view[14]-i;if(!(-_<=r.far))if(-_<this._looseRange.far)r.far=-_;else{if(i>v){const i=t.getChildren();if(void 0!==i){for(const t of i)this._includeFarBoundingInfoRec(t,e,r);return}}V.unionDepthRangeWithAABB(r,this._viewProj,e,t.bbMin,t.bbMax)}}}class y{constructor(){this._modelViewProj=n(),this._clipPosition=[o(),o(),o(),o(),o(),o(),o(),o()]}unionDepthRangeWithAABB(t,e,i,n,s){const a=this._modelViewProj;r(a,e,i);let o=!1;for(let r=0;r<8;++r){const t=this._clipPosition[r],e=0===r||3===r||4===r||7===r?n[0]:s[0],i=0===r||1===r||4===r||5===r?n[1]:s[1],o=r<4?n[2]:s[2];t[0]=a[0]*e+a[4]*i+a[8]*o+a[12],t[1]=a[1]*e+a[5]*i+a[9]*o+a[13],t[2]=a[2]*e+a[6]*i+a[10]*o+a[14],t[3]=a[3]*e+a[7]*i+a[11]*o+a[15]}for(let r=0;r<12;++r){const e=this._clipPosition[N[r][0]],i=this._clipPosition[N[r][1]],n=this._clipPosition[N[r][2]],s=this._clipTriangle(e,i,n);let a=!0;for(let t=0;t<s.length;++t){if(s[t][3]>=2){a=!1;break}}if(!a){o=!0;for(let e=0;e<s.length;++e){const r=s[e][3];Number.isFinite(r)&&(t.near=Math.min(r,t.near),t.far=Math.max(r,t.far))}}}return o}_inside(t,e){return 0===e?t[0]>=-t[3]:1===e?t[1]>=-t[3]:2===e?t[0]<=t[3]:3===e?t[1]<=t[3]:void b(!1)}_intersect(t,e,r){let i=0;return 0===r?i=(-t[3]-t[0])/(e[0]-t[0]+e[3]-t[3]):1===r?i=(-t[3]-t[1])/(e[1]-t[1]+e[3]-t[3]):2===r?i=(t[3]-t[0])/(e[0]-t[0]-e[3]+t[3]):3===r&&(i=(t[3]-t[1])/(e[1]-t[1]-e[3]+t[3])),a(o(),t,e,i)}_clipTriangle(t,e,r){let i=[t,e,r];for(let n=0;n<4;++n){const t=i;i=[];for(let e=0;e<t.length;++e){const r=t[e],s=t[(e+1)%t.length];this._inside(s,n)?(this._inside(r,n)||i.push(this._intersect(r,s,n)),i.push(s)):this._inside(r,n)&&i.push(this._intersect(r,s,n))}}return i}}const N=[[0,1,3],[2,3,1],[1,5,2],[6,2,5],[5,4,6],[7,6,4],[4,0,7],[3,7,0],[3,2,7],[6,7,2],[4,5,0],[1,0,5]],W=_(),k=n(),E=u(),K=new I,S=new P,V=new y;export{P as DepthRangeFromRenderGeometries,M as depthRangeFromLayer,B as depthRangeFromScene,A as textureToDepth};
|