@vcmap/ui 5.3.3 → 6.0.0-rc.2

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.
Files changed (699) hide show
  1. package/build/build.js +26 -4
  2. package/build/buildHelpers.js +6 -1
  3. package/build/buildTypes.js +18 -0
  4. package/build/commonViteConfig.js +7 -10
  5. package/build/generateOLLib.js +5 -1
  6. package/build/info/publish.js +2 -2
  7. package/build/lintTypes.js +5 -0
  8. package/build/staging/Dockerfile +1 -1
  9. package/config/base.config.json +9 -6
  10. package/config/dev.config.json +14 -10
  11. package/config/www.config.json +1 -1
  12. package/dist/assets/cesium/Assets/approximateTerrainHeights.json +1 -1
  13. package/dist/assets/cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
  14. package/dist/assets/cesium/Workers/{chunk-ZA25DG4Y.js → chunk-3DRPXHZ4.js} +11 -11
  15. package/dist/assets/cesium/Workers/{chunk-OAVNIRB4.js → chunk-3GI7DWF7.js} +5 -7
  16. package/dist/assets/cesium/Workers/{chunk-TFC6TZ3S.js → chunk-4EW3HFFI.js} +33 -22
  17. package/dist/assets/cesium/Workers/{chunk-LLUNNUJV.js → chunk-4OX4RYLB.js} +5 -5
  18. package/dist/assets/cesium/Workers/{chunk-66QLLS45.js → chunk-4RJH3H6D.js} +11 -9
  19. package/dist/assets/cesium/Workers/{chunk-MPAZH4BF.js → chunk-5OUTANXX.js} +1 -1
  20. package/dist/assets/cesium/Workers/{chunk-WXTV4ATB.js → chunk-6DH5PLFD.js} +1 -1
  21. package/dist/assets/cesium/Workers/{chunk-A4JVFBQ3.js → chunk-6DXIYFX3.js} +2 -2
  22. package/dist/assets/cesium/Workers/chunk-A5C2A5O5.js +963 -0
  23. package/dist/assets/cesium/Workers/{chunk-HQF437NJ.js → chunk-AGTH5JMJ.js} +6 -6
  24. package/dist/assets/cesium/Workers/{chunk-RP2A7BR5.js → chunk-AVFIYUKX.js} +12 -14
  25. package/dist/assets/cesium/Workers/{chunk-227AJNOA.js → chunk-BAJAVGUF.js} +5 -5
  26. package/dist/assets/cesium/Workers/{chunk-N3JIFFX2.js → chunk-BPY4HDAK.js} +5 -6
  27. package/dist/assets/cesium/Workers/{chunk-ABADGKYE.js → chunk-D6PDWQXW.js} +2 -2
  28. package/dist/assets/cesium/Workers/{chunk-34YUDLRP.js → chunk-DR7LK6PG.js} +13 -13
  29. package/dist/assets/cesium/Workers/{chunk-OYFCF4PL.js → chunk-DTACCQDR.js} +6 -6
  30. package/dist/assets/cesium/Workers/{chunk-C3SXRKRW.js → chunk-EVU2UNBD.js} +7 -7
  31. package/dist/assets/cesium/Workers/{chunk-6BTKZDRG.js → chunk-F7IEM66T.js} +3 -5
  32. package/dist/assets/cesium/Workers/{chunk-QT3MPEMI.js → chunk-FSXNF76Y.js} +4 -4
  33. package/dist/assets/cesium/Workers/{chunk-PCJWUS4M.js → chunk-FYYT5EVH.js} +830 -14
  34. package/dist/assets/cesium/Workers/{chunk-QMEMZIJI.js → chunk-FZDKIUDT.js} +4 -4
  35. package/dist/assets/cesium/Workers/{chunk-XTY7B2N6.js → chunk-G6346EDR.js} +16 -16
  36. package/dist/assets/cesium/Workers/{chunk-CHHNOC2C.js → chunk-H7PSTL64.js} +95 -155
  37. package/dist/assets/cesium/Workers/{chunk-2R5O53JW.js → chunk-I67V66MN.js} +6 -6
  38. package/dist/assets/cesium/Workers/{chunk-JS3AW5BK.js → chunk-IALQGTA2.js} +6 -6
  39. package/dist/assets/cesium/Workers/{chunk-K36FEYS7.js → chunk-KNMGSIIN.js} +16 -12
  40. package/dist/assets/cesium/Workers/{chunk-J3JY6I2C.js → chunk-L4XQPD6P.js} +49 -88
  41. package/dist/assets/cesium/Workers/{chunk-X4SU25DT.js → chunk-LMTN7R7M.js} +10 -12
  42. package/dist/assets/cesium/Workers/{chunk-JB2LWGH4.js → chunk-LUYI3XCB.js} +14 -14
  43. package/dist/assets/cesium/Workers/{chunk-AFFLIKOH.js → chunk-N5MIFVXJ.js} +7 -7
  44. package/dist/assets/cesium/Workers/{chunk-MYZB7C4T.js → chunk-O7OUBDMZ.js} +10 -10
  45. package/dist/assets/cesium/Workers/{chunk-VLGOATD6.js → chunk-P24I5VUS.js} +22 -22
  46. package/dist/assets/cesium/Workers/{chunk-KD4Y7CZL.js → chunk-PIOKSAZH.js} +15 -17
  47. package/dist/assets/cesium/Workers/{chunk-3W63OHNJ.js → chunk-PRKEY4QK.js} +5 -5
  48. package/dist/assets/cesium/Workers/{chunk-O5AMBQ36.js → chunk-Q7PM4W34.js} +8 -8
  49. package/dist/assets/cesium/Workers/{chunk-GLZBE3ML.js → chunk-QLC66ZRL.js} +13 -13
  50. package/dist/assets/cesium/Workers/{chunk-OZJDGN5F.js → chunk-RRLGJV3Q.js} +16 -16
  51. package/dist/assets/cesium/Workers/{chunk-CCFQRR6D.js → chunk-S2UEXF6T.js} +1 -1
  52. package/dist/assets/cesium/Workers/{chunk-QIKODV5G.js → chunk-S4VTLNAJ.js} +4 -4
  53. package/dist/assets/cesium/Workers/{chunk-EW2GWJYB.js → chunk-SJC5PRDX.js} +2 -2
  54. package/dist/assets/cesium/Workers/{chunk-KTJSNCK4.js → chunk-T6TZXGG5.js} +230 -20
  55. package/dist/assets/cesium/Workers/{chunk-RW6LU2CJ.js → chunk-TLGODPEV.js} +5 -5
  56. package/dist/assets/cesium/Workers/{chunk-CTELOFLA.js → chunk-UC566ISB.js} +6 -6
  57. package/dist/assets/cesium/Workers/{chunk-ZFOBYDGF.js → chunk-UMX265HW.js} +2 -2
  58. package/dist/assets/cesium/Workers/{chunk-Z24VKNDO.js → chunk-V7WJDCPA.js} +12 -12
  59. package/dist/assets/cesium/Workers/{chunk-4MFFIWUA.js → chunk-VD6G7UPU.js} +2 -2
  60. package/dist/assets/cesium/Workers/{chunk-XY7MGBKC.js → chunk-WMVCLETM.js} +14 -16
  61. package/dist/assets/cesium/Workers/{chunk-IPA4EACJ.js → chunk-WOA6WSHH.js} +12 -12
  62. package/dist/assets/cesium/Workers/{chunk-PFQBCKBM.js → chunk-X67EJ6X6.js} +4398 -2722
  63. package/dist/assets/cesium/Workers/{chunk-V3NGATMV.js → chunk-XGI4FRXF.js} +11 -13
  64. package/dist/assets/cesium/Workers/{chunk-AHKEZ2OE.js → chunk-YFVI4SQI.js} +1 -1
  65. package/dist/assets/cesium/Workers/{chunk-HARLBUOL.js → chunk-YFYPR4MW.js} +11 -8
  66. package/dist/assets/cesium/Workers/combineGeometry.js +22 -23
  67. package/dist/assets/cesium/Workers/createBoxGeometry.js +16 -17
  68. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +14 -15
  69. package/dist/assets/cesium/Workers/createCircleGeometry.js +29 -26
  70. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +17 -18
  71. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +35 -36
  72. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +29 -30
  73. package/dist/assets/cesium/Workers/createCorridorGeometry.js +29 -30
  74. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +27 -28
  75. package/dist/assets/cesium/Workers/createCylinderGeometry.js +18 -19
  76. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +17 -19
  77. package/dist/assets/cesium/Workers/createEllipseGeometry.js +24 -25
  78. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +17 -18
  79. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +17 -18
  80. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +16 -17
  81. package/dist/assets/cesium/Workers/createFrustumGeometry.js +16 -17
  82. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +18 -18
  83. package/dist/assets/cesium/Workers/createGeometry.js +52 -33
  84. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +28 -29
  85. package/dist/assets/cesium/Workers/createPlaneGeometry.js +14 -15
  86. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +13 -14
  87. package/dist/assets/cesium/Workers/createPolygonGeometry.js +451 -176
  88. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +29 -30
  89. package/dist/assets/cesium/Workers/createPolylineGeometry.js +24 -25
  90. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +31 -33
  91. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +27 -29
  92. package/dist/assets/cesium/Workers/createRectangleGeometry.js +30 -31
  93. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +21 -24
  94. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +22 -23
  95. package/dist/assets/cesium/Workers/createSphereGeometry.js +17 -18
  96. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +16 -17
  97. package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +3 -3
  98. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +14 -16
  99. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +22 -23
  100. package/dist/assets/cesium/Workers/createVectorTilePoints.js +12 -12
  101. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +20 -21
  102. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +14 -16
  103. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +24 -25
  104. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +25 -26
  105. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -21
  106. package/dist/assets/cesium/Workers/createWallGeometry.js +23 -24
  107. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +22 -23
  108. package/dist/assets/cesium/Workers/decodeDraco.js +11 -11
  109. package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +12 -19
  110. package/dist/assets/cesium/Workers/decodeI3S.js +600 -92
  111. package/dist/assets/cesium/Workers/transcodeKTX2.js +46 -82
  112. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
  113. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +21 -22
  114. package/dist/assets/{cesium.7b7975.js → cesium.0b750d.js} +150319 -144832
  115. package/dist/assets/cesium.js +1 -1
  116. package/dist/assets/{core.2823d9.js → core.cbf44a.js} +2810 -2749
  117. package/dist/assets/core.js +1 -1
  118. package/dist/assets/index-8eGauqjA.js +1 -0
  119. package/dist/assets/{ol.f4bb15.js → ol.86e93c.js} +19259 -19196
  120. package/dist/assets/ol.js +1 -1
  121. package/dist/assets/ui.7c276c.css +1 -0
  122. package/dist/assets/ui.7c276c.js +35158 -0
  123. package/dist/assets/ui.js +1 -1
  124. package/dist/assets/vue.a3cd64.js +6096 -0
  125. package/dist/assets/vue.js +1 -5
  126. package/dist/assets/vuetify.4d18fe.css +5 -0
  127. package/dist/assets/vuetify.4d18fe.js +24605 -0
  128. package/dist/assets/vuetify.js +1 -5
  129. package/dist/index.html +1 -2
  130. package/index.d.ts +27 -9
  131. package/index.js +12 -29
  132. package/lib/vue.js +0 -1
  133. package/lib/vuetify.js +1 -2
  134. package/lib/vuetifyLib.js +6 -0
  135. package/package.json +29 -19
  136. package/plugins/@vcmap-show-case/buttons-example/package.json +2 -2
  137. package/plugins/@vcmap-show-case/buttons-example/src/ButtonsExample.vue +57 -61
  138. package/plugins/@vcmap-show-case/buttons-example/src/index.js +1 -1
  139. package/plugins/@vcmap-show-case/category-tester/package.json +2 -2
  140. package/plugins/@vcmap-show-case/category-tester/src/CategoriesExample.vue +12 -6
  141. package/plugins/@vcmap-show-case/category-tester/src/CollectionComponentOptions.vue +4 -4
  142. package/plugins/@vcmap-show-case/category-tester/src/FoobarEditor.vue +4 -4
  143. package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +11 -7
  144. package/plugins/@vcmap-show-case/config-editor/src/ConfigEditor.vue +2 -2
  145. package/plugins/@vcmap-show-case/extent-example/README.md +1 -1
  146. package/plugins/@vcmap-show-case/extent-example/src/index.js +11 -20
  147. package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +3 -3
  148. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +122 -169
  149. package/plugins/@vcmap-show-case/form-inputs-example/src/index.js +7 -8
  150. package/plugins/@vcmap-show-case/hello-world/src/helloWorld.vue +1 -1
  151. package/plugins/@vcmap-show-case/icons-example/src/AllIconsComponent.vue +1 -1
  152. package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +47 -80
  153. package/plugins/@vcmap-show-case/notifier-tester/src/NotifierTester.vue +4 -6
  154. package/plugins/@vcmap-show-case/panel-tester/src/PanelExample.vue +3 -4
  155. package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +3 -7
  156. package/plugins/@vcmap-show-case/project-selector/src/ProjectSelectorComponent.vue +10 -16
  157. package/plugins/@vcmap-show-case/search-example/package.json +5 -0
  158. package/plugins/@vcmap-show-case/search-example/src/index.js +75 -0
  159. package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +99 -0
  160. package/plugins/@vcmap-show-case/simple-graph/src/SimpleGraphComponent.vue +1 -1
  161. package/plugins/@vcmap-show-case/style-input-example/src/StyleExample.vue +1 -1
  162. package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +32 -16
  163. package/plugins/@vcmap-show-case/textfields-example/src/TextfieldsExample.vue +7 -1
  164. package/plugins/@vcmap-show-case/theme-changer/src/ThemeChangerComponent.vue +3 -3
  165. package/plugins/@vcmap-show-case/theme-changer/src/index.js +2 -2
  166. package/plugins/@vcmap-show-case/toolbox-example/src/TriStateExampleWindow.vue +1 -1
  167. package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +36 -11
  168. package/plugins/@vcmap-show-case/viewpoint-component-example/src/ViewpointExample.vue +4 -4
  169. package/plugins/@vcmap-show-case/window-tester/src/BrokenWindow.vue +17 -0
  170. package/plugins/@vcmap-show-case/window-tester/src/EmptyComponent.vue +1 -1
  171. package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +10 -0
  172. package/plugins/@vcmap-show-case/window-tester/src/WindowExampleContent.vue +1 -1
  173. package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +1 -1
  174. package/plugins/@vcmap-show-case/wizard-example/src/WizardExample.vue +40 -54
  175. package/src/actions/StyleSelector.vue +4 -34
  176. package/src/actions/StyleSelector.vue.d.ts +6 -4
  177. package/src/actions/actionHelper.js +6 -6
  178. package/src/actions/extentActions.d.ts +1 -2
  179. package/src/actions/extentActions.js +19 -8
  180. package/src/actions/flightActions.js +8 -8
  181. package/src/actions/listActions.d.ts +2 -2
  182. package/src/actions/listActions.js +3 -3
  183. package/src/actions/stateRefAction.js +3 -3
  184. package/src/application/VcsApp.vue +20 -30
  185. package/src/application/VcsApp.vue.d.ts +6 -6
  186. package/src/application/VcsAppWrapper.vue +1 -1
  187. package/src/application/VcsAppWrapper.vue.d.ts +2 -2
  188. package/src/application/VcsAttributions.vue +14 -18
  189. package/src/application/VcsAttributions.vue.d.ts +7 -7
  190. package/src/application/VcsAttributionsFooter.vue +1 -1
  191. package/src/application/VcsAttributionsFooter.vue.d.ts +2 -2
  192. package/src/application/VcsContainer.vue +13 -7
  193. package/src/application/VcsContainer.vue.d.ts +3 -2
  194. package/src/application/VcsCustomScreen.vue +5 -5
  195. package/src/application/VcsCustomScreen.vue.d.ts +3 -3
  196. package/src/application/VcsMainMap.vue +4 -1
  197. package/src/application/VcsMainMap.vue.d.ts +1 -1
  198. package/src/application/VcsMap.vue +21 -23
  199. package/src/application/VcsMap.vue.d.ts +2 -2
  200. package/src/application/VcsNavbar.vue +60 -56
  201. package/src/application/VcsNavbar.vue.d.ts +11 -8
  202. package/src/application/VcsPositionDisplay.vue +33 -46
  203. package/src/application/VcsPositionDisplay.vue.d.ts +3 -3
  204. package/src/application/VcsSettings.vue +19 -7
  205. package/src/application/VcsSettings.vue.d.ts +2 -1
  206. package/src/application/VcsSplashScreen.vue +19 -23
  207. package/src/application/VcsSplashScreen.vue.d.ts +7 -7
  208. package/src/application/VcsTextPage.vue +5 -5
  209. package/src/application/VcsTextPage.vue.d.ts +5 -5
  210. package/src/application/VcsTextPageFooter.vue +4 -4
  211. package/src/application/VcsTextPageFooter.vue.d.ts +2 -2
  212. package/src/application/attributionsHelper.d.ts +2 -2
  213. package/src/application/attributionsHelper.js +9 -9
  214. package/src/application/markdownHelper.js +2 -17
  215. package/src/components/ImageElementInjector.vue.d.ts +2 -2
  216. package/src/components/attrsHelpers.d.ts +5 -0
  217. package/src/components/attrsHelpers.js +14 -0
  218. package/src/components/buttons/VcsActionButtonList.vue +6 -23
  219. package/src/components/buttons/VcsActionButtonList.vue.d.ts +3 -12
  220. package/src/components/buttons/VcsButton.vue +79 -90
  221. package/src/components/buttons/VcsButton.vue.d.ts +19 -34
  222. package/src/components/buttons/VcsFormButton.vue +77 -125
  223. package/src/components/buttons/VcsFormButton.vue.d.ts +10 -43
  224. package/src/components/buttons/VcsToolButton.vue +91 -94
  225. package/src/components/buttons/VcsToolButton.vue.d.ts +21 -28
  226. package/src/components/composables.d.ts +21 -0
  227. package/src/components/composables.js +65 -0
  228. package/src/components/{form-inputs-controls → extent}/VcsExtent.vue +22 -18
  229. package/src/components/{form-inputs-controls → extent}/VcsExtent.vue.d.ts +10 -7
  230. package/src/components/extent/VcsExtentEditor.vue +79 -0
  231. package/src/components/extent/VcsExtentEditor.vue.d.ts +37 -0
  232. package/src/components/flight/VcsFlightAnchorsComponent.vue +7 -2
  233. package/src/components/flight/VcsFlightAnchorsComponent.vue.d.ts +6 -6
  234. package/src/components/flight/VcsFlightComponent.vue +2 -1
  235. package/src/components/flight/VcsFlightComponent.vue.d.ts +4 -4
  236. package/src/components/flight/VcsFlightEditor.vue.d.ts +2 -2
  237. package/src/components/flight/VcsFlightPlayer.vue +2 -3
  238. package/src/components/flight/VcsFlightPlayer.vue.d.ts +3 -3
  239. package/src/components/form-inputs-controls/VcsCheckbox.vue +62 -82
  240. package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +14 -4
  241. package/src/components/form-inputs-controls/VcsChipArrayInput.vue +128 -117
  242. package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +17 -21
  243. package/src/components/form-inputs-controls/VcsCoordinate.vue +31 -41
  244. package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +10 -11
  245. package/src/components/form-inputs-controls/VcsDatePicker.vue +39 -72
  246. package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +75 -13
  247. package/src/components/form-inputs-controls/VcsFileInput.vue +100 -0
  248. package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +27 -0
  249. package/src/components/form-inputs-controls/VcsFormSection.vue +12 -12
  250. package/src/components/form-inputs-controls/VcsFormSection.vue.d.ts +7 -5
  251. package/src/components/form-inputs-controls/VcsLabel.vue +38 -28
  252. package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +22 -11
  253. package/src/components/form-inputs-controls/VcsRadio.vue +80 -104
  254. package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +35 -9
  255. package/src/components/form-inputs-controls/VcsSelect.vue +166 -156
  256. package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +36 -9
  257. package/src/components/form-inputs-controls/VcsSlider.vue +97 -52
  258. package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +29 -1
  259. package/src/components/form-inputs-controls/VcsTextArea.vue +141 -144
  260. package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +13 -10
  261. package/src/components/form-inputs-controls/VcsTextField.vue +100 -278
  262. package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +34 -32
  263. package/src/components/form-inputs-controls/VcsWizard.vue +88 -117
  264. package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +3 -13
  265. package/src/components/form-inputs-controls/VcsWizardStep.vue +77 -59
  266. package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +26 -13
  267. package/src/components/form-inputs-controls/vcsTextField.scss +83 -0
  268. package/src/components/form-output/VcsFormattedNumber.vue +42 -33
  269. package/src/components/form-output/VcsFormattedNumber.vue.d.ts +21 -20
  270. package/src/components/form-output/VcsMarkdown.vue +53 -0
  271. package/src/components/form-output/VcsMarkdown.vue.d.ts +16 -0
  272. package/src/components/icons/+all.js +1 -1
  273. package/src/components/icons/2DAreaIcon.vue +1 -7
  274. package/src/components/icons/2DAreaIcon.vue.d.ts +1 -1
  275. package/src/components/icons/2DDistanceIcon.vue +1 -7
  276. package/src/components/icons/2DDistanceIcon.vue.d.ts +1 -1
  277. package/src/components/icons/2DHeightObliqueIcon.vue.d.ts +1 -1
  278. package/src/components/icons/2DPointIcon.vue +0 -1
  279. package/src/components/icons/2DPointIcon.vue.d.ts +1 -1
  280. package/src/components/icons/3DAreaIcon.vue +1 -7
  281. package/src/components/icons/3DAreaIcon.vue.d.ts +1 -1
  282. package/src/components/icons/3DDistanceIcon.vue +1 -7
  283. package/src/components/icons/3DDistanceIcon.vue.d.ts +1 -1
  284. package/src/components/icons/3DHeightIcon.vue +1 -7
  285. package/src/components/icons/3DHeightIcon.vue.d.ts +1 -1
  286. package/src/components/icons/3DPointIcon.vue +0 -1
  287. package/src/components/icons/3DPointIcon.vue.d.ts +1 -1
  288. package/src/components/icons/AngleIcon.vue +1 -6
  289. package/src/components/icons/AngleIcon.vue.d.ts +1 -1
  290. package/src/components/icons/AssociationsIcon.vue +1 -6
  291. package/src/components/icons/AssociationsIcon.vue.d.ts +1 -1
  292. package/src/components/icons/AxisIcon.vue.d.ts +1 -1
  293. package/src/components/icons/BoundingBoxIcon.vue +1 -6
  294. package/src/components/icons/BoundingBoxIcon.vue.d.ts +1 -1
  295. package/src/components/icons/CheckboxCheckedIcon.vue.d.ts +1 -1
  296. package/src/components/icons/CheckboxIcon.vue +1 -6
  297. package/src/components/icons/CheckboxIcon.vue.d.ts +1 -1
  298. package/src/components/icons/CheckboxIndeterminateIcon.vue.d.ts +1 -1
  299. package/src/components/icons/CircleIcon.vue +1 -6
  300. package/src/components/icons/CircleIcon.vue.d.ts +1 -1
  301. package/src/components/icons/ClippingHorizontalIcon.vue +1 -6
  302. package/src/components/icons/ClippingHorizontalIcon.vue.d.ts +1 -1
  303. package/src/components/icons/ClippingIcon.vue +1 -6
  304. package/src/components/icons/ClippingIcon.vue.d.ts +1 -1
  305. package/src/components/icons/ClippingVerticalIcon.vue +1 -6
  306. package/src/components/icons/ClippingVerticalIcon.vue.d.ts +1 -1
  307. package/src/components/icons/ColorPickerIcon.vue +1 -6
  308. package/src/components/icons/ColorPickerIcon.vue.d.ts +1 -1
  309. package/src/components/icons/ColorSwatchIcon.vue +1 -7
  310. package/src/components/icons/ColorSwatchIcon.vue.d.ts +1 -1
  311. package/src/components/icons/CommentIcon.vue +1 -6
  312. package/src/components/icons/CommentIcon.vue.d.ts +1 -1
  313. package/src/components/icons/CompassIcon.vue +1 -13
  314. package/src/components/icons/CompassIcon.vue.d.ts +1 -1
  315. package/src/components/icons/ComponentsIcon.vue +1 -6
  316. package/src/components/icons/ComponentsIcon.vue.d.ts +1 -1
  317. package/src/components/icons/ComponentsPlusIcon.vue +0 -1
  318. package/src/components/icons/ComponentsPlusIcon.vue.d.ts +1 -1
  319. package/src/components/icons/ConeIcon.vue +1 -13
  320. package/src/components/icons/ConeIcon.vue.d.ts +1 -1
  321. package/src/components/icons/CrosshairIcon.vue +0 -2
  322. package/src/components/icons/CrosshairIcon.vue.d.ts +1 -1
  323. package/src/components/icons/DimensionsHouseIcon.vue +1 -7
  324. package/src/components/icons/DimensionsHouseIcon.vue.d.ts +1 -1
  325. package/src/components/icons/EditIcon.vue +1 -6
  326. package/src/components/icons/EditIcon.vue.d.ts +1 -1
  327. package/src/components/icons/EditVerticesIcon.vue +1 -6
  328. package/src/components/icons/EditVerticesIcon.vue.d.ts +1 -1
  329. package/src/components/icons/ElevationProfileIcon.vue +1 -6
  330. package/src/components/icons/ElevationProfileIcon.vue.d.ts +1 -1
  331. package/src/components/icons/ExportAreaIcon.vue +1 -6
  332. package/src/components/icons/ExportAreaIcon.vue.d.ts +1 -1
  333. package/src/components/icons/ExportFlightIcon.vue +1 -6
  334. package/src/components/icons/ExportFlightIcon.vue.d.ts +1 -1
  335. package/src/components/icons/ExportIcon.vue +1 -13
  336. package/src/components/icons/ExportIcon.vue.d.ts +1 -1
  337. package/src/components/icons/ExternalLinkIcon.vue +1 -6
  338. package/src/components/icons/ExternalLinkIcon.vue.d.ts +1 -1
  339. package/src/components/icons/EyeIcon.vue +1 -6
  340. package/src/components/icons/EyeIcon.vue.d.ts +1 -1
  341. package/src/components/icons/FastForwardIcon.vue +1 -6
  342. package/src/components/icons/FastForwardIcon.vue.d.ts +1 -1
  343. package/src/components/icons/FilterIcon.vue +1 -7
  344. package/src/components/icons/FilterIcon.vue.d.ts +1 -1
  345. package/src/components/icons/GlobalTerrainIcon.vue +1 -6
  346. package/src/components/icons/GlobalTerrainIcon.vue.d.ts +1 -1
  347. package/src/components/icons/GlobeNatureIcon.vue +1 -6
  348. package/src/components/icons/GlobeNatureIcon.vue.d.ts +1 -1
  349. package/src/components/icons/GroundIcon.vue +1 -6
  350. package/src/components/icons/GroundIcon.vue.d.ts +1 -1
  351. package/src/components/icons/HealthCareIndustriesIcon.vue +1 -6
  352. package/src/components/icons/HealthCareIndustriesIcon.vue.d.ts +1 -1
  353. package/src/components/icons/HelpIcon.vue +1 -6
  354. package/src/components/icons/HelpIcon.vue.d.ts +1 -1
  355. package/src/components/icons/HideIcon.vue +1 -6
  356. package/src/components/icons/HideIcon.vue.d.ts +1 -1
  357. package/src/components/icons/HomePointIcon.vue +1 -6
  358. package/src/components/icons/HomePointIcon.vue.d.ts +1 -1
  359. package/src/components/icons/HospitalsIcon.vue +1 -6
  360. package/src/components/icons/HospitalsIcon.vue.d.ts +1 -1
  361. package/src/components/icons/HouseIcon.vue +1 -6
  362. package/src/components/icons/HouseIcon.vue.d.ts +1 -1
  363. package/src/components/icons/ImportIcon.vue +1 -7
  364. package/src/components/icons/ImportIcon.vue.d.ts +1 -1
  365. package/src/components/icons/InfoIcon.vue +1 -6
  366. package/src/components/icons/InfoIcon.vue.d.ts +1 -1
  367. package/src/components/icons/KebabIcon.vue +1 -7
  368. package/src/components/icons/KebabIcon.vue.d.ts +1 -1
  369. package/src/components/icons/LabelIcon.vue +1 -13
  370. package/src/components/icons/LabelIcon.vue.d.ts +1 -1
  371. package/src/components/icons/LayersIcon.vue +1 -7
  372. package/src/components/icons/LayersIcon.vue.d.ts +1 -1
  373. package/src/components/icons/LegendIcon.vue +1 -6
  374. package/src/components/icons/LegendIcon.vue.d.ts +1 -1
  375. package/src/components/icons/LineIcon.vue +1 -13
  376. package/src/components/icons/LineIcon.vue.d.ts +1 -1
  377. package/src/components/icons/LinkIcon.vue +1 -6
  378. package/src/components/icons/LinkIcon.vue.d.ts +1 -1
  379. package/src/components/icons/LogoutIcon.vue +1 -6
  380. package/src/components/icons/LogoutIcon.vue.d.ts +1 -1
  381. package/src/components/icons/MapIcon.vue +1 -7
  382. package/src/components/icons/MapIcon.vue.d.ts +1 -1
  383. package/src/components/icons/MenuIcon.vue +1 -7
  384. package/src/components/icons/MenuIcon.vue.d.ts +1 -1
  385. package/src/components/icons/MinusIcon.vue +1 -7
  386. package/src/components/icons/MinusIcon.vue.d.ts +1 -1
  387. package/src/components/icons/MultiViewIcon.vue +1 -7
  388. package/src/components/icons/MultiViewIcon.vue.d.ts +1 -1
  389. package/src/components/icons/ObjectAttributeIcon.vue +1 -7
  390. package/src/components/icons/ObjectAttributeIcon.vue.d.ts +1 -1
  391. package/src/components/icons/ObjectSelectIcon.vue +1 -7
  392. package/src/components/icons/ObjectSelectIcon.vue.d.ts +1 -1
  393. package/src/components/icons/ObliqueViewIcon.vue +1 -7
  394. package/src/components/icons/ObliqueViewIcon.vue.d.ts +1 -1
  395. package/src/components/icons/PdfIcon.vue +1 -7
  396. package/src/components/icons/PdfIcon.vue.d.ts +1 -1
  397. package/src/components/icons/PedestrianIcon.vue +1 -6
  398. package/src/components/icons/PedestrianIcon.vue.d.ts +1 -1
  399. package/src/components/icons/PenIcon.vue +1 -6
  400. package/src/components/icons/PenIcon.vue.d.ts +1 -1
  401. package/src/components/icons/PlayCircleIcon.vue +1 -6
  402. package/src/components/icons/PlayCircleIcon.vue.d.ts +1 -1
  403. package/src/components/icons/PlusIcon.vue +1 -7
  404. package/src/components/icons/PlusIcon.vue.d.ts +1 -1
  405. package/src/components/icons/PoiIcon.vue +1 -6
  406. package/src/components/icons/PoiIcon.vue.d.ts +1 -1
  407. package/src/components/icons/PointIcon.vue +1 -7
  408. package/src/components/icons/PointIcon.vue.d.ts +1 -1
  409. package/src/components/icons/PointMeasurementIcon.vue.d.ts +1 -1
  410. package/src/components/icons/PointSelectIcon.vue +1 -6
  411. package/src/components/icons/PointSelectIcon.vue.d.ts +1 -1
  412. package/src/components/icons/PresentationModeIcon.vue +1 -6
  413. package/src/components/icons/PresentationModeIcon.vue.d.ts +1 -1
  414. package/src/components/icons/ProgressIcon.vue +0 -1
  415. package/src/components/icons/ProgressIcon.vue.d.ts +1 -1
  416. package/src/components/icons/QueryIcon.vue +1 -6
  417. package/src/components/icons/QueryIcon.vue.d.ts +1 -1
  418. package/src/components/icons/RectangleIcon.vue +1 -13
  419. package/src/components/icons/RectangleIcon.vue.d.ts +1 -1
  420. package/src/components/icons/ReturnIcon.vue +1 -6
  421. package/src/components/icons/ReturnIcon.vue.d.ts +1 -1
  422. package/src/components/icons/RewindIcon.vue +1 -6
  423. package/src/components/icons/RewindIcon.vue.d.ts +1 -1
  424. package/src/components/icons/RotateLeftIcon.vue +1 -6
  425. package/src/components/icons/RotateLeftIcon.vue.d.ts +1 -1
  426. package/src/components/icons/RotateRightIcon.vue +1 -6
  427. package/src/components/icons/RotateRightIcon.vue.d.ts +1 -1
  428. package/src/components/icons/ScreenshotIcon.vue +1 -6
  429. package/src/components/icons/ScreenshotIcon.vue.d.ts +1 -1
  430. package/src/components/icons/SearchIcon.vue +1 -6
  431. package/src/components/icons/SearchIcon.vue.d.ts +1 -1
  432. package/src/components/icons/ShadowIcon.vue +1 -7
  433. package/src/components/icons/ShadowIcon.vue.d.ts +1 -1
  434. package/src/components/icons/ShapesIcon.vue +1 -6
  435. package/src/components/icons/ShapesIcon.vue.d.ts +1 -1
  436. package/src/components/icons/ShareIcon.vue +1 -6
  437. package/src/components/icons/ShareIcon.vue.d.ts +1 -1
  438. package/src/components/icons/SimpleCircleFilledIcon.vue +1 -6
  439. package/src/components/icons/SimpleCircleFilledIcon.vue.d.ts +1 -1
  440. package/src/components/icons/SimpleCircleHalfFilledIcon.vue +1 -6
  441. package/src/components/icons/SimpleCircleHalfFilledIcon.vue.d.ts +1 -1
  442. package/src/components/icons/SimpleCircleOutlinedIcon.vue +1 -6
  443. package/src/components/icons/SimpleCircleOutlinedIcon.vue.d.ts +1 -1
  444. package/src/components/icons/SkipNextIcon.vue +1 -6
  445. package/src/components/icons/SkipNextIcon.vue.d.ts +1 -1
  446. package/src/components/icons/SkipPreviousIcon.vue +1 -6
  447. package/src/components/icons/SkipPreviousIcon.vue.d.ts +1 -1
  448. package/src/components/icons/SplitViewIcon.vue +1 -6
  449. package/src/components/icons/SplitViewIcon.vue.d.ts +1 -1
  450. package/src/components/icons/TerrainBoxIcon.vue +1 -6
  451. package/src/components/icons/TerrainBoxIcon.vue.d.ts +1 -1
  452. package/src/components/icons/TextStyleIcon.vue +1 -7
  453. package/src/components/icons/TextStyleIcon.vue.d.ts +1 -1
  454. package/src/components/icons/ThreeDimensionsIcon.vue +1 -6
  455. package/src/components/icons/ThreeDimensionsIcon.vue.d.ts +1 -1
  456. package/src/components/icons/ToolsIcon.vue +1 -7
  457. package/src/components/icons/ToolsIcon.vue.d.ts +1 -1
  458. package/src/components/icons/TouchIcon.vue +1 -7
  459. package/src/components/icons/TouchIcon.vue.d.ts +1 -1
  460. package/src/components/icons/TransparentTerrainIcon.vue +0 -1
  461. package/src/components/icons/TransparentTerrainIcon.vue.d.ts +1 -1
  462. package/src/components/icons/TrashCanIcon.vue +1 -7
  463. package/src/components/icons/TrashCanIcon.vue.d.ts +1 -1
  464. package/src/components/icons/TriangleIcon.vue +1 -6
  465. package/src/components/icons/TriangleIcon.vue.d.ts +1 -1
  466. package/src/components/icons/TwoDimensionsIcon.vue +1 -7
  467. package/src/components/icons/TwoDimensionsIcon.vue.d.ts +1 -1
  468. package/src/components/icons/UploadIcon.vue +1 -6
  469. package/src/components/icons/UploadIcon.vue.d.ts +1 -1
  470. package/src/components/icons/UserProfileIcon.vue +1 -7
  471. package/src/components/icons/UserProfileIcon.vue.d.ts +1 -1
  472. package/src/components/icons/UserShareIcon.vue +1 -6
  473. package/src/components/icons/UserShareIcon.vue.d.ts +1 -1
  474. package/src/components/icons/VideoRecorderIcon.vue +1 -6
  475. package/src/components/icons/VideoRecorderIcon.vue.d.ts +1 -1
  476. package/src/components/icons/ViewpointFlightIcon.vue +1 -6
  477. package/src/components/icons/ViewpointFlightIcon.vue.d.ts +1 -1
  478. package/src/components/icons/ViewpointIcon.vue +1 -6
  479. package/src/components/icons/ViewpointIcon.vue.d.ts +1 -1
  480. package/src/components/icons/Viewshed360Icon.vue +1 -7
  481. package/src/components/icons/Viewshed360Icon.vue.d.ts +1 -1
  482. package/src/components/icons/ViewshedConeIcon.vue +1 -7
  483. package/src/components/icons/ViewshedConeIcon.vue.d.ts +1 -1
  484. package/src/components/icons/ViewshedIcon.vue +1 -7
  485. package/src/components/icons/ViewshedIcon.vue.d.ts +1 -1
  486. package/src/components/icons/WalkingIcon.vue +1 -6
  487. package/src/components/icons/WalkingIcon.vue.d.ts +1 -1
  488. package/src/components/icons/WallIcon.vue +1 -6
  489. package/src/components/icons/WallIcon.vue.d.ts +1 -1
  490. package/src/components/icons/WandIcon.vue +1 -6
  491. package/src/components/icons/WandIcon.vue.d.ts +1 -1
  492. package/src/components/import/{FileDrop.vue → VcsFileDrop.vue} +21 -10
  493. package/src/components/import/VcsFileDrop.vue.d.ts +37 -0
  494. package/src/components/import/{ImportComponent.vue → VcsImportComponent.vue} +24 -12
  495. package/src/components/import/{ImportComponent.vue.d.ts → VcsImportComponent.vue.d.ts} +6 -3
  496. package/src/components/lists/VcsActionList.vue +41 -37
  497. package/src/components/lists/VcsActionList.vue.d.ts +5 -3
  498. package/src/components/lists/VcsList.vue +138 -200
  499. package/src/components/lists/VcsList.vue.d.ts +24 -27
  500. package/src/components/lists/VcsListItem.vue +154 -0
  501. package/src/components/lists/VcsListItem.vue.d.ts +21 -0
  502. package/src/components/lists/VcsTreeview.vue +56 -43
  503. package/src/components/lists/VcsTreeview.vue.d.ts +3 -5
  504. package/src/components/lists/VcsTreeviewLeaf.vue +76 -75
  505. package/src/components/lists/VcsTreeviewLeaf.vue.d.ts +5 -17
  506. package/src/components/lists/VcsTreeviewSearchbar.vue +39 -83
  507. package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +2 -20
  508. package/src/components/modelHelper.d.ts +36 -0
  509. package/src/components/modelHelper.js +128 -0
  510. package/src/components/notification/VcsBadge.vue +8 -6
  511. package/src/components/notification/VcsBadge.vue.d.ts +2 -2
  512. package/src/components/notification/VcsHelp.vue +19 -14
  513. package/src/components/notification/VcsHelp.vue.d.ts +2 -2
  514. package/src/components/notification/VcsTooltip.vue +4 -8
  515. package/src/components/notification/VcsTooltip.vue.d.ts +3 -3
  516. package/src/components/plugins/AbstractConfigEditor.vue +5 -5
  517. package/src/components/plugins/AbstractConfigEditor.vue.d.ts +2 -2
  518. package/src/components/style/MenuWrapper.vue +10 -11
  519. package/src/components/style/MenuWrapper.vue.d.ts +5 -5
  520. package/src/components/style/VcsFeatureStyleComponent.vue +1 -1
  521. package/src/components/style/VcsFeatureStyleComponent.vue.d.ts +7 -7
  522. package/src/components/style/VcsFillMenu.vue +5 -6
  523. package/src/components/style/VcsFillMenu.vue.d.ts +5 -5
  524. package/src/components/style/VcsFillSelector.vue +6 -7
  525. package/src/components/style/VcsFillSelector.vue.d.ts +5 -5
  526. package/src/components/style/VcsImageMenu.vue +13 -9
  527. package/src/components/style/VcsImageMenu.vue.d.ts +5 -5
  528. package/src/components/style/VcsImageSelector.vue +36 -32
  529. package/src/components/style/VcsImageSelector.vue.d.ts +11 -11
  530. package/src/components/style/VcsStrokeMenu.vue +6 -7
  531. package/src/components/style/VcsStrokeMenu.vue.d.ts +5 -5
  532. package/src/components/style/VcsStrokeSelector.vue +19 -13
  533. package/src/components/style/VcsStrokeSelector.vue.d.ts +5 -5
  534. package/src/components/style/VcsTextMenu.vue +9 -8
  535. package/src/components/style/VcsTextMenu.vue.d.ts +5 -5
  536. package/src/components/style/VcsTextSelector.vue +14 -11
  537. package/src/components/style/VcsTextSelector.vue.d.ts +10 -10
  538. package/src/components/style/VcsVectorStyleComponent.vue +4 -4
  539. package/src/components/style/VcsVectorStyleComponent.vue.d.ts +8 -8
  540. package/src/components/style/composables.js +4 -1
  541. package/src/components/tables/VcsDataTable.vue +152 -207
  542. package/src/components/tables/VcsDataTable.vue.d.ts +10 -36
  543. package/src/components/tables/VcsTable.vue +13 -18
  544. package/src/components/tables/VcsTable.vue.d.ts +4 -4
  545. package/src/components/vector-properties/VcsFeatureEditingWindow.vue +15 -7
  546. package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +7 -7
  547. package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -1
  548. package/src/components/vector-properties/VcsFeatureTransforms.vue.d.ts +2 -2
  549. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +476 -580
  550. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +199 -28
  551. package/src/components/viewpoint/VcsViewpointComponent.vue +56 -104
  552. package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +14 -22
  553. package/src/components/viewpoint/VcsViewpointEditor.vue +2 -5
  554. package/src/components/viewpoint/VcsViewpointEditor.vue.d.ts +3 -3
  555. package/src/contentTree/LayerTree.vue +31 -10
  556. package/src/contentTree/LayerTree.vue.d.ts +3 -3
  557. package/src/contentTree/contentTreeCollection.d.ts +2 -2
  558. package/src/contentTree/contentTreeCollection.js +6 -8
  559. package/src/contentTree/contentTreeItem.d.ts +11 -11
  560. package/src/contentTree/contentTreeItem.js +8 -7
  561. package/src/contentTree/flightContentTreeItem.js +5 -4
  562. package/src/contentTree/viewpointContentTreeItem.d.ts +1 -1
  563. package/src/featureInfo/AddressBalloonComponent.vue +24 -26
  564. package/src/featureInfo/AddressBalloonComponent.vue.d.ts +1 -1
  565. package/src/featureInfo/BalloonComponent.vue +21 -29
  566. package/src/featureInfo/BalloonComponent.vue.d.ts +2 -2
  567. package/src/featureInfo/IframeComponent.vue.d.ts +2 -2
  568. package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
  569. package/src/featureInfo/MarkdownComponent.vue +16 -0
  570. package/src/featureInfo/MarkdownComponent.vue.d.ts +7 -0
  571. package/src/featureInfo/abstractFeatureInfoView.d.ts +5 -5
  572. package/src/featureInfo/abstractFeatureInfoView.js +2 -2
  573. package/src/featureInfo/balloonFeatureInfoView.d.ts +2 -2
  574. package/src/featureInfo/balloonFeatureInfoView.js +1 -1
  575. package/src/featureInfo/featureInfo.js +2 -2
  576. package/src/featureInfo/markdownFeatureInfoView.js +1 -15
  577. package/src/i18n/de.d.ts +105 -0
  578. package/src/i18n/de.js +14 -5
  579. package/src/i18n/en.d.ts +105 -0
  580. package/src/i18n/en.js +14 -5
  581. package/src/init.js +10 -12
  582. package/src/legend/StyleLegendItem.vue +32 -28
  583. package/src/legend/StyleLegendItem.vue.d.ts +3 -2
  584. package/src/legend/VcsLegend.vue +19 -20
  585. package/src/legend/VcsLegend.vue.d.ts +8 -6
  586. package/src/legend/legendHelper.d.ts +2 -2
  587. package/src/legend/legendHelper.js +9 -8
  588. package/src/manager/buttonManager.d.ts +2 -2
  589. package/src/manager/buttonManager.js +6 -4
  590. package/src/manager/collectionManager/CollectionComponent.vue +30 -26
  591. package/src/manager/collectionManager/CollectionComponent.vue.d.ts +14 -2
  592. package/src/manager/collectionManager/CollectionComponentContent.vue +9 -11
  593. package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +1 -1
  594. package/src/manager/collectionManager/CollectionComponentList.vue +3 -3
  595. package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +2 -2
  596. package/src/manager/collectionManager/CollectionComponentProvider.vue +1 -1
  597. package/src/manager/collectionManager/CollectionComponentProvider.vue.d.ts +2 -2
  598. package/src/manager/collectionManager/CollectionComponentStandalone.vue +1 -1
  599. package/src/manager/collectionManager/CollectionComponentStandalone.vue.d.ts +1 -1
  600. package/src/manager/collectionManager/CollectionManager.vue +11 -9
  601. package/src/manager/collectionManager/CollectionManager.vue.d.ts +1 -1
  602. package/src/manager/collectionManager/categoryManager.d.ts +2 -2
  603. package/src/manager/collectionManager/collectionComponentClass.d.ts +6 -6
  604. package/src/manager/collectionManager/collectionComponentClass.js +4 -8
  605. package/src/manager/collectionManager/collectionManager.d.ts +5 -4
  606. package/src/manager/collectionManager/collectionManager.js +4 -2
  607. package/src/manager/collectionManager/editorCollectionComponentClass.d.ts +1 -1
  608. package/src/manager/contextMenu/ContextMenuComponent.vue.d.ts +2 -2
  609. package/src/manager/panel/PanelComponent.vue.d.ts +2 -2
  610. package/src/manager/panel/PanelManagerComponent.vue +7 -5
  611. package/src/manager/panel/PanelManagerComponent.vue.d.ts +4 -4
  612. package/src/manager/panel/panelManager.d.ts +6 -6
  613. package/src/manager/panel/panelManager.js +4 -4
  614. package/src/manager/toolbox/GroupToolboxComponent.vue +10 -34
  615. package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +3 -4
  616. package/src/manager/toolbox/SelectToolboxComponent.vue +12 -58
  617. package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +2 -3
  618. package/src/manager/toolbox/ToolboxManager.vue +12 -38
  619. package/src/manager/toolbox/ToolboxManager.vue.d.ts +3 -2
  620. package/src/manager/toolbox/toolboxManager.d.ts +3 -3
  621. package/src/manager/toolbox/toolboxManager.js +2 -3
  622. package/src/manager/window/WindowComponent.vue +3 -2
  623. package/src/manager/window/WindowComponent.vue.d.ts +2 -2
  624. package/src/manager/window/WindowComponentHeader.vue +8 -4
  625. package/src/manager/window/WindowComponentHeader.vue.d.ts +3 -3
  626. package/src/manager/window/WindowManager.vue +4 -9
  627. package/src/manager/window/WindowManager.vue.d.ts +2 -2
  628. package/src/manager/window/windowManager.d.ts +52 -46
  629. package/src/manager/window/windowManager.js +33 -10
  630. package/src/navigation/MapNavCompass.vue.d.ts +3 -3
  631. package/src/navigation/MapNavigation.vue +17 -10
  632. package/src/navigation/MapNavigation.vue.d.ts +6 -3
  633. package/src/navigation/ObliqueRotation.vue +15 -17
  634. package/src/navigation/ObliqueRotation.vue.d.ts +5 -5
  635. package/src/navigation/OrientationToolsButton.vue +39 -21
  636. package/src/navigation/OrientationToolsButton.vue.d.ts +6 -2
  637. package/src/navigation/TiltSlider.vue +87 -95
  638. package/src/navigation/TiltSlider.vue.d.ts +13 -10
  639. package/src/navigation/VcsCompass.vue +24 -11
  640. package/src/navigation/VcsCompass.vue.d.ts +8 -6
  641. package/src/navigation/VcsZoomButton.vue +12 -14
  642. package/src/navigation/VcsZoomButton.vue.d.ts +2 -2
  643. package/src/navigation/locatorHelper.js +1 -1
  644. package/src/navigation/overviewMap.d.ts +1 -1
  645. package/src/navigation/overviewMap.js +3 -3
  646. package/src/notifier/NotifierComponent.vue +18 -21
  647. package/src/notifier/NotifierComponent.vue.d.ts +1 -1
  648. package/src/notifier/notifier.d.ts +2 -1
  649. package/src/notifier/notifier.js +6 -2
  650. package/src/search/ResultItem.vue +14 -13
  651. package/src/search/ResultItem.vue.d.ts +2 -2
  652. package/src/search/ResultsComponent.vue +13 -24
  653. package/src/search/ResultsComponent.vue.d.ts +2 -2
  654. package/src/search/SearchComponent.vue +16 -15
  655. package/src/search/SearchComponent.vue.d.ts +2 -2
  656. package/src/search/search.d.ts +2 -2
  657. package/src/search/search.js +6 -10
  658. package/src/setup.js +2 -2
  659. package/src/styles/_typography.scss +12 -7
  660. package/src/styles/main.scss +6 -3
  661. package/src/styles/settings.scss +6 -0
  662. package/src/styles/variables.scss +10 -8
  663. package/src/styles/vcsGrid.scss +0 -10
  664. package/src/styles/vcsList.scss +8 -0
  665. package/src/vcsUiApp.d.ts +127 -26
  666. package/src/vcsUiApp.js +63 -27
  667. package/src/vuePlugins/i18n.d.ts +8 -2
  668. package/src/vuePlugins/i18n.js +39 -11
  669. package/src/vuePlugins/vuetify.d.ts +79 -9
  670. package/src/vuePlugins/vuetify.js +177 -68
  671. package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +0 -3273
  672. package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +0 -73
  673. package/dist/assets/index-7043a93a.js +0 -1
  674. package/dist/assets/ui.ce88d9.css +0 -5
  675. package/dist/assets/ui.ce88d9.js +0 -23835
  676. package/dist/assets/vue.808297.js +0 -4920
  677. package/dist/assets/vuetify.01ade4.css +0 -5
  678. package/dist/assets/vuetify.01ade4.js +0 -21263
  679. package/plugins/@vcmap-show-case/extent-example/src/ExtentExample.vue +0 -71
  680. package/src/components/form-inputs-controls/VcsRadioGrid.vue +0 -160
  681. package/src/components/form-inputs-controls/VcsRadioGrid.vue.d.ts +0 -35
  682. package/src/components/form-inputs-controls/composables.d.ts +0 -7
  683. package/src/components/form-inputs-controls/composables.js +0 -31
  684. package/src/components/import/FileDrop.vue.d.ts +0 -26
  685. package/src/components/vector-properties/composables.d.ts +0 -33
  686. package/src/components/vector-properties/composables.js +0 -100
  687. package/src/styles/utils/_all.scss +0 -12
  688. package/src/styles/utils/_border.scss +0 -7
  689. package/src/styles/utils/_cursor.scss +0 -19
  690. package/src/styles/utils/_display.scss +0 -3
  691. package/src/styles/utils/_fade-in.scss +0 -8
  692. package/src/styles/utils/_position.scss +0 -38
  693. package/src/styles/utils/_size.scss +0 -79
  694. package/src/styles/utils/_slide-in.scss +0 -26
  695. package/src/styles/utils/_spacing.scss +0 -11
  696. package/src/styles/utils/_text.scss +0 -30
  697. package/src/styles/utils/_transform.scss +0 -11
  698. package/src/styles/utils/_transition.scss +0 -11
  699. package/src/styles/utils/_z-index.scss +0 -15
