@arcgis/core 6.0.0-next.43 → 6.0.0-next.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Basemap.d.ts +2 -1
- package/Camera.d.ts +2 -1
- package/Graphic.d.ts +2 -1
- package/Ground.d.ts +2 -1
- package/Map.d.ts +2 -1
- package/PopupTemplate.d.ts +2 -1
- package/WebDocument2D.d.ts +2 -1
- package/WebMap.d.ts +9 -1
- package/WebMap.js +1 -1
- package/WebScene.d.ts +2 -1
- package/WebScene.js +1 -1
- package/analysis/Analysis.d.ts +2 -1
- package/analysis/DimensionSimpleStyle.d.ts +2 -1
- package/analysis/LengthDimension.d.ts +2 -1
- package/analysis/LineOfSightAnalysisObserver.d.ts +2 -1
- package/analysis/LineOfSightAnalysisTarget.d.ts +2 -1
- package/analysis/SlicePlane.d.ts +2 -1
- package/analysis/Viewshed.d.ts +2 -1
- package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +2 -1
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +2 -1
- package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -1
- package/applications/Components/OrientedImageryViewer/ImageViewer/utils.d.ts +3 -1
- package/applications/Components/OrientedImageryViewer/ImageViewer/utils.js +1 -1
- package/applications/Components/OrientedImageryViewer/VideoFeatureCache.js +2 -0
- package/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +2 -1
- package/applications/Components/OrientedImageryViewer/galleryUtils.js +1 -1
- package/applications/Components/OrientedImageryViewer/imageMeasurementUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/imageUtils.d.ts +756 -0
- package/applications/Components/OrientedImageryViewer/imageUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/measurementUtils.d.ts +15 -0
- package/applications/Components/OrientedImageryViewer/measurementUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/queryFeatures.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/ImageMeasurementWorker.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/constants.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/featureCoverage.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/galleryUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/imageMeasurementWorkerUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/navigation/queries.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/navigation/utils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/panoramicImageProperties.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/services/ImageMeasurementService.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/services/SuperimposeService.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/services/TransformationService.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/NonPanoramicMedia.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/dataCaptureUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/geometryUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/panConstraint.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/resolveMediaProps.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/superimposeUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/typeUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/urlUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/symbols.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/utils.js +2 -0
- package/applications/Components/OrientedImageryViewer/videoUtils.d.ts +15 -0
- package/applications/Components/OrientedImageryViewer/videoUtils.js +2 -0
- package/applications/Components/testUtils.d.ts +9 -0
- package/applications/Components/testUtils.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.d.ts +117 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +4 -4
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/hash.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/geometry/isSelfIntersecting.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/arcgisGlobal.d.ts +6 -3
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00620a90b32352bcdc71.js +1 -0
- package/assets/esri/core/workers/chunks/{fdffefd7de540272a8a6.js → 02feb2550b6878e62e2d.js} +1 -1
- package/assets/esri/core/workers/chunks/06326c8cbe0d644eca16.js +1 -0
- package/assets/esri/core/workers/chunks/{3ec3589f6e74d7cb87cf.js → 090a7d0b0128d20879be.js} +1 -1
- package/assets/esri/core/workers/chunks/{c86d3af148b28ded5875.js → 0ac38ca04285cd5ef1a0.js} +40 -46
- package/assets/esri/core/workers/chunks/{a33ba23aee3f8f40200f.js → 0ac4a3029ba17a9e2492.js} +1 -1
- package/assets/esri/core/workers/chunks/0ae2933ab9b4a6ca56f2.js +1 -0
- package/assets/esri/core/workers/chunks/{18dbee576b7b9dbe69fb.js → 0b480583373b69773333.js} +1 -1
- package/assets/esri/core/workers/chunks/0bfc4e7640058811e10c.js +1 -0
- package/assets/esri/core/workers/chunks/{3de07326da4c47cd2aab.js → 0dc1ac5531f7c8854686.js} +1 -1
- package/assets/esri/core/workers/chunks/0e57bac610d41c7c9ad4.js +1 -0
- package/assets/esri/core/workers/chunks/{2294254af2c6afb560ee.js → 11e313dfca2579e68419.js} +1 -1
- package/assets/esri/core/workers/chunks/{cadd60fa4370284c7ae3.js → 13b40a611224ff5f4697.js} +1 -1
- package/assets/esri/core/workers/chunks/15a18c803a3aafa9a65b.js +1 -0
- package/assets/esri/core/workers/chunks/15a7a3264915fc8d3188.js +1 -0
- package/assets/esri/core/workers/chunks/162de06e54c0f9cba012.js +1 -0
- package/assets/esri/core/workers/chunks/1c61ced6079443fc0ce8.js +1 -0
- package/assets/esri/core/workers/chunks/1c94d4d79952dc4067be.js +1 -0
- package/assets/esri/core/workers/chunks/{804606b194dc9e71d088.js → 1ca9f823caff691e964d.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f4fba4d2339c91c8b3f.js → 1d9b0db37d5f3819ffca.js} +1 -1
- package/assets/esri/core/workers/chunks/200da109115eab8b2480.js +1 -0
- package/assets/esri/core/workers/chunks/{edd36a1fc80b1d29907e.js → 21939ef53bc71b42370f.js} +1 -1
- package/assets/esri/core/workers/chunks/230189a28552ab00546d.js +1 -0
- package/assets/esri/core/workers/chunks/{81b9894e81cce3490984.js → 2515ce2ef279cdd4d5fa.js} +1 -1
- package/assets/esri/core/workers/chunks/27a5c6be4f847900d6ed.js +1 -0
- package/assets/esri/core/workers/chunks/{45b5a61c4e9fbd9ca0b3.js → 27f0bbde1e9fa3f06d46.js} +1 -1
- package/assets/esri/core/workers/chunks/{d51bb11baadc741c46bc.js → 29a437a2b7b3a9b3e104.js} +1 -1
- package/assets/esri/core/workers/chunks/{070684943698fa43c2b4.js → 2a224bc845c9bf682c54.js} +1 -1
- package/assets/esri/core/workers/chunks/2c619c50cdcc37652c0b.js +1 -0
- package/assets/esri/core/workers/chunks/2c7f3fb74a076acf9b30.js +1 -0
- package/assets/esri/core/workers/chunks/{bc38def1983089514e4b.js → 2e9d2f0a4e3c84d2ac2e.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fe1812aad6e566aea31.js → 30c5b584e8658b2b3607.js} +1 -1
- package/assets/esri/core/workers/chunks/{ae6dc159be974ca0e8da.js → 32ba94e59b411d3ff063.js} +1 -1
- package/assets/esri/core/workers/chunks/{67efdd296007a809586c.js → 3463b52d633a9336af28.js} +1 -1
- package/assets/esri/core/workers/chunks/{864194927d05ebc4cc31.js → 35426786de409d42a87f.js} +1 -1
- package/assets/esri/core/workers/chunks/{898359be6996fd9763b8.js → 377158a19c9d6ef11387.js} +1 -1
- package/assets/esri/core/workers/chunks/394b329e64d880cdb500.js +1 -0
- package/assets/esri/core/workers/chunks/{ca2adcbcf44454484fd5.js → 3a295fab549ae3caf9df.js} +1 -1
- package/assets/esri/core/workers/chunks/3a3b57abfb92494cac84.js +1 -0
- package/assets/esri/core/workers/chunks/{fd031150d3a7f896e6b3.js → 3cbb3c4e0e60a874ac6d.js} +1 -1
- package/assets/esri/core/workers/chunks/3e67d50a2b2f8f837831.js +29 -0
- package/assets/esri/core/workers/chunks/{50763ea061d5fb3f2e49.js → 4136c4de42b8818e2710.js} +1 -1
- package/assets/esri/core/workers/chunks/41d674e73b57c8abe838.js +1 -0
- package/assets/esri/core/workers/chunks/{0cfdeb53fb7d5532cf01.js → 425347186c279bcc595c.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ccf9535013fe672c93b.js → 434a7ef5b25d83593b50.js} +1 -1
- package/assets/esri/core/workers/chunks/{4fe10650ba3cd30aa9a2.js → 46d0db736c6e7decbcf6.js} +1 -1
- package/assets/esri/core/workers/chunks/{cca8bd07bcd1d267a2e8.js → 489b37c459e1af116aeb.js} +1 -1
- package/assets/esri/core/workers/chunks/49c21c11621ff077e401.js +1 -0
- package/assets/esri/core/workers/chunks/{bfb8fc6b940bd5510e29.js → 4eab4e74c6a479c5f930.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fd4d3cb3c9350131a59.js → 4f8a915795f107b772c5.js} +1 -1
- package/assets/esri/core/workers/chunks/5565b4e7c31d31a7e546.js +1 -0
- package/assets/esri/core/workers/chunks/{344f5334ad95c7974349.js → 5744c7350e4e2eb73aa9.js} +1 -1
- package/assets/esri/core/workers/chunks/{8d3e92a3367a3ddc02bd.js → 57e0bf4be8a166d5b1eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{3dd49f910834a2fb2142.js → 5b3db2c40feaefb7cbc0.js} +1 -1
- package/assets/esri/core/workers/chunks/5ba40e98e9300d1ebc85.js +1 -0
- package/assets/esri/core/workers/chunks/60137300db0e0c3caf13.js +1 -0
- package/assets/esri/core/workers/chunks/63d2645a744dce469bbb.js +1 -0
- package/assets/esri/core/workers/chunks/649e4ecb1d9e6da3fcd7.js +1 -0
- package/assets/esri/core/workers/chunks/6637fb99033bfa7646d4.js +1 -0
- package/assets/esri/core/workers/chunks/68b4ce0b2e754ac2e552.js +1 -0
- package/assets/esri/core/workers/chunks/69c338d1d359075371bc.js +1 -0
- package/assets/esri/core/workers/chunks/{6b4c3411f63a9ad9354c.js → 72020d86e3fc7ecc139f.js} +1 -1
- package/assets/esri/core/workers/chunks/{9630234267098115de4d.js → 73ab4f0275a85b9671ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{449a2dee17b54946f245.js → 7b7208237123e948f170.js} +1 -1
- package/assets/esri/core/workers/chunks/{5529831dd891382c79df.js → 7d866911d1171d25ca78.js} +1 -1
- package/assets/esri/core/workers/chunks/7eddde6c4249f46c67f3.js +1 -0
- package/assets/esri/core/workers/chunks/82160bd873cdb5a23557.js +1 -0
- package/assets/esri/core/workers/chunks/82e238375582f90dc94c.js +1 -0
- package/assets/esri/core/workers/chunks/831d896587d10fb689dc.js +1 -0
- package/assets/esri/core/workers/chunks/{ca204c110438f7315790.js → 834bbda7719b04301f74.js} +1 -1
- package/assets/esri/core/workers/chunks/835ccd95f2d312ecda5a.js +1 -0
- package/assets/esri/core/workers/chunks/8385bede56cc95d1a388.js +1 -0
- package/assets/esri/core/workers/chunks/8a8c9a3969b7016c20d9.js +1 -0
- package/assets/esri/core/workers/chunks/8c1ae93dae934aedc6dc.js +1 -0
- package/assets/esri/core/workers/chunks/{ef274db3fa260eadf371.js → 8cddfdbab3ad3809462f.js} +1 -1
- package/assets/esri/core/workers/chunks/8cec3f48e995aab3d62e.js +1 -0
- package/assets/esri/core/workers/chunks/{076e8d2e08ff2a013736.js → 8f1dd383502432d8a039.js} +1 -1
- package/assets/esri/core/workers/chunks/{78a69594c82d37aecbfb.js → 90a7cd7564f2a92199cc.js} +1 -1
- package/assets/esri/core/workers/chunks/98e3f7ab4bfbabf0b952.js +1 -0
- package/assets/esri/core/workers/chunks/99a72b65afdcd3ee091a.js +1 -0
- package/assets/esri/core/workers/chunks/{be04f40f8b403befd0ef.js → 9bb90097368b200fa730.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7398cfd8bbd041bd635.js → 9bf77f92760aacbd636f.js} +1 -1
- package/assets/esri/core/workers/chunks/{237a1f68a0efbfe5b77c.js → 9e7622379d777ea88018.js} +1 -1
- package/assets/esri/core/workers/chunks/9fb4c10d5b3e32bc86e9.js +1 -0
- package/assets/esri/core/workers/chunks/{564d7f2e58fbc16853c0.js → a8bedc53d4a316953108.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2dab9fcd90ce38ae3d1.js → a8fbef765a6fb68e1115.js} +1 -1
- package/assets/esri/core/workers/chunks/aaac620f93a20fbd3f08.js +1 -0
- package/assets/esri/core/workers/chunks/ab684cce869973ea71cf.js +1 -0
- package/assets/esri/core/workers/chunks/ad787100602e18dde650.js +1 -0
- package/assets/esri/core/workers/chunks/{cb1642ea8b66231cbfb5.js → af70a81620203c030f5b.js} +1 -1
- package/assets/esri/core/workers/chunks/{efff269424d76f1dbb15.js → b10850c48f4eee60b8a9.js} +1 -1
- package/assets/esri/core/workers/chunks/{f11eaab5354cc6aa9569.js → b25104337f2495a4296a.js} +1 -1
- package/assets/esri/core/workers/chunks/{784d6c6949284ed6e10b.js → b3707d2cd2f4b2f70889.js} +1 -1
- package/assets/esri/core/workers/chunks/b3c0c9c91bcdbbb8e719.js +1 -0
- package/assets/esri/core/workers/chunks/b89b634e9d38b5a51d33.js +1 -0
- package/assets/esri/core/workers/chunks/bb6573d794bbe670216a.js +1 -0
- package/assets/esri/core/workers/chunks/{8ebaf5754e86a45b0497.js → be11cec9979ed5e9738e.js} +1 -1
- package/assets/esri/core/workers/chunks/c063de8f57a393280c39.js +1 -0
- package/assets/esri/core/workers/chunks/{14ed0c34b910eba3434e.js → c473c8b480de9802711b.js} +1 -1
- package/assets/esri/core/workers/chunks/{b3dbcf43f136ba2dadc5.js → c67ce7896789ac7275b2.js} +1 -1
- package/assets/esri/core/workers/chunks/c75cc72a306a617d9cd8.js +1 -0
- package/assets/esri/core/workers/chunks/{394ae3199c78a94c6a2a.js → c85336a50a4994a2a7eb.js} +1 -1
- package/assets/esri/core/workers/chunks/ccb0046b883286e65429.js +1 -0
- package/assets/esri/core/workers/chunks/cf684026e7f1ab7df4f7.js +1 -0
- package/assets/esri/core/workers/chunks/d19ac8368bb769fa5fba.js +1 -0
- package/assets/esri/core/workers/chunks/d26c9db8c0a772d0923c.js +1 -0
- package/assets/esri/core/workers/chunks/{58d10e0b35968680fd9f.js → d31f6598b76380e8688a.js} +1 -1
- package/assets/esri/core/workers/chunks/d3cd09b2d78ce9f2ea42.js +1 -0
- package/assets/esri/core/workers/chunks/{ad94f54b4c88b3a047bc.js → d4028536542db8b623cc.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb6fb04fe5c8d90d4196.js → d4fe26716c4eca13d493.js} +1 -1
- package/assets/esri/core/workers/chunks/d7270a2db6f3bfcf0565.js +1 -0
- package/assets/esri/core/workers/chunks/d85d1064ba87ea1b1410.js +1 -0
- package/assets/esri/core/workers/chunks/{7a8ca15271e42b6131ac.js → d8b9d14f8d3e82ad26dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{63c4412c16d8a44a5668.js → d99d5aa04e2d74ef57a7.js} +1 -1
- package/assets/esri/core/workers/chunks/{dfd4782b11d6fdca0492.js → d9e75266ac28f934eb61.js} +1 -1
- package/assets/esri/core/workers/chunks/dbf37b1c4e0567d9fb32.js +1 -0
- package/assets/esri/core/workers/chunks/{0c948ad4572000218afc.js → dc9792b2aa55975b8a95.js} +1 -1
- package/assets/esri/core/workers/chunks/dca0e2505a6cbef6f7f5.js +1 -0
- package/assets/esri/core/workers/chunks/ddaa8f8098e4a663e4e5.js +1 -0
- package/assets/esri/core/workers/chunks/df88bb9117967fe72eb4.js +1 -0
- package/assets/esri/core/workers/chunks/{1c378d489c5402888f76.js → e1f5da51115472347b55.js} +1 -1
- package/assets/esri/core/workers/chunks/e2535c83b97725e89256.js +1 -0
- package/assets/esri/core/workers/chunks/{406f24ec13eb30d43405.js → e2ebf0ea3af2e6907987.js} +1 -1
- package/assets/esri/core/workers/chunks/{ffe2077a9df7c838ea27.js → e7719bfbc5875a515a2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{26ceb0ff8d93dbb9b84f.js → ec88631b5033c19f569e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2cc53ad1a514167e4b8.js → ef8f9b61b829c3bdf999.js} +1 -1
- package/assets/esri/core/workers/chunks/ef9740c4d1bd808af38a.js +1 -0
- package/assets/esri/core/workers/chunks/{f08a2a262a3b55149396.js → f0b897319ca8578df63f.js} +1 -1
- package/assets/esri/core/workers/chunks/{acea0946049136578354.js → f1e87e3ff65d8594e6b3.js} +1 -1
- package/assets/esri/core/workers/chunks/f36376b126c80d0983fb.js +1 -0
- package/assets/esri/core/workers/chunks/f3ca7fa35eb8d55f5907.js +1 -0
- package/assets/esri/core/workers/chunks/{1f9d6180a96d557838e9.js → f4d714d0a1a513861704.js} +1 -1
- package/assets/esri/core/workers/chunks/{14ded73842154d91ef4e.js → f7f73de8c63924e347ab.js} +1 -1
- package/assets/esri/core/workers/chunks/f91e36a104e84d985517.js +1 -0
- package/assets/esri/core/workers/chunks/{69f6d5997b8ff1326e39.js → fa5d4b9a098441ebf505.js} +1 -1
- package/assets/esri/core/workers/chunks/{9c3db7a7c05fa0e81f0a.js → fc9d66fe2cc9e2d31964.js} +1 -1
- package/basemapGallery/PortalBasemapsSource.d.ts +2 -1
- package/basemapGallery/support/BasemapItem.d.ts +2 -1
- package/chunks/AtmosphereCompositing.glsl.js +24 -6
- package/chunks/Bufferer-CclWhXVb.js +1 -1
- package/chunks/ChapmanAtmosphere.glsl.js +32 -25
- package/chunks/ColorMaterial.glsl.js +26 -16
- package/chunks/Component.glsl.js +0 -1
- package/chunks/CypherParser.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
- package/chunks/EdgeShader.glsl.js +1 -1
- package/chunks/EmissionComposite.glsl.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
- package/chunks/GeodeticUtils.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/Jpg.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OperatorAffineTransform.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCrosses.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDensify.js +1 -1
- package/chunks/OperatorDistance.js +1 -1
- package/chunks/OperatorEquals.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorGraphicBuffer.js +1 -1
- package/chunks/OperatorIntegrate.js +1 -1
- package/chunks/OperatorIntersects.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorOverlaps.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorRelate.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/OperatorTouches.js +1 -1
- package/chunks/OperatorWithin.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/SideCalculator2D-DX0718xq.js +1 -1
- package/chunks/Transformation2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/chunks/antlr4.web.js +3 -3
- package/chunks/arcgis-knowledge-client-core-simd.js +3 -3
- package/chunks/arcgis-knowledge-client-core.js +3 -3
- package/chunks/basis_encoder.js +2 -2
- package/chunks/basis_transcoder.js +2 -2
- package/{portal/schemas → chunks}/definitions.js +1 -1
- package/chunks/draco_mesh_decoder.js +2 -2
- package/chunks/dxt_encoder.js +3 -3
- package/chunks/earcut.js +1 -1
- package/chunks/i3s.js +2 -2
- package/chunks/index.js +2 -2
- package/chunks/lclayout.js +2 -2
- package/chunks/lerc-wasm.js +1 -1
- package/chunks/libtess-f32.js +1 -1
- package/chunks/libtess-f64.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/parquet.js +1 -1
- package/chunks/pe-wasm.js +1 -1
- package/chunks/projector.js +1 -1
- package/chunks/qb3-wasm.js +1 -1
- package/chunks/text.js +1 -1
- package/chunks/urlUtils.js +2 -0
- package/chunks/vxlLayer.js +1 -1
- package/chunks/webScene.js +2 -0
- package/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/Clonable.d.ts +2 -1
- package/core/Clonable.js +1 -1
- package/core/Collection.js +1 -1
- package/core/Evented.d.ts +2 -1
- package/core/Identifiable.d.ts +2 -1
- package/core/JSONSupport.d.ts +2 -1
- package/core/Loadable.d.ts +2 -1
- package/core/MD5.js +1 -1
- package/core/MemCache.js +1 -1
- package/core/MultiOriginJSONSupport.d.ts +2 -1
- package/core/ObjectPool.js +1 -1
- package/core/Promise.d.ts +2 -1
- package/core/RandomLCG.js +1 -1
- package/core/ReadOnlyMultiOriginJSONSupport.d.ts +2 -1
- package/core/accessorSupport/decorators/subclass.js +1 -1
- package/core/accessorSupport/diffUtils.js +1 -1
- package/core/accessorSupport/extensions/serializableProperty/reader.js +1 -1
- package/core/accessorSupport/get.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/image/apng.js +1 -1
- package/core/lang.js +1 -1
- package/core/object.js +1 -1
- package/core/pbf.js +1 -1
- package/core/sql/StandardizedFunctions.js +1 -1
- package/core/string.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/urlUtils.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.d.ts +2 -1
- package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
- package/effects/FocusArea.d.ts +2 -1
- package/effects/FocusAreaOutline.d.ts +2 -1
- package/effects/FocusAreas.d.ts +2 -1
- package/form/FormTemplate.d.ts +2 -1
- package/form/elements/UtilityNetworkAssociationsElement.d.ts +2 -1
- package/form/elements/inputs/attachments/Input.d.ts +2 -1
- package/geometry/Circle.js +1 -1
- package/geometry/Mesh.d.ts +2 -1
- package/geometry/SpatialReference.d.ts +12 -3
- package/geometry/geodesicUtils.js +1 -1
- package/geometry/geometryEngine.js +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/support/GeographicTransformation.d.ts +2 -1
- package/geometry/operators/support/GeographicTransformationStep.d.ts +2 -1
- package/geometry/operators/support/jsonConverter.js +2 -2
- package/geometry/projectionUtils.js +1 -1
- package/geometry/support/MeshComponent.d.ts +2 -1
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -1
- package/geometry/support/MeshLocalVertexSpace.d.ts +2 -1
- package/geometry/support/MeshMaterial.d.ts +2 -1
- package/geometry/support/MeshTexture.d.ts +2 -1
- package/geometry/support/MeshTextureTransform.d.ts +2 -1
- package/geometry/support/MeshTransform.d.ts +2 -1
- package/geometry/support/MeshVertexAttributes.d.ts +2 -1
- package/geometry/support/buffer/types.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/frustumPlanes.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/meshUtils/External.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/glb.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +16 -123
- package/kernel.js +1 -1
- package/layerList/Item.d.ts +2 -1
- package/layerList/ItemPanel.d.ts +2 -1
- package/layerList/TableItem.d.ts +2 -1
- package/layerList/TableItemPanel.d.ts +2 -1
- package/layers/AnnotationFeatureLayer.d.ts +2 -1
- package/layers/BaseDynamicLayer.d.ts +2 -1
- package/layers/BaseElevationLayer.d.ts +2 -1
- package/layers/BaseTileLayer.d.ts +2 -1
- package/layers/BingMapsLayer.d.ts +2 -1
- package/layers/BuildingSceneLayer.d.ts +2 -1
- package/layers/CSVLayer.d.ts +2 -1
- package/layers/CatalogLayer.d.ts +2 -1
- package/layers/DimensionFeatureLayer.d.ts +2 -1
- package/layers/DimensionLayer.d.ts +2 -1
- package/layers/ElevationLayer.d.ts +2 -1
- package/layers/FeatureLayer.d.ts +2 -1
- package/layers/GaussianSplatLayer.d.ts +3 -10
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/GeoJSONLayer.d.ts +2 -1
- package/layers/GeoRSSLayer.d.ts +2 -1
- package/layers/GeospatialPDFLayer.d.ts +2 -1
- package/layers/GraphicsLayer.d.ts +2 -1
- package/layers/GroupLayer.d.ts +2 -1
- package/layers/ILyr3DWasmPerSceneView.js +1 -1
- package/layers/ImageryLayer.d.ts +2 -1
- package/layers/ImageryTileLayer.d.ts +2 -1
- package/layers/IntegratedMesh3DTilesLayer.d.ts +3 -6
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.d.ts +27 -3
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/KMLLayer.d.ts +2 -1
- package/layers/KnowledgeGraphLayer.d.ts +2 -1
- package/layers/Layer.d.ts +2 -1
- package/layers/LineOfSightLayer.d.ts +2 -1
- package/layers/LinkChartLayer.d.ts +2 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/MapImageLayer.d.ts +2 -1
- package/layers/MapNotesLayer.d.ts +2 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/MediaLayer.d.ts +2 -1
- package/layers/OGCFeatureLayer.d.ts +2 -1
- package/layers/ParquetLayer.d.ts +2 -33
- package/layers/ParquetLayer.js +1 -1
- package/layers/PointCloudLayer.d.ts +2 -1
- package/layers/RouteLayer.d.ts +2 -1
- package/layers/SceneLayer.d.ts +2 -1
- package/layers/SketchLayer.d.ts +2 -1
- package/layers/StreamLayer.d.ts +2 -1
- package/layers/SubtypeGroupLayer.d.ts +2 -1
- package/layers/TileLayer.d.ts +2 -1
- package/layers/UnknownLayer.d.ts +2 -1
- package/layers/UnsupportedLayer.d.ts +2 -1
- package/layers/VectorTileLayer.d.ts +2 -1
- package/layers/VideoLayer.d.ts +2 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/ViewshedLayer.d.ts +2 -1
- package/layers/VoxelLayer.d.ts +2 -1
- package/layers/WCSLayer.d.ts +2 -1
- package/layers/WFSLayer.d.ts +3 -2
- package/layers/WMSLayer.d.ts +2 -1
- package/layers/WMTSLayer.d.ts +2 -1
- package/layers/WebTileLayer.d.ts +2 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +2 -1
- package/layers/buildingSublayers/BuildingSublayer.d.ts +2 -1
- package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +2 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +2 -2
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/applyEditsUtils.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/data/FeatureIdInfo.js +1 -1
- package/layers/graphics/data/StreamFeatureManager.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/sources/csv/csv.js +2 -2
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -1
- package/layers/mixins/APIKeyMixin.d.ts +2 -1
- package/layers/mixins/ArcGISCachedService.d.ts +2 -1
- package/layers/mixins/ArcGISImageService.d.ts +2 -1
- package/layers/mixins/ArcGISMapService.d.ts +2 -1
- package/layers/mixins/BlendLayer.d.ts +2 -1
- package/layers/mixins/CustomParametersMixin.d.ts +2 -1
- package/layers/mixins/DataSeriesLayer.d.ts +2 -1
- package/layers/mixins/DisplayFilteredLayer.d.ts +2 -1
- package/layers/mixins/EditBusLayer.d.ts +2 -1
- package/layers/mixins/FeatureEffectLayer.d.ts +2 -1
- package/layers/mixins/FeatureLayerBase.d.ts +2 -1
- package/layers/mixins/FeatureReductionLayer.d.ts +2 -1
- package/layers/mixins/OperationalLayer.d.ts +2 -1
- package/layers/mixins/OrderedLayer.d.ts +2 -1
- package/layers/mixins/PortalLayer.d.ts +2 -1
- package/layers/mixins/PublishableLayer.d.ts +2 -1
- package/layers/mixins/RasterPresetRendererMixin.d.ts +2 -1
- package/layers/mixins/RefreshableLayer.d.ts +2 -1
- package/layers/mixins/ReloadableLayer.d.ts +2 -1
- package/layers/mixins/ScaleRangeLayer.d.ts +2 -1
- package/layers/mixins/SceneService.d.ts +2 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/mixins/SublayersOwner.d.ts +2 -1
- package/layers/mixins/TemporalLayer.d.ts +2 -1
- package/layers/mixins/TiledImagery.d.ts +2 -1
- package/layers/mixins/TrackableLayer.d.ts +2 -1
- package/layers/orientedImagery/core/ElevationSourceDefinitions.d.ts +2 -1
- package/layers/orientedImagery/core/NavigationNode.js +2 -0
- package/layers/orientedImagery/core/imageNavigationUtils.d.ts +2 -0
- package/layers/orientedImagery/core/imageNavigationUtils.js +2 -0
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/queries.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/orientedImagery/types.d.ts +3 -0
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/layers/raster/datasets/xmlUtilities.js +1 -1
- package/layers/raster/formats/Lerc.js +1 -1
- package/layers/raster/formats/pixelRangeUtils.js +1 -1
- package/layers/raster/functions/convolutionUtils.js +1 -1
- package/layers/raster/functions/customBandIndexUtils.js +1 -1
- package/layers/support/AnnotationFeatureSublayer.d.ts +2 -1
- package/layers/support/BuildingFilterMode.d.ts +2 -1
- package/layers/support/BuildingSummaryStatistics.d.ts +2 -1
- package/layers/support/ControlPointsGeoreference.d.ts +2 -1
- package/layers/support/DisplayFilter.d.ts +2 -1
- package/layers/support/DisplayFilterInfo.d.ts +2 -1
- package/layers/support/EditFieldsInfo.d.ts +2 -1
- package/layers/support/ExpressionInfo.d.ts +2 -1
- package/layers/support/FeatureReductionBinning.d.ts +2 -1
- package/layers/support/FeatureReductionCluster.d.ts +2 -1
- package/layers/support/FeatureTemplate.d.ts +2 -1
- package/layers/support/FeatureType.d.ts +2 -1
- package/layers/support/FieldConfiguration.d.ts +2 -1
- package/layers/support/FieldFormat.d.ts +2 -1
- package/layers/support/GeometryEncodingLocation.d.ts +2 -1
- package/layers/support/GeometryEncodingWkb.d.ts +2 -1
- package/layers/support/GeometryFieldsInfo.d.ts +2 -1
- package/layers/support/I3SIntegratedMeshElevationQuery.js +1 -1
- package/layers/support/KMLSublayer.d.ts +2 -1
- package/layers/support/LocalMediaElementSource.d.ts +2 -1
- package/layers/support/MediaElementBase.d.ts +2 -1
- package/layers/support/MosaicRule.js +1 -1
- package/layers/support/ParquetFilesData.d.ts +2 -1
- package/layers/support/ParquetPortalItemData.d.ts +2 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/PlaybackInfo.d.ts +2 -1
- package/layers/support/PortalItemData.d.ts +2 -1
- package/layers/support/Relationship.d.ts +2 -1
- package/layers/support/SceneModifications.d.ts +2 -1
- package/layers/support/SpriteSource.js +1 -1
- package/layers/support/Sublayer.d.ts +2 -1
- package/layers/support/Subtype.d.ts +2 -1
- package/layers/support/SubtypeSublayer.d.ts +2 -1
- package/layers/support/SymbolLayerDrawing.d.ts +2 -1
- package/layers/support/TelemetryData.d.ts +2 -1
- package/layers/support/TelemetryDisplay.d.ts +2 -1
- package/layers/support/TimeInfo.d.ts +2 -1
- package/layers/support/TimeSeriesCalculationMethod.d.ts +2 -1
- package/layers/support/TimeSeriesFieldTimeMapping.d.ts +2 -1
- package/layers/support/TimeSeriesInfo.d.ts +2 -1
- package/layers/support/TrackInfo.d.ts +2 -1
- package/layers/support/TrackPartInfo.d.ts +2 -1
- package/layers/support/VideoTimeExtent.d.ts +2 -1
- package/layers/support/WMSSublayer.d.ts +2 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/csvUtils.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/floorFilterUtils.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/schemaValidator.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/layers/video/VideoController.js +21 -21
- package/layers/voxel/VoxelColorStop.d.ts +2 -1
- package/layers/voxel/VoxelDynamicSection.d.ts +2 -1
- package/layers/voxel/VoxelIsosurface.d.ts +2 -1
- package/layers/voxel/VoxelOpacityStop.d.ts +2 -1
- package/layers/voxel/VoxelRangeFilter.d.ts +2 -1
- package/layers/voxel/VoxelSlice.d.ts +2 -1
- package/layers/voxel/VoxelTransferFunctionStyle.d.ts +2 -1
- package/layers/voxel/VoxelUniqueValue.d.ts +2 -1
- package/libs/ajv/ajv.bundle-wrapper.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/linkChart/ChronologicalLayoutSettings.d.ts +2 -1
- package/linkChart/LayoutSettings.d.ts +2 -1
- package/linkChart/LinkChartProperties.d.ts +2 -1
- package/linkChart/NonspatialDataDisplay.d.ts +2 -1
- package/linkChart/OrganicLayoutSettings.d.ts +2 -1
- package/linkChart/RootedLayoutSettings.d.ts +2 -1
- package/networks/Network.d.ts +2 -1
- package/networks/Network.js +1 -1
- package/networks/support/Circuit.d.ts +2 -1
- package/networks/support/CircuitSection.d.ts +2 -1
- package/networks/support/NamedTraceConfiguration.d.ts +2 -1
- package/networks/support/Subcircuit.d.ts +2 -1
- package/networks/support/TraceConfiguration.d.ts +2 -1
- package/networks/support/UNTraceConfiguration.d.ts +2 -1
- package/networks/support/UtilityNetworkLookupHelper.js +1 -1
- package/package.json +5 -5
- package/parcelFabric/ParcelFabric.d.ts +761 -0
- package/parcelFabric/ParcelFabric.js +2 -0
- package/parcelFabric/support/ParcelJobInfo.d.ts +97 -0
- package/parcelFabric/support/ParcelJobInfo.js +2 -0
- package/parcelFabric/support/ParcelParameters.d.ts +48 -0
- package/parcelFabric/support/ParcelParameters.js +2 -0
- package/popup/FeatureModel.d.ts +4 -3
- package/popup/FeaturesModel.d.ts +4 -3
- package/popup/FieldInfo.d.ts +2 -1
- package/popup/content/AttachmentsContent.d.ts +2 -1
- package/popup/content/RelationshipContent.d.ts +2 -1
- package/popup/content/UtilityNetworkAssociationsContent.d.ts +2 -1
- package/popup/support/AttachmentsOrderByInfo.d.ts +2 -1
- package/popup/support/FieldInfoFormat.d.ts +2 -1
- package/popup/support/UtilityNetworkAssociationType.d.ts +2 -1
- package/popup/support/featureUtils.js +1 -1
- package/portal/Portal.d.ts +2 -1
- package/portal/PortalItem.d.ts +2 -1
- package/portal/support/loadUtils.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/renderers/ClassBreaksRenderer.d.ts +2 -1
- package/renderers/DictionaryRenderer.d.ts +2 -1
- package/renderers/DotDensityRenderer.d.ts +2 -1
- package/renderers/FlowRenderer.d.ts +8 -6
- package/renderers/PieChartRenderer.d.ts +2 -1
- package/renderers/SimpleRenderer.d.ts +2 -1
- package/renderers/UniqueValueRenderer.d.ts +2 -1
- package/renderers/VectorFieldRenderer.d.ts +2 -1
- package/renderers/mixins/VisualVariablesMixin.d.ts +2 -1
- package/renderers/support/HeatmapLegendOptions.d.ts +2 -1
- package/renderers/support/OthersCategory.d.ts +2 -1
- package/renderers/support/RasterPresetRenderer.d.ts +2 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/RendererLegendOptions.d.ts +2 -1
- package/renderers/support/UniqueValue.d.ts +2 -1
- package/renderers/support/UniqueValueClass.d.ts +2 -1
- package/renderers/support/UniqueValueGroup.d.ts +2 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +2 -1
- package/request/queue.js +1 -1
- package/rest/featureService/FeatureService.d.ts +2 -1
- package/rest/geoprocessor/utils.js +1 -1
- package/rest/layerSources/DynamicDataLayer.d.ts +2 -1
- package/rest/layerSources/DynamicWorkspaceLayer.d.ts +2 -1
- package/rest/networks/support/TraceLocation.d.ts +2 -1
- package/rest/parcelFabric/analyzeByLeastSquaresAdjustment.js +2 -0
- package/rest/parcelFabric/applyLeastSquaresAdjustment.js +2 -0
- package/rest/parcelFabric/assignFeaturesToRecord.js +2 -0
- package/rest/parcelFabric/build.js +2 -0
- package/rest/parcelFabric/changeParcelType.js +2 -0
- package/rest/parcelFabric/clip.js +2 -0
- package/rest/parcelFabric/copyLinesToParcelType.js +2 -0
- package/rest/parcelFabric/createSeeds.js +2 -0
- package/rest/parcelFabric/deleteParcels.js +2 -0
- package/rest/parcelFabric/divide.js +2 -0
- package/rest/parcelFabric/duplicateParcels.js +2 -0
- package/rest/parcelFabric/merge.js +2 -0
- package/rest/parcelFabric/mergeParcelPoints.js +2 -0
- package/rest/parcelFabric/reassignFeaturesToRecord.js +2 -0
- package/rest/parcelFabric/reconstructFromSeeds.js +2 -0
- package/rest/parcelFabric/setParcelLineLabelPosition.js +2 -0
- package/rest/parcelFabric/shrinkToSeed.js +2 -0
- package/rest/parcelFabric/transferParcel.js +2 -0
- package/rest/parcelFabric/updateParcelHistory.js +2 -0
- package/rest/parcelFabric/utils.js +2 -0
- package/rest/print.js +1 -1
- package/rest/support/AttributeBinsFeatureSet.d.ts +2 -1
- package/rest/support/AttributeBinsGrouping.d.ts +2 -1
- package/rest/support/AttributeBinsQuery.d.ts +2 -1
- package/rest/support/AutoIntervalBinParameters.d.ts +2 -1
- package/rest/support/BinParametersBase.d.ts +2 -1
- package/rest/support/CameraInfo.d.ts +2 -1
- package/rest/support/CameraInfoMixin.d.ts +2 -1
- package/rest/support/ClosestFacilityParameters.d.ts +2 -1
- package/rest/support/DataLayer.d.ts +2 -1
- package/rest/support/DateBinTimeInterval.d.ts +2 -1
- package/rest/support/DirectionLine.d.ts +2 -1
- package/rest/support/DirectionPoint.d.ts +2 -1
- package/rest/support/FindImagesParameters.d.ts +2 -1
- package/rest/support/FixedIntervalBinParameters.d.ts +2 -1
- package/rest/support/ImageBoundaryParameters.d.ts +2 -1
- package/rest/support/ImageGPSInfoParameters.d.ts +2 -1
- package/rest/support/ImageInspectionInfo.d.ts +2 -1
- package/rest/support/ImageToMapMultirayParameters.d.ts +2 -1
- package/rest/support/ImageToMapParameters.d.ts +2 -1
- package/rest/support/ImageUrlParameters.d.ts +2 -1
- package/rest/support/ImageVolumeParameters.d.ts +2 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/LastMileDeliveryParameters.d.ts +2 -1
- package/rest/support/LocateSettingBase.d.ts +2 -1
- package/rest/support/LocateSettingSource.d.ts +2 -1
- package/rest/support/LocateSettings.d.ts +2 -1
- package/rest/support/LocateSettingsOverrides.d.ts +2 -1
- package/rest/support/MapToImageParameters.d.ts +2 -1
- package/rest/support/NetworkUrl.d.ts +2 -1
- package/rest/support/NormalizationBinParametersMixin.d.ts +2 -1
- package/rest/support/OutDistance.d.ts +2 -1
- package/rest/support/PointBarrier.d.ts +2 -1
- package/rest/support/PolygonBarrier.d.ts +2 -1
- package/rest/support/PolylineBarrier.d.ts +2 -1
- package/rest/support/RouteInfo.d.ts +2 -1
- package/rest/support/RouteParameters.d.ts +2 -1
- package/rest/support/ServiceAreaParameters.d.ts +2 -1
- package/rest/support/Stop.d.ts +2 -1
- package/rest/support/TravelMode.d.ts +2 -1
- package/rest/support/printTaskUtils.js +1 -1
- package/smartMapping/heuristics/scaleRange.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/location.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/support/LayersMixin.d.ts +2 -1
- package/support/TablesMixin.d.ts +2 -1
- package/support/actions/ActionBase.d.ts +2 -1
- package/support/basemapUtils.js +1 -1
- package/symbols/LineStyleMarker3D.d.ts +2 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +2 -1
- package/symbols/patterns/Pattern3D.d.ts +2 -1
- package/symbols/support/ElevationInfo.d.ts +2 -1
- package/symbols/support/OccludedVisibility.d.ts +2 -1
- package/symbols/support/Symbol3DEmissive.d.ts +2 -1
- package/symbols/support/Symbol3DMaterial.d.ts +2 -1
- package/symbols/support/Symbol3DTextBackground.d.ts +2 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/tables/elements/AttributeTableAttachmentElement.d.ts +2 -1
- package/tables/elements/AttributeTableFieldElement.d.ts +2 -1
- package/tables/elements/AttributeTableGroupElement.d.ts +2 -1
- package/tables/elements/AttributeTableRelationshipElement.d.ts +2 -1
- package/tables/support/FieldOrder.d.ts +2 -1
- package/time/TimeInterval.d.ts +2 -1
- package/undoredo/support/ServiceVersionInfo.js +1 -1
- package/versionManagement/VersionManagementService.d.ts +2 -1
- package/versionManagement/VersioningState.d.ts +2 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/number.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/ComputedAttributeStorage.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/features/support/StaticBitSet.js +1 -1
- package/views/2d/layers/features/support/rendererUtils.js +1 -1
- package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedArrowManipulator.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +2 -1
- package/views/3d/environment/VirtualLighting.d.ts +2 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/manipulators/ShiftManipulator.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorker.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/graphics/extrudePolygon.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/IDBCache.js +1 -1
- package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
- package/views/3d/support/meshProcessing.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ObjectParameters.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +1 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -19
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +16 -15
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +3 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +14 -13
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +14 -4
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/CloudsParameters.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsPresets.js +1 -1
- package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionFader.js +2 -0
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +5 -5
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +1 -2
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/IndexLayout.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/floatBlendScale.glsl.js +1 -1
- package/views/BreakpointsOwner.d.ts +2 -1
- package/views/DOMContainer.d.ts +2 -1
- package/views/PopupView.d.ts +2 -1
- package/views/SceneView.d.ts +2 -1
- package/views/Theme.d.ts +2 -1
- package/views/VideoView.d.ts +2 -1
- package/views/View.d.ts +2 -1
- package/views/View2D.d.ts +2 -1
- package/views/Viewport2DMixin.d.ts +2 -1
- package/views/analysis/AnalysisView.d.ts +2 -1
- package/views/draw/DrawAction.d.ts +2 -1
- package/views/draw/DrawManipulator3D.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/reshapeUtils.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/options/SnappingOptions.d.ts +5 -3
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/FeatureSnappingLayerSource.d.ts +6 -3
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/symbologySnappingCandidates.js +1 -1
- package/views/layers/FeatureLikeLayerView.d.ts +0 -32
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/GraphicsLayerView.d.ts +0 -32
- package/views/layers/GraphicsLayerView.js +1 -1
- package/views/layers/ImageryLayerView.d.ts +1 -62
- package/views/layers/LayerView.d.ts +2 -1
- package/views/layers/LayerView.js +1 -1
- package/views/layers/PointCloudLayerView.d.ts +2 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/views/support/GeometryWorker.js +1 -1
- package/views/support/flow/dataUtils.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/support/waitForResources.js +1 -1
- package/views/ui/UI.d.ts +1 -12
- package/views/webgl/InstanceCounter.js +1 -1
- package/views/webgl/Program.js +3 -3
- package/views/webgl/RenderingContext.js +1 -1
- package/webdoc/GeotriggersInfo.d.ts +2 -1
- package/webdoc/IPSInfo.d.ts +2 -1
- package/webdoc/geotriggersInfo/DeviceLocationFeed.d.ts +2 -1
- package/webdoc/geotriggersInfo/ExpressionInfo.d.ts +2 -1
- package/webdoc/geotriggersInfo/FeatureFenceParameters.d.ts +2 -1
- package/webdoc/geotriggersInfo/FeatureFilter.d.ts +2 -1
- package/webdoc/geotriggersInfo/FeatureLayerSource.d.ts +2 -1
- package/webdoc/geotriggersInfo/Geotrigger.d.ts +2 -1
- package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.d.ts +2 -1
- package/webdoc/ips/AppleIPSProperties.d.ts +2 -1
- package/webdoc/ips/Configuration.d.ts +2 -1
- package/webdoc/ips/GNSSProperties.d.ts +2 -1
- package/webdoc/ips/PathSnappingProperties.d.ts +2 -1
- package/webdoc/ips/PositioningService.d.ts +2 -1
- package/webdoc/ips/SmoothingProperties.d.ts +2 -1
- package/webdoc/support/SlideThumbnail.d.ts +2 -1
- package/webdoc/support/webdocLoadUtils.js +1 -1
- package/webmap/Bookmark.d.ts +2 -1
- package/webmap/InitialViewProperties.d.ts +2 -1
- package/webscene/Glow.d.ts +2 -1
- package/webscene/InitialViewProperties.d.ts +2 -1
- package/webscene/Presentation.d.ts +2 -1
- package/webscene/Slide.d.ts +2 -1
- package/webscene/SlideLegendInfo.d.ts +2 -1
- package/webscene/spec-certification/api.js +1 -1
- package/webscene/spec-certification/spec.js +1 -1
- package/webscene/support/Description.d.ts +2 -1
- package/webscene/support/FeatureReference.d.ts +2 -1
- package/webscene/support/FeatureReferenceId.d.ts +2 -1
- package/webscene/support/LayerReference.d.ts +2 -1
- package/webscene/support/SlideElements.d.ts +2 -1
- package/webscene/support/SlideEnvironment.d.ts +2 -1
- package/webscene/support/SlideGround.d.ts +2 -1
- package/webscene/support/SlidePopupInfo.d.ts +2 -1
- package/webscene/support/SlideVisibleLayer.d.ts +2 -1
- package/webscene/support/Title.d.ts +2 -1
- package/webscene/support/schemaValidator.js +1 -1
- package/webscene/version.js +1 -1
- package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +2 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +2 -2
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +2 -2
- package/widgets/BasemapLayerList/types.d.ts +3 -3
- package/widgets/BasemapLayerList.d.ts +4 -3
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.d.ts +2 -1
- package/widgets/Bookmarks.d.ts +2 -1
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +2 -2
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +2 -2
- package/widgets/CatalogLayerList/types.d.ts +3 -3
- package/widgets/CatalogLayerList.d.ts +5 -4
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Compass/CompassViewModel.d.ts +2 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +2 -1
- package/widgets/Directions/DirectionsViewModel.d.ts +2 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
- package/widgets/Feature/FeatureViewModel.d.ts +2 -1
- package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +2 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplate.d.ts +2 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +2 -1
- package/widgets/FeatureTable/support/EditableColumnTemplateMixin.d.ts +2 -1
- package/widgets/FeatureTable/support/FieldColumnTemplate.d.ts +2 -1
- package/widgets/FeatureTable/support/TableTemplate.d.ts +2 -1
- package/widgets/FeatureTemplates/TemplateItemGroup.d.ts +2 -1
- package/widgets/Features/FeaturesViewModel.d.ts +2 -1
- package/widgets/FloorFilter/FloorFilterViewModel.d.ts +2 -1
- package/widgets/Home/HomeViewModel.d.ts +2 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/LayerListVisibleElements.d.ts +2 -2
- package/widgets/LayerList/ListItem.d.ts +3 -2
- package/widgets/LayerList/ListItemPanel.d.ts +3 -2
- package/widgets/LayerList/types.d.ts +1 -1
- package/widgets/LayerList.d.ts +2 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +2 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/draw/HeightMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.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/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OverlayLayersListViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/imageNavigationUtils.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/featureCoverage.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/panoramicImageProperties.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/services/TransformationService.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +1 -1
- package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
- package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/geometryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/navigationViewStateUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
- package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/typeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
- package/widgets/OrientedImageryViewer/symbols.js +1 -1
- package/widgets/OrientedImageryViewer/types.d.ts +10 -0
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/widgets/Print/PrintViewModel.d.ts +2 -1
- package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
- package/widgets/Search/SearchSource.d.ts +2 -1
- package/widgets/Search/SearchViewModel.d.ts +2 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/TableList/ListItem.d.ts +4 -3
- package/widgets/TableList/ListItemPanel.d.ts +6 -5
- package/widgets/TableList/TableListViewModel.d.ts +4 -4
- package/widgets/TableList/TableListViewModel.js +1 -1
- package/widgets/TableList/TableListVisibleElements.d.ts +2 -2
- package/widgets/TableList/types.d.ts +5 -5
- package/widgets/TableList.d.ts +5 -4
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/Widget.d.ts +2 -1
- package/widgets/support/GeolocationPositioning.d.ts +2 -1
- package/widgets/support/GoTo.d.ts +2 -1
- package/widgets/types.d.ts +0 -21
- package/assets/esri/core/workers/chunks/105865a4d8cb4ddf8a8a.js +0 -1
- package/assets/esri/core/workers/chunks/1aebb8fe0692058bf2fb.js +0 -1
- package/assets/esri/core/workers/chunks/1cdb55d9a5ab1a5e3f08.js +0 -1
- package/assets/esri/core/workers/chunks/1e5c5029b0653047a769.js +0 -1
- package/assets/esri/core/workers/chunks/20db6e844708d3e71437.js +0 -1
- package/assets/esri/core/workers/chunks/29ef9d357e30082d267a.js +0 -1
- package/assets/esri/core/workers/chunks/29feef121b0916fb90bf.js +0 -1
- package/assets/esri/core/workers/chunks/2e760d04641755d1820d.js +0 -1
- package/assets/esri/core/workers/chunks/2ef91e8da260454f46d8.js +0 -1
- package/assets/esri/core/workers/chunks/361d620b3f91868b1490.js +0 -1
- package/assets/esri/core/workers/chunks/37c16e20f022ca27cdae.js +0 -1
- package/assets/esri/core/workers/chunks/380aefa522dfeccb8c65.js +0 -1
- package/assets/esri/core/workers/chunks/3a90b6eafa92f1a68ac5.js +0 -1
- package/assets/esri/core/workers/chunks/3b552afffaa78bf4fe18.js +0 -1
- package/assets/esri/core/workers/chunks/44782e8318dc47cb08a0.js +0 -1
- package/assets/esri/core/workers/chunks/46969f379623810b2eca.js +0 -1
- package/assets/esri/core/workers/chunks/47f0c717acc2c33ea670.js +0 -1
- package/assets/esri/core/workers/chunks/487500443a6037d3599f.js +0 -1
- package/assets/esri/core/workers/chunks/4a4fab74442c3d914505.js +0 -1
- package/assets/esri/core/workers/chunks/4e03aa5518d46a36661c.js +0 -1
- package/assets/esri/core/workers/chunks/5470a29a69010c8361c4.js +0 -1
- package/assets/esri/core/workers/chunks/59295b99bdff4045a0e7.js +0 -1
- package/assets/esri/core/workers/chunks/5c2fe67527c9d7b4dba3.js +0 -1
- package/assets/esri/core/workers/chunks/5d908a823b324bafda1e.js +0 -1
- package/assets/esri/core/workers/chunks/5dea74fe52583e77f3ce.js +0 -1
- package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +0 -29
- package/assets/esri/core/workers/chunks/60637f38159e9bf68d4e.js +0 -1
- package/assets/esri/core/workers/chunks/67c2e5953087dadfd245.js +0 -1
- package/assets/esri/core/workers/chunks/6f3732e7ba2d031ba789.js +0 -1
- package/assets/esri/core/workers/chunks/7191ab31fa040a7c561e.js +0 -1
- package/assets/esri/core/workers/chunks/71ba848c3352ea3ff96f.js +0 -1
- package/assets/esri/core/workers/chunks/863f04cacdc843d3f208.js +0 -1
- package/assets/esri/core/workers/chunks/87992070008812f8ae6f.js +0 -1
- package/assets/esri/core/workers/chunks/89b9d716d96135d4f057.js +0 -1
- package/assets/esri/core/workers/chunks/8b38798ac6d774185238.js +0 -1
- package/assets/esri/core/workers/chunks/8b53369cace136ed1329.js +0 -1
- package/assets/esri/core/workers/chunks/8ba4f5e1912edf397947.js +0 -1
- package/assets/esri/core/workers/chunks/919a6aedf38e9631ee09.js +0 -1
- package/assets/esri/core/workers/chunks/9869c696e6321c8db0a9.js +0 -1
- package/assets/esri/core/workers/chunks/9d0976f5979c4f9154dc.js +0 -1
- package/assets/esri/core/workers/chunks/a332e31165b65a6fb92e.js +0 -1
- package/assets/esri/core/workers/chunks/a4d3944700f1cc240176.js +0 -1
- package/assets/esri/core/workers/chunks/a7937b06f4b0860c7671.js +0 -1
- package/assets/esri/core/workers/chunks/b03f32f02858244c6cd0.js +0 -1
- package/assets/esri/core/workers/chunks/b42e50ec6b819f669400.js +0 -1
- package/assets/esri/core/workers/chunks/b5e7475cc5fbf31289d3.js +0 -1
- package/assets/esri/core/workers/chunks/bd02d927b0b4991b61c5.js +0 -1
- package/assets/esri/core/workers/chunks/bdf1c4c038d556527483.js +0 -1
- package/assets/esri/core/workers/chunks/c1273f14a5ef3d81de0d.js +0 -1
- package/assets/esri/core/workers/chunks/c7f49493bd548d5dc1e0.js +0 -1
- package/assets/esri/core/workers/chunks/cb62326b6526cde429c1.js +0 -1
- package/assets/esri/core/workers/chunks/cd8304b1db83d48c57db.js +0 -1
- package/assets/esri/core/workers/chunks/ce0274847ccce6a1ac53.js +0 -1
- package/assets/esri/core/workers/chunks/d00dd961a5b79f563123.js +0 -1
- package/assets/esri/core/workers/chunks/d893c3bb093104d3db95.js +0 -1
- package/assets/esri/core/workers/chunks/d8fb1d9da16492574a11.js +0 -1
- package/assets/esri/core/workers/chunks/df32a3fe81d60f0d7462.js +0 -1
- package/assets/esri/core/workers/chunks/e8cdec961e9cff1cb73b.js +0 -1
- package/assets/esri/core/workers/chunks/eaf720dfdf6ceca31249.js +0 -1
- package/assets/esri/core/workers/chunks/efca82a4dc494f57380b.js +0 -1
- package/assets/esri/core/workers/chunks/f05990e6fb378e2e1a3b.js +0 -1
- package/assets/esri/core/workers/chunks/f0fc89cdf50a40913c02.js +0 -1
- package/assets/esri/core/workers/chunks/f86ff791a10c802879ec.js +0 -1
- package/assets/esri/core/workers/chunks/fd17c4a9e13bf77aa86a.js +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.ar.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.bg.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.bs.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.ca.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.cs.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.da.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.de.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.el.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.en.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.es.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.et.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.fi.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.fr.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.he.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.hr.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.hu.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.id.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.it.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.ja.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.ko.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.lt.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.lv.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.nl.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.no.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.pl.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.pt-BR.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.pt-PT.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.ro.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.ru.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.sk.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.sl.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.sr.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.sv.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.th.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.tr.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.uk.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.vi.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.zh-CN.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.zh-HK.json +0 -1
- package/assets/esri/widgets/Attribution/t9n/messages.zh-TW.json +0 -1
- package/chunks/CloudsComposition.glsl.js +0 -3
- package/popup/content.d.ts +0 -192
- package/popup/content.js +0 -2
- package/portal/schemas/buildingSceneLayerItem.js +0 -2
- package/portal/schemas/gaussianSplatLayerItem.js +0 -2
- package/portal/schemas/integratedMesh3DTilesLayerItem.js +0 -2
- package/portal/schemas/integratedMeshLayerItem.js +0 -2
- package/portal/schemas/pointCloudLayerItem.js +0 -2
- package/portal/schemas/sceneLayerItem.js +0 -2
- package/portal/schemas/webScene.js +0 -2
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +0 -2
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +0 -2
- package/views/3d/webgl-engine/effects/clouds/CloudsCompositionTechnique.js +0 -2
- package/widgets/Attribution/AttributionViewModel.d.ts +0 -41
- package/widgets/Attribution/AttributionViewModel.js +0 -2
- package/widgets/Attribution.d.ts +0 -105
- package/widgets/Attribution.js +0 -2
- package/widgets/OrientedImageryViewer/support/VideoFeatureCache.js +0 -2
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../../core/Error.js";import t from"../../../../core/Logger.js";import{getOrCreateMapValue as n}from"../../../../core/MapUtils.js";import{getKey as r}from"../../../../core/object.js";import{allSettledValues as i}from"../../../../core/promiseUtils.js";import{isDataProtocol as a,dataComponents as o,dataToArrayBuffer as s,makeAbsolute as c}from"../../../../core/urlUtils.js";import l from"../../../../core/Version.js";import{multiply as u,translate as d,rotate as f,scale as p,fromXRotation as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h,clone as g}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{getAxisAngle as _}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{BufferViewVec2f as y,BufferViewVec2u32 as b,BufferViewVec2u16 as x,BufferViewVec2i16 as S,BufferViewVec2u8 as C,BufferViewVec2i8 as w,BufferViewUint32 as T,BufferViewUint16 as E,BufferViewUint8 as D,BufferViewVec3f as O,BufferViewVec4f as k,BufferViewVec4u8 as A,BufferViewVec4u16 as j,BufferViewVec3u8 as M,BufferViewVec3u16 as ee}from"../../../../geometry/support/buffer/BufferView.js";import{m as N}from"../../../../chunks/scalar.js";import{getDracoMeshDecoder as P}from"../../../../libs/dracoMeshDecoder/dracoMeshDecoder.js";import{BinaryStreamReader as F}from"./BinaryStreamReader.js";import{material as I,textureSampler as L}from"./fillDefaults.js";import{splitURI as R}from"./pathUtils.js";import{jsonFromBinaryData as z,EncodedMeshTexture as B,imageFromBinaryData as V,isEncodedMeshTexture as H}from"./resourceUtils.js";import{DataType as U}from"../../../webgl/enums.js";const W={MAGIC:1179937895,CHUNK_TYPE_JSON:1313821514,CHUNK_TYPE_BIN:5130562};class G{constructor(t,n,r,i){if(this._context=t,this.uri=n,this.json=r,this._glbBuffer=i,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._dracoBuffersSize=0,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=[`KHR_texture_basisu`,`KHR_texture_transform`,`KHR_draco_mesh_compression`,`KHR_materials_emissive_strength`,`KHR_materials_unlit`],this._baseUri=R(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),r.scenes==null)throw new e(`gltf-loader-unsupported-feature`,`Scenes must be defined.`);if(r.meshes==null)throw new e(`gltf-loader-unsupported-feature`,`Meshes must be defined`);if(r.nodes==null)throw new e(`gltf-loader-unsupported-feature`,`Nodes must be defined.`);this._computeNodeParents()}static async load(t,n,r){if(a(n)){let e=o(n);if(e&&e.mediaType!==`model/gltf-binary`)try{let r=JSON.parse(e.isBase64?atob(e.data):e.data);return new G(t,n,r)}catch{}let r=s(n);if(G._isGLBData(r))return this._fromGLBData(t,n,r)}if(te.test(n)||r?.expectedType===`gltf`){let e=await t.loadJSON(n,r);return new G(t,n,e)}let i=await t.loadBinary(n,r);if(G._isGLBData(i))return this._fromGLBData(t,n,i);if(ne.test(n)||r?.expectedType===`glb`)throw new e(`gltf-loader-invalid-glb`,`This is not a valid glb file.`);let c=await t.loadJSON(n,r);return new G(t,n,c)}static _isGLBData(e){if(e==null)return!1;let t=new F(e);return t.remainingBytes()>=4&&t.readUint32()===W.MAGIC}static async _fromGLBData(e,t,n){let r=await G._parseGLBData(n);return new G(e,t,r.json,r.binaryData)}static async _parseGLBData(n){let r=new F(n);if(r.remainingBytes()<12)throw new e(`gltf-loader-error`,`glb binary data is insufficiently large.`);let i=r.readUint32(),a=r.readUint32(),o=r.readUint32();if(i!==W.MAGIC)throw new e(`gltf-loader-error`,`Magic first 4 bytes do not fit to expected glb value.`);if(n.byteLength<o)throw new e(`gltf-loader-error`,`glb binary data is smaller than header specifies.`);if(a!==2)throw new e(`gltf-loader-unsupported-feature`,`An unsupported glb container version was detected. Only version 2 is supported.`);let s=0,c,l;for(;r.remainingBytes()>=8;){let n=r.readUint32(),i=r.readUint32();if(s===0){if(i!==W.CHUNK_TYPE_JSON)throw new e(`gltf-loader-error`,`First glb chunk must be JSON.`);if(n<0)throw new e(`gltf-loader-error`,`No JSON data found.`);c=await z(r.readUint8Array(n))}else if(s===1){if(i!==W.CHUNK_TYPE_BIN)throw new e(`gltf-loader-unsupported-feature`,`Second glb chunk expected to be BIN.`);l=r.readUint8Array(n)}else t.getLogger(`esri.views.3d.glTF`).warn(`[Unsupported Feature] More than 2 glb chunks detected. Skipping.`);s+=1}if(!c)throw new e(`gltf-loader-error`,`No glb JSON chunk detected.`);return{json:c,binaryData:l}}async getBuffer(t,n){let r=this.json.buffers[t];if(r.uri==null){if(this._glbBuffer==null)throw new e(`gltf-loader-error`,`glb buffer not present`);return this._glbBuffer}let i=await this._getBufferLoader(t,n);if(i.byteLength!==r.byteLength)throw new e(`gltf-loader-error`,`Buffer byte lengths should match.`);return i}async _getBufferLoader(e,t){let n=this._bufferLoaders.get(e);if(n)return n;let r=this.json.buffers[e].uri,i=this._context.loadBinary(this._resolveUri(r),t).then(e=>new Uint8Array(e));return this._bufferLoaders.set(e,i),i}_validateAccessor(t){if(!this.json.accessors)throw new e(`gltf-loader-unsupported-feature`,`Accessors missing.`);let n=this.json.accessors[t];if(n.type in[`MAT2`,`MAT3`,`MAT4`])throw new e(`gltf-loader-unsupported-feature`,`AttributeType ${n.type} is not supported`);return n}_getComponentInfo(e,t){let n=Y[e.type],r=t?.componentType||e.componentType,i=X[r];return{componentType:r,componentCount:n,componentByteSize:i,denseByteStride:n*i}}getDracoAccessor(e,t){let n=this._validateAccessor(e),r=t.accessorInfos.get(e),{componentType:i,componentCount:a,componentByteSize:o,denseByteStride:s}=this._getComponentInfo(n,r);return{raw:t.data.buffer,byteStride:s,byteOffset:t.data.byteOffset+(r?.byteOffset||0),entryCount:r?.count??n.count,isDenselyPacked:!0,componentCount:a,componentByteSize:o,componentType:i,min:n.min,max:n.max,normalized:!!n.normalized}}async getAccessor(t,n){let r=this._validateAccessor(t);if(r?.bufferView==null)throw new e(`gltf-loader-unsupported-feature`,`Some accessor does not specify a bufferView.`);let{componentCount:i,componentByteSize:a,denseByteStride:o}=this._getComponentInfo(r),s=this.json.bufferViews[r.bufferView],c=await this.getBuffer(s.buffer,n),l=s.byteStride||o;return{raw:c.buffer,byteStride:l,byteOffset:c.byteOffset+(s.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:l===o,componentCount:i,componentByteSize:a,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t,n){if(e.indices==null)return;let r=e.indices,i=n?this.getDracoAccessor(r,n):await this.getAccessor(r,t);if(i.isDenselyPacked)switch(i.componentType){case U.UNSIGNED_BYTE:return new Uint8Array(i.raw,i.byteOffset,i.entryCount);case U.UNSIGNED_SHORT:return new Uint16Array(i.raw,i.byteOffset,i.entryCount);case U.UNSIGNED_INT:return new Uint32Array(i.raw,i.byteOffset,i.entryCount)}else switch(i.componentType){case U.UNSIGNED_BYTE:return N(Q(D,i));case U.UNSIGNED_SHORT:return N(Q(E,i));case U.UNSIGNED_INT:return N(Q(T,i))}}async getPositionData(t,n,i){if(t.attributes.POSITION==null)throw new e(`gltf-loader-unsupported-feature`,`No POSITION vertex data found.`);let a=t.attributes.POSITION,o=i?this.getDracoAccessor(a,i):await this.getAccessor(a,n);if(o.componentType!==U.FLOAT)throw new e(`gltf-loader-unsupported-feature`,`Expected type FLOAT for POSITION vertex attribute, but found `+r(U,o.componentType));if(o.componentCount!==3)throw new e(`gltf-loader-unsupported-feature`,`POSITION vertex attribute must have 3 components, but found `+o.componentCount.toFixed());return Q(O,o)}async getNormalData(t,n,i){if(t.attributes.NORMAL==null)throw new e(`gltf-loader-error`,`No NORMAL vertex data found.`);let a=t.attributes.NORMAL,o=i?this.getDracoAccessor(a,i):await this.getAccessor(a,n);if(o.componentType!==U.FLOAT)throw new e(`gltf-loader-unsupported-feature`,`Expected type FLOAT for NORMAL vertex attribute, but found `+r(U,o.componentType));if(o.componentCount!==3)throw new e(`gltf-loader-unsupported-feature`,`NORMAL vertex attribute must have 3 components, but found `+o.componentCount.toFixed());return Q(O,o)}async getTangentData(t,n,i){if(t.attributes.TANGENT==null)throw new e(`gltf-loader-error`,`No TANGENT vertex data found.`);let a=t.attributes.TANGENT,o=i?this.getDracoAccessor(a,i):await this.getAccessor(a,n);if(o.componentType!==U.FLOAT)throw new e(`gltf-loader-unsupported-feature`,`Expected type FLOAT for TANGENT vertex attribute, but found `+r(U,o.componentType));if(o.componentCount!==4)throw new e(`gltf-loader-unsupported-feature`,`TANGENT vertex attribute must have 4 components, but found `+o.componentCount.toFixed());return Q(k,o)}async getTextureCoordinates(t,n,r){if(t.attributes.TEXCOORD_0==null)throw new e(`gltf-loader-error`,`No TEXCOORD_0 vertex data found.`);let i=t.attributes.TEXCOORD_0,a=r?this.getDracoAccessor(i,r):await this.getAccessor(i,n);if(a.componentCount!==2)throw new e(`gltf-loader-unsupported-feature`,`TEXCOORD_0 vertex attribute must have 2 components, but found `+a.componentCount.toFixed());if(a.componentType===U.FLOAT)return Q(y,a);if(!a.normalized)throw new e(`gltf-loader-unsupported-feature`,`Integer component types are only supported for a normalized accessor for TEXCOORD_0.`);return Z(a)}async getVertexColors(t,n,i){if(t.attributes.COLOR_0==null)throw new e(`gltf-loader-error`,`No COLOR_0 vertex data found.`);let a=t.attributes.COLOR_0,o=i?this.getDracoAccessor(a,i):await this.getAccessor(a,n);if(o.componentCount!==4&&o.componentCount!==3)throw new e(`gltf-loader-unsupported-feature`,`COLOR_0 attribute must have 3 or 4 components, but found `+o.componentCount.toFixed());if(o.componentCount===4){if(o.componentType===U.FLOAT)return Q(k,o);if(o.componentType===U.UNSIGNED_BYTE)return Q(A,o);if(o.componentType===U.UNSIGNED_SHORT)return Q(j,o)}else if(o.componentCount===3){if(o.componentType===U.FLOAT)return Q(O,o);if(o.componentType===U.UNSIGNED_BYTE)return Q(M,o);if(o.componentType===U.UNSIGNED_SHORT)return Q(ee,o)}throw new e(`gltf-loader-unsupported-feature`,`Unsupported component type for COLOR_0 attribute: `+r(U,o.componentType))}hasPositions(e){return e.attributes.POSITION!==void 0}hasNormals(e){return e.attributes.NORMAL!==void 0}hasVertexColors(e){return e.attributes.COLOR_0!==void 0}hasTextureCoordinates(e){return e.attributes.TEXCOORD_0!==void 0}hasTangents(e){return e.attributes.TANGENT!==void 0}async getMaterial(e,t,n,r){let i=e.material?this._materialCache.get(e.material):void 0;if(!i){let a=e.material==null?I():I(this.json.materials[e.material]),o=a.pbrMetallicRoughness,s=this.hasVertexColors(e),c=this.getTexture(o.baseColorTexture,t),l=this.getTexture(a.normalTexture,t),u=n?this.getTexture(a.occlusionTexture,t):void 0,d=r?this.getTexture(a.emissiveTexture,t):void 0,f=n?this.getTexture(o.metallicRoughnessTexture,t):void 0,[p,m,h,g,_]=await Promise.all([c,l,u,d,f]),v=e.material==null?-1:e.material;i={alphaMode:a.alphaMode,alphaCutoff:a.alphaCutoff,color:o.baseColorFactor,doubleSided:!!a.doubleSided,colorTexture:p,normalTexture:m,name:a.name,id:v,occlusionTexture:h,emissiveTexture:g,emissiveFactor:a.emissiveFactor,emissiveStrengthKHR:a.extensions?.KHR_materials_emissive_strength?.emissiveStrength,metallicFactor:o.metallicFactor,roughnessFactor:o.roughnessFactor,metallicRoughnessTexture:_,hasVertexColors:s,ESRI_externalColorMixMode:a.extras.ESRI_externalColorMixMode,colorTextureTransform:o?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:a.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:a.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:a.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:o?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:a.extras.ESRI_receiveAmbientOcclusion,receiveShadows:a.extras.ESRI_receiveShadows,unlit:!!a.extensions?.KHR_materials_unlit}}return i}async decode(t,n){let r=t.extensions?.KHR_draco_mesh_compression;if(!r)return;if(t.indices==null)throw new e(`gltf-loader-error`,`Found Draco compressed primitive without indices.`);let i=this.json.bufferViews[r.bufferView],a=await this.getBuffer(i.buffer,n),o=(await P()).decode(new Uint8Array(a.buffer,a.byteOffset+(i.byteOffset||0),i.byteLength));this._bufferLoaders.delete(i.buffer);let s=new Map([[t.indices,o.indices],[t.attributes.POSITION,o.positions]]);return t.attributes.TEXCOORD_0&&s.set(t.attributes.TEXCOORD_0,o.uvs),t.attributes.NORMAL&&s.set(t.attributes.NORMAL,o.normals),t.attributes.COLOR_0&&s.set(t.attributes.COLOR_0,o.colors),t.attributes.TANGENT&&s.set(t.attributes.TANGENT,o.tangents),this._dracoBuffersSize+=o.buffer.byteLength,{data:o.buffer,accessorInfos:s}}async getTexture(t,r){if(!t)return;if((t.texCoord||0)!==0)throw new e(`gltf-loader-unsupported-feature`,`Only TEXCOORD with index 0 is supported.`);let i=t.index,a=this.json.textures[i],o=L(a.sampler==null?{}:this.json.samplers[a.sampler]),s=$(a),c=this.json.images[s],l=await this._loadTextureImageData(i,a,r);return n(this._textureCache,i,()=>{let t=e=>e===33071||e===33648||e===10497,n=t=>{throw new e(`gltf-loader-error`,`Unexpected TextureSampler WrapMode: ${t}`)};return{data:l,wrapS:t(o.wrapS)?o.wrapS:n(o.wrapS),wrapT:t(o.wrapT)?o.wrapT:n(o.wrapT),minFilter:o.minFilter,name:c.name,id:i}})}getNodeTransform(e){if(e===void 0)return K;let t=this._nodeTransformCache.get(e);if(!t){let n=this.getNodeTransform(this._getNodeParent(e)),r=this.json.nodes[e];r.matrix?t=u(h(),n,r.matrix):r.translation||r.rotation||r.scale?(t=g(n),r.translation&&d(t,t,r.translation),r.rotation&&(J[3]=_(J,r.rotation),f(t,t,J[3],J)),r.scale&&p(t,t,r.scale)):t=g(n),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return c(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){let e=l.parse(this.json.asset.version,`glTF`);q.validate(e)}_checkRequiredExtensionsSupported(){let t=this.json;if(t.extensionsRequired&&!t.extensionsRequired.every(e=>this._supportedExtensions.includes(e)))throw new e(`gltf-loader-unsupported-feature`,`gltf loader was not able to load unsupported feature. Required extensions: `+t.extensionsRequired.join(`, `))}_computeNodeParents(){this.json.nodes.forEach((e,t)=>{e.children&&e.children.forEach(e=>{this._nodeParentMap.set(e,t)})})}async _loadTextureImageData(e,t,n){let r=this._textureLoaders.get(e);if(r)return r;let i=this._createTextureLoader(t,n);return this._textureLoaders.set(e,i),i}async _createTextureLoader(t,n){let r=$(t),i=this.json.images[r];if(i.uri){if(i.uri.endsWith(`.ktx2`)){let e=await this._context.loadBinary(this._resolveUri(i.uri),n);return new B(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(i.uri),n)}if(i.bufferView==null)throw new e(`gltf-loader-unsupported-feature`,`Image bufferView must be defined.`);if(i.mimeType==null)throw new e(`gltf-loader-unsupported-feature`,`Image mimeType must be defined.`);let a=this.json.bufferViews[i.bufferView],o=await this.getBuffer(a.buffer,n);if(a.byteStride!=null)throw new e(`gltf-loader-unsupported-feature`,`byteStride not supported for image buffer`);let s=o.byteOffset+(a.byteOffset||0);return V(new Uint8Array(o.buffer,s,a.byteLength),i.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;let e=await i(Array.from(this._bufferLoaders.values())),t=await i(Array.from(this._textureLoaders.values()));return e.reduce((e,t)=>e+(t?.byteLength??0),0)+this._dracoBuffersSize+t.reduce((e,t)=>e+(t?H(t)?t.data.byteLength:t.width*t.height*4:0),0)}}const K=m(h(),Math.PI/2),q=new l(2,0,`glTF`),J=v(),Y={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},X={[U.BYTE]:1,[U.UNSIGNED_BYTE]:1,[U.SHORT]:2,[U.UNSIGNED_SHORT]:2,[U.HALF_FLOAT]:2,[U.FLOAT]:4,[U.INT]:4,[U.UNSIGNED_INT]:4};function Z(e){switch(e.componentType){case U.BYTE:return new w(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.UNSIGNED_BYTE:return new C(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.SHORT:return new S(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.UNSIGNED_SHORT:return new x(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.UNSIGNED_INT:return new b(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.FLOAT:return new y(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}function Q(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function $(t){if(t.extensions?.KHR_texture_basisu!=null)return t.extensions.KHR_texture_basisu.source;if(t.source!==null)return t.source;throw new e(`gltf-loader-unsupported-feature`,`Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.`)}const te=/\.gltf$/i,ne=/\.glb$/i;export{G as GLTFResource,K as transformGltfToEngine};
|
|
2
|
+
import e from"../../../../core/Error.js";import t from"../../../../core/Logger.js";import{getOrCreateMapValue as n}from"../../../../core/MapUtils.js";import{getKey as r}from"../../../../core/object.js";import{allSettledValues as i}from"../../../../core/promiseUtils.js";import{isDataProtocol as a,dataComponents as o,dataToArrayBuffer as s,makeAbsolute as c}from"../../../../core/urlUtils.js";import l from"../../../../core/Version.js";import{multiply as u,translate as d,rotate as f,scale as p,fromXRotation as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h,clone as g}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{getAxisAngle as _}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{BufferViewVec2f as y,BufferViewVec2u32 as b,BufferViewVec2u16 as x,BufferViewVec2i16 as S,BufferViewVec2u8 as C,BufferViewVec2i8 as w,BufferViewUint32 as T,BufferViewUint16 as E,BufferViewUint8 as D,BufferViewVec3f as O,BufferViewVec4f as k,BufferViewVec4u8 as A,BufferViewVec4u16 as j,BufferViewVec3u8 as M,BufferViewVec3u16 as ee}from"../../../../geometry/support/buffer/BufferView.js";import{m as N}from"../../../../chunks/scalar.js";import{getDracoMeshDecoder as P}from"../../../../libs/dracoMeshDecoder/dracoMeshDecoder.js";import{BinaryStreamReader as F}from"./BinaryStreamReader.js";import{material as I,textureSampler as L}from"./fillDefaults.js";import{splitURI as R}from"./pathUtils.js";import{jsonFromBinaryData as z,EncodedMeshTexture as B,imageFromBinaryData as V,isEncodedMeshTexture as H}from"./resourceUtils.js";import{DataType as U}from"../../../webgl/enums.js";const W={MAGIC:0x46546c67,CHUNK_TYPE_JSON:0x4e4f534a,CHUNK_TYPE_BIN:5130562};class G{constructor(t,n,r,i){if(this._context=t,this.uri=n,this.json=r,this._glbBuffer=i,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._dracoBuffersSize=0,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=[`KHR_texture_basisu`,`KHR_texture_transform`,`KHR_draco_mesh_compression`,`KHR_materials_emissive_strength`,`KHR_materials_unlit`],this._baseUri=R(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),r.scenes==null)throw new e(`gltf-loader-unsupported-feature`,`Scenes must be defined.`);if(r.meshes==null)throw new e(`gltf-loader-unsupported-feature`,`Meshes must be defined`);if(r.nodes==null)throw new e(`gltf-loader-unsupported-feature`,`Nodes must be defined.`);this._computeNodeParents()}static async load(t,n,r){if(a(n)){let e=o(n);if(e&&e.mediaType!==`model/gltf-binary`)try{let r=JSON.parse(e.isBase64?atob(e.data):e.data);return new G(t,n,r)}catch{}let r=s(n);if(G._isGLBData(r))return this._fromGLBData(t,n,r)}if(te.test(n)||r?.expectedType===`gltf`){let e=await t.loadJSON(n,r);return new G(t,n,e)}let i=await t.loadBinary(n,r);if(G._isGLBData(i))return this._fromGLBData(t,n,i);if(ne.test(n)||r?.expectedType===`glb`)throw new e(`gltf-loader-invalid-glb`,`This is not a valid glb file.`);let c=await t.loadJSON(n,r);return new G(t,n,c)}static _isGLBData(e){if(e==null)return!1;let t=new F(e);return t.remainingBytes()>=4&&t.readUint32()===W.MAGIC}static async _fromGLBData(e,t,n){let r=await G._parseGLBData(n);return new G(e,t,r.json,r.binaryData)}static async _parseGLBData(n){let r=new F(n);if(r.remainingBytes()<12)throw new e(`gltf-loader-error`,`glb binary data is insufficiently large.`);let i=r.readUint32(),a=r.readUint32(),o=r.readUint32();if(i!==W.MAGIC)throw new e(`gltf-loader-error`,`Magic first 4 bytes do not fit to expected glb value.`);if(n.byteLength<o)throw new e(`gltf-loader-error`,`glb binary data is smaller than header specifies.`);if(a!==2)throw new e(`gltf-loader-unsupported-feature`,`An unsupported glb container version was detected. Only version 2 is supported.`);let s=0,c,l;for(;r.remainingBytes()>=8;){let n=r.readUint32(),i=r.readUint32();if(s===0){if(i!==W.CHUNK_TYPE_JSON)throw new e(`gltf-loader-error`,`First glb chunk must be JSON.`);if(n<0)throw new e(`gltf-loader-error`,`No JSON data found.`);c=await z(r.readUint8Array(n))}else if(s===1){if(i!==W.CHUNK_TYPE_BIN)throw new e(`gltf-loader-unsupported-feature`,`Second glb chunk expected to be BIN.`);l=r.readUint8Array(n)}else t.getLogger(`esri.views.3d.glTF`).warn(`[Unsupported Feature] More than 2 glb chunks detected. Skipping.`);s+=1}if(!c)throw new e(`gltf-loader-error`,`No glb JSON chunk detected.`);return{json:c,binaryData:l}}async getBuffer(t,n){let r=this.json.buffers[t];if(r.uri==null){if(this._glbBuffer==null)throw new e(`gltf-loader-error`,`glb buffer not present`);return this._glbBuffer}let i=await this._getBufferLoader(t,n);if(i.byteLength!==r.byteLength)throw new e(`gltf-loader-error`,`Buffer byte lengths should match.`);return i}async _getBufferLoader(e,t){let n=this._bufferLoaders.get(e);if(n)return n;let r=this.json.buffers[e].uri,i=this._context.loadBinary(this._resolveUri(r),t).then(e=>new Uint8Array(e));return this._bufferLoaders.set(e,i),i}_validateAccessor(t){if(!this.json.accessors)throw new e(`gltf-loader-unsupported-feature`,`Accessors missing.`);let n=this.json.accessors[t];if(n.type in[`MAT2`,`MAT3`,`MAT4`])throw new e(`gltf-loader-unsupported-feature`,`AttributeType ${n.type} is not supported`);return n}_getComponentInfo(e,t){let n=Y[e.type],r=t?.componentType||e.componentType,i=X[r];return{componentType:r,componentCount:n,componentByteSize:i,denseByteStride:n*i}}getDracoAccessor(e,t){let n=this._validateAccessor(e),r=t.accessorInfos.get(e),{componentType:i,componentCount:a,componentByteSize:o,denseByteStride:s}=this._getComponentInfo(n,r);return{raw:t.data.buffer,byteStride:s,byteOffset:t.data.byteOffset+(r?.byteOffset||0),entryCount:r?.count??n.count,isDenselyPacked:!0,componentCount:a,componentByteSize:o,componentType:i,min:n.min,max:n.max,normalized:!!n.normalized}}async getAccessor(t,n){let r=this._validateAccessor(t);if(r?.bufferView==null)throw new e(`gltf-loader-unsupported-feature`,`Some accessor does not specify a bufferView.`);let{componentCount:i,componentByteSize:a,denseByteStride:o}=this._getComponentInfo(r),s=this.json.bufferViews[r.bufferView],c=await this.getBuffer(s.buffer,n),l=s.byteStride||o;return{raw:c.buffer,byteStride:l,byteOffset:c.byteOffset+(s.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:l===o,componentCount:i,componentByteSize:a,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t,n){if(e.indices==null)return;let r=e.indices,i=n?this.getDracoAccessor(r,n):await this.getAccessor(r,t);if(i.isDenselyPacked)switch(i.componentType){case U.UNSIGNED_BYTE:return new Uint8Array(i.raw,i.byteOffset,i.entryCount);case U.UNSIGNED_SHORT:return new Uint16Array(i.raw,i.byteOffset,i.entryCount);case U.UNSIGNED_INT:return new Uint32Array(i.raw,i.byteOffset,i.entryCount)}else switch(i.componentType){case U.UNSIGNED_BYTE:return N(Q(D,i));case U.UNSIGNED_SHORT:return N(Q(E,i));case U.UNSIGNED_INT:return N(Q(T,i))}}async getPositionData(t,n,i){if(t.attributes.POSITION==null)throw new e(`gltf-loader-unsupported-feature`,`No POSITION vertex data found.`);let a=t.attributes.POSITION,o=i?this.getDracoAccessor(a,i):await this.getAccessor(a,n);if(o.componentType!==U.FLOAT)throw new e(`gltf-loader-unsupported-feature`,`Expected type FLOAT for POSITION vertex attribute, but found `+r(U,o.componentType));if(o.componentCount!==3)throw new e(`gltf-loader-unsupported-feature`,`POSITION vertex attribute must have 3 components, but found `+o.componentCount.toFixed());return Q(O,o)}async getNormalData(t,n,i){if(t.attributes.NORMAL==null)throw new e(`gltf-loader-error`,`No NORMAL vertex data found.`);let a=t.attributes.NORMAL,o=i?this.getDracoAccessor(a,i):await this.getAccessor(a,n);if(o.componentType!==U.FLOAT)throw new e(`gltf-loader-unsupported-feature`,`Expected type FLOAT for NORMAL vertex attribute, but found `+r(U,o.componentType));if(o.componentCount!==3)throw new e(`gltf-loader-unsupported-feature`,`NORMAL vertex attribute must have 3 components, but found `+o.componentCount.toFixed());return Q(O,o)}async getTangentData(t,n,i){if(t.attributes.TANGENT==null)throw new e(`gltf-loader-error`,`No TANGENT vertex data found.`);let a=t.attributes.TANGENT,o=i?this.getDracoAccessor(a,i):await this.getAccessor(a,n);if(o.componentType!==U.FLOAT)throw new e(`gltf-loader-unsupported-feature`,`Expected type FLOAT for TANGENT vertex attribute, but found `+r(U,o.componentType));if(o.componentCount!==4)throw new e(`gltf-loader-unsupported-feature`,`TANGENT vertex attribute must have 4 components, but found `+o.componentCount.toFixed());return Q(k,o)}async getTextureCoordinates(t,n,r){if(t.attributes.TEXCOORD_0==null)throw new e(`gltf-loader-error`,`No TEXCOORD_0 vertex data found.`);let i=t.attributes.TEXCOORD_0,a=r?this.getDracoAccessor(i,r):await this.getAccessor(i,n);if(a.componentCount!==2)throw new e(`gltf-loader-unsupported-feature`,`TEXCOORD_0 vertex attribute must have 2 components, but found `+a.componentCount.toFixed());if(a.componentType===U.FLOAT)return Q(y,a);if(!a.normalized)throw new e(`gltf-loader-unsupported-feature`,`Integer component types are only supported for a normalized accessor for TEXCOORD_0.`);return Z(a)}async getVertexColors(t,n,i){if(t.attributes.COLOR_0==null)throw new e(`gltf-loader-error`,`No COLOR_0 vertex data found.`);let a=t.attributes.COLOR_0,o=i?this.getDracoAccessor(a,i):await this.getAccessor(a,n);if(o.componentCount!==4&&o.componentCount!==3)throw new e(`gltf-loader-unsupported-feature`,`COLOR_0 attribute must have 3 or 4 components, but found `+o.componentCount.toFixed());if(o.componentCount===4){if(o.componentType===U.FLOAT)return Q(k,o);if(o.componentType===U.UNSIGNED_BYTE)return Q(A,o);if(o.componentType===U.UNSIGNED_SHORT)return Q(j,o)}else if(o.componentCount===3){if(o.componentType===U.FLOAT)return Q(O,o);if(o.componentType===U.UNSIGNED_BYTE)return Q(M,o);if(o.componentType===U.UNSIGNED_SHORT)return Q(ee,o)}throw new e(`gltf-loader-unsupported-feature`,`Unsupported component type for COLOR_0 attribute: `+r(U,o.componentType))}hasPositions(e){return e.attributes.POSITION!==void 0}hasNormals(e){return e.attributes.NORMAL!==void 0}hasVertexColors(e){return e.attributes.COLOR_0!==void 0}hasTextureCoordinates(e){return e.attributes.TEXCOORD_0!==void 0}hasTangents(e){return e.attributes.TANGENT!==void 0}async getMaterial(e,t,n,r){let i=e.material?this._materialCache.get(e.material):void 0;if(!i){let a=e.material==null?I():I(this.json.materials[e.material]),o=a.pbrMetallicRoughness,s=this.hasVertexColors(e),c=this.getTexture(o.baseColorTexture,t),l=this.getTexture(a.normalTexture,t),u=n?this.getTexture(a.occlusionTexture,t):void 0,d=r?this.getTexture(a.emissiveTexture,t):void 0,f=n?this.getTexture(o.metallicRoughnessTexture,t):void 0,[p,m,h,g,_]=await Promise.all([c,l,u,d,f]),v=e.material==null?-1:e.material;i={alphaMode:a.alphaMode,alphaCutoff:a.alphaCutoff,color:o.baseColorFactor,doubleSided:!!a.doubleSided,colorTexture:p,normalTexture:m,name:a.name,id:v,occlusionTexture:h,emissiveTexture:g,emissiveFactor:a.emissiveFactor,emissiveStrengthKHR:a.extensions?.KHR_materials_emissive_strength?.emissiveStrength,metallicFactor:o.metallicFactor,roughnessFactor:o.roughnessFactor,metallicRoughnessTexture:_,hasVertexColors:s,ESRI_externalColorMixMode:a.extras.ESRI_externalColorMixMode,colorTextureTransform:o?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:a.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:a.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:a.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:o?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:a.extras.ESRI_receiveAmbientOcclusion,receiveShadows:a.extras.ESRI_receiveShadows,unlit:!!a.extensions?.KHR_materials_unlit}}return i}async decode(t,n){let r=t.extensions?.KHR_draco_mesh_compression;if(!r)return;if(t.indices==null)throw new e(`gltf-loader-error`,`Found Draco compressed primitive without indices.`);let i=this.json.bufferViews[r.bufferView],a=await this.getBuffer(i.buffer,n),o=(await P()).decode(new Uint8Array(a.buffer,a.byteOffset+(i.byteOffset||0),i.byteLength));this._bufferLoaders.delete(i.buffer);let s=new Map([[t.indices,o.indices],[t.attributes.POSITION,o.positions]]);return t.attributes.TEXCOORD_0&&s.set(t.attributes.TEXCOORD_0,o.uvs),t.attributes.NORMAL&&s.set(t.attributes.NORMAL,o.normals),t.attributes.COLOR_0&&s.set(t.attributes.COLOR_0,o.colors),t.attributes.TANGENT&&s.set(t.attributes.TANGENT,o.tangents),this._dracoBuffersSize+=o.buffer.byteLength,{data:o.buffer,accessorInfos:s}}async getTexture(t,r){if(!t)return;if((t.texCoord||0)!==0)throw new e(`gltf-loader-unsupported-feature`,`Only TEXCOORD with index 0 is supported.`);let i=t.index,a=this.json.textures[i],o=L(a.sampler==null?{}:this.json.samplers[a.sampler]),s=$(a),c=this.json.images[s],l=await this._loadTextureImageData(i,a,r);return n(this._textureCache,i,()=>{let t=e=>e===33071||e===33648||e===10497,n=t=>{throw new e(`gltf-loader-error`,`Unexpected TextureSampler WrapMode: ${t}`)};return{data:l,wrapS:t(o.wrapS)?o.wrapS:n(o.wrapS),wrapT:t(o.wrapT)?o.wrapT:n(o.wrapT),minFilter:o.minFilter,name:c.name,id:i}})}getNodeTransform(e){if(e===void 0)return K;let t=this._nodeTransformCache.get(e);if(!t){let n=this.getNodeTransform(this._getNodeParent(e)),r=this.json.nodes[e];r.matrix?t=u(h(),n,r.matrix):r.translation||r.rotation||r.scale?(t=g(n),r.translation&&d(t,t,r.translation),r.rotation&&(J[3]=_(J,r.rotation),f(t,t,J[3],J)),r.scale&&p(t,t,r.scale)):t=g(n),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return c(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){let e=l.parse(this.json.asset.version,`glTF`);q.validate(e)}_checkRequiredExtensionsSupported(){let t=this.json;if(t.extensionsRequired&&!t.extensionsRequired.every(e=>this._supportedExtensions.includes(e)))throw new e(`gltf-loader-unsupported-feature`,`gltf loader was not able to load unsupported feature. Required extensions: `+t.extensionsRequired.join(`, `))}_computeNodeParents(){this.json.nodes.forEach((e,t)=>{e.children&&e.children.forEach(e=>{this._nodeParentMap.set(e,t)})})}async _loadTextureImageData(e,t,n){let r=this._textureLoaders.get(e);if(r)return r;let i=this._createTextureLoader(t,n);return this._textureLoaders.set(e,i),i}async _createTextureLoader(t,n){let r=$(t),i=this.json.images[r];if(i.uri){if(i.uri.endsWith(`.ktx2`)){let e=await this._context.loadBinary(this._resolveUri(i.uri),n);return new B(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(i.uri),n)}if(i.bufferView==null)throw new e(`gltf-loader-unsupported-feature`,`Image bufferView must be defined.`);if(i.mimeType==null)throw new e(`gltf-loader-unsupported-feature`,`Image mimeType must be defined.`);let a=this.json.bufferViews[i.bufferView],o=await this.getBuffer(a.buffer,n);if(a.byteStride!=null)throw new e(`gltf-loader-unsupported-feature`,`byteStride not supported for image buffer`);let s=o.byteOffset+(a.byteOffset||0);return V(new Uint8Array(o.buffer,s,a.byteLength),i.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;let e=await i(Array.from(this._bufferLoaders.values())),t=await i(Array.from(this._textureLoaders.values()));return e.reduce((e,t)=>e+(t?.byteLength??0),0)+this._dracoBuffersSize+t.reduce((e,t)=>e+(t?H(t)?t.data.byteLength:t.width*t.height*4:0),0)}}const K=m(h(),Math.PI/2),q=new l(2,0,`glTF`),J=v(),Y={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},X={[U.BYTE]:1,[U.UNSIGNED_BYTE]:1,[U.SHORT]:2,[U.UNSIGNED_SHORT]:2,[U.HALF_FLOAT]:2,[U.FLOAT]:4,[U.INT]:4,[U.UNSIGNED_INT]:4};function Z(e){switch(e.componentType){case U.BYTE:return new w(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.UNSIGNED_BYTE:return new C(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.SHORT:return new S(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.UNSIGNED_SHORT:return new x(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.UNSIGNED_INT:return new b(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case U.FLOAT:return new y(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}function Q(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function $(t){if(t.extensions?.KHR_texture_basisu!=null)return t.extensions.KHR_texture_basisu.source;if(t.source!==null)return t.source;throw new e(`gltf-loader-unsupported-feature`,`Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.`)}const te=/\.gltf$/i,ne=/\.glb$/i;export{G as GLTFResource,K as transformGltfToEngine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{EventEmitter as e}from"../../../../../core/Evented.js";import t from"../../../../../core/Handles.js";import{makeHandle as n,handlesGroup as r}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as a,initial as o}from"../../../../../core/reactiveUtils.js";import{fromTranslation as s,fromZRotation as c,multiply as l,fromRotation as u,fromScaling as d}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as p}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as m}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as h,sm4d as g}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as _}from"../../Manipulator3D.js";import{RenderObject as v}from"../../RenderObject.js";import{screenToMapXYAtLocation as y}from"../dragEventPipeline3D.js";import{discRadius as b,discTranslateArrowOffset as x,discTranslateArrowSize as S,discHeight as C}from"./config.js";import{Manipulation as w}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as T}from"./moveUtils.js";import{createExtrudedTriangle as E,transformInPlace as D}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as O}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as k,dragAtLocation as A,constrainToMapAxis as j,addScreenDelta as M}from"../../../../interactive/dragEventPipeline.js";class N extends w{constructor(n){super(),this._handles=new t,this._arrowManipulatorInfos=[],this._angle=0,this._scale=1,this._radius=b,this._updateAfterDrag=!1,this.events=new e,this._tool=n.tool,this._view=n.view,this._opaqueMaterial=this._createMaterial(),this._transparentMaterial=this._createMaterial(.5),n.radius!=null&&(this._radius=n.radius),this._createManipulators(),this.forEachManipulator(e=>this._tool.manipulators.add(e))}set orthogonalAvailable(e){this._arrowManipulatorInfos.length>=3&&(this._arrowManipulatorInfos[1].manipulator.available=e,this._arrowManipulatorInfos[3].manipulator.available=e)}destroy(){this._handles=i(this._handles),this.forEachManipulator(e=>{this._tool.manipulators.remove(e),e.destroy()}),this._tool=null,this._view=null,this._arrowManipulatorInfos.length=0}forEachManipulator(e){for(let{manipulator:t}of this._arrowManipulatorInfos)e(t,1)}createManipulatedObjectDragPipeline(e,t,r){if(!t.operations)return n();let i=t.operations.data.spatialReference,a=t.graphic;return T(t,r,n=>this.createDragPipeline((t,r,i,a,o)=>({steps:r,cancel:i}=e(t,r,i,a,o),n(t,r,i)),t.elevationInfo,i,a))}createDragPipeline(e,t,n,i){return r(this._arrowManipulatorInfos.map(({manipulator:r},a)=>k(r,(r,o,s,c,l)=>{e(r,o.next(e=>({...e,manipulatorType:1})).next(A(this._view,r.elevationAlignedLocation)).next(y(this._view,r.elevationAlignedLocation,t,n,i)).next(j(r.location,this.angle+(a+1)*Math.PI*.5)).next(M()),s,c,l)})))}get angle(){return this._angle}set angle(e){this._angle=e,this.dragging?this._updateAfterDrag=!0:this._updateManipulatorTransform()}get displayScale(){return this._scale}set displayScale(e){this._scale=e,this._updateManipulatorTransform()}get radius(){return this._radius}set radius(e){this._radius!==e&&(this._radius=e,this._updateManipulators())}_updateManipulators(){for(let e=0;e<this._arrowManipulatorInfos.length;e++)this._updateArrowManipulator(this._arrowManipulatorInfos[e],e);this._updateManipulatorTransform()}_updateArrowManipulator({manipulator:e,transform:t},n){let r=this._radius/b,i=S*r,a=i*Math.sqrt(3)/2,o=E(this._opaqueMaterial,a,i/2,i/2,C);D(o,s(g.get(),p(h.get(),0,-a/3,0))),e.renderObjects=[new v(o,2),new v(o.instantiate({material:this._transparentMaterial}),1)],e.radius=a/3*2*1.2;let u=c(g.get(),n*Math.PI/2),d=s(g.get(),p(h.get(),0,x*r,0));l(t,u,d)}_createManipulators(){for(let e=0;e<4;e++){let t=this._createArrowManipulator(e);this._arrowManipulatorInfos.push(t)}this._updateManipulatorTransform()}_updateManipulatorTransform(){let e=this.angle,t=u(g.get(),e,m(0,0,1));if(t==null)return;let n=d(g.get(),p(h.get(),this.displayScale,this.displayScale,this.displayScale)),r=l(g.get(),n,t);for(let e of this._arrowManipulatorInfos){let t=l(g.get(),r,e.transform);e.manipulator.modelTransform=t}}_createArrowManipulator(e){let t=new _({view:this._view,autoScaleRenderObjects:!1,worldOriented:!0,focusMultiplier:1,touchMultiplier:1,collisionType:{type:`disc`,direction:m(0,0,1)}}),n={manipulator:t,transform:f()};return this._updateArrowManipulator(n,e),this._handles.add(t.events.on(`drag`,e=>{this._updateAfterDrag&&e.action===`end`&&!this.dragging&&(this._updateManipulatorTransform(),this._updateAfterDrag=!1)})),n}_createMaterial(e=1){let t=new O({cullFace:2,renderOccluded:2,isDecoration:!0});return this._handles.add(a(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),n=>{n[3]*=e,t.setParameters({color:n})},o)),t}get test(){}}export{N as MoveXYAxisManipulation};
|
|
2
|
+
import{EventEmitter as e}from"../../../../../core/Evented.js";import t from"../../../../../core/Handles.js";import{makeHandle as n,handlesGroup as r}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as a,initial as o}from"../../../../../core/reactiveUtils.js";import{fromTranslation as s,fromZRotation as c,multiply as l,fromRotation as u,fromScaling as d}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as p}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as m}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as h,sm4d as g}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as _}from"../../Manipulator3D.js";import{RenderObject as v}from"../../RenderObject.js";import{screenToMapXYAtLocation as y}from"../dragEventPipeline3D.js";import{discRadius as b,discTranslateArrowOffset as x,discTranslateArrowSize as S,discHeight as C}from"./config.js";import{Manipulation as w}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as T}from"./moveUtils.js";import{createExtrudedTriangle as E,transformInPlace as D}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as O}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as k,dragAtLocation as A,constrainToMapAxis as j,addScreenDelta as M}from"../../../../interactive/dragEventPipeline.js";class N extends w{constructor(n){super(),this._handles=new t,this._arrowManipulatorInfos=[],this._angle=0,this._scale=1,this._radius=b,this._updateAfterDrag=!1,this.events=new e,this._tool=n.tool,this._view=n.view,this._opaqueMaterial=this._createMaterial(),this._transparentMaterial=this._createMaterial(.5),n.radius!=null&&(this._radius=n.radius),this._createManipulators(),this.forEachManipulator(e=>this._tool.manipulators.add(e))}set orthogonalAvailable(e){this._arrowManipulatorInfos.length>=3&&(this._arrowManipulatorInfos[1].manipulator.available=e,this._arrowManipulatorInfos[3].manipulator.available=e)}destroy(){this._handles=i(this._handles),this.forEachManipulator(e=>{this._tool.manipulators.remove(e),e.destroy()}),this._tool=null,this._view=null,this._arrowManipulatorInfos.length=0}forEachManipulator(e){for(let{manipulator:t}of this._arrowManipulatorInfos)e(t,1)}createManipulatedObjectDragPipeline(e,t,r){if(!t.operations)return n();let i=t.operations.data.spatialReference,a=t.graphic;return T(t,r,n=>this.createDragPipeline((t,r,i,a,o)=>({steps:r,cancel:i}=e(t,r,i,a,o),n(t,r,i)),t.elevationInfo,i,a))}createDragPipeline(e,t,n,i){return r(this._arrowManipulatorInfos.map(({manipulator:r},a)=>k(r,(r,o,s,c,l)=>{e(r,o.next(e=>({...e,manipulatorType:1})).next(A(this._view,r.elevationAlignedLocation)).next(y(this._view,r.elevationAlignedLocation,t,n,i)).next(j(r.location,this.angle+(a+1)*Math.PI*.5)).next(M()),s,c,l)})))}get angle(){return this._angle}set angle(e){this._angle=e,this.dragging?this._updateAfterDrag=!0:this._updateManipulatorTransform()}get displayScale(){return this._scale}set displayScale(e){this._scale=e,this._updateManipulatorTransform()}get radius(){return this._radius}set radius(e){this._radius!==e&&(this._radius=e,this._updateManipulators())}_updateManipulators(){for(let e=0;e<this._arrowManipulatorInfos.length;e++)this._updateArrowManipulator(this._arrowManipulatorInfos[e],e);this._updateManipulatorTransform()}_updateArrowManipulator({manipulator:e,transform:t},n){let r=this._radius/b,i=S*r,a=i*Math.sqrt(3)/2,o=E(this._opaqueMaterial,a,i/2,i/2,C);D(o,s(g.get(),p(h.get(),0,-a/3,0))),e.renderObjects=[new v(o,2),new v(o.instantiate({material:this._transparentMaterial}),1)],e.radius=a/3*2*1.2;let u=c(g.get(),n*Math.PI/2),d=s(g.get(),p(h.get(),0,x*r,0));l(t,u,d)}_createManipulators(){for(let e=0;e<4;e++){let t=this._createArrowManipulator(e);this._arrowManipulatorInfos.push(t)}this._updateManipulatorTransform()}_updateManipulatorTransform(){let e=this.angle,t=u(g.get(),e,m(0,0,1));if(t==null)return;let n=d(g.get(),p(h.get(),this.displayScale,this.displayScale,this.displayScale)),r=l(g.get(),n,t);for(let e of this._arrowManipulatorInfos){let t=l(g.get(),r,e.transform);e.manipulator.modelTransform=t}}_createArrowManipulator(e){let t=new _({view:this._view,autoScaleRenderObjects:!1,worldOriented:!0,focusMultiplier:1,touchMultiplier:1,collisionType:{type:`disc`,direction:m(0,0,1)}}),n={manipulator:t,transform:f()};return this._updateArrowManipulator(n,e),this._handles.add(t.events.on(`drag`,e=>{this._updateAfterDrag&&e.action===`end`&&!this.dragging&&(this._updateManipulatorTransform(),this._updateAfterDrag=!1)})),n}_createMaterial(e=1){let t=new O({cullFace:2,renderOccluded:2,isDecoration:!0},this._view.state.isGlobal);return this._handles.add(a(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),n=>{n[3]*=e,t.setParameters({color:n})},o)),t}get test(){}}export{N as MoveXYAxisManipulation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../core/Handles.js";import{makeHandle as t}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as n}from"../../../../../core/maybe.js";import{watch as r,initial as i}from"../../../../../core/reactiveUtils.js";import{fromScaling as a}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as s}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as l,sm4d as u}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as d}from"../../Manipulator3D.js";import{RenderObject as f}from"../../RenderObject.js";import{screenToMapXYAtLocation as p}from"../dragEventPipeline3D.js";import{discRadius as m,discCollisionRadius as h,geometrySegments as g,discHeight as _}from"./config.js";import{Manipulation as v}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as y}from"./moveUtils.js";import{SnapToScene as b}from"../snapping/SnapToScene.js";import{createCylinderGeometry as x}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as S}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as C,dragAtLocation as w,addScreenDelta as T}from"../../../../interactive/dragEventPipeline.js";class E extends v{constructor(t){super(),this._handles=new e,this._snapToScene=new b,this._scale=1,this._radius=m,this._view=t.view,this._tool=t.tool,this._discMaterial=this._createMaterial(),this._discMaterialTransparent=this._createMaterial(.5),t.snapToScene!=null&&(this.snapToScene=t.snapToScene),t.radius!=null&&(this._radius=t.radius),this._createManipulator(),this.forEachManipulator(e=>this._tool.manipulators.add(e))}destroy(){this._handles=n(this._handles),this.forEachManipulator(e=>{this._tool.manipulators.remove(e),e.destroy()}),this._tool=null,this._view=null,this._manipulator=null}forEachManipulator(e){e(this._manipulator,1)}get displayScale(){return this._scale}set displayScale(e){this._scale=e,this._updateManipulatorTransform()}get snapToScene(){return this._snapToScene.enabled}set snapToScene(e){this._snapToScene.enabled=e}get radius(){return this._radius}set radius(e){e!==this._radius&&(this._radius=e,this._updateManipulator())}get discManipulator(){return this._manipulator}createManipulatedObjectDragPipeline(e,n,r){if(!n.operations)return t();let i=n.graphic,a=n.elevationInfo,o=n.operations.data.spatialReference;return y(n,r,t=>this.createDragPipeline((n,r,i,a,o)=>({steps:r,cancel:i}=e(n,r,i,a,o),t(n,r,i)),a,o,i))}createDragPipeline(e,t,n,r){let i=this._view;return C(this._manipulator,(a,o,s,c,l)=>{e(a,o.next(w(i,a.elevationAlignedLocation)).next(p(i,a.elevationAlignedLocation,t,n,r)).next(...this._snapToScene.createDragEventPipelineStep(i,t)).next(e=>({...e,manipulatorType:1})).next(T()),s,c,l)})}_updateManipulatorTransform(){let e=a(u.get(),s(l.get(),this.displayScale,this.displayScale,this.displayScale));this._manipulator.modelTransform=e}_createManipulator(){let e=this._view;this._manipulator=new d({view:e,worldSized:!1,autoScaleRenderObjects:!1,focusMultiplier:1,touchMultiplier:1,collisionType:{type:`disc`,direction:c(0,0,1)},worldOriented:!0}),this._updateManipulator()}_updateManipulator(){let e=x(this._discMaterial,_,1,g,c(0,0,1),c(0,0,0));e.transformation=a(o(),c(this._radius,this._radius,this._radius)),this._manipulator.renderObjects=[new f(e,2),new f(e.instantiate({material:this._discMaterialTransparent}),1)],this._manipulator.radius=h*(this._radius/m)}_createMaterial(e=1){let t=new S({cullFace:2,renderOccluded:2,isDecoration:!0});return this._handles.add(r(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),n=>{n[3]*=e,t.setParameters({color:n})},i)),t}get test(){}}export{E as MoveXYDiscManipulation};
|
|
2
|
+
import e from"../../../../../core/Handles.js";import{makeHandle as t}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as n}from"../../../../../core/maybe.js";import{watch as r,initial as i}from"../../../../../core/reactiveUtils.js";import{fromScaling as a}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as s}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as l,sm4d as u}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as d}from"../../Manipulator3D.js";import{RenderObject as f}from"../../RenderObject.js";import{screenToMapXYAtLocation as p}from"../dragEventPipeline3D.js";import{discRadius as m,discCollisionRadius as h,geometrySegments as g,discHeight as _}from"./config.js";import{Manipulation as v}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as y}from"./moveUtils.js";import{SnapToScene as b}from"../snapping/SnapToScene.js";import{createCylinderGeometry as x}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as S}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as C,dragAtLocation as w,addScreenDelta as T}from"../../../../interactive/dragEventPipeline.js";class E extends v{constructor(t){super(),this._handles=new e,this._snapToScene=new b,this._scale=1,this._radius=m,this._view=t.view,this._tool=t.tool,this._discMaterial=this._createMaterial(),this._discMaterialTransparent=this._createMaterial(.5),t.snapToScene!=null&&(this.snapToScene=t.snapToScene),t.radius!=null&&(this._radius=t.radius),this._createManipulator(),this.forEachManipulator(e=>this._tool.manipulators.add(e))}destroy(){this._handles=n(this._handles),this.forEachManipulator(e=>{this._tool.manipulators.remove(e),e.destroy()}),this._tool=null,this._view=null,this._manipulator=null}forEachManipulator(e){e(this._manipulator,1)}get displayScale(){return this._scale}set displayScale(e){this._scale=e,this._updateManipulatorTransform()}get snapToScene(){return this._snapToScene.enabled}set snapToScene(e){this._snapToScene.enabled=e}get radius(){return this._radius}set radius(e){e!==this._radius&&(this._radius=e,this._updateManipulator())}get discManipulator(){return this._manipulator}createManipulatedObjectDragPipeline(e,n,r){if(!n.operations)return t();let i=n.graphic,a=n.elevationInfo,o=n.operations.data.spatialReference;return y(n,r,t=>this.createDragPipeline((n,r,i,a,o)=>({steps:r,cancel:i}=e(n,r,i,a,o),t(n,r,i)),a,o,i))}createDragPipeline(e,t,n,r){let i=this._view;return C(this._manipulator,(a,o,s,c,l)=>{e(a,o.next(w(i,a.elevationAlignedLocation)).next(p(i,a.elevationAlignedLocation,t,n,r)).next(...this._snapToScene.createDragEventPipelineStep(i,t)).next(e=>({...e,manipulatorType:1})).next(T()),s,c,l)})}_updateManipulatorTransform(){let e=a(u.get(),s(l.get(),this.displayScale,this.displayScale,this.displayScale));this._manipulator.modelTransform=e}_createManipulator(){let e=this._view;this._manipulator=new d({view:e,worldSized:!1,autoScaleRenderObjects:!1,focusMultiplier:1,touchMultiplier:1,collisionType:{type:`disc`,direction:c(0,0,1)},worldOriented:!0}),this._updateManipulator()}_updateManipulator(){let e=x(this._discMaterial,_,1,g,c(0,0,1),c(0,0,0));e.transformation=a(o(),c(this._radius,this._radius,this._radius)),this._manipulator.renderObjects=[new f(e,2),new f(e.instantiate({material:this._discMaterialTransparent}),1)],this._manipulator.radius=h*(this._radius/m)}_createMaterial(e=1){let t=new S({cullFace:2,renderOccluded:2,isDecoration:!0},this._view.state.isGlobal);return this._handles.add(r(()=>this._view.effectiveTheme.accentColor.toUnitRGBA(),n=>{n[3]*=e,t.setParameters({color:n})},i)),t}get test(){}}export{E as MoveXYDiscManipulation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{darken as e}from"../../../../../core/colorUtils.js";import{EventEmitter as t}from"../../../../../core/Evented.js";import{makeHandle as n}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{clamp as r}from"../../../../../core/mathUtils.js";import{removeMaybe as i}from"../../../../../core/maybe.js";import{watch as a}from"../../../../../core/reactiveUtils.js";import{translate as o,rotateX as s}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{dist as l,subtract as u,normalize as d,dot as f,cross as p,scale as m}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as h,create as g}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Manipulator3D as _}from"../../Manipulator3D.js";import{createManipulatorMaterial as v}from"../../manipulatorUtils.js";import{RenderObject as y}from"../../RenderObject.js";import{screenToZConstrained as b}from"../dragEventPipeline3D.js";import{Settings as x}from"../settings.js";import{discRadius as S}from"./config.js";import{Manipulation as C}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as w}from"./moveUtils.js";import{createTubeGeometry as T,createConeGeometry as E}from"../../../webgl-engine/lib/GeometryUtil.js";import{createManipulatorDragEventPipeline as D,addScreenDelta as O}from"../../../../interactive/dragEventPipeline.js";class k extends C{constructor(e){super(),this._radius=S,this.events=new t,this._tool=e.tool,this._view=e.view;let n=new x({getTheme:()=>this._view.effectiveTheme});this._settings=n,e.radius!=null&&(this._radius=e.radius);let r=this._view.effectiveTheme.accentColor;this._materials={materialUnfocused:v(A(r,1,.25),1),materialFocused:v(A(r,1,0),1),materialOccludedUnfocused:v(A(r,.7,0),n.zManipulator.renderOccluded),materialOccludedFocused:v(A(r,.85,0),n.zManipulator.renderOccluded)},this._themeHandle=a(()=>this._view.effectiveTheme.accentColor,e=>{let t=A(e,1,.25),n=A(e,1,0),r=A(e,.7,0),i=A(e,.85,0),{materialUnfocused:a,materialFocused:o,materialOccludedUnfocused:s,materialOccludedFocused:c}=this._materials;a.setParameters({color:t}),o.setParameters({color:n}),s.setParameters({color:r}),c.setParameters({color:i})}),this._createManipulator(),this.forEachManipulator(e=>this._tool.manipulators.add(e))}destroy(){this._themeHandle=i(this._themeHandle),this._manipulator.applyObjectTransform=P,this.forEachManipulator(e=>{this._tool.manipulators.remove(e),e.destroy()})}forEachManipulator(e){e(this._manipulator,0)}createManipulatedObjectDragPipeline(e,t,r){if(!t.operations)return n();let i=t.operations.data.spatialReference;return w(t,r,t=>this.createDragPipeline((n,r,i,a,o)=>({steps:r,cancel:i}=e(n,r,i,a,o),t(n,r,i)),i))}createDragPipeline(e,t){let n=this._view;return D(this._manipulator,(r,i,a,o,s)=>{e(r,i.next(e=>({...e,manipulatorType:0})).next(b(n,r.renderLocation,t)).next(O()),a,o,s)})}get radius(){return this._radius}set radius(e){e!==this._radius&&(this._radius=e,this._updateManipulator())}_updateManipulator(){let e=this._settings,t=this._radius/S,n=e.zManipulator.height*t,r=e.zManipulator.coneHeight*t,i=e.zManipulator.coneWidth*t,a=e.zManipulator.width*t,l=[h(0,0,0),h(0,0,n)],u=[h(0,0,0),h(0,0,n+r)],d=c();o(d,d,[0,0,n]),s(d,d,Math.PI/2);let{materialUnfocused:f,materialFocused:p,materialOccludedUnfocused:m,materialOccludedFocused:g}=this._materials,_=T(f,l,a/2,16,!1),v=E(f,r,i/2,16,!1);v.transformation=d,this._manipulator.renderObjects=[new y(v,1),new y(_,1),new y(v.instantiate({material:p}),2),new y(_.instantiate({material:p}),2),new y(v.instantiate({material:m}),1),new y(_.instantiate({material:m}),1),new y(v.instantiate({material:g}),2),new y(_.instantiate({material:g}),2)],this._manipulator.radius=a/2+2,this._manipulator.collisionType={type:`line`,paths:[u]}}_createManipulator(){let e=this._view,t=new _({view:e,autoScaleRenderObjects:!1,worldSized:!1,selectable:!1,cursor:`ns-resize`,elevationInfo:this.elevationInfo,worldOriented:!0,collisionPriority:1.6});t.applyObjectTransform=t=>{let n=e.state.camera,i=j;e.renderCoordsHelper.toRenderCoords(this._manipulator.elevationAlignedLocation,i);let a=l(n.eye,i),o=n.computeRenderPixelSizeAtDistance(a),s=u(M,i,n.eye);d(s,s);let c=N;e.renderCoordsHelper.worldUpAtPosition(j,c);let h=Math.abs(f(s,c)),g=p(M,s,c),_=p(M,g,c),v=r(h,.01,1),y=1-Math.sqrt(1-v*v)/v/n.fullWidth,b=this._settings,x=this._radius/S,C=b.zManipulator.width*x;m(_,d(_,_),(1/y-1)*a+o*C),t[12]-=M[0],t[13]-=M[1],t[14]-=M[2]},this._manipulator=t,this._updateManipulator()}get test(){}}function A(t,n,r){let i=e(t,r);return i.a*=n,i.toUnitRGBA()}const j=g(),M=g(),N=g(),P=()=>{};export{k as MoveZManipulation};
|
|
2
|
+
import{darken as e}from"../../../../../core/colorUtils.js";import{EventEmitter as t}from"../../../../../core/Evented.js";import{makeHandle as n}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{clamp as r}from"../../../../../core/mathUtils.js";import{removeMaybe as i}from"../../../../../core/maybe.js";import{watch as a}from"../../../../../core/reactiveUtils.js";import{translate as o,rotateX as s}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{dist as l,subtract as u,normalize as d,dot as f,cross as p,scale as m}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as h,create as g}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Manipulator3D as _}from"../../Manipulator3D.js";import{createManipulatorMaterial as v}from"../../manipulatorUtils.js";import{RenderObject as y}from"../../RenderObject.js";import{screenToZConstrained as b}from"../dragEventPipeline3D.js";import{Settings as x}from"../settings.js";import{discRadius as S}from"./config.js";import{Manipulation as C}from"./Manipulation.js";import{createManipulatedMoveDragPipeline as w}from"./moveUtils.js";import{createTubeGeometry as T,createConeGeometry as E}from"../../../webgl-engine/lib/GeometryUtil.js";import{createManipulatorDragEventPipeline as D,addScreenDelta as O}from"../../../../interactive/dragEventPipeline.js";class k extends C{constructor(e){super(),this._radius=S,this.events=new t,this._tool=e.tool,this._view=e.view;let n=new x({getTheme:()=>this._view.effectiveTheme});this._settings=n,e.radius!=null&&(this._radius=e.radius);let r=this._view.effectiveTheme.accentColor,i=e.view.state.isGlobal;this._materials={materialUnfocused:v(i,A(r,1,.25),1),materialFocused:v(i,A(r,1,0),1),materialOccludedUnfocused:v(i,A(r,.7,0),n.zManipulator.renderOccluded),materialOccludedFocused:v(i,A(r,.85,0),n.zManipulator.renderOccluded)},this._themeHandle=a(()=>this._view.effectiveTheme.accentColor,e=>{let t=A(e,1,.25),n=A(e,1,0),r=A(e,.7,0),i=A(e,.85,0),{materialUnfocused:a,materialFocused:o,materialOccludedUnfocused:s,materialOccludedFocused:c}=this._materials;a.setParameters({color:t}),o.setParameters({color:n}),s.setParameters({color:r}),c.setParameters({color:i})}),this._createManipulator(),this.forEachManipulator(e=>this._tool.manipulators.add(e))}destroy(){this._themeHandle=i(this._themeHandle),this._manipulator.applyObjectTransform=P,this.forEachManipulator(e=>{this._tool.manipulators.remove(e),e.destroy()})}forEachManipulator(e){e(this._manipulator,0)}createManipulatedObjectDragPipeline(e,t,r){if(!t.operations)return n();let i=t.operations.data.spatialReference;return w(t,r,t=>this.createDragPipeline((n,r,i,a,o)=>({steps:r,cancel:i}=e(n,r,i,a,o),t(n,r,i)),i))}createDragPipeline(e,t){let n=this._view;return D(this._manipulator,(r,i,a,o,s)=>{e(r,i.next(e=>({...e,manipulatorType:0})).next(b(n,r.renderLocation,t)).next(O()),a,o,s)})}get radius(){return this._radius}set radius(e){e!==this._radius&&(this._radius=e,this._updateManipulator())}_updateManipulator(){let e=this._settings,t=this._radius/S,n=e.zManipulator.height*t,r=e.zManipulator.coneHeight*t,i=e.zManipulator.coneWidth*t,a=e.zManipulator.width*t,l=[h(0,0,0),h(0,0,n)],u=[h(0,0,0),h(0,0,n+r)],d=c();o(d,d,[0,0,n]),s(d,d,Math.PI/2);let{materialUnfocused:f,materialFocused:p,materialOccludedUnfocused:m,materialOccludedFocused:g}=this._materials,_=T(f,l,a/2,16,!1),v=E(f,r,i/2,16,!1);v.transformation=d,this._manipulator.renderObjects=[new y(v,1),new y(_,1),new y(v.instantiate({material:p}),2),new y(_.instantiate({material:p}),2),new y(v.instantiate({material:m}),1),new y(_.instantiate({material:m}),1),new y(v.instantiate({material:g}),2),new y(_.instantiate({material:g}),2)],this._manipulator.radius=a/2+2,this._manipulator.collisionType={type:`line`,paths:[u]}}_createManipulator(){let e=this._view,t=new _({view:e,autoScaleRenderObjects:!1,worldSized:!1,selectable:!1,cursor:`ns-resize`,elevationInfo:this.elevationInfo,worldOriented:!0,collisionPriority:1.6});t.applyObjectTransform=t=>{let n=e.state.camera,i=j;e.renderCoordsHelper.toRenderCoords(this._manipulator.elevationAlignedLocation,i);let a=l(n.eye,i),o=n.computeRenderPixelSizeAtDistance(a),s=u(M,i,n.eye);d(s,s);let c=N;e.renderCoordsHelper.worldUpAtPosition(j,c);let h=Math.abs(f(s,c)),g=p(M,s,c),_=p(M,g,c),v=r(h,.01,1),y=1-Math.sqrt(1-v*v)/v/n.fullWidth,b=this._settings,x=this._radius/S,C=b.zManipulator.width*x;m(_,d(_,_),(1/y-1)*a+o*C),t[12]-=M[0],t[13]-=M[1],t[14]-=M[2]},this._manipulator=t,this._updateManipulator()}get test(){}}function A(t,n,r){let i=e(t,r);return i.a*=n,i.toUnitRGBA()}const j=g(),M=g(),N=g(),P=()=>{};export{k as MoveZManipulation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
function e(e){if(e.graphic&&e.graphic.layer?.type!==`graphics`)return 1;let t=e.operations?.data.type;if(!t)return 3;switch(t){case`polygon`:case`point`:case`polyline`:case`mesh`:break;
|
|
2
|
+
function e(e){if(e.graphic&&e.graphic.layer?.type!==`graphics`)return 1;let t=e.operations?.data.type;if(!t)return 3;switch(t){case`polygon`:case`point`:case`polyline`:case`mesh`:break;default:return 3}return 0}export{e as isSupportedObject};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{removeUnordered as n}from"../../../../../core/arrayUtils.js";import{EventEmitter as r}from"../../../../../core/Evented.js";import i from"../../../../../core/Handles.js";import{makeHandle as a,handlesGroup as o,destroyHandle as s}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as c,removeMaybe as l}from"../../../../../core/maybe.js";import{initial as u,on as d,watch as f,syncAndInitial as p,when as m,sync as h}from"../../../../../core/reactiveUtils.js";import{property as g,subclass as _}from"../../../../../core/accessorSupport/decorators.js";import{IDENTITY as v}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{length as y,subtract as b,lerp as x,set as ee,add as te,scale as ne}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as re,create as ie}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as ae}from"../../../../../core/support/UpdatingHandles.js";import oe from"../../../../../geometry/Point.js";import se from"../../../../../geometry/Polyline.js";import{projectPoint as ce}from"../../../../../geometry/projectionUtils.js";import le from"../../../../../geometry/SpatialReference.js";import{makeDehydratedPoint as S}from"../../../../../layers/graphics/dehydratedPoint.js";import{getZForElevationMode as ue}from"../../../../../support/elevationInfoUtils.js";import{isVolumetricSymbol as de}from"../../../../../symbols/support/utils.js";import{Manipulator3D as C}from"../../Manipulator3D.js";import{createManipulatorMaterials as w,createSphereGeometryAsOffsets as T,placeAtObject as fe,screenSizeManipulatorSettings as pe}from"../../manipulatorUtils.js";import{RenderObject as E}from"../../RenderObject.js";import{SegmentLabels3D as me}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as he}from"../../SnappingVisualizer3D.js";import{screenToMapXYAtLocation as D,screenToRenderPlaneFromEvent as ge,convertToMapCoordinates as _e}from"../dragEventPipeline3D.js";import{orientation as ve}from"../geometryUtils.js";import{canMoveZOperations as O}from"../manipulatorUtils.js";import{Settings as ye}from"../settings.js";import{createVisualElements as be}from"../visualElementUtils.js";import{discRadiusSmall as xe}from"../manipulations/config.js";import{MoveManipulation as k}from"../manipulations/MoveManipulation.js";import{MoveXYObjectManipulation as Se}from"../manipulations/MoveXYObjectManipulation.js";import{getMapPointAtEdgeOffsetManipulatorElevation as A,createEdgeOffsetIntersectionPlane as j,createEdgeOffsetOperation as M,edgeOffsetRotationMatrix as Ce,screenEdgeLengthSquared as we,getDistanceInGeometrySR as Te}from"./edgeOffsetUtils.js";import{createTooltipInfos as Ee,connectTooltipToManipulatedObject as De,getUpdatedTranslateObjectTooltipInfo as Oe,getUpdatedEdgeOffsetTooltipInfo as N}from"./reshapeTooltipUtils3D.js";import{OutlineVisualElement as P}from"../../visualElements/OutlineVisualElement.js";import{createElevationUpdateHandle as ke}from"../../../support/elevationUpdateUtils.js";import{createExtrudedTriangle as F}from"../../../webgl-engine/lib/GeometryUtil.js";import{mouseButtons as I}from"../../../../input/mouseButtons.js";import{sceneSnappingAtProjectedLocation as Ae,addMapDelta as L,createManipulatorDragEventPipeline as R,dragAtLocation as z,addScreenDelta as je,sceneSnappingAtLocation as Me}from"../../../../interactive/dragEventPipeline.js";import{tooltipKeys as Ne}from"../../../../interactive/keybindings.js";import{SnappingContext as B}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as V}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as Pe,enterInputModeIfAvailable as H}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{GeometryWorkerHandle as Fe}from"../../../../support/GeometryWorkerHandle.js";const U=Symbol(),W=Symbol(),G=Symbol(),Ie=Symbol(),K=Symbol();let q=class extends t{get _movingManipulatorsHidden(){return this.hasHandles(K)}get _operations(){return this.object.operations}constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new i,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=0,this._pendingEdgeOffsetInfo=null,this._updatingHandles=new ae,this._recreatingManipulators=!1,this._settings=new ye({getTheme:()=>this.view.effectiveTheme}),this.events=new r,this.activeTooltipInfo=null,this._measurementWorker=new Fe({preloadGeodetic:!0}),this._vertexLaserLineVisualElement=null,this._tooltipCallbacks={onBeforeReshape:()=>this.tool.endDrag(),onReshapeStart:()=>this._updateEventState(2),onReshape:()=>this.events.emit(`reshape`,{type:`reshape`,object:this.object}),onReshapeStop:()=>this._updateEventState(0,{forceEnd:!0}),onMoveStart:()=>this._updateEventState(1),onMove:()=>this.events.emit(`move`,{type:`move`,object:this.object,dx:0,dy:0}),onMoveStop:()=>this._updateEventState(0,{forceEnd:!0})}}initialize(){let{view:e}=this,t=this._settings.manipulators,n=t.vertex;this.tooltipInfos=Ee(this._toolOptions,e),this._vertexManipulatorMaterials=w({color:n.color.toUnitRGBA(),outlineColor:n.outlineColor.toUnitRGBA(),focusedOutlineColor:n.focusedOutlineColor.toUnitRGBA(),screenSize:n,renderOccluded:n.renderOccluded});let r=t.edge;this._edgeManipulatorMaterials=w({color:r.color.toUnitRGBA(),outlineColor:r.outlineColor.toUnitRGBA(),screenSize:r,renderOccluded:r.renderOccluded});let i=t.edgeOffset;this._edgeOffsetManipulatorMaterials=w({color:i.color.toUnitRGBA(),focusedColor:i.focusedColor.toUnitRGBA(),renderOccluded:i.renderOccluded,shaded:!1});let a=t.selected;this._selectedManipulatorMaterials=w({color:a.color.toUnitRGBA(),outlineColor:a.outlineColor.toUnitRGBA(),focusedOutlineColor:a.focusedOutlineColor.toUnitRGBA(),screenSize:a,renderOccluded:a.renderOccluded}),this.tooltip=Pe(()=>({view:e,options:this._toolOptions.tooltips})),this.addHandles([this._updatingHandles.add(()=>{let e=this._settings.manipulators;return{vertexSettings:e.vertex,edgeSettings:e.edge,edgeOffsetSettings:e.edgeOffset,selectedSettings:e.selected}},({vertexSettings:e,edgeSettings:t,edgeOffsetSettings:n,selectedSettings:r})=>{e.applyColor(this._vertexManipulatorMaterials.material),e.applyOutline(this._vertexManipulatorMaterials.outlineMaterial),e.applyFocusedOutline(this._vertexManipulatorMaterials.focusedMaterial),t.applyColor(this._edgeManipulatorMaterials.material),t.applyOutline(this._edgeManipulatorMaterials.outlineMaterial),n.applyColor(this._edgeOffsetManipulatorMaterials.material),n.applyFocused(this._edgeOffsetManipulatorMaterials.focusedMaterial),r.applyColor(this._selectedManipulatorMaterials.material),r.applyOutline(this._selectedManipulatorMaterials.outlineMaterial),r.applyFocusedOutline(this._selectedManipulatorMaterials.focusedMaterial)}),this._updatingHandles.add(()=>this.object.visible,e=>{for(let t of this._manipulatorInfos)t.manipulator.available=e,Y(t)&&(t.edgeManipulator.available=e)}),this._updatingHandles.add(()=>this._numGrabbing+this._numDragging===0,e=>this._toggleAutoHideManipulators(e)),this._updatingHandles.add(()=>({labels:this._segmentLabels,enabled:this._toolOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset}),({labels:e,enabled:t,edgeOffsetEnabled:n})=>{e!=null&&(e.visible=t,e.edgeDistance=n?`far`:`default`)},u),De(this.tooltip,this.object,()=>this._tooltipsContext,this._updatingHandles),this._updatingHandles.add(()=>this.tooltip.mode,(e,t)=>{t===`input`&&e!==`input`&&this._resetTooltip()}),d(()=>this._operations,`vertex-update`,e=>this._updateManipulatorPositions(e.vertices),{onListenerAdd:()=>this._recreateManipulators()}),d(()=>this._operations?.data,`change`,e=>{(e.operation===`undo`||e.operation===`redo`)&&this._recreateManipulators()})])}destroy(){this._removeManipulators(),this._updatingHandles.destroy(),this._segmentLabels=c(this._segmentLabels),this.tooltip=c(this.tooltip),this._measurementWorker.destroy()}get updating(){return this._updatingHandles.updating||!!this._segmentLabels?.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _toolOptions(){return this.tool.toolOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}enterInputModeIfAvailable(e){return e.type!==`key-down`||e.key!==Ne.enterInputMode?!1:this.activeTooltipInfo?.type===`reshape-edge-offset`?this._enterInputModeDuringEdgeOffset(e):H(e,this.tooltip)?(this.tool.endDrag(),!0):!1}removeSelectedVertices(){let e=this._manipulatorInfos.filter(e=>e.manipulator.selected&&e.type===`vertex`);return this._removeVertices(e),e.length}onManipulatorSelectionChanged(){this.events.emit(`manipulators-changed`)}_removeManipulators(){this._manipulatorHandles.removeAll(),this.removeHandles(G),this.removeHandles(W),this.removeHandles(K),this._moveManipulation=c(this._moveManipulation),this._objectMoveManipulation=c(this._objectMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._pendingEdgeOffsetInfo&&this._exitEdgeOffsetInputMode()}_createManipulators(e){if(this._operations==null)return;let t=this.object.elevationInfo;for(let{vertices:n,segments:r,index:i}of this._operations.data.parts){let a=e?.byPartIndex.get(i);for(let e of n){let n=a?.has(e.index);this._createVertexOrEdgeManipulator(e,t,n)}for(let e of r)e.type===`line`&&this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}recordUndo(e){this._operations?.recordUndo(e,!0)}get canRedo(){return this._operations?.canRedo??!1}get canUndo(){return this._operations?.canUndo??!1}redo(){return this._operations?.redo()}undo(){return this.events.emit(`undo`),this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){if(this._recreatingManipulators=!0,this._removeManipulators(),this._resetTooltip(),this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=c(this._segmentLabels)),this._createManipulators(),!this._segmentLabels&&this._operations){let e=this._toolOptions.labels;this._segmentLabels=new me({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:e},visible:e.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(e,t){if(t.action===`end`)return t;let n=0,r=[],i=e===1&&this._someVerticesSelected;for(let e of this._manipulatorInfos)e.type===`vertex`&&(e.manipulator.grabbing||i&&!e.manipulator.selected||r.push(e),n++);if(r.length===n){if(i||this._hideReshapeControls(),this._moveVertices(r,t),this._updateEventState(1),this.destroyed)return t;this.events.emit(`move`,{type:`move`,dx:t.screenDeltaX,dy:t.screenDeltaY,object:this.object})}else{if(this._moveVertices(r,t),this._updateEventState(2),this.destroyed)return t;this.events.emit(`reshape`,{type:`reshape`,object:this.object})}return t}_hideReshapeControls(){this._movingManipulatorsHidden||this.addHandles([this._hideReshapeManipulators(),this._moveManipulation.hideManipulatorsExceptGrabbedGroup(),a(()=>this._forEachVertex(e=>this._updateManipulatorPosition(e)))],K)}_showReshapeControls(){this.removeHandles(K)}_shouldHideReshapeControlsOnGrab(e){return this._objectMoveManipulation.hasManipulator(e)||this._moveManipulation.hasManipulator(e)&&!this._someVerticesSelected}get _canShowReshapeControls(){return!this._objectMoveManipulation.grabbing&&(!this._moveManipulation.grabbing||this._someVerticesSelected)}_hideManipulatorsForEdgeOffset(e){let t=this._manipulatorInfos.filter(Y).find(t=>t.manipulator===e||t.edgeManipulator===e);t!=null&&(this.removeHandles(W),this.addHandles([this._moveManipulation.hideManipulators(),this._hideReshapeManipulators(t)],W))}_hideReshapeManipulators(e){return o(this._manipulatorInfos.flatMap(t=>t===e?null:[t.manipulator.disableDisplay(),Y(t)?t.edgeManipulator.disableDisplay():null]))}_toggleAutoHideManipulators(e){this.autoHideManipulators&&(e?this.removeHandles(U):this.tool.manipulators.forEach(({manipulator:e})=>{let t=e.disableDisplay?.();t&&this.addHandles(t,U)}))}_isMultiVertexSelection(){return this._manipulatorInfos.reduce((e,t)=>t.type===`vertex`&&t.manipulator.selected?e+1:e,0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(2),this.destroyed)return;let{mapDeltaX:t,mapDeltaY:n,mapDeltaZ:r}=e;if(!t&&!n&&!r)return;let i=[];this._forEachVertex(t=>{let{selected:n,grabbing:r}=t.manipulator;(n&&!r||t===e.info)&&i.push(t)}),this._moveVertices(i,e,1),this.events.emit(`reshape`,{type:`reshape`,object:this.object})}_updateEventState(e,t={}){if(e===this._reshapeEventState)return!1;switch(e){case 0:if(!t.forceEnd&&(this._numGrabbing!==0||this._numDragging!==0))return!1;switch(this._reshapeEventState){case 1:this._showReshapeControls(),this.events.emit(`move`,{type:`move-stop`,dx:0,dy:0,object:this.object});break;case 2:this.events.emit(`reshape`,{type:`reshape-stop`,object:this.object})}break;case 1:switch(this._reshapeEventState){case 0:this.events.emit(`move`,{type:`move-start`,dx:0,dy:0,object:this.object});break;case 2:this.events.emit(`reshape`,{type:`reshape-stop`,object:this.object}),this.destroyed||this.events.emit(`move`,{type:`move-start`,dx:0,dy:0,object:this.object})}break;case 2:switch(this._reshapeEventState){case 0:this.events.emit(`reshape`,{type:`reshape-start`,object:this.object});break;case 1:this._showReshapeControls(),this.events.emit(`move`,{type:`move-stop`,dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit(`reshape`,{type:`reshape-start`,object:this.object})}}if(this.destroyed)return!1;let n=this._reshapeEventState!==e;return this._reshapeEventState=e,n}_createObjectMoveManipulation(){let{tool:e,view:t,object:n,_operations:r}=this;if(r){if(this._objectMoveManipulation=new Se({tool:e,view:t,object:n}),this.enableMoveObject){let e=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline((t,n,i)=>{n.next(e=>this._trackNumDragging(e)).next(t=>(t.action===`start`&&(e=r.createUndoGroup()),t)).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(t=>{t.action===`end`&&(this._showReshapeControls(),this._resetTooltip(),e=l(e))}),i.next(()=>this._onDragCancel(!0,()=>e=l(e)))})),this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1)))}else this._objectMoveManipulation.forEachManipulator(e=>{e.grabbable=!1,e.cursor=null});this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(e.events.on(`immediate-click`,e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit(`immediate-click`,{...e,object:this.object}),e.stopPropagation()})))}}_createMoveManipulation(e){let{object:t,tool:n,view:r,_operations:i}=this;if(!i)return;this._moveManipulation=new k({tool:n,view:r,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&O(t.operations,t.elevationInfo),snapToScene:!1,radius:k.radiusForSymbol(t.graphic?.symbol)}),this._moveManipulation.forEachManipulator(e=>this.addHandles([e.events.on(`immediate-click`,t=>{!this._moveManipulation.zManipulation.hasManipulator(e)&&!this._manipulatorInfos.some(e=>e.manipulator.selected)&&this.events.emit(`immediate-click`,{...t,object:this.object}),t.stopPropagation()}),this._watchAndUpdateGrabState(e,!1)]));let a=e=>t=>{this.addHandles([t.events.on(`focus-changed`,({action:t})=>{t===`focus`?this._updateTranslateTooltip(e):this._resetTooltip()})])};this._moveManipulation.xyManipulation.forEachManipulator(a(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(a(1)),this._moveManipulation.zManipulation.forEachManipulator(a(2)),this._moveManipulation.elevationInfo={mode:`absolute-height`,offset:0};let o=i.data.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline((r,a,o,s,c)=>{let{snappingStep:l,cancelSnapping:u}=V({predicate:e=>!!e.info,snappingManager:n.snappingManager,snappingContext:new B({editGeometryOperations:i,elevationInfo:e,pointer:c,excludeFeature:t.graphic,visualizer:new he}),updatingHandles:this._updatingHandles,useZ:!1});return s=s.next(e=>(this._onDragCancel(),e)).next(u),o=o.next(e=>this._trackNumDragging(e)).next(e=>{let t=this._manipulatorInfos.filter(e=>e.type===`vertex`&&e.manipulator.selected);return e.manipulatorType===1&&t.length===1?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e}).next(Ae(this.view,e)).next(...l).next(L()).next(e=>this._perObjectManipulatorDragAction(1,e)).next(e=>(e.action===`end`&&this._showReshapeControls(),this._updateTranslateTooltip(r,e),e)),{steps:o,cancel:s}},e,o,t.graphic),this._updatingHandles.add(()=>t.visible,()=>this._updateMoveManipulationPosition(),u),t.on(`committed`,()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()}),this._updatingHandles.add(()=>t.isDraped,e=>{this._updateMoveManipulationPosition(),this.removeHandles(Ie),e&&this.addHandles(ke({view:this.view,geometry:()=>t.graphic?.geometry,elevationInfo:t.elevationInfo,onElevationChanges:()=>this._updateMoveManipulationPosition()}),Ie)},u)])}_createVisualElements(){let{object:e,view:t}=this,n=be({view:t,object:e,forEachManipulator:e=>{if(!(this.destroyed||this._recreatingManipulators)){this._objectMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(let t of this._manipulatorInfos)e(t.manipulator,1)}},onManipulatorsChanged:e=>this.events.on(`manipulators-changed`,e)});n!=null&&(this._outlineVisualElement=n.visualElement instanceof P?n.visualElement:null);let r=this._outlineVisualElement;if(r!=null){let t=()=>{e.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(d(()=>r.events,`attachment-origin-changed`,t,{onListenerAdd:t}))}this._manipulatorHandles.add(n)}_createEdgeOffsetManipulator(e,t=this.object.elevationInfo){let n=this.view,r=this._operations;if(e.part.vertices.length<=2||!r)return null;let i=r.data.spatialReference,a=this._settings.manipulators.edgeOffset,s=a.size/2,c=s+a.collisionPadding,l=s/c,u=l/2,d=l*Math.sqrt(3)/2,{height:f,offset:p}=a,{material:m,focusedMaterial:h}=this._edgeOffsetManipulatorMaterials;if(!this._edgeOffsetManipulatorGeometryInside){let e=F(m,d,u,u,f,p);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){let e=F(m,-d,u,u,f,-p);this._edgeOffsetManipulatorGeometryOutside=e}let g=[new E(this._edgeOffsetManipulatorGeometryInside.instantiate(),1),new E(this._edgeOffsetManipulatorGeometryInside.instantiate({material:h}),2),new E(this._edgeOffsetManipulatorGeometryOutside.instantiate(),1),new E(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:h}),2)],_=new C({view:n,renderObjects:g,elevationInfo:t.mode===`on-the-ground`&&!de(this.object.graphic?.symbol)?t:{mode:`absolute-height`,offset:0},worldOriented:!1,focusMultiplier:1,radius:c,available:this.object.visible,collisionType:{type:`disc`,direction:re(0,0,1)},collisionPriority:1,metadata:{deleting:!1},location:J(i)}),v=new C({view:n,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?`move`:`default`,metadata:{deleting:!1},location:J(i)}),y={manipulator:_,handle:e,locationUpdateHandle:null,type:`edge`,selectedIndex:0,edgeManipulator:v,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(y,a.minSquaredEdgeLength);let b=()=>this._updateEdgeOffsetManipulator(y);b(),y.locationUpdateHandle=o([e.leftVertex,e.rightVertex].map(e=>this._getManipulatorInfoFromHandle(e)?.manipulator.events.on(`location-update`,b)));let x=e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit(`immediate-click`,{...e,object:this.object}),e.stopPropagation()};return this._manipulatorHandles.add([y.locationUpdateHandle,this._watchAndUpdateGrabState(_,!0),this._watchAndUpdateGrabState(v,!0),R(_,this._createEdgeOffsetPipeline(y,t,r)),R(v,this._createEdgePipeline(y,t,r)),v.events.on(`immediate-click`,x),_.events.on(`immediate-click`,x),_.events.on(`focus-changed`,()=>this._resetTooltip()),_.events.on(`grab-changed`,({screenPoint:e,action:t})=>{y.grabMapPoint=t===`start`?A(e,this.view,this.object,y):null})],_),this._manipulatorInfos.push(y),this.manipulators.addMany([_,v]),this.events.emit(`manipulators-changed`),y}_autoHideEdgeOffsetManipulator(e,t){let n=e.manipulator,r=e.edgeManipulator,i=()=>{e.visibilityHandle=l(e.visibilityHandle);let i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),s=this._getManipulatorInfoFromHandle(e.handle.rightVertex),c=i!=null&&s!=null&&we(i.manipulator.renderLocation,s.manipulator.renderLocation,this.view.state.camera)<t;(!n.focused&&!r.focused||c)&&(n.grabbable=!c,r.grabbable=!c,e.visibilityHandle=o([n.disableDisplay(),a(()=>{n.grabbable=!0,r.grabbable=this.enableMoveObject})]))};this._manipulatorHandles.add([n.events.on(`focus-changed`,i),r.events.on(`focus-changed`,i),a(()=>{l(e.visibilityHandle),r.metadata.deleting=!0,this.manipulators.remove(r)})],n),i()}_updateEdgeOffsetManipulator(e){if(!this._operations)return;this._updateManipulatorPosition(e);let{coordinateHelper:t}=this._operations.data,n=j(this.view,e.manipulator.elevationAlignedLocation,M(t,e.handle,e.manipulator.elevationInfo)),r=this._getManipulatorInfoFromHandle(e.handle.leftVertex),i=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(r==null||i==null)return;let a=r.manipulator.renderLocation,o=i.manipulator.renderLocation,s=n==null?v:Ce(n,a,o);e.manipulator.modelTransform=s,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=s;let c=y(b(Z,a,o))/2;e.edgeManipulator.collisionType={type:`line`,paths:[[[-c,0,0],[c,0,0]]]}}_createEdgePipeline(e,t,n){return(r,i,a,o)=>{if(o===`touch`)this._createEdgeOffsetPipeline(e,t,n)(r,i,a);else if(this.enableMoveObject){let e=this.object.graphic,o=n.data.spatialReference,{elevationAlignedLocation:s}=r;i.next(e=>this._trackNumDragging(e)).next(z(this.view,s)).next(D(this.view,s,t,o,e)).next(je()).next(L()).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(e=>{e.action===`end`&&(this._showReshapeControls(),this._resetTooltip())}),a.next(()=>this._onDragCancel(!r.metadata.deleting))}}}_createEdgeOffsetPipeline(e,t,n){return(r,i,a)=>{let o=this._pendingEdgeOffsetInfo;if(o?.manipulatorInfo===e&&o.mode!==`drag`){a.execute({action:`cancel`});return}this._clearSelection();let{initializeStep:s,cleanup:c}=this._initializeEdgeOffset(e,t,n,a),l=this._applyEdgeOffsetStep(e);i.next(e=>this._trackNumDragging(e)).next(z(this.view,r.elevationAlignedLocation)).next(s).next(ge(this.view)).next(_e(this.view,n.data.spatialReference)).next(L()).next(Le()).next(e=>this._pendingEdgeOffsetInfo?e:l(e)).next(e=>{e.action===`end`&&!this._pendingEdgeOffsetInfo&&c()}),a.next(()=>{this._exitEdgeOffsetInputMode(),r.metadata.deleting||(c(),this._onDragCancel())})}}_initializeEdgeOffset(e,t,n,r){let{view:i,object:a}=this,o=M(n.data.coordinateHelper,e.handle,t),s=n.createUndoGroup(),c=j(i,e.manipulator.elevationAlignedLocation,o);this._splitEdgesBeforeEdgeOffset(e,o),this._selectEdgeOffsetArrow(e,o);let l=()=>{this._cleanEdgeOffsetCollapsedEdges(e,n),this.removeHandles(G)},u=this.events.on(`undo`,l);return this.addHandles([this._initializeEdgeOffsetVisualElement(e,a,t,n),s,u,this._connectEdgeOffsetTooltip(e,o,n,()=>{r.execute({action:`cancel`})})],G),{initializeStep:e=>o==null||c==null?(l(),null):{...e,operation:o,plane:c},cleanup:l}}_initializeEdgeOffsetVisualElement(e,t,n,r){let i=()=>new se({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:r.data.spatialReference}),a=new P({view:this.view,isDraped:t.isDraped,geometry:i(),elevationInfo:n,width:this._settings.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0}),c=o([f(()=>({color:this._accentColor,draped:t.isDraped}),({color:e,draped:t})=>{a.color=e.toUnitRGBA(),a.isDraped=t},p),t.on(`committed`,()=>{a.geometry=i()}),s(a)]);return a.attached=!0,c}_applyEdgeOffsetStep(e){return t=>(this.destroyed||t.operation==null||!this._operations||(this._updateEventState(2),t.signedDistance==null?this._resetTooltip():((t.mapDeltaX||t.mapDeltaY||t.mapDeltaZ)&&(this._offsetEdge(e,t.operation,t.signedDistance),this.events.emit(`reshape`,{type:`reshape`,object:this.object})),this._updateEdgeOffsetTooltip(t))),t)}_cleanEdgeOffsetCollapsedEdges(e,t){let n=e.handle.leftVertex.leftSegment?.leftVertex,r=e.handle.leftVertex,i=e.handle.rightVertex.rightSegment?.rightVertex,a=e.handle.rightVertex,o=t.data.coordinateHelper,s=this.view.pixelSizeAt(o.vectorToDehydratedPoint(r.pos),o.spatialReference),c=[];if(n&&o.distance(n.pos,r.pos)<ze){let e=this._getManipulatorInfoFromHandle(r);e!=null&&c.push(e)}if(o.distance(r.pos,a.pos)<s||i&&o.distance(i.pos,a.pos)<ze){let e=this._getManipulatorInfoFromHandle(a);e!=null&&c.push(e)}c.length&&this._removeVertices(c)}_enterInputModeDuringEdgeOffset(e){let t=this._findActiveEdgeOffsetManipulatorInfo();return t&&H(e,this.tooltip)?t.manipulator.dragging?(this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:`drag`},!0):(this._clearSelection(),this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:`hover`},this._connectEdgeOffsetTooltipOnHover(t),!0):!1}_exitEdgeOffsetInputMode(){this.tooltip&&(this._pendingEdgeOffsetInfo=null,this._resetTooltip(),this.tooltip.exitInputMode())}_findActiveEdgeOffsetManipulatorInfo(){return this._manipulatorInfos.filter(Y).find(({manipulator:e})=>e.hovering||e.grabbing||e.dragging)}_connectEdgeOffsetTooltipOnHover(e){let{_operations:t,object:n}=this;if(!t)return;let{elevationInfo:r}=n,i=M(t.data.coordinateHelper,e.handle,r);this._selectEdgeOffsetArrow(e,i),this.addHandles([this._initializeEdgeOffsetVisualElement(e,n,r,t),this._connectEdgeOffsetTooltip(e,i,t,()=>{this.removeHandles(G),this._exitEdgeOffsetInputMode()})],G)}_splitEdgesBeforeEdgeOffset(e,t){if(t.requiresSplitEdgeLeft){let t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftSegment);t!=null&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){let t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightSegment);t!=null&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){let n=e.grabMapPoint??A(this.view.inputManager?.latestPointerInfo?.location,this.view,this.object,e);n&&t.selectArrowFromStartPoint(n)}_connectEdgeOffsetTooltip(e,t,n,r){let i=()=>this.tooltipInfos.edgeOffset.distance.actual,a=i=>{r(),queueMicrotask(()=>{this.view.focus();let r=n.createUndoGroup();this._tooltipCallbacks.onReshapeStart?.(),this._splitEdgesBeforeEdgeOffset(e,t),this._offsetEdge(e,t,Te(i,e.manipulator.location,t,n)),this._tooltipCallbacks.onReshape?.(),this._tooltipCallbacks.onReshapeStop?.(),this._cleanEdgeOffsetCollapsedEdges(e,n),r.remove()})},s=()=>{let e=i();e==null?r():a(e)};return o([m(()=>this.tooltip&&!this.tooltip.focused,()=>s(),h),this.tooltip.on(`discard`,r),this.tooltip.on(`commit`,e=>{e.type===`commit-and-exit`&&s()})])}_createVertexOrEdgeManipulator(e,t=this.object.elevationInfo,n=!1){let r=this.view,i=this._operations;if(!i)return null;let a=i.data.type,s=i.data.spatialReference;if(e.type===`line`){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(this._vertexManipulatorGeometry==null||this._vertexManipulatorOutlineGeometry==null){let{material:e,outlineMaterial:t}=this._vertexManipulatorMaterials;this._vertexManipulatorGeometry=T(e),this._vertexManipulatorOutlineGeometry=T(t)}if(this._edgeManipulatorGeometry==null||this._edgeManipulatorOutlineGeometry==null){let{material:e,outlineMaterial:t}=this._edgeManipulatorMaterials;this._edgeManipulatorGeometry=T(e),this._edgeManipulatorOutlineGeometry=T(t)}let c=this._vertexManipulatorGeometry,u=this._vertexManipulatorOutlineGeometry,d=[];if(a!==`point`&&a!==`mesh`){d.push(new E(c.instantiate(),Q|4),new E(u.instantiate(),Q|5),new E(u.instantiate({material:this._vertexManipulatorMaterials.focusedMaterial}),Q|6));{let{material:e,outlineMaterial:t,focusedMaterial:n}=this._selectedManipulatorMaterials;d.push(new E(c.instantiate({material:e}),8),new E(u.instantiate({material:t}),9),new E(u.instantiate({material:n}),10))}}if(this.enableMidpoints){let{material:e,focusedMaterial:t}=this._vertexManipulatorMaterials,n=this._edgeManipulatorGeometry,r=this._edgeManipulatorOutlineGeometry,i=$|6,a=$|5;d.push(new E(n.instantiate({material:e}),i),new E(r.instantiate({material:t}),i),new E(n.instantiate(),a),new E(r.instantiate(),a))}let f=e.type===`vertex`,p=new C({view:r,renderObjects:d,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,usePreciseLocalOrigin:a===`point`||a===`mesh`,available:this.object.visible,metadata:{deleting:!1},location:J(s),...pe});p.selected=n,this._setTypeSpecificManipulatorSettings(p,e,t);let m=f?{manipulator:p,handle:e,type:`vertex`,selectedIndex:0}:{manipulator:p,handle:e,locationUpdateHandle:null,type:`edge`,selectedIndex:0};if(this._manipulatorInfos.push(m),this.manipulators.add(p),this._updateManipulatorPosition(m),m.type===`edge`){let e=[];for(let t of[m.handle.leftVertex,m.handle.rightVertex]){let n=this._getManipulatorInfoFromHandle(t);n!=null&&e.push(n.manipulator.events.on(`location-update`,()=>this._updateManipulatorPosition(m)))}m.locationUpdateHandle=o(e),this._manipulatorHandles.add(m.locationUpdateHandle,p)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(p,!0),p);let h=R(p,(e,n,a,o)=>{let c=null,{snappingStep:u,cancelSnapping:d}=V({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new B({editGeometryOperations:i,elevationInfo:t,pointer:o,excludeFeature:this.object.graphic,visualizer:new he}),updatingHandles:this._updatingHandles,useZ:this.tool.snapToScene});a.next(t=>(this._onDragCancel(!e.metadata.deleting,()=>c=l(c)),t)).next(d);let{elevationAlignedLocation:f}=e,p=this.object.graphic??void 0,h=this.tool.snapToScene?this._screenToSceneMapForVertexDrag(t,i,p):D(r,f,t,s,p);n.next(e=>this._trackNumDragging(e)).next(e=>{if(e.action===`start`&&i&&(c=i.createUndoGroup()),m.type===`edge`){let t=this._splitEdgeManipulator(m);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:m,snapOrigin:m.handle.pos}}).next(z(r,f)).next(h).next(Me(r,t,p)).next(...u).next(L()).next(e=>{this._perVertexManipulatorDragAction(e),e.action===`end`&&(c=l(c)),this._resetTooltip()})});return this._manipulatorHandles.add([h,p.events.on(`immediate-click`,e=>this._manipulatorClickCallback(e,m)),p.events.on(`select-changed`,()=>{m.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()}),p.events.on(`focus-changed`,()=>{this._resetTooltip()})],p),this.events.emit(`manipulators-changed`),m}_screenToSceneMapForVertexDrag(e,t,n){let{view:r}=this,{coordinateHelper:i,spatialReference:a}=t.data,o=null;return t=>{if(t.action===`start`&&(o=i.vectorToPoint(t.snapOrigin)),o==null)return null;let s=r.toMap(t.screenEnd,{exclude:n,excludeLabels:!0});return s==null||(s.z=ue(s,r,e),!ce(s,s,a))?null:{...t,mapStart:o,mapEnd:s}}}_trackNumDragging(e){switch(e.action){case`start`:this._numDragging++;break;case`end`:this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&this.undo(),this.tool.snappingManager?.doneSnapping(),this._showReshapeControls(),this._resetTooltip(),this._reshapeEventState){case 0:break;case 1:this.events.emit(`move`,{type:`move`,dx:0,dy:0,object:this.object});break;case 2:this.events.emit(`reshape`,{type:`reshape`,object:this.object})}t?.(),this.destroyed||this._updateEventState(0)}_setTypeSpecificManipulatorSettings(e,t,n){let r=this._settings;switch(t.type){case`vertex`:{e.selectable=!0,e.cursor=`move`,e.collisionPriority=2,e.elevationInfo=n;let t=this._operations?.data.type;e.interactive=t!=null&&t!==`point`&&t!==`mesh`;let{size:i,collisionPadding:a}=r.manipulators.vertex;e.radius=i/2+a,e.state=Q;break}case`line`:{e.state=$,e.selectable=!1,e.cursor=`copy`,e.collisionPriority=2;let{size:t,collisionPadding:i}=r.manipulators.edge;e.radius=t/2+i,e.elevationInfo=n.mode===`on-the-ground`&&!de(this.object.graphic?.symbol)?n:{mode:`absolute-height`,offset:0};break}}}_watchAndUpdateGrabState(e,t){return e.events.on(`grab-changed`,n=>{this._onGrabStateChanged(e,t,n.action,n.pointerType)})}_onGrabStateChanged(e,t,n,r=`mouse`){if(!this._recreatingManipulators){if(n===`start`)t&&this._updateSelection(e),this._numGrabbing++,this._shouldHideReshapeControlsOnGrab(e)&&this._hideReshapeControls(),this._hideManipulatorsForEdgeOffset(e);else if(this._numGrabbing--,this.removeHandles(W),this._updateEventState(0),this._canShowReshapeControls&&this._showReshapeControls(),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,(r!==`touch`||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach(e=>{let{manipulator:t}=e,n=this._operations?.data.type;t.interactive=t.grabbing||!this._numGrabbing&&n!=null&&n!==`point`&&n!==`mesh`,Y(e)&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)}),this._objectMoveManipulation.forEachManipulator(e=>{e.interactive=e.grabbing||!this._numGrabbing}))}}_clearSelection(){for(let e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1);this._pendingEdgeOffsetInfo=null}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.events.emit(`manipulators-changed`))}_removeManipulator(e){e!=null&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),n(this._manipulatorInfos,e),this.events.emit(`manipulators-changed`),this._resetTooltip())}_getManipulatorInfoFromHandle(e){return this._manipulatorInfos.find(t=>t.handle===e)}_updateManipulatorPositions(e){if(!this._movingManipulatorsHidden)for(let t of e)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(t))}_updateManipulatorPosition(e){let t=this._operations;if(e!=null&&t){if(e.type===`vertex`)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,X),e.manipulator.grabbing&&this._vertexLaserLineVisualElement!=null&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if(e.type===`edge`){let n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),r=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(n==null||r==null)return;let i=n.manipulator,a=r.manipulator;if(e.manipulator.elevationInfo?.mode===`on-the-ground`){let n=i.location,r=a.location,o=.5,s=n.x+o*(r.x-n.x),c=n.y+o*(r.y-n.y),l=n.hasZ&&r.hasZ?0:void 0;e.manipulator.location=S(s,c,l,t.data.spatialReference)}else x(Z,i.renderLocation,a.renderLocation,.5),e.manipulator.renderLocation=Z}}}_splitEdgeManipulator(e,t=.5){let n=this._operations,r=n.splitSegment(e.handle,t).createdVertex;e.locationUpdateHandle=l(e.locationUpdateHandle);let i=this.object.elevationInfo,a;this.enableEdgeOffset?(this._removeManipulator(e),a=this._createVertexOrEdgeManipulator(r)):(a=e,a.handle=r,a.type=`vertex`,this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,i)),r.leftSegment?.type===`line`&&this._createVertexOrEdgeManipulator(r.leftSegment),r.rightSegment?.type===`line`&&this._createVertexOrEdgeManipulator(r.rightSegment),this._updateManipulatorPosition(a),this.enableEdgeOffset||this._resetTooltip(),this._updateSelection(e.manipulator);let o=this._updateEventState(2),s=n.data.coordinateHelper.vectorToArray(a.handle.pos),c=n.data.parts.indexOf(r.part);return this.events.emit(`vertex-add`,{type:`vertex-add`,object:this.object,vertices:[{coordinates:s,componentIndex:c,vertexIndex:r.index}],added:s}),o&&this._updateEventState(0),a}_updateMoveManipulationPosition(){let e=ee(Z,0,0,0),t=0,n=!1,r=null,i=null;for(let a of this._manipulatorInfos)a.type===`vertex`&&(a.manipulator.selected?(t++,te(e,e,a.manipulator.renderLocation),r==null||a.selectedIndex>r.selectedIndex?(i=r,r=a):(i==null||a.selectedIndex>i.selectedIndex)&&(i=a)):n=!0);let a=this.object,o=this._operations?.data.geometry;if(t===0){let e=a.visible&&this.enableMoveObject;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&O(this._operations,a.elevationInfo),this._moveManipulation.angle=ve(o),this._moveManipulation.radius=k.radiusForSymbol(a.graphic?.symbol)}else{let e=a.visible;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&O(this._operations,this.object.elevationInfo),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&t!==1;let n=0;if(r!=null){let e=r.handle.pos,t=i==null?r.handle.leftSegment?.leftVertex?r.handle.leftSegment.leftVertex.pos:null:i.handle.pos,a=i==null&&r.handle.rightSegment?.rightVertex?r.handle.rightSegment.rightVertex.pos:null;t&&a?this._moveManipulation.xyAxisManipulation.available=!1:t?n=Re(t,e):a&&(n=Re(e,a))}this._moveManipulation.angle=n,this._moveManipulation.radius=xe}t!==0&&n?(ne(e,e,1/t),X.spatialReference=this._operations.data.spatialReference,X.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,X),this._moveManipulation.elevationAlignedLocation=X):this._outlineVisualElement!=null&&!this.object.isDraped&&this._outlineVisualElement.attachmentOrigin!=null?this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin:fe(this._moveManipulation,this.object)}_removeVertices(e){let t=[],n=this._operations;if(!n)return;let r=e.filter(e=>e.type===`vertex`&&n.canRemoveVertex(e.handle.part));if(r.length>0){let e=this._createBeforeVertexRemoveEvent(r);if(this.events.emit(`before-vertex-remove`,e),e.defaultPrevented)return}for(let e of r){let r=e.handle.part;if(n.canRemoveVertex(r)){t.push(e.handle),this._removeManipulator(e),this._removeManipulator(this._getManipulatorInfoFromHandle(e.handle.leftSegment)),this._removeManipulator(this._getManipulatorInfoFromHandle(e.handle.rightSegment));let i=n.removeVertices([e.handle]).removedVertices?.[0].createdSegment;i&&i.type===`line`?this._createVertexOrEdgeManipulator(i):this.enableEdgeOffset&&r.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(r.segments[0]))}}if(t.length>0){let e=t.map(e=>{let t=n.data.parts.indexOf(e.part);return{coordinates:n.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}}),r=this._updateEventState(2);if(this.destroyed||(this.events.emit(`vertex-remove`,{type:`vertex-remove`,object:this.object,removed:e.map(e=>e.coordinates),vertices:e}),this.destroyed)||r&&(this._updateEventState(0),this.destroyed))return;this._updateMoveManipulationPosition()}}_createBeforeVertexRemoveEvent(e){let t=this._operations,n=e.map(e=>{let n=t.data.parts.indexOf(e.handle.part);return{coordinates:t.data.coordinateHelper.vectorToArray(e.handle.pos),componentIndex:n,vertexIndex:e.handle.index}}),r=!1;return{type:`before-vertex-remove`,object:this.object,removed:n.map(e=>e.coordinates),vertices:n,get defaultPrevented(){return r},preventDefault(){r=!0}}}_moveVertices(e,t,n=t.action===`start`?0:1){let r=this._operations;if(r&&(e.length>0&&r.moveVertices(e.map(e=>e.handle),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,n),!this._movingManipulatorsHidden))for(let t of e)this._updateManipulatorPosition(t)}_offsetEdge(e,t,n){if(!this._operations)return;let r=t.clone();r.distance=n,this._operations.updateVertices([e.handle.leftVertex,e.handle.rightVertex],r),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),t.type===`vertex`&&(t.manipulator.selected=!t.manipulator.selected,this.enableDeleteVertices&&e.button===I.Right&&this._removeVertices([t])),t.type===`edge`&&e.button===I.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){this._defaultTooltipInfo==null?this._updateTranslateObjectTooltip(e,t):this._resetTooltip()}_updateTranslateObjectTooltip(e,t){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=Oe(e,t,this._tooltipsContext,this._updatingHandles))}_updateEdgeOffsetTooltip(e){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=N(this.object,e,this._tooltipsContext,this._updatingHandles))}_resetTooltip(){let e=this.activeTooltipInfo;if(this._pendingEdgeOffsetInfo&&e?.type===`reshape-edge-offset`)return;let t=null;t=this._pendingEdgeOffsetInfo||this._findActiveEdgeOffsetManipulatorInfo()!=null?N(this.object,null,this._tooltipsContext,this._updatingHandles):this._defaultTooltipInfo,t!==e&&(e==null||t==null||this.tooltip.mode!==`input`)&&(this.activeTooltipInfo=t)}get _defaultTooltipInfo(){switch(this._operations?.data.type){case`polyline`:case`polygon`:return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case`point`:case`mesh`:return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){let e=this._manipulatorInfos.filter(e=>e.type===`vertex`&&e.manipulator.selected);return e.length===1?e[0]:null}get _someVerticesSelected(){return this._manipulatorInfos.some(e=>e.type===`vertex`&&e.manipulator.selected)}_forEachVertex(e){for(let t of this._manipulatorInfos)t.type===`vertex`&&e(t)}get _tooltipsContext(){let{tooltipInfos:e,activeTooltipInfo:t}=this;return{toolOptions:this._toolOptions,tooltipInfos:e,activeTooltipInfo:t,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:this._tooltipCallbacks,measurementWorker:this._measurementWorker}}get test(){}};e([g()],q.prototype,`_numGrabbing`,void 0),e([g()],q.prototype,`_numDragging`,void 0),e([g()],q.prototype,`_pendingEdgeOffsetInfo`,void 0),e([g()],q.prototype,`_operations`,null),e([g()],q.prototype,`_segmentLabels`,void 0),e([g({constructOnly:!0})],q.prototype,`tool`,void 0),e([g()],q.prototype,`tooltip`,void 0),e([g()],q.prototype,`activeTooltipInfo`,void 0),e([g({readOnly:!0})],q.prototype,`updating`,null),e([g()],q.prototype,`manipulators`,null),e([g()],q.prototype,`view`,null),e([g()],q.prototype,`object`,null),e([g()],q.prototype,`enableZShape`,null),e([g()],q.prototype,`enableDeleteVertices`,null),e([g()],q.prototype,`enableZVertex`,null),e([g()],q.prototype,`autoHideManipulators`,null),e([g()],q.prototype,`enableMoveObject`,null),e([g()],q.prototype,`enableMidpoints`,null),e([g()],q.prototype,`enableEdgeOffset`,null),e([g()],q.prototype,`_toolOptions`,null),e([g()],q.prototype,`_accentColor`,null),e([g()],q.prototype,`_tooltipsContext`,null),q=e([_(`esri.views.3d.interactive.editingTools.reshape.ReshapeOperation`)],q);function Le(){return e=>{let{operation:t,mapEnd:n}=e;return t==null||n==null?e:{...e,signedDistance:t.signedDistanceToPoint(n)}}}function Re(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function J(e){return new oe({x:0,y:0,z:0,spatialReference:e})}function Y(e){return e.type===`edge`&&`edgeManipulator`in e}const X=S(0,0,void 0,le.WGS84),Z=ie(),ze=1e-6,Q=16,$=32;export{q as ReshapeOperation};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{removeUnordered as n}from"../../../../../core/arrayUtils.js";import{EventEmitter as r}from"../../../../../core/Evented.js";import i from"../../../../../core/Handles.js";import{makeHandle as a,handlesGroup as o,destroyHandle as s}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as c,removeMaybe as l}from"../../../../../core/maybe.js";import{initial as u,on as d,watch as f,syncAndInitial as p,when as m,sync as h}from"../../../../../core/reactiveUtils.js";import{property as g,subclass as _}from"../../../../../core/accessorSupport/decorators.js";import{IDENTITY as v}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{length as y,subtract as b,lerp as x,set as ee,add as te,scale as ne}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as re,create as ie}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as ae}from"../../../../../core/support/UpdatingHandles.js";import oe from"../../../../../geometry/Point.js";import se from"../../../../../geometry/Polyline.js";import{projectPoint as ce}from"../../../../../geometry/projectionUtils.js";import le from"../../../../../geometry/SpatialReference.js";import{makeDehydratedPoint as S}from"../../../../../layers/graphics/dehydratedPoint.js";import{getZForElevationMode as ue}from"../../../../../support/elevationInfoUtils.js";import{isVolumetricSymbol as de}from"../../../../../symbols/support/utils.js";import{Manipulator3D as C}from"../../Manipulator3D.js";import{createManipulatorMaterials as w,createSphereGeometryAsOffsets as T,placeAtObject as fe,screenSizeManipulatorSettings as pe}from"../../manipulatorUtils.js";import{RenderObject as E}from"../../RenderObject.js";import{SegmentLabels3D as me}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as he}from"../../SnappingVisualizer3D.js";import{screenToMapXYAtLocation as D,screenToRenderPlaneFromEvent as ge,convertToMapCoordinates as _e}from"../dragEventPipeline3D.js";import{orientation as ve}from"../geometryUtils.js";import{canMoveZOperations as O}from"../manipulatorUtils.js";import{Settings as ye}from"../settings.js";import{createVisualElements as be}from"../visualElementUtils.js";import{discRadiusSmall as xe}from"../manipulations/config.js";import{MoveManipulation as k}from"../manipulations/MoveManipulation.js";import{MoveXYObjectManipulation as Se}from"../manipulations/MoveXYObjectManipulation.js";import{getMapPointAtEdgeOffsetManipulatorElevation as A,createEdgeOffsetIntersectionPlane as j,createEdgeOffsetOperation as M,edgeOffsetRotationMatrix as Ce,screenEdgeLengthSquared as we,getDistanceInGeometrySR as Te}from"./edgeOffsetUtils.js";import{createTooltipInfos as Ee,connectTooltipToManipulatedObject as De,getUpdatedTranslateObjectTooltipInfo as Oe,getUpdatedEdgeOffsetTooltipInfo as N}from"./reshapeTooltipUtils3D.js";import{OutlineVisualElement as P}from"../../visualElements/OutlineVisualElement.js";import{createElevationUpdateHandle as ke}from"../../../support/elevationUpdateUtils.js";import{createExtrudedTriangle as F}from"../../../webgl-engine/lib/GeometryUtil.js";import{mouseButtons as I}from"../../../../input/mouseButtons.js";import{sceneSnappingAtProjectedLocation as Ae,addMapDelta as L,createManipulatorDragEventPipeline as R,dragAtLocation as z,addScreenDelta as je,sceneSnappingAtLocation as Me}from"../../../../interactive/dragEventPipeline.js";import{tooltipKeys as Ne}from"../../../../interactive/keybindings.js";import{SnappingContext as B}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as V}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as Pe,enterInputModeIfAvailable as H}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{GeometryWorkerHandle as Fe}from"../../../../support/GeometryWorkerHandle.js";const U=Symbol(),W=Symbol(),G=Symbol(),Ie=Symbol(),K=Symbol();let q=class extends t{get _movingManipulatorsHidden(){return this.hasHandles(K)}get _operations(){return this.object.operations}constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new i,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=0,this._pendingEdgeOffsetInfo=null,this._updatingHandles=new ae,this._recreatingManipulators=!1,this._settings=new ye({getTheme:()=>this.view.effectiveTheme}),this.events=new r,this.activeTooltipInfo=null,this._measurementWorker=new Fe({preloadGeodetic:!0}),this._vertexLaserLineVisualElement=null,this._tooltipCallbacks={onBeforeReshape:()=>this.tool.endDrag(),onReshapeStart:()=>this._updateEventState(2),onReshape:()=>this.events.emit(`reshape`,{type:`reshape`,object:this.object}),onReshapeStop:()=>this._updateEventState(0,{forceEnd:!0}),onMoveStart:()=>this._updateEventState(1),onMove:()=>this.events.emit(`move`,{type:`move`,object:this.object,dx:0,dy:0}),onMoveStop:()=>this._updateEventState(0,{forceEnd:!0})}}initialize(){let{view:e}=this,t=this._settings.manipulators,n=t.vertex;this.tooltipInfos=Ee(this._toolOptions,e);let r=e.state.isGlobal;this._vertexManipulatorMaterials=w({spherical:r,color:n.color.toUnitRGBA(),outlineColor:n.outlineColor.toUnitRGBA(),focusedOutlineColor:n.focusedOutlineColor.toUnitRGBA(),screenSize:n,renderOccluded:n.renderOccluded});let i=t.edge;this._edgeManipulatorMaterials=w({spherical:r,color:i.color.toUnitRGBA(),outlineColor:i.outlineColor.toUnitRGBA(),screenSize:i,renderOccluded:i.renderOccluded});let a=t.edgeOffset;this._edgeOffsetManipulatorMaterials=w({spherical:r,color:a.color.toUnitRGBA(),focusedColor:a.focusedColor.toUnitRGBA(),renderOccluded:a.renderOccluded,shaded:!1});let o=t.selected;this._selectedManipulatorMaterials=w({spherical:r,color:o.color.toUnitRGBA(),outlineColor:o.outlineColor.toUnitRGBA(),focusedOutlineColor:o.focusedOutlineColor.toUnitRGBA(),screenSize:o,renderOccluded:o.renderOccluded}),this.tooltip=Pe(()=>({view:e,options:this._toolOptions.tooltips})),this.addHandles([this._updatingHandles.add(()=>{let e=this._settings.manipulators;return{vertexSettings:e.vertex,edgeSettings:e.edge,edgeOffsetSettings:e.edgeOffset,selectedSettings:e.selected}},({vertexSettings:e,edgeSettings:t,edgeOffsetSettings:n,selectedSettings:r})=>{e.applyColor(this._vertexManipulatorMaterials.material),e.applyOutline(this._vertexManipulatorMaterials.outlineMaterial),e.applyFocusedOutline(this._vertexManipulatorMaterials.focusedMaterial),t.applyColor(this._edgeManipulatorMaterials.material),t.applyOutline(this._edgeManipulatorMaterials.outlineMaterial),n.applyColor(this._edgeOffsetManipulatorMaterials.material),n.applyFocused(this._edgeOffsetManipulatorMaterials.focusedMaterial),r.applyColor(this._selectedManipulatorMaterials.material),r.applyOutline(this._selectedManipulatorMaterials.outlineMaterial),r.applyFocusedOutline(this._selectedManipulatorMaterials.focusedMaterial)}),this._updatingHandles.add(()=>this.object.visible,e=>{for(let t of this._manipulatorInfos)t.manipulator.available=e,Y(t)&&(t.edgeManipulator.available=e)}),this._updatingHandles.add(()=>this._numGrabbing+this._numDragging===0,e=>this._toggleAutoHideManipulators(e)),this._updatingHandles.add(()=>({labels:this._segmentLabels,enabled:this._toolOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset}),({labels:e,enabled:t,edgeOffsetEnabled:n})=>{e!=null&&(e.visible=t,e.edgeDistance=n?`far`:`default`)},u),De(this.tooltip,this.object,()=>this._tooltipsContext,this._updatingHandles),this._updatingHandles.add(()=>this.tooltip.mode,(e,t)=>{t===`input`&&e!==`input`&&this._resetTooltip()}),d(()=>this._operations,`vertex-update`,e=>this._updateManipulatorPositions(e.vertices),{onListenerAdd:()=>this._recreateManipulators()}),d(()=>this._operations?.data,`change`,e=>{(e.operation===`undo`||e.operation===`redo`)&&this._recreateManipulators()})])}destroy(){this._removeManipulators(),this._updatingHandles.destroy(),this._segmentLabels=c(this._segmentLabels),this.tooltip=c(this.tooltip),this._measurementWorker.destroy()}get updating(){return this._updatingHandles.updating||!!this._segmentLabels?.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _toolOptions(){return this.tool.toolOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}enterInputModeIfAvailable(e){return e.type!==`key-down`||e.key!==Ne.enterInputMode?!1:this.activeTooltipInfo?.type===`reshape-edge-offset`?this._enterInputModeDuringEdgeOffset(e):H(e,this.tooltip)?(this.tool.endDrag(),!0):!1}removeSelectedVertices(){let e=this._manipulatorInfos.filter(e=>e.manipulator.selected&&e.type===`vertex`);return this._removeVertices(e),e.length}onManipulatorSelectionChanged(){this.events.emit(`manipulators-changed`)}_removeManipulators(){this._manipulatorHandles.removeAll(),this.removeHandles(G),this.removeHandles(W),this.removeHandles(K),this._moveManipulation=c(this._moveManipulation),this._objectMoveManipulation=c(this._objectMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._pendingEdgeOffsetInfo&&this._exitEdgeOffsetInputMode()}_createManipulators(e){if(this._operations==null)return;let t=this.object.elevationInfo;for(let{vertices:n,segments:r,index:i}of this._operations.data.parts){let a=e?.byPartIndex.get(i);for(let e of n){let n=a?.has(e.index);this._createVertexOrEdgeManipulator(e,t,n)}for(let e of r)e.type===`line`&&this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}recordUndo(e){this._operations?.recordUndo(e,!0)}get canRedo(){return this._operations?.canRedo??!1}get canUndo(){return this._operations?.canUndo??!1}redo(){return this._operations?.redo()}undo(){return this.events.emit(`undo`),this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){if(this._recreatingManipulators=!0,this._removeManipulators(),this._resetTooltip(),this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=c(this._segmentLabels)),this._createManipulators(),!this._segmentLabels&&this._operations){let e=this._toolOptions.labels;this._segmentLabels=new me({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:e},visible:e.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(e,t){if(t.action===`end`)return t;let n=0,r=[],i=e===1&&this._someVerticesSelected;for(let e of this._manipulatorInfos)e.type===`vertex`&&(e.manipulator.grabbing||i&&!e.manipulator.selected||r.push(e),n++);if(r.length===n){if(i||this._hideReshapeControls(),this._moveVertices(r,t),this._updateEventState(1),this.destroyed)return t;this.events.emit(`move`,{type:`move`,dx:t.screenDeltaX,dy:t.screenDeltaY,object:this.object})}else{if(this._moveVertices(r,t),this._updateEventState(2),this.destroyed)return t;this.events.emit(`reshape`,{type:`reshape`,object:this.object})}return t}_hideReshapeControls(){this._movingManipulatorsHidden||this.addHandles([this._hideReshapeManipulators(),this._moveManipulation.hideManipulatorsExceptGrabbedGroup(),a(()=>this._forEachVertex(e=>this._updateManipulatorPosition(e)))],K)}_showReshapeControls(){this.removeHandles(K)}_shouldHideReshapeControlsOnGrab(e){return this._objectMoveManipulation.hasManipulator(e)||this._moveManipulation.hasManipulator(e)&&!this._someVerticesSelected}get _canShowReshapeControls(){return!this._objectMoveManipulation.grabbing&&(!this._moveManipulation.grabbing||this._someVerticesSelected)}_hideManipulatorsForEdgeOffset(e){let t=this._manipulatorInfos.filter(Y).find(t=>t.manipulator===e||t.edgeManipulator===e);t!=null&&(this.removeHandles(W),this.addHandles([this._moveManipulation.hideManipulators(),this._hideReshapeManipulators(t)],W))}_hideReshapeManipulators(e){return o(this._manipulatorInfos.flatMap(t=>t===e?null:[t.manipulator.disableDisplay(),Y(t)?t.edgeManipulator.disableDisplay():null]))}_toggleAutoHideManipulators(e){this.autoHideManipulators&&(e?this.removeHandles(U):this.tool.manipulators.forEach(({manipulator:e})=>{let t=e.disableDisplay?.();t&&this.addHandles(t,U)}))}_isMultiVertexSelection(){return this._manipulatorInfos.reduce((e,t)=>t.type===`vertex`&&t.manipulator.selected?e+1:e,0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(2),this.destroyed)return;let{mapDeltaX:t,mapDeltaY:n,mapDeltaZ:r}=e;if(!t&&!n&&!r)return;let i=[];this._forEachVertex(t=>{let{selected:n,grabbing:r}=t.manipulator;(n&&!r||t===e.info)&&i.push(t)}),this._moveVertices(i,e,1),this.events.emit(`reshape`,{type:`reshape`,object:this.object})}_updateEventState(e,t={}){if(e===this._reshapeEventState)return!1;switch(e){case 0:if(!t.forceEnd&&(this._numGrabbing!==0||this._numDragging!==0))return!1;switch(this._reshapeEventState){case 1:this._showReshapeControls(),this.events.emit(`move`,{type:`move-stop`,dx:0,dy:0,object:this.object});break;case 2:this.events.emit(`reshape`,{type:`reshape-stop`,object:this.object})}break;case 1:switch(this._reshapeEventState){case 0:this.events.emit(`move`,{type:`move-start`,dx:0,dy:0,object:this.object});break;case 2:this.events.emit(`reshape`,{type:`reshape-stop`,object:this.object}),this.destroyed||this.events.emit(`move`,{type:`move-start`,dx:0,dy:0,object:this.object})}break;case 2:switch(this._reshapeEventState){case 0:this.events.emit(`reshape`,{type:`reshape-start`,object:this.object});break;case 1:this._showReshapeControls(),this.events.emit(`move`,{type:`move-stop`,dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit(`reshape`,{type:`reshape-start`,object:this.object})}}if(this.destroyed)return!1;let n=this._reshapeEventState!==e;return this._reshapeEventState=e,n}_createObjectMoveManipulation(){let{tool:e,view:t,object:n,_operations:r}=this;if(r){if(this._objectMoveManipulation=new Se({tool:e,view:t,object:n}),this.enableMoveObject){let e=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline((t,n,i)=>{n.next(e=>this._trackNumDragging(e)).next(t=>(t.action===`start`&&(e=r.createUndoGroup()),t)).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(t=>{t.action===`end`&&(this._showReshapeControls(),this._resetTooltip(),e=l(e))}),i.next(()=>this._onDragCancel(!0,()=>e=l(e)))})),this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1)))}else this._objectMoveManipulation.forEachManipulator(e=>{e.grabbable=!1,e.cursor=null});this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(e.events.on(`immediate-click`,e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit(`immediate-click`,{...e,object:this.object}),e.stopPropagation()})))}}_createMoveManipulation(e){let{object:t,tool:n,view:r,_operations:i}=this;if(!i)return;this._moveManipulation=new k({tool:n,view:r,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&O(t.operations,t.elevationInfo),snapToScene:!1,radius:k.radiusForSymbol(t.graphic?.symbol)}),this._moveManipulation.forEachManipulator(e=>this.addHandles([e.events.on(`immediate-click`,t=>{!this._moveManipulation.zManipulation.hasManipulator(e)&&!this._manipulatorInfos.some(e=>e.manipulator.selected)&&this.events.emit(`immediate-click`,{...t,object:this.object}),t.stopPropagation()}),this._watchAndUpdateGrabState(e,!1)]));let a=e=>t=>{this.addHandles([t.events.on(`focus-changed`,({action:t})=>{t===`focus`?this._updateTranslateTooltip(e):this._resetTooltip()})])};this._moveManipulation.xyManipulation.forEachManipulator(a(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(a(1)),this._moveManipulation.zManipulation.forEachManipulator(a(2)),this._moveManipulation.elevationInfo={mode:`absolute-height`,offset:0};let o=i.data.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline((r,a,o,s,c)=>{let{snappingStep:l,cancelSnapping:u}=V({predicate:e=>!!e.info,snappingManager:n.snappingManager,snappingContext:new B({editGeometryOperations:i,elevationInfo:e,pointer:c,excludeFeature:t.graphic,visualizer:new he}),updatingHandles:this._updatingHandles,useZ:!1});return s=s.next(e=>(this._onDragCancel(),e)).next(u),o=o.next(e=>this._trackNumDragging(e)).next(e=>{let t=this._manipulatorInfos.filter(e=>e.type===`vertex`&&e.manipulator.selected);return e.manipulatorType===1&&t.length===1?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e}).next(Ae(this.view,e)).next(...l).next(L()).next(e=>this._perObjectManipulatorDragAction(1,e)).next(e=>(e.action===`end`&&this._showReshapeControls(),this._updateTranslateTooltip(r,e),e)),{steps:o,cancel:s}},e,o,t.graphic),this._updatingHandles.add(()=>t.visible,()=>this._updateMoveManipulationPosition(),u),t.on(`committed`,()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()}),this._updatingHandles.add(()=>t.isDraped,e=>{this._updateMoveManipulationPosition(),this.removeHandles(Ie),e&&this.addHandles(ke({view:this.view,geometry:()=>t.graphic?.geometry,elevationInfo:t.elevationInfo,onElevationChanges:()=>this._updateMoveManipulationPosition()}),Ie)},u)])}_createVisualElements(){let{object:e,view:t}=this,n=be({view:t,object:e,forEachManipulator:e=>{if(!(this.destroyed||this._recreatingManipulators)){this._objectMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(let t of this._manipulatorInfos)e(t.manipulator,1)}},onManipulatorsChanged:e=>this.events.on(`manipulators-changed`,e)});n!=null&&(this._outlineVisualElement=n.visualElement instanceof P?n.visualElement:null);let r=this._outlineVisualElement;if(r!=null){let t=()=>{e.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(d(()=>r.events,`attachment-origin-changed`,t,{onListenerAdd:t}))}this._manipulatorHandles.add(n)}_createEdgeOffsetManipulator(e,t=this.object.elevationInfo){let n=this.view,r=this._operations;if(e.part.vertices.length<=2||!r)return null;let i=r.data.spatialReference,a=this._settings.manipulators.edgeOffset,s=a.size/2,c=s+a.collisionPadding,l=s/c,u=l/2,d=l*Math.sqrt(3)/2,{height:f,offset:p}=a,{material:m,focusedMaterial:h}=this._edgeOffsetManipulatorMaterials;if(!this._edgeOffsetManipulatorGeometryInside){let e=F(m,d,u,u,f,p);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){let e=F(m,-d,u,u,f,-p);this._edgeOffsetManipulatorGeometryOutside=e}let g=[new E(this._edgeOffsetManipulatorGeometryInside.instantiate(),1),new E(this._edgeOffsetManipulatorGeometryInside.instantiate({material:h}),2),new E(this._edgeOffsetManipulatorGeometryOutside.instantiate(),1),new E(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:h}),2)],_=new C({view:n,renderObjects:g,elevationInfo:t.mode===`on-the-ground`&&!de(this.object.graphic?.symbol)?t:{mode:`absolute-height`,offset:0},worldOriented:!1,focusMultiplier:1,radius:c,available:this.object.visible,collisionType:{type:`disc`,direction:re(0,0,1)},collisionPriority:1,metadata:{deleting:!1},location:J(i)}),v=new C({view:n,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?`move`:`default`,metadata:{deleting:!1},location:J(i)}),y={manipulator:_,handle:e,locationUpdateHandle:null,type:`edge`,selectedIndex:0,edgeManipulator:v,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(y,a.minSquaredEdgeLength);let b=()=>this._updateEdgeOffsetManipulator(y);b(),y.locationUpdateHandle=o([e.leftVertex,e.rightVertex].map(e=>this._getManipulatorInfoFromHandle(e)?.manipulator.events.on(`location-update`,b)));let x=e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit(`immediate-click`,{...e,object:this.object}),e.stopPropagation()};return this._manipulatorHandles.add([y.locationUpdateHandle,this._watchAndUpdateGrabState(_,!0),this._watchAndUpdateGrabState(v,!0),R(_,this._createEdgeOffsetPipeline(y,t,r)),R(v,this._createEdgePipeline(y,t,r)),v.events.on(`immediate-click`,x),_.events.on(`immediate-click`,x),_.events.on(`focus-changed`,()=>this._resetTooltip()),_.events.on(`grab-changed`,({screenPoint:e,action:t})=>{y.grabMapPoint=t===`start`?A(e,this.view,this.object,y):null})],_),this._manipulatorInfos.push(y),this.manipulators.addMany([_,v]),this.events.emit(`manipulators-changed`),y}_autoHideEdgeOffsetManipulator(e,t){let n=e.manipulator,r=e.edgeManipulator,i=()=>{e.visibilityHandle=l(e.visibilityHandle);let i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),s=this._getManipulatorInfoFromHandle(e.handle.rightVertex),c=i!=null&&s!=null&&we(i.manipulator.renderLocation,s.manipulator.renderLocation,this.view.state.camera)<t;(!n.focused&&!r.focused||c)&&(n.grabbable=!c,r.grabbable=!c,e.visibilityHandle=o([n.disableDisplay(),a(()=>{n.grabbable=!0,r.grabbable=this.enableMoveObject})]))};this._manipulatorHandles.add([n.events.on(`focus-changed`,i),r.events.on(`focus-changed`,i),a(()=>{l(e.visibilityHandle),r.metadata.deleting=!0,this.manipulators.remove(r)})],n),i()}_updateEdgeOffsetManipulator(e){if(!this._operations)return;this._updateManipulatorPosition(e);let{coordinateHelper:t}=this._operations.data,n=j(this.view,e.manipulator.elevationAlignedLocation,M(t,e.handle,e.manipulator.elevationInfo)),r=this._getManipulatorInfoFromHandle(e.handle.leftVertex),i=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(r==null||i==null)return;let a=r.manipulator.renderLocation,o=i.manipulator.renderLocation,s=n==null?v:Ce(n,a,o);e.manipulator.modelTransform=s,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=s;let c=y(b(Z,a,o))/2;e.edgeManipulator.collisionType={type:`line`,paths:[[[-c,0,0],[c,0,0]]]}}_createEdgePipeline(e,t,n){return(r,i,a,o)=>{if(o===`touch`)this._createEdgeOffsetPipeline(e,t,n)(r,i,a);else if(this.enableMoveObject){let e=this.object.graphic,o=n.data.spatialReference,{elevationAlignedLocation:s}=r;i.next(e=>this._trackNumDragging(e)).next(z(this.view,s)).next(D(this.view,s,t,o,e)).next(je()).next(L()).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(e=>{e.action===`end`&&(this._showReshapeControls(),this._resetTooltip())}),a.next(()=>this._onDragCancel(!r.metadata.deleting))}}}_createEdgeOffsetPipeline(e,t,n){return(r,i,a)=>{let o=this._pendingEdgeOffsetInfo;if(o?.manipulatorInfo===e&&o.mode!==`drag`){a.execute({action:`cancel`});return}this._clearSelection();let{initializeStep:s,cleanup:c}=this._initializeEdgeOffset(e,t,n,a),l=this._applyEdgeOffsetStep(e);i.next(e=>this._trackNumDragging(e)).next(z(this.view,r.elevationAlignedLocation)).next(s).next(ge(this.view)).next(_e(this.view,n.data.spatialReference)).next(L()).next(Le()).next(e=>this._pendingEdgeOffsetInfo?e:l(e)).next(e=>{e.action===`end`&&!this._pendingEdgeOffsetInfo&&c()}),a.next(()=>{this._exitEdgeOffsetInputMode(),r.metadata.deleting||(c(),this._onDragCancel())})}}_initializeEdgeOffset(e,t,n,r){let{view:i,object:a}=this,o=M(n.data.coordinateHelper,e.handle,t),s=n.createUndoGroup(),c=j(i,e.manipulator.elevationAlignedLocation,o);this._splitEdgesBeforeEdgeOffset(e,o),this._selectEdgeOffsetArrow(e,o);let l=()=>{this._cleanEdgeOffsetCollapsedEdges(e,n),this.removeHandles(G)},u=this.events.on(`undo`,l);return this.addHandles([this._initializeEdgeOffsetVisualElement(e,a,t,n),s,u,this._connectEdgeOffsetTooltip(e,o,n,()=>{r.execute({action:`cancel`})})],G),{initializeStep:e=>o==null||c==null?(l(),null):{...e,operation:o,plane:c},cleanup:l}}_initializeEdgeOffsetVisualElement(e,t,n,r){let i=()=>new se({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:r.data.spatialReference}),a=new P({view:this.view,isDraped:t.isDraped,geometry:i(),elevationInfo:n,width:this._settings.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0}),c=o([f(()=>({color:this._accentColor,draped:t.isDraped}),({color:e,draped:t})=>{a.color=e.toUnitRGBA(),a.isDraped=t},p),t.on(`committed`,()=>{a.geometry=i()}),s(a)]);return a.attached=!0,c}_applyEdgeOffsetStep(e){return t=>(this.destroyed||t.operation==null||!this._operations||(this._updateEventState(2),t.signedDistance==null?this._resetTooltip():((t.mapDeltaX||t.mapDeltaY||t.mapDeltaZ)&&(this._offsetEdge(e,t.operation,t.signedDistance),this.events.emit(`reshape`,{type:`reshape`,object:this.object})),this._updateEdgeOffsetTooltip(t))),t)}_cleanEdgeOffsetCollapsedEdges(e,t){let n=e.handle.leftVertex.leftSegment?.leftVertex,r=e.handle.leftVertex,i=e.handle.rightVertex.rightSegment?.rightVertex,a=e.handle.rightVertex,o=t.data.coordinateHelper,s=this.view.pixelSizeAt(o.vectorToDehydratedPoint(r.pos),o.spatialReference),c=[];if(n&&o.distance(n.pos,r.pos)<ze){let e=this._getManipulatorInfoFromHandle(r);e!=null&&c.push(e)}if(o.distance(r.pos,a.pos)<s||i&&o.distance(i.pos,a.pos)<ze){let e=this._getManipulatorInfoFromHandle(a);e!=null&&c.push(e)}c.length&&this._removeVertices(c)}_enterInputModeDuringEdgeOffset(e){let t=this._findActiveEdgeOffsetManipulatorInfo();return t&&H(e,this.tooltip)?t.manipulator.dragging?(this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:`drag`},!0):(this._clearSelection(),this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:`hover`},this._connectEdgeOffsetTooltipOnHover(t),!0):!1}_exitEdgeOffsetInputMode(){this.tooltip&&(this._pendingEdgeOffsetInfo=null,this._resetTooltip(),this.tooltip.exitInputMode())}_findActiveEdgeOffsetManipulatorInfo(){return this._manipulatorInfos.filter(Y).find(({manipulator:e})=>e.hovering||e.grabbing||e.dragging)}_connectEdgeOffsetTooltipOnHover(e){let{_operations:t,object:n}=this;if(!t)return;let{elevationInfo:r}=n,i=M(t.data.coordinateHelper,e.handle,r);this._selectEdgeOffsetArrow(e,i),this.addHandles([this._initializeEdgeOffsetVisualElement(e,n,r,t),this._connectEdgeOffsetTooltip(e,i,t,()=>{this.removeHandles(G),this._exitEdgeOffsetInputMode()})],G)}_splitEdgesBeforeEdgeOffset(e,t){if(t.requiresSplitEdgeLeft){let t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftSegment);t!=null&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){let t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightSegment);t!=null&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){let n=e.grabMapPoint??A(this.view.inputManager?.latestPointerInfo?.location,this.view,this.object,e);n&&t.selectArrowFromStartPoint(n)}_connectEdgeOffsetTooltip(e,t,n,r){let i=()=>this.tooltipInfos.edgeOffset.distance.actual,a=i=>{r(),queueMicrotask(()=>{this.view.focus();let r=n.createUndoGroup();this._tooltipCallbacks.onReshapeStart?.(),this._splitEdgesBeforeEdgeOffset(e,t),this._offsetEdge(e,t,Te(i,e.manipulator.location,t,n)),this._tooltipCallbacks.onReshape?.(),this._tooltipCallbacks.onReshapeStop?.(),this._cleanEdgeOffsetCollapsedEdges(e,n),r.remove()})},s=()=>{let e=i();e==null?r():a(e)};return o([m(()=>this.tooltip&&!this.tooltip.focused,()=>s(),h),this.tooltip.on(`discard`,r),this.tooltip.on(`commit`,e=>{e.type===`commit-and-exit`&&s()})])}_createVertexOrEdgeManipulator(e,t=this.object.elevationInfo,n=!1){let r=this.view,i=this._operations;if(!i)return null;let a=i.data.type,s=i.data.spatialReference;if(e.type===`line`){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(this._vertexManipulatorGeometry==null||this._vertexManipulatorOutlineGeometry==null){let{material:e,outlineMaterial:t}=this._vertexManipulatorMaterials;this._vertexManipulatorGeometry=T(e),this._vertexManipulatorOutlineGeometry=T(t)}if(this._edgeManipulatorGeometry==null||this._edgeManipulatorOutlineGeometry==null){let{material:e,outlineMaterial:t}=this._edgeManipulatorMaterials;this._edgeManipulatorGeometry=T(e),this._edgeManipulatorOutlineGeometry=T(t)}let c=this._vertexManipulatorGeometry,u=this._vertexManipulatorOutlineGeometry,d=[];if(a!==`point`&&a!==`mesh`){d.push(new E(c.instantiate(),Q|4),new E(u.instantiate(),Q|5),new E(u.instantiate({material:this._vertexManipulatorMaterials.focusedMaterial}),Q|6));{let{material:e,outlineMaterial:t,focusedMaterial:n}=this._selectedManipulatorMaterials;d.push(new E(c.instantiate({material:e}),8),new E(u.instantiate({material:t}),9),new E(u.instantiate({material:n}),10))}}if(this.enableMidpoints){let{material:e,focusedMaterial:t}=this._vertexManipulatorMaterials,n=this._edgeManipulatorGeometry,r=this._edgeManipulatorOutlineGeometry,i=$|6,a=$|5;d.push(new E(n.instantiate({material:e}),i),new E(r.instantiate({material:t}),i),new E(n.instantiate(),a),new E(r.instantiate(),a))}let f=e.type===`vertex`,p=new C({view:r,renderObjects:d,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,usePreciseLocalOrigin:a===`point`||a===`mesh`,available:this.object.visible,metadata:{deleting:!1},location:J(s),...pe});p.selected=n,this._setTypeSpecificManipulatorSettings(p,e,t);let m=f?{manipulator:p,handle:e,type:`vertex`,selectedIndex:0}:{manipulator:p,handle:e,locationUpdateHandle:null,type:`edge`,selectedIndex:0};if(this._manipulatorInfos.push(m),this.manipulators.add(p),this._updateManipulatorPosition(m),m.type===`edge`){let e=[];for(let t of[m.handle.leftVertex,m.handle.rightVertex]){let n=this._getManipulatorInfoFromHandle(t);n!=null&&e.push(n.manipulator.events.on(`location-update`,()=>this._updateManipulatorPosition(m)))}m.locationUpdateHandle=o(e),this._manipulatorHandles.add(m.locationUpdateHandle,p)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(p,!0),p);let h=R(p,(e,n,a,o)=>{let c=null,{snappingStep:u,cancelSnapping:d}=V({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new B({editGeometryOperations:i,elevationInfo:t,pointer:o,excludeFeature:this.object.graphic,visualizer:new he}),updatingHandles:this._updatingHandles,useZ:this.tool.snapToScene});a.next(t=>(this._onDragCancel(!e.metadata.deleting,()=>c=l(c)),t)).next(d);let{elevationAlignedLocation:f}=e,p=this.object.graphic??void 0,h=this.tool.snapToScene?this._screenToSceneMapForVertexDrag(t,i,p):D(r,f,t,s,p);n.next(e=>this._trackNumDragging(e)).next(e=>{if(e.action===`start`&&i&&(c=i.createUndoGroup()),m.type===`edge`){let t=this._splitEdgeManipulator(m);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:m,snapOrigin:m.handle.pos}}).next(z(r,f)).next(h).next(Me(r,t,p)).next(...u).next(L()).next(e=>{this._perVertexManipulatorDragAction(e),e.action===`end`&&(c=l(c)),this._resetTooltip()})});return this._manipulatorHandles.add([h,p.events.on(`immediate-click`,e=>this._manipulatorClickCallback(e,m)),p.events.on(`select-changed`,()=>{m.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()}),p.events.on(`focus-changed`,()=>{this._resetTooltip()})],p),this.events.emit(`manipulators-changed`),m}_screenToSceneMapForVertexDrag(e,t,n){let{view:r}=this,{coordinateHelper:i,spatialReference:a}=t.data,o=null;return t=>{if(t.action===`start`&&(o=i.vectorToPoint(t.snapOrigin)),o==null)return null;let s=r.toMap(t.screenEnd,{exclude:n,excludeLabels:!0});return s==null||(s.z=ue(s,r,e),!ce(s,s,a))?null:{...t,mapStart:o,mapEnd:s}}}_trackNumDragging(e){switch(e.action){case`start`:this._numDragging++;break;case`end`:this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&this.undo(),this.tool.snappingManager?.doneSnapping(),this._showReshapeControls(),this._resetTooltip(),this._reshapeEventState){case 0:break;case 1:this.events.emit(`move`,{type:`move`,dx:0,dy:0,object:this.object});break;case 2:this.events.emit(`reshape`,{type:`reshape`,object:this.object})}t?.(),this.destroyed||this._updateEventState(0)}_setTypeSpecificManipulatorSettings(e,t,n){let r=this._settings;switch(t.type){case`vertex`:{e.selectable=!0,e.cursor=`move`,e.collisionPriority=2,e.elevationInfo=n;let t=this._operations?.data.type;e.interactive=t!=null&&t!==`point`&&t!==`mesh`;let{size:i,collisionPadding:a}=r.manipulators.vertex;e.radius=i/2+a,e.state=Q;break}case`line`:{e.state=$,e.selectable=!1,e.cursor=`copy`,e.collisionPriority=2;let{size:t,collisionPadding:i}=r.manipulators.edge;e.radius=t/2+i,e.elevationInfo=n.mode===`on-the-ground`&&!de(this.object.graphic?.symbol)?n:{mode:`absolute-height`,offset:0};break}}}_watchAndUpdateGrabState(e,t){return e.events.on(`grab-changed`,n=>{this._onGrabStateChanged(e,t,n.action,n.pointerType)})}_onGrabStateChanged(e,t,n,r=`mouse`){if(!this._recreatingManipulators){if(n===`start`)t&&this._updateSelection(e),this._numGrabbing++,this._shouldHideReshapeControlsOnGrab(e)&&this._hideReshapeControls(),this._hideManipulatorsForEdgeOffset(e);else if(this._numGrabbing--,this.removeHandles(W),this._updateEventState(0),this._canShowReshapeControls&&this._showReshapeControls(),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,(r!==`touch`||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach(e=>{let{manipulator:t}=e,n=this._operations?.data.type;t.interactive=t.grabbing||!this._numGrabbing&&n!=null&&n!==`point`&&n!==`mesh`,Y(e)&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)}),this._objectMoveManipulation.forEachManipulator(e=>{e.interactive=e.grabbing||!this._numGrabbing}))}}_clearSelection(){for(let e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1);this._pendingEdgeOffsetInfo=null}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.events.emit(`manipulators-changed`))}_removeManipulator(e){e!=null&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),n(this._manipulatorInfos,e),this.events.emit(`manipulators-changed`),this._resetTooltip())}_getManipulatorInfoFromHandle(e){return this._manipulatorInfos.find(t=>t.handle===e)}_updateManipulatorPositions(e){if(!this._movingManipulatorsHidden)for(let t of e)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(t))}_updateManipulatorPosition(e){let t=this._operations;if(e!=null&&t){if(e.type===`vertex`)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,X),e.manipulator.grabbing&&this._vertexLaserLineVisualElement!=null&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if(e.type===`edge`){let n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),r=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(n==null||r==null)return;let i=n.manipulator,a=r.manipulator;if(e.manipulator.elevationInfo?.mode===`on-the-ground`){let n=i.location,r=a.location,o=.5,s=n.x+o*(r.x-n.x),c=n.y+o*(r.y-n.y),l=n.hasZ&&r.hasZ?0:void 0;e.manipulator.location=S(s,c,l,t.data.spatialReference)}else x(Z,i.renderLocation,a.renderLocation,.5),e.manipulator.renderLocation=Z}}}_splitEdgeManipulator(e,t=.5){let n=this._operations,r=n.splitSegment(e.handle,t).createdVertex;e.locationUpdateHandle=l(e.locationUpdateHandle);let i=this.object.elevationInfo,a;this.enableEdgeOffset?(this._removeManipulator(e),a=this._createVertexOrEdgeManipulator(r)):(a=e,a.handle=r,a.type=`vertex`,this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,i)),r.leftSegment?.type===`line`&&this._createVertexOrEdgeManipulator(r.leftSegment),r.rightSegment?.type===`line`&&this._createVertexOrEdgeManipulator(r.rightSegment),this._updateManipulatorPosition(a),this.enableEdgeOffset||this._resetTooltip(),this._updateSelection(e.manipulator);let o=this._updateEventState(2),s=n.data.coordinateHelper.vectorToArray(a.handle.pos),c=n.data.parts.indexOf(r.part);return this.events.emit(`vertex-add`,{type:`vertex-add`,object:this.object,vertices:[{coordinates:s,componentIndex:c,vertexIndex:r.index}],added:s}),o&&this._updateEventState(0),a}_updateMoveManipulationPosition(){let e=ee(Z,0,0,0),t=0,n=!1,r=null,i=null;for(let a of this._manipulatorInfos)a.type===`vertex`&&(a.manipulator.selected?(t++,te(e,e,a.manipulator.renderLocation),r==null||a.selectedIndex>r.selectedIndex?(i=r,r=a):(i==null||a.selectedIndex>i.selectedIndex)&&(i=a)):n=!0);let a=this.object,o=this._operations?.data.geometry;if(t===0){let e=a.visible&&this.enableMoveObject;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&O(this._operations,a.elevationInfo),this._moveManipulation.angle=ve(o),this._moveManipulation.radius=k.radiusForSymbol(a.graphic?.symbol)}else{let e=a.visible;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&O(this._operations,this.object.elevationInfo),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&t!==1;let n=0;if(r!=null){let e=r.handle.pos,t=i==null?r.handle.leftSegment?.leftVertex?r.handle.leftSegment.leftVertex.pos:null:i.handle.pos,a=i==null&&r.handle.rightSegment?.rightVertex?r.handle.rightSegment.rightVertex.pos:null;t&&a?this._moveManipulation.xyAxisManipulation.available=!1:t?n=Re(t,e):a&&(n=Re(e,a))}this._moveManipulation.angle=n,this._moveManipulation.radius=xe}t!==0&&n?(ne(e,e,1/t),X.spatialReference=this._operations.data.spatialReference,X.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,X),this._moveManipulation.elevationAlignedLocation=X):this._outlineVisualElement!=null&&!this.object.isDraped&&this._outlineVisualElement.attachmentOrigin!=null?this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin:fe(this._moveManipulation,this.object)}_removeVertices(e){let t=[],n=this._operations;if(!n)return;let r=e.filter(e=>e.type===`vertex`&&n.canRemoveVertex(e.handle.part));if(r.length>0){let e=this._createBeforeVertexRemoveEvent(r);if(this.events.emit(`before-vertex-remove`,e),e.defaultPrevented)return}for(let e of r){let r=e.handle.part;if(n.canRemoveVertex(r)){t.push(e.handle),this._removeManipulator(e),this._removeManipulator(this._getManipulatorInfoFromHandle(e.handle.leftSegment)),this._removeManipulator(this._getManipulatorInfoFromHandle(e.handle.rightSegment));let i=n.removeVertices([e.handle]).removedVertices?.[0].createdSegment;i&&i.type===`line`?this._createVertexOrEdgeManipulator(i):this.enableEdgeOffset&&r.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(r.segments[0]))}}if(t.length>0){let e=t.map(e=>{let t=n.data.parts.indexOf(e.part);return{coordinates:n.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}}),r=this._updateEventState(2);if(this.destroyed||(this.events.emit(`vertex-remove`,{type:`vertex-remove`,object:this.object,removed:e.map(e=>e.coordinates),vertices:e}),this.destroyed)||r&&(this._updateEventState(0),this.destroyed))return;this._updateMoveManipulationPosition()}}_createBeforeVertexRemoveEvent(e){let t=this._operations,n=e.map(e=>{let n=t.data.parts.indexOf(e.handle.part);return{coordinates:t.data.coordinateHelper.vectorToArray(e.handle.pos),componentIndex:n,vertexIndex:e.handle.index}}),r=!1;return{type:`before-vertex-remove`,object:this.object,removed:n.map(e=>e.coordinates),vertices:n,get defaultPrevented(){return r},preventDefault(){r=!0}}}_moveVertices(e,t,n=t.action===`start`?0:1){let r=this._operations;if(r&&(e.length>0&&r.moveVertices(e.map(e=>e.handle),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,n),!this._movingManipulatorsHidden))for(let t of e)this._updateManipulatorPosition(t)}_offsetEdge(e,t,n){if(!this._operations)return;let r=t.clone();r.distance=n,this._operations.updateVertices([e.handle.leftVertex,e.handle.rightVertex],r),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),t.type===`vertex`&&(t.manipulator.selected=!t.manipulator.selected,this.enableDeleteVertices&&e.button===I.Right&&this._removeVertices([t])),t.type===`edge`&&e.button===I.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){this._defaultTooltipInfo==null?this._updateTranslateObjectTooltip(e,t):this._resetTooltip()}_updateTranslateObjectTooltip(e,t){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=Oe(e,t,this._tooltipsContext,this._updatingHandles))}_updateEdgeOffsetTooltip(e){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=N(this.object,e,this._tooltipsContext,this._updatingHandles))}_resetTooltip(){let e=this.activeTooltipInfo;if(this._pendingEdgeOffsetInfo&&e?.type===`reshape-edge-offset`)return;let t=null;t=this._pendingEdgeOffsetInfo||this._findActiveEdgeOffsetManipulatorInfo()!=null?N(this.object,null,this._tooltipsContext,this._updatingHandles):this._defaultTooltipInfo,t!==e&&(e==null||t==null||this.tooltip.mode!==`input`)&&(this.activeTooltipInfo=t)}get _defaultTooltipInfo(){switch(this._operations?.data.type){case`polyline`:case`polygon`:return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case`point`:case`mesh`:return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){let e=this._manipulatorInfos.filter(e=>e.type===`vertex`&&e.manipulator.selected);return e.length===1?e[0]:null}get _someVerticesSelected(){return this._manipulatorInfos.some(e=>e.type===`vertex`&&e.manipulator.selected)}_forEachVertex(e){for(let t of this._manipulatorInfos)t.type===`vertex`&&e(t)}get _tooltipsContext(){let{tooltipInfos:e,activeTooltipInfo:t}=this;return{toolOptions:this._toolOptions,tooltipInfos:e,activeTooltipInfo:t,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:this._tooltipCallbacks,measurementWorker:this._measurementWorker}}get test(){}};e([g()],q.prototype,`_numGrabbing`,void 0),e([g()],q.prototype,`_numDragging`,void 0),e([g()],q.prototype,`_pendingEdgeOffsetInfo`,void 0),e([g()],q.prototype,`_operations`,null),e([g()],q.prototype,`_segmentLabels`,void 0),e([g({constructOnly:!0})],q.prototype,`tool`,void 0),e([g()],q.prototype,`tooltip`,void 0),e([g()],q.prototype,`activeTooltipInfo`,void 0),e([g({readOnly:!0})],q.prototype,`updating`,null),e([g()],q.prototype,`manipulators`,null),e([g()],q.prototype,`view`,null),e([g()],q.prototype,`object`,null),e([g()],q.prototype,`enableZShape`,null),e([g()],q.prototype,`enableDeleteVertices`,null),e([g()],q.prototype,`enableZVertex`,null),e([g()],q.prototype,`autoHideManipulators`,null),e([g()],q.prototype,`enableMoveObject`,null),e([g()],q.prototype,`enableMidpoints`,null),e([g()],q.prototype,`enableEdgeOffset`,null),e([g()],q.prototype,`_toolOptions`,null),e([g()],q.prototype,`_accentColor`,null),e([g()],q.prototype,`_tooltipsContext`,null),q=e([_(`esri.views.3d.interactive.editingTools.reshape.ReshapeOperation`)],q);function Le(){return e=>{let{operation:t,mapEnd:n}=e;return t==null||n==null?e:{...e,signedDistance:t.signedDistanceToPoint(n)}}}function Re(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function J(e){return new oe({x:0,y:0,z:0,spatialReference:e})}function Y(e){return e.type===`edge`&&`edgeManipulator`in e}const X=S(0,0,void 0,le.WGS84),Z=ie(),ze=1e-6,Q=16,$=32;export{q as ReshapeOperation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as n}from"../../../../../core/colorUtils.js";import{cyclicalPI as r}from"../../../../../core/Cyclical.js";import{EventEmitter as i}from"../../../../../core/Evented.js";import"../../../../../core/has.js";import{clamp as a,rad2deg as o}from"../../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as c,initial as l}from"../../../../../core/reactiveUtils.js";import{addFrameTask as u}from"../../../../../core/scheduling.js";import{createScreenPointArray as d}from"../../../../../core/screenUtils.js";import{property as f,subclass as p}from"../../../../../core/accessorSupport/decorators.js";import{fromRotation as m,fromScaling as h,multiply as g,scale as _,rotate as v}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as ee}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as y,subtract as b,length as x,squaredDistance as S,cross as C,add as w}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as T,clone as E}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPositionAndNormal as D,create as te,getNormal as O}from"../../../../../geometry/support/plane.js";import{wrap as k,distance2 as A}from"../../../../../geometry/support/ray.js";import{sm4d as j,sv3d as M}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as N}from"../../Manipulator3D.js";import{calculateInputRotationTransform as P}from"../../manipulatorUtils.js";import{RenderObject as F}from"../../RenderObject.js";import{screenToRenderPlane as ne}from"../dragEventPipeline3D.js";import{ringIndicatorDelayMs as re,rotateIndicatorArrowPlacementPercentage as I,ringThickness as L,ringRadius as R,innerIndicatorRadius as ie,outerIndicatorRadius as z,rotateIndicatorArrowTipRadius as ae,rotateIndicatorArrowTipLength as oe,scaleIndicatorOffset1 as B,scaleIndicatorOffset2 as V,indicatorThickness as H,geometrySegments as U,rotateIndicatorArcLength as W,scaleIndicatorArcLength as G,rotateIndicatorDirectionBuffer as K,scaleIndicatorDirectionBuffer as se,ringHeight as q,dragThresholdPx as J,ringResetAnimationSpeedFactor as ce}from"../manipulations/config.js";import{createExtrudedTriangle as le,transformInPlace as ue,createPathExtrusionGeometry as de}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as fe}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as pe}from"../../../../interactive/dragEventPipeline.js";const Y={ScaleIn:32,ScaleOut:64,RotateLeft:128,RotateRight:256,Unlocked:1024,DelayedFocused:2048};let X=class extends t{get angle(){return this.adapter.angle}get scale(){return this.adapter.scale}set location(e){this._ringManipulator.location=e}set elevationAlignedLocation(e){this._ringManipulator.elevationAlignedLocation=e}get grabbing(){return this._ringManipulator.grabbing}set interactive(e){this._ringManipulator.interactive=e}get updating(){return!!this._activeAnimation}constructor(e){super(e),this.mode=null,this._scaleRotateDragData=null,this._activeAnimation=null,this._ringIndicatorDelayMs=re,this.events=new i,this.getFocused=()=>this._ringManipulator.focused,this.getScale=()=>this._scaleRotateDragData?.mode===`scale`?this.adapter.scale:1}initialize(){this._createManipulator(),this._updateDragState(),this._updateManipulatorTransform(),this.addHandles([c(()=>{let{adapter:e}=this;return[e.angle,e.scale]},()=>this._updateManipulatorTransform())])}destroy(){this._activeAnimation?.frameTask.remove(),this._activeAnimation=null,this.tool.manipulators.remove(this._ringManipulator),this._ringManipulator=null}startAnimation(e){this.cancelActiveAnimation(),e.start();let t=u({update:({deltaTime:t})=>{e.update(t)&&this.cancelActiveAnimation()}});this._activeAnimation={...e,frameTask:t}}cancelActiveAnimation(){this._activeAnimation?.frameTask.remove(),this._activeAnimation=s(this._activeAnimation)}forEachManipulator(e){e(this._ringManipulator,4)}disableDisplay(){return this._ringManipulator.disableDisplay()}_createManipulator(){let e=this._createRingManipulator();this._ringManipulator=e,this.tool.manipulators.add(e);let t=this.tool.object,n=pe(e,(e,n,i)=>{this._scaleRotateDragData=null;let s=this.adapter.startInteraction(),c={mode:`none`,origin:E(e.renderLocation),initialAngle:this.adapter.angle,angle:0,angleDir:0,scaleDir:0};this._scaleRotateDragData=c,this._updateDragState();let l=M.get();this.tool.view.renderCoordsHelper.worldUpAtPosition(e.renderLocation,l),n.next(ne(this.tool.view,D(e.renderLocation,l,te()))).next(e=>{let n=O(e.plane),i=P(e.renderStart,e.renderEnd,c.origin,n),l=r.shortestSignedDiff(c.angle,i);c.angleDir=a(c.angleDir+l,-.3,K),c.angle=i;let u=me(c,e),d=u-this.adapter.scale;if(c.scaleDir=a(c.scaleDir+d,-.2,se),this._onScaleChanged(),c.mode===`none`){let n=this.mode||he(e,e.plane,c.origin,this.tool.view.state.camera);if(n!=null){switch(n){case`rotate`:this.tool.events.emit(`rotate-start`,{object:t,angle:0}),this.tool.events.emit(`record-undo`,{updates:[this.adapter.createUndoRecord()]});break;case`scale`:this.tool.events.emit(`scale-start`,{object:t,xScale:1,yScale:1}),this.tool.events.emit(`record-undo`,{updates:[this.adapter.createUndoRecord()]})}c.mode=n}}switch(c.mode){case`rotate`:s.state.angle=c.initialAngle+i;break;case`scale`:s.state.scale=u,this._onScaleChanged()}switch(this._updateDragState(),this._updateManipulatorTransform(),e.action){case`start`:case`update`:switch(c.mode){case`rotate`:this.tool.events.emit(`rotate`,{object:t,angle:o(c.angle)});break;case`scale`:this.tool.events.emit(`scale`,{object:t,xScale:u,yScale:u})}break;case`end`:switch(c.mode){case`rotate`:this.tool.events.emit(`rotate-stop`,{object:t,angle:o(c.angle)});break;case`scale`:this.tool.events.emit(`scale-stop`,{object:t,xScale:u,yScale:u})}}return e.action===`end`&&(this.startAnimation(Q(this,()=>this._onScaleChanged())),this._scaleRotateDragData=null,this._updateDragState(),s.done()),e}),i.next(()=>{if(s.cancel(),this._scaleRotateDragData!=null){switch(this._scaleRotateDragData.mode){case`none`:break;case`rotate`:this.tool.events.emit(`rotate-stop`,{object:t,angle:0});break;case`scale`:this.tool.events.emit(`scale-stop`,{object:t,xScale:1,yScale:1})}this.startAnimation(Q(this,()=>this._onScaleChanged())),this._scaleRotateDragData=null,this._updateDragState()}})});this.addHandles([n,e.events.on(`focus-changed`,e=>{e.action===`focus`?this.startAnimation(ge(this,()=>this._updateDelayedFocusedState(),{delayMs:this._ringIndicatorDelayMs})):this._updateDelayedFocusedState()}),e.events.on(`immediate-click`,e=>{e.stopPropagation()}),c(()=>this.tool.object.visible,e=>this._ringManipulator.available=e,l)])}_onScaleChanged(){this.events.emit(`scale-changed`),this._updateManipulatorTransform()}_updateDelayedFocusedState(){this._ringManipulator.updateStateEnabled(Y.DelayedFocused,this.getFocused())}_updateDragState(){if(this._ringManipulator.updateStateEnabled(Y.Unlocked,this._scaleRotateDragData==null||this._scaleRotateDragData?.mode===`none`),this._scaleRotateDragData!=null)switch(this._scaleRotateDragData.mode){case`rotate`:this._ringManipulator.updateStateEnabled(Y.ScaleIn|Y.ScaleOut,!1),this._ringManipulator.updateStateEnabled(Y.RotateLeft,this._scaleRotateDragData.angleDir<0),this._ringManipulator.updateStateEnabled(Y.RotateRight,this._scaleRotateDragData.angleDir>=0);break;case`scale`:this._ringManipulator.updateStateEnabled(Y.RotateLeft|Y.RotateRight,!1),this._ringManipulator.updateStateEnabled(Y.ScaleIn,this._scaleRotateDragData.scaleDir<0),this._ringManipulator.updateStateEnabled(Y.ScaleOut,this._scaleRotateDragData.scaleDir>=0)}else this._ringManipulator.updateStateEnabled(Y.ScaleIn|Y.ScaleOut|Y.RotateLeft|Y.RotateRight,!1)}_updateManipulatorTransform(){let e=m(j.get(),this.adapter.angle,T(0,0,1));if(e==null)return;let t=this.getScale(),n=h(j.get(),y(M.get(),t,t,t));this._ringManipulator.modelTransform=g(j.get(),n,e)}_createRingManipulator(){let e=(e,t,n)=>{let r=[],i=Math.ceil(U*(t-e)/(2*Math.PI));for(let a=0;a<i+1;a++){let o=e+a*(t-e)/i;r.push(T(n*Math.cos(o),n*Math.sin(o),0))}return r},t=t=>e(0,Math.PI*2,t),n=e=>[[-e/2,0],[e/2,0],[e/2,q/2],[-e/2,q/2]],r=this._createMaterial(1),i=(e,t,i=r)=>de(i,n(t),e,[],[],!1),a=t(R),o=i(a,L),s={left:[],right:[]},c=[];for(let t=0;t<2;t++){let n=t*Math.PI-Math.PI/4,a=Math.PI/2-W,o=n+a,l=n+Math.PI/2-a,u=e(o,l,ie),d=i(u,H);c.push(u),c.push(e(o,l,z-L/2)),s.left.push(d),s.right.push(d.instantiate());for(let e=0;e<2;e++){let t=e===0,n=ee();if(t){_(n,n,[1,-1,1]),v(n,n,-o,[0,0,1]);let e=Math.round(I*(u.length-1));n[12]=u[e][0],n[13]=u[e][1],n[14]=u[e][2]}else{v(n,n,l,[0,0,1]);let e=Math.round((1-I)*(u.length-1));n[12]=u[e][0],n[13]=u[e][1],n[14]=u[e][2]}let i=le(r,oe,0,ae,q);ue(i,n),(t?s.left:s.right).push(i)}}let l=[];for(let t=0;t<2;t++){let n=t*Math.PI-Math.PI/4,r=Math.PI/2-G,a=e(n+r,n+Math.PI/2-r,z);l.push(i(a,H))}let u=this._createMaterial(.66),d=this._createMaterial(.5),f=this._createMaterial(.33),p=t(R+B),m=t(R+V),h=i(p,H,u),g=i(m,H,f),y=t(R-B),b=t(R-V),x=i(y,H,u),S=i(b,H,f),C=[new F(o,Y.DelayedFocused),new F(o.instantiate({material:d}),0)];this.mode&&this.mode!==`scale`||(C=C.concat([...l.map(e=>new F(e,Y.DelayedFocused|Y.Unlocked)),new F(h,Y.DelayedFocused|Y.ScaleIn),new F(g,Y.DelayedFocused|Y.ScaleIn),new F(x,Y.DelayedFocused|Y.ScaleOut),new F(S,Y.DelayedFocused|Y.ScaleOut)])),this.mode&&this.mode!==`rotate`||(C=C.concat([...s.right.map(e=>new F(e.instantiate(),Y.DelayedFocused|Y.Unlocked)),...s.left.map(e=>new F(e,Y.DelayedFocused|Y.RotateLeft)),...s.right.map(e=>new F(e,Y.DelayedFocused|Y.RotateRight))]));let w=[a,...c];return new N({view:this.tool.view,renderObjects:C,autoScaleRenderObjects:!1,worldOriented:!0,radius:L,focusMultiplier:1,touchMultiplier:1.5,elevationInfo:this.tool.object.elevationInfo,collisionType:{type:`ribbon`,paths:w,direction:T(0,0,1)}})}_createMaterial(e){let t=new fe({cullFace:2,renderOccluded:2,isDecoration:!0});return this.addHandles(c(()=>n(this.tool.view.effectiveTheme.accentColor,e),e=>t.setParameters({color:e}),l)),t}get test(){}};e([f({constructOnly:!0})],X.prototype,`tool`,void 0),e([f({constructOnly:!0})],X.prototype,`adapter`,void 0),e([f({constructOnly:!0})],X.prototype,`toolOptions`,void 0),e([f()],X.prototype,`mode`,void 0),e([f()],X.prototype,`_activeAnimation`,void 0),e([f()],X.prototype,`updating`,null),X=e([p(`esri.views.3d.interactive.editingTools.transform.ScaleRotateTransform`)],X);function me(e,t){let n=b(M.get(),t.renderStart,e.origin),r=b(M.get(),t.renderEnd,e.origin),i=x(n),a=x(r);return i===0?0:a/i}function he(e,t,n,r){let{renderStart:i,renderEnd:a}=e,o=Z(i,r,M.get()),s=Z(a,r,M.get());if(S(o,s)<J*J)return null;let c=b(M.get(),i,n),l=C(M.get(),c,O(t)),u=i,d=w(M.get(),u,l),f=Z(n,r,M.get()),p=o,m=Z(d,r,M.get()),h=b(M.get(),m,p),g=b(M.get(),o,f),_=k(p,h),v=k(f,g);return A(_,s)<A(v,s)?`rotate`:`scale`}function Z(e,t,n){return t.projectToScreen(e,$),y(n,$[0],$[1],0)}function Q(e,t){let n=null,r=1,i=()=>r;return{start:()=>{r=e.getScale(),n=e.getScale,e.getScale=i,t()},update:e=>{let n=(r+1)/2-r;return r+=n*Math.min(e*ce,1),t(),+(Math.abs(r-1)<.01)},destroy:()=>{n&&(e.getScale=n),t()}}}function ge(e,t,n){let r=0,i=null,a=()=>!1;return{start:()=>{i=e.getFocused,e.getFocused=a,r=0,t()},update:e=>(r+=e,+(!i?.()||r>=n.delayMs)),destroy:()=>{i&&(e.getFocused=i),t()}}}const $=d();export{X as ScaleRotateTransform};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as n}from"../../../../../core/colorUtils.js";import{cyclicalPI as r}from"../../../../../core/Cyclical.js";import{EventEmitter as i}from"../../../../../core/Evented.js";import"../../../../../core/has.js";import{clamp as a,rad2deg as o}from"../../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as c,initial as l}from"../../../../../core/reactiveUtils.js";import{addFrameTask as u}from"../../../../../core/scheduling.js";import{createScreenPointArray as d}from"../../../../../core/screenUtils.js";import{property as f,subclass as p}from"../../../../../core/accessorSupport/decorators.js";import{fromRotation as m,fromScaling as h,multiply as g,scale as _,rotate as v}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as ee}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as y,subtract as b,length as x,squaredDistance as S,cross as C,add as w}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as T,clone as E}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPositionAndNormal as D,create as te,getNormal as O}from"../../../../../geometry/support/plane.js";import{wrap as k,distance2 as A}from"../../../../../geometry/support/ray.js";import{sm4d as j,sv3d as M}from"../../../../../geometry/support/vectorStacks.js";import{Manipulator3D as N}from"../../Manipulator3D.js";import{calculateInputRotationTransform as P}from"../../manipulatorUtils.js";import{RenderObject as F}from"../../RenderObject.js";import{screenToRenderPlane as ne}from"../dragEventPipeline3D.js";import{ringIndicatorDelayMs as re,rotateIndicatorArrowPlacementPercentage as I,ringThickness as L,ringRadius as R,innerIndicatorRadius as ie,outerIndicatorRadius as z,rotateIndicatorArrowTipRadius as ae,rotateIndicatorArrowTipLength as oe,scaleIndicatorOffset1 as B,scaleIndicatorOffset2 as V,indicatorThickness as H,geometrySegments as U,rotateIndicatorArcLength as W,scaleIndicatorArcLength as G,rotateIndicatorDirectionBuffer as K,scaleIndicatorDirectionBuffer as se,ringHeight as q,dragThresholdPx as J,ringResetAnimationSpeedFactor as ce}from"../manipulations/config.js";import{createExtrudedTriangle as le,transformInPlace as ue,createPathExtrusionGeometry as de}from"../../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as fe}from"../../../webgl-engine/materials/ColorMaterial.js";import{createManipulatorDragEventPipeline as pe}from"../../../../interactive/dragEventPipeline.js";const Y={ScaleIn:32,ScaleOut:64,RotateLeft:128,RotateRight:256,Unlocked:1024,DelayedFocused:2048};let X=class extends t{get angle(){return this.adapter.angle}get scale(){return this.adapter.scale}set location(e){this._ringManipulator.location=e}set elevationAlignedLocation(e){this._ringManipulator.elevationAlignedLocation=e}get grabbing(){return this._ringManipulator.grabbing}set interactive(e){this._ringManipulator.interactive=e}get updating(){return!!this._activeAnimation}constructor(e){super(e),this.mode=null,this._scaleRotateDragData=null,this._activeAnimation=null,this._ringIndicatorDelayMs=re,this.events=new i,this.getFocused=()=>this._ringManipulator.focused,this.getScale=()=>this._scaleRotateDragData?.mode===`scale`?this.adapter.scale:1}initialize(){this._createManipulator(),this._updateDragState(),this._updateManipulatorTransform(),this.addHandles([c(()=>{let{adapter:e}=this;return[e.angle,e.scale]},()=>this._updateManipulatorTransform())])}destroy(){this._activeAnimation?.frameTask.remove(),this._activeAnimation=null,this.tool.manipulators.remove(this._ringManipulator),this._ringManipulator=null}startAnimation(e){this.cancelActiveAnimation(),e.start();let t=u({update:({deltaTime:t})=>{e.update(t)&&this.cancelActiveAnimation()}});this._activeAnimation={...e,frameTask:t}}cancelActiveAnimation(){this._activeAnimation?.frameTask.remove(),this._activeAnimation=s(this._activeAnimation)}forEachManipulator(e){e(this._ringManipulator,4)}disableDisplay(){return this._ringManipulator.disableDisplay()}_createManipulator(){let e=this._createRingManipulator();this._ringManipulator=e,this.tool.manipulators.add(e);let t=this.tool.object,n=pe(e,(e,n,i)=>{this._scaleRotateDragData=null;let s=this.adapter.startInteraction(),c={mode:`none`,origin:E(e.renderLocation),initialAngle:this.adapter.angle,angle:0,angleDir:0,scaleDir:0};this._scaleRotateDragData=c,this._updateDragState();let l=M.get();this.tool.view.renderCoordsHelper.worldUpAtPosition(e.renderLocation,l),n.next(ne(this.tool.view,D(e.renderLocation,l,te()))).next(e=>{let n=O(e.plane),i=P(e.renderStart,e.renderEnd,c.origin,n),l=r.shortestSignedDiff(c.angle,i);c.angleDir=a(c.angleDir+l,-.3,K),c.angle=i;let u=me(c,e),d=u-this.adapter.scale;if(c.scaleDir=a(c.scaleDir+d,-.2,se),this._onScaleChanged(),c.mode===`none`){let n=this.mode||he(e,e.plane,c.origin,this.tool.view.state.camera);if(n!=null){switch(n){case`rotate`:this.tool.events.emit(`rotate-start`,{object:t,angle:0}),this.tool.events.emit(`record-undo`,{updates:[this.adapter.createUndoRecord()]});break;case`scale`:this.tool.events.emit(`scale-start`,{object:t,xScale:1,yScale:1}),this.tool.events.emit(`record-undo`,{updates:[this.adapter.createUndoRecord()]})}c.mode=n}}switch(c.mode){case`rotate`:s.state.angle=c.initialAngle+i;break;case`scale`:s.state.scale=u,this._onScaleChanged()}switch(this._updateDragState(),this._updateManipulatorTransform(),e.action){case`start`:case`update`:switch(c.mode){case`rotate`:this.tool.events.emit(`rotate`,{object:t,angle:o(c.angle)});break;case`scale`:this.tool.events.emit(`scale`,{object:t,xScale:u,yScale:u})}break;case`end`:switch(c.mode){case`rotate`:this.tool.events.emit(`rotate-stop`,{object:t,angle:o(c.angle)});break;case`scale`:this.tool.events.emit(`scale-stop`,{object:t,xScale:u,yScale:u})}}return e.action===`end`&&(this.startAnimation(Q(this,()=>this._onScaleChanged())),this._scaleRotateDragData=null,this._updateDragState(),s.done()),e}),i.next(()=>{if(s.cancel(),this._scaleRotateDragData!=null){switch(this._scaleRotateDragData.mode){case`none`:break;case`rotate`:this.tool.events.emit(`rotate-stop`,{object:t,angle:0});break;case`scale`:this.tool.events.emit(`scale-stop`,{object:t,xScale:1,yScale:1})}this.startAnimation(Q(this,()=>this._onScaleChanged())),this._scaleRotateDragData=null,this._updateDragState()}})});this.addHandles([n,e.events.on(`focus-changed`,e=>{e.action===`focus`?this.startAnimation(ge(this,()=>this._updateDelayedFocusedState(),{delayMs:this._ringIndicatorDelayMs})):this._updateDelayedFocusedState()}),e.events.on(`immediate-click`,e=>{e.stopPropagation()}),c(()=>this.tool.object.visible,e=>this._ringManipulator.available=e,l)])}_onScaleChanged(){this.events.emit(`scale-changed`),this._updateManipulatorTransform()}_updateDelayedFocusedState(){this._ringManipulator.updateStateEnabled(Y.DelayedFocused,this.getFocused())}_updateDragState(){if(this._ringManipulator.updateStateEnabled(Y.Unlocked,this._scaleRotateDragData==null||this._scaleRotateDragData?.mode===`none`),this._scaleRotateDragData!=null)switch(this._scaleRotateDragData.mode){case`rotate`:this._ringManipulator.updateStateEnabled(Y.ScaleIn|Y.ScaleOut,!1),this._ringManipulator.updateStateEnabled(Y.RotateLeft,this._scaleRotateDragData.angleDir<0),this._ringManipulator.updateStateEnabled(Y.RotateRight,this._scaleRotateDragData.angleDir>=0);break;case`scale`:this._ringManipulator.updateStateEnabled(Y.RotateLeft|Y.RotateRight,!1),this._ringManipulator.updateStateEnabled(Y.ScaleIn,this._scaleRotateDragData.scaleDir<0),this._ringManipulator.updateStateEnabled(Y.ScaleOut,this._scaleRotateDragData.scaleDir>=0)}else this._ringManipulator.updateStateEnabled(Y.ScaleIn|Y.ScaleOut|Y.RotateLeft|Y.RotateRight,!1)}_updateManipulatorTransform(){let e=m(j.get(),this.adapter.angle,T(0,0,1));if(e==null)return;let t=this.getScale(),n=h(j.get(),y(M.get(),t,t,t));this._ringManipulator.modelTransform=g(j.get(),n,e)}_createRingManipulator(){let e=(e,t,n)=>{let r=[],i=Math.ceil(U*(t-e)/(2*Math.PI));for(let a=0;a<i+1;a++){let o=e+a*(t-e)/i;r.push(T(n*Math.cos(o),n*Math.sin(o),0))}return r},t=t=>e(0,Math.PI*2,t),n=e=>[[-e/2,0],[e/2,0],[e/2,q/2],[-e/2,q/2]],r=this._createMaterial(1),i=(e,t,i=r)=>de(i,n(t),e,[],[],!1),a=t(R),o=i(a,L),s={left:[],right:[]},c=[];for(let t=0;t<2;t++){let n=t*Math.PI-Math.PI/4,a=Math.PI/2-W,o=n+a,l=n+Math.PI/2-a,u=e(o,l,ie),d=i(u,H);c.push(u),c.push(e(o,l,z-L/2)),s.left.push(d),s.right.push(d.instantiate());for(let e=0;e<2;e++){let t=e===0,n=ee();if(t){_(n,n,[1,-1,1]),v(n,n,-o,[0,0,1]);let e=Math.round(I*(u.length-1));n[12]=u[e][0],n[13]=u[e][1],n[14]=u[e][2]}else{v(n,n,l,[0,0,1]);let e=Math.round((1-I)*(u.length-1));n[12]=u[e][0],n[13]=u[e][1],n[14]=u[e][2]}let i=le(r,oe,0,ae,q);ue(i,n),(t?s.left:s.right).push(i)}}let l=[];for(let t=0;t<2;t++){let n=t*Math.PI-Math.PI/4,r=Math.PI/2-G,a=e(n+r,n+Math.PI/2-r,z);l.push(i(a,H))}let u=this._createMaterial(.66),d=this._createMaterial(.5),f=this._createMaterial(.33),p=t(R+B),m=t(R+V),h=i(p,H,u),g=i(m,H,f),y=t(R-B),b=t(R-V),x=i(y,H,u),S=i(b,H,f),C=[new F(o,Y.DelayedFocused),new F(o.instantiate({material:d}),0)];this.mode&&this.mode!==`scale`||(C=C.concat([...l.map(e=>new F(e,Y.DelayedFocused|Y.Unlocked)),new F(h,Y.DelayedFocused|Y.ScaleIn),new F(g,Y.DelayedFocused|Y.ScaleIn),new F(x,Y.DelayedFocused|Y.ScaleOut),new F(S,Y.DelayedFocused|Y.ScaleOut)])),this.mode&&this.mode!==`rotate`||(C=C.concat([...s.right.map(e=>new F(e.instantiate(),Y.DelayedFocused|Y.Unlocked)),...s.left.map(e=>new F(e,Y.DelayedFocused|Y.RotateLeft)),...s.right.map(e=>new F(e,Y.DelayedFocused|Y.RotateRight))]));let w=[a,...c];return new N({view:this.tool.view,renderObjects:C,autoScaleRenderObjects:!1,worldOriented:!0,radius:L,focusMultiplier:1,touchMultiplier:1.5,elevationInfo:this.tool.object.elevationInfo,collisionType:{type:`ribbon`,paths:w,direction:T(0,0,1)}})}_createMaterial(e){let t=new fe({cullFace:2,renderOccluded:2,isDecoration:!0},this.tool.view.state.isGlobal);return this.addHandles(c(()=>n(this.tool.view.effectiveTheme.accentColor,e),e=>t.setParameters({color:e}),l)),t}get test(){}};e([f({constructOnly:!0})],X.prototype,`tool`,void 0),e([f({constructOnly:!0})],X.prototype,`adapter`,void 0),e([f({constructOnly:!0})],X.prototype,`toolOptions`,void 0),e([f()],X.prototype,`mode`,void 0),e([f()],X.prototype,`_activeAnimation`,void 0),e([f()],X.prototype,`updating`,null),X=e([p(`esri.views.3d.interactive.editingTools.transform.ScaleRotateTransform`)],X);function me(e,t){let n=b(M.get(),t.renderStart,e.origin),r=b(M.get(),t.renderEnd,e.origin),i=x(n),a=x(r);return i===0?0:a/i}function he(e,t,n,r){let{renderStart:i,renderEnd:a}=e,o=Z(i,r,M.get()),s=Z(a,r,M.get());if(S(o,s)<J*J)return null;let c=b(M.get(),i,n),l=C(M.get(),c,O(t)),u=i,d=w(M.get(),u,l),f=Z(n,r,M.get()),p=o,m=Z(d,r,M.get()),h=b(M.get(),m,p),g=b(M.get(),o,f),_=k(p,h),v=k(f,g);return A(_,s)<A(v,s)?`rotate`:`scale`}function Z(e,t,n){return t.projectToScreen(e,$),y(n,$[0],$[1],0)}function Q(e,t){let n=null,r=1,i=()=>r;return{start:()=>{r=e.getScale(),n=e.getScale,e.getScale=i,t()},update:e=>{let n=(r+1)/2-r;return r+=n*Math.min(e*ce,1),t(),+(Math.abs(r-1)<.01)},destroy:()=>{n&&(e.getScale=n),t()}}}function ge(e,t,n){let r=0,i=null,a=()=>!1;return{start:()=>{i=e.getFocused,e.getFocused=a,r=0,t()},update:e=>(r+=e,+(!i?.()||r>=n.delayMs)),destroy:()=>{i&&(e.getFocused=i),t()}}}const $=d();export{X as ScaleRotateTransform};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{colorVectorToColorAndOpacity as e}from"../../../core/colorUtils.js";import{invert as t}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{subtract as n,cross as r,transformMat4 as i,normalize as a}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{sv3d as o,sm4d as s}from"../../../geometry/support/vectorStacks.js";import{hydrateGeometry as c}from"../../../layers/graphics/hydratedFeatures.js";import{manipulatedObjectGeometry as l}from"./editingTools/manipulatedObjectUtils.js";import{computeCentroid as u}from"../layers/graphics/graphicUtils.js";import{createSphereGeometry as d}from"../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as f}from"../webgl-engine/materials/ColorMaterial.js";function p(t,n=4,
|
|
2
|
+
import{colorVectorToColorAndOpacity as e}from"../../../core/colorUtils.js";import{invert as t}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{subtract as n,cross as r,transformMat4 as i,normalize as a}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{sv3d as o,sm4d as s}from"../../../geometry/support/vectorStacks.js";import{hydrateGeometry as c}from"../../../layers/graphics/hydratedFeatures.js";import{manipulatedObjectGeometry as l}from"./editingTools/manipulatedObjectUtils.js";import{computeCentroid as u}from"../layers/graphics/graphicUtils.js";import{createSphereGeometry as d}from"../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as f}from"../webgl-engine/materials/ColorMaterial.js";function p(t,n,r=4,i=!0,a){let o=e(n),s=!(n[3]<1);return new f({color:o,writeDepth:s,cullFace:2,renderOccluded:r,isDecoration:!0,shading:i?2:0,screenSizeScale:a,screenSizeEnabled:a!=null},t)}function m({spherical:e,color:t,focusedColor:n,outlineColor:r,focusedOutlineColor:i,screenSize:a,renderOccluded:o=4,shaded:s=!0}){let c=p(e,t,o,s,a?.size),l,u;if(r!=null){let t=i??r,n=a==null?void 0:a.size+a.outlineSize*2;l=h(e,t,o,n),u=h(e,r,o,n)}else l=p(e,n??t,o,s,a?.size),u=c;return{material:c,focusedMaterial:l,outlineMaterial:u}}function h(t,n,r=4,i){return new f({color:e(n),writeDepth:!0,cullFace:1,renderOccluded:r,isDecoration:!0,forceTransparentMode:!0,...i==null?{}:{screenSizeEnabled:!0,screenSizeScale:i}},t)}function g(e,t=.5,n=[0,0,0]){return d(e,t,16,16,{offset:n})}const _=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0}),v=Object.freeze({calloutLength:40,calloutWidth:1,discRadius:27,focusMultiplier:1.1}),y=Object.freeze({autoScaleRenderObjects:!1,worldSized:!0});function b(e,a,c,l){let u=n(o.get(),e,c),d=x(u,r(o.get(),l,u),c,s.get());t(d,d);let f=i(o.get(),a,d);return Math.atan2(f[1],f[0])}function x(e,t,n,i){let s=a(o.get(),e),c=a(o.get(),t),l=r(o.get(),s,c);return i[0]=s[0],i[1]=s[1],i[2]=s[2],i[3]=0,i[4]=c[0],i[5]=c[1],i[6]=c[2],i[7]=0,i[8]=l[0],i[9]=l[1],i[10]=l[2],i[11]=0,i[12]=n[0],i[13]=n[1],i[14]=n[2],i[15]=1,i}function S(e,t){let n=e.getViewForGraphic(t);return n!=null&&`computeAttachmentOrigin`in n?n.computeAttachmentOrigin(t,e.spatialReference):null}function C(e,t){let n=t.origin;n==null?w(e,l(t)):e.elevationAlignedLocation=n}function w(e,t){if(t==null)return;let n=t.type===`mesh`?t.origin:u(t);n!=null&&(e.location=c(n))}export{b as calculateInputRotationTransform,x as calculateTranslateRotateFromBases,p as createManipulatorMaterial,m as createManipulatorMaterials,g as createSphereGeometryAsOffsets,S as getGraphicAttachmentOrigin,C as placeAtObject,v as rotateManipulatorDefaults,_ as screenSizeManipulatorSettings,y as worldScaledManipulatorSettings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../../Color.js";import{getContrast as t}from"../../../../core/colorUtils.js";import{watch as n,initial as r}from"../../../../core/reactiveUtils.js";import{identity as i,translate as a,scale as o,fromQuat as s,multiply as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{rotationTo as u}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{subtract as d,normalize as f,scale as p,add as m,set as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as v,sm4d as y,sq4d as b}from"../../../../geometry/support/vectorStacks.js";import{shiftRestartOffsetDistance as x,shiftRestartTipRadius as S,shiftRestartTipLength as C,shiftRestartArrowOutlineWidth as w,shiftRestartArrowLength as T,shiftRestartTubeRadius as E,shiftRestartTubeFocusMultiplier as D,shiftRestartTipFocusMultiplier as O}from"../../analysis/Slice/sliceToolConfig.js";import{DidPointerMoveRecentlyFlag as k,IsShiftEdgeOnScreenFlag as A}from"../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as j}from"../Manipulator3D.js";import{RenderObject as M}from"../RenderObject.js";import{createPolylineGeometry as N,createConeGeometry as P,createPathExtrusionGeometry as F}from"../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as I}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as L}from"../../webgl-engine/materials/RibbonLineMaterial.js";class R extends j{constructor(i,a,o=4){let s=new L({width:1,renderOccluded:o,isDecoration:!0},i),c=new I({cullFace:2,renderOccluded:16,isDecoration:!0}),l=new I({cullFace:2,renderOccluded:16,isDecoration:!0}),u=new I({cullFace:2,renderOccluded:16,isDecoration:!0}),d=new I({writeDepth:!1,cullFace:1,renderOccluded:2,isDecoration:!0});super({view:i,...z({offsetMode:a,tubeMaterial:c,tipMaterial:l,capMaterial:u,outlineMaterial:d,calloutMaterial:s})}),this._themeHandle=n(()=>i.effectiveTheme.accentColor,n=>{let r=t(n),i=n.toUnitRGBA(),a=r.toUnitRGBA(),o=e.blendColors(r,n,.4).toUnitRGBA(),f=e.blendColors(r,n,.14).toUnitRGBA();s.setParameters({color:i}),c.setParameters({color:f}),l.setParameters({color:a}),u.setParameters({color:o}),d.setParameters({color:i})},r)}destroy(){this._themeHandle.remove(),super.destroy()}}function z({offsetMode:e,tubeMaterial:t,tipMaterial:n,capMaterial:r,outlineMaterial:i,calloutMaterial:a}){let o=e===0?x:0,s=[_(o,0,-T/2),_(o,0,T/2)],c=H(s),l=B({vertices:s,padding:0,materials:{tube:t,tip:n,cap:r}}),u=B({vertices:s,padding:w,materials:{tube:i,tip:i,cap:i}}),d=N(a,[[o,0,0],[o-x,0,0]]),f=N(a,[[o,0,0],[o-x,0,0]]);return{renderObjects:[...l.normal.map(e=>new M(e,1|k)),...u.normal.map(e=>new M(e,1|k)),new M(d,1|k|A),...l.focused.map(e=>new M(e,2|k)),...u.focused.map(e=>new M(e,2|k)),new M(f,2|k|A)],autoScaleRenderObjects:!1,collisionType:{type:`line`,paths:[c]},collisionPriority:1,radius:S,state:k}}function B({vertices:e,padding:t,materials:n}){let r=r=>{let x=e.slice(),w=d(v.get(),x[0],x[1]);f(w,w);let T=d(v.get(),x[x.length-1],x[x.length-2]);if(f(T,T),t>0){let e=p(g(),T,-t);x[x.length-1]=m(e,e,x[x.length-1]);let n=p(g(),w,-t);x[0]=m(n,n,x[0])}let k=r?O:1,A=C*k,j=S*k,M=i(y.get());if(t>0){let e=A/4,n=h(v.get(),0,e,0),r=1+t/e;a(M,M,n),o(M,M,h(v.get(),r,r,r)),a(M,M,p(n,n,-1/r))}let N=i(l()),F=_(0,1,0),I=s(l(),u(b.get(),F,T));I[12]=x[x.length-1][0],I[13]=x[x.length-1][1],I[14]=x[x.length-1][2],c(I,I,M);let L=n.tube,R=V(E*(r?D:1)+t,x,L);R.transformation=N;let z=[R],B=n.tip,H=P(B,A,j,24,!1,!1,!0);H.transformation=I,z.push(H);let U=n.cap,W=P(U,A,j,24,!1,!0,!1);W.transformation=I,z.push(W);let G=s(l(),u(b.get(),F,w));return G[12]=x[0][0],G[13]=x[0][1],G[14]=x[0][2],c(G,G,M),z.push(H.instantiate({transformation:G})),z.push(W.instantiate({transformation:G})),z};return{normal:r(!1),focused:r(!0)}}function V(e,t,n){let r=[];for(let t=0;t<12;t++){let n=t/12*2*Math.PI;r.push([Math.cos(n)*e,Math.sin(n)*e])}return F(n,r,t,[],[],!1)}function H(e,t){let n=d(g(),e[e.length-1],e[e.length-2]);f(n,n),p(n,n,C),m(n,n,e[e.length-1]);{let t=d(g(),e[0],e[1]);return f(t,t),p(t,t,C),m(t,t,e[0]),[t,...e,n]}}export{R as ShiftManipulator};
|
|
2
|
+
import e from"../../../../Color.js";import{getContrast as t}from"../../../../core/colorUtils.js";import{watch as n,initial as r}from"../../../../core/reactiveUtils.js";import{identity as i,translate as a,scale as o,fromQuat as s,multiply as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{rotationTo as u}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{subtract as d,normalize as f,scale as p,add as m,set as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as v,sm4d as y,sq4d as b}from"../../../../geometry/support/vectorStacks.js";import{shiftRestartOffsetDistance as x,shiftRestartTipRadius as S,shiftRestartTipLength as C,shiftRestartArrowOutlineWidth as w,shiftRestartArrowLength as T,shiftRestartTubeRadius as E,shiftRestartTubeFocusMultiplier as D,shiftRestartTipFocusMultiplier as O}from"../../analysis/Slice/sliceToolConfig.js";import{DidPointerMoveRecentlyFlag as k,IsShiftEdgeOnScreenFlag as A}from"../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as j}from"../Manipulator3D.js";import{RenderObject as M}from"../RenderObject.js";import{createPolylineGeometry as N,createConeGeometry as P,createPathExtrusionGeometry as F}from"../../webgl-engine/lib/GeometryUtil.js";import{ColorMaterial as I}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as L}from"../../webgl-engine/materials/RibbonLineMaterial.js";class R extends j{constructor(i,a,o=4){let s=new L({width:1,renderOccluded:o,isDecoration:!0},i),c=new I({cullFace:2,renderOccluded:16,isDecoration:!0},i.state.isGlobal),l=new I({cullFace:2,renderOccluded:16,isDecoration:!0},i.state.isGlobal),u=new I({cullFace:2,renderOccluded:16,isDecoration:!0},i.state.isGlobal),d=new I({writeDepth:!1,cullFace:1,renderOccluded:2,isDecoration:!0},i.state.isGlobal);super({view:i,...z({offsetMode:a,tubeMaterial:c,tipMaterial:l,capMaterial:u,outlineMaterial:d,calloutMaterial:s})}),this._themeHandle=n(()=>i.effectiveTheme.accentColor,n=>{let r=t(n),i=n.toUnitRGBA(),a=r.toUnitRGBA(),o=e.blendColors(r,n,.4).toUnitRGBA(),f=e.blendColors(r,n,.14).toUnitRGBA();s.setParameters({color:i}),c.setParameters({color:f}),l.setParameters({color:a}),u.setParameters({color:o}),d.setParameters({color:i})},r)}destroy(){this._themeHandle.remove(),super.destroy()}}function z({offsetMode:e,tubeMaterial:t,tipMaterial:n,capMaterial:r,outlineMaterial:i,calloutMaterial:a}){let o=e===0?x:0,s=[_(o,0,-T/2),_(o,0,T/2)],c=H(s),l=B({vertices:s,padding:0,materials:{tube:t,tip:n,cap:r}}),u=B({vertices:s,padding:w,materials:{tube:i,tip:i,cap:i}}),d=N(a,[[o,0,0],[o-x,0,0]]),f=N(a,[[o,0,0],[o-x,0,0]]);return{renderObjects:[...l.normal.map(e=>new M(e,1|k)),...u.normal.map(e=>new M(e,1|k)),new M(d,1|k|A),...l.focused.map(e=>new M(e,2|k)),...u.focused.map(e=>new M(e,2|k)),new M(f,2|k|A)],autoScaleRenderObjects:!1,collisionType:{type:`line`,paths:[c]},collisionPriority:1,radius:S,state:k}}function B({vertices:e,padding:t,materials:n}){let r=r=>{let x=e.slice(),w=d(v.get(),x[0],x[1]);f(w,w);let T=d(v.get(),x[x.length-1],x[x.length-2]);if(f(T,T),t>0){let e=p(g(),T,-t);x[x.length-1]=m(e,e,x[x.length-1]);let n=p(g(),w,-t);x[0]=m(n,n,x[0])}let k=r?O:1,A=C*k,j=S*k,M=i(y.get());if(t>0){let e=A/4,n=h(v.get(),0,e,0),r=1+t/e;a(M,M,n),o(M,M,h(v.get(),r,r,r)),a(M,M,p(n,n,-1/r))}let N=i(l()),F=_(0,1,0),I=s(l(),u(b.get(),F,T));I[12]=x[x.length-1][0],I[13]=x[x.length-1][1],I[14]=x[x.length-1][2],c(I,I,M);let L=n.tube,R=V(E*(r?D:1)+t,x,L);R.transformation=N;let z=[R],B=n.tip,H=P(B,A,j,24,!1,!1,!0);H.transformation=I,z.push(H);let U=n.cap,W=P(U,A,j,24,!1,!0,!1);W.transformation=I,z.push(W);let G=s(l(),u(b.get(),F,w));return G[12]=x[0][0],G[13]=x[0][1],G[14]=x[0][2],c(G,G,M),z.push(H.instantiate({transformation:G})),z.push(W.instantiate({transformation:G})),z};return{normal:r(!1),focused:r(!0)}}function V(e,t,n){let r=[];for(let t=0;t<12;t++){let n=t/12*2*Math.PI;r.push([Math.cos(n)*e,Math.sin(n)*e])}return F(n,r,t,[],[],!1)}function H(e,t){let n=d(g(),e[e.length-1],e[e.length-2]);f(n,n),p(n,n,C),m(n,n,e[e.length-1]);{let t=d(g(),e[0],e[1]);return f(t,t),p(t,t,C),m(t,t,e[0]),[t,...e,n]}}export{R as ShiftManipulator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{multiplyOpacityToUnitRGBA as e,colorEquals as t,getContrast as n}from"../../../../../core/colorUtils.js";import r from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as a,sync as o}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as s}from"../../../../../core/screenUtils.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../../../../geometry/Point.js";import{Manipulator3D as u}from"../../Manipulator3D.js";import{createManipulatorMaterial as d}from"../../manipulatorUtils.js";import{RenderObject as f}from"../../RenderObject.js";import{PickResult as p}from"../support/PickRequest.js";import{LaserlineVisualElement as m}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as h}from"../../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorCollection as g}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as _}from"../../../../interactive/ToolIntersector.js";class v{constructor(e){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=c();let{analysisViewData:t,manipulators:n,toolState:r,view:i,visible:a}=e;this._analysisViewData=t,this._toolState=r,n==null?this._manipulators=new g:(this._manipulators=n,this._isManipulatorsOwner=!1),this._view=i,this._intersector=_(i.state.viewingMode);let o=d(this._handleColor);o.setParameters({testsTransparentRenderOrder:4});let s=[new f(h(o,1,32,32))],l=new u({view:i,renderObjects:s});l.available=!1,l.radius=C,l.interactive=!1,this._manipulators.add(l),this._cursorManipulator=l,this._manipulatorMaterial=o,this._laserLine=new m({view:i,attached:!0,style:{glowWidth:b,glowFalloff:x,innerWidth:S},isDecoration:!0}),this._updateVisibility(a??!0)}destroy(){this._listenerHandles=i(this._listenerHandles),this._manipulators=this._isManipulatorsOwner?i(this._manipulators):null,this._laserLine=i(this._laserLine),this._destroyed=!0}get destroyed(){return this._destroyed}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}_setVisibility(e){!this._destroyed&&this._visible!==e&&this._updateVisibility(e)}_updateVisibility(e){this._visible=e,this._laserLine.visible=e,e?(this._initializeListeners(),this._updateAll()):(this._destroyListeners(),this.vertexManipulators.forEach(e=>this._removeVertexManipulator(e)),this.vertexManipulators=[])}vertexHandleAt(e,t){return this._manipulators.intersect(e,t)?.metadata}pick(e){let t=this._view.spatialReference,n=s(e.screenPoint);this._view.sceneIntersectionHelper.intersectToolIntersectorScreen(n,this._intersector);let r=this._intersector.results.min,i=c();if(!r.getIntersectionPoint(i))return null;let a=this._view.renderCoordsHelper.fromRenderCoords(i,new l({spatialReference:t}));return a==null?null:new p(i,a)}_updateAll(){this._visible&&(this._updateVertexManipulators(),this._updateLaserLine())}_createVertexManipulator(){let e=[new f(h(this._manipulatorMaterial,1,32,32))],t=new u({view:this._view,renderObjects:e});return t.radius=C,this._manipulators.add(t),t}_removeVertexManipulator(e){this._manipulators.remove(e)}_updateVertexManipulators(){let{viewData:e}=this._analysisViewData,t=this._analysisViewData.path?this._analysisViewData.path.vertices:[],n=this.vertexManipulators;y(n,t.length,()=>this._createVertexManipulator(),e=>this._removeVertexManipulator(e)),n.forEach((n,r)=>{n.metadata=t[r],n.renderLocation=e.vertexData.positionsRender[r],n.cursor=r===0&&this._toolState.polygonState===`drawing`?`crosshair`:null}),this._toolState.polygonState===`drawing`&&this._analysisViewData.stagedPoint!=null?(this._cursorManipulator.available=!0,this._cursorManipulator.location=this._analysisViewData.stagedPoint):this._cursorManipulator.available=!1}get _handleColor(){return e(this._view.effectiveTheme.accentColor,.5)}_getFocusPoint(){let{lastDraggedVertex:e}=this._analysisViewData;switch(this._toolState.polygonState){case`drawing`:return this._analysisViewData.stagedPoint==null?e==null?this._analysisViewData.path.lastPoint:this._analysisViewData.path.getVertexPositionAsPoint(e):this._analysisViewData.stagedPoint;case`editing`:return e==null?null:this._analysisViewData.path.getVertexPositionAsPoint(e);default:return this._analysisViewData.stagedPoint}}_updateLaserLine(){let e=this._toolState.polygonState!==`measured`&&this._toolState.active,t=this._getFocusPoint();if(e&&t!=null){let e=this._tempHandlePosition;this._view.renderCoordsHelper.toRenderCoords(t,e),this._laserLine.heightManifoldTarget=e}else this._laserLine.heightManifoldTarget=null}_initializeListeners(){this._listenerHandles=new r,this._listenerHandles.add([a(()=>this._toolState.polygonState,()=>this._updateLaserLine()),a(()=>this._analysisViewData.viewData,()=>this._updateAll(),o),a(()=>({lastDraggedVertex:this._analysisViewData.lastDraggedVertex,cursorPoint:this._analysisViewData.stagedPoint}),()=>this._updateLaserLine()),a(()=>this._toolState.active,()=>this._updateAll()),a(()=>this._view.effectiveTheme.accentColor,t=>{let r=e(t,.5);this._manipulatorMaterial.setParameters({color:r});let i=t.toUnitRGB(),a=n(t).toUnitRGB(),o=t.a*.75,s=this._laserLine;s.style={...s.style,glowColor:i,innerColor:a,globalAlpha:o}},{initial:!0,equals:t})])}_destroyListeners(){this._listenerHandles=i(this._listenerHandles)}}function y(e,t,n,r){for(;e.length<t;)e.push(n());if(r)for(;e.length>t;)r(e.pop());else e.length=t}const b=8,x=8,S=1,C=5;export{v as default};
|
|
2
|
+
import{multiplyOpacityToUnitRGBA as e,colorEquals as t,getContrast as n}from"../../../../../core/colorUtils.js";import r from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as a,sync as o}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as s}from"../../../../../core/screenUtils.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../../../../geometry/Point.js";import{Manipulator3D as u}from"../../Manipulator3D.js";import{createManipulatorMaterial as d}from"../../manipulatorUtils.js";import{RenderObject as f}from"../../RenderObject.js";import{PickResult as p}from"../support/PickRequest.js";import{LaserlineVisualElement as m}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as h}from"../../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorCollection as g}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as _}from"../../../../interactive/ToolIntersector.js";class v{constructor(e){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=c();let{analysisViewData:t,manipulators:n,toolState:r,view:i,visible:a}=e;this._analysisViewData=t,this._toolState=r,n==null?this._manipulators=new g:(this._manipulators=n,this._isManipulatorsOwner=!1),this._view=i,this._intersector=_(i.state.viewingMode);let o=d(i.state.isGlobal,this._handleColor);o.setParameters({testsTransparentRenderOrder:4});let s=[new f(h(o,1,32,32))],l=new u({view:i,renderObjects:s});l.available=!1,l.radius=C,l.interactive=!1,this._manipulators.add(l),this._cursorManipulator=l,this._manipulatorMaterial=o,this._laserLine=new m({view:i,attached:!0,style:{glowWidth:b,glowFalloff:x,innerWidth:S},isDecoration:!0}),this._updateVisibility(a??!0)}destroy(){this._listenerHandles=i(this._listenerHandles),this._manipulators=this._isManipulatorsOwner?i(this._manipulators):null,this._laserLine=i(this._laserLine),this._destroyed=!0}get destroyed(){return this._destroyed}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}_setVisibility(e){!this._destroyed&&this._visible!==e&&this._updateVisibility(e)}_updateVisibility(e){this._visible=e,this._laserLine.visible=e,e?(this._initializeListeners(),this._updateAll()):(this._destroyListeners(),this.vertexManipulators.forEach(e=>this._removeVertexManipulator(e)),this.vertexManipulators=[])}vertexHandleAt(e,t){return this._manipulators.intersect(e,t)?.metadata}pick(e){let t=this._view.spatialReference,n=s(e.screenPoint);this._view.sceneIntersectionHelper.intersectToolIntersectorScreen(n,this._intersector);let r=this._intersector.results.min,i=c();if(!r.getIntersectionPoint(i))return null;let a=this._view.renderCoordsHelper.fromRenderCoords(i,new l({spatialReference:t}));return a==null?null:new p(i,a)}_updateAll(){this._visible&&(this._updateVertexManipulators(),this._updateLaserLine())}_createVertexManipulator(){let e=[new f(h(this._manipulatorMaterial,1,32,32))],t=new u({view:this._view,renderObjects:e});return t.radius=C,this._manipulators.add(t),t}_removeVertexManipulator(e){this._manipulators.remove(e)}_updateVertexManipulators(){let{viewData:e}=this._analysisViewData,t=this._analysisViewData.path?this._analysisViewData.path.vertices:[],n=this.vertexManipulators;y(n,t.length,()=>this._createVertexManipulator(),e=>this._removeVertexManipulator(e)),n.forEach((n,r)=>{n.metadata=t[r],n.renderLocation=e.vertexData.positionsRender[r],n.cursor=r===0&&this._toolState.polygonState===`drawing`?`crosshair`:null}),this._toolState.polygonState===`drawing`&&this._analysisViewData.stagedPoint!=null?(this._cursorManipulator.available=!0,this._cursorManipulator.location=this._analysisViewData.stagedPoint):this._cursorManipulator.available=!1}get _handleColor(){return e(this._view.effectiveTheme.accentColor,.5)}_getFocusPoint(){let{lastDraggedVertex:e}=this._analysisViewData;switch(this._toolState.polygonState){case`drawing`:return this._analysisViewData.stagedPoint==null?e==null?this._analysisViewData.path.lastPoint:this._analysisViewData.path.getVertexPositionAsPoint(e):this._analysisViewData.stagedPoint;case`editing`:return e==null?null:this._analysisViewData.path.getVertexPositionAsPoint(e);default:return this._analysisViewData.stagedPoint}}_updateLaserLine(){let e=this._toolState.polygonState!==`measured`&&this._toolState.active,t=this._getFocusPoint();if(e&&t!=null){let e=this._tempHandlePosition;this._view.renderCoordsHelper.toRenderCoords(t,e),this._laserLine.heightManifoldTarget=e}else this._laserLine.heightManifoldTarget=null}_initializeListeners(){this._listenerHandles=new r,this._listenerHandles.add([a(()=>this._toolState.polygonState,()=>this._updateLaserLine()),a(()=>this._analysisViewData.viewData,()=>this._updateAll(),o),a(()=>({lastDraggedVertex:this._analysisViewData.lastDraggedVertex,cursorPoint:this._analysisViewData.stagedPoint}),()=>this._updateLaserLine()),a(()=>this._toolState.active,()=>this._updateAll()),a(()=>this._view.effectiveTheme.accentColor,t=>{let r=e(t,.5);this._manipulatorMaterial.setParameters({color:r});let i=t.toUnitRGB(),a=n(t).toUnitRGB(),o=t.a*.75,s=this._laserLine;s.style={...s.style,glowColor:i,innerColor:a,globalAlpha:o}},{initial:!0,equals:t})])}_destroyListeners(){this._listenerHandles=i(this._listenerHandles)}}function y(e,t,n,r){for(;e.length<t;)e.push(n());if(r)for(;e.length>t;)r(e.pop());else e.length=t}const b=8,x=8,S=1,C=5;export{v as default};
|
package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as n,getContrast as r,colorVectorEquals as i,colorVectorToColorAndOpacity as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{watch as s,initial as c}from"../../../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPoints as f}from"../../../../../geometry/support/lineSegment.js";import{Manipulator3D as p}from"../../Manipulator3D.js";import{createManipulatorMaterial as m}from"../../manipulatorUtils.js";import{RenderObject as h}from"../../RenderObject.js";import{LaserlineVisualElement as g}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as _}from"../../../webgl-engine/lib/GeometryUtil.js";let v=class extends t{constructor(e){super(e),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new g({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(s(()=>this._params,({laserLineGlowColor:e,laserLineInnerColor:t,laserLineGlobalAlpha:n})=>{let r=this._laserLine;r.style={...r.style,innerColor:t,glowColor:e,globalAlpha:n}}))}destroy(){this._laserLine=o(this._laserLine)}get _params(){let{accentColor:e}=this.view.effectiveTheme;return{laserLineGlowColor:e.toUnitRGB(),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:r(e).toUnitRGB(),laserLineInnerWidth:.75,laserLineGlobalAlpha:e.a*.75,handleColor:n(e,.5),handleRadius:5}}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}get _cursorPosition(){let e=d(),t=this.cursorPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _startPosition(){let e=d(),t=this.analysisViewData.elevationAlignedStartPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _endPosition(){let e=d(),t=this.analysisViewData.elevationAlignedEndPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _laserLineParams(){let e=this._focusPosition,{active:t,lineState:n}=this.toolState,r=this.analysisViewData,i=this.laserLineEnabled&&!!e&&n!==`measured`&&t;if(!i||!this.visible||r==null||r.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};let a=r.actualVisualizedMeasurement,o=this.view.viewingMode!==`local`&&i&&!!this.analysis.startPoint&&a===`geodesic`,s=i&&r.viewMode===2;return{heightManifoldTarget:a===`euclidean`?e:null,pointDistanceLine:o?this._pointDistanceLine:null,lineVerticalPlaneSegment:s?f(this._startPosition,this._endPosition):null}}get _focusPosition(){let{lineState:e}=this.toolState,t=this.analysisViewData,n=t!=null&&!t.destroyed&&t.measurementMode===1&&t.viewMode===1;switch(e){case`drawing`:return n?this._startPosition:this.analysis.endPoint?this._endPosition:this._startPosition;case`editing`:return n?this._lastDraggedHandle===`start`?this._endPosition:this._startPosition:this._lastDraggedHandle===`start`?this._startPosition:this._endPosition;default:return this.cursorPoint==null?null:this._cursorPosition}}get _pointDistanceLine(){return{origin:this.toolState.lineState===`drawing`||this._lastDraggedHandle===`end`?this._startPosition:this._endPosition,target:this._focusPosition}}createManipulators(){let e=this._params,{view:t}=this,n=()=>{let n=m(e.handleColor);n.setParameters({testsTransparentRenderOrder:5});let r=[new h(_(n,1,32,32))],i=new p({view:t,renderObjects:r});return i.available=!1,i.radius=e.handleRadius,[i,n]},[r,o]=n(),[c,l]=n(),u=new p({view:this.view,available:!1,interactive:!1}),{elevationAlignedStartPoint:d,elevationAlignedEndPoint:f}=this.analysisViewData;d!=null&&(r.location=d,r.available=!0),f!=null&&(c.location=f,c.available=!0);let g=()=>{let e=this._lastDraggedHandle;r.grabbing&&!c.grabbing&&(e=`start`),c.grabbing&&!r.grabbing&&(e=`end`),!r.grabbing&&!c.grabbing&&(e=null),this._lastDraggedHandle=e},v=r.events.on(`grab-changed`,g),y=c.events.on(`grab-changed`,g);return this.addHandles([v,y,s(()=>a(this._params.handleColor),e=>{o.setParameters({color:e}),l.setParameters({color:e})},{equals:i})],`manipulators`),{start:r,end:c,cursor:u}}show(){!this.destroyed&&!this._visible&&this._updateVisibility(!0)}hide(){!this.destroyed&&this._visible&&this._updateVisibility(!1)}_connectToAnalysisView(){this.removeHandles(`analysis-view`),this.addHandles([s(()=>this.analysisViewData?.destroyed,e=>{e&&this.removeHandles(`analysis-view`)},c),s(()=>[this.toolState.lineState===`measured`,this.analysisViewData],([e,t])=>{t!=null&&!t.destroyed&&(t.allowVisualElementsOrientationChange=!e)},c),s(()=>this._laserLineParams,e=>{let t=this._laserLine;t.heightManifoldTarget=e.heightManifoldTarget,t.pointDistanceLine=e.pointDistanceLine,t.lineVerticalPlaneSegment=e.lineVerticalPlaneSegment},c)],`analysis-view`)}_updateVisibility(e){this.initialized&&(this._visible=e,e&&(this._laserLine.style={innerColor:this._params.laserLineInnerColor,innerWidth:this._params.laserLineInnerWidth,glowColor:this._params.laserLineGlowColor,glowWidth:this._params.laserLineGlowWidth,glowFalloff:this._params.laserLineGlowFalloff,globalAlpha:this._params.laserLineGlobalAlpha}),this._laserLine.visible=e)}};e([l({constructOnly:!0})],v.prototype,`view`,void 0),e([l()],v.prototype,`_params`,null),e([l({constructOnly:!0})],v.prototype,`analysis`,void 0),e([l({constructOnly:!0})],v.prototype,`analysisViewData`,void 0),e([l()],v.prototype,`cursorPoint`,void 0),e([l()],v.prototype,`toolState`,void 0),e([l()],v.prototype,`visible`,null),e([l()],v.prototype,`testData`,null),e([l()],v.prototype,`_visible`,void 0),e([l()],v.prototype,`_laserLine`,void 0),e([l({constructOnly:!0})],v.prototype,`laserLineEnabled`,void 0),e([l()],v.prototype,`_cursorPosition`,null),e([l()],v.prototype,`_startPosition`,null),e([l()],v.prototype,`_endPosition`,null),e([l()],v.prototype,`_lastDraggedHandle`,void 0),e([l()],v.prototype,`_laserLineParams`,null),e([l()],v.prototype,`_focusPosition`,null),e([l()],v.prototype,`_pointDistanceLine`,null),v=e([u(`esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DView`)],v);export{v as DirectLineMeasurement3DView};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as n,getContrast as r,colorVectorEquals as i,colorVectorToColorAndOpacity as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{watch as s,initial as c}from"../../../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromPoints as f}from"../../../../../geometry/support/lineSegment.js";import{Manipulator3D as p}from"../../Manipulator3D.js";import{createManipulatorMaterial as m}from"../../manipulatorUtils.js";import{RenderObject as h}from"../../RenderObject.js";import{LaserlineVisualElement as g}from"../../visualElements/LaserlineVisualElement.js";import{createSphereGeometry as _}from"../../../webgl-engine/lib/GeometryUtil.js";let v=class extends t{constructor(e){super(e),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new g({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(s(()=>this._params,({laserLineGlowColor:e,laserLineInnerColor:t,laserLineGlobalAlpha:n})=>{let r=this._laserLine;r.style={...r.style,innerColor:t,glowColor:e,globalAlpha:n}}))}destroy(){this._laserLine=o(this._laserLine)}get _params(){let{accentColor:e}=this.view.effectiveTheme;return{laserLineGlowColor:e.toUnitRGB(),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:r(e).toUnitRGB(),laserLineInnerWidth:.75,laserLineGlobalAlpha:e.a*.75,handleColor:n(e,.5),handleRadius:5}}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}get _cursorPosition(){let e=d(),t=this.cursorPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _startPosition(){let e=d(),t=this.analysisViewData.elevationAlignedStartPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _endPosition(){let e=d(),t=this.analysisViewData.elevationAlignedEndPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _laserLineParams(){let e=this._focusPosition,{active:t,lineState:n}=this.toolState,r=this.analysisViewData,i=this.laserLineEnabled&&!!e&&n!==`measured`&&t;if(!i||!this.visible||r==null||r.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};let a=r.actualVisualizedMeasurement,o=this.view.viewingMode!==`local`&&i&&!!this.analysis.startPoint&&a===`geodesic`,s=i&&r.viewMode===2;return{heightManifoldTarget:a===`euclidean`?e:null,pointDistanceLine:o?this._pointDistanceLine:null,lineVerticalPlaneSegment:s?f(this._startPosition,this._endPosition):null}}get _focusPosition(){let{lineState:e}=this.toolState,t=this.analysisViewData,n=t!=null&&!t.destroyed&&t.measurementMode===1&&t.viewMode===1;switch(e){case`drawing`:return n?this._startPosition:this.analysis.endPoint?this._endPosition:this._startPosition;case`editing`:return n?this._lastDraggedHandle===`start`?this._endPosition:this._startPosition:this._lastDraggedHandle===`start`?this._startPosition:this._endPosition;default:return this.cursorPoint==null?null:this._cursorPosition}}get _pointDistanceLine(){return{origin:this.toolState.lineState===`drawing`||this._lastDraggedHandle===`end`?this._startPosition:this._endPosition,target:this._focusPosition}}createManipulators(){let e=this._params,{view:t}=this,n=()=>{let n=m(t.state.isGlobal,e.handleColor);n.setParameters({testsTransparentRenderOrder:5});let r=[new h(_(n,1,32,32))],i=new p({view:t,renderObjects:r});return i.available=!1,i.radius=e.handleRadius,[i,n]},[r,o]=n(),[c,l]=n(),u=new p({view:this.view,available:!1,interactive:!1}),{elevationAlignedStartPoint:d,elevationAlignedEndPoint:f}=this.analysisViewData;d!=null&&(r.location=d,r.available=!0),f!=null&&(c.location=f,c.available=!0);let g=()=>{let e=this._lastDraggedHandle;r.grabbing&&!c.grabbing&&(e=`start`),c.grabbing&&!r.grabbing&&(e=`end`),!r.grabbing&&!c.grabbing&&(e=null),this._lastDraggedHandle=e},v=r.events.on(`grab-changed`,g),y=c.events.on(`grab-changed`,g);return this.addHandles([v,y,s(()=>a(this._params.handleColor),e=>{o.setParameters({color:e}),l.setParameters({color:e})},{equals:i})],`manipulators`),{start:r,end:c,cursor:u}}show(){!this.destroyed&&!this._visible&&this._updateVisibility(!0)}hide(){!this.destroyed&&this._visible&&this._updateVisibility(!1)}_connectToAnalysisView(){this.removeHandles(`analysis-view`),this.addHandles([s(()=>this.analysisViewData?.destroyed,e=>{e&&this.removeHandles(`analysis-view`)},c),s(()=>[this.toolState.lineState===`measured`,this.analysisViewData],([e,t])=>{t!=null&&!t.destroyed&&(t.allowVisualElementsOrientationChange=!e)},c),s(()=>this._laserLineParams,e=>{let t=this._laserLine;t.heightManifoldTarget=e.heightManifoldTarget,t.pointDistanceLine=e.pointDistanceLine,t.lineVerticalPlaneSegment=e.lineVerticalPlaneSegment},c)],`analysis-view`)}_updateVisibility(e){this.initialized&&(this._visible=e,e&&(this._laserLine.style={innerColor:this._params.laserLineInnerColor,innerWidth:this._params.laserLineInnerWidth,glowColor:this._params.laserLineGlowColor,glowWidth:this._params.laserLineGlowWidth,glowFalloff:this._params.laserLineGlowFalloff,globalAlpha:this._params.laserLineGlobalAlpha}),this._laserLine.visible=e)}};e([l({constructOnly:!0})],v.prototype,`view`,void 0),e([l()],v.prototype,`_params`,null),e([l({constructOnly:!0})],v.prototype,`analysis`,void 0),e([l({constructOnly:!0})],v.prototype,`analysisViewData`,void 0),e([l()],v.prototype,`cursorPoint`,void 0),e([l()],v.prototype,`toolState`,void 0),e([l()],v.prototype,`visible`,null),e([l()],v.prototype,`testData`,null),e([l()],v.prototype,`_visible`,void 0),e([l()],v.prototype,`_laserLine`,void 0),e([l({constructOnly:!0})],v.prototype,`laserLineEnabled`,void 0),e([l()],v.prototype,`_cursorPosition`,null),e([l()],v.prototype,`_startPosition`,null),e([l()],v.prototype,`_endPosition`,null),e([l()],v.prototype,`_lastDraggedHandle`,void 0),e([l()],v.prototype,`_laserLineParams`,null),e([l()],v.prototype,`_focusPosition`,null),e([l()],v.prototype,`_pointDistanceLine`,null),v=e([u(`esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DView`)],v);export{v as DirectLineMeasurement3DView};
|