@vcmap/ui 5.0.0-rc.29 → 5.0.0-rc.31

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 (334) hide show
  1. package/build/buildHelpers.js +4 -3
  2. package/config/base.config.json +5 -4
  3. package/config/dev.config.json +8 -0
  4. package/config/graphFeatureInfo.config.json +1 -1
  5. package/config/projects.config.json +2 -2
  6. package/dist/assets/cesium/ThirdParty/Workers/basis_transcoder.js +1 -1
  7. package/dist/assets/cesium/Workers/chunk-227AJNOA.js +59 -0
  8. package/dist/assets/cesium/Workers/chunk-2R5O53JW.js +157 -0
  9. package/dist/assets/cesium/Workers/chunk-34YUDLRP.js +781 -0
  10. package/dist/assets/cesium/Workers/chunk-3W63OHNJ.js +100 -0
  11. package/dist/assets/cesium/Workers/chunk-4MFFIWUA.js +163 -0
  12. package/dist/assets/cesium/Workers/chunk-66QLLS45.js +218 -0
  13. package/dist/assets/cesium/Workers/chunk-6BTKZDRG.js +77 -0
  14. package/dist/assets/cesium/Workers/chunk-A4JVFBQ3.js +101 -0
  15. package/dist/assets/cesium/Workers/chunk-ABADGKYE.js +58 -0
  16. package/dist/assets/cesium/Workers/chunk-AFFLIKOH.js +353 -0
  17. package/dist/assets/cesium/Workers/chunk-AHKEZ2OE.js +629 -0
  18. package/dist/assets/cesium/Workers/chunk-C3SXRKRW.js +476 -0
  19. package/dist/assets/cesium/Workers/chunk-CCFQRR6D.js +55 -0
  20. package/dist/assets/cesium/Workers/chunk-CHHNOC2C.js +1860 -0
  21. package/dist/assets/cesium/Workers/chunk-CTELOFLA.js +196 -0
  22. package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +3273 -0
  23. package/dist/assets/cesium/Workers/chunk-EW2GWJYB.js +44 -0
  24. package/dist/assets/cesium/Workers/chunk-GLZBE3ML.js +421 -0
  25. package/dist/assets/cesium/Workers/chunk-HARLBUOL.js +236 -0
  26. package/dist/assets/cesium/Workers/chunk-HQF437NJ.js +117 -0
  27. package/dist/assets/cesium/Workers/chunk-IPA4EACJ.js +368 -0
  28. package/dist/assets/cesium/Workers/chunk-J3JY6I2C.js +1009 -0
  29. package/dist/assets/cesium/Workers/chunk-JB2LWGH4.js +390 -0
  30. package/dist/assets/cesium/Workers/chunk-JS3AW5BK.js +634 -0
  31. package/dist/assets/cesium/Workers/chunk-K36FEYS7.js +452 -0
  32. package/dist/assets/cesium/Workers/chunk-KD4Y7CZL.js +400 -0
  33. package/dist/assets/cesium/Workers/chunk-KTJSNCK4.js +842 -0
  34. package/dist/assets/cesium/Workers/chunk-LLUNNUJV.js +258 -0
  35. package/dist/assets/cesium/Workers/{package.js → chunk-MPAZH4BF.js} +13 -2
  36. package/dist/assets/cesium/Workers/chunk-MYZB7C4T.js +1258 -0
  37. package/dist/assets/cesium/Workers/chunk-N3JIFFX2.js +501 -0
  38. package/dist/assets/cesium/Workers/chunk-O5AMBQ36.js +430 -0
  39. package/dist/assets/cesium/Workers/chunk-OAVNIRB4.js +124 -0
  40. package/dist/assets/cesium/Workers/chunk-OYFCF4PL.js +171 -0
  41. package/dist/assets/cesium/Workers/chunk-OZJDGN5F.js +1477 -0
  42. package/dist/assets/cesium/Workers/chunk-PCJWUS4M.js +2041 -0
  43. package/dist/assets/cesium/Workers/chunk-PFQBCKBM.js +8644 -0
  44. package/dist/assets/cesium/Workers/chunk-QIKODV5G.js +305 -0
  45. package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +73 -0
  46. package/dist/assets/cesium/Workers/chunk-QMEMZIJI.js +138 -0
  47. package/dist/assets/cesium/Workers/chunk-QT3MPEMI.js +102 -0
  48. package/dist/assets/cesium/Workers/chunk-RP2A7BR5.js +289 -0
  49. package/dist/assets/cesium/Workers/chunk-RW6LU2CJ.js +138 -0
  50. package/dist/assets/cesium/Workers/chunk-TFC6TZ3S.js +757 -0
  51. package/dist/assets/cesium/Workers/chunk-V3NGATMV.js +693 -0
  52. package/dist/assets/cesium/Workers/chunk-VLGOATD6.js +1075 -0
  53. package/dist/assets/cesium/Workers/chunk-WXTV4ATB.js +39 -0
  54. package/dist/assets/cesium/Workers/chunk-X4SU25DT.js +302 -0
  55. package/dist/assets/cesium/Workers/chunk-XTY7B2N6.js +2716 -0
  56. package/dist/assets/cesium/Workers/chunk-XY7MGBKC.js +513 -0
  57. package/dist/assets/cesium/Workers/chunk-Z24VKNDO.js +834 -0
  58. package/dist/assets/cesium/Workers/chunk-ZA25DG4Y.js +684 -0
  59. package/dist/assets/cesium/Workers/chunk-ZFOBYDGF.js +73 -0
  60. package/dist/assets/cesium/Workers/combineGeometry.js +65 -15
  61. package/dist/assets/cesium/Workers/createBoxGeometry.js +55 -10
  62. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +231 -310
  63. package/dist/assets/cesium/Workers/createCircleGeometry.js +185 -202
  64. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +141 -155
  65. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +477 -557
  66. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +218 -230
  67. package/dist/assets/cesium/Workers/createCorridorGeometry.js +1162 -1307
  68. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +533 -569
  69. package/dist/assets/cesium/Workers/createCylinderGeometry.js +57 -10
  70. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +224 -258
  71. package/dist/assets/cesium/Workers/createEllipseGeometry.js +68 -12
  72. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +61 -12
  73. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +56 -10
  74. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +58 -13
  75. package/dist/assets/cesium/Workers/createFrustumGeometry.js +55 -10
  76. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +226 -243
  77. package/dist/assets/cesium/Workers/createGeometry.js +143 -48
  78. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1484 -2011
  79. package/dist/assets/cesium/Workers/createPlaneGeometry.js +216 -243
  80. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +121 -113
  81. package/dist/assets/cesium/Workers/createPolygonGeometry.js +1041 -1327
  82. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +516 -657
  83. package/dist/assets/cesium/Workers/createPolylineGeometry.js +471 -547
  84. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +352 -384
  85. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +271 -295
  86. package/dist/assets/cesium/Workers/createRectangleGeometry.js +1128 -1331
  87. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +445 -500
  88. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +381 -440
  89. package/dist/assets/cesium/Workers/createSphereGeometry.js +112 -118
  90. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +112 -121
  91. package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +32 -127
  92. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +462 -505
  93. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +377 -436
  94. package/dist/assets/cesium/Workers/createVectorTilePoints.js +110 -77
  95. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +369 -391
  96. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +252 -244
  97. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +543 -615
  98. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +2244 -2677
  99. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +682 -926
  100. package/dist/assets/cesium/Workers/createWallGeometry.js +459 -593
  101. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +324 -419
  102. package/dist/assets/cesium/Workers/decodeDraco.js +327 -347
  103. package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2530 -3567
  104. package/dist/assets/cesium/Workers/decodeI3S.js +765 -970
  105. package/dist/assets/cesium/Workers/transcodeKTX2.js +3353 -1464
  106. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +3 -4
  107. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +748 -953
  108. package/dist/assets/{cesium.16590b.js → cesium.77d0f7.js} +8915 -13165
  109. package/dist/assets/cesium.js +1 -1
  110. package/dist/assets/{core.74da2a.js → core.720589.js} +3421 -3365
  111. package/dist/assets/core.js +1 -1
  112. package/dist/assets/index-dd539204.js +1 -0
  113. package/dist/assets/{ol.50a512.js → ol.e48649.js} +4 -4
  114. package/dist/assets/ol.js +1 -1
  115. package/dist/assets/{ui.d3054c.css → ui.50452a.css} +2 -2
  116. package/dist/assets/{ui.d3054c.js → ui.50452a.js} +5312 -4776
  117. package/dist/assets/ui.js +1 -1
  118. package/dist/assets/vue.js +2 -2
  119. package/dist/assets/{vuetify.946bd8.js → vuetify.f0a769.js} +1 -1
  120. package/dist/assets/vuetify.js +2 -2
  121. package/dist/index.html +27 -23
  122. package/index.html +23 -22
  123. package/index.js +6 -0
  124. package/package.json +5 -5
  125. package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +37 -1
  126. package/plugins/@vcmap-show-case/form-inputs-example/index.js +3 -0
  127. package/plugins/@vcmap-show-case/form-inputs-example/validation.js +11 -0
  128. package/plugins/@vcmap-show-case/plugin-editors/PluginEditors.vue +119 -0
  129. package/plugins/@vcmap-show-case/plugin-editors/index.js +41 -0
  130. package/plugins/@vcmap-show-case/plugin-editors/package.json +5 -0
  131. package/plugins/{@vcmap → @vcmap-show-case}/project-selector/ProjectSelectorComponent.vue +1 -1
  132. package/plugins/{@vcmap → @vcmap-show-case}/project-selector/config.json +2 -2
  133. package/plugins/{@vcmap → @vcmap-show-case}/project-selector/package.json +1 -1
  134. package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/package.json +1 -1
  135. package/plugins/@vcmap-show-case/style-input-example/styleExample.vue +0 -1
  136. package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +1 -1
  137. package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/ThemeChangerComponent.vue +1 -1
  138. package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/config.json +2 -2
  139. package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/package.json +1 -1
  140. package/plugins/@vcmap-show-case/vector-properties-example/index.js +40 -0
  141. package/plugins/@vcmap-show-case/vector-properties-example/package.json +5 -0
  142. package/plugins/@vcmap-show-case/vector-properties-example/vectorPropertiesExample.vue +128 -0
  143. package/plugins/package.json +6 -2
  144. package/src/application/VcsAttributions.vue +27 -20
  145. package/src/components/form-inputs-controls/VcsChipArrayInput.vue +290 -0
  146. package/src/components/form-inputs-controls/VcsSlider.vue +1 -0
  147. package/src/components/form-inputs-controls/VcsTextField.vue +9 -3
  148. package/src/components/icons/2DAreaIcon.vue +2 -17
  149. package/src/components/icons/2DDistanceIcon.vue +0 -3
  150. package/src/components/icons/3DAreaIcon.vue +2 -17
  151. package/src/components/icons/3DDistanceIcon.vue +0 -3
  152. package/src/components/icons/3DHeightIcon.vue +0 -3
  153. package/src/components/icons/AngleIcon.vue +0 -1
  154. package/src/components/icons/AssociationsIcon.vue +1 -3
  155. package/src/components/icons/AxisIcon.vue +0 -4
  156. package/src/components/icons/BoundingBoxIcon.vue +1 -4
  157. package/src/components/icons/CheckboxIcon.vue +0 -2
  158. package/src/components/icons/CheckboxIndeterminateIcon.vue +1 -5
  159. package/src/components/icons/CircleIcon.vue +1 -6
  160. package/src/components/icons/ClippingHorizontalIcon.vue +0 -1
  161. package/src/components/icons/ClippingIcon.vue +0 -1
  162. package/src/components/icons/ClippingVerticalIcon.vue +0 -1
  163. package/src/components/icons/ColorPickerIcon.vue +0 -1
  164. package/src/components/icons/ColorSwatchIcon.vue +0 -2
  165. package/src/components/icons/CommentIcon.vue +0 -1
  166. package/src/components/icons/CompassIcon.vue +0 -2
  167. package/src/components/icons/ComponentsIcon.vue +0 -1
  168. package/src/components/icons/ConeIcon.vue +1 -4
  169. package/src/components/icons/DimensionsHouseIcon.vue +0 -2
  170. package/src/components/icons/EditIcon.vue +0 -1
  171. package/src/components/icons/EditVerticesIcon.vue +0 -4
  172. package/src/components/icons/ElevationProfileIcon.vue +1 -13
  173. package/src/components/icons/ExportAreaIcon.vue +0 -1
  174. package/src/components/icons/ExportFlightIcon.vue +0 -1
  175. package/src/components/icons/ExportIcon.vue +12 -8
  176. package/src/components/icons/ExternalLinkIcon.vue +0 -2
  177. package/src/components/icons/FastForwardIcon.vue +0 -1
  178. package/src/components/icons/FilterIcon.vue +0 -1
  179. package/src/components/icons/GlobeNatureIcon.vue +0 -3
  180. package/src/components/icons/GroundIcon.vue +0 -1
  181. package/src/components/icons/HealthCareIndustriesIcon.vue +1 -11
  182. package/src/components/icons/HideIcon.vue +0 -1
  183. package/src/components/icons/HomePointIcon.vue +0 -1
  184. package/src/components/icons/HospitalsIcon.vue +1 -20
  185. package/src/components/icons/HouseIcon.vue +3 -13
  186. package/src/components/icons/ImportIcon.vue +6 -14
  187. package/src/components/icons/InfoIcon.vue +0 -2
  188. package/src/components/icons/KebabIcon.vue +1 -9
  189. package/src/components/icons/LabelIcon.vue +0 -2
  190. package/src/components/icons/LayersIcon.vue +1 -9
  191. package/src/components/icons/LegendIcon.vue +0 -1
  192. package/src/components/icons/LineIcon.vue +0 -2
  193. package/src/components/icons/LinkIcon.vue +0 -1
  194. package/src/components/icons/LogoutIcon.vue +0 -1
  195. package/src/components/icons/MapIcon.vue +0 -2
  196. package/src/components/icons/MenuIcon.vue +1 -5
  197. package/src/components/icons/MinusIcon.vue +0 -2
  198. package/src/components/icons/ObjectSelectIcon.vue +0 -2
  199. package/src/components/icons/ObliqueViewIcon.vue +0 -1
  200. package/src/components/icons/PdfIcon.vue +0 -1
  201. package/src/components/icons/PedestrianIcon.vue +0 -1
  202. package/src/components/icons/PenIcon.vue +0 -1
  203. package/src/components/icons/PlayCircleIcon.vue +1 -8
  204. package/src/components/icons/PlusIcon.vue +0 -2
  205. package/src/components/icons/PoiIcon.vue +0 -1
  206. package/src/components/icons/PointIcon.vue +2 -6
  207. package/src/components/icons/PointSelectIcon.vue +0 -1
  208. package/src/components/icons/PresentationModeIcon.vue +0 -1
  209. package/src/components/icons/ProgressIcon.vue +1 -1
  210. package/src/components/icons/QueryIcon.vue +0 -1
  211. package/src/components/icons/RectangleIcon.vue +1 -6
  212. package/src/components/icons/ReturnIcon.vue +0 -1
  213. package/src/components/icons/RewindIcon.vue +0 -1
  214. package/src/components/icons/RotateLeftIcon.vue +0 -1
  215. package/src/components/icons/RotateRightIcon.vue +0 -1
  216. package/src/components/icons/ScreenshotIcon.vue +1 -6
  217. package/src/components/icons/SearchIcon.vue +0 -1
  218. package/src/components/icons/ShadowIcon.vue +0 -2
  219. package/src/components/icons/ShapesIcon.vue +1 -4
  220. package/src/components/icons/ShareIcon.vue +0 -1
  221. package/src/components/icons/SimpleCircleFilledIcon.vue +0 -1
  222. package/src/components/icons/SimpleCircleHalfFilledIcon.vue +0 -1
  223. package/src/components/icons/SimpleCircleOutlinedIcon.vue +1 -7
  224. package/src/components/icons/SkipPreviousIcon.vue +1 -6
  225. package/src/components/icons/SplitViewIcon.vue +0 -1
  226. package/src/components/icons/TextStyleIcon.vue +0 -3
  227. package/src/components/icons/ThreeDimensionsIcon.vue +0 -1
  228. package/src/components/icons/ToolsIcon.vue +0 -1
  229. package/src/components/icons/TouchIcon.vue +0 -1
  230. package/src/components/icons/TriangleIcon.vue +0 -3
  231. package/src/components/icons/TwoDimensionsIcon.vue +0 -2
  232. package/src/components/icons/UploadIcon.vue +0 -1
  233. package/src/components/icons/UserProfileIcon.vue +0 -1
  234. package/src/components/icons/UserShareIcon.vue +0 -1
  235. package/src/components/icons/ViewpointFlightIcon.vue +0 -1
  236. package/src/components/icons/ViewpointIcon.vue +0 -1
  237. package/src/components/icons/Viewshed360Icon.vue +0 -1
  238. package/src/components/icons/ViewshedConeIcon.vue +0 -1
  239. package/src/components/icons/ViewshedIcon.vue +0 -1
  240. package/src/components/icons/WalkingIcon.vue +0 -1
  241. package/src/components/icons/WallIcon.vue +1 -4
  242. package/src/components/icons/WandIcon.vue +22 -70
  243. package/src/components/lists/VcsList.vue +18 -12
  244. package/src/components/plugins/AbstractConfigEditor.vue +84 -0
  245. package/src/components/style/VcsImageSelector.vue +6 -5
  246. package/src/components/style/VcsTextSelector.vue +1 -1
  247. package/src/components/tables/VcsDataTable.vue +1 -1
  248. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +780 -0
  249. package/src/components/vector-properties/composables.js +93 -0
  250. package/src/contentTree/contentTreeCollection.js +30 -9
  251. package/src/i18n/de.js +41 -7
  252. package/src/i18n/en.js +39 -5
  253. package/src/i18n/i18nCollection.js +19 -65
  254. package/src/manager/buttonManager.js +4 -0
  255. package/src/manager/collectionManager/collectionComponent.js +1 -1
  256. package/src/manager/contextMenu/contextMenuManager.js +2 -0
  257. package/src/pluginHelper.js +57 -17
  258. package/src/vcsUiApp.js +25 -30
  259. package/src/vuePlugins/i18n.js +0 -8
  260. package/dist/assets/cesium/ThirdParty/Workers/draco_decoder_nodejs.js +0 -117
  261. package/dist/assets/cesium/Workers/ArcType-2d9abbbc.js +0 -37
  262. package/dist/assets/cesium/Workers/AttributeCompression-f9f6c717.js +0 -716
  263. package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-4140c51f.js +0 -258
  264. package/dist/assets/cesium/Workers/BoundingRectangle-c714b156.js +0 -369
  265. package/dist/assets/cesium/Workers/BoxGeometry-6f3da43d.js +0 -884
  266. package/dist/assets/cesium/Workers/Check-6ede7e26.js +0 -290
  267. package/dist/assets/cesium/Workers/Color-8a565ff2.js +0 -2262
  268. package/dist/assets/cesium/Workers/ComponentDatatype-cf1fa08e.js +0 -341
  269. package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-4b4d4096.js +0 -132
  270. package/dist/assets/cesium/Workers/CorridorGeometryLibrary-7b94502b.js +0 -498
  271. package/dist/assets/cesium/Workers/CylinderGeometry-ca070b87.js +0 -467
  272. package/dist/assets/cesium/Workers/CylinderGeometryLibrary-7bf291b4.js +0 -63
  273. package/dist/assets/cesium/Workers/EllipseGeometry-122e51fa.js +0 -1304
  274. package/dist/assets/cesium/Workers/EllipseGeometryLibrary-4d326efc.js +0 -366
  275. package/dist/assets/cesium/Workers/EllipseOutlineGeometry-16cc2bd7.js +0 -443
  276. package/dist/assets/cesium/Workers/EllipsoidGeodesic-5b3623dc.js +0 -520
  277. package/dist/assets/cesium/Workers/EllipsoidGeometry-cb148ca2.js +0 -637
  278. package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-0fa10c79.js +0 -454
  279. package/dist/assets/cesium/Workers/EllipsoidRhumbLine-ef872433.js +0 -741
  280. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-6dd1b7af.js +0 -373
  281. package/dist/assets/cesium/Workers/EncodedCartesian3-57415c8a.js +0 -171
  282. package/dist/assets/cesium/Workers/FrustumGeometry-ee73037c.js +0 -2540
  283. package/dist/assets/cesium/Workers/GeometryAttribute-ff5b4fb1.js +0 -619
  284. package/dist/assets/cesium/Workers/GeometryAttributes-ad136444.js +0 -91
  285. package/dist/assets/cesium/Workers/GeometryInstance-34d9e21e.js +0 -121
  286. package/dist/assets/cesium/Workers/GeometryOffsetAttribute-9ad0019c.js +0 -16
  287. package/dist/assets/cesium/Workers/GeometryPipeline-1f8fbf05.js +0 -3690
  288. package/dist/assets/cesium/Workers/IndexDatatype-2643aa47.js +0 -200
  289. package/dist/assets/cesium/Workers/IntersectionTests-70d39ba9.js +0 -1836
  290. package/dist/assets/cesium/Workers/Math-0a2ac845.js +0 -1340
  291. package/dist/assets/cesium/Workers/Matrix2-e1298525.js +0 -7086
  292. package/dist/assets/cesium/Workers/Matrix3-41c58dde.js +0 -4283
  293. package/dist/assets/cesium/Workers/OrientedBoundingBox-159cf1d6.js +0 -1259
  294. package/dist/assets/cesium/Workers/Plane-4c3d403b.js +0 -309
  295. package/dist/assets/cesium/Workers/PolygonGeometryLibrary-076a5d25.js +0 -1074
  296. package/dist/assets/cesium/Workers/PolygonPipeline-b9f2810a.js +0 -1344
  297. package/dist/assets/cesium/Workers/PolylinePipeline-639192e0.js +0 -573
  298. package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-b73549fb.js +0 -781
  299. package/dist/assets/cesium/Workers/PrimitivePipeline-10ede1b6.js +0 -966
  300. package/dist/assets/cesium/Workers/RectangleGeometryLibrary-c35a7356.js +0 -280
  301. package/dist/assets/cesium/Workers/RuntimeError-ef395448.js +0 -68
  302. package/dist/assets/cesium/Workers/TerrainEncoding-668d242f.js +0 -1227
  303. package/dist/assets/cesium/Workers/Transforms-a2a85221.js +0 -14712
  304. package/dist/assets/cesium/Workers/VertexFormat-030f11ff.js +0 -312
  305. package/dist/assets/cesium/Workers/WallGeometryLibrary-1938bf0d.js +0 -211
  306. package/dist/assets/cesium/Workers/WebGLConstants-0b1ce7ba.js +0 -620
  307. package/dist/assets/cesium/Workers/WebMercatorProjection-13ed1a6e.js +0 -151
  308. package/dist/assets/cesium/Workers/arrayRemoveDuplicates-d2061e85.js +0 -129
  309. package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +0 -1363
  310. package/dist/assets/cesium/Workers/combine-d9581036.js +0 -82
  311. package/dist/assets/cesium/Workers/defaultValue-fe22d8c0.js +0 -51
  312. package/dist/assets/index-cb070eff.js +0 -1
  313. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -76
  314. package/plugins/@vcmap/create-link/index.js +0 -95
  315. package/plugins/@vcmap/create-link/package.json +0 -6
  316. package/plugins/@vcmap/search-nominatim/LICENSE.md +0 -13
  317. package/plugins/@vcmap/search-nominatim/README.md +0 -3
  318. package/plugins/@vcmap/search-nominatim/config.json +0 -3
  319. package/plugins/@vcmap/search-nominatim/index.js +0 -29
  320. package/plugins/@vcmap/search-nominatim/nominatim.js +0 -175
  321. package/plugins/@vcmap/search-nominatim/package.json +0 -9
  322. /package/dist/assets/{vue.30740e.js → vue.5d696e.js} +0 -0
  323. /package/dist/assets/{vuetify.946bd8.css → vuetify.f0a769.css} +0 -0
  324. /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/ModulesListComponent.vue +0 -0
  325. /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/README.md +0 -0
  326. /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/de.json +0 -0
  327. /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/en.json +0 -0
  328. /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/index.js +0 -0
  329. /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/README.md +0 -0
  330. /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/SimpleGraphComponent.vue +0 -0
  331. /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/index.js +0 -0
  332. /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/simpleGraphView.js +0 -0
  333. /package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/README.md +0 -0
  334. /package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/index.js +0 -0
