@vcmap/ui 5.0.0-rc.18 → 5.0.0-rc.21

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 (376) hide show
  1. package/README.md +6 -6
  2. package/build/build.js +2 -2
  3. package/build/buildCesium.js +3 -3
  4. package/build/buildHelpers.js +2 -1
  5. package/config/base.config.json +0 -4
  6. package/config/dev.config.json +35 -14
  7. package/config/www.config.json +4 -0
  8. package/dist/assets/cesium/Workers/ArcType-ce2e50ab.js +37 -0
  9. package/dist/assets/cesium/Workers/AttributeCompression-b646d393.js +716 -0
  10. package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-ff186ccc.js +258 -0
  11. package/dist/assets/cesium/Workers/BoundingRectangle-be5924f4.js +369 -0
  12. package/dist/assets/cesium/Workers/BoxGeometry-12eeccaf.js +884 -0
  13. package/dist/assets/cesium/Workers/Check-666ab1a0.js +290 -0
  14. package/dist/assets/cesium/Workers/Color-a84038cb.js +2262 -0
  15. package/dist/assets/cesium/Workers/ComponentDatatype-f7b11d02.js +341 -0
  16. package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-3272c1b3.js +132 -0
  17. package/dist/assets/cesium/Workers/CorridorGeometryLibrary-0170e093.js +498 -0
  18. package/dist/assets/cesium/Workers/CylinderGeometry-7c5da648.js +467 -0
  19. package/dist/assets/cesium/Workers/CylinderGeometryLibrary-372c07d8.js +63 -0
  20. package/dist/assets/cesium/Workers/EllipseGeometry-797d580e.js +1304 -0
  21. package/dist/assets/cesium/Workers/EllipseGeometryLibrary-2939e1dc.js +366 -0
  22. package/dist/assets/cesium/Workers/EllipseOutlineGeometry-8b50870f.js +443 -0
  23. package/dist/assets/cesium/Workers/EllipsoidGeodesic-98c62a56.js +520 -0
  24. package/dist/assets/cesium/Workers/EllipsoidGeometry-21c0e3a5.js +637 -0
  25. package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-eff247c8.js +454 -0
  26. package/dist/assets/cesium/Workers/EllipsoidRhumbLine-19756602.js +741 -0
  27. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-214683dc.js +373 -0
  28. package/dist/assets/cesium/Workers/EncodedCartesian3-81f70735.js +171 -0
  29. package/dist/assets/cesium/Workers/FrustumGeometry-ac42a6d9.js +2512 -0
  30. package/dist/assets/cesium/Workers/GeometryAttribute-7d6f1732.js +619 -0
  31. package/dist/assets/cesium/Workers/GeometryAttributes-f06a2792.js +91 -0
  32. package/dist/assets/cesium/Workers/GeometryInstance-451dc1cd.js +121 -0
  33. package/dist/assets/cesium/Workers/GeometryOffsetAttribute-04332ce7.js +16 -0
  34. package/dist/assets/cesium/Workers/GeometryPipeline-ce4339ed.js +3690 -0
  35. package/dist/assets/cesium/Workers/IndexDatatype-a55ceaa1.js +200 -0
  36. package/dist/assets/cesium/Workers/IntersectionTests-f6e6bd8a.js +1836 -0
  37. package/dist/assets/cesium/Workers/Math-2dbd6b93.js +1330 -0
  38. package/dist/assets/cesium/Workers/Matrix2-13178034.js +7086 -0
  39. package/dist/assets/cesium/Workers/Matrix3-315394f6.js +4283 -0
  40. package/dist/assets/cesium/Workers/OrientedBoundingBox-04920dc7.js +1257 -0
  41. package/dist/assets/cesium/Workers/Plane-900aa728.js +309 -0
  42. package/dist/assets/cesium/Workers/PolygonGeometryLibrary-a8680d96.js +1074 -0
  43. package/dist/assets/cesium/Workers/PolygonPipeline-844aab0a.js +1345 -0
  44. package/dist/assets/cesium/Workers/PolylinePipeline-32f36d2a.js +573 -0
  45. package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-a510d657.js +781 -0
  46. package/dist/assets/cesium/Workers/PrimitivePipeline-ba38434a.js +966 -0
  47. package/dist/assets/cesium/Workers/RectangleGeometryLibrary-bdba697e.js +280 -0
  48. package/dist/assets/cesium/Workers/RuntimeError-06c93819.js +68 -0
  49. package/dist/assets/cesium/Workers/TerrainEncoding-833187da.js +1227 -0
  50. package/dist/assets/cesium/Workers/Transforms-40229881.js +14696 -0
  51. package/dist/assets/cesium/Workers/VertexFormat-6b480673.js +312 -0
  52. package/dist/assets/cesium/Workers/WallGeometryLibrary-919eed92.js +211 -0
  53. package/dist/assets/cesium/Workers/WebGLConstants-a8cc3e8c.js +620 -0
  54. package/dist/assets/cesium/Workers/WebMercatorProjection-13a90d41.js +151 -0
  55. package/dist/assets/cesium/Workers/arrayRemoveDuplicates-c2038105.js +129 -0
  56. package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1336 -4
  57. package/dist/assets/cesium/Workers/combine-ca22a614.js +82 -0
  58. package/dist/assets/cesium/Workers/combineGeometry.js +17 -25
  59. package/dist/assets/cesium/Workers/createBoxGeometry.js +12 -25
  60. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +313 -25
  61. package/dist/assets/cesium/Workers/createCircleGeometry.js +213 -25
  62. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +160 -25
  63. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +586 -25
  64. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +236 -25
  65. package/dist/assets/cesium/Workers/createCorridorGeometry.js +1407 -25
  66. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +603 -25
  67. package/dist/assets/cesium/Workers/createCylinderGeometry.js +12 -25
  68. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +265 -25
  69. package/dist/assets/cesium/Workers/createEllipseGeometry.js +14 -25
  70. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +14 -25
  71. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +12 -25
  72. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +15 -25
  73. package/dist/assets/cesium/Workers/createFrustumGeometry.js +12 -25
  74. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +251 -25
  75. package/dist/assets/cesium/Workers/createGeometry.js +55 -25
  76. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +2134 -25
  77. package/dist/assets/cesium/Workers/createPlaneGeometry.js +250 -25
  78. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +115 -25
  79. package/dist/assets/cesium/Workers/createPolygonGeometry.js +1420 -25
  80. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +683 -25
  81. package/dist/assets/cesium/Workers/createPolylineGeometry.js +571 -25
  82. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +411 -25
  83. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +301 -25
  84. package/dist/assets/cesium/Workers/createRectangleGeometry.js +1476 -25
  85. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +535 -25
  86. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +458 -25
  87. package/dist/assets/cesium/Workers/createSphereGeometry.js +123 -25
  88. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +126 -25
  89. package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +127 -25
  90. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +535 -25
  91. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +445 -25
  92. package/dist/assets/cesium/Workers/createVectorTilePoints.js +79 -25
  93. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +406 -25
  94. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +254 -25
  95. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +640 -25
  96. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +2711 -27
  97. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +994 -25
  98. package/dist/assets/cesium/Workers/createWallGeometry.js +623 -25
  99. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +432 -25
  100. package/dist/assets/cesium/Workers/decodeDraco.js +381 -25
  101. package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +3687 -25
  102. package/dist/assets/cesium/Workers/decodeI3S.js +1040 -0
  103. package/dist/assets/cesium/Workers/defaultValue-0a909f67.js +51 -0
  104. package/dist/assets/cesium/Workers/package.js +2 -2
  105. package/dist/assets/cesium/Workers/transcodeKTX2.js +1516 -25
  106. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +18 -2
  107. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1023 -25
  108. package/dist/assets/{cesium.2f992f.js → cesium.49585c.js} +112161 -108735
  109. package/dist/assets/cesium.js +1 -1
  110. package/dist/assets/{core.cb0408.js → core.59d4d1.js} +1616 -1629
  111. package/dist/assets/core.js +1 -1
  112. package/dist/assets/{index.bccdf969.js → index.a3861d4e.js} +1 -1
  113. package/dist/assets/{ol.5e3fd0.js → ol.c1c512.js} +6992 -6972
  114. package/dist/assets/ol.js +1 -1
  115. package/dist/assets/ui.80175f.css +1 -0
  116. package/dist/assets/{ui.08c48f.js → ui.80175f.js} +6121 -6785
  117. package/dist/assets/ui.js +1 -1
  118. package/dist/assets/{vue.228ead.js → vue.a08ab1.js} +0 -0
  119. package/dist/assets/vue.js +2 -2
  120. package/dist/assets/{vuetify.0b5039.css → vuetify.efc158.css} +0 -0
  121. package/dist/assets/{vuetify.0b5039.js → vuetify.efc158.js} +1 -1
  122. package/dist/assets/vuetify.js +2 -2
  123. package/dist/index.html +1 -1
  124. package/index.js +2 -1
  125. package/lib/cesium.js +1 -1
  126. package/package.json +3 -4
  127. package/plugins/{simple-graph → @vcmap/simple-graph}/README.md +1 -1
  128. package/plugins/{simple-graph → @vcmap/simple-graph}/SimpleGraphComponent.vue +0 -0
  129. package/plugins/{simple-graph → @vcmap/simple-graph}/index.js +0 -0
  130. package/plugins/{simple-graph → @vcmap/simple-graph}/package.json +0 -0
  131. package/plugins/{simple-graph → @vcmap/simple-graph}/simpleGraphView.js +0 -0
  132. package/plugins/@vcmap-show-case/README.md +20 -0
  133. package/plugins/{buttonExamples/ButtonExamples.vue → @vcmap-show-case/buttons-example/ButtonsExample.vue} +1 -1
  134. package/plugins/@vcmap-show-case/buttons-example/README.md +4 -0
  135. package/plugins/{buttonExamples → @vcmap-show-case/buttons-example}/index.js +16 -8
  136. package/plugins/@vcmap-show-case/buttons-example/package.json +5 -0
  137. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/Categories.vue +7 -6
  138. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/Category.vue +4 -3
  139. package/plugins/@vcmap-show-case/category-tester/README.md +3 -0
  140. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/index.js +12 -4
  141. package/plugins/@vcmap-show-case/category-tester/package.json +5 -0
  142. package/plugins/@vcmap-show-case/config-editor/README.md +3 -0
  143. package/plugins/{test → @vcmap-show-case/config-editor}/editor.vue +0 -0
  144. package/plugins/@vcmap-show-case/config-editor/index.js +47 -0
  145. package/plugins/@vcmap-show-case/config-editor/package.json +5 -0
  146. package/plugins/@vcmap-show-case/context-menu-tester/README.md +3 -0
  147. package/plugins/@vcmap-show-case/context-menu-tester/index.js +33 -0
  148. package/plugins/@vcmap-show-case/context-menu-tester/package.json +5 -0
  149. package/plugins/{@vcmap/pluginExample/pluginExampleComponent.vue → @vcmap-show-case/form-inputs-example/FormInputsExample.vue} +14 -13
  150. package/plugins/@vcmap-show-case/form-inputs-example/README.md +4 -0
  151. package/plugins/@vcmap-show-case/form-inputs-example/config.json +5 -0
  152. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/exampleActions.js +1 -1
  153. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/index.js +23 -22
  154. package/plugins/@vcmap-show-case/form-inputs-example/package.json +5 -0
  155. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/validation.js +0 -0
  156. package/plugins/@vcmap-show-case/icons-example/README.md +5 -0
  157. package/plugins/@vcmap-show-case/icons-example/allIconsComponent.vue +51 -0
  158. package/plugins/@vcmap-show-case/icons-example/index.js +44 -0
  159. package/plugins/@vcmap-show-case/icons-example/package.json +5 -0
  160. package/plugins/{test/testList.vue → @vcmap-show-case/list-example/ListExample.vue} +1 -1
  161. package/plugins/@vcmap-show-case/list-example/README.md +3 -0
  162. package/plugins/@vcmap-show-case/list-example/index.js +44 -0
  163. package/plugins/@vcmap-show-case/list-example/package.json +5 -0
  164. package/plugins/@vcmap-show-case/notifier-tester/README.md +3 -0
  165. package/plugins/{notifier → @vcmap-show-case/notifier-tester}/index.js +11 -6
  166. package/plugins/{notifier → @vcmap-show-case/notifier-tester}/notifierTester.vue +0 -0
  167. package/plugins/@vcmap-show-case/notifier-tester/package.json +5 -0
  168. package/plugins/@vcmap-show-case/textfields-example/README.md +3 -0
  169. package/plugins/{example/mySuperComponent.vue → @vcmap-show-case/textfields-example/TextfieldsExample.vue} +1 -7
  170. package/plugins/{example → @vcmap-show-case/textfields-example}/index.js +58 -62
  171. package/plugins/@vcmap-show-case/textfields-example/package.json +5 -0
  172. package/plugins/@vcmap-show-case/window-tester/README.md +3 -0
  173. package/plugins/{test/windowManagerExample.vue → @vcmap-show-case/window-tester/WindowExample.vue} +36 -20
  174. package/plugins/{test → @vcmap-show-case/window-tester}/emptyComponent.vue +8 -3
  175. package/plugins/@vcmap-show-case/window-tester/index.js +62 -0
  176. package/plugins/{test → @vcmap-show-case/window-tester}/myCustomHeader.vue +0 -0
  177. package/plugins/@vcmap-show-case/window-tester/package.json +5 -0
  178. package/plugins/{test → @vcmap-show-case/window-tester}/toolbox-data.js +9 -9
  179. package/plugins/{test/vcsContent.vue → @vcmap-show-case/window-tester/windowExampleContent.vue} +1 -5
  180. package/plugins/@vcmap-show-case/wizard-example/README.md +3 -0
  181. package/plugins/{wizardExample → @vcmap-show-case/wizard-example}/index.js +12 -6
  182. package/plugins/@vcmap-show-case/wizard-example/package.json +5 -0
  183. package/plugins/@vcmap-show-case/wizard-example/wizardExample.vue +95 -0
  184. package/plugins/package.json +2 -1
  185. package/src/actions/actionHelper.js +1 -3
  186. package/src/actions/stateRefAction.js +0 -10
  187. package/src/application/VcsApp.vue +42 -23
  188. package/src/application/VcsMap.vue +9 -0
  189. package/src/components/buttons/VcsActionButtonList.vue +1 -0
  190. package/src/components/form-inputs-controls/VcsCheckbox.vue +3 -1
  191. package/src/components/form-inputs-controls/VcsWizard.vue +17 -20
  192. package/src/components/form-inputs-controls/VcsWizardStep.vue +160 -0
  193. package/src/{icons → components/icons}/+all.js +0 -0
  194. package/src/{icons → components/icons}/2DAreaIcon.vue +0 -0
  195. package/src/{icons → components/icons}/2DDistanceIcon.vue +0 -0
  196. package/src/{icons → components/icons}/3DAreaIcon.vue +0 -0
  197. package/src/{icons → components/icons}/3DDistanceIcon.vue +0 -0
  198. package/src/{icons → components/icons}/3DHeightIcon.vue +0 -0
  199. package/src/{icons → components/icons}/AngleIcon.vue +0 -0
  200. package/src/{icons → components/icons}/AssociationsIcon.vue +0 -0
  201. package/src/{icons → components/icons}/AxisIcon.vue +0 -0
  202. package/src/{icons → components/icons}/BoundingBoxIcon.vue +0 -0
  203. package/src/{icons → components/icons}/CheckboxCheckedIcon.vue +0 -0
  204. package/src/{icons → components/icons}/CheckboxIcon.vue +0 -0
  205. package/src/{icons → components/icons}/CheckboxIndeterminateIcon.vue +0 -0
  206. package/src/{icons → components/icons}/CircleIcon.vue +0 -0
  207. package/src/{icons → components/icons}/ClippingHorizontalIcon.vue +0 -0
  208. package/src/{icons → components/icons}/ClippingIcon.vue +0 -0
  209. package/src/{icons → components/icons}/ClippingVerticalIcon.vue +0 -0
  210. package/src/{icons → components/icons}/ColorPickerIcon.vue +0 -0
  211. package/src/{icons → components/icons}/ColorSwatchIcon.vue +0 -0
  212. package/src/{icons → components/icons}/CommentIcon.vue +0 -0
  213. package/src/{icons → components/icons}/CompassIcon.vue +0 -0
  214. package/src/{icons → components/icons}/ComponentsIcon.vue +0 -0
  215. package/src/{icons → components/icons}/ConeIcon.vue +0 -0
  216. package/src/{icons → components/icons}/DimensionsHouseIcon.vue +0 -0
  217. package/src/{icons → components/icons}/EditIcon.vue +0 -0
  218. package/src/{icons → components/icons}/ElevationProfileIcon.vue +0 -0
  219. package/src/{icons → components/icons}/ExportAreaIcon.vue +0 -0
  220. package/src/{icons → components/icons}/ExportFlightIcon.vue +0 -0
  221. package/src/{icons → components/icons}/ExportIcon.vue +0 -0
  222. package/src/{icons → components/icons}/ExternalLinkIcon.vue +0 -0
  223. package/src/{icons → components/icons}/EyeIcon.vue +0 -0
  224. package/src/{icons → components/icons}/FastForwardIcon.vue +0 -0
  225. package/src/{icons → components/icons}/FilterIcon.vue +0 -0
  226. package/src/{icons → components/icons}/GlobalTerrainIcon.vue +0 -0
  227. package/src/{icons → components/icons}/GlobeNatureIcon.vue +0 -0
  228. package/src/{icons → components/icons}/GroundIcon.vue +0 -0
  229. package/src/{icons → components/icons}/HealthCareIndustriesIcon.vue +0 -0
  230. package/src/{icons → components/icons}/HelpIcon.vue +0 -0
  231. package/src/{icons → components/icons}/HideIcon.vue +0 -0
  232. package/src/{icons → components/icons}/HomePointIcon.vue +0 -0
  233. package/src/{icons → components/icons}/HospitalsIcon.vue +0 -0
  234. package/src/{icons → components/icons}/HouseIcon.vue +0 -0
  235. package/src/{icons → components/icons}/ImportIcon.vue +0 -0
  236. package/src/{icons → components/icons}/InfoIcon.vue +0 -0
  237. package/src/{icons → components/icons}/KebabIcon.vue +0 -0
  238. package/src/{icons → components/icons}/LabelIcon.vue +0 -0
  239. package/src/{icons → components/icons}/LayersIcon.vue +0 -0
  240. package/src/{icons → components/icons}/LegendIcon.vue +0 -0
  241. package/src/{icons → components/icons}/LineIcon.vue +0 -0
  242. package/src/{icons → components/icons}/LinkIcon.vue +0 -0
  243. package/src/{icons → components/icons}/LogoutIcon.vue +0 -0
  244. package/src/{icons → components/icons}/MapIcon.vue +0 -0
  245. package/src/{icons → components/icons}/MenuIcon.vue +0 -0
  246. package/src/{icons → components/icons}/MinusIcon.vue +0 -0
  247. package/src/{icons → components/icons}/ObjectAttributeIcon.vue +0 -0
  248. package/src/{icons → components/icons}/ObjectSelectIcon.vue +0 -0
  249. package/src/{icons → components/icons}/ObliqueViewIcon.vue +0 -0
  250. package/src/{icons → components/icons}/PdfIcon.vue +0 -0
  251. package/src/{icons → components/icons}/PedestrianIcon.vue +0 -0
  252. package/src/{icons → components/icons}/PenIcon.vue +0 -0
  253. package/src/{icons → components/icons}/PlayCircleIcon.vue +0 -0
  254. package/src/{icons → components/icons}/PlusIcon.vue +0 -0
  255. package/src/{icons → components/icons}/PoiIcon.vue +0 -0
  256. package/src/{icons → components/icons}/PointSelectIcon.vue +0 -0
  257. package/src/{icons → components/icons}/PolygonIcon.vue +0 -0
  258. package/src/{icons → components/icons}/PresentationModeIcon.vue +0 -0
  259. package/src/{icons → components/icons}/ProgressIcon.vue +0 -0
  260. package/src/{icons → components/icons}/QueryIcon.vue +0 -0
  261. package/src/{icons → components/icons}/RectangleIcon.vue +0 -0
  262. package/src/{icons → components/icons}/ReturnIcon.vue +0 -0
  263. package/src/{icons → components/icons}/RewindIcon.vue +0 -0
  264. package/src/{icons → components/icons}/RotateLeftIcon.vue +0 -0
  265. package/src/{icons → components/icons}/RotateRightIcon.vue +0 -0
  266. package/src/{icons → components/icons}/ScreenshotIcon.vue +0 -0
  267. package/src/{icons → components/icons}/SearchIcon.vue +0 -0
  268. package/src/{icons → components/icons}/ShadowIcon.vue +0 -0
  269. package/src/{icons → components/icons}/ShapesIcon.vue +0 -0
  270. package/src/{icons → components/icons}/ShareIcon.vue +0 -0
  271. package/src/{icons → components/icons}/SimpleCircleFilledIcon.vue +0 -0
  272. package/src/{icons → components/icons}/SimpleCircleHalfFilledIcon.vue +0 -0
  273. package/src/{icons → components/icons}/SimpleCircleOutlinedIcon.vue +0 -0
  274. package/src/{icons → components/icons}/SkipNextIcon.vue +0 -0
  275. package/src/{icons → components/icons}/SkipPreviousIcon.vue +0 -0
  276. package/src/{icons → components/icons}/SplitViewIcon.vue +0 -0
  277. package/src/{icons → components/icons}/TerrainBoxIcon.vue +0 -0
  278. package/src/{icons → components/icons}/TextStyleIcon.vue +0 -0
  279. package/src/{icons → components/icons}/ThreeDimensionsIcon.vue +0 -0
  280. package/src/{icons → components/icons}/ToolsIcon.vue +0 -0
  281. package/src/{icons → components/icons}/TouchIcon.vue +0 -0
  282. package/src/{icons → components/icons}/TrashCanIcon.vue +0 -0
  283. package/src/{icons → components/icons}/TriangleIcon.vue +0 -0
  284. package/src/{icons → components/icons}/TwoDimensionsIcon.vue +0 -0
  285. package/src/{icons → components/icons}/UploadIcon.vue +0 -0
  286. package/src/{icons → components/icons}/UserProfileIcon.vue +0 -0
  287. package/src/{icons → components/icons}/UserShareIcon.vue +0 -0
  288. package/src/{icons → components/icons}/VideoRecorderIcon.vue +0 -0
  289. package/src/{icons → components/icons}/ViewpointFlightIcon.vue +0 -0
  290. package/src/{icons → components/icons}/ViewpointIcon.vue +0 -0
  291. package/src/{icons → components/icons}/Viewshed360Icon.vue +0 -0
  292. package/src/{icons → components/icons}/ViewshedConeIcon.vue +0 -0
  293. package/src/{icons → components/icons}/ViewshedIcon.vue +0 -0
  294. package/src/{icons → components/icons}/WalkingIcon.vue +0 -0
  295. package/src/{icons → components/icons}/WallIcon.vue +0 -0
  296. package/src/{icons → components/icons}/WandIcon.vue +0 -0
  297. package/src/components/lists/VcsList.vue +21 -12
  298. package/src/components/lists/VcsTreeviewLeaf.vue +14 -2
  299. package/src/components/notification/VcsTooltip.vue +1 -1
  300. package/src/featureInfo/abstractFeatureInfoView.js +1 -1
  301. package/src/featureInfo/addressBalloonFeatureInfoView.js +1 -1
  302. package/src/featureInfo/balloonFeatureInfoView.js +1 -1
  303. package/src/featureInfo/balloonHelper.js +6 -6
  304. package/src/featureInfo/featureInfo.js +2 -2
  305. package/src/i18n/de.js +2 -6
  306. package/src/i18n/en.js +2 -6
  307. package/src/legend/legendHelper.js +4 -3
  308. package/src/legend/vcsLegend.vue +21 -2
  309. package/src/manager/window/WindowComponent.vue +42 -4
  310. package/src/manager/window/WindowComponentHeader.vue +1 -1
  311. package/src/manager/window/windowHelper.js +7 -11
  312. package/src/manager/window/windowManager.js +15 -11
  313. package/src/navigation/mapNavCompass.vue +13 -7
  314. package/src/navigation/mapNavigation.vue +66 -4
  315. package/src/navigation/orientationToolsButton.vue +1 -1
  316. package/src/navigation/overviewMap.js +26 -10
  317. package/src/navigation/vcsCompass.vue +4 -73
  318. package/src/setup.js +1 -1
  319. package/src/vuePlugins/vuetify.js +1 -1
  320. package/dist/assets/cesium/Workers/ArcType-c9b2b290.js +0 -25
  321. package/dist/assets/cesium/Workers/AttributeCompression-7b0f288d.js +0 -25
  322. package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-d0c22774.js +0 -25
  323. package/dist/assets/cesium/Workers/BoundingRectangle-201b1a81.js +0 -25
  324. package/dist/assets/cesium/Workers/BoxGeometry-4985457c.js +0 -25
  325. package/dist/assets/cesium/Workers/Color-cc8c18b3.js +0 -25
  326. package/dist/assets/cesium/Workers/ComponentDatatype-0200bf8c.js +0 -25
  327. package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-4345acdf.js +0 -25
  328. package/dist/assets/cesium/Workers/CorridorGeometryLibrary-850a6c35.js +0 -25
  329. package/dist/assets/cesium/Workers/CylinderGeometry-57a1051a.js +0 -25
  330. package/dist/assets/cesium/Workers/CylinderGeometryLibrary-62ce5a1f.js +0 -25
  331. package/dist/assets/cesium/Workers/EllipseGeometry-8627398f.js +0 -25
  332. package/dist/assets/cesium/Workers/EllipseGeometryLibrary-e5919563.js +0 -25
  333. package/dist/assets/cesium/Workers/EllipseOutlineGeometry-96fd4ae1.js +0 -25
  334. package/dist/assets/cesium/Workers/EllipsoidGeodesic-8bfefbff.js +0 -25
  335. package/dist/assets/cesium/Workers/EllipsoidGeometry-377329b9.js +0 -25
  336. package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-e6e16e49.js +0 -25
  337. package/dist/assets/cesium/Workers/EllipsoidRhumbLine-03528f73.js +0 -25
  338. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-c080fd1b.js +0 -25
  339. package/dist/assets/cesium/Workers/EncodedCartesian3-ea0e408f.js +0 -25
  340. package/dist/assets/cesium/Workers/FrustumGeometry-a8b5d817.js +0 -25
  341. package/dist/assets/cesium/Workers/GeometryAttribute-8458a8fd.js +0 -25
  342. package/dist/assets/cesium/Workers/GeometryAttributes-ac0f8485.js +0 -25
  343. package/dist/assets/cesium/Workers/GeometryInstance-ee3aa3ba.js +0 -25
  344. package/dist/assets/cesium/Workers/GeometryOffsetAttribute-08ae0c50.js +0 -25
  345. package/dist/assets/cesium/Workers/GeometryPipeline-33ca229c.js +0 -25
  346. package/dist/assets/cesium/Workers/IndexDatatype-e713bfd2.js +0 -25
  347. package/dist/assets/cesium/Workers/IntersectionTests-eb4db8e0.js +0 -25
  348. package/dist/assets/cesium/Workers/Matrix2-eefef8eb.js +0 -25
  349. package/dist/assets/cesium/Workers/OrientedBoundingBox-5193f9a2.js +0 -25
  350. package/dist/assets/cesium/Workers/Plane-b0299683.js +0 -25
  351. package/dist/assets/cesium/Workers/PolygonGeometryLibrary-b61295f3.js +0 -25
  352. package/dist/assets/cesium/Workers/PolygonPipeline-eb527514.js +0 -25
  353. package/dist/assets/cesium/Workers/PolylinePipeline-0f23dd84.js +0 -25
  354. package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-2d903430.js +0 -25
  355. package/dist/assets/cesium/Workers/PrimitivePipeline-e2640413.js +0 -25
  356. package/dist/assets/cesium/Workers/RectangleGeometryLibrary-ae8bf8a5.js +0 -25
  357. package/dist/assets/cesium/Workers/RuntimeError-5baf5c66.js +0 -25
  358. package/dist/assets/cesium/Workers/TerrainEncoding-bc10ab54.js +0 -25
  359. package/dist/assets/cesium/Workers/Transforms-d2e5867e.js +0 -63
  360. package/dist/assets/cesium/Workers/VertexFormat-5ec0d9ff.js +0 -25
  361. package/dist/assets/cesium/Workers/WallGeometryLibrary-1a33e416.js +0 -25
  362. package/dist/assets/cesium/Workers/WebGLConstants-5b50ced1.js +0 -25
  363. package/dist/assets/cesium/Workers/WebMercatorProjection-cd2f30c2.js +0 -25
  364. package/dist/assets/cesium/Workers/_commonjsHelpers-bc29abbc.js +0 -25
  365. package/dist/assets/cesium/Workers/arrayRemoveDuplicates-f13aceb1.js +0 -25
  366. package/dist/assets/cesium/Workers/combine-7533016d.js +0 -25
  367. package/dist/assets/cesium/Workers/defaultValue-0c475b81.js +0 -25
  368. package/dist/assets/cesium/Workers/package.json +0 -1
  369. package/dist/assets/ui.08c48f.css +0 -1
  370. package/plugins/@vcmap/pluginExample/config.json +0 -6
  371. package/plugins/@vcmap/pluginExample/package.json +0 -7
  372. package/plugins/categoryTest/ItemEditor.vue +0 -13
  373. package/plugins/test/allIconsComponent.vue +0 -50
  374. package/plugins/test/index.js +0 -209
  375. package/plugins/wizardExample/wizardExample.vue +0 -77
  376. package/src/components/form-inputs-controls/VcsColorPicker.vue +0 -85