@@ -1,3273 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.109.3
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
- Cartesian3_default,
28
- Cartographic_default,
29
- Ellipsoid_default,
30
- Matrix3_default
31
- } from "./chunk-PCJWUS4M.js";
32
- import {
33
- Math_default
34
- } from "./chunk-N3JIFFX2.js";
35
- import {
36
- RuntimeError_default
37
- } from "./chunk-ABADGKYE.js";
38
- import {
39
- defaultValue_default
40
- } from "./chunk-WXTV4ATB.js";
41
- import {
42
- Check_default,
43
- DeveloperError_default
44
- } from "./chunk-4MFFIWUA.js";
45
- import {
46
- defined_default
47
- } from "./chunk-6BTKZDRG.js";
48
-
49
- // packages/engine/Source/Core/Cartesian4.js
50
- function Cartesian4(x, y, z, w) {
51
- this.x = defaultValue_default(x, 0);
52
- this.y = defaultValue_default(y, 0);
53
- this.z = defaultValue_default(z, 0);
54
- this.w = defaultValue_default(w, 0);
55
- }
56
- Cartesian4.fromElements = function(x, y, z, w, result) {
57
- if (!defined_default(result)) {
58
- return new Cartesian4(x, y, z, w);
59
- }
60
- result.x = x;
61
- result.y = y;
62
- result.z = z;
63
- result.w = w;
64
- return result;
65
- };
66
- Cartesian4.fromColor = function(color, result) {
67
- Check_default.typeOf.object("color", color);
68
- if (!defined_default(result)) {
69
- return new Cartesian4(color.red, color.green, color.blue, color.alpha);
70
- }
71
- result.x = color.red;
72
- result.y = color.green;
73
- result.z = color.blue;
74
- result.w = color.alpha;
75
- return result;
76
- };
77
- Cartesian4.clone = function(cartesian, result) {
78
- if (!defined_default(cartesian)) {
79
- return void 0;
80
- }
81
- if (!defined_default(result)) {
82
- return new Cartesian4(cartesian.x, cartesian.y, cartesian.z, cartesian.w);
83
- }
84
- result.x = cartesian.x;
85
- result.y = cartesian.y;
86
- result.z = cartesian.z;
87
- result.w = cartesian.w;
88
- return result;
89
- };
90
- Cartesian4.packedLength = 4;
91
- Cartesian4.pack = function(value, array, startingIndex) {
92
- Check_default.typeOf.object("value", value);
93
- Check_default.defined("array", array);
94
- startingIndex = defaultValue_default(startingIndex, 0);
95
- array[startingIndex++] = value.x;
96
- array[startingIndex++] = value.y;
97
- array[startingIndex++] = value.z;
98
- array[startingIndex] = value.w;
99
- return array;
100
- };
101
- Cartesian4.unpack = function(array, startingIndex, result) {
102
- Check_default.defined("array", array);
103
- startingIndex = defaultValue_default(startingIndex, 0);
104
- if (!defined_default(result)) {
105
- result = new Cartesian4();
106
- }
107
- result.x = array[startingIndex++];
108
- result.y = array[startingIndex++];
109
- result.z = array[startingIndex++];
110
- result.w = array[startingIndex];
111
- return result;
112
- };
113
- Cartesian4.packArray = function(array, result) {
114
- Check_default.defined("array", array);
115
- const length = array.length;
116
- const resultLength = length * 4;
117
- if (!defined_default(result)) {
118
- result = new Array(resultLength);
119
- } else if (!Array.isArray(result) && result.length !== resultLength) {
120
- throw new DeveloperError_default(
121
- "If result is a typed array, it must have exactly array.length * 4 elements"
122
- );
123
- } else if (result.length !== resultLength) {
124
- result.length = resultLength;
125
- }
126
- for (let i = 0; i < length; ++i) {
127
- Cartesian4.pack(array[i], result, i * 4);
128
- }
129
- return result;
130
- };
131
- Cartesian4.unpackArray = function(array, result) {
132
- Check_default.defined("array", array);
133
- Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 4);
134
- if (array.length % 4 !== 0) {
135
- throw new DeveloperError_default("array length must be a multiple of 4.");
136
- }
137
- const length = array.length;
138
- if (!defined_default(result)) {
139
- result = new Array(length / 4);
140
- } else {
141
- result.length = length / 4;
142
- }
143
- for (let i = 0; i < length; i += 4) {
144
- const index = i / 4;
145
- result[index] = Cartesian4.unpack(array, i, result[index]);
146
- }
147
- return result;
148
- };
149
- Cartesian4.fromArray = Cartesian4.unpack;
150
- Cartesian4.maximumComponent = function(cartesian) {
151
- Check_default.typeOf.object("cartesian", cartesian);
152
- return Math.max(cartesian.x, cartesian.y, cartesian.z, cartesian.w);
153
- };
154
- Cartesian4.minimumComponent = function(cartesian) {
155
- Check_default.typeOf.object("cartesian", cartesian);
156
- return Math.min(cartesian.x, cartesian.y, cartesian.z, cartesian.w);
157
- };
158
- Cartesian4.minimumByComponent = function(first, second, result) {
159
- Check_default.typeOf.object("first", first);
160
- Check_default.typeOf.object("second", second);
161
- Check_default.typeOf.object("result", result);
162
- result.x = Math.min(first.x, second.x);
163
- result.y = Math.min(first.y, second.y);
164
- result.z = Math.min(first.z, second.z);
165
- result.w = Math.min(first.w, second.w);
166
- return result;
167
- };
168
- Cartesian4.maximumByComponent = function(first, second, result) {
169
- Check_default.typeOf.object("first", first);
170
- Check_default.typeOf.object("second", second);
171
- Check_default.typeOf.object("result", result);
172
- result.x = Math.max(first.x, second.x);
173
- result.y = Math.max(first.y, second.y);
174
- result.z = Math.max(first.z, second.z);
175
- result.w = Math.max(first.w, second.w);
176
- return result;
177
- };
178
- Cartesian4.clamp = function(value, min, max, result) {
179
- Check_default.typeOf.object("value", value);
180
- Check_default.typeOf.object("min", min);
181
- Check_default.typeOf.object("max", max);
182
- Check_default.typeOf.object("result", result);
183
- const x = Math_default.clamp(value.x, min.x, max.x);
184
- const y = Math_default.clamp(value.y, min.y, max.y);
185
- const z = Math_default.clamp(value.z, min.z, max.z);
186
- const w = Math_default.clamp(value.w, min.w, max.w);
187
- result.x = x;
188
- result.y = y;
189
- result.z = z;
190
- result.w = w;
191
- return result;
192
- };
193
- Cartesian4.magnitudeSquared = function(cartesian) {
194
- Check_default.typeOf.object("cartesian", cartesian);
195
- return cartesian.x * cartesian.x + cartesian.y * cartesian.y + cartesian.z * cartesian.z + cartesian.w * cartesian.w;
196
- };
197
- Cartesian4.magnitude = function(cartesian) {
198
- return Math.sqrt(Cartesian4.magnitudeSquared(cartesian));
199
- };
200
- var distanceScratch = new Cartesian4();
201
- Cartesian4.distance = function(left, right) {
202
- Check_default.typeOf.object("left", left);
203
- Check_default.typeOf.object("right", right);
204
- Cartesian4.subtract(left, right, distanceScratch);
205
- return Cartesian4.magnitude(distanceScratch);
206
- };
207
- Cartesian4.distanceSquared = function(left, right) {
208
- Check_default.typeOf.object("left", left);
209
- Check_default.typeOf.object("right", right);
210
- Cartesian4.subtract(left, right, distanceScratch);
211
- return Cartesian4.magnitudeSquared(distanceScratch);
212
- };
213
- Cartesian4.normalize = function(cartesian, result) {
214
- Check_default.typeOf.object("cartesian", cartesian);
215
- Check_default.typeOf.object("result", result);
216
- const magnitude = Cartesian4.magnitude(cartesian);
217
- result.x = cartesian.x / magnitude;
218
- result.y = cartesian.y / magnitude;
219
- result.z = cartesian.z / magnitude;
220
- result.w = cartesian.w / magnitude;
221
- if (isNaN(result.x) || isNaN(result.y) || isNaN(result.z) || isNaN(result.w)) {
222
- throw new DeveloperError_default("normalized result is not a number");
223
- }
224
- return result;
225
- };
226
- Cartesian4.dot = function(left, right) {
227
- Check_default.typeOf.object("left", left);
228
- Check_default.typeOf.object("right", right);
229
- return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w;
230
- };
231
- Cartesian4.multiplyComponents = function(left, right, result) {
232
- Check_default.typeOf.object("left", left);
233
- Check_default.typeOf.object("right", right);
234
- Check_default.typeOf.object("result", result);
235
- result.x = left.x * right.x;
236
- result.y = left.y * right.y;
237
- result.z = left.z * right.z;
238
- result.w = left.w * right.w;
239
- return result;
240
- };
241
- Cartesian4.divideComponents = function(left, right, result) {
242
- Check_default.typeOf.object("left", left);
243
- Check_default.typeOf.object("right", right);
244
- Check_default.typeOf.object("result", result);
245
- result.x = left.x / right.x;
246
- result.y = left.y / right.y;
247
- result.z = left.z / right.z;
248
- result.w = left.w / right.w;
249
- return result;
250
- };
251
- Cartesian4.add = function(left, right, result) {
252
- Check_default.typeOf.object("left", left);
253
- Check_default.typeOf.object("right", right);
254
- Check_default.typeOf.object("result", result);
255
- result.x = left.x + right.x;
256
- result.y = left.y + right.y;
257
- result.z = left.z + right.z;
258
- result.w = left.w + right.w;
259
- return result;
260
- };
261
- Cartesian4.subtract = function(left, right, result) {
262
- Check_default.typeOf.object("left", left);
263
- Check_default.typeOf.object("right", right);
264
- Check_default.typeOf.object("result", result);
265
- result.x = left.x - right.x;
266
- result.y = left.y - right.y;
267
- result.z = left.z - right.z;
268
- result.w = left.w - right.w;
269
- return result;
270
- };
271
- Cartesian4.multiplyByScalar = function(cartesian, scalar, result) {
272
- Check_default.typeOf.object("cartesian", cartesian);
273
- Check_default.typeOf.number("scalar", scalar);
274
- Check_default.typeOf.object("result", result);
275
- result.x = cartesian.x * scalar;
276
- result.y = cartesian.y * scalar;
277
- result.z = cartesian.z * scalar;
278
- result.w = cartesian.w * scalar;
279
- return result;
280
- };
281
- Cartesian4.divideByScalar = function(cartesian, scalar, result) {
282
- Check_default.typeOf.object("cartesian", cartesian);
283
- Check_default.typeOf.number("scalar", scalar);
284
- Check_default.typeOf.object("result", result);
285
- result.x = cartesian.x / scalar;
286
- result.y = cartesian.y / scalar;
287
- result.z = cartesian.z / scalar;
288
- result.w = cartesian.w / scalar;
289
- return result;
290
- };
291
- Cartesian4.negate = function(cartesian, result) {
292
- Check_default.typeOf.object("cartesian", cartesian);
293
- Check_default.typeOf.object("result", result);
294
- result.x = -cartesian.x;
295
- result.y = -cartesian.y;
296
- result.z = -cartesian.z;
297
- result.w = -cartesian.w;
298
- return result;
299
- };
300
- Cartesian4.abs = function(cartesian, result) {
301
- Check_default.typeOf.object("cartesian", cartesian);
302
- Check_default.typeOf.object("result", result);
303
- result.x = Math.abs(cartesian.x);
304
- result.y = Math.abs(cartesian.y);
305
- result.z = Math.abs(cartesian.z);
306
- result.w = Math.abs(cartesian.w);
307
- return result;
308
- };
309
- var lerpScratch = new Cartesian4();
310
- Cartesian4.lerp = function(start, end, t, result) {
311
- Check_default.typeOf.object("start", start);
312
- Check_default.typeOf.object("end", end);
313
- Check_default.typeOf.number("t", t);
314
- Check_default.typeOf.object("result", result);
315
- Cartesian4.multiplyByScalar(end, t, lerpScratch);
316
- result = Cartesian4.multiplyByScalar(start, 1 - t, result);
317
- return Cartesian4.add(lerpScratch, result, result);
318
- };
319
- var mostOrthogonalAxisScratch = new Cartesian4();
320
- Cartesian4.mostOrthogonalAxis = function(cartesian, result) {
321
- Check_default.typeOf.object("cartesian", cartesian);
322
- Check_default.typeOf.object("result", result);
323
- const f = Cartesian4.normalize(cartesian, mostOrthogonalAxisScratch);
324
- Cartesian4.abs(f, f);
325
- if (f.x <= f.y) {
326
- if (f.x <= f.z) {
327
- if (f.x <= f.w) {
328
- result = Cartesian4.clone(Cartesian4.UNIT_X, result);
329
- } else {
330
- result = Cartesian4.clone(Cartesian4.UNIT_W, result);
331
- }
332
- } else if (f.z <= f.w) {
333
- result = Cartesian4.clone(Cartesian4.UNIT_Z, result);
334
- } else {
335
- result = Cartesian4.clone(Cartesian4.UNIT_W, result);
336
- }
337
- } else if (f.y <= f.z) {
338
- if (f.y <= f.w) {
339
- result = Cartesian4.clone(Cartesian4.UNIT_Y, result);
340
- } else {
341
- result = Cartesian4.clone(Cartesian4.UNIT_W, result);
342
- }
343
- } else if (f.z <= f.w) {
344
- result = Cartesian4.clone(Cartesian4.UNIT_Z, result);
345
- } else {
346
- result = Cartesian4.clone(Cartesian4.UNIT_W, result);
347
- }
348
- return result;
349
- };
350
- Cartesian4.equals = function(left, right) {
351
- return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.z === right.z && left.w === right.w;
352
- };
353
- Cartesian4.equalsArray = function(cartesian, array, offset) {
354
- return cartesian.x === array[offset] && cartesian.y === array[offset + 1] && cartesian.z === array[offset + 2] && cartesian.w === array[offset + 3];
355
- };
356
- Cartesian4.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
357
- return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon(
358
- left.x,
359
- right.x,
360
- relativeEpsilon,
361
- absoluteEpsilon
362
- ) && Math_default.equalsEpsilon(
363
- left.y,
364
- right.y,
365
- relativeEpsilon,
366
- absoluteEpsilon
367
- ) && Math_default.equalsEpsilon(
368
- left.z,
369
- right.z,
370
- relativeEpsilon,
371
- absoluteEpsilon
372
- ) && Math_default.equalsEpsilon(
373
- left.w,
374
- right.w,
375
- relativeEpsilon,
376
- absoluteEpsilon
377
- );
378
- };
379
- Cartesian4.ZERO = Object.freeze(new Cartesian4(0, 0, 0, 0));
380
- Cartesian4.ONE = Object.freeze(new Cartesian4(1, 1, 1, 1));
381
- Cartesian4.UNIT_X = Object.freeze(new Cartesian4(1, 0, 0, 0));
382
- Cartesian4.UNIT_Y = Object.freeze(new Cartesian4(0, 1, 0, 0));
383
- Cartesian4.UNIT_Z = Object.freeze(new Cartesian4(0, 0, 1, 0));
384
- Cartesian4.UNIT_W = Object.freeze(new Cartesian4(0, 0, 0, 1));
385
- Cartesian4.prototype.clone = function(result) {
386
- return Cartesian4.clone(this, result);
387
- };
388
- Cartesian4.prototype.equals = function(right) {
389
- return Cartesian4.equals(this, right);
390
- };
391
- Cartesian4.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
392
- return Cartesian4.equalsEpsilon(
393
- this,
394
- right,
395
- relativeEpsilon,
396
- absoluteEpsilon
397
- );
398
- };
399
- Cartesian4.prototype.toString = function() {
400
- return `(${this.x}, ${this.y}, ${this.z}, ${this.w})`;
401
- };
402
- var scratchF32Array = new Float32Array(1);
403
- var scratchU8Array = new Uint8Array(scratchF32Array.buffer);
404
- var testU32 = new Uint32Array([287454020]);
405
- var testU8 = new Uint8Array(testU32.buffer);
406
- var littleEndian = testU8[0] === 68;
407
- Cartesian4.packFloat = function(value, result) {
408
- Check_default.typeOf.number("value", value);
409
- if (!defined_default(result)) {
410
- result = new Cartesian4();
411
- }
412
- scratchF32Array[0] = value;
413
- if (littleEndian) {
414
- result.x = scratchU8Array[0];
415
- result.y = scratchU8Array[1];
416
- result.z = scratchU8Array[2];
417
- result.w = scratchU8Array[3];
418
- } else {
419
- result.x = scratchU8Array[3];
420
- result.y = scratchU8Array[2];
421
- result.z = scratchU8Array[1];
422
- result.w = scratchU8Array[0];
423
- }
424
- return result;
425
- };
426
- Cartesian4.unpackFloat = function(packedFloat) {
427
- Check_default.typeOf.object("packedFloat", packedFloat);
428
- if (littleEndian) {
429
- scratchU8Array[0] = packedFloat.x;
430
- scratchU8Array[1] = packedFloat.y;
431
- scratchU8Array[2] = packedFloat.z;
432
- scratchU8Array[3] = packedFloat.w;
433
- } else {
434
- scratchU8Array[0] = packedFloat.w;
435
- scratchU8Array[1] = packedFloat.z;
436
- scratchU8Array[2] = packedFloat.y;
437
- scratchU8Array[3] = packedFloat.x;
438
- }
439
- return scratchF32Array[0];
440
- };
441
- var Cartesian4_default = Cartesian4;
442
-
443
- // packages/engine/Source/Core/Matrix4.js
444
- function Matrix4(column0Row0, column1Row0, column2Row0, column3Row0, column0Row1, column1Row1, column2Row1, column3Row1, column0Row2, column1Row2, column2Row2, column3Row2, column0Row3, column1Row3, column2Row3, column3Row3) {
445
- this[0] = defaultValue_default(column0Row0, 0);
446
- this[1] = defaultValue_default(column0Row1, 0);
447
- this[2] = defaultValue_default(column0Row2, 0);
448
- this[3] = defaultValue_default(column0Row3, 0);
449
- this[4] = defaultValue_default(column1Row0, 0);
450
- this[5] = defaultValue_default(column1Row1, 0);
451
- this[6] = defaultValue_default(column1Row2, 0);
452
- this[7] = defaultValue_default(column1Row3, 0);
453
- this[8] = defaultValue_default(column2Row0, 0);
454
- this[9] = defaultValue_default(column2Row1, 0);
455
- this[10] = defaultValue_default(column2Row2, 0);
456
- this[11] = defaultValue_default(column2Row3, 0);
457
- this[12] = defaultValue_default(column3Row0, 0);
458
- this[13] = defaultValue_default(column3Row1, 0);
459
- this[14] = defaultValue_default(column3Row2, 0);
460
- this[15] = defaultValue_default(column3Row3, 0);
461
- }
462
- Matrix4.packedLength = 16;
463
- Matrix4.pack = function(value, array, startingIndex) {
464
- Check_default.typeOf.object("value", value);
465
- Check_default.defined("array", array);
466
- startingIndex = defaultValue_default(startingIndex, 0);
467
- array[startingIndex++] = value[0];
468
- array[startingIndex++] = value[1];
469
- array[startingIndex++] = value[2];
470
- array[startingIndex++] = value[3];
471
- array[startingIndex++] = value[4];
472
- array[startingIndex++] = value[5];
473
- array[startingIndex++] = value[6];
474
- array[startingIndex++] = value[7];
475
- array[startingIndex++] = value[8];
476
- array[startingIndex++] = value[9];
477
- array[startingIndex++] = value[10];
478
- array[startingIndex++] = value[11];
479
- array[startingIndex++] = value[12];
480
- array[startingIndex++] = value[13];
481
- array[startingIndex++] = value[14];
482
- array[startingIndex] = value[15];
483
- return array;
484
- };
485
- Matrix4.unpack = function(array, startingIndex, result) {
486
- Check_default.defined("array", array);
487
- startingIndex = defaultValue_default(startingIndex, 0);
488
- if (!defined_default(result)) {
489
- result = new Matrix4();
490
- }
491
- result[0] = array[startingIndex++];
492
- result[1] = array[startingIndex++];
493
- result[2] = array[startingIndex++];
494
- result[3] = array[startingIndex++];
495
- result[4] = array[startingIndex++];
496
- result[5] = array[startingIndex++];
497
- result[6] = array[startingIndex++];
498
- result[7] = array[startingIndex++];
499
- result[8] = array[startingIndex++];
500
- result[9] = array[startingIndex++];
501
- result[10] = array[startingIndex++];
502
- result[11] = array[startingIndex++];
503
- result[12] = array[startingIndex++];
504
- result[13] = array[startingIndex++];
505
- result[14] = array[startingIndex++];
506
- result[15] = array[startingIndex];
507
- return result;
508
- };
509
- Matrix4.packArray = function(array, result) {
510
- Check_default.defined("array", array);
511
- const length = array.length;
512
- const resultLength = length * 16;
513
- if (!defined_default(result)) {
514
- result = new Array(resultLength);
515
- } else if (!Array.isArray(result) && result.length !== resultLength) {
516
- throw new DeveloperError_default(
517
- "If result is a typed array, it must have exactly array.length * 16 elements"
518
- );
519
- } else if (result.length !== resultLength) {
520
- result.length = resultLength;
521
- }
522
- for (let i = 0; i < length; ++i) {
523
- Matrix4.pack(array[i], result, i * 16);
524
- }
525
- return result;
526
- };
527
- Matrix4.unpackArray = function(array, result) {
528
- Check_default.defined("array", array);
529
- Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 16);
530
- if (array.length % 16 !== 0) {
531
- throw new DeveloperError_default("array length must be a multiple of 16.");
532
- }
533
- const length = array.length;
534
- if (!defined_default(result)) {
535
- result = new Array(length / 16);
536
- } else {
537
- result.length = length / 16;
538
- }
539
- for (let i = 0; i < length; i += 16) {
540
- const index = i / 16;
541
- result[index] = Matrix4.unpack(array, i, result[index]);
542
- }
543
- return result;
544
- };
545
- Matrix4.clone = function(matrix, result) {
546
- if (!defined_default(matrix)) {
547
- return void 0;
548
- }
549
- if (!defined_default(result)) {
550
- return new Matrix4(
551
- matrix[0],
552
- matrix[4],
553
- matrix[8],
554
- matrix[12],
555
- matrix[1],
556
- matrix[5],
557
- matrix[9],
558
- matrix[13],
559
- matrix[2],
560
- matrix[6],
561
- matrix[10],
562
- matrix[14],
563
- matrix[3],
564
- matrix[7],
565
- matrix[11],
566
- matrix[15]
567
- );
568
- }
569
- result[0] = matrix[0];
570
- result[1] = matrix[1];
571
- result[2] = matrix[2];
572
- result[3] = matrix[3];
573
- result[4] = matrix[4];
574
- result[5] = matrix[5];
575
- result[6] = matrix[6];
576
- result[7] = matrix[7];
577
- result[8] = matrix[8];
578
- result[9] = matrix[9];
579
- result[10] = matrix[10];
580
- result[11] = matrix[11];
581
- result[12] = matrix[12];
582
- result[13] = matrix[13];
583
- result[14] = matrix[14];
584
- result[15] = matrix[15];
585
- return result;
586
- };
587
- Matrix4.fromArray = Matrix4.unpack;
588
- Matrix4.fromColumnMajorArray = function(values, result) {
589
- Check_default.defined("values", values);
590
- return Matrix4.clone(values, result);
591
- };
592
- Matrix4.fromRowMajorArray = function(values, result) {
593
- Check_default.defined("values", values);
594
- if (!defined_default(result)) {
595
- return new Matrix4(
596
- values[0],
597
- values[1],
598
- values[2],
599
- values[3],
600
- values[4],
601
- values[5],
602
- values[6],
603
- values[7],
604
- values[8],
605
- values[9],
606
- values[10],
607
- values[11],
608
- values[12],
609
- values[13],
610
- values[14],
611
- values[15]
612
- );
613
- }
614
- result[0] = values[0];
615
- result[1] = values[4];
616
- result[2] = values[8];
617
- result[3] = values[12];
618
- result[4] = values[1];
619
- result[5] = values[5];
620
- result[6] = values[9];
621
- result[7] = values[13];
622
- result[8] = values[2];
623
- result[9] = values[6];
624
- result[10] = values[10];
625
- result[11] = values[14];
626
- result[12] = values[3];
627
- result[13] = values[7];
628
- result[14] = values[11];
629
- result[15] = values[15];
630
- return result;
631
- };
632
- Matrix4.fromRotationTranslation = function(rotation, translation, result) {
633
- Check_default.typeOf.object("rotation", rotation);
634
- translation = defaultValue_default(translation, Cartesian3_default.ZERO);
635
- if (!defined_default(result)) {
636
- return new Matrix4(
637
- rotation[0],
638
- rotation[3],
639
- rotation[6],
640
- translation.x,
641
- rotation[1],
642
- rotation[4],
643
- rotation[7],
644
- translation.y,
645
- rotation[2],
646
- rotation[5],
647
- rotation[8],
648
- translation.z,
649
- 0,
650
- 0,
651
- 0,
652
- 1
653
- );
654
- }
655
- result[0] = rotation[0];
656
- result[1] = rotation[1];
657
- result[2] = rotation[2];
658
- result[3] = 0;
659
- result[4] = rotation[3];
660
- result[5] = rotation[4];
661
- result[6] = rotation[5];
662
- result[7] = 0;
663
- result[8] = rotation[6];
664
- result[9] = rotation[7];
665
- result[10] = rotation[8];
666
- result[11] = 0;
667
- result[12] = translation.x;
668
- result[13] = translation.y;
669
- result[14] = translation.z;
670
- result[15] = 1;
671
- return result;
672
- };
673
- Matrix4.fromTranslationQuaternionRotationScale = function(translation, rotation, scale, result) {
674
- Check_default.typeOf.object("translation", translation);
675
- Check_default.typeOf.object("rotation", rotation);
676
- Check_default.typeOf.object("scale", scale);
677
- if (!defined_default(result)) {
678
- result = new Matrix4();
679
- }
680
- const scaleX = scale.x;
681
- const scaleY = scale.y;
682
- const scaleZ = scale.z;
683
- const x2 = rotation.x * rotation.x;
684
- const xy = rotation.x * rotation.y;
685
- const xz = rotation.x * rotation.z;
686
- const xw = rotation.x * rotation.w;
687
- const y2 = rotation.y * rotation.y;
688
- const yz = rotation.y * rotation.z;
689
- const yw = rotation.y * rotation.w;
690
- const z2 = rotation.z * rotation.z;
691
- const zw = rotation.z * rotation.w;
692
- const w2 = rotation.w * rotation.w;
693
- const m00 = x2 - y2 - z2 + w2;
694
- const m01 = 2 * (xy - zw);
695
- const m02 = 2 * (xz + yw);
696
- const m10 = 2 * (xy + zw);
697
- const m11 = -x2 + y2 - z2 + w2;
698
- const m12 = 2 * (yz - xw);
699
- const m20 = 2 * (xz - yw);
700
- const m21 = 2 * (yz + xw);
701
- const m22 = -x2 - y2 + z2 + w2;
702
- result[0] = m00 * scaleX;
703
- result[1] = m10 * scaleX;
704
- result[2] = m20 * scaleX;
705
- result[3] = 0;
706
- result[4] = m01 * scaleY;
707
- result[5] = m11 * scaleY;
708
- result[6] = m21 * scaleY;
709
- result[7] = 0;
710
- result[8] = m02 * scaleZ;
711
- result[9] = m12 * scaleZ;
712
- result[10] = m22 * scaleZ;
713
- result[11] = 0;
714
- result[12] = translation.x;
715
- result[13] = translation.y;
716
- result[14] = translation.z;
717
- result[15] = 1;
718
- return result;
719
- };
720
- Matrix4.fromTranslationRotationScale = function(translationRotationScale, result) {
721
- Check_default.typeOf.object("translationRotationScale", translationRotationScale);
722
- return Matrix4.fromTranslationQuaternionRotationScale(
723
- translationRotationScale.translation,
724
- translationRotationScale.rotation,
725
- translationRotationScale.scale,
726
- result
727
- );
728
- };
729
- Matrix4.fromTranslation = function(translation, result) {
730
- Check_default.typeOf.object("translation", translation);
731
- return Matrix4.fromRotationTranslation(Matrix3_default.IDENTITY, translation, result);
732
- };
733
- Matrix4.fromScale = function(scale, result) {
734
- Check_default.typeOf.object("scale", scale);
735
- if (!defined_default(result)) {
736
- return new Matrix4(
737
- scale.x,
738
- 0,
739
- 0,
740
- 0,
741
- 0,
742
- scale.y,
743
- 0,
744
- 0,
745
- 0,
746
- 0,
747
- scale.z,
748
- 0,
749
- 0,
750
- 0,
751
- 0,
752
- 1
753
- );
754
- }
755
- result[0] = scale.x;
756
- result[1] = 0;
757
- result[2] = 0;
758
- result[3] = 0;
759
- result[4] = 0;
760
- result[5] = scale.y;
761
- result[6] = 0;
762
- result[7] = 0;
763
- result[8] = 0;
764
- result[9] = 0;
765
- result[10] = scale.z;
766
- result[11] = 0;
767
- result[12] = 0;
768
- result[13] = 0;
769
- result[14] = 0;
770
- result[15] = 1;
771
- return result;
772
- };
773
- Matrix4.fromUniformScale = function(scale, result) {
774
- Check_default.typeOf.number("scale", scale);
775
- if (!defined_default(result)) {
776
- return new Matrix4(
777
- scale,
778
- 0,
779
- 0,
780
- 0,
781
- 0,
782
- scale,
783
- 0,
784
- 0,
785
- 0,
786
- 0,
787
- scale,
788
- 0,
789
- 0,
790
- 0,
791
- 0,
792
- 1
793
- );
794
- }
795
- result[0] = scale;
796
- result[1] = 0;
797
- result[2] = 0;
798
- result[3] = 0;
799
- result[4] = 0;
800
- result[5] = scale;
801
- result[6] = 0;
802
- result[7] = 0;
803
- result[8] = 0;
804
- result[9] = 0;
805
- result[10] = scale;
806
- result[11] = 0;
807
- result[12] = 0;
808
- result[13] = 0;
809
- result[14] = 0;
810
- result[15] = 1;
811
- return result;
812
- };
813
- Matrix4.fromRotation = function(rotation, result) {
814
- Check_default.typeOf.object("rotation", rotation);
815
- if (!defined_default(result)) {
816
- result = new Matrix4();
817
- }
818
- result[0] = rotation[0];
819
- result[1] = rotation[1];
820
- result[2] = rotation[2];
821
- result[3] = 0;
822
- result[4] = rotation[3];
823
- result[5] = rotation[4];
824
- result[6] = rotation[5];
825
- result[7] = 0;
826
- result[8] = rotation[6];
827
- result[9] = rotation[7];
828
- result[10] = rotation[8];
829
- result[11] = 0;
830
- result[12] = 0;
831
- result[13] = 0;
832
- result[14] = 0;
833
- result[15] = 1;
834
- return result;
835
- };
836
- var fromCameraF = new Cartesian3_default();
837
- var fromCameraR = new Cartesian3_default();
838
- var fromCameraU = new Cartesian3_default();
839
- Matrix4.fromCamera = function(camera, result) {
840
- Check_default.typeOf.object("camera", camera);
841
- const position = camera.position;
842
- const direction = camera.direction;
843
- const up = camera.up;
844
- Check_default.typeOf.object("camera.position", position);
845
- Check_default.typeOf.object("camera.direction", direction);
846
- Check_default.typeOf.object("camera.up", up);
847
- Cartesian3_default.normalize(direction, fromCameraF);
848
- Cartesian3_default.normalize(
849
- Cartesian3_default.cross(fromCameraF, up, fromCameraR),
850
- fromCameraR
851
- );
852
- Cartesian3_default.normalize(
853
- Cartesian3_default.cross(fromCameraR, fromCameraF, fromCameraU),
854
- fromCameraU
855
- );
856
- const sX = fromCameraR.x;
857
- const sY = fromCameraR.y;
858
- const sZ = fromCameraR.z;
859
- const fX = fromCameraF.x;
860
- const fY = fromCameraF.y;
861
- const fZ = fromCameraF.z;
862
- const uX = fromCameraU.x;
863
- const uY = fromCameraU.y;
864
- const uZ = fromCameraU.z;
865
- const positionX = position.x;
866
- const positionY = position.y;
867
- const positionZ = position.z;
868
- const t0 = sX * -positionX + sY * -positionY + sZ * -positionZ;
869
- const t1 = uX * -positionX + uY * -positionY + uZ * -positionZ;
870
- const t2 = fX * positionX + fY * positionY + fZ * positionZ;
871
- if (!defined_default(result)) {
872
- return new Matrix4(
873
- sX,
874
- sY,
875
- sZ,
876
- t0,
877
- uX,
878
- uY,
879
- uZ,
880
- t1,
881
- -fX,
882
- -fY,
883
- -fZ,
884
- t2,
885
- 0,
886
- 0,
887
- 0,
888
- 1
889
- );
890
- }
891
- result[0] = sX;
892
- result[1] = uX;
893
- result[2] = -fX;
894
- result[3] = 0;
895
- result[4] = sY;
896
- result[5] = uY;
897
- result[6] = -fY;
898
- result[7] = 0;
899
- result[8] = sZ;
900
- result[9] = uZ;
901
- result[10] = -fZ;
902
- result[11] = 0;
903
- result[12] = t0;
904
- result[13] = t1;
905
- result[14] = t2;
906
- result[15] = 1;
907
- return result;
908
- };
909
- Matrix4.computePerspectiveFieldOfView = function(fovY, aspectRatio, near, far, result) {
910
- Check_default.typeOf.number.greaterThan("fovY", fovY, 0);
911
- Check_default.typeOf.number.lessThan("fovY", fovY, Math.PI);
912
- Check_default.typeOf.number.greaterThan("near", near, 0);
913
- Check_default.typeOf.number.greaterThan("far", far, 0);
914
- Check_default.typeOf.object("result", result);
915
- const bottom = Math.tan(fovY * 0.5);
916
- const column1Row1 = 1 / bottom;
917
- const column0Row0 = column1Row1 / aspectRatio;
918
- const column2Row2 = (far + near) / (near - far);
919
- const column3Row2 = 2 * far * near / (near - far);
920
- result[0] = column0Row0;
921
- result[1] = 0;
922
- result[2] = 0;
923
- result[3] = 0;
924
- result[4] = 0;
925
- result[5] = column1Row1;
926
- result[6] = 0;
927
- result[7] = 0;
928
- result[8] = 0;
929
- result[9] = 0;
930
- result[10] = column2Row2;
931
- result[11] = -1;
932
- result[12] = 0;
933
- result[13] = 0;
934
- result[14] = column3Row2;
935
- result[15] = 0;
936
- return result;
937
- };
938
- Matrix4.computeOrthographicOffCenter = function(left, right, bottom, top, near, far, result) {
939
- Check_default.typeOf.number("left", left);
940
- Check_default.typeOf.number("right", right);
941
- Check_default.typeOf.number("bottom", bottom);
942
- Check_default.typeOf.number("top", top);
943
- Check_default.typeOf.number("near", near);
944
- Check_default.typeOf.number("far", far);
945
- Check_default.typeOf.object("result", result);
946
- let a = 1 / (right - left);
947
- let b = 1 / (top - bottom);
948
- let c = 1 / (far - near);
949
- const tx = -(right + left) * a;
950
- const ty = -(top + bottom) * b;
951
- const tz = -(far + near) * c;
952
- a *= 2;
953
- b *= 2;
954
- c *= -2;
955
- result[0] = a;
956
- result[1] = 0;
957
- result[2] = 0;
958
- result[3] = 0;
959
- result[4] = 0;
960
- result[5] = b;
961
- result[6] = 0;
962
- result[7] = 0;
963
- result[8] = 0;
964
- result[9] = 0;
965
- result[10] = c;
966
- result[11] = 0;
967
- result[12] = tx;
968
- result[13] = ty;
969
- result[14] = tz;
970
- result[15] = 1;
971
- return result;
972
- };
973
- Matrix4.computePerspectiveOffCenter = function(left, right, bottom, top, near, far, result) {
974
- Check_default.typeOf.number("left", left);
975
- Check_default.typeOf.number("right", right);
976
- Check_default.typeOf.number("bottom", bottom);
977
- Check_default.typeOf.number("top", top);
978
- Check_default.typeOf.number("near", near);
979
- Check_default.typeOf.number("far", far);
980
- Check_default.typeOf.object("result", result);
981
- const column0Row0 = 2 * near / (right - left);
982
- const column1Row1 = 2 * near / (top - bottom);
983
- const column2Row0 = (right + left) / (right - left);
984
- const column2Row1 = (top + bottom) / (top - bottom);
985
- const column2Row2 = -(far + near) / (far - near);
986
- const column2Row3 = -1;
987
- const column3Row2 = -2 * far * near / (far - near);
988
- result[0] = column0Row0;
989
- result[1] = 0;
990
- result[2] = 0;
991
- result[3] = 0;
992
- result[4] = 0;
993
- result[5] = column1Row1;
994
- result[6] = 0;
995
- result[7] = 0;
996
- result[8] = column2Row0;
997
- result[9] = column2Row1;
998
- result[10] = column2Row2;
999
- result[11] = column2Row3;
1000
- result[12] = 0;
1001
- result[13] = 0;
1002
- result[14] = column3Row2;
1003
- result[15] = 0;
1004
- return result;
1005
- };
1006
- Matrix4.computeInfinitePerspectiveOffCenter = function(left, right, bottom, top, near, result) {
1007
- Check_default.typeOf.number("left", left);
1008
- Check_default.typeOf.number("right", right);
1009
- Check_default.typeOf.number("bottom", bottom);
1010
- Check_default.typeOf.number("top", top);
1011
- Check_default.typeOf.number("near", near);
1012
- Check_default.typeOf.object("result", result);
1013
- const column0Row0 = 2 * near / (right - left);
1014
- const column1Row1 = 2 * near / (top - bottom);
1015
- const column2Row0 = (right + left) / (right - left);
1016
- const column2Row1 = (top + bottom) / (top - bottom);
1017
- const column2Row2 = -1;
1018
- const column2Row3 = -1;
1019
- const column3Row2 = -2 * near;
1020
- result[0] = column0Row0;
1021
- result[1] = 0;
1022
- result[2] = 0;
1023
- result[3] = 0;
1024
- result[4] = 0;
1025
- result[5] = column1Row1;
1026
- result[6] = 0;
1027
- result[7] = 0;
1028
- result[8] = column2Row0;
1029
- result[9] = column2Row1;
1030
- result[10] = column2Row2;
1031
- result[11] = column2Row3;
1032
- result[12] = 0;
1033
- result[13] = 0;
1034
- result[14] = column3Row2;
1035
- result[15] = 0;
1036
- return result;
1037
- };
1038
- Matrix4.computeViewportTransformation = function(viewport, nearDepthRange, farDepthRange, result) {
1039
- if (!defined_default(result)) {
1040
- result = new Matrix4();
1041
- }
1042
- viewport = defaultValue_default(viewport, defaultValue_default.EMPTY_OBJECT);
1043
- const x = defaultValue_default(viewport.x, 0);
1044
- const y = defaultValue_default(viewport.y, 0);
1045
- const width = defaultValue_default(viewport.width, 0);
1046
- const height = defaultValue_default(viewport.height, 0);
1047
- nearDepthRange = defaultValue_default(nearDepthRange, 0);
1048
- farDepthRange = defaultValue_default(farDepthRange, 1);
1049
- const halfWidth = width * 0.5;
1050
- const halfHeight = height * 0.5;
1051
- const halfDepth = (farDepthRange - nearDepthRange) * 0.5;
1052
- const column0Row0 = halfWidth;
1053
- const column1Row1 = halfHeight;
1054
- const column2Row2 = halfDepth;
1055
- const column3Row0 = x + halfWidth;
1056
- const column3Row1 = y + halfHeight;
1057
- const column3Row2 = nearDepthRange + halfDepth;
1058
- const column3Row3 = 1;
1059
- result[0] = column0Row0;
1060
- result[1] = 0;
1061
- result[2] = 0;
1062
- result[3] = 0;
1063
- result[4] = 0;
1064
- result[5] = column1Row1;
1065
- result[6] = 0;
1066
- result[7] = 0;
1067
- result[8] = 0;
1068
- result[9] = 0;
1069
- result[10] = column2Row2;
1070
- result[11] = 0;
1071
- result[12] = column3Row0;
1072
- result[13] = column3Row1;
1073
- result[14] = column3Row2;
1074
- result[15] = column3Row3;
1075
- return result;
1076
- };
1077
- Matrix4.computeView = function(position, direction, up, right, result) {
1078
- Check_default.typeOf.object("position", position);
1079
- Check_default.typeOf.object("direction", direction);
1080
- Check_default.typeOf.object("up", up);
1081
- Check_default.typeOf.object("right", right);
1082
- Check_default.typeOf.object("result", result);
1083
- result[0] = right.x;
1084
- result[1] = up.x;
1085
- result[2] = -direction.x;
1086
- result[3] = 0;
1087
- result[4] = right.y;
1088
- result[5] = up.y;
1089
- result[6] = -direction.y;
1090
- result[7] = 0;
1091
- result[8] = right.z;
1092
- result[9] = up.z;
1093
- result[10] = -direction.z;
1094
- result[11] = 0;
1095
- result[12] = -Cartesian3_default.dot(right, position);
1096
- result[13] = -Cartesian3_default.dot(up, position);
1097
- result[14] = Cartesian3_default.dot(direction, position);
1098
- result[15] = 1;
1099
- return result;
1100
- };
1101
- Matrix4.toArray = function(matrix, result) {
1102
- Check_default.typeOf.object("matrix", matrix);
1103
- if (!defined_default(result)) {
1104
- return [
1105
- matrix[0],
1106
- matrix[1],
1107
- matrix[2],
1108
- matrix[3],
1109
- matrix[4],
1110
- matrix[5],
1111
- matrix[6],
1112
- matrix[7],
1113
- matrix[8],
1114
- matrix[9],
1115
- matrix[10],
1116
- matrix[11],
1117
- matrix[12],
1118
- matrix[13],
1119
- matrix[14],
1120
- matrix[15]
1121
- ];
1122
- }
1123
- result[0] = matrix[0];
1124
- result[1] = matrix[1];
1125
- result[2] = matrix[2];
1126
- result[3] = matrix[3];
1127
- result[4] = matrix[4];
1128
- result[5] = matrix[5];
1129
- result[6] = matrix[6];
1130
- result[7] = matrix[7];
1131
- result[8] = matrix[8];
1132
- result[9] = matrix[9];
1133
- result[10] = matrix[10];
1134
- result[11] = matrix[11];
1135
- result[12] = matrix[12];
1136
- result[13] = matrix[13];
1137
- result[14] = matrix[14];
1138
- result[15] = matrix[15];
1139
- return result;
1140
- };
1141
- Matrix4.getElementIndex = function(column, row) {
1142
- Check_default.typeOf.number.greaterThanOrEquals("row", row, 0);
1143
- Check_default.typeOf.number.lessThanOrEquals("row", row, 3);
1144
- Check_default.typeOf.number.greaterThanOrEquals("column", column, 0);
1145
- Check_default.typeOf.number.lessThanOrEquals("column", column, 3);
1146
- return column * 4 + row;
1147
- };
1148
- Matrix4.getColumn = function(matrix, index, result) {
1149
- Check_default.typeOf.object("matrix", matrix);
1150
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
1151
- Check_default.typeOf.number.lessThanOrEquals("index", index, 3);
1152
- Check_default.typeOf.object("result", result);
1153
- const startIndex = index * 4;
1154
- const x = matrix[startIndex];
1155
- const y = matrix[startIndex + 1];
1156
- const z = matrix[startIndex + 2];
1157
- const w = matrix[startIndex + 3];
1158
- result.x = x;
1159
- result.y = y;
1160
- result.z = z;
1161
- result.w = w;
1162
- return result;
1163
- };
1164
- Matrix4.setColumn = function(matrix, index, cartesian, result) {
1165
- Check_default.typeOf.object("matrix", matrix);
1166
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
1167
- Check_default.typeOf.number.lessThanOrEquals("index", index, 3);
1168
- Check_default.typeOf.object("cartesian", cartesian);
1169
- Check_default.typeOf.object("result", result);
1170
- result = Matrix4.clone(matrix, result);
1171
- const startIndex = index * 4;
1172
- result[startIndex] = cartesian.x;
1173
- result[startIndex + 1] = cartesian.y;
1174
- result[startIndex + 2] = cartesian.z;
1175
- result[startIndex + 3] = cartesian.w;
1176
- return result;
1177
- };
1178
- Matrix4.getRow = function(matrix, index, result) {
1179
- Check_default.typeOf.object("matrix", matrix);
1180
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
1181
- Check_default.typeOf.number.lessThanOrEquals("index", index, 3);
1182
- Check_default.typeOf.object("result", result);
1183
- const x = matrix[index];
1184
- const y = matrix[index + 4];
1185
- const z = matrix[index + 8];
1186
- const w = matrix[index + 12];
1187
- result.x = x;
1188
- result.y = y;
1189
- result.z = z;
1190
- result.w = w;
1191
- return result;
1192
- };
1193
- Matrix4.setRow = function(matrix, index, cartesian, result) {
1194
- Check_default.typeOf.object("matrix", matrix);
1195
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
1196
- Check_default.typeOf.number.lessThanOrEquals("index", index, 3);
1197
- Check_default.typeOf.object("cartesian", cartesian);
1198
- Check_default.typeOf.object("result", result);
1199
- result = Matrix4.clone(matrix, result);
1200
- result[index] = cartesian.x;
1201
- result[index + 4] = cartesian.y;
1202
- result[index + 8] = cartesian.z;
1203
- result[index + 12] = cartesian.w;
1204
- return result;
1205
- };
1206
- Matrix4.setTranslation = function(matrix, translation, result) {
1207
- Check_default.typeOf.object("matrix", matrix);
1208
- Check_default.typeOf.object("translation", translation);
1209
- Check_default.typeOf.object("result", result);
1210
- result[0] = matrix[0];
1211
- result[1] = matrix[1];
1212
- result[2] = matrix[2];
1213
- result[3] = matrix[3];
1214
- result[4] = matrix[4];
1215
- result[5] = matrix[5];
1216
- result[6] = matrix[6];
1217
- result[7] = matrix[7];
1218
- result[8] = matrix[8];
1219
- result[9] = matrix[9];
1220
- result[10] = matrix[10];
1221
- result[11] = matrix[11];
1222
- result[12] = translation.x;
1223
- result[13] = translation.y;
1224
- result[14] = translation.z;
1225
- result[15] = matrix[15];
1226
- return result;
1227
- };
1228
- var scaleScratch1 = new Cartesian3_default();
1229
- Matrix4.setScale = function(matrix, scale, result) {
1230
- Check_default.typeOf.object("matrix", matrix);
1231
- Check_default.typeOf.object("scale", scale);
1232
- Check_default.typeOf.object("result", result);
1233
- const existingScale = Matrix4.getScale(matrix, scaleScratch1);
1234
- const scaleRatioX = scale.x / existingScale.x;
1235
- const scaleRatioY = scale.y / existingScale.y;
1236
- const scaleRatioZ = scale.z / existingScale.z;
1237
- result[0] = matrix[0] * scaleRatioX;
1238
- result[1] = matrix[1] * scaleRatioX;
1239
- result[2] = matrix[2] * scaleRatioX;
1240
- result[3] = matrix[3];
1241
- result[4] = matrix[4] * scaleRatioY;
1242
- result[5] = matrix[5] * scaleRatioY;
1243
- result[6] = matrix[6] * scaleRatioY;
1244
- result[7] = matrix[7];
1245
- result[8] = matrix[8] * scaleRatioZ;
1246
- result[9] = matrix[9] * scaleRatioZ;
1247
- result[10] = matrix[10] * scaleRatioZ;
1248
- result[11] = matrix[11];
1249
- result[12] = matrix[12];
1250
- result[13] = matrix[13];
1251
- result[14] = matrix[14];
1252
- result[15] = matrix[15];
1253
- return result;
1254
- };
1255
- var scaleScratch2 = new Cartesian3_default();
1256
- Matrix4.setUniformScale = function(matrix, scale, result) {
1257
- Check_default.typeOf.object("matrix", matrix);
1258
- Check_default.typeOf.number("scale", scale);
1259
- Check_default.typeOf.object("result", result);
1260
- const existingScale = Matrix4.getScale(matrix, scaleScratch2);
1261
- const scaleRatioX = scale / existingScale.x;
1262
- const scaleRatioY = scale / existingScale.y;
1263
- const scaleRatioZ = scale / existingScale.z;
1264
- result[0] = matrix[0] * scaleRatioX;
1265
- result[1] = matrix[1] * scaleRatioX;
1266
- result[2] = matrix[2] * scaleRatioX;
1267
- result[3] = matrix[3];
1268
- result[4] = matrix[4] * scaleRatioY;
1269
- result[5] = matrix[5] * scaleRatioY;
1270
- result[6] = matrix[6] * scaleRatioY;
1271
- result[7] = matrix[7];
1272
- result[8] = matrix[8] * scaleRatioZ;
1273
- result[9] = matrix[9] * scaleRatioZ;
1274
- result[10] = matrix[10] * scaleRatioZ;
1275
- result[11] = matrix[11];
1276
- result[12] = matrix[12];
1277
- result[13] = matrix[13];
1278
- result[14] = matrix[14];
1279
- result[15] = matrix[15];
1280
- return result;
1281
- };
1282
- var scratchColumn = new Cartesian3_default();
1283
- Matrix4.getScale = function(matrix, result) {
1284
- Check_default.typeOf.object("matrix", matrix);
1285
- Check_default.typeOf.object("result", result);
1286
- result.x = Cartesian3_default.magnitude(
1287
- Cartesian3_default.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn)
1288
- );
1289
- result.y = Cartesian3_default.magnitude(
1290
- Cartesian3_default.fromElements(matrix[4], matrix[5], matrix[6], scratchColumn)
1291
- );
1292
- result.z = Cartesian3_default.magnitude(
1293
- Cartesian3_default.fromElements(matrix[8], matrix[9], matrix[10], scratchColumn)
1294
- );
1295
- return result;
1296
- };
1297
- var scaleScratch3 = new Cartesian3_default();
1298
- Matrix4.getMaximumScale = function(matrix) {
1299
- Matrix4.getScale(matrix, scaleScratch3);
1300
- return Cartesian3_default.maximumComponent(scaleScratch3);
1301
- };
1302
- var scaleScratch4 = new Cartesian3_default();
1303
- Matrix4.setRotation = function(matrix, rotation, result) {
1304
- Check_default.typeOf.object("matrix", matrix);
1305
- Check_default.typeOf.object("result", result);
1306
- const scale = Matrix4.getScale(matrix, scaleScratch4);
1307
- result[0] = rotation[0] * scale.x;
1308
- result[1] = rotation[1] * scale.x;
1309
- result[2] = rotation[2] * scale.x;
1310
- result[3] = matrix[3];
1311
- result[4] = rotation[3] * scale.y;
1312
- result[5] = rotation[4] * scale.y;
1313
- result[6] = rotation[5] * scale.y;
1314
- result[7] = matrix[7];
1315
- result[8] = rotation[6] * scale.z;
1316
- result[9] = rotation[7] * scale.z;
1317
- result[10] = rotation[8] * scale.z;
1318
- result[11] = matrix[11];
1319
- result[12] = matrix[12];
1320
- result[13] = matrix[13];
1321
- result[14] = matrix[14];
1322
- result[15] = matrix[15];
1323
- return result;
1324
- };
1325
- var scaleScratch5 = new Cartesian3_default();
1326
- Matrix4.getRotation = function(matrix, result) {
1327
- Check_default.typeOf.object("matrix", matrix);
1328
- Check_default.typeOf.object("result", result);
1329
- const scale = Matrix4.getScale(matrix, scaleScratch5);
1330
- result[0] = matrix[0] / scale.x;
1331
- result[1] = matrix[1] / scale.x;
1332
- result[2] = matrix[2] / scale.x;
1333
- result[3] = matrix[4] / scale.y;
1334
- result[4] = matrix[5] / scale.y;
1335
- result[5] = matrix[6] / scale.y;
1336
- result[6] = matrix[8] / scale.z;
1337
- result[7] = matrix[9] / scale.z;
1338
- result[8] = matrix[10] / scale.z;
1339
- return result;
1340
- };
1341
- Matrix4.multiply = function(left, right, result) {
1342
- Check_default.typeOf.object("left", left);
1343
- Check_default.typeOf.object("right", right);
1344
- Check_default.typeOf.object("result", result);
1345
- const left0 = left[0];
1346
- const left1 = left[1];
1347
- const left2 = left[2];
1348
- const left3 = left[3];
1349
- const left4 = left[4];
1350
- const left5 = left[5];
1351
- const left6 = left[6];
1352
- const left7 = left[7];
1353
- const left8 = left[8];
1354
- const left9 = left[9];
1355
- const left10 = left[10];
1356
- const left11 = left[11];
1357
- const left12 = left[12];
1358
- const left13 = left[13];
1359
- const left14 = left[14];
1360
- const left15 = left[15];
1361
- const right0 = right[0];
1362
- const right1 = right[1];
1363
- const right2 = right[2];
1364
- const right3 = right[3];
1365
- const right4 = right[4];
1366
- const right5 = right[5];
1367
- const right6 = right[6];
1368
- const right7 = right[7];
1369
- const right8 = right[8];
1370
- const right9 = right[9];
1371
- const right10 = right[10];
1372
- const right11 = right[11];
1373
- const right12 = right[12];
1374
- const right13 = right[13];
1375
- const right14 = right[14];
1376
- const right15 = right[15];
1377
- const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2 + left12 * right3;
1378
- const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2 + left13 * right3;
1379
- const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2 + left14 * right3;
1380
- const column0Row3 = left3 * right0 + left7 * right1 + left11 * right2 + left15 * right3;
1381
- const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6 + left12 * right7;
1382
- const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6 + left13 * right7;
1383
- const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6 + left14 * right7;
1384
- const column1Row3 = left3 * right4 + left7 * right5 + left11 * right6 + left15 * right7;
1385
- const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10 + left12 * right11;
1386
- const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10 + left13 * right11;
1387
- const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10 + left14 * right11;
1388
- const column2Row3 = left3 * right8 + left7 * right9 + left11 * right10 + left15 * right11;
1389
- const column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12 * right15;
1390
- const column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13 * right15;
1391
- const column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14 * right15;
1392
- const column3Row3 = left3 * right12 + left7 * right13 + left11 * right14 + left15 * right15;
1393
- result[0] = column0Row0;
1394
- result[1] = column0Row1;
1395
- result[2] = column0Row2;
1396
- result[3] = column0Row3;
1397
- result[4] = column1Row0;
1398
- result[5] = column1Row1;
1399
- result[6] = column1Row2;
1400
- result[7] = column1Row3;
1401
- result[8] = column2Row0;
1402
- result[9] = column2Row1;
1403
- result[10] = column2Row2;
1404
- result[11] = column2Row3;
1405
- result[12] = column3Row0;
1406
- result[13] = column3Row1;
1407
- result[14] = column3Row2;
1408
- result[15] = column3Row3;
1409
- return result;
1410
- };
1411
- Matrix4.add = function(left, right, result) {
1412
- Check_default.typeOf.object("left", left);
1413
- Check_default.typeOf.object("right", right);
1414
- Check_default.typeOf.object("result", result);
1415
- result[0] = left[0] + right[0];
1416
- result[1] = left[1] + right[1];
1417
- result[2] = left[2] + right[2];
1418
- result[3] = left[3] + right[3];
1419
- result[4] = left[4] + right[4];
1420
- result[5] = left[5] + right[5];
1421
- result[6] = left[6] + right[6];
1422
- result[7] = left[7] + right[7];
1423
- result[8] = left[8] + right[8];
1424
- result[9] = left[9] + right[9];
1425
- result[10] = left[10] + right[10];
1426
- result[11] = left[11] + right[11];
1427
- result[12] = left[12] + right[12];
1428
- result[13] = left[13] + right[13];
1429
- result[14] = left[14] + right[14];
1430
- result[15] = left[15] + right[15];
1431
- return result;
1432
- };
1433
- Matrix4.subtract = function(left, right, result) {
1434
- Check_default.typeOf.object("left", left);
1435
- Check_default.typeOf.object("right", right);
1436
- Check_default.typeOf.object("result", result);
1437
- result[0] = left[0] - right[0];
1438
- result[1] = left[1] - right[1];
1439
- result[2] = left[2] - right[2];
1440
- result[3] = left[3] - right[3];
1441
- result[4] = left[4] - right[4];
1442
- result[5] = left[5] - right[5];
1443
- result[6] = left[6] - right[6];
1444
- result[7] = left[7] - right[7];
1445
- result[8] = left[8] - right[8];
1446
- result[9] = left[9] - right[9];
1447
- result[10] = left[10] - right[10];
1448
- result[11] = left[11] - right[11];
1449
- result[12] = left[12] - right[12];
1450
- result[13] = left[13] - right[13];
1451
- result[14] = left[14] - right[14];
1452
- result[15] = left[15] - right[15];
1453
- return result;
1454
- };
1455
- Matrix4.multiplyTransformation = function(left, right, result) {
1456
- Check_default.typeOf.object("left", left);
1457
- Check_default.typeOf.object("right", right);
1458
- Check_default.typeOf.object("result", result);
1459
- const left0 = left[0];
1460
- const left1 = left[1];
1461
- const left2 = left[2];
1462
- const left4 = left[4];
1463
- const left5 = left[5];
1464
- const left6 = left[6];
1465
- const left8 = left[8];
1466
- const left9 = left[9];
1467
- const left10 = left[10];
1468
- const left12 = left[12];
1469
- const left13 = left[13];
1470
- const left14 = left[14];
1471
- const right0 = right[0];
1472
- const right1 = right[1];
1473
- const right2 = right[2];
1474
- const right4 = right[4];
1475
- const right5 = right[5];
1476
- const right6 = right[6];
1477
- const right8 = right[8];
1478
- const right9 = right[9];
1479
- const right10 = right[10];
1480
- const right12 = right[12];
1481
- const right13 = right[13];
1482
- const right14 = right[14];
1483
- const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;
1484
- const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;
1485
- const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;
1486
- const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;
1487
- const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;
1488
- const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;
1489
- const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;
1490
- const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;
1491
- const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;
1492
- const column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12;
1493
- const column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13;
1494
- const column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14;
1495
- result[0] = column0Row0;
1496
- result[1] = column0Row1;
1497
- result[2] = column0Row2;
1498
- result[3] = 0;
1499
- result[4] = column1Row0;
1500
- result[5] = column1Row1;
1501
- result[6] = column1Row2;
1502
- result[7] = 0;
1503
- result[8] = column2Row0;
1504
- result[9] = column2Row1;
1505
- result[10] = column2Row2;
1506
- result[11] = 0;
1507
- result[12] = column3Row0;
1508
- result[13] = column3Row1;
1509
- result[14] = column3Row2;
1510
- result[15] = 1;
1511
- return result;
1512
- };
1513
- Matrix4.multiplyByMatrix3 = function(matrix, rotation, result) {
1514
- Check_default.typeOf.object("matrix", matrix);
1515
- Check_default.typeOf.object("rotation", rotation);
1516
- Check_default.typeOf.object("result", result);
1517
- const left0 = matrix[0];
1518
- const left1 = matrix[1];
1519
- const left2 = matrix[2];
1520
- const left4 = matrix[4];
1521
- const left5 = matrix[5];
1522
- const left6 = matrix[6];
1523
- const left8 = matrix[8];
1524
- const left9 = matrix[9];
1525
- const left10 = matrix[10];
1526
- const right0 = rotation[0];
1527
- const right1 = rotation[1];
1528
- const right2 = rotation[2];
1529
- const right4 = rotation[3];
1530
- const right5 = rotation[4];
1531
- const right6 = rotation[5];
1532
- const right8 = rotation[6];
1533
- const right9 = rotation[7];
1534
- const right10 = rotation[8];
1535
- const column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;
1536
- const column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;
1537
- const column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;
1538
- const column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;
1539
- const column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;
1540
- const column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;
1541
- const column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;
1542
- const column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;
1543
- const column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;
1544
- result[0] = column0Row0;
1545
- result[1] = column0Row1;
1546
- result[2] = column0Row2;
1547
- result[3] = 0;
1548
- result[4] = column1Row0;
1549
- result[5] = column1Row1;
1550
- result[6] = column1Row2;
1551
- result[7] = 0;
1552
- result[8] = column2Row0;
1553
- result[9] = column2Row1;
1554
- result[10] = column2Row2;
1555
- result[11] = 0;
1556
- result[12] = matrix[12];
1557
- result[13] = matrix[13];
1558
- result[14] = matrix[14];
1559
- result[15] = matrix[15];
1560
- return result;
1561
- };
1562
- Matrix4.multiplyByTranslation = function(matrix, translation, result) {
1563
- Check_default.typeOf.object("matrix", matrix);
1564
- Check_default.typeOf.object("translation", translation);
1565
- Check_default.typeOf.object("result", result);
1566
- const x = translation.x;
1567
- const y = translation.y;
1568
- const z = translation.z;
1569
- const tx = x * matrix[0] + y * matrix[4] + z * matrix[8] + matrix[12];
1570
- const ty = x * matrix[1] + y * matrix[5] + z * matrix[9] + matrix[13];
1571
- const tz = x * matrix[2] + y * matrix[6] + z * matrix[10] + matrix[14];
1572
- result[0] = matrix[0];
1573
- result[1] = matrix[1];
1574
- result[2] = matrix[2];
1575
- result[3] = matrix[3];
1576
- result[4] = matrix[4];
1577
- result[5] = matrix[5];
1578
- result[6] = matrix[6];
1579
- result[7] = matrix[7];
1580
- result[8] = matrix[8];
1581
- result[9] = matrix[9];
1582
- result[10] = matrix[10];
1583
- result[11] = matrix[11];
1584
- result[12] = tx;
1585
- result[13] = ty;
1586
- result[14] = tz;
1587
- result[15] = matrix[15];
1588
- return result;
1589
- };
1590
- Matrix4.multiplyByScale = function(matrix, scale, result) {
1591
- Check_default.typeOf.object("matrix", matrix);
1592
- Check_default.typeOf.object("scale", scale);
1593
- Check_default.typeOf.object("result", result);
1594
- const scaleX = scale.x;
1595
- const scaleY = scale.y;
1596
- const scaleZ = scale.z;
1597
- if (scaleX === 1 && scaleY === 1 && scaleZ === 1) {
1598
- return Matrix4.clone(matrix, result);
1599
- }
1600
- result[0] = scaleX * matrix[0];
1601
- result[1] = scaleX * matrix[1];
1602
- result[2] = scaleX * matrix[2];
1603
- result[3] = matrix[3];
1604
- result[4] = scaleY * matrix[4];
1605
- result[5] = scaleY * matrix[5];
1606
- result[6] = scaleY * matrix[6];
1607
- result[7] = matrix[7];
1608
- result[8] = scaleZ * matrix[8];
1609
- result[9] = scaleZ * matrix[9];
1610
- result[10] = scaleZ * matrix[10];
1611
- result[11] = matrix[11];
1612
- result[12] = matrix[12];
1613
- result[13] = matrix[13];
1614
- result[14] = matrix[14];
1615
- result[15] = matrix[15];
1616
- return result;
1617
- };
1618
- Matrix4.multiplyByUniformScale = function(matrix, scale, result) {
1619
- Check_default.typeOf.object("matrix", matrix);
1620
- Check_default.typeOf.number("scale", scale);
1621
- Check_default.typeOf.object("result", result);
1622
- result[0] = matrix[0] * scale;
1623
- result[1] = matrix[1] * scale;
1624
- result[2] = matrix[2] * scale;
1625
- result[3] = matrix[3];
1626
- result[4] = matrix[4] * scale;
1627
- result[5] = matrix[5] * scale;
1628
- result[6] = matrix[6] * scale;
1629
- result[7] = matrix[7];
1630
- result[8] = matrix[8] * scale;
1631
- result[9] = matrix[9] * scale;
1632
- result[10] = matrix[10] * scale;
1633
- result[11] = matrix[11];
1634
- result[12] = matrix[12];
1635
- result[13] = matrix[13];
1636
- result[14] = matrix[14];
1637
- result[15] = matrix[15];
1638
- return result;
1639
- };
1640
- Matrix4.multiplyByVector = function(matrix, cartesian, result) {
1641
- Check_default.typeOf.object("matrix", matrix);
1642
- Check_default.typeOf.object("cartesian", cartesian);
1643
- Check_default.typeOf.object("result", result);
1644
- const vX = cartesian.x;
1645
- const vY = cartesian.y;
1646
- const vZ = cartesian.z;
1647
- const vW = cartesian.w;
1648
- const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12] * vW;
1649
- const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13] * vW;
1650
- const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14] * vW;
1651
- const w = matrix[3] * vX + matrix[7] * vY + matrix[11] * vZ + matrix[15] * vW;
1652
- result.x = x;
1653
- result.y = y;
1654
- result.z = z;
1655
- result.w = w;
1656
- return result;
1657
- };
1658
- Matrix4.multiplyByPointAsVector = function(matrix, cartesian, result) {
1659
- Check_default.typeOf.object("matrix", matrix);
1660
- Check_default.typeOf.object("cartesian", cartesian);
1661
- Check_default.typeOf.object("result", result);
1662
- const vX = cartesian.x;
1663
- const vY = cartesian.y;
1664
- const vZ = cartesian.z;
1665
- const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ;
1666
- const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ;
1667
- const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ;
1668
- result.x = x;
1669
- result.y = y;
1670
- result.z = z;
1671
- return result;
1672
- };
1673
- Matrix4.multiplyByPoint = function(matrix, cartesian, result) {
1674
- Check_default.typeOf.object("matrix", matrix);
1675
- Check_default.typeOf.object("cartesian", cartesian);
1676
- Check_default.typeOf.object("result", result);
1677
- const vX = cartesian.x;
1678
- const vY = cartesian.y;
1679
- const vZ = cartesian.z;
1680
- const x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12];
1681
- const y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13];
1682
- const z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14];
1683
- result.x = x;
1684
- result.y = y;
1685
- result.z = z;
1686
- return result;
1687
- };
1688
- Matrix4.multiplyByScalar = function(matrix, scalar, result) {
1689
- Check_default.typeOf.object("matrix", matrix);
1690
- Check_default.typeOf.number("scalar", scalar);
1691
- Check_default.typeOf.object("result", result);
1692
- result[0] = matrix[0] * scalar;
1693
- result[1] = matrix[1] * scalar;
1694
- result[2] = matrix[2] * scalar;
1695
- result[3] = matrix[3] * scalar;
1696
- result[4] = matrix[4] * scalar;
1697
- result[5] = matrix[5] * scalar;
1698
- result[6] = matrix[6] * scalar;
1699
- result[7] = matrix[7] * scalar;
1700
- result[8] = matrix[8] * scalar;
1701
- result[9] = matrix[9] * scalar;
1702
- result[10] = matrix[10] * scalar;
1703
- result[11] = matrix[11] * scalar;
1704
- result[12] = matrix[12] * scalar;
1705
- result[13] = matrix[13] * scalar;
1706
- result[14] = matrix[14] * scalar;
1707
- result[15] = matrix[15] * scalar;
1708
- return result;
1709
- };
1710
- Matrix4.negate = function(matrix, result) {
1711
- Check_default.typeOf.object("matrix", matrix);
1712
- Check_default.typeOf.object("result", result);
1713
- result[0] = -matrix[0];
1714
- result[1] = -matrix[1];
1715
- result[2] = -matrix[2];
1716
- result[3] = -matrix[3];
1717
- result[4] = -matrix[4];
1718
- result[5] = -matrix[5];
1719
- result[6] = -matrix[6];
1720
- result[7] = -matrix[7];
1721
- result[8] = -matrix[8];
1722
- result[9] = -matrix[9];
1723
- result[10] = -matrix[10];
1724
- result[11] = -matrix[11];
1725
- result[12] = -matrix[12];
1726
- result[13] = -matrix[13];
1727
- result[14] = -matrix[14];
1728
- result[15] = -matrix[15];
1729
- return result;
1730
- };
1731
- Matrix4.transpose = function(matrix, result) {
1732
- Check_default.typeOf.object("matrix", matrix);
1733
- Check_default.typeOf.object("result", result);
1734
- const matrix1 = matrix[1];
1735
- const matrix2 = matrix[2];
1736
- const matrix3 = matrix[3];
1737
- const matrix6 = matrix[6];
1738
- const matrix7 = matrix[7];
1739
- const matrix11 = matrix[11];
1740
- result[0] = matrix[0];
1741
- result[1] = matrix[4];
1742
- result[2] = matrix[8];
1743
- result[3] = matrix[12];
1744
- result[4] = matrix1;
1745
- result[5] = matrix[5];
1746
- result[6] = matrix[9];
1747
- result[7] = matrix[13];
1748
- result[8] = matrix2;
1749
- result[9] = matrix6;
1750
- result[10] = matrix[10];
1751
- result[11] = matrix[14];
1752
- result[12] = matrix3;
1753
- result[13] = matrix7;
1754
- result[14] = matrix11;
1755
- result[15] = matrix[15];
1756
- return result;
1757
- };
1758
- Matrix4.abs = function(matrix, result) {
1759
- Check_default.typeOf.object("matrix", matrix);
1760
- Check_default.typeOf.object("result", result);
1761
- result[0] = Math.abs(matrix[0]);
1762
- result[1] = Math.abs(matrix[1]);
1763
- result[2] = Math.abs(matrix[2]);
1764
- result[3] = Math.abs(matrix[3]);
1765
- result[4] = Math.abs(matrix[4]);
1766
- result[5] = Math.abs(matrix[5]);
1767
- result[6] = Math.abs(matrix[6]);
1768
- result[7] = Math.abs(matrix[7]);
1769
- result[8] = Math.abs(matrix[8]);
1770
- result[9] = Math.abs(matrix[9]);
1771
- result[10] = Math.abs(matrix[10]);
1772
- result[11] = Math.abs(matrix[11]);
1773
- result[12] = Math.abs(matrix[12]);
1774
- result[13] = Math.abs(matrix[13]);
1775
- result[14] = Math.abs(matrix[14]);
1776
- result[15] = Math.abs(matrix[15]);
1777
- return result;
1778
- };
1779
- Matrix4.equals = function(left, right) {
1780
- return left === right || defined_default(left) && defined_default(right) && // Translation
1781
- left[12] === right[12] && left[13] === right[13] && left[14] === right[14] && // Rotation/scale
1782
- left[0] === right[0] && left[1] === right[1] && left[2] === right[2] && left[4] === right[4] && left[5] === right[5] && left[6] === right[6] && left[8] === right[8] && left[9] === right[9] && left[10] === right[10] && // Bottom row
1783
- left[3] === right[3] && left[7] === right[7] && left[11] === right[11] && left[15] === right[15];
1784
- };
1785
- Matrix4.equalsEpsilon = function(left, right, epsilon) {
1786
- epsilon = defaultValue_default(epsilon, 0);
1787
- 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 && Math.abs(left[9] - right[9]) <= epsilon && Math.abs(left[10] - right[10]) <= epsilon && Math.abs(left[11] - right[11]) <= epsilon && Math.abs(left[12] - right[12]) <= epsilon && Math.abs(left[13] - right[13]) <= epsilon && Math.abs(left[14] - right[14]) <= epsilon && Math.abs(left[15] - right[15]) <= epsilon;
1788
- };
1789
- Matrix4.getTranslation = function(matrix, result) {
1790
- Check_default.typeOf.object("matrix", matrix);
1791
- Check_default.typeOf.object("result", result);
1792
- result.x = matrix[12];
1793
- result.y = matrix[13];
1794
- result.z = matrix[14];
1795
- return result;
1796
- };
1797
- Matrix4.getMatrix3 = function(matrix, result) {
1798
- Check_default.typeOf.object("matrix", matrix);
1799
- Check_default.typeOf.object("result", result);
1800
- result[0] = matrix[0];
1801
- result[1] = matrix[1];
1802
- result[2] = matrix[2];
1803
- result[3] = matrix[4];
1804
- result[4] = matrix[5];
1805
- result[5] = matrix[6];
1806
- result[6] = matrix[8];
1807
- result[7] = matrix[9];
1808
- result[8] = matrix[10];
1809
- return result;
1810
- };
1811
- var scratchInverseRotation = new Matrix3_default();
1812
- var scratchMatrix3Zero = new Matrix3_default();
1813
- var scratchBottomRow = new Cartesian4_default();
1814
- var scratchExpectedBottomRow = new Cartesian4_default(0, 0, 0, 1);
1815
- Matrix4.inverse = function(matrix, result) {
1816
- Check_default.typeOf.object("matrix", matrix);
1817
- Check_default.typeOf.object("result", result);
1818
- const src0 = matrix[0];
1819
- const src1 = matrix[4];
1820
- const src2 = matrix[8];
1821
- const src3 = matrix[12];
1822
- const src4 = matrix[1];
1823
- const src5 = matrix[5];
1824
- const src6 = matrix[9];
1825
- const src7 = matrix[13];
1826
- const src8 = matrix[2];
1827
- const src9 = matrix[6];
1828
- const src10 = matrix[10];
1829
- const src11 = matrix[14];
1830
- const src12 = matrix[3];
1831
- const src13 = matrix[7];
1832
- const src14 = matrix[11];
1833
- const src15 = matrix[15];
1834
- let tmp0 = src10 * src15;
1835
- let tmp1 = src11 * src14;
1836
- let tmp2 = src9 * src15;
1837
- let tmp3 = src11 * src13;
1838
- let tmp4 = src9 * src14;
1839
- let tmp5 = src10 * src13;
1840
- let tmp6 = src8 * src15;
1841
- let tmp7 = src11 * src12;
1842
- let tmp8 = src8 * src14;
1843
- let tmp9 = src10 * src12;
1844
- let tmp10 = src8 * src13;
1845
- let tmp11 = src9 * src12;
1846
- const dst0 = tmp0 * src5 + tmp3 * src6 + tmp4 * src7 - (tmp1 * src5 + tmp2 * src6 + tmp5 * src7);
1847
- const dst1 = tmp1 * src4 + tmp6 * src6 + tmp9 * src7 - (tmp0 * src4 + tmp7 * src6 + tmp8 * src7);
1848
- const dst2 = tmp2 * src4 + tmp7 * src5 + tmp10 * src7 - (tmp3 * src4 + tmp6 * src5 + tmp11 * src7);
1849
- const dst3 = tmp5 * src4 + tmp8 * src5 + tmp11 * src6 - (tmp4 * src4 + tmp9 * src5 + tmp10 * src6);
1850
- const dst4 = tmp1 * src1 + tmp2 * src2 + tmp5 * src3 - (tmp0 * src1 + tmp3 * src2 + tmp4 * src3);
1851
- const dst5 = tmp0 * src0 + tmp7 * src2 + tmp8 * src3 - (tmp1 * src0 + tmp6 * src2 + tmp9 * src3);
1852
- const dst6 = tmp3 * src0 + tmp6 * src1 + tmp11 * src3 - (tmp2 * src0 + tmp7 * src1 + tmp10 * src3);
1853
- const dst7 = tmp4 * src0 + tmp9 * src1 + tmp10 * src2 - (tmp5 * src0 + tmp8 * src1 + tmp11 * src2);
1854
- tmp0 = src2 * src7;
1855
- tmp1 = src3 * src6;
1856
- tmp2 = src1 * src7;
1857
- tmp3 = src3 * src5;
1858
- tmp4 = src1 * src6;
1859
- tmp5 = src2 * src5;
1860
- tmp6 = src0 * src7;
1861
- tmp7 = src3 * src4;
1862
- tmp8 = src0 * src6;
1863
- tmp9 = src2 * src4;
1864
- tmp10 = src0 * src5;
1865
- tmp11 = src1 * src4;
1866
- const dst8 = tmp0 * src13 + tmp3 * src14 + tmp4 * src15 - (tmp1 * src13 + tmp2 * src14 + tmp5 * src15);
1867
- const dst9 = tmp1 * src12 + tmp6 * src14 + tmp9 * src15 - (tmp0 * src12 + tmp7 * src14 + tmp8 * src15);
1868
- const dst10 = tmp2 * src12 + tmp7 * src13 + tmp10 * src15 - (tmp3 * src12 + tmp6 * src13 + tmp11 * src15);
1869
- const dst11 = tmp5 * src12 + tmp8 * src13 + tmp11 * src14 - (tmp4 * src12 + tmp9 * src13 + tmp10 * src14);
1870
- const dst12 = tmp2 * src10 + tmp5 * src11 + tmp1 * src9 - (tmp4 * src11 + tmp0 * src9 + tmp3 * src10);
1871
- const dst13 = tmp8 * src11 + tmp0 * src8 + tmp7 * src10 - (tmp6 * src10 + tmp9 * src11 + tmp1 * src8);
1872
- const dst14 = tmp6 * src9 + tmp11 * src11 + tmp3 * src8 - (tmp10 * src11 + tmp2 * src8 + tmp7 * src9);
1873
- const dst15 = tmp10 * src10 + tmp4 * src8 + tmp9 * src9 - (tmp8 * src9 + tmp11 * src10 + tmp5 * src8);
1874
- let det = src0 * dst0 + src1 * dst1 + src2 * dst2 + src3 * dst3;
1875
- if (Math.abs(det) < Math_default.EPSILON21) {
1876
- if (Matrix3_default.equalsEpsilon(
1877
- Matrix4.getMatrix3(matrix, scratchInverseRotation),
1878
- scratchMatrix3Zero,
1879
- Math_default.EPSILON7
1880
- ) && Cartesian4_default.equals(
1881
- Matrix4.getRow(matrix, 3, scratchBottomRow),
1882
- scratchExpectedBottomRow
1883
- )) {
1884
- result[0] = 0;
1885
- result[1] = 0;
1886
- result[2] = 0;
1887
- result[3] = 0;
1888
- result[4] = 0;
1889
- result[5] = 0;
1890
- result[6] = 0;
1891
- result[7] = 0;
1892
- result[8] = 0;
1893
- result[9] = 0;
1894
- result[10] = 0;
1895
- result[11] = 0;
1896
- result[12] = -matrix[12];
1897
- result[13] = -matrix[13];
1898
- result[14] = -matrix[14];
1899
- result[15] = 1;
1900
- return result;
1901
- }
1902
- throw new RuntimeError_default(
1903
- "matrix is not invertible because its determinate is zero."
1904
- );
1905
- }
1906
- det = 1 / det;
1907
- result[0] = dst0 * det;
1908
- result[1] = dst1 * det;
1909
- result[2] = dst2 * det;
1910
- result[3] = dst3 * det;
1911
- result[4] = dst4 * det;
1912
- result[5] = dst5 * det;
1913
- result[6] = dst6 * det;
1914
- result[7] = dst7 * det;
1915
- result[8] = dst8 * det;
1916
- result[9] = dst9 * det;
1917
- result[10] = dst10 * det;
1918
- result[11] = dst11 * det;
1919
- result[12] = dst12 * det;
1920
- result[13] = dst13 * det;
1921
- result[14] = dst14 * det;
1922
- result[15] = dst15 * det;
1923
- return result;
1924
- };
1925
- Matrix4.inverseTransformation = function(matrix, result) {
1926
- Check_default.typeOf.object("matrix", matrix);
1927
- Check_default.typeOf.object("result", result);
1928
- const matrix0 = matrix[0];
1929
- const matrix1 = matrix[1];
1930
- const matrix2 = matrix[2];
1931
- const matrix4 = matrix[4];
1932
- const matrix5 = matrix[5];
1933
- const matrix6 = matrix[6];
1934
- const matrix8 = matrix[8];
1935
- const matrix9 = matrix[9];
1936
- const matrix10 = matrix[10];
1937
- const vX = matrix[12];
1938
- const vY = matrix[13];
1939
- const vZ = matrix[14];
1940
- const x = -matrix0 * vX - matrix1 * vY - matrix2 * vZ;
1941
- const y = -matrix4 * vX - matrix5 * vY - matrix6 * vZ;
1942
- const z = -matrix8 * vX - matrix9 * vY - matrix10 * vZ;
1943
- result[0] = matrix0;
1944
- result[1] = matrix4;
1945
- result[2] = matrix8;
1946
- result[3] = 0;
1947
- result[4] = matrix1;
1948
- result[5] = matrix5;
1949
- result[6] = matrix9;
1950
- result[7] = 0;
1951
- result[8] = matrix2;
1952
- result[9] = matrix6;
1953
- result[10] = matrix10;
1954
- result[11] = 0;
1955
- result[12] = x;
1956
- result[13] = y;
1957
- result[14] = z;
1958
- result[15] = 1;
1959
- return result;
1960
- };
1961
- var scratchTransposeMatrix = new Matrix4();
1962
- Matrix4.inverseTranspose = function(matrix, result) {
1963
- Check_default.typeOf.object("matrix", matrix);
1964
- Check_default.typeOf.object("result", result);
1965
- return Matrix4.inverse(
1966
- Matrix4.transpose(matrix, scratchTransposeMatrix),
1967
- result
1968
- );
1969
- };
1970
- Matrix4.IDENTITY = Object.freeze(
1971
- new Matrix4(
1972
- 1,
1973
- 0,
1974
- 0,
1975
- 0,
1976
- 0,
1977
- 1,
1978
- 0,
1979
- 0,
1980
- 0,
1981
- 0,
1982
- 1,
1983
- 0,
1984
- 0,
1985
- 0,
1986
- 0,
1987
- 1
1988
- )
1989
- );
1990
- Matrix4.ZERO = Object.freeze(
1991
- new Matrix4(
1992
- 0,
1993
- 0,
1994
- 0,
1995
- 0,
1996
- 0,
1997
- 0,
1998
- 0,
1999
- 0,
2000
- 0,
2001
- 0,
2002
- 0,
2003
- 0,
2004
- 0,
2005
- 0,
2006
- 0,
2007
- 0
2008
- )
2009
- );
2010
- Matrix4.COLUMN0ROW0 = 0;
2011
- Matrix4.COLUMN0ROW1 = 1;
2012
- Matrix4.COLUMN0ROW2 = 2;
2013
- Matrix4.COLUMN0ROW3 = 3;
2014
- Matrix4.COLUMN1ROW0 = 4;
2015
- Matrix4.COLUMN1ROW1 = 5;
2016
- Matrix4.COLUMN1ROW2 = 6;
2017
- Matrix4.COLUMN1ROW3 = 7;
2018
- Matrix4.COLUMN2ROW0 = 8;
2019
- Matrix4.COLUMN2ROW1 = 9;
2020
- Matrix4.COLUMN2ROW2 = 10;
2021
- Matrix4.COLUMN2ROW3 = 11;
2022
- Matrix4.COLUMN3ROW0 = 12;
2023
- Matrix4.COLUMN3ROW1 = 13;
2024
- Matrix4.COLUMN3ROW2 = 14;
2025
- Matrix4.COLUMN3ROW3 = 15;
2026
- Object.defineProperties(Matrix4.prototype, {
2027
- /**
2028
- * Gets the number of items in the collection.
2029
- * @memberof Matrix4.prototype
2030
- *
2031
- * @type {number}
2032
- */
2033
- length: {
2034
- get: function() {
2035
- return Matrix4.packedLength;
2036
- }
2037
- }
2038
- });
2039
- Matrix4.prototype.clone = function(result) {
2040
- return Matrix4.clone(this, result);
2041
- };
2042
- Matrix4.prototype.equals = function(right) {
2043
- return Matrix4.equals(this, right);
2044
- };
2045
- Matrix4.equalsArray = function(matrix, array, offset) {
2046
- 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] && matrix[9] === array[offset + 9] && matrix[10] === array[offset + 10] && matrix[11] === array[offset + 11] && matrix[12] === array[offset + 12] && matrix[13] === array[offset + 13] && matrix[14] === array[offset + 14] && matrix[15] === array[offset + 15];
2047
- };
2048
- Matrix4.prototype.equalsEpsilon = function(right, epsilon) {
2049
- return Matrix4.equalsEpsilon(this, right, epsilon);
2050
- };
2051
- Matrix4.prototype.toString = function() {
2052
- return `(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
2053
- (${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
2054
- (${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
2055
- (${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`;
2056
- };
2057
- var Matrix4_default = Matrix4;
2058
-
2059
- // packages/engine/Source/Core/Rectangle.js
2060
- function Rectangle(west, south, east, north) {
2061
- this.west = defaultValue_default(west, 0);
2062
- this.south = defaultValue_default(south, 0);
2063
- this.east = defaultValue_default(east, 0);
2064
- this.north = defaultValue_default(north, 0);
2065
- }
2066
- Object.defineProperties(Rectangle.prototype, {
2067
- /**
2068
- * Gets the width of the rectangle in radians.
2069
- * @memberof Rectangle.prototype
2070
- * @type {number}
2071
- * @readonly
2072
- */
2073
- width: {
2074
- get: function() {
2075
- return Rectangle.computeWidth(this);
2076
- }
2077
- },
2078
- /**
2079
- * Gets the height of the rectangle in radians.
2080
- * @memberof Rectangle.prototype
2081
- * @type {number}
2082
- * @readonly
2083
- */
2084
- height: {
2085
- get: function() {
2086
- return Rectangle.computeHeight(this);
2087
- }
2088
- }
2089
- });
2090
- Rectangle.packedLength = 4;
2091
- Rectangle.pack = function(value, array, startingIndex) {
2092
- Check_default.typeOf.object("value", value);
2093
- Check_default.defined("array", array);
2094
- startingIndex = defaultValue_default(startingIndex, 0);
2095
- array[startingIndex++] = value.west;
2096
- array[startingIndex++] = value.south;
2097
- array[startingIndex++] = value.east;
2098
- array[startingIndex] = value.north;
2099
- return array;
2100
- };
2101
- Rectangle.unpack = function(array, startingIndex, result) {
2102
- Check_default.defined("array", array);
2103
- startingIndex = defaultValue_default(startingIndex, 0);
2104
- if (!defined_default(result)) {
2105
- result = new Rectangle();
2106
- }
2107
- result.west = array[startingIndex++];
2108
- result.south = array[startingIndex++];
2109
- result.east = array[startingIndex++];
2110
- result.north = array[startingIndex];
2111
- return result;
2112
- };
2113
- Rectangle.computeWidth = function(rectangle) {
2114
- Check_default.typeOf.object("rectangle", rectangle);
2115
- let east = rectangle.east;
2116
- const west = rectangle.west;
2117
- if (east < west) {
2118
- east += Math_default.TWO_PI;
2119
- }
2120
- return east - west;
2121
- };
2122
- Rectangle.computeHeight = function(rectangle) {
2123
- Check_default.typeOf.object("rectangle", rectangle);
2124
- return rectangle.north - rectangle.south;
2125
- };
2126
- Rectangle.fromDegrees = function(west, south, east, north, result) {
2127
- west = Math_default.toRadians(defaultValue_default(west, 0));
2128
- south = Math_default.toRadians(defaultValue_default(south, 0));
2129
- east = Math_default.toRadians(defaultValue_default(east, 0));
2130
- north = Math_default.toRadians(defaultValue_default(north, 0));
2131
- if (!defined_default(result)) {
2132
- return new Rectangle(west, south, east, north);
2133
- }
2134
- result.west = west;
2135
- result.south = south;
2136
- result.east = east;
2137
- result.north = north;
2138
- return result;
2139
- };
2140
- Rectangle.fromRadians = function(west, south, east, north, result) {
2141
- if (!defined_default(result)) {
2142
- return new Rectangle(west, south, east, north);
2143
- }
2144
- result.west = defaultValue_default(west, 0);
2145
- result.south = defaultValue_default(south, 0);
2146
- result.east = defaultValue_default(east, 0);
2147
- result.north = defaultValue_default(north, 0);
2148
- return result;
2149
- };
2150
- Rectangle.fromCartographicArray = function(cartographics, result) {
2151
- Check_default.defined("cartographics", cartographics);
2152
- let west = Number.MAX_VALUE;
2153
- let east = -Number.MAX_VALUE;
2154
- let westOverIDL = Number.MAX_VALUE;
2155
- let eastOverIDL = -Number.MAX_VALUE;
2156
- let south = Number.MAX_VALUE;
2157
- let north = -Number.MAX_VALUE;
2158
- for (let i = 0, len = cartographics.length; i < len; i++) {
2159
- const position = cartographics[i];
2160
- west = Math.min(west, position.longitude);
2161
- east = Math.max(east, position.longitude);
2162
- south = Math.min(south, position.latitude);
2163
- north = Math.max(north, position.latitude);
2164
- const lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + Math_default.TWO_PI;
2165
- westOverIDL = Math.min(westOverIDL, lonAdjusted);
2166
- eastOverIDL = Math.max(eastOverIDL, lonAdjusted);
2167
- }
2168
- if (east - west > eastOverIDL - westOverIDL) {
2169
- west = westOverIDL;
2170
- east = eastOverIDL;
2171
- if (east > Math_default.PI) {
2172
- east = east - Math_default.TWO_PI;
2173
- }
2174
- if (west > Math_default.PI) {
2175
- west = west - Math_default.TWO_PI;
2176
- }
2177
- }
2178
- if (!defined_default(result)) {
2179
- return new Rectangle(west, south, east, north);
2180
- }
2181
- result.west = west;
2182
- result.south = south;
2183
- result.east = east;
2184
- result.north = north;
2185
- return result;
2186
- };
2187
- Rectangle.fromCartesianArray = function(cartesians, ellipsoid, result) {
2188
- Check_default.defined("cartesians", cartesians);
2189
- ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84);
2190
- let west = Number.MAX_VALUE;
2191
- let east = -Number.MAX_VALUE;
2192
- let westOverIDL = Number.MAX_VALUE;
2193
- let eastOverIDL = -Number.MAX_VALUE;
2194
- let south = Number.MAX_VALUE;
2195
- let north = -Number.MAX_VALUE;
2196
- for (let i = 0, len = cartesians.length; i < len; i++) {
2197
- const position = ellipsoid.cartesianToCartographic(cartesians[i]);
2198
- west = Math.min(west, position.longitude);
2199
- east = Math.max(east, position.longitude);
2200
- south = Math.min(south, position.latitude);
2201
- north = Math.max(north, position.latitude);
2202
- const lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + Math_default.TWO_PI;
2203
- westOverIDL = Math.min(westOverIDL, lonAdjusted);
2204
- eastOverIDL = Math.max(eastOverIDL, lonAdjusted);
2205
- }
2206
- if (east - west > eastOverIDL - westOverIDL) {
2207
- west = westOverIDL;
2208
- east = eastOverIDL;
2209
- if (east > Math_default.PI) {
2210
- east = east - Math_default.TWO_PI;
2211
- }
2212
- if (west > Math_default.PI) {
2213
- west = west - Math_default.TWO_PI;
2214
- }
2215
- }
2216
- if (!defined_default(result)) {
2217
- return new Rectangle(west, south, east, north);
2218
- }
2219
- result.west = west;
2220
- result.south = south;
2221
- result.east = east;
2222
- result.north = north;
2223
- return result;
2224
- };
2225
- Rectangle.clone = function(rectangle, result) {
2226
- if (!defined_default(rectangle)) {
2227
- return void 0;
2228
- }
2229
- if (!defined_default(result)) {
2230
- return new Rectangle(
2231
- rectangle.west,
2232
- rectangle.south,
2233
- rectangle.east,
2234
- rectangle.north
2235
- );
2236
- }
2237
- result.west = rectangle.west;
2238
- result.south = rectangle.south;
2239
- result.east = rectangle.east;
2240
- result.north = rectangle.north;
2241
- return result;
2242
- };
2243
- Rectangle.equalsEpsilon = function(left, right, absoluteEpsilon) {
2244
- absoluteEpsilon = defaultValue_default(absoluteEpsilon, 0);
2245
- return left === right || defined_default(left) && defined_default(right) && Math.abs(left.west - right.west) <= absoluteEpsilon && Math.abs(left.south - right.south) <= absoluteEpsilon && Math.abs(left.east - right.east) <= absoluteEpsilon && Math.abs(left.north - right.north) <= absoluteEpsilon;
2246
- };
2247
- Rectangle.prototype.clone = function(result) {
2248
- return Rectangle.clone(this, result);
2249
- };
2250
- Rectangle.prototype.equals = function(other) {
2251
- return Rectangle.equals(this, other);
2252
- };
2253
- Rectangle.equals = function(left, right) {
2254
- return left === right || defined_default(left) && defined_default(right) && left.west === right.west && left.south === right.south && left.east === right.east && left.north === right.north;
2255
- };
2256
- Rectangle.prototype.equalsEpsilon = function(other, epsilon) {
2257
- return Rectangle.equalsEpsilon(this, other, epsilon);
2258
- };
2259
- Rectangle.validate = function(rectangle) {
2260
- Check_default.typeOf.object("rectangle", rectangle);
2261
- const north = rectangle.north;
2262
- Check_default.typeOf.number.greaterThanOrEquals(
2263
- "north",
2264
- north,
2265
- -Math_default.PI_OVER_TWO
2266
- );
2267
- Check_default.typeOf.number.lessThanOrEquals("north", north, Math_default.PI_OVER_TWO);
2268
- const south = rectangle.south;
2269
- Check_default.typeOf.number.greaterThanOrEquals(
2270
- "south",
2271
- south,
2272
- -Math_default.PI_OVER_TWO
2273
- );
2274
- Check_default.typeOf.number.lessThanOrEquals("south", south, Math_default.PI_OVER_TWO);
2275
- const west = rectangle.west;
2276
- Check_default.typeOf.number.greaterThanOrEquals("west", west, -Math.PI);
2277
- Check_default.typeOf.number.lessThanOrEquals("west", west, Math.PI);
2278
- const east = rectangle.east;
2279
- Check_default.typeOf.number.greaterThanOrEquals("east", east, -Math.PI);
2280
- Check_default.typeOf.number.lessThanOrEquals("east", east, Math.PI);
2281
- };
2282
- Rectangle.southwest = function(rectangle, result) {
2283
- Check_default.typeOf.object("rectangle", rectangle);
2284
- if (!defined_default(result)) {
2285
- return new Cartographic_default(rectangle.west, rectangle.south);
2286
- }
2287
- result.longitude = rectangle.west;
2288
- result.latitude = rectangle.south;
2289
- result.height = 0;
2290
- return result;
2291
- };
2292
- Rectangle.northwest = function(rectangle, result) {
2293
- Check_default.typeOf.object("rectangle", rectangle);
2294
- if (!defined_default(result)) {
2295
- return new Cartographic_default(rectangle.west, rectangle.north);
2296
- }
2297
- result.longitude = rectangle.west;
2298
- result.latitude = rectangle.north;
2299
- result.height = 0;
2300
- return result;
2301
- };
2302
- Rectangle.northeast = function(rectangle, result) {
2303
- Check_default.typeOf.object("rectangle", rectangle);
2304
- if (!defined_default(result)) {
2305
- return new Cartographic_default(rectangle.east, rectangle.north);
2306
- }
2307
- result.longitude = rectangle.east;
2308
- result.latitude = rectangle.north;
2309
- result.height = 0;
2310
- return result;
2311
- };
2312
- Rectangle.southeast = function(rectangle, result) {
2313
- Check_default.typeOf.object("rectangle", rectangle);
2314
- if (!defined_default(result)) {
2315
- return new Cartographic_default(rectangle.east, rectangle.south);
2316
- }
2317
- result.longitude = rectangle.east;
2318
- result.latitude = rectangle.south;
2319
- result.height = 0;
2320
- return result;
2321
- };
2322
- Rectangle.center = function(rectangle, result) {
2323
- Check_default.typeOf.object("rectangle", rectangle);
2324
- let east = rectangle.east;
2325
- const west = rectangle.west;
2326
- if (east < west) {
2327
- east += Math_default.TWO_PI;
2328
- }
2329
- const longitude = Math_default.negativePiToPi((west + east) * 0.5);
2330
- const latitude = (rectangle.south + rectangle.north) * 0.5;
2331
- if (!defined_default(result)) {
2332
- return new Cartographic_default(longitude, latitude);
2333
- }
2334
- result.longitude = longitude;
2335
- result.latitude = latitude;
2336
- result.height = 0;
2337
- return result;
2338
- };
2339
- Rectangle.intersection = function(rectangle, otherRectangle, result) {
2340
- Check_default.typeOf.object("rectangle", rectangle);
2341
- Check_default.typeOf.object("otherRectangle", otherRectangle);
2342
- let rectangleEast = rectangle.east;
2343
- let rectangleWest = rectangle.west;
2344
- let otherRectangleEast = otherRectangle.east;
2345
- let otherRectangleWest = otherRectangle.west;
2346
- if (rectangleEast < rectangleWest && otherRectangleEast > 0) {
2347
- rectangleEast += Math_default.TWO_PI;
2348
- } else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0) {
2349
- otherRectangleEast += Math_default.TWO_PI;
2350
- }
2351
- if (rectangleEast < rectangleWest && otherRectangleWest < 0) {
2352
- otherRectangleWest += Math_default.TWO_PI;
2353
- } else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0) {
2354
- rectangleWest += Math_default.TWO_PI;
2355
- }
2356
- const west = Math_default.negativePiToPi(
2357
- Math.max(rectangleWest, otherRectangleWest)
2358
- );
2359
- const east = Math_default.negativePiToPi(
2360
- Math.min(rectangleEast, otherRectangleEast)
2361
- );
2362
- if ((rectangle.west < rectangle.east || otherRectangle.west < otherRectangle.east) && east <= west) {
2363
- return void 0;
2364
- }
2365
- const south = Math.max(rectangle.south, otherRectangle.south);
2366
- const north = Math.min(rectangle.north, otherRectangle.north);
2367
- if (south >= north) {
2368
- return void 0;
2369
- }
2370
- if (!defined_default(result)) {
2371
- return new Rectangle(west, south, east, north);
2372
- }
2373
- result.west = west;
2374
- result.south = south;
2375
- result.east = east;
2376
- result.north = north;
2377
- return result;
2378
- };
2379
- Rectangle.simpleIntersection = function(rectangle, otherRectangle, result) {
2380
- Check_default.typeOf.object("rectangle", rectangle);
2381
- Check_default.typeOf.object("otherRectangle", otherRectangle);
2382
- const west = Math.max(rectangle.west, otherRectangle.west);
2383
- const south = Math.max(rectangle.south, otherRectangle.south);
2384
- const east = Math.min(rectangle.east, otherRectangle.east);
2385
- const north = Math.min(rectangle.north, otherRectangle.north);
2386
- if (south >= north || west >= east) {
2387
- return void 0;
2388
- }
2389
- if (!defined_default(result)) {
2390
- return new Rectangle(west, south, east, north);
2391
- }
2392
- result.west = west;
2393
- result.south = south;
2394
- result.east = east;
2395
- result.north = north;
2396
- return result;
2397
- };
2398
- Rectangle.union = function(rectangle, otherRectangle, result) {
2399
- Check_default.typeOf.object("rectangle", rectangle);
2400
- Check_default.typeOf.object("otherRectangle", otherRectangle);
2401
- if (!defined_default(result)) {
2402
- result = new Rectangle();
2403
- }
2404
- let rectangleEast = rectangle.east;
2405
- let rectangleWest = rectangle.west;
2406
- let otherRectangleEast = otherRectangle.east;
2407
- let otherRectangleWest = otherRectangle.west;
2408
- if (rectangleEast < rectangleWest && otherRectangleEast > 0) {
2409
- rectangleEast += Math_default.TWO_PI;
2410
- } else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0) {
2411
- otherRectangleEast += Math_default.TWO_PI;
2412
- }
2413
- if (rectangleEast < rectangleWest && otherRectangleWest < 0) {
2414
- otherRectangleWest += Math_default.TWO_PI;
2415
- } else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0) {
2416
- rectangleWest += Math_default.TWO_PI;
2417
- }
2418
- const west = Math_default.negativePiToPi(
2419
- Math.min(rectangleWest, otherRectangleWest)
2420
- );
2421
- const east = Math_default.negativePiToPi(
2422
- Math.max(rectangleEast, otherRectangleEast)
2423
- );
2424
- result.west = west;
2425
- result.south = Math.min(rectangle.south, otherRectangle.south);
2426
- result.east = east;
2427
- result.north = Math.max(rectangle.north, otherRectangle.north);
2428
- return result;
2429
- };
2430
- Rectangle.expand = function(rectangle, cartographic, result) {
2431
- Check_default.typeOf.object("rectangle", rectangle);
2432
- Check_default.typeOf.object("cartographic", cartographic);
2433
- if (!defined_default(result)) {
2434
- result = new Rectangle();
2435
- }
2436
- result.west = Math.min(rectangle.west, cartographic.longitude);
2437
- result.south = Math.min(rectangle.south, cartographic.latitude);
2438
- result.east = Math.max(rectangle.east, cartographic.longitude);
2439
- result.north = Math.max(rectangle.north, cartographic.latitude);
2440
- return result;
2441
- };
2442
- Rectangle.contains = function(rectangle, cartographic) {
2443
- Check_default.typeOf.object("rectangle", rectangle);
2444
- Check_default.typeOf.object("cartographic", cartographic);
2445
- let longitude = cartographic.longitude;
2446
- const latitude = cartographic.latitude;
2447
- const west = rectangle.west;
2448
- let east = rectangle.east;
2449
- if (east < west) {
2450
- east += Math_default.TWO_PI;
2451
- if (longitude < 0) {
2452
- longitude += Math_default.TWO_PI;
2453
- }
2454
- }
2455
- return (longitude > west || Math_default.equalsEpsilon(longitude, west, Math_default.EPSILON14)) && (longitude < east || Math_default.equalsEpsilon(longitude, east, Math_default.EPSILON14)) && latitude >= rectangle.south && latitude <= rectangle.north;
2456
- };
2457
- var subsampleLlaScratch = new Cartographic_default();
2458
- Rectangle.subsample = function(rectangle, ellipsoid, surfaceHeight, result) {
2459
- Check_default.typeOf.object("rectangle", rectangle);
2460
- ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84);
2461
- surfaceHeight = defaultValue_default(surfaceHeight, 0);
2462
- if (!defined_default(result)) {
2463
- result = [];
2464
- }
2465
- let length = 0;
2466
- const north = rectangle.north;
2467
- const south = rectangle.south;
2468
- const east = rectangle.east;
2469
- const west = rectangle.west;
2470
- const lla = subsampleLlaScratch;
2471
- lla.height = surfaceHeight;
2472
- lla.longitude = west;
2473
- lla.latitude = north;
2474
- result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
2475
- length++;
2476
- lla.longitude = east;
2477
- result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
2478
- length++;
2479
- lla.latitude = south;
2480
- result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
2481
- length++;
2482
- lla.longitude = west;
2483
- result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
2484
- length++;
2485
- if (north < 0) {
2486
- lla.latitude = north;
2487
- } else if (south > 0) {
2488
- lla.latitude = south;
2489
- } else {
2490
- lla.latitude = 0;
2491
- }
2492
- for (let i = 1; i < 8; ++i) {
2493
- lla.longitude = -Math.PI + i * Math_default.PI_OVER_TWO;
2494
- if (Rectangle.contains(rectangle, lla)) {
2495
- result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
2496
- length++;
2497
- }
2498
- }
2499
- if (lla.latitude === 0) {
2500
- lla.longitude = west;
2501
- result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
2502
- length++;
2503
- lla.longitude = east;
2504
- result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
2505
- length++;
2506
- }
2507
- result.length = length;
2508
- return result;
2509
- };
2510
- Rectangle.subsection = function(rectangle, westLerp, southLerp, eastLerp, northLerp, result) {
2511
- Check_default.typeOf.object("rectangle", rectangle);
2512
- Check_default.typeOf.number.greaterThanOrEquals("westLerp", westLerp, 0);
2513
- Check_default.typeOf.number.lessThanOrEquals("westLerp", westLerp, 1);
2514
- Check_default.typeOf.number.greaterThanOrEquals("southLerp", southLerp, 0);
2515
- Check_default.typeOf.number.lessThanOrEquals("southLerp", southLerp, 1);
2516
- Check_default.typeOf.number.greaterThanOrEquals("eastLerp", eastLerp, 0);
2517
- Check_default.typeOf.number.lessThanOrEquals("eastLerp", eastLerp, 1);
2518
- Check_default.typeOf.number.greaterThanOrEquals("northLerp", northLerp, 0);
2519
- Check_default.typeOf.number.lessThanOrEquals("northLerp", northLerp, 1);
2520
- Check_default.typeOf.number.lessThanOrEquals("westLerp", westLerp, eastLerp);
2521
- Check_default.typeOf.number.lessThanOrEquals("southLerp", southLerp, northLerp);
2522
- if (!defined_default(result)) {
2523
- result = new Rectangle();
2524
- }
2525
- if (rectangle.west <= rectangle.east) {
2526
- const width = rectangle.east - rectangle.west;
2527
- result.west = rectangle.west + westLerp * width;
2528
- result.east = rectangle.west + eastLerp * width;
2529
- } else {
2530
- const width = Math_default.TWO_PI + rectangle.east - rectangle.west;
2531
- result.west = Math_default.negativePiToPi(rectangle.west + westLerp * width);
2532
- result.east = Math_default.negativePiToPi(rectangle.west + eastLerp * width);
2533
- }
2534
- const height = rectangle.north - rectangle.south;
2535
- result.south = rectangle.south + southLerp * height;
2536
- result.north = rectangle.south + northLerp * height;
2537
- if (westLerp === 1) {
2538
- result.west = rectangle.east;
2539
- }
2540
- if (eastLerp === 1) {
2541
- result.east = rectangle.east;
2542
- }
2543
- if (southLerp === 1) {
2544
- result.south = rectangle.north;
2545
- }
2546
- if (northLerp === 1) {
2547
- result.north = rectangle.north;
2548
- }
2549
- return result;
2550
- };
2551
- Rectangle.MAX_VALUE = Object.freeze(
2552
- new Rectangle(
2553
- -Math.PI,
2554
- -Math_default.PI_OVER_TWO,
2555
- Math.PI,
2556
- Math_default.PI_OVER_TWO
2557
- )
2558
- );
2559
- var Rectangle_default = Rectangle;
2560
-
2561
- // packages/engine/Source/Core/Cartesian2.js
2562
- function Cartesian2(x, y) {
2563
- this.x = defaultValue_default(x, 0);
2564
- this.y = defaultValue_default(y, 0);
2565
- }
2566
- Cartesian2.fromElements = function(x, y, result) {
2567
- if (!defined_default(result)) {
2568
- return new Cartesian2(x, y);
2569
- }
2570
- result.x = x;
2571
- result.y = y;
2572
- return result;
2573
- };
2574
- Cartesian2.clone = function(cartesian, result) {
2575
- if (!defined_default(cartesian)) {
2576
- return void 0;
2577
- }
2578
- if (!defined_default(result)) {
2579
- return new Cartesian2(cartesian.x, cartesian.y);
2580
- }
2581
- result.x = cartesian.x;
2582
- result.y = cartesian.y;
2583
- return result;
2584
- };
2585
- Cartesian2.fromCartesian3 = Cartesian2.clone;
2586
- Cartesian2.fromCartesian4 = Cartesian2.clone;
2587
- Cartesian2.packedLength = 2;
2588
- Cartesian2.pack = function(value, array, startingIndex) {
2589
- Check_default.typeOf.object("value", value);
2590
- Check_default.defined("array", array);
2591
- startingIndex = defaultValue_default(startingIndex, 0);
2592
- array[startingIndex++] = value.x;
2593
- array[startingIndex] = value.y;
2594
- return array;
2595
- };
2596
- Cartesian2.unpack = function(array, startingIndex, result) {
2597
- Check_default.defined("array", array);
2598
- startingIndex = defaultValue_default(startingIndex, 0);
2599
- if (!defined_default(result)) {
2600
- result = new Cartesian2();
2601
- }
2602
- result.x = array[startingIndex++];
2603
- result.y = array[startingIndex];
2604
- return result;
2605
- };
2606
- Cartesian2.packArray = function(array, result) {
2607
- Check_default.defined("array", array);
2608
- const length = array.length;
2609
- const resultLength = length * 2;
2610
- if (!defined_default(result)) {
2611
- result = new Array(resultLength);
2612
- } else if (!Array.isArray(result) && result.length !== resultLength) {
2613
- throw new DeveloperError_default(
2614
- "If result is a typed array, it must have exactly array.length * 2 elements"
2615
- );
2616
- } else if (result.length !== resultLength) {
2617
- result.length = resultLength;
2618
- }
2619
- for (let i = 0; i < length; ++i) {
2620
- Cartesian2.pack(array[i], result, i * 2);
2621
- }
2622
- return result;
2623
- };
2624
- Cartesian2.unpackArray = function(array, result) {
2625
- Check_default.defined("array", array);
2626
- Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 2);
2627
- if (array.length % 2 !== 0) {
2628
- throw new DeveloperError_default("array length must be a multiple of 2.");
2629
- }
2630
- const length = array.length;
2631
- if (!defined_default(result)) {
2632
- result = new Array(length / 2);
2633
- } else {
2634
- result.length = length / 2;
2635
- }
2636
- for (let i = 0; i < length; i += 2) {
2637
- const index = i / 2;
2638
- result[index] = Cartesian2.unpack(array, i, result[index]);
2639
- }
2640
- return result;
2641
- };
2642
- Cartesian2.fromArray = Cartesian2.unpack;
2643
- Cartesian2.maximumComponent = function(cartesian) {
2644
- Check_default.typeOf.object("cartesian", cartesian);
2645
- return Math.max(cartesian.x, cartesian.y);
2646
- };
2647
- Cartesian2.minimumComponent = function(cartesian) {
2648
- Check_default.typeOf.object("cartesian", cartesian);
2649
- return Math.min(cartesian.x, cartesian.y);
2650
- };
2651
- Cartesian2.minimumByComponent = function(first, second, result) {
2652
- Check_default.typeOf.object("first", first);
2653
- Check_default.typeOf.object("second", second);
2654
- Check_default.typeOf.object("result", result);
2655
- result.x = Math.min(first.x, second.x);
2656
- result.y = Math.min(first.y, second.y);
2657
- return result;
2658
- };
2659
- Cartesian2.maximumByComponent = function(first, second, result) {
2660
- Check_default.typeOf.object("first", first);
2661
- Check_default.typeOf.object("second", second);
2662
- Check_default.typeOf.object("result", result);
2663
- result.x = Math.max(first.x, second.x);
2664
- result.y = Math.max(first.y, second.y);
2665
- return result;
2666
- };
2667
- Cartesian2.clamp = function(value, min, max, result) {
2668
- Check_default.typeOf.object("value", value);
2669
- Check_default.typeOf.object("min", min);
2670
- Check_default.typeOf.object("max", max);
2671
- Check_default.typeOf.object("result", result);
2672
- const x = Math_default.clamp(value.x, min.x, max.x);
2673
- const y = Math_default.clamp(value.y, min.y, max.y);
2674
- result.x = x;
2675
- result.y = y;
2676
- return result;
2677
- };
2678
- Cartesian2.magnitudeSquared = function(cartesian) {
2679
- Check_default.typeOf.object("cartesian", cartesian);
2680
- return cartesian.x * cartesian.x + cartesian.y * cartesian.y;
2681
- };
2682
- Cartesian2.magnitude = function(cartesian) {
2683
- return Math.sqrt(Cartesian2.magnitudeSquared(cartesian));
2684
- };
2685
- var distanceScratch2 = new Cartesian2();
2686
- Cartesian2.distance = function(left, right) {
2687
- Check_default.typeOf.object("left", left);
2688
- Check_default.typeOf.object("right", right);
2689
- Cartesian2.subtract(left, right, distanceScratch2);
2690
- return Cartesian2.magnitude(distanceScratch2);
2691
- };
2692
- Cartesian2.distanceSquared = function(left, right) {
2693
- Check_default.typeOf.object("left", left);
2694
- Check_default.typeOf.object("right", right);
2695
- Cartesian2.subtract(left, right, distanceScratch2);
2696
- return Cartesian2.magnitudeSquared(distanceScratch2);
2697
- };
2698
- Cartesian2.normalize = function(cartesian, result) {
2699
- Check_default.typeOf.object("cartesian", cartesian);
2700
- Check_default.typeOf.object("result", result);
2701
- const magnitude = Cartesian2.magnitude(cartesian);
2702
- result.x = cartesian.x / magnitude;
2703
- result.y = cartesian.y / magnitude;
2704
- if (isNaN(result.x) || isNaN(result.y)) {
2705
- throw new DeveloperError_default("normalized result is not a number");
2706
- }
2707
- return result;
2708
- };
2709
- Cartesian2.dot = function(left, right) {
2710
- Check_default.typeOf.object("left", left);
2711
- Check_default.typeOf.object("right", right);
2712
- return left.x * right.x + left.y * right.y;
2713
- };
2714
- Cartesian2.cross = function(left, right) {
2715
- Check_default.typeOf.object("left", left);
2716
- Check_default.typeOf.object("right", right);
2717
- return left.x * right.y - left.y * right.x;
2718
- };
2719
- Cartesian2.multiplyComponents = function(left, right, result) {
2720
- Check_default.typeOf.object("left", left);
2721
- Check_default.typeOf.object("right", right);
2722
- Check_default.typeOf.object("result", result);
2723
- result.x = left.x * right.x;
2724
- result.y = left.y * right.y;
2725
- return result;
2726
- };
2727
- Cartesian2.divideComponents = function(left, right, result) {
2728
- Check_default.typeOf.object("left", left);
2729
- Check_default.typeOf.object("right", right);
2730
- Check_default.typeOf.object("result", result);
2731
- result.x = left.x / right.x;
2732
- result.y = left.y / right.y;
2733
- return result;
2734
- };
2735
- Cartesian2.add = function(left, right, result) {
2736
- Check_default.typeOf.object("left", left);
2737
- Check_default.typeOf.object("right", right);
2738
- Check_default.typeOf.object("result", result);
2739
- result.x = left.x + right.x;
2740
- result.y = left.y + right.y;
2741
- return result;
2742
- };
2743
- Cartesian2.subtract = function(left, right, result) {
2744
- Check_default.typeOf.object("left", left);
2745
- Check_default.typeOf.object("right", right);
2746
- Check_default.typeOf.object("result", result);
2747
- result.x = left.x - right.x;
2748
- result.y = left.y - right.y;
2749
- return result;
2750
- };
2751
- Cartesian2.multiplyByScalar = function(cartesian, scalar, result) {
2752
- Check_default.typeOf.object("cartesian", cartesian);
2753
- Check_default.typeOf.number("scalar", scalar);
2754
- Check_default.typeOf.object("result", result);
2755
- result.x = cartesian.x * scalar;
2756
- result.y = cartesian.y * scalar;
2757
- return result;
2758
- };
2759
- Cartesian2.divideByScalar = function(cartesian, scalar, result) {
2760
- Check_default.typeOf.object("cartesian", cartesian);
2761
- Check_default.typeOf.number("scalar", scalar);
2762
- Check_default.typeOf.object("result", result);
2763
- result.x = cartesian.x / scalar;
2764
- result.y = cartesian.y / scalar;
2765
- return result;
2766
- };
2767
- Cartesian2.negate = function(cartesian, result) {
2768
- Check_default.typeOf.object("cartesian", cartesian);
2769
- Check_default.typeOf.object("result", result);
2770
- result.x = -cartesian.x;
2771
- result.y = -cartesian.y;
2772
- return result;
2773
- };
2774
- Cartesian2.abs = function(cartesian, result) {
2775
- Check_default.typeOf.object("cartesian", cartesian);
2776
- Check_default.typeOf.object("result", result);
2777
- result.x = Math.abs(cartesian.x);
2778
- result.y = Math.abs(cartesian.y);
2779
- return result;
2780
- };
2781
- var lerpScratch2 = new Cartesian2();
2782
- Cartesian2.lerp = function(start, end, t, result) {
2783
- Check_default.typeOf.object("start", start);
2784
- Check_default.typeOf.object("end", end);
2785
- Check_default.typeOf.number("t", t);
2786
- Check_default.typeOf.object("result", result);
2787
- Cartesian2.multiplyByScalar(end, t, lerpScratch2);
2788
- result = Cartesian2.multiplyByScalar(start, 1 - t, result);
2789
- return Cartesian2.add(lerpScratch2, result, result);
2790
- };
2791
- var angleBetweenScratch = new Cartesian2();
2792
- var angleBetweenScratch2 = new Cartesian2();
2793
- Cartesian2.angleBetween = function(left, right) {
2794
- Check_default.typeOf.object("left", left);
2795
- Check_default.typeOf.object("right", right);
2796
- Cartesian2.normalize(left, angleBetweenScratch);
2797
- Cartesian2.normalize(right, angleBetweenScratch2);
2798
- return Math_default.acosClamped(
2799
- Cartesian2.dot(angleBetweenScratch, angleBetweenScratch2)
2800
- );
2801
- };
2802
- var mostOrthogonalAxisScratch2 = new Cartesian2();
2803
- Cartesian2.mostOrthogonalAxis = function(cartesian, result) {
2804
- Check_default.typeOf.object("cartesian", cartesian);
2805
- Check_default.typeOf.object("result", result);
2806
- const f = Cartesian2.normalize(cartesian, mostOrthogonalAxisScratch2);
2807
- Cartesian2.abs(f, f);
2808
- if (f.x <= f.y) {
2809
- result = Cartesian2.clone(Cartesian2.UNIT_X, result);
2810
- } else {
2811
- result = Cartesian2.clone(Cartesian2.UNIT_Y, result);
2812
- }
2813
- return result;
2814
- };
2815
- Cartesian2.equals = function(left, right) {
2816
- return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y;
2817
- };
2818
- Cartesian2.equalsArray = function(cartesian, array, offset) {
2819
- return cartesian.x === array[offset] && cartesian.y === array[offset + 1];
2820
- };
2821
- Cartesian2.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
2822
- return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon(
2823
- left.x,
2824
- right.x,
2825
- relativeEpsilon,
2826
- absoluteEpsilon
2827
- ) && Math_default.equalsEpsilon(
2828
- left.y,
2829
- right.y,
2830
- relativeEpsilon,
2831
- absoluteEpsilon
2832
- );
2833
- };
2834
- Cartesian2.ZERO = Object.freeze(new Cartesian2(0, 0));
2835
- Cartesian2.ONE = Object.freeze(new Cartesian2(1, 1));
2836
- Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1, 0));
2837
- Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0, 1));
2838
- Cartesian2.prototype.clone = function(result) {
2839
- return Cartesian2.clone(this, result);
2840
- };
2841
- Cartesian2.prototype.equals = function(right) {
2842
- return Cartesian2.equals(this, right);
2843
- };
2844
- Cartesian2.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
2845
- return Cartesian2.equalsEpsilon(
2846
- this,
2847
- right,
2848
- relativeEpsilon,
2849
- absoluteEpsilon
2850
- );
2851
- };
2852
- Cartesian2.prototype.toString = function() {
2853
- return `(${this.x}, ${this.y})`;
2854
- };
2855
- var Cartesian2_default = Cartesian2;
2856
-
2857
- // packages/engine/Source/Core/Matrix2.js
2858
- function Matrix2(column0Row0, column1Row0, column0Row1, column1Row1) {
2859
- this[0] = defaultValue_default(column0Row0, 0);
2860
- this[1] = defaultValue_default(column0Row1, 0);
2861
- this[2] = defaultValue_default(column1Row0, 0);
2862
- this[3] = defaultValue_default(column1Row1, 0);
2863
- }
2864
- Matrix2.packedLength = 4;
2865
- Matrix2.pack = function(value, array, startingIndex) {
2866
- Check_default.typeOf.object("value", value);
2867
- Check_default.defined("array", array);
2868
- startingIndex = defaultValue_default(startingIndex, 0);
2869
- array[startingIndex++] = value[0];
2870
- array[startingIndex++] = value[1];
2871
- array[startingIndex++] = value[2];
2872
- array[startingIndex++] = value[3];
2873
- return array;
2874
- };
2875
- Matrix2.unpack = function(array, startingIndex, result) {
2876
- Check_default.defined("array", array);
2877
- startingIndex = defaultValue_default(startingIndex, 0);
2878
- if (!defined_default(result)) {
2879
- result = new Matrix2();
2880
- }
2881
- result[0] = array[startingIndex++];
2882
- result[1] = array[startingIndex++];
2883
- result[2] = array[startingIndex++];
2884
- result[3] = array[startingIndex++];
2885
- return result;
2886
- };
2887
- Matrix2.packArray = function(array, result) {
2888
- Check_default.defined("array", array);
2889
- const length = array.length;
2890
- const resultLength = length * 4;
2891
- if (!defined_default(result)) {
2892
- result = new Array(resultLength);
2893
- } else if (!Array.isArray(result) && result.length !== resultLength) {
2894
- throw new DeveloperError_default(
2895
- "If result is a typed array, it must have exactly array.length * 4 elements"
2896
- );
2897
- } else if (result.length !== resultLength) {
2898
- result.length = resultLength;
2899
- }
2900
- for (let i = 0; i < length; ++i) {
2901
- Matrix2.pack(array[i], result, i * 4);
2902
- }
2903
- return result;
2904
- };
2905
- Matrix2.unpackArray = function(array, result) {
2906
- Check_default.defined("array", array);
2907
- Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 4);
2908
- if (array.length % 4 !== 0) {
2909
- throw new DeveloperError_default("array length must be a multiple of 4.");
2910
- }
2911
- const length = array.length;
2912
- if (!defined_default(result)) {
2913
- result = new Array(length / 4);
2914
- } else {
2915
- result.length = length / 4;
2916
- }
2917
- for (let i = 0; i < length; i += 4) {
2918
- const index = i / 4;
2919
- result[index] = Matrix2.unpack(array, i, result[index]);
2920
- }
2921
- return result;
2922
- };
2923
- Matrix2.clone = function(matrix, result) {
2924
- if (!defined_default(matrix)) {
2925
- return void 0;
2926
- }
2927
- if (!defined_default(result)) {
2928
- return new Matrix2(matrix[0], matrix[2], matrix[1], matrix[3]);
2929
- }
2930
- result[0] = matrix[0];
2931
- result[1] = matrix[1];
2932
- result[2] = matrix[2];
2933
- result[3] = matrix[3];
2934
- return result;
2935
- };
2936
- Matrix2.fromArray = Matrix2.unpack;
2937
- Matrix2.fromColumnMajorArray = function(values, result) {
2938
- Check_default.defined("values", values);
2939
- return Matrix2.clone(values, result);
2940
- };
2941
- Matrix2.fromRowMajorArray = function(values, result) {
2942
- Check_default.defined("values", values);
2943
- if (!defined_default(result)) {
2944
- return new Matrix2(values[0], values[1], values[2], values[3]);
2945
- }
2946
- result[0] = values[0];
2947
- result[1] = values[2];
2948
- result[2] = values[1];
2949
- result[3] = values[3];
2950
- return result;
2951
- };
2952
- Matrix2.fromScale = function(scale, result) {
2953
- Check_default.typeOf.object("scale", scale);
2954
- if (!defined_default(result)) {
2955
- return new Matrix2(scale.x, 0, 0, scale.y);
2956
- }
2957
- result[0] = scale.x;
2958
- result[1] = 0;
2959
- result[2] = 0;
2960
- result[3] = scale.y;
2961
- return result;
2962
- };
2963
- Matrix2.fromUniformScale = function(scale, result) {
2964
- Check_default.typeOf.number("scale", scale);
2965
- if (!defined_default(result)) {
2966
- return new Matrix2(scale, 0, 0, scale);
2967
- }
2968
- result[0] = scale;
2969
- result[1] = 0;
2970
- result[2] = 0;
2971
- result[3] = scale;
2972
- return result;
2973
- };
2974
- Matrix2.fromRotation = function(angle, result) {
2975
- Check_default.typeOf.number("angle", angle);
2976
- const cosAngle = Math.cos(angle);
2977
- const sinAngle = Math.sin(angle);
2978
- if (!defined_default(result)) {
2979
- return new Matrix2(cosAngle, -sinAngle, sinAngle, cosAngle);
2980
- }
2981
- result[0] = cosAngle;
2982
- result[1] = sinAngle;
2983
- result[2] = -sinAngle;
2984
- result[3] = cosAngle;
2985
- return result;
2986
- };
2987
- Matrix2.toArray = function(matrix, result) {
2988
- Check_default.typeOf.object("matrix", matrix);
2989
- if (!defined_default(result)) {
2990
- return [matrix[0], matrix[1], matrix[2], matrix[3]];
2991
- }
2992
- result[0] = matrix[0];
2993
- result[1] = matrix[1];
2994
- result[2] = matrix[2];
2995
- result[3] = matrix[3];
2996
- return result;
2997
- };
2998
- Matrix2.getElementIndex = function(column, row) {
2999
- Check_default.typeOf.number.greaterThanOrEquals("row", row, 0);
3000
- Check_default.typeOf.number.lessThanOrEquals("row", row, 1);
3001
- Check_default.typeOf.number.greaterThanOrEquals("column", column, 0);
3002
- Check_default.typeOf.number.lessThanOrEquals("column", column, 1);
3003
- return column * 2 + row;
3004
- };
3005
- Matrix2.getColumn = function(matrix, index, result) {
3006
- Check_default.typeOf.object("matrix", matrix);
3007
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
3008
- Check_default.typeOf.number.lessThanOrEquals("index", index, 1);
3009
- Check_default.typeOf.object("result", result);
3010
- const startIndex = index * 2;
3011
- const x = matrix[startIndex];
3012
- const y = matrix[startIndex + 1];
3013
- result.x = x;
3014
- result.y = y;
3015
- return result;
3016
- };
3017
- Matrix2.setColumn = function(matrix, index, cartesian, result) {
3018
- Check_default.typeOf.object("matrix", matrix);
3019
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
3020
- Check_default.typeOf.number.lessThanOrEquals("index", index, 1);
3021
- Check_default.typeOf.object("cartesian", cartesian);
3022
- Check_default.typeOf.object("result", result);
3023
- result = Matrix2.clone(matrix, result);
3024
- const startIndex = index * 2;
3025
- result[startIndex] = cartesian.x;
3026
- result[startIndex + 1] = cartesian.y;
3027
- return result;
3028
- };
3029
- Matrix2.getRow = function(matrix, index, result) {
3030
- Check_default.typeOf.object("matrix", matrix);
3031
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
3032
- Check_default.typeOf.number.lessThanOrEquals("index", index, 1);
3033
- Check_default.typeOf.object("result", result);
3034
- const x = matrix[index];
3035
- const y = matrix[index + 2];
3036
- result.x = x;
3037
- result.y = y;
3038
- return result;
3039
- };
3040
- Matrix2.setRow = function(matrix, index, cartesian, result) {
3041
- Check_default.typeOf.object("matrix", matrix);
3042
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
3043
- Check_default.typeOf.number.lessThanOrEquals("index", index, 1);
3044
- Check_default.typeOf.object("cartesian", cartesian);
3045
- Check_default.typeOf.object("result", result);
3046
- result = Matrix2.clone(matrix, result);
3047
- result[index] = cartesian.x;
3048
- result[index + 2] = cartesian.y;
3049
- return result;
3050
- };
3051
- var scaleScratch12 = new Cartesian2_default();
3052
- Matrix2.setScale = function(matrix, scale, result) {
3053
- Check_default.typeOf.object("matrix", matrix);
3054
- Check_default.typeOf.object("scale", scale);
3055
- Check_default.typeOf.object("result", result);
3056
- const existingScale = Matrix2.getScale(matrix, scaleScratch12);
3057
- const scaleRatioX = scale.x / existingScale.x;
3058
- const scaleRatioY = scale.y / existingScale.y;
3059
- result[0] = matrix[0] * scaleRatioX;
3060
- result[1] = matrix[1] * scaleRatioX;
3061
- result[2] = matrix[2] * scaleRatioY;
3062
- result[3] = matrix[3] * scaleRatioY;
3063
- return result;
3064
- };
3065
- var scaleScratch22 = new Cartesian2_default();
3066
- Matrix2.setUniformScale = function(matrix, scale, result) {
3067
- Check_default.typeOf.object("matrix", matrix);
3068
- Check_default.typeOf.number("scale", scale);
3069
- Check_default.typeOf.object("result", result);
3070
- const existingScale = Matrix2.getScale(matrix, scaleScratch22);
3071
- const scaleRatioX = scale / existingScale.x;
3072
- const scaleRatioY = scale / existingScale.y;
3073
- result[0] = matrix[0] * scaleRatioX;
3074
- result[1] = matrix[1] * scaleRatioX;
3075
- result[2] = matrix[2] * scaleRatioY;
3076
- result[3] = matrix[3] * scaleRatioY;
3077
- return result;
3078
- };
3079
- var scratchColumn2 = new Cartesian2_default();
3080
- Matrix2.getScale = function(matrix, result) {
3081
- Check_default.typeOf.object("matrix", matrix);
3082
- Check_default.typeOf.object("result", result);
3083
- result.x = Cartesian2_default.magnitude(
3084
- Cartesian2_default.fromElements(matrix[0], matrix[1], scratchColumn2)
3085
- );
3086
- result.y = Cartesian2_default.magnitude(
3087
- Cartesian2_default.fromElements(matrix[2], matrix[3], scratchColumn2)
3088
- );
3089
- return result;
3090
- };
3091
- var scaleScratch32 = new Cartesian2_default();
3092
- Matrix2.getMaximumScale = function(matrix) {
3093
- Matrix2.getScale(matrix, scaleScratch32);
3094
- return Cartesian2_default.maximumComponent(scaleScratch32);
3095
- };
3096
- var scaleScratch42 = new Cartesian2_default();
3097
- Matrix2.setRotation = function(matrix, rotation, result) {
3098
- Check_default.typeOf.object("matrix", matrix);
3099
- Check_default.typeOf.object("result", result);
3100
- const scale = Matrix2.getScale(matrix, scaleScratch42);
3101
- result[0] = rotation[0] * scale.x;
3102
- result[1] = rotation[1] * scale.x;
3103
- result[2] = rotation[2] * scale.y;
3104
- result[3] = rotation[3] * scale.y;
3105
- return result;
3106
- };
3107
- var scaleScratch52 = new Cartesian2_default();
3108
- Matrix2.getRotation = function(matrix, result) {
3109
- Check_default.typeOf.object("matrix", matrix);
3110
- Check_default.typeOf.object("result", result);
3111
- const scale = Matrix2.getScale(matrix, scaleScratch52);
3112
- result[0] = matrix[0] / scale.x;
3113
- result[1] = matrix[1] / scale.x;
3114
- result[2] = matrix[2] / scale.y;
3115
- result[3] = matrix[3] / scale.y;
3116
- return result;
3117
- };
3118
- Matrix2.multiply = function(left, right, result) {
3119
- Check_default.typeOf.object("left", left);
3120
- Check_default.typeOf.object("right", right);
3121
- Check_default.typeOf.object("result", result);
3122
- const column0Row0 = left[0] * right[0] + left[2] * right[1];
3123
- const column1Row0 = left[0] * right[2] + left[2] * right[3];
3124
- const column0Row1 = left[1] * right[0] + left[3] * right[1];
3125
- const column1Row1 = left[1] * right[2] + left[3] * right[3];
3126
- result[0] = column0Row0;
3127
- result[1] = column0Row1;
3128
- result[2] = column1Row0;
3129
- result[3] = column1Row1;
3130
- return result;
3131
- };
3132
- Matrix2.add = function(left, right, result) {
3133
- Check_default.typeOf.object("left", left);
3134
- Check_default.typeOf.object("right", right);
3135
- Check_default.typeOf.object("result", result);
3136
- result[0] = left[0] + right[0];
3137
- result[1] = left[1] + right[1];
3138
- result[2] = left[2] + right[2];
3139
- result[3] = left[3] + right[3];
3140
- return result;
3141
- };
3142
- Matrix2.subtract = function(left, right, result) {
3143
- Check_default.typeOf.object("left", left);
3144
- Check_default.typeOf.object("right", right);
3145
- Check_default.typeOf.object("result", result);
3146
- result[0] = left[0] - right[0];
3147
- result[1] = left[1] - right[1];
3148
- result[2] = left[2] - right[2];
3149
- result[3] = left[3] - right[3];
3150
- return result;
3151
- };
3152
- Matrix2.multiplyByVector = function(matrix, cartesian, result) {
3153
- Check_default.typeOf.object("matrix", matrix);
3154
- Check_default.typeOf.object("cartesian", cartesian);
3155
- Check_default.typeOf.object("result", result);
3156
- const x = matrix[0] * cartesian.x + matrix[2] * cartesian.y;
3157
- const y = matrix[1] * cartesian.x + matrix[3] * cartesian.y;
3158
- result.x = x;
3159
- result.y = y;
3160
- return result;
3161
- };
3162
- Matrix2.multiplyByScalar = function(matrix, scalar, result) {
3163
- Check_default.typeOf.object("matrix", matrix);
3164
- Check_default.typeOf.number("scalar", scalar);
3165
- Check_default.typeOf.object("result", result);
3166
- result[0] = matrix[0] * scalar;
3167
- result[1] = matrix[1] * scalar;
3168
- result[2] = matrix[2] * scalar;
3169
- result[3] = matrix[3] * scalar;
3170
- return result;
3171
- };
3172
- Matrix2.multiplyByScale = function(matrix, scale, result) {
3173
- Check_default.typeOf.object("matrix", matrix);
3174
- Check_default.typeOf.object("scale", scale);
3175
- Check_default.typeOf.object("result", result);
3176
- result[0] = matrix[0] * scale.x;
3177
- result[1] = matrix[1] * scale.x;
3178
- result[2] = matrix[2] * scale.y;
3179
- result[3] = matrix[3] * scale.y;
3180
- return result;
3181
- };
3182
- Matrix2.multiplyByUniformScale = function(matrix, scale, result) {
3183
- Check_default.typeOf.object("matrix", matrix);
3184
- Check_default.typeOf.number("scale", scale);
3185
- Check_default.typeOf.object("result", result);
3186
- result[0] = matrix[0] * scale;
3187
- result[1] = matrix[1] * scale;
3188
- result[2] = matrix[2] * scale;
3189
- result[3] = matrix[3] * scale;
3190
- return result;
3191
- };
3192
- Matrix2.negate = function(matrix, result) {
3193
- Check_default.typeOf.object("matrix", matrix);
3194
- Check_default.typeOf.object("result", result);
3195
- result[0] = -matrix[0];
3196
- result[1] = -matrix[1];
3197
- result[2] = -matrix[2];
3198
- result[3] = -matrix[3];
3199
- return result;
3200
- };
3201
- Matrix2.transpose = function(matrix, result) {
3202
- Check_default.typeOf.object("matrix", matrix);
3203
- Check_default.typeOf.object("result", result);
3204
- const column0Row0 = matrix[0];
3205
- const column0Row1 = matrix[2];
3206
- const column1Row0 = matrix[1];
3207
- const column1Row1 = matrix[3];
3208
- result[0] = column0Row0;
3209
- result[1] = column0Row1;
3210
- result[2] = column1Row0;
3211
- result[3] = column1Row1;
3212
- return result;
3213
- };
3214
- Matrix2.abs = function(matrix, result) {
3215
- Check_default.typeOf.object("matrix", matrix);
3216
- Check_default.typeOf.object("result", result);
3217
- result[0] = Math.abs(matrix[0]);
3218
- result[1] = Math.abs(matrix[1]);
3219
- result[2] = Math.abs(matrix[2]);
3220
- result[3] = Math.abs(matrix[3]);
3221
- return result;
3222
- };
3223
- Matrix2.equals = function(left, right) {
3224
- 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];
3225
- };
3226
- Matrix2.equalsArray = function(matrix, array, offset) {
3227
- return matrix[0] === array[offset] && matrix[1] === array[offset + 1] && matrix[2] === array[offset + 2] && matrix[3] === array[offset + 3];
3228
- };
3229
- Matrix2.equalsEpsilon = function(left, right, epsilon) {
3230
- epsilon = defaultValue_default(epsilon, 0);
3231
- 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;
3232
- };
3233
- Matrix2.IDENTITY = Object.freeze(new Matrix2(1, 0, 0, 1));
3234
- Matrix2.ZERO = Object.freeze(new Matrix2(0, 0, 0, 0));
3235
- Matrix2.COLUMN0ROW0 = 0;
3236
- Matrix2.COLUMN0ROW1 = 1;
3237
- Matrix2.COLUMN1ROW0 = 2;
3238
- Matrix2.COLUMN1ROW1 = 3;
3239
- Object.defineProperties(Matrix2.prototype, {
3240
- /**
3241
- * Gets the number of items in the collection.
3242
- * @memberof Matrix2.prototype
3243
- *
3244
- * @type {number}
3245
- */
3246
- length: {
3247
- get: function() {
3248
- return Matrix2.packedLength;
3249
- }
3250
- }
3251
- });
3252
- Matrix2.prototype.clone = function(result) {
3253
- return Matrix2.clone(this, result);
3254
- };
3255
- Matrix2.prototype.equals = function(right) {
3256
- return Matrix2.equals(this, right);
3257
- };
3258
- Matrix2.prototype.equalsEpsilon = function(right, epsilon) {
3259
- return Matrix2.equalsEpsilon(this, right, epsilon);
3260
- };
3261
- Matrix2.prototype.toString = function() {
3262
- return `(${this[0]}, ${this[2]})
3263
- (${this[1]}, ${this[3]})`;
3264
- };
3265
- var Matrix2_default = Matrix2;
3266
-
3267
- export {
3268
- Cartesian4_default,
3269
- Matrix4_default,
3270
- Rectangle_default,
3271
- Cartesian2_default,
3272
- Matrix2_default
3273
- };