@arcgis/core 4.34.0-next.1 → 4.34.0-next.3
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/Map.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/DimensionAnalysis.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/analysis/ViewshedAnalysis.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{253bcc3cc7bc4c2dc6ea.js → 03db109e9b695528c35d.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc61d02286b6ff5447cc.js → 09da6b3085fc84cd69d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf3555f91492a1a3b613.js → 09f76ca9b47b465c934f.js} +1 -1
- package/assets/esri/core/workers/chunks/{42d9989b2aad3ac28d4d.js → 0d78fc2c2bc1152f84db.js} +1 -1
- package/assets/esri/core/workers/chunks/0fd826e7f64a37aaaa1e.js +1 -0
- package/assets/esri/core/workers/chunks/{ead5d4e271effc04def3.js → 1415d4e2f5f3193be004.js} +1 -1
- package/assets/esri/core/workers/chunks/17e43a050fbf8dc87588.js +1 -0
- package/assets/esri/core/workers/chunks/1ee6e9a88f0676032e91.js +1 -0
- package/assets/esri/core/workers/chunks/{1c86aa3802d9ae0230ae.js → 28e31ac00dc95a1318e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{ece68a25651ef03fc95d.js → 342f61e784c9364a493b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0d23610475c85385fbff.js → 355e6bcdb401ada71f39.js} +1 -1
- package/assets/esri/core/workers/chunks/{bba6d7615d8f3862fe70.js → 36f0046ff6b46adce7b7.js} +1 -1
- package/assets/esri/core/workers/chunks/3adcf78ed1e7cd82666d.js +1 -0
- package/assets/esri/core/workers/chunks/{b0522dffa5600345c07e.js → 3e85e63148b5e93d3074.js} +1 -1
- package/assets/esri/core/workers/chunks/{d2ebb72a43d995ed368a.js → 42bb9bb6fe44a47d9b81.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ee41e9c92ed8ba4c763.js → 4dd0a5f327fa5fc7249d.js} +1 -1
- package/assets/esri/core/workers/chunks/{36b0d6b4089a96475201.js → 51ba7345c31e6eb79060.js} +1 -1
- package/assets/esri/core/workers/chunks/{66e79aa02b3aa12b3778.js → 5200be8bce60fa831026.js} +1 -1
- package/assets/esri/core/workers/chunks/{6b23ca6570357f9fb724.js → 52a57106a41b8c9483d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa63b0f7fa799cb2f81d.js → 562800b0af52a38a311b.js} +1 -1
- package/assets/esri/core/workers/chunks/{585c7b485c42555ec554.js → 61f9747c960d959b571b.js} +2 -2
- package/assets/esri/core/workers/chunks/{9fc35ec8185beba96715.js → 632d1a1287dde980479e.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d043965dcdc11b3aeaa.js → 63852887b3f07d50f7c9.js} +1 -1
- package/assets/esri/core/workers/chunks/{32ee2708edd307954125.js → 7174150bf7595c22f976.js} +1 -1
- package/assets/esri/core/workers/chunks/{e77371ddbaf4b2d9be8d.js → 74c0db9e3a62e9839b23.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ecc3a3737ae8622dfa4.js → 7b12607633bbdc318936.js} +1 -1
- package/assets/esri/core/workers/chunks/{06eb4832b6c86744e52e.js → 8008f5479f4d16964088.js} +1 -1
- package/assets/esri/core/workers/chunks/{d839a237d5edc243d645.js → 8aa8f9986b966ccb64e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{67338948e470c1251d8a.js → 8d14e957219364a81d5f.js} +3 -3
- package/assets/esri/core/workers/chunks/92a5dccb328229a9336b.js +1 -0
- package/assets/esri/core/workers/chunks/{631205dc4d73d49ec9ed.js → 95507ff0a243e451b99e.js} +1 -1
- package/assets/esri/core/workers/chunks/{1051a5a57b2fb843a555.js → 9cd55043f3d789f41815.js} +1 -1
- package/assets/esri/core/workers/chunks/{40f54c4f8ae63c6f3df9.js → a32dcd5bc4680374d30c.js} +1 -1
- package/assets/esri/core/workers/chunks/ad4f65d764654c70a117.js +1 -0
- package/assets/esri/core/workers/chunks/b2a6afa0cd537805b4b8.js +1 -0
- package/assets/esri/core/workers/chunks/{ac2607f1e8cd2e99907c.js → b70f65ccee01d48a610e.js} +2 -2
- package/assets/esri/core/workers/chunks/{571252c9822d73cf7b01.js → b845586219f284a215b2.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7b640f7a181bd26c7c7.js → bac5e1d50b69f0d94694.js} +1 -1
- package/assets/esri/core/workers/chunks/{9ca480eb8b2312381ccf.js → bcadcb709e622f2aaaf9.js} +1 -1
- package/assets/esri/core/workers/chunks/{c16e0da7a19310c71e8b.js → c6cd8784a3e222eb2d4a.js} +1 -1
- package/assets/esri/core/workers/chunks/{97c148adf0347c69a79c.js → c9604f8df909ec4fad46.js} +1 -1
- package/assets/esri/core/workers/chunks/{b87fec1753f164c845c5.js → ca76950d81ab4ebb65e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{faa40ef04604c7cce706.js → cb63ea6a53d3c2fc3179.js} +1 -1
- package/assets/esri/core/workers/chunks/{54f4a1131f99468db076.js → d33a5d79f2163ad62b1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{55f087bca75c3f2a4515.js → d3c0d7799c92c6f0e7d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{ca60b34c3e1ed2ff5934.js → dd2b316baae02bbdddac.js} +1 -1
- package/assets/esri/core/workers/chunks/{e3c1aea34ece8336dae1.js → e9aa1d9ded8a52a40c57.js} +1 -1
- package/assets/esri/core/workers/chunks/{80b596496800e8d60eb8.js → ed75e0962358523f4439.js} +1 -1
- package/assets/esri/core/workers/chunks/{0cf979a093e9744d1e80.js → ef7955a2509be0f03ca2.js} +1 -1
- package/assets/esri/core/workers/chunks/{b5d68d8460b7c15001dd.js → f1c6df5cf2ccb6ac47a1.js} +1 -1
- package/assets/esri/core/workers/chunks/f2aa8090827086c62dde.js +1 -0
- package/assets/esri/core/workers/chunks/{523046e04679e301797d.js → f3d97a4c4f433adbdab5.js} +1 -1
- package/assets/esri/core/workers/chunks/fd4c020297badcb81947.js +1 -0
- package/assets/esri/core/workers/chunks/{9a06476b834584d00d5c.js → feaf79b69d2e2a1f2aa2.js} +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- 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_en.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_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_no.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/FeatureTable/t9n/FeatureTable.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/chunks/FocusAreaColor.glsl.js +10 -8
- package/chunks/Laserlines.glsl.js +2 -2
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec42.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/decorators/persistable.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/effects/FocusArea.js +5 -0
- package/effects/FocusAreaOutline.js +5 -0
- package/effects/FocusAreas.js +5 -0
- package/geometry/projection/projectPointToVector.js +1 -1
- package/geometry/projection/projectVectorToPoint.js +1 -1
- package/geometry/projection/projectVectorToVector.js +1 -1
- package/geometry/projection.js +1 -1
- package/geometry/projectionUtils.js +5 -0
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/geometry/support/meshUtils/extent.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +171 -68
- package/kernel.js +1 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/applyEditsUtils.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/projectionSupport.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/CornersGeoreference.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/ExtentAndRotationGeoreference.js +1 -1
- package/layers/support/GeoreferenceBase.js +1 -1
- package/layers/support/LocalMediaElementSource.js +1 -1
- package/layers/support/MediaElementView.js +1 -1
- package/layers/support/PolygonCollection.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/networks/support/UNTraceConfiguration.js +1 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/webScene.js +1 -1
- package/portal/support/portalItemUtils.js +1 -1
- package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
- package/rest/knowledgeGraph/GraphAddFieldIndexResult.js +5 -0
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddPropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphDataModelOperationResult.js +5 -0
- package/rest/knowledgeGraph/GraphDeleteFieldIndexResult.js +5 -0
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeletePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdatePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/networks/support/CircuitPath.js +5 -0
- package/rest/networks/support/CircuitPathConnectivityElement.js +5 -0
- package/rest/networks/support/TraceLocation.js +1 -1
- package/rest/networks/support/TraceResult.js +1 -1
- package/smartMapping/renderers/pieChart.js +1 -1
- package/smartMapping/renderers/predominance.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/rendererUtils.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.d.ts +4 -0
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/smartMapping/statistics/histogram.js +1 -1
- package/smartMapping/statistics/summaryStatistics.js +1 -1
- package/support/persistableUrlUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/ViewStateManager.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/grid/GridView2D.js +1 -1
- package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/support/projectionUtils.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerControlPoints.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/support/Segment.js +1 -1
- package/views/3d/layers/FeatureLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/focusAreaStyle.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.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/utils/navigationUtils.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaEffect.js +5 -0
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +5 -0
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/snapping/GridSnappingEngine.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/layers/SceneLayerView.js +1 -1
- package/views/support/projectionUtils.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion/support/Format.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/tests.js +1 -1
- package/assets/esri/core/workers/chunks/094e8aae6dada24c8115.js +0 -1
- package/assets/esri/core/workers/chunks/24327d01cb2c5c55a4b7.js +0 -1
- package/assets/esri/core/workers/chunks/2b1486a466760d2152f5.js +0 -1
- package/assets/esri/core/workers/chunks/3a743653b786b010a57f.js +0 -1
- package/assets/esri/core/workers/chunks/62b2d3720693c93a60f2.js +0 -1
- package/assets/esri/core/workers/chunks/6d1e1a4fcb90ea8b6848.js +0 -1
- package/assets/esri/core/workers/chunks/87fc7b6c3e2d4f7775e2.js +0 -1
- package/assets/esri/core/workers/chunks/b06cb23048c32940f5de.js +0 -1
- package/assets/esri/core/workers/chunks/d3d98ea5b5e56fc60a31.js +0 -1
- package/views/FocusArea.js +0 -5
- package/views/FocusAreaOutline.js +0 -5
- package/views/FocusAreaOutlineItem.js +0 -5
- package/views/FocusAreas.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{neverReached as e}from"../../../../core/compilerUtils.js";import{acosClamped as t,clamp as r,asinClamped as n,deg2rad as i}from"../../../../core/mathUtils.js";import{fromRotation as a}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as o,t as c,g as u,f as l,k as m,j as d,e as f,n as p,l as M}from"../../../../chunks/vec32.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as y}from"../../../../geometry/ellipsoidUtils.js";import{
|
|
5
|
+
import{neverReached as e}from"../../../../core/compilerUtils.js";import{acosClamped as t,clamp as r,asinClamped as n,deg2rad as i}from"../../../../core/mathUtils.js";import{fromRotation as a}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as o,t as c,g as u,f as l,k as m,j as d,e as f,n as p,l as M}from"../../../../chunks/vec32.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as y}from"../../../../geometry/ellipsoidUtils.js";import{j as C,b as T,t as I}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as O,hasConstraintType as A,adjustRangeForInteraction as x}from"./common.js";import{ConstraintTypes as S}from"./ConstraintTypes.js";import{InteractionType as j}from"./InteractionType.js";import{TiltMode as v}from"./TiltMode.js";import{viewAngle as R}from"../../state/utils/viewUtils.js";function w(t,r,n,i=!0){W.eyeCenterDistance=0,W.requiresTwoSteps=!1;const s=U(t,r,n,O,W);if(0===s)return!1;switch(a(_,-s,r.viewRight),n.tiltMode){case v.LOOK_AROUND:c(K,r.viewForward,_),u(K,K,W.eyeCenterDistance),r.center=l(z,r.eye,K);break;case v.TUMBLE:o(K,r.center,r.eye),c(K,K,_),r.eye=o(z,r.center,K);break;default:e(n.tiltMode)}return r.up=c(z,r.up,_),!W.requiresTwoSteps||!i||w(t,r,n,!1)}function U(e,t,r,n=O,i){if(!e.state.constraints.tilt)return 0;const a=Math.min(t.relativeElevation*J,t.distance),s=e.state.constraints.tilt(a,Q);return N(e,r,s),n.interactionType===j.TUMBLE&&A(n.selection,S.ALTITUDE)&&B(e,n.interactionStartCamera,s),r.tiltMode===v.LOOK_AROUND||n.tiltMode===v.LOOK_AROUND?P(e,t,s,i):D(e,t,s)}function D(e,t,n){const i=R(e.renderCoordsHelper,t.center,t.eye),a=i-r(i,n.min,n.max);return g(a)?a:0}function P(e,t,r,n){switch(n&&(n.requiresTwoSteps=!1),e.viewingMode){case"global":return E(e,t,r,n);case"local":return b(e,t,r,n)}}function b(e,t,n,i){const a=R(e.renderCoordsHelper,t.center,t.eye),s=r(a,n.min,n.max),o=a-s;if(!g(o))return 0;if(i){const r=Math.abs(e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude),n=e.renderCoordsHelper.getAltitude(t.eye)-r,a=Math.max(Math.cos(s),1e-4);Math.abs(a)>1e-4?i.eyeCenterDistance=n/a:i.eyeCenterDistance=t.distance}return o}function E(e,t,n,i){const a=L(e,t,V),s=r(a.tiltAtCenter,n.min,n.max);if(!g(a.tiltAtCenter-s))return 0;let o,c;return a.centerIsOnSurface?(o=q(a),c=k(a,o)):(o=a.constraints.clampTilt(a.distance,a.tiltAtCenter),i&&o<Math.PI/2&&(i.requiresTwoSteps=!0,o=Math.PI/2-1e-5),c=F(a,o)),i&&(i.eyeCenterDistance=H(a,o)),c}function L(e,r,n){const i=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,a=i+y(e.spatialReference).radius,s=e.renderCoordsHelper.intersectManifold(r.ray,i,z);return n.distance=Math.min(r.relativeElevation*J,r.distance),n.centerIsOnSurface=!1,null!=s?(n.distance=Math.min(r.relativeElevation*J,d(r.eye,s)),n.tiltAtCenter=R(e.renderCoordsHelper,s,r.eye),n.centerIsOnSurface=!0):e.state.isLocal?n.tiltAtCenter=R(e.renderCoordsHelper,r.center,r.eye):(C(T(I,a),r.ray,z),n.distance=Math.min(r.relativeElevation*J,d(r.eye,z)),n.tiltAtCenter=t(-f(r.viewForward,p(z,z)))),n.radius=a,n.eyeRadius=M(r.eye),n.constraints=e.state.constraints,n}function g(e){return Math.abs(e)>1e-9}function q(e){const{constraints:t,distance:r,tiltAtCenter:n}=e;let i=n,a=t.clampTilt(r,n);const s=H(e,a);if(t.clampTilt(s,n)===a)return a;let o=0;for(;o<10&&g(a-i);){const r=(i+a)/2,n=H(e,r);g(t.clampTilt(n,r)-r)?i=r:a=r,o++}return a}function H(e,t){if(!e.centerIsOnSurface)return e.distance;const i=Math.PI-r(t,0,Math.PI),a=n(e.radius/e.eyeRadius*Math.sin(i)),s=Math.PI-i-a,o=Math.sin(s)/Math.sin(i);if(e.eyeRadius<e.radius&&o>1){const t=Math.PI-a,r=Math.PI-i-t;return Math.sin(r)/Math.sin(i)*e.eyeRadius}return o*e.eyeRadius}function k(e,t){const r=n(e.radius/e.eyeRadius*Math.sin(e.tiltAtCenter)),i=n(e.radius/e.eyeRadius*Math.sin(t));return e.eyeRadius>e.radius?r-i:i-r}function F(e,t){return e.tiltAtCenter-Math.PI/2-(t-Math.PI/2)}function N(e,t,r){if(t.interactionType===j.NONE)return;const{interactionStartCamera:n,interactionFactor:i}=t;if(!n)return;const{min:a,max:s}=r,o=U(e,n,O,t),c=0===o?0:R(e.renderCoordsHelper,n.center,n.eye);r.min=a,r.max=s,t.interactionType===j.TUMBLE?(A(t.selection,S.ALTITUDE)&&B(e,n,r),x(o,c,!0,i,G,r)):x(o,c,!1,i,G,r)}function B(e,r,n){const i=e.state.constraints;if(e.state.isLocal||!i.altitude||!r)return;const a=m(r.center),s=Math.sqrt(a),o=r.distance,c=y(e.spatialReference).radius,u=i.altitude.min+c,l=i.altitude.max+c,d=(u*u-o*o-a)/(-2*s*o),f=(l*l-o*o-a)/(-2*s*o);n.min=Math.max(n.min,Math.min(Math.PI-t(f),n.max)),n.max=Math.min(n.max,Math.PI-t(d))}const K=h(),_=s(),z=h(),G=i(5),J=30,Q={min:0,max:0},V={constraints:null,radius:0,eyeRadius:0,centerIsOnSurface:!0,distance:0,tiltAtCenter:0},W={eyeCenterDistance:0,requiresTwoSteps:!1};export{w as applyTiltConstraint,U as getTiltConstraintError};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{G as l,c,g,m}from"../../../chunks/vec32.js";import{create as p,clone as d,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as _}from"../../../geometry/
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{G as l,c,g,m}from"../../../chunks/vec32.js";import{create as p,clone as d,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as _}from"../../../geometry/projectionUtils.js";import v from"../../../geometry/SpatialReference.js";import{projectPointToVector as f}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as w}from"../../../geometry/support/planetGCSUtils.js";import{isEarth as y}from"../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as b}from"../../ViewingMode.js";import{EnvironmentRenderer as P}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as T}from"../support/earthUtils.js";import{ColorAndIntensity as j,computeColorAndIntensity as L,computeVirtualLightDirection as G,computeShadowsEnabled as S}from"../support/sunUtils.js";import{Update as U}from"../webgl-engine/lib/Update.js";import{MainLight as C,AmbientLight as E,FillLight as H}from"../webgl-engine/lighting/Lightsources.js";let R=class extends t.EventedAccessor{constructor(){super(),this._tmpLightParameters=new j,this._defaultLightParameters=new j,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new C,this._ambientLight=new E,this._moonLight=new H,this._disableWeather=!1,this._renderer=null,this._resetReferencePosition()}destroy(){this.disconnectView()}get _view(){return this._renderer?.view}get updating(){return!!this._renderer?.updating||!this._canProjectCameraPosition}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&this._view?.state?.viewingMode===b.Global&&y(this._view.spatialReference)}get _weatherAvailable(){return this.weatherEnabled&&this._renderer?.weatherAvailable}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this._view?.stateManager?.camera?.position?.spatialReference??v.WGS84,t=w(e);return _(e,t)}connectView(e){if(this._renderer)return;this._renderer=new P({view:e});const t=()=>this._updateRenderParameters(),i=()=>this._cameraHandler();this.addHandles([n((()=>e.environment.lighting),(e=>this._updateLightingHandler(e)),o),n((()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null),(e=>this._lightingDateHandler(e)),o),n((()=>e.environment.lighting.directShadowsEnabled),t,o),n((()=>e.qualitySettings.ambientOcclusion),t,o),n((()=>e.qualitySettings.reflections),t,o),n((()=>e.spatialReference),(()=>this._resetReferencePosition(!0)),o),n((()=>[e.environment.weather.type,this.weatherEnabled]),(()=>this._updateLighting(null,U.FadeWithWeather)),o),n((()=>"snowy"===e.environment.weather.type&&e.environment.weather.snowCover),t,o),n((()=>e.environment),(e=>e.setComputeWeatherAvailable((()=>this._weatherAvailable))),s),n((()=>e.viewingMode),(()=>this._resetReferencePosition(!0)),s),n((()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled),(e=>this._updateCameraTracking(e)),s),n((()=>e.state.camera),i,s),r((()=>this._canProjectCameraPosition),i,o)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=T(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const i=t.stateManager.camera;if(!i)return;const{position:n}=i,r=n.spatialReference??v.WGS84,o=w(r);if(!f(n,z,o)){if(null==this._referencePositionGeographic)return;return this._referencePositionGeographic=null,void this._updateLighting()}this._referencePositionGeographic?l(this._referencePositionGeographic,z)||(c(this._referencePositionGeographic,z),this.notifyChange("referencePositionGeographic")):this._referencePositionGeographic=d(z),this._autoUpdateTimezone(this._referencePositionGeographic,e)||this._updateLighting(e)}_updateLighting(e,t=U.Immediate){const i=this._view,{lighting:n}=i.environment,r="virtual"===n.type,o=this._referencePositionGeographic,s=null!=o?this._tmpLightParameters:this._defaultLightParameters;if(o){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";L(e,o,i.state.viewingMode,t,i.state.camera,s)}else r&&G(i.state.camera,i.state.viewingMode,s.direct.directionToLightSource);const a=this._mainLight,h=s.direct;g(a.intensity,h.color,h.intensity*Math.PI),c(a.direction,h.directionToLightSource),a.specularStrength=s.specularStrength,a.environmentStrength=s.environmentStrength;const l=this._ambientLight;g(l.intensity,s.ambient.color,s.ambient.intensity);const p=this._moonLight;m(p.intensity,k,M,s.globalFactor);const d=(1-.5*s.globalFactor)*(1-.4*s.noonFactor*(1-s.globalFactor));g(p.intensity,p.intensity,d),c(p.direction,h.directionToLightSource),this._view.stage?.renderer.updateLighting([a,l,p],s.noonFactor,s.globalFactor,this._weatherAvailable?t:U.Immediate),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||null==e)return!1;const i=this._tmpDate;i.setTime((t||this._view.environment.lighting.date).getTime());const n=T(e,this._tmpTz);if(null==n)return!1;let r=this._view.environment.lighting.positionTimezoneInfo;if(r.autoUpdated){if(r.hours===n.hours&&r.minutes===n.minutes&&r.seconds===n.seconds)return!1}else r=n;const o=i.getUTCHours()-(n.hours-r.hours),s=i.getUTCMinutes()-(n.minutes-r.minutes),a=i.getUTCSeconds()-(n.seconds-r.seconds);return i.setUTCHours(o),i.setUTCMinutes(s),i.setUTCSeconds(a),!t&&this._view.environment.lighting.autoUpdate(i,n)}_updateRenderParameters(){const e=this._view.stage;if(!e)return;const t=null==this._referencePositionGeographic||S(this._referencePositionGeographic[2],this._view.state.viewingMode);e.renderer.setParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&t,environment:this._view.environment,weatherVisible:this._weatherAvailable,qualitySettings:this._view.qualitySettings})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([a({type:Boolean,readOnly:!0})],R.prototype,"updating",null),e([a()],R.prototype,"_disableWeather",void 0),e([a()],R.prototype,"weatherEnabled",null),e([a()],R.prototype,"_weatherAvailable",null),e([a()],R.prototype,"referencePositionGeographic",null),e([a()],R.prototype,"_referencePositionGeographic",void 0),e([a()],R.prototype,"_renderer",void 0),e([a()],R.prototype,"_canProjectCameraPosition",null),R=e([h("esri.views.3d.environment.EnvironmentManager")],R);const k=u(.22,.22,.33),M=u(.22,.22,.22),z=p();export{R as EnvironmentManager};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Evented.js";import{makeHandle as i}from"../../../core/handleUtils.js";import"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as n,screenPointObjectToArray as a,castRenderScreenPointArray as c}from"../../../core/screenUtils.js";import{fromMat4 as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as d,set as _,multiply as u,identity as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{squaredDistance as f}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{f as p,o as b,t as v,g as y,c as j,s as L,i as S,d as w}from"../../../chunks/vec32.js";import{create as O,ZEROS as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import A from"../../../geometry/Point.js";import{canProjectWithoutEngine as E,projectPoint as D}from"../../../geometry/projection.js";import{computeENUToPCPFLocalRotation as F}from"../../../geometry/projection/localRotationUtils.js";import{sphericalPCPFtoLonLatElevation as z}from"../../../geometry/projection/projectors.js";import{containsPointObject as P}from"../../../geometry/support/aaBoundingRect.js";import{distance2 as C,fromPoints as x,create as M,closestRayDistance2 as k}from"../../../geometry/support/lineSegment.js";import{fromPositionAndNormal as I,create as U,intersectRay as W}from"../../../geometry/support/plane.js";import{create as B}from"../../../geometry/support/ray.js";import{sv3d as N}from"../../../geometry/support/vectorStacks.js";import{clonePoint as H,hydratedSpatialReference as q}from"../../../layers/graphics/hydratedFeatures.js";import{getElevationOffset as G}from"../../../support/elevationInfoUtils.js";import{getElevationAtPoint as V}from"../support/ElevationProvider.js";import{fromScreen as Y}from"../support/geometryUtils/ray.js";import J from"../webgl/RenderCamera.js";import{Object3D as K}from"../webgl-engine/lib/Object3D.js";import{UpdatePolicy as Q}from"../webgl-engine/lib/UpdatePolicy.js";import{WebGLLayer as X}from"../webgl-engine/lib/WebGLLayer.js";import{ManipulatorStateCustomFlags as Z,ManipulatorStateFlags as $}from"../../interactive/interfaces.js";class ee{constructor(e){this.metadata=void 0,this._camera=new J,this._elevation={offset:0,override:null},this.collisionType={type:"point"},this.collisionPriority=0,this._renderObjects=new Array,this.autoScaleRenderObjects=!0,this._available=!0,this._noDisplayCount=0,this._radius=10,this._worldSized=!1,this.focusMultiplier=2,this.touchMultiplier=2.5,this.worldOriented=!1,this._modelTransform=m(),this._worldFrame=null,this._renderLocation=O(),this._renderLocationDirty=!0,this._location=new A({x:0,y:0,z:0}),this._elevationAlignedLocation=new A,this._elevationAlignedLocationDirty=!0,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.consumesClicks=!0,this.cursor=null,this.grabCursor=null,this._grabbing=!1,this.dragging=!1,this._hovering=!1,this._selected=!1,this._state=Z.None,this._focused=!1,this.events=new t.EventEmitter,this._screenLocation={screenPointArray:n(),renderScreenPointArray:r(),pixelSize:0},this._screenLocationDirty=!0,this._engineResourcesAddedToStage=!1,this._attached=!1,this._location.spatialReference=e.view.spatialReference,Object.assign(this,e);const i=this.view.state?.camera;i&&this._camera.copyFrom(i)}destroy(){this._applyObjectTransform=pe,this._removeResourcesFromStage(),this._engineResources=null,this.view=null,this._camera=null}get _stage(){return this.view?.stage}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this._elevationAlignedLocationDirty=!0,this._renderLocationDirty=!0,this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(e){this._removeResourcesFromStage(),this._engineResources=null,this._renderObjects=e.slice(),this._updateEngineObject()}set available(e){e!==this._available&&(this._available=e,this._updateEngineObject())}get available(){return this._available}disableDisplay(){return this._noDisplayCount++,1===this._noDisplayCount&&this._updateEngineObject(),i((()=>{this._noDisplayCount--,0===this._noDisplayCount&&this._updateEngineObject()}))}set radius(e){e!==this._radius&&(this._radius=e,this._updateEngineObject())}get radius(){return this._radius}set worldSized(e){e!==this._worldSized&&(this._worldSized=e,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(e){te(e)&&(this._screenLocationDirty=!0),d(this._modelTransform,e),this._updateEngineObject()}get renderLocation(){return this._renderLocationDirty&&(this._renderLocationDirty=!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented?(this._worldFrame||(this._worldFrame=m()),ie(this.view,this._renderLocation,this._worldFrame)):this._worldFrame&&(this._worldFrame=null)),this._renderLocation}set renderLocation(e){this.view.renderCoordsHelper.fromRenderCoords(e,this._location),this.elevationAlignedLocation=this._location}get location(){return this._location}set location(e){H(e,this._location),this._notifyLocationChanged()}_notifyLocationChanged(){this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!0,this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){return this._elevationAlignedLocationDirty?(this._evaluateElevationAlignment(),this._updateElevationAlignedLocation(),this._elevationAlignedLocation):this._elevationAlignedLocation}set elevationAlignedLocation(e){H(e,this._location),this._evaluateElevationAlignment(),this._location.z-=this._elevation.offset,this._updateElevationAlignedLocation(),this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){const e=null!=this._elevation.override?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.x=this.location.x,this._elevationAlignedLocation.y=this.location.y,this._elevationAlignedLocation.z=e+this._elevation.offset,this._elevationAlignedLocation.spatialReference=q(this.location.spatialReference),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(e){e!==this._grabbing&&(this._grabbing=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(e){e!==this._hovering&&(this._hovering=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(e){e!==this._selected&&(this._selected=e,this._updateEngineObject(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._updateEngineObject())}updateStateEnabled(e,t){t?this.state|=e:this.state&=~e}_setFocused(e){e!==this._focused&&(this._focused=e,this.events.emit("focus-changed",{action:!0===e?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){return this._ensureScreenLocation(),this._screenLocation}_ensureScreenLocation(){if(!this._screenLocationDirty)return;this._screenLocation.pixelSize=this._camera.computeScreenPixelSizeAt(this.renderLocation),this._screenLocationDirty=!1;let e;if(te(this._modelTransform)){const t=this._calculateModelTransformOffset(me);e=p(t,t,this.renderLocation)}else e=this.renderLocation;this._camera.projectToRenderScreen(e,this._screenLocation.renderScreenPointArray),this._camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(e){this._applyObjectTransform=e,this._screenLocationDirty=!0,this._updateEngineObject()}get attached(){return this._attached}intersectionDistance(t,i){if(!this.available)return null;const s=a(t,se),o=this._getCollisionRadius(i),r=-1*this.collisionPriority;switch(this.collisionType.type){case"point":if(f(this.screenLocation.screenPointArray,s)<o*o)return this.screenLocation.renderScreenPointArray[2]+r;break;case"line":{const e=this.collisionType.paths,t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,ce),n=o*this.screenLocation.pixelSize,a=Y(this._camera,s,re);if(null==a)return null;for(const s of e){if(0===s.length)continue;const e=v(he,s[0],i);for(let t=1;t<s.length;t++){const o=v(de,s[t],i),l=k(x(e,o,oe),a);if(null!=l&&l<n*n){const t=p(N.get(),e,o);y(t,t,.5);const i=c(N.get());return this._camera.projectToRenderScreen(t,i),i[2]+r}j(e,o)}}break}case"disc":{const e=this.collisionType.direction,t=this.collisionType.offset??R,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,ce),a=o*this.screenLocation.pixelSize,c=Y(this._camera,s,re);if(null==c)return null;const h=l(ne,n),d=b(ue,e,h),_=v(ge,t,n);I(_,d,le);const u=_e;if(W(le,c,u)&&L(u,_)<a*a)return this.screenLocation.renderScreenPointArray[2]+r;break}case"ribbon":{const{paths:e,direction:t}=this.collisionType,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,ce),a=o*this._camera.computeScreenPixelSizeAt(this.renderLocation),h=Y(this._camera,s,re);if(null==h)return null;const d=l(ne,n),_=b(ue,t,d),u=this._calculateModelTransformPosition(ge);I(u,_,le);const g=_e;if(!W(le,h,g))break;for(const s of e){if(0===s.length)continue;const e=v(he,s[0],n);for(let t=1;t<s.length;t++){const i=v(de,s[t],n),o=C(x(e,i,oe),g);if(null!=o&&o<a*a){const t=p(N.get(),e,i);y(t,t,.5);const s=c(N.get());return this._camera.projectToRenderScreen(t,s),s[2]+r}j(e,i)}}break}default:e(this.collisionType)}return null}attach(e={manipulator3D:{}}){const t=this._stage;if(!t)return;const i=e.manipulator3D;null==i.engineLayerId?(this._engineLayer=new X(t,{pickable:!1,updatePolicy:Q.SYNC}),i.engineLayerId=this._engineLayer.id):t?.getLayer&&(this._engineLayer=t.getLayer(i.engineLayerId)),i.engineLayerReferences=(i.engineLayerReferences||0)+1,this._camera.copyFrom(this.view.state.camera),this._attached=!0,this._updateEngineObject(),E(this._location.spatialReference,this.view.spatialReference)||(this.location=new A({x:0,y:0,z:0,spatialReference:this.view.spatialReference}))}detach(e={manipulator3D:{}}){const t=e.manipulator3D;t.engineLayerReferences--;const i=0===t.engineLayerReferences;this._removeResourcesFromStage(),i&&(t.engineLayerId=null,o(this._engineLayer)),this._engineResources=null,this._engineLayer=null,this._attached=!1}onViewChange(){this._camera.copyFrom(this.view.state.camera),this._screenLocationDirty=!0,this._updateEngineObject()}onElevationChange(e){D(this.location,fe,e.spatialReference)&&P(e.extent,fe)&&this._notifyLocationChanged()}_evaluateElevationAlignment(){if(null==this.elevationInfo)return;let e=null,t=0;const i=G(this.elevationInfo,this.location.spatialReference??this.view.elevationProvider.spatialReference);switch(this.elevationInfo.mode){case"on-the-ground":e=V(this.view.elevationProvider,this.location,"ground")??0;break;case"relative-to-ground":t=(V(this.view.elevationProvider,this.location,"ground")??0)+i;break;case"relative-to-scene":t=(V(this.view.elevationProvider,this.location,"scene")??0)+i;break;case"absolute-height":t=i}return t!==this._elevation.offset||e!==this._elevation.override?(this._elevation.offset=t,void(this._elevation.override=e)):void 0}_updateEngineObject(){if(!this._attached)return;if(!this.available)return void this._removeResourcesFromStage();const e=this._getWorldToScreenObjectScale(),t=ce;if(!0===this.autoScaleRenderObjects){const i=this._getFocusedSize(this._radius,this.focused)*e;this._calculateObjectTransform(i,t)}else this._calculateObjectTransform(e,t);const{objectsByState:i}=this._ensureEngineResources(),s=(this.focused?$.Focused:$.Unfocused)|(this.selected?$.Selected:$.Unselected),o=this._noDisplayCount>0;for(const{stateMask:r,objects:n}of i){if(o){for(const e of n)e.visible=!1;continue}const e=(r&$.All)!==$.None,i=(r&Z.All)!==Z.None,a=!e||(s&r)===(r&$.All),c=!i||(this.state&r)===(r&Z.All);if(a&&c)for(const s of n)s.visible=!0,s.transformation=t;else for(const t of n)t.visible=!1}}_ensureEngineResources(){if(null==this._engineResources){const e=this._engineLayer,t=[],i=new Set;this.renderObjects.forEach((({geometry:{material:e}})=>{i.has(e)||(t.push(e),i.add(e))}));const s=new Map;this._renderObjects.forEach((e=>{const t=new K({castShadow:!1,geometries:[e.geometry]}),i=s.get(e.stateMask)||[];i.push(t),s.set(e.stateMask,i)}));const o=[];s.forEach(((e,t)=>o.push({stateMask:t,objects:e}))),this._engineResources={objectsByState:o,layer:e,materials:t}}return this._addResourcesToStage(),this._engineResources}_addResourcesToStage(){const e=this._stage;if(this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach((({objects:e})=>i.addMany(e))),this._engineResourcesAddedToStage=!0}_removeResourcesFromStage(){const e=this._stage;if(!this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach((({objects:e})=>i.removeMany(e))),this._engineResourcesAddedToStage=!1}_getCollisionRadius(e){return this._getFocusedSize(this.radius,!0)*("touch"===e?this.touchMultiplier:1)}_getFocusedSize(e,t){return e*(t?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(e){const t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,ae);return S(e,i[12],i[13],i[14])}_calculateModelTransformOffset(e){const t=this._calculateModelTransformPosition(e);return w(e,t,this.renderLocation)}_calculateObjectTransform(e,t){return _(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1),this._worldFrame&&u(t,t,this._worldFrame),u(t,t,this._modelTransform),t[12]+=this.renderLocation[0],t[13]+=this.renderLocation[1],t[14]+=this.renderLocation[2],t[15]=1,null!=this._applyObjectTransform&&this._applyObjectTransform(t),t}get test(){}}function te(e){return 0!==e[12]||0!==e[13]||0!==e[14]}function ie(e,t,i){switch(e.viewingMode){case"local":return g(i),!0;case"global":{const o=T(e.renderCoordsHelper.spatialReference);return z(t,0,he,0,o.radius),F(s(he[0]),s(he[1]),i),!0}}}const se=n(),oe=M(),re=B(),ne=h(),ae=m(),ce=m(),le=U(),he=O(),de=O(),_e=O(),ue=O(),ge=O(),me=O(),fe=new A({x:0,y:0,z:0,spatialReference:null}),pe=()=>{};export{ee as Manipulator3D};
|
|
5
|
+
import{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Evented.js";import{makeHandle as i}from"../../../core/handleUtils.js";import"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as n,screenPointObjectToArray as a,castRenderScreenPointArray as c}from"../../../core/screenUtils.js";import{fromMat4 as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as d,set as _,multiply as u,identity as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{squaredDistance as f}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{f as p,o as b,t as v,g as y,c as j,s as L,i as S,d as w}from"../../../chunks/vec32.js";import{create as O,ZEROS as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import A from"../../../geometry/Point.js";import{canProjectWithoutEngine as E,projectPoint as D}from"../../../geometry/projectionUtils.js";import{computeENUToPCPFLocalRotation as F}from"../../../geometry/projection/localRotationUtils.js";import{sphericalPCPFtoLonLatElevation as z}from"../../../geometry/projection/projectors.js";import{containsPointObject as P}from"../../../geometry/support/aaBoundingRect.js";import{distance2 as C,fromPoints as x,create as M,closestRayDistance2 as k}from"../../../geometry/support/lineSegment.js";import{fromPositionAndNormal as I,create as U,intersectRay as W}from"../../../geometry/support/plane.js";import{create as B}from"../../../geometry/support/ray.js";import{sv3d as N}from"../../../geometry/support/vectorStacks.js";import{clonePoint as H,hydratedSpatialReference as q}from"../../../layers/graphics/hydratedFeatures.js";import{getElevationOffset as G}from"../../../support/elevationInfoUtils.js";import{getElevationAtPoint as V}from"../support/ElevationProvider.js";import{fromScreen as Y}from"../support/geometryUtils/ray.js";import J from"../webgl/RenderCamera.js";import{Object3D as K}from"../webgl-engine/lib/Object3D.js";import{UpdatePolicy as Q}from"../webgl-engine/lib/UpdatePolicy.js";import{WebGLLayer as X}from"../webgl-engine/lib/WebGLLayer.js";import{ManipulatorStateCustomFlags as Z,ManipulatorStateFlags as $}from"../../interactive/interfaces.js";class ee{constructor(e){this.metadata=void 0,this._camera=new J,this._elevation={offset:0,override:null},this.collisionType={type:"point"},this.collisionPriority=0,this._renderObjects=new Array,this.autoScaleRenderObjects=!0,this._available=!0,this._noDisplayCount=0,this._radius=10,this._worldSized=!1,this.focusMultiplier=2,this.touchMultiplier=2.5,this.worldOriented=!1,this._modelTransform=m(),this._worldFrame=null,this._renderLocation=O(),this._renderLocationDirty=!0,this._location=new A({x:0,y:0,z:0}),this._elevationAlignedLocation=new A,this._elevationAlignedLocationDirty=!0,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.consumesClicks=!0,this.cursor=null,this.grabCursor=null,this._grabbing=!1,this.dragging=!1,this._hovering=!1,this._selected=!1,this._state=Z.None,this._focused=!1,this.events=new t.EventEmitter,this._screenLocation={screenPointArray:n(),renderScreenPointArray:r(),pixelSize:0},this._screenLocationDirty=!0,this._engineResourcesAddedToStage=!1,this._attached=!1,this._location.spatialReference=e.view.spatialReference,Object.assign(this,e);const i=this.view.state?.camera;i&&this._camera.copyFrom(i)}destroy(){this._applyObjectTransform=pe,this._removeResourcesFromStage(),this._engineResources=null,this.view=null,this._camera=null}get _stage(){return this.view?.stage}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this._elevationAlignedLocationDirty=!0,this._renderLocationDirty=!0,this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(e){this._removeResourcesFromStage(),this._engineResources=null,this._renderObjects=e.slice(),this._updateEngineObject()}set available(e){e!==this._available&&(this._available=e,this._updateEngineObject())}get available(){return this._available}disableDisplay(){return this._noDisplayCount++,1===this._noDisplayCount&&this._updateEngineObject(),i((()=>{this._noDisplayCount--,0===this._noDisplayCount&&this._updateEngineObject()}))}set radius(e){e!==this._radius&&(this._radius=e,this._updateEngineObject())}get radius(){return this._radius}set worldSized(e){e!==this._worldSized&&(this._worldSized=e,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(e){te(e)&&(this._screenLocationDirty=!0),d(this._modelTransform,e),this._updateEngineObject()}get renderLocation(){return this._renderLocationDirty&&(this._renderLocationDirty=!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented?(this._worldFrame||(this._worldFrame=m()),ie(this.view,this._renderLocation,this._worldFrame)):this._worldFrame&&(this._worldFrame=null)),this._renderLocation}set renderLocation(e){this.view.renderCoordsHelper.fromRenderCoords(e,this._location),this.elevationAlignedLocation=this._location}get location(){return this._location}set location(e){H(e,this._location),this._notifyLocationChanged()}_notifyLocationChanged(){this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!0,this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){return this._elevationAlignedLocationDirty?(this._evaluateElevationAlignment(),this._updateElevationAlignedLocation(),this._elevationAlignedLocation):this._elevationAlignedLocation}set elevationAlignedLocation(e){H(e,this._location),this._evaluateElevationAlignment(),this._location.z-=this._elevation.offset,this._updateElevationAlignedLocation(),this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){const e=null!=this._elevation.override?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.x=this.location.x,this._elevationAlignedLocation.y=this.location.y,this._elevationAlignedLocation.z=e+this._elevation.offset,this._elevationAlignedLocation.spatialReference=q(this.location.spatialReference),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(e){e!==this._grabbing&&(this._grabbing=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(e){e!==this._hovering&&(this._hovering=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(e){e!==this._selected&&(this._selected=e,this._updateEngineObject(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._updateEngineObject())}updateStateEnabled(e,t){t?this.state|=e:this.state&=~e}_setFocused(e){e!==this._focused&&(this._focused=e,this.events.emit("focus-changed",{action:!0===e?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){return this._ensureScreenLocation(),this._screenLocation}_ensureScreenLocation(){if(!this._screenLocationDirty)return;this._screenLocation.pixelSize=this._camera.computeScreenPixelSizeAt(this.renderLocation),this._screenLocationDirty=!1;let e;if(te(this._modelTransform)){const t=this._calculateModelTransformOffset(me);e=p(t,t,this.renderLocation)}else e=this.renderLocation;this._camera.projectToRenderScreen(e,this._screenLocation.renderScreenPointArray),this._camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(e){this._applyObjectTransform=e,this._screenLocationDirty=!0,this._updateEngineObject()}get attached(){return this._attached}intersectionDistance(t,i){if(!this.available)return null;const s=a(t,se),o=this._getCollisionRadius(i),r=-1*this.collisionPriority;switch(this.collisionType.type){case"point":if(f(this.screenLocation.screenPointArray,s)<o*o)return this.screenLocation.renderScreenPointArray[2]+r;break;case"line":{const e=this.collisionType.paths,t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,ce),n=o*this.screenLocation.pixelSize,a=Y(this._camera,s,re);if(null==a)return null;for(const s of e){if(0===s.length)continue;const e=v(he,s[0],i);for(let t=1;t<s.length;t++){const o=v(de,s[t],i),l=k(x(e,o,oe),a);if(null!=l&&l<n*n){const t=p(N.get(),e,o);y(t,t,.5);const i=c(N.get());return this._camera.projectToRenderScreen(t,i),i[2]+r}j(e,o)}}break}case"disc":{const e=this.collisionType.direction,t=this.collisionType.offset??R,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,ce),a=o*this.screenLocation.pixelSize,c=Y(this._camera,s,re);if(null==c)return null;const h=l(ne,n),d=b(ue,e,h),_=v(ge,t,n);I(_,d,le);const u=_e;if(W(le,c,u)&&L(u,_)<a*a)return this.screenLocation.renderScreenPointArray[2]+r;break}case"ribbon":{const{paths:e,direction:t}=this.collisionType,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,ce),a=o*this._camera.computeScreenPixelSizeAt(this.renderLocation),h=Y(this._camera,s,re);if(null==h)return null;const d=l(ne,n),_=b(ue,t,d),u=this._calculateModelTransformPosition(ge);I(u,_,le);const g=_e;if(!W(le,h,g))break;for(const s of e){if(0===s.length)continue;const e=v(he,s[0],n);for(let t=1;t<s.length;t++){const i=v(de,s[t],n),o=C(x(e,i,oe),g);if(null!=o&&o<a*a){const t=p(N.get(),e,i);y(t,t,.5);const s=c(N.get());return this._camera.projectToRenderScreen(t,s),s[2]+r}j(e,i)}}break}default:e(this.collisionType)}return null}attach(e={manipulator3D:{}}){const t=this._stage;if(!t)return;const i=e.manipulator3D;null==i.engineLayerId?(this._engineLayer=new X(t,{pickable:!1,updatePolicy:Q.SYNC}),i.engineLayerId=this._engineLayer.id):t?.getLayer&&(this._engineLayer=t.getLayer(i.engineLayerId)),i.engineLayerReferences=(i.engineLayerReferences||0)+1,this._camera.copyFrom(this.view.state.camera),this._attached=!0,this._updateEngineObject(),E(this._location.spatialReference,this.view.spatialReference)||(this.location=new A({x:0,y:0,z:0,spatialReference:this.view.spatialReference}))}detach(e={manipulator3D:{}}){const t=e.manipulator3D;t.engineLayerReferences--;const i=0===t.engineLayerReferences;this._removeResourcesFromStage(),i&&(t.engineLayerId=null,o(this._engineLayer)),this._engineResources=null,this._engineLayer=null,this._attached=!1}onViewChange(){this._camera.copyFrom(this.view.state.camera),this._screenLocationDirty=!0,this._updateEngineObject()}onElevationChange(e){D(this.location,fe,e.spatialReference)&&P(e.extent,fe)&&this._notifyLocationChanged()}_evaluateElevationAlignment(){if(null==this.elevationInfo)return;let e=null,t=0;const i=G(this.elevationInfo,this.location.spatialReference??this.view.elevationProvider.spatialReference);switch(this.elevationInfo.mode){case"on-the-ground":e=V(this.view.elevationProvider,this.location,"ground")??0;break;case"relative-to-ground":t=(V(this.view.elevationProvider,this.location,"ground")??0)+i;break;case"relative-to-scene":t=(V(this.view.elevationProvider,this.location,"scene")??0)+i;break;case"absolute-height":t=i}return t!==this._elevation.offset||e!==this._elevation.override?(this._elevation.offset=t,void(this._elevation.override=e)):void 0}_updateEngineObject(){if(!this._attached)return;if(!this.available)return void this._removeResourcesFromStage();const e=this._getWorldToScreenObjectScale(),t=ce;if(!0===this.autoScaleRenderObjects){const i=this._getFocusedSize(this._radius,this.focused)*e;this._calculateObjectTransform(i,t)}else this._calculateObjectTransform(e,t);const{objectsByState:i}=this._ensureEngineResources(),s=(this.focused?$.Focused:$.Unfocused)|(this.selected?$.Selected:$.Unselected),o=this._noDisplayCount>0;for(const{stateMask:r,objects:n}of i){if(o){for(const e of n)e.visible=!1;continue}const e=(r&$.All)!==$.None,i=(r&Z.All)!==Z.None,a=!e||(s&r)===(r&$.All),c=!i||(this.state&r)===(r&Z.All);if(a&&c)for(const s of n)s.visible=!0,s.transformation=t;else for(const t of n)t.visible=!1}}_ensureEngineResources(){if(null==this._engineResources){const e=this._engineLayer,t=[],i=new Set;this.renderObjects.forEach((({geometry:{material:e}})=>{i.has(e)||(t.push(e),i.add(e))}));const s=new Map;this._renderObjects.forEach((e=>{const t=new K({castShadow:!1,geometries:[e.geometry]}),i=s.get(e.stateMask)||[];i.push(t),s.set(e.stateMask,i)}));const o=[];s.forEach(((e,t)=>o.push({stateMask:t,objects:e}))),this._engineResources={objectsByState:o,layer:e,materials:t}}return this._addResourcesToStage(),this._engineResources}_addResourcesToStage(){const e=this._stage;if(this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach((({objects:e})=>i.addMany(e))),this._engineResourcesAddedToStage=!0}_removeResourcesFromStage(){const e=this._stage;if(!this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach((({objects:e})=>i.removeMany(e))),this._engineResourcesAddedToStage=!1}_getCollisionRadius(e){return this._getFocusedSize(this.radius,!0)*("touch"===e?this.touchMultiplier:1)}_getFocusedSize(e,t){return e*(t?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(e){const t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,ae);return S(e,i[12],i[13],i[14])}_calculateModelTransformOffset(e){const t=this._calculateModelTransformPosition(e);return w(e,t,this.renderLocation)}_calculateObjectTransform(e,t){return _(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1),this._worldFrame&&u(t,t,this._worldFrame),u(t,t,this._modelTransform),t[12]+=this.renderLocation[0],t[13]+=this.renderLocation[1],t[14]+=this.renderLocation[2],t[15]=1,null!=this._applyObjectTransform&&this._applyObjectTransform(t),t}get test(){}}function te(e){return 0!==e[12]||0!==e[13]||0!==e[14]}function ie(e,t,i){switch(e.viewingMode){case"local":return g(i),!0;case"global":{const o=T(e.renderCoordsHelper.spatialReference);return z(t,0,he,0,o.radius),F(s(he[0]),s(he[1]),i),!0}}}const se=n(),oe=M(),re=B(),ne=h(),ae=m(),ce=m(),le=U(),he=O(),de=O(),_e=O(),ue=O(),ge=O(),me=O(),fe=new A({x:0,y:0,z:0,spatialReference:null}),pe=()=>{};export{ee as Manipulator3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createScreenPointArray as e,screenPointObjectToArray as n,castScreenPointArray as r}from"../../../../core/screenUtils.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{h as o,d as l,l as s,c,e as i,g as a,f as u}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"../../../../geometry/Point.js";import{projectPoint as f}from"../../../../geometry/
|
|
5
|
+
import{createScreenPointArray as e,screenPointObjectToArray as n,castScreenPointArray as r}from"../../../../core/screenUtils.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{h as o,d as l,l as s,c,e as i,g as a,f as u}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import m from"../../../../geometry/Point.js";import{projectPoint as f}from"../../../../geometry/projectionUtils.js";import{intersectRay as d,create as g,getNormal as E,fromPositionAndNormal as y}from"../../../../geometry/support/plane.js";import{create as S,closestPoints as j}from"../../../../geometry/support/ray.js";import{projectPoint as v}from"../../../../geometry/support/vector.js";import{sv2d as R}from"../../../../geometry/support/vectorStacks.js";import{getZForElevationMode as b}from"../../../../support/elevationInfoUtils.js";import{fromScreen as w}from"../../support/geometryUtils/ray.js";import{Intersector as x}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as I}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{IntersectorType as U}from"../../webgl-engine/lib/IntersectorType.js";import{terrainId as H}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{EventPipeline as O}from"../../../interactive/dragEventPipeline.js";function T(e,n){return P(e,(()=>n))}function C(e){return P(e,(e=>e.plane))}function P(e,t){const o=p(),l=p();let s=!1;return c=>{const i=t(c);if("start"===c.action){const t=n(c.screenStart,r(R.get())),l=w(e.state.camera,t,Q);null!=l&&(s=d(i,l,o))}if(!s)return null;const a=n(c.screenEnd,r(R.get())),u=w(e.state.camera,a,Q);return null==u?null:d(i,u,l)?{...c,renderStart:o,renderEnd:l,plane:i,ray:u}:null}}function D(n,r,t=0,o=null,l=null){let s=null;return c=>{if("start"===c.action&&(s=n.sceneIntersectionHelper.intersectElevationFromScreen(e(c.screenStart.x,c.screenStart.y),r,t,l),null!=s&&null!=o&&!f(s,s,o)))return null;if(null==s)return null;const i=n.sceneIntersectionHelper.intersectElevationFromScreen(e(c.screenEnd.x,c.screenEnd.y),r,t,l);return null!=i&&(null==o||f(i,i,o))?{...c,mapStart:s,mapEnd:i}:null}}function M(e,n,r,t=null,o=null){return D(e,r,b(n,e,r),t,o)}function N(e,n,r,t){const o=r.toMap(e.screenStart);return null!=o?M(n,o,r.elevationInfo,t):null}function h(e,n){const r=K,t=L,s=g();e.renderCoordsHelper.worldUpAtPosition(n,r);const c=o(E(s),r,l(t,n,e.state.camera.eye));return o(c,c,r),y(n,c,s)}function G(e,n,r){let t=null;const o=new O;return o.next(T(e,h(e,n))).next(k(e,n)).next(F(e,r)).next((e=>{e.mapEnd.x=e.mapStart.x,e.mapEnd.y=e.mapStart.y,t=e})),e=>(t=null,o.execute(e),t)}function k(e,n){const r=p(),t=s(n);e.renderCoordsHelper.worldUpAtPosition(n,r);const o=p(),m=p(),f=o=>{if(l(o,o,n),v(r,o,o),"global"===e.viewingMode){s(o)*Math.sign(i(r,o))<.001-t&&l(o,a(o,r,.001),n)}return u(o,o,n),o};return e=>(e.renderStart=f(c(o,e.renderStart)),e.renderEnd=f(c(m,e.renderEnd)),e)}function A(e,t){const o=o=>{const l=n(o,r(J)),s=w(e.state.camera,l,Q);if(null==s)return null;const c=j(t,s,K,L);return c?.[0]};return e=>{const n=o(e.screenStart);if(null==n)return null;const r=o(e.screenEnd);return null==r?null:{...e,renderStart:n,renderEnd:r}}}function F(e,n){const r=e.renderCoordsHelper;return e=>{const t=r.fromRenderCoords(e.renderStart,new m({spatialReference:n})),o=r.fromRenderCoords(e.renderEnd,new m({spatialReference:n}));return null!=t&&null!=o?{...e,mapStart:t,mapEnd:o}:null}}var q;function z(e){let n=null;return r=>{switch(r.action){case"start":n=e.disableDisplay();break;case"end":case"cancel":null!=n&&(n.remove(),n=null)}return r}}function B(r,t=null){const o=new x(r.state.viewingMode);o.options.selectionMode=!0,o.options.store=I.MIN,o.options.hud=!1;const l=e(),s={requiresGroundFeedback:!0,enableDraped:!0,exclude:new Set},c=p(),i=t??r.spatialReference,a=e=>{r.map.ground&&r.map.ground.opacity<1?s.exclude.add(H):s.exclude.delete(H),r.sceneIntersectionHelper.intersectIntersectorScreen(n(e,l),o,s);const t=o.results.min;let a;if(t.getIntersectionPoint(c))a=t.intersector===U.TERRAIN?q.GROUND:q.OTHER;else{if(!o.results.ground.getIntersectionPoint(c))return null;a=q.GROUND}return{location:r.renderCoordsHelper.fromRenderCoords(c,new m({spatialReference:i})),surfaceType:a}};let u;return e=>{if("start"===e.action){const n=a(e.screenStart);u=null!=n?n.location:null}if(null==u)return null;const n=a(e.screenEnd);return null!=n?.location?{...e,mapStart:u,mapEnd:n.location,surfaceType:n.surfaceType}:null}}!function(e){e[e.GROUND=0]="GROUND",e[e.OTHER=1]="OTHER"}(q||(q={}));const J=t(),K=p(),L=p(),Q=S();export{q as SurfaceType,F as convertToMapCoordinates,z as hideManipulatorWhileDragging,k as projectToWorldUp,B as screenToMap3D,M as screenToMapXYAtLocation,N as screenToMapXYForManipulatedObject,T as screenToRenderPlane,C as screenToRenderPlaneFromEvent,A as screenToRenderRay,G as screenToZConstrained};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Accessor.js";import{isSome as o}from"../../../../../core/arrayUtils.js";import{destroyHandle as r}from"../../../../../core/handleUtils.js";import{initial as n}from"../../../../../core/reactiveUtils.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as a}from"../../../../../core/support/UpdatingHandles.js";import p from"../../../../../geometry/Point.js";import l from"../../../../../geometry/Polygon.js";import{initializeProjection as c,project as m}from"../../../../../geometry/
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Accessor.js";import{isSome as o}from"../../../../../core/arrayUtils.js";import{destroyHandle as r}from"../../../../../core/handleUtils.js";import{initial as n}from"../../../../../core/reactiveUtils.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as a}from"../../../../../core/support/UpdatingHandles.js";import p from"../../../../../geometry/Point.js";import l from"../../../../../geometry/Polygon.js";import{initializeProjection as c,project as m}from"../../../../../geometry/projectionUtils.js";import{ControlPointOperations as d}from"./ControlPointOperations.js";import{EditGeometry as h}from"../../../../interactive/editGeometry/EditGeometry.js";let g=class extends t{get operations(){return this._operations}get updating(){return this._updatingHandles.updating}constructor(e){super(e),this._updatingHandles=new a}initialize(){this.addHandles([r(this._updatingHandles),this._updatingHandles.add((()=>{const e=this.element.georeference;return"control-points"===e?.type?e.controlPoints:null}),(e=>this._elementControlPointsChanged(e)),n)])}_elementControlPointsChanged(e){const t=e?.map((({mapPoint:e})=>e)).filter(o),r=this.view.spatialReference;this._updatingHandles.addPromise(this._whenProjected(t,r,(e=>{if(!e)return void this._replaceOperations(null);const{_operations:t}=this,o=e.map((({x:e,y:t})=>[e,t]));o.push(o[0].slice());const n=new l({rings:[o],spatialReference:r});if(t?.trySetGeometry(n))return void this.onModifiedExternally();const i=this.view.state.viewingMode;this._replaceOperations(new d(h.fromGeometry(n,i),i,(e=>this._operationsGeometryChanged(e))))})))}_operationsGeometryChanged(e){const{element:{georeference:t},_operations:r}=this;if(!r||!t||"control-points"!==t.type||!t.controlPoints)return;const n=r.data.geometry,i=t.controlPoints.map((({mapPoint:e})=>e)).filter(o),s=r.data.components[0].isClosed()?1:0;if(n.rings[0]?.length-s!==i.length)return;const a=n.rings[0].map((([e,t])=>new p({x:e,y:t,spatialReference:n.spatialReference})));a.length-=s;const l=i.map((({spatialReference:e})=>e));this._updatingHandles.addPromise(this._whenProjected(a,l,(t=>this._updateElementControlPoints(t,e))))}_updateElementControlPoints(e,t){const{georeference:o}=this.element;if(!o||!e||"control-points"!==o.type||o.controlPoints?.length!==e?.length)return;const r=o.controlPoints;if(r?.length===e.length)for(let n=0;n<r.length;n++)t&&(r[n].sourcePoint=o.toSource(e[n])),r[n].mapPoint=e[n]}async _whenProjected(e,t,o){if(!e)return void o(e);const{_operations:r,element:{georeference:n}}=this,i=e.map((({spatialReference:e})=>e)),s=Array.isArray(t)?t:new Array(i.length).fill(t);await c(Array.from(i).map(((e,t)=>({source:e,dest:s[t]}))));const a=e.map(((e,t)=>m(e,s[t])));r===this._operations&&n===this.element.georeference&&o(a)}_replaceOperations(e){this._operations&&(this.removeHandles(this._operations),this._operations.destroy()),this._operations=e}};e([i({constructOnly:!0})],g.prototype,"view",void 0),e([i({constructOnly:!0})],g.prototype,"layer",void 0),e([i({constructOnly:!0})],g.prototype,"element",void 0),e([i({constructOnly:!0})],g.prototype,"onModifiedExternally",void 0),e([i()],g.prototype,"_operations",void 0),e([i()],g.prototype,"operations",null),e([i()],g.prototype,"updating",null),g=e([s("esri.views.3d.interactive.editingTools.media.MediaElementControllerControlPoints")],g);export{g as MediaElementControllerControlPoints};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Accessor.js";import{destroyHandle as o}from"../../../../../core/handleUtils.js";import{initial as r}from"../../../../../core/reactiveUtils.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as n}from"../../../../../core/support/UpdatingHandles.js";import{projectWithZConversion as a}from"../../../../../geometry/
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Accessor.js";import{destroyHandle as o}from"../../../../../core/handleUtils.js";import{initial as r}from"../../../../../core/reactiveUtils.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as n}from"../../../../../core/support/UpdatingHandles.js";import{projectWithZConversion as a}from"../../../../../geometry/projectionUtils.js";import{EditGeometryOperations as d}from"../../../../interactive/editGeometry/EditGeometryOperations.js";let p=class extends t{get operations(){return this._operations}get updating(){return this._updatingHandles.updating}constructor(e){super(e),this._updatingHandles=new n}initialize(){this.addHandles([o(this._updatingHandles),this._updatingHandles.add((()=>this.element.georeference?.coords),(e=>this._elementCoordinatesChanged(e)),r)])}_elementCoordinatesChanged(e){this._updatedElementCoordinates!==e&&this._updatingHandles.addPromise(this._whenProjected(e,this.view.spatialReference,(e=>{if(!e)return void this._replaceOperations(null);const{_operations:t}=this;t?.trySetGeometry(e)?this.onModifiedExternally():this._replaceOperations(d.fromGeometry(e,this.view.state.viewingMode))})))}_operationsGeometryChanged(){const{element:{georeference:e},_operations:t}=this;if(!t||!e)return;const o=t.data.geometry;if(!e.coords)return void this._updateElementCoordinates(o);const r=e.coords.spatialReference;this._updatingHandles.addPromise(this._whenProjected(o,r,(e=>this._updateElementCoordinates(e))))}_updateElementCoordinates(e){const{georeference:t}=this.element;t&&(t.coords=e,this._updatedElementCoordinates=t.coords)}async _whenProjected(e,t,o){if(!e)return void o(e);const{_operations:r,element:{georeference:i}}=this,s=await a(e,t);r===this._operations&&i===this.element.georeference&&o(s)}_replaceOperations(e){this._operations&&(this.removeHandles(this._operations),this._operations.destroy()),this._operations=e,e&&this.addHandles(e.data.on("change",(()=>this._operationsGeometryChanged())),e),this.onModifiedExternally()}};e([i({constructOnly:!0})],p.prototype,"view",void 0),e([i({constructOnly:!0})],p.prototype,"layer",void 0),e([i({constructOnly:!0})],p.prototype,"element",void 0),e([i({constructOnly:!0})],p.prototype,"onModifiedExternally",void 0),e([i()],p.prototype,"_operations",void 0),e([i()],p.prototype,"operations",null),e([i()],p.prototype,"updating",null),p=e([s("esri.views.3d.interactive.editingTools.media.MediaElementControllerShape")],p);export{p as MediaElementControllerShape};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{valueInUnit as e}from"../../../../../core/quantityUtils.js";import{createScreenPointArray as r,createRenderScreenPointArray3 as o}from"../../../../../core/screenUtils.js";import{getMetersPerUnitForSR as t}from"../../../../../core/unitUtils.js";import{fromValues as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as s,E as i,k as c,d as l,b as a}from"../../../../../chunks/vec32.js";import{create as p}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectPoint as m}from"../../../../../geometry/
|
|
5
|
+
import{valueInUnit as e}from"../../../../../core/quantityUtils.js";import{createScreenPointArray as r,createRenderScreenPointArray3 as o}from"../../../../../core/screenUtils.js";import{getMetersPerUnitForSR as t}from"../../../../../core/unitUtils.js";import{fromValues as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as s,E as i,k as c,d as l,b as a}from"../../../../../chunks/vec32.js";import{create as p}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectPoint as m}from"../../../../../geometry/projectionUtils.js";import{projectVectorToVector as u}from"../../../../../geometry/projection/projectVectorToVector.js";import{geodesicCompatibleSpatialReference as f,inverseGeodeticSolver as d,InverseGeodeticSolverResult as j,directGeodeticSolver as g}from"../../../../../geometry/support/geodesicUtils.js";import{getNormal as y,fromPositionAndNormal as h,create as R}from"../../../../../geometry/support/plane.js";import{makeDehydratedPoint as v}from"../../../../../layers/graphics/dehydratedPoint.js";import{getZForElevationMode as x}from"../../../../../support/elevationInfoUtils.js";import{PlaneType as C,OffsetEdgeVertex as U}from"../../../../interactive/editGeometry/operations/OffsetEdgeVertex.js";function H(e,r,o){const t="on-the-ground"===o.mode?C.XY:C.XYZ;return new U(e,t,r,0)}function w(e,r,o){const t=p();if(!e.renderCoordsHelper.toRenderCoords(r,t))return null;const n=T(e,r,y(o.plane)),i=T(e,r,o.edgeDirection);if(null==n||null==i)return null;const c=s(p(),n,i);return h(t,c,R())}function T(e,r,o){const t=v(r.x+o[0],r.y+o[1],r.z+o[2],r.spatialReference),n=p(),s=p();return e.renderCoordsHelper.toRenderCoords(r,n)&&e.renderCoordsHelper.toRenderCoords(t,s)?i(s,n,s):null}function b(e,r,o){const t=y(e),c=i(p(),r,o),l=s(p(),c,t),a=s(p(),c,l);return n(c[0],c[1],c[2],0,l[0],l[1],l[2],0,a[0],a[1],a[2],0,0,0,0,1)}function q(e,r,t){const n=t.projectToRenderScreen(e,o()),s=t.projectToRenderScreen(r,o());return null!=n&&null!=s?c(l(n,n,s)):0}function A(e,o,t,n){const{elevationInfo:s,operations:i}=t;if(!i||!e)return null;const c=n.manipulator.elevationAlignedLocation,l=x(c,o,s),a=o.sceneIntersectionHelper.intersectElevationFromScreen(r(e.x,e.y),s,l);return a&&m(a,a,i.data.spatialReference)?a:null}function E(r,o,n,{data:{coordinateHelper:s,spatialReference:i}}){const c=e(r,"meters"),l=t(i),m=Math.sign(c*n.selectedArrow),h=f(i),R=y(n.plane),v=s.pointToXYZ(o),x=p();a(x,v,R,m*(I/l));const C=c*n.selectedArrow/l;if(!h||!u(v,i,v,h)||!u(x,i,x,h))return C;const U=new j;if(d(U,v,x,h),g(x,v,U.azimuth,c,h),!u(x,h,x,i))return C;const H=x[0]-o.x,w=x[1]-o.y,T=Math.sqrt(H*H+w*w)*m,[b,q]=R,A=Math.sqrt(b*b+q*q);return 0===A?0:T/A}const I=10;export{w as createEdgeOffsetIntersectionPlane,H as createEdgeOffsetOperation,b as edgeOffsetRotationMatrix,E as getDistanceInGeometrySR,A as getMapPointAtEdgeOffsetManipulatorElevation,q as screenEdgeLengthSquared};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import s from"../../../../core/Identifiable.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import s from"../../../../core/Identifiable.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{DrapedRenderGroup as i,DrapeSourceType as c}from"../../layers/interfaces.js";import{DirtyOperation as u}from"../../webgl-engine/lib/ModelDirtyTypes.js";import{UpdatePolicy as a}from"../../webgl-engine/lib/UpdatePolicy.js";class n{constructor(e){this._resourceFactory=e,this._resources=null,this._visible=!0,this._attached=!1,this._renderGroup=i.Outline}destroy(){this._destroyResources()}get resources(){return this._resources?.external}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this._syncGeometriesToRenderer())}get attached(){return this._attached}set attached(e){e!==this._attached&&(this._attached=e,this._createOrDestroyResources())}get renderGroup(){return this._renderGroup}set renderGroup(e){this._renderGroup=e;const r=this._resources?.layerView;r&&(r.renderGroup=e)}recreate(){this.attached&&this._createResources()}recreateGeometry(){this._resourceFactory.recreateGeometry?null!=this._resources&&(this._ensureRenderGeometriesRemoved(),this._resourceFactory.recreateGeometry(this._resources.external),this._syncGeometriesToRenderer()):this.recreate()}forEachMaterial(e){this._resources&&this._resourceFactory.forEachMaterial(this._resources.external,e)}_createOrDestroyResources(){this._attached?null==this._resources&&this._createResources():this._destroyResources()}_createResources(){this._destroyResources();const e=this._resourceFactory.createResources(),r=new d({view:this._resourceFactory.view,renderGroup:this._renderGroup}),s=this._resourceFactory.view.basemapTerrain?.overlayManager;this._resources={layerView:new d({view:this._resourceFactory.view,renderGroup:this._renderGroup}),external:e,geometriesAdded:!1},s&&(this._resources.drapeSourceRenderer=s.registerGeometryDrapeSource(r)),this._syncGeometriesToRenderer()}_destroyResources(){if(null==this._resources)return;this._ensureRenderGeometriesRemoved();const e=this._resourceFactory.view.basemapTerrain?.overlayManager;e&&e.unregisterDrapeSource(this._resources.layerView),this._resourceFactory.destroyResources(this._resources.external),this._resources=null}_syncGeometriesToRenderer(){this._visible?this._ensureRenderGeometriesAdded():this._ensureRenderGeometriesRemoved()}_ensureRenderGeometriesRemoved(){if(null==this._resources?.drapeSourceRenderer)return;if(!this._resources.geometriesAdded)return;this._resources.drapeSourceRenderer.removeGeometries(this._resources.external.geometries,u.UPDATE),this._resources.geometriesAdded=!1}_ensureRenderGeometriesAdded(){if(null==this._resources?.drapeSourceRenderer)return;if(this._resources.geometriesAdded)return;this._resources.drapeSourceRenderer.addGeometries(this._resources.external.geometries,u.UPDATE),this._resources.geometriesAdded=!0}}let d=class extends(s.IdentifiableMixin(r)){constructor(e){super(e),this.drapeSourceType=c.Features,this.updatePolicy=a.SYNC,this.renderGroup=i.Outline}};e([t({constructOnly:!0})],d.prototype,"view",void 0),e([t({readOnly:!0})],d.prototype,"drapeSourceType",void 0),e([t()],d.prototype,"renderGroup",void 0),d=e([o("esri.views.3d.interactive.visualElements.DrapedVisualElementResources")],d);export{n as DrapedVisualElementResources};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{c as t,f as e,d as s,n as r,m as i,g as o}from"../../../../../chunks/vec32.js";import{create as n,clone as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as p}from"../../../../../geometry/
|
|
5
|
+
import{c as t,f as e,d as s,n as r,m as i,g as o}from"../../../../../chunks/vec32.js";import{create as n,clone as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{canProjectWithoutEngine as p}from"../../../../../geometry/projectionUtils.js";import{getSphericalPCPF as a}from"../../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectVectorToVector as h}from"../../../../../geometry/projection/projectVectorToVector.js";import{sv3d as d}from"../../../../../geometry/support/vectorStacks.js";import{slerpTangent as l,slerp as f}from"../../../support/mathUtils.js";class m{constructor(t=n(),e=n()){this.startRenderSpace=t,this.endRenderSpace=e,this.type="euclidean"}eval(t,e,o){return i(e,this.startRenderSpace,this.endRenderSpace,t),o&&(s(o,this.endRenderSpace,this.startRenderSpace),r(o,o)),e}createRenderGeometry(t,e){const r=[],i=[],o=(e,o)=>{const n=j;s(n,e,t),r.push([n[0],n[1],n[2]]),i.push([o[0],o[1],o[2]])},n=e.worldUpAtPosition(this.eval(.5,R),d.get());return o(this.startRenderSpace,n),o(this.endRenderSpace,n),{points:r,normals:i}}static fromPositionAndVector(t,s,r=1){return o(R,s,r),e(R,t,R),new m(c(t),c(R))}}class _{_projectIn(e,s){this._project?h(e,this.renderSpatialReference,s,this._pcpf):t(s,e)}constructor(t,e,s){this.startRenderSpace=t,this.endRenderSpace=e,this.renderSpatialReference=s,this.type="geodesic",this._start=n(),this._end=n(),this._pcpf=a(s),this._project=p(s,this._pcpf),this._projectIn(t,this._start),this._projectIn(e,this._end)}eval(t,o,n){if(this._project)if(n){const i=j;l(this._start,this._end,t,o,i),e(S,o,i),h(o,this._pcpf,o,this.renderSpatialReference),h(S,this._pcpf,S,this.renderSpatialReference),s(n,S,o),r(n,n)}else f(this._start,this._end,t,o),h(o,this._pcpf,o,this.renderSpatialReference);else i(o,this._start,this._end,t),n&&(s(n,this._end,this._start),r(n,n));return o}createRenderGeometry(t,e){const r=[],i=[],o=(e,o)=>{const n=S;s(n,e,t),r.push([n[0],n[1],n[2]]),i.push([o[0],o[1],o[2]])},n=128+1&-2;for(let s=0;s<n;++s){const t=s/(n-1),r=R,i=j;this.eval(t,r),e.worldUpAtPosition(r,i),o(r,i)}return{points:r,normals:i}}}const R=n(),j=n(),S=n();export{m as EuclideanSegment,_ as GeodesicSegment};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as s}from"../../../geometry/
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as s}from"../../../geometry/projectionUtils.js";import{getEffectiveLayerCapabilities as i}from"../../../layers/support/layerUtils.js";import a from"./FeatureLayerViewBase3D.js";let p=class extends a{constructor(){super(...arguments),this.type="feature-3d"}initialize(){const{layer:e,view:t}=this;i(e)?.operations.supportsQuery||this.addResolvingPromise(Promise.reject(new r("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e}))),null!=e.infoFor3D&&this.addResolvingPromise(Promise.reject(new r("featurelayerview3d:unsupported-geometry-type",`Unsupported geometry type ${e.geometryType}`))),"mesh"!==e.geometryType||s(e.spatialReference,t.spatialReference)||this.addResolvingPromise(Promise.reject(new r("layerview:spatial-reference-incompatible","The spatial references of the feature layer is incompatible with the spatial reference of the view")))}get featureSpatialReference(){return this.view.featureTiles?.tilingScheme?.spatialReference}};e([t()],p.prototype,"layer",void 0),p=e([o("esri.views.3d.layers.FeatureLayerView3D")],p);const l=p;export{l as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import{abortMaybe as e}from"../../../core/maybe.js";import{debounce as r,throwIfAborted as o,ignoreAbortErrors as s}from"../../../core/promiseUtils.js";import{when as i,sync as l}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{projectOrLoad as u}from"../../../geometry/
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import{abortMaybe as e}from"../../../core/maybe.js";import{debounce as r,throwIfAborted as o,ignoreAbortErrors as s}from"../../../core/promiseUtils.js";import{when as i,sync as l}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{projectOrLoad as u}from"../../../geometry/projectionUtils.js";import{fromExtent as p,intersection as m,toExtent as d}from"../../../geometry/support/aaBoundingRect.js";import h from"../../../symbols/support/ElevationInfo.js";import{loadImagery as c}from"../../2d/engine/flow/dataUtils.js";import{getFlowSimulationSettings as y,simulationSettingsEqual as f}from"../../2d/engine/flow/utils.js";import g from"./SubView3D.js";import{createFlowGeometry as _}from"../support/flow/geometryUtils.js";import{boundingRectOfTileTree as w}from"../support/flow/loadUtils.js";import j from"../support/flow/StreamlinesStyle3D.js";import{IteratorPreorder as S}from"../terrain/tileUtils.js";let b=class extends g{constructor(t){super(t),this.type="flow",this._preorderIterator=new S,this._abortController=null,this._debouncedLoad=r((async()=>{const{view:t,_style:e}=this;if(null==e)return;const r=this._computeExtent();if(null==r)return;const s={extent:r,timeExtent:this.layer.timeExtent,size:this._viewSizeWithEqualRatio(r),pixelRatio:t.state.contentPixelRatio};null==this._abortController&&(this._abortController=new AbortController);const i=this._abortController,l=await e.load(s,i.signal);o(i.signal),null!=l&&(this._resources?.detach(),l.attach(t.stage),this._resources=l)})),this._loadImagery=(t,e)=>{const{extent:r,size:[o,s],timeExtent:i}=t;return c(this.layer,r,o,s,i,e)},this._createFlowGeometry=(t,e)=>_(this.view,t,e,this.elevationInfo)}initialize(){this.addHandles([i((()=>this.newStyleRequired),(()=>this._updateStyle()),l)]),this.updatingHandles.add((()=>this._style),(()=>this._triggerLoad())),this._updateStyle(),this.updatingHandles.addWhen((()=>!this.view.basemapTerrain?.updating),(()=>this._triggerLoad()))}destroy(){this._abortController=e(this._abortController),this.clear()}get layer(){return this.layerView.layer}get flowRenderer(){const t=this.layer.renderer;return"flow"!==t?.type?null:t}get elevationInfo(){return new h({mode:"absolute-height",offset:1e3})}get dataBounds(){const{fullExtent:t}=this.layer,{spatialReference:e}=this.view.basemapTerrain,r=u(t,e).geometry;return null==r?null:p(r)}get simulationSettings(){const{flowRenderer:t}=this;return null==t?null:y(t)}get newStyleRequired(){const t=this._style?.simulationSettings,e=this.simulationSettings;return null!=t&&null!=e&&!f(t,e)}doRefresh(){return this._triggerLoad()}clear(){this._resources?.detach(),this._resources=null}_triggerLoad(){return s(this.updatingHandles.addPromise(this._debouncedLoad()))}_updateStyle(){const{simulationSettings:t}=this;null!=t&&(this._style?.destroy(),this._style=new j({simulationSettings:t,loadImagery:this._loadImagery,createGeometry:this._createFlowGeometry}))}_computeExtent(){const t=this.view.basemapTerrain,e=t?.rootTiles;if(null==e||0===e.length)return null;const{spatialReference:r}=t,{dataBounds:o}=this;if(!r||null==o)return null;const s=w(e,this._preorderIterator,o);return null==s?null:(m(s,o,s),d(s,r))}_viewSizeWithEqualRatio(t){const e=(t.xmax-t.xmin)/(t.ymax-t.ymin),[r,o]=this.view.size;return r<o?[r,Math.floor(r/e)]:[Math.floor(o*e),o]}get test(){}};t([n()],b.prototype,"type",void 0),t([n()],b.prototype,"_style",void 0),t([n()],b.prototype,"layer",null),t([n()],b.prototype,"flowRenderer",null),t([n()],b.prototype,"elevationInfo",null),t([n()],b.prototype,"dataBounds",null),t([n()],b.prototype,"simulationSettings",null),t([n()],b.prototype,"newStyleRequired",null),b=t([a("esri.views.3d.layers.FlowSubView3D")],b);export{b as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import s from"../../../core/Logger.js";import e from"../../../core/PooledArray.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WorkerHandle as o}from"../../../core/workers/WorkerHandle.js";import{canProjectWithoutEngine as r}from"../../../geometry/
|
|
5
|
+
import s from"../../../core/Logger.js";import e from"../../../core/PooledArray.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WorkerHandle as o}from"../../../core/workers/WorkerHandle.js";import{canProjectWithoutEngine as r}from"../../../geometry/projectionUtils.js";import{projectVectorToVector as i}from"../../../geometry/projection/projectVectorToVector.js";import{ModificationType as h}from"../../../libs/i3s/enums.js";class n{constructor(s,e,t,o,r,i){this.layout=s,this.interleavedVertexData=e,this.indices=t,this.hasColors=o,this.hasModifications=r,this.positionData=i}}class p{constructor(s,e,t,o,r,i,h){this.componentOffsets=s,this.featureIds=e,this.anchorIds=t,this.anchors=o,this.transformedGeometry=r,this.globalTrafo=i,this.obb=h}}class a extends o{constructor(s){super("SceneLayerWorker","process",{process:s=>[s.geometryBuffer],project:s=>[s.positions.buffer],transformNormals:s=>[s.normals.buffer]},s,{hasInitialize:!0})}setModifications(s,e,t,o){const r={context:s,modifications:f(e,t,o),isGeodetic:o.isGeographic};this.broadcast(r,"setModifications")}setLegacySchema(s,e){const t=JSON.stringify(e);return this.broadcast({context:s,jsonSchema:t},"setLegacySchema")}destroyContext(s){return this.broadcast(s,"destroyContext")}project(s,e){return this.invokeMethod("project",s,e)}transformNormals(s,e){return this.invokeMethod("transformNormals",s,e)}}const u=new e({deallocator:null}),c=t();function f(e,t,o){u.clear();let n=1/0,p=1/0,a=-1/0,f=-1/0,l=!1;for(const d of t){const e="clip"===d.type?h.Inside:"mask"===d.type?h.Outside:h.Replace,t=d.geometry;let m=s=>s;if(t.spatialReference){if(!r(t.spatialReference,o)){s.getLogger("esri.views.3d.layers.I3SMeshWorkerHandle").warn("Can't project modification polygon into layer spatial reference, ignoring modification");continue}m=s=>(i(s,t.spatialReference,c,o),c)}else t.hasZ||(c[2]=0,m=s=>(c[0]=s[0],c[1]=s[1],c));l=l||e===h.Outside,u.push(e),u.push(t.rings.length);for(const s of t.rings){u.push(s.length);for(const e of s){const s=m(e);u.push(s[0]),u.push(s[1]),u.push(s[2]),n=Math.min(n,s[0]),p=Math.min(p,s[1]),a=Math.max(a,s[0]),f=Math.max(f,s[1])}}}if(null!=e)if(l){const s=1e-4;u.push(h.Inside),u.push(2),u.push(4),u.push(n-s),u.push(p-s),u.push(0),u.push(a+s),u.push(p-s),u.push(0),u.push(a+s),u.push(f+s),u.push(0),u.push(n-s),u.push(f+s),u.push(0),u.push(4),u.push(e[0]),u.push(e[1]),u.push(0),u.push(e[2]),u.push(e[1]),u.push(0),u.push(e[2]),u.push(e[3]),u.push(0),u.push(e[0]),u.push(e[3]),u.push(0)}else u.push(h.Outside),u.push(1),u.push(4),u.push(e[0]),u.push(e[1]),u.push(0),u.push(e[2]),u.push(e[1]),u.push(0),u.push(e[2]),u.push(e[3]),u.push(0),u.push(e[0]),u.push(e[3]),u.push(0);u.push(h.Finished);const m=new Float64Array(u.length);for(let s=0;s<u.length;++s)m[s]=u.at(s);return m}export{a as I3SMeshWorkerHandle,p as TransformedData,n as TransformedGeometry,f as toWasmModification};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{hasScaling as e}from"../../../core/mathUtils.js";import r from"../../../geometry/SpatialReference.js";import t from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import o from"../../../geometry/support/MeshLocalVertexSpace.js";import{b as n,n as s}from"../../../chunks/vec3.js";import{IndexType as i}from"../../../libs/i3s/enums.js";import{get as a}from"../../../libs/i3s/I3SModule.js";import{TransformedGeometry as f,TransformedData as c}from"./I3SMeshWorkerHandle.js";import{NodeIMModificationImpact as l}from"./i3s/I3SNode.js";async function u(e){E=await
|
|
5
|
+
import{hasScaling as e}from"../../../core/mathUtils.js";import r from"../../../geometry/SpatialReference.js";import t from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import o from"../../../geometry/support/MeshLocalVertexSpace.js";import{b as n,n as s}from"../../../chunks/vec3.js";import{IndexType as i}from"../../../libs/i3s/enums.js";import{get as a}from"../../../libs/i3s/I3SModule.js";import{TransformedGeometry as f,TransformedData as c}from"./I3SMeshWorkerHandle.js";import{NodeIMModificationImpact as l}from"./i3s/I3SNode.js";async function u(e){E=await U();const r=[e.geometryBuffer];return{result:A(E,e,r),transferList:r}}async function m(e){E=await U();const r=[e.geometryBuffer],{geometryBuffer:t}=e,o=t.byteLength,n=E._malloc(o),s=new Uint8Array(E.HEAPU8.buffer,n,o);s.set(new Uint8Array(t));const i=E.dracoDecompressPointCloudData(n,s.byteLength);if(E._free(n),i.error.length>0)throw new Error(`i3s.wasm: ${i.error}`);const a=i.featureIds?.length>0?i.featureIds.slice():null,f=i.positions.slice();return a&&r.push(a.buffer),r.push(f.buffer),{result:{positions:f,featureIds:a},transferList:r}}async function y(e){await U(),S(e);const r={buffer:e.buffer};return{result:r,transferList:[r.buffer]}}async function p(e){await U(),j(e)}async function d(e){E=await U(),E.setLegacySchema(e.context,e.jsonSchema)}async function h(e){const{localMatrix:n,origin:s,positions:i,vertexSpace:a}=e,f=r.fromJSON(e.inSpatialReference),c=r.fromJSON(e.outSpatialReference);let l;const[{projectBuffer:u},{initializeProjection:m}]=await Promise.all([import("../../../geometry/projection/projectBuffer.js"),import("../../../geometry/projectionUtils.js")]);await m(f,c);const y=[0,0,0];if(!u(s,f,0,y,c,0))throw new Error("Failed to project");if("georeferenced"===a.type&&null==a.origin){if(l=new Float64Array(i.length),!u(i,f,0,l,c,0,l.length/3))throw new Error("Failed to project")}else{const e="georeferenced"===a.type?t.fromJSON(a):o.fromJSON(a),{projectMeshVertexPositions:r}=await import("../../../geometry/support/meshUtils/projectMeshVertexPositions.js"),s=r({vertexAttributes:{position:i},transform:n?{localMatrix:n}:void 0,vertexSpace:e,spatialReference:f},c);if(!s)throw new Error("Failed to project");l=s}const p=l.length,[d,h,b]=y;for(let r=0;r<p;r+=3)l[r]-=d,l[r+1]-=h,l[r+2]-=b;return{result:{projected:l,original:i,projectedOrigin:y},transferList:[l.buffer,i.buffer]}}async function b({normalMatrix:r,normals:t}){const o=new Float32Array(t.length);return n(o,t,r),e(r)&&s(o,o),{result:{transformed:o,original:t},transferList:[o.buffer,t.buffer]}}function g(e){x(e)}let w,E;function j(e){if(!E)return;const r=e.modifications,t=E._malloc(8*r.length),o=new Float64Array(E.HEAPU8.buffer,t,r.length);for(let n=0;n<r.length;++n)o[n]=r[n];E.setModifications(e.context,t,r.length,e.isGeodetic),E._free(t)}function A(e,r,t){const{context:o,globalTrafo:n,mbs:s,obbData:a,elevationOffset:l,geometryBuffer:u,geometryDescriptor:m,indexToVertexProjector:y,vertexToRenderProjector:p}=r,d=e._malloc(u.byteLength),h=33,b=e._malloc(h*Float64Array.BYTES_PER_ELEMENT),g=new Uint8Array(e.HEAPU8.buffer,d,u.byteLength);g.set(new Uint8Array(u));const w=new Float64Array(e.HEAPU8.buffer,b,h);_(w,[NaN,NaN,NaN]);let E=w.byteOffset+3*w.BYTES_PER_ELEMENT,j=new Float64Array(w.buffer,E);_(j,n),E+=16*w.BYTES_PER_ELEMENT,j=new Float64Array(w.buffer,E),_(j,s),E+=4*w.BYTES_PER_ELEMENT,a&&(j=new Float64Array(w.buffer,E),_(j,a));const A=m,L={isDraco:!1,isLegacy:!1,color:r.layouts.some((e=>e.some((e=>"color"===e.name)))),normal:r.needNormals&&r.layouts.some((e=>e.some((e=>"normalCompressed"===e.name)))),uv0:r.layouts.some((e=>e.some((e=>"uv0"===e.name)))),uvRegion:r.layouts.some((e=>e.some((e=>"uvRegion"===e.name)))),featureIndex:A.featureIndex},S=e.process(o,!!r.obbData,d,g.byteLength,A,L,b,l,y,p,r.normalReferenceFrame);if(e._free(b),e._free(d),S.error.length>0)throw new Error(`i3s.wasm: ${S.error}`);if(S.discarded)return null;const x=S.componentOffsets.length>0?S.componentOffsets.slice():null,P=S.featureIds.length>0?S.featureIds.slice():null,U=S.anchorIds.length>0?Array.from(S.anchorIds):null,M=S.anchors.length>0?Array.from(S.anchors):null,N=S.interleavedVertedData.slice().buffer,I=S.indicesType===i.Int16?new Uint16Array(S.indices.buffer,S.indices.byteOffset,S.indices.byteLength/2).slice():new Uint32Array(S.indices.buffer,S.indices.byteOffset,S.indices.byteLength/4).slice(),F=S.positions.slice(),{buffer:T,byteOffset:B,byteLength:O}=S.positionIndices,R=S.positionIndicesType===i.Int16?new Uint16Array(T,B,O/2).slice():new Uint32Array(T,B,O/4).slice(),v=new f(r.layouts[0],N,I,S.hasColors,S.hasModifications,{data:F,indices:R});return P&&t.push(P.buffer),x&&t.push(x.buffer),t.push(N),t.push(I.buffer),t.push(F.buffer),t.push(R.buffer),new c(x,P,U,M,v,n,S.obb)}function L(e){return 0===e?l.Unmodified:1===e?l.PotentiallyModified:2===e?l.Culled:l.Unknown}function S(e){if(!E)return;const{context:r,buffer:t}=e,o=E._malloc(t.byteLength),n=t.byteLength/Float64Array.BYTES_PER_ELEMENT,s=new Float64Array(E.HEAPU8.buffer,o,n),i=new Float64Array(t);s.set(i),E.filterOBBs(r,o,n),i.set(s),E._free(o)}function x(e){E&&0===E.destroy(e)&&(E=null)}function _(e,r){for(let t=0;t<r.length;++t)e[t]=r[t]}async function P(){E||await U()}async function U(){return E||(E=await(w??=a())),E}const M={transform:(e,r)=>E&&A(E,e,r),destroy:x};export{g as destroyContext,m as dracoDecompressPointCloudData,y as filterObbsForModifications,S as filterObbsForModificationsSync,P as initialize,L as interpretObbModificationResults,u as process,h as project,d as setLegacySchema,p as setModifications,j as setModificationsSync,M as test,b as transformNormals};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{destroyHandle as r,makeHandle as i}from"../../../core/handleUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as l}from"../../../geometry/
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{destroyHandle as r,makeHandle as i}from"../../../core/handleUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{canProjectWithoutEngine as l}from"../../../geometry/projectionUtils.js";import{LayerView3D as a}from"./LayerView3D.js";import{TiledLayerView3D as p}from"./TiledLayerView3D.js";import{fetchTile as n}from"./support/fetchTile.js";import{SublayerPopupHighlightHelper3D as h}from"./support/SublayerPopupHighlightHelper3D.js";import m from"../../layers/LayerView.js";import u from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as c}from"../../layers/support/MapServiceLayerViewHelper.js";let f=class extends(u(p(a(m)))){constructor(){super(...arguments),this.type="tile-3d"}get imageFormatIsOpaque(){return"jpg"===this.layer.tileInfo.format}get hasMixedImageFormats(){return"mixed"===this.layer.tileInfo.format}get tileInfo(){return this.layer.tileInfo}initialize(){if("web-tile"===this.layer.type){const e=this.layer.fullExtent?.spatialReference,r=this.layer.tileInfo?.spatialReference;if(null==e||null==r||!l(e,r)){const e="defaults"===this.layer.originOf("fullExtent")||null==this.layer.fullExtent?"SceneView requires fullExtent to be specified by the user on WebTileLayer":"SceneView requires fullExtent to be specified in the same spatial reference as tileInfo on WebTileLayer";this.addResolvingPromise(Promise.reject(new t("layerview:incompatible-fullextent",e)))}}if(c(this,this.layer)){const e=new h({view:this.view,layerView:this,updatingHandles:this._updatingHandles});this._popupHighlightHelper=e,this.addHandles(r(e))}this._addTilingSchemeMatchPromise()}async fetchTile(e,t){return n(this,e,t)}async fetchPopupFeaturesAtLocation(e,t){return this._popupHighlightHelper?.fetchPopupFeaturesAtLocation(e,t)??[]}highlight(e,t){return this._popupHighlightHelper?.highlight(e,t)??i()}async doRefresh(){this.suspended||this.emit("data-changed")}};e([s()],f.prototype,"imageFormatIsOpaque",null),e([s()],f.prototype,"hasMixedImageFormats",null),e([s()],f.prototype,"layer",void 0),e([s()],f.prototype,"tileInfo",null),f=e([o("esri.views.3d.layers.TileLayerView3D")],f);const y=f;export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as e}from"../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{transpose as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{t as l,g as h,i as u,c as d}from"../../../../chunks/vec32.js";import{ZEROS as p,create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as _,t as m,b as g}from"../../../../chunks/vec42.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as b}from"../../../../geometry/ellipsoidUtils.js";import{create as O,empty as w,copy as I,offset as D,width as C,height as j,expand as G}from"../../../../geometry/support/aaBoundingRect.js";import{e as k,d as S,a as A}from"../../../../chunks/boundedPlane.js";import{create as Q}from"../../../../geometry/support/ray.js";import{a as N,c as P,j as T,h as x}from"../../../../chunks/sphere.js";import{DeconflictAABR as E}from"./DeconflictAABR.js";import{prepare as V,drawPoly as L}from"./deconflictorDebug.js";import{VisibilityGroup as U,VisibilityFlag as F}from"./enums.js";import R from"../../webgl/RenderCamera.js";import{GPUPointOcclusionQuery as H}from"../../webgl-engine/lib/GPUPointOcclusionQuery.js";import{applyPrecomputedScaleFactor as B}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as M}from"../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as W}from"../../webgl-engine/materials/HUDMaterial.js";import{ScaleInfo as z}from"../../webgl-engine/materials/ScaleInfo.js";import{Yield as Y}from"../../../support/Yield.js";const q=f(),J=f(),K=y(),X=y(),Z=f(),$=n(),ii=P(),ti=Q(),ei=f(),si=O();class ri{constructor(i){this.id=i,this.aabr=O(),this.altitude=0,this.distance=0,this.distanceToOccluder=0,this.culled=!1,this.visible=!1,this.priority=0}}function ci(i,t){const e=0!==i.distanceToOccluder&&i.distance>i.distanceToOccluder,s=0!==t.distanceToOccluder&&t.distance>t.distanceToOccluder;return e!==s?+e-+s:i.priority!==t.priority?t.priority-i.priority:i.distance!==t.distance?i.distance-t.distance:i.visible!==t.visible?+t.visible-+i.visible:i.id-t.id}class oi{constructor(i,t){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this._info=null,this._labelInfo=null}ensureInfo(i){let t=this.getInfo(i);return t||(t=new ri(this.graphics3DGraphic.graphic.uid),this._setInfo(i,t)),t}getInfo(i){return i===U.LABEL?this._labelInfo:this._info}removeInfo(i){this._setInfo(i,null)}_setInfo(i,t){i===U.LABEL?this._labelInfo=t:this._info=t}}var ni;!function(i){i[i.Idle=0]="Idle",i[i.CheckOcclusion=1]="CheckOcclusion",i[i.WaitOcclusion=2]="WaitOcclusion",i[i.Collect=3]="Collect",i[i.Deconflict=4]="Deconflict",i[i.NumStates=5]="NumStates"}(ni||(ni={}));class ai{constructor(){this.camera=new R,this.slicePlane=S(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),A(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let li=class extends t{get dirty(){return this._dirty}get state(){return this._state}constructor(i){super(i),this._dirty=!1,this._viewState=new ai,this._state=ni.Idle,this._checkOcclusion=new Map,this._active=new Map,this._checkOcclusionIterator=null,this._activeIterator=null,this._occlusionQueryUids=new Array,this._updatingHandles=new v,this._deconflictor=new E(((i,t)=>{i.visible=t,this._setGraphicVisibility(this._active.get(i.id),t)}),((i,t)=>i.id!==t.id),ci),this._baseOccludedVisibility=10,this._altitudeFactor=2,this._minAltitudeDifference=100}initialize(){this._updatingHandles.add((()=>(this.view?.map?.ground?.opacity??0)>0),(()=>this.setDirty())),this._updatingHandles.add((()=>this.view.ready),(()=>this._occlusionQuery=null))}destroy(){this._occlusionQuery=null,this._updatingHandles.destroy(),this._deconflictor.destroy(),this._checkOcclusion.clear(),this._active.clear()}setDirty(){!this._dirty&&(this._active.size>0||this._checkOcclusion.size>0)&&(this._dirty=!0,this.notifyChange("updating"))}setPriority(i,t){const e=this._active.get(i.graphic.uid)?.getInfo(this.visibilityGroup);e&&(e.priority=t)}get updating(){return this._state!==ni.Idle||this._dirty||this._updatingHandles.updating}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ni.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ni.Idle:this._startUpdate(),i.madeProgress();case ni.CheckOcclusion:if(this._state=ni.CheckOcclusion,!this._processCheckOcclusion(i))return;case ni.WaitOcclusion:if(this._state=ni.WaitOcclusion,this._occlusionQuery&&!this._occlusionQuery.done)return Y;this._readOcclusionQueryResult(),i.madeProgress();case ni.Collect:if(this._state=ni.Collect,!this._collectActiveGraphics(i))return;case ni.Deconflict:if(this._state=ni.Deconflict,this._deconflictor.run(i),!this._deconflictor.done)return;default:this._state=ni.Idle,this.notifyChange("updating")}}setGraphicsActive(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i)))}layerSupportsDeconfliction(i){if(null==i||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?.geometries.length??0))return!1;const e=t?.geometries[0],s=e?.material;return s instanceof W}_startUpdate(){V(this.view),this._dirty=!1,this._viewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._viewState.camera;this._deconflictor.reset(i,t),this._resetIterators(),this._occlusionQueryUids.length=0,this._checkOcclusion.size||(this._occlusionQuery=s(this._occlusionQuery))}addToActiveGraphics(i){i.ensureInfo(this.visibilityGroup),this._active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){hi(i,this.visibilityGroup),i.removeInfo(this.visibilityGroup),this._active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}addToCheckOcclusion(i){this._checkOcclusion.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromCheckOcclusion(i){this._checkOcclusion.delete(i.graphics3DGraphic.graphic.uid)}_processCheckOcclusion(i){if(0===this._checkOcclusion.size)return!0;const t=this._ensureCheckOcclusionIterator(),e=this._viewState.camera,r=o($,e.viewInverseTransposeMatrix),c=this.view.map.ground.opacity>0,n="global"===this.view.viewingMode&&c&&e.relativeElevation>0?ii:null;let a=0;null!=n&&(l(N(n),p,e.viewMatrix),n[3]=b(this.view.spatialReference).radius,a=T(n,p));const h=O();for(;;){if(i.done)return!1;i.madeProgress();const s=t.next();if(!0===s.done)break;const c=s.value,o=c.graphics3DGraphic;if(o.destroyed)continue;if(!o.isVisible(U.GRAPHIC,F.DECONFLICTION))continue;const u=fi(o,this.visibilityGroup);let d=null,p=!0;for(const i of u){if(!this.layerSupportsDeconfliction(i))continue;d=_i,this._projectHudLayer(i,e,d),w(h);const t=i.stageObject.geometries[0].material;if(this._expandBoundingRect(h,e,i,t,d),d.isOutsideScreen){p=!1;break}if(this._isCulledBySlice(c,d.positionView)){p=!1;break}if(null!=n&&pi(d,n,a)){p=!1;break}l(J,d.positionView,r),d.altitude=this.view.renderCoordsHelper.getAltitude(J);const s=c.ensureInfo(this.visibilityGroup);if(s.altitude=d.altitude,s.distance=d.distance,s.distanceToOccluder=d.distanceToOccluder,s.culled=!1,I(s.aabr,h),t.parameters.occlusionTest)break;this._ensureOcclusionQuery().addPosition(J)===this._occlusionQueryUids.length&&this._occlusionQueryUids.push(o.graphic.uid);break}if(this._active.has(o.graphic.uid)&&(!p||!d)){const i=c.ensureInfo(this.visibilityGroup);i.visible=!d,i.culled=!0}}return this._checkOcclusionIterator=null,this._occlusionQueryUids.length||(this._occlusionQuery=s(this._occlusionQuery)),this._occlusionQuery?.start(),!0}_readOcclusionQueryResult(){if(!this._occlusionQuery||!this._occlusionQueryUids.length)return;const i=this._viewState.camera,t=this.view.renderCoordsHelper.getAltitude(i.eye);for(let e=0;e<this._occlusionQueryUids.length;e++){const i=this._occlusionQueryUids[e],s=this._checkOcclusion.get(i);if(!s)continue;const r=this._occlusionQuery.getOcclusion(e)??-1,c=s.getInfo(this.visibilityGroup);c&&(c.distanceToOccluder=r>0?c.distance-r:0);const o=r<=0||this._occludedVisibility(c?.distanceToOccluder??0,c?.distance??r,c?.altitude??0,t);this._active.has(i)?c&&(c.culled=!o,c.visible=o):this._setGraphicVisibility(s,o)}this._occlusionQueryUids.length=0}_collectActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),e=this.visibilityGroup===U.LABEL;for(;!i.done;){i.madeProgress();const s=t.next();if(!0===s.done)return this._activeIterator=null,!0;const r=s.value,c=r.getInfo(this.visibilityGroup);if(!c)continue;!(!e||r.graphics3DGraphic.isVisible())||c.culled?(L(c.aabr,!1,!0),this._setGraphicVisibility(r,c.visible)):this._deconflictor.add(c)}return!1}_occludedVisibility(i,t,e,s){const r=Math.max(this._minAltitudeDifference,Math.abs(e-s))-this._minAltitudeDifference;return 0===i||t-i<=this._baseOccludedVisibility+this._altitudeFactor*r}_resetIterators(){this._checkOcclusionIterator=null,this._activeIterator=null}_ensureCheckOcclusionIterator(){return this._checkOcclusionIterator??=this._checkOcclusion.values(),this._checkOcclusionIterator}_ensureActiveGraphicsIterator(){return this._activeIterator??=this._active.values(),this._activeIterator}_ensureOcclusionQuery(){return this._occlusionQuery??=new H({view:this.view}),this._occlusionQueryUids.length||this._occlusionQuery.init(this._checkOcclusion.size,this._viewState.camera.eye),this._occlusionQuery}_projectHudLayer(i,t,e){const s=i.stageObject,r=s.geometries[0],c=r.material,o=N(s.boundingVolumeWorldSpace.bounds);l(q,o,t.viewMatrix);const n=r.attributes,a=n.get(M.NORMAL).data,d=n.get(M.CENTEROFFSETANDDISTANCE).data;c.applyShaderOffsetsView(q,a,s.transformation,d,t,e.scaleInfo,q),_(K,q[0],q[1],q[2],1),m(X,K,t.projectionMatrix),h(e.positionNDC,X,1/X[3]),c.applyShaderOffsetsNDC(e.positionNDC,d,t,e.positionNDC,Z),e.distanceWithoutPolygonOffset=t.depthNDCToWorld(Z[2]),e.distance=Z[2]===e.positionNDC[2]?e.distanceWithoutPolygonOffset:t.depthNDCToWorld(e.positionNDC[2]),_(X,e.positionNDC[0],e.positionNDC[1],e.positionNDC[2],1),m(K,X,t.inverseProjectionMatrix),g(K,K,1/K[3]),u(e.positionView,q[0],q[1],q[2])}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._viewState.slicePlaneEnabled&&k(this._viewState.slicePlane,t)}_expandBoundingRect(i,t,s,r,{positionNDC:c,scaleInfo:o}){const n=s.getScreenSize(ui);B(n,o.factor,n),n[0]*=t.pixelRatio,n[1]*=t.pixelRatio;const a=D(r.calculateRelativeScreenBounds(n,o.factorAlignment.scale*t.pixelRatio,si),e(0,t.fullWidth,.5+.5*c[0]),e(0,t.fullHeight,.5+.5*c[1])),l=this.marginFactor;if(0!==l){const i=l*Math.min(C(a),j(a));a[0]-=i,a[1]-=i,a[2]+=i,a[3]+=i}G(i,a,i)}_setGraphicVisibility(i,t){const e=i?.graphics3DGraphic;e&&!e.destroyed&&(e.setVisibilityFlag(this.visibilityGroup,F.DECONFLICTION,t),this.visibilityGroup===U.LABEL&&this.view.labeler.setLabelGraphicVisibility(e,t))}};function hi(i,t){const e=i.graphics3DGraphic;e.destroyed||e.setVisibilityFlag(t,F.DECONFLICTION,!0)}i([r({constructOnly:!0})],li.prototype,"view",void 0),i([r({type:Boolean,readOnly:!0})],li.prototype,"updating",null),i([r({readOnly:!0})],li.prototype,"_updatingHandles",void 0),li=i([c("esri.views.3d.layers.graphics.Deconflictor")],li);const ui=a();class di{constructor(){this.positionView=f(),this.positionNDC=f(),this.altitude=0,this.distance=0,this.distanceToOccluder=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo=new z}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1||i[2]>=1}}function pi(i,t,e){return d(ti.direction,i.positionView),u(ti.origin,0,0,0),!!x(t,ti,ei)&&i.distanceWithoutPolygonOffset>e}function fi(i,t){return t===U.LABEL?i.labelLayers:i.layers}const _i=new di;export{li as Deconflictor,oi as DeconflictorGraphic,ai as DeconflictorViewState,ni as State};
|
|
5
|
+
import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as e}from"../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{transpose as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{t as l,g as h,i as u,c as d}from"../../../../chunks/vec32.js";import{ZEROS as p,create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as _,t as m,d as g}from"../../../../chunks/vec42.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as b}from"../../../../geometry/ellipsoidUtils.js";import{create as O,empty as w,copy as I,offset as D,width as C,height as j,expand as G}from"../../../../geometry/support/aaBoundingRect.js";import{e as k,d as S,a as A}from"../../../../chunks/boundedPlane.js";import{create as Q}from"../../../../geometry/support/ray.js";import{a as N,c as P,h as T,i as x}from"../../../../chunks/sphere.js";import{DeconflictAABR as E}from"./DeconflictAABR.js";import{prepare as V,drawPoly as L}from"./deconflictorDebug.js";import{VisibilityGroup as U,VisibilityFlag as F}from"./enums.js";import R from"../../webgl/RenderCamera.js";import{GPUPointOcclusionQuery as H}from"../../webgl-engine/lib/GPUPointOcclusionQuery.js";import{applyPrecomputedScaleFactor as B}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as M}from"../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as W}from"../../webgl-engine/materials/HUDMaterial.js";import{ScaleInfo as z}from"../../webgl-engine/materials/ScaleInfo.js";import{Yield as Y}from"../../../support/Yield.js";const q=f(),J=f(),K=y(),X=y(),Z=f(),$=n(),ii=P(),ti=Q(),ei=f(),si=O();class ri{constructor(i){this.id=i,this.aabr=O(),this.altitude=0,this.distance=0,this.distanceToOccluder=0,this.culled=!1,this.visible=!1,this.priority=0}}function ci(i,t){const e=0!==i.distanceToOccluder&&i.distance>i.distanceToOccluder,s=0!==t.distanceToOccluder&&t.distance>t.distanceToOccluder;return e!==s?+e-+s:i.priority!==t.priority?t.priority-i.priority:i.distance!==t.distance?i.distance-t.distance:i.visible!==t.visible?+t.visible-+i.visible:i.id-t.id}class oi{constructor(i,t){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this._info=null,this._labelInfo=null}ensureInfo(i){let t=this.getInfo(i);return t||(t=new ri(this.graphics3DGraphic.graphic.uid),this._setInfo(i,t)),t}getInfo(i){return i===U.LABEL?this._labelInfo:this._info}removeInfo(i){this._setInfo(i,null)}_setInfo(i,t){i===U.LABEL?this._labelInfo=t:this._info=t}}var ni;!function(i){i[i.Idle=0]="Idle",i[i.CheckOcclusion=1]="CheckOcclusion",i[i.WaitOcclusion=2]="WaitOcclusion",i[i.Collect=3]="Collect",i[i.Deconflict=4]="Deconflict",i[i.NumStates=5]="NumStates"}(ni||(ni={}));class ai{constructor(){this.camera=new R,this.slicePlane=S(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),A(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let li=class extends t{get dirty(){return this._dirty}get state(){return this._state}constructor(i){super(i),this._dirty=!1,this._viewState=new ai,this._state=ni.Idle,this._checkOcclusion=new Map,this._active=new Map,this._checkOcclusionIterator=null,this._activeIterator=null,this._occlusionQueryUids=new Array,this._updatingHandles=new v,this._deconflictor=new E(((i,t)=>{i.visible=t,this._setGraphicVisibility(this._active.get(i.id),t)}),((i,t)=>i.id!==t.id),ci),this._baseOccludedVisibility=10,this._altitudeFactor=2,this._minAltitudeDifference=100}initialize(){this._updatingHandles.add((()=>(this.view?.map?.ground?.opacity??0)>0),(()=>this.setDirty())),this._updatingHandles.add((()=>this.view.ready),(()=>this._occlusionQuery=null))}destroy(){this._occlusionQuery=null,this._updatingHandles.destroy(),this._deconflictor.destroy(),this._checkOcclusion.clear(),this._active.clear()}setDirty(){!this._dirty&&(this._active.size>0||this._checkOcclusion.size>0)&&(this._dirty=!0,this.notifyChange("updating"))}setPriority(i,t){const e=this._active.get(i.graphic.uid)?.getInfo(this.visibilityGroup);e&&(e.priority=t)}get updating(){return this._state!==ni.Idle||this._dirty||this._updatingHandles.updating}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ni.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ni.Idle:this._startUpdate(),i.madeProgress();case ni.CheckOcclusion:if(this._state=ni.CheckOcclusion,!this._processCheckOcclusion(i))return;case ni.WaitOcclusion:if(this._state=ni.WaitOcclusion,this._occlusionQuery&&!this._occlusionQuery.done)return Y;this._readOcclusionQueryResult(),i.madeProgress();case ni.Collect:if(this._state=ni.Collect,!this._collectActiveGraphics(i))return;case ni.Deconflict:if(this._state=ni.Deconflict,this._deconflictor.run(i),!this._deconflictor.done)return;default:this._state=ni.Idle,this.notifyChange("updating")}}setGraphicsActive(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i)))}layerSupportsDeconfliction(i){if(null==i||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?.geometries.length??0))return!1;const e=t?.geometries[0],s=e?.material;return s instanceof W}_startUpdate(){V(this.view),this._dirty=!1,this._viewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._viewState.camera;this._deconflictor.reset(i,t),this._resetIterators(),this._occlusionQueryUids.length=0,this._checkOcclusion.size||(this._occlusionQuery=s(this._occlusionQuery))}addToActiveGraphics(i){i.ensureInfo(this.visibilityGroup),this._active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){hi(i,this.visibilityGroup),i.removeInfo(this.visibilityGroup),this._active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}addToCheckOcclusion(i){this._checkOcclusion.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromCheckOcclusion(i){this._checkOcclusion.delete(i.graphics3DGraphic.graphic.uid)}_processCheckOcclusion(i){if(0===this._checkOcclusion.size)return!0;const t=this._ensureCheckOcclusionIterator(),e=this._viewState.camera,r=o($,e.viewInverseTransposeMatrix),c=this.view.map.ground.opacity>0,n="global"===this.view.viewingMode&&c&&e.relativeElevation>0?ii:null;let a=0;null!=n&&(l(N(n),p,e.viewMatrix),n[3]=b(this.view.spatialReference).radius,a=T(n,p));const h=O();for(;;){if(i.done)return!1;i.madeProgress();const s=t.next();if(!0===s.done)break;const c=s.value,o=c.graphics3DGraphic;if(o.destroyed)continue;if(!o.isVisible(U.GRAPHIC,F.DECONFLICTION))continue;const u=fi(o,this.visibilityGroup);let d=null,p=!0;for(const i of u){if(!this.layerSupportsDeconfliction(i))continue;d=_i,this._projectHudLayer(i,e,d),w(h);const t=i.stageObject.geometries[0].material;if(this._expandBoundingRect(h,e,i,t,d),d.isOutsideScreen){p=!1;break}if(this._isCulledBySlice(c,d.positionView)){p=!1;break}if(null!=n&&pi(d,n,a)){p=!1;break}l(J,d.positionView,r),d.altitude=this.view.renderCoordsHelper.getAltitude(J);const s=c.ensureInfo(this.visibilityGroup);if(s.altitude=d.altitude,s.distance=d.distance,s.distanceToOccluder=d.distanceToOccluder,s.culled=!1,I(s.aabr,h),t.parameters.occlusionTest)break;this._ensureOcclusionQuery().addPosition(J)===this._occlusionQueryUids.length&&this._occlusionQueryUids.push(o.graphic.uid);break}if(this._active.has(o.graphic.uid)&&(!p||!d)){const i=c.ensureInfo(this.visibilityGroup);i.visible=!d,i.culled=!0}}return this._checkOcclusionIterator=null,this._occlusionQueryUids.length||(this._occlusionQuery=s(this._occlusionQuery)),this._occlusionQuery?.start(),!0}_readOcclusionQueryResult(){if(!this._occlusionQuery||!this._occlusionQueryUids.length)return;const i=this._viewState.camera,t=this.view.renderCoordsHelper.getAltitude(i.eye);for(let e=0;e<this._occlusionQueryUids.length;e++){const i=this._occlusionQueryUids[e],s=this._checkOcclusion.get(i);if(!s)continue;const r=this._occlusionQuery.getOcclusion(e)??-1,c=s.getInfo(this.visibilityGroup);c&&(c.distanceToOccluder=r>0?c.distance-r:0);const o=r<=0||this._occludedVisibility(c?.distanceToOccluder??0,c?.distance??r,c?.altitude??0,t);this._active.has(i)?c&&(c.culled=!o,c.visible=o):this._setGraphicVisibility(s,o)}this._occlusionQueryUids.length=0}_collectActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),e=this.visibilityGroup===U.LABEL;for(;!i.done;){i.madeProgress();const s=t.next();if(!0===s.done)return this._activeIterator=null,!0;const r=s.value,c=r.getInfo(this.visibilityGroup);if(!c)continue;!(!e||r.graphics3DGraphic.isVisible())||c.culled?(L(c.aabr,!1,!0),this._setGraphicVisibility(r,c.visible)):this._deconflictor.add(c)}return!1}_occludedVisibility(i,t,e,s){const r=Math.max(this._minAltitudeDifference,Math.abs(e-s))-this._minAltitudeDifference;return 0===i||t-i<=this._baseOccludedVisibility+this._altitudeFactor*r}_resetIterators(){this._checkOcclusionIterator=null,this._activeIterator=null}_ensureCheckOcclusionIterator(){return this._checkOcclusionIterator??=this._checkOcclusion.values(),this._checkOcclusionIterator}_ensureActiveGraphicsIterator(){return this._activeIterator??=this._active.values(),this._activeIterator}_ensureOcclusionQuery(){return this._occlusionQuery??=new H({view:this.view}),this._occlusionQueryUids.length||this._occlusionQuery.init(this._checkOcclusion.size,this._viewState.camera.eye),this._occlusionQuery}_projectHudLayer(i,t,e){const s=i.stageObject,r=s.geometries[0],c=r.material,o=N(s.boundingVolumeWorldSpace.bounds);l(q,o,t.viewMatrix);const n=r.attributes,a=n.get(M.NORMAL).data,d=n.get(M.CENTEROFFSETANDDISTANCE).data;c.applyShaderOffsetsView(q,a,s.transformation,d,t,e.scaleInfo,q),_(K,q[0],q[1],q[2],1),m(X,K,t.projectionMatrix),h(e.positionNDC,X,1/X[3]),c.applyShaderOffsetsNDC(e.positionNDC,d,t,e.positionNDC,Z),e.distanceWithoutPolygonOffset=t.depthNDCToWorld(Z[2]),e.distance=Z[2]===e.positionNDC[2]?e.distanceWithoutPolygonOffset:t.depthNDCToWorld(e.positionNDC[2]),_(X,e.positionNDC[0],e.positionNDC[1],e.positionNDC[2],1),m(K,X,t.inverseProjectionMatrix),g(K,K,1/K[3]),u(e.positionView,q[0],q[1],q[2])}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._viewState.slicePlaneEnabled&&k(this._viewState.slicePlane,t)}_expandBoundingRect(i,t,s,r,{positionNDC:c,scaleInfo:o}){const n=s.getScreenSize(ui);B(n,o.factor,n),n[0]*=t.pixelRatio,n[1]*=t.pixelRatio;const a=D(r.calculateRelativeScreenBounds(n,o.factorAlignment.scale*t.pixelRatio,si),e(0,t.fullWidth,.5+.5*c[0]),e(0,t.fullHeight,.5+.5*c[1])),l=this.marginFactor;if(0!==l){const i=l*Math.min(C(a),j(a));a[0]-=i,a[1]-=i,a[2]+=i,a[3]+=i}G(i,a,i)}_setGraphicVisibility(i,t){const e=i?.graphics3DGraphic;e&&!e.destroyed&&(e.setVisibilityFlag(this.visibilityGroup,F.DECONFLICTION,t),this.visibilityGroup===U.LABEL&&this.view.labeler.setLabelGraphicVisibility(e,t))}};function hi(i,t){const e=i.graphics3DGraphic;e.destroyed||e.setVisibilityFlag(t,F.DECONFLICTION,!0)}i([r({constructOnly:!0})],li.prototype,"view",void 0),i([r({type:Boolean,readOnly:!0})],li.prototype,"updating",null),i([r({readOnly:!0})],li.prototype,"_updatingHandles",void 0),li=i([c("esri.views.3d.layers.graphics.Deconflictor")],li);const ui=a();class di{constructor(){this.positionView=f(),this.positionNDC=f(),this.altitude=0,this.distance=0,this.distanceToOccluder=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo=new z}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1||i[2]>=1}}function pi(i,t,e){return d(ti.direction,i.positionView),u(ti.origin,0,0,0),!!x(t,ti,ei)&&i.distanceWithoutPolygonOffset>e}function fi(i,t){return t===U.LABEL?i.labelLayers:i.layers}const _i=new di;export{li as Deconflictor,oi as DeconflictorGraphic,ai as DeconflictorViewState,ni as State};
|