@openglobus/og 0.24.2 → 0.25.1

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 (753) 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 +75 -68
  44. package/css/og.css +0 -1342
  45. package/lib/@openglobus/js/Globe.d.ts +0 -145
  46. package/lib/@openglobus/js/Object3d.d.ts +0 -81
  47. package/lib/@openglobus/js/control/Atmosphere.d.ts +0 -40
  48. package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +0 -28
  49. package/lib/@openglobus/js/control/index.d.ts +0 -30
  50. package/lib/@openglobus/js/segment/segmentHelper.d.ts +0 -18
  51. package/lib/@openglobus/js/shaders/bloom.d.ts +0 -2
  52. package/lib/@openglobus/js/shaders/blur.d.ts +0 -3
  53. package/lib/@openglobus/js/shaders/drawnode.d.ts +0 -10
  54. package/lib/@openglobus/js/shaders/lumFilter.d.ts +0 -2
  55. package/lib/@openglobus/js/shaders/ray.d.ts +0 -2
  56. package/lib/@openglobus/js/shaders/utils.d.ts +0 -1
  57. package/lib/@openglobus/js/utils/shared.d.ts +0 -287
  58. package/lib/@openglobus/js/webgl/Framebuffer.d.ts +0 -97
  59. package/lib/@openglobus/og.css +0 -1
  60. package/lib/@openglobus/og.esm.js +0 -2
  61. package/lib/@openglobus/og.esm.js.map +0 -1
  62. package/lib/@openglobus/og.umd.js +0 -2
  63. package/lib/@openglobus/og.umd.js.map +0 -1
  64. package/lib/@openglobus/res/fonts/Ephesis-Regular.json +0 -4648
  65. package/lib/@openglobus/res/fonts/Ephesis-Regular.ttf.cfg +0 -1282
  66. package/lib/@openglobus/res/fonts/Ephesis-Regular.ttf.png +0 -0
  67. package/lib/@openglobus/res/fonts/Karla-Bold.json +0 -5252
  68. package/lib/@openglobus/res/fonts/Karla-Bold.ttf.cfg +0 -920
  69. package/lib/@openglobus/res/fonts/Karla-Bold.ttf.png +0 -0
  70. package/lib/@openglobus/res/fonts/Karla-Light.json +0 -5252
  71. package/lib/@openglobus/res/fonts/Karla-Light.ttf.cfg +0 -830
  72. package/lib/@openglobus/res/fonts/Karla-Light.ttf.png +0 -0
  73. package/lib/@openglobus/res/fonts/Karla-Medium.json +0 -5252
  74. package/lib/@openglobus/res/fonts/Karla-Medium.ttf.cfg +0 -1196
  75. package/lib/@openglobus/res/fonts/Karla-Medium.ttf.png +0 -0
  76. package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.json +0 -3332
  77. package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.cfg +0 -1370
  78. package/lib/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
  79. package/lib/@openglobus/res/fonts/arial.js +0 -4325
  80. package/lib/js/Clock.d.ts +0 -106
  81. package/lib/js/Clock.js +0 -141
  82. package/lib/js/Deferred.d.ts +0 -6
  83. package/lib/js/Deferred.js +0 -13
  84. package/lib/js/Events.d.ts +0 -90
  85. package/lib/js/Events.js +0 -145
  86. package/lib/js/Extent.d.ts +0 -145
  87. package/lib/js/Extent.js +0 -278
  88. package/lib/js/Globe.js +0 -289
  89. package/lib/js/ImageCanvas.d.ts +0 -128
  90. package/lib/js/ImageCanvas.js +0 -203
  91. package/lib/js/Lock.d.ts +0 -15
  92. package/lib/js/Lock.js +0 -27
  93. package/lib/js/LonLat.d.ts +0 -128
  94. package/lib/js/LonLat.js +0 -192
  95. package/lib/js/Object3d.js +0 -508
  96. package/lib/js/Popup.d.ts +0 -49
  97. package/lib/js/Popup.js +0 -160
  98. package/lib/js/QueueArray.d.ts +0 -16
  99. package/lib/js/QueueArray.js +0 -63
  100. package/lib/js/Rectangle.d.ts +0 -76
  101. package/lib/js/Rectangle.js +0 -77
  102. package/lib/js/Stack.d.ts +0 -20
  103. package/lib/js/Stack.js +0 -42
  104. package/lib/js/astro/astro.d.ts +0 -39
  105. package/lib/js/astro/astro.js +0 -43
  106. package/lib/js/astro/earth.d.ts +0 -8
  107. package/lib/js/astro/earth.js +0 -75
  108. package/lib/js/astro/jd.d.ts +0 -234
  109. package/lib/js/astro/jd.js +0 -416
  110. package/lib/js/astro/orbit.d.ts +0 -5
  111. package/lib/js/astro/orbit.js +0 -104
  112. package/lib/js/astro/rotation.d.ts +0 -2
  113. package/lib/js/astro/rotation.js +0 -25
  114. package/lib/js/bv/Box.d.ts +0 -32
  115. package/lib/js/bv/Box.js +0 -53
  116. package/lib/js/bv/Sphere.d.ts +0 -37
  117. package/lib/js/bv/Sphere.js +0 -31
  118. package/lib/js/bv/index.d.ts +0 -3
  119. package/lib/js/bv/index.js +0 -3
  120. package/lib/js/camera/Camera.d.ts +0 -361
  121. package/lib/js/camera/Camera.js +0 -541
  122. package/lib/js/camera/Frustum.d.ts +0 -142
  123. package/lib/js/camera/Frustum.js +0 -246
  124. package/lib/js/camera/PlanetCamera.d.ts +0 -247
  125. package/lib/js/camera/PlanetCamera.js +0 -513
  126. package/lib/js/camera/index.d.ts +0 -3
  127. package/lib/js/camera/index.js +0 -3
  128. package/lib/js/cons.d.ts +0 -40
  129. package/lib/js/cons.js +0 -92
  130. package/lib/js/control/Atmosphere.js +0 -401
  131. package/lib/js/control/AtmosphereConfig.d.ts +0 -59
  132. package/lib/js/control/AtmosphereConfig.js +0 -348
  133. package/lib/js/control/CameraLock.d.ts +0 -38
  134. package/lib/js/control/CameraLock.js +0 -216
  135. package/lib/js/control/CompassButton.d.ts +0 -16
  136. package/lib/js/control/CompassButton.js +0 -118
  137. package/lib/js/control/Control.d.ts +0 -100
  138. package/lib/js/control/Control.js +0 -137
  139. package/lib/js/control/DebugInfo.d.ts +0 -25
  140. package/lib/js/control/DebugInfo.js +0 -318
  141. package/lib/js/control/DrawingSwitcher.d.ts +0 -13
  142. package/lib/js/control/DrawingSwitcher.js +0 -94
  143. package/lib/js/control/EarthCoordinates.d.ts +0 -41
  144. package/lib/js/control/EarthCoordinates.js +0 -161
  145. package/lib/js/control/GeoImageDragControl.d.ts +0 -22
  146. package/lib/js/control/GeoImageDragControl.js +0 -102
  147. package/lib/js/control/KeyboardNavigation.d.ts +0 -28
  148. package/lib/js/control/KeyboardNavigation.js +0 -143
  149. package/lib/js/control/LayerAnimation.d.ts +0 -71
  150. package/lib/js/control/LayerAnimation.js +0 -283
  151. package/lib/js/control/LayerSwitcher.d.ts +0 -38
  152. package/lib/js/control/LayerSwitcher.js +0 -151
  153. package/lib/js/control/Lighting.d.ts +0 -54
  154. package/lib/js/control/Lighting.js +0 -459
  155. package/lib/js/control/MouseNavigation.d.ts +0 -76
  156. package/lib/js/control/MouseNavigation.js +0 -414
  157. package/lib/js/control/MouseWheelZoomControl.d.ts +0 -0
  158. package/lib/js/control/MouseWheelZoomControl.js +0 -270
  159. package/lib/js/control/OldMouseNavigation.d.ts +0 -65
  160. package/lib/js/control/OldMouseNavigation.js +0 -368
  161. package/lib/js/control/RulerSwitcher.d.ts +0 -18
  162. package/lib/js/control/RulerSwitcher.js +0 -57
  163. package/lib/js/control/ScaleControl.d.ts +0 -25
  164. package/lib/js/control/ScaleControl.js +0 -97
  165. package/lib/js/control/SegmentBoundVisualization.d.ts +0 -13
  166. package/lib/js/control/SegmentBoundVisualization.js +0 -37
  167. package/lib/js/control/ShowFps.d.ts +0 -10
  168. package/lib/js/control/ShowFps.js +0 -20
  169. package/lib/js/control/SimpleNavigation.d.ts +0 -43
  170. package/lib/js/control/SimpleNavigation.js +0 -196
  171. package/lib/js/control/SimpleSkyBackground.d.ts +0 -18
  172. package/lib/js/control/SimpleSkyBackground.js +0 -187
  173. package/lib/js/control/Sun.d.ts +0 -34
  174. package/lib/js/control/Sun.js +0 -117
  175. package/lib/js/control/ToggleWireframe.d.ts +0 -15
  176. package/lib/js/control/ToggleWireframe.js +0 -28
  177. package/lib/js/control/TouchNavigation.d.ts +0 -53
  178. package/lib/js/control/TouchNavigation.js +0 -266
  179. package/lib/js/control/ZoomControl.d.ts +0 -28
  180. package/lib/js/control/ZoomControl.js +0 -86
  181. package/lib/js/control/drawing/DrawingControl.d.ts +0 -12
  182. package/lib/js/control/drawing/DrawingControl.js +0 -35
  183. package/lib/js/control/drawing/LineStringDrawingScene.d.ts +0 -15
  184. package/lib/js/control/drawing/LineStringDrawingScene.js +0 -139
  185. package/lib/js/control/drawing/PolygonDrawingScene.d.ts +0 -98
  186. package/lib/js/control/drawing/PolygonDrawingScene.js +0 -533
  187. package/lib/js/control/elevationProfile/ElevationProfile.d.ts +0 -77
  188. package/lib/js/control/elevationProfile/ElevationProfile.js +0 -248
  189. package/lib/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +0 -15
  190. package/lib/js/control/elevationProfile/ElevationProfileButtonsView.js +0 -61
  191. package/lib/js/control/elevationProfile/ElevationProfileControl.d.ts +0 -33
  192. package/lib/js/control/elevationProfile/ElevationProfileControl.js +0 -151
  193. package/lib/js/control/elevationProfile/ElevationProfileLegend.d.ts +0 -20
  194. package/lib/js/control/elevationProfile/ElevationProfileLegend.js +0 -82
  195. package/lib/js/control/elevationProfile/ElevationProfileScene.d.ts +0 -80
  196. package/lib/js/control/elevationProfile/ElevationProfileScene.js +0 -542
  197. package/lib/js/control/elevationProfile/ElevationProfileView.d.ts +0 -65
  198. package/lib/js/control/elevationProfile/ElevationProfileView.js +0 -504
  199. package/lib/js/control/elevationProfile/PointListDialog.d.ts +0 -12
  200. package/lib/js/control/elevationProfile/PointListDialog.js +0 -57
  201. package/lib/js/control/geoObjectEditor/ArrowEntity.d.ts +0 -15
  202. package/lib/js/control/geoObjectEditor/ArrowEntity.js +0 -59
  203. package/lib/js/control/geoObjectEditor/AxisTrackEntity.d.ts +0 -9
  204. package/lib/js/control/geoObjectEditor/AxisTrackEntity.js +0 -93
  205. package/lib/js/control/geoObjectEditor/GeoObjectEditor.d.ts +0 -13
  206. package/lib/js/control/geoObjectEditor/GeoObjectEditor.js +0 -30
  207. package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.d.ts +0 -69
  208. package/lib/js/control/geoObjectEditor/GeoObjectEditorDialog.js +0 -488
  209. package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.d.ts +0 -127
  210. package/lib/js/control/geoObjectEditor/GeoObjectEditorScene.js +0 -549
  211. package/lib/js/control/geoObjectEditor/MoveAxisEntity.d.ts +0 -17
  212. package/lib/js/control/geoObjectEditor/MoveAxisEntity.js +0 -107
  213. package/lib/js/control/geoObjectEditor/MovePlaneEntity.d.ts +0 -7
  214. package/lib/js/control/geoObjectEditor/MovePlaneEntity.js +0 -31
  215. package/lib/js/control/geoObjectEditor/RotateEntity.d.ts +0 -9
  216. package/lib/js/control/geoObjectEditor/RotateEntity.js +0 -105
  217. package/lib/js/control/geoObjectEditor/colors.d.ts +0 -8
  218. package/lib/js/control/geoObjectEditor/colors.js +0 -8
  219. package/lib/js/control/heightRuler/HeightRuler.d.ts +0 -7
  220. package/lib/js/control/heightRuler/HeightRuler.js +0 -11
  221. package/lib/js/control/heightRuler/HeightRulerScene.d.ts +0 -35
  222. package/lib/js/control/heightRuler/HeightRulerScene.js +0 -181
  223. package/lib/js/control/heightRuler/HeightRulerSwitcher.d.ts +0 -6
  224. package/lib/js/control/heightRuler/HeightRulerSwitcher.js +0 -13
  225. package/lib/js/control/index.js +0 -30
  226. package/lib/js/control/ruler/Ruler.d.ts +0 -14
  227. package/lib/js/control/ruler/Ruler.js +0 -23
  228. package/lib/js/control/ruler/RulerScene.d.ts +0 -88
  229. package/lib/js/control/ruler/RulerScene.js +0 -324
  230. package/lib/js/control/selection/Selection.d.ts +0 -56
  231. package/lib/js/control/selection/Selection.js +0 -78
  232. package/lib/js/control/selection/SelectionScene.d.ts +0 -44
  233. package/lib/js/control/selection/SelectionScene.js +0 -272
  234. package/lib/js/control/timeline/TimelineControl.d.ts +0 -18
  235. package/lib/js/control/timeline/TimelineControl.js +0 -81
  236. package/lib/js/control/timeline/TimelineModel.d.ts +0 -41
  237. package/lib/js/control/timeline/TimelineModel.js +0 -104
  238. package/lib/js/control/timeline/TimelineView.d.ts +0 -86
  239. package/lib/js/control/timeline/TimelineView.js +0 -363
  240. package/lib/js/control/timeline/timelineUtils.d.ts +0 -12
  241. package/lib/js/control/timeline/timelineUtils.js +0 -112
  242. package/lib/js/control/visibleExtent/Segment.js +0 -1301
  243. package/lib/js/control/visibleExtent/VisibleExtent.js +0 -56
  244. package/lib/js/control/visibleExtent/drawnode.d.ts +0 -7
  245. package/lib/js/control/visibleExtent/drawnode.js +0 -718
  246. package/lib/js/ellipsoid/Ellipsoid.d.ts +0 -194
  247. package/lib/js/ellipsoid/Ellipsoid.js +0 -459
  248. package/lib/js/ellipsoid/index.d.ts +0 -4
  249. package/lib/js/ellipsoid/index.js +0 -4
  250. package/lib/js/ellipsoid/mars.d.ts +0 -6
  251. package/lib/js/ellipsoid/mars.js +0 -6
  252. package/lib/js/ellipsoid/moon.d.ts +0 -6
  253. package/lib/js/ellipsoid/moon.js +0 -6
  254. package/lib/js/ellipsoid/wgs84.d.ts +0 -6
  255. package/lib/js/ellipsoid/wgs84.js +0 -6
  256. package/lib/js/entity/BaseBillboard.d.ts +0 -225
  257. package/lib/js/entity/BaseBillboard.js +0 -284
  258. package/lib/js/entity/BaseBillboardHandler.d.ts +0 -81
  259. package/lib/js/entity/BaseBillboardHandler.js +0 -546
  260. package/lib/js/entity/Billboard.d.ts +0 -114
  261. package/lib/js/entity/Billboard.js +0 -127
  262. package/lib/js/entity/BillboardHandler.d.ts +0 -15
  263. package/lib/js/entity/BillboardHandler.js +0 -103
  264. package/lib/js/entity/Entity.d.ts +0 -630
  265. package/lib/js/entity/Entity.js +0 -957
  266. package/lib/js/entity/EntityCollection.d.ts +0 -368
  267. package/lib/js/entity/EntityCollection.js +0 -655
  268. package/lib/js/entity/GeoObject.d.ts +0 -257
  269. package/lib/js/entity/GeoObject.js +0 -318
  270. package/lib/js/entity/GeoObjectHandler.d.ts +0 -81
  271. package/lib/js/entity/GeoObjectHandler.js +0 -515
  272. package/lib/js/entity/Geometry.d.ts +0 -125
  273. package/lib/js/entity/Geometry.js +0 -291
  274. package/lib/js/entity/GeometryHandler.d.ts +0 -86
  275. package/lib/js/entity/GeometryHandler.js +0 -745
  276. package/lib/js/entity/InstanceData.d.ts +0 -76
  277. package/lib/js/entity/InstanceData.js +0 -347
  278. package/lib/js/entity/Label.d.ts +0 -230
  279. package/lib/js/entity/Label.js +0 -322
  280. package/lib/js/entity/LabelHandler.d.ts +0 -65
  281. package/lib/js/entity/LabelHandler.js +0 -696
  282. package/lib/js/entity/LabelWorker.d.ts +0 -15
  283. package/lib/js/entity/LabelWorker.js +0 -163
  284. package/lib/js/entity/PointCloud.d.ts +0 -179
  285. package/lib/js/entity/PointCloud.js +0 -327
  286. package/lib/js/entity/PointCloudHandler.d.ts +0 -42
  287. package/lib/js/entity/PointCloudHandler.js +0 -82
  288. package/lib/js/entity/Polyline.d.ts +0 -360
  289. package/lib/js/entity/Polyline.js +0 -1635
  290. package/lib/js/entity/PolylineHandler.d.ts +0 -29
  291. package/lib/js/entity/PolylineHandler.js +0 -103
  292. package/lib/js/entity/Ray.d.ts +0 -135
  293. package/lib/js/entity/Ray.js +0 -171
  294. package/lib/js/entity/RayHandler.d.ts +0 -70
  295. package/lib/js/entity/RayHandler.js +0 -496
  296. package/lib/js/entity/Strip.d.ts +0 -141
  297. package/lib/js/entity/Strip.js +0 -417
  298. package/lib/js/entity/StripHandler.d.ts +0 -42
  299. package/lib/js/entity/StripHandler.js +0 -110
  300. package/lib/js/entity/index.d.ts +0 -10
  301. package/lib/js/entity/index.js +0 -10
  302. package/lib/js/index.d.ts +0 -34
  303. package/lib/js/index.js +0 -34
  304. package/lib/js/input/KeyboardHandler.d.ts +0 -33
  305. package/lib/js/input/KeyboardHandler.js +0 -159
  306. package/lib/js/input/MouseHandler.d.ts +0 -17
  307. package/lib/js/input/MouseHandler.js +0 -92
  308. package/lib/js/input/TouchHandler.d.ts +0 -11
  309. package/lib/js/input/TouchHandler.js +0 -42
  310. package/lib/js/input/input.d.ts +0 -3
  311. package/lib/js/input/input.js +0 -47
  312. package/lib/js/layer/BaseGeoImage.d.ts +0 -146
  313. package/lib/js/layer/BaseGeoImage.js +0 -382
  314. package/lib/js/layer/Bing.d.ts +0 -5
  315. package/lib/js/layer/Bing.js +0 -41
  316. package/lib/js/layer/CanvasTiles.d.ts +0 -104
  317. package/lib/js/layer/CanvasTiles.js +0 -292
  318. package/lib/js/layer/GeoImage.d.ts +0 -62
  319. package/lib/js/layer/GeoImage.js +0 -133
  320. package/lib/js/layer/GeoTexture2d.d.ts +0 -18
  321. package/lib/js/layer/GeoTexture2d.js +0 -37
  322. package/lib/js/layer/GeoVideo.d.ts +0 -69
  323. package/lib/js/layer/GeoVideo.js +0 -157
  324. package/lib/js/layer/KML.d.ts +0 -74
  325. package/lib/js/layer/KML.js +0 -303
  326. package/lib/js/layer/Layer.d.ts +0 -416
  327. package/lib/js/layer/Layer.js +0 -734
  328. package/lib/js/layer/Material.d.ts +0 -34
  329. package/lib/js/layer/Material.js +0 -69
  330. package/lib/js/layer/OpenStreetMap.d.ts +0 -5
  331. package/lib/js/layer/OpenStreetMap.js +0 -19
  332. package/lib/js/layer/Vector.d.ts +0 -240
  333. package/lib/js/layer/Vector.js +0 -767
  334. package/lib/js/layer/WMS.d.ts +0 -76
  335. package/lib/js/layer/WMS.js +0 -112
  336. package/lib/js/layer/XYZ.d.ts +0 -149
  337. package/lib/js/layer/XYZ.js +0 -299
  338. package/lib/js/layer/index.d.ts +0 -12
  339. package/lib/js/layer/index.js +0 -12
  340. package/lib/js/light/LightSource.d.ts +0 -36
  341. package/lib/js/light/LightSource.js +0 -86
  342. package/lib/js/math/Line2.d.ts +0 -11
  343. package/lib/js/math/Line2.js +0 -21
  344. package/lib/js/math/Line3.d.ts +0 -28
  345. package/lib/js/math/Line3.js +0 -85
  346. package/lib/js/math/Mat3.d.ts +0 -77
  347. package/lib/js/math/Mat3.js +0 -139
  348. package/lib/js/math/Mat4.d.ts +0 -204
  349. package/lib/js/math/Mat4.js +0 -487
  350. package/lib/js/math/Plane.d.ts +0 -22
  351. package/lib/js/math/Plane.js +0 -118
  352. package/lib/js/math/Quat.d.ts +0 -393
  353. package/lib/js/math/Quat.js +0 -794
  354. package/lib/js/math/Ray.d.ts +0 -72
  355. package/lib/js/math/Ray.js +0 -211
  356. package/lib/js/math/Vec2.d.ts +0 -332
  357. package/lib/js/math/Vec2.js +0 -495
  358. package/lib/js/math/Vec3.d.ts +0 -488
  359. package/lib/js/math/Vec3.js +0 -828
  360. package/lib/js/math/Vec4.d.ts +0 -163
  361. package/lib/js/math/Vec4.js +0 -211
  362. package/lib/js/math/coder.d.ts +0 -53
  363. package/lib/js/math/coder.js +0 -101
  364. package/lib/js/math/index.d.ts +0 -14
  365. package/lib/js/math/index.js +0 -11
  366. package/lib/js/math.d.ts +0 -266
  367. package/lib/js/math.js +0 -379
  368. package/lib/js/mercator.d.ts +0 -92
  369. package/lib/js/mercator.js +0 -120
  370. package/lib/js/proj/EPSG3857.d.ts +0 -9
  371. package/lib/js/proj/EPSG3857.js +0 -9
  372. package/lib/js/proj/EPSG4326.d.ts +0 -9
  373. package/lib/js/proj/EPSG4326.js +0 -9
  374. package/lib/js/proj/Proj.d.ts +0 -43
  375. package/lib/js/proj/Proj.js +0 -38
  376. package/lib/js/proj/equi.d.ts +0 -9
  377. package/lib/js/proj/equi.js +0 -9
  378. package/lib/js/quadTree/EPSG4326/EPSG4326QuadTreeStrategy.d.ts +0 -6
  379. package/lib/js/quadTree/EPSG4326/EPSG4326QuadTreeStrategy.js +0 -16
  380. package/lib/js/quadTree/EntityCollectionNode.d.ts +0 -46
  381. package/lib/js/quadTree/EntityCollectionNode.js +0 -262
  382. package/lib/js/quadTree/EntityCollectionsTreeStrategy.d.ts +0 -25
  383. package/lib/js/quadTree/EntityCollectionsTreeStrategy.js +0 -49
  384. package/lib/js/quadTree/Node.d.ts +0 -80
  385. package/lib/js/quadTree/Node.js +0 -712
  386. package/lib/js/quadTree/QuadTreeStrategy.d.ts +0 -39
  387. package/lib/js/quadTree/QuadTreeStrategy.js +0 -98
  388. package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.d.ts +0 -19
  389. package/lib/js/quadTree/earth/EarthEntityCollectionNodeLonLat.js +0 -74
  390. package/lib/js/quadTree/earth/EarthEntityCollectionsTreeStrategy.d.ts +0 -19
  391. package/lib/js/quadTree/earth/EarthEntityCollectionsTreeStrategy.js +0 -103
  392. package/lib/js/quadTree/earth/EarthQuadTreeStrategy.d.ts +0 -27
  393. package/lib/js/quadTree/earth/EarthQuadTreeStrategy.js +0 -77
  394. package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.d.ts +0 -18
  395. package/lib/js/quadTree/equi/EquiEntityCollectionNodeLonLat.js +0 -70
  396. package/lib/js/quadTree/equi/EquiEntityCollectionsTreeStrategy.d.ts +0 -17
  397. package/lib/js/quadTree/equi/EquiEntityCollectionsTreeStrategy.js +0 -75
  398. package/lib/js/quadTree/equi/EquiQuadTreeStrategy.d.ts +0 -19
  399. package/lib/js/quadTree/equi/EquiQuadTreeStrategy.js +0 -62
  400. package/lib/js/quadTree/index.d.ts +0 -12
  401. package/lib/js/quadTree/index.js +0 -12
  402. package/lib/js/quadTree/quadTree.d.ts +0 -40
  403. package/lib/js/quadTree/quadTree.js +0 -66
  404. package/lib/js/quadTree/wgs84/Wgs84QuadTreeStrategy.d.ts +0 -6
  405. package/lib/js/quadTree/wgs84/Wgs84QuadTreeStrategy.js +0 -15
  406. package/lib/js/renderer/Renderer.d.ts +0 -343
  407. package/lib/js/renderer/Renderer.js +0 -969
  408. package/lib/js/renderer/RendererEvents.d.ts +0 -245
  409. package/lib/js/renderer/RendererEvents.js +0 -870
  410. package/lib/js/scene/Axes.d.ts +0 -12
  411. package/lib/js/scene/Axes.js +0 -59
  412. package/lib/js/scene/BaseNode.d.ts +0 -61
  413. package/lib/js/scene/BaseNode.js +0 -69
  414. package/lib/js/scene/Planet.d.ts +0 -641
  415. package/lib/js/scene/Planet.js +0 -1617
  416. package/lib/js/scene/RenderNode.d.ts +0 -135
  417. package/lib/js/scene/RenderNode.js +0 -313
  418. package/lib/js/scene/SkyBox.d.ts +0 -13
  419. package/lib/js/scene/SkyBox.js +0 -87
  420. package/lib/js/scene/index.d.ts +0 -5
  421. package/lib/js/scene/index.js +0 -5
  422. package/lib/js/segment/Segment.d.ts +0 -289
  423. package/lib/js/segment/Segment.js +0 -1212
  424. package/lib/js/segment/SegmentLonLat.d.ts +0 -40
  425. package/lib/js/segment/SegmentLonLat.js +0 -111
  426. package/lib/js/segment/SegmentLonLatEqui.d.ts +0 -13
  427. package/lib/js/segment/SegmentLonLatEqui.js +0 -46
  428. package/lib/js/segment/Slice.d.ts +0 -13
  429. package/lib/js/segment/Slice.js +0 -33
  430. package/lib/js/segment/segmentHelper.js +0 -180
  431. package/lib/js/shaders/atmos.d.ts +0 -20
  432. package/lib/js/shaders/atmos.js +0 -326
  433. package/lib/js/shaders/billboard.d.ts +0 -3
  434. package/lib/js/shaders/billboard.js +0 -214
  435. package/lib/js/shaders/bloom.d.ts +0 -2
  436. package/lib/js/shaders/bloom.js +0 -32
  437. package/lib/js/shaders/blur.d.ts +0 -3
  438. package/lib/js/shaders/blur.js +0 -68
  439. package/lib/js/shaders/depth.d.ts +0 -2
  440. package/lib/js/shaders/depth.js +0 -40
  441. package/lib/js/shaders/drawnode.d.ts +0 -10
  442. package/lib/js/shaders/drawnode.js +0 -1008
  443. package/lib/js/shaders/geoObject.d.ts +0 -4
  444. package/lib/js/shaders/geoObject.js +0 -294
  445. package/lib/js/shaders/label.d.ts +0 -4
  446. package/lib/js/shaders/label.js +0 -589
  447. package/lib/js/shaders/lumFilter.d.ts +0 -2
  448. package/lib/js/shaders/lumFilter.js +0 -36
  449. package/lib/js/shaders/pointCloud.d.ts +0 -2
  450. package/lib/js/shaders/pointCloud.js +0 -32
  451. package/lib/js/shaders/polyline.d.ts +0 -3
  452. package/lib/js/shaders/polyline.js +0 -364
  453. package/lib/js/shaders/ray.d.ts +0 -2
  454. package/lib/js/shaders/ray.js +0 -80
  455. package/lib/js/shaders/screenFrame.d.ts +0 -2
  456. package/lib/js/shaders/screenFrame.js +0 -26
  457. package/lib/js/shaders/skybox.d.ts +0 -2
  458. package/lib/js/shaders/skybox.js +0 -28
  459. package/lib/js/shaders/toneMapping.d.ts +0 -2
  460. package/lib/js/shaders/toneMapping.js +0 -85
  461. package/lib/js/shaders/utils.d.ts +0 -1
  462. package/lib/js/shaders/utils.js +0 -97
  463. package/lib/js/terrain/BilTerrain.d.ts +0 -19
  464. package/lib/js/terrain/BilTerrain.js +0 -153
  465. package/lib/js/terrain/EmptyTerrain.d.ts +0 -113
  466. package/lib/js/terrain/EmptyTerrain.js +0 -113
  467. package/lib/js/terrain/Geoid.d.ts +0 -33
  468. package/lib/js/terrain/Geoid.js +0 -191
  469. package/lib/js/terrain/GlobusRgbTerrain.d.ts +0 -7
  470. package/lib/js/terrain/GlobusRgbTerrain.js +0 -25
  471. package/lib/js/terrain/GlobusTerrain.d.ts +0 -140
  472. package/lib/js/terrain/GlobusTerrain.js +0 -351
  473. package/lib/js/terrain/RgbTerrain.d.ts +0 -43
  474. package/lib/js/terrain/RgbTerrain.js +0 -428
  475. package/lib/js/terrain/index.d.ts +0 -6
  476. package/lib/js/terrain/index.js +0 -6
  477. package/lib/js/ui/Button.d.ts +0 -33
  478. package/lib/js/ui/Button.js +0 -78
  479. package/lib/js/ui/ButtonGroup.d.ts +0 -16
  480. package/lib/js/ui/ButtonGroup.js +0 -41
  481. package/lib/js/ui/Checkbox.d.ts +0 -32
  482. package/lib/js/ui/Checkbox.js +0 -110
  483. package/lib/js/ui/Color.d.ts +0 -23
  484. package/lib/js/ui/Color.js +0 -59
  485. package/lib/js/ui/Dialog.d.ts +0 -59
  486. package/lib/js/ui/Dialog.js +0 -193
  487. package/lib/js/ui/Input.d.ts +0 -33
  488. package/lib/js/ui/Input.js +0 -107
  489. package/lib/js/ui/Slider.d.ts +0 -39
  490. package/lib/js/ui/Slider.js +0 -129
  491. package/lib/js/ui/ToggleButton.d.ts +0 -21
  492. package/lib/js/ui/ToggleButton.js +0 -42
  493. package/lib/js/ui/View.d.ts +0 -39
  494. package/lib/js/ui/View.js +0 -157
  495. package/lib/js/ui/icons.d.ts +0 -1
  496. package/lib/js/ui/icons.js +0 -3
  497. package/lib/js/utils/BaseWorker.d.ts +0 -14
  498. package/lib/js/utils/BaseWorker.js +0 -47
  499. package/lib/js/utils/FontAtlas.d.ts +0 -82
  500. package/lib/js/utils/FontAtlas.js +0 -220
  501. package/lib/js/utils/GeoImageCreator.d.ts +0 -34
  502. package/lib/js/utils/GeoImageCreator.js +0 -163
  503. package/lib/js/utils/ImagesCacheManager.d.ts +0 -22
  504. package/lib/js/utils/ImagesCacheManager.js +0 -63
  505. package/lib/js/utils/Loader.d.ts +0 -63
  506. package/lib/js/utils/Loader.js +0 -156
  507. package/lib/js/utils/NormalMapCreator.d.ts +0 -53
  508. package/lib/js/utils/NormalMapCreator.js +0 -310
  509. package/lib/js/utils/PlainSegmentWorker.d.ts +0 -24
  510. package/lib/js/utils/PlainSegmentWorker.js +0 -385
  511. package/lib/js/utils/TerrainWorker.d.ts +0 -28
  512. package/lib/js/utils/TerrainWorker.js +0 -551
  513. package/lib/js/utils/TextureAtlas.d.ts +0 -115
  514. package/lib/js/utils/TextureAtlas.js +0 -231
  515. package/lib/js/utils/VectorTileCreator.d.ts +0 -18
  516. package/lib/js/utils/VectorTileCreator.js +0 -320
  517. package/lib/js/utils/colorTable.d.ts +0 -3
  518. package/lib/js/utils/colorTable.js +0 -143
  519. package/lib/js/utils/earcut.d.ts +0 -7
  520. package/lib/js/utils/earcut.js +0 -536
  521. package/lib/js/utils/objParser.d.ts +0 -56
  522. package/lib/js/utils/objParser.js +0 -293
  523. package/lib/js/utils/shared.js +0 -961
  524. package/lib/js/utils/units.d.ts +0 -16
  525. package/lib/js/utils/units.js +0 -61
  526. package/lib/js/webgl/BaseFramebuffer.d.ts +0 -52
  527. package/lib/js/webgl/BaseFramebuffer.js +0 -88
  528. package/lib/js/webgl/Framebuffer.js +0 -256
  529. package/lib/js/webgl/Handler.d.ts +0 -491
  530. package/lib/js/webgl/Handler.js +0 -1035
  531. package/lib/js/webgl/Multisample.d.ts +0 -28
  532. package/lib/js/webgl/Multisample.js +0 -77
  533. package/lib/js/webgl/Program.d.ts +0 -159
  534. package/lib/js/webgl/Program.js +0 -306
  535. package/lib/js/webgl/ProgramController.d.ts +0 -87
  536. package/lib/js/webgl/ProgramController.js +0 -110
  537. package/lib/js/webgl/index.d.ts +0 -6
  538. package/lib/js/webgl/index.js +0 -6
  539. package/lib/js/webgl/types.d.ts +0 -9
  540. package/lib/js/webgl/types.js +0 -26
  541. package/lib/js/webgl/variableHandlers.d.ts +0 -22
  542. package/lib/js/webgl/variableHandlers.js +0 -78
  543. /package/lib/{@openglobus/js/Clock.d.ts → Clock.d.ts} +0 -0
  544. /package/lib/{@openglobus/js/Deferred.d.ts → Deferred.d.ts} +0 -0
  545. /package/lib/{@openglobus/js/Events.d.ts → Events.d.ts} +0 -0
  546. /package/lib/{@openglobus/js/Extent.d.ts → Extent.d.ts} +0 -0
  547. /package/lib/{@openglobus/js/ImageCanvas.d.ts → ImageCanvas.d.ts} +0 -0
  548. /package/lib/{@openglobus/js/Lock.d.ts → Lock.d.ts} +0 -0
  549. /package/lib/{@openglobus/js/LonLat.d.ts → LonLat.d.ts} +0 -0
  550. /package/lib/{@openglobus/js/Popup.d.ts → Popup.d.ts} +0 -0
  551. /package/lib/{@openglobus/js/QueueArray.d.ts → QueueArray.d.ts} +0 -0
  552. /package/lib/{@openglobus/js/Rectangle.d.ts → Rectangle.d.ts} +0 -0
  553. /package/lib/{@openglobus/js/Stack.d.ts → Stack.d.ts} +0 -0
  554. /package/lib/{@openglobus/js/astro → astro}/astro.d.ts +0 -0
  555. /package/lib/{@openglobus/js/astro → astro}/earth.d.ts +0 -0
  556. /package/lib/{@openglobus/js/astro → astro}/jd.d.ts +0 -0
  557. /package/lib/{@openglobus/js/astro → astro}/orbit.d.ts +0 -0
  558. /package/lib/{@openglobus/js/astro → astro}/rotation.d.ts +0 -0
  559. /package/lib/{@openglobus/js/bv → bv}/Box.d.ts +0 -0
  560. /package/lib/{@openglobus/js/bv → bv}/Sphere.d.ts +0 -0
  561. /package/lib/{@openglobus/js/bv → bv}/index.d.ts +0 -0
  562. /package/lib/{@openglobus/js/camera → camera}/PlanetCamera.d.ts +0 -0
  563. /package/lib/{@openglobus/js/camera → camera}/index.d.ts +0 -0
  564. /package/lib/{@openglobus/js/cons.d.ts → cons.d.ts} +0 -0
  565. /package/lib/{@openglobus/js/control → control}/CameraLock.d.ts +0 -0
  566. /package/lib/{@openglobus/js/control → control}/CompassButton.d.ts +0 -0
  567. /package/lib/{@openglobus/js/control → control}/Control.d.ts +0 -0
  568. /package/lib/{@openglobus/js/control → control}/DebugInfo.d.ts +0 -0
  569. /package/lib/{@openglobus/js/control → control}/DrawingSwitcher.d.ts +0 -0
  570. /package/lib/{@openglobus/js/control → control}/EarthCoordinates.d.ts +0 -0
  571. /package/lib/{@openglobus/js/control → control}/GeoImageDragControl.d.ts +0 -0
  572. /package/lib/{@openglobus/js/control → control}/LayerAnimation.d.ts +0 -0
  573. /package/lib/{@openglobus/js/control → control}/LayerSwitcher.d.ts +0 -0
  574. /package/lib/{@openglobus/js/control → control}/Lighting.d.ts +0 -0
  575. /package/lib/{@openglobus/js/control → control}/MouseNavigation.d.ts +0 -0
  576. /package/lib/{@openglobus/js/control → control}/OldMouseNavigation.d.ts +0 -0
  577. /package/lib/{@openglobus/js/control → control}/RulerSwitcher.d.ts +0 -0
  578. /package/lib/{@openglobus/js/control → control}/ScaleControl.d.ts +0 -0
  579. /package/lib/{@openglobus/js/control → control}/SegmentBoundVisualization.d.ts +0 -0
  580. /package/lib/{@openglobus/js/control → control}/ShowFps.d.ts +0 -0
  581. /package/lib/{@openglobus/js/control → control}/SimpleNavigation.d.ts +0 -0
  582. /package/lib/{@openglobus/js/control → control}/SimpleSkyBackground.d.ts +0 -0
  583. /package/lib/{@openglobus/js/control → control}/Sun.d.ts +0 -0
  584. /package/lib/{@openglobus/js/control → control}/ToggleWireframe.d.ts +0 -0
  585. /package/lib/{@openglobus/js/control → control}/TouchNavigation.d.ts +0 -0
  586. /package/lib/{@openglobus/js/control → control}/ZoomControl.d.ts +0 -0
  587. /package/lib/{@openglobus/js/control → control}/drawing/DrawingControl.d.ts +0 -0
  588. /package/lib/{@openglobus/js/control → control}/drawing/LineStringDrawingScene.d.ts +0 -0
  589. /package/lib/{@openglobus/js/control → control}/drawing/PolygonDrawingScene.d.ts +0 -0
  590. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfile.d.ts +0 -0
  591. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileButtonsView.d.ts +0 -0
  592. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileControl.d.ts +0 -0
  593. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileLegend.d.ts +0 -0
  594. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileScene.d.ts +0 -0
  595. /package/lib/{@openglobus/js/control → control}/elevationProfile/ElevationProfileView.d.ts +0 -0
  596. /package/lib/{@openglobus/js/control → control}/elevationProfile/PointListDialog.d.ts +0 -0
  597. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/ArrowEntity.d.ts +0 -0
  598. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/AxisTrackEntity.d.ts +0 -0
  599. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditor.d.ts +0 -0
  600. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditorDialog.d.ts +0 -0
  601. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/GeoObjectEditorScene.d.ts +0 -0
  602. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/MoveAxisEntity.d.ts +0 -0
  603. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/MovePlaneEntity.d.ts +0 -0
  604. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/RotateEntity.d.ts +0 -0
  605. /package/lib/{@openglobus/js/control → control}/geoObjectEditor/colors.d.ts +0 -0
  606. /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRuler.d.ts +0 -0
  607. /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRulerScene.d.ts +0 -0
  608. /package/lib/{@openglobus/js/control → control}/heightRuler/HeightRulerSwitcher.d.ts +0 -0
  609. /package/lib/{@openglobus/js/control → control}/ruler/Ruler.d.ts +0 -0
  610. /package/lib/{@openglobus/js/control → control}/ruler/RulerScene.d.ts +0 -0
  611. /package/lib/{@openglobus/js/control → control}/selection/Selection.d.ts +0 -0
  612. /package/lib/{@openglobus/js/control → control}/selection/SelectionScene.d.ts +0 -0
  613. /package/lib/{@openglobus/js/control → control}/timeline/TimelineControl.d.ts +0 -0
  614. /package/lib/{@openglobus/js/control → control}/timeline/TimelineModel.d.ts +0 -0
  615. /package/lib/{@openglobus/js/control → control}/timeline/TimelineView.d.ts +0 -0
  616. /package/lib/{@openglobus/js/control → control}/timeline/timelineUtils.d.ts +0 -0
  617. /package/lib/{js/control → control}/visibleExtent/VisibleExtent.d.ts +0 -0
  618. /package/lib/{@openglobus/js/control → control}/visibleExtent/drawnode.d.ts +0 -0
  619. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/Ellipsoid.d.ts +0 -0
  620. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/index.d.ts +0 -0
  621. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/mars.d.ts +0 -0
  622. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/moon.d.ts +0 -0
  623. /package/lib/{@openglobus/js/ellipsoid → ellipsoid}/wgs84.d.ts +0 -0
  624. /package/lib/{@openglobus/js/entity → entity}/BaseBillboard.d.ts +0 -0
  625. /package/lib/{@openglobus/js/entity → entity}/BaseBillboardHandler.d.ts +0 -0
  626. /package/lib/{@openglobus/js/entity → entity}/Billboard.d.ts +0 -0
  627. /package/lib/{@openglobus/js/entity → entity}/BillboardHandler.d.ts +0 -0
  628. /package/lib/{@openglobus/js/entity → entity}/Entity.d.ts +0 -0
  629. /package/lib/{@openglobus/js/entity → entity}/EntityCollection.d.ts +0 -0
  630. /package/lib/{@openglobus/js/entity → entity}/GeoObject.d.ts +0 -0
  631. /package/lib/{@openglobus/js/entity → entity}/GeoObjectHandler.d.ts +0 -0
  632. /package/lib/{@openglobus/js/entity → entity}/Geometry.d.ts +0 -0
  633. /package/lib/{@openglobus/js/entity → entity}/GeometryHandler.d.ts +0 -0
  634. /package/lib/{@openglobus/js/entity → entity}/InstanceData.d.ts +0 -0
  635. /package/lib/{@openglobus/js/entity → entity}/Label.d.ts +0 -0
  636. /package/lib/{@openglobus/js/entity → entity}/LabelHandler.d.ts +0 -0
  637. /package/lib/{@openglobus/js/entity → entity}/LabelWorker.d.ts +0 -0
  638. /package/lib/{@openglobus/js/entity → entity}/PointCloud.d.ts +0 -0
  639. /package/lib/{@openglobus/js/entity → entity}/PointCloudHandler.d.ts +0 -0
  640. /package/lib/{@openglobus/js/entity → entity}/Polyline.d.ts +0 -0
  641. /package/lib/{@openglobus/js/entity → entity}/PolylineHandler.d.ts +0 -0
  642. /package/lib/{@openglobus/js/entity → entity}/Ray.d.ts +0 -0
  643. /package/lib/{@openglobus/js/entity → entity}/RayHandler.d.ts +0 -0
  644. /package/lib/{@openglobus/js/entity → entity}/Strip.d.ts +0 -0
  645. /package/lib/{@openglobus/js/entity → entity}/StripHandler.d.ts +0 -0
  646. /package/lib/{@openglobus/js/entity → entity}/index.d.ts +0 -0
  647. /package/lib/{@openglobus/js/input → input}/KeyboardHandler.d.ts +0 -0
  648. /package/lib/{@openglobus/js/input → input}/MouseHandler.d.ts +0 -0
  649. /package/lib/{@openglobus/js/input → input}/TouchHandler.d.ts +0 -0
  650. /package/lib/{@openglobus/js/input → input}/input.d.ts +0 -0
  651. /package/lib/{@openglobus/js/layer → layer}/BaseGeoImage.d.ts +0 -0
  652. /package/lib/{@openglobus/js/layer → layer}/Bing.d.ts +0 -0
  653. /package/lib/{@openglobus/js/layer → layer}/CanvasTiles.d.ts +0 -0
  654. /package/lib/{@openglobus/js/layer → layer}/GeoImage.d.ts +0 -0
  655. /package/lib/{@openglobus/js/layer → layer}/GeoTexture2d.d.ts +0 -0
  656. /package/lib/{@openglobus/js/layer → layer}/GeoVideo.d.ts +0 -0
  657. /package/lib/{@openglobus/js/layer → layer}/KML.d.ts +0 -0
  658. /package/lib/{@openglobus/js/layer → layer}/Layer.d.ts +0 -0
  659. /package/lib/{@openglobus/js/layer → layer}/Material.d.ts +0 -0
  660. /package/lib/{@openglobus/js/layer → layer}/OpenStreetMap.d.ts +0 -0
  661. /package/lib/{@openglobus/js/layer → layer}/Vector.d.ts +0 -0
  662. /package/lib/{@openglobus/js/layer → layer}/WMS.d.ts +0 -0
  663. /package/lib/{@openglobus/js/layer → layer}/XYZ.d.ts +0 -0
  664. /package/lib/{@openglobus/js/layer → layer}/index.d.ts +0 -0
  665. /package/lib/{@openglobus/js/light → light}/LightSource.d.ts +0 -0
  666. /package/lib/{@openglobus/js/math → math}/Line2.d.ts +0 -0
  667. /package/lib/{@openglobus/js/math → math}/Line3.d.ts +0 -0
  668. /package/lib/{@openglobus/js/math → math}/Mat3.d.ts +0 -0
  669. /package/lib/{@openglobus/js/math → math}/Mat4.d.ts +0 -0
  670. /package/lib/{@openglobus/js/math → math}/Plane.d.ts +0 -0
  671. /package/lib/{@openglobus/js/math → math}/Quat.d.ts +0 -0
  672. /package/lib/{@openglobus/js/math → math}/Ray.d.ts +0 -0
  673. /package/lib/{@openglobus/js/math → math}/Vec2.d.ts +0 -0
  674. /package/lib/{@openglobus/js/math → math}/Vec3.d.ts +0 -0
  675. /package/lib/{@openglobus/js/math → math}/Vec4.d.ts +0 -0
  676. /package/lib/{@openglobus/js/math → math}/coder.d.ts +0 -0
  677. /package/lib/{@openglobus/js/math → math}/index.d.ts +0 -0
  678. /package/lib/{@openglobus/js/math.d.ts → math.d.ts} +0 -0
  679. /package/lib/{@openglobus/js/mercator.d.ts → mercator.d.ts} +0 -0
  680. /package/lib/{@openglobus/js/proj → proj}/EPSG3857.d.ts +0 -0
  681. /package/lib/{@openglobus/js/proj → proj}/EPSG4326.d.ts +0 -0
  682. /package/lib/{@openglobus/js/proj → proj}/Proj.d.ts +0 -0
  683. /package/lib/{@openglobus/js/proj → proj}/equi.d.ts +0 -0
  684. /package/lib/{@openglobus/js/quadTree → quadTree}/EPSG4326/EPSG4326QuadTreeStrategy.d.ts +0 -0
  685. /package/lib/{@openglobus/js/quadTree → quadTree}/EntityCollectionNode.d.ts +0 -0
  686. /package/lib/{@openglobus/js/quadTree → quadTree}/EntityCollectionsTreeStrategy.d.ts +0 -0
  687. /package/lib/{@openglobus/js/quadTree → quadTree}/Node.d.ts +0 -0
  688. /package/lib/{@openglobus/js/quadTree → quadTree}/QuadTreeStrategy.d.ts +0 -0
  689. /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthEntityCollectionNodeLonLat.d.ts +0 -0
  690. /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthEntityCollectionsTreeStrategy.d.ts +0 -0
  691. /package/lib/{@openglobus/js/quadTree → quadTree}/earth/EarthQuadTreeStrategy.d.ts +0 -0
  692. /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiEntityCollectionNodeLonLat.d.ts +0 -0
  693. /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiEntityCollectionsTreeStrategy.d.ts +0 -0
  694. /package/lib/{@openglobus/js/quadTree → quadTree}/equi/EquiQuadTreeStrategy.d.ts +0 -0
  695. /package/lib/{@openglobus/js/quadTree → quadTree}/index.d.ts +0 -0
  696. /package/lib/{@openglobus/js/quadTree → quadTree}/quadTree.d.ts +0 -0
  697. /package/lib/{@openglobus/js/quadTree → quadTree}/wgs84/Wgs84QuadTreeStrategy.d.ts +0 -0
  698. /package/lib/{@openglobus/js/renderer → renderer}/RendererEvents.d.ts +0 -0
  699. /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.json +0 -0
  700. /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.ttf.cfg +0 -0
  701. /package/lib/{@openglobus/res → res}/fonts/Roboto-Regular.ttf.png +0 -0
  702. /package/lib/{@openglobus/res → res}/fonts/arial.json +0 -0
  703. /package/lib/{@openglobus/res → res}/fonts/arial.ttf.cfg +0 -0
  704. /package/lib/{@openglobus/res → res}/fonts/arial.ttf.png +0 -0
  705. /package/lib/{@openglobus/res → res}/night-4326.png +0 -0
  706. /package/lib/{@openglobus/res → res}/night.png +0 -0
  707. /package/lib/{@openglobus/res → res}/spec.png +0 -0
  708. /package/lib/{@openglobus/js/scene → scene}/Axes.d.ts +0 -0
  709. /package/lib/{@openglobus/js/scene → scene}/BaseNode.d.ts +0 -0
  710. /package/lib/{@openglobus/js/scene → scene}/RenderNode.d.ts +0 -0
  711. /package/lib/{@openglobus/js/scene → scene}/SkyBox.d.ts +0 -0
  712. /package/lib/{@openglobus/js/scene → scene}/index.d.ts +0 -0
  713. /package/lib/{@openglobus/js/segment → segment}/SegmentLonLat.d.ts +0 -0
  714. /package/lib/{@openglobus/js/segment → segment}/SegmentLonLatEqui.d.ts +0 -0
  715. /package/lib/{@openglobus/js/segment → segment}/Slice.d.ts +0 -0
  716. /package/lib/{@openglobus/js/shaders → shaders}/depth.d.ts +0 -0
  717. /package/lib/{@openglobus/js/shaders → shaders}/pointCloud.d.ts +0 -0
  718. /package/lib/{@openglobus/js/shaders → shaders}/screenFrame.d.ts +0 -0
  719. /package/lib/{@openglobus/js/shaders → shaders}/skybox.d.ts +0 -0
  720. /package/lib/{@openglobus/js/terrain → terrain}/BilTerrain.d.ts +0 -0
  721. /package/lib/{@openglobus/js/terrain → terrain}/EmptyTerrain.d.ts +0 -0
  722. /package/lib/{@openglobus/js/terrain → terrain}/Geoid.d.ts +0 -0
  723. /package/lib/{@openglobus/js/terrain → terrain}/GlobusRgbTerrain.d.ts +0 -0
  724. /package/lib/{@openglobus/js/terrain → terrain}/GlobusTerrain.d.ts +0 -0
  725. /package/lib/{@openglobus/js/terrain → terrain}/RgbTerrain.d.ts +0 -0
  726. /package/lib/{@openglobus/js/terrain → terrain}/index.d.ts +0 -0
  727. /package/lib/{@openglobus/js/ui → ui}/Button.d.ts +0 -0
  728. /package/lib/{@openglobus/js/ui → ui}/ButtonGroup.d.ts +0 -0
  729. /package/lib/{@openglobus/js/ui → ui}/Checkbox.d.ts +0 -0
  730. /package/lib/{@openglobus/js/ui → ui}/Color.d.ts +0 -0
  731. /package/lib/{@openglobus/js/ui → ui}/Input.d.ts +0 -0
  732. /package/lib/{@openglobus/js/ui → ui}/Slider.d.ts +0 -0
  733. /package/lib/{@openglobus/js/ui → ui}/ToggleButton.d.ts +0 -0
  734. /package/lib/{@openglobus/js/ui → ui}/icons.d.ts +0 -0
  735. /package/lib/{@openglobus/js/utils → utils}/FontAtlas.d.ts +0 -0
  736. /package/lib/{@openglobus/js/utils → utils}/GeoImageCreator.d.ts +0 -0
  737. /package/lib/{@openglobus/js/utils → utils}/ImagesCacheManager.d.ts +0 -0
  738. /package/lib/{@openglobus/js/utils → utils}/Loader.d.ts +0 -0
  739. /package/lib/{@openglobus/js/utils → utils}/NormalMapCreator.d.ts +0 -0
  740. /package/lib/{@openglobus/js/utils → utils}/PlainSegmentWorker.d.ts +0 -0
  741. /package/lib/{@openglobus/js/utils → utils}/TerrainWorker.d.ts +0 -0
  742. /package/lib/{@openglobus/js/utils → utils}/TextureAtlas.d.ts +0 -0
  743. /package/lib/{@openglobus/js/utils → utils}/VectorTileCreator.d.ts +0 -0
  744. /package/lib/{@openglobus/js/utils → utils}/colorTable.d.ts +0 -0
  745. /package/lib/{@openglobus/js/utils → utils}/earcut.d.ts +0 -0
  746. /package/lib/{@openglobus/js/utils → utils}/units.d.ts +0 -0
  747. /package/lib/{@openglobus/js/webgl → webgl}/BaseFramebuffer.d.ts +0 -0
  748. /package/lib/{@openglobus/js/webgl → webgl}/Multisample.d.ts +0 -0
  749. /package/lib/{@openglobus/js/webgl → webgl}/Program.d.ts +0 -0
  750. /package/lib/{@openglobus/js/webgl → webgl}/ProgramController.d.ts +0 -0
  751. /package/lib/{@openglobus/js/webgl → webgl}/index.d.ts +0 -0
  752. /package/lib/{@openglobus/js/webgl → webgl}/types.d.ts +0 -0
  753. /package/lib/{@openglobus/js/webgl → webgl}/variableHandlers.d.ts +0 -0
