@vcmap/ui 5.0.0-rc.8 → 5.0.0

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 (663) hide show
  1. package/README.md +95 -64
  2. package/app.config.json +3 -0
  3. package/build/.eslintrc +3 -0
  4. package/build/build.js +302 -165
  5. package/build/buildCesium.js +39 -19
  6. package/build/buildHelpers.js +279 -88
  7. package/build/buildPreview.js +16 -6
  8. package/build/bundle.js +57 -0
  9. package/build/commonViteConfig.js +7 -16
  10. package/build/determineHost.js +17 -4
  11. package/build/generateOLLib.js +15 -18
  12. package/build/getPluginProxies.js +35 -3
  13. package/build/info/conf.json +21 -19
  14. package/build/info/publish.js +16 -5
  15. package/config/aerowest.config.json +47 -54
  16. package/config/base.config.json +597 -662
  17. package/config/codes.config.json +401 -0
  18. package/config/dev.config.json +460 -14
  19. package/config/graphFeatureInfo.config.json +141 -0
  20. package/config/projects.config.json +29 -0
  21. package/config/www.config.json +1801 -0
  22. package/dist/assets/@mdi/font/LICENSE +20 -0
  23. package/dist/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
  24. package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +3 -0
  25. package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  26. package/dist/assets/cesium/ThirdParty/Workers/basis_transcoder.js +21 -0
  27. package/dist/assets/cesium/ThirdParty/Workers/package.json +1 -0
  28. package/dist/assets/cesium/ThirdParty/Workers/pako_deflate.min.js +2 -0
  29. package/dist/assets/cesium/ThirdParty/Workers/pako_inflate.min.js +2 -0
  30. package/dist/assets/cesium/ThirdParty/Workers/z-worker-pako.js +1 -0
  31. package/dist/assets/cesium/ThirdParty/basis_transcoder.wasm +0 -0
  32. package/dist/assets/cesium/ThirdParty/draco_decoder.wasm +0 -0
  33. package/dist/assets/cesium/ThirdParty/google-earth-dbroot-parser.js +8337 -0
  34. package/dist/assets/cesium/Workers/chunk-227AJNOA.js +59 -0
  35. package/dist/assets/cesium/Workers/chunk-2R5O53JW.js +157 -0
  36. package/dist/assets/cesium/Workers/chunk-34YUDLRP.js +781 -0
  37. package/dist/assets/cesium/Workers/chunk-3W63OHNJ.js +100 -0
  38. package/dist/assets/cesium/Workers/chunk-4MFFIWUA.js +163 -0
  39. package/dist/assets/cesium/Workers/chunk-66QLLS45.js +218 -0
  40. package/dist/assets/cesium/Workers/chunk-6BTKZDRG.js +77 -0
  41. package/dist/assets/cesium/Workers/chunk-A4JVFBQ3.js +101 -0
  42. package/dist/assets/cesium/Workers/chunk-ABADGKYE.js +58 -0
  43. package/dist/assets/cesium/Workers/chunk-AFFLIKOH.js +353 -0
  44. package/dist/assets/cesium/Workers/chunk-AHKEZ2OE.js +629 -0
  45. package/dist/assets/cesium/Workers/chunk-C3SXRKRW.js +476 -0
  46. package/dist/assets/cesium/Workers/chunk-CCFQRR6D.js +55 -0
  47. package/dist/assets/cesium/Workers/chunk-CHHNOC2C.js +1860 -0
  48. package/dist/assets/cesium/Workers/chunk-CTELOFLA.js +196 -0
  49. package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +3273 -0
  50. package/dist/assets/cesium/Workers/chunk-EW2GWJYB.js +44 -0
  51. package/dist/assets/cesium/Workers/chunk-GLZBE3ML.js +421 -0
  52. package/dist/assets/cesium/Workers/chunk-HARLBUOL.js +236 -0
  53. package/dist/assets/cesium/Workers/chunk-HQF437NJ.js +117 -0
  54. package/dist/assets/cesium/Workers/chunk-IPA4EACJ.js +368 -0
  55. package/dist/assets/cesium/Workers/chunk-J3JY6I2C.js +1009 -0
  56. package/dist/assets/cesium/Workers/chunk-JB2LWGH4.js +390 -0
  57. package/dist/assets/cesium/Workers/chunk-JS3AW5BK.js +634 -0
  58. package/dist/assets/cesium/Workers/chunk-K36FEYS7.js +452 -0
  59. package/dist/assets/cesium/Workers/chunk-KD4Y7CZL.js +400 -0
  60. package/dist/assets/cesium/Workers/chunk-KTJSNCK4.js +842 -0
  61. package/dist/assets/cesium/Workers/chunk-LLUNNUJV.js +258 -0
  62. package/dist/assets/cesium/Workers/chunk-MPAZH4BF.js +37 -0
  63. package/dist/assets/cesium/Workers/chunk-MYZB7C4T.js +1258 -0
  64. package/dist/assets/cesium/Workers/chunk-N3JIFFX2.js +501 -0
  65. package/dist/assets/cesium/Workers/chunk-O5AMBQ36.js +430 -0
  66. package/dist/assets/cesium/Workers/chunk-OAVNIRB4.js +124 -0
  67. package/dist/assets/cesium/Workers/chunk-OYFCF4PL.js +171 -0
  68. package/dist/assets/cesium/Workers/chunk-OZJDGN5F.js +1477 -0
  69. package/dist/assets/cesium/Workers/chunk-PCJWUS4M.js +2041 -0
  70. package/dist/assets/cesium/Workers/chunk-PFQBCKBM.js +8644 -0
  71. package/dist/assets/cesium/Workers/chunk-QIKODV5G.js +305 -0
  72. package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +73 -0
  73. package/dist/assets/cesium/Workers/chunk-QMEMZIJI.js +138 -0
  74. package/dist/assets/cesium/Workers/chunk-QT3MPEMI.js +102 -0
  75. package/dist/assets/cesium/Workers/chunk-RP2A7BR5.js +289 -0
  76. package/dist/assets/cesium/Workers/chunk-RW6LU2CJ.js +138 -0
  77. package/dist/assets/cesium/Workers/chunk-TFC6TZ3S.js +757 -0
  78. package/dist/assets/cesium/Workers/chunk-V3NGATMV.js +693 -0
  79. package/dist/assets/cesium/Workers/chunk-VLGOATD6.js +1075 -0
  80. package/dist/assets/cesium/Workers/chunk-WXTV4ATB.js +39 -0
  81. package/dist/assets/cesium/Workers/chunk-X4SU25DT.js +302 -0
  82. package/dist/assets/cesium/Workers/chunk-XTY7B2N6.js +2716 -0
  83. package/dist/assets/cesium/Workers/chunk-XY7MGBKC.js +513 -0
  84. package/dist/assets/cesium/Workers/chunk-Z24VKNDO.js +834 -0
  85. package/dist/assets/cesium/Workers/chunk-ZA25DG4Y.js +684 -0
  86. package/dist/assets/cesium/Workers/chunk-ZFOBYDGF.js +73 -0
  87. package/dist/assets/cesium/Workers/combineGeometry.js +67 -1
  88. package/dist/assets/cesium/Workers/createBoxGeometry.js +57 -1
  89. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +234 -1
  90. package/dist/assets/cesium/Workers/createCircleGeometry.js +196 -1
  91. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +146 -1
  92. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +506 -1
  93. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +224 -1
  94. package/dist/assets/cesium/Workers/createCorridorGeometry.js +1262 -1
  95. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +567 -1
  96. package/dist/assets/cesium/Workers/createCylinderGeometry.js +59 -1
  97. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +231 -1
  98. package/dist/assets/cesium/Workers/createEllipseGeometry.js +70 -1
  99. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +63 -1
  100. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +58 -1
  101. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +60 -1
  102. package/dist/assets/cesium/Workers/createFrustumGeometry.js +57 -1
  103. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +234 -1
  104. package/dist/assets/cesium/Workers/createGeometry.js +150 -1
  105. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1607 -1
  106. package/dist/assets/cesium/Workers/createPlaneGeometry.js +223 -1
  107. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +123 -1
  108. package/dist/assets/cesium/Workers/createPolygonGeometry.js +1134 -1
  109. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +542 -1
  110. package/dist/assets/cesium/Workers/createPolylineGeometry.js +495 -1
  111. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +379 -1
  112. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +277 -1
  113. package/dist/assets/cesium/Workers/createRectangleGeometry.js +1273 -1
  114. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +480 -1
  115. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +399 -1
  116. package/dist/assets/cesium/Workers/createSphereGeometry.js +117 -1
  117. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +117 -1
  118. package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +32 -1
  119. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +492 -1
  120. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +386 -1
  121. package/dist/assets/cesium/Workers/createVectorTilePoints.js +112 -1
  122. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +384 -1
  123. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +262 -1
  124. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +568 -1
  125. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +2277 -3
  126. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +745 -1
  127. package/dist/assets/cesium/Workers/createWallGeometry.js +489 -1
  128. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +337 -1
  129. package/dist/assets/cesium/Workers/decodeDraco.js +369 -1
  130. package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2650 -1
  131. package/dist/assets/cesium/Workers/decodeI3S.js +835 -0
  132. package/dist/assets/cesium/Workers/transcodeKTX2.js +3425 -1
  133. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +41 -1
  134. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +818 -1
  135. package/dist/assets/cesium.4137c8.js +164897 -0
  136. package/dist/assets/cesium.js +1 -1
  137. package/dist/assets/core.306872.js +19286 -0
  138. package/dist/assets/core.js +1 -1
  139. package/dist/assets/favicon-128.4c4ce5.png +0 -0
  140. package/dist/assets/favicon-180.5b99c0.png +0 -0
  141. package/dist/assets/favicon-192.0e205e.png +0 -0
  142. package/dist/assets/favicon-32.6b9add.png +0 -0
  143. package/dist/assets/favicon.d5ec97.svg +10 -0
  144. package/dist/assets/font/OFL.txt +93 -0
  145. package/dist/assets/font/TitilliumWeb-Regular.9ca076.woff2 +0 -0
  146. package/dist/assets/index-cfed33b1.js +1 -0
  147. package/dist/assets/ol.328bbf.js +60117 -0
  148. package/dist/assets/ol.js +1 -1
  149. package/dist/assets/style/icon-marker-blue.534e37.png +0 -0
  150. package/dist/assets/style/icon-marker-green.0b6a92.png +0 -0
  151. package/dist/assets/style/icon-marker-o-blue.7b6d62.png +0 -0
  152. package/dist/assets/style/icon-marker-o-green.c863c0.png +0 -0
  153. package/dist/assets/style/icon-marker-o-red.93ff58.png +0 -0
  154. package/dist/assets/style/icon-marker-o.036477.png +0 -0
  155. package/dist/assets/style/icon-marker-red.313d03.png +0 -0
  156. package/dist/assets/style/icon-marker.70960f.png +0 -0
  157. package/dist/assets/style/icon-pin-blue.7be369.png +0 -0
  158. package/dist/assets/style/icon-pin-green.cbb935.png +0 -0
  159. package/dist/assets/style/icon-pin-red.3f25b2.png +0 -0
  160. package/dist/assets/style/icon-pin.b7ce77.png +0 -0
  161. package/dist/assets/ui.e84ce9.css +5 -0
  162. package/dist/assets/ui.e84ce9.js +16488 -0
  163. package/dist/assets/ui.js +1 -1
  164. package/dist/assets/vue.1c8696.js +4911 -0
  165. package/dist/assets/vue.js +5 -1
  166. package/dist/assets/vuetify.008fac.css +5 -0
  167. package/dist/assets/vuetify.008fac.js +21262 -0
  168. package/dist/assets/vuetify.js +5 -2
  169. package/dist/index.html +90 -8
  170. package/index.html +111 -0
  171. package/index.js +203 -18
  172. package/lib/cesium.js +1 -1
  173. package/lib/core.js +1 -1
  174. package/lib/olLib.js +861 -843
  175. package/lib/ui.js +1 -1
  176. package/lib/vue.js +2 -1
  177. package/lib/vuetify.js +2 -2
  178. package/package.json +53 -34
  179. package/plugins/.eslintrc +9 -0
  180. package/plugins/@vcmap-show-case/README.md +28 -0
  181. package/plugins/@vcmap-show-case/buttons-example/README.md +4 -0
  182. package/plugins/@vcmap-show-case/buttons-example/package.json +5 -0
  183. package/plugins/@vcmap-show-case/buttons-example/src/ButtonsExample.vue +282 -0
  184. package/plugins/@vcmap-show-case/buttons-example/src/index.js +51 -0
  185. package/plugins/@vcmap-show-case/category-tester/README.md +3 -0
  186. package/plugins/@vcmap-show-case/category-tester/package.json +5 -0
  187. package/plugins/@vcmap-show-case/category-tester/src/CategoriesExample.vue +135 -0
  188. package/plugins/@vcmap-show-case/category-tester/src/CollectionComponentOptions.vue +209 -0
  189. package/plugins/@vcmap-show-case/category-tester/src/index.js +73 -0
  190. package/plugins/@vcmap-show-case/collection-manager-example/README.md +3 -0
  191. package/plugins/@vcmap-show-case/collection-manager-example/package.json +5 -0
  192. package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +182 -0
  193. package/plugins/@vcmap-show-case/collection-manager-example/src/index.js +79 -0
  194. package/plugins/@vcmap-show-case/config-editor/README.md +3 -0
  195. package/plugins/@vcmap-show-case/config-editor/package.json +5 -0
  196. package/plugins/@vcmap-show-case/config-editor/src/ConfigEditor.vue +62 -0
  197. package/plugins/@vcmap-show-case/config-editor/src/index.js +49 -0
  198. package/plugins/@vcmap-show-case/context-menu-tester/README.md +3 -0
  199. package/plugins/@vcmap-show-case/context-menu-tester/package.json +5 -0
  200. package/plugins/@vcmap-show-case/context-menu-tester/src/index.js +41 -0
  201. package/plugins/@vcmap-show-case/form-inputs-example/README.md +4 -0
  202. package/plugins/@vcmap-show-case/form-inputs-example/config.json +5 -0
  203. package/plugins/@vcmap-show-case/form-inputs-example/package.json +5 -0
  204. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +516 -0
  205. package/plugins/@vcmap-show-case/form-inputs-example/src/exampleActions.js +36 -0
  206. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example/src}/index.js +123 -39
  207. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example/src}/validation.js +14 -2
  208. package/plugins/@vcmap-show-case/hello-world/README.md +31 -0
  209. package/plugins/@vcmap-show-case/hello-world/package.json +6 -0
  210. package/plugins/@vcmap-show-case/hello-world/plugin-assets/vcs_logo.png +0 -0
  211. package/plugins/@vcmap-show-case/hello-world/src/defaultOptions.js +4 -0
  212. package/plugins/@vcmap-show-case/hello-world/src/helloWorld.vue +69 -0
  213. package/plugins/@vcmap-show-case/hello-world/src/index.js +142 -0
  214. package/plugins/@vcmap-show-case/hello-world/tests/helloWorld.spec.js +53 -0
  215. package/plugins/@vcmap-show-case/icons-example/README.md +5 -0
  216. package/plugins/@vcmap-show-case/icons-example/package.json +5 -0
  217. package/plugins/@vcmap-show-case/icons-example/src/AllIconsComponent.vue +51 -0
  218. package/plugins/@vcmap-show-case/icons-example/src/index.js +46 -0
  219. package/plugins/@vcmap-show-case/list-example/README.md +3 -0
  220. package/plugins/@vcmap-show-case/list-example/package.json +5 -0
  221. package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +411 -0
  222. package/plugins/@vcmap-show-case/list-example/src/index.js +46 -0
  223. package/plugins/@vcmap-show-case/notifier-tester/README.md +3 -0
  224. package/plugins/@vcmap-show-case/notifier-tester/package.json +5 -0
  225. package/plugins/@vcmap-show-case/notifier-tester/src/NotifierTester.vue +82 -0
  226. package/plugins/@vcmap-show-case/notifier-tester/src/index.js +42 -0
  227. package/plugins/@vcmap-show-case/plugin-editors/README.md +4 -0
  228. package/plugins/@vcmap-show-case/plugin-editors/package.json +5 -0
  229. package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +119 -0
  230. package/plugins/@vcmap-show-case/plugin-editors/src/index.js +41 -0
  231. package/plugins/@vcmap-show-case/project-selector/README.md +25 -0
  232. package/plugins/@vcmap-show-case/project-selector/config.json +15 -0
  233. package/plugins/@vcmap-show-case/project-selector/package.json +13 -0
  234. package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +65 -0
  235. package/plugins/@vcmap-show-case/project-selector/src/ProjectSelectorComponent.vue +102 -0
  236. package/plugins/@vcmap-show-case/project-selector/src/de.json +10 -0
  237. package/plugins/@vcmap-show-case/project-selector/src/en.json +10 -0
  238. package/plugins/@vcmap-show-case/project-selector/src/index.js +269 -0
  239. package/plugins/@vcmap-show-case/simple-graph/README.md +71 -0
  240. package/plugins/@vcmap-show-case/simple-graph/package.json +11 -0
  241. package/plugins/@vcmap-show-case/simple-graph/src/SimpleGraphComponent.vue +59 -0
  242. package/plugins/@vcmap-show-case/simple-graph/src/index.js +17 -0
  243. package/plugins/@vcmap-show-case/simple-graph/src/simpleGraphView.js +78 -0
  244. package/plugins/@vcmap-show-case/style-input-example/README.md +4 -0
  245. package/plugins/@vcmap-show-case/style-input-example/package.json +5 -0
  246. package/plugins/@vcmap-show-case/style-input-example/src/StyleExample.vue +190 -0
  247. package/plugins/@vcmap-show-case/style-input-example/src/index.js +42 -0
  248. package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +21 -0
  249. package/plugins/@vcmap-show-case/switch-map-callback-example/config.json +3 -0
  250. package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +5 -0
  251. package/plugins/@vcmap-show-case/switch-map-callback-example/src/index.js +34 -0
  252. package/plugins/@vcmap-show-case/switch-map-callback-example/src/switchMapCallback.js +47 -0
  253. package/plugins/@vcmap-show-case/table-example/README.md +3 -0
  254. package/plugins/@vcmap-show-case/table-example/package.json +5 -0
  255. package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +182 -0
  256. package/plugins/@vcmap-show-case/table-example/src/index.js +49 -0
  257. package/plugins/@vcmap-show-case/textfields-example/README.md +3 -0
  258. package/plugins/@vcmap-show-case/textfields-example/package.json +5 -0
  259. package/plugins/{example/mySuperComponent.vue → @vcmap-show-case/textfields-example/src/TextfieldsExample.vue} +13 -31
  260. package/plugins/@vcmap-show-case/textfields-example/src/index.js +64 -0
  261. package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/README.md +5 -3
  262. package/plugins/@vcmap-show-case/theme-changer/config.json +69 -0
  263. package/plugins/@vcmap-show-case/theme-changer/package.json +11 -0
  264. package/plugins/{@vcmap/theme-changer → @vcmap-show-case/theme-changer/src}/ThemeChangerComponent.vue +36 -8
  265. package/plugins/{@vcmap/theme-changer → @vcmap-show-case/theme-changer/src}/index.js +20 -14
  266. package/plugins/@vcmap-show-case/vector-properties-example/package.json +5 -0
  267. package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +128 -0
  268. package/plugins/@vcmap-show-case/vector-properties-example/src/index.js +40 -0
  269. package/plugins/@vcmap-show-case/window-tester/README.md +3 -0
  270. package/plugins/@vcmap-show-case/window-tester/package.json +5 -0
  271. package/plugins/@vcmap-show-case/window-tester/src/EmptyComponent.vue +18 -0
  272. package/plugins/@vcmap-show-case/window-tester/src/MyCustomHeader.vue +31 -0
  273. package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +185 -0
  274. package/plugins/@vcmap-show-case/window-tester/src/WindowExampleContent.vue +18 -0
  275. package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +45 -0
  276. package/plugins/@vcmap-show-case/window-tester/src/index.js +80 -0
  277. package/plugins/@vcmap-show-case/window-tester/src/toolboxData.js +288 -0
  278. package/plugins/@vcmap-show-case/wizard-example/README.md +3 -0
  279. package/plugins/@vcmap-show-case/wizard-example/package.json +5 -0
  280. package/plugins/@vcmap-show-case/wizard-example/src/WizardExample.vue +127 -0
  281. package/plugins/@vcmap-show-case/wizard-example/src/index.js +53 -0
  282. package/plugins/package.json +9 -2
  283. package/public/assets/@mdi/font/LICENSE +20 -0
  284. package/public/assets/@mdi/font/css/materialdesignicons.css.map +16 -0
  285. package/public/assets/@mdi/font/css/materialdesignicons.min.css +3 -0
  286. package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  287. package/public/assets/favicon-128.png +0 -0
  288. package/public/assets/favicon-180.png +0 -0
  289. package/public/assets/favicon-192.png +0 -0
  290. package/public/assets/favicon-32.png +0 -0
  291. package/public/assets/favicon.svg +10 -0
  292. package/public/assets/font/OFL.txt +93 -0
  293. package/public/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  294. package/public/assets/style/icon-marker-blue.png +0 -0
  295. package/public/assets/style/icon-marker-green.png +0 -0
  296. package/public/assets/style/icon-marker-o-blue.png +0 -0
  297. package/public/assets/style/icon-marker-o-green.png +0 -0
  298. package/public/assets/style/icon-marker-o-red.png +0 -0
  299. package/public/assets/style/icon-marker-o.png +0 -0
  300. package/public/assets/style/icon-marker-red.png +0 -0
  301. package/public/assets/style/icon-marker.png +0 -0
  302. package/public/assets/style/icon-pin-blue.png +0 -0
  303. package/public/assets/style/icon-pin-green.png +0 -0
  304. package/public/assets/style/icon-pin-red.png +0 -0
  305. package/public/assets/style/icon-pin.png +0 -0
  306. package/src/actions/StyleSelector.vue +121 -0
  307. package/src/actions/actionHelper.js +186 -50
  308. package/src/actions/stateRefAction.js +2 -3
  309. package/src/application/VcsApp.vue +539 -93
  310. package/src/application/VcsAppWrapper.vue +32 -0
  311. package/src/application/VcsAttributions.vue +83 -0
  312. package/src/application/VcsAttributionsFooter.vue +83 -0
  313. package/src/application/VcsMap.vue +22 -5
  314. package/src/application/VcsNavbar.vue +217 -0
  315. package/src/application/VcsSettings.vue +98 -0
  316. package/src/application/attributionsHelper.js +162 -0
  317. package/src/callback/activateLayersCallback.js +54 -0
  318. package/src/callback/applyLayerStyleCallback.js +63 -0
  319. package/src/callback/deactivateLayersCallback.js +54 -0
  320. package/src/callback/goToViewpointCallback.js +54 -0
  321. package/src/callback/vcsCallback.js +66 -0
  322. package/src/components/ImageElementInjector.vue +24 -0
  323. package/src/components/buttons/VcsActionButtonList.vue +129 -0
  324. package/src/components/buttons/VcsButton.vue +151 -0
  325. package/src/components/buttons/VcsFormButton.vue +178 -0
  326. package/src/components/buttons/VcsToolButton.vue +161 -0
  327. package/src/components/form-inputs-controls/VcsCheckbox.vue +115 -0
  328. package/src/components/form-inputs-controls/VcsChipArrayInput.vue +290 -0
  329. package/src/components/form-inputs-controls/VcsDatePicker.vue +156 -0
  330. package/src/components/form-inputs-controls/VcsFormSection.vue +150 -0
  331. package/src/components/form-inputs-controls/VcsLabel.vue +56 -0
  332. package/src/components/form-inputs-controls/VcsRadio.vue +149 -0
  333. package/src/components/form-inputs-controls/VcsRadioGrid.vue +175 -0
  334. package/src/components/form-inputs-controls/VcsSelect.vue +211 -0
  335. package/src/components/form-inputs-controls/VcsSlider.vue +73 -0
  336. package/src/components/form-inputs-controls/VcsTextArea.vue +180 -0
  337. package/src/components/form-inputs-controls/VcsTextField.vue +298 -0
  338. package/src/components/form-inputs-controls/VcsWizard.vue +137 -0
  339. package/src/components/form-inputs-controls/VcsWizardStep.vue +161 -0
  340. package/src/components/form-inputs-controls/composables.js +31 -0
  341. package/src/components/form-output/VcsFormattedNumber.vue +103 -0
  342. package/src/components/icons/+all.js +463 -0
  343. package/src/components/icons/2DAreaIcon.vue +58 -0
  344. package/src/components/icons/2DDistanceIcon.vue +24 -0
  345. package/src/components/icons/3DAreaIcon.vue +58 -0
  346. package/src/components/icons/3DDistanceIcon.vue +24 -0
  347. package/src/components/icons/3DHeightIcon.vue +24 -0
  348. package/src/components/icons/AngleIcon.vue +16 -0
  349. package/src/components/icons/AssociationsIcon.vue +37 -0
  350. package/src/components/icons/AxisIcon.vue +35 -0
  351. package/src/components/icons/BoundingBoxIcon.vue +38 -0
  352. package/src/components/icons/CheckboxCheckedIcon.vue +12 -0
  353. package/src/components/icons/CheckboxIcon.vue +21 -0
  354. package/src/components/icons/CheckboxIndeterminateIcon.vue +10 -0
  355. package/src/components/icons/CircleIcon.vue +25 -0
  356. package/src/components/icons/ClippingHorizontalIcon.vue +18 -0
  357. package/src/components/icons/ClippingIcon.vue +17 -0
  358. package/src/components/icons/ClippingVerticalIcon.vue +18 -0
  359. package/src/components/icons/ColorPickerIcon.vue +17 -0
  360. package/src/components/icons/ColorSwatchIcon.vue +21 -0
  361. package/src/components/icons/CommentIcon.vue +19 -0
  362. package/src/components/icons/CompassIcon.vue +24 -0
  363. package/src/components/icons/ComponentsIcon.vue +18 -0
  364. package/src/components/icons/ConeIcon.vue +30 -0
  365. package/src/components/icons/DimensionsHouseIcon.vue +20 -0
  366. package/src/components/icons/EditIcon.vue +17 -0
  367. package/src/components/icons/EditVerticesIcon.vue +35 -0
  368. package/src/components/icons/ElevationProfileIcon.vue +104 -0
  369. package/src/components/icons/ExportAreaIcon.vue +17 -0
  370. package/src/components/icons/ExportFlightIcon.vue +17 -0
  371. package/src/components/icons/ExportIcon.vue +24 -0
  372. package/src/components/icons/ExternalLinkIcon.vue +23 -0
  373. package/src/components/icons/EyeIcon.vue +17 -0
  374. package/src/components/icons/FastForwardIcon.vue +17 -0
  375. package/src/components/icons/FilterIcon.vue +18 -0
  376. package/src/components/icons/GlobalTerrainIcon.vue +19 -0
  377. package/src/components/icons/GlobeNatureIcon.vue +17 -0
  378. package/src/components/icons/GroundIcon.vue +27 -0
  379. package/src/components/icons/HealthCareIndustriesIcon.vue +113 -0
  380. package/src/components/icons/HelpIcon.vue +17 -0
  381. package/src/components/icons/HideIcon.vue +25 -0
  382. package/src/components/icons/HomePointIcon.vue +17 -0
  383. package/src/components/icons/HospitalsIcon.vue +223 -0
  384. package/src/components/icons/HouseIcon.vue +32 -0
  385. package/src/components/icons/ImportIcon.vue +18 -0
  386. package/src/components/icons/InfoIcon.vue +24 -0
  387. package/src/components/icons/KebabIcon.vue +38 -0
  388. package/src/components/icons/LabelIcon.vue +23 -0
  389. package/src/components/icons/LayersIcon.vue +28 -0
  390. package/src/components/icons/LegendIcon.vue +24 -0
  391. package/src/components/icons/LineIcon.vue +22 -0
  392. package/src/components/icons/LinkIcon.vue +17 -0
  393. package/src/components/icons/LogoutIcon.vue +17 -0
  394. package/src/components/icons/MapIcon.vue +18 -0
  395. package/src/components/icons/MenuIcon.vue +36 -0
  396. package/src/components/icons/MinusIcon.vue +18 -0
  397. package/src/components/icons/ObjectAttributeIcon.vue +18 -0
  398. package/src/components/icons/ObjectSelectIcon.vue +18 -0
  399. package/src/components/icons/ObliqueViewIcon.vue +19 -0
  400. package/src/components/icons/PdfIcon.vue +19 -0
  401. package/src/components/icons/PedestrianIcon.vue +17 -0
  402. package/src/components/icons/PenIcon.vue +16 -0
  403. package/src/components/icons/PlayCircleIcon.vue +20 -0
  404. package/src/components/icons/PlusIcon.vue +18 -0
  405. package/src/components/icons/PoiIcon.vue +23 -0
  406. package/src/components/icons/PointIcon.vue +40 -0
  407. package/src/components/icons/PointSelectIcon.vue +18 -0
  408. package/src/components/icons/PresentationModeIcon.vue +17 -0
  409. package/src/components/icons/ProgressIcon.vue +26 -0
  410. package/src/components/icons/QueryIcon.vue +39 -0
  411. package/src/components/icons/RectangleIcon.vue +24 -0
  412. package/src/components/icons/ReturnIcon.vue +17 -0
  413. package/src/components/icons/RewindIcon.vue +16 -0
  414. package/src/components/icons/RotateLeftIcon.vue +17 -0
  415. package/src/components/icons/RotateRightIcon.vue +17 -0
  416. package/src/components/icons/ScreenshotIcon.vue +53 -0
  417. package/src/components/icons/SearchIcon.vue +17 -0
  418. package/src/components/icons/ShadowIcon.vue +18 -0
  419. package/src/components/icons/ShapesIcon.vue +35 -0
  420. package/src/components/icons/ShareIcon.vue +22 -0
  421. package/src/components/icons/SimpleCircleFilledIcon.vue +18 -0
  422. package/src/components/icons/SimpleCircleHalfFilledIcon.vue +16 -0
  423. package/src/components/icons/SimpleCircleOutlinedIcon.vue +13 -0
  424. package/src/components/icons/SkipNextIcon.vue +18 -0
  425. package/src/components/icons/SkipPreviousIcon.vue +18 -0
  426. package/src/components/icons/SplitViewIcon.vue +19 -0
  427. package/src/components/icons/TerrainBoxIcon.vue +19 -0
  428. package/src/components/icons/TextStyleIcon.vue +17 -0
  429. package/src/components/icons/ThreeDimensionsIcon.vue +17 -0
  430. package/src/components/icons/ToolsIcon.vue +16 -0
  431. package/src/components/icons/TouchIcon.vue +18 -0
  432. package/src/components/icons/TrashCanIcon.vue +18 -0
  433. package/src/components/icons/TriangleIcon.vue +16 -0
  434. package/src/components/icons/TwoDimensionsIcon.vue +18 -0
  435. package/src/components/icons/UploadIcon.vue +17 -0
  436. package/src/components/icons/UserProfileIcon.vue +17 -0
  437. package/src/components/icons/UserShareIcon.vue +16 -0
  438. package/src/components/icons/VideoRecorderIcon.vue +23 -0
  439. package/src/components/icons/ViewpointFlightIcon.vue +28 -0
  440. package/src/components/icons/ViewpointIcon.vue +28 -0
  441. package/src/components/icons/Viewshed360Icon.vue +18 -0
  442. package/src/components/icons/ViewshedConeIcon.vue +17 -0
  443. package/src/components/icons/ViewshedIcon.vue +18 -0
  444. package/src/components/icons/WalkingIcon.vue +17 -0
  445. package/src/components/icons/WallIcon.vue +22 -0
  446. package/src/components/icons/WandIcon.vue +123 -0
  447. package/src/components/lists/VcsActionList.vue +132 -0
  448. package/src/components/lists/VcsList.vue +590 -0
  449. package/src/components/lists/VcsTreeview.vue +112 -0
  450. package/src/components/lists/VcsTreeviewLeaf.vue +81 -0
  451. package/src/components/lists/VcsTreeviewSearchbar.vue +148 -0
  452. package/src/components/notification/VcsBadge.vue +29 -0
  453. package/src/components/notification/VcsHelp.vue +39 -0
  454. package/src/components/notification/VcsTooltip.vue +160 -0
  455. package/src/components/notification/validation.js +19 -0
  456. package/src/components/plugins/AbstractConfigEditor.vue +84 -0
  457. package/src/components/style/MenuWrapper.vue +140 -0
  458. package/src/components/style/VcsFillMenu.vue +61 -0
  459. package/src/components/style/VcsFillSelector.vue +45 -0
  460. package/src/components/style/VcsImageMenu.vue +83 -0
  461. package/src/components/style/VcsImageSelector.vue +577 -0
  462. package/src/components/style/VcsStrokeMenu.vue +73 -0
  463. package/src/components/style/VcsStrokeSelector.vue +88 -0
  464. package/src/components/style/VcsTextMenu.vue +81 -0
  465. package/src/components/style/VcsTextSelector.vue +269 -0
  466. package/src/components/style/VcsVectorStyleComponent.vue +114 -0
  467. package/src/components/style/composables.js +84 -0
  468. package/src/components/tables/VcsDataTable.vue +475 -0
  469. package/src/components/tables/VcsTable.vue +145 -0
  470. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +778 -0
  471. package/src/components/vector-properties/composables.js +93 -0
  472. package/src/contentTree/LayerTree.vue +19 -15
  473. package/src/contentTree/contentTreeCollection.js +114 -42
  474. package/src/contentTree/contentTreeItem.js +109 -43
  475. package/src/contentTree/groupContentTreeItem.js +46 -23
  476. package/src/contentTree/layerContentTreeItem.js +54 -23
  477. package/src/contentTree/layerGroupContentTreeItem.js +58 -26
  478. package/src/contentTree/nodeContentTreeItem.js +19 -8
  479. package/src/contentTree/obliqueCollectionContentTreeItem.js +51 -22
  480. package/src/contentTree/subContentTreeItem.js +14 -5
  481. package/src/contentTree/vcsObjectContentTreeItem.js +27 -16
  482. package/src/contentTree/viewpointContentTreeItem.js +121 -0
  483. package/src/downloadHelper.js +52 -0
  484. package/src/featureInfo/AddressBalloonComponent.vue +58 -0
  485. package/src/featureInfo/BalloonComponent.vue +193 -0
  486. package/src/featureInfo/abstractFeatureInfoView.js +346 -0
  487. package/src/featureInfo/addressBalloonFeatureInfoView.js +130 -0
  488. package/src/featureInfo/balloonFeatureInfoView.js +159 -0
  489. package/src/featureInfo/balloonHelper.js +172 -0
  490. package/src/featureInfo/featureInfo.js +525 -0
  491. package/src/featureInfo/featureInfoInteraction.js +48 -0
  492. package/src/featureInfo/iframeFeatureInfoView.js +97 -0
  493. package/src/featureInfo/tableFeatureInfoView.js +120 -0
  494. package/src/i18n/de.js +195 -0
  495. package/src/i18n/en.js +195 -0
  496. package/src/i18n/i18nCollection.js +137 -0
  497. package/src/init.js +121 -36
  498. package/src/legend/StyleLegendItem.vue +176 -0
  499. package/src/legend/VcsLegend.vue +140 -0
  500. package/src/legend/legendHelper.js +204 -0
  501. package/src/logo-mobile.svg +9 -0
  502. package/src/logo.svg +26 -0
  503. package/src/manager/buttonManager.js +30 -61
  504. package/src/manager/collectionManager/CollectionComponent.vue +140 -0
  505. package/src/manager/collectionManager/CollectionComponentList.vue +77 -0
  506. package/src/manager/collectionManager/CollectionComponentProvider.vue +39 -0
  507. package/src/manager/collectionManager/CollectionManager.vue +62 -0
  508. package/src/manager/collectionManager/categoryManager.js +83 -0
  509. package/src/manager/collectionManager/collectionComponent.js +470 -0
  510. package/src/manager/collectionManager/collectionManager.js +432 -0
  511. package/src/manager/contextMenu/ContextMenuComponent.vue +43 -0
  512. package/src/manager/contextMenu/contextMenuInteraction.js +47 -0
  513. package/src/manager/contextMenu/contextMenuManager.js +220 -0
  514. package/src/manager/navbarManager.js +115 -0
  515. package/src/manager/toolbox/GroupToolboxComponent.vue +128 -0
  516. package/src/manager/toolbox/SelectToolboxComponent.vue +144 -0
  517. package/src/manager/toolbox/ToolboxManager.vue +139 -74
  518. package/src/manager/toolbox/toolboxManager.js +371 -0
  519. package/src/manager/window/WindowComponent.vue +105 -85
  520. package/src/manager/window/WindowComponentHeader.vue +116 -25
  521. package/src/manager/window/WindowManager.vue +133 -50
  522. package/src/manager/window/windowHelper.js +465 -0
  523. package/src/manager/window/windowManager.js +297 -91
  524. package/src/navigation/{mapNavCompass.vue → MapNavCompass.vue} +31 -11
  525. package/src/navigation/MapNavigation.vue +291 -0
  526. package/src/navigation/ObliqueRotation.vue +69 -0
  527. package/src/navigation/{orientationToolsButton.vue → OrientationToolsButton.vue} +14 -13
  528. package/src/navigation/{tiltSlider.vue → TiltSlider.vue} +40 -17
  529. package/src/navigation/VcsCompass.vue +69 -0
  530. package/src/navigation/VcsZoomButton.vue +52 -0
  531. package/src/navigation/overviewMap.js +142 -104
  532. package/src/navigation/overviewMapClickedInteraction.js +6 -1
  533. package/src/notifier/NotifierComponent.vue +86 -0
  534. package/src/notifier/notifier.js +129 -0
  535. package/src/pluginHelper.js +148 -20
  536. package/src/search/ResultItem.vue +83 -0
  537. package/src/search/ResultsComponent.vue +103 -0
  538. package/src/search/SearchComponent.vue +116 -0
  539. package/src/search/search.js +342 -0
  540. package/src/setup.js +9 -10
  541. package/src/state.js +272 -0
  542. package/src/styles/_theming.scss +69 -11
  543. package/src/styles/_typography.scss +3 -6
  544. package/src/styles/main.scss +12 -0
  545. package/src/styles/shades.scss +4 -0
  546. package/src/styles/utils/_border.scss +1 -1
  547. package/src/styles/utils/_cursor.scss +4 -0
  548. package/src/styles/utils/_display.scss +1 -1
  549. package/src/styles/variables.scss +138 -0
  550. package/src/styles/vcsFont.scss +2 -0
  551. package/src/styles/vcsGrid.scss +13 -0
  552. package/src/uiConfig.js +83 -0
  553. package/src/vcsUiApp.js +510 -69
  554. package/src/vuePlugins/i18n.js +51 -13
  555. package/src/vuePlugins/vuetify.js +104 -43
  556. package/config/berlin.config.json +0 -529
  557. package/dist/assets/cesium/Workers/ArcType-fc72c06c.js +0 -1
  558. package/dist/assets/cesium/Workers/AttributeCompression-80665726.js +0 -1
  559. package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-a655a4bc.js +0 -1
  560. package/dist/assets/cesium/Workers/BoundingRectangle-c3b79029.js +0 -1
  561. package/dist/assets/cesium/Workers/BoxGeometry-f8f9c981.js +0 -1
  562. package/dist/assets/cesium/Workers/Color-de06a177.js +0 -1
  563. package/dist/assets/cesium/Workers/ComponentDatatype-a15c9a19.js +0 -1
  564. package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-48cdc26d.js +0 -1
  565. package/dist/assets/cesium/Workers/CorridorGeometryLibrary-ddc027d3.js +0 -1
  566. package/dist/assets/cesium/Workers/CylinderGeometry-82a8cbe6.js +0 -1
  567. package/dist/assets/cesium/Workers/CylinderGeometryLibrary-76cda53e.js +0 -1
  568. package/dist/assets/cesium/Workers/EllipseGeometry-32d55454.js +0 -1
  569. package/dist/assets/cesium/Workers/EllipseGeometryLibrary-b2ae188a.js +0 -1
  570. package/dist/assets/cesium/Workers/EllipseOutlineGeometry-f05a5a27.js +0 -1
  571. package/dist/assets/cesium/Workers/EllipsoidGeodesic-19e75e11.js +0 -1
  572. package/dist/assets/cesium/Workers/EllipsoidGeometry-7c99fc81.js +0 -1
  573. package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-21c243df.js +0 -1
  574. package/dist/assets/cesium/Workers/EllipsoidRhumbLine-6145377b.js +0 -1
  575. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-a01286f6.js +0 -1
  576. package/dist/assets/cesium/Workers/EncodedCartesian3-d9f5c4a4.js +0 -1
  577. package/dist/assets/cesium/Workers/FrustumGeometry-17776af8.js +0 -1
  578. package/dist/assets/cesium/Workers/GeometryAttribute-89a520b9.js +0 -1
  579. package/dist/assets/cesium/Workers/GeometryAttributes-32b29525.js +0 -1
  580. package/dist/assets/cesium/Workers/GeometryInstance-4fbf16ba.js +0 -1
  581. package/dist/assets/cesium/Workers/GeometryOffsetAttribute-8c5e10db.js +0 -1
  582. package/dist/assets/cesium/Workers/GeometryPipeline-309fad76.js +0 -1
  583. package/dist/assets/cesium/Workers/IndexDatatype-f1dcdf35.js +0 -1
  584. package/dist/assets/cesium/Workers/IntersectionTests-58aa8f80.js +0 -1
  585. package/dist/assets/cesium/Workers/Matrix2-47e98d76.js +0 -1
  586. package/dist/assets/cesium/Workers/OrientedBoundingBox-fcb5b750.js +0 -1
  587. package/dist/assets/cesium/Workers/Plane-3f01019d.js +0 -1
  588. package/dist/assets/cesium/Workers/PolygonGeometryLibrary-0b29eb16.js +0 -1
  589. package/dist/assets/cesium/Workers/PolygonPipeline-a934c4dd.js +0 -1
  590. package/dist/assets/cesium/Workers/PolylinePipeline-8095c9bc.js +0 -1
  591. package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-67d12fff.js +0 -1
  592. package/dist/assets/cesium/Workers/PrimitivePipeline-980e44c5.js +0 -1
  593. package/dist/assets/cesium/Workers/RectangleGeometryLibrary-621c6de8.js +0 -1
  594. package/dist/assets/cesium/Workers/RuntimeError-8952249c.js +0 -1
  595. package/dist/assets/cesium/Workers/TerrainEncoding-f96552d5.js +0 -1
  596. package/dist/assets/cesium/Workers/Transforms-c8cb8f43.js +0 -39
  597. package/dist/assets/cesium/Workers/VertexFormat-a0b706b0.js +0 -1
  598. package/dist/assets/cesium/Workers/WallGeometryLibrary-c03d8479.js +0 -1
  599. package/dist/assets/cesium/Workers/WebGLConstants-508b9636.js +0 -1
  600. package/dist/assets/cesium/Workers/WebMercatorProjection-79b3214e.js +0 -1
  601. package/dist/assets/cesium/Workers/_commonjsHelpers-3aae1032-26891ab7.js +0 -1
  602. package/dist/assets/cesium/Workers/_rollup_plugin_ignore_empty_module_placeholder-57d574d0.js +0 -1
  603. package/dist/assets/cesium/Workers/arrayRemoveDuplicates-dc2f4046.js +0 -1
  604. package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +0 -6
  605. package/dist/assets/cesium/Workers/combine-3c023bda.js +0 -1
  606. package/dist/assets/cesium/Workers/defaultValue-81eec7ed.js +0 -1
  607. package/dist/assets/cesium.6b5bb6.js +0 -9105
  608. package/dist/assets/core.98f9bb.js +0 -4
  609. package/dist/assets/index.0be2842f.js +0 -1
  610. package/dist/assets/index.60dea538.css +0 -1
  611. package/dist/assets/ol.0561aa.js +0 -318
  612. package/dist/assets/ui.b7c1e3.css +0 -1
  613. package/dist/assets/ui.b7c1e3.js +0 -39
  614. package/dist/assets/uicomponents.682c5f.css +0 -1
  615. package/dist/assets/uicomponents.682c5f.js +0 -32
  616. package/dist/assets/uicomponents.js +0 -1
  617. package/dist/assets/vue-composition-api.f926fa.js +0 -14
  618. package/dist/assets/vue-composition-api.js +0 -2
  619. package/dist/assets/vue.ddcb6b.js +0 -9
  620. package/dist/assets/vuetify.d21163.css +0 -5
  621. package/dist/assets/vuetify.d21163.js +0 -48
  622. package/lib/uicomponents.js +0 -1
  623. package/lib/vue-composition-api.js +0 -2
  624. package/map.config.json +0 -35
  625. package/plugins/@vcmap/pluginExample/config.json +0 -6
  626. package/plugins/@vcmap/pluginExample/package.json +0 -7
  627. package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +0 -374
  628. package/plugins/@vcmap/project-selector/ContextsListComponent.vue +0 -62
  629. package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +0 -81
  630. package/plugins/@vcmap/project-selector/README.md +0 -29
  631. package/plugins/@vcmap/project-selector/config.json +0 -15
  632. package/plugins/@vcmap/project-selector/index.js +0 -254
  633. package/plugins/@vcmap/project-selector/package.json +0 -15
  634. package/plugins/@vcmap/theme-changer/config.json +0 -69
  635. package/plugins/@vcmap/theme-changer/package.json +0 -12
  636. package/plugins/buttonExamples/ButtonExamples.vue +0 -190
  637. package/plugins/buttonExamples/index.js +0 -40
  638. package/plugins/categoryTest/Categories.vue +0 -145
  639. package/plugins/categoryTest/Category.vue +0 -114
  640. package/plugins/categoryTest/ItemEditor.vue +0 -13
  641. package/plugins/categoryTest/index.js +0 -41
  642. package/plugins/example/index.js +0 -56
  643. package/plugins/test/editor.vue +0 -63
  644. package/plugins/test/index.js +0 -93
  645. package/plugins/test/myCustomHeader.vue +0 -19
  646. package/plugins/test/toolbox-data.js +0 -49
  647. package/plugins/test/vcsContent.vue +0 -23
  648. package/plugins/test/windowManagerExample.vue +0 -144
  649. package/src/actions/styleSelector.vue +0 -90
  650. package/src/application/Navbar.vue +0 -118
  651. package/src/application/empty-cmp.vue +0 -6
  652. package/src/assets/logo.svg +0 -26
  653. package/src/contentTree/viewPointContentTreeItem.js +0 -107
  654. package/src/lang/de.js +0 -60
  655. package/src/lang/en.js +0 -53
  656. package/src/manager/toolbox/ToolboxMultiSelectButton.vue +0 -96
  657. package/src/manager/toolbox/ToolboxSingleSelectButton.vue +0 -98
  658. package/src/manager/toolbox/toolbox-manager.js +0 -203
  659. package/src/navigation/mapNavigation.vue +0 -201
  660. package/src/navigation/obliqueRotation.vue +0 -48
  661. package/src/navigation/vcsCompass.vue +0 -144
  662. package/src/navigation/vcsZoomButton.vue +0 -27
  663. package/start.js +0 -3
