@vcmap/ui 6.3.10 → 7.0.0-rc.1
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/build/build.js +47 -36
- package/build/buildCesium.js +1 -1
- package/build/buildHelpers.js +104 -52
- package/build/buildPreview.js +1 -1
- package/build/buildTypes.js +31 -55
- package/build/bundle.js +15 -15
- package/build/commonViteConfig.js +5 -16
- package/build/determineHost.js +1 -1
- package/build/generateOLLib.js +34 -19
- package/build/getPluginProxies.js +4 -9
- package/build/info/publish.js +1 -0
- package/build/lintTypes.js +4 -1
- package/dist/assets/cesium/ThirdParty/Workers/zip-web-worker.js +1 -0
- package/dist/assets/cesium/ThirdParty/draco_decoder.wasm +0 -0
- package/dist/assets/cesium/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/assets/cesium/ThirdParty/zip-module.wasm +0 -0
- package/dist/assets/cesium/Workers/{chunk-QXFWOWFX.js → chunk-2QBCPJDY.js} +9 -11
- package/dist/assets/cesium/Workers/{chunk-JWBBMXMY.js → chunk-3PKRMEEA.js} +5 -5
- package/dist/assets/cesium/Workers/chunk-45K3YXPA.js +147 -0
- package/dist/assets/cesium/Workers/{chunk-R5LP2OED.js → chunk-4GPCHOD4.js} +27 -30
- package/dist/assets/cesium/Workers/chunk-4LE63XCI.js +352 -0
- package/dist/assets/cesium/Workers/{chunk-UJWE4G4I.js → chunk-5JL55S2T.js} +51 -37
- package/dist/assets/cesium/Workers/{chunk-ZHRYASLR.js → chunk-5K44KTDJ.js} +9 -10
- package/dist/assets/cesium/Workers/{chunk-DJ3ZQW5L.js → chunk-6SHKE57M.js} +3 -2
- package/dist/assets/cesium/Workers/{chunk-FLGO2ZQM.js → chunk-7FHTVI6D.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-QKMMP2KM.js → chunk-7QWEUYQX.js} +5 -8
- package/dist/assets/cesium/Workers/{chunk-I5ZGV4B2.js → chunk-7U5C6VA5.js} +20 -27
- package/dist/assets/cesium/Workers/{chunk-YEONE7RH.js → chunk-A4ZCSNGC.js} +14 -14
- package/dist/assets/cesium/Workers/{chunk-4OZXCGBJ.js → chunk-ACHR63LC.js} +28 -11
- package/dist/assets/cesium/Workers/{chunk-7XCBLPDB.js → chunk-AMPM3GPK.js} +35 -16
- package/dist/assets/cesium/Workers/chunk-ASJCWPAG.js +3201 -0
- package/dist/assets/cesium/Workers/{chunk-QLQFHFQC.js → chunk-BEH5INGY.js} +15 -14
- package/dist/assets/cesium/Workers/{chunk-GULESHYV.js → chunk-BZUVEBLN.js} +29 -13
- package/dist/assets/cesium/Workers/{chunk-F4WHV7BO.js → chunk-C3XA5GA5.js} +11 -11
- package/dist/assets/cesium/Workers/{chunk-5INFB3ST.js → chunk-C5F73ANB.js} +29 -29
- package/dist/assets/cesium/Workers/{chunk-KQZETAD4.js → chunk-CFHMMZKU.js} +2481 -3618
- package/dist/assets/cesium/Workers/chunk-DPG524EP.js +1287 -0
- package/dist/assets/cesium/Workers/{chunk-H7MDD63F.js → chunk-DQO6TXCC.js} +9 -8
- package/dist/assets/cesium/Workers/{chunk-DHUNXVK2.js → chunk-E3CMD5KF.js} +16 -17
- package/dist/assets/cesium/Workers/{chunk-MYEQIKJN.js → chunk-E5YJYF7H.js} +3 -2
- package/dist/assets/cesium/Workers/{chunk-4RHLCJR2.js → chunk-GPRPOY4E.js} +26 -23
- package/dist/assets/cesium/Workers/{chunk-TLDJYDQA.js → chunk-GWZXZY4E.js} +4 -4
- package/dist/assets/cesium/Workers/chunk-H4ZQZPSF.js +973 -0
- package/dist/assets/cesium/Workers/{chunk-54FRV62W.js → chunk-IUNHDNAT.js} +24 -24
- package/dist/assets/cesium/Workers/{chunk-BHUWF3N5.js → chunk-J3MKR2PM.js} +87 -66
- package/dist/assets/cesium/Workers/{chunk-F4TYWTLA.js → chunk-JBKUQ6FE.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-H2KIQCJW.js → chunk-KXGTRQEW.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-TYWP45EB.js → chunk-KZO64UE5.js} +10 -8
- package/dist/assets/cesium/Workers/{chunk-OGDIC2F5.js → chunk-M7TIUZF5.js} +38 -46
- package/dist/assets/cesium/Workers/{chunk-OBMU3A6A.js → chunk-N7FSPCIY.js} +28 -28
- package/dist/assets/cesium/Workers/{chunk-QEMZBTFR.js → chunk-O5KPQGWB.js} +18 -21
- package/dist/assets/cesium/Workers/{chunk-UFCLCDXI.js → chunk-OMWO7Z3L.js} +18 -20
- package/dist/assets/cesium/Workers/{chunk-5CNZEOPA.js → chunk-P6YBO4OE.js} +7 -5
- package/dist/assets/cesium/Workers/chunk-PUZJ6L3M.js +1992 -0
- package/dist/assets/cesium/Workers/{chunk-MMU6M3F4.js → chunk-RRJYZWF4.js} +9 -7
- package/dist/assets/cesium/Workers/{chunk-PMC3FYPH.js → chunk-SLD6LZDJ.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-XWGO36ZG.js → chunk-SU5PCD4V.js} +3 -2
- package/dist/assets/cesium/Workers/{chunk-PD7IJVPU.js → chunk-TJUEQC6E.js} +10 -11
- package/dist/assets/cesium/Workers/{chunk-O6F3JX5O.js → chunk-TLKYIN6G.js} +27 -25
- package/dist/assets/cesium/Workers/{chunk-PSCX6XFR.js → chunk-TW2O7NQI.js} +33 -31
- package/dist/assets/cesium/Workers/chunk-U3AXZMFD.js +280 -0
- package/dist/assets/cesium/Workers/{chunk-HCHTH3IB.js → chunk-U3D7L4QU.js} +24 -23
- package/dist/assets/cesium/Workers/{chunk-673DKAYZ.js → chunk-UH32T6UU.js} +20 -18
- package/dist/assets/cesium/Workers/{chunk-J66MKJOE.js → chunk-ULPIJ2PX.js} +122 -36
- package/dist/assets/cesium/Workers/{chunk-GKC6HHRY.js → chunk-UZRTVYAT.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-A67BB5UX.js → chunk-VRRAO6JM.js} +15 -10
- package/dist/assets/cesium/Workers/chunk-WV6ZUFQN.js +3618 -0
- package/dist/assets/cesium/Workers/{chunk-BJJTPQZB.js → chunk-XM3NNBHE.js} +2 -2
- package/dist/assets/cesium/Workers/chunk-XQTAS7TZ.js +2342 -0
- package/dist/assets/cesium/Workers/{chunk-NCBLZFLY.js → chunk-XUW5H676.js} +9 -2
- package/dist/assets/cesium/Workers/{chunk-EGAGTCTF.js → chunk-YTBQGASE.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-KULZY3XN.js → chunk-ZG67X3WP.js} +116 -110
- package/dist/assets/cesium/Workers/{chunk-5WF776PO.js → chunk-ZS2CNDFB.js} +16 -19
- package/dist/assets/cesium/Workers/combineGeometry.js +25 -25
- package/dist/assets/cesium/Workers/createBoxGeometry.js +18 -16
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +23 -25
- package/dist/assets/cesium/Workers/createCircleGeometry.js +29 -27
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +22 -20
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +43 -43
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +37 -35
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +46 -49
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +40 -43
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +20 -18
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +27 -25
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +28 -25
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +21 -18
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +19 -17
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +18 -16
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +18 -16
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +21 -21
- package/dist/assets/cesium/Workers/createGeometry.js +34 -30
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +188 -135
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +22 -21
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +15 -13
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +57 -62
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +55 -64
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +37 -40
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +41 -44
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +36 -39
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +50 -58
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +33 -34
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +33 -34
- package/dist/assets/cesium/Workers/createSphereGeometry.js +20 -20
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +19 -19
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +3 -3
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +16 -14
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +24 -22
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +15 -13
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +24 -21
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +16 -14
- package/dist/assets/cesium/Workers/createVerticesFromCesium3DTilesTerrain.js +91 -0
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +31 -33
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +50 -75
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +51 -295
- package/dist/assets/cesium/Workers/createWallGeometry.js +35 -36
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +33 -34
- package/dist/assets/cesium/Workers/decodeDraco.js +14 -14
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/dist/assets/cesium/Workers/decodeI3S.js +16 -20
- package/dist/assets/cesium/Workers/gaussianSplatSorter.js +62 -0
- package/dist/assets/cesium/Workers/gaussianSplatTextureGenerator.js +68 -0
- package/dist/assets/cesium/Workers/incrementallyBuildTerrainPicker.js +129 -0
- package/dist/assets/cesium/Workers/transcodeKTX2.js +140 -64
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +24 -21
- package/dist/assets/cesium/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +95 -0
- package/dist/assets/cesium-0a908d6a.js +95890 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/core-ebef7974.js +40214 -0
- package/dist/assets/core-workers/panoramaImageWorker.js +1 -1
- package/dist/assets/core-workers/{panoramaImageWorker.js-57004977.js → panoramaImageWorker.js-e32d9a2c.js} +8 -7
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol-29b951c3.js +39155 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-fd6a30ee.css +2 -0
- package/dist/assets/ui-fd6a30ee.js +31715 -0
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue-758d8c60.js +3940 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/vuetify-bd1f595d.css +2 -0
- package/dist/assets/vuetify-bd1f595d.js +20865 -0
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +127 -148
- package/index.js +68 -67
- package/lib/olLib.js +70 -19
- package/package.json +11 -16
- package/plugins/@vcmap-show-case/callback-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/callback-tester/src/CallbackTester.vue +1 -0
- package/plugins/@vcmap-show-case/category-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/category-tester/src/CategoriesExample.vue +1 -1
- package/plugins/@vcmap-show-case/collection-manager-example/package.json +1 -1
- package/plugins/@vcmap-show-case/context-menu-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/custom-icons-example/package.json +1 -1
- package/plugins/@vcmap-show-case/dev-tools/package.json +1 -1
- package/plugins/@vcmap-show-case/extent-example/README.md +1 -1
- package/plugins/@vcmap-show-case/extent-example/package.json +1 -1
- package/plugins/@vcmap-show-case/flight-component-example/README.md +1 -1
- package/plugins/@vcmap-show-case/flight-component-example/package.json +1 -1
- package/plugins/@vcmap-show-case/form-inputs-example/package.json +1 -1
- package/plugins/@vcmap-show-case/hello-world/package.json +1 -1
- package/plugins/@vcmap-show-case/icons-example/package.json +1 -1
- package/plugins/@vcmap-show-case/notifier-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/panel-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/panorama-inspector/src/api.js +1 -1
- package/plugins/@vcmap-show-case/plugin-editors/package.json +1 -1
- package/plugins/@vcmap-show-case/project-selector/package.json +1 -1
- package/plugins/@vcmap-show-case/projection-example/README.md +1 -1
- package/plugins/@vcmap-show-case/projection-example/package.json +1 -1
- package/plugins/@vcmap-show-case/projection-example/src/ProjectionExample.vue +1 -1
- package/plugins/@vcmap-show-case/search-example/package.json +1 -1
- package/plugins/@vcmap-show-case/simple-graph/package.json +1 -1
- package/plugins/@vcmap-show-case/style-input-example/package.json +1 -1
- package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +1 -1
- package/plugins/@vcmap-show-case/theming-example/package.json +1 -1
- package/plugins/@vcmap-show-case/tileset-feature-visibility/package.json +1 -1
- package/plugins/@vcmap-show-case/toolbox-example/package.json +1 -1
- package/plugins/@vcmap-show-case/vector-properties-example/package.json +1 -1
- package/plugins/@vcmap-show-case/viewpoint-component-example/README.md +1 -1
- package/plugins/@vcmap-show-case/viewpoint-component-example/package.json +1 -1
- package/plugins/@vcmap-show-case/window-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/wizard-example/README.md +1 -1
- package/plugins/@vcmap-show-case/wizard-example/package.json +1 -1
- package/plugins/package.json +1 -1
- package/src/actions/StyleSelector.vue.d.ts +6 -5
- package/src/actions/actionHelper.d.ts +25 -25
- package/src/actions/actionHelper.js +11 -5
- package/src/actions/extentActions.d.ts +5 -11
- package/src/actions/extentActions.js +4 -4
- package/src/actions/flightActions.d.ts +14 -29
- package/src/actions/flightActions.js +8 -7
- package/src/actions/listActions.d.ts +9 -12
- package/src/actions/listActions.js +4 -4
- package/src/actions/stateRefAction.d.ts +2 -5
- package/src/actions/stateRefAction.js +2 -5
- package/src/application/MapsGroupMobileMenu.vue +1 -1
- package/src/application/MapsGroupMobileMenu.vue.d.ts +8 -7
- package/src/application/VcsApp.vue.d.ts +28 -27
- package/src/application/VcsAppWrapper.vue.d.ts +4 -3
- package/src/application/VcsAttributions.vue.d.ts +4 -3
- package/src/application/VcsAttributionsFooter.vue +1 -1
- package/src/application/VcsAttributionsFooter.vue.d.ts +6 -5
- package/src/application/VcsContainer.vue +1 -1
- package/src/application/VcsContainer.vue.d.ts +23 -22
- package/src/application/VcsMainMap.vue.d.ts +8 -7
- package/src/application/VcsMap.vue.d.ts +4 -3
- package/src/application/VcsMobileMenuList.vue.d.ts +2 -1
- package/src/application/VcsNavbar.vue +3 -3
- package/src/application/VcsNavbar.vue.d.ts +18 -17
- package/src/application/VcsNavbarMobile.vue +1 -1
- package/src/application/VcsNavbarMobile.vue.d.ts +8 -7
- package/src/application/VcsObliqueFooter.vue +1 -1
- package/src/application/VcsObliqueFooter.vue.d.ts +5 -4
- package/src/application/VcsPanoramaFooter.vue.d.ts +2 -1
- package/src/application/VcsPositionDisplay.vue +2 -2
- package/src/application/VcsPositionDisplay.vue.d.ts +8 -7
- package/src/application/VcsSettings.vue +4 -4
- package/src/application/VcsSettings.vue.d.ts +8 -7
- package/src/application/VcsSplashScreen.vue +4 -4
- package/src/application/VcsSplashScreen.vue.d.ts +8 -7
- package/src/application/VcsTextPage.vue +1 -1
- package/src/application/VcsTextPage.vue.d.ts +4 -3
- package/src/application/VcsTextPageFooter.vue.d.ts +4 -3
- package/src/application/uiConfigHelper.d.ts +4 -4
- package/src/callback/hideObjectsCallback.d.ts +2 -2
- package/src/callback/highlightObjectsCallback.d.ts +3 -3
- package/src/callback/showObjectsCallback.d.ts +2 -2
- package/src/callback/startFlightCallback.d.ts +3 -3
- package/src/callback/stopFlightCallback.d.ts +2 -2
- package/src/callback/unHighlightObjectsCallback.d.ts +2 -2
- package/src/components/{ImageElementInjector.vue → ImageElementInjector.ts.vue} +4 -3
- package/src/components/ImageElementInjector.ts.vue.d.ts +29 -0
- package/src/components/attrsHelpers.d.ts +1 -5
- package/src/components/attrsHelpers.ts +11 -0
- package/src/components/buttons/{VcsActionButtonList.vue → VcsActionButtonList.ts.vue} +62 -52
- package/src/components/buttons/VcsActionButtonList.ts.vue.d.ts +133 -0
- package/src/components/buttons/{VcsButton.vue → VcsButton.ts.vue} +9 -9
- package/src/components/buttons/VcsButton.ts.vue.d.ts +86 -0
- package/src/components/buttons/{VcsFormButton.vue → VcsFormButton.ts.vue} +14 -16
- package/src/components/buttons/VcsFormButton.ts.vue.d.ts +69 -0
- package/src/components/buttons/{VcsToolButton.vue → VcsToolButton.ts.vue} +10 -9
- package/src/components/buttons/VcsToolButton.ts.vue.d.ts +100 -0
- package/src/components/composables.d.ts +6 -16
- package/src/components/{composables.js → composables.ts} +38 -31
- package/src/components/extent/{VcsExtent.vue → VcsExtent.ts.vue} +29 -21
- package/src/components/extent/VcsExtent.ts.vue.d.ts +50 -0
- package/src/components/extent/{VcsExtentEditor.vue → VcsExtentEditor.ts.vue} +12 -9
- package/src/components/extent/VcsExtentEditor.ts.vue.d.ts +57 -0
- package/src/components/flight/{VcsFlightAnchorsComponent.vue → VcsFlightAnchorsComponent.ts.vue} +134 -88
- package/src/components/flight/VcsFlightAnchorsComponent.ts.vue.d.ts +53 -0
- package/src/components/flight/{VcsFlightComponent.vue → VcsFlightComponent.ts.vue} +30 -29
- package/src/components/flight/{VcsFlightComponent.vue.d.ts → VcsFlightComponent.ts.vue.d.ts} +26 -11
- package/src/components/flight/{VcsFlightEditor.vue → VcsFlightEditor.ts.vue} +21 -18
- package/src/components/flight/VcsFlightEditor.ts.vue.d.ts +45 -0
- package/src/components/flight/{VcsFlightPlayer.vue → VcsFlightPlayer.ts.vue} +39 -34
- package/src/components/flight/VcsFlightPlayer.ts.vue.d.ts +31 -0
- package/src/components/flight/composables.d.ts +5 -7
- package/src/components/flight/{composables.js → composables.ts} +15 -10
- package/src/components/form-inputs-controls/{VcsCheckbox.vue → VcsCheckbox.ts.vue} +10 -7
- package/src/components/form-inputs-controls/VcsCheckbox.ts.vue.d.ts +47 -0
- package/src/components/form-inputs-controls/{VcsChipArrayInput.vue → VcsChipArrayInput.ts.vue} +61 -37
- package/src/components/form-inputs-controls/VcsChipArrayInput.ts.vue.d.ts +93 -0
- package/src/components/form-inputs-controls/{VcsCoordinate.vue → VcsCoordinate.ts.vue} +26 -30
- package/src/components/form-inputs-controls/VcsCoordinate.ts.vue.d.ts +104 -0
- package/src/components/form-inputs-controls/{VcsDatePicker.vue → VcsDatePicker.ts.vue} +11 -8
- package/src/components/form-inputs-controls/VcsDatePicker.ts.vue.d.ts +47 -0
- package/src/components/form-inputs-controls/{VcsFileInput.vue → VcsFileInput.ts.vue} +9 -8
- package/src/components/form-inputs-controls/VcsFileInput.ts.vue.d.ts +39 -0
- package/src/components/form-inputs-controls/{VcsLabel.vue → VcsLabel.ts.vue} +14 -14
- package/src/components/form-inputs-controls/VcsLabel.ts.vue.d.ts +74 -0
- package/src/components/form-inputs-controls/{VcsLabeledSlider.vue → VcsLabeledSlider.ts.vue} +11 -10
- package/src/components/form-inputs-controls/VcsLabeledSlider.ts.vue.d.ts +65 -0
- package/src/components/form-inputs-controls/{VcsRadio.vue → VcsRadio.ts.vue} +53 -17
- package/src/components/form-inputs-controls/VcsRadio.ts.vue.d.ts +76 -0
- package/src/components/form-inputs-controls/{VcsSelect.vue → VcsSelect.ts.vue} +16 -13
- package/src/components/form-inputs-controls/VcsSelect.ts.vue.d.ts +76 -0
- package/src/components/form-inputs-controls/{VcsSlider.vue → VcsSlider.ts.vue} +13 -18
- package/src/components/form-inputs-controls/VcsSlider.ts.vue.d.ts +38 -0
- package/src/components/form-inputs-controls/{VcsTextArea.vue → VcsTextArea.ts.vue} +8 -7
- package/src/components/form-inputs-controls/VcsTextArea.ts.vue.d.ts +39 -0
- package/src/components/form-inputs-controls/{VcsTextField.vue → VcsTextField.ts.vue} +18 -16
- package/src/components/form-inputs-controls/VcsTextField.ts.vue.d.ts +95 -0
- package/src/components/form-inputs-controls/{VcsWizard.vue → VcsWizard.ts.vue} +7 -7
- package/src/components/form-inputs-controls/VcsWizard.ts.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/{VcsWizardStep.vue → VcsWizardStep.ts.vue} +17 -16
- package/src/components/form-inputs-controls/VcsWizardStep.ts.vue.d.ts +126 -0
- package/src/components/form-output/{VcsFormattedNumber.vue → VcsFormattedNumber.ts.vue} +31 -30
- package/src/components/form-output/VcsFormattedNumber.ts.vue.d.ts +115 -0
- package/src/components/form-output/{VcsMarkdown.vue → VcsMarkdown.ts.vue} +8 -8
- package/src/components/form-output/VcsMarkdown.ts.vue.d.ts +18 -0
- package/src/components/form-output/VcsTemplateMarkdown.vue +4 -3
- package/src/components/form-output/VcsTemplateMarkdown.vue.d.ts +37 -6
- package/src/components/form-output/markdownHelper.d.ts +1 -5
- package/src/components/form-output/{markdownHelper.js → markdownHelper.ts} +2 -7
- package/src/components/icons/+all.d.ts +2 -2
- package/src/components/icons/+all.js +1 -1
- package/src/components/icons/2DAreaIcon.vue.d.ts +2 -1
- package/src/components/icons/2DDistanceIcon.vue.d.ts +2 -1
- package/src/components/icons/2DHeightObliqueIcon.vue.d.ts +2 -1
- package/src/components/icons/2DPointIcon.vue.d.ts +2 -1
- package/src/components/icons/3DAreaIcon.vue.d.ts +2 -1
- package/src/components/icons/3DDistanceIcon.vue.d.ts +2 -1
- package/src/components/icons/3DHeightIcon.vue.d.ts +2 -1
- package/src/components/icons/3DPointIcon.vue.d.ts +2 -1
- package/src/components/icons/AngleIcon.vue.d.ts +2 -1
- package/src/components/icons/AssociationsIcon.vue.d.ts +2 -1
- package/src/components/icons/AxisIcon.vue.d.ts +2 -1
- package/src/components/icons/BoundingBoxIcon.vue.d.ts +2 -1
- package/src/components/icons/CheckboxCheckedIcon.vue.d.ts +2 -1
- package/src/components/icons/CheckboxIcon.vue.d.ts +2 -1
- package/src/components/icons/CheckboxIndeterminateIcon.vue.d.ts +2 -1
- package/src/components/icons/CircleIcon.vue.d.ts +2 -1
- package/src/components/icons/ClippingHorizontalIcon.vue.d.ts +2 -1
- package/src/components/icons/ClippingIcon.vue.d.ts +2 -1
- package/src/components/icons/ClippingVerticalIcon.vue.d.ts +2 -1
- package/src/components/icons/ColorPickerIcon.vue.d.ts +2 -1
- package/src/components/icons/ColorSwatchIcon.vue.d.ts +2 -1
- package/src/components/icons/CommentIcon.vue.d.ts +2 -1
- package/src/components/icons/CompassIcon.vue.d.ts +2 -1
- package/src/components/icons/ComponentsIcon.vue.d.ts +2 -1
- package/src/components/icons/ComponentsPlusIcon.vue.d.ts +2 -1
- package/src/components/icons/ConeIcon.vue.d.ts +2 -1
- package/src/components/icons/CrosshairIcon.vue.d.ts +2 -1
- package/src/components/icons/DimensionsHouseIcon.vue.d.ts +2 -1
- package/src/components/icons/EditIcon.vue.d.ts +2 -1
- package/src/components/icons/EditVerticesIcon.vue.d.ts +2 -1
- package/src/components/icons/ElevationProfileIcon.vue.d.ts +2 -1
- package/src/components/icons/ExportAreaIcon.vue.d.ts +2 -1
- package/src/components/icons/ExportFlightIcon.vue.d.ts +2 -1
- package/src/components/icons/ExportIcon.vue.d.ts +2 -1
- package/src/components/icons/ExternalLinkIcon.vue.d.ts +2 -1
- package/src/components/icons/EyeIcon.vue.d.ts +2 -1
- package/src/components/icons/FastForwardIcon.vue.d.ts +2 -1
- package/src/components/icons/FilterIcon.vue.d.ts +2 -1
- package/src/components/icons/GlobalTerrainIcon.vue.d.ts +2 -1
- package/src/components/icons/GlobeNatureIcon.vue.d.ts +2 -1
- package/src/components/icons/GroundIcon.vue.d.ts +2 -1
- package/src/components/icons/HealthCareIndustriesIcon.vue.d.ts +2 -1
- package/src/components/icons/HelpIcon.vue.d.ts +2 -1
- package/src/components/icons/HideIcon.vue.d.ts +2 -1
- package/src/components/icons/HomePointIcon.vue.d.ts +2 -1
- package/src/components/icons/HospitalsIcon.vue.d.ts +2 -1
- package/src/components/icons/HouseIcon.vue.d.ts +2 -1
- package/src/components/icons/ImportIcon.vue.d.ts +2 -1
- package/src/components/icons/InfoIcon.vue.d.ts +2 -1
- package/src/components/icons/KebabIcon.vue.d.ts +2 -1
- package/src/components/icons/LabelIcon.vue.d.ts +2 -1
- package/src/components/icons/LayersIcon.vue.d.ts +2 -1
- package/src/components/icons/LegendIcon.vue.d.ts +2 -1
- package/src/components/icons/LineIcon.vue.d.ts +2 -1
- package/src/components/icons/LinkIcon.vue.d.ts +2 -1
- package/src/components/icons/LogoutIcon.vue.d.ts +2 -1
- package/src/components/icons/MapIcon.vue.d.ts +2 -1
- package/src/components/icons/MenuIcon.vue.d.ts +2 -1
- package/src/components/icons/MinusIcon.vue.d.ts +2 -1
- package/src/components/icons/MultiViewIcon.vue.d.ts +2 -1
- package/src/components/icons/ObjectAttributeIcon.vue.d.ts +2 -1
- package/src/components/icons/ObjectSelectIcon.vue.d.ts +2 -1
- package/src/components/icons/ObliqueViewIcon.vue.d.ts +2 -1
- package/src/components/icons/PdfIcon.vue.d.ts +2 -1
- package/src/components/icons/PedestrianIcon.vue.d.ts +2 -1
- package/src/components/icons/PenIcon.vue.d.ts +2 -1
- package/src/components/icons/PlayCircleIcon.vue.d.ts +2 -1
- package/src/components/icons/PlusIcon.vue.d.ts +2 -1
- package/src/components/icons/PoiIcon.vue.d.ts +2 -1
- package/src/components/icons/PointIcon.vue.d.ts +2 -1
- package/src/components/icons/PointMeasurementIcon.vue.d.ts +2 -1
- package/src/components/icons/PointSelectIcon.vue.d.ts +2 -1
- package/src/components/icons/PresentationModeIcon.vue.d.ts +2 -1
- package/src/components/icons/ProgressIcon.vue.d.ts +2 -1
- package/src/components/icons/QueryIcon.vue.d.ts +2 -1
- package/src/components/icons/RectangleIcon.vue.d.ts +2 -1
- package/src/components/icons/ReturnIcon.vue.d.ts +2 -1
- package/src/components/icons/RewindIcon.vue.d.ts +2 -1
- package/src/components/icons/RotateLeftIcon.vue.d.ts +2 -1
- package/src/components/icons/RotateRightIcon.vue.d.ts +2 -1
- package/src/components/icons/ScreenshotIcon.vue.d.ts +2 -1
- package/src/components/icons/SearchIcon.vue.d.ts +2 -1
- package/src/components/icons/ShadowIcon.vue.d.ts +2 -1
- package/src/components/icons/ShapesIcon.vue.d.ts +2 -1
- package/src/components/icons/ShareIcon.vue.d.ts +2 -1
- package/src/components/icons/SimpleCircleFilledIcon.vue.d.ts +2 -1
- package/src/components/icons/SimpleCircleHalfFilledIcon.vue.d.ts +2 -1
- package/src/components/icons/SimpleCircleOutlinedIcon.vue.d.ts +2 -1
- package/src/components/icons/SkipNextIcon.vue.d.ts +2 -1
- package/src/components/icons/SkipPreviousIcon.vue.d.ts +2 -1
- package/src/components/icons/SplitViewIcon.vue.d.ts +2 -1
- package/src/components/icons/TerrainBoxIcon.vue.d.ts +2 -1
- package/src/components/icons/TextStyleIcon.vue.d.ts +2 -1
- package/src/components/icons/ThreeDimensionsIcon.vue.d.ts +2 -1
- package/src/components/icons/ToolsIcon.vue.d.ts +2 -1
- package/src/components/icons/TouchIcon.vue.d.ts +2 -1
- package/src/components/icons/TransparentTerrainIcon.vue.d.ts +2 -1
- package/src/components/icons/TrashCanIcon.vue.d.ts +2 -1
- package/src/components/icons/TriangleIcon.vue.d.ts +2 -1
- package/src/components/icons/TwoDimensionsIcon.vue.d.ts +2 -1
- package/src/components/icons/UploadIcon.vue.d.ts +2 -1
- package/src/components/icons/UserProfileIcon.vue.d.ts +2 -1
- package/src/components/icons/UserShareIcon.vue.d.ts +2 -1
- package/src/components/icons/VideoRecorderIcon.vue.d.ts +2 -1
- package/src/components/icons/View360Icon.vue.d.ts +2 -1
- package/src/components/icons/ViewpointFlightIcon.vue.d.ts +2 -1
- package/src/components/icons/ViewpointIcon.vue.d.ts +2 -1
- package/src/components/icons/Viewshed360Icon.vue.d.ts +2 -1
- package/src/components/icons/ViewshedConeIcon.vue.d.ts +2 -1
- package/src/components/icons/ViewshedIcon.vue.d.ts +2 -1
- package/src/components/icons/WalkingIcon.vue.d.ts +2 -1
- package/src/components/icons/WallIcon.vue.d.ts +2 -1
- package/src/components/icons/WandIcon.vue.d.ts +2 -1
- package/src/components/import/{VcsFileDrop.vue → VcsFileDrop.ts.vue} +8 -7
- package/src/components/import/VcsFileDrop.ts.vue.d.ts +45 -0
- package/src/components/import/{VcsImportComponent.vue → VcsImportComponent.ts.vue} +20 -19
- package/src/components/import/VcsImportComponent.ts.vue.d.ts +48 -0
- package/src/components/lists/{VcsActionList.vue → VcsActionList.ts.vue} +18 -26
- package/src/components/lists/VcsActionList.ts.vue.d.ts +70 -0
- package/src/components/lists/{VcsGroupedList.vue → VcsGroupedList.ts.vue} +47 -40
- package/src/components/lists/VcsGroupedList.ts.vue.d.ts +126 -0
- package/src/components/lists/{VcsList.vue → VcsList.ts.vue} +36 -43
- package/src/components/lists/VcsList.ts.vue.d.ts +209 -0
- package/src/components/lists/{VcsListItemComponent.vue → VcsListItemComponent.ts.vue} +38 -27
- package/src/components/lists/VcsListItemComponent.ts.vue.d.ts +104 -0
- package/src/components/lists/{VcsTreeNode.vue → VcsTreeNode.ts.vue} +69 -52
- package/src/components/lists/VcsTreeNode.ts.vue.d.ts +279 -0
- package/src/components/lists/{VcsTreeview.vue → VcsTreeview.ts.vue} +27 -27
- package/src/components/lists/VcsTreeview.ts.vue.d.ts +149 -0
- package/src/components/lists/{VcsTreeviewSearchbar.vue → VcsTreeviewSearchbar.ts.vue} +5 -5
- package/src/components/lists/VcsTreeviewSearchbar.ts.vue.d.ts +36 -0
- package/src/components/lists/{VcsTreeviewTitle.vue → VcsTreeviewTitle.ts.vue} +6 -4
- package/src/components/lists/VcsTreeviewTitle.ts.vue.d.ts +25 -0
- package/src/components/lists/dragHelper.d.ts +2 -2
- package/src/components/lists/listHelper.d.ts +11 -83
- package/src/components/lists/listHelper.ts +202 -0
- package/src/components/modelHelper.d.ts +7 -14
- package/src/components/{modelHelper.js → modelHelper.ts} +32 -26
- package/src/components/notification/{VcsBadge.vue → VcsBadge.ts.vue} +5 -3
- package/src/components/notification/VcsBadge.ts.vue.d.ts +19 -0
- package/src/components/notification/{VcsHelp.vue → VcsHelp.ts.vue} +6 -3
- package/src/components/notification/VcsHelp.ts.vue.d.ts +20 -0
- package/src/components/notification/{VcsHelpTooltip.vue → VcsHelpTooltip.ts.vue} +6 -3
- package/src/components/notification/VcsHelpTooltip.ts.vue.d.ts +31 -0
- package/src/components/plugins/{AbstractConfigEditor.vue → AbstractConfigEditor.ts.vue} +20 -15
- package/src/components/plugins/AbstractConfigEditor.ts.vue.d.ts +73 -0
- package/src/components/plugins/{VcsLoadingOverlay.vue → VcsLoadingOverlay.ts.vue} +10 -9
- package/src/components/plugins/VcsLoadingOverlay.ts.vue.d.ts +76 -0
- package/src/components/plugins/{VcsWorkspaceWrapper.vue → VcsWorkspaceWrapper.ts.vue} +11 -8
- package/src/components/plugins/VcsWorkspaceWrapper.ts.vue.d.ts +100 -0
- package/src/components/projection/{VcsProjection.vue → VcsProjection.ts.vue} +39 -33
- package/src/components/projection/VcsProjection.ts.vue.d.ts +57 -0
- package/src/components/section/{VcsExpansionPanel.vue → VcsExpansionPanel.ts.vue} +7 -5
- package/src/components/section/VcsExpansionPanel.ts.vue.d.ts +58 -0
- package/src/components/section/{VcsFormSection.vue → VcsFormSection.ts.vue} +11 -13
- package/src/components/section/VcsFormSection.ts.vue.d.ts +102 -0
- package/src/components/style/{StyleMenuWrapper.vue → StyleMenuWrapper.ts.vue} +14 -14
- package/src/components/style/StyleMenuWrapper.ts.vue.d.ts +68 -0
- package/src/components/style/VcsFeatureStyleComponent.vue +4 -1
- package/src/components/style/VcsFeatureStyleComponent.vue.d.ts +12 -11
- package/src/components/style/{VcsFillMenu.vue → VcsFillMenu.ts.vue} +9 -7
- package/src/components/style/VcsFillMenu.ts.vue.d.ts +25 -0
- package/src/components/style/{VcsFillSelector.vue → VcsFillSelector.ts.vue} +14 -6
- package/src/components/style/VcsFillSelector.ts.vue.d.ts +34 -0
- package/src/components/style/{VcsImageMenu.vue → VcsImageMenu.ts.vue} +22 -24
- package/src/components/style/VcsImageMenu.ts.vue.d.ts +23 -0
- package/src/components/style/{VcsImageSelector.vue → VcsImageSelector.ts.vue} +110 -123
- package/src/components/style/VcsImageSelector.ts.vue.d.ts +102 -0
- package/src/components/style/{VcsStrokeMenu.vue → VcsStrokeMenu.ts.vue} +9 -7
- package/src/components/style/VcsStrokeMenu.ts.vue.d.ts +25 -0
- package/src/components/style/{VcsStrokeSelector.vue → VcsStrokeSelector.ts.vue} +20 -15
- package/src/components/style/VcsStrokeSelector.ts.vue.d.ts +36 -0
- package/src/components/style/{VcsTextMenu.vue → VcsTextMenu.ts.vue} +9 -7
- package/src/components/style/VcsTextMenu.ts.vue.d.ts +49 -0
- package/src/components/style/{VcsTextSelector.vue → VcsTextSelector.ts.vue} +59 -46
- package/src/components/style/VcsTextSelector.ts.vue.d.ts +60 -0
- package/src/components/style/{VcsVectorStyleComponent.vue → VcsVectorStyleComponent.ts.vue} +32 -46
- package/src/components/style/VcsVectorStyleComponent.ts.vue.d.ts +84 -0
- package/src/components/style/composables.d.ts +29 -10
- package/src/components/style/composables.ts +87 -0
- package/src/components/tables/{VcsDataTable.vue → VcsDataTable.ts.vue} +70 -74
- package/src/components/tables/VcsDataTable.ts.vue.d.ts +178 -0
- package/src/components/tables/{VcsTable.vue → VcsTable.ts.vue} +69 -61
- package/src/components/tables/VcsTable.ts.vue.d.ts +127 -0
- package/src/components/tables/{VcsTableCell.vue → VcsTableCell.ts.vue} +7 -6
- package/src/components/tables/VcsTableCell.ts.vue.d.ts +43 -0
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +2 -2
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +40 -41
- package/src/components/vector-properties/VcsFeatureInputEditor.vue +3 -3
- package/src/components/vector-properties/VcsFeatureInputEditor.vue.d.ts +6 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue +2 -2
- package/src/components/vector-properties/VcsFeatureTransforms.vue.d.ts +11 -10
- package/src/components/vector-properties/{VcsSnapTo.vue → VcsSnapTo.ts.vue} +9 -7
- package/src/components/vector-properties/VcsSnapTo.ts.vue.d.ts +19 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +8 -8
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +65 -66
- package/src/components/viewpoint/{VcsViewpointComponent.vue → VcsViewpointComponent.ts.vue} +64 -74
- package/src/components/viewpoint/VcsViewpointComponent.ts.vue.d.ts +160 -0
- package/src/components/viewpoint/{VcsViewpointEditor.vue → VcsViewpointEditor.ts.vue} +24 -23
- package/src/components/viewpoint/VcsViewpointEditor.ts.vue.d.ts +57 -0
- package/src/contentTree/LayerSwap.vue +2 -2
- package/src/contentTree/LayerSwap.vue.d.ts +5 -4
- package/src/contentTree/LayerTree.vue +2 -2
- package/src/contentTree/LayerTree.vue.d.ts +7 -6
- package/src/contentTree/contentTreeCollection.d.ts +1 -1
- package/src/contentTree/contentTreeItem.d.ts +6 -6
- package/src/contentTree/wmsChildContentTreeItem.js +1 -1
- package/src/contentTree/wmsGroupContentTreeItem.d.ts +2 -2
- package/src/featureInfo/AddressBalloonComponent.vue.d.ts +2 -1
- package/src/featureInfo/BalloonComponent.vue +2 -2
- package/src/featureInfo/BalloonComponent.vue.d.ts +7 -6
- package/src/featureInfo/ClusterFeatureComponent.vue +3 -3
- package/src/featureInfo/ClusterFeatureComponent.vue.d.ts +2 -6
- package/src/featureInfo/IframeComponent.vue.d.ts +4 -3
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -1
- package/src/featureInfo/abstractFeatureInfoView.d.ts +3 -3
- package/src/featureInfo/abstractFeatureInfoView.js +1 -1
- package/src/featureInfo/balloonFeatureInfoView.d.ts +2 -2
- package/src/featureInfo/featureInfo.d.ts +15 -16
- package/src/featureInfo/featureInfo.js +7 -7
- package/src/featureInfo/tableFeatureInfoView.js +1 -1
- package/src/init.js +1 -1
- package/src/legend/StyleLegendItem.vue.d.ts +6 -5
- package/src/legend/VcsLegend.vue +3 -3
- package/src/legend/VcsLegend.vue.d.ts +5 -4
- package/src/manager/buttonManager.js +2 -2
- package/src/manager/collectionManager/CollectionComponent.vue +2 -2
- package/src/manager/collectionManager/CollectionComponent.vue.d.ts +10 -9
- package/src/manager/collectionManager/CollectionComponentContent.vue +3 -3
- package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +8 -7
- package/src/manager/collectionManager/CollectionComponentList.vue +4 -4
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +5 -4
- package/src/manager/collectionManager/CollectionComponentProvider.vue.d.ts +4 -3
- package/src/manager/collectionManager/CollectionComponentStandalone.vue +2 -2
- package/src/manager/collectionManager/CollectionComponentStandalone.vue.d.ts +7 -6
- package/src/manager/collectionManager/CollectionManager.vue.d.ts +6 -5
- package/src/manager/collectionManager/categoryManager.d.ts +1 -1
- package/src/manager/collectionManager/collectionComponentClass.d.ts +2 -7
- package/src/manager/collectionManager/collectionComponentClass.js +3 -12
- package/src/manager/collectionManager/collectionManager.d.ts +7 -8
- package/src/manager/collectionManager/collectionManager.js +3 -1
- package/src/manager/collectionManager/editorCollectionComponentClass.d.ts +1 -2
- package/src/manager/contextMenu/ContextMenuComponent.vue +1 -1
- package/src/manager/contextMenu/ContextMenuComponent.vue.d.ts +4 -3
- package/src/manager/contextMenu/contextMenuManager.js +1 -1
- package/src/manager/navbarManager.d.ts +5 -5
- package/src/manager/panel/PanelComponent.vue.d.ts +8 -7
- package/src/manager/panel/PanelManagerComponent.vue.d.ts +15 -14
- package/src/manager/panel/panelManager.d.ts +5 -14
- package/src/manager/panel/panelManager.js +1 -0
- package/src/manager/toolbox/GroupToolboxComponent.vue +1 -1
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +9 -8
- package/src/manager/toolbox/SelectToolboxComponent.vue +1 -1
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +7 -6
- package/src/manager/toolbox/ToolboxManagerComponent.vue +1 -1
- package/src/manager/toolbox/ToolboxManagerComponent.vue.d.ts +20 -19
- package/src/manager/toolbox/toolboxManager.d.ts +3 -3
- package/src/manager/toolbox/toolboxManager.js +3 -3
- package/src/manager/window/WindowComponent.vue.d.ts +11 -10
- package/src/manager/window/WindowComponentHeader.vue +3 -3
- package/src/manager/window/WindowComponentHeader.vue.d.ts +10 -9
- package/src/manager/window/WindowManager.vue.d.ts +8 -7
- package/src/manager/window/windowHelper.d.ts +3 -3
- package/src/manager/window/windowManager.d.ts +1 -1
- package/src/navigation/MapNavCompass.vue.d.ts +5 -4
- package/src/navigation/MapNavigation.vue.d.ts +19 -18
- package/src/navigation/ObliqueRotation.vue.d.ts +4 -3
- package/src/navigation/OrientationToolsButton.vue.d.ts +7 -6
- package/src/navigation/TiltSlider.vue +1 -1
- package/src/navigation/TiltSlider.vue.d.ts +9 -8
- package/src/navigation/VcsCompass.vue.d.ts +9 -8
- package/src/navigation/VcsZoomButton.vue.d.ts +4 -3
- package/src/navigation/locatorHelper.d.ts +2 -5
- package/src/navigation/locatorHelper.js +1 -1
- package/src/navigation/overviewMap.d.ts +2 -4
- package/src/notifier/NotifierComponent.vue +1 -1
- package/src/notifier/NotifierComponent.vue.d.ts +13 -5
- package/src/notifier/notifier.d.ts +1 -1
- package/src/search/ResultItem.vue +1 -1
- package/src/search/ResultItem.vue.d.ts +6 -5
- package/src/search/ResultsComponent.vue.d.ts +7 -6
- package/src/search/SearchComponent.vue +2 -2
- package/src/search/SearchComponent.vue.d.ts +11 -10
- package/src/search/search.d.ts +2 -3
- package/src/setup.js +1 -7
- package/src/siteConfig.d.ts +2 -1
- package/src/{siteConfig.js → siteConfig.ts} +7 -12
- package/src/state.d.ts +2 -2
- package/src/state.js +1 -0
- package/src/uiConfig.d.ts +1 -346
- package/src/vcsUiApp.d.ts +8 -94
- package/src/vcsUiApp.js +4 -4
- package/src/vuePlugins/i18n.d.ts +19 -9
- package/src/vuePlugins/{i18n.js → i18n.ts} +65 -14
- package/src/vuePlugins/vuetify.d.ts +2 -2
- package/tsconfig.json +3 -3
- package/build/.eslintrc +0 -9
- package/build/postInstall.js +0 -32
- package/dist/assets/cesium/ThirdParty/Workers/pako_deflate.min.js +0 -2
- package/dist/assets/cesium/ThirdParty/Workers/pako_inflate.min.js +0 -2
- package/dist/assets/cesium/ThirdParty/Workers/z-worker-pako.js +0 -1
- package/dist/assets/cesium/Workers/chunk-DMAUZK44.js +0 -634
- package/dist/assets/cesium/Workers/chunk-L7QP6H72.js +0 -2857
- package/dist/assets/cesium/Workers/chunk-RXELAPHQ.js +0 -117
- package/dist/assets/cesium/Workers/chunk-TYFDCGJA.js +0 -963
- package/dist/assets/cesium-ec4a7f64.js +0 -170717
- package/dist/assets/core-9c7aeefa.js +0 -46378
- package/dist/assets/ol-bf48f5a4.js +0 -59317
- package/dist/assets/ui-e324a87f.css +0 -1
- package/dist/assets/ui-e324a87f.js +0 -39511
- package/dist/assets/vue-98daceb7.js +0 -6083
- package/dist/assets/vuetify-63825fe2.css +0 -5
- package/dist/assets/vuetify-63825fe2.js +0 -25019
- package/src/components/ImageElementInjector.vue.d.ts +0 -24
- package/src/components/attrsHelpers.js +0 -14
- package/src/components/buttons/VcsActionButtonList.vue.d.ts +0 -87
- package/src/components/buttons/VcsButton.vue.d.ts +0 -74
- package/src/components/buttons/VcsFormButton.vue.d.ts +0 -58
- package/src/components/buttons/VcsToolButton.vue.d.ts +0 -85
- package/src/components/extent/VcsExtent.vue.d.ts +0 -41
- package/src/components/extent/VcsExtentEditor.vue.d.ts +0 -46
- package/src/components/flight/VcsFlightAnchorsComponent.vue.d.ts +0 -42
- package/src/components/flight/VcsFlightEditor.vue.d.ts +0 -36
- package/src/components/flight/VcsFlightPlayer.vue.d.ts +0 -26
- package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +0 -37
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +0 -76
- package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +0 -92
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +0 -40
- package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +0 -28
- package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +0 -63
- package/src/components/form-inputs-controls/VcsLabeledSlider.vue.d.ts +0 -55
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +0 -60
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +0 -61
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +0 -31
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +0 -28
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +0 -77
- package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +0 -4
- package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +0 -102
- package/src/components/form-output/VcsFormattedNumber.vue.d.ts +0 -110
- package/src/components/form-output/VcsMarkdown.vue.d.ts +0 -17
- package/src/components/import/VcsFileDrop.vue.d.ts +0 -37
- package/src/components/import/VcsImportComponent.vue.d.ts +0 -39
- package/src/components/lists/VcsActionList.vue.d.ts +0 -68
- package/src/components/lists/VcsGroupedList.vue.d.ts +0 -17
- package/src/components/lists/VcsList.vue.d.ts +0 -50
- package/src/components/lists/VcsListItemComponent.vue.d.ts +0 -56
- package/src/components/lists/VcsTreeNode.vue.d.ts +0 -39
- package/src/components/lists/VcsTreeview.vue.d.ts +0 -128
- package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +0 -26
- package/src/components/lists/VcsTreeviewTitle.vue.d.ts +0 -9
- package/src/components/lists/listHelper.js +0 -355
- package/src/components/notification/VcsBadge.vue.d.ts +0 -14
- package/src/components/notification/VcsHelp.vue.d.ts +0 -14
- package/src/components/notification/VcsHelpTooltip.vue.d.ts +0 -25
- package/src/components/notification/validation.d.ts +0 -8
- package/src/components/notification/validation.js +0 -20
- package/src/components/plugins/AbstractConfigEditor.vue.d.ts +0 -59
- package/src/components/plugins/VcsLoadingOverlay.vue.d.ts +0 -2
- package/src/components/plugins/VcsWorkspaceWrapper.vue.d.ts +0 -82
- package/src/components/projection/VcsProjection.vue.d.ts +0 -7
- package/src/components/section/VcsExpansionPanel.vue.d.ts +0 -19
- package/src/components/section/VcsFormSection.vue.d.ts +0 -85
- package/src/components/style/StyleMenuWrapper.vue.d.ts +0 -55
- package/src/components/style/VcsFillMenu.vue.d.ts +0 -16
- package/src/components/style/VcsFillSelector.vue.d.ts +0 -22
- package/src/components/style/VcsImageMenu.vue.d.ts +0 -16
- package/src/components/style/VcsImageSelector.vue.d.ts +0 -129
- package/src/components/style/VcsStrokeMenu.vue.d.ts +0 -16
- package/src/components/style/VcsStrokeSelector.vue.d.ts +0 -24
- package/src/components/style/VcsTextMenu.vue.d.ts +0 -43
- package/src/components/style/VcsTextSelector.vue.d.ts +0 -56
- package/src/components/style/VcsVectorStyleComponent.vue.d.ts +0 -77
- package/src/components/style/composables.js +0 -41
- package/src/components/tables/VcsDataTable.vue.d.ts +0 -147
- package/src/components/tables/VcsTable.vue.d.ts +0 -101
- package/src/components/tables/VcsTableCell.vue.d.ts +0 -13
- package/src/components/vector-properties/VcsSnapTo.vue.d.ts +0 -2
- package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +0 -128
- package/src/components/viewpoint/VcsViewpointEditor.vue.d.ts +0 -37
|
@@ -1,2857 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.121.5
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
* Columbus View (Pat. Pend.)
|
|
21
|
-
*
|
|
22
|
-
* Portions licensed separately.
|
|
23
|
-
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
Math_default
|
|
28
|
-
} from "./chunk-QEMZBTFR.js";
|
|
29
|
-
import {
|
|
30
|
-
defaultValue_default
|
|
31
|
-
} from "./chunk-4OZXCGBJ.js";
|
|
32
|
-
import {
|
|
33
|
-
Check_default,
|
|
34
|
-
DeveloperError_default
|
|
35
|
-
} from "./chunk-PMC3FYPH.js";
|
|
36
|
-
import {
|
|
37
|
-
defined_default
|
|
38
|
-
} from "./chunk-NCBLZFLY.js";
|
|
39
|
-
|
|
40
|
-
// packages/engine/Source/Core/Cartesian3.js
|
|
41
|
-
function Cartesian3(x, y, z) {
|
|
42
|
-
this.x = defaultValue_default(x, 0);
|
|
43
|
-
this.y = defaultValue_default(y, 0);
|
|
44
|
-
this.z = defaultValue_default(z, 0);
|
|
45
|
-
}
|
|
46
|
-
Cartesian3.fromSpherical = function(spherical, result) {
|
|
47
|
-
Check_default.typeOf.object("spherical", spherical);
|
|
48
|
-
if (!defined_default(result)) {
|
|
49
|
-
result = new Cartesian3();
|
|
50
|
-
}
|
|
51
|
-
const clock = spherical.clock;
|
|
52
|
-
const cone = spherical.cone;
|
|
53
|
-
const magnitude = defaultValue_default(spherical.magnitude, 1);
|
|
54
|
-
const radial = magnitude * Math.sin(cone);
|
|
55
|
-
result.x = radial * Math.cos(clock);
|
|
56
|
-
result.y = radial * Math.sin(clock);
|
|
57
|
-
result.z = magnitude * Math.cos(cone);
|
|
58
|
-
return result;
|
|
59
|
-
};
|
|
60
|
-
Cartesian3.fromElements = function(x, y, z, result) {
|
|
61
|
-
if (!defined_default(result)) {
|
|
62
|
-
return new Cartesian3(x, y, z);
|
|
63
|
-
}
|
|
64
|
-
result.x = x;
|
|
65
|
-
result.y = y;
|
|
66
|
-
result.z = z;
|
|
67
|
-
return result;
|
|
68
|
-
};
|
|
69
|
-
Cartesian3.clone = function(cartesian, result) {
|
|
70
|
-
if (!defined_default(cartesian)) {
|
|
71
|
-
return void 0;
|
|
72
|
-
}
|
|
73
|
-
if (!defined_default(result)) {
|
|
74
|
-
return new Cartesian3(cartesian.x, cartesian.y, cartesian.z);
|
|
75
|
-
}
|
|
76
|
-
result.x = cartesian.x;
|
|
77
|
-
result.y = cartesian.y;
|
|
78
|
-
result.z = cartesian.z;
|
|
79
|
-
return result;
|
|
80
|
-
};
|
|
81
|
-
Cartesian3.fromCartesian4 = Cartesian3.clone;
|
|
82
|
-
Cartesian3.packedLength = 3;
|
|
83
|
-
Cartesian3.pack = function(value, array, startingIndex) {
|
|
84
|
-
Check_default.typeOf.object("value", value);
|
|
85
|
-
Check_default.defined("array", array);
|
|
86
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
87
|
-
array[startingIndex++] = value.x;
|
|
88
|
-
array[startingIndex++] = value.y;
|
|
89
|
-
array[startingIndex] = value.z;
|
|
90
|
-
return array;
|
|
91
|
-
};
|
|
92
|
-
Cartesian3.unpack = function(array, startingIndex, result) {
|
|
93
|
-
Check_default.defined("array", array);
|
|
94
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
95
|
-
if (!defined_default(result)) {
|
|
96
|
-
result = new Cartesian3();
|
|
97
|
-
}
|
|
98
|
-
result.x = array[startingIndex++];
|
|
99
|
-
result.y = array[startingIndex++];
|
|
100
|
-
result.z = array[startingIndex];
|
|
101
|
-
return result;
|
|
102
|
-
};
|
|
103
|
-
Cartesian3.packArray = function(array, result) {
|
|
104
|
-
Check_default.defined("array", array);
|
|
105
|
-
const length = array.length;
|
|
106
|
-
const resultLength = length * 3;
|
|
107
|
-
if (!defined_default(result)) {
|
|
108
|
-
result = new Array(resultLength);
|
|
109
|
-
} else if (!Array.isArray(result) && result.length !== resultLength) {
|
|
110
|
-
throw new DeveloperError_default(
|
|
111
|
-
"If result is a typed array, it must have exactly array.length * 3 elements"
|
|
112
|
-
);
|
|
113
|
-
} else if (result.length !== resultLength) {
|
|
114
|
-
result.length = resultLength;
|
|
115
|
-
}
|
|
116
|
-
for (let i = 0; i < length; ++i) {
|
|
117
|
-
Cartesian3.pack(array[i], result, i * 3);
|
|
118
|
-
}
|
|
119
|
-
return result;
|
|
120
|
-
};
|
|
121
|
-
Cartesian3.unpackArray = function(array, result) {
|
|
122
|
-
Check_default.defined("array", array);
|
|
123
|
-
Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 3);
|
|
124
|
-
if (array.length % 3 !== 0) {
|
|
125
|
-
throw new DeveloperError_default("array length must be a multiple of 3.");
|
|
126
|
-
}
|
|
127
|
-
const length = array.length;
|
|
128
|
-
if (!defined_default(result)) {
|
|
129
|
-
result = new Array(length / 3);
|
|
130
|
-
} else {
|
|
131
|
-
result.length = length / 3;
|
|
132
|
-
}
|
|
133
|
-
for (let i = 0; i < length; i += 3) {
|
|
134
|
-
const index = i / 3;
|
|
135
|
-
result[index] = Cartesian3.unpack(array, i, result[index]);
|
|
136
|
-
}
|
|
137
|
-
return result;
|
|
138
|
-
};
|
|
139
|
-
Cartesian3.fromArray = Cartesian3.unpack;
|
|
140
|
-
Cartesian3.maximumComponent = function(cartesian) {
|
|
141
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
142
|
-
return Math.max(cartesian.x, cartesian.y, cartesian.z);
|
|
143
|
-
};
|
|
144
|
-
Cartesian3.minimumComponent = function(cartesian) {
|
|
145
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
146
|
-
return Math.min(cartesian.x, cartesian.y, cartesian.z);
|
|
147
|
-
};
|
|
148
|
-
Cartesian3.minimumByComponent = function(first, second, result) {
|
|
149
|
-
Check_default.typeOf.object("first", first);
|
|
150
|
-
Check_default.typeOf.object("second", second);
|
|
151
|
-
Check_default.typeOf.object("result", result);
|
|
152
|
-
result.x = Math.min(first.x, second.x);
|
|
153
|
-
result.y = Math.min(first.y, second.y);
|
|
154
|
-
result.z = Math.min(first.z, second.z);
|
|
155
|
-
return result;
|
|
156
|
-
};
|
|
157
|
-
Cartesian3.maximumByComponent = function(first, second, result) {
|
|
158
|
-
Check_default.typeOf.object("first", first);
|
|
159
|
-
Check_default.typeOf.object("second", second);
|
|
160
|
-
Check_default.typeOf.object("result", result);
|
|
161
|
-
result.x = Math.max(first.x, second.x);
|
|
162
|
-
result.y = Math.max(first.y, second.y);
|
|
163
|
-
result.z = Math.max(first.z, second.z);
|
|
164
|
-
return result;
|
|
165
|
-
};
|
|
166
|
-
Cartesian3.clamp = function(value, min, max, result) {
|
|
167
|
-
Check_default.typeOf.object("value", value);
|
|
168
|
-
Check_default.typeOf.object("min", min);
|
|
169
|
-
Check_default.typeOf.object("max", max);
|
|
170
|
-
Check_default.typeOf.object("result", result);
|
|
171
|
-
const x = Math_default.clamp(value.x, min.x, max.x);
|
|
172
|
-
const y = Math_default.clamp(value.y, min.y, max.y);
|
|
173
|
-
const z = Math_default.clamp(value.z, min.z, max.z);
|
|
174
|
-
result.x = x;
|
|
175
|
-
result.y = y;
|
|
176
|
-
result.z = z;
|
|
177
|
-
return result;
|
|
178
|
-
};
|
|
179
|
-
Cartesian3.magnitudeSquared = function(cartesian) {
|
|
180
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
181
|
-
return cartesian.x * cartesian.x + cartesian.y * cartesian.y + cartesian.z * cartesian.z;
|
|
182
|
-
};
|
|
183
|
-
Cartesian3.magnitude = function(cartesian) {
|
|
184
|
-
return Math.sqrt(Cartesian3.magnitudeSquared(cartesian));
|
|
185
|
-
};
|
|
186
|
-
var distanceScratch = new Cartesian3();
|
|
187
|
-
Cartesian3.distance = function(left, right) {
|
|
188
|
-
Check_default.typeOf.object("left", left);
|
|
189
|
-
Check_default.typeOf.object("right", right);
|
|
190
|
-
Cartesian3.subtract(left, right, distanceScratch);
|
|
191
|
-
return Cartesian3.magnitude(distanceScratch);
|
|
192
|
-
};
|
|
193
|
-
Cartesian3.distanceSquared = function(left, right) {
|
|
194
|
-
Check_default.typeOf.object("left", left);
|
|
195
|
-
Check_default.typeOf.object("right", right);
|
|
196
|
-
Cartesian3.subtract(left, right, distanceScratch);
|
|
197
|
-
return Cartesian3.magnitudeSquared(distanceScratch);
|
|
198
|
-
};
|
|
199
|
-
Cartesian3.normalize = function(cartesian, result) {
|
|
200
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
201
|
-
Check_default.typeOf.object("result", result);
|
|
202
|
-
const magnitude = Cartesian3.magnitude(cartesian);
|
|
203
|
-
result.x = cartesian.x / magnitude;
|
|
204
|
-
result.y = cartesian.y / magnitude;
|
|
205
|
-
result.z = cartesian.z / magnitude;
|
|
206
|
-
if (isNaN(result.x) || isNaN(result.y) || isNaN(result.z)) {
|
|
207
|
-
throw new DeveloperError_default("normalized result is not a number");
|
|
208
|
-
}
|
|
209
|
-
return result;
|
|
210
|
-
};
|
|
211
|
-
Cartesian3.dot = function(left, right) {
|
|
212
|
-
Check_default.typeOf.object("left", left);
|
|
213
|
-
Check_default.typeOf.object("right", right);
|
|
214
|
-
return left.x * right.x + left.y * right.y + left.z * right.z;
|
|
215
|
-
};
|
|
216
|
-
Cartesian3.multiplyComponents = function(left, right, result) {
|
|
217
|
-
Check_default.typeOf.object("left", left);
|
|
218
|
-
Check_default.typeOf.object("right", right);
|
|
219
|
-
Check_default.typeOf.object("result", result);
|
|
220
|
-
result.x = left.x * right.x;
|
|
221
|
-
result.y = left.y * right.y;
|
|
222
|
-
result.z = left.z * right.z;
|
|
223
|
-
return result;
|
|
224
|
-
};
|
|
225
|
-
Cartesian3.divideComponents = function(left, right, result) {
|
|
226
|
-
Check_default.typeOf.object("left", left);
|
|
227
|
-
Check_default.typeOf.object("right", right);
|
|
228
|
-
Check_default.typeOf.object("result", result);
|
|
229
|
-
result.x = left.x / right.x;
|
|
230
|
-
result.y = left.y / right.y;
|
|
231
|
-
result.z = left.z / right.z;
|
|
232
|
-
return result;
|
|
233
|
-
};
|
|
234
|
-
Cartesian3.add = function(left, right, result) {
|
|
235
|
-
Check_default.typeOf.object("left", left);
|
|
236
|
-
Check_default.typeOf.object("right", right);
|
|
237
|
-
Check_default.typeOf.object("result", result);
|
|
238
|
-
result.x = left.x + right.x;
|
|
239
|
-
result.y = left.y + right.y;
|
|
240
|
-
result.z = left.z + right.z;
|
|
241
|
-
return result;
|
|
242
|
-
};
|
|
243
|
-
Cartesian3.subtract = function(left, right, result) {
|
|
244
|
-
Check_default.typeOf.object("left", left);
|
|
245
|
-
Check_default.typeOf.object("right", right);
|
|
246
|
-
Check_default.typeOf.object("result", result);
|
|
247
|
-
result.x = left.x - right.x;
|
|
248
|
-
result.y = left.y - right.y;
|
|
249
|
-
result.z = left.z - right.z;
|
|
250
|
-
return result;
|
|
251
|
-
};
|
|
252
|
-
Cartesian3.multiplyByScalar = function(cartesian, scalar, result) {
|
|
253
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
254
|
-
Check_default.typeOf.number("scalar", scalar);
|
|
255
|
-
Check_default.typeOf.object("result", result);
|
|
256
|
-
result.x = cartesian.x * scalar;
|
|
257
|
-
result.y = cartesian.y * scalar;
|
|
258
|
-
result.z = cartesian.z * scalar;
|
|
259
|
-
return result;
|
|
260
|
-
};
|
|
261
|
-
Cartesian3.divideByScalar = function(cartesian, scalar, result) {
|
|
262
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
263
|
-
Check_default.typeOf.number("scalar", scalar);
|
|
264
|
-
Check_default.typeOf.object("result", result);
|
|
265
|
-
result.x = cartesian.x / scalar;
|
|
266
|
-
result.y = cartesian.y / scalar;
|
|
267
|
-
result.z = cartesian.z / scalar;
|
|
268
|
-
return result;
|
|
269
|
-
};
|
|
270
|
-
Cartesian3.negate = function(cartesian, result) {
|
|
271
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
272
|
-
Check_default.typeOf.object("result", result);
|
|
273
|
-
result.x = -cartesian.x;
|
|
274
|
-
result.y = -cartesian.y;
|
|
275
|
-
result.z = -cartesian.z;
|
|
276
|
-
return result;
|
|
277
|
-
};
|
|
278
|
-
Cartesian3.abs = function(cartesian, result) {
|
|
279
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
280
|
-
Check_default.typeOf.object("result", result);
|
|
281
|
-
result.x = Math.abs(cartesian.x);
|
|
282
|
-
result.y = Math.abs(cartesian.y);
|
|
283
|
-
result.z = Math.abs(cartesian.z);
|
|
284
|
-
return result;
|
|
285
|
-
};
|
|
286
|
-
var lerpScratch = new Cartesian3();
|
|
287
|
-
Cartesian3.lerp = function(start, end, t, result) {
|
|
288
|
-
Check_default.typeOf.object("start", start);
|
|
289
|
-
Check_default.typeOf.object("end", end);
|
|
290
|
-
Check_default.typeOf.number("t", t);
|
|
291
|
-
Check_default.typeOf.object("result", result);
|
|
292
|
-
Cartesian3.multiplyByScalar(end, t, lerpScratch);
|
|
293
|
-
result = Cartesian3.multiplyByScalar(start, 1 - t, result);
|
|
294
|
-
return Cartesian3.add(lerpScratch, result, result);
|
|
295
|
-
};
|
|
296
|
-
var angleBetweenScratch = new Cartesian3();
|
|
297
|
-
var angleBetweenScratch2 = new Cartesian3();
|
|
298
|
-
Cartesian3.angleBetween = function(left, right) {
|
|
299
|
-
Check_default.typeOf.object("left", left);
|
|
300
|
-
Check_default.typeOf.object("right", right);
|
|
301
|
-
Cartesian3.normalize(left, angleBetweenScratch);
|
|
302
|
-
Cartesian3.normalize(right, angleBetweenScratch2);
|
|
303
|
-
const cosine = Cartesian3.dot(angleBetweenScratch, angleBetweenScratch2);
|
|
304
|
-
const sine = Cartesian3.magnitude(
|
|
305
|
-
Cartesian3.cross(
|
|
306
|
-
angleBetweenScratch,
|
|
307
|
-
angleBetweenScratch2,
|
|
308
|
-
angleBetweenScratch
|
|
309
|
-
)
|
|
310
|
-
);
|
|
311
|
-
return Math.atan2(sine, cosine);
|
|
312
|
-
};
|
|
313
|
-
var mostOrthogonalAxisScratch = new Cartesian3();
|
|
314
|
-
Cartesian3.mostOrthogonalAxis = function(cartesian, result) {
|
|
315
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
316
|
-
Check_default.typeOf.object("result", result);
|
|
317
|
-
const f = Cartesian3.normalize(cartesian, mostOrthogonalAxisScratch);
|
|
318
|
-
Cartesian3.abs(f, f);
|
|
319
|
-
if (f.x <= f.y) {
|
|
320
|
-
if (f.x <= f.z) {
|
|
321
|
-
result = Cartesian3.clone(Cartesian3.UNIT_X, result);
|
|
322
|
-
} else {
|
|
323
|
-
result = Cartesian3.clone(Cartesian3.UNIT_Z, result);
|
|
324
|
-
}
|
|
325
|
-
} else if (f.y <= f.z) {
|
|
326
|
-
result = Cartesian3.clone(Cartesian3.UNIT_Y, result);
|
|
327
|
-
} else {
|
|
328
|
-
result = Cartesian3.clone(Cartesian3.UNIT_Z, result);
|
|
329
|
-
}
|
|
330
|
-
return result;
|
|
331
|
-
};
|
|
332
|
-
Cartesian3.projectVector = function(a, b, result) {
|
|
333
|
-
Check_default.defined("a", a);
|
|
334
|
-
Check_default.defined("b", b);
|
|
335
|
-
Check_default.defined("result", result);
|
|
336
|
-
const scalar = Cartesian3.dot(a, b) / Cartesian3.dot(b, b);
|
|
337
|
-
return Cartesian3.multiplyByScalar(b, scalar, result);
|
|
338
|
-
};
|
|
339
|
-
Cartesian3.equals = function(left, right) {
|
|
340
|
-
return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.z === right.z;
|
|
341
|
-
};
|
|
342
|
-
Cartesian3.equalsArray = function(cartesian, array, offset) {
|
|
343
|
-
return cartesian.x === array[offset] && cartesian.y === array[offset + 1] && cartesian.z === array[offset + 2];
|
|
344
|
-
};
|
|
345
|
-
Cartesian3.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
|
|
346
|
-
return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon(
|
|
347
|
-
left.x,
|
|
348
|
-
right.x,
|
|
349
|
-
relativeEpsilon,
|
|
350
|
-
absoluteEpsilon
|
|
351
|
-
) && Math_default.equalsEpsilon(
|
|
352
|
-
left.y,
|
|
353
|
-
right.y,
|
|
354
|
-
relativeEpsilon,
|
|
355
|
-
absoluteEpsilon
|
|
356
|
-
) && Math_default.equalsEpsilon(
|
|
357
|
-
left.z,
|
|
358
|
-
right.z,
|
|
359
|
-
relativeEpsilon,
|
|
360
|
-
absoluteEpsilon
|
|
361
|
-
);
|
|
362
|
-
};
|
|
363
|
-
Cartesian3.cross = function(left, right, result) {
|
|
364
|
-
Check_default.typeOf.object("left", left);
|
|
365
|
-
Check_default.typeOf.object("right", right);
|
|
366
|
-
Check_default.typeOf.object("result", result);
|
|
367
|
-
const leftX = left.x;
|
|
368
|
-
const leftY = left.y;
|
|
369
|
-
const leftZ = left.z;
|
|
370
|
-
const rightX = right.x;
|
|
371
|
-
const rightY = right.y;
|
|
372
|
-
const rightZ = right.z;
|
|
373
|
-
const x = leftY * rightZ - leftZ * rightY;
|
|
374
|
-
const y = leftZ * rightX - leftX * rightZ;
|
|
375
|
-
const z = leftX * rightY - leftY * rightX;
|
|
376
|
-
result.x = x;
|
|
377
|
-
result.y = y;
|
|
378
|
-
result.z = z;
|
|
379
|
-
return result;
|
|
380
|
-
};
|
|
381
|
-
Cartesian3.midpoint = function(left, right, result) {
|
|
382
|
-
Check_default.typeOf.object("left", left);
|
|
383
|
-
Check_default.typeOf.object("right", right);
|
|
384
|
-
Check_default.typeOf.object("result", result);
|
|
385
|
-
result.x = (left.x + right.x) * 0.5;
|
|
386
|
-
result.y = (left.y + right.y) * 0.5;
|
|
387
|
-
result.z = (left.z + right.z) * 0.5;
|
|
388
|
-
return result;
|
|
389
|
-
};
|
|
390
|
-
Cartesian3.fromDegrees = function(longitude, latitude, height, ellipsoid, result) {
|
|
391
|
-
Check_default.typeOf.number("longitude", longitude);
|
|
392
|
-
Check_default.typeOf.number("latitude", latitude);
|
|
393
|
-
longitude = Math_default.toRadians(longitude);
|
|
394
|
-
latitude = Math_default.toRadians(latitude);
|
|
395
|
-
return Cartesian3.fromRadians(longitude, latitude, height, ellipsoid, result);
|
|
396
|
-
};
|
|
397
|
-
var scratchN = new Cartesian3();
|
|
398
|
-
var scratchK = new Cartesian3();
|
|
399
|
-
Cartesian3._ellipsoidRadiiSquared = new Cartesian3(
|
|
400
|
-
6378137 * 6378137,
|
|
401
|
-
6378137 * 6378137,
|
|
402
|
-
6356752314245179e-9 * 6356752314245179e-9
|
|
403
|
-
);
|
|
404
|
-
Cartesian3.fromRadians = function(longitude, latitude, height, ellipsoid, result) {
|
|
405
|
-
Check_default.typeOf.number("longitude", longitude);
|
|
406
|
-
Check_default.typeOf.number("latitude", latitude);
|
|
407
|
-
height = defaultValue_default(height, 0);
|
|
408
|
-
const radiiSquared = !defined_default(ellipsoid) ? Cartesian3._ellipsoidRadiiSquared : ellipsoid.radiiSquared;
|
|
409
|
-
const cosLatitude = Math.cos(latitude);
|
|
410
|
-
scratchN.x = cosLatitude * Math.cos(longitude);
|
|
411
|
-
scratchN.y = cosLatitude * Math.sin(longitude);
|
|
412
|
-
scratchN.z = Math.sin(latitude);
|
|
413
|
-
scratchN = Cartesian3.normalize(scratchN, scratchN);
|
|
414
|
-
Cartesian3.multiplyComponents(radiiSquared, scratchN, scratchK);
|
|
415
|
-
const gamma = Math.sqrt(Cartesian3.dot(scratchN, scratchK));
|
|
416
|
-
scratchK = Cartesian3.divideByScalar(scratchK, gamma, scratchK);
|
|
417
|
-
scratchN = Cartesian3.multiplyByScalar(scratchN, height, scratchN);
|
|
418
|
-
if (!defined_default(result)) {
|
|
419
|
-
result = new Cartesian3();
|
|
420
|
-
}
|
|
421
|
-
return Cartesian3.add(scratchK, scratchN, result);
|
|
422
|
-
};
|
|
423
|
-
Cartesian3.fromDegreesArray = function(coordinates, ellipsoid, result) {
|
|
424
|
-
Check_default.defined("coordinates", coordinates);
|
|
425
|
-
if (coordinates.length < 2 || coordinates.length % 2 !== 0) {
|
|
426
|
-
throw new DeveloperError_default(
|
|
427
|
-
"the number of coordinates must be a multiple of 2 and at least 2"
|
|
428
|
-
);
|
|
429
|
-
}
|
|
430
|
-
const length = coordinates.length;
|
|
431
|
-
if (!defined_default(result)) {
|
|
432
|
-
result = new Array(length / 2);
|
|
433
|
-
} else {
|
|
434
|
-
result.length = length / 2;
|
|
435
|
-
}
|
|
436
|
-
for (let i = 0; i < length; i += 2) {
|
|
437
|
-
const longitude = coordinates[i];
|
|
438
|
-
const latitude = coordinates[i + 1];
|
|
439
|
-
const index = i / 2;
|
|
440
|
-
result[index] = Cartesian3.fromDegrees(
|
|
441
|
-
longitude,
|
|
442
|
-
latitude,
|
|
443
|
-
0,
|
|
444
|
-
ellipsoid,
|
|
445
|
-
result[index]
|
|
446
|
-
);
|
|
447
|
-
}
|
|
448
|
-
return result;
|
|
449
|
-
};
|
|
450
|
-
Cartesian3.fromRadiansArray = function(coordinates, ellipsoid, result) {
|
|
451
|
-
Check_default.defined("coordinates", coordinates);
|
|
452
|
-
if (coordinates.length < 2 || coordinates.length % 2 !== 0) {
|
|
453
|
-
throw new DeveloperError_default(
|
|
454
|
-
"the number of coordinates must be a multiple of 2 and at least 2"
|
|
455
|
-
);
|
|
456
|
-
}
|
|
457
|
-
const length = coordinates.length;
|
|
458
|
-
if (!defined_default(result)) {
|
|
459
|
-
result = new Array(length / 2);
|
|
460
|
-
} else {
|
|
461
|
-
result.length = length / 2;
|
|
462
|
-
}
|
|
463
|
-
for (let i = 0; i < length; i += 2) {
|
|
464
|
-
const longitude = coordinates[i];
|
|
465
|
-
const latitude = coordinates[i + 1];
|
|
466
|
-
const index = i / 2;
|
|
467
|
-
result[index] = Cartesian3.fromRadians(
|
|
468
|
-
longitude,
|
|
469
|
-
latitude,
|
|
470
|
-
0,
|
|
471
|
-
ellipsoid,
|
|
472
|
-
result[index]
|
|
473
|
-
);
|
|
474
|
-
}
|
|
475
|
-
return result;
|
|
476
|
-
};
|
|
477
|
-
Cartesian3.fromDegreesArrayHeights = function(coordinates, ellipsoid, result) {
|
|
478
|
-
Check_default.defined("coordinates", coordinates);
|
|
479
|
-
if (coordinates.length < 3 || coordinates.length % 3 !== 0) {
|
|
480
|
-
throw new DeveloperError_default(
|
|
481
|
-
"the number of coordinates must be a multiple of 3 and at least 3"
|
|
482
|
-
);
|
|
483
|
-
}
|
|
484
|
-
const length = coordinates.length;
|
|
485
|
-
if (!defined_default(result)) {
|
|
486
|
-
result = new Array(length / 3);
|
|
487
|
-
} else {
|
|
488
|
-
result.length = length / 3;
|
|
489
|
-
}
|
|
490
|
-
for (let i = 0; i < length; i += 3) {
|
|
491
|
-
const longitude = coordinates[i];
|
|
492
|
-
const latitude = coordinates[i + 1];
|
|
493
|
-
const height = coordinates[i + 2];
|
|
494
|
-
const index = i / 3;
|
|
495
|
-
result[index] = Cartesian3.fromDegrees(
|
|
496
|
-
longitude,
|
|
497
|
-
latitude,
|
|
498
|
-
height,
|
|
499
|
-
ellipsoid,
|
|
500
|
-
result[index]
|
|
501
|
-
);
|
|
502
|
-
}
|
|
503
|
-
return result;
|
|
504
|
-
};
|
|
505
|
-
Cartesian3.fromRadiansArrayHeights = function(coordinates, ellipsoid, result) {
|
|
506
|
-
Check_default.defined("coordinates", coordinates);
|
|
507
|
-
if (coordinates.length < 3 || coordinates.length % 3 !== 0) {
|
|
508
|
-
throw new DeveloperError_default(
|
|
509
|
-
"the number of coordinates must be a multiple of 3 and at least 3"
|
|
510
|
-
);
|
|
511
|
-
}
|
|
512
|
-
const length = coordinates.length;
|
|
513
|
-
if (!defined_default(result)) {
|
|
514
|
-
result = new Array(length / 3);
|
|
515
|
-
} else {
|
|
516
|
-
result.length = length / 3;
|
|
517
|
-
}
|
|
518
|
-
for (let i = 0; i < length; i += 3) {
|
|
519
|
-
const longitude = coordinates[i];
|
|
520
|
-
const latitude = coordinates[i + 1];
|
|
521
|
-
const height = coordinates[i + 2];
|
|
522
|
-
const index = i / 3;
|
|
523
|
-
result[index] = Cartesian3.fromRadians(
|
|
524
|
-
longitude,
|
|
525
|
-
latitude,
|
|
526
|
-
height,
|
|
527
|
-
ellipsoid,
|
|
528
|
-
result[index]
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
return result;
|
|
532
|
-
};
|
|
533
|
-
Cartesian3.ZERO = Object.freeze(new Cartesian3(0, 0, 0));
|
|
534
|
-
Cartesian3.ONE = Object.freeze(new Cartesian3(1, 1, 1));
|
|
535
|
-
Cartesian3.UNIT_X = Object.freeze(new Cartesian3(1, 0, 0));
|
|
536
|
-
Cartesian3.UNIT_Y = Object.freeze(new Cartesian3(0, 1, 0));
|
|
537
|
-
Cartesian3.UNIT_Z = Object.freeze(new Cartesian3(0, 0, 1));
|
|
538
|
-
Cartesian3.prototype.clone = function(result) {
|
|
539
|
-
return Cartesian3.clone(this, result);
|
|
540
|
-
};
|
|
541
|
-
Cartesian3.prototype.equals = function(right) {
|
|
542
|
-
return Cartesian3.equals(this, right);
|
|
543
|
-
};
|
|
544
|
-
Cartesian3.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
|
|
545
|
-
return Cartesian3.equalsEpsilon(
|
|
546
|
-
this,
|
|
547
|
-
right,
|
|
548
|
-
relativeEpsilon,
|
|
549
|
-
absoluteEpsilon
|
|
550
|
-
);
|
|
551
|
-
};
|
|
552
|
-
Cartesian3.prototype.toString = function() {
|
|
553
|
-
return `(${this.x}, ${this.y}, ${this.z})`;
|
|
554
|
-
};
|
|
555
|
-
var Cartesian3_default = Cartesian3;
|
|
556
|
-
|
|
557
|
-
// packages/engine/Source/Core/scaleToGeodeticSurface.js
|
|
558
|
-
var scaleToGeodeticSurfaceIntersection = new Cartesian3_default();
|
|
559
|
-
var scaleToGeodeticSurfaceGradient = new Cartesian3_default();
|
|
560
|
-
function scaleToGeodeticSurface(cartesian, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result) {
|
|
561
|
-
if (!defined_default(cartesian)) {
|
|
562
|
-
throw new DeveloperError_default("cartesian is required.");
|
|
563
|
-
}
|
|
564
|
-
if (!defined_default(oneOverRadii)) {
|
|
565
|
-
throw new DeveloperError_default("oneOverRadii is required.");
|
|
566
|
-
}
|
|
567
|
-
if (!defined_default(oneOverRadiiSquared)) {
|
|
568
|
-
throw new DeveloperError_default("oneOverRadiiSquared is required.");
|
|
569
|
-
}
|
|
570
|
-
if (!defined_default(centerToleranceSquared)) {
|
|
571
|
-
throw new DeveloperError_default("centerToleranceSquared is required.");
|
|
572
|
-
}
|
|
573
|
-
const positionX = cartesian.x;
|
|
574
|
-
const positionY = cartesian.y;
|
|
575
|
-
const positionZ = cartesian.z;
|
|
576
|
-
const oneOverRadiiX = oneOverRadii.x;
|
|
577
|
-
const oneOverRadiiY = oneOverRadii.y;
|
|
578
|
-
const oneOverRadiiZ = oneOverRadii.z;
|
|
579
|
-
const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;
|
|
580
|
-
const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;
|
|
581
|
-
const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;
|
|
582
|
-
const squaredNorm = x2 + y2 + z2;
|
|
583
|
-
const ratio = Math.sqrt(1 / squaredNorm);
|
|
584
|
-
const intersection = Cartesian3_default.multiplyByScalar(
|
|
585
|
-
cartesian,
|
|
586
|
-
ratio,
|
|
587
|
-
scaleToGeodeticSurfaceIntersection
|
|
588
|
-
);
|
|
589
|
-
if (squaredNorm < centerToleranceSquared) {
|
|
590
|
-
return !isFinite(ratio) ? void 0 : Cartesian3_default.clone(intersection, result);
|
|
591
|
-
}
|
|
592
|
-
const oneOverRadiiSquaredX = oneOverRadiiSquared.x;
|
|
593
|
-
const oneOverRadiiSquaredY = oneOverRadiiSquared.y;
|
|
594
|
-
const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
|
|
595
|
-
const gradient = scaleToGeodeticSurfaceGradient;
|
|
596
|
-
gradient.x = intersection.x * oneOverRadiiSquaredX * 2;
|
|
597
|
-
gradient.y = intersection.y * oneOverRadiiSquaredY * 2;
|
|
598
|
-
gradient.z = intersection.z * oneOverRadiiSquaredZ * 2;
|
|
599
|
-
let lambda = (1 - ratio) * Cartesian3_default.magnitude(cartesian) / (0.5 * Cartesian3_default.magnitude(gradient));
|
|
600
|
-
let correction = 0;
|
|
601
|
-
let func;
|
|
602
|
-
let denominator;
|
|
603
|
-
let xMultiplier;
|
|
604
|
-
let yMultiplier;
|
|
605
|
-
let zMultiplier;
|
|
606
|
-
let xMultiplier2;
|
|
607
|
-
let yMultiplier2;
|
|
608
|
-
let zMultiplier2;
|
|
609
|
-
let xMultiplier3;
|
|
610
|
-
let yMultiplier3;
|
|
611
|
-
let zMultiplier3;
|
|
612
|
-
do {
|
|
613
|
-
lambda -= correction;
|
|
614
|
-
xMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredX);
|
|
615
|
-
yMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredY);
|
|
616
|
-
zMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredZ);
|
|
617
|
-
xMultiplier2 = xMultiplier * xMultiplier;
|
|
618
|
-
yMultiplier2 = yMultiplier * yMultiplier;
|
|
619
|
-
zMultiplier2 = zMultiplier * zMultiplier;
|
|
620
|
-
xMultiplier3 = xMultiplier2 * xMultiplier;
|
|
621
|
-
yMultiplier3 = yMultiplier2 * yMultiplier;
|
|
622
|
-
zMultiplier3 = zMultiplier2 * zMultiplier;
|
|
623
|
-
func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1;
|
|
624
|
-
denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;
|
|
625
|
-
const derivative = -2 * denominator;
|
|
626
|
-
correction = func / derivative;
|
|
627
|
-
} while (Math.abs(func) > Math_default.EPSILON12);
|
|
628
|
-
if (!defined_default(result)) {
|
|
629
|
-
return new Cartesian3_default(
|
|
630
|
-
positionX * xMultiplier,
|
|
631
|
-
positionY * yMultiplier,
|
|
632
|
-
positionZ * zMultiplier
|
|
633
|
-
);
|
|
634
|
-
}
|
|
635
|
-
result.x = positionX * xMultiplier;
|
|
636
|
-
result.y = positionY * yMultiplier;
|
|
637
|
-
result.z = positionZ * zMultiplier;
|
|
638
|
-
return result;
|
|
639
|
-
}
|
|
640
|
-
var scaleToGeodeticSurface_default = scaleToGeodeticSurface;
|
|
641
|
-
|
|
642
|
-
// packages/engine/Source/Core/Cartographic.js
|
|
643
|
-
function Cartographic(longitude, latitude, height) {
|
|
644
|
-
this.longitude = defaultValue_default(longitude, 0);
|
|
645
|
-
this.latitude = defaultValue_default(latitude, 0);
|
|
646
|
-
this.height = defaultValue_default(height, 0);
|
|
647
|
-
}
|
|
648
|
-
Cartographic.fromRadians = function(longitude, latitude, height, result) {
|
|
649
|
-
Check_default.typeOf.number("longitude", longitude);
|
|
650
|
-
Check_default.typeOf.number("latitude", latitude);
|
|
651
|
-
height = defaultValue_default(height, 0);
|
|
652
|
-
if (!defined_default(result)) {
|
|
653
|
-
return new Cartographic(longitude, latitude, height);
|
|
654
|
-
}
|
|
655
|
-
result.longitude = longitude;
|
|
656
|
-
result.latitude = latitude;
|
|
657
|
-
result.height = height;
|
|
658
|
-
return result;
|
|
659
|
-
};
|
|
660
|
-
Cartographic.fromDegrees = function(longitude, latitude, height, result) {
|
|
661
|
-
Check_default.typeOf.number("longitude", longitude);
|
|
662
|
-
Check_default.typeOf.number("latitude", latitude);
|
|
663
|
-
longitude = Math_default.toRadians(longitude);
|
|
664
|
-
latitude = Math_default.toRadians(latitude);
|
|
665
|
-
return Cartographic.fromRadians(longitude, latitude, height, result);
|
|
666
|
-
};
|
|
667
|
-
var cartesianToCartographicN = new Cartesian3_default();
|
|
668
|
-
var cartesianToCartographicP = new Cartesian3_default();
|
|
669
|
-
var cartesianToCartographicH = new Cartesian3_default();
|
|
670
|
-
Cartographic._ellipsoidOneOverRadii = new Cartesian3_default(
|
|
671
|
-
1 / 6378137,
|
|
672
|
-
1 / 6378137,
|
|
673
|
-
1 / 6356752314245179e-9
|
|
674
|
-
);
|
|
675
|
-
Cartographic._ellipsoidOneOverRadiiSquared = new Cartesian3_default(
|
|
676
|
-
1 / (6378137 * 6378137),
|
|
677
|
-
1 / (6378137 * 6378137),
|
|
678
|
-
1 / (6356752314245179e-9 * 6356752314245179e-9)
|
|
679
|
-
);
|
|
680
|
-
Cartographic._ellipsoidCenterToleranceSquared = Math_default.EPSILON1;
|
|
681
|
-
Cartographic.fromCartesian = function(cartesian, ellipsoid, result) {
|
|
682
|
-
const oneOverRadii = defined_default(ellipsoid) ? ellipsoid.oneOverRadii : Cartographic._ellipsoidOneOverRadii;
|
|
683
|
-
const oneOverRadiiSquared = defined_default(ellipsoid) ? ellipsoid.oneOverRadiiSquared : Cartographic._ellipsoidOneOverRadiiSquared;
|
|
684
|
-
const centerToleranceSquared = defined_default(ellipsoid) ? ellipsoid._centerToleranceSquared : Cartographic._ellipsoidCenterToleranceSquared;
|
|
685
|
-
const p = scaleToGeodeticSurface_default(
|
|
686
|
-
cartesian,
|
|
687
|
-
oneOverRadii,
|
|
688
|
-
oneOverRadiiSquared,
|
|
689
|
-
centerToleranceSquared,
|
|
690
|
-
cartesianToCartographicP
|
|
691
|
-
);
|
|
692
|
-
if (!defined_default(p)) {
|
|
693
|
-
return void 0;
|
|
694
|
-
}
|
|
695
|
-
let n = Cartesian3_default.multiplyComponents(
|
|
696
|
-
p,
|
|
697
|
-
oneOverRadiiSquared,
|
|
698
|
-
cartesianToCartographicN
|
|
699
|
-
);
|
|
700
|
-
n = Cartesian3_default.normalize(n, n);
|
|
701
|
-
const h = Cartesian3_default.subtract(cartesian, p, cartesianToCartographicH);
|
|
702
|
-
const longitude = Math.atan2(n.y, n.x);
|
|
703
|
-
const latitude = Math.asin(n.z);
|
|
704
|
-
const height = Math_default.sign(Cartesian3_default.dot(h, cartesian)) * Cartesian3_default.magnitude(h);
|
|
705
|
-
if (!defined_default(result)) {
|
|
706
|
-
return new Cartographic(longitude, latitude, height);
|
|
707
|
-
}
|
|
708
|
-
result.longitude = longitude;
|
|
709
|
-
result.latitude = latitude;
|
|
710
|
-
result.height = height;
|
|
711
|
-
return result;
|
|
712
|
-
};
|
|
713
|
-
Cartographic.toCartesian = function(cartographic, ellipsoid, result) {
|
|
714
|
-
Check_default.defined("cartographic", cartographic);
|
|
715
|
-
return Cartesian3_default.fromRadians(
|
|
716
|
-
cartographic.longitude,
|
|
717
|
-
cartographic.latitude,
|
|
718
|
-
cartographic.height,
|
|
719
|
-
ellipsoid,
|
|
720
|
-
result
|
|
721
|
-
);
|
|
722
|
-
};
|
|
723
|
-
Cartographic.clone = function(cartographic, result) {
|
|
724
|
-
if (!defined_default(cartographic)) {
|
|
725
|
-
return void 0;
|
|
726
|
-
}
|
|
727
|
-
if (!defined_default(result)) {
|
|
728
|
-
return new Cartographic(
|
|
729
|
-
cartographic.longitude,
|
|
730
|
-
cartographic.latitude,
|
|
731
|
-
cartographic.height
|
|
732
|
-
);
|
|
733
|
-
}
|
|
734
|
-
result.longitude = cartographic.longitude;
|
|
735
|
-
result.latitude = cartographic.latitude;
|
|
736
|
-
result.height = cartographic.height;
|
|
737
|
-
return result;
|
|
738
|
-
};
|
|
739
|
-
Cartographic.equals = function(left, right) {
|
|
740
|
-
return left === right || defined_default(left) && defined_default(right) && left.longitude === right.longitude && left.latitude === right.latitude && left.height === right.height;
|
|
741
|
-
};
|
|
742
|
-
Cartographic.equalsEpsilon = function(left, right, epsilon) {
|
|
743
|
-
epsilon = defaultValue_default(epsilon, 0);
|
|
744
|
-
return left === right || defined_default(left) && defined_default(right) && Math.abs(left.longitude - right.longitude) <= epsilon && Math.abs(left.latitude - right.latitude) <= epsilon && Math.abs(left.height - right.height) <= epsilon;
|
|
745
|
-
};
|
|
746
|
-
Cartographic.ZERO = Object.freeze(new Cartographic(0, 0, 0));
|
|
747
|
-
Cartographic.prototype.clone = function(result) {
|
|
748
|
-
return Cartographic.clone(this, result);
|
|
749
|
-
};
|
|
750
|
-
Cartographic.prototype.equals = function(right) {
|
|
751
|
-
return Cartographic.equals(this, right);
|
|
752
|
-
};
|
|
753
|
-
Cartographic.prototype.equalsEpsilon = function(right, epsilon) {
|
|
754
|
-
return Cartographic.equalsEpsilon(this, right, epsilon);
|
|
755
|
-
};
|
|
756
|
-
Cartographic.prototype.toString = function() {
|
|
757
|
-
return `(${this.longitude}, ${this.latitude}, ${this.height})`;
|
|
758
|
-
};
|
|
759
|
-
var Cartographic_default = Cartographic;
|
|
760
|
-
|
|
761
|
-
// packages/engine/Source/Core/Cartesian2.js
|
|
762
|
-
function Cartesian2(x, y) {
|
|
763
|
-
this.x = defaultValue_default(x, 0);
|
|
764
|
-
this.y = defaultValue_default(y, 0);
|
|
765
|
-
}
|
|
766
|
-
Cartesian2.fromElements = function(x, y, result) {
|
|
767
|
-
if (!defined_default(result)) {
|
|
768
|
-
return new Cartesian2(x, y);
|
|
769
|
-
}
|
|
770
|
-
result.x = x;
|
|
771
|
-
result.y = y;
|
|
772
|
-
return result;
|
|
773
|
-
};
|
|
774
|
-
Cartesian2.clone = function(cartesian, result) {
|
|
775
|
-
if (!defined_default(cartesian)) {
|
|
776
|
-
return void 0;
|
|
777
|
-
}
|
|
778
|
-
if (!defined_default(result)) {
|
|
779
|
-
return new Cartesian2(cartesian.x, cartesian.y);
|
|
780
|
-
}
|
|
781
|
-
result.x = cartesian.x;
|
|
782
|
-
result.y = cartesian.y;
|
|
783
|
-
return result;
|
|
784
|
-
};
|
|
785
|
-
Cartesian2.fromCartesian3 = Cartesian2.clone;
|
|
786
|
-
Cartesian2.fromCartesian4 = Cartesian2.clone;
|
|
787
|
-
Cartesian2.packedLength = 2;
|
|
788
|
-
Cartesian2.pack = function(value, array, startingIndex) {
|
|
789
|
-
Check_default.typeOf.object("value", value);
|
|
790
|
-
Check_default.defined("array", array);
|
|
791
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
792
|
-
array[startingIndex++] = value.x;
|
|
793
|
-
array[startingIndex] = value.y;
|
|
794
|
-
return array;
|
|
795
|
-
};
|
|
796
|
-
Cartesian2.unpack = function(array, startingIndex, result) {
|
|
797
|
-
Check_default.defined("array", array);
|
|
798
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
799
|
-
if (!defined_default(result)) {
|
|
800
|
-
result = new Cartesian2();
|
|
801
|
-
}
|
|
802
|
-
result.x = array[startingIndex++];
|
|
803
|
-
result.y = array[startingIndex];
|
|
804
|
-
return result;
|
|
805
|
-
};
|
|
806
|
-
Cartesian2.packArray = function(array, result) {
|
|
807
|
-
Check_default.defined("array", array);
|
|
808
|
-
const length = array.length;
|
|
809
|
-
const resultLength = length * 2;
|
|
810
|
-
if (!defined_default(result)) {
|
|
811
|
-
result = new Array(resultLength);
|
|
812
|
-
} else if (!Array.isArray(result) && result.length !== resultLength) {
|
|
813
|
-
throw new DeveloperError_default(
|
|
814
|
-
"If result is a typed array, it must have exactly array.length * 2 elements"
|
|
815
|
-
);
|
|
816
|
-
} else if (result.length !== resultLength) {
|
|
817
|
-
result.length = resultLength;
|
|
818
|
-
}
|
|
819
|
-
for (let i = 0; i < length; ++i) {
|
|
820
|
-
Cartesian2.pack(array[i], result, i * 2);
|
|
821
|
-
}
|
|
822
|
-
return result;
|
|
823
|
-
};
|
|
824
|
-
Cartesian2.unpackArray = function(array, result) {
|
|
825
|
-
Check_default.defined("array", array);
|
|
826
|
-
Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 2);
|
|
827
|
-
if (array.length % 2 !== 0) {
|
|
828
|
-
throw new DeveloperError_default("array length must be a multiple of 2.");
|
|
829
|
-
}
|
|
830
|
-
const length = array.length;
|
|
831
|
-
if (!defined_default(result)) {
|
|
832
|
-
result = new Array(length / 2);
|
|
833
|
-
} else {
|
|
834
|
-
result.length = length / 2;
|
|
835
|
-
}
|
|
836
|
-
for (let i = 0; i < length; i += 2) {
|
|
837
|
-
const index = i / 2;
|
|
838
|
-
result[index] = Cartesian2.unpack(array, i, result[index]);
|
|
839
|
-
}
|
|
840
|
-
return result;
|
|
841
|
-
};
|
|
842
|
-
Cartesian2.fromArray = Cartesian2.unpack;
|
|
843
|
-
Cartesian2.maximumComponent = function(cartesian) {
|
|
844
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
845
|
-
return Math.max(cartesian.x, cartesian.y);
|
|
846
|
-
};
|
|
847
|
-
Cartesian2.minimumComponent = function(cartesian) {
|
|
848
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
849
|
-
return Math.min(cartesian.x, cartesian.y);
|
|
850
|
-
};
|
|
851
|
-
Cartesian2.minimumByComponent = function(first, second, result) {
|
|
852
|
-
Check_default.typeOf.object("first", first);
|
|
853
|
-
Check_default.typeOf.object("second", second);
|
|
854
|
-
Check_default.typeOf.object("result", result);
|
|
855
|
-
result.x = Math.min(first.x, second.x);
|
|
856
|
-
result.y = Math.min(first.y, second.y);
|
|
857
|
-
return result;
|
|
858
|
-
};
|
|
859
|
-
Cartesian2.maximumByComponent = function(first, second, result) {
|
|
860
|
-
Check_default.typeOf.object("first", first);
|
|
861
|
-
Check_default.typeOf.object("second", second);
|
|
862
|
-
Check_default.typeOf.object("result", result);
|
|
863
|
-
result.x = Math.max(first.x, second.x);
|
|
864
|
-
result.y = Math.max(first.y, second.y);
|
|
865
|
-
return result;
|
|
866
|
-
};
|
|
867
|
-
Cartesian2.clamp = function(value, min, max, result) {
|
|
868
|
-
Check_default.typeOf.object("value", value);
|
|
869
|
-
Check_default.typeOf.object("min", min);
|
|
870
|
-
Check_default.typeOf.object("max", max);
|
|
871
|
-
Check_default.typeOf.object("result", result);
|
|
872
|
-
const x = Math_default.clamp(value.x, min.x, max.x);
|
|
873
|
-
const y = Math_default.clamp(value.y, min.y, max.y);
|
|
874
|
-
result.x = x;
|
|
875
|
-
result.y = y;
|
|
876
|
-
return result;
|
|
877
|
-
};
|
|
878
|
-
Cartesian2.magnitudeSquared = function(cartesian) {
|
|
879
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
880
|
-
return cartesian.x * cartesian.x + cartesian.y * cartesian.y;
|
|
881
|
-
};
|
|
882
|
-
Cartesian2.magnitude = function(cartesian) {
|
|
883
|
-
return Math.sqrt(Cartesian2.magnitudeSquared(cartesian));
|
|
884
|
-
};
|
|
885
|
-
var distanceScratch2 = new Cartesian2();
|
|
886
|
-
Cartesian2.distance = function(left, right) {
|
|
887
|
-
Check_default.typeOf.object("left", left);
|
|
888
|
-
Check_default.typeOf.object("right", right);
|
|
889
|
-
Cartesian2.subtract(left, right, distanceScratch2);
|
|
890
|
-
return Cartesian2.magnitude(distanceScratch2);
|
|
891
|
-
};
|
|
892
|
-
Cartesian2.distanceSquared = function(left, right) {
|
|
893
|
-
Check_default.typeOf.object("left", left);
|
|
894
|
-
Check_default.typeOf.object("right", right);
|
|
895
|
-
Cartesian2.subtract(left, right, distanceScratch2);
|
|
896
|
-
return Cartesian2.magnitudeSquared(distanceScratch2);
|
|
897
|
-
};
|
|
898
|
-
Cartesian2.normalize = function(cartesian, result) {
|
|
899
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
900
|
-
Check_default.typeOf.object("result", result);
|
|
901
|
-
const magnitude = Cartesian2.magnitude(cartesian);
|
|
902
|
-
result.x = cartesian.x / magnitude;
|
|
903
|
-
result.y = cartesian.y / magnitude;
|
|
904
|
-
if (isNaN(result.x) || isNaN(result.y)) {
|
|
905
|
-
throw new DeveloperError_default("normalized result is not a number");
|
|
906
|
-
}
|
|
907
|
-
return result;
|
|
908
|
-
};
|
|
909
|
-
Cartesian2.dot = function(left, right) {
|
|
910
|
-
Check_default.typeOf.object("left", left);
|
|
911
|
-
Check_default.typeOf.object("right", right);
|
|
912
|
-
return left.x * right.x + left.y * right.y;
|
|
913
|
-
};
|
|
914
|
-
Cartesian2.cross = function(left, right) {
|
|
915
|
-
Check_default.typeOf.object("left", left);
|
|
916
|
-
Check_default.typeOf.object("right", right);
|
|
917
|
-
return left.x * right.y - left.y * right.x;
|
|
918
|
-
};
|
|
919
|
-
Cartesian2.multiplyComponents = function(left, right, result) {
|
|
920
|
-
Check_default.typeOf.object("left", left);
|
|
921
|
-
Check_default.typeOf.object("right", right);
|
|
922
|
-
Check_default.typeOf.object("result", result);
|
|
923
|
-
result.x = left.x * right.x;
|
|
924
|
-
result.y = left.y * right.y;
|
|
925
|
-
return result;
|
|
926
|
-
};
|
|
927
|
-
Cartesian2.divideComponents = function(left, right, result) {
|
|
928
|
-
Check_default.typeOf.object("left", left);
|
|
929
|
-
Check_default.typeOf.object("right", right);
|
|
930
|
-
Check_default.typeOf.object("result", result);
|
|
931
|
-
result.x = left.x / right.x;
|
|
932
|
-
result.y = left.y / right.y;
|
|
933
|
-
return result;
|
|
934
|
-
};
|
|
935
|
-
Cartesian2.add = function(left, right, result) {
|
|
936
|
-
Check_default.typeOf.object("left", left);
|
|
937
|
-
Check_default.typeOf.object("right", right);
|
|
938
|
-
Check_default.typeOf.object("result", result);
|
|
939
|
-
result.x = left.x + right.x;
|
|
940
|
-
result.y = left.y + right.y;
|
|
941
|
-
return result;
|
|
942
|
-
};
|
|
943
|
-
Cartesian2.subtract = function(left, right, result) {
|
|
944
|
-
Check_default.typeOf.object("left", left);
|
|
945
|
-
Check_default.typeOf.object("right", right);
|
|
946
|
-
Check_default.typeOf.object("result", result);
|
|
947
|
-
result.x = left.x - right.x;
|
|
948
|
-
result.y = left.y - right.y;
|
|
949
|
-
return result;
|
|
950
|
-
};
|
|
951
|
-
Cartesian2.multiplyByScalar = function(cartesian, scalar, result) {
|
|
952
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
953
|
-
Check_default.typeOf.number("scalar", scalar);
|
|
954
|
-
Check_default.typeOf.object("result", result);
|
|
955
|
-
result.x = cartesian.x * scalar;
|
|
956
|
-
result.y = cartesian.y * scalar;
|
|
957
|
-
return result;
|
|
958
|
-
};
|
|
959
|
-
Cartesian2.divideByScalar = function(cartesian, scalar, result) {
|
|
960
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
961
|
-
Check_default.typeOf.number("scalar", scalar);
|
|
962
|
-
Check_default.typeOf.object("result", result);
|
|
963
|
-
result.x = cartesian.x / scalar;
|
|
964
|
-
result.y = cartesian.y / scalar;
|
|
965
|
-
return result;
|
|
966
|
-
};
|
|
967
|
-
Cartesian2.negate = function(cartesian, result) {
|
|
968
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
969
|
-
Check_default.typeOf.object("result", result);
|
|
970
|
-
result.x = -cartesian.x;
|
|
971
|
-
result.y = -cartesian.y;
|
|
972
|
-
return result;
|
|
973
|
-
};
|
|
974
|
-
Cartesian2.abs = function(cartesian, result) {
|
|
975
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
976
|
-
Check_default.typeOf.object("result", result);
|
|
977
|
-
result.x = Math.abs(cartesian.x);
|
|
978
|
-
result.y = Math.abs(cartesian.y);
|
|
979
|
-
return result;
|
|
980
|
-
};
|
|
981
|
-
var lerpScratch2 = new Cartesian2();
|
|
982
|
-
Cartesian2.lerp = function(start, end, t, result) {
|
|
983
|
-
Check_default.typeOf.object("start", start);
|
|
984
|
-
Check_default.typeOf.object("end", end);
|
|
985
|
-
Check_default.typeOf.number("t", t);
|
|
986
|
-
Check_default.typeOf.object("result", result);
|
|
987
|
-
Cartesian2.multiplyByScalar(end, t, lerpScratch2);
|
|
988
|
-
result = Cartesian2.multiplyByScalar(start, 1 - t, result);
|
|
989
|
-
return Cartesian2.add(lerpScratch2, result, result);
|
|
990
|
-
};
|
|
991
|
-
var angleBetweenScratch3 = new Cartesian2();
|
|
992
|
-
var angleBetweenScratch22 = new Cartesian2();
|
|
993
|
-
Cartesian2.angleBetween = function(left, right) {
|
|
994
|
-
Check_default.typeOf.object("left", left);
|
|
995
|
-
Check_default.typeOf.object("right", right);
|
|
996
|
-
Cartesian2.normalize(left, angleBetweenScratch3);
|
|
997
|
-
Cartesian2.normalize(right, angleBetweenScratch22);
|
|
998
|
-
return Math_default.acosClamped(
|
|
999
|
-
Cartesian2.dot(angleBetweenScratch3, angleBetweenScratch22)
|
|
1000
|
-
);
|
|
1001
|
-
};
|
|
1002
|
-
var mostOrthogonalAxisScratch2 = new Cartesian2();
|
|
1003
|
-
Cartesian2.mostOrthogonalAxis = function(cartesian, result) {
|
|
1004
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
1005
|
-
Check_default.typeOf.object("result", result);
|
|
1006
|
-
const f = Cartesian2.normalize(cartesian, mostOrthogonalAxisScratch2);
|
|
1007
|
-
Cartesian2.abs(f, f);
|
|
1008
|
-
if (f.x <= f.y) {
|
|
1009
|
-
result = Cartesian2.clone(Cartesian2.UNIT_X, result);
|
|
1010
|
-
} else {
|
|
1011
|
-
result = Cartesian2.clone(Cartesian2.UNIT_Y, result);
|
|
1012
|
-
}
|
|
1013
|
-
return result;
|
|
1014
|
-
};
|
|
1015
|
-
Cartesian2.equals = function(left, right) {
|
|
1016
|
-
return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y;
|
|
1017
|
-
};
|
|
1018
|
-
Cartesian2.equalsArray = function(cartesian, array, offset) {
|
|
1019
|
-
return cartesian.x === array[offset] && cartesian.y === array[offset + 1];
|
|
1020
|
-
};
|
|
1021
|
-
Cartesian2.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
|
|
1022
|
-
return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon(
|
|
1023
|
-
left.x,
|
|
1024
|
-
right.x,
|
|
1025
|
-
relativeEpsilon,
|
|
1026
|
-
absoluteEpsilon
|
|
1027
|
-
) && Math_default.equalsEpsilon(
|
|
1028
|
-
left.y,
|
|
1029
|
-
right.y,
|
|
1030
|
-
relativeEpsilon,
|
|
1031
|
-
absoluteEpsilon
|
|
1032
|
-
);
|
|
1033
|
-
};
|
|
1034
|
-
Cartesian2.ZERO = Object.freeze(new Cartesian2(0, 0));
|
|
1035
|
-
Cartesian2.ONE = Object.freeze(new Cartesian2(1, 1));
|
|
1036
|
-
Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1, 0));
|
|
1037
|
-
Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0, 1));
|
|
1038
|
-
Cartesian2.prototype.clone = function(result) {
|
|
1039
|
-
return Cartesian2.clone(this, result);
|
|
1040
|
-
};
|
|
1041
|
-
Cartesian2.prototype.equals = function(right) {
|
|
1042
|
-
return Cartesian2.equals(this, right);
|
|
1043
|
-
};
|
|
1044
|
-
Cartesian2.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
|
|
1045
|
-
return Cartesian2.equalsEpsilon(
|
|
1046
|
-
this,
|
|
1047
|
-
right,
|
|
1048
|
-
relativeEpsilon,
|
|
1049
|
-
absoluteEpsilon
|
|
1050
|
-
);
|
|
1051
|
-
};
|
|
1052
|
-
Cartesian2.prototype.toString = function() {
|
|
1053
|
-
return `(${this.x}, ${this.y})`;
|
|
1054
|
-
};
|
|
1055
|
-
var Cartesian2_default = Cartesian2;
|
|
1056
|
-
|
|
1057
|
-
// packages/engine/Source/Core/Ellipsoid.js
|
|
1058
|
-
function initialize(ellipsoid, x, y, z) {
|
|
1059
|
-
x = defaultValue_default(x, 0);
|
|
1060
|
-
y = defaultValue_default(y, 0);
|
|
1061
|
-
z = defaultValue_default(z, 0);
|
|
1062
|
-
Check_default.typeOf.number.greaterThanOrEquals("x", x, 0);
|
|
1063
|
-
Check_default.typeOf.number.greaterThanOrEquals("y", y, 0);
|
|
1064
|
-
Check_default.typeOf.number.greaterThanOrEquals("z", z, 0);
|
|
1065
|
-
ellipsoid._radii = new Cartesian3_default(x, y, z);
|
|
1066
|
-
ellipsoid._radiiSquared = new Cartesian3_default(x * x, y * y, z * z);
|
|
1067
|
-
ellipsoid._radiiToTheFourth = new Cartesian3_default(
|
|
1068
|
-
x * x * x * x,
|
|
1069
|
-
y * y * y * y,
|
|
1070
|
-
z * z * z * z
|
|
1071
|
-
);
|
|
1072
|
-
ellipsoid._oneOverRadii = new Cartesian3_default(
|
|
1073
|
-
x === 0 ? 0 : 1 / x,
|
|
1074
|
-
y === 0 ? 0 : 1 / y,
|
|
1075
|
-
z === 0 ? 0 : 1 / z
|
|
1076
|
-
);
|
|
1077
|
-
ellipsoid._oneOverRadiiSquared = new Cartesian3_default(
|
|
1078
|
-
x === 0 ? 0 : 1 / (x * x),
|
|
1079
|
-
y === 0 ? 0 : 1 / (y * y),
|
|
1080
|
-
z === 0 ? 0 : 1 / (z * z)
|
|
1081
|
-
);
|
|
1082
|
-
ellipsoid._minimumRadius = Math.min(x, y, z);
|
|
1083
|
-
ellipsoid._maximumRadius = Math.max(x, y, z);
|
|
1084
|
-
ellipsoid._centerToleranceSquared = Math_default.EPSILON1;
|
|
1085
|
-
if (ellipsoid._radiiSquared.z !== 0) {
|
|
1086
|
-
ellipsoid._squaredXOverSquaredZ = ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z;
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
function Ellipsoid(x, y, z) {
|
|
1090
|
-
this._radii = void 0;
|
|
1091
|
-
this._radiiSquared = void 0;
|
|
1092
|
-
this._radiiToTheFourth = void 0;
|
|
1093
|
-
this._oneOverRadii = void 0;
|
|
1094
|
-
this._oneOverRadiiSquared = void 0;
|
|
1095
|
-
this._minimumRadius = void 0;
|
|
1096
|
-
this._maximumRadius = void 0;
|
|
1097
|
-
this._centerToleranceSquared = void 0;
|
|
1098
|
-
this._squaredXOverSquaredZ = void 0;
|
|
1099
|
-
initialize(this, x, y, z);
|
|
1100
|
-
}
|
|
1101
|
-
Object.defineProperties(Ellipsoid.prototype, {
|
|
1102
|
-
/**
|
|
1103
|
-
* Gets the radii of the ellipsoid.
|
|
1104
|
-
* @memberof Ellipsoid.prototype
|
|
1105
|
-
* @type {Cartesian3}
|
|
1106
|
-
* @readonly
|
|
1107
|
-
*/
|
|
1108
|
-
radii: {
|
|
1109
|
-
get: function() {
|
|
1110
|
-
return this._radii;
|
|
1111
|
-
}
|
|
1112
|
-
},
|
|
1113
|
-
/**
|
|
1114
|
-
* Gets the squared radii of the ellipsoid.
|
|
1115
|
-
* @memberof Ellipsoid.prototype
|
|
1116
|
-
* @type {Cartesian3}
|
|
1117
|
-
* @readonly
|
|
1118
|
-
*/
|
|
1119
|
-
radiiSquared: {
|
|
1120
|
-
get: function() {
|
|
1121
|
-
return this._radiiSquared;
|
|
1122
|
-
}
|
|
1123
|
-
},
|
|
1124
|
-
/**
|
|
1125
|
-
* Gets the radii of the ellipsoid raise to the fourth power.
|
|
1126
|
-
* @memberof Ellipsoid.prototype
|
|
1127
|
-
* @type {Cartesian3}
|
|
1128
|
-
* @readonly
|
|
1129
|
-
*/
|
|
1130
|
-
radiiToTheFourth: {
|
|
1131
|
-
get: function() {
|
|
1132
|
-
return this._radiiToTheFourth;
|
|
1133
|
-
}
|
|
1134
|
-
},
|
|
1135
|
-
/**
|
|
1136
|
-
* Gets one over the radii of the ellipsoid.
|
|
1137
|
-
* @memberof Ellipsoid.prototype
|
|
1138
|
-
* @type {Cartesian3}
|
|
1139
|
-
* @readonly
|
|
1140
|
-
*/
|
|
1141
|
-
oneOverRadii: {
|
|
1142
|
-
get: function() {
|
|
1143
|
-
return this._oneOverRadii;
|
|
1144
|
-
}
|
|
1145
|
-
},
|
|
1146
|
-
/**
|
|
1147
|
-
* Gets one over the squared radii of the ellipsoid.
|
|
1148
|
-
* @memberof Ellipsoid.prototype
|
|
1149
|
-
* @type {Cartesian3}
|
|
1150
|
-
* @readonly
|
|
1151
|
-
*/
|
|
1152
|
-
oneOverRadiiSquared: {
|
|
1153
|
-
get: function() {
|
|
1154
|
-
return this._oneOverRadiiSquared;
|
|
1155
|
-
}
|
|
1156
|
-
},
|
|
1157
|
-
/**
|
|
1158
|
-
* Gets the minimum radius of the ellipsoid.
|
|
1159
|
-
* @memberof Ellipsoid.prototype
|
|
1160
|
-
* @type {number}
|
|
1161
|
-
* @readonly
|
|
1162
|
-
*/
|
|
1163
|
-
minimumRadius: {
|
|
1164
|
-
get: function() {
|
|
1165
|
-
return this._minimumRadius;
|
|
1166
|
-
}
|
|
1167
|
-
},
|
|
1168
|
-
/**
|
|
1169
|
-
* Gets the maximum radius of the ellipsoid.
|
|
1170
|
-
* @memberof Ellipsoid.prototype
|
|
1171
|
-
* @type {number}
|
|
1172
|
-
* @readonly
|
|
1173
|
-
*/
|
|
1174
|
-
maximumRadius: {
|
|
1175
|
-
get: function() {
|
|
1176
|
-
return this._maximumRadius;
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
});
|
|
1180
|
-
Ellipsoid.clone = function(ellipsoid, result) {
|
|
1181
|
-
if (!defined_default(ellipsoid)) {
|
|
1182
|
-
return void 0;
|
|
1183
|
-
}
|
|
1184
|
-
const radii = ellipsoid._radii;
|
|
1185
|
-
if (!defined_default(result)) {
|
|
1186
|
-
return new Ellipsoid(radii.x, radii.y, radii.z);
|
|
1187
|
-
}
|
|
1188
|
-
Cartesian3_default.clone(radii, result._radii);
|
|
1189
|
-
Cartesian3_default.clone(ellipsoid._radiiSquared, result._radiiSquared);
|
|
1190
|
-
Cartesian3_default.clone(ellipsoid._radiiToTheFourth, result._radiiToTheFourth);
|
|
1191
|
-
Cartesian3_default.clone(ellipsoid._oneOverRadii, result._oneOverRadii);
|
|
1192
|
-
Cartesian3_default.clone(ellipsoid._oneOverRadiiSquared, result._oneOverRadiiSquared);
|
|
1193
|
-
result._minimumRadius = ellipsoid._minimumRadius;
|
|
1194
|
-
result._maximumRadius = ellipsoid._maximumRadius;
|
|
1195
|
-
result._centerToleranceSquared = ellipsoid._centerToleranceSquared;
|
|
1196
|
-
return result;
|
|
1197
|
-
};
|
|
1198
|
-
Ellipsoid.fromCartesian3 = function(cartesian, result) {
|
|
1199
|
-
if (!defined_default(result)) {
|
|
1200
|
-
result = new Ellipsoid();
|
|
1201
|
-
}
|
|
1202
|
-
if (!defined_default(cartesian)) {
|
|
1203
|
-
return result;
|
|
1204
|
-
}
|
|
1205
|
-
initialize(result, cartesian.x, cartesian.y, cartesian.z);
|
|
1206
|
-
return result;
|
|
1207
|
-
};
|
|
1208
|
-
Ellipsoid.WGS84 = Object.freeze(
|
|
1209
|
-
new Ellipsoid(6378137, 6378137, 6356752314245179e-9)
|
|
1210
|
-
);
|
|
1211
|
-
Ellipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1, 1, 1));
|
|
1212
|
-
Ellipsoid.MOON = Object.freeze(
|
|
1213
|
-
new Ellipsoid(
|
|
1214
|
-
Math_default.LUNAR_RADIUS,
|
|
1215
|
-
Math_default.LUNAR_RADIUS,
|
|
1216
|
-
Math_default.LUNAR_RADIUS
|
|
1217
|
-
)
|
|
1218
|
-
);
|
|
1219
|
-
Ellipsoid._default = Ellipsoid.WGS84;
|
|
1220
|
-
Object.defineProperties(Ellipsoid, {
|
|
1221
|
-
/**
|
|
1222
|
-
* The default ellipsoid used when not otherwise specified.
|
|
1223
|
-
* @memberof Ellipsoid
|
|
1224
|
-
* @type {Ellipsoid}
|
|
1225
|
-
* @example
|
|
1226
|
-
* Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;
|
|
1227
|
-
*
|
|
1228
|
-
* // Apollo 11 landing site
|
|
1229
|
-
* const position = Cesium.Cartesian3.fromRadians(
|
|
1230
|
-
* 0.67416,
|
|
1231
|
-
* 23.47315,
|
|
1232
|
-
* );
|
|
1233
|
-
*/
|
|
1234
|
-
default: {
|
|
1235
|
-
get: function() {
|
|
1236
|
-
return Ellipsoid._default;
|
|
1237
|
-
},
|
|
1238
|
-
set: function(value) {
|
|
1239
|
-
Check_default.typeOf.object("value", value);
|
|
1240
|
-
Ellipsoid._default = value;
|
|
1241
|
-
Cartesian3_default._ellipsoidRadiiSquared = value.radiiSquared;
|
|
1242
|
-
Cartographic_default._ellipsoidOneOverRadii = value.oneOverRadii;
|
|
1243
|
-
Cartographic_default._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared;
|
|
1244
|
-
Cartographic_default._ellipsoidCenterToleranceSquared = value._centerToleranceSquared;
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
|
-
});
|
|
1248
|
-
Ellipsoid.prototype.clone = function(result) {
|
|
1249
|
-
return Ellipsoid.clone(this, result);
|
|
1250
|
-
};
|
|
1251
|
-
Ellipsoid.packedLength = Cartesian3_default.packedLength;
|
|
1252
|
-
Ellipsoid.pack = function(value, array, startingIndex) {
|
|
1253
|
-
Check_default.typeOf.object("value", value);
|
|
1254
|
-
Check_default.defined("array", array);
|
|
1255
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
1256
|
-
Cartesian3_default.pack(value._radii, array, startingIndex);
|
|
1257
|
-
return array;
|
|
1258
|
-
};
|
|
1259
|
-
Ellipsoid.unpack = function(array, startingIndex, result) {
|
|
1260
|
-
Check_default.defined("array", array);
|
|
1261
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
1262
|
-
const radii = Cartesian3_default.unpack(array, startingIndex);
|
|
1263
|
-
return Ellipsoid.fromCartesian3(radii, result);
|
|
1264
|
-
};
|
|
1265
|
-
Ellipsoid.prototype.geocentricSurfaceNormal = Cartesian3_default.normalize;
|
|
1266
|
-
Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function(cartographic, result) {
|
|
1267
|
-
Check_default.typeOf.object("cartographic", cartographic);
|
|
1268
|
-
const longitude = cartographic.longitude;
|
|
1269
|
-
const latitude = cartographic.latitude;
|
|
1270
|
-
const cosLatitude = Math.cos(latitude);
|
|
1271
|
-
const x = cosLatitude * Math.cos(longitude);
|
|
1272
|
-
const y = cosLatitude * Math.sin(longitude);
|
|
1273
|
-
const z = Math.sin(latitude);
|
|
1274
|
-
if (!defined_default(result)) {
|
|
1275
|
-
result = new Cartesian3_default();
|
|
1276
|
-
}
|
|
1277
|
-
result.x = x;
|
|
1278
|
-
result.y = y;
|
|
1279
|
-
result.z = z;
|
|
1280
|
-
return Cartesian3_default.normalize(result, result);
|
|
1281
|
-
};
|
|
1282
|
-
Ellipsoid.prototype.geodeticSurfaceNormal = function(cartesian, result) {
|
|
1283
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
1284
|
-
if (isNaN(cartesian.x) || isNaN(cartesian.y) || isNaN(cartesian.z)) {
|
|
1285
|
-
throw new DeveloperError_default("cartesian has a NaN component");
|
|
1286
|
-
}
|
|
1287
|
-
if (Cartesian3_default.equalsEpsilon(cartesian, Cartesian3_default.ZERO, Math_default.EPSILON14)) {
|
|
1288
|
-
return void 0;
|
|
1289
|
-
}
|
|
1290
|
-
if (!defined_default(result)) {
|
|
1291
|
-
result = new Cartesian3_default();
|
|
1292
|
-
}
|
|
1293
|
-
result = Cartesian3_default.multiplyComponents(
|
|
1294
|
-
cartesian,
|
|
1295
|
-
this._oneOverRadiiSquared,
|
|
1296
|
-
result
|
|
1297
|
-
);
|
|
1298
|
-
return Cartesian3_default.normalize(result, result);
|
|
1299
|
-
};
|
|
1300
|
-
var cartographicToCartesianNormal = new Cartesian3_default();
|
|
1301
|
-
var cartographicToCartesianK = new Cartesian3_default();
|
|
1302
|
-
Ellipsoid.prototype.cartographicToCartesian = function(cartographic, result) {
|
|
1303
|
-
const n = cartographicToCartesianNormal;
|
|
1304
|
-
const k = cartographicToCartesianK;
|
|
1305
|
-
this.geodeticSurfaceNormalCartographic(cartographic, n);
|
|
1306
|
-
Cartesian3_default.multiplyComponents(this._radiiSquared, n, k);
|
|
1307
|
-
const gamma = Math.sqrt(Cartesian3_default.dot(n, k));
|
|
1308
|
-
Cartesian3_default.divideByScalar(k, gamma, k);
|
|
1309
|
-
Cartesian3_default.multiplyByScalar(n, cartographic.height, n);
|
|
1310
|
-
if (!defined_default(result)) {
|
|
1311
|
-
result = new Cartesian3_default();
|
|
1312
|
-
}
|
|
1313
|
-
return Cartesian3_default.add(k, n, result);
|
|
1314
|
-
};
|
|
1315
|
-
Ellipsoid.prototype.cartographicArrayToCartesianArray = function(cartographics, result) {
|
|
1316
|
-
Check_default.defined("cartographics", cartographics);
|
|
1317
|
-
const length = cartographics.length;
|
|
1318
|
-
if (!defined_default(result)) {
|
|
1319
|
-
result = new Array(length);
|
|
1320
|
-
} else {
|
|
1321
|
-
result.length = length;
|
|
1322
|
-
}
|
|
1323
|
-
for (let i = 0; i < length; i++) {
|
|
1324
|
-
result[i] = this.cartographicToCartesian(cartographics[i], result[i]);
|
|
1325
|
-
}
|
|
1326
|
-
return result;
|
|
1327
|
-
};
|
|
1328
|
-
var cartesianToCartographicN2 = new Cartesian3_default();
|
|
1329
|
-
var cartesianToCartographicP2 = new Cartesian3_default();
|
|
1330
|
-
var cartesianToCartographicH2 = new Cartesian3_default();
|
|
1331
|
-
Ellipsoid.prototype.cartesianToCartographic = function(cartesian, result) {
|
|
1332
|
-
const p = this.scaleToGeodeticSurface(cartesian, cartesianToCartographicP2);
|
|
1333
|
-
if (!defined_default(p)) {
|
|
1334
|
-
return void 0;
|
|
1335
|
-
}
|
|
1336
|
-
const n = this.geodeticSurfaceNormal(p, cartesianToCartographicN2);
|
|
1337
|
-
const h = Cartesian3_default.subtract(cartesian, p, cartesianToCartographicH2);
|
|
1338
|
-
const longitude = Math.atan2(n.y, n.x);
|
|
1339
|
-
const latitude = Math.asin(n.z);
|
|
1340
|
-
const height = Math_default.sign(Cartesian3_default.dot(h, cartesian)) * Cartesian3_default.magnitude(h);
|
|
1341
|
-
if (!defined_default(result)) {
|
|
1342
|
-
return new Cartographic_default(longitude, latitude, height);
|
|
1343
|
-
}
|
|
1344
|
-
result.longitude = longitude;
|
|
1345
|
-
result.latitude = latitude;
|
|
1346
|
-
result.height = height;
|
|
1347
|
-
return result;
|
|
1348
|
-
};
|
|
1349
|
-
Ellipsoid.prototype.cartesianArrayToCartographicArray = function(cartesians, result) {
|
|
1350
|
-
Check_default.defined("cartesians", cartesians);
|
|
1351
|
-
const length = cartesians.length;
|
|
1352
|
-
if (!defined_default(result)) {
|
|
1353
|
-
result = new Array(length);
|
|
1354
|
-
} else {
|
|
1355
|
-
result.length = length;
|
|
1356
|
-
}
|
|
1357
|
-
for (let i = 0; i < length; ++i) {
|
|
1358
|
-
result[i] = this.cartesianToCartographic(cartesians[i], result[i]);
|
|
1359
|
-
}
|
|
1360
|
-
return result;
|
|
1361
|
-
};
|
|
1362
|
-
Ellipsoid.prototype.scaleToGeodeticSurface = function(cartesian, result) {
|
|
1363
|
-
return scaleToGeodeticSurface_default(
|
|
1364
|
-
cartesian,
|
|
1365
|
-
this._oneOverRadii,
|
|
1366
|
-
this._oneOverRadiiSquared,
|
|
1367
|
-
this._centerToleranceSquared,
|
|
1368
|
-
result
|
|
1369
|
-
);
|
|
1370
|
-
};
|
|
1371
|
-
Ellipsoid.prototype.scaleToGeocentricSurface = function(cartesian, result) {
|
|
1372
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
1373
|
-
if (!defined_default(result)) {
|
|
1374
|
-
result = new Cartesian3_default();
|
|
1375
|
-
}
|
|
1376
|
-
const positionX = cartesian.x;
|
|
1377
|
-
const positionY = cartesian.y;
|
|
1378
|
-
const positionZ = cartesian.z;
|
|
1379
|
-
const oneOverRadiiSquared = this._oneOverRadiiSquared;
|
|
1380
|
-
const beta = 1 / Math.sqrt(
|
|
1381
|
-
positionX * positionX * oneOverRadiiSquared.x + positionY * positionY * oneOverRadiiSquared.y + positionZ * positionZ * oneOverRadiiSquared.z
|
|
1382
|
-
);
|
|
1383
|
-
return Cartesian3_default.multiplyByScalar(cartesian, beta, result);
|
|
1384
|
-
};
|
|
1385
|
-
Ellipsoid.prototype.transformPositionToScaledSpace = function(position, result) {
|
|
1386
|
-
if (!defined_default(result)) {
|
|
1387
|
-
result = new Cartesian3_default();
|
|
1388
|
-
}
|
|
1389
|
-
return Cartesian3_default.multiplyComponents(position, this._oneOverRadii, result);
|
|
1390
|
-
};
|
|
1391
|
-
Ellipsoid.prototype.transformPositionFromScaledSpace = function(position, result) {
|
|
1392
|
-
if (!defined_default(result)) {
|
|
1393
|
-
result = new Cartesian3_default();
|
|
1394
|
-
}
|
|
1395
|
-
return Cartesian3_default.multiplyComponents(position, this._radii, result);
|
|
1396
|
-
};
|
|
1397
|
-
Ellipsoid.prototype.equals = function(right) {
|
|
1398
|
-
return this === right || defined_default(right) && Cartesian3_default.equals(this._radii, right._radii);
|
|
1399
|
-
};
|
|
1400
|
-
Ellipsoid.prototype.toString = function() {
|
|
1401
|
-
return this._radii.toString();
|
|
1402
|
-
};
|
|
1403
|
-
Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function(position, buffer, result) {
|
|
1404
|
-
Check_default.typeOf.object("position", position);
|
|
1405
|
-
if (!Math_default.equalsEpsilon(
|
|
1406
|
-
this._radii.x,
|
|
1407
|
-
this._radii.y,
|
|
1408
|
-
Math_default.EPSILON15
|
|
1409
|
-
)) {
|
|
1410
|
-
throw new DeveloperError_default(
|
|
1411
|
-
"Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)"
|
|
1412
|
-
);
|
|
1413
|
-
}
|
|
1414
|
-
Check_default.typeOf.number.greaterThan("Ellipsoid.radii.z", this._radii.z, 0);
|
|
1415
|
-
buffer = defaultValue_default(buffer, 0);
|
|
1416
|
-
const squaredXOverSquaredZ = this._squaredXOverSquaredZ;
|
|
1417
|
-
if (!defined_default(result)) {
|
|
1418
|
-
result = new Cartesian3_default();
|
|
1419
|
-
}
|
|
1420
|
-
result.x = 0;
|
|
1421
|
-
result.y = 0;
|
|
1422
|
-
result.z = position.z * (1 - squaredXOverSquaredZ);
|
|
1423
|
-
if (Math.abs(result.z) >= this._radii.z - buffer) {
|
|
1424
|
-
return void 0;
|
|
1425
|
-
}
|
|
1426
|
-
return result;
|
|
1427
|
-
};
|
|
1428
|
-
var scratchEndpoint = new Cartesian3_default();
|
|
1429
|
-
Ellipsoid.prototype.getLocalCurvature = function(surfacePosition, result) {
|
|
1430
|
-
Check_default.typeOf.object("surfacePosition", surfacePosition);
|
|
1431
|
-
if (!defined_default(result)) {
|
|
1432
|
-
result = new Cartesian2_default();
|
|
1433
|
-
}
|
|
1434
|
-
const primeVerticalEndpoint = this.getSurfaceNormalIntersectionWithZAxis(
|
|
1435
|
-
surfacePosition,
|
|
1436
|
-
0,
|
|
1437
|
-
scratchEndpoint
|
|
1438
|
-
);
|
|
1439
|
-
const primeVerticalRadius = Cartesian3_default.distance(
|
|
1440
|
-
surfacePosition,
|
|
1441
|
-
primeVerticalEndpoint
|
|
1442
|
-
);
|
|
1443
|
-
const radiusRatio = this.minimumRadius * primeVerticalRadius / this.maximumRadius ** 2;
|
|
1444
|
-
const meridionalRadius = primeVerticalRadius * radiusRatio ** 2;
|
|
1445
|
-
return Cartesian2_default.fromElements(
|
|
1446
|
-
1 / primeVerticalRadius,
|
|
1447
|
-
1 / meridionalRadius,
|
|
1448
|
-
result
|
|
1449
|
-
);
|
|
1450
|
-
};
|
|
1451
|
-
var abscissas = [
|
|
1452
|
-
0.14887433898163,
|
|
1453
|
-
0.43339539412925,
|
|
1454
|
-
0.67940956829902,
|
|
1455
|
-
0.86506336668898,
|
|
1456
|
-
0.97390652851717,
|
|
1457
|
-
0
|
|
1458
|
-
];
|
|
1459
|
-
var weights = [
|
|
1460
|
-
0.29552422471475,
|
|
1461
|
-
0.26926671930999,
|
|
1462
|
-
0.21908636251598,
|
|
1463
|
-
0.14945134915058,
|
|
1464
|
-
0.066671344308684,
|
|
1465
|
-
0
|
|
1466
|
-
];
|
|
1467
|
-
function gaussLegendreQuadrature(a, b, func) {
|
|
1468
|
-
Check_default.typeOf.number("a", a);
|
|
1469
|
-
Check_default.typeOf.number("b", b);
|
|
1470
|
-
Check_default.typeOf.func("func", func);
|
|
1471
|
-
const xMean = 0.5 * (b + a);
|
|
1472
|
-
const xRange = 0.5 * (b - a);
|
|
1473
|
-
let sum = 0;
|
|
1474
|
-
for (let i = 0; i < 5; i++) {
|
|
1475
|
-
const dx = xRange * abscissas[i];
|
|
1476
|
-
sum += weights[i] * (func(xMean + dx) + func(xMean - dx));
|
|
1477
|
-
}
|
|
1478
|
-
sum *= xRange;
|
|
1479
|
-
return sum;
|
|
1480
|
-
}
|
|
1481
|
-
Ellipsoid.prototype.surfaceArea = function(rectangle) {
|
|
1482
|
-
Check_default.typeOf.object("rectangle", rectangle);
|
|
1483
|
-
const minLongitude = rectangle.west;
|
|
1484
|
-
let maxLongitude = rectangle.east;
|
|
1485
|
-
const minLatitude = rectangle.south;
|
|
1486
|
-
const maxLatitude = rectangle.north;
|
|
1487
|
-
while (maxLongitude < minLongitude) {
|
|
1488
|
-
maxLongitude += Math_default.TWO_PI;
|
|
1489
|
-
}
|
|
1490
|
-
const radiiSquared = this._radiiSquared;
|
|
1491
|
-
const a2 = radiiSquared.x;
|
|
1492
|
-
const b2 = radiiSquared.y;
|
|
1493
|
-
const c2 = radiiSquared.z;
|
|
1494
|
-
const a2b2 = a2 * b2;
|
|
1495
|
-
return gaussLegendreQuadrature(minLatitude, maxLatitude, function(lat) {
|
|
1496
|
-
const sinPhi = Math.cos(lat);
|
|
1497
|
-
const cosPhi = Math.sin(lat);
|
|
1498
|
-
return Math.cos(lat) * gaussLegendreQuadrature(minLongitude, maxLongitude, function(lon) {
|
|
1499
|
-
const cosTheta = Math.cos(lon);
|
|
1500
|
-
const sinTheta = Math.sin(lon);
|
|
1501
|
-
return Math.sqrt(
|
|
1502
|
-
a2b2 * cosPhi * cosPhi + c2 * (b2 * cosTheta * cosTheta + a2 * sinTheta * sinTheta) * sinPhi * sinPhi
|
|
1503
|
-
);
|
|
1504
|
-
});
|
|
1505
|
-
});
|
|
1506
|
-
};
|
|
1507
|
-
var Ellipsoid_default = Ellipsoid;
|
|
1508
|
-
|
|
1509
|
-
// packages/engine/Source/Core/Matrix3.js
|
|
1510
|
-
function Matrix3(column0Row0, column1Row0, column2Row0, column0Row1, column1Row1, column2Row1, column0Row2, column1Row2, column2Row2) {
|
|
1511
|
-
this[0] = defaultValue_default(column0Row0, 0);
|
|
1512
|
-
this[1] = defaultValue_default(column0Row1, 0);
|
|
1513
|
-
this[2] = defaultValue_default(column0Row2, 0);
|
|
1514
|
-
this[3] = defaultValue_default(column1Row0, 0);
|
|
1515
|
-
this[4] = defaultValue_default(column1Row1, 0);
|
|
1516
|
-
this[5] = defaultValue_default(column1Row2, 0);
|
|
1517
|
-
this[6] = defaultValue_default(column2Row0, 0);
|
|
1518
|
-
this[7] = defaultValue_default(column2Row1, 0);
|
|
1519
|
-
this[8] = defaultValue_default(column2Row2, 0);
|
|
1520
|
-
}
|
|
1521
|
-
Matrix3.packedLength = 9;
|
|
1522
|
-
Matrix3.pack = function(value, array, startingIndex) {
|
|
1523
|
-
Check_default.typeOf.object("value", value);
|
|
1524
|
-
Check_default.defined("array", array);
|
|
1525
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
1526
|
-
array[startingIndex++] = value[0];
|
|
1527
|
-
array[startingIndex++] = value[1];
|
|
1528
|
-
array[startingIndex++] = value[2];
|
|
1529
|
-
array[startingIndex++] = value[3];
|
|
1530
|
-
array[startingIndex++] = value[4];
|
|
1531
|
-
array[startingIndex++] = value[5];
|
|
1532
|
-
array[startingIndex++] = value[6];
|
|
1533
|
-
array[startingIndex++] = value[7];
|
|
1534
|
-
array[startingIndex++] = value[8];
|
|
1535
|
-
return array;
|
|
1536
|
-
};
|
|
1537
|
-
Matrix3.unpack = function(array, startingIndex, result) {
|
|
1538
|
-
Check_default.defined("array", array);
|
|
1539
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
1540
|
-
if (!defined_default(result)) {
|
|
1541
|
-
result = new Matrix3();
|
|
1542
|
-
}
|
|
1543
|
-
result[0] = array[startingIndex++];
|
|
1544
|
-
result[1] = array[startingIndex++];
|
|
1545
|
-
result[2] = array[startingIndex++];
|
|
1546
|
-
result[3] = array[startingIndex++];
|
|
1547
|
-
result[4] = array[startingIndex++];
|
|
1548
|
-
result[5] = array[startingIndex++];
|
|
1549
|
-
result[6] = array[startingIndex++];
|
|
1550
|
-
result[7] = array[startingIndex++];
|
|
1551
|
-
result[8] = array[startingIndex++];
|
|
1552
|
-
return result;
|
|
1553
|
-
};
|
|
1554
|
-
Matrix3.packArray = function(array, result) {
|
|
1555
|
-
Check_default.defined("array", array);
|
|
1556
|
-
const length = array.length;
|
|
1557
|
-
const resultLength = length * 9;
|
|
1558
|
-
if (!defined_default(result)) {
|
|
1559
|
-
result = new Array(resultLength);
|
|
1560
|
-
} else if (!Array.isArray(result) && result.length !== resultLength) {
|
|
1561
|
-
throw new DeveloperError_default(
|
|
1562
|
-
"If result is a typed array, it must have exactly array.length * 9 elements"
|
|
1563
|
-
);
|
|
1564
|
-
} else if (result.length !== resultLength) {
|
|
1565
|
-
result.length = resultLength;
|
|
1566
|
-
}
|
|
1567
|
-
for (let i = 0; i < length; ++i) {
|
|
1568
|
-
Matrix3.pack(array[i], result, i * 9);
|
|
1569
|
-
}
|
|
1570
|
-
return result;
|
|
1571
|
-
};
|
|
1572
|
-
Matrix3.unpackArray = function(array, result) {
|
|
1573
|
-
Check_default.defined("array", array);
|
|
1574
|
-
Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 9);
|
|
1575
|
-
if (array.length % 9 !== 0) {
|
|
1576
|
-
throw new DeveloperError_default("array length must be a multiple of 9.");
|
|
1577
|
-
}
|
|
1578
|
-
const length = array.length;
|
|
1579
|
-
if (!defined_default(result)) {
|
|
1580
|
-
result = new Array(length / 9);
|
|
1581
|
-
} else {
|
|
1582
|
-
result.length = length / 9;
|
|
1583
|
-
}
|
|
1584
|
-
for (let i = 0; i < length; i += 9) {
|
|
1585
|
-
const index = i / 9;
|
|
1586
|
-
result[index] = Matrix3.unpack(array, i, result[index]);
|
|
1587
|
-
}
|
|
1588
|
-
return result;
|
|
1589
|
-
};
|
|
1590
|
-
Matrix3.clone = function(matrix, result) {
|
|
1591
|
-
if (!defined_default(matrix)) {
|
|
1592
|
-
return void 0;
|
|
1593
|
-
}
|
|
1594
|
-
if (!defined_default(result)) {
|
|
1595
|
-
return new Matrix3(
|
|
1596
|
-
matrix[0],
|
|
1597
|
-
matrix[3],
|
|
1598
|
-
matrix[6],
|
|
1599
|
-
matrix[1],
|
|
1600
|
-
matrix[4],
|
|
1601
|
-
matrix[7],
|
|
1602
|
-
matrix[2],
|
|
1603
|
-
matrix[5],
|
|
1604
|
-
matrix[8]
|
|
1605
|
-
);
|
|
1606
|
-
}
|
|
1607
|
-
result[0] = matrix[0];
|
|
1608
|
-
result[1] = matrix[1];
|
|
1609
|
-
result[2] = matrix[2];
|
|
1610
|
-
result[3] = matrix[3];
|
|
1611
|
-
result[4] = matrix[4];
|
|
1612
|
-
result[5] = matrix[5];
|
|
1613
|
-
result[6] = matrix[6];
|
|
1614
|
-
result[7] = matrix[7];
|
|
1615
|
-
result[8] = matrix[8];
|
|
1616
|
-
return result;
|
|
1617
|
-
};
|
|
1618
|
-
Matrix3.fromArray = Matrix3.unpack;
|
|
1619
|
-
Matrix3.fromColumnMajorArray = function(values, result) {
|
|
1620
|
-
Check_default.defined("values", values);
|
|
1621
|
-
return Matrix3.clone(values, result);
|
|
1622
|
-
};
|
|
1623
|
-
Matrix3.fromRowMajorArray = function(values, result) {
|
|
1624
|
-
Check_default.defined("values", values);
|
|
1625
|
-
if (!defined_default(result)) {
|
|
1626
|
-
return new Matrix3(
|
|
1627
|
-
values[0],
|
|
1628
|
-
values[1],
|
|
1629
|
-
values[2],
|
|
1630
|
-
values[3],
|
|
1631
|
-
values[4],
|
|
1632
|
-
values[5],
|
|
1633
|
-
values[6],
|
|
1634
|
-
values[7],
|
|
1635
|
-
values[8]
|
|
1636
|
-
);
|
|
1637
|
-
}
|
|
1638
|
-
result[0] = values[0];
|
|
1639
|
-
result[1] = values[3];
|
|
1640
|
-
result[2] = values[6];
|
|
1641
|
-
result[3] = values[1];
|
|
1642
|
-
result[4] = values[4];
|
|
1643
|
-
result[5] = values[7];
|
|
1644
|
-
result[6] = values[2];
|
|
1645
|
-
result[7] = values[5];
|
|
1646
|
-
result[8] = values[8];
|
|
1647
|
-
return result;
|
|
1648
|
-
};
|
|
1649
|
-
Matrix3.fromQuaternion = function(quaternion, result) {
|
|
1650
|
-
Check_default.typeOf.object("quaternion", quaternion);
|
|
1651
|
-
const x2 = quaternion.x * quaternion.x;
|
|
1652
|
-
const xy = quaternion.x * quaternion.y;
|
|
1653
|
-
const xz = quaternion.x * quaternion.z;
|
|
1654
|
-
const xw = quaternion.x * quaternion.w;
|
|
1655
|
-
const y2 = quaternion.y * quaternion.y;
|
|
1656
|
-
const yz = quaternion.y * quaternion.z;
|
|
1657
|
-
const yw = quaternion.y * quaternion.w;
|
|
1658
|
-
const z2 = quaternion.z * quaternion.z;
|
|
1659
|
-
const zw = quaternion.z * quaternion.w;
|
|
1660
|
-
const w2 = quaternion.w * quaternion.w;
|
|
1661
|
-
const m00 = x2 - y2 - z2 + w2;
|
|
1662
|
-
const m01 = 2 * (xy - zw);
|
|
1663
|
-
const m02 = 2 * (xz + yw);
|
|
1664
|
-
const m10 = 2 * (xy + zw);
|
|
1665
|
-
const m11 = -x2 + y2 - z2 + w2;
|
|
1666
|
-
const m12 = 2 * (yz - xw);
|
|
1667
|
-
const m20 = 2 * (xz - yw);
|
|
1668
|
-
const m21 = 2 * (yz + xw);
|
|
1669
|
-
const m22 = -x2 - y2 + z2 + w2;
|
|
1670
|
-
if (!defined_default(result)) {
|
|
1671
|
-
return new Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);
|
|
1672
|
-
}
|
|
1673
|
-
result[0] = m00;
|
|
1674
|
-
result[1] = m10;
|
|
1675
|
-
result[2] = m20;
|
|
1676
|
-
result[3] = m01;
|
|
1677
|
-
result[4] = m11;
|
|
1678
|
-
result[5] = m21;
|
|
1679
|
-
result[6] = m02;
|
|
1680
|
-
result[7] = m12;
|
|
1681
|
-
result[8] = m22;
|
|
1682
|
-
return result;
|
|
1683
|
-
};
|
|
1684
|
-
Matrix3.fromHeadingPitchRoll = function(headingPitchRoll, result) {
|
|
1685
|
-
Check_default.typeOf.object("headingPitchRoll", headingPitchRoll);
|
|
1686
|
-
const cosTheta = Math.cos(-headingPitchRoll.pitch);
|
|
1687
|
-
const cosPsi = Math.cos(-headingPitchRoll.heading);
|
|
1688
|
-
const cosPhi = Math.cos(headingPitchRoll.roll);
|
|
1689
|
-
const sinTheta = Math.sin(-headingPitchRoll.pitch);
|
|
1690
|
-
const sinPsi = Math.sin(-headingPitchRoll.heading);
|
|
1691
|
-
const sinPhi = Math.sin(headingPitchRoll.roll);
|
|
1692
|
-
const m00 = cosTheta * cosPsi;
|
|
1693
|
-
const m01 = -cosPhi * sinPsi + sinPhi * sinTheta * cosPsi;
|
|
1694
|
-
const m02 = sinPhi * sinPsi + cosPhi * sinTheta * cosPsi;
|
|
1695
|
-
const m10 = cosTheta * sinPsi;
|
|
1696
|
-
const m11 = cosPhi * cosPsi + sinPhi * sinTheta * sinPsi;
|
|
1697
|
-
const m12 = -sinPhi * cosPsi + cosPhi * sinTheta * sinPsi;
|
|
1698
|
-
const m20 = -sinTheta;
|
|
1699
|
-
const m21 = sinPhi * cosTheta;
|
|
1700
|
-
const m22 = cosPhi * cosTheta;
|
|
1701
|
-
if (!defined_default(result)) {
|
|
1702
|
-
return new Matrix3(m00, m01, m02, m10, m11, m12, m20, m21, m22);
|
|
1703
|
-
}
|
|
1704
|
-
result[0] = m00;
|
|
1705
|
-
result[1] = m10;
|
|
1706
|
-
result[2] = m20;
|
|
1707
|
-
result[3] = m01;
|
|
1708
|
-
result[4] = m11;
|
|
1709
|
-
result[5] = m21;
|
|
1710
|
-
result[6] = m02;
|
|
1711
|
-
result[7] = m12;
|
|
1712
|
-
result[8] = m22;
|
|
1713
|
-
return result;
|
|
1714
|
-
};
|
|
1715
|
-
Matrix3.fromScale = function(scale, result) {
|
|
1716
|
-
Check_default.typeOf.object("scale", scale);
|
|
1717
|
-
if (!defined_default(result)) {
|
|
1718
|
-
return new Matrix3(scale.x, 0, 0, 0, scale.y, 0, 0, 0, scale.z);
|
|
1719
|
-
}
|
|
1720
|
-
result[0] = scale.x;
|
|
1721
|
-
result[1] = 0;
|
|
1722
|
-
result[2] = 0;
|
|
1723
|
-
result[3] = 0;
|
|
1724
|
-
result[4] = scale.y;
|
|
1725
|
-
result[5] = 0;
|
|
1726
|
-
result[6] = 0;
|
|
1727
|
-
result[7] = 0;
|
|
1728
|
-
result[8] = scale.z;
|
|
1729
|
-
return result;
|
|
1730
|
-
};
|
|
1731
|
-
Matrix3.fromUniformScale = function(scale, result) {
|
|
1732
|
-
Check_default.typeOf.number("scale", scale);
|
|
1733
|
-
if (!defined_default(result)) {
|
|
1734
|
-
return new Matrix3(scale, 0, 0, 0, scale, 0, 0, 0, scale);
|
|
1735
|
-
}
|
|
1736
|
-
result[0] = scale;
|
|
1737
|
-
result[1] = 0;
|
|
1738
|
-
result[2] = 0;
|
|
1739
|
-
result[3] = 0;
|
|
1740
|
-
result[4] = scale;
|
|
1741
|
-
result[5] = 0;
|
|
1742
|
-
result[6] = 0;
|
|
1743
|
-
result[7] = 0;
|
|
1744
|
-
result[8] = scale;
|
|
1745
|
-
return result;
|
|
1746
|
-
};
|
|
1747
|
-
Matrix3.fromCrossProduct = function(vector, result) {
|
|
1748
|
-
Check_default.typeOf.object("vector", vector);
|
|
1749
|
-
if (!defined_default(result)) {
|
|
1750
|
-
return new Matrix3(
|
|
1751
|
-
0,
|
|
1752
|
-
-vector.z,
|
|
1753
|
-
vector.y,
|
|
1754
|
-
vector.z,
|
|
1755
|
-
0,
|
|
1756
|
-
-vector.x,
|
|
1757
|
-
-vector.y,
|
|
1758
|
-
vector.x,
|
|
1759
|
-
0
|
|
1760
|
-
);
|
|
1761
|
-
}
|
|
1762
|
-
result[0] = 0;
|
|
1763
|
-
result[1] = vector.z;
|
|
1764
|
-
result[2] = -vector.y;
|
|
1765
|
-
result[3] = -vector.z;
|
|
1766
|
-
result[4] = 0;
|
|
1767
|
-
result[5] = vector.x;
|
|
1768
|
-
result[6] = vector.y;
|
|
1769
|
-
result[7] = -vector.x;
|
|
1770
|
-
result[8] = 0;
|
|
1771
|
-
return result;
|
|
1772
|
-
};
|
|
1773
|
-
Matrix3.fromRotationX = function(angle, result) {
|
|
1774
|
-
Check_default.typeOf.number("angle", angle);
|
|
1775
|
-
const cosAngle = Math.cos(angle);
|
|
1776
|
-
const sinAngle = Math.sin(angle);
|
|
1777
|
-
if (!defined_default(result)) {
|
|
1778
|
-
return new Matrix3(
|
|
1779
|
-
1,
|
|
1780
|
-
0,
|
|
1781
|
-
0,
|
|
1782
|
-
0,
|
|
1783
|
-
cosAngle,
|
|
1784
|
-
-sinAngle,
|
|
1785
|
-
0,
|
|
1786
|
-
sinAngle,
|
|
1787
|
-
cosAngle
|
|
1788
|
-
);
|
|
1789
|
-
}
|
|
1790
|
-
result[0] = 1;
|
|
1791
|
-
result[1] = 0;
|
|
1792
|
-
result[2] = 0;
|
|
1793
|
-
result[3] = 0;
|
|
1794
|
-
result[4] = cosAngle;
|
|
1795
|
-
result[5] = sinAngle;
|
|
1796
|
-
result[6] = 0;
|
|
1797
|
-
result[7] = -sinAngle;
|
|
1798
|
-
result[8] = cosAngle;
|
|
1799
|
-
return result;
|
|
1800
|
-
};
|
|
1801
|
-
Matrix3.fromRotationY = function(angle, result) {
|
|
1802
|
-
Check_default.typeOf.number("angle", angle);
|
|
1803
|
-
const cosAngle = Math.cos(angle);
|
|
1804
|
-
const sinAngle = Math.sin(angle);
|
|
1805
|
-
if (!defined_default(result)) {
|
|
1806
|
-
return new Matrix3(
|
|
1807
|
-
cosAngle,
|
|
1808
|
-
0,
|
|
1809
|
-
sinAngle,
|
|
1810
|
-
0,
|
|
1811
|
-
1,
|
|
1812
|
-
0,
|
|
1813
|
-
-sinAngle,
|
|
1814
|
-
0,
|
|
1815
|
-
cosAngle
|
|
1816
|
-
);
|
|
1817
|
-
}
|
|
1818
|
-
result[0] = cosAngle;
|
|
1819
|
-
result[1] = 0;
|
|
1820
|
-
result[2] = -sinAngle;
|
|
1821
|
-
result[3] = 0;
|
|
1822
|
-
result[4] = 1;
|
|
1823
|
-
result[5] = 0;
|
|
1824
|
-
result[6] = sinAngle;
|
|
1825
|
-
result[7] = 0;
|
|
1826
|
-
result[8] = cosAngle;
|
|
1827
|
-
return result;
|
|
1828
|
-
};
|
|
1829
|
-
Matrix3.fromRotationZ = function(angle, result) {
|
|
1830
|
-
Check_default.typeOf.number("angle", angle);
|
|
1831
|
-
const cosAngle = Math.cos(angle);
|
|
1832
|
-
const sinAngle = Math.sin(angle);
|
|
1833
|
-
if (!defined_default(result)) {
|
|
1834
|
-
return new Matrix3(
|
|
1835
|
-
cosAngle,
|
|
1836
|
-
-sinAngle,
|
|
1837
|
-
0,
|
|
1838
|
-
sinAngle,
|
|
1839
|
-
cosAngle,
|
|
1840
|
-
0,
|
|
1841
|
-
0,
|
|
1842
|
-
0,
|
|
1843
|
-
1
|
|
1844
|
-
);
|
|
1845
|
-
}
|
|
1846
|
-
result[0] = cosAngle;
|
|
1847
|
-
result[1] = sinAngle;
|
|
1848
|
-
result[2] = 0;
|
|
1849
|
-
result[3] = -sinAngle;
|
|
1850
|
-
result[4] = cosAngle;
|
|
1851
|
-
result[5] = 0;
|
|
1852
|
-
result[6] = 0;
|
|
1853
|
-
result[7] = 0;
|
|
1854
|
-
result[8] = 1;
|
|
1855
|
-
return result;
|
|
1856
|
-
};
|
|
1857
|
-
Matrix3.toArray = function(matrix, result) {
|
|
1858
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
1859
|
-
if (!defined_default(result)) {
|
|
1860
|
-
return [
|
|
1861
|
-
matrix[0],
|
|
1862
|
-
matrix[1],
|
|
1863
|
-
matrix[2],
|
|
1864
|
-
matrix[3],
|
|
1865
|
-
matrix[4],
|
|
1866
|
-
matrix[5],
|
|
1867
|
-
matrix[6],
|
|
1868
|
-
matrix[7],
|
|
1869
|
-
matrix[8]
|
|
1870
|
-
];
|
|
1871
|
-
}
|
|
1872
|
-
result[0] = matrix[0];
|
|
1873
|
-
result[1] = matrix[1];
|
|
1874
|
-
result[2] = matrix[2];
|
|
1875
|
-
result[3] = matrix[3];
|
|
1876
|
-
result[4] = matrix[4];
|
|
1877
|
-
result[5] = matrix[5];
|
|
1878
|
-
result[6] = matrix[6];
|
|
1879
|
-
result[7] = matrix[7];
|
|
1880
|
-
result[8] = matrix[8];
|
|
1881
|
-
return result;
|
|
1882
|
-
};
|
|
1883
|
-
Matrix3.getElementIndex = function(column, row) {
|
|
1884
|
-
Check_default.typeOf.number.greaterThanOrEquals("row", row, 0);
|
|
1885
|
-
Check_default.typeOf.number.lessThanOrEquals("row", row, 2);
|
|
1886
|
-
Check_default.typeOf.number.greaterThanOrEquals("column", column, 0);
|
|
1887
|
-
Check_default.typeOf.number.lessThanOrEquals("column", column, 2);
|
|
1888
|
-
return column * 3 + row;
|
|
1889
|
-
};
|
|
1890
|
-
Matrix3.getColumn = function(matrix, index, result) {
|
|
1891
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
1892
|
-
Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
|
|
1893
|
-
Check_default.typeOf.number.lessThanOrEquals("index", index, 2);
|
|
1894
|
-
Check_default.typeOf.object("result", result);
|
|
1895
|
-
const startIndex = index * 3;
|
|
1896
|
-
const x = matrix[startIndex];
|
|
1897
|
-
const y = matrix[startIndex + 1];
|
|
1898
|
-
const z = matrix[startIndex + 2];
|
|
1899
|
-
result.x = x;
|
|
1900
|
-
result.y = y;
|
|
1901
|
-
result.z = z;
|
|
1902
|
-
return result;
|
|
1903
|
-
};
|
|
1904
|
-
Matrix3.setColumn = function(matrix, index, cartesian, result) {
|
|
1905
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
1906
|
-
Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
|
|
1907
|
-
Check_default.typeOf.number.lessThanOrEquals("index", index, 2);
|
|
1908
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
1909
|
-
Check_default.typeOf.object("result", result);
|
|
1910
|
-
result = Matrix3.clone(matrix, result);
|
|
1911
|
-
const startIndex = index * 3;
|
|
1912
|
-
result[startIndex] = cartesian.x;
|
|
1913
|
-
result[startIndex + 1] = cartesian.y;
|
|
1914
|
-
result[startIndex + 2] = cartesian.z;
|
|
1915
|
-
return result;
|
|
1916
|
-
};
|
|
1917
|
-
Matrix3.getRow = function(matrix, index, result) {
|
|
1918
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
1919
|
-
Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
|
|
1920
|
-
Check_default.typeOf.number.lessThanOrEquals("index", index, 2);
|
|
1921
|
-
Check_default.typeOf.object("result", result);
|
|
1922
|
-
const x = matrix[index];
|
|
1923
|
-
const y = matrix[index + 3];
|
|
1924
|
-
const z = matrix[index + 6];
|
|
1925
|
-
result.x = x;
|
|
1926
|
-
result.y = y;
|
|
1927
|
-
result.z = z;
|
|
1928
|
-
return result;
|
|
1929
|
-
};
|
|
1930
|
-
Matrix3.setRow = function(matrix, index, cartesian, result) {
|
|
1931
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
1932
|
-
Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
|
|
1933
|
-
Check_default.typeOf.number.lessThanOrEquals("index", index, 2);
|
|
1934
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
1935
|
-
Check_default.typeOf.object("result", result);
|
|
1936
|
-
result = Matrix3.clone(matrix, result);
|
|
1937
|
-
result[index] = cartesian.x;
|
|
1938
|
-
result[index + 3] = cartesian.y;
|
|
1939
|
-
result[index + 6] = cartesian.z;
|
|
1940
|
-
return result;
|
|
1941
|
-
};
|
|
1942
|
-
var scaleScratch1 = new Cartesian3_default();
|
|
1943
|
-
Matrix3.setScale = function(matrix, scale, result) {
|
|
1944
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
1945
|
-
Check_default.typeOf.object("scale", scale);
|
|
1946
|
-
Check_default.typeOf.object("result", result);
|
|
1947
|
-
const existingScale = Matrix3.getScale(matrix, scaleScratch1);
|
|
1948
|
-
const scaleRatioX = scale.x / existingScale.x;
|
|
1949
|
-
const scaleRatioY = scale.y / existingScale.y;
|
|
1950
|
-
const scaleRatioZ = scale.z / existingScale.z;
|
|
1951
|
-
result[0] = matrix[0] * scaleRatioX;
|
|
1952
|
-
result[1] = matrix[1] * scaleRatioX;
|
|
1953
|
-
result[2] = matrix[2] * scaleRatioX;
|
|
1954
|
-
result[3] = matrix[3] * scaleRatioY;
|
|
1955
|
-
result[4] = matrix[4] * scaleRatioY;
|
|
1956
|
-
result[5] = matrix[5] * scaleRatioY;
|
|
1957
|
-
result[6] = matrix[6] * scaleRatioZ;
|
|
1958
|
-
result[7] = matrix[7] * scaleRatioZ;
|
|
1959
|
-
result[8] = matrix[8] * scaleRatioZ;
|
|
1960
|
-
return result;
|
|
1961
|
-
};
|
|
1962
|
-
var scaleScratch2 = new Cartesian3_default();
|
|
1963
|
-
Matrix3.setUniformScale = function(matrix, scale, result) {
|
|
1964
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
1965
|
-
Check_default.typeOf.number("scale", scale);
|
|
1966
|
-
Check_default.typeOf.object("result", result);
|
|
1967
|
-
const existingScale = Matrix3.getScale(matrix, scaleScratch2);
|
|
1968
|
-
const scaleRatioX = scale / existingScale.x;
|
|
1969
|
-
const scaleRatioY = scale / existingScale.y;
|
|
1970
|
-
const scaleRatioZ = scale / existingScale.z;
|
|
1971
|
-
result[0] = matrix[0] * scaleRatioX;
|
|
1972
|
-
result[1] = matrix[1] * scaleRatioX;
|
|
1973
|
-
result[2] = matrix[2] * scaleRatioX;
|
|
1974
|
-
result[3] = matrix[3] * scaleRatioY;
|
|
1975
|
-
result[4] = matrix[4] * scaleRatioY;
|
|
1976
|
-
result[5] = matrix[5] * scaleRatioY;
|
|
1977
|
-
result[6] = matrix[6] * scaleRatioZ;
|
|
1978
|
-
result[7] = matrix[7] * scaleRatioZ;
|
|
1979
|
-
result[8] = matrix[8] * scaleRatioZ;
|
|
1980
|
-
return result;
|
|
1981
|
-
};
|
|
1982
|
-
var scratchColumn = new Cartesian3_default();
|
|
1983
|
-
Matrix3.getScale = function(matrix, result) {
|
|
1984
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
1985
|
-
Check_default.typeOf.object("result", result);
|
|
1986
|
-
result.x = Cartesian3_default.magnitude(
|
|
1987
|
-
Cartesian3_default.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn)
|
|
1988
|
-
);
|
|
1989
|
-
result.y = Cartesian3_default.magnitude(
|
|
1990
|
-
Cartesian3_default.fromElements(matrix[3], matrix[4], matrix[5], scratchColumn)
|
|
1991
|
-
);
|
|
1992
|
-
result.z = Cartesian3_default.magnitude(
|
|
1993
|
-
Cartesian3_default.fromElements(matrix[6], matrix[7], matrix[8], scratchColumn)
|
|
1994
|
-
);
|
|
1995
|
-
return result;
|
|
1996
|
-
};
|
|
1997
|
-
var scaleScratch3 = new Cartesian3_default();
|
|
1998
|
-
Matrix3.getMaximumScale = function(matrix) {
|
|
1999
|
-
Matrix3.getScale(matrix, scaleScratch3);
|
|
2000
|
-
return Cartesian3_default.maximumComponent(scaleScratch3);
|
|
2001
|
-
};
|
|
2002
|
-
var scaleScratch4 = new Cartesian3_default();
|
|
2003
|
-
Matrix3.setRotation = function(matrix, rotation, result) {
|
|
2004
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2005
|
-
Check_default.typeOf.object("result", result);
|
|
2006
|
-
const scale = Matrix3.getScale(matrix, scaleScratch4);
|
|
2007
|
-
result[0] = rotation[0] * scale.x;
|
|
2008
|
-
result[1] = rotation[1] * scale.x;
|
|
2009
|
-
result[2] = rotation[2] * scale.x;
|
|
2010
|
-
result[3] = rotation[3] * scale.y;
|
|
2011
|
-
result[4] = rotation[4] * scale.y;
|
|
2012
|
-
result[5] = rotation[5] * scale.y;
|
|
2013
|
-
result[6] = rotation[6] * scale.z;
|
|
2014
|
-
result[7] = rotation[7] * scale.z;
|
|
2015
|
-
result[8] = rotation[8] * scale.z;
|
|
2016
|
-
return result;
|
|
2017
|
-
};
|
|
2018
|
-
var scaleScratch5 = new Cartesian3_default();
|
|
2019
|
-
Matrix3.getRotation = function(matrix, result) {
|
|
2020
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2021
|
-
Check_default.typeOf.object("result", result);
|
|
2022
|
-
const scale = Matrix3.getScale(matrix, scaleScratch5);
|
|
2023
|
-
result[0] = matrix[0] / scale.x;
|
|
2024
|
-
result[1] = matrix[1] / scale.x;
|
|
2025
|
-
result[2] = matrix[2] / scale.x;
|
|
2026
|
-
result[3] = matrix[3] / scale.y;
|
|
2027
|
-
result[4] = matrix[4] / scale.y;
|
|
2028
|
-
result[5] = matrix[5] / scale.y;
|
|
2029
|
-
result[6] = matrix[6] / scale.z;
|
|
2030
|
-
result[7] = matrix[7] / scale.z;
|
|
2031
|
-
result[8] = matrix[8] / scale.z;
|
|
2032
|
-
return result;
|
|
2033
|
-
};
|
|
2034
|
-
Matrix3.multiply = function(left, right, result) {
|
|
2035
|
-
Check_default.typeOf.object("left", left);
|
|
2036
|
-
Check_default.typeOf.object("right", right);
|
|
2037
|
-
Check_default.typeOf.object("result", result);
|
|
2038
|
-
const column0Row0 = left[0] * right[0] + left[3] * right[1] + left[6] * right[2];
|
|
2039
|
-
const column0Row1 = left[1] * right[0] + left[4] * right[1] + left[7] * right[2];
|
|
2040
|
-
const column0Row2 = left[2] * right[0] + left[5] * right[1] + left[8] * right[2];
|
|
2041
|
-
const column1Row0 = left[0] * right[3] + left[3] * right[4] + left[6] * right[5];
|
|
2042
|
-
const column1Row1 = left[1] * right[3] + left[4] * right[4] + left[7] * right[5];
|
|
2043
|
-
const column1Row2 = left[2] * right[3] + left[5] * right[4] + left[8] * right[5];
|
|
2044
|
-
const column2Row0 = left[0] * right[6] + left[3] * right[7] + left[6] * right[8];
|
|
2045
|
-
const column2Row1 = left[1] * right[6] + left[4] * right[7] + left[7] * right[8];
|
|
2046
|
-
const column2Row2 = left[2] * right[6] + left[5] * right[7] + left[8] * right[8];
|
|
2047
|
-
result[0] = column0Row0;
|
|
2048
|
-
result[1] = column0Row1;
|
|
2049
|
-
result[2] = column0Row2;
|
|
2050
|
-
result[3] = column1Row0;
|
|
2051
|
-
result[4] = column1Row1;
|
|
2052
|
-
result[5] = column1Row2;
|
|
2053
|
-
result[6] = column2Row0;
|
|
2054
|
-
result[7] = column2Row1;
|
|
2055
|
-
result[8] = column2Row2;
|
|
2056
|
-
return result;
|
|
2057
|
-
};
|
|
2058
|
-
Matrix3.add = function(left, right, result) {
|
|
2059
|
-
Check_default.typeOf.object("left", left);
|
|
2060
|
-
Check_default.typeOf.object("right", right);
|
|
2061
|
-
Check_default.typeOf.object("result", result);
|
|
2062
|
-
result[0] = left[0] + right[0];
|
|
2063
|
-
result[1] = left[1] + right[1];
|
|
2064
|
-
result[2] = left[2] + right[2];
|
|
2065
|
-
result[3] = left[3] + right[3];
|
|
2066
|
-
result[4] = left[4] + right[4];
|
|
2067
|
-
result[5] = left[5] + right[5];
|
|
2068
|
-
result[6] = left[6] + right[6];
|
|
2069
|
-
result[7] = left[7] + right[7];
|
|
2070
|
-
result[8] = left[8] + right[8];
|
|
2071
|
-
return result;
|
|
2072
|
-
};
|
|
2073
|
-
Matrix3.subtract = function(left, right, result) {
|
|
2074
|
-
Check_default.typeOf.object("left", left);
|
|
2075
|
-
Check_default.typeOf.object("right", right);
|
|
2076
|
-
Check_default.typeOf.object("result", result);
|
|
2077
|
-
result[0] = left[0] - right[0];
|
|
2078
|
-
result[1] = left[1] - right[1];
|
|
2079
|
-
result[2] = left[2] - right[2];
|
|
2080
|
-
result[3] = left[3] - right[3];
|
|
2081
|
-
result[4] = left[4] - right[4];
|
|
2082
|
-
result[5] = left[5] - right[5];
|
|
2083
|
-
result[6] = left[6] - right[6];
|
|
2084
|
-
result[7] = left[7] - right[7];
|
|
2085
|
-
result[8] = left[8] - right[8];
|
|
2086
|
-
return result;
|
|
2087
|
-
};
|
|
2088
|
-
Matrix3.multiplyByVector = function(matrix, cartesian, result) {
|
|
2089
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2090
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
2091
|
-
Check_default.typeOf.object("result", result);
|
|
2092
|
-
const vX = cartesian.x;
|
|
2093
|
-
const vY = cartesian.y;
|
|
2094
|
-
const vZ = cartesian.z;
|
|
2095
|
-
const x = matrix[0] * vX + matrix[3] * vY + matrix[6] * vZ;
|
|
2096
|
-
const y = matrix[1] * vX + matrix[4] * vY + matrix[7] * vZ;
|
|
2097
|
-
const z = matrix[2] * vX + matrix[5] * vY + matrix[8] * vZ;
|
|
2098
|
-
result.x = x;
|
|
2099
|
-
result.y = y;
|
|
2100
|
-
result.z = z;
|
|
2101
|
-
return result;
|
|
2102
|
-
};
|
|
2103
|
-
Matrix3.multiplyByScalar = function(matrix, scalar, result) {
|
|
2104
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2105
|
-
Check_default.typeOf.number("scalar", scalar);
|
|
2106
|
-
Check_default.typeOf.object("result", result);
|
|
2107
|
-
result[0] = matrix[0] * scalar;
|
|
2108
|
-
result[1] = matrix[1] * scalar;
|
|
2109
|
-
result[2] = matrix[2] * scalar;
|
|
2110
|
-
result[3] = matrix[3] * scalar;
|
|
2111
|
-
result[4] = matrix[4] * scalar;
|
|
2112
|
-
result[5] = matrix[5] * scalar;
|
|
2113
|
-
result[6] = matrix[6] * scalar;
|
|
2114
|
-
result[7] = matrix[7] * scalar;
|
|
2115
|
-
result[8] = matrix[8] * scalar;
|
|
2116
|
-
return result;
|
|
2117
|
-
};
|
|
2118
|
-
Matrix3.multiplyByScale = function(matrix, scale, result) {
|
|
2119
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2120
|
-
Check_default.typeOf.object("scale", scale);
|
|
2121
|
-
Check_default.typeOf.object("result", result);
|
|
2122
|
-
result[0] = matrix[0] * scale.x;
|
|
2123
|
-
result[1] = matrix[1] * scale.x;
|
|
2124
|
-
result[2] = matrix[2] * scale.x;
|
|
2125
|
-
result[3] = matrix[3] * scale.y;
|
|
2126
|
-
result[4] = matrix[4] * scale.y;
|
|
2127
|
-
result[5] = matrix[5] * scale.y;
|
|
2128
|
-
result[6] = matrix[6] * scale.z;
|
|
2129
|
-
result[7] = matrix[7] * scale.z;
|
|
2130
|
-
result[8] = matrix[8] * scale.z;
|
|
2131
|
-
return result;
|
|
2132
|
-
};
|
|
2133
|
-
Matrix3.multiplyByUniformScale = function(matrix, scale, result) {
|
|
2134
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2135
|
-
Check_default.typeOf.number("scale", scale);
|
|
2136
|
-
Check_default.typeOf.object("result", result);
|
|
2137
|
-
result[0] = matrix[0] * scale;
|
|
2138
|
-
result[1] = matrix[1] * scale;
|
|
2139
|
-
result[2] = matrix[2] * scale;
|
|
2140
|
-
result[3] = matrix[3] * scale;
|
|
2141
|
-
result[4] = matrix[4] * scale;
|
|
2142
|
-
result[5] = matrix[5] * scale;
|
|
2143
|
-
result[6] = matrix[6] * scale;
|
|
2144
|
-
result[7] = matrix[7] * scale;
|
|
2145
|
-
result[8] = matrix[8] * scale;
|
|
2146
|
-
return result;
|
|
2147
|
-
};
|
|
2148
|
-
Matrix3.negate = function(matrix, result) {
|
|
2149
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2150
|
-
Check_default.typeOf.object("result", result);
|
|
2151
|
-
result[0] = -matrix[0];
|
|
2152
|
-
result[1] = -matrix[1];
|
|
2153
|
-
result[2] = -matrix[2];
|
|
2154
|
-
result[3] = -matrix[3];
|
|
2155
|
-
result[4] = -matrix[4];
|
|
2156
|
-
result[5] = -matrix[5];
|
|
2157
|
-
result[6] = -matrix[6];
|
|
2158
|
-
result[7] = -matrix[7];
|
|
2159
|
-
result[8] = -matrix[8];
|
|
2160
|
-
return result;
|
|
2161
|
-
};
|
|
2162
|
-
Matrix3.transpose = function(matrix, result) {
|
|
2163
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2164
|
-
Check_default.typeOf.object("result", result);
|
|
2165
|
-
const column0Row0 = matrix[0];
|
|
2166
|
-
const column0Row1 = matrix[3];
|
|
2167
|
-
const column0Row2 = matrix[6];
|
|
2168
|
-
const column1Row0 = matrix[1];
|
|
2169
|
-
const column1Row1 = matrix[4];
|
|
2170
|
-
const column1Row2 = matrix[7];
|
|
2171
|
-
const column2Row0 = matrix[2];
|
|
2172
|
-
const column2Row1 = matrix[5];
|
|
2173
|
-
const column2Row2 = matrix[8];
|
|
2174
|
-
result[0] = column0Row0;
|
|
2175
|
-
result[1] = column0Row1;
|
|
2176
|
-
result[2] = column0Row2;
|
|
2177
|
-
result[3] = column1Row0;
|
|
2178
|
-
result[4] = column1Row1;
|
|
2179
|
-
result[5] = column1Row2;
|
|
2180
|
-
result[6] = column2Row0;
|
|
2181
|
-
result[7] = column2Row1;
|
|
2182
|
-
result[8] = column2Row2;
|
|
2183
|
-
return result;
|
|
2184
|
-
};
|
|
2185
|
-
function computeFrobeniusNorm(matrix) {
|
|
2186
|
-
let norm = 0;
|
|
2187
|
-
for (let i = 0; i < 9; ++i) {
|
|
2188
|
-
const temp = matrix[i];
|
|
2189
|
-
norm += temp * temp;
|
|
2190
|
-
}
|
|
2191
|
-
return Math.sqrt(norm);
|
|
2192
|
-
}
|
|
2193
|
-
var rowVal = [1, 0, 0];
|
|
2194
|
-
var colVal = [2, 2, 1];
|
|
2195
|
-
function offDiagonalFrobeniusNorm(matrix) {
|
|
2196
|
-
let norm = 0;
|
|
2197
|
-
for (let i = 0; i < 3; ++i) {
|
|
2198
|
-
const temp = matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])];
|
|
2199
|
-
norm += 2 * temp * temp;
|
|
2200
|
-
}
|
|
2201
|
-
return Math.sqrt(norm);
|
|
2202
|
-
}
|
|
2203
|
-
function shurDecomposition(matrix, result) {
|
|
2204
|
-
const tolerance = Math_default.EPSILON15;
|
|
2205
|
-
let maxDiagonal = 0;
|
|
2206
|
-
let rotAxis = 1;
|
|
2207
|
-
for (let i = 0; i < 3; ++i) {
|
|
2208
|
-
const temp = Math.abs(
|
|
2209
|
-
matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])]
|
|
2210
|
-
);
|
|
2211
|
-
if (temp > maxDiagonal) {
|
|
2212
|
-
rotAxis = i;
|
|
2213
|
-
maxDiagonal = temp;
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
let c = 1;
|
|
2217
|
-
let s = 0;
|
|
2218
|
-
const p = rowVal[rotAxis];
|
|
2219
|
-
const q = colVal[rotAxis];
|
|
2220
|
-
if (Math.abs(matrix[Matrix3.getElementIndex(q, p)]) > tolerance) {
|
|
2221
|
-
const qq = matrix[Matrix3.getElementIndex(q, q)];
|
|
2222
|
-
const pp = matrix[Matrix3.getElementIndex(p, p)];
|
|
2223
|
-
const qp = matrix[Matrix3.getElementIndex(q, p)];
|
|
2224
|
-
const tau = (qq - pp) / 2 / qp;
|
|
2225
|
-
let t;
|
|
2226
|
-
if (tau < 0) {
|
|
2227
|
-
t = -1 / (-tau + Math.sqrt(1 + tau * tau));
|
|
2228
|
-
} else {
|
|
2229
|
-
t = 1 / (tau + Math.sqrt(1 + tau * tau));
|
|
2230
|
-
}
|
|
2231
|
-
c = 1 / Math.sqrt(1 + t * t);
|
|
2232
|
-
s = t * c;
|
|
2233
|
-
}
|
|
2234
|
-
result = Matrix3.clone(Matrix3.IDENTITY, result);
|
|
2235
|
-
result[Matrix3.getElementIndex(p, p)] = result[Matrix3.getElementIndex(q, q)] = c;
|
|
2236
|
-
result[Matrix3.getElementIndex(q, p)] = s;
|
|
2237
|
-
result[Matrix3.getElementIndex(p, q)] = -s;
|
|
2238
|
-
return result;
|
|
2239
|
-
}
|
|
2240
|
-
var jMatrix = new Matrix3();
|
|
2241
|
-
var jMatrixTranspose = new Matrix3();
|
|
2242
|
-
Matrix3.computeEigenDecomposition = function(matrix, result) {
|
|
2243
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2244
|
-
const tolerance = Math_default.EPSILON20;
|
|
2245
|
-
const maxSweeps = 10;
|
|
2246
|
-
let count = 0;
|
|
2247
|
-
let sweep = 0;
|
|
2248
|
-
if (!defined_default(result)) {
|
|
2249
|
-
result = {};
|
|
2250
|
-
}
|
|
2251
|
-
const unitaryMatrix = result.unitary = Matrix3.clone(
|
|
2252
|
-
Matrix3.IDENTITY,
|
|
2253
|
-
result.unitary
|
|
2254
|
-
);
|
|
2255
|
-
const diagMatrix = result.diagonal = Matrix3.clone(matrix, result.diagonal);
|
|
2256
|
-
const epsilon = tolerance * computeFrobeniusNorm(diagMatrix);
|
|
2257
|
-
while (sweep < maxSweeps && offDiagonalFrobeniusNorm(diagMatrix) > epsilon) {
|
|
2258
|
-
shurDecomposition(diagMatrix, jMatrix);
|
|
2259
|
-
Matrix3.transpose(jMatrix, jMatrixTranspose);
|
|
2260
|
-
Matrix3.multiply(diagMatrix, jMatrix, diagMatrix);
|
|
2261
|
-
Matrix3.multiply(jMatrixTranspose, diagMatrix, diagMatrix);
|
|
2262
|
-
Matrix3.multiply(unitaryMatrix, jMatrix, unitaryMatrix);
|
|
2263
|
-
if (++count > 2) {
|
|
2264
|
-
++sweep;
|
|
2265
|
-
count = 0;
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
return result;
|
|
2269
|
-
};
|
|
2270
|
-
Matrix3.abs = function(matrix, result) {
|
|
2271
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2272
|
-
Check_default.typeOf.object("result", result);
|
|
2273
|
-
result[0] = Math.abs(matrix[0]);
|
|
2274
|
-
result[1] = Math.abs(matrix[1]);
|
|
2275
|
-
result[2] = Math.abs(matrix[2]);
|
|
2276
|
-
result[3] = Math.abs(matrix[3]);
|
|
2277
|
-
result[4] = Math.abs(matrix[4]);
|
|
2278
|
-
result[5] = Math.abs(matrix[5]);
|
|
2279
|
-
result[6] = Math.abs(matrix[6]);
|
|
2280
|
-
result[7] = Math.abs(matrix[7]);
|
|
2281
|
-
result[8] = Math.abs(matrix[8]);
|
|
2282
|
-
return result;
|
|
2283
|
-
};
|
|
2284
|
-
Matrix3.determinant = function(matrix) {
|
|
2285
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2286
|
-
const m11 = matrix[0];
|
|
2287
|
-
const m21 = matrix[3];
|
|
2288
|
-
const m31 = matrix[6];
|
|
2289
|
-
const m12 = matrix[1];
|
|
2290
|
-
const m22 = matrix[4];
|
|
2291
|
-
const m32 = matrix[7];
|
|
2292
|
-
const m13 = matrix[2];
|
|
2293
|
-
const m23 = matrix[5];
|
|
2294
|
-
const m33 = matrix[8];
|
|
2295
|
-
return m11 * (m22 * m33 - m23 * m32) + m12 * (m23 * m31 - m21 * m33) + m13 * (m21 * m32 - m22 * m31);
|
|
2296
|
-
};
|
|
2297
|
-
Matrix3.inverse = function(matrix, result) {
|
|
2298
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2299
|
-
Check_default.typeOf.object("result", result);
|
|
2300
|
-
const m11 = matrix[0];
|
|
2301
|
-
const m21 = matrix[1];
|
|
2302
|
-
const m31 = matrix[2];
|
|
2303
|
-
const m12 = matrix[3];
|
|
2304
|
-
const m22 = matrix[4];
|
|
2305
|
-
const m32 = matrix[5];
|
|
2306
|
-
const m13 = matrix[6];
|
|
2307
|
-
const m23 = matrix[7];
|
|
2308
|
-
const m33 = matrix[8];
|
|
2309
|
-
const determinant = Matrix3.determinant(matrix);
|
|
2310
|
-
if (Math.abs(determinant) <= Math_default.EPSILON15) {
|
|
2311
|
-
throw new DeveloperError_default("matrix is not invertible");
|
|
2312
|
-
}
|
|
2313
|
-
result[0] = m22 * m33 - m23 * m32;
|
|
2314
|
-
result[1] = m23 * m31 - m21 * m33;
|
|
2315
|
-
result[2] = m21 * m32 - m22 * m31;
|
|
2316
|
-
result[3] = m13 * m32 - m12 * m33;
|
|
2317
|
-
result[4] = m11 * m33 - m13 * m31;
|
|
2318
|
-
result[5] = m12 * m31 - m11 * m32;
|
|
2319
|
-
result[6] = m12 * m23 - m13 * m22;
|
|
2320
|
-
result[7] = m13 * m21 - m11 * m23;
|
|
2321
|
-
result[8] = m11 * m22 - m12 * m21;
|
|
2322
|
-
const scale = 1 / determinant;
|
|
2323
|
-
return Matrix3.multiplyByScalar(result, scale, result);
|
|
2324
|
-
};
|
|
2325
|
-
var scratchTransposeMatrix = new Matrix3();
|
|
2326
|
-
Matrix3.inverseTranspose = function(matrix, result) {
|
|
2327
|
-
Check_default.typeOf.object("matrix", matrix);
|
|
2328
|
-
Check_default.typeOf.object("result", result);
|
|
2329
|
-
return Matrix3.inverse(
|
|
2330
|
-
Matrix3.transpose(matrix, scratchTransposeMatrix),
|
|
2331
|
-
result
|
|
2332
|
-
);
|
|
2333
|
-
};
|
|
2334
|
-
Matrix3.equals = function(left, right) {
|
|
2335
|
-
return left === right || defined_default(left) && defined_default(right) && left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[3] === right[3] && left[4] === right[4] && left[5] === right[5] && left[6] === right[6] && left[7] === right[7] && left[8] === right[8];
|
|
2336
|
-
};
|
|
2337
|
-
Matrix3.equalsEpsilon = function(left, right, epsilon) {
|
|
2338
|
-
epsilon = defaultValue_default(epsilon, 0);
|
|
2339
|
-
return left === right || defined_default(left) && defined_default(right) && Math.abs(left[0] - right[0]) <= epsilon && Math.abs(left[1] - right[1]) <= epsilon && Math.abs(left[2] - right[2]) <= epsilon && Math.abs(left[3] - right[3]) <= epsilon && Math.abs(left[4] - right[4]) <= epsilon && Math.abs(left[5] - right[5]) <= epsilon && Math.abs(left[6] - right[6]) <= epsilon && Math.abs(left[7] - right[7]) <= epsilon && Math.abs(left[8] - right[8]) <= epsilon;
|
|
2340
|
-
};
|
|
2341
|
-
Matrix3.IDENTITY = Object.freeze(
|
|
2342
|
-
new Matrix3(1, 0, 0, 0, 1, 0, 0, 0, 1)
|
|
2343
|
-
);
|
|
2344
|
-
Matrix3.ZERO = Object.freeze(
|
|
2345
|
-
new Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
2346
|
-
);
|
|
2347
|
-
Matrix3.COLUMN0ROW0 = 0;
|
|
2348
|
-
Matrix3.COLUMN0ROW1 = 1;
|
|
2349
|
-
Matrix3.COLUMN0ROW2 = 2;
|
|
2350
|
-
Matrix3.COLUMN1ROW0 = 3;
|
|
2351
|
-
Matrix3.COLUMN1ROW1 = 4;
|
|
2352
|
-
Matrix3.COLUMN1ROW2 = 5;
|
|
2353
|
-
Matrix3.COLUMN2ROW0 = 6;
|
|
2354
|
-
Matrix3.COLUMN2ROW1 = 7;
|
|
2355
|
-
Matrix3.COLUMN2ROW2 = 8;
|
|
2356
|
-
Object.defineProperties(Matrix3.prototype, {
|
|
2357
|
-
/**
|
|
2358
|
-
* Gets the number of items in the collection.
|
|
2359
|
-
* @memberof Matrix3.prototype
|
|
2360
|
-
*
|
|
2361
|
-
* @type {number}
|
|
2362
|
-
*/
|
|
2363
|
-
length: {
|
|
2364
|
-
get: function() {
|
|
2365
|
-
return Matrix3.packedLength;
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
});
|
|
2369
|
-
Matrix3.prototype.clone = function(result) {
|
|
2370
|
-
return Matrix3.clone(this, result);
|
|
2371
|
-
};
|
|
2372
|
-
Matrix3.prototype.equals = function(right) {
|
|
2373
|
-
return Matrix3.equals(this, right);
|
|
2374
|
-
};
|
|
2375
|
-
Matrix3.equalsArray = function(matrix, array, offset) {
|
|
2376
|
-
return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3] && matrix[4] === array[offset + 4] && matrix[5] === array[offset + 5] && matrix[6] === array[offset + 6] && matrix[7] === array[offset + 7] && matrix[8] === array[offset + 8];
|
|
2377
|
-
};
|
|
2378
|
-
Matrix3.prototype.equalsEpsilon = function(right, epsilon) {
|
|
2379
|
-
return Matrix3.equalsEpsilon(this, right, epsilon);
|
|
2380
|
-
};
|
|
2381
|
-
Matrix3.prototype.toString = function() {
|
|
2382
|
-
return `(${this[0]}, ${this[3]}, ${this[6]})
|
|
2383
|
-
(${this[1]}, ${this[4]}, ${this[7]})
|
|
2384
|
-
(${this[2]}, ${this[5]}, ${this[8]})`;
|
|
2385
|
-
};
|
|
2386
|
-
var Matrix3_default = Matrix3;
|
|
2387
|
-
|
|
2388
|
-
// packages/engine/Source/Core/Fullscreen.js
|
|
2389
|
-
var _supportsFullscreen;
|
|
2390
|
-
var _names = {
|
|
2391
|
-
requestFullscreen: void 0,
|
|
2392
|
-
exitFullscreen: void 0,
|
|
2393
|
-
fullscreenEnabled: void 0,
|
|
2394
|
-
fullscreenElement: void 0,
|
|
2395
|
-
fullscreenchange: void 0,
|
|
2396
|
-
fullscreenerror: void 0
|
|
2397
|
-
};
|
|
2398
|
-
var Fullscreen = {};
|
|
2399
|
-
Object.defineProperties(Fullscreen, {
|
|
2400
|
-
/**
|
|
2401
|
-
* The element that is currently fullscreen, if any. To simply check if the
|
|
2402
|
-
* browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.
|
|
2403
|
-
* @memberof Fullscreen
|
|
2404
|
-
* @type {object}
|
|
2405
|
-
* @readonly
|
|
2406
|
-
*/
|
|
2407
|
-
element: {
|
|
2408
|
-
get: function() {
|
|
2409
|
-
if (!Fullscreen.supportsFullscreen()) {
|
|
2410
|
-
return void 0;
|
|
2411
|
-
}
|
|
2412
|
-
return document[_names.fullscreenElement];
|
|
2413
|
-
}
|
|
2414
|
-
},
|
|
2415
|
-
/**
|
|
2416
|
-
* The name of the event on the document that is fired when fullscreen is
|
|
2417
|
-
* entered or exited. This event name is intended for use with addEventListener.
|
|
2418
|
-
* In your event handler, to determine if the browser is in fullscreen mode or not,
|
|
2419
|
-
* use {@link Fullscreen#fullscreen}.
|
|
2420
|
-
* @memberof Fullscreen
|
|
2421
|
-
* @type {string}
|
|
2422
|
-
* @readonly
|
|
2423
|
-
*/
|
|
2424
|
-
changeEventName: {
|
|
2425
|
-
get: function() {
|
|
2426
|
-
if (!Fullscreen.supportsFullscreen()) {
|
|
2427
|
-
return void 0;
|
|
2428
|
-
}
|
|
2429
|
-
return _names.fullscreenchange;
|
|
2430
|
-
}
|
|
2431
|
-
},
|
|
2432
|
-
/**
|
|
2433
|
-
* The name of the event that is fired when a fullscreen error
|
|
2434
|
-
* occurs. This event name is intended for use with addEventListener.
|
|
2435
|
-
* @memberof Fullscreen
|
|
2436
|
-
* @type {string}
|
|
2437
|
-
* @readonly
|
|
2438
|
-
*/
|
|
2439
|
-
errorEventName: {
|
|
2440
|
-
get: function() {
|
|
2441
|
-
if (!Fullscreen.supportsFullscreen()) {
|
|
2442
|
-
return void 0;
|
|
2443
|
-
}
|
|
2444
|
-
return _names.fullscreenerror;
|
|
2445
|
-
}
|
|
2446
|
-
},
|
|
2447
|
-
/**
|
|
2448
|
-
* Determine whether the browser will allow an element to be made fullscreen, or not.
|
|
2449
|
-
* For example, by default, iframes cannot go fullscreen unless the containing page
|
|
2450
|
-
* adds an "allowfullscreen" attribute (or prefixed equivalent).
|
|
2451
|
-
* @memberof Fullscreen
|
|
2452
|
-
* @type {boolean}
|
|
2453
|
-
* @readonly
|
|
2454
|
-
*/
|
|
2455
|
-
enabled: {
|
|
2456
|
-
get: function() {
|
|
2457
|
-
if (!Fullscreen.supportsFullscreen()) {
|
|
2458
|
-
return void 0;
|
|
2459
|
-
}
|
|
2460
|
-
return document[_names.fullscreenEnabled];
|
|
2461
|
-
}
|
|
2462
|
-
},
|
|
2463
|
-
/**
|
|
2464
|
-
* Determines if the browser is currently in fullscreen mode.
|
|
2465
|
-
* @memberof Fullscreen
|
|
2466
|
-
* @type {boolean}
|
|
2467
|
-
* @readonly
|
|
2468
|
-
*/
|
|
2469
|
-
fullscreen: {
|
|
2470
|
-
get: function() {
|
|
2471
|
-
if (!Fullscreen.supportsFullscreen()) {
|
|
2472
|
-
return void 0;
|
|
2473
|
-
}
|
|
2474
|
-
return Fullscreen.element !== null;
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
});
|
|
2478
|
-
Fullscreen.supportsFullscreen = function() {
|
|
2479
|
-
if (defined_default(_supportsFullscreen)) {
|
|
2480
|
-
return _supportsFullscreen;
|
|
2481
|
-
}
|
|
2482
|
-
_supportsFullscreen = false;
|
|
2483
|
-
const body = document.body;
|
|
2484
|
-
if (typeof body.requestFullscreen === "function") {
|
|
2485
|
-
_names.requestFullscreen = "requestFullscreen";
|
|
2486
|
-
_names.exitFullscreen = "exitFullscreen";
|
|
2487
|
-
_names.fullscreenEnabled = "fullscreenEnabled";
|
|
2488
|
-
_names.fullscreenElement = "fullscreenElement";
|
|
2489
|
-
_names.fullscreenchange = "fullscreenchange";
|
|
2490
|
-
_names.fullscreenerror = "fullscreenerror";
|
|
2491
|
-
_supportsFullscreen = true;
|
|
2492
|
-
return _supportsFullscreen;
|
|
2493
|
-
}
|
|
2494
|
-
const prefixes = ["webkit", "moz", "o", "ms", "khtml"];
|
|
2495
|
-
let name;
|
|
2496
|
-
for (let i = 0, len = prefixes.length; i < len; ++i) {
|
|
2497
|
-
const prefix = prefixes[i];
|
|
2498
|
-
name = `${prefix}RequestFullscreen`;
|
|
2499
|
-
if (typeof body[name] === "function") {
|
|
2500
|
-
_names.requestFullscreen = name;
|
|
2501
|
-
_supportsFullscreen = true;
|
|
2502
|
-
} else {
|
|
2503
|
-
name = `${prefix}RequestFullScreen`;
|
|
2504
|
-
if (typeof body[name] === "function") {
|
|
2505
|
-
_names.requestFullscreen = name;
|
|
2506
|
-
_supportsFullscreen = true;
|
|
2507
|
-
}
|
|
2508
|
-
}
|
|
2509
|
-
name = `${prefix}ExitFullscreen`;
|
|
2510
|
-
if (typeof document[name] === "function") {
|
|
2511
|
-
_names.exitFullscreen = name;
|
|
2512
|
-
} else {
|
|
2513
|
-
name = `${prefix}CancelFullScreen`;
|
|
2514
|
-
if (typeof document[name] === "function") {
|
|
2515
|
-
_names.exitFullscreen = name;
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
|
-
name = `${prefix}FullscreenEnabled`;
|
|
2519
|
-
if (document[name] !== void 0) {
|
|
2520
|
-
_names.fullscreenEnabled = name;
|
|
2521
|
-
} else {
|
|
2522
|
-
name = `${prefix}FullScreenEnabled`;
|
|
2523
|
-
if (document[name] !== void 0) {
|
|
2524
|
-
_names.fullscreenEnabled = name;
|
|
2525
|
-
}
|
|
2526
|
-
}
|
|
2527
|
-
name = `${prefix}FullscreenElement`;
|
|
2528
|
-
if (document[name] !== void 0) {
|
|
2529
|
-
_names.fullscreenElement = name;
|
|
2530
|
-
} else {
|
|
2531
|
-
name = `${prefix}FullScreenElement`;
|
|
2532
|
-
if (document[name] !== void 0) {
|
|
2533
|
-
_names.fullscreenElement = name;
|
|
2534
|
-
}
|
|
2535
|
-
}
|
|
2536
|
-
name = `${prefix}fullscreenchange`;
|
|
2537
|
-
if (document[`on${name}`] !== void 0) {
|
|
2538
|
-
if (prefix === "ms") {
|
|
2539
|
-
name = "MSFullscreenChange";
|
|
2540
|
-
}
|
|
2541
|
-
_names.fullscreenchange = name;
|
|
2542
|
-
}
|
|
2543
|
-
name = `${prefix}fullscreenerror`;
|
|
2544
|
-
if (document[`on${name}`] !== void 0) {
|
|
2545
|
-
if (prefix === "ms") {
|
|
2546
|
-
name = "MSFullscreenError";
|
|
2547
|
-
}
|
|
2548
|
-
_names.fullscreenerror = name;
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
return _supportsFullscreen;
|
|
2552
|
-
};
|
|
2553
|
-
Fullscreen.requestFullscreen = function(element, vrDevice) {
|
|
2554
|
-
if (!Fullscreen.supportsFullscreen()) {
|
|
2555
|
-
return;
|
|
2556
|
-
}
|
|
2557
|
-
element[_names.requestFullscreen]({ vrDisplay: vrDevice });
|
|
2558
|
-
};
|
|
2559
|
-
Fullscreen.exitFullscreen = function() {
|
|
2560
|
-
if (!Fullscreen.supportsFullscreen()) {
|
|
2561
|
-
return;
|
|
2562
|
-
}
|
|
2563
|
-
document[_names.exitFullscreen]();
|
|
2564
|
-
};
|
|
2565
|
-
Fullscreen._names = _names;
|
|
2566
|
-
var Fullscreen_default = Fullscreen;
|
|
2567
|
-
|
|
2568
|
-
// packages/engine/Source/Core/FeatureDetection.js
|
|
2569
|
-
var theNavigator;
|
|
2570
|
-
if (typeof navigator !== "undefined") {
|
|
2571
|
-
theNavigator = navigator;
|
|
2572
|
-
} else {
|
|
2573
|
-
theNavigator = {};
|
|
2574
|
-
}
|
|
2575
|
-
function extractVersion(versionString) {
|
|
2576
|
-
const parts = versionString.split(".");
|
|
2577
|
-
for (let i = 0, len = parts.length; i < len; ++i) {
|
|
2578
|
-
parts[i] = parseInt(parts[i], 10);
|
|
2579
|
-
}
|
|
2580
|
-
return parts;
|
|
2581
|
-
}
|
|
2582
|
-
var isChromeResult;
|
|
2583
|
-
var chromeVersionResult;
|
|
2584
|
-
function isChrome() {
|
|
2585
|
-
if (!defined_default(isChromeResult)) {
|
|
2586
|
-
isChromeResult = false;
|
|
2587
|
-
if (!isEdge()) {
|
|
2588
|
-
const fields = / Chrome\/([\.0-9]+)/.exec(theNavigator.userAgent);
|
|
2589
|
-
if (fields !== null) {
|
|
2590
|
-
isChromeResult = true;
|
|
2591
|
-
chromeVersionResult = extractVersion(fields[1]);
|
|
2592
|
-
}
|
|
2593
|
-
}
|
|
2594
|
-
}
|
|
2595
|
-
return isChromeResult;
|
|
2596
|
-
}
|
|
2597
|
-
function chromeVersion() {
|
|
2598
|
-
return isChrome() && chromeVersionResult;
|
|
2599
|
-
}
|
|
2600
|
-
var isSafariResult;
|
|
2601
|
-
var safariVersionResult;
|
|
2602
|
-
function isSafari() {
|
|
2603
|
-
if (!defined_default(isSafariResult)) {
|
|
2604
|
-
isSafariResult = false;
|
|
2605
|
-
if (!isChrome() && !isEdge() && / Safari\/[\.0-9]+/.test(theNavigator.userAgent)) {
|
|
2606
|
-
const fields = / Version\/([\.0-9]+)/.exec(theNavigator.userAgent);
|
|
2607
|
-
if (fields !== null) {
|
|
2608
|
-
isSafariResult = true;
|
|
2609
|
-
safariVersionResult = extractVersion(fields[1]);
|
|
2610
|
-
}
|
|
2611
|
-
}
|
|
2612
|
-
}
|
|
2613
|
-
return isSafariResult;
|
|
2614
|
-
}
|
|
2615
|
-
function safariVersion() {
|
|
2616
|
-
return isSafari() && safariVersionResult;
|
|
2617
|
-
}
|
|
2618
|
-
var isWebkitResult;
|
|
2619
|
-
var webkitVersionResult;
|
|
2620
|
-
function isWebkit() {
|
|
2621
|
-
if (!defined_default(isWebkitResult)) {
|
|
2622
|
-
isWebkitResult = false;
|
|
2623
|
-
const fields = / AppleWebKit\/([\.0-9]+)(\+?)/.exec(theNavigator.userAgent);
|
|
2624
|
-
if (fields !== null) {
|
|
2625
|
-
isWebkitResult = true;
|
|
2626
|
-
webkitVersionResult = extractVersion(fields[1]);
|
|
2627
|
-
webkitVersionResult.isNightly = !!fields[2];
|
|
2628
|
-
}
|
|
2629
|
-
}
|
|
2630
|
-
return isWebkitResult;
|
|
2631
|
-
}
|
|
2632
|
-
function webkitVersion() {
|
|
2633
|
-
return isWebkit() && webkitVersionResult;
|
|
2634
|
-
}
|
|
2635
|
-
var isInternetExplorerResult;
|
|
2636
|
-
var internetExplorerVersionResult;
|
|
2637
|
-
function isInternetExplorer() {
|
|
2638
|
-
if (!defined_default(isInternetExplorerResult)) {
|
|
2639
|
-
isInternetExplorerResult = false;
|
|
2640
|
-
let fields;
|
|
2641
|
-
if (theNavigator.appName === "Microsoft Internet Explorer") {
|
|
2642
|
-
fields = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent);
|
|
2643
|
-
if (fields !== null) {
|
|
2644
|
-
isInternetExplorerResult = true;
|
|
2645
|
-
internetExplorerVersionResult = extractVersion(fields[1]);
|
|
2646
|
-
}
|
|
2647
|
-
} else if (theNavigator.appName === "Netscape") {
|
|
2648
|
-
fields = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(
|
|
2649
|
-
theNavigator.userAgent
|
|
2650
|
-
);
|
|
2651
|
-
if (fields !== null) {
|
|
2652
|
-
isInternetExplorerResult = true;
|
|
2653
|
-
internetExplorerVersionResult = extractVersion(fields[1]);
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
}
|
|
2657
|
-
return isInternetExplorerResult;
|
|
2658
|
-
}
|
|
2659
|
-
function internetExplorerVersion() {
|
|
2660
|
-
return isInternetExplorer() && internetExplorerVersionResult;
|
|
2661
|
-
}
|
|
2662
|
-
var isEdgeResult;
|
|
2663
|
-
var edgeVersionResult;
|
|
2664
|
-
function isEdge() {
|
|
2665
|
-
if (!defined_default(isEdgeResult)) {
|
|
2666
|
-
isEdgeResult = false;
|
|
2667
|
-
const fields = / Edg\/([\.0-9]+)/.exec(theNavigator.userAgent);
|
|
2668
|
-
if (fields !== null) {
|
|
2669
|
-
isEdgeResult = true;
|
|
2670
|
-
edgeVersionResult = extractVersion(fields[1]);
|
|
2671
|
-
}
|
|
2672
|
-
}
|
|
2673
|
-
return isEdgeResult;
|
|
2674
|
-
}
|
|
2675
|
-
function edgeVersion() {
|
|
2676
|
-
return isEdge() && edgeVersionResult;
|
|
2677
|
-
}
|
|
2678
|
-
var isFirefoxResult;
|
|
2679
|
-
var firefoxVersionResult;
|
|
2680
|
-
function isFirefox() {
|
|
2681
|
-
if (!defined_default(isFirefoxResult)) {
|
|
2682
|
-
isFirefoxResult = false;
|
|
2683
|
-
const fields = /Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent);
|
|
2684
|
-
if (fields !== null) {
|
|
2685
|
-
isFirefoxResult = true;
|
|
2686
|
-
firefoxVersionResult = extractVersion(fields[1]);
|
|
2687
|
-
}
|
|
2688
|
-
}
|
|
2689
|
-
return isFirefoxResult;
|
|
2690
|
-
}
|
|
2691
|
-
var isWindowsResult;
|
|
2692
|
-
function isWindows() {
|
|
2693
|
-
if (!defined_default(isWindowsResult)) {
|
|
2694
|
-
isWindowsResult = /Windows/i.test(theNavigator.appVersion);
|
|
2695
|
-
}
|
|
2696
|
-
return isWindowsResult;
|
|
2697
|
-
}
|
|
2698
|
-
var isIPadOrIOSResult;
|
|
2699
|
-
function isIPadOrIOS() {
|
|
2700
|
-
if (!defined_default(isIPadOrIOSResult)) {
|
|
2701
|
-
isIPadOrIOSResult = navigator.platform === "iPhone" || navigator.platform === "iPod" || navigator.platform === "iPad";
|
|
2702
|
-
}
|
|
2703
|
-
return isIPadOrIOSResult;
|
|
2704
|
-
}
|
|
2705
|
-
function firefoxVersion() {
|
|
2706
|
-
return isFirefox() && firefoxVersionResult;
|
|
2707
|
-
}
|
|
2708
|
-
var hasPointerEvents;
|
|
2709
|
-
function supportsPointerEvents() {
|
|
2710
|
-
if (!defined_default(hasPointerEvents)) {
|
|
2711
|
-
hasPointerEvents = typeof PointerEvent !== "undefined" && (!defined_default(theNavigator.pointerEnabled) || theNavigator.pointerEnabled);
|
|
2712
|
-
}
|
|
2713
|
-
return hasPointerEvents;
|
|
2714
|
-
}
|
|
2715
|
-
var imageRenderingValueResult;
|
|
2716
|
-
var supportsImageRenderingPixelatedResult;
|
|
2717
|
-
function supportsImageRenderingPixelated() {
|
|
2718
|
-
if (!defined_default(supportsImageRenderingPixelatedResult)) {
|
|
2719
|
-
const canvas = document.createElement("canvas");
|
|
2720
|
-
canvas.setAttribute(
|
|
2721
|
-
"style",
|
|
2722
|
-
"image-rendering: -moz-crisp-edges;image-rendering: pixelated;"
|
|
2723
|
-
);
|
|
2724
|
-
const tmp = canvas.style.imageRendering;
|
|
2725
|
-
supportsImageRenderingPixelatedResult = defined_default(tmp) && tmp !== "";
|
|
2726
|
-
if (supportsImageRenderingPixelatedResult) {
|
|
2727
|
-
imageRenderingValueResult = tmp;
|
|
2728
|
-
}
|
|
2729
|
-
}
|
|
2730
|
-
return supportsImageRenderingPixelatedResult;
|
|
2731
|
-
}
|
|
2732
|
-
function imageRenderingValue() {
|
|
2733
|
-
return supportsImageRenderingPixelated() ? imageRenderingValueResult : void 0;
|
|
2734
|
-
}
|
|
2735
|
-
function supportsWebP() {
|
|
2736
|
-
if (!supportsWebP.initialized) {
|
|
2737
|
-
throw new DeveloperError_default(
|
|
2738
|
-
"You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP"
|
|
2739
|
-
);
|
|
2740
|
-
}
|
|
2741
|
-
return supportsWebP._result;
|
|
2742
|
-
}
|
|
2743
|
-
supportsWebP._promise = void 0;
|
|
2744
|
-
supportsWebP._result = void 0;
|
|
2745
|
-
supportsWebP.initialize = function() {
|
|
2746
|
-
if (defined_default(supportsWebP._promise)) {
|
|
2747
|
-
return supportsWebP._promise;
|
|
2748
|
-
}
|
|
2749
|
-
supportsWebP._promise = new Promise((resolve) => {
|
|
2750
|
-
const image = new Image();
|
|
2751
|
-
image.onload = function() {
|
|
2752
|
-
supportsWebP._result = image.width > 0 && image.height > 0;
|
|
2753
|
-
resolve(supportsWebP._result);
|
|
2754
|
-
};
|
|
2755
|
-
image.onerror = function() {
|
|
2756
|
-
supportsWebP._result = false;
|
|
2757
|
-
resolve(supportsWebP._result);
|
|
2758
|
-
};
|
|
2759
|
-
image.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA";
|
|
2760
|
-
});
|
|
2761
|
-
return supportsWebP._promise;
|
|
2762
|
-
};
|
|
2763
|
-
Object.defineProperties(supportsWebP, {
|
|
2764
|
-
initialized: {
|
|
2765
|
-
get: function() {
|
|
2766
|
-
return defined_default(supportsWebP._result);
|
|
2767
|
-
}
|
|
2768
|
-
}
|
|
2769
|
-
});
|
|
2770
|
-
var typedArrayTypes = [];
|
|
2771
|
-
if (typeof ArrayBuffer !== "undefined") {
|
|
2772
|
-
typedArrayTypes.push(
|
|
2773
|
-
Int8Array,
|
|
2774
|
-
Uint8Array,
|
|
2775
|
-
Int16Array,
|
|
2776
|
-
Uint16Array,
|
|
2777
|
-
Int32Array,
|
|
2778
|
-
Uint32Array,
|
|
2779
|
-
Float32Array,
|
|
2780
|
-
Float64Array
|
|
2781
|
-
);
|
|
2782
|
-
if (typeof Uint8ClampedArray !== "undefined") {
|
|
2783
|
-
typedArrayTypes.push(Uint8ClampedArray);
|
|
2784
|
-
}
|
|
2785
|
-
if (typeof Uint8ClampedArray !== "undefined") {
|
|
2786
|
-
typedArrayTypes.push(Uint8ClampedArray);
|
|
2787
|
-
}
|
|
2788
|
-
if (typeof BigInt64Array !== "undefined") {
|
|
2789
|
-
typedArrayTypes.push(BigInt64Array);
|
|
2790
|
-
}
|
|
2791
|
-
if (typeof BigUint64Array !== "undefined") {
|
|
2792
|
-
typedArrayTypes.push(BigUint64Array);
|
|
2793
|
-
}
|
|
2794
|
-
}
|
|
2795
|
-
var FeatureDetection = {
|
|
2796
|
-
isChrome,
|
|
2797
|
-
chromeVersion,
|
|
2798
|
-
isSafari,
|
|
2799
|
-
safariVersion,
|
|
2800
|
-
isWebkit,
|
|
2801
|
-
webkitVersion,
|
|
2802
|
-
isInternetExplorer,
|
|
2803
|
-
internetExplorerVersion,
|
|
2804
|
-
isEdge,
|
|
2805
|
-
edgeVersion,
|
|
2806
|
-
isFirefox,
|
|
2807
|
-
firefoxVersion,
|
|
2808
|
-
isWindows,
|
|
2809
|
-
isIPadOrIOS,
|
|
2810
|
-
hardwareConcurrency: defaultValue_default(theNavigator.hardwareConcurrency, 3),
|
|
2811
|
-
supportsPointerEvents,
|
|
2812
|
-
supportsImageRenderingPixelated,
|
|
2813
|
-
supportsWebP,
|
|
2814
|
-
imageRenderingValue,
|
|
2815
|
-
typedArrayTypes
|
|
2816
|
-
};
|
|
2817
|
-
FeatureDetection.supportsBasis = function(scene) {
|
|
2818
|
-
return FeatureDetection.supportsWebAssembly() && scene.context.supportsBasis;
|
|
2819
|
-
};
|
|
2820
|
-
FeatureDetection.supportsFullscreen = function() {
|
|
2821
|
-
return Fullscreen_default.supportsFullscreen();
|
|
2822
|
-
};
|
|
2823
|
-
FeatureDetection.supportsTypedArrays = function() {
|
|
2824
|
-
return typeof ArrayBuffer !== "undefined";
|
|
2825
|
-
};
|
|
2826
|
-
FeatureDetection.supportsBigInt64Array = function() {
|
|
2827
|
-
return typeof BigInt64Array !== "undefined";
|
|
2828
|
-
};
|
|
2829
|
-
FeatureDetection.supportsBigUint64Array = function() {
|
|
2830
|
-
return typeof BigUint64Array !== "undefined";
|
|
2831
|
-
};
|
|
2832
|
-
FeatureDetection.supportsBigInt = function() {
|
|
2833
|
-
return typeof BigInt !== "undefined";
|
|
2834
|
-
};
|
|
2835
|
-
FeatureDetection.supportsWebWorkers = function() {
|
|
2836
|
-
return typeof Worker !== "undefined";
|
|
2837
|
-
};
|
|
2838
|
-
FeatureDetection.supportsWebAssembly = function() {
|
|
2839
|
-
return typeof WebAssembly !== "undefined";
|
|
2840
|
-
};
|
|
2841
|
-
FeatureDetection.supportsWebgl2 = function(scene) {
|
|
2842
|
-
Check_default.defined("scene", scene);
|
|
2843
|
-
return scene.context.webgl2;
|
|
2844
|
-
};
|
|
2845
|
-
FeatureDetection.supportsEsmWebWorkers = function() {
|
|
2846
|
-
return !isFirefox() || parseInt(firefoxVersionResult) >= 114;
|
|
2847
|
-
};
|
|
2848
|
-
var FeatureDetection_default = FeatureDetection;
|
|
2849
|
-
|
|
2850
|
-
export {
|
|
2851
|
-
Cartesian3_default,
|
|
2852
|
-
Cartographic_default,
|
|
2853
|
-
Cartesian2_default,
|
|
2854
|
-
Ellipsoid_default,
|
|
2855
|
-
Matrix3_default,
|
|
2856
|
-
FeatureDetection_default
|
|
2857
|
-
};
|