@@ -1,794 +0,0 @@
1
- import * as math from "../math";
2
- import { Vec3 } from "./Vec3";
3
- import { Mat4 } from "./Mat4";
4
- import { Mat3 } from "./Mat3";
5
- import { PI_TWO } from "../math";
6
- /**
7
- * A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.
8
- * @constructor
9
- * @param {Number} [x=0.0] The X component.
10
- * @param {Number} [y=0.0] The Y component.
11
- * @param {Number} [z=0.0] The Z component.
12
- * @param {Number} [w=0.0] The W component.
13
- */
14
- export class Quat {
15
- constructor(x = 0.0, y = 0.0, z = 0.0, w = 0.0) {
16
- this.x = x;
17
- this.y = y;
18
- this.z = z;
19
- this.w = w;
20
- }
21
- /**
22
- * Identity Quat.
23
- * @const
24
- * @type {Quat}
25
- */
26
- static get IDENTITY() {
27
- return new Quat(0.0, 0.0, 0.0, 1.0);
28
- }
29
- /**
30
- * Returns a Quat represents rotation around X axis.
31
- * @static
32
- * @param {number} a - The angle in radians to rotate around the axis.
33
- * @returns {Quat} -
34
- */
35
- static xRotation(a) {
36
- a *= 0.5;
37
- return new Quat(Math.sin(a), 0.0, 0.0, Math.cos(a));
38
- }
39
- /**
40
- * Returns a Quat represents rotation around Y axis.
41
- * @static
42
- * @param {number} a - The angle in radians to rotate around the axis.
43
- * @returns {Quat} -
44
- */
45
- static yRotation(a) {
46
- a *= 0.5;
47
- return new Quat(0.0, Math.sin(a), 0.0, Math.cos(a));
48
- }
49
- /**
50
- * Returns a Quat represents rotation around Z axis.
51
- * @static
52
- * @param {number} a - The angle in radians to rotate around the axis.
53
- * @returns {Quat} -
54
- */
55
- static zRotation(a) {
56
- a *= 0.5;
57
- return new Quat(0.0, 0.0, Math.sin(a), Math.cos(a));
58
- }
59
- /**
60
- * Computes a Quat representing a rotation around an axis.
61
- * @static
62
- * @param {Vec3} axis - The axis of rotation.
63
- * @param {number} [angle=0.0] The angle in radians to rotate around the axis.
64
- * @returns {Quat} -
65
- */
66
- static axisAngleToQuat(axis, angle = 0) {
67
- let v = axis.getNormal();
68
- let half_angle = angle * 0.5;
69
- let sin_a = Math.sin(half_angle);
70
- return new Quat(v.x * sin_a, v.y * sin_a, v.z * sin_a, Math.cos(half_angle));
71
- }
72
- /**
73
- * Computes a rotation from the given heading and up vector.
74
- * @static
75
- * @param {Vec3} forward - Heading target coordinates.
76
- * @param {Vec3} up - Up vector.
77
- * @returns {Quat} -
78
- */
79
- static getLookRotation(forward, up) {
80
- let f = forward.getNormal().negate();
81
- let s = up.cross(f).normalize();
82
- let u = f.cross(s);
83
- let z = 1.0 + s.x + u.y + f.z;
84
- if (z > 0.000001) {
85
- let fd = 1.0 / (2.0 * Math.sqrt(z));
86
- return new Quat((f.y - u.z) * fd, (s.z - f.x) * fd, (u.x - s.y) * fd, 0.25 / fd);
87
- }
88
- if (s.x > u.y && s.x > f.z) {
89
- let fd = 1.0 / (2.0 * Math.sqrt(1.0 + s.x - u.y - f.z));
90
- return new Quat(0.25 / fd, (u.x + s.y) * fd, (s.z + f.x) * fd, (f.y - u.z) * fd);
91
- }
92
- if (u.y > f.z) {
93
- let fd = 1.0 / (2.0 * Math.sqrt(1.0 + u.y - s.x - f.z));
94
- return new Quat((u.x + s.y) * fd, 0.25 / fd, (f.y + u.z) * fd, (s.z - f.x) * fd);
95
- }
96
- let fd = 1.0 / (2.0 * Math.sqrt(1.0 + f.z - s.x - u.y));
97
- return new Quat((s.z + f.x) * fd, (f.y + u.z) * fd, 0.25 / fd, (u.x - s.y) * fd);
98
- }
99
- /**
100
- * Computes a Quat from source point heading to the destination point.
101
- * @static
102
- * @param {Vec3} sourcePoint - Source coordinate.
103
- * @param {Vec3} destPoint - Destination coordinate.
104
- * @returns {Quat} -
105
- */
106
- static getLookAtSourceDest(sourcePoint, destPoint) {
107
- let forwardVector = destPoint.subA(sourcePoint).normalize();
108
- let dot = Vec3.FORWARD.dot(forwardVector);
109
- if (Math.abs(dot - -1.0) < 0.000001) {
110
- return Quat.axisAngleToQuat(Vec3.UP, Math.PI);
111
- }
112
- if (Math.abs(dot - 1.0) < 0.000001) {
113
- return new Quat(0.0, 0.0, 0.0, 1.0);
114
- }
115
- let rotAngle = Math.acos(dot);
116
- let rotAxis = Vec3.FORWARD.cross(forwardVector).normalize();
117
- return Quat.axisAngleToQuat(rotAxis, rotAngle);
118
- }
119
- /**
120
- * Compute rotation between two vectors.
121
- * @static
122
- * @param {Vec3} u - First vector.
123
- * @param {Vec3} v - Second vector.
124
- * @returns {Quat} -
125
- */
126
- static getRotationBetweenVectors(u, v) {
127
- let w = u.cross(v);
128
- let q = new Quat(w.x, w.y, w.z, 1.0 + u.dot(v));
129
- return q.normalize();
130
- }
131
- /**
132
- * Compute rotation between two vectors.
133
- * @static
134
- * @param {Vec3} u - First vector.
135
- * @param {Vec3} v - Second vector.
136
- * @param {Quat} res
137
- * @returns {Quat} -
138
- */
139
- static getRotationBetweenVectorsRes(u, v, res) {
140
- let w = u.cross(v);
141
- res.set(w.x, w.y, w.z, 1.0 + u.dot(v));
142
- return res.normalize();
143
- }
144
- /**
145
- * Compute rotation between two vectors with around vector up
146
- * for exactly opposite vectors. If vectors exactly in the same
147
- * direction as returns identity Quat.
148
- * @static
149
- * @param {Vec3} source - First vector.
150
- * @param {Vec3} dest - Second vector.
151
- * @param {Vec3} up - Up vector.
152
- * @returns {Quat} -
153
- */
154
- static getRotationBetweenVectorsUp(source, dest, up) {
155
- let dot = source.dot(dest);
156
- if (Math.abs(dot + 1.0) < 0.000001) {
157
- // vector source and dest point exactly in the opposite direction,
158
- // so it is a 180 degrees turn around the up-axis
159
- return Quat.axisAngleToQuat(up, Math.PI);
160
- }
161
- if (Math.abs(dot - 1.0) < 0.000001) {
162
- // vector source and dest point exactly in the same direction,
163
- // so we return the identity Quat
164
- return new Quat(0, 0, 0, 1);
165
- }
166
- let rotAngle = Math.acos(dot);
167
- let rotAxis = source.cross(dest).normalize();
168
- return Quat.axisAngleToQuat(rotAxis, rotAngle);
169
- }
170
- // static setFromEulerAngles(pitch: number, yaw: number, roll: number): Quat {
171
- // let res = new Quat();
172
- // return res.setFromEulerAngles(pitch, yaw, roll);
173
- // }
174
- /**
175
- * Returns true if the components are zero.
176
- * @public
177
- * @returns {boolean} -
178
- */
179
- isZero() {
180
- return this.x === 0.0 && this.y === 0.0 && this.z === 0.0 && this.w === 0.0;
181
- }
182
- /**
183
- * Returns true if a component is NaN.
184
- * @public
185
- * @returns {boolean} -
186
- */
187
- isNaN() {
188
- return isNaN(this.x) || isNaN(this.y) || isNaN(this.z) || isNaN(this.w);
189
- }
190
- /**
191
- * Clear Quat. Sets zeroes.
192
- * @public
193
- * @returns {Quat} -
194
- */
195
- clear() {
196
- this.x = this.y = this.z = this.w = 0;
197
- return this;
198
- }
199
- /**
200
- * Sets Quat values.
201
- * @public
202
- * @param {Number} [x=0.0] The X component.
203
- * @param {Number} [y=0.0] The Y component.
204
- * @param {Number} [z=0.0] The Z component.
205
- * @param {Number} [w=0.0] The W component.
206
- * @returns {Quat} -
207
- */
208
- set(x, y, z, w) {
209
- this.x = x;
210
- this.y = y;
211
- this.z = z;
212
- this.w = w;
213
- return this;
214
- }
215
- /**
216
- * Copy Quat values.
217
- * @public
218
- * @param {Quat} q - Copy Quat.
219
- * @returns {Quat} -
220
- */
221
- copy(q) {
222
- this.x = q.x;
223
- this.y = q.y;
224
- this.z = q.z;
225
- this.w = q.w;
226
- return this;
227
- }
228
- /**
229
- * Set current Quat instance to identity Quat.
230
- * @public
231
- * @returns {Quat} -
232
- */
233
- setIdentity() {
234
- this.x = 0.0;
235
- this.y = 0.0;
236
- this.z = 0.0;
237
- this.w = 1.0;
238
- return this;
239
- }
240
- /**
241
- * Duplicates a Quat instance.
242
- * @public
243
- * @returns {Quat} -
244
- */
245
- clone() {
246
- return new Quat(this.x, this.y, this.z, this.w);
247
- }
248
- /**
249
- * Computes the componentwise sum of two Quats.
250
- * @public
251
- * @param {Quat} q - Quat to add.
252
- * @returns {Quat} -
253
- */
254
- add(q) {
255
- return new Quat(this.x + q.x, this.y + q.y, this.z + q.z, this.w + q.w);
256
- }
257
- /**
258
- * Computes the componentwise sum of two Quats.
259
- * @public
260
- * @param {Quat} q - Quat to add.
261
- * @returns {Quat} -
262
- */
263
- addRes(q, res) {
264
- return res.set(this.x + q.x, this.y + q.y, this.z + q.z, this.w + q.w);
265
- }
266
- /**
267
- * Computes the componentwise difference of two Quats.
268
- * @public
269
- * @param {Quat} q - Quat to subtract.
270
- * @returns {Quat} -
271
- */
272
- sub(q) {
273
- return new Quat(this.x - q.x, this.y - q.y, this.z - q.z, this.w - q.w);
274
- }
275
- /**
276
- * Multiplies the provided Quat componentwise by the provided scalar.
277
- * @public
278
- * @param {Number} scale - The scalar to multiply with.
279
- * @returns {Quat} -
280
- */
281
- scaleTo(scale) {
282
- return new Quat(this.x * scale, this.y * scale, this.z * scale, this.w * scale);
283
- }
284
- /**
285
- * Multiplies the provided Quat componentwise.
286
- * @public
287
- * @param {Number} scale - The scalar to multiply with.
288
- * @returns {Quat} -
289
- */
290
- scale(scale) {
291
- this.x *= scale;
292
- this.y *= scale;
293
- this.z *= scale;
294
- this.w *= scale;
295
- return this;
296
- }
297
- /**
298
- * Converts Quat values to array.
299
- * @public
300
- * @returns {Array.<number>} - (exactly 4 entries)
301
- */
302
- toVec() {
303
- return [this.x, this.y, this.z, this.w];
304
- }
305
- get xyz() {
306
- return new Vec3(this.x, this.y, this.z);
307
- }
308
- /**
309
- * Sets rotation with the given heading and up vectors.
310
- * @static
311
- * @param {Vec3} forward - Heading target coordinates.
312
- * @param {Vec3} up - Up vector.
313
- * @returns {Quat} -
314
- */
315
- setLookRotation(forward, up) {
316
- let f = forward.getNormal().negate();
317
- let s = up.cross(f).normalize();
318
- let u = f.cross(s);
319
- let z = 1.0 + s.x + u.y + f.z;
320
- if (z > 0.000001) {
321
- let fd = 1.0 / (2.0 * Math.sqrt(z));
322
- this.x = (f.y - u.z) * fd;
323
- this.y = (s.z - f.x) * fd;
324
- this.z = (u.x - s.y) * fd;
325
- this.w = 0.25 / fd;
326
- }
327
- else if (s.x > u.y && s.x > f.z) {
328
- let fd = 1.0 / (2.0 * Math.sqrt(1.0 + s.x - u.y - f.z));
329
- this.x = 0.25 / fd;
330
- this.y = (u.x + s.y) * fd;
331
- this.z = (s.z + f.x) * fd;
332
- this.w = (f.y - u.z) * fd;
333
- }
334
- else if (u.y > f.z) {
335
- let fd = 1.0 / (2.0 * Math.sqrt(1.0 + u.y - s.x - f.z));
336
- this.x = (u.x + s.y) * fd;
337
- this.y = 0.25 / fd;
338
- this.z = (f.y + u.z) * fd;
339
- this.w = (s.z - f.x) * fd;
340
- }
341
- else {
342
- let fd = 1.0 / (2.0 * Math.sqrt(1.0 + f.z - s.x - u.y));
343
- this.x = (s.z + f.x) * fd;
344
- this.y = (f.y + u.z) * fd;
345
- this.z = 0.25 / fd;
346
- this.w = (u.x - s.y) * fd;
347
- }
348
- return this;
349
- }
350
- /**
351
- * Sets current quaternion by spherical coordinates.
352
- * @public
353
- * @param {number} lat - Latitude.
354
- * @param {number} lon - Longitude.
355
- * @param {number} angle - Angle in radians.
356
- * @returns {Quat} -
357
- */
358
- setFromSphericalCoords(lat, lon, angle) {
359
- let sin_a = Math.sin(angle / 2);
360
- let cos_a = Math.cos(angle / 2);
361
- let sin_lat = Math.sin(lat);
362
- let cos_lat = Math.cos(lat);
363
- let sin_long = Math.sin(lon);
364
- let cos_long = Math.cos(lon);
365
- this.x = sin_a * cos_lat * sin_long;
366
- this.y = sin_a * sin_lat;
367
- this.z = sin_a * sin_lat * cos_long;
368
- this.w = cos_a;
369
- return this;
370
- }
371
- /**
372
- * Gets spherical coordinates.
373
- * @public
374
- * @returns {Object} Returns object with latitude, longitude and alpha.
375
- */
376
- getSphericalCoords() {
377
- let cos_a = this.w;
378
- let sin_a = Math.sqrt(1.0 - cos_a * cos_a);
379
- // var angle = Math.acos(cos_a) * 2;
380
- if (Math.abs(sin_a) < 0.0005) {
381
- sin_a = 1;
382
- }
383
- let tx = this.x / sin_a;
384
- let ty = this.y / sin_a;
385
- let tz = this.z / sin_a;
386
- let lon, lat = -Math.asin(ty);
387
- if (tx * tx + tz * tz < 0.0005) {
388
- lon = 0;
389
- }
390
- else {
391
- lon = Math.atan2(tx, tz);
392
- }
393
- if (lon < 0) {
394
- lon += 360.0;
395
- }
396
- return {
397
- lat: lat,
398
- lon: lon,
399
- alpha: Math.acos(cos_a)
400
- };
401
- }
402
- /**
403
- * Sets current Quat representing a rotation around an axis.
404
- * @public
405
- * @param {Vec3} axis - The axis of rotation.
406
- * @param {number} angle The angle in radians to rotate around the axis.
407
- * @returns {Quat} -
408
- */
409
- setFromAxisAngle(axis, angle) {
410
- let v = axis.getNormal();
411
- let half_angle = angle * 0.5;
412
- let sin_a = Math.sin(half_angle);
413
- this.set(v.x * sin_a, v.y * sin_a, v.z * sin_a, Math.cos(half_angle));
414
- return this;
415
- }
416
- /**
417
- * @typedef {Object} QuatAxisAngle
418
- * @property {Vec3} axis - The rotation axis.
419
- * @property {number} angle - The rotation angle in radians.
420
- */
421
- /**
422
- * Returns axis and angle of the current Quat.
423
- * @public
424
- * @returns QuatAxisAngle -
425
- */
426
- getAxisAngle() {
427
- let x = this.x, y = this.y, z = this.z, w = this.w;
428
- let vl = Math.sqrt(x * x + y * y + z * z);
429
- let axis, angle;
430
- if (vl > 0.0000001) {
431
- let ivl = 1.0 / vl;
432
- axis = new Vec3(x * ivl, y * ivl, z * ivl);
433
- if (w < 0) {
434
- angle = 2.0 * Math.atan2(-vl, -w); // -PI,0
435
- }
436
- else {
437
- angle = 2.0 * Math.atan2(vl, w); // 0,PI
438
- }
439
- }
440
- else {
441
- axis = new Vec3(0, 0, 0);
442
- angle = 0;
443
- }
444
- return {
445
- axis: axis,
446
- angle: angle
447
- };
448
- }
449
- getPitch() {
450
- let sinPitch = -2 * (this.y * this.z - this.w * this.x);
451
- return Math.abs(sinPitch) >= 1
452
- ? Math.sign(sinPitch) * PI_TWO
453
- : Math.asin(sinPitch);
454
- }
455
- getYaw() {
456
- return -Math.atan2(2 * (this.x * this.z + this.w * this.y), 1 - 2 * (this.y * this.y + this.x * this.x));
457
- }
458
- getRoll() {
459
- return Math.atan2(2 * (this.x * this.y + this.w * this.z), 1 - 2 * (this.z * this.z + this.x * this.x));
460
- }
461
- setPitchYawRoll(pitchRad, yawRad, rollRad, frame = Quat.IDENTITY) {
462
- let qp = Quat.xRotation(-pitchRad);
463
- let qy = Quat.yRotation(yawRad);
464
- let qr = Quat.zRotation(-rollRad);
465
- return this.copy(qr.mul(qp).mul(qy).mul(frame).conjugate());
466
- }
467
- /**
468
- * Sets current Quat by Euler's angles.
469
- * @public
470
- * @param {number} pitch - Pitch angle in degrees.
471
- * @param {number} yaw - Yaw angle in degrees.
472
- * @param {number} roll - Roll angle in degrees.
473
- * @returns {Quat} -
474
- */
475
- setFromEulerAngles(pitch, yaw, roll) {
476
- let ex = pitch * math.RADIANS_HALF, ey = yaw * math.RADIANS_HALF, ez = roll * math.RADIANS_HALF;
477
- let cr = Math.cos(ex), cp = Math.cos(ey), cy = Math.cos(ez);
478
- let sr = Math.sin(ex), sp = Math.sin(ey), sy = Math.sin(ez);
479
- let cpcy = cp * cy, spsy = sp * sy;
480
- this.w = cr * cpcy + sr * spsy;
481
- this.x = sr * cpcy - cr * spsy;
482
- this.y = cr * sp * cy + sr * cp * sy;
483
- this.z = cr * cp * sy - sr * sp * cy;
484
- return this.normalize();
485
- }
486
- /**
487
- * Returns Euler's angles of the current Quat.
488
- * @public
489
- * @returns {Object} -
490
- */
491
- getEulerAngles() {
492
- let x = this.x, y = this.y, z = this.z, w = this.w;
493
- let sqy = y * y;
494
- let roll = Math.atan2(2.0 * (w * x + y * z), 1.0 - 2.0 * (x * x + sqy));
495
- let a = w * y - z * x;
496
- if (a < -1.0) {
497
- a = -1.0;
498
- }
499
- else if (a > 1.0) {
500
- a = 1.0;
501
- }
502
- let pitch = Math.asin(2.0 * a);
503
- let yaw = Math.atan2(2.0 * (w * z + x * y), 1.0 - 2.0 * (sqy + z * z));
504
- return {
505
- roll,
506
- pitch,
507
- yaw
508
- };
509
- }
510
- /**
511
- * Computes a Quat from the provided 4x4 matrix instance.
512
- * @public
513
- * @param {Mat4} mx - The rotation matrix.
514
- * @returns {Quat} -
515
- */
516
- setFromMatrix4(mx) {
517
- let tr, s, q = [];
518
- let i, j, k;
519
- let m = mx._m;
520
- let nxt = [1, 2, 0];
521
- tr = m[0] + m[5] + m[10];
522
- if (tr > 0.0) {
523
- s = Math.sqrt(tr + 1.0);
524
- this.w = s / 2.0;
525
- s = 0.5 / s;
526
- this.x = (m[6] - m[9]) * s;
527
- this.y = (m[8] - m[2]) * s;
528
- this.z = (m[1] - m[4]) * s;
529
- }
530
- else {
531
- i = 0;
532
- if (m[5] > m[0])
533
- i = 1;
534
- if (m[10] > m[i * 5])
535
- i = 2;
536
- j = nxt[i];
537
- k = nxt[j];
538
- s = Math.sqrt(m[i * 5] - (m[j * 5] + m[k * 5]) + 1.0);
539
- q[i] = s * 0.5;
540
- if (s !== 0.0)
541
- s = 0.5 / s;
542
- q[3] = (m[j * 4 + k] - m[k * 4 + j]) * s;
543
- q[j] = (m[i * 4 + j] + m[j * 4 + i]) * s;
544
- q[k] = (m[i * 4 + k] + m[k * 4 + i]) * s;
545
- this.x = q[0];
546
- this.y = q[1];
547
- this.z = q[2];
548
- this.w = q[3];
549
- }
550
- return this;
551
- }
552
- /**
553
- * Converts current Quat to the rotation 4x4 matrix.
554
- * @public
555
- * @params {Mat4} [out] - Output matrix
556
- * @returns {Mat4} -
557
- */
558
- getMat4(out = new Mat4()) {
559
- let xs = this.x + this.x;
560
- let ys = this.y + this.y;
561
- let zs = this.z + this.z;
562
- let wx = this.w * xs;
563
- let wy = this.w * ys;
564
- let wz = this.w * zs;
565
- let xx = this.x * xs;
566
- let xy = this.x * ys;
567
- let xz = this.x * zs;
568
- let yy = this.y * ys;
569
- let yz = this.y * zs;
570
- let zz = this.z * zs;
571
- return out.set([
572
- 1 - (yy + zz), xy - wz, xz + wy, 0,
573
- xy + wz, 1 - (xx + zz), yz - wx, 0,
574
- xz - wy, yz + wx, 1 - (xx + yy), 0,
575
- 0, 0, 0, 1
576
- ]);
577
- }
578
- /**
579
- * Converts current Quat to the rotation 3x3 matrix.
580
- * @public
581
- * @returns {Mat3} -
582
- * @todo NOT TESTED
583
- */
584
- getMat3() {
585
- let m = new Mat3();
586
- let mx = m._m;
587
- let c = this.x, d = this.y, e = this.z, g = this.w, f = c + c, h = d + d, i = e + e, j = c * f, k = c * h;
588
- c = c * i;
589
- let l = d * h;
590
- d = d * i;
591
- e = e * i;
592
- f = g * f;
593
- h = g * h;
594
- g = g * i;
595
- mx[0] = 1 - (l + e);
596
- mx[1] = k - g;
597
- mx[2] = c + h;
598
- mx[3] = k + g;
599
- mx[4] = 1 - (j + e);
600
- mx[5] = d - f;
601
- mx[6] = c - h;
602
- mx[7] = d + f;
603
- mx[8] = 1 - (j + l);
604
- return m;
605
- }
606
- /**
607
- * Returns quaternion and vector production.
608
- * @public
609
- * @param {Vec3} v - 3d Vector.
610
- * @returns {Vec3} -
611
- */
612
- mulVec3(v) {
613
- // t = 2 * cross(q.xyz, v)
614
- // v' = v + q.w * t + cross(q.xyz, t)
615
- let d = v.x, e = v.y, g = v.z;
616
- let b = this.x, f = this.y, h = this.z, a = this.w;
617
- let i = a * d + f * g - h * e, j = a * e + h * d - b * g, k = a * g + b * e - f * d;
618
- d = -b * d - f * e - h * g;
619
- return new Vec3(i * a + d * -b + j * -h - k * -f, j * a + d * -f + k * -b - i * -h, k * a + d * -h + i * -f - j * -b);
620
- }
621
- /**
622
- * Returns quaternion and vector production.
623
- * @public
624
- * @param {Vec3} v - 3d Vector.
625
- * @param {Vec3} res - result output vector.
626
- * @returns {Vec3} -
627
- */
628
- mulVec3Res(v, res) {
629
- // t = 2 * cross(q.xyz, v)
630
- // v' = v + q.w * t + cross(q.xyz, t)
631
- let d = v.x, e = v.y, g = v.z;
632
- let b = this.x, f = this.y, h = this.z, a = this.w;
633
- let i = a * d + f * g - h * e, j = a * e + h * d - b * g, k = a * g + b * e - f * d;
634
- d = -b * d - f * e - h * g;
635
- return res.set(i * a + d * -b + j * -h - k * -f, j * a + d * -f + k * -b - i * -h, k * a + d * -h + i * -f - j * -b);
636
- }
637
- /**
638
- * Computes the product of two Quats.
639
- * @public
640
- * @param {Quat} q - Quat to multiply.
641
- * @returns {Quat} -
642
- */
643
- mul(q) {
644
- let d = this.x, e = this.y, g = this.z, a = this.w;
645
- let f = q.x, h = q.y, i = q.z, b = q.w;
646
- return new Quat(d * b + a * f + e * i - g * h, e * b + a * h + g * f - d * i, g * b + a * i + d * h - e * f, a * b - d * f - e * h - g * i);
647
- }
648
- /**
649
- * Computes the product of two Quats.
650
- * @public
651
- * @param {Quat} q - Quat to multiply.
652
- * @returns {Quat} -
653
- */
654
- mulRes(q, res) {
655
- let d = this.x, e = this.y, g = this.z, a = this.w;
656
- let f = q.x, h = q.y, i = q.z, b = q.w;
657
- return res.set(d * b + a * f + e * i - g * h, e * b + a * h + g * f - d * i, g * b + a * i + d * h - e * f, a * b - d * f - e * h - g * i);
658
- }
659
- /**
660
- * Computes the product of two Quats.
661
- * @public
662
- * @param {Quat} q - Quat to multiply.
663
- * @returns {Quat} -
664
- */
665
- mulA(q) {
666
- let d = this.x, e = this.y, g = this.z, a = this.w;
667
- let f = q.x, h = q.y, i = q.z, b = q.w;
668
- this.x = d * b + a * f + e * i - g * h;
669
- this.y = e * b + a * h + g * f - d * i;
670
- this.z = g * b + a * i + d * h - e * f;
671
- this.w = a * b - d * f - e * h - g * i;
672
- return this;
673
- }
674
- /**
675
- * Gets the conjugate of the Quat.
676
- * @public
677
- * @returns {Quat} -
678
- */
679
- conjugate() {
680
- return new Quat(-this.x, -this.y, -this.z, this.w);
681
- }
682
- /**
683
- * Computes the inverse of the Quat.
684
- * @public
685
- * @returns {Quat} -
686
- */
687
- inverse() {
688
- let n = 1.0 / this.magnitude2();
689
- return new Quat(-this.x * n, -this.y * n, -this.z * n, this.w * n);
690
- }
691
- /**
692
- * Computes a magnitude of the Quat.
693
- * @public
694
- * @returns {number} -
695
- */
696
- magnitude() {
697
- let b = this.x, c = this.y, d = this.z, a = this.w;
698
- return Math.sqrt(b * b + c * c + d * d + a * a);
699
- }
700
- /**
701
- * Computes a squared magnitude of the Quat.
702
- * @public
703
- * @returns {number} -
704
- */
705
- magnitude2() {
706
- let b = this.x, c = this.y, d = this.z, a = this.w;
707
- return b * b + c * c + d * d + a * a;
708
- }
709
- /**
710
- * Computes the dot (scalar) product of two Quats.
711
- * @public
712
- * @param {Quat} q - Second quaternion.
713
- * @returns {number} -
714
- */
715
- dot(q) {
716
- return this.x * q.x + this.y * q.y + this.z * q.z;
717
- }
718
- /**
719
- * Current Quat normalization.
720
- * @public
721
- * @returns {Quat} -
722
- */
723
- normalize() {
724
- let c = this.x, d = this.y, e = this.z, g = this.w, f = Math.sqrt(c * c + d * d + e * e + g * g);
725
- if (f === 0.0) {
726
- this.x = 0;
727
- this.y = 0;
728
- this.z = 0;
729
- this.w = 0;
730
- return this;
731
- }
732
- f = 1 / f;
733
- this.x = c * f;
734
- this.y = d * f;
735
- this.z = e * f;
736
- this.w = g * f;
737
- return this;
738
- }
739
- /**
740
- * Compares two Quats.
741
- * @public
742
- * @param {Quat} q - Second quaternion.
743
- * @returns {Boolean} -
744
- */
745
- isEqual(q) {
746
- let matching = this.dot(q);
747
- if (Math.abs(matching - 1.0) < 0.001) {
748
- return true;
749
- }
750
- return false;
751
- }
752
- /**
753
- * Performs a spherical linear interpolation between two Quats.
754
- * @public
755
- * @param {Quat} b - The end rotation Quat.
756
- * @param {number} t - interpolation amount between the two Quats.
757
- * @returns {Quat} -
758
- */
759
- slerp(b, t) {
760
- let ax = this.x, ay = this.y, az = this.z, aw = this.w, bx = b.x, by = b.y, bz = b.z, bw = b.w;
761
- let omega, cosom, sinom, scale0, scale1;
762
- cosom = ax * bx + ay * by + az * bz + aw * bw;
763
- if (cosom < 0.0) {
764
- cosom = -cosom;
765
- bx = -bx;
766
- by = -by;
767
- bz = -bz;
768
- bw = -bw;
769
- }
770
- if (1.0 - cosom > 0.000001) {
771
- omega = Math.acos(cosom);
772
- sinom = Math.sin(omega);
773
- scale0 = Math.sin((1.0 - t) * omega) / sinom;
774
- scale1 = Math.sin(t * omega) / sinom;
775
- }
776
- else {
777
- scale0 = 1.0 - t;
778
- scale1 = t;
779
- }
780
- return new Quat(scale0 * ax + scale1 * bx, scale0 * ay + scale1 * by, scale0 * az + scale1 * bz, scale0 * aw + scale1 * bw);
781
- }
782
- }
783
- /**
784
- * Creates Quat instance.
785
- * @function
786
- * @param {Number} [x=0.0] The X component.
787
- * @param {Number} [y=0.0] The Y component.
788
- * @param {Number} [z=0.0] The Z component.
789
- * @param {Number} [w=0.0] The W component.
790
- * @returns {Quat} -
791
- */
792
- export function quat(x = 0, y = 0, z = 0, w = 0) {
793
- return new Quat(x, y, z, w);
794
- }