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

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 (379) 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.adbd45.js} +112161 -108735
  109. package/dist/assets/cesium.js +1 -1
  110. package/dist/assets/{core.cb0408.js → core.60e74d.js} +1616 -1629
  111. package/dist/assets/core.f198cf.js +15993 -0
  112. package/dist/assets/core.js +1 -1
  113. package/dist/assets/{index.bccdf969.js → index.884a53ef.js} +1 -1
  114. package/dist/assets/{ol.5e3fd0.js → ol.c6ff35.js} +6992 -6972
  115. package/dist/assets/ol.dbd604.js +44299 -0
  116. package/dist/assets/ol.js +1 -1
  117. package/dist/assets/ui.bf504d.css +1 -0
  118. package/dist/assets/{ui.08c48f.js → ui.bf504d.js} +6121 -6785
  119. package/dist/assets/ui.js +1 -1
  120. package/dist/assets/{vue.228ead.js → vue.75b819.js} +0 -0
  121. package/dist/assets/vue.a831f1.js +4675 -0
  122. package/dist/assets/vue.js +2 -2
  123. package/dist/assets/{vuetify.0b5039.css → vuetify.0d7360.css} +0 -0
  124. package/dist/assets/{vuetify.0b5039.js → vuetify.0d7360.js} +1 -1
  125. package/dist/assets/vuetify.js +2 -2
  126. package/dist/index.html +1 -1
  127. package/index.js +2 -1
  128. package/lib/cesium.js +1 -1
  129. package/package.json +3 -4
  130. package/plugins/{simple-graph → @vcmap/simple-graph}/README.md +1 -1
  131. package/plugins/{simple-graph → @vcmap/simple-graph}/SimpleGraphComponent.vue +0 -0
  132. package/plugins/{simple-graph → @vcmap/simple-graph}/index.js +0 -0
  133. package/plugins/{simple-graph → @vcmap/simple-graph}/package.json +0 -0
  134. package/plugins/{simple-graph → @vcmap/simple-graph}/simpleGraphView.js +0 -0
  135. package/plugins/@vcmap-show-case/README.md +20 -0
  136. package/plugins/{buttonExamples/ButtonExamples.vue → @vcmap-show-case/buttons-example/ButtonsExample.vue} +1 -1
  137. package/plugins/@vcmap-show-case/buttons-example/README.md +4 -0
  138. package/plugins/{buttonExamples → @vcmap-show-case/buttons-example}/index.js +16 -8
  139. package/plugins/@vcmap-show-case/buttons-example/package.json +5 -0
  140. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/Categories.vue +7 -6
  141. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/Category.vue +4 -3
  142. package/plugins/@vcmap-show-case/category-tester/README.md +3 -0
  143. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/index.js +12 -4
  144. package/plugins/@vcmap-show-case/category-tester/package.json +5 -0
  145. package/plugins/@vcmap-show-case/config-editor/README.md +3 -0
  146. package/plugins/{test → @vcmap-show-case/config-editor}/editor.vue +0 -0
  147. package/plugins/@vcmap-show-case/config-editor/index.js +47 -0
  148. package/plugins/@vcmap-show-case/config-editor/package.json +5 -0
  149. package/plugins/@vcmap-show-case/context-menu-tester/README.md +3 -0
  150. package/plugins/@vcmap-show-case/context-menu-tester/index.js +33 -0
  151. package/plugins/@vcmap-show-case/context-menu-tester/package.json +5 -0
  152. package/plugins/{@vcmap/pluginExample/pluginExampleComponent.vue → @vcmap-show-case/form-inputs-example/FormInputsExample.vue} +14 -13
  153. package/plugins/@vcmap-show-case/form-inputs-example/README.md +4 -0
  154. package/plugins/@vcmap-show-case/form-inputs-example/config.json +5 -0
  155. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/exampleActions.js +1 -1
  156. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/index.js +23 -22
  157. package/plugins/@vcmap-show-case/form-inputs-example/package.json +5 -0
  158. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/validation.js +0 -0
  159. package/plugins/@vcmap-show-case/icons-example/README.md +5 -0
  160. package/plugins/@vcmap-show-case/icons-example/allIconsComponent.vue +51 -0
  161. package/plugins/@vcmap-show-case/icons-example/index.js +44 -0
  162. package/plugins/@vcmap-show-case/icons-example/package.json +5 -0
  163. package/plugins/{test/testList.vue → @vcmap-show-case/list-example/ListExample.vue} +1 -1
  164. package/plugins/@vcmap-show-case/list-example/README.md +3 -0
  165. package/plugins/@vcmap-show-case/list-example/index.js +44 -0
  166. package/plugins/@vcmap-show-case/list-example/package.json +5 -0
  167. package/plugins/@vcmap-show-case/notifier-tester/README.md +3 -0
  168. package/plugins/{notifier → @vcmap-show-case/notifier-tester}/index.js +11 -6
  169. package/plugins/{notifier → @vcmap-show-case/notifier-tester}/notifierTester.vue +0 -0
  170. package/plugins/@vcmap-show-case/notifier-tester/package.json +5 -0
  171. package/plugins/@vcmap-show-case/textfields-example/README.md +3 -0
  172. package/plugins/{example/mySuperComponent.vue → @vcmap-show-case/textfields-example/TextfieldsExample.vue} +1 -7
  173. package/plugins/{example → @vcmap-show-case/textfields-example}/index.js +58 -62
  174. package/plugins/@vcmap-show-case/textfields-example/package.json +5 -0
  175. package/plugins/@vcmap-show-case/window-tester/README.md +3 -0
  176. package/plugins/{test/windowManagerExample.vue → @vcmap-show-case/window-tester/WindowExample.vue} +36 -20
  177. package/plugins/{test → @vcmap-show-case/window-tester}/emptyComponent.vue +8 -3
  178. package/plugins/@vcmap-show-case/window-tester/index.js +62 -0
  179. package/plugins/{test → @vcmap-show-case/window-tester}/myCustomHeader.vue +0 -0
  180. package/plugins/@vcmap-show-case/window-tester/package.json +5 -0
  181. package/plugins/{test → @vcmap-show-case/window-tester}/toolbox-data.js +9 -9
  182. package/plugins/{test/vcsContent.vue → @vcmap-show-case/window-tester/windowExampleContent.vue} +1 -5
  183. package/plugins/@vcmap-show-case/wizard-example/README.md +3 -0
  184. package/plugins/{wizardExample → @vcmap-show-case/wizard-example}/index.js +12 -6
  185. package/plugins/@vcmap-show-case/wizard-example/package.json +5 -0
  186. package/plugins/@vcmap-show-case/wizard-example/wizardExample.vue +95 -0
  187. package/plugins/package.json +2 -1
  188. package/src/actions/actionHelper.js +1 -3
  189. package/src/actions/stateRefAction.js +0 -10
  190. package/src/application/VcsApp.vue +42 -23
  191. package/src/application/VcsMap.vue +9 -0
  192. package/src/components/buttons/VcsActionButtonList.vue +1 -0
  193. package/src/components/form-inputs-controls/VcsCheckbox.vue +3 -1
  194. package/src/components/form-inputs-controls/VcsWizard.vue +17 -20
  195. package/src/components/form-inputs-controls/VcsWizardStep.vue +160 -0
  196. package/src/{icons → components/icons}/+all.js +0 -0
  197. package/src/{icons → components/icons}/2DAreaIcon.vue +0 -0
  198. package/src/{icons → components/icons}/2DDistanceIcon.vue +0 -0
  199. package/src/{icons → components/icons}/3DAreaIcon.vue +0 -0
  200. package/src/{icons → components/icons}/3DDistanceIcon.vue +0 -0
  201. package/src/{icons → components/icons}/3DHeightIcon.vue +0 -0
  202. package/src/{icons → components/icons}/AngleIcon.vue +0 -0
  203. package/src/{icons → components/icons}/AssociationsIcon.vue +0 -0
  204. package/src/{icons → components/icons}/AxisIcon.vue +0 -0
  205. package/src/{icons → components/icons}/BoundingBoxIcon.vue +0 -0
  206. package/src/{icons → components/icons}/CheckboxCheckedIcon.vue +0 -0
  207. package/src/{icons → components/icons}/CheckboxIcon.vue +0 -0
  208. package/src/{icons → components/icons}/CheckboxIndeterminateIcon.vue +0 -0
  209. package/src/{icons → components/icons}/CircleIcon.vue +0 -0
  210. package/src/{icons → components/icons}/ClippingHorizontalIcon.vue +0 -0
  211. package/src/{icons → components/icons}/ClippingIcon.vue +0 -0
  212. package/src/{icons → components/icons}/ClippingVerticalIcon.vue +0 -0
  213. package/src/{icons → components/icons}/ColorPickerIcon.vue +0 -0
  214. package/src/{icons → components/icons}/ColorSwatchIcon.vue +0 -0
  215. package/src/{icons → components/icons}/CommentIcon.vue +0 -0
  216. package/src/{icons → components/icons}/CompassIcon.vue +0 -0
  217. package/src/{icons → components/icons}/ComponentsIcon.vue +0 -0
  218. package/src/{icons → components/icons}/ConeIcon.vue +0 -0
  219. package/src/{icons → components/icons}/DimensionsHouseIcon.vue +0 -0
  220. package/src/{icons → components/icons}/EditIcon.vue +0 -0
  221. package/src/{icons → components/icons}/ElevationProfileIcon.vue +0 -0
  222. package/src/{icons → components/icons}/ExportAreaIcon.vue +0 -0
  223. package/src/{icons → components/icons}/ExportFlightIcon.vue +0 -0
  224. package/src/{icons → components/icons}/ExportIcon.vue +0 -0
  225. package/src/{icons → components/icons}/ExternalLinkIcon.vue +0 -0
  226. package/src/{icons → components/icons}/EyeIcon.vue +0 -0
  227. package/src/{icons → components/icons}/FastForwardIcon.vue +0 -0
  228. package/src/{icons → components/icons}/FilterIcon.vue +0 -0
  229. package/src/{icons → components/icons}/GlobalTerrainIcon.vue +0 -0
  230. package/src/{icons → components/icons}/GlobeNatureIcon.vue +0 -0
  231. package/src/{icons → components/icons}/GroundIcon.vue +0 -0
  232. package/src/{icons → components/icons}/HealthCareIndustriesIcon.vue +0 -0
  233. package/src/{icons → components/icons}/HelpIcon.vue +0 -0
  234. package/src/{icons → components/icons}/HideIcon.vue +0 -0
  235. package/src/{icons → components/icons}/HomePointIcon.vue +0 -0
  236. package/src/{icons → components/icons}/HospitalsIcon.vue +0 -0
  237. package/src/{icons → components/icons}/HouseIcon.vue +0 -0
  238. package/src/{icons → components/icons}/ImportIcon.vue +0 -0
  239. package/src/{icons → components/icons}/InfoIcon.vue +0 -0
  240. package/src/{icons → components/icons}/KebabIcon.vue +0 -0
  241. package/src/{icons → components/icons}/LabelIcon.vue +0 -0
  242. package/src/{icons → components/icons}/LayersIcon.vue +0 -0
  243. package/src/{icons → components/icons}/LegendIcon.vue +0 -0
  244. package/src/{icons → components/icons}/LineIcon.vue +0 -0
  245. package/src/{icons → components/icons}/LinkIcon.vue +0 -0
  246. package/src/{icons → components/icons}/LogoutIcon.vue +0 -0
  247. package/src/{icons → components/icons}/MapIcon.vue +0 -0
  248. package/src/{icons → components/icons}/MenuIcon.vue +0 -0
  249. package/src/{icons → components/icons}/MinusIcon.vue +0 -0
  250. package/src/{icons → components/icons}/ObjectAttributeIcon.vue +0 -0
  251. package/src/{icons → components/icons}/ObjectSelectIcon.vue +0 -0
  252. package/src/{icons → components/icons}/ObliqueViewIcon.vue +0 -0
  253. package/src/{icons → components/icons}/PdfIcon.vue +0 -0
  254. package/src/{icons → components/icons}/PedestrianIcon.vue +0 -0
  255. package/src/{icons → components/icons}/PenIcon.vue +0 -0
  256. package/src/{icons → components/icons}/PlayCircleIcon.vue +0 -0
  257. package/src/{icons → components/icons}/PlusIcon.vue +0 -0
  258. package/src/{icons → components/icons}/PoiIcon.vue +0 -0
  259. package/src/{icons → components/icons}/PointSelectIcon.vue +0 -0
  260. package/src/{icons → components/icons}/PolygonIcon.vue +0 -0
  261. package/src/{icons → components/icons}/PresentationModeIcon.vue +0 -0
  262. package/src/{icons → components/icons}/ProgressIcon.vue +0 -0
  263. package/src/{icons → components/icons}/QueryIcon.vue +0 -0
  264. package/src/{icons → components/icons}/RectangleIcon.vue +0 -0
  265. package/src/{icons → components/icons}/ReturnIcon.vue +0 -0
  266. package/src/{icons → components/icons}/RewindIcon.vue +0 -0
  267. package/src/{icons → components/icons}/RotateLeftIcon.vue +0 -0
  268. package/src/{icons → components/icons}/RotateRightIcon.vue +0 -0
  269. package/src/{icons → components/icons}/ScreenshotIcon.vue +0 -0
  270. package/src/{icons → components/icons}/SearchIcon.vue +0 -0
  271. package/src/{icons → components/icons}/ShadowIcon.vue +0 -0
  272. package/src/{icons → components/icons}/ShapesIcon.vue +0 -0
  273. package/src/{icons → components/icons}/ShareIcon.vue +0 -0
  274. package/src/{icons → components/icons}/SimpleCircleFilledIcon.vue +0 -0
  275. package/src/{icons → components/icons}/SimpleCircleHalfFilledIcon.vue +0 -0
  276. package/src/{icons → components/icons}/SimpleCircleOutlinedIcon.vue +0 -0
  277. package/src/{icons → components/icons}/SkipNextIcon.vue +0 -0
  278. package/src/{icons → components/icons}/SkipPreviousIcon.vue +0 -0
  279. package/src/{icons → components/icons}/SplitViewIcon.vue +0 -0
  280. package/src/{icons → components/icons}/TerrainBoxIcon.vue +0 -0
  281. package/src/{icons → components/icons}/TextStyleIcon.vue +0 -0
  282. package/src/{icons → components/icons}/ThreeDimensionsIcon.vue +0 -0
  283. package/src/{icons → components/icons}/ToolsIcon.vue +0 -0
  284. package/src/{icons → components/icons}/TouchIcon.vue +0 -0
  285. package/src/{icons → components/icons}/TrashCanIcon.vue +0 -0
  286. package/src/{icons → components/icons}/TriangleIcon.vue +0 -0
  287. package/src/{icons → components/icons}/TwoDimensionsIcon.vue +0 -0
  288. package/src/{icons → components/icons}/UploadIcon.vue +0 -0
  289. package/src/{icons → components/icons}/UserProfileIcon.vue +0 -0
  290. package/src/{icons → components/icons}/UserShareIcon.vue +0 -0
  291. package/src/{icons → components/icons}/VideoRecorderIcon.vue +0 -0
  292. package/src/{icons → components/icons}/ViewpointFlightIcon.vue +0 -0
  293. package/src/{icons → components/icons}/ViewpointIcon.vue +0 -0
  294. package/src/{icons → components/icons}/Viewshed360Icon.vue +0 -0
  295. package/src/{icons → components/icons}/ViewshedConeIcon.vue +0 -0
  296. package/src/{icons → components/icons}/ViewshedIcon.vue +0 -0
  297. package/src/{icons → components/icons}/WalkingIcon.vue +0 -0
  298. package/src/{icons → components/icons}/WallIcon.vue +0 -0
  299. package/src/{icons → components/icons}/WandIcon.vue +0 -0
  300. package/src/components/lists/VcsList.vue +21 -12
  301. package/src/components/lists/VcsTreeviewLeaf.vue +14 -2
  302. package/src/components/notification/VcsTooltip.vue +1 -1
  303. package/src/featureInfo/abstractFeatureInfoView.js +1 -1
  304. package/src/featureInfo/addressBalloonFeatureInfoView.js +1 -1
  305. package/src/featureInfo/balloonFeatureInfoView.js +1 -1
  306. package/src/featureInfo/balloonHelper.js +6 -6
  307. package/src/featureInfo/featureInfo.js +2 -2
  308. package/src/i18n/de.js +2 -6
  309. package/src/i18n/en.js +2 -6
  310. package/src/legend/legendHelper.js +4 -3
  311. package/src/legend/vcsLegend.vue +21 -2
  312. package/src/manager/window/WindowComponent.vue +42 -4
  313. package/src/manager/window/WindowComponentHeader.vue +1 -1
  314. package/src/manager/window/windowHelper.js +7 -11
  315. package/src/manager/window/windowManager.js +15 -11
  316. package/src/navigation/mapNavCompass.vue +13 -7
  317. package/src/navigation/mapNavigation.vue +66 -4
  318. package/src/navigation/orientationToolsButton.vue +1 -1
  319. package/src/navigation/overviewMap.js +26 -10
  320. package/src/navigation/vcsCompass.vue +4 -73
  321. package/src/setup.js +1 -1
  322. package/src/vuePlugins/vuetify.js +1 -1
  323. package/dist/assets/cesium/Workers/ArcType-c9b2b290.js +0 -25
  324. package/dist/assets/cesium/Workers/AttributeCompression-7b0f288d.js +0 -25
  325. package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-d0c22774.js +0 -25
  326. package/dist/assets/cesium/Workers/BoundingRectangle-201b1a81.js +0 -25
  327. package/dist/assets/cesium/Workers/BoxGeometry-4985457c.js +0 -25
  328. package/dist/assets/cesium/Workers/Color-cc8c18b3.js +0 -25
  329. package/dist/assets/cesium/Workers/ComponentDatatype-0200bf8c.js +0 -25
  330. package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-4345acdf.js +0 -25
  331. package/dist/assets/cesium/Workers/CorridorGeometryLibrary-850a6c35.js +0 -25
  332. package/dist/assets/cesium/Workers/CylinderGeometry-57a1051a.js +0 -25
  333. package/dist/assets/cesium/Workers/CylinderGeometryLibrary-62ce5a1f.js +0 -25
  334. package/dist/assets/cesium/Workers/EllipseGeometry-8627398f.js +0 -25
  335. package/dist/assets/cesium/Workers/EllipseGeometryLibrary-e5919563.js +0 -25
  336. package/dist/assets/cesium/Workers/EllipseOutlineGeometry-96fd4ae1.js +0 -25
  337. package/dist/assets/cesium/Workers/EllipsoidGeodesic-8bfefbff.js +0 -25
  338. package/dist/assets/cesium/Workers/EllipsoidGeometry-377329b9.js +0 -25
  339. package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-e6e16e49.js +0 -25
  340. package/dist/assets/cesium/Workers/EllipsoidRhumbLine-03528f73.js +0 -25
  341. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-c080fd1b.js +0 -25
  342. package/dist/assets/cesium/Workers/EncodedCartesian3-ea0e408f.js +0 -25
  343. package/dist/assets/cesium/Workers/FrustumGeometry-a8b5d817.js +0 -25
  344. package/dist/assets/cesium/Workers/GeometryAttribute-8458a8fd.js +0 -25
  345. package/dist/assets/cesium/Workers/GeometryAttributes-ac0f8485.js +0 -25
  346. package/dist/assets/cesium/Workers/GeometryInstance-ee3aa3ba.js +0 -25
  347. package/dist/assets/cesium/Workers/GeometryOffsetAttribute-08ae0c50.js +0 -25
  348. package/dist/assets/cesium/Workers/GeometryPipeline-33ca229c.js +0 -25
  349. package/dist/assets/cesium/Workers/IndexDatatype-e713bfd2.js +0 -25
  350. package/dist/assets/cesium/Workers/IntersectionTests-eb4db8e0.js +0 -25
  351. package/dist/assets/cesium/Workers/Matrix2-eefef8eb.js +0 -25
  352. package/dist/assets/cesium/Workers/OrientedBoundingBox-5193f9a2.js +0 -25
  353. package/dist/assets/cesium/Workers/Plane-b0299683.js +0 -25
  354. package/dist/assets/cesium/Workers/PolygonGeometryLibrary-b61295f3.js +0 -25
  355. package/dist/assets/cesium/Workers/PolygonPipeline-eb527514.js +0 -25
  356. package/dist/assets/cesium/Workers/PolylinePipeline-0f23dd84.js +0 -25
  357. package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-2d903430.js +0 -25
  358. package/dist/assets/cesium/Workers/PrimitivePipeline-e2640413.js +0 -25
  359. package/dist/assets/cesium/Workers/RectangleGeometryLibrary-ae8bf8a5.js +0 -25
  360. package/dist/assets/cesium/Workers/RuntimeError-5baf5c66.js +0 -25
  361. package/dist/assets/cesium/Workers/TerrainEncoding-bc10ab54.js +0 -25
  362. package/dist/assets/cesium/Workers/Transforms-d2e5867e.js +0 -63
  363. package/dist/assets/cesium/Workers/VertexFormat-5ec0d9ff.js +0 -25
  364. package/dist/assets/cesium/Workers/WallGeometryLibrary-1a33e416.js +0 -25
  365. package/dist/assets/cesium/Workers/WebGLConstants-5b50ced1.js +0 -25
  366. package/dist/assets/cesium/Workers/WebMercatorProjection-cd2f30c2.js +0 -25
  367. package/dist/assets/cesium/Workers/_commonjsHelpers-bc29abbc.js +0 -25
  368. package/dist/assets/cesium/Workers/arrayRemoveDuplicates-f13aceb1.js +0 -25
  369. package/dist/assets/cesium/Workers/combine-7533016d.js +0 -25
  370. package/dist/assets/cesium/Workers/defaultValue-0c475b81.js +0 -25
  371. package/dist/assets/cesium/Workers/package.json +0 -1
  372. package/dist/assets/ui.08c48f.css +0 -1
  373. package/plugins/@vcmap/pluginExample/config.json +0 -6
  374. package/plugins/@vcmap/pluginExample/package.json +0 -7
  375. package/plugins/categoryTest/ItemEditor.vue +0 -13
  376. package/plugins/test/allIconsComponent.vue +0 -50
  377. package/plugins/test/index.js +0 -209
  378. package/plugins/wizardExample/wizardExample.vue +0 -77
  379. package/src/components/form-inputs-controls/VcsColorPicker.vue +0 -85