@@ -1 +1,1607 @@
1
- define(["./Transforms-c8cb8f43","./Matrix2-47e98d76","./RuntimeError-8952249c","./defaultValue-81eec7ed","./ComponentDatatype-a15c9a19","./ArcType-fc72c06c","./arrayRemoveDuplicates-dc2f4046","./EllipsoidGeodesic-19e75e11","./EllipsoidRhumbLine-6145377b","./EncodedCartesian3-d9f5c4a4","./GeometryAttribute-89a520b9","./IntersectionTests-58aa8f80","./Plane-3f01019d","./WebMercatorProjection-79b3214e","./_commonjsHelpers-3aae1032-26891ab7","./combine-3c023bda","./WebGLConstants-508b9636"],(function(e,t,a,n,i,r,s,o,l,c,u,C,p,d,h,g,f){"use strict";function m(a){a=n.defaultValue(a,n.defaultValue.EMPTY_OBJECT),this._ellipsoid=n.defaultValue(a.ellipsoid,t.Ellipsoid.WGS84),this._rectangle=n.defaultValue(a.rectangle,t.Rectangle.MAX_VALUE),this._projection=new e.GeographicProjection(this._ellipsoid),this._numberOfLevelZeroTilesX=n.defaultValue(a.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=n.defaultValue(a.numberOfLevelZeroTilesY,1)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),m.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<<e},m.prototype.getNumberOfYTilesAtLevel=function(e){return this._numberOfLevelZeroTilesY<<e},m.prototype.rectangleToNativeRectangle=function(e,a){const r=i.CesiumMath.toDegrees(e.west),s=i.CesiumMath.toDegrees(e.south),o=i.CesiumMath.toDegrees(e.east),l=i.CesiumMath.toDegrees(e.north);return n.defined(a)?(a.west=r,a.south=s,a.east=o,a.north=l,a):new t.Rectangle(r,s,o,l)},m.prototype.tileXYToNativeRectangle=function(e,t,a,n){const r=this.tileXYToRectangle(e,t,a,n);return r.west=i.CesiumMath.toDegrees(r.west),r.south=i.CesiumMath.toDegrees(r.south),r.east=i.CesiumMath.toDegrees(r.east),r.north=i.CesiumMath.toDegrees(r.north),r},m.prototype.tileXYToRectangle=function(e,a,i,r){const s=this._rectangle,o=this.getNumberOfXTilesAtLevel(i),l=this.getNumberOfYTilesAtLevel(i),c=s.width/o,u=e*c+s.west,C=(e+1)*c+s.west,p=s.height/l,d=s.north-a*p,h=s.north-(a+1)*p;return n.defined(r)||(r=new t.Rectangle(u,h,C,d)),r.west=u,r.south=h,r.east=C,r.north=d,r},m.prototype.positionToTileXY=function(e,a,r){const s=this._rectangle;if(!t.Rectangle.contains(s,e))return;const o=this.getNumberOfXTilesAtLevel(a),l=this.getNumberOfYTilesAtLevel(a),c=s.width/o,u=s.height/l;let C=e.longitude;s.east<s.west&&(C+=i.CesiumMath.TWO_PI);let p=(C-s.west)/c|0;p>=o&&(p=o-1);let d=(s.north-e.latitude)/u|0;return d>=l&&(d=l-1),n.defined(r)?(r.x=p,r.y=d,r):new t.Cartesian2(p,d)};const w=new t.Cartesian3,y=new t.Cartesian3,M=new t.Cartographic,T=new t.Cartesian3,E=new t.Cartesian3,_=new e.BoundingSphere,O=new m,b=[new t.Cartographic,new t.Cartographic,new t.Cartographic,new t.Cartographic],P=new t.Cartesian2,A={};function k(e){t.Cartographic.fromRadians(e.east,e.north,0,b[0]),t.Cartographic.fromRadians(e.west,e.north,0,b[1]),t.Cartographic.fromRadians(e.east,e.south,0,b[2]),t.Cartographic.fromRadians(e.west,e.south,0,b[3]);let a=0,n=0,i=0,r=0;const s=A._terrainHeightsMaxLevel;let o;for(o=0;o<=s;++o){let e=!1;for(let t=0;t<4;++t){const a=b[t];if(O.positionToTileXY(a,o,P),0===t)i=P.x,r=P.y;else if(i!==P.x||r!==P.y){e=!0;break}}if(e)break;a=i,n=r}if(0!==o)return{x:a,y:n,level:o>s?s:o-1}}A.initialize=function(){let t=A._initPromise;return n.defined(t)||(t=e.Resource.fetchJson(e.buildModuleUrl("Assets/approximateTerrainHeights.json")).then((function(e){A._terrainHeights=e})),A._initPromise=t),t},A.getMinimumMaximumHeights=function(e,a){a=n.defaultValue(a,t.Ellipsoid.WGS84);const i=k(e);let r=A._defaultMinTerrainHeight,s=A._defaultMaxTerrainHeight;if(n.defined(i)){const o=`${i.level}-${i.x}-${i.y}`,l=A._terrainHeights[o];n.defined(l)&&(r=l[0],s=l[1]),a.cartographicToCartesian(t.Rectangle.northeast(e,M),w),a.cartographicToCartesian(t.Rectangle.southwest(e,M),y),t.Cartesian3.midpoint(y,w,T);const c=a.scaleToGeodeticSurface(T,E);if(n.defined(c)){const e=t.Cartesian3.distance(T,c);r=Math.min(r,-e)}else r=A._defaultMinTerrainHeight}return r=Math.max(A._defaultMinTerrainHeight,r),{minimumTerrainHeight:r,maximumTerrainHeight:s}},A.getBoundingSphere=function(a,i){i=n.defaultValue(i,t.Ellipsoid.WGS84);const r=k(a);let s=A._defaultMaxTerrainHeight;if(n.defined(r)){const e=`${r.level}-${r.x}-${r.y}`,t=A._terrainHeights[e];n.defined(t)&&(s=t[1])}const o=e.BoundingSphere.fromRectangle3D(a,i,0);return e.BoundingSphere.fromRectangle3D(a,i,s,_),e.BoundingSphere.union(o,_,o)},A._terrainHeightsMaxLevel=6,A._defaultMaxTerrainHeight=9e3,A._defaultMinTerrainHeight=-1e5,A._terrainHeights=void 0,A._initPromise=void 0,Object.defineProperties(A,{initialized:{get:function(){return n.defined(A._terrainHeights)}}});const L=[e.GeographicProjection,d.WebMercatorProjection],S=L.length,x=Math.cos(i.CesiumMath.toRadians(30)),I=Math.cos(i.CesiumMath.toRadians(150));function N(e){const a=(e=n.defaultValue(e,n.defaultValue.EMPTY_OBJECT)).positions;this.width=n.defaultValue(e.width,1),this._positions=a,this.granularity=n.defaultValue(e.granularity,9999),this.loop=n.defaultValue(e.loop,!1),this.arcType=n.defaultValue(e.arcType,r.ArcType.GEODESIC),this._ellipsoid=t.Ellipsoid.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(N.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+t.Ellipsoid.packedLength+1+1}}}),N.setProjectionAndEllipsoid=function(e,t){let a=0;for(let e=0;e<S;e++)if(t instanceof L[e]){a=e;break}e._projectionIndex=a,e._ellipsoid=t.ellipsoid};const R=new t.Cartesian3,D=new t.Cartesian3,v=new t.Cartesian3;function z(e,a,n,i,r){const s=F(i,e,0,R),o=F(i,e,n,D),l=F(i,a,0,v),c=q(o,s,D),u=q(l,s,v);return t.Cartesian3.cross(u,c,r),t.Cartesian3.normalize(r,r)}const H=new t.Cartographic,j=new t.Cartesian3,B=new t.Cartesian3,V=new t.Cartesian3;function G(e,a,n,i,s,c,u,C,p,d,h){if(0===s)return;let g;c===r.ArcType.GEODESIC?g=new o.EllipsoidGeodesic(e,a,u):c===r.ArcType.RHUMB&&(g=new l.EllipsoidRhumbLine(e,a,u));const f=g.surfaceDistance;if(f<s)return;const m=z(e,a,i,u,V),w=Math.ceil(f/s),y=f/w;let M=y;const T=w-1;let E=C.length;for(let e=0;e<T;e++){const e=g.interpolateUsingSurfaceDistance(M,H),a=F(u,e,n,j),r=F(u,e,i,B);t.Cartesian3.pack(m,C,E),t.Cartesian3.pack(a,p,E),t.Cartesian3.pack(r,d,E),h.push(e.latitude),h.push(e.longitude),E+=3,M+=y}}const Y=new t.Cartographic;function F(e,a,n,i){return t.Cartographic.clone(a,Y),Y.height=n,t.Cartographic.toCartesian(Y,e,i)}function q(e,a,n){return t.Cartesian3.subtract(e,a,n),t.Cartesian3.normalize(n,n),n}function X(e,a,n,i){return i=q(e,a,i),i=t.Cartesian3.cross(i,n,i),i=t.Cartesian3.normalize(i,i),i=t.Cartesian3.cross(n,i,i)}N.pack=function(e,a,i){let r=n.defaultValue(i,0);const s=e._positions,o=s.length;a[r++]=o;for(let e=0;e<o;++e){const n=s[e];t.Cartesian3.pack(n,a,r),r+=3}return a[r++]=e.granularity,a[r++]=e.loop?1:0,a[r++]=e.arcType,t.Ellipsoid.pack(e._ellipsoid,a,r),r+=t.Ellipsoid.packedLength,a[r++]=e._projectionIndex,a[r++]=e._scene3DOnly?1:0,a},N.unpack=function(e,a,i){let r=n.defaultValue(a,0);const s=e[r++],o=new Array(s);for(let a=0;a<s;a++)o[a]=t.Cartesian3.unpack(e,r),r+=3;const l=e[r++],c=1===e[r++],u=e[r++],C=t.Ellipsoid.unpack(e,r);r+=t.Ellipsoid.packedLength;const p=e[r++],d=1===e[r++];return n.defined(i)||(i=new N({positions:o})),i._positions=o,i.granularity=l,i.loop=c,i.arcType=u,i._ellipsoid=C,i._projectionIndex=p,i._scene3DOnly=d,i};const W=new t.Cartesian3,U=new t.Cartesian3,Z=new t.Cartesian3,$=new t.Cartesian3;function J(e,a,n,r,s){const o=q(n,a,$),l=X(e,a,o,W),c=X(r,a,o,U);if(i.CesiumMath.equalsEpsilon(t.Cartesian3.dot(l,c),-1,i.CesiumMath.EPSILON5))return s=t.Cartesian3.cross(o,l,s),s=t.Cartesian3.normalize(s,s);s=t.Cartesian3.add(c,l,s),s=t.Cartesian3.normalize(s,s);const u=t.Cartesian3.cross(o,s,Z);return t.Cartesian3.dot(c,u)<0&&(s=t.Cartesian3.negate(s,s)),s}const Q=p.Plane.fromPointNormal(t.Cartesian3.ZERO,t.Cartesian3.UNIT_Y),K=new t.Cartesian3,ee=new t.Cartesian3,te=new t.Cartesian3,ae=new t.Cartesian3,ne=new t.Cartesian3,ie=new t.Cartesian3,re=new t.Cartographic,se=new t.Cartographic,oe=new t.Cartographic;N.createGeometry=function(a){const o=!a._scene3DOnly;let p=a.loop;const d=a._ellipsoid,h=a.granularity,g=a.arcType,f=new L[a._projectionIndex](d),m=1e3;let w,y;const M=a._positions,T=M.length;let E,_,O,b;2===T&&(p=!1);const P=new l.EllipsoidRhumbLine(void 0,void 0,d);let k,S,I;const N=[M[0]];for(y=0;y<T-1;y++)E=M[y],_=M[y+1],k=C.IntersectionTests.lineSegmentPlane(E,_,Q,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||(a.arcType===r.ArcType.GEODESIC?N.push(t.Cartesian3.clone(k)):a.arcType===r.ArcType.RHUMB&&(I=d.cartesianToCartographic(k,re).longitude,O=d.cartesianToCartographic(E,re),b=d.cartesianToCartographic(_,se),P.setEndPoints(O,b),S=P.findIntersectionWithLongitude(I,oe),k=d.cartographicToCartesian(S,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||N.push(t.Cartesian3.clone(k)))),N.push(_);p&&(E=M[T-1],_=M[0],k=C.IntersectionTests.lineSegmentPlane(E,_,Q,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||(a.arcType===r.ArcType.GEODESIC?N.push(t.Cartesian3.clone(k)):a.arcType===r.ArcType.RHUMB&&(I=d.cartesianToCartographic(k,re).longitude,O=d.cartesianToCartographic(E,re),b=d.cartesianToCartographic(_,se),P.setEndPoints(O,b),S=P.findIntersectionWithLongitude(I,oe),k=d.cartographicToCartesian(S,ie),!n.defined(k)||t.Cartesian3.equalsEpsilon(k,E,i.CesiumMath.EPSILON7)||t.Cartesian3.equalsEpsilon(k,_,i.CesiumMath.EPSILON7)||N.push(t.Cartesian3.clone(k)))));let R=N.length,D=new Array(R);for(y=0;y<R;y++){const e=t.Cartographic.fromCartesian(N[y],d);e.height=0,D[y]=e}if(D=s.arrayRemoveDuplicates(D,t.Cartographic.equalsEpsilon),R=D.length,R<2)return;const v=[],H=[],j=[],B=[];let V=K,Y=ee,X=te,W=ae,U=ne;const Z=D[0],$=D[1];for(V=F(d,D[R-1],0,V),W=F(d,$,0,W),Y=F(d,Z,0,Y),X=F(d,Z,m,X),U=p?J(V,Y,X,W,U):z(Z,$,m,d,U),t.Cartesian3.pack(U,H,0),t.Cartesian3.pack(Y,j,0),t.Cartesian3.pack(X,B,0),v.push(Z.latitude),v.push(Z.longitude),G(Z,$,0,m,h,g,d,H,j,B,v),y=1;y<R-1;++y){V=t.Cartesian3.clone(Y,V),Y=t.Cartesian3.clone(W,Y);const e=D[y];F(d,e,m,X),F(d,D[y+1],0,W),J(V,Y,X,W,U),w=H.length,t.Cartesian3.pack(U,H,w),t.Cartesian3.pack(Y,j,w),t.Cartesian3.pack(X,B,w),v.push(e.latitude),v.push(e.longitude),G(D[y],D[y+1],0,m,h,g,d,H,j,B,v)}const le=D[R-1],ce=D[R-2];if(Y=F(d,le,0,Y),X=F(d,le,m,X),p){const e=D[0];V=F(d,ce,0,V),W=F(d,e,0,W),U=J(V,Y,X,W,U)}else U=z(ce,le,m,d,U);if(w=H.length,t.Cartesian3.pack(U,H,w),t.Cartesian3.pack(Y,j,w),t.Cartesian3.pack(X,B,w),v.push(le.latitude),v.push(le.longitude),p){for(G(le,Z,0,m,h,g,d,H,j,B,v),w=H.length,y=0;y<3;++y)H[w+y]=H[y],j[w+y]=j[y],B[w+y]=B[y];v.push(Z.latitude),v.push(Z.longitude)}return function(a,n,r,s,o,l,C){let p,d;const h=n._ellipsoid,g=r.length/3-1,f=8*g,m=4*f,w=36*g,y=f>65535?new Uint32Array(w):new Uint16Array(w),M=new Float64Array(3*f),T=new Float32Array(m),E=new Float32Array(m),_=new Float32Array(m),O=new Float32Array(m),b=new Float32Array(m);let P,k,L,S;C&&(P=new Float32Array(m),k=new Float32Array(m),L=new Float32Array(m),S=new Float32Array(2*f));const I=l.length/2;let N=0;const R=Ee;R.height=0;const D=_e;D.height=0;let v=Oe,z=be;if(C)for(d=0,p=1;p<I;p++)R.latitude=l[d],R.longitude=l[d+1],D.latitude=l[d+2],D.longitude=l[d+3],v=n.project(R,v),z=n.project(D,z),N+=t.Cartesian3.distance(v,z),d+=2;const H=s.length/3;z=t.Cartesian3.unpack(s,0,z);let j,B=0;for(d=3,p=1;p<H;p++)v=t.Cartesian3.clone(z,v),z=t.Cartesian3.unpack(s,d,z),B+=t.Cartesian3.distance(v,z),d+=3;d=3;let V=0,G=0,Y=0,F=0,X=!1,W=t.Cartesian3.unpack(r,0,Ae),U=t.Cartesian3.unpack(s,0,be),Z=t.Cartesian3.unpack(o,0,Le);if(a){Ce(Z,t.Cartesian3.unpack(r,r.length-6,Pe),W,U)&&(Z=t.Cartesian3.negate(Z,Z))}let $=0,J=0,Q=0;for(p=0;p<g;p++){const e=t.Cartesian3.clone(W,Pe),a=t.Cartesian3.clone(U,Oe);let u,p,g,f,m=t.Cartesian3.clone(Z,ke);if(X&&(m=t.Cartesian3.negate(m,m)),W=t.Cartesian3.unpack(r,d,Ae),U=t.Cartesian3.unpack(s,d,be),Z=t.Cartesian3.unpack(o,d,Le),X=Ce(Z,e,W,U),R.latitude=l[V],R.longitude=l[V+1],D.latitude=l[V+2],D.longitude=l[V+3],C){const e=Te(R,D);u=n.project(R,ve),p=n.project(D,ze);const a=q(p,u,Ue);a.y=Math.abs(a.y),g=He,f=je,0===e||t.Cartesian3.dot(a,t.Cartesian3.UNIT_Y)>x?(g=ge(n,R,m,u,He),f=ge(n,D,Z,p,je)):1===e?(f=ge(n,D,Z,p,je),g.x=0,g.y=i.CesiumMath.sign(R.longitude-Math.abs(D.longitude)),g.z=0):(g=ge(n,R,m,u,He),f.x=0,f.y=i.CesiumMath.sign(R.longitude-D.longitude),f.z=0)}const w=t.Cartesian3.distance(a,U),y=c.EncodedCartesian3.fromCartesian(e,Xe),I=t.Cartesian3.subtract(W,e,Be),v=t.Cartesian3.normalize(I,Ye);let z=t.Cartesian3.subtract(a,e,Ve);z=t.Cartesian3.normalize(z,z);let H=t.Cartesian3.cross(v,z,Ye);H=t.Cartesian3.normalize(H,H);let K=t.Cartesian3.cross(z,m,Fe);K=t.Cartesian3.normalize(K,K);let ee=t.Cartesian3.subtract(U,W,Ge);ee=t.Cartesian3.normalize(ee,ee);let te=t.Cartesian3.cross(Z,ee,qe);te=t.Cartesian3.normalize(te,te);const ae=w/B,ne=$/B;let ie,re,se,oe=0,le=0,ce=0;if(C){oe=t.Cartesian3.distance(u,p),ie=c.EncodedCartesian3.fromCartesian(u,We),re=t.Cartesian3.subtract(p,u,Ue),se=t.Cartesian3.normalize(re,Ze);const e=se.x;se.x=se.y,se.y=-e,le=oe/N,ce=J/N}for(j=0;j<8;j++){const e=F+4*j,a=G+2*j,n=e+3,i=j<4?1:-1,r=2===j||3===j||6===j||7===j?1:-1;t.Cartesian3.pack(y.high,T,e),T[n]=I.x,t.Cartesian3.pack(y.low,E,e),E[n]=I.y,t.Cartesian3.pack(K,_,e),_[n]=I.z,t.Cartesian3.pack(te,O,e),O[n]=ae*i,t.Cartesian3.pack(H,b,e);let s=ne*r;0===s&&r<0&&(s=9),b[n]=s,C&&(P[e]=ie.high.x,P[e+1]=ie.high.y,P[e+2]=ie.low.x,P[e+3]=ie.low.y,L[e]=-g.y,L[e+1]=g.x,L[e+2]=f.y,L[e+3]=-f.x,k[e]=re.x,k[e+1]=re.y,k[e+2]=se.x,k[e+3]=se.y,S[a]=le*i,s=ce*r,0===s&&r<0&&(s=9),S[a+1]=s)}const ue=Re,pe=De,de=Ie,he=Ne,fe=t.Rectangle.fromCartographicArray(Se,xe),me=A.getMinimumMaximumHeights(fe,h),ye=me.minimumTerrainHeight,Ee=me.maximumTerrainHeight;Q+=ye,Q+=Ee,we(e,a,ye,Ee,ue,de),we(W,U,ye,Ee,pe,he);let _e=t.Cartesian3.multiplyByScalar(H,i.CesiumMath.EPSILON5,$e);t.Cartesian3.add(ue,_e,ue),t.Cartesian3.add(pe,_e,pe),t.Cartesian3.add(de,_e,de),t.Cartesian3.add(he,_e,he),Me(ue,pe),Me(de,he),t.Cartesian3.pack(ue,M,Y),t.Cartesian3.pack(pe,M,Y+3),t.Cartesian3.pack(he,M,Y+6),t.Cartesian3.pack(de,M,Y+9),_e=t.Cartesian3.multiplyByScalar(H,-2*i.CesiumMath.EPSILON5,$e),t.Cartesian3.add(ue,_e,ue),t.Cartesian3.add(pe,_e,pe),t.Cartesian3.add(de,_e,de),t.Cartesian3.add(he,_e,he),Me(ue,pe),Me(de,he),t.Cartesian3.pack(ue,M,Y+12),t.Cartesian3.pack(pe,M,Y+15),t.Cartesian3.pack(he,M,Y+18),t.Cartesian3.pack(de,M,Y+21),V+=2,d+=3,G+=16,Y+=24,F+=32,$+=w,J+=oe}d=0;let K=0;for(p=0;p<g;p++){for(j=0;j<Ke;j++)y[d+j]=Qe[j]+K;K+=8,d+=Ke}const ee=Je;e.BoundingSphere.fromVertices(r,t.Cartesian3.ZERO,3,ee[0]),e.BoundingSphere.fromVertices(s,t.Cartesian3.ZERO,3,ee[1]);const te=e.BoundingSphere.fromBoundingSpheres(ee);te.radius+=Q/(2*g);const ae={position:new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,normalize:!1,values:M}),startHiAndForwardOffsetX:et(T),startLoAndForwardOffsetY:et(E),startNormalAndForwardOffsetZ:et(_),endNormalAndTextureCoordinateNormalizationX:et(O),rightNormalAndTextureCoordinateNormalizationY:et(b)};C&&(ae.startHiLo2D=et(P),ae.offsetAndRight2D=et(k),ae.startEndNormals2D=et(L),ae.texcoordNormalization2D=new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:2,normalize:!1,values:S}));return new u.Geometry({attributes:ae,indices:y,boundingSphere:te})}(p,f,j,B,H,v,o)};const le=new t.Cartesian3,ce=new t.Matrix3,ue=new e.Quaternion;function Ce(a,n,r,s){const o=q(r,n,le),l=t.Cartesian3.dot(o,a);if(l>x||l<I){const n=q(s,r,$),o=l<I?i.CesiumMath.PI_OVER_TWO:-i.CesiumMath.PI_OVER_TWO,c=e.Quaternion.fromAxisAngle(n,o,ue),u=t.Matrix3.fromQuaternion(c,ce);return t.Matrix3.multiplyByVector(u,a,a),!0}return!1}const pe=new t.Cartographic,de=new t.Cartesian3,he=new t.Cartesian3;function ge(e,a,n,r,s){const o=t.Cartographic.toCartesian(a,e._ellipsoid,de);let l=t.Cartesian3.add(o,n,he),c=!1;const u=e._ellipsoid;let C=u.cartesianToCartographic(l,pe);Math.abs(a.longitude-C.longitude)>i.CesiumMath.PI_OVER_TWO&&(c=!0,l=t.Cartesian3.subtract(o,n,he),C=u.cartesianToCartographic(l,pe)),C.height=0;const p=e.project(C,s);return(s=t.Cartesian3.subtract(p,r,s)).z=0,s=t.Cartesian3.normalize(s,s),c&&t.Cartesian3.negate(s,s),s}const fe=new t.Cartesian3,me=new t.Cartesian3;function we(e,a,n,i,r,s){const o=t.Cartesian3.subtract(a,e,fe);t.Cartesian3.normalize(o,o);const l=n-0;let c=t.Cartesian3.multiplyByScalar(o,l,me);t.Cartesian3.add(e,c,r);const u=i-1e3;c=t.Cartesian3.multiplyByScalar(o,u,me),t.Cartesian3.add(a,c,s)}const ye=new t.Cartesian3;function Me(e,a){const n=p.Plane.getPointDistance(Q,e),r=p.Plane.getPointDistance(Q,a);let s=ye;i.CesiumMath.equalsEpsilon(n,0,i.CesiumMath.EPSILON2)?(s=q(a,e,s),t.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),t.Cartesian3.add(e,s,e)):i.CesiumMath.equalsEpsilon(r,0,i.CesiumMath.EPSILON2)&&(s=q(e,a,s),t.Cartesian3.multiplyByScalar(s,i.CesiumMath.EPSILON2,s),t.Cartesian3.add(a,s,a))}function Te(e,t){const a=Math.abs(e.longitude),n=Math.abs(t.longitude);if(i.CesiumMath.equalsEpsilon(a,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const n=i.CesiumMath.sign(t.longitude);return e.longitude=n*(a-i.CesiumMath.EPSILON11),1}if(i.CesiumMath.equalsEpsilon(n,i.CesiumMath.PI,i.CesiumMath.EPSILON11)){const a=i.CesiumMath.sign(e.longitude);return t.longitude=a*(n-i.CesiumMath.EPSILON11),2}return 0}const Ee=new t.Cartographic,_e=new t.Cartographic,Oe=new t.Cartesian3,be=new t.Cartesian3,Pe=new t.Cartesian3,Ae=new t.Cartesian3,ke=new t.Cartesian3,Le=new t.Cartesian3,Se=[Ee,_e],xe=new t.Rectangle,Ie=new t.Cartesian3,Ne=new t.Cartesian3,Re=new t.Cartesian3,De=new t.Cartesian3,ve=new t.Cartesian3,ze=new t.Cartesian3,He=new t.Cartesian3,je=new t.Cartesian3,Be=new t.Cartesian3,Ve=new t.Cartesian3,Ge=new t.Cartesian3,Ye=new t.Cartesian3,Fe=new t.Cartesian3,qe=new t.Cartesian3,Xe=new c.EncodedCartesian3,We=new c.EncodedCartesian3,Ue=new t.Cartesian3,Ze=new t.Cartesian3,$e=new t.Cartesian3,Je=[new e.BoundingSphere,new e.BoundingSphere],Qe=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Ke=Qe.length;function et(e){return new u.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}return N._projectNormal=ge,function(e,t){return A.initialize().then((function(){return n.defined(t)&&(e=N.unpack(e,t)),N.createGeometry(e)}))}}));
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
+ WebMercatorProjection_default
28
+ } from "./chunk-HQF437NJ.js";
29
+ import {
30
+ ArcType_default
31
+ } from "./chunk-CCFQRR6D.js";
32
+ import {
33
+ EncodedCartesian3_default
34
+ } from "./chunk-QT3MPEMI.js";
35
+ import {
36
+ EllipsoidGeodesic_default
37
+ } from "./chunk-AFFLIKOH.js";
38
+ import {
39
+ arrayRemoveDuplicates_default
40
+ } from "./chunk-3W63OHNJ.js";
41
+ import {
42
+ EllipsoidRhumbLine_default
43
+ } from "./chunk-K36FEYS7.js";
44
+ import {
45
+ IntersectionTests_default
46
+ } from "./chunk-MYZB7C4T.js";
47
+ import {
48
+ Plane_default
49
+ } from "./chunk-OYFCF4PL.js";
50
+ import {
51
+ GeometryAttribute_default,
52
+ Geometry_default
53
+ } from "./chunk-X4SU25DT.js";
54
+ import {
55
+ BoundingSphere_default,
56
+ GeographicProjection_default,
57
+ Quaternion_default,
58
+ Resource_default,
59
+ buildModuleUrl_default
60
+ } from "./chunk-PFQBCKBM.js";
61
+ import "./chunk-QJ3DFBH3.js";
62
+ import {
63
+ Cartesian2_default,
64
+ Rectangle_default
65
+ } from "./chunk-DUHWWBQQ.js";
66
+ import {
67
+ ComponentDatatype_default
68
+ } from "./chunk-LLUNNUJV.js";
69
+ import {
70
+ Cartesian3_default,
71
+ Cartographic_default,
72
+ Ellipsoid_default,
73
+ Matrix3_default
74
+ } from "./chunk-PCJWUS4M.js";
75
+ import {
76
+ Math_default
77
+ } from "./chunk-N3JIFFX2.js";
78
+ import "./chunk-AHKEZ2OE.js";
79
+ import "./chunk-ABADGKYE.js";
80
+ import {
81
+ defaultValue_default
82
+ } from "./chunk-WXTV4ATB.js";
83
+ import {
84
+ Check_default,
85
+ DeveloperError_default
86
+ } from "./chunk-4MFFIWUA.js";
87
+ import {
88
+ defined_default
89
+ } from "./chunk-6BTKZDRG.js";
90
+
91
+ // packages/engine/Source/Core/GeographicTilingScheme.js
92
+ function GeographicTilingScheme(options) {
93
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
94
+ this._ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84);
95
+ this._rectangle = defaultValue_default(options.rectangle, Rectangle_default.MAX_VALUE);
96
+ this._projection = new GeographicProjection_default(this._ellipsoid);
97
+ this._numberOfLevelZeroTilesX = defaultValue_default(
98
+ options.numberOfLevelZeroTilesX,
99
+ 2
100
+ );
101
+ this._numberOfLevelZeroTilesY = defaultValue_default(
102
+ options.numberOfLevelZeroTilesY,
103
+ 1
104
+ );
105
+ }
106
+ Object.defineProperties(GeographicTilingScheme.prototype, {
107
+ /**
108
+ * Gets the ellipsoid that is tiled by this tiling scheme.
109
+ * @memberof GeographicTilingScheme.prototype
110
+ * @type {Ellipsoid}
111
+ */
112
+ ellipsoid: {
113
+ get: function() {
114
+ return this._ellipsoid;
115
+ }
116
+ },
117
+ /**
118
+ * Gets the rectangle, in radians, covered by this tiling scheme.
119
+ * @memberof GeographicTilingScheme.prototype
120
+ * @type {Rectangle}
121
+ */
122
+ rectangle: {
123
+ get: function() {
124
+ return this._rectangle;
125
+ }
126
+ },
127
+ /**
128
+ * Gets the map projection used by this tiling scheme.
129
+ * @memberof GeographicTilingScheme.prototype
130
+ * @type {MapProjection}
131
+ */
132
+ projection: {
133
+ get: function() {
134
+ return this._projection;
135
+ }
136
+ }
137
+ });
138
+ GeographicTilingScheme.prototype.getNumberOfXTilesAtLevel = function(level) {
139
+ return this._numberOfLevelZeroTilesX << level;
140
+ };
141
+ GeographicTilingScheme.prototype.getNumberOfYTilesAtLevel = function(level) {
142
+ return this._numberOfLevelZeroTilesY << level;
143
+ };
144
+ GeographicTilingScheme.prototype.rectangleToNativeRectangle = function(rectangle, result) {
145
+ Check_default.defined("rectangle", rectangle);
146
+ const west = Math_default.toDegrees(rectangle.west);
147
+ const south = Math_default.toDegrees(rectangle.south);
148
+ const east = Math_default.toDegrees(rectangle.east);
149
+ const north = Math_default.toDegrees(rectangle.north);
150
+ if (!defined_default(result)) {
151
+ return new Rectangle_default(west, south, east, north);
152
+ }
153
+ result.west = west;
154
+ result.south = south;
155
+ result.east = east;
156
+ result.north = north;
157
+ return result;
158
+ };
159
+ GeographicTilingScheme.prototype.tileXYToNativeRectangle = function(x, y, level, result) {
160
+ const rectangleRadians = this.tileXYToRectangle(x, y, level, result);
161
+ rectangleRadians.west = Math_default.toDegrees(rectangleRadians.west);
162
+ rectangleRadians.south = Math_default.toDegrees(rectangleRadians.south);
163
+ rectangleRadians.east = Math_default.toDegrees(rectangleRadians.east);
164
+ rectangleRadians.north = Math_default.toDegrees(rectangleRadians.north);
165
+ return rectangleRadians;
166
+ };
167
+ GeographicTilingScheme.prototype.tileXYToRectangle = function(x, y, level, result) {
168
+ const rectangle = this._rectangle;
169
+ const xTiles = this.getNumberOfXTilesAtLevel(level);
170
+ const yTiles = this.getNumberOfYTilesAtLevel(level);
171
+ const xTileWidth = rectangle.width / xTiles;
172
+ const west = x * xTileWidth + rectangle.west;
173
+ const east = (x + 1) * xTileWidth + rectangle.west;
174
+ const yTileHeight = rectangle.height / yTiles;
175
+ const north = rectangle.north - y * yTileHeight;
176
+ const south = rectangle.north - (y + 1) * yTileHeight;
177
+ if (!defined_default(result)) {
178
+ result = new Rectangle_default(west, south, east, north);
179
+ }
180
+ result.west = west;
181
+ result.south = south;
182
+ result.east = east;
183
+ result.north = north;
184
+ return result;
185
+ };
186
+ GeographicTilingScheme.prototype.positionToTileXY = function(position, level, result) {
187
+ const rectangle = this._rectangle;
188
+ if (!Rectangle_default.contains(rectangle, position)) {
189
+ return void 0;
190
+ }
191
+ const xTiles = this.getNumberOfXTilesAtLevel(level);
192
+ const yTiles = this.getNumberOfYTilesAtLevel(level);
193
+ const xTileWidth = rectangle.width / xTiles;
194
+ const yTileHeight = rectangle.height / yTiles;
195
+ let longitude = position.longitude;
196
+ if (rectangle.east < rectangle.west) {
197
+ longitude += Math_default.TWO_PI;
198
+ }
199
+ let xTileCoordinate = (longitude - rectangle.west) / xTileWidth | 0;
200
+ if (xTileCoordinate >= xTiles) {
201
+ xTileCoordinate = xTiles - 1;
202
+ }
203
+ let yTileCoordinate = (rectangle.north - position.latitude) / yTileHeight | 0;
204
+ if (yTileCoordinate >= yTiles) {
205
+ yTileCoordinate = yTiles - 1;
206
+ }
207
+ if (!defined_default(result)) {
208
+ return new Cartesian2_default(xTileCoordinate, yTileCoordinate);
209
+ }
210
+ result.x = xTileCoordinate;
211
+ result.y = yTileCoordinate;
212
+ return result;
213
+ };
214
+ var GeographicTilingScheme_default = GeographicTilingScheme;
215
+
216
+ // packages/engine/Source/Core/ApproximateTerrainHeights.js
217
+ var scratchDiagonalCartesianNE = new Cartesian3_default();
218
+ var scratchDiagonalCartesianSW = new Cartesian3_default();
219
+ var scratchDiagonalCartographic = new Cartographic_default();
220
+ var scratchCenterCartesian = new Cartesian3_default();
221
+ var scratchSurfaceCartesian = new Cartesian3_default();
222
+ var scratchBoundingSphere = new BoundingSphere_default();
223
+ var tilingScheme = new GeographicTilingScheme_default();
224
+ var scratchCorners = [
225
+ new Cartographic_default(),
226
+ new Cartographic_default(),
227
+ new Cartographic_default(),
228
+ new Cartographic_default()
229
+ ];
230
+ var scratchTileXY = new Cartesian2_default();
231
+ var ApproximateTerrainHeights = {};
232
+ ApproximateTerrainHeights.initialize = function() {
233
+ let initPromise = ApproximateTerrainHeights._initPromise;
234
+ if (defined_default(initPromise)) {
235
+ return initPromise;
236
+ }
237
+ initPromise = Resource_default.fetchJson(
238
+ buildModuleUrl_default("Assets/approximateTerrainHeights.json")
239
+ ).then(function(json) {
240
+ ApproximateTerrainHeights._terrainHeights = json;
241
+ });
242
+ ApproximateTerrainHeights._initPromise = initPromise;
243
+ return initPromise;
244
+ };
245
+ ApproximateTerrainHeights.getMinimumMaximumHeights = function(rectangle, ellipsoid) {
246
+ Check_default.defined("rectangle", rectangle);
247
+ if (!defined_default(ApproximateTerrainHeights._terrainHeights)) {
248
+ throw new DeveloperError_default(
249
+ "You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function"
250
+ );
251
+ }
252
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84);
253
+ const xyLevel = getTileXYLevel(rectangle);
254
+ let minTerrainHeight = ApproximateTerrainHeights._defaultMinTerrainHeight;
255
+ let maxTerrainHeight = ApproximateTerrainHeights._defaultMaxTerrainHeight;
256
+ if (defined_default(xyLevel)) {
257
+ const key = `${xyLevel.level}-${xyLevel.x}-${xyLevel.y}`;
258
+ const heights = ApproximateTerrainHeights._terrainHeights[key];
259
+ if (defined_default(heights)) {
260
+ minTerrainHeight = heights[0];
261
+ maxTerrainHeight = heights[1];
262
+ }
263
+ ellipsoid.cartographicToCartesian(
264
+ Rectangle_default.northeast(rectangle, scratchDiagonalCartographic),
265
+ scratchDiagonalCartesianNE
266
+ );
267
+ ellipsoid.cartographicToCartesian(
268
+ Rectangle_default.southwest(rectangle, scratchDiagonalCartographic),
269
+ scratchDiagonalCartesianSW
270
+ );
271
+ Cartesian3_default.midpoint(
272
+ scratchDiagonalCartesianSW,
273
+ scratchDiagonalCartesianNE,
274
+ scratchCenterCartesian
275
+ );
276
+ const surfacePosition = ellipsoid.scaleToGeodeticSurface(
277
+ scratchCenterCartesian,
278
+ scratchSurfaceCartesian
279
+ );
280
+ if (defined_default(surfacePosition)) {
281
+ const distance = Cartesian3_default.distance(
282
+ scratchCenterCartesian,
283
+ surfacePosition
284
+ );
285
+ minTerrainHeight = Math.min(minTerrainHeight, -distance);
286
+ } else {
287
+ minTerrainHeight = ApproximateTerrainHeights._defaultMinTerrainHeight;
288
+ }
289
+ }
290
+ minTerrainHeight = Math.max(
291
+ ApproximateTerrainHeights._defaultMinTerrainHeight,
292
+ minTerrainHeight
293
+ );
294
+ return {
295
+ minimumTerrainHeight: minTerrainHeight,
296
+ maximumTerrainHeight: maxTerrainHeight
297
+ };
298
+ };
299
+ ApproximateTerrainHeights.getBoundingSphere = function(rectangle, ellipsoid) {
300
+ Check_default.defined("rectangle", rectangle);
301
+ if (!defined_default(ApproximateTerrainHeights._terrainHeights)) {
302
+ throw new DeveloperError_default(
303
+ "You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function"
304
+ );
305
+ }
306
+ ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84);
307
+ const xyLevel = getTileXYLevel(rectangle);
308
+ let maxTerrainHeight = ApproximateTerrainHeights._defaultMaxTerrainHeight;
309
+ if (defined_default(xyLevel)) {
310
+ const key = `${xyLevel.level}-${xyLevel.x}-${xyLevel.y}`;
311
+ const heights = ApproximateTerrainHeights._terrainHeights[key];
312
+ if (defined_default(heights)) {
313
+ maxTerrainHeight = heights[1];
314
+ }
315
+ }
316
+ const result = BoundingSphere_default.fromRectangle3D(rectangle, ellipsoid, 0);
317
+ BoundingSphere_default.fromRectangle3D(
318
+ rectangle,
319
+ ellipsoid,
320
+ maxTerrainHeight,
321
+ scratchBoundingSphere
322
+ );
323
+ return BoundingSphere_default.union(result, scratchBoundingSphere, result);
324
+ };
325
+ function getTileXYLevel(rectangle) {
326
+ Cartographic_default.fromRadians(
327
+ rectangle.east,
328
+ rectangle.north,
329
+ 0,
330
+ scratchCorners[0]
331
+ );
332
+ Cartographic_default.fromRadians(
333
+ rectangle.west,
334
+ rectangle.north,
335
+ 0,
336
+ scratchCorners[1]
337
+ );
338
+ Cartographic_default.fromRadians(
339
+ rectangle.east,
340
+ rectangle.south,
341
+ 0,
342
+ scratchCorners[2]
343
+ );
344
+ Cartographic_default.fromRadians(
345
+ rectangle.west,
346
+ rectangle.south,
347
+ 0,
348
+ scratchCorners[3]
349
+ );
350
+ let lastLevelX = 0, lastLevelY = 0;
351
+ let currentX = 0, currentY = 0;
352
+ const maxLevel = ApproximateTerrainHeights._terrainHeightsMaxLevel;
353
+ let i;
354
+ for (i = 0; i <= maxLevel; ++i) {
355
+ let failed = false;
356
+ for (let j = 0; j < 4; ++j) {
357
+ const corner = scratchCorners[j];
358
+ tilingScheme.positionToTileXY(corner, i, scratchTileXY);
359
+ if (j === 0) {
360
+ currentX = scratchTileXY.x;
361
+ currentY = scratchTileXY.y;
362
+ } else if (currentX !== scratchTileXY.x || currentY !== scratchTileXY.y) {
363
+ failed = true;
364
+ break;
365
+ }
366
+ }
367
+ if (failed) {
368
+ break;
369
+ }
370
+ lastLevelX = currentX;
371
+ lastLevelY = currentY;
372
+ }
373
+ if (i === 0) {
374
+ return void 0;
375
+ }
376
+ return {
377
+ x: lastLevelX,
378
+ y: lastLevelY,
379
+ level: i > maxLevel ? maxLevel : i - 1
380
+ };
381
+ }
382
+ ApproximateTerrainHeights._terrainHeightsMaxLevel = 6;
383
+ ApproximateTerrainHeights._defaultMaxTerrainHeight = 9e3;
384
+ ApproximateTerrainHeights._defaultMinTerrainHeight = -1e5;
385
+ ApproximateTerrainHeights._terrainHeights = void 0;
386
+ ApproximateTerrainHeights._initPromise = void 0;
387
+ Object.defineProperties(ApproximateTerrainHeights, {
388
+ /**
389
+ * Determines if the terrain heights are initialized and ready to use. To initialize the terrain heights,
390
+ * call {@link ApproximateTerrainHeights#initialize} and wait for the returned promise to resolve.
391
+ * @type {boolean}
392
+ * @readonly
393
+ * @memberof ApproximateTerrainHeights
394
+ */
395
+ initialized: {
396
+ get: function() {
397
+ return defined_default(ApproximateTerrainHeights._terrainHeights);
398
+ }
399
+ }
400
+ });
401
+ var ApproximateTerrainHeights_default = ApproximateTerrainHeights;
402
+
403
+ // packages/engine/Source/Core/GroundPolylineGeometry.js
404
+ var PROJECTIONS = [GeographicProjection_default, WebMercatorProjection_default];
405
+ var PROJECTION_COUNT = PROJECTIONS.length;
406
+ var MITER_BREAK_SMALL = Math.cos(Math_default.toRadians(30));
407
+ var MITER_BREAK_LARGE = Math.cos(Math_default.toRadians(150));
408
+ var WALL_INITIAL_MIN_HEIGHT = 0;
409
+ var WALL_INITIAL_MAX_HEIGHT = 1e3;
410
+ function GroundPolylineGeometry(options) {
411
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
412
+ const positions = options.positions;
413
+ if (!defined_default(positions) || positions.length < 2) {
414
+ throw new DeveloperError_default("At least two positions are required.");
415
+ }
416
+ if (defined_default(options.arcType) && options.arcType !== ArcType_default.GEODESIC && options.arcType !== ArcType_default.RHUMB) {
417
+ throw new DeveloperError_default(
418
+ "Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB."
419
+ );
420
+ }
421
+ this.width = defaultValue_default(options.width, 1);
422
+ this._positions = positions;
423
+ this.granularity = defaultValue_default(options.granularity, 9999);
424
+ this.loop = defaultValue_default(options.loop, false);
425
+ this.arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC);
426
+ this._ellipsoid = Ellipsoid_default.WGS84;
427
+ this._projectionIndex = 0;
428
+ this._workerName = "createGroundPolylineGeometry";
429
+ this._scene3DOnly = false;
430
+ }
431
+ Object.defineProperties(GroundPolylineGeometry.prototype, {
432
+ /**
433
+ * The number of elements used to pack the object into an array.
434
+ * @memberof GroundPolylineGeometry.prototype
435
+ * @type {number}
436
+ * @readonly
437
+ * @private
438
+ */
439
+ packedLength: {
440
+ get: function() {
441
+ return 1 + this._positions.length * 3 + 1 + 1 + 1 + Ellipsoid_default.packedLength + 1 + 1;
442
+ }
443
+ }
444
+ });
445
+ GroundPolylineGeometry.setProjectionAndEllipsoid = function(groundPolylineGeometry, mapProjection) {
446
+ let projectionIndex = 0;
447
+ for (let i = 0; i < PROJECTION_COUNT; i++) {
448
+ if (mapProjection instanceof PROJECTIONS[i]) {
449
+ projectionIndex = i;
450
+ break;
451
+ }
452
+ }
453
+ groundPolylineGeometry._projectionIndex = projectionIndex;
454
+ groundPolylineGeometry._ellipsoid = mapProjection.ellipsoid;
455
+ };
456
+ var cart3Scratch1 = new Cartesian3_default();
457
+ var cart3Scratch2 = new Cartesian3_default();
458
+ var cart3Scratch3 = new Cartesian3_default();
459
+ function computeRightNormal(start, end, maxHeight, ellipsoid, result) {
460
+ const startBottom = getPosition(ellipsoid, start, 0, cart3Scratch1);
461
+ const startTop = getPosition(ellipsoid, start, maxHeight, cart3Scratch2);
462
+ const endBottom = getPosition(ellipsoid, end, 0, cart3Scratch3);
463
+ const up = direction(startTop, startBottom, cart3Scratch2);
464
+ const forward = direction(endBottom, startBottom, cart3Scratch3);
465
+ Cartesian3_default.cross(forward, up, result);
466
+ return Cartesian3_default.normalize(result, result);
467
+ }
468
+ var interpolatedCartographicScratch = new Cartographic_default();
469
+ var interpolatedBottomScratch = new Cartesian3_default();
470
+ var interpolatedTopScratch = new Cartesian3_default();
471
+ var interpolatedNormalScratch = new Cartesian3_default();
472
+ function interpolateSegment(start, end, minHeight, maxHeight, granularity, arcType, ellipsoid, normalsArray, bottomPositionsArray, topPositionsArray, cartographicsArray) {
473
+ if (granularity === 0) {
474
+ return;
475
+ }
476
+ let ellipsoidLine;
477
+ if (arcType === ArcType_default.GEODESIC) {
478
+ ellipsoidLine = new EllipsoidGeodesic_default(start, end, ellipsoid);
479
+ } else if (arcType === ArcType_default.RHUMB) {
480
+ ellipsoidLine = new EllipsoidRhumbLine_default(start, end, ellipsoid);
481
+ }
482
+ const surfaceDistance = ellipsoidLine.surfaceDistance;
483
+ if (surfaceDistance < granularity) {
484
+ return;
485
+ }
486
+ const interpolatedNormal = computeRightNormal(
487
+ start,
488
+ end,
489
+ maxHeight,
490
+ ellipsoid,
491
+ interpolatedNormalScratch
492
+ );
493
+ const segments = Math.ceil(surfaceDistance / granularity);
494
+ const interpointDistance = surfaceDistance / segments;
495
+ let distanceFromStart = interpointDistance;
496
+ const pointsToAdd = segments - 1;
497
+ let packIndex = normalsArray.length;
498
+ for (let i = 0; i < pointsToAdd; i++) {
499
+ const interpolatedCartographic = ellipsoidLine.interpolateUsingSurfaceDistance(
500
+ distanceFromStart,
501
+ interpolatedCartographicScratch
502
+ );
503
+ const interpolatedBottom = getPosition(
504
+ ellipsoid,
505
+ interpolatedCartographic,
506
+ minHeight,
507
+ interpolatedBottomScratch
508
+ );
509
+ const interpolatedTop = getPosition(
510
+ ellipsoid,
511
+ interpolatedCartographic,
512
+ maxHeight,
513
+ interpolatedTopScratch
514
+ );
515
+ Cartesian3_default.pack(interpolatedNormal, normalsArray, packIndex);
516
+ Cartesian3_default.pack(interpolatedBottom, bottomPositionsArray, packIndex);
517
+ Cartesian3_default.pack(interpolatedTop, topPositionsArray, packIndex);
518
+ cartographicsArray.push(interpolatedCartographic.latitude);
519
+ cartographicsArray.push(interpolatedCartographic.longitude);
520
+ packIndex += 3;
521
+ distanceFromStart += interpointDistance;
522
+ }
523
+ }
524
+ var heightlessCartographicScratch = new Cartographic_default();
525
+ function getPosition(ellipsoid, cartographic, height, result) {
526
+ Cartographic_default.clone(cartographic, heightlessCartographicScratch);
527
+ heightlessCartographicScratch.height = height;
528
+ return Cartographic_default.toCartesian(
529
+ heightlessCartographicScratch,
530
+ ellipsoid,
531
+ result
532
+ );
533
+ }
534
+ GroundPolylineGeometry.pack = function(value, array, startingIndex) {
535
+ Check_default.typeOf.object("value", value);
536
+ Check_default.defined("array", array);
537
+ let index = defaultValue_default(startingIndex, 0);
538
+ const positions = value._positions;
539
+ const positionsLength = positions.length;
540
+ array[index++] = positionsLength;
541
+ for (let i = 0; i < positionsLength; ++i) {
542
+ const cartesian = positions[i];
543
+ Cartesian3_default.pack(cartesian, array, index);
544
+ index += 3;
545
+ }
546
+ array[index++] = value.granularity;
547
+ array[index++] = value.loop ? 1 : 0;
548
+ array[index++] = value.arcType;
549
+ Ellipsoid_default.pack(value._ellipsoid, array, index);
550
+ index += Ellipsoid_default.packedLength;
551
+ array[index++] = value._projectionIndex;
552
+ array[index++] = value._scene3DOnly ? 1 : 0;
553
+ return array;
554
+ };
555
+ GroundPolylineGeometry.unpack = function(array, startingIndex, result) {
556
+ Check_default.defined("array", array);
557
+ let index = defaultValue_default(startingIndex, 0);
558
+ const positionsLength = array[index++];
559
+ const positions = new Array(positionsLength);
560
+ for (let i = 0; i < positionsLength; i++) {
561
+ positions[i] = Cartesian3_default.unpack(array, index);
562
+ index += 3;
563
+ }
564
+ const granularity = array[index++];
565
+ const loop = array[index++] === 1;
566
+ const arcType = array[index++];
567
+ const ellipsoid = Ellipsoid_default.unpack(array, index);
568
+ index += Ellipsoid_default.packedLength;
569
+ const projectionIndex = array[index++];
570
+ const scene3DOnly = array[index++] === 1;
571
+ if (!defined_default(result)) {
572
+ result = new GroundPolylineGeometry({
573
+ positions
574
+ });
575
+ }
576
+ result._positions = positions;
577
+ result.granularity = granularity;
578
+ result.loop = loop;
579
+ result.arcType = arcType;
580
+ result._ellipsoid = ellipsoid;
581
+ result._projectionIndex = projectionIndex;
582
+ result._scene3DOnly = scene3DOnly;
583
+ return result;
584
+ };
585
+ function direction(target, origin, result) {
586
+ Cartesian3_default.subtract(target, origin, result);
587
+ Cartesian3_default.normalize(result, result);
588
+ return result;
589
+ }
590
+ function tangentDirection(target, origin, up, result) {
591
+ result = direction(target, origin, result);
592
+ result = Cartesian3_default.cross(result, up, result);
593
+ result = Cartesian3_default.normalize(result, result);
594
+ result = Cartesian3_default.cross(up, result, result);
595
+ return result;
596
+ }
597
+ var toPreviousScratch = new Cartesian3_default();
598
+ var toNextScratch = new Cartesian3_default();
599
+ var forwardScratch = new Cartesian3_default();
600
+ var vertexUpScratch = new Cartesian3_default();
601
+ var cosine90 = 0;
602
+ var cosine180 = -1;
603
+ function computeVertexMiterNormal(previousBottom, vertexBottom, vertexTop, nextBottom, result) {
604
+ const up = direction(vertexTop, vertexBottom, vertexUpScratch);
605
+ const toPrevious = tangentDirection(
606
+ previousBottom,
607
+ vertexBottom,
608
+ up,
609
+ toPreviousScratch
610
+ );
611
+ const toNext = tangentDirection(nextBottom, vertexBottom, up, toNextScratch);
612
+ if (Math_default.equalsEpsilon(
613
+ Cartesian3_default.dot(toPrevious, toNext),
614
+ cosine180,
615
+ Math_default.EPSILON5
616
+ )) {
617
+ result = Cartesian3_default.cross(up, toPrevious, result);
618
+ result = Cartesian3_default.normalize(result, result);
619
+ return result;
620
+ }
621
+ result = Cartesian3_default.add(toNext, toPrevious, result);
622
+ result = Cartesian3_default.normalize(result, result);
623
+ const forward = Cartesian3_default.cross(up, result, forwardScratch);
624
+ if (Cartesian3_default.dot(toNext, forward) < cosine90) {
625
+ result = Cartesian3_default.negate(result, result);
626
+ }
627
+ return result;
628
+ }
629
+ var XZ_PLANE = Plane_default.fromPointNormal(Cartesian3_default.ZERO, Cartesian3_default.UNIT_Y);
630
+ var previousBottomScratch = new Cartesian3_default();
631
+ var vertexBottomScratch = new Cartesian3_default();
632
+ var vertexTopScratch = new Cartesian3_default();
633
+ var nextBottomScratch = new Cartesian3_default();
634
+ var vertexNormalScratch = new Cartesian3_default();
635
+ var intersectionScratch = new Cartesian3_default();
636
+ var cartographicScratch0 = new Cartographic_default();
637
+ var cartographicScratch1 = new Cartographic_default();
638
+ var cartographicIntersectionScratch = new Cartographic_default();
639
+ GroundPolylineGeometry.createGeometry = function(groundPolylineGeometry) {
640
+ const compute2dAttributes = !groundPolylineGeometry._scene3DOnly;
641
+ let loop = groundPolylineGeometry.loop;
642
+ const ellipsoid = groundPolylineGeometry._ellipsoid;
643
+ const granularity = groundPolylineGeometry.granularity;
644
+ const arcType = groundPolylineGeometry.arcType;
645
+ const projection = new PROJECTIONS[groundPolylineGeometry._projectionIndex](
646
+ ellipsoid
647
+ );
648
+ const minHeight = WALL_INITIAL_MIN_HEIGHT;
649
+ const maxHeight = WALL_INITIAL_MAX_HEIGHT;
650
+ let index;
651
+ let i;
652
+ const positions = groundPolylineGeometry._positions;
653
+ const positionsLength = positions.length;
654
+ if (positionsLength === 2) {
655
+ loop = false;
656
+ }
657
+ let p0;
658
+ let p1;
659
+ let c0;
660
+ let c1;
661
+ const rhumbLine = new EllipsoidRhumbLine_default(void 0, void 0, ellipsoid);
662
+ let intersection;
663
+ let intersectionCartographic;
664
+ let intersectionLongitude;
665
+ const splitPositions = [positions[0]];
666
+ for (i = 0; i < positionsLength - 1; i++) {
667
+ p0 = positions[i];
668
+ p1 = positions[i + 1];
669
+ intersection = IntersectionTests_default.lineSegmentPlane(
670
+ p0,
671
+ p1,
672
+ XZ_PLANE,
673
+ intersectionScratch
674
+ );
675
+ if (defined_default(intersection) && !Cartesian3_default.equalsEpsilon(intersection, p0, Math_default.EPSILON7) && !Cartesian3_default.equalsEpsilon(intersection, p1, Math_default.EPSILON7)) {
676
+ if (groundPolylineGeometry.arcType === ArcType_default.GEODESIC) {
677
+ splitPositions.push(Cartesian3_default.clone(intersection));
678
+ } else if (groundPolylineGeometry.arcType === ArcType_default.RHUMB) {
679
+ intersectionLongitude = ellipsoid.cartesianToCartographic(
680
+ intersection,
681
+ cartographicScratch0
682
+ ).longitude;
683
+ c0 = ellipsoid.cartesianToCartographic(p0, cartographicScratch0);
684
+ c1 = ellipsoid.cartesianToCartographic(p1, cartographicScratch1);
685
+ rhumbLine.setEndPoints(c0, c1);
686
+ intersectionCartographic = rhumbLine.findIntersectionWithLongitude(
687
+ intersectionLongitude,
688
+ cartographicIntersectionScratch
689
+ );
690
+ intersection = ellipsoid.cartographicToCartesian(
691
+ intersectionCartographic,
692
+ intersectionScratch
693
+ );
694
+ if (defined_default(intersection) && !Cartesian3_default.equalsEpsilon(intersection, p0, Math_default.EPSILON7) && !Cartesian3_default.equalsEpsilon(intersection, p1, Math_default.EPSILON7)) {
695
+ splitPositions.push(Cartesian3_default.clone(intersection));
696
+ }
697
+ }
698
+ }
699
+ splitPositions.push(p1);
700
+ }
701
+ if (loop) {
702
+ p0 = positions[positionsLength - 1];
703
+ p1 = positions[0];
704
+ intersection = IntersectionTests_default.lineSegmentPlane(
705
+ p0,
706
+ p1,
707
+ XZ_PLANE,
708
+ intersectionScratch
709
+ );
710
+ if (defined_default(intersection) && !Cartesian3_default.equalsEpsilon(intersection, p0, Math_default.EPSILON7) && !Cartesian3_default.equalsEpsilon(intersection, p1, Math_default.EPSILON7)) {
711
+ if (groundPolylineGeometry.arcType === ArcType_default.GEODESIC) {
712
+ splitPositions.push(Cartesian3_default.clone(intersection));
713
+ } else if (groundPolylineGeometry.arcType === ArcType_default.RHUMB) {
714
+ intersectionLongitude = ellipsoid.cartesianToCartographic(
715
+ intersection,
716
+ cartographicScratch0
717
+ ).longitude;
718
+ c0 = ellipsoid.cartesianToCartographic(p0, cartographicScratch0);
719
+ c1 = ellipsoid.cartesianToCartographic(p1, cartographicScratch1);
720
+ rhumbLine.setEndPoints(c0, c1);
721
+ intersectionCartographic = rhumbLine.findIntersectionWithLongitude(
722
+ intersectionLongitude,
723
+ cartographicIntersectionScratch
724
+ );
725
+ intersection = ellipsoid.cartographicToCartesian(
726
+ intersectionCartographic,
727
+ intersectionScratch
728
+ );
729
+ if (defined_default(intersection) && !Cartesian3_default.equalsEpsilon(intersection, p0, Math_default.EPSILON7) && !Cartesian3_default.equalsEpsilon(intersection, p1, Math_default.EPSILON7)) {
730
+ splitPositions.push(Cartesian3_default.clone(intersection));
731
+ }
732
+ }
733
+ }
734
+ }
735
+ let cartographicsLength = splitPositions.length;
736
+ let cartographics = new Array(cartographicsLength);
737
+ for (i = 0; i < cartographicsLength; i++) {
738
+ const cartographic = Cartographic_default.fromCartesian(
739
+ splitPositions[i],
740
+ ellipsoid
741
+ );
742
+ cartographic.height = 0;
743
+ cartographics[i] = cartographic;
744
+ }
745
+ cartographics = arrayRemoveDuplicates_default(
746
+ cartographics,
747
+ Cartographic_default.equalsEpsilon
748
+ );
749
+ cartographicsLength = cartographics.length;
750
+ if (cartographicsLength < 2) {
751
+ return void 0;
752
+ }
753
+ const cartographicsArray = [];
754
+ const normalsArray = [];
755
+ const bottomPositionsArray = [];
756
+ const topPositionsArray = [];
757
+ let previousBottom = previousBottomScratch;
758
+ let vertexBottom = vertexBottomScratch;
759
+ let vertexTop = vertexTopScratch;
760
+ let nextBottom = nextBottomScratch;
761
+ let vertexNormal = vertexNormalScratch;
762
+ const startCartographic = cartographics[0];
763
+ const nextCartographic = cartographics[1];
764
+ const prestartCartographic = cartographics[cartographicsLength - 1];
765
+ previousBottom = getPosition(
766
+ ellipsoid,
767
+ prestartCartographic,
768
+ minHeight,
769
+ previousBottom
770
+ );
771
+ nextBottom = getPosition(ellipsoid, nextCartographic, minHeight, nextBottom);
772
+ vertexBottom = getPosition(
773
+ ellipsoid,
774
+ startCartographic,
775
+ minHeight,
776
+ vertexBottom
777
+ );
778
+ vertexTop = getPosition(ellipsoid, startCartographic, maxHeight, vertexTop);
779
+ if (loop) {
780
+ vertexNormal = computeVertexMiterNormal(
781
+ previousBottom,
782
+ vertexBottom,
783
+ vertexTop,
784
+ nextBottom,
785
+ vertexNormal
786
+ );
787
+ } else {
788
+ vertexNormal = computeRightNormal(
789
+ startCartographic,
790
+ nextCartographic,
791
+ maxHeight,
792
+ ellipsoid,
793
+ vertexNormal
794
+ );
795
+ }
796
+ Cartesian3_default.pack(vertexNormal, normalsArray, 0);
797
+ Cartesian3_default.pack(vertexBottom, bottomPositionsArray, 0);
798
+ Cartesian3_default.pack(vertexTop, topPositionsArray, 0);
799
+ cartographicsArray.push(startCartographic.latitude);
800
+ cartographicsArray.push(startCartographic.longitude);
801
+ interpolateSegment(
802
+ startCartographic,
803
+ nextCartographic,
804
+ minHeight,
805
+ maxHeight,
806
+ granularity,
807
+ arcType,
808
+ ellipsoid,
809
+ normalsArray,
810
+ bottomPositionsArray,
811
+ topPositionsArray,
812
+ cartographicsArray
813
+ );
814
+ for (i = 1; i < cartographicsLength - 1; ++i) {
815
+ previousBottom = Cartesian3_default.clone(vertexBottom, previousBottom);
816
+ vertexBottom = Cartesian3_default.clone(nextBottom, vertexBottom);
817
+ const vertexCartographic = cartographics[i];
818
+ getPosition(ellipsoid, vertexCartographic, maxHeight, vertexTop);
819
+ getPosition(ellipsoid, cartographics[i + 1], minHeight, nextBottom);
820
+ computeVertexMiterNormal(
821
+ previousBottom,
822
+ vertexBottom,
823
+ vertexTop,
824
+ nextBottom,
825
+ vertexNormal
826
+ );
827
+ index = normalsArray.length;
828
+ Cartesian3_default.pack(vertexNormal, normalsArray, index);
829
+ Cartesian3_default.pack(vertexBottom, bottomPositionsArray, index);
830
+ Cartesian3_default.pack(vertexTop, topPositionsArray, index);
831
+ cartographicsArray.push(vertexCartographic.latitude);
832
+ cartographicsArray.push(vertexCartographic.longitude);
833
+ interpolateSegment(
834
+ cartographics[i],
835
+ cartographics[i + 1],
836
+ minHeight,
837
+ maxHeight,
838
+ granularity,
839
+ arcType,
840
+ ellipsoid,
841
+ normalsArray,
842
+ bottomPositionsArray,
843
+ topPositionsArray,
844
+ cartographicsArray
845
+ );
846
+ }
847
+ const endCartographic = cartographics[cartographicsLength - 1];
848
+ const preEndCartographic = cartographics[cartographicsLength - 2];
849
+ vertexBottom = getPosition(
850
+ ellipsoid,
851
+ endCartographic,
852
+ minHeight,
853
+ vertexBottom
854
+ );
855
+ vertexTop = getPosition(ellipsoid, endCartographic, maxHeight, vertexTop);
856
+ if (loop) {
857
+ const postEndCartographic = cartographics[0];
858
+ previousBottom = getPosition(
859
+ ellipsoid,
860
+ preEndCartographic,
861
+ minHeight,
862
+ previousBottom
863
+ );
864
+ nextBottom = getPosition(
865
+ ellipsoid,
866
+ postEndCartographic,
867
+ minHeight,
868
+ nextBottom
869
+ );
870
+ vertexNormal = computeVertexMiterNormal(
871
+ previousBottom,
872
+ vertexBottom,
873
+ vertexTop,
874
+ nextBottom,
875
+ vertexNormal
876
+ );
877
+ } else {
878
+ vertexNormal = computeRightNormal(
879
+ preEndCartographic,
880
+ endCartographic,
881
+ maxHeight,
882
+ ellipsoid,
883
+ vertexNormal
884
+ );
885
+ }
886
+ index = normalsArray.length;
887
+ Cartesian3_default.pack(vertexNormal, normalsArray, index);
888
+ Cartesian3_default.pack(vertexBottom, bottomPositionsArray, index);
889
+ Cartesian3_default.pack(vertexTop, topPositionsArray, index);
890
+ cartographicsArray.push(endCartographic.latitude);
891
+ cartographicsArray.push(endCartographic.longitude);
892
+ if (loop) {
893
+ interpolateSegment(
894
+ endCartographic,
895
+ startCartographic,
896
+ minHeight,
897
+ maxHeight,
898
+ granularity,
899
+ arcType,
900
+ ellipsoid,
901
+ normalsArray,
902
+ bottomPositionsArray,
903
+ topPositionsArray,
904
+ cartographicsArray
905
+ );
906
+ index = normalsArray.length;
907
+ for (i = 0; i < 3; ++i) {
908
+ normalsArray[index + i] = normalsArray[i];
909
+ bottomPositionsArray[index + i] = bottomPositionsArray[i];
910
+ topPositionsArray[index + i] = topPositionsArray[i];
911
+ }
912
+ cartographicsArray.push(startCartographic.latitude);
913
+ cartographicsArray.push(startCartographic.longitude);
914
+ }
915
+ return generateGeometryAttributes(
916
+ loop,
917
+ projection,
918
+ bottomPositionsArray,
919
+ topPositionsArray,
920
+ normalsArray,
921
+ cartographicsArray,
922
+ compute2dAttributes
923
+ );
924
+ };
925
+ var lineDirectionScratch = new Cartesian3_default();
926
+ var matrix3Scratch = new Matrix3_default();
927
+ var quaternionScratch = new Quaternion_default();
928
+ function breakMiter(endGeometryNormal, startBottom, endBottom, endTop) {
929
+ const lineDirection = direction(endBottom, startBottom, lineDirectionScratch);
930
+ const dot = Cartesian3_default.dot(lineDirection, endGeometryNormal);
931
+ if (dot > MITER_BREAK_SMALL || dot < MITER_BREAK_LARGE) {
932
+ const vertexUp = direction(endTop, endBottom, vertexUpScratch);
933
+ const angle = dot < MITER_BREAK_LARGE ? Math_default.PI_OVER_TWO : -Math_default.PI_OVER_TWO;
934
+ const quaternion = Quaternion_default.fromAxisAngle(
935
+ vertexUp,
936
+ angle,
937
+ quaternionScratch
938
+ );
939
+ const rotationMatrix = Matrix3_default.fromQuaternion(quaternion, matrix3Scratch);
940
+ Matrix3_default.multiplyByVector(
941
+ rotationMatrix,
942
+ endGeometryNormal,
943
+ endGeometryNormal
944
+ );
945
+ return true;
946
+ }
947
+ return false;
948
+ }
949
+ var endPosCartographicScratch = new Cartographic_default();
950
+ var normalStartpointScratch = new Cartesian3_default();
951
+ var normalEndpointScratch = new Cartesian3_default();
952
+ function projectNormal(projection, cartographic, normal, projectedPosition, result) {
953
+ const position = Cartographic_default.toCartesian(
954
+ cartographic,
955
+ projection._ellipsoid,
956
+ normalStartpointScratch
957
+ );
958
+ let normalEndpoint = Cartesian3_default.add(position, normal, normalEndpointScratch);
959
+ let flipNormal = false;
960
+ const ellipsoid = projection._ellipsoid;
961
+ let normalEndpointCartographic = ellipsoid.cartesianToCartographic(
962
+ normalEndpoint,
963
+ endPosCartographicScratch
964
+ );
965
+ if (Math.abs(cartographic.longitude - normalEndpointCartographic.longitude) > Math_default.PI_OVER_TWO) {
966
+ flipNormal = true;
967
+ normalEndpoint = Cartesian3_default.subtract(
968
+ position,
969
+ normal,
970
+ normalEndpointScratch
971
+ );
972
+ normalEndpointCartographic = ellipsoid.cartesianToCartographic(
973
+ normalEndpoint,
974
+ endPosCartographicScratch
975
+ );
976
+ }
977
+ normalEndpointCartographic.height = 0;
978
+ const normalEndpointProjected = projection.project(
979
+ normalEndpointCartographic,
980
+ result
981
+ );
982
+ result = Cartesian3_default.subtract(
983
+ normalEndpointProjected,
984
+ projectedPosition,
985
+ result
986
+ );
987
+ result.z = 0;
988
+ result = Cartesian3_default.normalize(result, result);
989
+ if (flipNormal) {
990
+ Cartesian3_default.negate(result, result);
991
+ }
992
+ return result;
993
+ }
994
+ var adjustHeightNormalScratch = new Cartesian3_default();
995
+ var adjustHeightOffsetScratch = new Cartesian3_default();
996
+ function adjustHeights(bottom, top, minHeight, maxHeight, adjustHeightBottom, adjustHeightTop) {
997
+ const adjustHeightNormal = Cartesian3_default.subtract(
998
+ top,
999
+ bottom,
1000
+ adjustHeightNormalScratch
1001
+ );
1002
+ Cartesian3_default.normalize(adjustHeightNormal, adjustHeightNormal);
1003
+ const distanceForBottom = minHeight - WALL_INITIAL_MIN_HEIGHT;
1004
+ let adjustHeightOffset = Cartesian3_default.multiplyByScalar(
1005
+ adjustHeightNormal,
1006
+ distanceForBottom,
1007
+ adjustHeightOffsetScratch
1008
+ );
1009
+ Cartesian3_default.add(bottom, adjustHeightOffset, adjustHeightBottom);
1010
+ const distanceForTop = maxHeight - WALL_INITIAL_MAX_HEIGHT;
1011
+ adjustHeightOffset = Cartesian3_default.multiplyByScalar(
1012
+ adjustHeightNormal,
1013
+ distanceForTop,
1014
+ adjustHeightOffsetScratch
1015
+ );
1016
+ Cartesian3_default.add(top, adjustHeightOffset, adjustHeightTop);
1017
+ }
1018
+ var nudgeDirectionScratch = new Cartesian3_default();
1019
+ function nudgeXZ(start, end) {
1020
+ const startToXZdistance = Plane_default.getPointDistance(XZ_PLANE, start);
1021
+ const endToXZdistance = Plane_default.getPointDistance(XZ_PLANE, end);
1022
+ let offset = nudgeDirectionScratch;
1023
+ if (Math_default.equalsEpsilon(startToXZdistance, 0, Math_default.EPSILON2)) {
1024
+ offset = direction(end, start, offset);
1025
+ Cartesian3_default.multiplyByScalar(offset, Math_default.EPSILON2, offset);
1026
+ Cartesian3_default.add(start, offset, start);
1027
+ } else if (Math_default.equalsEpsilon(endToXZdistance, 0, Math_default.EPSILON2)) {
1028
+ offset = direction(start, end, offset);
1029
+ Cartesian3_default.multiplyByScalar(offset, Math_default.EPSILON2, offset);
1030
+ Cartesian3_default.add(end, offset, end);
1031
+ }
1032
+ }
1033
+ function nudgeCartographic(start, end) {
1034
+ const absStartLon = Math.abs(start.longitude);
1035
+ const absEndLon = Math.abs(end.longitude);
1036
+ if (Math_default.equalsEpsilon(absStartLon, Math_default.PI, Math_default.EPSILON11)) {
1037
+ const endSign = Math_default.sign(end.longitude);
1038
+ start.longitude = endSign * (absStartLon - Math_default.EPSILON11);
1039
+ return 1;
1040
+ } else if (Math_default.equalsEpsilon(absEndLon, Math_default.PI, Math_default.EPSILON11)) {
1041
+ const startSign = Math_default.sign(start.longitude);
1042
+ end.longitude = startSign * (absEndLon - Math_default.EPSILON11);
1043
+ return 2;
1044
+ }
1045
+ return 0;
1046
+ }
1047
+ var startCartographicScratch = new Cartographic_default();
1048
+ var endCartographicScratch = new Cartographic_default();
1049
+ var segmentStartTopScratch = new Cartesian3_default();
1050
+ var segmentEndTopScratch = new Cartesian3_default();
1051
+ var segmentStartBottomScratch = new Cartesian3_default();
1052
+ var segmentEndBottomScratch = new Cartesian3_default();
1053
+ var segmentStartNormalScratch = new Cartesian3_default();
1054
+ var segmentEndNormalScratch = new Cartesian3_default();
1055
+ var getHeightCartographics = [
1056
+ startCartographicScratch,
1057
+ endCartographicScratch
1058
+ ];
1059
+ var getHeightRectangleScratch = new Rectangle_default();
1060
+ var adjustHeightStartTopScratch = new Cartesian3_default();
1061
+ var adjustHeightEndTopScratch = new Cartesian3_default();
1062
+ var adjustHeightStartBottomScratch = new Cartesian3_default();
1063
+ var adjustHeightEndBottomScratch = new Cartesian3_default();
1064
+ var segmentStart2DScratch = new Cartesian3_default();
1065
+ var segmentEnd2DScratch = new Cartesian3_default();
1066
+ var segmentStartNormal2DScratch = new Cartesian3_default();
1067
+ var segmentEndNormal2DScratch = new Cartesian3_default();
1068
+ var offsetScratch = new Cartesian3_default();
1069
+ var startUpScratch = new Cartesian3_default();
1070
+ var endUpScratch = new Cartesian3_default();
1071
+ var rightScratch = new Cartesian3_default();
1072
+ var startPlaneNormalScratch = new Cartesian3_default();
1073
+ var endPlaneNormalScratch = new Cartesian3_default();
1074
+ var encodeScratch = new EncodedCartesian3_default();
1075
+ var encodeScratch2D = new EncodedCartesian3_default();
1076
+ var forwardOffset2DScratch = new Cartesian3_default();
1077
+ var right2DScratch = new Cartesian3_default();
1078
+ var normalNudgeScratch = new Cartesian3_default();
1079
+ var scratchBoundingSpheres = [new BoundingSphere_default(), new BoundingSphere_default()];
1080
+ var REFERENCE_INDICES = [
1081
+ 0,
1082
+ 2,
1083
+ 1,
1084
+ 0,
1085
+ 3,
1086
+ 2,
1087
+ // right
1088
+ 0,
1089
+ 7,
1090
+ 3,
1091
+ 0,
1092
+ 4,
1093
+ 7,
1094
+ // start
1095
+ 0,
1096
+ 5,
1097
+ 4,
1098
+ 0,
1099
+ 1,
1100
+ 5,
1101
+ // bottom
1102
+ 5,
1103
+ 7,
1104
+ 4,
1105
+ 5,
1106
+ 6,
1107
+ 7,
1108
+ // left
1109
+ 5,
1110
+ 2,
1111
+ 6,
1112
+ 5,
1113
+ 1,
1114
+ 2,
1115
+ // end
1116
+ 3,
1117
+ 6,
1118
+ 2,
1119
+ 3,
1120
+ 7,
1121
+ 6
1122
+ // top
1123
+ ];
1124
+ var REFERENCE_INDICES_LENGTH = REFERENCE_INDICES.length;
1125
+ function generateGeometryAttributes(loop, projection, bottomPositionsArray, topPositionsArray, normalsArray, cartographicsArray, compute2dAttributes) {
1126
+ let i;
1127
+ let index;
1128
+ const ellipsoid = projection._ellipsoid;
1129
+ const segmentCount = bottomPositionsArray.length / 3 - 1;
1130
+ const vertexCount = segmentCount * 8;
1131
+ const arraySizeVec4 = vertexCount * 4;
1132
+ const indexCount = segmentCount * 36;
1133
+ const indices = vertexCount > 65535 ? new Uint32Array(indexCount) : new Uint16Array(indexCount);
1134
+ const positionsArray = new Float64Array(vertexCount * 3);
1135
+ const startHiAndForwardOffsetX = new Float32Array(arraySizeVec4);
1136
+ const startLoAndForwardOffsetY = new Float32Array(arraySizeVec4);
1137
+ const startNormalAndForwardOffsetZ = new Float32Array(arraySizeVec4);
1138
+ const endNormalAndTextureCoordinateNormalizationX = new Float32Array(
1139
+ arraySizeVec4
1140
+ );
1141
+ const rightNormalAndTextureCoordinateNormalizationY = new Float32Array(
1142
+ arraySizeVec4
1143
+ );
1144
+ let startHiLo2D;
1145
+ let offsetAndRight2D;
1146
+ let startEndNormals2D;
1147
+ let texcoordNormalization2D;
1148
+ if (compute2dAttributes) {
1149
+ startHiLo2D = new Float32Array(arraySizeVec4);
1150
+ offsetAndRight2D = new Float32Array(arraySizeVec4);
1151
+ startEndNormals2D = new Float32Array(arraySizeVec4);
1152
+ texcoordNormalization2D = new Float32Array(vertexCount * 2);
1153
+ }
1154
+ const cartographicsLength = cartographicsArray.length / 2;
1155
+ let length2D = 0;
1156
+ const startCartographic = startCartographicScratch;
1157
+ startCartographic.height = 0;
1158
+ const endCartographic = endCartographicScratch;
1159
+ endCartographic.height = 0;
1160
+ let segmentStartCartesian = segmentStartTopScratch;
1161
+ let segmentEndCartesian = segmentEndTopScratch;
1162
+ if (compute2dAttributes) {
1163
+ index = 0;
1164
+ for (i = 1; i < cartographicsLength; i++) {
1165
+ startCartographic.latitude = cartographicsArray[index];
1166
+ startCartographic.longitude = cartographicsArray[index + 1];
1167
+ endCartographic.latitude = cartographicsArray[index + 2];
1168
+ endCartographic.longitude = cartographicsArray[index + 3];
1169
+ segmentStartCartesian = projection.project(
1170
+ startCartographic,
1171
+ segmentStartCartesian
1172
+ );
1173
+ segmentEndCartesian = projection.project(
1174
+ endCartographic,
1175
+ segmentEndCartesian
1176
+ );
1177
+ length2D += Cartesian3_default.distance(
1178
+ segmentStartCartesian,
1179
+ segmentEndCartesian
1180
+ );
1181
+ index += 2;
1182
+ }
1183
+ }
1184
+ const positionsLength = topPositionsArray.length / 3;
1185
+ segmentEndCartesian = Cartesian3_default.unpack(
1186
+ topPositionsArray,
1187
+ 0,
1188
+ segmentEndCartesian
1189
+ );
1190
+ let length3D = 0;
1191
+ index = 3;
1192
+ for (i = 1; i < positionsLength; i++) {
1193
+ segmentStartCartesian = Cartesian3_default.clone(
1194
+ segmentEndCartesian,
1195
+ segmentStartCartesian
1196
+ );
1197
+ segmentEndCartesian = Cartesian3_default.unpack(
1198
+ topPositionsArray,
1199
+ index,
1200
+ segmentEndCartesian
1201
+ );
1202
+ length3D += Cartesian3_default.distance(segmentStartCartesian, segmentEndCartesian);
1203
+ index += 3;
1204
+ }
1205
+ let j;
1206
+ index = 3;
1207
+ let cartographicsIndex = 0;
1208
+ let vec2sWriteIndex = 0;
1209
+ let vec3sWriteIndex = 0;
1210
+ let vec4sWriteIndex = 0;
1211
+ let miterBroken = false;
1212
+ let endBottom = Cartesian3_default.unpack(
1213
+ bottomPositionsArray,
1214
+ 0,
1215
+ segmentEndBottomScratch
1216
+ );
1217
+ let endTop = Cartesian3_default.unpack(topPositionsArray, 0, segmentEndTopScratch);
1218
+ let endGeometryNormal = Cartesian3_default.unpack(
1219
+ normalsArray,
1220
+ 0,
1221
+ segmentEndNormalScratch
1222
+ );
1223
+ if (loop) {
1224
+ const preEndBottom = Cartesian3_default.unpack(
1225
+ bottomPositionsArray,
1226
+ bottomPositionsArray.length - 6,
1227
+ segmentStartBottomScratch
1228
+ );
1229
+ if (breakMiter(endGeometryNormal, preEndBottom, endBottom, endTop)) {
1230
+ endGeometryNormal = Cartesian3_default.negate(
1231
+ endGeometryNormal,
1232
+ endGeometryNormal
1233
+ );
1234
+ }
1235
+ }
1236
+ let lengthSoFar3D = 0;
1237
+ let lengthSoFar2D = 0;
1238
+ let sumHeights = 0;
1239
+ for (i = 0; i < segmentCount; i++) {
1240
+ const startBottom = Cartesian3_default.clone(endBottom, segmentStartBottomScratch);
1241
+ const startTop = Cartesian3_default.clone(endTop, segmentStartTopScratch);
1242
+ let startGeometryNormal = Cartesian3_default.clone(
1243
+ endGeometryNormal,
1244
+ segmentStartNormalScratch
1245
+ );
1246
+ if (miterBroken) {
1247
+ startGeometryNormal = Cartesian3_default.negate(
1248
+ startGeometryNormal,
1249
+ startGeometryNormal
1250
+ );
1251
+ }
1252
+ endBottom = Cartesian3_default.unpack(
1253
+ bottomPositionsArray,
1254
+ index,
1255
+ segmentEndBottomScratch
1256
+ );
1257
+ endTop = Cartesian3_default.unpack(topPositionsArray, index, segmentEndTopScratch);
1258
+ endGeometryNormal = Cartesian3_default.unpack(
1259
+ normalsArray,
1260
+ index,
1261
+ segmentEndNormalScratch
1262
+ );
1263
+ miterBroken = breakMiter(endGeometryNormal, startBottom, endBottom, endTop);
1264
+ startCartographic.latitude = cartographicsArray[cartographicsIndex];
1265
+ startCartographic.longitude = cartographicsArray[cartographicsIndex + 1];
1266
+ endCartographic.latitude = cartographicsArray[cartographicsIndex + 2];
1267
+ endCartographic.longitude = cartographicsArray[cartographicsIndex + 3];
1268
+ let start2D;
1269
+ let end2D;
1270
+ let startGeometryNormal2D;
1271
+ let endGeometryNormal2D;
1272
+ if (compute2dAttributes) {
1273
+ const nudgeResult = nudgeCartographic(startCartographic, endCartographic);
1274
+ start2D = projection.project(startCartographic, segmentStart2DScratch);
1275
+ end2D = projection.project(endCartographic, segmentEnd2DScratch);
1276
+ const direction2D = direction(end2D, start2D, forwardOffset2DScratch);
1277
+ direction2D.y = Math.abs(direction2D.y);
1278
+ startGeometryNormal2D = segmentStartNormal2DScratch;
1279
+ endGeometryNormal2D = segmentEndNormal2DScratch;
1280
+ if (nudgeResult === 0 || Cartesian3_default.dot(direction2D, Cartesian3_default.UNIT_Y) > MITER_BREAK_SMALL) {
1281
+ startGeometryNormal2D = projectNormal(
1282
+ projection,
1283
+ startCartographic,
1284
+ startGeometryNormal,
1285
+ start2D,
1286
+ segmentStartNormal2DScratch
1287
+ );
1288
+ endGeometryNormal2D = projectNormal(
1289
+ projection,
1290
+ endCartographic,
1291
+ endGeometryNormal,
1292
+ end2D,
1293
+ segmentEndNormal2DScratch
1294
+ );
1295
+ } else if (nudgeResult === 1) {
1296
+ endGeometryNormal2D = projectNormal(
1297
+ projection,
1298
+ endCartographic,
1299
+ endGeometryNormal,
1300
+ end2D,
1301
+ segmentEndNormal2DScratch
1302
+ );
1303
+ startGeometryNormal2D.x = 0;
1304
+ startGeometryNormal2D.y = Math_default.sign(
1305
+ startCartographic.longitude - Math.abs(endCartographic.longitude)
1306
+ );
1307
+ startGeometryNormal2D.z = 0;
1308
+ } else {
1309
+ startGeometryNormal2D = projectNormal(
1310
+ projection,
1311
+ startCartographic,
1312
+ startGeometryNormal,
1313
+ start2D,
1314
+ segmentStartNormal2DScratch
1315
+ );
1316
+ endGeometryNormal2D.x = 0;
1317
+ endGeometryNormal2D.y = Math_default.sign(
1318
+ startCartographic.longitude - endCartographic.longitude
1319
+ );
1320
+ endGeometryNormal2D.z = 0;
1321
+ }
1322
+ }
1323
+ const segmentLength3D = Cartesian3_default.distance(startTop, endTop);
1324
+ const encodedStart = EncodedCartesian3_default.fromCartesian(
1325
+ startBottom,
1326
+ encodeScratch
1327
+ );
1328
+ const forwardOffset = Cartesian3_default.subtract(
1329
+ endBottom,
1330
+ startBottom,
1331
+ offsetScratch
1332
+ );
1333
+ const forward = Cartesian3_default.normalize(forwardOffset, rightScratch);
1334
+ let startUp = Cartesian3_default.subtract(startTop, startBottom, startUpScratch);
1335
+ startUp = Cartesian3_default.normalize(startUp, startUp);
1336
+ let rightNormal = Cartesian3_default.cross(forward, startUp, rightScratch);
1337
+ rightNormal = Cartesian3_default.normalize(rightNormal, rightNormal);
1338
+ let startPlaneNormal = Cartesian3_default.cross(
1339
+ startUp,
1340
+ startGeometryNormal,
1341
+ startPlaneNormalScratch
1342
+ );
1343
+ startPlaneNormal = Cartesian3_default.normalize(startPlaneNormal, startPlaneNormal);
1344
+ let endUp = Cartesian3_default.subtract(endTop, endBottom, endUpScratch);
1345
+ endUp = Cartesian3_default.normalize(endUp, endUp);
1346
+ let endPlaneNormal = Cartesian3_default.cross(
1347
+ endGeometryNormal,
1348
+ endUp,
1349
+ endPlaneNormalScratch
1350
+ );
1351
+ endPlaneNormal = Cartesian3_default.normalize(endPlaneNormal, endPlaneNormal);
1352
+ const texcoordNormalization3DX = segmentLength3D / length3D;
1353
+ const texcoordNormalization3DY = lengthSoFar3D / length3D;
1354
+ let segmentLength2D = 0;
1355
+ let encodedStart2D;
1356
+ let forwardOffset2D;
1357
+ let right2D;
1358
+ let texcoordNormalization2DX = 0;
1359
+ let texcoordNormalization2DY = 0;
1360
+ if (compute2dAttributes) {
1361
+ segmentLength2D = Cartesian3_default.distance(start2D, end2D);
1362
+ encodedStart2D = EncodedCartesian3_default.fromCartesian(
1363
+ start2D,
1364
+ encodeScratch2D
1365
+ );
1366
+ forwardOffset2D = Cartesian3_default.subtract(
1367
+ end2D,
1368
+ start2D,
1369
+ forwardOffset2DScratch
1370
+ );
1371
+ right2D = Cartesian3_default.normalize(forwardOffset2D, right2DScratch);
1372
+ const swap = right2D.x;
1373
+ right2D.x = right2D.y;
1374
+ right2D.y = -swap;
1375
+ texcoordNormalization2DX = segmentLength2D / length2D;
1376
+ texcoordNormalization2DY = lengthSoFar2D / length2D;
1377
+ }
1378
+ for (j = 0; j < 8; j++) {
1379
+ const vec4Index = vec4sWriteIndex + j * 4;
1380
+ const vec2Index = vec2sWriteIndex + j * 2;
1381
+ const wIndex = vec4Index + 3;
1382
+ const rightPlaneSide = j < 4 ? 1 : -1;
1383
+ const topBottomSide = j === 2 || j === 3 || j === 6 || j === 7 ? 1 : -1;
1384
+ Cartesian3_default.pack(encodedStart.high, startHiAndForwardOffsetX, vec4Index);
1385
+ startHiAndForwardOffsetX[wIndex] = forwardOffset.x;
1386
+ Cartesian3_default.pack(encodedStart.low, startLoAndForwardOffsetY, vec4Index);
1387
+ startLoAndForwardOffsetY[wIndex] = forwardOffset.y;
1388
+ Cartesian3_default.pack(
1389
+ startPlaneNormal,
1390
+ startNormalAndForwardOffsetZ,
1391
+ vec4Index
1392
+ );
1393
+ startNormalAndForwardOffsetZ[wIndex] = forwardOffset.z;
1394
+ Cartesian3_default.pack(
1395
+ endPlaneNormal,
1396
+ endNormalAndTextureCoordinateNormalizationX,
1397
+ vec4Index
1398
+ );
1399
+ endNormalAndTextureCoordinateNormalizationX[wIndex] = texcoordNormalization3DX * rightPlaneSide;
1400
+ Cartesian3_default.pack(
1401
+ rightNormal,
1402
+ rightNormalAndTextureCoordinateNormalizationY,
1403
+ vec4Index
1404
+ );
1405
+ let texcoordNormalization = texcoordNormalization3DY * topBottomSide;
1406
+ if (texcoordNormalization === 0 && topBottomSide < 0) {
1407
+ texcoordNormalization = 9;
1408
+ }
1409
+ rightNormalAndTextureCoordinateNormalizationY[wIndex] = texcoordNormalization;
1410
+ if (compute2dAttributes) {
1411
+ startHiLo2D[vec4Index] = encodedStart2D.high.x;
1412
+ startHiLo2D[vec4Index + 1] = encodedStart2D.high.y;
1413
+ startHiLo2D[vec4Index + 2] = encodedStart2D.low.x;
1414
+ startHiLo2D[vec4Index + 3] = encodedStart2D.low.y;
1415
+ startEndNormals2D[vec4Index] = -startGeometryNormal2D.y;
1416
+ startEndNormals2D[vec4Index + 1] = startGeometryNormal2D.x;
1417
+ startEndNormals2D[vec4Index + 2] = endGeometryNormal2D.y;
1418
+ startEndNormals2D[vec4Index + 3] = -endGeometryNormal2D.x;
1419
+ offsetAndRight2D[vec4Index] = forwardOffset2D.x;
1420
+ offsetAndRight2D[vec4Index + 1] = forwardOffset2D.y;
1421
+ offsetAndRight2D[vec4Index + 2] = right2D.x;
1422
+ offsetAndRight2D[vec4Index + 3] = right2D.y;
1423
+ texcoordNormalization2D[vec2Index] = texcoordNormalization2DX * rightPlaneSide;
1424
+ texcoordNormalization = texcoordNormalization2DY * topBottomSide;
1425
+ if (texcoordNormalization === 0 && topBottomSide < 0) {
1426
+ texcoordNormalization = 9;
1427
+ }
1428
+ texcoordNormalization2D[vec2Index + 1] = texcoordNormalization;
1429
+ }
1430
+ }
1431
+ const adjustHeightStartBottom = adjustHeightStartBottomScratch;
1432
+ const adjustHeightEndBottom = adjustHeightEndBottomScratch;
1433
+ const adjustHeightStartTop = adjustHeightStartTopScratch;
1434
+ const adjustHeightEndTop = adjustHeightEndTopScratch;
1435
+ const getHeightsRectangle = Rectangle_default.fromCartographicArray(
1436
+ getHeightCartographics,
1437
+ getHeightRectangleScratch
1438
+ );
1439
+ const minMaxHeights = ApproximateTerrainHeights_default.getMinimumMaximumHeights(
1440
+ getHeightsRectangle,
1441
+ ellipsoid
1442
+ );
1443
+ const minHeight = minMaxHeights.minimumTerrainHeight;
1444
+ const maxHeight = minMaxHeights.maximumTerrainHeight;
1445
+ sumHeights += Math.abs(minHeight);
1446
+ sumHeights += Math.abs(maxHeight);
1447
+ adjustHeights(
1448
+ startBottom,
1449
+ startTop,
1450
+ minHeight,
1451
+ maxHeight,
1452
+ adjustHeightStartBottom,
1453
+ adjustHeightStartTop
1454
+ );
1455
+ adjustHeights(
1456
+ endBottom,
1457
+ endTop,
1458
+ minHeight,
1459
+ maxHeight,
1460
+ adjustHeightEndBottom,
1461
+ adjustHeightEndTop
1462
+ );
1463
+ let normalNudge = Cartesian3_default.multiplyByScalar(
1464
+ rightNormal,
1465
+ Math_default.EPSILON5,
1466
+ normalNudgeScratch
1467
+ );
1468
+ Cartesian3_default.add(
1469
+ adjustHeightStartBottom,
1470
+ normalNudge,
1471
+ adjustHeightStartBottom
1472
+ );
1473
+ Cartesian3_default.add(adjustHeightEndBottom, normalNudge, adjustHeightEndBottom);
1474
+ Cartesian3_default.add(adjustHeightStartTop, normalNudge, adjustHeightStartTop);
1475
+ Cartesian3_default.add(adjustHeightEndTop, normalNudge, adjustHeightEndTop);
1476
+ nudgeXZ(adjustHeightStartBottom, adjustHeightEndBottom);
1477
+ nudgeXZ(adjustHeightStartTop, adjustHeightEndTop);
1478
+ Cartesian3_default.pack(adjustHeightStartBottom, positionsArray, vec3sWriteIndex);
1479
+ Cartesian3_default.pack(adjustHeightEndBottom, positionsArray, vec3sWriteIndex + 3);
1480
+ Cartesian3_default.pack(adjustHeightEndTop, positionsArray, vec3sWriteIndex + 6);
1481
+ Cartesian3_default.pack(adjustHeightStartTop, positionsArray, vec3sWriteIndex + 9);
1482
+ normalNudge = Cartesian3_default.multiplyByScalar(
1483
+ rightNormal,
1484
+ -2 * Math_default.EPSILON5,
1485
+ normalNudgeScratch
1486
+ );
1487
+ Cartesian3_default.add(
1488
+ adjustHeightStartBottom,
1489
+ normalNudge,
1490
+ adjustHeightStartBottom
1491
+ );
1492
+ Cartesian3_default.add(adjustHeightEndBottom, normalNudge, adjustHeightEndBottom);
1493
+ Cartesian3_default.add(adjustHeightStartTop, normalNudge, adjustHeightStartTop);
1494
+ Cartesian3_default.add(adjustHeightEndTop, normalNudge, adjustHeightEndTop);
1495
+ nudgeXZ(adjustHeightStartBottom, adjustHeightEndBottom);
1496
+ nudgeXZ(adjustHeightStartTop, adjustHeightEndTop);
1497
+ Cartesian3_default.pack(
1498
+ adjustHeightStartBottom,
1499
+ positionsArray,
1500
+ vec3sWriteIndex + 12
1501
+ );
1502
+ Cartesian3_default.pack(
1503
+ adjustHeightEndBottom,
1504
+ positionsArray,
1505
+ vec3sWriteIndex + 15
1506
+ );
1507
+ Cartesian3_default.pack(adjustHeightEndTop, positionsArray, vec3sWriteIndex + 18);
1508
+ Cartesian3_default.pack(adjustHeightStartTop, positionsArray, vec3sWriteIndex + 21);
1509
+ cartographicsIndex += 2;
1510
+ index += 3;
1511
+ vec2sWriteIndex += 16;
1512
+ vec3sWriteIndex += 24;
1513
+ vec4sWriteIndex += 32;
1514
+ lengthSoFar3D += segmentLength3D;
1515
+ lengthSoFar2D += segmentLength2D;
1516
+ }
1517
+ index = 0;
1518
+ let indexOffset = 0;
1519
+ for (i = 0; i < segmentCount; i++) {
1520
+ for (j = 0; j < REFERENCE_INDICES_LENGTH; j++) {
1521
+ indices[index + j] = REFERENCE_INDICES[j] + indexOffset;
1522
+ }
1523
+ indexOffset += 8;
1524
+ index += REFERENCE_INDICES_LENGTH;
1525
+ }
1526
+ const boundingSpheres = scratchBoundingSpheres;
1527
+ BoundingSphere_default.fromVertices(
1528
+ bottomPositionsArray,
1529
+ Cartesian3_default.ZERO,
1530
+ 3,
1531
+ boundingSpheres[0]
1532
+ );
1533
+ BoundingSphere_default.fromVertices(
1534
+ topPositionsArray,
1535
+ Cartesian3_default.ZERO,
1536
+ 3,
1537
+ boundingSpheres[1]
1538
+ );
1539
+ const boundingSphere = BoundingSphere_default.fromBoundingSpheres(boundingSpheres);
1540
+ boundingSphere.radius += sumHeights / (segmentCount * 2);
1541
+ const attributes = {
1542
+ position: new GeometryAttribute_default({
1543
+ componentDatatype: ComponentDatatype_default.DOUBLE,
1544
+ componentsPerAttribute: 3,
1545
+ normalize: false,
1546
+ values: positionsArray
1547
+ }),
1548
+ startHiAndForwardOffsetX: getVec4GeometryAttribute(
1549
+ startHiAndForwardOffsetX
1550
+ ),
1551
+ startLoAndForwardOffsetY: getVec4GeometryAttribute(
1552
+ startLoAndForwardOffsetY
1553
+ ),
1554
+ startNormalAndForwardOffsetZ: getVec4GeometryAttribute(
1555
+ startNormalAndForwardOffsetZ
1556
+ ),
1557
+ endNormalAndTextureCoordinateNormalizationX: getVec4GeometryAttribute(
1558
+ endNormalAndTextureCoordinateNormalizationX
1559
+ ),
1560
+ rightNormalAndTextureCoordinateNormalizationY: getVec4GeometryAttribute(
1561
+ rightNormalAndTextureCoordinateNormalizationY
1562
+ )
1563
+ };
1564
+ if (compute2dAttributes) {
1565
+ attributes.startHiLo2D = getVec4GeometryAttribute(startHiLo2D);
1566
+ attributes.offsetAndRight2D = getVec4GeometryAttribute(offsetAndRight2D);
1567
+ attributes.startEndNormals2D = getVec4GeometryAttribute(startEndNormals2D);
1568
+ attributes.texcoordNormalization2D = new GeometryAttribute_default({
1569
+ componentDatatype: ComponentDatatype_default.FLOAT,
1570
+ componentsPerAttribute: 2,
1571
+ normalize: false,
1572
+ values: texcoordNormalization2D
1573
+ });
1574
+ }
1575
+ return new Geometry_default({
1576
+ attributes,
1577
+ indices,
1578
+ boundingSphere
1579
+ });
1580
+ }
1581
+ function getVec4GeometryAttribute(typedArray) {
1582
+ return new GeometryAttribute_default({
1583
+ componentDatatype: ComponentDatatype_default.FLOAT,
1584
+ componentsPerAttribute: 4,
1585
+ normalize: false,
1586
+ values: typedArray
1587
+ });
1588
+ }
1589
+ GroundPolylineGeometry._projectNormal = projectNormal;
1590
+ var GroundPolylineGeometry_default = GroundPolylineGeometry;
1591
+
1592
+ // packages/engine/Source/Workers/createGroundPolylineGeometry.js
1593
+ function createGroundPolylineGeometry(groundPolylineGeometry, offset) {
1594
+ return ApproximateTerrainHeights_default.initialize().then(function() {
1595
+ if (defined_default(offset)) {
1596
+ groundPolylineGeometry = GroundPolylineGeometry_default.unpack(
1597
+ groundPolylineGeometry,
1598
+ offset
1599
+ );
1600
+ }
1601
+ return GroundPolylineGeometry_default.createGeometry(groundPolylineGeometry);
1602
+ });
1603
+ }
1604
+ var createGroundPolylineGeometry_default = createGroundPolylineGeometry;
1605
+ export {
1606
+ createGroundPolylineGeometry_default as default
1607
+ };