@openglobus/og 0.24.1 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (778) hide show
  1. package/lib/{js/Globe.d.ts → Globe.d.ts} +16 -18
  2. package/lib/{js/Object3d.d.ts → Object3d.d.ts} +1 -1
  3. package/lib/{@openglobus/js/camera → camera}/Camera.d.ts +16 -22
  4. package/lib/{@openglobus/js/camera → camera}/Frustum.d.ts +1 -1
  5. package/lib/control/CameraFrameComposer.d.ts +35 -0
  6. package/lib/control/KeyboardNavigation.d.ts +32 -0
  7. package/lib/control/MouseWheelZoomControl.d.ts +1 -0
  8. package/lib/{js/control → control/atmosphere}/Atmosphere.d.ts +9 -6
  9. package/lib/{@openglobus/js/control → control/atmosphere}/AtmosphereConfig.d.ts +6 -6
  10. package/lib/{js/control → control}/index.d.ts +3 -1
  11. package/lib/control/object3dManager/Object3dCollection.d.ts +21 -0
  12. package/lib/control/object3dManager/Object3dCollectionView.d.ts +15 -0
  13. package/lib/control/object3dManager/Object3dItemView.d.ts +10 -0
  14. package/lib/control/object3dManager/Object3dManager.d.ts +28 -0
  15. package/lib/control/object3dManager/Object3dManagerDialog.d.ts +23 -0
  16. package/lib/{js/control → control}/visibleExtent/Segment.d.ts +3 -3
  17. package/lib/entity/LabelWorker.worker.d.ts +1 -0
  18. package/lib/{@openglobus/js/index.d.ts → index.d.ts} +1 -0
  19. package/lib/og.css +1 -0
  20. package/lib/og.es.js +1 -0
  21. package/lib/{@openglobus/js/renderer → renderer}/Renderer.d.ts +28 -28
  22. package/lib/{@openglobus/js/scene → scene}/Planet.d.ts +3 -3
  23. package/lib/{@openglobus/js/segment → segment}/Segment.d.ts +1 -1
  24. package/lib/{js/segment → segment}/segmentHelper.d.ts +1 -1
  25. package/lib/{@openglobus/js/shaders → shaders/atmos}/atmos.d.ts +7 -5
  26. package/lib/{@openglobus/js/shaders → shaders/billboard}/billboard.d.ts +1 -1
  27. package/lib/shaders/drawnode/drawnode.d.ts +8 -0
  28. package/lib/{@openglobus/js/shaders/geoObject.d.ts → shaders/geo_object/geo_object.d.ts} +1 -1
  29. package/lib/{@openglobus/js/shaders → shaders/label}/label.d.ts +1 -1
  30. package/lib/{@openglobus/js/shaders → shaders/polyline}/polyline.d.ts +1 -1
  31. package/lib/shaders/ray/ray.d.ts +2 -0
  32. package/lib/{@openglobus/js/shaders → shaders/tone_mapping}/toneMapping.d.ts +1 -1
  33. package/lib/tsconfig.tsbuildinfo +1 -0
  34. package/lib/{@openglobus/js/ui → ui}/Dialog.d.ts +1 -1
  35. package/lib/{@openglobus/js/ui → ui}/View.d.ts +1 -0
  36. package/lib/{@openglobus/js/utils → utils}/BaseWorker.d.ts +2 -2
  37. package/lib/utils/PlainSegmentWorker.worker.d.ts +1 -0
  38. package/lib/utils/TerrainWorker.worker.d.ts +1 -0
  39. package/lib/{@openglobus/js/utils → utils}/objParser.d.ts +1 -1
  40. package/lib/{js/utils → utils}/shared.d.ts +16 -0
  41. package/lib/{js/webgl → webgl}/Framebuffer.d.ts +21 -5
  42. package/lib/{@openglobus/js/webgl → webgl}/Handler.d.ts +0 -1
  43. package/package.json +76 -68
  44. package/res/fonts/Ephesis-Regular.json +4648 -0
  45. package/res/fonts/Ephesis-Regular.ttf.cfg +1282 -0
  46. package/res/fonts/Ephesis-Regular.ttf.png +0 -0
  47. package/res/fonts/Karla-Bold.json +5252 -0
  48. package/res/fonts/Karla-Bold.ttf.cfg +920 -0
  49. package/res/fonts/Karla-Bold.ttf.png +0 -0
  50. package/res/fonts/Karla-Light.json +5252 -0
  51. package/res/fonts/Karla-Light.ttf.cfg +830 -0
  52. package/res/fonts/Karla-Light.ttf.png +0 -0
  53. package/res/fonts/Karla-Medium.json +5252 -0
  54. package/res/fonts/Karla-Medium.ttf.cfg +1196 -0
  55. package/res/fonts/Karla-Medium.ttf.png +0 -0
  56. package/res/fonts/NotoSansArabic-Regular.json +3332 -0
  57. package/res/fonts/NotoSansArabic-Regular.ttf.cfg +1370 -0
  58. package/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
  59. package/res/fonts/Roboto-Regular.json +37147 -0
  60. package/res/fonts/Roboto-Regular.ttf.cfg +1340 -0
  61. package/res/fonts/Roboto-Regular.ttf.png +0 -0
  62. package/res/fonts/arial.js +4325 -0
  63. package/res/fonts/arial.json +4321 -0
  64. package/res/fonts/arial.ttf.cfg +1570 -0
  65. package/res/fonts/arial.ttf.png +0 -0
  66. package/res/night-4326.png +0 -0
  67. package/res/night.png +0 -0
  68. package/res/spec.png +0 -0
  69. package/css/og.css +0 -1342
  70. package/lib/@openglobus/js/Globe.d.ts +0 -145
  71. package/lib/@openglobus/js/Object3d.d.ts +0 -81
  72. package/lib/@openglobus/js/control/Atmosphere.d.ts +0 -40
  73. package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +0 -28
  74. package/lib/@openglobus/js/control/index.d.ts +0 -30
  75. package/lib/@openglobus/js/segment/segmentHelper.d.ts +0 -18
  76. package/lib/@openglobus/js/shaders/bloom.d.ts +0 -2
  77. package/lib/@openglobus/js/shaders/blur.d.ts +0 -3
  78. package/lib/@openglobus/js/shaders/drawnode.d.ts +0 -10
  79. package/lib/@openglobus/js/shaders/lumFilter.d.ts +0 -2
  80. package/lib/@openglobus/js/shaders/ray.d.ts +0 -2
  81. package/lib/@openglobus/js/shaders/utils.d.ts +0 -1
  82. package/lib/@openglobus/js/utils/shared.d.ts +0 -287
  83. package/lib/@openglobus/js/webgl/Framebuffer.d.ts +0 -97
  84. package/lib/@openglobus/og.css +0 -1
  85. package/lib/@openglobus/og.esm.js +0 -2
  86. package/lib/@openglobus/og.esm.js.map +0 -1
  87. package/lib/@openglobus/og.umd.js +0 -2
  88. package/lib/@openglobus/og.umd.js.map +0 -1
  89. package/lib/js/Clock.d.ts +0 -106
  90. package/lib/js/Clock.js +0 -141
  91. package/lib/js/Deferred.d.ts +0 -6
  92. package/lib/js/Deferred.js +0 -13
  93. package/lib/js/Events.d.ts +0 -90
  94. package/lib/js/Events.js +0 -145
  95. package/lib/js/Extent.d.ts +0 -145
  96. package/lib/js/Extent.js +0 -278
  97. package/lib/js/Globe.js +0 -289
  98. package/lib/js/ImageCanvas.d.ts +0 -128
  99. package/lib/js/ImageCanvas.js +0 -203
  100. package/lib/js/Lock.d.ts +0 -15
  101. package/lib/js/Lock.js +0 -27
  102. package/lib/js/LonLat.d.ts +0 -128
  103. package/lib/js/LonLat.js +0 -192
  104. package/lib/js/Object3d.js +0 -508
  105. package/lib/js/Popup.d.ts +0 -49
  106. package/lib/js/Popup.js +0 -160
  107. package/lib/js/QueueArray.d.ts +0 -16
  108. package/lib/js/QueueArray.js +0 -63
  109. package/lib/js/Rectangle.d.ts +0 -76
  110. package/lib/js/Rectangle.js +0 -77
  111. package/lib/js/Stack.d.ts +0 -20
  112. package/lib/js/Stack.js +0 -42
  113. package/lib/js/astro/astro.d.ts +0 -39
  114. package/lib/js/astro/astro.js +0 -43
  115. package/lib/js/astro/earth.d.ts +0 -8
  116. package/lib/js/astro/earth.js +0 -75
  117. package/lib/js/astro/jd.d.ts +0 -234
  118. package/lib/js/astro/jd.js +0 -416
  119. package/lib/js/astro/orbit.d.ts +0 -5
  120. package/lib/js/astro/orbit.js +0 -104
  121. package/lib/js/astro/rotation.d.ts +0 -2
  122. package/lib/js/astro/rotation.js +0 -25
  123. package/lib/js/bv/Box.d.ts +0 -32
  124. package/lib/js/bv/Box.js +0 -53
  125. package/lib/js/bv/Sphere.d.ts +0 -37
  126. package/lib/js/bv/Sphere.js +0 -31
  127. package/lib/js/bv/index.d.ts +0 -3
  128. package/lib/js/bv/index.js +0 -3
  129. package/lib/js/camera/Camera.d.ts +0 -361
  130. package/lib/js/camera/Camera.js +0 -541
  131. package/lib/js/camera/Frustum.d.ts +0 -142
  132. package/lib/js/camera/Frustum.js +0 -246
  133. package/lib/js/camera/PlanetCamera.d.ts +0 -247
  134. package/lib/js/camera/PlanetCamera.js +0 -513
  135. package/lib/js/camera/index.d.ts +0 -3
  136. package/lib/js/camera/index.js +0 -3
  137. package/lib/js/cons.d.ts +0 -40
  138. package/lib/js/cons.js +0 -92
  139. package/lib/js/control/Atmosphere.js +0 -401
  140. package/lib/js/control/AtmosphereConfig.d.ts +0 -59
  141. package/lib/js/control/AtmosphereConfig.js +0 -348
  142. package/lib/js/control/CameraLock.d.ts +0 -38
  143. package/lib/js/control/CameraLock.js +0 -216
  144. package/lib/js/control/CompassButton.d.ts +0 -16
  145. package/lib/js/control/CompassButton.js +0 -118
  146. package/lib/js/control/Control.d.ts +0 -100
  147. package/lib/js/control/Control.js +0 -137
  148. package/lib/js/control/DebugInfo.d.ts +0 -25
  149. package/lib/js/control/DebugInfo.js +0 -318
  150. package/lib/js/control/DrawingSwitcher.d.ts +0 -13
  151. package/lib/js/control/DrawingSwitcher.js +0 -94
  152. package/lib/js/control/EarthCoordinates.d.ts +0 -41
  153. package/lib/js/control/EarthCoordinates.js +0 -161
  154. package/lib/js/control/GeoImageDragControl.d.ts +0 -22
  155. package/lib/js/control/GeoImageDragControl.js +0 -102
  156. package/lib/js/control/KeyboardNavigation.d.ts +0 -28
  157. package/lib/js/control/KeyboardNavigation.js +0 -143
  158. package/lib/js/control/LayerAnimation.d.ts +0 -71
  159. package/lib/js/control/LayerAnimation.js +0 -283
  160. package/lib/js/control/LayerSwitcher.d.ts +0 -38
  161. package/lib/js/control/LayerSwitcher.js +0 -151
  162. package/lib/js/control/Lighting.d.ts +0 -54
  163. package/lib/js/control/Lighting.js +0 -459
  164. package/lib/js/control/MouseNavigation.d.ts +0 -76
  165. package/lib/js/control/MouseNavigation.js +0 -414
  166. package/lib/js/control/MouseWheelZoomControl.d.ts +0 -0
  167. package/lib/js/control/MouseWheelZoomControl.js +0 -270
  168. package/lib/js/control/OldMouseNavigation.d.ts +0 -65
  169. package/lib/js/control/OldMouseNavigation.js +0 -368
  170. package/lib/js/control/RulerSwitcher.d.ts +0 -18
  171. package/lib/js/control/RulerSwitcher.js +0 -57
  172. package/lib/js/control/ScaleControl.d.ts +0 -25
  173. package/lib/js/control/ScaleControl.js +0 -97
  174. package/lib/js/control/SegmentBoundVisualization.d.ts +0 -13
  175. package/lib/js/control/SegmentBoundVisualization.js +0 -37
  176. package/lib/js/control/ShowFps.d.ts +0 -10
  177. package/lib/js/control/ShowFps.js +0 -20
  178. package/lib/js/control/SimpleNavigation.d.ts +0 -43
  179. package/lib/js/control/SimpleNavigation.js +0 -196
  180. package/lib/js/control/SimpleSkyBackground.d.ts +0 -18
  181. package/lib/js/control/SimpleSkyBackground.js +0 -187
  182. package/lib/js/control/Sun.d.ts +0 -34
  183. package/lib/js/control/Sun.js +0 -117
  184. package/lib/js/control/ToggleWireframe.d.ts +0 -15
  185. package/lib/js/control/ToggleWireframe.js +0 -28
  186. package/lib/js/control/TouchNavigation.d.ts +0 -53
  187. package/lib/js/control/TouchNavigation.js +0 -266
  188. package/lib/js/control/ZoomControl.d.ts +0 -28
  189. package/lib/js/control/ZoomControl.js +0 -86
  190. package/lib/js/control/drawing/DrawingControl.d.ts +0 -12
  191. package/lib/js/control/drawing/DrawingControl.js +0 -35
  192. package/lib/js/control/drawing/LineStringDrawingScene.d.ts +0 -15
  193. package/lib/js/control/drawing/LineStringDrawingScene.js +0 -139
  194. package/lib/js/control/drawing/PolygonDrawingScene.d.ts +0 -98
  195. package/lib/js/control/drawing/PolygonDrawingScene.js +0 -534
  196. package/lib/js/control/elevationProfile/ElevationProfile.d.ts +0 -77
  197. package/lib/js/control/elevationProfile/ElevationProfile.js +0 -248
  198. package/lib/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +0 -15
  199. package/lib/js/control/elevationProfile/ElevationProfileButtonsView.js +0 -61
  200. package/lib/js/control/elevationProfile/ElevationProfileControl.d.ts +0 -33
  201. package/lib/js/control/elevationProfile/ElevationProfileControl.js +0 -153
  202. package/lib/js/control/elevationProfile/ElevationProfileLegend.d.ts +0 -20
  203. package/lib/js/control/elevationProfile/ElevationProfileLegend.js +0 -82
  204. package/lib/js/control/elevationProfile/ElevationProfileScene.d.ts +0 -80
  205. package/lib/js/control/elevationProfile/ElevationProfileScene.js +0 -542
  206. package/lib/js/control/elevationProfile/ElevationProfileView.d.ts +0 -65
  207. package/lib/js/control/elevationProfile/ElevationProfileView.js +0 -504
  208. package/lib/js/control/elevationProfile/PointListDialog.d.ts +0 -12
  209. package/lib/js/control/elevationProfile/PointListDialog.js +0 -57
  210. package/lib/js/control/geoObjectEditor/ArrowEntity.d.ts +0 -15
  211. package/lib/js/control/geoObjectEditor/ArrowEntity.js +0 -59
  212. package/lib/js/control/geoObjectEditor/AxisTrackEntity.d.ts +0 -9
  213. package/lib/js/control/geoObjectEditor/AxisTrackEntity.js +0 -93
  214. package/lib/js/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
  215. package/lib/js/control/geoObjectEditor/GeoObjectEditor.js +0 -30
  216. package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +0 -69
  217. package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.js +0 -488
  218. package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +0 -127
  219. package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.js +0 -549
  220. package/lib/js/control/geoObjectEditor/MoveAxisEntity.d.ts +0 -17
  221. package/lib/js/control/geoObjectEditor/MoveAxisEntity.js +0 -107
  222. package/lib/js/control/geoObjectEditor/MovePlaneEntity.d.ts +0 -7
  223. package/lib/js/control/geoObjectEditor/MovePlaneEntity.js +0 -31
  224. package/lib/js/control/geoObjectEditor/RotateEntity.d.ts +0 -9
  225. package/lib/js/control/geoObjectEditor/RotateEntity.js +0 -105
  226. package/lib/js/control/geoObjectEditor/colors.d.ts +0 -8
  227. package/lib/js/control/geoObjectEditor/colors.js +0 -8
  228. package/lib/js/control/heightRuler/HeightRuler.d.ts +0 -7
  229. package/lib/js/control/heightRuler/HeightRuler.js +0 -11
  230. package/lib/js/control/heightRuler/HeightRulerScene.d.ts +0 -35
  231. package/lib/js/control/heightRuler/HeightRulerScene.js +0 -181
  232. package/lib/js/control/heightRuler/HeightRulerSwitcher.d.ts +0 -6
  233. package/lib/js/control/heightRuler/HeightRulerSwitcher.js +0 -13
  234. package/lib/js/control/index.js +0 -30
  235. package/lib/js/control/ruler/Ruler.d.ts +0 -14
  236. package/lib/js/control/ruler/Ruler.js +0 -23
  237. package/lib/js/control/ruler/RulerScene.d.ts +0 -88
  238. package/lib/js/control/ruler/RulerScene.js +0 -324
  239. package/lib/js/control/selection/Selection.d.ts +0 -56
  240. package/lib/js/control/selection/Selection.js +0 -78
  241. package/lib/js/control/selection/SelectionScene.d.ts +0 -44
  242. package/lib/js/control/selection/SelectionScene.js +0 -272
  243. package/lib/js/control/timeline/TimelineControl.d.ts +0 -18
  244. package/lib/js/control/timeline/TimelineControl.js +0 -81
  245. package/lib/js/control/timeline/TimelineModel.d.ts +0 -41
  246. package/lib/js/control/timeline/TimelineModel.js +0 -104
  247. package/lib/js/control/timeline/TimelineView.d.ts +0 -86
  248. package/lib/js/control/timeline/TimelineView.js +0 -363
  249. package/lib/js/control/timeline/timelineUtils.d.ts +0 -12
  250. package/lib/js/control/timeline/timelineUtils.js +0 -112
  251. package/lib/js/control/visibleExtent/Segment.js +0 -1301
  252. package/lib/js/control/visibleExtent/VisibleExtent.js +0 -56
  253. package/lib/js/control/visibleExtent/drawnode.d.ts +0 -7
  254. package/lib/js/control/visibleExtent/drawnode.js +0 -718
  255. package/lib/js/ellipsoid/Ellipsoid.d.ts +0 -194
  256. package/lib/js/ellipsoid/Ellipsoid.js +0 -459
  257. package/lib/js/ellipsoid/index.d.ts +0 -4
  258. package/lib/js/ellipsoid/index.js +0 -4
  259. package/lib/js/ellipsoid/mars.d.ts +0 -6
  260. package/lib/js/ellipsoid/mars.js +0 -6
  261. package/lib/js/ellipsoid/moon.d.ts +0 -6
  262. package/lib/js/ellipsoid/moon.js +0 -6
  263. package/lib/js/ellipsoid/wgs84.d.ts +0 -6
  264. package/lib/js/ellipsoid/wgs84.js +0 -6
  265. package/lib/js/entity/BaseBillboard.d.ts +0 -225
  266. package/lib/js/entity/BaseBillboard.js +0 -284
  267. package/lib/js/entity/BaseBillboardHandler.d.ts +0 -81
  268. package/lib/js/entity/BaseBillboardHandler.js +0 -546
  269. package/lib/js/entity/Billboard.d.ts +0 -114
  270. package/lib/js/entity/Billboard.js +0 -127
  271. package/lib/js/entity/BillboardHandler.d.ts +0 -15
  272. package/lib/js/entity/BillboardHandler.js +0 -103
  273. package/lib/js/entity/Entity.d.ts +0 -630
  274. package/lib/js/entity/Entity.js +0 -957
  275. package/lib/js/entity/EntityCollection.d.ts +0 -368
  276. package/lib/js/entity/EntityCollection.js +0 -655
  277. package/lib/js/entity/GeoObject.d.ts +0 -257
  278. package/lib/js/entity/GeoObject.js +0 -318
  279. package/lib/js/entity/GeoObjectHandler.d.ts +0 -81
  280. package/lib/js/entity/GeoObjectHandler.js +0 -515
  281. package/lib/js/entity/Geometry.d.ts +0 -125
  282. package/lib/js/entity/Geometry.js +0 -291
  283. package/lib/js/entity/GeometryHandler.d.ts +0 -86
  284. package/lib/js/entity/GeometryHandler.js +0 -745
  285. package/lib/js/entity/InstanceData.d.ts +0 -76
  286. package/lib/js/entity/InstanceData.js +0 -347
  287. package/lib/js/entity/Label.d.ts +0 -230
  288. package/lib/js/entity/Label.js +0 -322
  289. package/lib/js/entity/LabelHandler.d.ts +0 -65
  290. package/lib/js/entity/LabelHandler.js +0 -696
  291. package/lib/js/entity/LabelWorker.d.ts +0 -15
  292. package/lib/js/entity/LabelWorker.js +0 -163
  293. package/lib/js/entity/PointCloud.d.ts +0 -179
  294. package/lib/js/entity/PointCloud.js +0 -327
  295. package/lib/js/entity/PointCloudHandler.d.ts +0 -42
  296. package/lib/js/entity/PointCloudHandler.js +0 -82
  297. package/lib/js/entity/Polyline.d.ts +0 -360
  298. package/lib/js/entity/Polyline.js +0 -1635
  299. package/lib/js/entity/PolylineHandler.d.ts +0 -29
  300. package/lib/js/entity/PolylineHandler.js +0 -103
  301. package/lib/js/entity/Ray.d.ts +0 -135
  302. package/lib/js/entity/Ray.js +0 -171
  303. package/lib/js/entity/RayHandler.d.ts +0 -70
  304. package/lib/js/entity/RayHandler.js +0 -496
  305. package/lib/js/entity/Strip.d.ts +0 -141
  306. package/lib/js/entity/Strip.js +0 -417
  307. package/lib/js/entity/StripHandler.d.ts +0 -42
  308. package/lib/js/entity/StripHandler.js +0 -110
  309. package/lib/js/entity/index.d.ts +0 -10
  310. package/lib/js/entity/index.js +0 -10
  311. package/lib/js/index.d.ts +0 -34
  312. package/lib/js/index.js +0 -34
  313. package/lib/js/input/KeyboardHandler.d.ts +0 -33
  314. package/lib/js/input/KeyboardHandler.js +0 -159
  315. package/lib/js/input/MouseHandler.d.ts +0 -17
  316. package/lib/js/input/MouseHandler.js +0 -92
  317. package/lib/js/input/TouchHandler.d.ts +0 -11
  318. package/lib/js/input/TouchHandler.js +0 -42
  319. package/lib/js/input/input.d.ts +0 -3
  320. package/lib/js/input/input.js +0 -47
  321. package/lib/js/layer/BaseGeoImage.d.ts +0 -146
  322. package/lib/js/layer/BaseGeoImage.js +0 -382
  323. package/lib/js/layer/Bing.d.ts +0 -5
  324. package/lib/js/layer/Bing.js +0 -41
  325. package/lib/js/layer/CanvasTiles.d.ts +0 -104
  326. package/lib/js/layer/CanvasTiles.js +0 -292
  327. package/lib/js/layer/GeoImage.d.ts +0 -62
  328. package/lib/js/layer/GeoImage.js +0 -133
  329. package/lib/js/layer/GeoTexture2d.d.ts +0 -18
  330. package/lib/js/layer/GeoTexture2d.js +0 -37
  331. package/lib/js/layer/GeoVideo.d.ts +0 -69
  332. package/lib/js/layer/GeoVideo.js +0 -157
  333. package/lib/js/layer/KML.d.ts +0 -74
  334. package/lib/js/layer/KML.js +0 -303
  335. package/lib/js/layer/Layer.d.ts +0 -416
  336. package/lib/js/layer/Layer.js +0 -734
  337. package/lib/js/layer/Material.d.ts +0 -34
  338. package/lib/js/layer/Material.js +0 -69
  339. package/lib/js/layer/OpenStreetMap.d.ts +0 -5
  340. package/lib/js/layer/OpenStreetMap.js +0 -19
  341. package/lib/js/layer/Vector.d.ts +0 -240
  342. package/lib/js/layer/Vector.js +0 -767
  343. package/lib/js/layer/WMS.d.ts +0 -76
  344. package/lib/js/layer/WMS.js +0 -112
  345. package/lib/js/layer/XYZ.d.ts +0 -149
  346. package/lib/js/layer/XYZ.js +0 -299
  347. package/lib/js/layer/index.d.ts +0 -12
  348. package/lib/js/layer/index.js +0 -12
  349. package/lib/js/light/LightSource.d.ts +0 -36
  350. package/lib/js/light/LightSource.js +0 -86
  351. package/lib/js/math/Line2.d.ts +0 -11
  352. package/lib/js/math/Line2.js +0 -21
  353. package/lib/js/math/Line3.d.ts +0 -28
  354. package/lib/js/math/Line3.js +0 -85
  355. package/lib/js/math/Mat3.d.ts +0 -77
  356. package/lib/js/math/Mat3.js +0 -139
  357. package/lib/js/math/Mat4.d.ts +0 -204
  358. package/lib/js/math/Mat4.js +0 -487
  359. package/lib/js/math/Plane.d.ts +0 -22
  360. package/lib/js/math/Plane.js +0 -118
  361. package/lib/js/math/Quat.d.ts +0 -393
  362. package/lib/js/math/Quat.js +0 -794
  363. package/lib/js/math/Ray.d.ts +0 -72
  364. package/lib/js/math/Ray.js +0 -211
  365. package/lib/js/math/Vec2.d.ts +0 -332
  366. package/lib/js/math/Vec2.js +0 -495
  367. package/lib/js/math/Vec3.d.ts +0 -488
  368. package/lib/js/math/Vec3.js +0 -828
  369. package/lib/js/math/Vec4.d.ts +0 -163
  370. package/lib/js/math/Vec4.js +0 -211
  371. package/lib/js/math/coder.d.ts +0 -53
  372. package/lib/js/math/coder.js +0 -101
  373. package/lib/js/math/index.d.ts +0 -14
  374. package/lib/js/math/index.js +0 -11
  375. package/lib/js/math.d.ts +0 -266
  376. package/lib/js/math.js +0 -379
  377. package/lib/js/mercator.d.ts +0 -92
  378. package/lib/js/mercator.js +0 -120
  379. package/lib/js/proj/EPSG3857.d.ts +0 -9
  380. package/lib/js/proj/EPSG3857.js +0 -9
  381. package/lib/js/proj/EPSG4326.d.ts +0 -9
  382. package/lib/js/proj/EPSG4326.js +0 -9
  383. package/lib/js/proj/Proj.d.ts +0 -43
  384. package/lib/js/proj/Proj.js +0 -38
  385. package/lib/js/proj/equi.d.ts +0 -9
  386. package/lib/js/proj/equi.js +0 -9
  387. package/lib/js/quadTree/EPSG4326/EPSG4326QuadTreeStrategy.d.ts +0 -6
  388. package/lib/js/quadTree/EPSG4326/EPSG4326QuadTreeStrategy.js +0 -16
  389. package/lib/js/quadTree/EntityCollectionNode.d.ts +0 -46
  390. package/lib/js/quadTree/EntityCollectionNode.js +0 -262
  391. package/lib/js/quadTree/EntityCollectionsTreeStrategy.d.ts +0 -25
  392. package/lib/js/quadTree/EntityCollectionsTreeStrategy.js +0 -49
  393. package/lib/js/quadTree/Node.d.ts +0 -80
  394. package/lib/js/quadTree/Node.js +0 -712
  395. package/lib/js/quadTree/QuadTreeStrategy.d.ts +0 -39
  396. package/lib/js/quadTree/QuadTreeStrategy.js +0 -98
  397. package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +0 -19
  398. package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.js +0 -74
  399. package/lib/js/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +0 -19
  400. package/lib/js/quadTree/earth/EarthEntityCollectionsTreeStrategy.js +0 -103
  401. package/lib/js/quadTree/earth/EarthQuadTreeStrategy.d.ts +0 -27
  402. package/lib/js/quadTree/earth/EarthQuadTreeStrategy.js +0 -77
  403. package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +0 -18
  404. package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.js +0 -70
  405. package/lib/js/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +0 -17
  406. package/lib/js/quadTree/equi/EquiEntityCollectionsTreeStrategy.js +0 -75
  407. package/lib/js/quadTree/equi/EquiQuadTreeStrategy.d.ts +0 -19
  408. package/lib/js/quadTree/equi/EquiQuadTreeStrategy.js +0 -62
  409. package/lib/js/quadTree/index.d.ts +0 -12
  410. package/lib/js/quadTree/index.js +0 -12
  411. package/lib/js/quadTree/quadTree.d.ts +0 -40
  412. package/lib/js/quadTree/quadTree.js +0 -66
  413. package/lib/js/quadTree/wgs84/Wgs84QuadTreeStrategy.d.ts +0 -6
  414. package/lib/js/quadTree/wgs84/Wgs84QuadTreeStrategy.js +0 -15
  415. package/lib/js/renderer/Renderer.d.ts +0 -343
  416. package/lib/js/renderer/Renderer.js +0 -969
  417. package/lib/js/renderer/RendererEvents.d.ts +0 -245
  418. package/lib/js/renderer/RendererEvents.js +0 -870
  419. package/lib/js/scene/Axes.d.ts +0 -12
  420. package/lib/js/scene/Axes.js +0 -59
  421. package/lib/js/scene/BaseNode.d.ts +0 -61
  422. package/lib/js/scene/BaseNode.js +0 -69
  423. package/lib/js/scene/Planet.d.ts +0 -641
  424. package/lib/js/scene/Planet.js +0 -1617
  425. package/lib/js/scene/RenderNode.d.ts +0 -135
  426. package/lib/js/scene/RenderNode.js +0 -313
  427. package/lib/js/scene/SkyBox.d.ts +0 -13
  428. package/lib/js/scene/SkyBox.js +0 -87
  429. package/lib/js/scene/index.d.ts +0 -5
  430. package/lib/js/scene/index.js +0 -5
  431. package/lib/js/segment/Segment.d.ts +0 -289
  432. package/lib/js/segment/Segment.js +0 -1212
  433. package/lib/js/segment/SegmentLonLat.d.ts +0 -40
  434. package/lib/js/segment/SegmentLonLat.js +0 -111
  435. package/lib/js/segment/SegmentLonLatEqui.d.ts +0 -13
  436. package/lib/js/segment/SegmentLonLatEqui.js +0 -46
  437. package/lib/js/segment/Slice.d.ts +0 -13
  438. package/lib/js/segment/Slice.js +0 -33
  439. package/lib/js/segment/segmentHelper.js +0 -180
  440. package/lib/js/shaders/atmos.d.ts +0 -20
  441. package/lib/js/shaders/atmos.js +0 -326
  442. package/lib/js/shaders/billboard.d.ts +0 -3
  443. package/lib/js/shaders/billboard.js +0 -214
  444. package/lib/js/shaders/bloom.d.ts +0 -2
  445. package/lib/js/shaders/bloom.js +0 -32
  446. package/lib/js/shaders/blur.d.ts +0 -3
  447. package/lib/js/shaders/blur.js +0 -68
  448. package/lib/js/shaders/depth.d.ts +0 -2
  449. package/lib/js/shaders/depth.js +0 -40
  450. package/lib/js/shaders/drawnode.d.ts +0 -10
  451. package/lib/js/shaders/drawnode.js +0 -1008
  452. package/lib/js/shaders/geoObject.d.ts +0 -4
  453. package/lib/js/shaders/geoObject.js +0 -294
  454. package/lib/js/shaders/label.d.ts +0 -4
  455. package/lib/js/shaders/label.js +0 -589
  456. package/lib/js/shaders/lumFilter.d.ts +0 -2
  457. package/lib/js/shaders/lumFilter.js +0 -36
  458. package/lib/js/shaders/pointCloud.d.ts +0 -2
  459. package/lib/js/shaders/pointCloud.js +0 -32
  460. package/lib/js/shaders/polyline.d.ts +0 -3
  461. package/lib/js/shaders/polyline.js +0 -364
  462. package/lib/js/shaders/ray.d.ts +0 -2
  463. package/lib/js/shaders/ray.js +0 -80
  464. package/lib/js/shaders/screenFrame.d.ts +0 -2
  465. package/lib/js/shaders/screenFrame.js +0 -26
  466. package/lib/js/shaders/skybox.d.ts +0 -2
  467. package/lib/js/shaders/skybox.js +0 -28
  468. package/lib/js/shaders/toneMapping.d.ts +0 -2
  469. package/lib/js/shaders/toneMapping.js +0 -85
  470. package/lib/js/shaders/utils.d.ts +0 -1
  471. package/lib/js/shaders/utils.js +0 -97
  472. package/lib/js/terrain/BilTerrain.d.ts +0 -19
  473. package/lib/js/terrain/BilTerrain.js +0 -153
  474. package/lib/js/terrain/EmptyTerrain.d.ts +0 -113
  475. package/lib/js/terrain/EmptyTerrain.js +0 -113
  476. package/lib/js/terrain/Geoid.d.ts +0 -33
  477. package/lib/js/terrain/Geoid.js +0 -191
  478. package/lib/js/terrain/GlobusRgbTerrain.d.ts +0 -7
  479. package/lib/js/terrain/GlobusRgbTerrain.js +0 -25
  480. package/lib/js/terrain/GlobusTerrain.d.ts +0 -140
  481. package/lib/js/terrain/GlobusTerrain.js +0 -351
  482. package/lib/js/terrain/RgbTerrain.d.ts +0 -43
  483. package/lib/js/terrain/RgbTerrain.js +0 -428
  484. package/lib/js/terrain/index.d.ts +0 -6
  485. package/lib/js/terrain/index.js +0 -6
  486. package/lib/js/ui/Button.d.ts +0 -33
  487. package/lib/js/ui/Button.js +0 -78
  488. package/lib/js/ui/ButtonGroup.d.ts +0 -16
  489. package/lib/js/ui/ButtonGroup.js +0 -41
  490. package/lib/js/ui/Checkbox.d.ts +0 -32
  491. package/lib/js/ui/Checkbox.js +0 -110
  492. package/lib/js/ui/Color.d.ts +0 -23
  493. package/lib/js/ui/Color.js +0 -59
  494. package/lib/js/ui/Dialog.d.ts +0 -59
  495. package/lib/js/ui/Dialog.js +0 -193
  496. package/lib/js/ui/Input.d.ts +0 -33
  497. package/lib/js/ui/Input.js +0 -107
  498. package/lib/js/ui/Slider.d.ts +0 -39
  499. package/lib/js/ui/Slider.js +0 -129
  500. package/lib/js/ui/ToggleButton.d.ts +0 -21
  501. package/lib/js/ui/ToggleButton.js +0 -42
  502. package/lib/js/ui/View.d.ts +0 -39
  503. package/lib/js/ui/View.js +0 -157
  504. package/lib/js/ui/icons.d.ts +0 -1
  505. package/lib/js/ui/icons.js +0 -3
  506. package/lib/js/utils/BaseWorker.d.ts +0 -14
  507. package/lib/js/utils/BaseWorker.js +0 -47
  508. package/lib/js/utils/FontAtlas.d.ts +0 -82
  509. package/lib/js/utils/FontAtlas.js +0 -220
  510. package/lib/js/utils/GeoImageCreator.d.ts +0 -34
  511. package/lib/js/utils/GeoImageCreator.js +0 -163
  512. package/lib/js/utils/ImagesCacheManager.d.ts +0 -22
  513. package/lib/js/utils/ImagesCacheManager.js +0 -63
  514. package/lib/js/utils/Loader.d.ts +0 -63
  515. package/lib/js/utils/Loader.js +0 -156
  516. package/lib/js/utils/NormalMapCreator.d.ts +0 -53
  517. package/lib/js/utils/NormalMapCreator.js +0 -310
  518. package/lib/js/utils/PlainSegmentWorker.d.ts +0 -24
  519. package/lib/js/utils/PlainSegmentWorker.js +0 -385
  520. package/lib/js/utils/TerrainWorker.d.ts +0 -28
  521. package/lib/js/utils/TerrainWorker.js +0 -551
  522. package/lib/js/utils/TextureAtlas.d.ts +0 -115
  523. package/lib/js/utils/TextureAtlas.js +0 -231
  524. package/lib/js/utils/VectorTileCreator.d.ts +0 -18
  525. package/lib/js/utils/VectorTileCreator.js +0 -320
  526. package/lib/js/utils/colorTable.d.ts +0 -3
  527. package/lib/js/utils/colorTable.js +0 -143
  528. package/lib/js/utils/earcut.d.ts +0 -7
  529. package/lib/js/utils/earcut.js +0 -536
  530. package/lib/js/utils/objParser.d.ts +0 -56
  531. package/lib/js/utils/objParser.js +0 -293
  532. package/lib/js/utils/shared.js +0 -961
  533. package/lib/js/utils/units.d.ts +0 -16
  534. package/lib/js/utils/units.js +0 -61
  535. package/lib/js/webgl/BaseFramebuffer.d.ts +0 -52
  536. package/lib/js/webgl/BaseFramebuffer.js +0 -88
  537. package/lib/js/webgl/Framebuffer.js +0 -256
  538. package/lib/js/webgl/Handler.d.ts +0 -491
  539. package/lib/js/webgl/Handler.js +0 -1035
  540. package/lib/js/webgl/Multisample.d.ts +0 -28
  541. package/lib/js/webgl/Multisample.js +0 -77
  542. package/lib/js/webgl/Program.d.ts +0 -159
  543. package/lib/js/webgl/Program.js +0 -306
  544. package/lib/js/webgl/ProgramController.d.ts +0 -87
  545. package/lib/js/webgl/ProgramController.js +0 -110
  546. package/lib/js/webgl/index.d.ts +0 -6
  547. package/lib/js/webgl/index.js +0 -6
  548. package/lib/js/webgl/types.d.ts +0 -9
  549. package/lib/js/webgl/types.js +0 -26
  550. package/lib/js/webgl/variableHandlers.d.ts +0 -22
  551. package/lib/js/webgl/variableHandlers.js +0 -78
  552. /package/lib/{@openglobus/js/Clock.d.ts → Clock.d.ts} +0 -0
  553. /package/lib/{@openglobus/js/Deferred.d.ts → Deferred.d.ts} +0 -0
  554. /package/lib/{@openglobus/js/Events.d.ts → Events.d.ts} +0 -0
  555. /package/lib/{@openglobus/js/Extent.d.ts → Extent.d.ts} +0 -0
  556. /package/lib/{@openglobus/js/ImageCanvas.d.ts → ImageCanvas.d.ts} +0 -0
  557. /package/lib/{@openglobus/js/Lock.d.ts → Lock.d.ts} +0 -0
  558. /package/lib/{@openglobus/js/LonLat.d.ts → LonLat.d.ts} +0 -0
  559. /package/lib/{@openglobus/js/Popup.d.ts → Popup.d.ts} +0 -0
  560. /package/lib/{@openglobus/js/QueueArray.d.ts → QueueArray.d.ts} +0 -0
  561. /package/lib/{@openglobus/js/Rectangle.d.ts → Rectangle.d.ts} +0 -0
  562. /package/lib/{@openglobus/js/Stack.d.ts → Stack.d.ts} +0 -0
  563. /package/lib/{@openglobus/js/astro → astro}/astro.d.ts +0 -0
  564. /package/lib/{@openglobus/js/astro → astro}/earth.d.ts +0 -0
  565. /package/lib/{@openglobus/js/astro → astro}/jd.d.ts +0 -0
  566. /package/lib/{@openglobus/js/astro → astro}/orbit.d.ts +0 -0
  567. /package/lib/{@openglobus/js/astro → astro}/rotation.d.ts +0 -0
  568. /package/lib/{@openglobus/js/bv → bv}/Box.d.ts +0 -0
  569. /package/lib/{@openglobus/js/bv → bv}/Sphere.d.ts +0 -0
  570. /package/lib/{@openglobus/js/bv → bv}/index.d.ts +0 -0
  571. /package/lib/{@openglobus/js/camera → camera}/PlanetCamera.d.ts +0 -0
  572. /package/lib/{@openglobus/js/camera → camera}/index.d.ts +0 -0
  573. /package/lib/{@openglobus/js/cons.d.ts → cons.d.ts} +0 -0
  574. /package/lib/{@openglobus/js/control → control}/CameraLock.d.ts +0 -0
  575. /package/lib/{@openglobus/js/control → control}/CompassButton.d.ts +0 -0
  576. /package/lib/{@openglobus/js/control → control}/Control.d.ts +0 -0
  577. /package/lib/{@openglobus/js/control → control}/DebugInfo.d.ts +0 -0
  578. /package/lib/{@openglobus/js/control → control}/DrawingSwitcher.d.ts +0 -0
  579. /package/lib/{@openglobus/js/control → control}/EarthCoordinates.d.ts +0 -0
  580. /package/lib/{@openglobus/js/control → control}/GeoImageDragControl.d.ts +0 -0
  581. /package/lib/{@openglobus/js/control → control}/LayerAnimation.d.ts +0 -0
  582. /package/lib/{@openglobus/js/control → control}/LayerSwitcher.d.ts +0 -0
  583. /package/lib/{@openglobus/js/control → control}/Lighting.d.ts +0 -0
  584. /package/lib/{@openglobus/js/control → control}/MouseNavigation.d.ts +0 -0
  585. /package/lib/{@openglobus/js/control → control}/OldMouseNavigation.d.ts +0 -0
  586. /package/lib/{@openglobus/js/control → control}/RulerSwitcher.d.ts +0 -0
  587. /package/lib/{@openglobus/js/control → control}/ScaleControl.d.ts +0 -0
  588. /package/lib/{@openglobus/js/control → control}/SegmentBoundVisualization.d.ts +0 -0
  589. /package/lib/{@openglobus/js/control → control}/ShowFps.d.ts +0 -0
  590. /package/lib/{@openglobus/js/control → control}/SimpleNavigation.d.ts +0 -0
  591. /package/lib/{@openglobus/js/control → control}/SimpleSkyBackground.d.ts +0 -0
  592. /package/lib/{@openglobus/js/control → control}/Sun.d.ts +0 -0
  593. /package/lib/{@openglobus/js/control → control}/ToggleWireframe.d.ts +0 -0
  594. /package/lib/{@openglobus/js/control → control}/TouchNavigation.d.ts +0 -0
  595. /package/lib/{@openglobus/js/control → control}/ZoomControl.d.ts +0 -0
  596. /package/lib/{@openglobus/js/control → control}/drawing/DrawingControl.d.ts +0 -0
  597. /package/lib/{@openglobus/js/control → control}/drawing/LineStringDrawingScene.d.ts +0 -0
  598. /package/lib/{@openglobus/js/control → control}/drawing/PolygonDrawingScene.d.ts +0 -0
  599. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfile.d.ts +0 -0
  600. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileButtonsView.d.ts +0 -0
  601. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileControl.d.ts +0 -0
  602. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileLegend.d.ts +0 -0
  603. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileScene.d.ts +0 -0
  604. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileView.d.ts +0 -0
  605. /package/lib/{@openglobus/js/control → control}/elevationProfile/PointListDialog.d.ts +0 -0
  606. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/ArrowEntity.d.ts +0 -0
  607. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/AxisTrackEntity.d.ts +0 -0
  608. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditor.d.ts +0 -0
  609. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditorDialog.d.ts +0 -0
  610. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditorScene.d.ts +0 -0
  611. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/MoveAxisEntity.d.ts +0 -0
  612. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/MovePlaneEntity.d.ts +0 -0
  613. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/RotateEntity.d.ts +0 -0
  614. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/colors.d.ts +0 -0
  615. /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRuler.d.ts +0 -0
  616. /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRulerScene.d.ts +0 -0
  617. /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRulerSwitcher.d.ts +0 -0
  618. /package/lib/{@openglobus/js/control → control}/ruler/Ruler.d.ts +0 -0
  619. /package/lib/{@openglobus/js/control → control}/ruler/RulerScene.d.ts +0 -0
  620. /package/lib/{@openglobus/js/control → control}/selection/Selection.d.ts +0 -0
  621. /package/lib/{@openglobus/js/control → control}/selection/SelectionScene.d.ts +0 -0
  622. /package/lib/{@openglobus/js/control → control}/timeline/TimelineControl.d.ts +0 -0
  623. /package/lib/{@openglobus/js/control → control}/timeline/TimelineModel.d.ts +0 -0
  624. /package/lib/{@openglobus/js/control → control}/timeline/TimelineView.d.ts +0 -0
  625. /package/lib/{@openglobus/js/control → control}/timeline/timelineUtils.d.ts +0 -0
  626. /package/lib/{js/control → control}/visibleExtent/VisibleExtent.d.ts +0 -0
  627. /package/lib/{@openglobus/js/control → control}/visibleExtent/drawnode.d.ts +0 -0
  628. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/Ellipsoid.d.ts +0 -0
  629. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/index.d.ts +0 -0
  630. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/mars.d.ts +0 -0
  631. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/moon.d.ts +0 -0
  632. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/wgs84.d.ts +0 -0
  633. /package/lib/{@openglobus/js/entity → entity}/BaseBillboard.d.ts +0 -0
  634. /package/lib/{@openglobus/js/entity → entity}/BaseBillboardHandler.d.ts +0 -0
  635. /package/lib/{@openglobus/js/entity → entity}/Billboard.d.ts +0 -0
  636. /package/lib/{@openglobus/js/entity → entity}/BillboardHandler.d.ts +0 -0
  637. /package/lib/{@openglobus/js/entity → entity}/Entity.d.ts +0 -0
  638. /package/lib/{@openglobus/js/entity → entity}/EntityCollection.d.ts +0 -0
  639. /package/lib/{@openglobus/js/entity → entity}/GeoObject.d.ts +0 -0
  640. /package/lib/{@openglobus/js/entity → entity}/GeoObjectHandler.d.ts +0 -0
  641. /package/lib/{@openglobus/js/entity → entity}/Geometry.d.ts +0 -0
  642. /package/lib/{@openglobus/js/entity → entity}/GeometryHandler.d.ts +0 -0
  643. /package/lib/{@openglobus/js/entity → entity}/InstanceData.d.ts +0 -0
  644. /package/lib/{@openglobus/js/entity → entity}/Label.d.ts +0 -0
  645. /package/lib/{@openglobus/js/entity → entity}/LabelHandler.d.ts +0 -0
  646. /package/lib/{@openglobus/js/entity → entity}/LabelWorker.d.ts +0 -0
  647. /package/lib/{@openglobus/js/entity → entity}/PointCloud.d.ts +0 -0
  648. /package/lib/{@openglobus/js/entity → entity}/PointCloudHandler.d.ts +0 -0
  649. /package/lib/{@openglobus/js/entity → entity}/Polyline.d.ts +0 -0
  650. /package/lib/{@openglobus/js/entity → entity}/PolylineHandler.d.ts +0 -0
  651. /package/lib/{@openglobus/js/entity → entity}/Ray.d.ts +0 -0
  652. /package/lib/{@openglobus/js/entity → entity}/RayHandler.d.ts +0 -0
  653. /package/lib/{@openglobus/js/entity → entity}/Strip.d.ts +0 -0
  654. /package/lib/{@openglobus/js/entity → entity}/StripHandler.d.ts +0 -0
  655. /package/lib/{@openglobus/js/entity → entity}/index.d.ts +0 -0
  656. /package/lib/{@openglobus/js/input → input}/KeyboardHandler.d.ts +0 -0
  657. /package/lib/{@openglobus/js/input → input}/MouseHandler.d.ts +0 -0
  658. /package/lib/{@openglobus/js/input → input}/TouchHandler.d.ts +0 -0
  659. /package/lib/{@openglobus/js/input → input}/input.d.ts +0 -0
  660. /package/lib/{@openglobus/js/layer → layer}/BaseGeoImage.d.ts +0 -0
  661. /package/lib/{@openglobus/js/layer → layer}/Bing.d.ts +0 -0
  662. /package/lib/{@openglobus/js/layer → layer}/CanvasTiles.d.ts +0 -0
  663. /package/lib/{@openglobus/js/layer → layer}/GeoImage.d.ts +0 -0
  664. /package/lib/{@openglobus/js/layer → layer}/GeoTexture2d.d.ts +0 -0
  665. /package/lib/{@openglobus/js/layer → layer}/GeoVideo.d.ts +0 -0
  666. /package/lib/{@openglobus/js/layer → layer}/KML.d.ts +0 -0
  667. /package/lib/{@openglobus/js/layer → layer}/Layer.d.ts +0 -0
  668. /package/lib/{@openglobus/js/layer → layer}/Material.d.ts +0 -0
  669. /package/lib/{@openglobus/js/layer → layer}/OpenStreetMap.d.ts +0 -0
  670. /package/lib/{@openglobus/js/layer → layer}/Vector.d.ts +0 -0
  671. /package/lib/{@openglobus/js/layer → layer}/WMS.d.ts +0 -0
  672. /package/lib/{@openglobus/js/layer → layer}/XYZ.d.ts +0 -0
  673. /package/lib/{@openglobus/js/layer → layer}/index.d.ts +0 -0
  674. /package/lib/{@openglobus/js/light → light}/LightSource.d.ts +0 -0
  675. /package/lib/{@openglobus/js/math → math}/Line2.d.ts +0 -0
  676. /package/lib/{@openglobus/js/math → math}/Line3.d.ts +0 -0
  677. /package/lib/{@openglobus/js/math → math}/Mat3.d.ts +0 -0
  678. /package/lib/{@openglobus/js/math → math}/Mat4.d.ts +0 -0
  679. /package/lib/{@openglobus/js/math → math}/Plane.d.ts +0 -0
  680. /package/lib/{@openglobus/js/math → math}/Quat.d.ts +0 -0
  681. /package/lib/{@openglobus/js/math → math}/Ray.d.ts +0 -0
  682. /package/lib/{@openglobus/js/math → math}/Vec2.d.ts +0 -0
  683. /package/lib/{@openglobus/js/math → math}/Vec3.d.ts +0 -0
  684. /package/lib/{@openglobus/js/math → math}/Vec4.d.ts +0 -0
  685. /package/lib/{@openglobus/js/math → math}/coder.d.ts +0 -0
  686. /package/lib/{@openglobus/js/math → math}/index.d.ts +0 -0
  687. /package/lib/{@openglobus/js/math.d.ts → math.d.ts} +0 -0
  688. /package/lib/{@openglobus/js/mercator.d.ts → mercator.d.ts} +0 -0
  689. /package/lib/{@openglobus/js/proj → proj}/EPSG3857.d.ts +0 -0
  690. /package/lib/{@openglobus/js/proj → proj}/EPSG4326.d.ts +0 -0
  691. /package/lib/{@openglobus/js/proj → proj}/Proj.d.ts +0 -0
  692. /package/lib/{@openglobus/js/proj → proj}/equi.d.ts +0 -0
  693. /package/lib/{@openglobus/js/quadTree → quadTree}/EPSG4326/EPSG4326QuadTreeStrategy.d.ts +0 -0
  694. /package/lib/{@openglobus/js/quadTree → quadTree}/EntityCollectionNode.d.ts +0 -0
  695. /package/lib/{@openglobus/js/quadTree → quadTree}/EntityCollectionsTreeStrategy.d.ts +0 -0
  696. /package/lib/{@openglobus/js/quadTree → quadTree}/Node.d.ts +0 -0
  697. /package/lib/{@openglobus/js/quadTree → quadTree}/QuadTreeStrategy.d.ts +0 -0
  698. /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthEntityCollectionNodeLonLat.d.ts +0 -0
  699. /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthEntityCollectionsTreeStrategy.d.ts +0 -0
  700. /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthQuadTreeStrategy.d.ts +0 -0
  701. /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiEntityCollectionNodeLonLat.d.ts +0 -0
  702. /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiEntityCollectionsTreeStrategy.d.ts +0 -0
  703. /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiQuadTreeStrategy.d.ts +0 -0
  704. /package/lib/{@openglobus/js/quadTree → quadTree}/index.d.ts +0 -0
  705. /package/lib/{@openglobus/js/quadTree → quadTree}/quadTree.d.ts +0 -0
  706. /package/lib/{@openglobus/js/quadTree → quadTree}/wgs84/Wgs84QuadTreeStrategy.d.ts +0 -0
  707. /package/lib/{@openglobus/js/renderer → renderer}/RendererEvents.d.ts +0 -0
  708. /package/lib/{@openglobus/res → res}/fonts/Ephesis-Regular.json +0 -0
  709. /package/lib/{@openglobus/res → res}/fonts/Ephesis-Regular.ttf.cfg +0 -0
  710. /package/lib/{@openglobus/res → res}/fonts/Ephesis-Regular.ttf.png +0 -0
  711. /package/lib/{@openglobus/res → res}/fonts/Karla-Bold.json +0 -0
  712. /package/lib/{@openglobus/res → res}/fonts/Karla-Bold.ttf.cfg +0 -0
  713. /package/lib/{@openglobus/res → res}/fonts/Karla-Bold.ttf.png +0 -0
  714. /package/lib/{@openglobus/res → res}/fonts/Karla-Light.json +0 -0
  715. /package/lib/{@openglobus/res → res}/fonts/Karla-Light.ttf.cfg +0 -0
  716. /package/lib/{@openglobus/res → res}/fonts/Karla-Light.ttf.png +0 -0
  717. /package/lib/{@openglobus/res → res}/fonts/Karla-Medium.json +0 -0
  718. /package/lib/{@openglobus/res → res}/fonts/Karla-Medium.ttf.cfg +0 -0
  719. /package/lib/{@openglobus/res → res}/fonts/Karla-Medium.ttf.png +0 -0
  720. /package/lib/{@openglobus/res → res}/fonts/NotoSansArabic-Regular.json +0 -0
  721. /package/lib/{@openglobus/res → res}/fonts/NotoSansArabic-Regular.ttf.cfg +0 -0
  722. /package/lib/{@openglobus/res → res}/fonts/NotoSansArabic-Regular.ttf.png +0 -0
  723. /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.json +0 -0
  724. /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.ttf.cfg +0 -0
  725. /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.ttf.png +0 -0
  726. /package/lib/{@openglobus/res → res}/fonts/arial.js +0 -0
  727. /package/lib/{@openglobus/res → res}/fonts/arial.json +0 -0
  728. /package/lib/{@openglobus/res → res}/fonts/arial.ttf.cfg +0 -0
  729. /package/lib/{@openglobus/res → res}/fonts/arial.ttf.png +0 -0
  730. /package/lib/{@openglobus/res → res}/night-4326.png +0 -0
  731. /package/lib/{@openglobus/res → res}/night.png +0 -0
  732. /package/lib/{@openglobus/res → res}/spec.png +0 -0
  733. /package/lib/{@openglobus/js/scene → scene}/Axes.d.ts +0 -0
  734. /package/lib/{@openglobus/js/scene → scene}/BaseNode.d.ts +0 -0
  735. /package/lib/{@openglobus/js/scene → scene}/RenderNode.d.ts +0 -0
  736. /package/lib/{@openglobus/js/scene → scene}/SkyBox.d.ts +0 -0
  737. /package/lib/{@openglobus/js/scene → scene}/index.d.ts +0 -0
  738. /package/lib/{@openglobus/js/segment → segment}/SegmentLonLat.d.ts +0 -0
  739. /package/lib/{@openglobus/js/segment → segment}/SegmentLonLatEqui.d.ts +0 -0
  740. /package/lib/{@openglobus/js/segment → segment}/Slice.d.ts +0 -0
  741. /package/lib/{@openglobus/js/shaders → shaders}/depth.d.ts +0 -0
  742. /package/lib/{@openglobus/js/shaders → shaders}/pointCloud.d.ts +0 -0
  743. /package/lib/{@openglobus/js/shaders → shaders}/screenFrame.d.ts +0 -0
  744. /package/lib/{@openglobus/js/shaders → shaders}/skybox.d.ts +0 -0
  745. /package/lib/{@openglobus/js/terrain → terrain}/BilTerrain.d.ts +0 -0
  746. /package/lib/{@openglobus/js/terrain → terrain}/EmptyTerrain.d.ts +0 -0
  747. /package/lib/{@openglobus/js/terrain → terrain}/Geoid.d.ts +0 -0
  748. /package/lib/{@openglobus/js/terrain → terrain}/GlobusRgbTerrain.d.ts +0 -0
  749. /package/lib/{@openglobus/js/terrain → terrain}/GlobusTerrain.d.ts +0 -0
  750. /package/lib/{@openglobus/js/terrain → terrain}/RgbTerrain.d.ts +0 -0
  751. /package/lib/{@openglobus/js/terrain → terrain}/index.d.ts +0 -0
  752. /package/lib/{@openglobus/js/ui → ui}/Button.d.ts +0 -0
  753. /package/lib/{@openglobus/js/ui → ui}/ButtonGroup.d.ts +0 -0
  754. /package/lib/{@openglobus/js/ui → ui}/Checkbox.d.ts +0 -0
  755. /package/lib/{@openglobus/js/ui → ui}/Color.d.ts +0 -0
  756. /package/lib/{@openglobus/js/ui → ui}/Input.d.ts +0 -0
  757. /package/lib/{@openglobus/js/ui → ui}/Slider.d.ts +0 -0
  758. /package/lib/{@openglobus/js/ui → ui}/ToggleButton.d.ts +0 -0
  759. /package/lib/{@openglobus/js/ui → ui}/icons.d.ts +0 -0
  760. /package/lib/{@openglobus/js/utils → utils}/FontAtlas.d.ts +0 -0
  761. /package/lib/{@openglobus/js/utils → utils}/GeoImageCreator.d.ts +0 -0
  762. /package/lib/{@openglobus/js/utils → utils}/ImagesCacheManager.d.ts +0 -0
  763. /package/lib/{@openglobus/js/utils → utils}/Loader.d.ts +0 -0
  764. /package/lib/{@openglobus/js/utils → utils}/NormalMapCreator.d.ts +0 -0
  765. /package/lib/{@openglobus/js/utils → utils}/PlainSegmentWorker.d.ts +0 -0
  766. /package/lib/{@openglobus/js/utils → utils}/TerrainWorker.d.ts +0 -0
  767. /package/lib/{@openglobus/js/utils → utils}/TextureAtlas.d.ts +0 -0
  768. /package/lib/{@openglobus/js/utils → utils}/VectorTileCreator.d.ts +0 -0
  769. /package/lib/{@openglobus/js/utils → utils}/colorTable.d.ts +0 -0
  770. /package/lib/{@openglobus/js/utils → utils}/earcut.d.ts +0 -0
  771. /package/lib/{@openglobus/js/utils → utils}/units.d.ts +0 -0
  772. /package/lib/{@openglobus/js/webgl → webgl}/BaseFramebuffer.d.ts +0 -0
  773. /package/lib/{@openglobus/js/webgl → webgl}/Multisample.d.ts +0 -0
  774. /package/lib/{@openglobus/js/webgl → webgl}/Program.d.ts +0 -0
  775. /package/lib/{@openglobus/js/webgl → webgl}/ProgramController.d.ts +0 -0
  776. /package/lib/{@openglobus/js/webgl → webgl}/index.d.ts +0 -0
  777. /package/lib/{@openglobus/js/webgl → webgl}/types.d.ts +0 -0
  778. /package/lib/{@openglobus/js/webgl → webgl}/variableHandlers.d.ts +0 -0