@@ -1,25 +1,994 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.97.1
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
- define(["./AxisAlignedBoundingBox-d0c22774","./Matrix2-eefef8eb","./defaultValue-0c475b81","./TerrainEncoding-bc10ab54","./IndexDatatype-e713bfd2","./ComponentDatatype-0200bf8c","./Transforms-d2e5867e","./WebMercatorProjection-cd2f30c2","./createTaskProcessorWorker","./RuntimeError-5baf5c66","./AttributeCompression-7b0f288d","./WebGLConstants-5b50ced1","./_commonjsHelpers-bc29abbc","./combine-7533016d"],(function(e,t,r,n,o,i,a,s,c,d,h,u,l,I){"use strict";function g(){a.DeveloperError.throwInstantiationError()}Object.defineProperties(g.prototype,{errorEvent:{get:a.DeveloperError.throwInstantiationError},credit:{get:a.DeveloperError.throwInstantiationError},tilingScheme:{get:a.DeveloperError.throwInstantiationError},ready:{get:a.DeveloperError.throwInstantiationError},readyPromise:{get:a.DeveloperError.throwInstantiationError},hasWaterMask:{get:a.DeveloperError.throwInstantiationError},hasVertexNormals:{get:a.DeveloperError.throwInstantiationError},availability:{get:a.DeveloperError.throwInstantiationError}});const m=[];g.getRegularGridIndices=function(e,t){let n=m[e];r.defined(n)||(m[e]=n=[]);let o=n[t];return r.defined(o)||(o=e*t<i.CesiumMath.SIXTY_FOUR_KILOBYTES?n[t]=new Uint16Array((e-1)*(t-1)*6):n[t]=new Uint32Array((e-1)*(t-1)*6),p(e,t,o,0)),o};const T=[];g.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=T[e];r.defined(n)||(T[e]=n=[]);let o=n[t];if(!r.defined(o)){const r=g.getRegularGridIndices(e,t),i=E(e,t),a=i.westIndicesSouthToNorth,s=i.southIndicesEastToWest,c=i.eastIndicesNorthToSouth,d=i.northIndicesWestToEast;o=n[t]={indices:r,westIndicesSouthToNorth:a,southIndicesEastToWest:s,eastIndicesNorthToSouth:c,northIndicesWestToEast:d}}return o};const f=[];function E(e,t){const r=new Array(t),n=new Array(e),o=new Array(t),i=new Array(e);let a;for(a=0;a<e;++a)i[a]=a,n[a]=e*t-1-a;for(a=0;a<t;++a)o[a]=(a+1)*e-1,r[a]=(t-a-1)*e;return{westIndicesSouthToNorth:r,southIndicesEastToWest:n,eastIndicesNorthToSouth:o,northIndicesWestToEast:i}}function p(e,t,r,n){let o=0;for(let i=0;i<t-1;++i){for(let t=0;t<e-1;++t){const t=o,i=t+e,a=i+1,s=t+1;r[n++]=t,r[n++]=i,r[n++]=s,r[n++]=s,r[n++]=i,r[n++]=a,++o}++o}}function y(e,t,r,n){let o=e[0];const i=e.length;for(let a=1;a<i;++a){const i=e[a];r[n++]=o,r[n++]=i,r[n++]=t,r[n++]=t,r[n++]=i,r[n++]=t+1,o=i,++t}return n}g.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=f[e];r.defined(n)||(f[e]=n=[]);let i=n[t];if(!r.defined(i)){const r=e*t,a=(e-1)*(t-1)*6,s=2*e+2*t,c=r+s,d=a+6*Math.max(0,s-4),h=E(e,t),u=h.westIndicesSouthToNorth,l=h.southIndicesEastToWest,I=h.eastIndicesNorthToSouth,m=h.northIndicesWestToEast,T=o.IndexDatatype.createTypedArray(c,d);p(e,t,T,0),g.addSkirtIndices(u,l,I,m,r,T,a),i=n[t]={indices:T,westIndicesSouthToNorth:u,southIndicesEastToWest:l,eastIndicesNorthToSouth:I,northIndicesWestToEast:m,indexCountWithoutSkirts:a}}return i},g.addSkirtIndices=function(e,t,r,n,o,i,a){let s=o;a=y(e,s,i,a),s+=e.length,a=y(t,s,i,a),s+=t.length,a=y(r,s,i,a),s+=r.length,y(n,s,i,a)},g.heightmapTerrainQuality=.25,g.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,r){return 2*e.maximumRadius*Math.PI*g.heightmapTerrainQuality/(t*r)},g.prototype.requestTileGeometry=a.DeveloperError.throwInstantiationError,g.prototype.getLevelMaximumGeometricError=a.DeveloperError.throwInstantiationError,g.prototype.getTileDataAvailable=a.DeveloperError.throwInstantiationError,g.prototype.loadTileDataAvailability=a.DeveloperError.throwInstantiationError;const N=32767,w=new t.Cartesian3,b=new t.Cartesian3,S=new t.Cartesian3,M=new t.Cartographic,x=new t.Cartesian2;function A(e,r,n,o,a,s,c,d,h){let u=Number.POSITIVE_INFINITY;const l=a.north,I=a.south;let g=a.east;const m=a.west;g<m&&(g+=i.CesiumMath.TWO_PI);const T=e.length;for(let a=0;a<T;++a){const T=e[a],f=n[T],E=o[T];M.longitude=i.CesiumMath.lerp(m,g,E.x),M.latitude=i.CesiumMath.lerp(I,l,E.y),M.height=f-r;const p=s.cartographicToCartesian(M,w);t.Matrix4.multiplyByPoint(c,p,p),t.Cartesian3.minimumByComponent(p,d,d),t.Cartesian3.maximumByComponent(p,h,h),u=Math.min(u,M.height)}return u}function C(e,t,n,o,a,c,d,h,u,l,I,g,m,T){const f=r.defined(d),E=u.north,p=u.south;let y=u.east;const N=u.west;y<N&&(y+=i.CesiumMath.TWO_PI);const b=n.length;for(let r=0;r<b;++r){const u=n[r],b=a[u],S=c[u];M.longitude=i.CesiumMath.lerp(N,y,S.x)+m,M.latitude=i.CesiumMath.lerp(p,E,S.y)+T,M.height=b-l;const A=h.cartographicToCartesian(M,w);if(f){const e=2*u;x.x=d[e],x.y=d[e+1]}let C,W;o.hasWebMercatorT&&(C=(s.WebMercatorProjection.geodeticLatitudeToMercatorAngle(M.latitude)-I)*g),o.hasGeodeticSurfaceNormals&&(W=h.geodeticSurfaceNormal(A)),t=o.encode(e,t,A,S,M.height,x,C,W)}}function W(e,t){let n;return"function"==typeof e.slice&&(n=e.slice(),"function"!=typeof n.sort&&(n=void 0)),r.defined(n)||(n=Array.prototype.slice.call(e)),n.sort(t),n}return c((function(c,d){const h=c.quantizedVertices,u=h.length/3,l=c.octEncodedNormals,I=c.westIndices.length+c.eastIndices.length+c.southIndices.length+c.northIndices.length,m=c.includeWebMercatorT,T=c.exaggeration,f=c.exaggerationRelativeHeight,E=1!==T,p=t.Rectangle.clone(c.rectangle),y=p.west,v=p.south,P=p.east,D=p.north,k=t.Ellipsoid.clone(c.ellipsoid),F=c.minimumHeight,H=c.maximumHeight,_=c.relativeToCenter,G=a.Transforms.eastNorthUpToFixedFrame(_,k),V=t.Matrix4.inverseTransformation(G,new t.Matrix4);let Y,O;m&&(Y=s.WebMercatorProjection.geodeticLatitudeToMercatorAngle(v),O=1/(s.WebMercatorProjection.geodeticLatitudeToMercatorAngle(D)-Y));const B=h.subarray(0,u),R=h.subarray(u,2*u),L=h.subarray(2*u,3*u),j=r.defined(l),U=new Array(u),z=new Array(u),q=new Array(u),Q=m?new Array(u):[],K=E?new Array(u):[],X=b;X.x=Number.POSITIVE_INFINITY,X.y=Number.POSITIVE_INFINITY,X.z=Number.POSITIVE_INFINITY;const Z=S;Z.x=Number.NEGATIVE_INFINITY,Z.y=Number.NEGATIVE_INFINITY,Z.z=Number.NEGATIVE_INFINITY;let J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY,ee=Number.POSITIVE_INFINITY,te=Number.NEGATIVE_INFINITY;for(let e=0;e<u;++e){const r=B[e],n=R[e],o=r/N,a=n/N,c=i.CesiumMath.lerp(F,H,L[e]/N);M.longitude=i.CesiumMath.lerp(y,P,o),M.latitude=i.CesiumMath.lerp(v,D,a),M.height=c,J=Math.min(M.longitude,J),$=Math.max(M.longitude,$),ee=Math.min(M.latitude,ee),te=Math.max(M.latitude,te);const d=k.cartographicToCartesian(M);U[e]=new t.Cartesian2(o,a),z[e]=c,q[e]=d,m&&(Q[e]=(s.WebMercatorProjection.geodeticLatitudeToMercatorAngle(M.latitude)-Y)*O),E&&(K[e]=k.geodeticSurfaceNormal(d)),t.Matrix4.multiplyByPoint(V,d,w),t.Cartesian3.minimumByComponent(w,X,X),t.Cartesian3.maximumByComponent(w,Z,Z)}const re=W(c.westIndices,(function(e,t){return U[e].y-U[t].y})),ne=W(c.eastIndices,(function(e,t){return U[t].y-U[e].y})),oe=W(c.southIndices,(function(e,t){return U[t].x-U[e].x})),ie=W(c.northIndices,(function(e,t){return U[e].x-U[t].x}));let ae;if(F<0){ae=new n.EllipsoidalOccluder(k).computeHorizonCullingPointPossiblyUnderEllipsoid(_,q,F)}let se=F;se=Math.min(se,A(c.westIndices,c.westSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(c.southIndices,c.southSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(c.eastIndices,c.eastSkirtHeight,z,U,p,k,V,X,Z)),se=Math.min(se,A(c.northIndices,c.northSkirtHeight,z,U,p,k,V,X,Z));const ce=new e.AxisAlignedBoundingBox(X,Z,_),de=new n.TerrainEncoding(_,ce,se,H,G,j,m,E,T,f),he=de.stride,ue=new Float32Array(u*he+I*he);let le=0;for(let e=0;e<u;++e){if(j){const t=2*e;x.x=l[t],x.y=l[t+1]}le=de.encode(ue,le,q[e],U[e],z[e],x,Q[e],K[e])}const Ie=Math.max(0,2*(I-4)),ge=c.indices.length+3*Ie,me=o.IndexDatatype.createTypedArray(u+I,ge);me.set(c.indices,0);const Te=1e-4,fe=($-J)*Te,Ee=(te-ee)*Te,pe=-fe,ye=fe,Ne=Ee,we=-Ee;let be=u*he;return C(ue,be,re,de,z,U,l,k,p,c.westSkirtHeight,Y,O,pe,0),be+=c.westIndices.length*he,C(ue,be,oe,de,z,U,l,k,p,c.southSkirtHeight,Y,O,0,we),be+=c.southIndices.length*he,C(ue,be,ne,de,z,U,l,k,p,c.eastSkirtHeight,Y,O,ye,0),be+=c.eastIndices.length*he,C(ue,be,ie,de,z,U,l,k,p,c.northSkirtHeight,Y,O,0,Ne),g.addSkirtIndices(re,oe,ne,ie,u,me,c.indices.length),d.push(ue.buffer,me.buffer),{vertices:ue.buffer,indices:me.buffer,westIndicesSouthToNorth:re,southIndicesEastToWest:oe,eastIndicesNorthToSouth:ne,northIndicesWestToEast:ie,vertexStride:he,center:_,minimumHeight:F,maximumHeight:H,occludeePointInScaledSpace:ae,encoding:de,indexCountWithoutSkirts:c.indices.length}}))}));
1
+ define(['./AxisAlignedBoundingBox-ff186ccc', './Matrix2-13178034', './Matrix3-315394f6', './defaultValue-0a909f67', './TerrainEncoding-833187da', './IndexDatatype-a55ceaa1', './Math-2dbd6b93', './Check-666ab1a0', './Transforms-40229881', './WebMercatorProjection-13a90d41', './createTaskProcessorWorker', './RuntimeError-06c93819', './AttributeCompression-b646d393', './ComponentDatatype-f7b11d02', './WebGLConstants-a8cc3e8c', './combine-ca22a614'], (function (AxisAlignedBoundingBox, Matrix2, Matrix3, defaultValue, TerrainEncoding, IndexDatatype, Math$1, Check, Transforms, WebMercatorProjection, createTaskProcessorWorker, RuntimeError, AttributeCompression, ComponentDatatype, WebGLConstants, combine) { 'use strict';
2
+
3
+ /**
4
+ * Provides terrain or other geometry for the surface of an ellipsoid. The surface geometry is
5
+ * organized into a pyramid of tiles according to a {@link TilingScheme}. This type describes an
6
+ * interface and is not intended to be instantiated directly.
7
+ *
8
+ * @alias TerrainProvider
9
+ * @constructor
10
+ *
11
+ * @see EllipsoidTerrainProvider
12
+ * @see CesiumTerrainProvider
13
+ * @see VRTheWorldTerrainProvider
14
+ * @see GoogleEarthEnterpriseTerrainProvider
15
+ */
16
+ function TerrainProvider() {
17
+ Check.DeveloperError.throwInstantiationError();
18
+ }
19
+
20
+ Object.defineProperties(TerrainProvider.prototype, {
21
+ /**
22
+ * Gets an event that is raised when the terrain provider encounters an asynchronous error.. By subscribing
23
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
24
+ * are passed an instance of {@link TileProviderError}.
25
+ * @memberof TerrainProvider.prototype
26
+ * @type {Event<TerrainProvider.ErrorEvent>}
27
+ * @readonly
28
+ */
29
+ errorEvent: {
30
+ get: Check.DeveloperError.throwInstantiationError,
31
+ },
32
+
33
+ /**
34
+ * Gets the credit to display when this terrain provider is active. Typically this is used to credit
35
+ * the source of the terrain. This function should
36
+ * not be called before {@link TerrainProvider#ready} returns true.
37
+ * @memberof TerrainProvider.prototype
38
+ * @type {Credit}
39
+ * @readonly
40
+ */
41
+ credit: {
42
+ get: Check.DeveloperError.throwInstantiationError,
43
+ },
44
+
45
+ /**
46
+ * Gets the tiling scheme used by the provider. This function should
47
+ * not be called before {@link TerrainProvider#ready} returns true.
48
+ * @memberof TerrainProvider.prototype
49
+ * @type {TilingScheme}
50
+ * @readonly
51
+ */
52
+ tilingScheme: {
53
+ get: Check.DeveloperError.throwInstantiationError,
54
+ },
55
+
56
+ /**
57
+ * Gets a value indicating whether or not the provider is ready for use.
58
+ * @memberof TerrainProvider.prototype
59
+ * @type {Boolean}
60
+ * @readonly
61
+ */
62
+ ready: {
63
+ get: Check.DeveloperError.throwInstantiationError,
64
+ },
65
+
66
+ /**
67
+ * Gets a promise that resolves to true when the provider is ready for use.
68
+ * @memberof TerrainProvider.prototype
69
+ * @type {Promise.<Boolean>}
70
+ * @readonly
71
+ */
72
+ readyPromise: {
73
+ get: Check.DeveloperError.throwInstantiationError,
74
+ },
75
+
76
+ /**
77
+ * Gets a value indicating whether or not the provider includes a water mask. The water mask
78
+ * indicates which areas of the globe are water rather than land, so they can be rendered
79
+ * as a reflective surface with animated waves. This function should not be
80
+ * called before {@link TerrainProvider#ready} returns true.
81
+ * @memberof TerrainProvider.prototype
82
+ * @type {Boolean}
83
+ * @readonly
84
+ */
85
+ hasWaterMask: {
86
+ get: Check.DeveloperError.throwInstantiationError,
87
+ },
88
+
89
+ /**
90
+ * Gets a value indicating whether or not the requested tiles include vertex normals.
91
+ * This function should not be called before {@link TerrainProvider#ready} returns true.
92
+ * @memberof TerrainProvider.prototype
93
+ * @type {Boolean}
94
+ * @readonly
95
+ */
96
+ hasVertexNormals: {
97
+ get: Check.DeveloperError.throwInstantiationError,
98
+ },
99
+
100
+ /**
101
+ * Gets an object that can be used to determine availability of terrain from this provider, such as
102
+ * at points and in rectangles. This function should not be called before
103
+ * {@link TerrainProvider#ready} returns true. This property may be undefined if availability
104
+ * information is not available.
105
+ * @memberof TerrainProvider.prototype
106
+ * @type {TileAvailability}
107
+ * @readonly
108
+ */
109
+ availability: {
110
+ get: Check.DeveloperError.throwInstantiationError,
111
+ },
112
+ });
113
+
114
+ const regularGridIndicesCache = [];
115
+
116
+ /**
117
+ * Gets a list of indices for a triangle mesh representing a regular grid. Calling
118
+ * this function multiple times with the same grid width and height returns the
119
+ * same list of indices. The total number of vertices must be less than or equal
120
+ * to 65536.
121
+ *
122
+ * @param {Number} width The number of vertices in the regular grid in the horizontal direction.
123
+ * @param {Number} height The number of vertices in the regular grid in the vertical direction.
124
+ * @returns {Uint16Array|Uint32Array} The list of indices. Uint16Array gets returned for 64KB or less and Uint32Array for 4GB or less.
125
+ */
126
+ TerrainProvider.getRegularGridIndices = function (width, height) {
127
+ //>>includeStart('debug', pragmas.debug);
128
+ if (width * height >= Math$1.CesiumMath.FOUR_GIGABYTES) {
129
+ throw new Check.DeveloperError(
130
+ "The total number of vertices (width * height) must be less than 4,294,967,296."
131
+ );
132
+ }
133
+ //>>includeEnd('debug');
134
+
135
+ let byWidth = regularGridIndicesCache[width];
136
+ if (!defaultValue.defined(byWidth)) {
137
+ regularGridIndicesCache[width] = byWidth = [];
138
+ }
139
+
140
+ let indices = byWidth[height];
141
+ if (!defaultValue.defined(indices)) {
142
+ if (width * height < Math$1.CesiumMath.SIXTY_FOUR_KILOBYTES) {
143
+ indices = byWidth[height] = new Uint16Array(
144
+ (width - 1) * (height - 1) * 6
145
+ );
146
+ } else {
147
+ indices = byWidth[height] = new Uint32Array(
148
+ (width - 1) * (height - 1) * 6
149
+ );
150
+ }
151
+ addRegularGridIndices(width, height, indices, 0);
152
+ }
153
+
154
+ return indices;
155
+ };
156
+
157
+ const regularGridAndEdgeIndicesCache = [];
158
+
159
+ /**
160
+ * @private
161
+ */
162
+ TerrainProvider.getRegularGridIndicesAndEdgeIndices = function (width, height) {
163
+ //>>includeStart('debug', pragmas.debug);
164
+ if (width * height >= Math$1.CesiumMath.FOUR_GIGABYTES) {
165
+ throw new Check.DeveloperError(
166
+ "The total number of vertices (width * height) must be less than 4,294,967,296."
167
+ );
168
+ }
169
+ //>>includeEnd('debug');
170
+
171
+ let byWidth = regularGridAndEdgeIndicesCache[width];
172
+ if (!defaultValue.defined(byWidth)) {
173
+ regularGridAndEdgeIndicesCache[width] = byWidth = [];
174
+ }
175
+
176
+ let indicesAndEdges = byWidth[height];
177
+ if (!defaultValue.defined(indicesAndEdges)) {
178
+ const indices = TerrainProvider.getRegularGridIndices(width, height);
179
+
180
+ const edgeIndices = getEdgeIndices(width, height);
181
+ const westIndicesSouthToNorth = edgeIndices.westIndicesSouthToNorth;
182
+ const southIndicesEastToWest = edgeIndices.southIndicesEastToWest;
183
+ const eastIndicesNorthToSouth = edgeIndices.eastIndicesNorthToSouth;
184
+ const northIndicesWestToEast = edgeIndices.northIndicesWestToEast;
185
+
186
+ indicesAndEdges = byWidth[height] = {
187
+ indices: indices,
188
+ westIndicesSouthToNorth: westIndicesSouthToNorth,
189
+ southIndicesEastToWest: southIndicesEastToWest,
190
+ eastIndicesNorthToSouth: eastIndicesNorthToSouth,
191
+ northIndicesWestToEast: northIndicesWestToEast,
192
+ };
193
+ }
194
+
195
+ return indicesAndEdges;
196
+ };
197
+
198
+ const regularGridAndSkirtAndEdgeIndicesCache = [];
199
+
200
+ /**
201
+ * @private
202
+ */
203
+ TerrainProvider.getRegularGridAndSkirtIndicesAndEdgeIndices = function (
204
+ width,
205
+ height
206
+ ) {
207
+ //>>includeStart('debug', pragmas.debug);
208
+ if (width * height >= Math$1.CesiumMath.FOUR_GIGABYTES) {
209
+ throw new Check.DeveloperError(
210
+ "The total number of vertices (width * height) must be less than 4,294,967,296."
211
+ );
212
+ }
213
+ //>>includeEnd('debug');
214
+
215
+ let byWidth = regularGridAndSkirtAndEdgeIndicesCache[width];
216
+ if (!defaultValue.defined(byWidth)) {
217
+ regularGridAndSkirtAndEdgeIndicesCache[width] = byWidth = [];
218
+ }
219
+
220
+ let indicesAndEdges = byWidth[height];
221
+ if (!defaultValue.defined(indicesAndEdges)) {
222
+ const gridVertexCount = width * height;
223
+ const gridIndexCount = (width - 1) * (height - 1) * 6;
224
+ const edgeVertexCount = width * 2 + height * 2;
225
+ const edgeIndexCount = Math.max(0, edgeVertexCount - 4) * 6;
226
+ const vertexCount = gridVertexCount + edgeVertexCount;
227
+ const indexCount = gridIndexCount + edgeIndexCount;
228
+
229
+ const edgeIndices = getEdgeIndices(width, height);
230
+ const westIndicesSouthToNorth = edgeIndices.westIndicesSouthToNorth;
231
+ const southIndicesEastToWest = edgeIndices.southIndicesEastToWest;
232
+ const eastIndicesNorthToSouth = edgeIndices.eastIndicesNorthToSouth;
233
+ const northIndicesWestToEast = edgeIndices.northIndicesWestToEast;
234
+
235
+ const indices = IndexDatatype.IndexDatatype.createTypedArray(vertexCount, indexCount);
236
+ addRegularGridIndices(width, height, indices, 0);
237
+ TerrainProvider.addSkirtIndices(
238
+ westIndicesSouthToNorth,
239
+ southIndicesEastToWest,
240
+ eastIndicesNorthToSouth,
241
+ northIndicesWestToEast,
242
+ gridVertexCount,
243
+ indices,
244
+ gridIndexCount
245
+ );
246
+
247
+ indicesAndEdges = byWidth[height] = {
248
+ indices: indices,
249
+ westIndicesSouthToNorth: westIndicesSouthToNorth,
250
+ southIndicesEastToWest: southIndicesEastToWest,
251
+ eastIndicesNorthToSouth: eastIndicesNorthToSouth,
252
+ northIndicesWestToEast: northIndicesWestToEast,
253
+ indexCountWithoutSkirts: gridIndexCount,
254
+ };
255
+ }
256
+
257
+ return indicesAndEdges;
258
+ };
259
+
260
+ /**
261
+ * @private
262
+ */
263
+ TerrainProvider.addSkirtIndices = function (
264
+ westIndicesSouthToNorth,
265
+ southIndicesEastToWest,
266
+ eastIndicesNorthToSouth,
267
+ northIndicesWestToEast,
268
+ vertexCount,
269
+ indices,
270
+ offset
271
+ ) {
272
+ let vertexIndex = vertexCount;
273
+ offset = addSkirtIndices(
274
+ westIndicesSouthToNorth,
275
+ vertexIndex,
276
+ indices,
277
+ offset
278
+ );
279
+ vertexIndex += westIndicesSouthToNorth.length;
280
+ offset = addSkirtIndices(
281
+ southIndicesEastToWest,
282
+ vertexIndex,
283
+ indices,
284
+ offset
285
+ );
286
+ vertexIndex += southIndicesEastToWest.length;
287
+ offset = addSkirtIndices(
288
+ eastIndicesNorthToSouth,
289
+ vertexIndex,
290
+ indices,
291
+ offset
292
+ );
293
+ vertexIndex += eastIndicesNorthToSouth.length;
294
+ addSkirtIndices(northIndicesWestToEast, vertexIndex, indices, offset);
295
+ };
296
+
297
+ function getEdgeIndices(width, height) {
298
+ const westIndicesSouthToNorth = new Array(height);
299
+ const southIndicesEastToWest = new Array(width);
300
+ const eastIndicesNorthToSouth = new Array(height);
301
+ const northIndicesWestToEast = new Array(width);
302
+
303
+ let i;
304
+ for (i = 0; i < width; ++i) {
305
+ northIndicesWestToEast[i] = i;
306
+ southIndicesEastToWest[i] = width * height - 1 - i;
307
+ }
308
+
309
+ for (i = 0; i < height; ++i) {
310
+ eastIndicesNorthToSouth[i] = (i + 1) * width - 1;
311
+ westIndicesSouthToNorth[i] = (height - i - 1) * width;
312
+ }
313
+
314
+ return {
315
+ westIndicesSouthToNorth: westIndicesSouthToNorth,
316
+ southIndicesEastToWest: southIndicesEastToWest,
317
+ eastIndicesNorthToSouth: eastIndicesNorthToSouth,
318
+ northIndicesWestToEast: northIndicesWestToEast,
319
+ };
320
+ }
321
+
322
+ function addRegularGridIndices(width, height, indices, offset) {
323
+ let index = 0;
324
+ for (let j = 0; j < height - 1; ++j) {
325
+ for (let i = 0; i < width - 1; ++i) {
326
+ const upperLeft = index;
327
+ const lowerLeft = upperLeft + width;
328
+ const lowerRight = lowerLeft + 1;
329
+ const upperRight = upperLeft + 1;
330
+
331
+ indices[offset++] = upperLeft;
332
+ indices[offset++] = lowerLeft;
333
+ indices[offset++] = upperRight;
334
+ indices[offset++] = upperRight;
335
+ indices[offset++] = lowerLeft;
336
+ indices[offset++] = lowerRight;
337
+
338
+ ++index;
339
+ }
340
+ ++index;
341
+ }
342
+ }
343
+
344
+ function addSkirtIndices(edgeIndices, vertexIndex, indices, offset) {
345
+ let previousIndex = edgeIndices[0];
346
+
347
+ const length = edgeIndices.length;
348
+ for (let i = 1; i < length; ++i) {
349
+ const index = edgeIndices[i];
350
+
351
+ indices[offset++] = previousIndex;
352
+ indices[offset++] = index;
353
+ indices[offset++] = vertexIndex;
354
+
355
+ indices[offset++] = vertexIndex;
356
+ indices[offset++] = index;
357
+ indices[offset++] = vertexIndex + 1;
358
+
359
+ previousIndex = index;
360
+ ++vertexIndex;
361
+ }
362
+
363
+ return offset;
364
+ }
365
+
366
+ /**
367
+ * Specifies the quality of terrain created from heightmaps. A value of 1.0 will
368
+ * ensure that adjacent heightmap vertices are separated by no more than
369
+ * {@link Globe.maximumScreenSpaceError} screen pixels and will probably go very slowly.
370
+ * A value of 0.5 will cut the estimated level zero geometric error in half, allowing twice the
371
+ * screen pixels between adjacent heightmap vertices and thus rendering more quickly.
372
+ * @type {Number}
373
+ */
374
+ TerrainProvider.heightmapTerrainQuality = 0.25;
375
+
376
+ /**
377
+ * Determines an appropriate geometric error estimate when the geometry comes from a heightmap.
378
+ *
379
+ * @param {Ellipsoid} ellipsoid The ellipsoid to which the terrain is attached.
380
+ * @param {Number} tileImageWidth The width, in pixels, of the heightmap associated with a single tile.
381
+ * @param {Number} numberOfTilesAtLevelZero The number of tiles in the horizontal direction at tile level zero.
382
+ * @returns {Number} An estimated geometric error.
383
+ */
384
+ TerrainProvider.getEstimatedLevelZeroGeometricErrorForAHeightmap = function (
385
+ ellipsoid,
386
+ tileImageWidth,
387
+ numberOfTilesAtLevelZero
388
+ ) {
389
+ return (
390
+ (ellipsoid.maximumRadius *
391
+ 2 *
392
+ Math.PI *
393
+ TerrainProvider.heightmapTerrainQuality) /
394
+ (tileImageWidth * numberOfTilesAtLevelZero)
395
+ );
396
+ };
397
+
398
+ /**
399
+ * Requests the geometry for a given tile. This function should not be called before
400
+ * {@link TerrainProvider#ready} returns true. The result must include terrain data and
401
+ * may optionally include a water mask and an indication of which child tiles are available.
402
+ * @function
403
+ *
404
+ * @param {Number} x The X coordinate of the tile for which to request geometry.
405
+ * @param {Number} y The Y coordinate of the tile for which to request geometry.
406
+ * @param {Number} level The level of the tile for which to request geometry.
407
+ * @param {Request} [request] The request object. Intended for internal use only.
408
+ *
409
+ * @returns {Promise.<TerrainData>|undefined} A promise for the requested geometry. If this method
410
+ * returns undefined instead of a promise, it is an indication that too many requests are already
411
+ * pending and the request will be retried later.
412
+ */
413
+ TerrainProvider.prototype.requestTileGeometry =
414
+ Check.DeveloperError.throwInstantiationError;
415
+
416
+ /**
417
+ * Gets the maximum geometric error allowed in a tile at a given level. This function should not be
418
+ * called before {@link TerrainProvider#ready} returns true.
419
+ * @function
420
+ *
421
+ * @param {Number} level The tile level for which to get the maximum geometric error.
422
+ * @returns {Number} The maximum geometric error.
423
+ */
424
+ TerrainProvider.prototype.getLevelMaximumGeometricError =
425
+ Check.DeveloperError.throwInstantiationError;
426
+
427
+ /**
428
+ * Determines whether data for a tile is available to be loaded.
429
+ * @function
430
+ *
431
+ * @param {Number} x The X coordinate of the tile for which to request geometry.
432
+ * @param {Number} y The Y coordinate of the tile for which to request geometry.
433
+ * @param {Number} level The level of the tile for which to request geometry.
434
+ * @returns {Boolean|undefined} Undefined if not supported by the terrain provider, otherwise true or false.
435
+ */
436
+ TerrainProvider.prototype.getTileDataAvailable =
437
+ Check.DeveloperError.throwInstantiationError;
438
+
439
+ /**
440
+ * Makes sure we load availability data for a tile
441
+ * @function
442
+ *
443
+ * @param {Number} x The X coordinate of the tile for which to request geometry.
444
+ * @param {Number} y The Y coordinate of the tile for which to request geometry.
445
+ * @param {Number} level The level of the tile for which to request geometry.
446
+ * @returns {undefined|Promise<void>} Undefined if nothing need to be loaded or a Promise that resolves when all required tiles are loaded
447
+ */
448
+ TerrainProvider.prototype.loadTileDataAvailability =
449
+ Check.DeveloperError.throwInstantiationError;
450
+
451
+ /**
452
+ * A function that is called when an error occurs.
453
+ * @callback TerrainProvider.ErrorEvent
454
+ *
455
+ * @this TerrainProvider
456
+ * @param {TileProviderError} err An object holding details about the error that occurred.
457
+ */
458
+
459
+ const maxShort = 32767;
460
+
461
+ const cartesian3Scratch = new Matrix3.Cartesian3();
462
+ const scratchMinimum = new Matrix3.Cartesian3();
463
+ const scratchMaximum = new Matrix3.Cartesian3();
464
+ const cartographicScratch = new Matrix3.Cartographic();
465
+ const toPack = new Matrix2.Cartesian2();
466
+
467
+ function createVerticesFromQuantizedTerrainMesh(
468
+ parameters,
469
+ transferableObjects
470
+ ) {
471
+ const quantizedVertices = parameters.quantizedVertices;
472
+ const quantizedVertexCount = quantizedVertices.length / 3;
473
+ const octEncodedNormals = parameters.octEncodedNormals;
474
+ const edgeVertexCount =
475
+ parameters.westIndices.length +
476
+ parameters.eastIndices.length +
477
+ parameters.southIndices.length +
478
+ parameters.northIndices.length;
479
+ const includeWebMercatorT = parameters.includeWebMercatorT;
480
+
481
+ const exaggeration = parameters.exaggeration;
482
+ const exaggerationRelativeHeight = parameters.exaggerationRelativeHeight;
483
+ const hasExaggeration = exaggeration !== 1.0;
484
+ const includeGeodeticSurfaceNormals = hasExaggeration;
485
+
486
+ const rectangle = Matrix2.Rectangle.clone(parameters.rectangle);
487
+ const west = rectangle.west;
488
+ const south = rectangle.south;
489
+ const east = rectangle.east;
490
+ const north = rectangle.north;
491
+
492
+ const ellipsoid = Matrix3.Ellipsoid.clone(parameters.ellipsoid);
493
+
494
+ const minimumHeight = parameters.minimumHeight;
495
+ const maximumHeight = parameters.maximumHeight;
496
+
497
+ const center = parameters.relativeToCenter;
498
+ const fromENU = Transforms.Transforms.eastNorthUpToFixedFrame(center, ellipsoid);
499
+ const toENU = Matrix2.Matrix4.inverseTransformation(fromENU, new Matrix2.Matrix4());
500
+
501
+ let southMercatorY;
502
+ let oneOverMercatorHeight;
503
+ if (includeWebMercatorT) {
504
+ southMercatorY = WebMercatorProjection.WebMercatorProjection.geodeticLatitudeToMercatorAngle(
505
+ south
506
+ );
507
+ oneOverMercatorHeight =
508
+ 1.0 /
509
+ (WebMercatorProjection.WebMercatorProjection.geodeticLatitudeToMercatorAngle(north) -
510
+ southMercatorY);
511
+ }
512
+
513
+ const uBuffer = quantizedVertices.subarray(0, quantizedVertexCount);
514
+ const vBuffer = quantizedVertices.subarray(
515
+ quantizedVertexCount,
516
+ 2 * quantizedVertexCount
517
+ );
518
+ const heightBuffer = quantizedVertices.subarray(
519
+ quantizedVertexCount * 2,
520
+ 3 * quantizedVertexCount
521
+ );
522
+ const hasVertexNormals = defaultValue.defined(octEncodedNormals);
523
+
524
+ const uvs = new Array(quantizedVertexCount);
525
+ const heights = new Array(quantizedVertexCount);
526
+ const positions = new Array(quantizedVertexCount);
527
+ const webMercatorTs = includeWebMercatorT
528
+ ? new Array(quantizedVertexCount)
529
+ : [];
530
+ const geodeticSurfaceNormals = includeGeodeticSurfaceNormals
531
+ ? new Array(quantizedVertexCount)
532
+ : [];
533
+
534
+ const minimum = scratchMinimum;
535
+ minimum.x = Number.POSITIVE_INFINITY;
536
+ minimum.y = Number.POSITIVE_INFINITY;
537
+ minimum.z = Number.POSITIVE_INFINITY;
538
+
539
+ const maximum = scratchMaximum;
540
+ maximum.x = Number.NEGATIVE_INFINITY;
541
+ maximum.y = Number.NEGATIVE_INFINITY;
542
+ maximum.z = Number.NEGATIVE_INFINITY;
543
+
544
+ let minLongitude = Number.POSITIVE_INFINITY;
545
+ let maxLongitude = Number.NEGATIVE_INFINITY;
546
+ let minLatitude = Number.POSITIVE_INFINITY;
547
+ let maxLatitude = Number.NEGATIVE_INFINITY;
548
+
549
+ for (let i = 0; i < quantizedVertexCount; ++i) {
550
+ const rawU = uBuffer[i];
551
+ const rawV = vBuffer[i];
552
+
553
+ const u = rawU / maxShort;
554
+ const v = rawV / maxShort;
555
+ const height = Math$1.CesiumMath.lerp(
556
+ minimumHeight,
557
+ maximumHeight,
558
+ heightBuffer[i] / maxShort
559
+ );
560
+
561
+ cartographicScratch.longitude = Math$1.CesiumMath.lerp(west, east, u);
562
+ cartographicScratch.latitude = Math$1.CesiumMath.lerp(south, north, v);
563
+ cartographicScratch.height = height;
564
+
565
+ minLongitude = Math.min(cartographicScratch.longitude, minLongitude);
566
+ maxLongitude = Math.max(cartographicScratch.longitude, maxLongitude);
567
+ minLatitude = Math.min(cartographicScratch.latitude, minLatitude);
568
+ maxLatitude = Math.max(cartographicScratch.latitude, maxLatitude);
569
+
570
+ const position = ellipsoid.cartographicToCartesian(cartographicScratch);
571
+
572
+ uvs[i] = new Matrix2.Cartesian2(u, v);
573
+ heights[i] = height;
574
+ positions[i] = position;
575
+
576
+ if (includeWebMercatorT) {
577
+ webMercatorTs[i] =
578
+ (WebMercatorProjection.WebMercatorProjection.geodeticLatitudeToMercatorAngle(
579
+ cartographicScratch.latitude
580
+ ) -
581
+ southMercatorY) *
582
+ oneOverMercatorHeight;
583
+ }
584
+
585
+ if (includeGeodeticSurfaceNormals) {
586
+ geodeticSurfaceNormals[i] = ellipsoid.geodeticSurfaceNormal(position);
587
+ }
588
+
589
+ Matrix2.Matrix4.multiplyByPoint(toENU, position, cartesian3Scratch);
590
+
591
+ Matrix3.Cartesian3.minimumByComponent(cartesian3Scratch, minimum, minimum);
592
+ Matrix3.Cartesian3.maximumByComponent(cartesian3Scratch, maximum, maximum);
593
+ }
594
+
595
+ const westIndicesSouthToNorth = copyAndSort(parameters.westIndices, function (
596
+ a,
597
+ b
598
+ ) {
599
+ return uvs[a].y - uvs[b].y;
600
+ });
601
+ const eastIndicesNorthToSouth = copyAndSort(parameters.eastIndices, function (
602
+ a,
603
+ b
604
+ ) {
605
+ return uvs[b].y - uvs[a].y;
606
+ });
607
+ const southIndicesEastToWest = copyAndSort(parameters.southIndices, function (
608
+ a,
609
+ b
610
+ ) {
611
+ return uvs[b].x - uvs[a].x;
612
+ });
613
+ const northIndicesWestToEast = copyAndSort(parameters.northIndices, function (
614
+ a,
615
+ b
616
+ ) {
617
+ return uvs[a].x - uvs[b].x;
618
+ });
619
+
620
+ let occludeePointInScaledSpace;
621
+ if (minimumHeight < 0.0) {
622
+ // Horizon culling point needs to be recomputed since the tile is at least partly under the ellipsoid.
623
+ const occluder = new TerrainEncoding.EllipsoidalOccluder(ellipsoid);
624
+ occludeePointInScaledSpace = occluder.computeHorizonCullingPointPossiblyUnderEllipsoid(
625
+ center,
626
+ positions,
627
+ minimumHeight
628
+ );
629
+ }
630
+
631
+ let hMin = minimumHeight;
632
+ hMin = Math.min(
633
+ hMin,
634
+ findMinMaxSkirts(
635
+ parameters.westIndices,
636
+ parameters.westSkirtHeight,
637
+ heights,
638
+ uvs,
639
+ rectangle,
640
+ ellipsoid,
641
+ toENU,
642
+ minimum,
643
+ maximum
644
+ )
645
+ );
646
+ hMin = Math.min(
647
+ hMin,
648
+ findMinMaxSkirts(
649
+ parameters.southIndices,
650
+ parameters.southSkirtHeight,
651
+ heights,
652
+ uvs,
653
+ rectangle,
654
+ ellipsoid,
655
+ toENU,
656
+ minimum,
657
+ maximum
658
+ )
659
+ );
660
+ hMin = Math.min(
661
+ hMin,
662
+ findMinMaxSkirts(
663
+ parameters.eastIndices,
664
+ parameters.eastSkirtHeight,
665
+ heights,
666
+ uvs,
667
+ rectangle,
668
+ ellipsoid,
669
+ toENU,
670
+ minimum,
671
+ maximum
672
+ )
673
+ );
674
+ hMin = Math.min(
675
+ hMin,
676
+ findMinMaxSkirts(
677
+ parameters.northIndices,
678
+ parameters.northSkirtHeight,
679
+ heights,
680
+ uvs,
681
+ rectangle,
682
+ ellipsoid,
683
+ toENU,
684
+ minimum,
685
+ maximum
686
+ )
687
+ );
688
+
689
+ const aaBox = new AxisAlignedBoundingBox.AxisAlignedBoundingBox(minimum, maximum, center);
690
+ const encoding = new TerrainEncoding.TerrainEncoding(
691
+ center,
692
+ aaBox,
693
+ hMin,
694
+ maximumHeight,
695
+ fromENU,
696
+ hasVertexNormals,
697
+ includeWebMercatorT,
698
+ includeGeodeticSurfaceNormals,
699
+ exaggeration,
700
+ exaggerationRelativeHeight
701
+ );
702
+ const vertexStride = encoding.stride;
703
+ const size =
704
+ quantizedVertexCount * vertexStride + edgeVertexCount * vertexStride;
705
+ const vertexBuffer = new Float32Array(size);
706
+
707
+ let bufferIndex = 0;
708
+ for (let j = 0; j < quantizedVertexCount; ++j) {
709
+ if (hasVertexNormals) {
710
+ const n = j * 2.0;
711
+ toPack.x = octEncodedNormals[n];
712
+ toPack.y = octEncodedNormals[n + 1];
713
+ }
714
+
715
+ bufferIndex = encoding.encode(
716
+ vertexBuffer,
717
+ bufferIndex,
718
+ positions[j],
719
+ uvs[j],
720
+ heights[j],
721
+ toPack,
722
+ webMercatorTs[j],
723
+ geodeticSurfaceNormals[j]
724
+ );
725
+ }
726
+
727
+ const edgeTriangleCount = Math.max(0, (edgeVertexCount - 4) * 2);
728
+ const indexBufferLength = parameters.indices.length + edgeTriangleCount * 3;
729
+ const indexBuffer = IndexDatatype.IndexDatatype.createTypedArray(
730
+ quantizedVertexCount + edgeVertexCount,
731
+ indexBufferLength
732
+ );
733
+ indexBuffer.set(parameters.indices, 0);
734
+
735
+ const percentage = 0.0001;
736
+ const lonOffset = (maxLongitude - minLongitude) * percentage;
737
+ const latOffset = (maxLatitude - minLatitude) * percentage;
738
+ const westLongitudeOffset = -lonOffset;
739
+ const westLatitudeOffset = 0.0;
740
+ const eastLongitudeOffset = lonOffset;
741
+ const eastLatitudeOffset = 0.0;
742
+ const northLongitudeOffset = 0.0;
743
+ const northLatitudeOffset = latOffset;
744
+ const southLongitudeOffset = 0.0;
745
+ const southLatitudeOffset = -latOffset;
746
+
747
+ // Add skirts.
748
+ let vertexBufferIndex = quantizedVertexCount * vertexStride;
749
+ addSkirt(
750
+ vertexBuffer,
751
+ vertexBufferIndex,
752
+ westIndicesSouthToNorth,
753
+ encoding,
754
+ heights,
755
+ uvs,
756
+ octEncodedNormals,
757
+ ellipsoid,
758
+ rectangle,
759
+ parameters.westSkirtHeight,
760
+ southMercatorY,
761
+ oneOverMercatorHeight,
762
+ westLongitudeOffset,
763
+ westLatitudeOffset
764
+ );
765
+ vertexBufferIndex += parameters.westIndices.length * vertexStride;
766
+ addSkirt(
767
+ vertexBuffer,
768
+ vertexBufferIndex,
769
+ southIndicesEastToWest,
770
+ encoding,
771
+ heights,
772
+ uvs,
773
+ octEncodedNormals,
774
+ ellipsoid,
775
+ rectangle,
776
+ parameters.southSkirtHeight,
777
+ southMercatorY,
778
+ oneOverMercatorHeight,
779
+ southLongitudeOffset,
780
+ southLatitudeOffset
781
+ );
782
+ vertexBufferIndex += parameters.southIndices.length * vertexStride;
783
+ addSkirt(
784
+ vertexBuffer,
785
+ vertexBufferIndex,
786
+ eastIndicesNorthToSouth,
787
+ encoding,
788
+ heights,
789
+ uvs,
790
+ octEncodedNormals,
791
+ ellipsoid,
792
+ rectangle,
793
+ parameters.eastSkirtHeight,
794
+ southMercatorY,
795
+ oneOverMercatorHeight,
796
+ eastLongitudeOffset,
797
+ eastLatitudeOffset
798
+ );
799
+ vertexBufferIndex += parameters.eastIndices.length * vertexStride;
800
+ addSkirt(
801
+ vertexBuffer,
802
+ vertexBufferIndex,
803
+ northIndicesWestToEast,
804
+ encoding,
805
+ heights,
806
+ uvs,
807
+ octEncodedNormals,
808
+ ellipsoid,
809
+ rectangle,
810
+ parameters.northSkirtHeight,
811
+ southMercatorY,
812
+ oneOverMercatorHeight,
813
+ northLongitudeOffset,
814
+ northLatitudeOffset
815
+ );
816
+
817
+ TerrainProvider.addSkirtIndices(
818
+ westIndicesSouthToNorth,
819
+ southIndicesEastToWest,
820
+ eastIndicesNorthToSouth,
821
+ northIndicesWestToEast,
822
+ quantizedVertexCount,
823
+ indexBuffer,
824
+ parameters.indices.length
825
+ );
826
+
827
+ transferableObjects.push(vertexBuffer.buffer, indexBuffer.buffer);
828
+
829
+ return {
830
+ vertices: vertexBuffer.buffer,
831
+ indices: indexBuffer.buffer,
832
+ westIndicesSouthToNorth: westIndicesSouthToNorth,
833
+ southIndicesEastToWest: southIndicesEastToWest,
834
+ eastIndicesNorthToSouth: eastIndicesNorthToSouth,
835
+ northIndicesWestToEast: northIndicesWestToEast,
836
+ vertexStride: vertexStride,
837
+ center: center,
838
+ minimumHeight: minimumHeight,
839
+ maximumHeight: maximumHeight,
840
+ occludeePointInScaledSpace: occludeePointInScaledSpace,
841
+ encoding: encoding,
842
+ indexCountWithoutSkirts: parameters.indices.length,
843
+ };
844
+ }
845
+
846
+ function findMinMaxSkirts(
847
+ edgeIndices,
848
+ edgeHeight,
849
+ heights,
850
+ uvs,
851
+ rectangle,
852
+ ellipsoid,
853
+ toENU,
854
+ minimum,
855
+ maximum
856
+ ) {
857
+ let hMin = Number.POSITIVE_INFINITY;
858
+
859
+ const north = rectangle.north;
860
+ const south = rectangle.south;
861
+ let east = rectangle.east;
862
+ const west = rectangle.west;
863
+
864
+ if (east < west) {
865
+ east += Math$1.CesiumMath.TWO_PI;
866
+ }
867
+
868
+ const length = edgeIndices.length;
869
+ for (let i = 0; i < length; ++i) {
870
+ const index = edgeIndices[i];
871
+ const h = heights[index];
872
+ const uv = uvs[index];
873
+
874
+ cartographicScratch.longitude = Math$1.CesiumMath.lerp(west, east, uv.x);
875
+ cartographicScratch.latitude = Math$1.CesiumMath.lerp(south, north, uv.y);
876
+ cartographicScratch.height = h - edgeHeight;
877
+
878
+ const position = ellipsoid.cartographicToCartesian(
879
+ cartographicScratch,
880
+ cartesian3Scratch
881
+ );
882
+ Matrix2.Matrix4.multiplyByPoint(toENU, position, position);
883
+
884
+ Matrix3.Cartesian3.minimumByComponent(position, minimum, minimum);
885
+ Matrix3.Cartesian3.maximumByComponent(position, maximum, maximum);
886
+
887
+ hMin = Math.min(hMin, cartographicScratch.height);
888
+ }
889
+ return hMin;
890
+ }
891
+
892
+ function addSkirt(
893
+ vertexBuffer,
894
+ vertexBufferIndex,
895
+ edgeVertices,
896
+ encoding,
897
+ heights,
898
+ uvs,
899
+ octEncodedNormals,
900
+ ellipsoid,
901
+ rectangle,
902
+ skirtLength,
903
+ southMercatorY,
904
+ oneOverMercatorHeight,
905
+ longitudeOffset,
906
+ latitudeOffset
907
+ ) {
908
+ const hasVertexNormals = defaultValue.defined(octEncodedNormals);
909
+
910
+ const north = rectangle.north;
911
+ const south = rectangle.south;
912
+ let east = rectangle.east;
913
+ const west = rectangle.west;
914
+
915
+ if (east < west) {
916
+ east += Math$1.CesiumMath.TWO_PI;
917
+ }
918
+
919
+ const length = edgeVertices.length;
920
+ for (let i = 0; i < length; ++i) {
921
+ const index = edgeVertices[i];
922
+ const h = heights[index];
923
+ const uv = uvs[index];
924
+
925
+ cartographicScratch.longitude =
926
+ Math$1.CesiumMath.lerp(west, east, uv.x) + longitudeOffset;
927
+ cartographicScratch.latitude =
928
+ Math$1.CesiumMath.lerp(south, north, uv.y) + latitudeOffset;
929
+ cartographicScratch.height = h - skirtLength;
930
+
931
+ const position = ellipsoid.cartographicToCartesian(
932
+ cartographicScratch,
933
+ cartesian3Scratch
934
+ );
935
+
936
+ if (hasVertexNormals) {
937
+ const n = index * 2.0;
938
+ toPack.x = octEncodedNormals[n];
939
+ toPack.y = octEncodedNormals[n + 1];
940
+ }
941
+
942
+ let webMercatorT;
943
+ if (encoding.hasWebMercatorT) {
944
+ webMercatorT =
945
+ (WebMercatorProjection.WebMercatorProjection.geodeticLatitudeToMercatorAngle(
946
+ cartographicScratch.latitude
947
+ ) -
948
+ southMercatorY) *
949
+ oneOverMercatorHeight;
950
+ }
951
+
952
+ let geodeticSurfaceNormal;
953
+ if (encoding.hasGeodeticSurfaceNormals) {
954
+ geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormal(position);
955
+ }
956
+
957
+ vertexBufferIndex = encoding.encode(
958
+ vertexBuffer,
959
+ vertexBufferIndex,
960
+ position,
961
+ uv,
962
+ cartographicScratch.height,
963
+ toPack,
964
+ webMercatorT,
965
+ geodeticSurfaceNormal
966
+ );
967
+ }
968
+ }
969
+
970
+ function copyAndSort(typedArray, comparator) {
971
+ let copy;
972
+ if (typeof typedArray.slice === "function") {
973
+ copy = typedArray.slice();
974
+ if (typeof copy.sort !== "function") {
975
+ // Sliced typed array isn't sortable, so we can't use it.
976
+ copy = undefined;
977
+ }
978
+ }
979
+
980
+ if (!defaultValue.defined(copy)) {
981
+ copy = Array.prototype.slice.call(typedArray);
982
+ }
983
+
984
+ copy.sort(comparator);
985
+
986
+ return copy;
987
+ }
988
+ var createVerticesFromQuantizedTerrainMesh$1 = createTaskProcessorWorker(
989
+ createVerticesFromQuantizedTerrainMesh
990
+ );
991
+
992
+ return createVerticesFromQuantizedTerrainMesh$1;
993
+
994
+ }));