@@ -1,1340 +0,0 @@
1
- define(['exports', './Check-6ede7e26', './defaultValue-fe22d8c0'], (function (exports, Check, defaultValue) { 'use strict';
2
-
3
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
-
5
- function getDefaultExportFromCjs (x) {
6
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
7
- }
8
-
9
- /*
10
- https://github.com/banksean wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
11
- so it's better encapsulated. Now you can have multiple random number generators
12
- and they won't stomp all over eachother's state.
13
-
14
- If you want to use this as a substitute for Math.random(), use the random()
15
- method like so:
16
-
17
- var m = new MersenneTwister();
18
- var randomNumber = m.random();
19
-
20
- You can also call the other genrand_{foo}() methods on the instance.
21
-
22
- If you want to use a specific seed in order to get a repeatable random
23
- sequence, pass an integer into the constructor:
24
-
25
- var m = new MersenneTwister(123);
26
-
27
- and that will always produce the same random sequence.
28
-
29
- Sean McCullough (banksean@gmail.com)
30
- */
31
-
32
- /*
33
- A C-program for MT19937, with initialization improved 2002/1/26.
34
- Coded by Takuji Nishimura and Makoto Matsumoto.
35
-
36
- Before using, initialize the state by using init_seed(seed)
37
- or init_by_array(init_key, key_length).
38
-
39
- Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
40
- All rights reserved.
41
-
42
- Redistribution and use in source and binary forms, with or without
43
- modification, are permitted provided that the following conditions
44
- are met:
45
-
46
- 1. Redistributions of source code must retain the above copyright
47
- notice, this list of conditions and the following disclaimer.
48
-
49
- 2. Redistributions in binary form must reproduce the above copyright
50
- notice, this list of conditions and the following disclaimer in the
51
- documentation and/or other materials provided with the distribution.
52
-
53
- 3. The names of its contributors may not be used to endorse or promote
54
- products derived from this software without specific prior written
55
- permission.
56
-
57
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
58
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
59
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
60
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
61
- CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
62
- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
63
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
64
- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
65
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
66
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
67
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68
-
69
-
70
- Any feedback is very welcome.
71
- http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
72
- email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
73
- */
74
-
75
- var MersenneTwister = function(seed) {
76
- if (seed == undefined) {
77
- seed = new Date().getTime();
78
- }
79
-
80
- /* Period parameters */
81
- this.N = 624;
82
- this.M = 397;
83
- this.MATRIX_A = 0x9908b0df; /* constant vector a */
84
- this.UPPER_MASK = 0x80000000; /* most significant w-r bits */
85
- this.LOWER_MASK = 0x7fffffff; /* least significant r bits */
86
-
87
- this.mt = new Array(this.N); /* the array for the state vector */
88
- this.mti=this.N+1; /* mti==N+1 means mt[N] is not initialized */
89
-
90
- if (seed.constructor == Array) {
91
- this.init_by_array(seed, seed.length);
92
- }
93
- else {
94
- this.init_seed(seed);
95
- }
96
- };
97
-
98
- /* initializes mt[N] with a seed */
99
- /* origin name init_genrand */
100
- MersenneTwister.prototype.init_seed = function(s) {
101
- this.mt[0] = s >>> 0;
102
- for (this.mti=1; this.mti<this.N; this.mti++) {
103
- var s = this.mt[this.mti-1] ^ (this.mt[this.mti-1] >>> 30);
104
- this.mt[this.mti] = (((((s & 0xffff0000) >>> 16) * 1812433253) << 16) + (s & 0x0000ffff) * 1812433253)
105
- + this.mti;
106
- /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
107
- /* In the previous versions, MSBs of the seed affect */
108
- /* only MSBs of the array mt[]. */
109
- /* 2002/01/09 modified by Makoto Matsumoto */
110
- this.mt[this.mti] >>>= 0;
111
- /* for >32 bit machines */
112
- }
113
- };
114
-
115
- /* initialize by an array with array-length */
116
- /* init_key is the array for initializing keys */
117
- /* key_length is its length */
118
- /* slight change for C++, 2004/2/26 */
119
- MersenneTwister.prototype.init_by_array = function(init_key, key_length) {
120
- var i, j, k;
121
- this.init_seed(19650218);
122
- i=1; j=0;
123
- k = (this.N>key_length ? this.N : key_length);
124
- for (; k; k--) {
125
- var s = this.mt[i-1] ^ (this.mt[i-1] >>> 30);
126
- this.mt[i] = (this.mt[i] ^ (((((s & 0xffff0000) >>> 16) * 1664525) << 16) + ((s & 0x0000ffff) * 1664525)))
127
- + init_key[j] + j; /* non linear */
128
- this.mt[i] >>>= 0; /* for WORDSIZE > 32 machines */
129
- i++; j++;
130
- if (i>=this.N) { this.mt[0] = this.mt[this.N-1]; i=1; }
131
- if (j>=key_length) j=0;
132
- }
133
- for (k=this.N-1; k; k--) {
134
- var s = this.mt[i-1] ^ (this.mt[i-1] >>> 30);
135
- this.mt[i] = (this.mt[i] ^ (((((s & 0xffff0000) >>> 16) * 1566083941) << 16) + (s & 0x0000ffff) * 1566083941))
136
- - i; /* non linear */
137
- this.mt[i] >>>= 0; /* for WORDSIZE > 32 machines */
138
- i++;
139
- if (i>=this.N) { this.mt[0] = this.mt[this.N-1]; i=1; }
140
- }
141
-
142
- this.mt[0] = 0x80000000; /* MSB is 1; assuring non-zero initial array */
143
- };
144
-
145
- /* generates a random number on [0,0xffffffff]-interval */
146
- /* origin name genrand_int32 */
147
- MersenneTwister.prototype.random_int = function() {
148
- var y;
149
- var mag01 = new Array(0x0, this.MATRIX_A);
150
- /* mag01[x] = x * MATRIX_A for x=0,1 */
151
-
152
- if (this.mti >= this.N) { /* generate N words at one time */
153
- var kk;
154
-
155
- if (this.mti == this.N+1) /* if init_seed() has not been called, */
156
- this.init_seed(5489); /* a default initial seed is used */
157
-
158
- for (kk=0;kk<this.N-this.M;kk++) {
159
- y = (this.mt[kk]&this.UPPER_MASK)|(this.mt[kk+1]&this.LOWER_MASK);
160
- this.mt[kk] = this.mt[kk+this.M] ^ (y >>> 1) ^ mag01[y & 0x1];
161
- }
162
- for (;kk<this.N-1;kk++) {
163
- y = (this.mt[kk]&this.UPPER_MASK)|(this.mt[kk+1]&this.LOWER_MASK);
164
- this.mt[kk] = this.mt[kk+(this.M-this.N)] ^ (y >>> 1) ^ mag01[y & 0x1];
165
- }
166
- y = (this.mt[this.N-1]&this.UPPER_MASK)|(this.mt[0]&this.LOWER_MASK);
167
- this.mt[this.N-1] = this.mt[this.M-1] ^ (y >>> 1) ^ mag01[y & 0x1];
168
-
169
- this.mti = 0;
170
- }
171
-
172
- y = this.mt[this.mti++];
173
-
174
- /* Tempering */
175
- y ^= (y >>> 11);
176
- y ^= (y << 7) & 0x9d2c5680;
177
- y ^= (y << 15) & 0xefc60000;
178
- y ^= (y >>> 18);
179
-
180
- return y >>> 0;
181
- };
182
-
183
- /* generates a random number on [0,0x7fffffff]-interval */
184
- /* origin name genrand_int31 */
185
- MersenneTwister.prototype.random_int31 = function() {
186
- return (this.random_int()>>>1);
187
- };
188
-
189
- /* generates a random number on [0,1]-real-interval */
190
- /* origin name genrand_real1 */
191
- MersenneTwister.prototype.random_incl = function() {
192
- return this.random_int()*(1.0/4294967295.0);
193
- /* divided by 2^32-1 */
194
- };
195
-
196
- /* generates a random number on [0,1)-real-interval */
197
- MersenneTwister.prototype.random = function() {
198
- return this.random_int()*(1.0/4294967296.0);
199
- /* divided by 2^32 */
200
- };
201
-
202
- /* generates a random number on (0,1)-real-interval */
203
- /* origin name genrand_real3 */
204
- MersenneTwister.prototype.random_excl = function() {
205
- return (this.random_int() + 0.5)*(1.0/4294967296.0);
206
- /* divided by 2^32 */
207
- };
208
-
209
- /* generates a random number on [0,1) with 53-bit resolution*/
210
- /* origin name genrand_res53 */
211
- MersenneTwister.prototype.random_long = function() {
212
- var a=this.random_int()>>>5, b=this.random_int()>>>6;
213
- return (a*67108864.0+b)*(1.0/9007199254740992.0);
214
- };
215
-
216
- /* These real versions are due to Isaku Wada, 2002/01/09 added */
217
-
218
- var mersenneTwister = MersenneTwister;
219
-
220
- var MersenneTwister$1 = /*@__PURE__*/getDefaultExportFromCjs(mersenneTwister);
221
-
222
- /**
223
- * Math functions.
224
- *
225
- * @exports CesiumMath
226
- * @alias Math
227
- */
228
- const CesiumMath = {};
229
-
230
- /**
231
- * 0.1
232
- * @type {number}
233
- * @constant
234
- */
235
- CesiumMath.EPSILON1 = 0.1;
236
-
237
- /**
238
- * 0.01
239
- * @type {number}
240
- * @constant
241
- */
242
- CesiumMath.EPSILON2 = 0.01;
243
-
244
- /**
245
- * 0.001
246
- * @type {number}
247
- * @constant
248
- */
249
- CesiumMath.EPSILON3 = 0.001;
250
-
251
- /**
252
- * 0.0001
253
- * @type {number}
254
- * @constant
255
- */
256
- CesiumMath.EPSILON4 = 0.0001;
257
-
258
- /**
259
- * 0.00001
260
- * @type {number}
261
- * @constant
262
- */
263
- CesiumMath.EPSILON5 = 0.00001;
264
-
265
- /**
266
- * 0.000001
267
- * @type {number}
268
- * @constant
269
- */
270
- CesiumMath.EPSILON6 = 0.000001;
271
-
272
- /**
273
- * 0.0000001
274
- * @type {number}
275
- * @constant
276
- */
277
- CesiumMath.EPSILON7 = 0.0000001;
278
-
279
- /**
280
- * 0.00000001
281
- * @type {number}
282
- * @constant
283
- */
284
- CesiumMath.EPSILON8 = 0.00000001;
285
-
286
- /**
287
- * 0.000000001
288
- * @type {number}
289
- * @constant
290
- */
291
- CesiumMath.EPSILON9 = 0.000000001;
292
-
293
- /**
294
- * 0.0000000001
295
- * @type {number}
296
- * @constant
297
- */
298
- CesiumMath.EPSILON10 = 0.0000000001;
299
-
300
- /**
301
- * 0.00000000001
302
- * @type {number}
303
- * @constant
304
- */
305
- CesiumMath.EPSILON11 = 0.00000000001;
306
-
307
- /**
308
- * 0.000000000001
309
- * @type {number}
310
- * @constant
311
- */
312
- CesiumMath.EPSILON12 = 0.000000000001;
313
-
314
- /**
315
- * 0.0000000000001
316
- * @type {number}
317
- * @constant
318
- */
319
- CesiumMath.EPSILON13 = 0.0000000000001;
320
-
321
- /**
322
- * 0.00000000000001
323
- * @type {number}
324
- * @constant
325
- */
326
- CesiumMath.EPSILON14 = 0.00000000000001;
327
-
328
- /**
329
- * 0.000000000000001
330
- * @type {number}
331
- * @constant
332
- */
333
- CesiumMath.EPSILON15 = 0.000000000000001;
334
-
335
- /**
336
- * 0.0000000000000001
337
- * @type {number}
338
- * @constant
339
- */
340
- CesiumMath.EPSILON16 = 0.0000000000000001;
341
-
342
- /**
343
- * 0.00000000000000001
344
- * @type {number}
345
- * @constant
346
- */
347
- CesiumMath.EPSILON17 = 0.00000000000000001;
348
-
349
- /**
350
- * 0.000000000000000001
351
- * @type {number}
352
- * @constant
353
- */
354
- CesiumMath.EPSILON18 = 0.000000000000000001;
355
-
356
- /**
357
- * 0.0000000000000000001
358
- * @type {number}
359
- * @constant
360
- */
361
- CesiumMath.EPSILON19 = 0.0000000000000000001;
362
-
363
- /**
364
- * 0.00000000000000000001
365
- * @type {number}
366
- * @constant
367
- */
368
- CesiumMath.EPSILON20 = 0.00000000000000000001;
369
-
370
- /**
371
- * 0.000000000000000000001
372
- * @type {number}
373
- * @constant
374
- */
375
- CesiumMath.EPSILON21 = 0.000000000000000000001;
376
-
377
- /**
378
- * The gravitational parameter of the Earth in meters cubed
379
- * per second squared as defined by the WGS84 model: 3.986004418e14
380
- * @type {number}
381
- * @constant
382
- */
383
- CesiumMath.GRAVITATIONALPARAMETER = 3.986004418e14;
384
-
385
- /**
386
- * Radius of the sun in meters: 6.955e8
387
- * @type {number}
388
- * @constant
389
- */
390
- CesiumMath.SOLAR_RADIUS = 6.955e8;
391
-
392
- /**
393
- * The mean radius of the moon, according to the "Report of the IAU/IAG Working Group on
394
- * Cartographic Coordinates and Rotational Elements of the Planets and satellites: 2000",
395
- * Celestial Mechanics 82: 83-110, 2002.
396
- * @type {number}
397
- * @constant
398
- */
399
- CesiumMath.LUNAR_RADIUS = 1737400.0;
400
-
401
- /**
402
- * 64 * 1024
403
- * @type {number}
404
- * @constant
405
- */
406
- CesiumMath.SIXTY_FOUR_KILOBYTES = 64 * 1024;
407
-
408
- /**
409
- * 4 * 1024 * 1024 * 1024
410
- * @type {number}
411
- * @constant
412
- */
413
- CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
414
-
415
- /**
416
- * Returns the sign of the value; 1 if the value is positive, -1 if the value is
417
- * negative, or 0 if the value is 0.
418
- *
419
- * @function
420
- * @param {number} value The value to return the sign of.
421
- * @returns {number} The sign of value.
422
- */
423
- // eslint-disable-next-line es/no-math-sign
424
- CesiumMath.sign = defaultValue.defaultValue(Math.sign, function sign(value) {
425
- value = +value; // coerce to number
426
- if (value === 0 || value !== value) {
427
- // zero or NaN
428
- return value;
429
- }
430
- return value > 0 ? 1 : -1;
431
- });
432
-
433
- /**
434
- * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative.
435
- * This is similar to {@link CesiumMath#sign} except that returns 1.0 instead of
436
- * 0.0 when the input value is 0.0.
437
- * @param {number} value The value to return the sign of.
438
- * @returns {number} The sign of value.
439
- */
440
- CesiumMath.signNotZero = function (value) {
441
- return value < 0.0 ? -1.0 : 1.0;
442
- };
443
-
444
- /**
445
- * Converts a scalar value in the range [-1.0, 1.0] to a SNORM in the range [0, rangeMaximum]
446
- * @param {number} value The scalar value in the range [-1.0, 1.0]
447
- * @param {number} [rangeMaximum=255] The maximum value in the mapped range, 255 by default.
448
- * @returns {number} A SNORM value, where 0 maps to -1.0 and rangeMaximum maps to 1.0.
449
- *
450
- * @see CesiumMath.fromSNorm
451
- */
452
- CesiumMath.toSNorm = function (value, rangeMaximum) {
453
- rangeMaximum = defaultValue.defaultValue(rangeMaximum, 255);
454
- return Math.round(
455
- (CesiumMath.clamp(value, -1.0, 1.0) * 0.5 + 0.5) * rangeMaximum
456
- );
457
- };
458
-
459
- /**
460
- * Converts a SNORM value in the range [0, rangeMaximum] to a scalar in the range [-1.0, 1.0].
461
- * @param {number} value SNORM value in the range [0, rangeMaximum]
462
- * @param {number} [rangeMaximum=255] The maximum value in the SNORM range, 255 by default.
463
- * @returns {number} Scalar in the range [-1.0, 1.0].
464
- *
465
- * @see CesiumMath.toSNorm
466
- */
467
- CesiumMath.fromSNorm = function (value, rangeMaximum) {
468
- rangeMaximum = defaultValue.defaultValue(rangeMaximum, 255);
469
- return (
470
- (CesiumMath.clamp(value, 0.0, rangeMaximum) / rangeMaximum) * 2.0 - 1.0
471
- );
472
- };
473
-
474
- /**
475
- * Converts a scalar value in the range [rangeMinimum, rangeMaximum] to a scalar in the range [0.0, 1.0]
476
- * @param {number} value The scalar value in the range [rangeMinimum, rangeMaximum]
477
- * @param {number} rangeMinimum The minimum value in the mapped range.
478
- * @param {number} rangeMaximum The maximum value in the mapped range.
479
- * @returns {number} A scalar value, where rangeMinimum maps to 0.0 and rangeMaximum maps to 1.0.
480
- */
481
- CesiumMath.normalize = function (value, rangeMinimum, rangeMaximum) {
482
- rangeMaximum = Math.max(rangeMaximum - rangeMinimum, 0.0);
483
- return rangeMaximum === 0.0
484
- ? 0.0
485
- : CesiumMath.clamp((value - rangeMinimum) / rangeMaximum, 0.0, 1.0);
486
- };
487
-
488
- /**
489
- * Returns the hyperbolic sine of a number.
490
- * The hyperbolic sine of <em>value</em> is defined to be
491
- * (<em>e<sup>x</sup>&nbsp;-&nbsp;e<sup>-x</sup></em>)/2.0
492
- * where <i>e</i> is Euler's number, approximately 2.71828183.
493
- *
494
- * <p>Special cases:
495
- * <ul>
496
- * <li>If the argument is NaN, then the result is NaN.</li>
497
- *
498
- * <li>If the argument is infinite, then the result is an infinity
499
- * with the same sign as the argument.</li>
500
- *
501
- * <li>If the argument is zero, then the result is a zero with the
502
- * same sign as the argument.</li>
503
- * </ul>
504
- *</p>
505
- *
506
- * @function
507
- * @param {number} value The number whose hyperbolic sine is to be returned.
508
- * @returns {number} The hyperbolic sine of <code>value</code>.
509
- */
510
- // eslint-disable-next-line es/no-math-sinh
511
- CesiumMath.sinh = defaultValue.defaultValue(Math.sinh, function sinh(value) {
512
- return (Math.exp(value) - Math.exp(-value)) / 2.0;
513
- });
514
-
515
- /**
516
- * Returns the hyperbolic cosine of a number.
517
- * The hyperbolic cosine of <strong>value</strong> is defined to be
518
- * (<em>e<sup>x</sup>&nbsp;+&nbsp;e<sup>-x</sup></em>)/2.0
519
- * where <i>e</i> is Euler's number, approximately 2.71828183.
520
- *
521
- * <p>Special cases:
522
- * <ul>
523
- * <li>If the argument is NaN, then the result is NaN.</li>
524
- *
525
- * <li>If the argument is infinite, then the result is positive infinity.</li>
526
- *
527
- * <li>If the argument is zero, then the result is 1.0.</li>
528
- * </ul>
529
- *</p>
530
- *
531
- * @function
532
- * @param {number} value The number whose hyperbolic cosine is to be returned.
533
- * @returns {number} The hyperbolic cosine of <code>value</code>.
534
- */
535
- // eslint-disable-next-line es/no-math-cosh
536
- CesiumMath.cosh = defaultValue.defaultValue(Math.cosh, function cosh(value) {
537
- return (Math.exp(value) + Math.exp(-value)) / 2.0;
538
- });
539
-
540
- /**
541
- * Computes the linear interpolation of two values.
542
- *
543
- * @param {number} p The start value to interpolate.
544
- * @param {number} q The end value to interpolate.
545
- * @param {number} time The time of interpolation generally in the range <code>[0.0, 1.0]</code>.
546
- * @returns {number} The linearly interpolated value.
547
- *
548
- * @example
549
- * const n = Cesium.Math.lerp(0.0, 2.0, 0.5); // returns 1.0
550
- */
551
- CesiumMath.lerp = function (p, q, time) {
552
- return (1.0 - time) * p + time * q;
553
- };
554
-
555
- /**
556
- * pi
557
- *
558
- * @type {number}
559
- * @constant
560
- */
561
- CesiumMath.PI = Math.PI;
562
-
563
- /**
564
- * 1/pi
565
- *
566
- * @type {number}
567
- * @constant
568
- */
569
- CesiumMath.ONE_OVER_PI = 1.0 / Math.PI;
570
-
571
- /**
572
- * pi/2
573
- *
574
- * @type {number}
575
- * @constant
576
- */
577
- CesiumMath.PI_OVER_TWO = Math.PI / 2.0;
578
-
579
- /**
580
- * pi/3
581
- *
582
- * @type {number}
583
- * @constant
584
- */
585
- CesiumMath.PI_OVER_THREE = Math.PI / 3.0;
586
-
587
- /**
588
- * pi/4
589
- *
590
- * @type {number}
591
- * @constant
592
- */
593
- CesiumMath.PI_OVER_FOUR = Math.PI / 4.0;
594
-
595
- /**
596
- * pi/6
597
- *
598
- * @type {number}
599
- * @constant
600
- */
601
- CesiumMath.PI_OVER_SIX = Math.PI / 6.0;
602
-
603
- /**
604
- * 3pi/2
605
- *
606
- * @type {number}
607
- * @constant
608
- */
609
- CesiumMath.THREE_PI_OVER_TWO = (3.0 * Math.PI) / 2.0;
610
-
611
- /**
612
- * 2pi
613
- *
614
- * @type {number}
615
- * @constant
616
- */
617
- CesiumMath.TWO_PI = 2.0 * Math.PI;
618
-
619
- /**
620
- * 1/2pi
621
- *
622
- * @type {number}
623
- * @constant
624
- */
625
- CesiumMath.ONE_OVER_TWO_PI = 1.0 / (2.0 * Math.PI);
626
-
627
- /**
628
- * The number of radians in a degree.
629
- *
630
- * @type {number}
631
- * @constant
632
- */
633
- CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180.0;
634
-
635
- /**
636
- * The number of degrees in a radian.
637
- *
638
- * @type {number}
639
- * @constant
640
- */
641
- CesiumMath.DEGREES_PER_RADIAN = 180.0 / Math.PI;
642
-
643
- /**
644
- * The number of radians in an arc second.
645
- *
646
- * @type {number}
647
- * @constant
648
- */
649
- CesiumMath.RADIANS_PER_ARCSECOND = CesiumMath.RADIANS_PER_DEGREE / 3600.0;
650
-
651
- /**
652
- * Converts degrees to radians.
653
- * @param {number} degrees The angle to convert in degrees.
654
- * @returns {number} The corresponding angle in radians.
655
- */
656
- CesiumMath.toRadians = function (degrees) {
657
- //>>includeStart('debug', pragmas.debug);
658
- if (!defaultValue.defined(degrees)) {
659
- throw new Check.DeveloperError("degrees is required.");
660
- }
661
- //>>includeEnd('debug');
662
- return degrees * CesiumMath.RADIANS_PER_DEGREE;
663
- };
664
-
665
- /**
666
- * Converts radians to degrees.
667
- * @param {number} radians The angle to convert in radians.
668
- * @returns {number} The corresponding angle in degrees.
669
- */
670
- CesiumMath.toDegrees = function (radians) {
671
- //>>includeStart('debug', pragmas.debug);
672
- if (!defaultValue.defined(radians)) {
673
- throw new Check.DeveloperError("radians is required.");
674
- }
675
- //>>includeEnd('debug');
676
- return radians * CesiumMath.DEGREES_PER_RADIAN;
677
- };
678
-
679
- /**
680
- * Converts a longitude value, in radians, to the range [<code>-Math.PI</code>, <code>Math.PI</code>).
681
- *
682
- * @param {number} angle The longitude value, in radians, to convert to the range [<code>-Math.PI</code>, <code>Math.PI</code>).
683
- * @returns {number} The equivalent longitude value in the range [<code>-Math.PI</code>, <code>Math.PI</code>).
684
- *
685
- * @example
686
- * // Convert 270 degrees to -90 degrees longitude
687
- * const longitude = Cesium.Math.convertLongitudeRange(Cesium.Math.toRadians(270.0));
688
- */
689
- CesiumMath.convertLongitudeRange = function (angle) {
690
- //>>includeStart('debug', pragmas.debug);
691
- if (!defaultValue.defined(angle)) {
692
- throw new Check.DeveloperError("angle is required.");
693
- }
694
- //>>includeEnd('debug');
695
- const twoPi = CesiumMath.TWO_PI;
696
-
697
- const simplified = angle - Math.floor(angle / twoPi) * twoPi;
698
-
699
- if (simplified < -Math.PI) {
700
- return simplified + twoPi;
701
- }
702
- if (simplified >= Math.PI) {
703
- return simplified - twoPi;
704
- }
705
-
706
- return simplified;
707
- };
708
-
709
- /**
710
- * Convenience function that clamps a latitude value, in radians, to the range [<code>-Math.PI/2</code>, <code>Math.PI/2</code>).
711
- * Useful for sanitizing data before use in objects requiring correct range.
712
- *
713
- * @param {number} angle The latitude value, in radians, to clamp to the range [<code>-Math.PI/2</code>, <code>Math.PI/2</code>).
714
- * @returns {number} The latitude value clamped to the range [<code>-Math.PI/2</code>, <code>Math.PI/2</code>).
715
- *
716
- * @example
717
- * // Clamp 108 degrees latitude to 90 degrees latitude
718
- * const latitude = Cesium.Math.clampToLatitudeRange(Cesium.Math.toRadians(108.0));
719
- */
720
- CesiumMath.clampToLatitudeRange = function (angle) {
721
- //>>includeStart('debug', pragmas.debug);
722
- if (!defaultValue.defined(angle)) {
723
- throw new Check.DeveloperError("angle is required.");
724
- }
725
- //>>includeEnd('debug');
726
-
727
- return CesiumMath.clamp(
728
- angle,
729
- -1 * CesiumMath.PI_OVER_TWO,
730
- CesiumMath.PI_OVER_TWO
731
- );
732
- };
733
-
734
- /**
735
- * Produces an angle in the range -Pi <= angle <= Pi which is equivalent to the provided angle.
736
- *
737
- * @param {number} angle in radians
738
- * @returns {number} The angle in the range [<code>-CesiumMath.PI</code>, <code>CesiumMath.PI</code>].
739
- */
740
- CesiumMath.negativePiToPi = function (angle) {
741
- //>>includeStart('debug', pragmas.debug);
742
- if (!defaultValue.defined(angle)) {
743
- throw new Check.DeveloperError("angle is required.");
744
- }
745
- //>>includeEnd('debug');
746
- if (angle >= -CesiumMath.PI && angle <= CesiumMath.PI) {
747
- // Early exit if the input is already inside the range. This avoids
748
- // unnecessary math which could introduce floating point error.
749
- return angle;
750
- }
751
- return CesiumMath.zeroToTwoPi(angle + CesiumMath.PI) - CesiumMath.PI;
752
- };
753
-
754
- /**
755
- * Produces an angle in the range 0 <= angle <= 2Pi which is equivalent to the provided angle.
756
- *
757
- * @param {number} angle in radians
758
- * @returns {number} The angle in the range [0, <code>CesiumMath.TWO_PI</code>].
759
- */
760
- CesiumMath.zeroToTwoPi = function (angle) {
761
- //>>includeStart('debug', pragmas.debug);
762
- if (!defaultValue.defined(angle)) {
763
- throw new Check.DeveloperError("angle is required.");
764
- }
765
- //>>includeEnd('debug');
766
- if (angle >= 0 && angle <= CesiumMath.TWO_PI) {
767
- // Early exit if the input is already inside the range. This avoids
768
- // unnecessary math which could introduce floating point error.
769
- return angle;
770
- }
771
- const mod = CesiumMath.mod(angle, CesiumMath.TWO_PI);
772
- if (
773
- Math.abs(mod) < CesiumMath.EPSILON14 &&
774
- Math.abs(angle) > CesiumMath.EPSILON14
775
- ) {
776
- return CesiumMath.TWO_PI;
777
- }
778
- return mod;
779
- };
780
-
781
- /**
782
- * The modulo operation that also works for negative dividends.
783
- *
784
- * @param {number} m The dividend.
785
- * @param {number} n The divisor.
786
- * @returns {number} The remainder.
787
- */
788
- CesiumMath.mod = function (m, n) {
789
- //>>includeStart('debug', pragmas.debug);
790
- if (!defaultValue.defined(m)) {
791
- throw new Check.DeveloperError("m is required.");
792
- }
793
- if (!defaultValue.defined(n)) {
794
- throw new Check.DeveloperError("n is required.");
795
- }
796
- if (n === 0.0) {
797
- throw new Check.DeveloperError("divisor cannot be 0.");
798
- }
799
- //>>includeEnd('debug');
800
- if (CesiumMath.sign(m) === CesiumMath.sign(n) && Math.abs(m) < Math.abs(n)) {
801
- // Early exit if the input does not need to be modded. This avoids
802
- // unnecessary math which could introduce floating point error.
803
- return m;
804
- }
805
-
806
- return ((m % n) + n) % n;
807
- };
808
-
809
- /**
810
- * Determines if two values are equal using an absolute or relative tolerance test. This is useful
811
- * to avoid problems due to roundoff error when comparing floating-point values directly. The values are
812
- * first compared using an absolute tolerance test. If that fails, a relative tolerance test is performed.
813
- * Use this test if you are unsure of the magnitudes of left and right.
814
- *
815
- * @param {number} left The first value to compare.
816
- * @param {number} right The other value to compare.
817
- * @param {number} [relativeEpsilon=0] The maximum inclusive delta between <code>left</code> and <code>right</code> for the relative tolerance test.
818
- * @param {number} [absoluteEpsilon=relativeEpsilon] The maximum inclusive delta between <code>left</code> and <code>right</code> for the absolute tolerance test.
819
- * @returns {boolean} <code>true</code> if the values are equal within the epsilon; otherwise, <code>false</code>.
820
- *
821
- * @example
822
- * const a = Cesium.Math.equalsEpsilon(0.0, 0.01, Cesium.Math.EPSILON2); // true
823
- * const b = Cesium.Math.equalsEpsilon(0.0, 0.1, Cesium.Math.EPSILON2); // false
824
- * const c = Cesium.Math.equalsEpsilon(3699175.1634344, 3699175.2, Cesium.Math.EPSILON7); // true
825
- * const d = Cesium.Math.equalsEpsilon(3699175.1634344, 3699175.2, Cesium.Math.EPSILON9); // false
826
- */
827
- CesiumMath.equalsEpsilon = function (
828
- left,
829
- right,
830
- relativeEpsilon,
831
- absoluteEpsilon
832
- ) {
833
- //>>includeStart('debug', pragmas.debug);
834
- if (!defaultValue.defined(left)) {
835
- throw new Check.DeveloperError("left is required.");
836
- }
837
- if (!defaultValue.defined(right)) {
838
- throw new Check.DeveloperError("right is required.");
839
- }
840
- //>>includeEnd('debug');
841
-
842
- relativeEpsilon = defaultValue.defaultValue(relativeEpsilon, 0.0);
843
- absoluteEpsilon = defaultValue.defaultValue(absoluteEpsilon, relativeEpsilon);
844
- const absDiff = Math.abs(left - right);
845
- return (
846
- absDiff <= absoluteEpsilon ||
847
- absDiff <= relativeEpsilon * Math.max(Math.abs(left), Math.abs(right))
848
- );
849
- };
850
-
851
- /**
852
- * Determines if the left value is less than the right value. If the two values are within
853
- * <code>absoluteEpsilon</code> of each other, they are considered equal and this function returns false.
854
- *
855
- * @param {number} left The first number to compare.
856
- * @param {number} right The second number to compare.
857
- * @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
858
- * @returns {boolean} <code>true</code> if <code>left</code> is less than <code>right</code> by more than
859
- * <code>absoluteEpsilon<code>. <code>false</code> if <code>left</code> is greater or if the two
860
- * values are nearly equal.
861
- */
862
- CesiumMath.lessThan = function (left, right, absoluteEpsilon) {
863
- //>>includeStart('debug', pragmas.debug);
864
- if (!defaultValue.defined(left)) {
865
- throw new Check.DeveloperError("first is required.");
866
- }
867
- if (!defaultValue.defined(right)) {
868
- throw new Check.DeveloperError("second is required.");
869
- }
870
- if (!defaultValue.defined(absoluteEpsilon)) {
871
- throw new Check.DeveloperError("absoluteEpsilon is required.");
872
- }
873
- //>>includeEnd('debug');
874
- return left - right < -absoluteEpsilon;
875
- };
876
-
877
- /**
878
- * Determines if the left value is less than or equal to the right value. If the two values are within
879
- * <code>absoluteEpsilon</code> of each other, they are considered equal and this function returns true.
880
- *
881
- * @param {number} left The first number to compare.
882
- * @param {number} right The second number to compare.
883
- * @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
884
- * @returns {boolean} <code>true</code> if <code>left</code> is less than <code>right</code> or if the
885
- * the values are nearly equal.
886
- */
887
- CesiumMath.lessThanOrEquals = function (left, right, absoluteEpsilon) {
888
- //>>includeStart('debug', pragmas.debug);
889
- if (!defaultValue.defined(left)) {
890
- throw new Check.DeveloperError("first is required.");
891
- }
892
- if (!defaultValue.defined(right)) {
893
- throw new Check.DeveloperError("second is required.");
894
- }
895
- if (!defaultValue.defined(absoluteEpsilon)) {
896
- throw new Check.DeveloperError("absoluteEpsilon is required.");
897
- }
898
- //>>includeEnd('debug');
899
- return left - right < absoluteEpsilon;
900
- };
901
-
902
- /**
903
- * Determines if the left value is greater the right value. If the two values are within
904
- * <code>absoluteEpsilon</code> of each other, they are considered equal and this function returns false.
905
- *
906
- * @param {number} left The first number to compare.
907
- * @param {number} right The second number to compare.
908
- * @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
909
- * @returns {boolean} <code>true</code> if <code>left</code> is greater than <code>right</code> by more than
910
- * <code>absoluteEpsilon<code>. <code>false</code> if <code>left</code> is less or if the two
911
- * values are nearly equal.
912
- */
913
- CesiumMath.greaterThan = function (left, right, absoluteEpsilon) {
914
- //>>includeStart('debug', pragmas.debug);
915
- if (!defaultValue.defined(left)) {
916
- throw new Check.DeveloperError("first is required.");
917
- }
918
- if (!defaultValue.defined(right)) {
919
- throw new Check.DeveloperError("second is required.");
920
- }
921
- if (!defaultValue.defined(absoluteEpsilon)) {
922
- throw new Check.DeveloperError("absoluteEpsilon is required.");
923
- }
924
- //>>includeEnd('debug');
925
- return left - right > absoluteEpsilon;
926
- };
927
-
928
- /**
929
- * Determines if the left value is greater than or equal to the right value. If the two values are within
930
- * <code>absoluteEpsilon</code> of each other, they are considered equal and this function returns true.
931
- *
932
- * @param {number} left The first number to compare.
933
- * @param {number} right The second number to compare.
934
- * @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
935
- * @returns {boolean} <code>true</code> if <code>left</code> is greater than <code>right</code> or if the
936
- * the values are nearly equal.
937
- */
938
- CesiumMath.greaterThanOrEquals = function (left, right, absoluteEpsilon) {
939
- //>>includeStart('debug', pragmas.debug);
940
- if (!defaultValue.defined(left)) {
941
- throw new Check.DeveloperError("first is required.");
942
- }
943
- if (!defaultValue.defined(right)) {
944
- throw new Check.DeveloperError("second is required.");
945
- }
946
- if (!defaultValue.defined(absoluteEpsilon)) {
947
- throw new Check.DeveloperError("absoluteEpsilon is required.");
948
- }
949
- //>>includeEnd('debug');
950
- return left - right > -absoluteEpsilon;
951
- };
952
-
953
- const factorials = [1];
954
-
955
- /**
956
- * Computes the factorial of the provided number.
957
- *
958
- * @param {number} n The number whose factorial is to be computed.
959
- * @returns {number} The factorial of the provided number or undefined if the number is less than 0.
960
- *
961
- * @exception {DeveloperError} A number greater than or equal to 0 is required.
962
- *
963
- *
964
- * @example
965
- * //Compute 7!, which is equal to 5040
966
- * const computedFactorial = Cesium.Math.factorial(7);
967
- *
968
- * @see {@link http://en.wikipedia.org/wiki/Factorial|Factorial on Wikipedia}
969
- */
970
- CesiumMath.factorial = function (n) {
971
- //>>includeStart('debug', pragmas.debug);
972
- if (typeof n !== "number" || n < 0) {
973
- throw new Check.DeveloperError(
974
- "A number greater than or equal to 0 is required."
975
- );
976
- }
977
- //>>includeEnd('debug');
978
-
979
- const length = factorials.length;
980
- if (n >= length) {
981
- let sum = factorials[length - 1];
982
- for (let i = length; i <= n; i++) {
983
- const next = sum * i;
984
- factorials.push(next);
985
- sum = next;
986
- }
987
- }
988
- return factorials[n];
989
- };
990
-
991
- /**
992
- * Increments a number with a wrapping to a minimum value if the number exceeds the maximum value.
993
- *
994
- * @param {number} [n] The number to be incremented.
995
- * @param {number} [maximumValue] The maximum incremented value before rolling over to the minimum value.
996
- * @param {number} [minimumValue=0.0] The number reset to after the maximum value has been exceeded.
997
- * @returns {number} The incremented number.
998
- *
999
- * @exception {DeveloperError} Maximum value must be greater than minimum value.
1000
- *
1001
- * @example
1002
- * const n = Cesium.Math.incrementWrap(5, 10, 0); // returns 6
1003
- * const m = Cesium.Math.incrementWrap(10, 10, 0); // returns 0
1004
- */
1005
- CesiumMath.incrementWrap = function (n, maximumValue, minimumValue) {
1006
- minimumValue = defaultValue.defaultValue(minimumValue, 0.0);
1007
-
1008
- //>>includeStart('debug', pragmas.debug);
1009
- if (!defaultValue.defined(n)) {
1010
- throw new Check.DeveloperError("n is required.");
1011
- }
1012
- if (maximumValue <= minimumValue) {
1013
- throw new Check.DeveloperError("maximumValue must be greater than minimumValue.");
1014
- }
1015
- //>>includeEnd('debug');
1016
-
1017
- ++n;
1018
- if (n > maximumValue) {
1019
- n = minimumValue;
1020
- }
1021
- return n;
1022
- };
1023
-
1024
- /**
1025
- * Determines if a non-negative integer is a power of two.
1026
- * The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript.
1027
- *
1028
- * @param {number} n The integer to test in the range [0, (2^32)-1].
1029
- * @returns {boolean} <code>true</code> if the number if a power of two; otherwise, <code>false</code>.
1030
- *
1031
- * @exception {DeveloperError} A number between 0 and (2^32)-1 is required.
1032
- *
1033
- * @example
1034
- * const t = Cesium.Math.isPowerOfTwo(16); // true
1035
- * const f = Cesium.Math.isPowerOfTwo(20); // false
1036
- */
1037
- CesiumMath.isPowerOfTwo = function (n) {
1038
- //>>includeStart('debug', pragmas.debug);
1039
- if (typeof n !== "number" || n < 0 || n > 4294967295) {
1040
- throw new Check.DeveloperError("A number between 0 and (2^32)-1 is required.");
1041
- }
1042
- //>>includeEnd('debug');
1043
-
1044
- return n !== 0 && (n & (n - 1)) === 0;
1045
- };
1046
-
1047
- /**
1048
- * Computes the next power-of-two integer greater than or equal to the provided non-negative integer.
1049
- * The maximum allowed input is 2^31 due to 32-bit bitwise operator limitation in Javascript.
1050
- *
1051
- * @param {number} n The integer to test in the range [0, 2^31].
1052
- * @returns {number} The next power-of-two integer.
1053
- *
1054
- * @exception {DeveloperError} A number between 0 and 2^31 is required.
1055
- *
1056
- * @example
1057
- * const n = Cesium.Math.nextPowerOfTwo(29); // 32
1058
- * const m = Cesium.Math.nextPowerOfTwo(32); // 32
1059
- */
1060
- CesiumMath.nextPowerOfTwo = function (n) {
1061
- //>>includeStart('debug', pragmas.debug);
1062
- if (typeof n !== "number" || n < 0 || n > 2147483648) {
1063
- throw new Check.DeveloperError("A number between 0 and 2^31 is required.");
1064
- }
1065
- //>>includeEnd('debug');
1066
-
1067
- // From http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
1068
- --n;
1069
- n |= n >> 1;
1070
- n |= n >> 2;
1071
- n |= n >> 4;
1072
- n |= n >> 8;
1073
- n |= n >> 16;
1074
- ++n;
1075
-
1076
- return n;
1077
- };
1078
-
1079
- /**
1080
- * Computes the previous power-of-two integer less than or equal to the provided non-negative integer.
1081
- * The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript.
1082
- *
1083
- * @param {number} n The integer to test in the range [0, (2^32)-1].
1084
- * @returns {number} The previous power-of-two integer.
1085
- *
1086
- * @exception {DeveloperError} A number between 0 and (2^32)-1 is required.
1087
- *
1088
- * @example
1089
- * const n = Cesium.Math.previousPowerOfTwo(29); // 16
1090
- * const m = Cesium.Math.previousPowerOfTwo(32); // 32
1091
- */
1092
- CesiumMath.previousPowerOfTwo = function (n) {
1093
- //>>includeStart('debug', pragmas.debug);
1094
- if (typeof n !== "number" || n < 0 || n > 4294967295) {
1095
- throw new Check.DeveloperError("A number between 0 and (2^32)-1 is required.");
1096
- }
1097
- //>>includeEnd('debug');
1098
-
1099
- n |= n >> 1;
1100
- n |= n >> 2;
1101
- n |= n >> 4;
1102
- n |= n >> 8;
1103
- n |= n >> 16;
1104
- n |= n >> 32;
1105
-
1106
- // The previous bitwise operations implicitly convert to signed 32-bit. Use `>>>` to convert to unsigned
1107
- n = (n >>> 0) - (n >>> 1);
1108
-
1109
- return n;
1110
- };
1111
-
1112
- /**
1113
- * Constraint a value to lie between two values.
1114
- *
1115
- * @param {number} value The value to clamp.
1116
- * @param {number} min The minimum value.
1117
- * @param {number} max The maximum value.
1118
- * @returns {number} The clamped value such that min <= result <= max.
1119
- */
1120
- CesiumMath.clamp = function (value, min, max) {
1121
- //>>includeStart('debug', pragmas.debug);
1122
- Check.Check.typeOf.number("value", value);
1123
- Check.Check.typeOf.number("min", min);
1124
- Check.Check.typeOf.number("max", max);
1125
- //>>includeEnd('debug');
1126
-
1127
- return value < min ? min : value > max ? max : value;
1128
- };
1129
-
1130
- let randomNumberGenerator = new MersenneTwister$1();
1131
-
1132
- /**
1133
- * Sets the seed used by the random number generator
1134
- * in {@link CesiumMath#nextRandomNumber}.
1135
- *
1136
- * @param {number} seed An integer used as the seed.
1137
- */
1138
- CesiumMath.setRandomNumberSeed = function (seed) {
1139
- //>>includeStart('debug', pragmas.debug);
1140
- if (!defaultValue.defined(seed)) {
1141
- throw new Check.DeveloperError("seed is required.");
1142
- }
1143
- //>>includeEnd('debug');
1144
-
1145
- randomNumberGenerator = new MersenneTwister$1(seed);
1146
- };
1147
-
1148
- /**
1149
- * Generates a random floating point number in the range of [0.0, 1.0)
1150
- * using a Mersenne twister.
1151
- *
1152
- * @returns {number} A random number in the range of [0.0, 1.0).
1153
- *
1154
- * @see CesiumMath.setRandomNumberSeed
1155
- * @see {@link http://en.wikipedia.org/wiki/Mersenne_twister|Mersenne twister on Wikipedia}
1156
- */
1157
- CesiumMath.nextRandomNumber = function () {
1158
- return randomNumberGenerator.random();
1159
- };
1160
-
1161
- /**
1162
- * Generates a random number between two numbers.
1163
- *
1164
- * @param {number} min The minimum value.
1165
- * @param {number} max The maximum value.
1166
- * @returns {number} A random number between the min and max.
1167
- */
1168
- CesiumMath.randomBetween = function (min, max) {
1169
- return CesiumMath.nextRandomNumber() * (max - min) + min;
1170
- };
1171
-
1172
- /**
1173
- * Computes <code>Math.acos(value)</code>, but first clamps <code>value</code> to the range [-1.0, 1.0]
1174
- * so that the function will never return NaN.
1175
- *
1176
- * @param {number} value The value for which to compute acos.
1177
- * @returns {number} The acos of the value if the value is in the range [-1.0, 1.0], or the acos of -1.0 or 1.0,
1178
- * whichever is closer, if the value is outside the range.
1179
- */
1180
- CesiumMath.acosClamped = function (value) {
1181
- //>>includeStart('debug', pragmas.debug);
1182
- if (!defaultValue.defined(value)) {
1183
- throw new Check.DeveloperError("value is required.");
1184
- }
1185
- //>>includeEnd('debug');
1186
- return Math.acos(CesiumMath.clamp(value, -1.0, 1.0));
1187
- };
1188
-
1189
- /**
1190
- * Computes <code>Math.asin(value)</code>, but first clamps <code>value</code> to the range [-1.0, 1.0]
1191
- * so that the function will never return NaN.
1192
- *
1193
- * @param {number} value The value for which to compute asin.
1194
- * @returns {number} The asin of the value if the value is in the range [-1.0, 1.0], or the asin of -1.0 or 1.0,
1195
- * whichever is closer, if the value is outside the range.
1196
- */
1197
- CesiumMath.asinClamped = function (value) {
1198
- //>>includeStart('debug', pragmas.debug);
1199
- if (!defaultValue.defined(value)) {
1200
- throw new Check.DeveloperError("value is required.");
1201
- }
1202
- //>>includeEnd('debug');
1203
- return Math.asin(CesiumMath.clamp(value, -1.0, 1.0));
1204
- };
1205
-
1206
- /**
1207
- * Finds the chord length between two points given the circle's radius and the angle between the points.
1208
- *
1209
- * @param {number} angle The angle between the two points.
1210
- * @param {number} radius The radius of the circle.
1211
- * @returns {number} The chord length.
1212
- */
1213
- CesiumMath.chordLength = function (angle, radius) {
1214
- //>>includeStart('debug', pragmas.debug);
1215
- if (!defaultValue.defined(angle)) {
1216
- throw new Check.DeveloperError("angle is required.");
1217
- }
1218
- if (!defaultValue.defined(radius)) {
1219
- throw new Check.DeveloperError("radius is required.");
1220
- }
1221
- //>>includeEnd('debug');
1222
- return 2.0 * radius * Math.sin(angle * 0.5);
1223
- };
1224
-
1225
- /**
1226
- * Finds the logarithm of a number to a base.
1227
- *
1228
- * @param {number} number The number.
1229
- * @param {number} base The base.
1230
- * @returns {number} The result.
1231
- */
1232
- CesiumMath.logBase = function (number, base) {
1233
- //>>includeStart('debug', pragmas.debug);
1234
- if (!defaultValue.defined(number)) {
1235
- throw new Check.DeveloperError("number is required.");
1236
- }
1237
- if (!defaultValue.defined(base)) {
1238
- throw new Check.DeveloperError("base is required.");
1239
- }
1240
- //>>includeEnd('debug');
1241
- return Math.log(number) / Math.log(base);
1242
- };
1243
-
1244
- /**
1245
- * Finds the cube root of a number.
1246
- * Returns NaN if <code>number</code> is not provided.
1247
- *
1248
- * @function
1249
- * @param {number} [number] The number.
1250
- * @returns {number} The result.
1251
- */
1252
- // eslint-disable-next-line es/no-math-cbrt
1253
- CesiumMath.cbrt = defaultValue.defaultValue(Math.cbrt, function cbrt(number) {
1254
- const result = Math.pow(Math.abs(number), 1.0 / 3.0);
1255
- return number < 0.0 ? -result : result;
1256
- });
1257
-
1258
- /**
1259
- * Finds the base 2 logarithm of a number.
1260
- *
1261
- * @function
1262
- * @param {number} number The number.
1263
- * @returns {number} The result.
1264
- */
1265
- // eslint-disable-next-line es/no-math-log2
1266
- CesiumMath.log2 = defaultValue.defaultValue(Math.log2, function log2(number) {
1267
- return Math.log(number) * Math.LOG2E;
1268
- });
1269
-
1270
- /**
1271
- * @private
1272
- */
1273
- CesiumMath.fog = function (distanceToCamera, density) {
1274
- const scalar = distanceToCamera * density;
1275
- return 1.0 - Math.exp(-(scalar * scalar));
1276
- };
1277
-
1278
- /**
1279
- * Computes a fast approximation of Atan for input in the range [-1, 1].
1280
- *
1281
- * Based on Michal Drobot's approximation from ShaderFastLibs,
1282
- * which in turn is based on "Efficient approximations for the arctangent function,"
1283
- * Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
1284
- * Adapted from ShaderFastLibs under MIT License.
1285
- *
1286
- * @param {number} x An input number in the range [-1, 1]
1287
- * @returns {number} An approximation of atan(x)
1288
- */
1289
- CesiumMath.fastApproximateAtan = function (x) {
1290
- //>>includeStart('debug', pragmas.debug);
1291
- Check.Check.typeOf.number("x", x);
1292
- //>>includeEnd('debug');
1293
-
1294
- return x * (-0.1784 * Math.abs(x) - 0.0663 * x * x + 1.0301);
1295
- };
1296
-
1297
- /**
1298
- * Computes a fast approximation of Atan2(x, y) for arbitrary input scalars.
1299
- *
1300
- * Range reduction math based on nvidia's cg reference implementation: http://developer.download.nvidia.com/cg/atan2.html
1301
- *
1302
- * @param {number} x An input number that isn't zero if y is zero.
1303
- * @param {number} y An input number that isn't zero if x is zero.
1304
- * @returns {number} An approximation of atan2(x, y)
1305
- */
1306
- CesiumMath.fastApproximateAtan2 = function (x, y) {
1307
- //>>includeStart('debug', pragmas.debug);
1308
- Check.Check.typeOf.number("x", x);
1309
- Check.Check.typeOf.number("y", y);
1310
- //>>includeEnd('debug');
1311
-
1312
- // atan approximations are usually only reliable over [-1, 1]
1313
- // So reduce the range by flipping whether x or y is on top based on which is bigger.
1314
- let opposite;
1315
- let t = Math.abs(x); // t used as swap and atan result.
1316
- opposite = Math.abs(y);
1317
- const adjacent = Math.max(t, opposite);
1318
- opposite = Math.min(t, opposite);
1319
-
1320
- const oppositeOverAdjacent = opposite / adjacent;
1321
- //>>includeStart('debug', pragmas.debug);
1322
- if (isNaN(oppositeOverAdjacent)) {
1323
- throw new Check.DeveloperError("either x or y must be nonzero");
1324
- }
1325
- //>>includeEnd('debug');
1326
- t = CesiumMath.fastApproximateAtan(oppositeOverAdjacent);
1327
-
1328
- // Undo range reduction
1329
- t = Math.abs(y) > Math.abs(x) ? CesiumMath.PI_OVER_TWO - t : t;
1330
- t = x < 0.0 ? CesiumMath.PI - t : t;
1331
- t = y < 0.0 ? -t : t;
1332
- return t;
1333
- };
1334
- var CesiumMath$1 = CesiumMath;
1335
-
1336
- exports.CesiumMath = CesiumMath$1;
1337
- exports.commonjsGlobal = commonjsGlobal;
1338
- exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
1339
-
1340
- }));