@@ -0,0 +1,1345 @@
1
+ define(['exports', './Matrix2-13178034', './Matrix3-315394f6', './Check-666ab1a0', './ComponentDatatype-f7b11d02', './defaultValue-0a909f67', './EllipsoidRhumbLine-19756602', './GeometryAttribute-7d6f1732', './Math-2dbd6b93', './WebGLConstants-a8cc3e8c'], (function (exports, Matrix2, Matrix3, Check, ComponentDatatype, defaultValue, EllipsoidRhumbLine, GeometryAttribute, Math$1, WebGLConstants) { 'use strict';
2
+
3
+ var earcutExports = {};
4
+ var earcut$1 = {
5
+ get exports(){ return earcutExports; },
6
+ set exports(v){ earcutExports = v; },
7
+ };
8
+
9
+ earcut$1.exports = earcut;
10
+ earcutExports.default = earcut;
11
+
12
+ function earcut(data, holeIndices, dim) {
13
+
14
+ dim = dim || 2;
15
+
16
+ var hasHoles = holeIndices && holeIndices.length,
17
+ outerLen = hasHoles ? holeIndices[0] * dim : data.length,
18
+ outerNode = linkedList(data, 0, outerLen, dim, true),
19
+ triangles = [];
20
+
21
+ if (!outerNode || outerNode.next === outerNode.prev) return triangles;
22
+
23
+ var minX, minY, maxX, maxY, x, y, invSize;
24
+
25
+ if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
26
+
27
+ // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
28
+ if (data.length > 80 * dim) {
29
+ minX = maxX = data[0];
30
+ minY = maxY = data[1];
31
+
32
+ for (var i = dim; i < outerLen; i += dim) {
33
+ x = data[i];
34
+ y = data[i + 1];
35
+ if (x < minX) minX = x;
36
+ if (y < minY) minY = y;
37
+ if (x > maxX) maxX = x;
38
+ if (y > maxY) maxY = y;
39
+ }
40
+
41
+ // minX, minY and invSize are later used to transform coords into integers for z-order calculation
42
+ invSize = Math.max(maxX - minX, maxY - minY);
43
+ invSize = invSize !== 0 ? 32767 / invSize : 0;
44
+ }
45
+
46
+ earcutLinked(outerNode, triangles, dim, minX, minY, invSize, 0);
47
+
48
+ return triangles;
49
+ }
50
+
51
+ // create a circular doubly linked list from polygon points in the specified winding order
52
+ function linkedList(data, start, end, dim, clockwise) {
53
+ var i, last;
54
+
55
+ if (clockwise === (signedArea(data, start, end, dim) > 0)) {
56
+ for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);
57
+ } else {
58
+ for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);
59
+ }
60
+
61
+ if (last && equals(last, last.next)) {
62
+ removeNode(last);
63
+ last = last.next;
64
+ }
65
+
66
+ return last;
67
+ }
68
+
69
+ // eliminate colinear or duplicate points
70
+ function filterPoints(start, end) {
71
+ if (!start) return start;
72
+ if (!end) end = start;
73
+
74
+ var p = start,
75
+ again;
76
+ do {
77
+ again = false;
78
+
79
+ if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
80
+ removeNode(p);
81
+ p = end = p.prev;
82
+ if (p === p.next) break;
83
+ again = true;
84
+
85
+ } else {
86
+ p = p.next;
87
+ }
88
+ } while (again || p !== end);
89
+
90
+ return end;
91
+ }
92
+
93
+ // main ear slicing loop which triangulates a polygon (given as a linked list)
94
+ function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
95
+ if (!ear) return;
96
+
97
+ // interlink polygon nodes in z-order
98
+ if (!pass && invSize) indexCurve(ear, minX, minY, invSize);
99
+
100
+ var stop = ear,
101
+ prev, next;
102
+
103
+ // iterate through ears, slicing them one by one
104
+ while (ear.prev !== ear.next) {
105
+ prev = ear.prev;
106
+ next = ear.next;
107
+
108
+ if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
109
+ // cut off the triangle
110
+ triangles.push(prev.i / dim | 0);
111
+ triangles.push(ear.i / dim | 0);
112
+ triangles.push(next.i / dim | 0);
113
+
114
+ removeNode(ear);
115
+
116
+ // skipping the next vertex leads to less sliver triangles
117
+ ear = next.next;
118
+ stop = next.next;
119
+
120
+ continue;
121
+ }
122
+
123
+ ear = next;
124
+
125
+ // if we looped through the whole remaining polygon and can't find any more ears
126
+ if (ear === stop) {
127
+ // try filtering points and slicing again
128
+ if (!pass) {
129
+ earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
130
+
131
+ // if this didn't work, try curing all small self-intersections locally
132
+ } else if (pass === 1) {
133
+ ear = cureLocalIntersections(filterPoints(ear), triangles, dim);
134
+ earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
135
+
136
+ // as a last resort, try splitting the remaining polygon into two
137
+ } else if (pass === 2) {
138
+ splitEarcut(ear, triangles, dim, minX, minY, invSize);
139
+ }
140
+
141
+ break;
142
+ }
143
+ }
144
+ }
145
+
146
+ // check whether a polygon node forms a valid ear with adjacent nodes
147
+ function isEar(ear) {
148
+ var a = ear.prev,
149
+ b = ear,
150
+ c = ear.next;
151
+
152
+ if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
153
+
154
+ // now make sure we don't have other points inside the potential ear
155
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
156
+
157
+ // triangle bbox; min & max are calculated like this for speed
158
+ var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),
159
+ y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),
160
+ x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),
161
+ y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
162
+
163
+ var p = c.next;
164
+ while (p !== a) {
165
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 &&
166
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) &&
167
+ area(p.prev, p, p.next) >= 0) return false;
168
+ p = p.next;
169
+ }
170
+
171
+ return true;
172
+ }
173
+
174
+ function isEarHashed(ear, minX, minY, invSize) {
175
+ var a = ear.prev,
176
+ b = ear,
177
+ c = ear.next;
178
+
179
+ if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
180
+
181
+ var ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y;
182
+
183
+ // triangle bbox; min & max are calculated like this for speed
184
+ var x0 = ax < bx ? (ax < cx ? ax : cx) : (bx < cx ? bx : cx),
185
+ y0 = ay < by ? (ay < cy ? ay : cy) : (by < cy ? by : cy),
186
+ x1 = ax > bx ? (ax > cx ? ax : cx) : (bx > cx ? bx : cx),
187
+ y1 = ay > by ? (ay > cy ? ay : cy) : (by > cy ? by : cy);
188
+
189
+ // z-order range for the current triangle bbox;
190
+ var minZ = zOrder(x0, y0, minX, minY, invSize),
191
+ maxZ = zOrder(x1, y1, minX, minY, invSize);
192
+
193
+ var p = ear.prevZ,
194
+ n = ear.nextZ;
195
+
196
+ // look for points inside the triangle in both directions
197
+ while (p && p.z >= minZ && n && n.z <= maxZ) {
198
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
199
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
200
+ p = p.prevZ;
201
+
202
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
203
+ pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
204
+ n = n.nextZ;
205
+ }
206
+
207
+ // look for remaining points in decreasing z-order
208
+ while (p && p.z >= minZ) {
209
+ if (p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c &&
210
+ pointInTriangle(ax, ay, bx, by, cx, cy, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;
211
+ p = p.prevZ;
212
+ }
213
+
214
+ // look for remaining points in increasing z-order
215
+ while (n && n.z <= maxZ) {
216
+ if (n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c &&
217
+ pointInTriangle(ax, ay, bx, by, cx, cy, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;
218
+ n = n.nextZ;
219
+ }
220
+
221
+ return true;
222
+ }
223
+
224
+ // go through all polygon nodes and cure small local self-intersections
225
+ function cureLocalIntersections(start, triangles, dim) {
226
+ var p = start;
227
+ do {
228
+ var a = p.prev,
229
+ b = p.next.next;
230
+
231
+ if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
232
+
233
+ triangles.push(a.i / dim | 0);
234
+ triangles.push(p.i / dim | 0);
235
+ triangles.push(b.i / dim | 0);
236
+
237
+ // remove two nodes involved
238
+ removeNode(p);
239
+ removeNode(p.next);
240
+
241
+ p = start = b;
242
+ }
243
+ p = p.next;
244
+ } while (p !== start);
245
+
246
+ return filterPoints(p);
247
+ }
248
+
249
+ // try splitting polygon into two and triangulate them independently
250
+ function splitEarcut(start, triangles, dim, minX, minY, invSize) {
251
+ // look for a valid diagonal that divides the polygon into two
252
+ var a = start;
253
+ do {
254
+ var b = a.next.next;
255
+ while (b !== a.prev) {
256
+ if (a.i !== b.i && isValidDiagonal(a, b)) {
257
+ // split the polygon in two by the diagonal
258
+ var c = splitPolygon(a, b);
259
+
260
+ // filter colinear points around the cuts
261
+ a = filterPoints(a, a.next);
262
+ c = filterPoints(c, c.next);
263
+
264
+ // run earcut on each half
265
+ earcutLinked(a, triangles, dim, minX, minY, invSize, 0);
266
+ earcutLinked(c, triangles, dim, minX, minY, invSize, 0);
267
+ return;
268
+ }
269
+ b = b.next;
270
+ }
271
+ a = a.next;
272
+ } while (a !== start);
273
+ }
274
+
275
+ // link every hole into the outer loop, producing a single-ring polygon without holes
276
+ function eliminateHoles(data, holeIndices, outerNode, dim) {
277
+ var queue = [],
278
+ i, len, start, end, list;
279
+
280
+ for (i = 0, len = holeIndices.length; i < len; i++) {
281
+ start = holeIndices[i] * dim;
282
+ end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
283
+ list = linkedList(data, start, end, dim, false);
284
+ if (list === list.next) list.steiner = true;
285
+ queue.push(getLeftmost(list));
286
+ }
287
+
288
+ queue.sort(compareX);
289
+
290
+ // process holes from left to right
291
+ for (i = 0; i < queue.length; i++) {
292
+ outerNode = eliminateHole(queue[i], outerNode);
293
+ }
294
+
295
+ return outerNode;
296
+ }
297
+
298
+ function compareX(a, b) {
299
+ return a.x - b.x;
300
+ }
301
+
302
+ // find a bridge between vertices that connects hole with an outer ring and and link it
303
+ function eliminateHole(hole, outerNode) {
304
+ var bridge = findHoleBridge(hole, outerNode);
305
+ if (!bridge) {
306
+ return outerNode;
307
+ }
308
+
309
+ var bridgeReverse = splitPolygon(bridge, hole);
310
+
311
+ // filter collinear points around the cuts
312
+ filterPoints(bridgeReverse, bridgeReverse.next);
313
+ return filterPoints(bridge, bridge.next);
314
+ }
315
+
316
+ // David Eberly's algorithm for finding a bridge between hole and outer polygon
317
+ function findHoleBridge(hole, outerNode) {
318
+ var p = outerNode,
319
+ hx = hole.x,
320
+ hy = hole.y,
321
+ qx = -Infinity,
322
+ m;
323
+
324
+ // find a segment intersected by a ray from the hole's leftmost point to the left;
325
+ // segment's endpoint with lesser x will be potential connection point
326
+ do {
327
+ if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
328
+ var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
329
+ if (x <= hx && x > qx) {
330
+ qx = x;
331
+ m = p.x < p.next.x ? p : p.next;
332
+ if (x === hx) return m; // hole touches outer segment; pick leftmost endpoint
333
+ }
334
+ }
335
+ p = p.next;
336
+ } while (p !== outerNode);
337
+
338
+ if (!m) return null;
339
+
340
+ // look for points inside the triangle of hole point, segment intersection and endpoint;
341
+ // if there are no points found, we have a valid connection;
342
+ // otherwise choose the point of the minimum angle with the ray as connection point
343
+
344
+ var stop = m,
345
+ mx = m.x,
346
+ my = m.y,
347
+ tanMin = Infinity,
348
+ tan;
349
+
350
+ p = m;
351
+
352
+ do {
353
+ if (hx >= p.x && p.x >= mx && hx !== p.x &&
354
+ pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
355
+
356
+ tan = Math.abs(hy - p.y) / (hx - p.x); // tangential
357
+
358
+ if (locallyInside(p, hole) &&
359
+ (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {
360
+ m = p;
361
+ tanMin = tan;
362
+ }
363
+ }
364
+
365
+ p = p.next;
366
+ } while (p !== stop);
367
+
368
+ return m;
369
+ }
370
+
371
+ // whether sector in vertex m contains sector in vertex p in the same coordinates
372
+ function sectorContainsSector(m, p) {
373
+ return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;
374
+ }
375
+
376
+ // interlink polygon nodes in z-order
377
+ function indexCurve(start, minX, minY, invSize) {
378
+ var p = start;
379
+ do {
380
+ if (p.z === 0) p.z = zOrder(p.x, p.y, minX, minY, invSize);
381
+ p.prevZ = p.prev;
382
+ p.nextZ = p.next;
383
+ p = p.next;
384
+ } while (p !== start);
385
+
386
+ p.prevZ.nextZ = null;
387
+ p.prevZ = null;
388
+
389
+ sortLinked(p);
390
+ }
391
+
392
+ // Simon Tatham's linked list merge sort algorithm
393
+ // http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
394
+ function sortLinked(list) {
395
+ var i, p, q, e, tail, numMerges, pSize, qSize,
396
+ inSize = 1;
397
+
398
+ do {
399
+ p = list;
400
+ list = null;
401
+ tail = null;
402
+ numMerges = 0;
403
+
404
+ while (p) {
405
+ numMerges++;
406
+ q = p;
407
+ pSize = 0;
408
+ for (i = 0; i < inSize; i++) {
409
+ pSize++;
410
+ q = q.nextZ;
411
+ if (!q) break;
412
+ }
413
+ qSize = inSize;
414
+
415
+ while (pSize > 0 || (qSize > 0 && q)) {
416
+
417
+ if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
418
+ e = p;
419
+ p = p.nextZ;
420
+ pSize--;
421
+ } else {
422
+ e = q;
423
+ q = q.nextZ;
424
+ qSize--;
425
+ }
426
+
427
+ if (tail) tail.nextZ = e;
428
+ else list = e;
429
+
430
+ e.prevZ = tail;
431
+ tail = e;
432
+ }
433
+
434
+ p = q;
435
+ }
436
+
437
+ tail.nextZ = null;
438
+ inSize *= 2;
439
+
440
+ } while (numMerges > 1);
441
+
442
+ return list;
443
+ }
444
+
445
+ // z-order of a point given coords and inverse of the longer side of data bbox
446
+ function zOrder(x, y, minX, minY, invSize) {
447
+ // coords are transformed into non-negative 15-bit integer range
448
+ x = (x - minX) * invSize | 0;
449
+ y = (y - minY) * invSize | 0;
450
+
451
+ x = (x | (x << 8)) & 0x00FF00FF;
452
+ x = (x | (x << 4)) & 0x0F0F0F0F;
453
+ x = (x | (x << 2)) & 0x33333333;
454
+ x = (x | (x << 1)) & 0x55555555;
455
+
456
+ y = (y | (y << 8)) & 0x00FF00FF;
457
+ y = (y | (y << 4)) & 0x0F0F0F0F;
458
+ y = (y | (y << 2)) & 0x33333333;
459
+ y = (y | (y << 1)) & 0x55555555;
460
+
461
+ return x | (y << 1);
462
+ }
463
+
464
+ // find the leftmost node of a polygon ring
465
+ function getLeftmost(start) {
466
+ var p = start,
467
+ leftmost = start;
468
+ do {
469
+ if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;
470
+ p = p.next;
471
+ } while (p !== start);
472
+
473
+ return leftmost;
474
+ }
475
+
476
+ // check if a point lies within a convex triangle
477
+ function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
478
+ return (cx - px) * (ay - py) >= (ax - px) * (cy - py) &&
479
+ (ax - px) * (by - py) >= (bx - px) * (ay - py) &&
480
+ (bx - px) * (cy - py) >= (cx - px) * (by - py);
481
+ }
482
+
483
+ // check if a diagonal between two polygon nodes is valid (lies in polygon interior)
484
+ function isValidDiagonal(a, b) {
485
+ return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges
486
+ (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible
487
+ (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors
488
+ equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case
489
+ }
490
+
491
+ // signed area of a triangle
492
+ function area(p, q, r) {
493
+ return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
494
+ }
495
+
496
+ // check if two points are equal
497
+ function equals(p1, p2) {
498
+ return p1.x === p2.x && p1.y === p2.y;
499
+ }
500
+
501
+ // check if two segments intersect
502
+ function intersects(p1, q1, p2, q2) {
503
+ var o1 = sign(area(p1, q1, p2));
504
+ var o2 = sign(area(p1, q1, q2));
505
+ var o3 = sign(area(p2, q2, p1));
506
+ var o4 = sign(area(p2, q2, q1));
507
+
508
+ if (o1 !== o2 && o3 !== o4) return true; // general case
509
+
510
+ if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1
511
+ if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1
512
+ if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2
513
+ if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2
514
+
515
+ return false;
516
+ }
517
+
518
+ // for collinear points p, q, r, check if point q lies on segment pr
519
+ function onSegment(p, q, r) {
520
+ return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
521
+ }
522
+
523
+ function sign(num) {
524
+ return num > 0 ? 1 : num < 0 ? -1 : 0;
525
+ }
526
+
527
+ // check if a polygon diagonal intersects any polygon segments
528
+ function intersectsPolygon(a, b) {
529
+ var p = a;
530
+ do {
531
+ if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&
532
+ intersects(p, p.next, a, b)) return true;
533
+ p = p.next;
534
+ } while (p !== a);
535
+
536
+ return false;
537
+ }
538
+
539
+ // check if a polygon diagonal is locally inside the polygon
540
+ function locallyInside(a, b) {
541
+ return area(a.prev, a, a.next) < 0 ?
542
+ area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :
543
+ area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
544
+ }
545
+
546
+ // check if the middle point of a polygon diagonal is inside the polygon
547
+ function middleInside(a, b) {
548
+ var p = a,
549
+ inside = false,
550
+ px = (a.x + b.x) / 2,
551
+ py = (a.y + b.y) / 2;
552
+ do {
553
+ if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&
554
+ (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))
555
+ inside = !inside;
556
+ p = p.next;
557
+ } while (p !== a);
558
+
559
+ return inside;
560
+ }
561
+
562
+ // link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;
563
+ // if one belongs to the outer ring and another to a hole, it merges it into a single ring
564
+ function splitPolygon(a, b) {
565
+ var a2 = new Node(a.i, a.x, a.y),
566
+ b2 = new Node(b.i, b.x, b.y),
567
+ an = a.next,
568
+ bp = b.prev;
569
+
570
+ a.next = b;
571
+ b.prev = a;
572
+
573
+ a2.next = an;
574
+ an.prev = a2;
575
+
576
+ b2.next = a2;
577
+ a2.prev = b2;
578
+
579
+ bp.next = b2;
580
+ b2.prev = bp;
581
+
582
+ return b2;
583
+ }
584
+
585
+ // create a node and optionally link it with previous one (in a circular doubly linked list)
586
+ function insertNode(i, x, y, last) {
587
+ var p = new Node(i, x, y);
588
+
589
+ if (!last) {
590
+ p.prev = p;
591
+ p.next = p;
592
+
593
+ } else {
594
+ p.next = last.next;
595
+ p.prev = last;
596
+ last.next.prev = p;
597
+ last.next = p;
598
+ }
599
+ return p;
600
+ }
601
+
602
+ function removeNode(p) {
603
+ p.next.prev = p.prev;
604
+ p.prev.next = p.next;
605
+
606
+ if (p.prevZ) p.prevZ.nextZ = p.nextZ;
607
+ if (p.nextZ) p.nextZ.prevZ = p.prevZ;
608
+ }
609
+
610
+ function Node(i, x, y) {
611
+ // vertex index in coordinates array
612
+ this.i = i;
613
+
614
+ // vertex coordinates
615
+ this.x = x;
616
+ this.y = y;
617
+
618
+ // previous and next vertex nodes in a polygon ring
619
+ this.prev = null;
620
+ this.next = null;
621
+
622
+ // z-order curve value
623
+ this.z = 0;
624
+
625
+ // previous and next nodes in z-order
626
+ this.prevZ = null;
627
+ this.nextZ = null;
628
+
629
+ // indicates whether this is a steiner point
630
+ this.steiner = false;
631
+ }
632
+
633
+ // return a percentage difference between the polygon area and its triangulation area;
634
+ // used to verify correctness of triangulation
635
+ earcut.deviation = function (data, holeIndices, dim, triangles) {
636
+ var hasHoles = holeIndices && holeIndices.length;
637
+ var outerLen = hasHoles ? holeIndices[0] * dim : data.length;
638
+
639
+ var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));
640
+ if (hasHoles) {
641
+ for (var i = 0, len = holeIndices.length; i < len; i++) {
642
+ var start = holeIndices[i] * dim;
643
+ var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
644
+ polygonArea -= Math.abs(signedArea(data, start, end, dim));
645
+ }
646
+ }
647
+
648
+ var trianglesArea = 0;
649
+ for (i = 0; i < triangles.length; i += 3) {
650
+ var a = triangles[i] * dim;
651
+ var b = triangles[i + 1] * dim;
652
+ var c = triangles[i + 2] * dim;
653
+ trianglesArea += Math.abs(
654
+ (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -
655
+ (data[a] - data[b]) * (data[c + 1] - data[a + 1]));
656
+ }
657
+
658
+ return polygonArea === 0 && trianglesArea === 0 ? 0 :
659
+ Math.abs((trianglesArea - polygonArea) / polygonArea);
660
+ };
661
+
662
+ function signedArea(data, start, end, dim) {
663
+ var sum = 0;
664
+ for (var i = start, j = end - dim; i < end; i += dim) {
665
+ sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
666
+ j = i;
667
+ }
668
+ return sum;
669
+ }
670
+
671
+ // turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts
672
+ earcut.flatten = function (data) {
673
+ var dim = data[0][0].length,
674
+ result = {vertices: [], holes: [], dimensions: dim},
675
+ holeIndex = 0;
676
+
677
+ for (var i = 0; i < data.length; i++) {
678
+ for (var j = 0; j < data[i].length; j++) {
679
+ for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
680
+ }
681
+ if (i > 0) {
682
+ holeIndex += data[i - 1].length;
683
+ result.holes.push(holeIndex);
684
+ }
685
+ }
686
+ return result;
687
+ };
688
+
689
+ /**
690
+ * Winding order defines the order of vertices for a triangle to be considered front-facing.
691
+ *
692
+ * @enum {Number}
693
+ */
694
+ const WindingOrder = {
695
+ /**
696
+ * Vertices are in clockwise order.
697
+ *
698
+ * @type {Number}
699
+ * @constant
700
+ */
701
+ CLOCKWISE: WebGLConstants.WebGLConstants.CW,
702
+
703
+ /**
704
+ * Vertices are in counter-clockwise order.
705
+ *
706
+ * @type {Number}
707
+ * @constant
708
+ */
709
+ COUNTER_CLOCKWISE: WebGLConstants.WebGLConstants.CCW,
710
+ };
711
+
712
+ /**
713
+ * @private
714
+ */
715
+ WindingOrder.validate = function (windingOrder) {
716
+ return (
717
+ windingOrder === WindingOrder.CLOCKWISE ||
718
+ windingOrder === WindingOrder.COUNTER_CLOCKWISE
719
+ );
720
+ };
721
+
722
+ var WindingOrder$1 = Object.freeze(WindingOrder);
723
+
724
+ const scaleToGeodeticHeightN = new Matrix3.Cartesian3();
725
+ const scaleToGeodeticHeightP = new Matrix3.Cartesian3();
726
+
727
+ /**
728
+ * @private
729
+ */
730
+ const PolygonPipeline = {};
731
+
732
+ /**
733
+ * @exception {DeveloperError} At least three positions are required.
734
+ */
735
+ PolygonPipeline.computeArea2D = function (positions) {
736
+ //>>includeStart('debug', pragmas.debug);
737
+ Check.Check.defined("positions", positions);
738
+ Check.Check.typeOf.number.greaterThanOrEquals(
739
+ "positions.length",
740
+ positions.length,
741
+ 3
742
+ );
743
+ //>>includeEnd('debug');
744
+
745
+ const length = positions.length;
746
+ let area = 0.0;
747
+
748
+ for (let i0 = length - 1, i1 = 0; i1 < length; i0 = i1++) {
749
+ const v0 = positions[i0];
750
+ const v1 = positions[i1];
751
+
752
+ area += v0.x * v1.y - v1.x * v0.y;
753
+ }
754
+
755
+ return area * 0.5;
756
+ };
757
+
758
+ /**
759
+ * @returns {WindingOrder} The winding order.
760
+ *
761
+ * @exception {DeveloperError} At least three positions are required.
762
+ */
763
+ PolygonPipeline.computeWindingOrder2D = function (positions) {
764
+ const area = PolygonPipeline.computeArea2D(positions);
765
+ return area > 0.0 ? WindingOrder$1.COUNTER_CLOCKWISE : WindingOrder$1.CLOCKWISE;
766
+ };
767
+
768
+ /**
769
+ * Triangulate a polygon.
770
+ *
771
+ * @param {Cartesian2[]} positions Cartesian2 array containing the vertices of the polygon
772
+ * @param {Number[]} [holes] An array of the staring indices of the holes.
773
+ * @returns {Number[]} Index array representing triangles that fill the polygon
774
+ */
775
+ PolygonPipeline.triangulate = function (positions, holes) {
776
+ //>>includeStart('debug', pragmas.debug);
777
+ Check.Check.defined("positions", positions);
778
+ //>>includeEnd('debug');
779
+
780
+ const flattenedPositions = Matrix2.Cartesian2.packArray(positions);
781
+ return earcutExports(flattenedPositions, holes, 2);
782
+ };
783
+
784
+ const subdivisionV0Scratch = new Matrix3.Cartesian3();
785
+ const subdivisionV1Scratch = new Matrix3.Cartesian3();
786
+ const subdivisionV2Scratch = new Matrix3.Cartesian3();
787
+ const subdivisionS0Scratch = new Matrix3.Cartesian3();
788
+ const subdivisionS1Scratch = new Matrix3.Cartesian3();
789
+ const subdivisionS2Scratch = new Matrix3.Cartesian3();
790
+ const subdivisionMidScratch = new Matrix3.Cartesian3();
791
+ const subdivisionT0Scratch = new Matrix2.Cartesian2();
792
+ const subdivisionT1Scratch = new Matrix2.Cartesian2();
793
+ const subdivisionT2Scratch = new Matrix2.Cartesian2();
794
+ const subdivisionTexcoordMidScratch = new Matrix2.Cartesian2();
795
+
796
+ /**
797
+ * Subdivides positions and raises points to the surface of the ellipsoid.
798
+ *
799
+ * @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
800
+ * @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
801
+ * @param {Number[]} indices An array of indices that determines the triangles in the polygon.
802
+ * @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
803
+ * @param {Number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
804
+ *
805
+ * @exception {DeveloperError} At least three indices are required.
806
+ * @exception {DeveloperError} The number of indices must be divisable by three.
807
+ * @exception {DeveloperError} Granularity must be greater than zero.
808
+ */
809
+ PolygonPipeline.computeSubdivision = function (
810
+ ellipsoid,
811
+ positions,
812
+ indices,
813
+ texcoords,
814
+ granularity
815
+ ) {
816
+ granularity = defaultValue.defaultValue(granularity, Math$1.CesiumMath.RADIANS_PER_DEGREE);
817
+
818
+ const hasTexcoords = defaultValue.defined(texcoords);
819
+
820
+ //>>includeStart('debug', pragmas.debug);
821
+ Check.Check.typeOf.object("ellipsoid", ellipsoid);
822
+ Check.Check.defined("positions", positions);
823
+ Check.Check.defined("indices", indices);
824
+ Check.Check.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
825
+ Check.Check.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
826
+ Check.Check.typeOf.number.greaterThan("granularity", granularity, 0.0);
827
+ //>>includeEnd('debug');
828
+
829
+ // triangles that need (or might need) to be subdivided.
830
+ const triangles = indices.slice(0);
831
+
832
+ // New positions due to edge splits are appended to the positions list.
833
+ let i;
834
+ const length = positions.length;
835
+ const subdividedPositions = new Array(length * 3);
836
+ const subdividedTexcoords = new Array(length * 2);
837
+ let q = 0;
838
+ let p = 0;
839
+ for (i = 0; i < length; i++) {
840
+ const item = positions[i];
841
+ subdividedPositions[q++] = item.x;
842
+ subdividedPositions[q++] = item.y;
843
+ subdividedPositions[q++] = item.z;
844
+
845
+ if (hasTexcoords) {
846
+ const texcoordItem = texcoords[i];
847
+ subdividedTexcoords[p++] = texcoordItem.x;
848
+ subdividedTexcoords[p++] = texcoordItem.y;
849
+ }
850
+ }
851
+
852
+ const subdividedIndices = [];
853
+
854
+ // Used to make sure shared edges are not split more than once.
855
+ const edges = {};
856
+
857
+ const radius = ellipsoid.maximumRadius;
858
+ const minDistance = Math$1.CesiumMath.chordLength(granularity, radius);
859
+ const minDistanceSqrd = minDistance * minDistance;
860
+
861
+ while (triangles.length > 0) {
862
+ const i2 = triangles.pop();
863
+ const i1 = triangles.pop();
864
+ const i0 = triangles.pop();
865
+
866
+ const v0 = Matrix3.Cartesian3.fromArray(
867
+ subdividedPositions,
868
+ i0 * 3,
869
+ subdivisionV0Scratch
870
+ );
871
+ const v1 = Matrix3.Cartesian3.fromArray(
872
+ subdividedPositions,
873
+ i1 * 3,
874
+ subdivisionV1Scratch
875
+ );
876
+ const v2 = Matrix3.Cartesian3.fromArray(
877
+ subdividedPositions,
878
+ i2 * 3,
879
+ subdivisionV2Scratch
880
+ );
881
+
882
+ let t0, t1, t2;
883
+ if (hasTexcoords) {
884
+ t0 = Matrix2.Cartesian2.fromArray(
885
+ subdividedTexcoords,
886
+ i0 * 2,
887
+ subdivisionT0Scratch
888
+ );
889
+ t1 = Matrix2.Cartesian2.fromArray(
890
+ subdividedTexcoords,
891
+ i1 * 2,
892
+ subdivisionT1Scratch
893
+ );
894
+ t2 = Matrix2.Cartesian2.fromArray(
895
+ subdividedTexcoords,
896
+ i2 * 2,
897
+ subdivisionT2Scratch
898
+ );
899
+ }
900
+
901
+ const s0 = Matrix3.Cartesian3.multiplyByScalar(
902
+ Matrix3.Cartesian3.normalize(v0, subdivisionS0Scratch),
903
+ radius,
904
+ subdivisionS0Scratch
905
+ );
906
+ const s1 = Matrix3.Cartesian3.multiplyByScalar(
907
+ Matrix3.Cartesian3.normalize(v1, subdivisionS1Scratch),
908
+ radius,
909
+ subdivisionS1Scratch
910
+ );
911
+ const s2 = Matrix3.Cartesian3.multiplyByScalar(
912
+ Matrix3.Cartesian3.normalize(v2, subdivisionS2Scratch),
913
+ radius,
914
+ subdivisionS2Scratch
915
+ );
916
+
917
+ const g0 = Matrix3.Cartesian3.magnitudeSquared(
918
+ Matrix3.Cartesian3.subtract(s0, s1, subdivisionMidScratch)
919
+ );
920
+ const g1 = Matrix3.Cartesian3.magnitudeSquared(
921
+ Matrix3.Cartesian3.subtract(s1, s2, subdivisionMidScratch)
922
+ );
923
+ const g2 = Matrix3.Cartesian3.magnitudeSquared(
924
+ Matrix3.Cartesian3.subtract(s2, s0, subdivisionMidScratch)
925
+ );
926
+
927
+ const max = Math.max(g0, g1, g2);
928
+ let edge;
929
+ let mid;
930
+ let midTexcoord;
931
+
932
+ // if the max length squared of a triangle edge is greater than the chord length of squared
933
+ // of the granularity, subdivide the triangle
934
+ if (max > minDistanceSqrd) {
935
+ if (g0 === max) {
936
+ edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
937
+
938
+ i = edges[edge];
939
+ if (!defaultValue.defined(i)) {
940
+ mid = Matrix3.Cartesian3.add(v0, v1, subdivisionMidScratch);
941
+ Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
942
+ subdividedPositions.push(mid.x, mid.y, mid.z);
943
+ i = subdividedPositions.length / 3 - 1;
944
+ edges[edge] = i;
945
+
946
+ if (hasTexcoords) {
947
+ midTexcoord = Matrix2.Cartesian2.add(t0, t1, subdivisionTexcoordMidScratch);
948
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
949
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
950
+ }
951
+ }
952
+
953
+ triangles.push(i0, i, i2);
954
+ triangles.push(i, i1, i2);
955
+ } else if (g1 === max) {
956
+ edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
957
+
958
+ i = edges[edge];
959
+ if (!defaultValue.defined(i)) {
960
+ mid = Matrix3.Cartesian3.add(v1, v2, subdivisionMidScratch);
961
+ Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
962
+ subdividedPositions.push(mid.x, mid.y, mid.z);
963
+ i = subdividedPositions.length / 3 - 1;
964
+ edges[edge] = i;
965
+
966
+ if (hasTexcoords) {
967
+ midTexcoord = Matrix2.Cartesian2.add(t1, t2, subdivisionTexcoordMidScratch);
968
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
969
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
970
+ }
971
+ }
972
+
973
+ triangles.push(i1, i, i0);
974
+ triangles.push(i, i2, i0);
975
+ } else if (g2 === max) {
976
+ edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
977
+
978
+ i = edges[edge];
979
+ if (!defaultValue.defined(i)) {
980
+ mid = Matrix3.Cartesian3.add(v2, v0, subdivisionMidScratch);
981
+ Matrix3.Cartesian3.multiplyByScalar(mid, 0.5, mid);
982
+ subdividedPositions.push(mid.x, mid.y, mid.z);
983
+ i = subdividedPositions.length / 3 - 1;
984
+ edges[edge] = i;
985
+
986
+ if (hasTexcoords) {
987
+ midTexcoord = Matrix2.Cartesian2.add(t2, t0, subdivisionTexcoordMidScratch);
988
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
989
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
990
+ }
991
+ }
992
+
993
+ triangles.push(i2, i, i1);
994
+ triangles.push(i, i0, i1);
995
+ }
996
+ } else {
997
+ subdividedIndices.push(i0);
998
+ subdividedIndices.push(i1);
999
+ subdividedIndices.push(i2);
1000
+ }
1001
+ }
1002
+
1003
+ const geometryOptions = {
1004
+ attributes: {
1005
+ position: new GeometryAttribute.GeometryAttribute({
1006
+ componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
1007
+ componentsPerAttribute: 3,
1008
+ values: subdividedPositions,
1009
+ }),
1010
+ },
1011
+ indices: subdividedIndices,
1012
+ primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
1013
+ };
1014
+
1015
+ if (hasTexcoords) {
1016
+ geometryOptions.attributes.st = new GeometryAttribute.GeometryAttribute({
1017
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
1018
+ componentsPerAttribute: 2,
1019
+ values: subdividedTexcoords,
1020
+ });
1021
+ }
1022
+
1023
+ return new GeometryAttribute.Geometry(geometryOptions);
1024
+ };
1025
+
1026
+ const subdivisionC0Scratch = new Matrix3.Cartographic();
1027
+ const subdivisionC1Scratch = new Matrix3.Cartographic();
1028
+ const subdivisionC2Scratch = new Matrix3.Cartographic();
1029
+ const subdivisionCartographicScratch = new Matrix3.Cartographic();
1030
+
1031
+ /**
1032
+ * Subdivides positions on rhumb lines and raises points to the surface of the ellipsoid.
1033
+ *
1034
+ * @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
1035
+ * @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
1036
+ * @param {Number[]} indices An array of indices that determines the triangles in the polygon.
1037
+ * @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
1038
+ * @param {Number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
1039
+ *
1040
+ * @exception {DeveloperError} At least three indices are required.
1041
+ * @exception {DeveloperError} The number of indices must be divisable by three.
1042
+ * @exception {DeveloperError} Granularity must be greater than zero.
1043
+ */
1044
+ PolygonPipeline.computeRhumbLineSubdivision = function (
1045
+ ellipsoid,
1046
+ positions,
1047
+ indices,
1048
+ texcoords,
1049
+ granularity
1050
+ ) {
1051
+ granularity = defaultValue.defaultValue(granularity, Math$1.CesiumMath.RADIANS_PER_DEGREE);
1052
+
1053
+ const hasTexcoords = defaultValue.defined(texcoords);
1054
+
1055
+ //>>includeStart('debug', pragmas.debug);
1056
+ Check.Check.typeOf.object("ellipsoid", ellipsoid);
1057
+ Check.Check.defined("positions", positions);
1058
+ Check.Check.defined("indices", indices);
1059
+ Check.Check.typeOf.number.greaterThanOrEquals("indices.length", indices.length, 3);
1060
+ Check.Check.typeOf.number.equals("indices.length % 3", "0", indices.length % 3, 0);
1061
+ Check.Check.typeOf.number.greaterThan("granularity", granularity, 0.0);
1062
+ //>>includeEnd('debug');
1063
+
1064
+ // triangles that need (or might need) to be subdivided.
1065
+ const triangles = indices.slice(0);
1066
+
1067
+ // New positions due to edge splits are appended to the positions list.
1068
+ let i;
1069
+ const length = positions.length;
1070
+ const subdividedPositions = new Array(length * 3);
1071
+ const subdividedTexcoords = new Array(length * 2);
1072
+ let q = 0;
1073
+ let p = 0;
1074
+ for (i = 0; i < length; i++) {
1075
+ const item = positions[i];
1076
+ subdividedPositions[q++] = item.x;
1077
+ subdividedPositions[q++] = item.y;
1078
+ subdividedPositions[q++] = item.z;
1079
+
1080
+ if (hasTexcoords) {
1081
+ const texcoordItem = texcoords[i];
1082
+ subdividedTexcoords[p++] = texcoordItem.x;
1083
+ subdividedTexcoords[p++] = texcoordItem.y;
1084
+ }
1085
+ }
1086
+
1087
+ const subdividedIndices = [];
1088
+
1089
+ // Used to make sure shared edges are not split more than once.
1090
+ const edges = {};
1091
+
1092
+ const radius = ellipsoid.maximumRadius;
1093
+ const minDistance = Math$1.CesiumMath.chordLength(granularity, radius);
1094
+
1095
+ const rhumb0 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
1096
+ const rhumb1 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
1097
+ const rhumb2 = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
1098
+
1099
+ while (triangles.length > 0) {
1100
+ const i2 = triangles.pop();
1101
+ const i1 = triangles.pop();
1102
+ const i0 = triangles.pop();
1103
+
1104
+ const v0 = Matrix3.Cartesian3.fromArray(
1105
+ subdividedPositions,
1106
+ i0 * 3,
1107
+ subdivisionV0Scratch
1108
+ );
1109
+ const v1 = Matrix3.Cartesian3.fromArray(
1110
+ subdividedPositions,
1111
+ i1 * 3,
1112
+ subdivisionV1Scratch
1113
+ );
1114
+ const v2 = Matrix3.Cartesian3.fromArray(
1115
+ subdividedPositions,
1116
+ i2 * 3,
1117
+ subdivisionV2Scratch
1118
+ );
1119
+
1120
+ let t0, t1, t2;
1121
+ if (hasTexcoords) {
1122
+ t0 = Matrix2.Cartesian2.fromArray(
1123
+ subdividedTexcoords,
1124
+ i0 * 2,
1125
+ subdivisionT0Scratch
1126
+ );
1127
+ t1 = Matrix2.Cartesian2.fromArray(
1128
+ subdividedTexcoords,
1129
+ i1 * 2,
1130
+ subdivisionT1Scratch
1131
+ );
1132
+ t2 = Matrix2.Cartesian2.fromArray(
1133
+ subdividedTexcoords,
1134
+ i2 * 2,
1135
+ subdivisionT2Scratch
1136
+ );
1137
+ }
1138
+
1139
+ const c0 = ellipsoid.cartesianToCartographic(v0, subdivisionC0Scratch);
1140
+ const c1 = ellipsoid.cartesianToCartographic(v1, subdivisionC1Scratch);
1141
+ const c2 = ellipsoid.cartesianToCartographic(v2, subdivisionC2Scratch);
1142
+
1143
+ rhumb0.setEndPoints(c0, c1);
1144
+ const g0 = rhumb0.surfaceDistance;
1145
+ rhumb1.setEndPoints(c1, c2);
1146
+ const g1 = rhumb1.surfaceDistance;
1147
+ rhumb2.setEndPoints(c2, c0);
1148
+ const g2 = rhumb2.surfaceDistance;
1149
+
1150
+ const max = Math.max(g0, g1, g2);
1151
+ let edge;
1152
+ let mid;
1153
+ let midHeight;
1154
+ let midCartesian3;
1155
+ let midTexcoord;
1156
+
1157
+ // if the max length squared of a triangle edge is greater than granularity, subdivide the triangle
1158
+ if (max > minDistance) {
1159
+ if (g0 === max) {
1160
+ edge = `${Math.min(i0, i1)} ${Math.max(i0, i1)}`;
1161
+
1162
+ i = edges[edge];
1163
+ if (!defaultValue.defined(i)) {
1164
+ mid = rhumb0.interpolateUsingFraction(
1165
+ 0.5,
1166
+ subdivisionCartographicScratch
1167
+ );
1168
+ midHeight = (c0.height + c1.height) * 0.5;
1169
+ midCartesian3 = Matrix3.Cartesian3.fromRadians(
1170
+ mid.longitude,
1171
+ mid.latitude,
1172
+ midHeight,
1173
+ ellipsoid,
1174
+ subdivisionMidScratch
1175
+ );
1176
+ subdividedPositions.push(
1177
+ midCartesian3.x,
1178
+ midCartesian3.y,
1179
+ midCartesian3.z
1180
+ );
1181
+ i = subdividedPositions.length / 3 - 1;
1182
+ edges[edge] = i;
1183
+
1184
+ if (hasTexcoords) {
1185
+ midTexcoord = Matrix2.Cartesian2.add(t0, t1, subdivisionTexcoordMidScratch);
1186
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
1187
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
1188
+ }
1189
+ }
1190
+
1191
+ triangles.push(i0, i, i2);
1192
+ triangles.push(i, i1, i2);
1193
+ } else if (g1 === max) {
1194
+ edge = `${Math.min(i1, i2)} ${Math.max(i1, i2)}`;
1195
+
1196
+ i = edges[edge];
1197
+ if (!defaultValue.defined(i)) {
1198
+ mid = rhumb1.interpolateUsingFraction(
1199
+ 0.5,
1200
+ subdivisionCartographicScratch
1201
+ );
1202
+ midHeight = (c1.height + c2.height) * 0.5;
1203
+ midCartesian3 = Matrix3.Cartesian3.fromRadians(
1204
+ mid.longitude,
1205
+ mid.latitude,
1206
+ midHeight,
1207
+ ellipsoid,
1208
+ subdivisionMidScratch
1209
+ );
1210
+ subdividedPositions.push(
1211
+ midCartesian3.x,
1212
+ midCartesian3.y,
1213
+ midCartesian3.z
1214
+ );
1215
+ i = subdividedPositions.length / 3 - 1;
1216
+ edges[edge] = i;
1217
+
1218
+ if (hasTexcoords) {
1219
+ midTexcoord = Matrix2.Cartesian2.add(t1, t2, subdivisionTexcoordMidScratch);
1220
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
1221
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
1222
+ }
1223
+ }
1224
+
1225
+ triangles.push(i1, i, i0);
1226
+ triangles.push(i, i2, i0);
1227
+ } else if (g2 === max) {
1228
+ edge = `${Math.min(i2, i0)} ${Math.max(i2, i0)}`;
1229
+
1230
+ i = edges[edge];
1231
+ if (!defaultValue.defined(i)) {
1232
+ mid = rhumb2.interpolateUsingFraction(
1233
+ 0.5,
1234
+ subdivisionCartographicScratch
1235
+ );
1236
+ midHeight = (c2.height + c0.height) * 0.5;
1237
+ midCartesian3 = Matrix3.Cartesian3.fromRadians(
1238
+ mid.longitude,
1239
+ mid.latitude,
1240
+ midHeight,
1241
+ ellipsoid,
1242
+ subdivisionMidScratch
1243
+ );
1244
+ subdividedPositions.push(
1245
+ midCartesian3.x,
1246
+ midCartesian3.y,
1247
+ midCartesian3.z
1248
+ );
1249
+ i = subdividedPositions.length / 3 - 1;
1250
+ edges[edge] = i;
1251
+
1252
+ if (hasTexcoords) {
1253
+ midTexcoord = Matrix2.Cartesian2.add(t2, t0, subdivisionTexcoordMidScratch);
1254
+ Matrix2.Cartesian2.multiplyByScalar(midTexcoord, 0.5, midTexcoord);
1255
+ subdividedTexcoords.push(midTexcoord.x, midTexcoord.y);
1256
+ }
1257
+ }
1258
+
1259
+ triangles.push(i2, i, i1);
1260
+ triangles.push(i, i0, i1);
1261
+ }
1262
+ } else {
1263
+ subdividedIndices.push(i0);
1264
+ subdividedIndices.push(i1);
1265
+ subdividedIndices.push(i2);
1266
+ }
1267
+ }
1268
+
1269
+ const geometryOptions = {
1270
+ attributes: {
1271
+ position: new GeometryAttribute.GeometryAttribute({
1272
+ componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
1273
+ componentsPerAttribute: 3,
1274
+ values: subdividedPositions,
1275
+ }),
1276
+ },
1277
+ indices: subdividedIndices,
1278
+ primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
1279
+ };
1280
+
1281
+ if (hasTexcoords) {
1282
+ geometryOptions.attributes.st = new GeometryAttribute.GeometryAttribute({
1283
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
1284
+ componentsPerAttribute: 2,
1285
+ values: subdividedTexcoords,
1286
+ });
1287
+ }
1288
+
1289
+ return new GeometryAttribute.Geometry(geometryOptions);
1290
+ };
1291
+
1292
+ /**
1293
+ * Scales each position of a geometry's position attribute to a height, in place.
1294
+ *
1295
+ * @param {Number[]} positions The array of numbers representing the positions to be scaled
1296
+ * @param {Number} [height=0.0] The desired height to add to the positions
1297
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
1298
+ * @param {Boolean} [scaleToSurface=true] <code>true</code> if the positions need to be scaled to the surface before the height is added.
1299
+ * @returns {Number[]} The input array of positions, scaled to height
1300
+ */
1301
+ PolygonPipeline.scaleToGeodeticHeight = function (
1302
+ positions,
1303
+ height,
1304
+ ellipsoid,
1305
+ scaleToSurface
1306
+ ) {
1307
+ ellipsoid = defaultValue.defaultValue(ellipsoid, Matrix3.Ellipsoid.WGS84);
1308
+
1309
+ let n = scaleToGeodeticHeightN;
1310
+ let p = scaleToGeodeticHeightP;
1311
+
1312
+ height = defaultValue.defaultValue(height, 0.0);
1313
+ scaleToSurface = defaultValue.defaultValue(scaleToSurface, true);
1314
+
1315
+ if (defaultValue.defined(positions)) {
1316
+ const length = positions.length;
1317
+
1318
+ for (let i = 0; i < length; i += 3) {
1319
+ Matrix3.Cartesian3.fromArray(positions, i, p);
1320
+
1321
+ if (scaleToSurface) {
1322
+ p = ellipsoid.scaleToGeodeticSurface(p, p);
1323
+ }
1324
+
1325
+ if (height !== 0) {
1326
+ n = ellipsoid.geodeticSurfaceNormal(p, n);
1327
+
1328
+ Matrix3.Cartesian3.multiplyByScalar(n, height, n);
1329
+ Matrix3.Cartesian3.add(p, n, p);
1330
+ }
1331
+
1332
+ positions[i] = p.x;
1333
+ positions[i + 1] = p.y;
1334
+ positions[i + 2] = p.z;
1335
+ }
1336
+ }
1337
+
1338
+ return positions;
1339
+ };
1340
+ var PolygonPipeline$1 = PolygonPipeline;
1341
+
1342
+ exports.PolygonPipeline = PolygonPipeline$1;
1343
+ exports.WindingOrder = WindingOrder$1;
1344
+
1345
+ }));