@@ -1,961 +0,0 @@
1
- /**
2
- * @module og/utils/shared
3
- */
4
- import { Extent } from "../Extent";
5
- import { LonLat } from "../LonLat";
6
- import { Vec2 } from "../math/Vec2";
7
- import { Vec3 } from "../math/Vec3";
8
- import { Vec4 } from "../math/Vec4";
9
- import { colorTable } from "./colorTable";
10
- import { wgs84 } from "../ellipsoid/wgs84";
11
- import * as mercator from "../mercator";
12
- export function getDefault(param, def) {
13
- return param != undefined ? param : def;
14
- }
15
- export function isEmpty(v) {
16
- return v == null;
17
- }
18
- /**
19
- * Returns true if the object pointer is undefined.
20
- * @function
21
- * @param {Object} obj - Object pointer.
22
- * @returns {boolean} Returns true if object is undefined.
23
- */
24
- export function isUndef(obj) {
25
- return obj === void 0;
26
- }
27
- export function isUndefExt(obj, defVal) {
28
- return isUndef(obj) ? defVal : obj;
29
- }
30
- let _stampCounter = 0;
31
- export function stamp(obj) {
32
- let stamp = obj._openglobus_id;
33
- if (!stamp) {
34
- stamp = obj._openglobus_id = ++_stampCounter;
35
- }
36
- return stamp;
37
- }
38
- export function isString(s) {
39
- return typeof s === "string" || s instanceof String;
40
- }
41
- function d2h(val) {
42
- return val.toString(16).padStart(2, '0');
43
- }
44
- export function rgbToStringHTML(rgb) {
45
- let r, g, b;
46
- if (rgb instanceof Array) {
47
- r = d2h(rgb[0]);
48
- g = d2h(rgb[1]);
49
- b = d2h(rgb[2]);
50
- }
51
- else {
52
- r = d2h(rgb.x);
53
- g = d2h(rgb.y);
54
- b = d2h(rgb.z);
55
- }
56
- return `#${r}${g}${b}`;
57
- }
58
- /**
59
- * Convert html color string to the RGBA number vector.
60
- * @param {string} htmlColor - HTML string("#C6C6C6" or "#EF5" or "rgb(8,8,8)" or "rgba(8,8,8)") color.
61
- * @param {number} [opacity] - Opacity for the output vector.
62
- * @returns {Vec4} -
63
- */
64
- export function htmlColorToRgba(htmlColor, opacity) {
65
- let hColor = colorTable[htmlColor];
66
- if (hColor) {
67
- htmlColor = hColor;
68
- }
69
- if (htmlColor[0] === "#") {
70
- let shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
71
- let hex = htmlColor.replace(shorthandRegex, function (m, r, g, b) {
72
- return r + r + g + g + b + b;
73
- });
74
- let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
75
- if (result) {
76
- return new Vec4(parseInt(result[1], 16) / 255, parseInt(result[2], 16) / 255, parseInt(result[3], 16) / 255, isEmpty(opacity) ? 1.0 : opacity);
77
- }
78
- else {
79
- return new Vec4();
80
- }
81
- }
82
- else {
83
- if (isEmpty(opacity)) {
84
- opacity = 1.0;
85
- }
86
- let m = htmlColor.split(",");
87
- return new Vec4(parseInt(m[0].split("(")[1]) / 255, parseInt(m[1]) / 255, parseInt(m[2]) / 255, !isEmpty(m[3]) ? parseFloat(m[3]) : opacity);
88
- }
89
- }
90
- export function htmlColorToFloat32Array(htmlColor, opacity) {
91
- let c = htmlColorToRgba(htmlColor, opacity);
92
- return new Float32Array([c.x, c.y, c.z, c.w]);
93
- }
94
- /**
95
- * Convert html color string to the RGB number vector.
96
- * @param {string} htmlColor - HTML string("#C6C6C6" or "#EF5" or "rgb(8,8,8)" or "rgba(8,8,8)") color.
97
- * @returns {Vec3} -
98
- */
99
- export function htmlColorToRgb(htmlColor) {
100
- let hColor = colorTable[htmlColor];
101
- if (hColor) {
102
- htmlColor = hColor;
103
- }
104
- if (htmlColor[0] === "#") {
105
- let shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
106
- let hex = htmlColor.replace(shorthandRegex, function (m, r, g, b) {
107
- return r + r + g + g + b + b;
108
- });
109
- let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
110
- if (result) {
111
- return new Vec3(parseInt(result[1], 16) / 255, parseInt(result[2], 16) / 255, parseInt(result[3], 16) / 255);
112
- }
113
- else {
114
- return new Vec3();
115
- }
116
- }
117
- else {
118
- let m = htmlColor.split(",");
119
- return new Vec3(parseInt(m[0].split("(")[1]) / 255, parseInt(m[1]) / 255, parseInt(m[2]) / 255);
120
- }
121
- }
122
- /**
123
- * Replace template substrings between '{' and '}' tokens.
124
- * @param {string} template - String with templates in "{" and "}"
125
- * @param {Object} params - Template named object with subsrtings.
126
- * @returns {string} -
127
- *
128
- * @example <caption>Example from og.terrain that replaces tile indexes in url:</caption>
129
- * var substrings = {
130
- * "x": 12,
131
- * "y": 15,
132
- * "z": 8
133
- * }
134
- * og.utils.stringTemplate("http://earth3.openglobus.org/{z}/{y}/{x}.ddm", substrings);
135
- * //returns http://earth3.openglobus.org/8/15/12.ddm
136
- */
137
- export function stringTemplate(template, params) {
138
- return template.replace(/{[^{}]+}/g, function (key) {
139
- return params[key.replace(/[{}]+/g, "")] || "";
140
- });
141
- }
142
- export function getHTML(template, params) {
143
- return stringTemplate(template, params);
144
- }
145
- export function parseHTML(htmlStr) {
146
- let p = document.createElement("div");
147
- p.innerHTML = htmlStr;
148
- let domArr = [];
149
- for (let i = 0; i < p.childNodes.length; i++) {
150
- domArr.push(p.childNodes[i]);
151
- p.removeChild(p.childNodes[i]);
152
- }
153
- return domArr;
154
- }
155
- export function print2d(id, text, x, y) {
156
- let el = document.getElementById(id);
157
- if (!el) {
158
- el = document.createElement("div");
159
- el.id = id;
160
- el.classList.add("defaultText");
161
- document.body.appendChild(el);
162
- }
163
- el.innerHTML = text;
164
- el.style.left = `${x}px`;
165
- el.style.top = `${y}px`;
166
- }
167
- export function isNumber(value) {
168
- return typeof value === 'number';
169
- }
170
- export function defaultString(str, def = "") {
171
- return str ? str.trim() : def;
172
- }
173
- export function createVector3(v, def) {
174
- if (v) {
175
- if (isNumber(v)) {
176
- return new Vec3(v, v, v);
177
- }
178
- else if (v instanceof Vec3) {
179
- return v.clone();
180
- }
181
- else if (v instanceof Array) {
182
- return Vec3.fromVec(v);
183
- }
184
- else if (v instanceof Vec2) {
185
- return new Vec3(v.x, v.y, 0.0);
186
- }
187
- }
188
- else if (def) {
189
- return def;
190
- }
191
- return new Vec3();
192
- }
193
- export function createVector4(v, def) {
194
- if (v) {
195
- if (v instanceof Vec4) {
196
- return v.clone();
197
- }
198
- else if (v instanceof Array) {
199
- return Vec4.fromVec(v);
200
- }
201
- }
202
- else if (def) {
203
- return def;
204
- }
205
- return new Vec4();
206
- }
207
- export function createColorRGBA(c, def) {
208
- if (c) {
209
- if (isString(c)) {
210
- return htmlColorToRgba(c);
211
- }
212
- else if (c instanceof Array) {
213
- return Vec4.fromVec(c);
214
- }
215
- else if (c instanceof Vec4) {
216
- return c.clone();
217
- }
218
- }
219
- else if (def) {
220
- return def;
221
- }
222
- return new Vec4(1.0, 1.0, 1.0, 1.0);
223
- }
224
- export function createColorRGB(c, def) {
225
- if (c) {
226
- if (isString(c)) {
227
- return htmlColorToRgb(c);
228
- }
229
- else if (c instanceof Array) {
230
- return Vec3.fromVec(c);
231
- }
232
- else if (c instanceof Vec3) {
233
- return c.clone();
234
- }
235
- }
236
- else if (def) {
237
- return def;
238
- }
239
- return new Vec3(1.0, 1.0, 1.0);
240
- }
241
- export function createExtent(e, def) {
242
- if (e) {
243
- if (e instanceof Array) {
244
- return new Extent(createLonLat(e[0]), createLonLat(e[1]));
245
- }
246
- else if (e instanceof Extent) {
247
- return e.clone();
248
- }
249
- }
250
- else if (def) {
251
- return def;
252
- }
253
- return new Extent();
254
- }
255
- export function createLonLat(l, def) {
256
- if (l) {
257
- if (l instanceof Array) {
258
- return new LonLat(l[0], l[1], l[2]);
259
- }
260
- else if (l instanceof LonLat) {
261
- return l.clone();
262
- }
263
- }
264
- else if (def) {
265
- return def;
266
- }
267
- return new LonLat();
268
- }
269
- export function binarySearchFast(arr, x) {
270
- let start = 0, end = arr.length - 1;
271
- while (start <= end) {
272
- let k = Math.floor((start + end) * 0.5);
273
- if (Math.abs(arr[k] - x) < 1e-3) {
274
- return k;
275
- }
276
- else if (arr[k] < x) {
277
- start = k + 1;
278
- }
279
- else {
280
- end = k - 1;
281
- }
282
- }
283
- return -1;
284
- }
285
- /**
286
- * Finds an item in a sorted array.
287
- * @param {any[]} ar The sorted array to search.
288
- * @param {any} el The item to find in the array.
289
- * @param {Function} compare_fn comparator The function to use to compare the item to
290
- * elements in the array.
291
- * @returns {number} a negative number if 'a' is less than 'b'; 0 if 'a' is equal to 'b'; 'a' positive number of 'a' is greater than 'b'.
292
- *
293
- * @example
294
- * // Create a comparator function to search through an array of numbers.
295
- * function comparator(a, b) {
296
- * return a - b;
297
- * };
298
- * var numbers = [0, 2, 4, 6, 8];
299
- * var index = og.utils.binarySearch(numbers, 6, comparator); // 3
300
- */
301
- export function binarySearch(ar, el, compare_fn) {
302
- let m = 0;
303
- let n = ar.length - 1;
304
- while (m <= n) {
305
- let k = (n + m) >> 1;
306
- let cmp = compare_fn(el, ar[k], k);
307
- if (cmp > 0) {
308
- m = k + 1;
309
- }
310
- else if (cmp < 0) {
311
- n = k - 1;
312
- }
313
- else {
314
- return k;
315
- }
316
- }
317
- return -m - 1;
318
- }
319
- /**
320
- * @todo: replace any with generic
321
- * Binary insertion that uses binarySearch algorithm.
322
- * @param {any[]} ar - The sorted array to insert.
323
- * @param {any} el - The item to insert.
324
- * @param {Function} compare_fn - comparator The function to use to compare the item to
325
- * elements in the array.
326
- * @returns {number} Array index position in which item inserted in.
327
- */
328
- export function binaryInsert(ar, el, compare_fn) {
329
- let i = binarySearch(ar, el, compare_fn);
330
- if (i < 0) {
331
- i = ~i;
332
- }
333
- ar.splice(i, 0, el);
334
- return i;
335
- }
336
- /**
337
- * Returns two segment lines intersection coordinate.
338
- * @static
339
- * @param {Vec2} start1 - First line first coordinate.
340
- * @param {Vec2} end1 - First line second coordinate.
341
- * @param {Vec2} start2 - Second line first coordinate.
342
- * @param {Vec2} end2 - Second line second coordinate.
343
- * @param {boolean} [isSegment] - Lines are segments.
344
- * @return {Vec2} - Intersection coordinate.
345
- */
346
- export function getLinesIntersection2v(start1, end1, start2, end2, isSegment) {
347
- let dir1 = end1.sub(start1);
348
- let dir2 = end2.sub(start2);
349
- let a1 = -dir1.y;
350
- let b1 = +dir1.x;
351
- let d1 = -(a1 * start1.x + b1 * start1.y);
352
- let a2 = -dir2.y;
353
- let b2 = +dir2.x;
354
- let d2 = -(a2 * start2.x + b2 * start2.y);
355
- let seg1_line2_start = a2 * start1.x + b2 * start1.y + d2;
356
- let seg1_line2_end = a2 * end1.x + b2 * end1.y + d2;
357
- let seg2_line1_start = a1 * start2.x + b1 * start2.y + d1;
358
- let seg2_line1_end = a1 * end2.x + b1 * end2.y + d1;
359
- if (isSegment &&
360
- (seg1_line2_start * seg1_line2_end > 0 || seg2_line1_start * seg2_line1_end > 0)) {
361
- return undefined;
362
- }
363
- let u = seg1_line2_start / (seg1_line2_start - seg1_line2_end);
364
- return new Vec2(start1.x + u * dir1.x, start1.y + u * dir1.y);
365
- }
366
- /**
367
- * Returns two segment lines intersection coordinate.
368
- * @static
369
- * @param {Vec2} start1 - First line first coordinate.
370
- * @param {Vec2} end1 - First line second coordinate.
371
- * @param {Vec2} start2 - Second line first coordinate.
372
- * @param {Vec2} end2 - Second line second coordinate.
373
- * @param {boolean} [isSegment=false] - Lines are segments.
374
- * @return {Vec2} - Intersection coordinate.
375
- */
376
- export function getLinesIntersectionLonLat(start1, end1, start2, end2, isSegment = false) {
377
- let dir1 = new LonLat(end1.lon - start1.lon, end1.lat - start1.lat);
378
- let dir2 = new LonLat(end2.lon - start2.lon, end2.lat - start2.lat);
379
- let a1 = -dir1.lat;
380
- let b1 = +dir1.lon;
381
- let d1 = -(a1 * start1.lon + b1 * start1.lat);
382
- let a2 = -dir2.lat;
383
- let b2 = +dir2.lon;
384
- let d2 = -(a2 * start2.lon + b2 * start2.lat);
385
- let seg1_line2_start = a2 * start1.lon + b2 * start1.lat + d2;
386
- let seg1_line2_end = a2 * end1.lon + b2 * end1.lat + d2;
387
- let seg2_line1_start = a1 * start2.lon + b1 * start2.lat + d1;
388
- let seg2_line1_end = a1 * end2.lon + b1 * end2.lat + d1;
389
- if (isSegment &&
390
- (seg1_line2_start * seg1_line2_end > 0 || seg2_line1_start * seg2_line1_end > 0)) {
391
- return undefined;
392
- }
393
- let u = seg1_line2_start / (seg1_line2_start - seg1_line2_end);
394
- return new LonLat(start1.lon + u * dir1.lon, start1.lat + u * dir1.lat);
395
- }
396
- /**
397
- * Converts XML to JSON
398
- * @static
399
- * @param {Object} xml - Xml object
400
- * @return {Object} - Json converted object.
401
- */
402
- export function xmlToJson(xml) {
403
- // Create the return object
404
- let obj = {};
405
- if (xml.nodeType === 1) {
406
- // element
407
- // do attributes
408
- if (xml.attributes.length > 0) {
409
- obj["@attributes"] = {};
410
- for (let j = 0; j < xml.attributes.length; j++) {
411
- let attribute = xml.attributes.item(j);
412
- obj["@attributes"][attribute.nodeName] = attribute.nodeValue;
413
- }
414
- }
415
- }
416
- else if (xml.nodeType === 3) {
417
- // text
418
- obj = xml.nodeValue;
419
- }
420
- // do children
421
- if (xml.hasChildNodes()) {
422
- for (let i = 0; i < xml.childNodes.length; i++) {
423
- let item = xml.childNodes.item(i);
424
- let nodeName = item.nodeName;
425
- if (typeof obj[nodeName] === "undefined") {
426
- obj[nodeName] = xmlToJson(item);
427
- }
428
- else {
429
- if (typeof obj[nodeName].push === "undefined") {
430
- let old = obj[nodeName];
431
- obj[nodeName] = [];
432
- obj[nodeName].push(old);
433
- }
434
- obj[nodeName].push(xmlToJson(item));
435
- }
436
- }
437
- }
438
- return obj;
439
- }
440
- export const castType = {
441
- string: function (v) {
442
- return isEmpty(v) ? v : v.toString();
443
- },
444
- date: function (v) {
445
- return isEmpty(v) ? v : new Date(v * 1000);
446
- },
447
- datetime: function (v) {
448
- return isEmpty(v) ? v : new Date(v * 1000);
449
- },
450
- time: function (v) {
451
- return isEmpty(v) ? v : parseInt(v);
452
- },
453
- integer: function (v) {
454
- return isEmpty(v) ? v : parseInt(v);
455
- },
456
- float: function (v) {
457
- return isEmpty(v) ? v : parseFloat(v);
458
- },
459
- boolean: function (str) {
460
- if (str === null) {
461
- return str;
462
- }
463
- if (typeof str === "boolean") {
464
- if (str === true) {
465
- return true;
466
- }
467
- return false;
468
- }
469
- if (typeof str === "string") {
470
- if (str === "") {
471
- return false;
472
- }
473
- str = str.replace(/^\s+|\s+$/g, "");
474
- if (str.toLowerCase() === "true" || str.toLowerCase() === "yes") {
475
- return true;
476
- }
477
- str = str.replace(/,/g, ".");
478
- str = str.replace(/^\s*\-\s*/g, "-");
479
- }
480
- if (!isNaN(str)) {
481
- return parseFloat(str) !== 0;
482
- }
483
- return false;
484
- }
485
- };
486
- export function base64toBlob(base64Data, contentType = "") {
487
- let sliceSize = 1024;
488
- let byteCharacters = atob(base64Data);
489
- let bytesLength = byteCharacters.length;
490
- let slicesCount = Math.ceil(bytesLength / sliceSize);
491
- let byteArrays = new Array(slicesCount);
492
- for (let sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
493
- let begin = sliceIndex * sliceSize;
494
- let end = Math.min(begin + sliceSize, bytesLength);
495
- let bytes = new Array(end - begin);
496
- for (let offset = begin, i = 0; offset < end; ++i, ++offset) {
497
- bytes[i] = byteCharacters[offset].charCodeAt(0);
498
- }
499
- byteArrays[sliceIndex] = new Uint8Array(bytes);
500
- }
501
- return new Blob(byteArrays, { type: contentType });
502
- }
503
- export function base64StringToBlog(string) {
504
- let block = string.split(";");
505
- let contentType = block[0].split(":")[1];
506
- let data = block[1].split(",")[1];
507
- return base64toBlob(data, contentType);
508
- }
509
- ///**
510
- // *
511
- // * @param {LonLat} p
512
- // * @param {LonLat} v1
513
- // * @param {LonLat} v2
514
- // * @param {LonLat} v3
515
- // * @param {Array<Number>} res
516
- // */
517
- //export function cartesianToBarycentricLonLat(p, v1, v2, v3, res) {
518
- // const y2y3 = v2.lat - v3.lat,
519
- // x3x2 = v3.lon - v2.lon,
520
- // x1x3 = v1.lon - v3.lon,
521
- // y1y3 = v1.lat - v3.lat,
522
- // y3y1 = v3.lat - v1.lat,
523
- // xx3 = p.lon - v3.lon,
524
- // yy3 = p.lat - v3.lat;
525
- // const d = y2y3 * x1x3 + x3x2 * y1y3,
526
- // lambda1 = (y2y3 * xx3 + x3x2 * yy3) / d,
527
- // lambda2 = (y3y1 * xx3 + x1x3 * yy3) / d;
528
- // res[0] = lambda1;
529
- // res[1] = lambda2;
530
- // res[2] = 1 - lambda1 - lambda2;
531
- // return 0 <= res[0] && res[0] <= 1 && 0 <= lambda1 && lambda1 <= 1 && 0 <= lambda2 && lambda2 <= 1;
532
- //};
533
- /**
534
- * Callback throttling
535
- * @param {any} func
536
- * @param {Number} limit
537
- * @param {boolean} [skip]
538
- */
539
- export function throttle(func, limit, skip = false) {
540
- let lastFunc;
541
- let lastRan = 0;
542
- return function () {
543
- const args = arguments;
544
- if (!lastRan) {
545
- func.apply(null, args);
546
- lastRan = Date.now();
547
- }
548
- else {
549
- if (skip) {
550
- clearTimeout(lastFunc);
551
- }
552
- lastFunc = setTimeout(() => {
553
- if (Date.now() - lastRan >= limit) {
554
- func.apply(null, args);
555
- lastRan = Date.now();
556
- }
557
- }, limit - (Date.now() - lastRan));
558
- }
559
- };
560
- }
561
- /**
562
- *
563
- * y2-----Q12--------------Q22---
564
- * | | | |
565
- * | | | |
566
- * y-------|-----P----------|----
567
- * | | | |
568
- * | | | |
569
- * | | | |
570
- * | | | |
571
- * | | | |
572
- * y1-----Q11----|---------Q21---
573
- * | | |
574
- * | | |
575
- * x1 x x2
576
- *
577
- *
578
- * @param {Number} x -
579
- * @param {Number} y -
580
- * @param {Number} fQ11 -
581
- * @param {Number} fQ21 -
582
- * @param {Number} fQ12 -
583
- * @param {Number} fQ22 -
584
- * @param {Number} [x1=0.0] -
585
- * @param {Number} [x2=1.0] -
586
- * @param {Number} [y1=0.0] -
587
- * @param {Number} [y2=1.0] -
588
- */
589
- export function blerp(x, y, fQ11, fQ21, fQ12, fQ22, x1 = 0.0, x2 = 1.0, y1 = 0.0, y2 = 1.0) {
590
- return ((fQ11 * (x2 - x) * (y2 - y) +
591
- fQ21 * (x - x1) * (y2 - y) +
592
- fQ12 * (x2 - x) * (y - y1) +
593
- fQ22 * (x - x1) * (y - y1)) /
594
- ((x2 - x1) * (y2 - y1)));
595
- }
596
- export function blerp2(x, y, fQ11, fQ21, fQ12, fQ22) {
597
- return (fQ11 * (1.0 - x) * (1.0 - y) + fQ21 * x * (1.0 - y) + fQ12 * (1.0 - x) * y + fQ22 * x * y);
598
- }
599
- export function extractElevationTiles(rgbaData, outCurrenElevations, outChildrenElevations) {
600
- let destSize = Math.sqrt(outCurrenElevations.length) - 1;
601
- let destSizeOne = destSize + 1;
602
- let sourceSize = Math.sqrt(rgbaData.length / 4);
603
- let dt = sourceSize / destSize;
604
- let rightHeigh = 0, bottomHeigh = 0;
605
- for (let k = 0, currIndex = 0, sourceDataLength = rgbaData.length / 4; k < sourceDataLength; k++) {
606
- let height = rgbaData[k * 4];
607
- let i = Math.floor(k / sourceSize), j = k % sourceSize;
608
- let tileX = Math.floor(j / destSize), tileY = Math.floor(i / destSize);
609
- let destArr = outChildrenElevations[tileY][tileX];
610
- let ii = i % destSize, jj = j % destSize;
611
- let destIndex = (ii + tileY) * destSizeOne + jj + tileX;
612
- destArr[destIndex] = height;
613
- if ((i + tileY) % dt === 0 && (j + tileX) % dt === 0) {
614
- outCurrenElevations[currIndex++] = height;
615
- }
616
- if ((j + 1) % destSize === 0 && j !== sourceSize - 1) {
617
- //current tile
618
- rightHeigh = rgbaData[(k + 1) * 4];
619
- let middleHeight = (height + rightHeigh) * 0.5;
620
- destIndex = (ii + tileY) * destSizeOne + jj + 1;
621
- destArr[destIndex] = middleHeight;
622
- if ((i + tileY) % dt === 0) {
623
- outCurrenElevations[currIndex++] = middleHeight;
624
- }
625
- //next right tile
626
- let rightindex = (ii + tileY) * destSizeOne + ((jj + 1) % destSize);
627
- outChildrenElevations[tileY][tileX + 1][rightindex] = middleHeight;
628
- }
629
- if ((i + 1) % destSize === 0 && i !== sourceSize - 1) {
630
- //current tile
631
- bottomHeigh = rgbaData[(k + sourceSize) * 4];
632
- let middleHeight = (height + bottomHeigh) * 0.5;
633
- destIndex = (ii + 1) * destSizeOne + jj + tileX;
634
- destArr[destIndex] = middleHeight;
635
- if ((j + tileX) % dt === 0) {
636
- outCurrenElevations[currIndex++] = middleHeight;
637
- }
638
- //next bottom tile
639
- let bottomindex = ((ii + 1) % destSize) * destSizeOne + jj + tileX;
640
- outChildrenElevations[tileY + 1][tileX][bottomindex] = middleHeight;
641
- }
642
- if ((j + 1) % destSize === 0 &&
643
- j !== sourceSize - 1 &&
644
- (i + 1) % destSize === 0 &&
645
- i !== sourceSize - 1) {
646
- //current tile
647
- let rightBottomHeight = rgbaData[(k + sourceSize + 1) * 4];
648
- let middleHeight = (height + rightHeigh + bottomHeigh + rightBottomHeight) * 0.25;
649
- destIndex = (ii + 1) * destSizeOne + (jj + 1);
650
- destArr[destIndex] = middleHeight;
651
- outCurrenElevations[currIndex++] = middleHeight;
652
- //next right tile
653
- let rightindex = (ii + 1) * destSizeOne;
654
- outChildrenElevations[tileY][tileX + 1][rightindex] = middleHeight;
655
- //next bottom tile
656
- let bottomindex = destSize;
657
- outChildrenElevations[tileY + 1][tileX][bottomindex] = middleHeight;
658
- //next right bottom tile
659
- let rightBottomindex = 0;
660
- outChildrenElevations[tileY + 1][tileX + 1][rightBottomindex] = middleHeight;
661
- }
662
- }
663
- }
664
- /**
665
- * Concatenates two the same type arrays
666
- * @param {TypedArray} a
667
- * @param {TypedArray | number[]} b
668
- */
669
- export function concatTypedArrays(a, b) {
670
- let c = new a.constructor(a.length + b.length); //hacky
671
- c.set(a, 0);
672
- c.set(b, a.length);
673
- return c;
674
- }
675
- /**
676
- * Concatenates two the same arrays
677
- * @param {TypedArray | number[]} [a=[]] - First array
678
- * @param {TypedArray | number[]} [b=[]] - Second array
679
- * @return {TypedArray | number[]} -
680
- */
681
- export function concatArrays(a = [], b = []) {
682
- if (ArrayBuffer.isView(a)) {
683
- return concatTypedArrays(a, b);
684
- }
685
- else {
686
- for (let i = 0; i < b.length; i++) {
687
- a.push(b[i]);
688
- }
689
- return a;
690
- }
691
- }
692
- /**
693
- * Convert simple array to typed
694
- * @param arr {number[]}
695
- * @param ctor {Float32Array}
696
- * @returns {TypedArray}
697
- */
698
- export function makeArrayTyped(arr, ctor = Float32Array) {
699
- if (!ArrayBuffer.isView(arr)) {
700
- const typedArr = new ctor(arr.length); //hacky
701
- typedArr.set(arr, 0);
702
- return typedArr;
703
- }
704
- else {
705
- return arr;
706
- }
707
- }
708
- /**
709
- * Convert typed array to array
710
- * @param arr {TypedArray | number[]}
711
- * @returns {number[]}
712
- */
713
- export function makeArray(arr) {
714
- if (ArrayBuffer.isView(arr)) {
715
- return Array.from(arr);
716
- }
717
- else {
718
- return arr;
719
- }
720
- }
721
- /**
722
- *
723
- * @param {TypedArray | Array} arr
724
- * @param {Number} starting
725
- * @param {Number} deleteCount
726
- * @param {{ result: number[] }} [out]
727
- */
728
- export function spliceArray(arr, starting, deleteCount, out) {
729
- if (ArrayBuffer.isView(arr)) {
730
- if (starting < 0) {
731
- deleteCount = Math.abs(starting);
732
- starting += arr.length;
733
- }
734
- return spliceTypedArray(arr, starting, deleteCount, out);
735
- }
736
- else {
737
- let res;
738
- if (starting < 0) {
739
- res = arr.splice(starting);
740
- }
741
- else {
742
- res = arr.splice(starting, deleteCount);
743
- }
744
- if (out) {
745
- out.result = res;
746
- }
747
- return arr;
748
- }
749
- }
750
- /**
751
- *
752
- * @param {TypedArray} arr
753
- * @param {Number} starting
754
- * @param {Number} deleteCount
755
- * @param {{ result: TypedArray }} [out]
756
- */
757
- export function spliceTypedArray(arr, starting, deleteCount, out) {
758
- if (arr.length === 0) {
759
- return arr;
760
- }
761
- const newSize = arr.length - deleteCount;
762
- const splicedArray = new arr.constructor(newSize); //hacky
763
- splicedArray.set(arr.subarray(0, starting));
764
- splicedArray.set(arr.subarray(starting + deleteCount), starting);
765
- if (out) {
766
- out.result = arr.subarray(starting, starting + deleteCount);
767
- }
768
- return splicedArray;
769
- }
770
- /**
771
- * Returns 64-bit triangle coordinate array from inside of the source triangle array.
772
- * @static
773
- * @param {TypedArray | number[]} sourceArr - Source array
774
- * @param {number} gridSize - Source array square matrix size
775
- * @param {number} i0 - First row index source array matrix
776
- * @param {number} j0 - First column index
777
- * @param {number} size - Square matrix result size.
778
- * @return {Float64Array} Triangle coordinates array from the source array.
779
- * @TODO: optimization
780
- */
781
- export function getMatrixSubArray64(sourceArr, gridSize, i0, j0, size) {
782
- const size_1 = size + 1;
783
- const i0size = i0 + size_1;
784
- const j0size = j0 + size_1;
785
- let res = new Float64Array(size_1 * size_1 * 3);
786
- let vInd = 0;
787
- for (let i = i0; i < i0size; i++) {
788
- for (let j = j0; j < j0size; j++) {
789
- let ind = 3 * (i * (gridSize + 1) + j);
790
- res[vInd++] = sourceArr[ind];
791
- res[vInd++] = sourceArr[ind + 1];
792
- res[vInd++] = sourceArr[ind + 2];
793
- }
794
- }
795
- return res;
796
- }
797
- /**
798
- * Returns 32-bit triangle coordinate array from inside of the source triangle array.
799
- * @static
800
- * @param {TypedArray | number[]} sourceArr - Source array
801
- * @param {number} gridSize - Source array square matrix size
802
- * @param {number} i0 - First row index source array matrix
803
- * @param {number} j0 - First column index
804
- * @param {number} size - Square matrix result size.
805
- * @return {Float32Array} Triangle coordinates array from the source array.
806
- */
807
- export function getMatrixSubArray32(sourceArr, gridSize, i0, j0, size) {
808
- const size_1 = size + 1;
809
- const i0size = i0 + size_1;
810
- const j0size = j0 + size_1;
811
- let res = new Float32Array(size_1 * size_1 * 3);
812
- let vInd = 0;
813
- for (let i = i0; i < i0size; i++) {
814
- for (let j = j0; j < j0size; j++) {
815
- let ind = 3 * (i * (gridSize + 1) + j);
816
- res[vInd++] = sourceArr[ind];
817
- res[vInd++] = sourceArr[ind + 1];
818
- res[vInd++] = sourceArr[ind + 2];
819
- }
820
- }
821
- return res;
822
- }
823
- /**
824
- * Returns two float32 triangle coordinate arrays from inside of the source triangle array.
825
- * @TODO: optimization
826
- */
827
- export function getMatrixSubArrayBoundsExt(sourceArr, sourceArrHigh, sourceArrLow, noDataVertices, gridSize, i0, j0, size, outArr, outArrHigh, outArrLow, outBounds, outNoDataVertices) {
828
- const i0size = i0 + size + 1;
829
- const j0size = j0 + size + 1;
830
- gridSize += 1;
831
- let vInd = 0, nInd = 0;
832
- for (let i = i0; i < i0size; i++) {
833
- for (let j = j0; j < j0size; j++) {
834
- let indBy3 = i * gridSize + j, ind = 3 * indBy3;
835
- let x = sourceArr[ind], y = sourceArr[ind + 1], z = sourceArr[ind + 2];
836
- if (!noDataVertices || noDataVertices[indBy3] === 0) {
837
- if (x < outBounds.xmin)
838
- outBounds.xmin = x;
839
- if (x > outBounds.xmax)
840
- outBounds.xmax = x;
841
- if (y < outBounds.ymin)
842
- outBounds.ymin = y;
843
- if (y > outBounds.ymax)
844
- outBounds.ymax = y;
845
- if (z < outBounds.zmin)
846
- outBounds.zmin = z;
847
- if (z > outBounds.zmax)
848
- outBounds.zmax = z;
849
- }
850
- else {
851
- outNoDataVertices[nInd] = 1;
852
- }
853
- nInd++;
854
- outArr[vInd] = x;
855
- outArrLow[vInd] = sourceArrLow[ind];
856
- outArrHigh[vInd++] = sourceArrHigh[ind];
857
- outArr[vInd] = y;
858
- outArrLow[vInd] = sourceArrLow[ind + 1];
859
- outArrHigh[vInd++] = sourceArrHigh[ind + 1];
860
- outArr[vInd] = z;
861
- outArrLow[vInd] = sourceArrLow[ind + 2];
862
- outArrHigh[vInd++] = sourceArrHigh[ind + 2];
863
- }
864
- }
865
- }
866
- export function cloneArray(items) {
867
- return items.map((item) => (Array.isArray(item) ? cloneArray(item) : item));
868
- }
869
- /**
870
- * Promise for load images
871
- * @function
872
- * @param {string} url - link to image.
873
- * @returns {Promise<Image>} Returns promise.
874
- */
875
- export async function loadImage(url) {
876
- return new Promise(resolve => {
877
- const image = new Image();
878
- image.addEventListener('load', () => {
879
- resolve(image);
880
- });
881
- image.src = url;
882
- image.crossOrigin = "";
883
- return image;
884
- });
885
- }
886
- /**
887
- * Gets image is loaded
888
- * @param {HTMLImageElement} image
889
- * @returns {boolean} Returns true is the image is loaded
890
- */
891
- export function isImageLoaded(image) {
892
- return image.complete && image.naturalHeight !== 0;
893
- }
894
- export function distanceFormat(v) {
895
- if (v > 1000) {
896
- return `${(v / 1000).toFixed(2)} km`;
897
- }
898
- else if (v > 9) {
899
- return `${Math.round(v)} m`;
900
- }
901
- else {
902
- return `${v.toFixed(1)} m`;
903
- }
904
- }
905
- export function distanceFormatExt(v) {
906
- if (v > 1000) {
907
- let d = v - Math.floor(v);
908
- if (d !== 0) {
909
- return [(v / 1000).toFixed(2), "km"];
910
- }
911
- return [(v / 1000).toFixed(0), "km"];
912
- }
913
- else if (v > 9) {
914
- return [Math.round(v).toString(), "m"];
915
- }
916
- else {
917
- if (v <= 0.01) {
918
- return ["0", "m"];
919
- }
920
- return [v.toFixed(1), "m"];
921
- }
922
- }
923
- export function getUrlParam(paramName) {
924
- let urlParams = new URLSearchParams(location.search);
925
- let param = urlParams.get(paramName);
926
- if (param) {
927
- return Number(param);
928
- }
929
- }
930
- /**
931
- *
932
- * @param x
933
- * @param y
934
- * @param z
935
- * @param imageSize
936
- * @param ellipsoid
937
- *
938
- * console.log(1, getTileImageResolution(0, 0, 1));
939
- * console.log(7, getTileImageResolution(66, 44, 7));
940
- * console.log(10, getTileImageResolution(536, 358, 10));
941
- * console.log(12, getTileImageResolution(2149, 1446, 12));
942
- * console.log(13, getTileImageResolution(4301, 2892, 13));
943
- * console.log(14, getTileImageResolution(8582, 5736, 14));
944
- * console.log(15, getTileImageResolution(17205, 11569, 15));
945
- * console.log(16, getTileImageResolution(34419, 23138, 16));
946
- * console.log(17, getTileImageResolution(68661, 45892, 17));
947
- * console.log(18, getTileImageResolution(137650, 92555, 18));
948
- */
949
- export function getTileImageResolution(x, y, z, imageSize = 256, ellipsoid = wgs84) {
950
- let ext = mercator.getTileExtent(x, y, z);
951
- let b0 = ext.getSouthWest().inverseMercator(), b1 = ext.getNorthEast().inverseMercator();
952
- let width = ellipsoid.getGreatCircleDistance(b0, new LonLat(b1.lon, b0.lat)), height = ellipsoid.getGreatCircleDistance(b0, new LonLat(b0.lon, b1.lat));
953
- return [width / imageSize, height / imageSize];
954
- }
955
- export function toFixedMax(value, maxFixed = -1) {
956
- if (maxFixed < 0) {
957
- return value.toString();
958
- }
959
- const factor = Math.pow(10, maxFixed);
960
- return (Math.round(value * factor) / factor).toString();
961
- }