@openglobus/og 0.18.0 → 0.18.2

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 (476) hide show
  1. package/README.md +8 -8
  2. package/lib/@openglobus/og.esm.js +2 -0
  3. package/lib/@openglobus/og.esm.js.map +1 -0
  4. package/lib/@openglobus/og.umd.js +2 -0
  5. package/lib/@openglobus/og.umd.js.map +1 -0
  6. package/lib/js/Clock.d.ts +106 -0
  7. package/{src/Clock.ts → lib/js/Clock.js} +31 -126
  8. package/lib/js/Deferred.d.ts +6 -0
  9. package/lib/js/Deferred.js +13 -0
  10. package/lib/js/Events.d.ts +90 -0
  11. package/{src/Events.ts → lib/js/Events.js} +29 -84
  12. package/lib/js/Extent.d.ts +145 -0
  13. package/{src/Extent.ts → lib/js/Extent.js} +74 -120
  14. package/lib/js/Globe.d.ts +132 -0
  15. package/{src/Globe.ts → lib/js/Globe.js} +61 -159
  16. package/lib/js/ImageCanvas.d.ts +128 -0
  17. package/{src/ImageCanvas.ts → lib/js/ImageCanvas.js} +24 -65
  18. package/lib/js/Lock.d.ts +15 -0
  19. package/{src/Lock.ts → lib/js/Lock.js} +7 -21
  20. package/lib/js/LonLat.d.ts +128 -0
  21. package/{src/LonLat.ts → lib/js/LonLat.js} +44 -75
  22. package/lib/js/Object3d.d.ts +49 -0
  23. package/{src/Object3d.ts → lib/js/Object3d.js} +64 -184
  24. package/lib/js/Popup.d.ts +46 -0
  25. package/{src/Popup.ts → lib/js/Popup.js} +42 -110
  26. package/lib/js/QueueArray.d.ts +16 -0
  27. package/{src/QueueArray.ts → lib/js/QueueArray.js} +12 -25
  28. package/lib/js/Rectangle.d.ts +76 -0
  29. package/{src/Rectangle.ts → lib/js/Rectangle.js} +12 -50
  30. package/lib/js/Stack.d.ts +20 -0
  31. package/{src/Stack.ts → lib/js/Stack.js} +13 -29
  32. package/lib/js/astro/astro.d.ts +39 -0
  33. package/{src/astro/astro.ts → lib/js/astro/astro.js} +2 -8
  34. package/lib/js/astro/earth.d.ts +8 -0
  35. package/{src/astro/earth.ts → lib/js/astro/earth.js} +3 -39
  36. package/lib/js/astro/jd.d.ts +234 -0
  37. package/{src/astro/jd.ts → lib/js/astro/jd.js} +55 -134
  38. package/lib/js/astro/orbit.d.ts +5 -0
  39. package/{src/astro/orbit.ts → lib/js/astro/orbit.js} +26 -39
  40. package/lib/js/astro/rotation.d.ts +2 -0
  41. package/{src/astro/rotation.ts → lib/js/astro/rotation.js} +2 -11
  42. package/lib/js/bv/Box.d.ts +32 -0
  43. package/{src/bv/Box.ts → lib/js/bv/Box.js} +7 -35
  44. package/lib/js/bv/Sphere.d.ts +37 -0
  45. package/{src/bv/Sphere.ts → lib/js/bv/Sphere.js} +6 -34
  46. package/{src/bv/index.ts → lib/js/bv/index.d.ts} +0 -1
  47. package/lib/js/bv/index.js +3 -0
  48. package/lib/js/camera/Camera.d.ts +314 -0
  49. package/{src/camera/Camera.ts → lib/js/camera/Camera.js} +77 -326
  50. package/lib/js/camera/Frustum.d.ts +139 -0
  51. package/{src/camera/Frustum.ts → lib/js/camera/Frustum.js} +66 -185
  52. package/lib/js/camera/PlanetCamera.d.ts +234 -0
  53. package/{src/camera/PlanetCamera.ts → lib/js/camera/PlanetCamera.js} +65 -338
  54. package/{src/camera/index.ts → lib/js/camera/index.d.ts} +0 -1
  55. package/lib/js/camera/index.js +3 -0
  56. package/lib/js/cons.d.ts +40 -0
  57. package/{src/cons.ts → lib/js/cons.js} +10 -22
  58. package/lib/js/control/Atmosphere.d.ts +16 -0
  59. package/{src/control/Atmosphere.ts → lib/js/control/Atmosphere.js} +33 -86
  60. package/lib/js/control/CompassButton.d.ts +16 -0
  61. package/{src/control/CompassButton.ts → lib/js/control/CompassButton.js} +18 -43
  62. package/lib/js/control/Control.d.ts +100 -0
  63. package/{src/control/Control.ts → lib/js/control/Control.js} +22 -89
  64. package/lib/js/control/DebugInfo.d.ts +25 -0
  65. package/{src/control/DebugInfo.ts → lib/js/control/DebugInfo.js} +38 -84
  66. package/lib/js/control/DrawingSwitcher.d.ts +13 -0
  67. package/{src/control/DrawingSwitcher.ts → lib/js/control/DrawingSwitcher.js} +13 -30
  68. package/lib/js/control/EarthCoordinates.d.ts +41 -0
  69. package/{src/control/EarthCoordinates.ts → lib/js/control/EarthCoordinates.js} +58 -119
  70. package/lib/js/control/EarthNavigation.d.ts +50 -0
  71. package/{src/control/EarthNavigation.ts → lib/js/control/EarthNavigation.js} +70 -161
  72. package/lib/js/control/GeoImageDragControl.d.ts +22 -0
  73. package/{src/control/GeoImageDragControl.ts → lib/js/control/GeoImageDragControl.js} +26 -49
  74. package/lib/js/control/KeyboardNavigation.d.ts +28 -0
  75. package/{src/control/KeyboardNavigation.ts → lib/js/control/KeyboardNavigation.js} +67 -92
  76. package/lib/js/control/LayerAnimation.d.ts +71 -0
  77. package/{src/control/LayerAnimation.ts → lib/js/control/LayerAnimation.js} +82 -162
  78. package/lib/js/control/LayerSwitcher.d.ts +21 -0
  79. package/{src/control/LayerSwitcher.ts → lib/js/control/LayerSwitcher.js} +16 -41
  80. package/lib/js/control/Lighting.d.ts +49 -0
  81. package/{src/control/Lighting.ts → lib/js/control/Lighting.js} +106 -219
  82. package/lib/js/control/MouseNavigation.d.ts +62 -0
  83. package/{src/control/MouseNavigation.ts → lib/js/control/MouseNavigation.js} +105 -211
  84. package/lib/js/control/MouseWheelZoomControl.d.ts +44 -0
  85. package/lib/js/control/MouseWheelZoomControl.js +181 -0
  86. package/lib/js/control/RulerSwitcher.d.ts +17 -0
  87. package/{src/control/RulerSwitcher.ts → lib/js/control/RulerSwitcher.js} +13 -28
  88. package/lib/js/control/ScaleControl.d.ts +24 -0
  89. package/lib/js/control/ScaleControl.js +91 -0
  90. package/lib/js/control/SegmentBoundVisualization.d.ts +12 -0
  91. package/lib/js/control/SegmentBoundVisualization.js +37 -0
  92. package/lib/js/control/ShowFps.d.ts +9 -0
  93. package/lib/js/control/ShowFps.js +20 -0
  94. package/lib/js/control/SimpleNavigation.d.ts +25 -0
  95. package/{src/control/SimpleNavigation.ts → lib/js/control/SimpleNavigation.js} +29 -51
  96. package/lib/js/control/SimpleSkyBackground.d.ts +15 -0
  97. package/{src/control/SimpleSkyBackground.ts → lib/js/control/SimpleSkyBackground.js} +21 -48
  98. package/lib/js/control/Sun.d.ts +33 -0
  99. package/{src/control/Sun.ts → lib/js/control/Sun.js} +34 -85
  100. package/lib/js/control/ToggleWireframe.d.ts +14 -0
  101. package/lib/js/control/ToggleWireframe.js +28 -0
  102. package/lib/js/control/TouchNavigation.d.ts +52 -0
  103. package/{src/control/TouchNavigation.ts → lib/js/control/TouchNavigation.js} +88 -193
  104. package/lib/js/control/ZoomControl.d.ts +27 -0
  105. package/{src/control/ZoomControl.ts → lib/js/control/ZoomControl.js} +25 -50
  106. package/lib/js/control/drawing/DrawingControl.d.ts +12 -0
  107. package/{src/control/drawing/DrawingControl.ts → lib/js/control/drawing/DrawingControl.js} +10 -20
  108. package/lib/js/control/drawing/LineStringDrawingScene.d.ts +15 -0
  109. package/{src/control/drawing/LineStringDrawingScene.ts → lib/js/control/drawing/LineStringDrawingScene.js} +28 -85
  110. package/lib/js/control/drawing/PolygonDrawingScene.d.ts +98 -0
  111. package/{src/control/drawing/PolygonDrawingScene.ts → lib/js/control/drawing/PolygonDrawingScene.js} +190 -388
  112. package/lib/js/control/elevationProfile/ElevationProfile.d.ts +61 -0
  113. package/{src/control/elevationProfile/ElevationProfile.ts → lib/js/control/elevationProfile/ElevationProfile.js} +56 -148
  114. package/lib/js/control/heightRuler/HeightRuler.d.ts +7 -0
  115. package/{src/control/heightRuler/HeightRuler.ts → lib/js/control/heightRuler/HeightRuler.js} +4 -9
  116. package/lib/js/control/heightRuler/HeightRulerScene.d.ts +35 -0
  117. package/{src/control/heightRuler/HeightRulerScene.ts → lib/js/control/heightRuler/HeightRulerScene.js} +47 -99
  118. package/lib/js/control/heightRuler/HeightRulerSwitcher.d.ts +6 -0
  119. package/{src/control/heightRuler/HeightRulerSwitcher.ts → lib/js/control/heightRuler/HeightRulerSwitcher.js} +2 -4
  120. package/{src/control/index.ts → lib/js/control/index.d.ts} +1 -18
  121. package/lib/js/control/index.js +28 -0
  122. package/lib/js/control/ruler/Ruler.d.ts +13 -0
  123. package/lib/js/control/ruler/Ruler.js +23 -0
  124. package/lib/js/control/ruler/RulerScene.d.ts +88 -0
  125. package/lib/js/control/ruler/RulerScene.js +324 -0
  126. package/lib/js/control/selection/Selection.d.ts +55 -0
  127. package/{src/control/selection/Selection.ts → lib/js/control/selection/Selection.js} +15 -34
  128. package/lib/js/control/selection/SelectionScene.d.ts +44 -0
  129. package/{src/control/selection/SelectionScene.ts → lib/js/control/selection/SelectionScene.js} +26 -113
  130. package/lib/js/control/timeline/TimelineControl.d.ts +18 -0
  131. package/{src/control/timeline/TimelineControl.ts → lib/js/control/timeline/TimelineControl.js} +13 -43
  132. package/lib/js/control/timeline/TimelineModel.d.ts +41 -0
  133. package/{src/control/timeline/TimelineModel.ts → lib/js/control/timeline/TimelineModel.js} +26 -74
  134. package/lib/js/control/timeline/TimelineView.d.ts +85 -0
  135. package/{src/control/timeline/TimelineView.ts → lib/js/control/timeline/TimelineView.js} +133 -281
  136. package/lib/js/control/timeline/timelineUtils.d.ts +12 -0
  137. package/lib/js/control/timeline/timelineUtils.js +112 -0
  138. package/lib/js/control/visibleExtent/Segment.d.ts +277 -0
  139. package/{src → lib/js}/control/visibleExtent/Segment.js +145 -698
  140. package/lib/js/control/visibleExtent/VisibleExtent.d.ts +5 -0
  141. package/{src → lib/js}/control/visibleExtent/VisibleExtent.js +1 -18
  142. package/lib/js/control/visibleExtent/drawnode.d.ts +7 -0
  143. package/{src/control/visibleExtent/drawnode.ts → lib/js/control/visibleExtent/drawnode.js} +1 -28
  144. package/lib/js/ellipsoid/Ellipsoid.d.ts +187 -0
  145. package/{src/ellipsoid/Ellipsoid.ts → lib/js/ellipsoid/Ellipsoid.js} +85 -267
  146. package/lib/js/ellipsoid/index.d.ts +3 -0
  147. package/lib/js/ellipsoid/index.js +3 -0
  148. package/lib/js/ellipsoid/wgs84.d.ts +6 -0
  149. package/{src/ellipsoid/wgs84.ts → lib/js/ellipsoid/wgs84.js} +1 -2
  150. package/lib/js/entity/BaseBillboard.d.ts +222 -0
  151. package/{src/entity/BaseBillboard.ts → lib/js/entity/BaseBillboard.js} +48 -165
  152. package/lib/js/entity/BaseBillboardHandler.d.ts +81 -0
  153. package/{src/entity/BaseBillboardHandler.ts → lib/js/entity/BaseBillboardHandler.js} +139 -365
  154. package/lib/js/entity/Billboard.d.ts +113 -0
  155. package/{src/entity/Billboard.ts → lib/js/entity/Billboard.js} +19 -83
  156. package/lib/js/entity/BillboardHandler.d.ts +15 -0
  157. package/{src/entity/BillboardHandler.ts → lib/js/entity/BillboardHandler.js} +27 -59
  158. package/lib/js/entity/Entity.d.ts +354 -0
  159. package/{src/entity/Entity.ts → lib/js/entity/Entity.js} +102 -374
  160. package/lib/js/entity/EntityCollection.d.ts +363 -0
  161. package/{src/entity/EntityCollection.ts → lib/js/entity/EntityCollection.js} +57 -359
  162. package/lib/js/entity/GeoObject.d.ts +138 -0
  163. package/{src/entity/GeoObject.ts → lib/js/entity/GeoObject.js} +41 -146
  164. package/lib/js/entity/GeoObjectHandler.d.ts +99 -0
  165. package/{src/entity/GeoObjectHandler.ts → lib/js/entity/GeoObjectHandler.js} +162 -423
  166. package/lib/js/entity/Geometry.d.ts +111 -0
  167. package/lib/js/entity/Geometry.js +283 -0
  168. package/lib/js/entity/GeometryHandler.d.ts +84 -0
  169. package/{src/entity/GeometryHandler.ts → lib/js/entity/GeometryHandler.js} +162 -657
  170. package/lib/js/entity/Label.d.ts +207 -0
  171. package/{src/entity/Label.ts → lib/js/entity/Label.js} +63 -165
  172. package/lib/js/entity/LabelHandler.d.ts +65 -0
  173. package/{src/entity/LabelHandler.ts → lib/js/entity/LabelHandler.js} +175 -408
  174. package/lib/js/entity/LabelWorker.d.ts +15 -0
  175. package/{src/entity/LabelWorker.ts → lib/js/entity/LabelWorker.js} +24 -45
  176. package/lib/js/entity/PointCloud.d.ts +179 -0
  177. package/{src/entity/PointCloud.ts → lib/js/entity/PointCloud.js} +65 -265
  178. package/lib/js/entity/PointCloudHandler.d.ts +42 -0
  179. package/{src/entity/PointCloudHandler.ts → lib/js/entity/PointCloudHandler.js} +19 -62
  180. package/lib/js/entity/Polyline.d.ts +337 -0
  181. package/{src/entity/Polyline.ts → lib/js/entity/Polyline.js} +289 -924
  182. package/lib/js/entity/PolylineHandler.d.ts +22 -0
  183. package/{src/entity/PolylineHandler.ts → lib/js/entity/PolylineHandler.js} +12 -37
  184. package/lib/js/entity/Ray.d.ts +133 -0
  185. package/{src/entity/Ray.ts → lib/js/entity/Ray.js} +26 -146
  186. package/lib/js/entity/RayHandler.d.ts +70 -0
  187. package/{src/entity/RayHandler.ts → lib/js/entity/RayHandler.js} +102 -342
  188. package/lib/js/entity/Strip.d.ts +127 -0
  189. package/{src/entity/Strip.ts → lib/js/entity/Strip.js} +102 -372
  190. package/lib/js/entity/StripHandler.d.ts +42 -0
  191. package/{src/entity/StripHandler.ts → lib/js/entity/StripHandler.js} +22 -74
  192. package/{src/entity/index.ts → lib/js/entity/index.d.ts} +1 -2
  193. package/lib/js/entity/index.js +11 -0
  194. package/lib/js/index.d.ts +33 -0
  195. package/lib/js/index.js +33 -0
  196. package/lib/js/input/KeyboardHandler.d.ts +33 -0
  197. package/{src/input/KeyboardHandler.ts → lib/js/input/KeyboardHandler.js} +45 -84
  198. package/lib/js/input/MouseHandler.d.ts +16 -0
  199. package/{src/input/MouseHandler.ts → lib/js/input/MouseHandler.js} +12 -36
  200. package/lib/js/input/TouchHandler.d.ts +11 -0
  201. package/{src/input/TouchHandler.ts → lib/js/input/TouchHandler.js} +11 -23
  202. package/lib/js/input/input.d.ts +3 -0
  203. package/{src/input/input.ts → lib/js/input/input.js} +1 -1
  204. package/lib/js/layer/BaseGeoImage.d.ts +145 -0
  205. package/{src/layer/BaseGeoImage.ts → lib/js/layer/BaseGeoImage.js} +70 -235
  206. package/lib/js/layer/CanvasTiles.d.ts +103 -0
  207. package/{src/layer/CanvasTiles.ts → lib/js/layer/CanvasTiles.js} +54 -146
  208. package/lib/js/layer/GeoImage.d.ts +61 -0
  209. package/{src/layer/GeoImage.ts → lib/js/layer/GeoImage.js} +24 -54
  210. package/lib/js/layer/GeoTexture2d.d.ts +17 -0
  211. package/lib/js/layer/GeoTexture2d.js +37 -0
  212. package/lib/js/layer/GeoVideo.d.ts +68 -0
  213. package/{src/layer/GeoVideo.ts → lib/js/layer/GeoVideo.js} +31 -61
  214. package/lib/js/layer/KML.d.ts +72 -0
  215. package/{src/layer/KML.ts → lib/js/layer/KML.js} +94 -138
  216. package/lib/js/layer/Layer.d.ts +401 -0
  217. package/{src/layer/Layer.ts → lib/js/layer/Layer.js} +92 -443
  218. package/lib/js/layer/Material.d.ts +34 -0
  219. package/{src/layer/Material.ts → lib/js/layer/Material.js} +9 -43
  220. package/lib/js/layer/Vector.d.ts +243 -0
  221. package/{src/layer/Vector.ts → lib/js/layer/Vector.js} +155 -426
  222. package/lib/js/layer/WMS.d.ts +75 -0
  223. package/{src/layer/WMS.ts → lib/js/layer/WMS.js} +18 -100
  224. package/lib/js/layer/XYZ.d.ts +149 -0
  225. package/{src/layer/XYZ.ts → lib/js/layer/XYZ.js} +71 -171
  226. package/lib/js/layer/index.d.ts +11 -0
  227. package/lib/js/layer/index.js +11 -0
  228. package/lib/js/light/LightSource.d.ts +174 -0
  229. package/{src/light/LightSource.ts → lib/js/light/LightSource.js} +22 -131
  230. package/lib/js/math/Line2.d.ts +11 -0
  231. package/{src/math/Line2.ts → lib/js/math/Line2.js} +5 -15
  232. package/lib/js/math/Line3.d.ts +28 -0
  233. package/lib/js/math/Line3.js +85 -0
  234. package/lib/js/math/Mat3.d.ts +77 -0
  235. package/{src/math/Mat3.ts → lib/js/math/Mat3.js} +22 -51
  236. package/lib/js/math/Mat4.d.ts +195 -0
  237. package/{src/math/Mat4.ts → lib/js/math/Mat4.js} +53 -219
  238. package/lib/js/math/Plane.d.ts +20 -0
  239. package/{src/math/Plane.ts → lib/js/math/Plane.js} +26 -40
  240. package/lib/js/math/Quat.d.ts +373 -0
  241. package/{src/math/Quat.ts → lib/js/math/Quat.js} +106 -319
  242. package/lib/js/math/Ray.d.ts +76 -0
  243. package/{src/math/Ray.ts → lib/js/math/Ray.js} +21 -66
  244. package/lib/js/math/Vec2.d.ts +310 -0
  245. package/{src/math/Vec2.ts → lib/js/math/Vec2.js} +55 -121
  246. package/lib/js/math/Vec3.d.ts +472 -0
  247. package/{src/math/Vec3.ts → lib/js/math/Vec3.js} +103 -236
  248. package/lib/js/math/Vec4.d.ts +163 -0
  249. package/{src/math/Vec4.ts → lib/js/math/Vec4.js} +23 -79
  250. package/lib/js/math/coder.d.ts +51 -0
  251. package/{src/math/coder.ts → lib/js/math/coder.js} +14 -20
  252. package/lib/js/math/index.d.ts +11 -0
  253. package/lib/js/math/index.js +11 -0
  254. package/lib/js/math.d.ts +266 -0
  255. package/{src/math.ts → lib/js/math.js} +37 -85
  256. package/lib/js/mercator.d.ts +92 -0
  257. package/{src/mercator.ts → lib/js/mercator.js} +13 -37
  258. package/lib/js/proj/EPSG3857.d.ts +9 -0
  259. package/{src/proj/EPSG3857.ts → lib/js/proj/EPSG3857.js} +0 -2
  260. package/lib/js/proj/EPSG4326.d.ts +9 -0
  261. package/{src/proj/EPSG4326.ts → lib/js/proj/EPSG4326.js} +0 -2
  262. package/lib/js/proj/Proj.d.ts +43 -0
  263. package/{src/proj/Proj.ts → lib/js/proj/Proj.js} +4 -29
  264. package/lib/js/quadTree/EPSG4326QuadTreeStrategy.d.ts +6 -0
  265. package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +17 -0
  266. package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +6 -0
  267. package/lib/js/quadTree/EarthQuadTreeStrategy.js +19 -0
  268. package/lib/js/quadTree/EntityCollectionNode.d.ts +54 -0
  269. package/{src/quadTree/EntityCollectionNode.ts → lib/js/quadTree/EntityCollectionNode.js} +83 -150
  270. package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +6 -0
  271. package/lib/js/quadTree/MarsQuadTreeStrategy.js +17 -0
  272. package/lib/js/quadTree/Node.d.ts +61 -0
  273. package/{src/quadTree/Node.ts → lib/js/quadTree/Node.js} +140 -357
  274. package/lib/js/quadTree/QuadTreeStrategy.d.ts +25 -0
  275. package/{src/quadTree/QuadTreeStrategy.ts → lib/js/quadTree/QuadTreeStrategy.js} +13 -44
  276. package/lib/js/quadTree/Wgs84QuadTreeStrategy.d.ts +6 -0
  277. package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +15 -0
  278. package/lib/js/quadTree/index.d.ts +12 -0
  279. package/lib/js/quadTree/index.js +12 -0
  280. package/lib/js/quadTree/quadTree.d.ts +40 -0
  281. package/{src/quadTree/quadTree.ts → lib/js/quadTree/quadTree.js} +0 -9
  282. package/lib/js/renderer/Renderer.d.ts +320 -0
  283. package/{src/renderer/Renderer.ts → lib/js/renderer/Renderer.js} +265 -622
  284. package/lib/js/renderer/RendererEvents.d.ts +239 -0
  285. package/{src/renderer/RendererEvents.ts → lib/js/renderer/RendererEvents.js} +158 -472
  286. package/lib/js/scene/Axes.d.ts +12 -0
  287. package/lib/js/scene/Axes.js +59 -0
  288. package/lib/js/scene/BaseNode.d.ts +61 -0
  289. package/{src/scene/BaseNode.ts → lib/js/scene/BaseNode.js} +11 -57
  290. package/lib/js/scene/Planet.d.ts +623 -0
  291. package/{src/scene/Planet.ts → lib/js/scene/Planet.js} +257 -937
  292. package/lib/js/scene/RenderNode.d.ts +150 -0
  293. package/{src/scene/RenderNode.ts → lib/js/scene/RenderNode.js} +33 -138
  294. package/lib/js/scene/SkyBox.d.ts +13 -0
  295. package/{src/scene/SkyBox.ts → lib/js/scene/SkyBox.js} +16 -37
  296. package/{src/scene/index.ts → lib/js/scene/index.d.ts} +0 -1
  297. package/lib/js/scene/index.js +5 -0
  298. package/lib/js/segment/Segment.d.ts +278 -0
  299. package/{src/segment/Segment.ts → lib/js/segment/Segment.js} +242 -913
  300. package/lib/js/segment/SegmentLonLat.d.ts +48 -0
  301. package/{src/segment/SegmentLonLat.ts → lib/js/segment/SegmentLonLat.js} +58 -132
  302. package/lib/js/segment/SegmentLonLatWgs84.d.ts +10 -0
  303. package/lib/js/segment/SegmentLonLatWgs84.js +23 -0
  304. package/lib/js/segment/Slice.d.ts +13 -0
  305. package/{src/segment/Slice.ts → lib/js/segment/Slice.js} +4 -22
  306. package/lib/js/segment/segmentHelper.d.ts +18 -0
  307. package/{src/segment/segmentHelper.ts → lib/js/segment/segmentHelper.js} +30 -88
  308. package/lib/js/shaders/atmos.d.ts +4 -0
  309. package/{src/shaders/atmos.ts → lib/js/shaders/atmos.js} +8 -26
  310. package/lib/js/shaders/billboard.d.ts +3 -0
  311. package/{src/shaders/billboard.ts → lib/js/shaders/billboard.js} +9 -18
  312. package/lib/js/shaders/bloom.d.ts +2 -0
  313. package/{src/shaders/bloom.ts → lib/js/shaders/bloom.js} +5 -8
  314. package/lib/js/shaders/blur.d.ts +3 -0
  315. package/{src/shaders/blur.ts → lib/js/shaders/blur.js} +11 -19
  316. package/lib/js/shaders/depth.d.ts +2 -0
  317. package/{src/shaders/depth.ts → lib/js/shaders/depth.js} +3 -6
  318. package/lib/js/shaders/drawnode.d.ts +8 -0
  319. package/{src/shaders/drawnode.ts → lib/js/shaders/drawnode.js} +23 -75
  320. package/lib/js/shaders/geoObject.d.ts +3 -0
  321. package/{src/shaders/geoObject.ts → lib/js/shaders/geoObject.js} +51 -63
  322. package/lib/js/shaders/label.d.ts +4 -0
  323. package/{src/shaders/label.ts → lib/js/shaders/label.js} +12 -25
  324. package/lib/js/shaders/lumFilter.d.ts +2 -0
  325. package/{src/shaders/lumFilter.ts → lib/js/shaders/lumFilter.js} +4 -7
  326. package/lib/js/shaders/pickingMask.d.ts +2 -0
  327. package/{src/shaders/pickingMask.ts → lib/js/shaders/pickingMask.js} +5 -8
  328. package/lib/js/shaders/pointCloud.d.ts +2 -0
  329. package/{src/shaders/pointCloud.ts → lib/js/shaders/pointCloud.js} +4 -7
  330. package/lib/js/shaders/polyline.d.ts +3 -0
  331. package/{src/shaders/polyline.ts → lib/js/shaders/polyline.js} +7 -22
  332. package/lib/js/shaders/ray.d.ts +2 -0
  333. package/{src/shaders/ray.ts → lib/js/shaders/ray.js} +4 -7
  334. package/lib/js/shaders/screenFrame.d.ts +2 -0
  335. package/{src/shaders/screenFrame.ts → lib/js/shaders/screenFrame.js} +5 -8
  336. package/lib/js/shaders/skybox.d.ts +2 -0
  337. package/{src/shaders/skybox.ts → lib/js/shaders/skybox.js} +10 -13
  338. package/lib/js/shaders/toneMapping.d.ts +2 -0
  339. package/{src/shaders/toneMapping.ts → lib/js/shaders/toneMapping.js} +5 -8
  340. package/lib/js/shaders/utils.d.ts +1 -0
  341. package/{src/shaders/utils.ts → lib/js/shaders/utils.js} +1 -1
  342. package/lib/js/terrain/BilTerrain.d.ts +18 -0
  343. package/{src/terrain/BilTerrain.ts → lib/js/terrain/BilTerrain.js} +21 -118
  344. package/lib/js/terrain/EmptyTerrain.d.ts +106 -0
  345. package/{src/terrain/EmptyTerrain.ts → lib/js/terrain/EmptyTerrain.js} +20 -144
  346. package/lib/js/terrain/Geoid.d.ts +33 -0
  347. package/lib/js/terrain/Geoid.js +191 -0
  348. package/lib/js/terrain/GlobusTerrain.d.ts +134 -0
  349. package/{src/terrain/GlobusTerrain.ts → lib/js/terrain/GlobusTerrain.js} +84 -241
  350. package/lib/js/terrain/MapboxTerrain.d.ts +21 -0
  351. package/{src/terrain/MapboxTerrain.ts → lib/js/terrain/MapboxTerrain.js} +46 -215
  352. package/{src/terrain/index.ts → lib/js/terrain/index.d.ts} +0 -1
  353. package/lib/js/terrain/index.js +5 -0
  354. package/lib/js/ui/Button.d.ts +32 -0
  355. package/lib/js/ui/Button.js +78 -0
  356. package/lib/js/ui/ButtonGroup.d.ts +16 -0
  357. package/lib/js/ui/ButtonGroup.js +41 -0
  358. package/lib/js/ui/Dialog.d.ts +55 -0
  359. package/lib/js/ui/Dialog.js +173 -0
  360. package/lib/js/ui/Slider.d.ts +38 -0
  361. package/lib/js/ui/Slider.js +129 -0
  362. package/lib/js/ui/ToggleButton.d.ts +20 -0
  363. package/lib/js/ui/ToggleButton.js +42 -0
  364. package/lib/js/ui/View.d.ts +37 -0
  365. package/{src/ui/View.ts → lib/js/ui/View.js} +31 -77
  366. package/lib/js/ui/icons.d.ts +1 -0
  367. package/{src/ui/icons.ts → lib/js/ui/icons.js} +1 -1
  368. package/lib/js/utils/BaseWorker.d.ts +14 -0
  369. package/{src/utils/BaseWorker.ts → lib/js/utils/BaseWorker.js} +15 -28
  370. package/lib/js/utils/FontAtlas.d.ts +82 -0
  371. package/{src/utils/FontAtlas.ts → lib/js/utils/FontAtlas.js} +46 -182
  372. package/lib/js/utils/GeoImageCreator.d.ts +34 -0
  373. package/{src/utils/GeoImageCreator.ts → lib/js/utils/GeoImageCreator.js} +34 -91
  374. package/lib/js/utils/ImagesCacheManager.d.ts +22 -0
  375. package/{src/utils/ImagesCacheManager.ts → lib/js/utils/ImagesCacheManager.js} +16 -38
  376. package/lib/js/utils/Loader.d.ts +63 -0
  377. package/lib/js/utils/Loader.js +156 -0
  378. package/lib/js/utils/NormalMapCreator.d.ts +52 -0
  379. package/{src/utils/NormalMapCreator.ts → lib/js/utils/NormalMapCreator.js} +64 -195
  380. package/lib/js/utils/PlainSegmentWorker.d.ts +24 -0
  381. package/{src/utils/PlainSegmentWorker.ts → lib/js/utils/PlainSegmentWorker.js} +24 -56
  382. package/lib/js/utils/TerrainWorker.d.ts +28 -0
  383. package/{src/utils/TerrainWorker.ts → lib/js/utils/TerrainWorker.js} +19 -56
  384. package/lib/js/utils/TextureAtlas.d.ts +113 -0
  385. package/{src/utils/TextureAtlas.ts → lib/js/utils/TextureAtlas.js} +40 -131
  386. package/lib/js/utils/VectorTileCreator.d.ts +18 -0
  387. package/{src/utils/VectorTileCreator.ts → lib/js/utils/VectorTileCreator.js} +61 -147
  388. package/lib/js/utils/colorTable.d.ts +3 -0
  389. package/{src/utils/colorTable.ts → lib/js/utils/colorTable.js} +2 -2
  390. package/lib/js/utils/earcut.d.ts +7 -0
  391. package/{src/utils/earcut.ts → lib/js/utils/earcut.js} +95 -223
  392. package/lib/js/utils/objParser.d.ts +24 -0
  393. package/{src/utils/objParser.ts → lib/js/utils/objParser.js} +38 -93
  394. package/lib/js/utils/shared.d.ts +267 -0
  395. package/{src/utils/shared.ts → lib/js/utils/shared.js} +185 -342
  396. package/lib/js/utils/units.d.ts +16 -0
  397. package/lib/js/utils/units.js +61 -0
  398. package/lib/js/webgl/BaseFramebuffer.d.ts +53 -0
  399. package/{src/webgl/BaseFramebuffer.ts → lib/js/webgl/BaseFramebuffer.js} +22 -59
  400. package/lib/js/webgl/Framebuffer.d.ts +69 -0
  401. package/{src/webgl/Framebuffer.ts → lib/js/webgl/Framebuffer.js} +30 -87
  402. package/lib/js/webgl/Handler.d.ts +473 -0
  403. package/{src/webgl/Handler.ts → lib/js/webgl/Handler.js} +175 -586
  404. package/lib/js/webgl/Multisample.d.ts +27 -0
  405. package/lib/js/webgl/Multisample.js +77 -0
  406. package/lib/js/webgl/Program.d.ts +159 -0
  407. package/{src/webgl/Program.ts → lib/js/webgl/Program.js} +73 -210
  408. package/lib/js/webgl/ProgramController.d.ts +86 -0
  409. package/{src/webgl/ProgramController.ts → lib/js/webgl/ProgramController.js} +11 -45
  410. package/{src/webgl/index.ts → lib/js/webgl/index.d.ts} +1 -8
  411. package/lib/js/webgl/index.js +6 -0
  412. package/lib/js/webgl/types.d.ts +9 -0
  413. package/{src/webgl/types.ts → lib/js/webgl/types.js} +5 -8
  414. package/lib/js/webgl/variableHandlers.d.ts +22 -0
  415. package/lib/js/webgl/variableHandlers.js +78 -0
  416. package/package.json +23 -34
  417. package/dist/@openglobus/og.esm.js +0 -2
  418. package/dist/@openglobus/og.esm.js.map +0 -1
  419. package/dist/@openglobus/og.umd.js +0 -2
  420. package/dist/@openglobus/og.umd.js.map +0 -1
  421. package/src/Deferred.ts +0 -17
  422. package/src/control/MouseWheelZoomControl.ts +0 -269
  423. package/src/control/ScaleControl.ts +0 -131
  424. package/src/control/SegmentBoundVisualization.ts +0 -50
  425. package/src/control/ShowFps.ts +0 -28
  426. package/src/control/ToggleWireframe.ts +0 -35
  427. package/src/control/ruler/Ruler.ts +0 -35
  428. package/src/control/ruler/RulerScene.ts +0 -437
  429. package/src/control/timeline/timelineUtils.ts +0 -133
  430. package/src/ellipsoid/index.ts +0 -4
  431. package/src/entity/Geometry.ts +0 -486
  432. package/src/index.ts +0 -173
  433. package/src/layer/GeoTexture2d.ts +0 -56
  434. package/src/layer/index.ts +0 -12
  435. package/src/math/Line3.ts +0 -162
  436. package/src/math/index.ts +0 -26
  437. package/src/quadTree/EPSG4326QuadTreeStrategy.ts +0 -24
  438. package/src/quadTree/EarthQuadTreeStrategy.ts +0 -28
  439. package/src/quadTree/MarsQuadTreeStrategy.ts +0 -25
  440. package/src/quadTree/Wgs84QuadTreeStrategy.ts +0 -22
  441. package/src/quadTree/index.ts +0 -14
  442. package/src/scene/Axes.ts +0 -78
  443. package/src/segment/SegmentLonLatWgs84.ts +0 -33
  444. package/src/terrain/Geoid.ts +0 -273
  445. package/src/ui/Button.ts +0 -121
  446. package/src/ui/ButtonGroup.ts +0 -63
  447. package/src/ui/Dialog.ts +0 -244
  448. package/src/ui/Slider.ts +0 -188
  449. package/src/ui/ToggleButton.ts +0 -68
  450. package/src/utils/Loader.ts +0 -247
  451. package/src/utils/units.ts +0 -78
  452. package/src/webgl/Multisample.ts +0 -153
  453. package/src/webgl/variableHandlers.ts +0 -114
  454. /package/{dist → lib}/@openglobus/og.css +0 -0
  455. /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.json +0 -0
  456. /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.ttf.cfg +0 -0
  457. /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.ttf.png +0 -0
  458. /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.json +0 -0
  459. /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.ttf.cfg +0 -0
  460. /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.ttf.png +0 -0
  461. /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.json +0 -0
  462. /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.ttf.cfg +0 -0
  463. /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.ttf.png +0 -0
  464. /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.json +0 -0
  465. /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.cfg +0 -0
  466. /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
  467. /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.json +0 -0
  468. /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.ttf.cfg +0 -0
  469. /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.ttf.png +0 -0
  470. /package/{dist → lib}/@openglobus/res/fonts/arial.js +0 -0
  471. /package/{dist → lib}/@openglobus/res/fonts/arial.json +0 -0
  472. /package/{dist → lib}/@openglobus/res/fonts/arial.ttf.cfg +0 -0
  473. /package/{dist → lib}/@openglobus/res/fonts/arial.ttf.png +0 -0
  474. /package/{dist → lib}/@openglobus/res/night-4326.png +0 -0
  475. /package/{dist → lib}/@openglobus/res/night.png +0 -0
  476. /package/{dist → lib}/@openglobus/res/spec.png +0 -0
@@ -1,8 +1,6 @@
1
- import {EPS5} from "../math";
2
- import {Vec3} from "./Vec3";
3
- import {Line3} from "./Line3";
4
-
5
- const DISJOINT = 0
1
+ import { EPS5 } from "../math";
2
+ import { Vec3 } from "./Vec3";
3
+ const DISJOINT = 0;
6
4
  const COINCIDE = 1;
7
5
  const INTERSECT = 2;
8
6
  /**
@@ -12,52 +10,39 @@ const INTERSECT = 2;
12
10
  * @param {Vec3} [n] - Planet normal.
13
11
  */
14
12
  class Plane {
15
- public p: Vec3;
16
- public n: Vec3;
17
-
18
- constructor(p: Vec3, n: Vec3) {
13
+ constructor(p, n) {
19
14
  this.p = p ? p.clone() : new Vec3();
20
15
  this.n = n ? n.clone() : this.p.normal();
21
16
  }
22
-
23
- public set(p: Vec3, n: Vec3) {
17
+ set(p, n) {
24
18
  this.p.copy(p);
25
19
  this.n.copy(n);
26
20
  }
27
-
28
- public getNormal(): Vec3 {
21
+ getNormal() {
29
22
  return this.n.clone();
30
23
  }
31
-
32
- public distance(p: Vec3): number {
24
+ distance(p) {
33
25
  let pp = this.getProjection(p);
34
26
  return p.distance(pp);
35
27
  }
36
-
37
- public getProjection(v: Vec3, def?: Vec3): Vec3 {
28
+ getProjection(v, def) {
38
29
  return Vec3.proj_b_to_plane(v, this.n, def);
39
30
  }
40
-
41
- public getProjectionPoint(p: Vec3, vh?: Vec3): Vec3 {
42
- let v = p.sub(this.p),
43
- n = this.n,
44
- dist = v.dot(n);
45
-
31
+ getProjectionPoint(p, vh) {
32
+ let v = p.sub(this.p), n = this.n, dist = v.dot(n);
46
33
  if (vh) {
47
34
  vh.copy(n.scale(dist));
48
- } else {
35
+ }
36
+ else {
49
37
  vh = n.scale(dist);
50
38
  }
51
39
  return p.sub(vh);
52
40
  }
53
-
54
- public getIntersection(Pn1: Plane, Pn2: Plane, L: Line3): number {
41
+ getIntersection(Pn1, Pn2, L) {
55
42
  let u = Pn1.n.cross(Pn2.n);
56
-
57
43
  let ax = u.x >= 0 ? u.x : -u.x;
58
44
  let ay = u.y >= 0 ? u.y : -u.y;
59
45
  let az = u.z >= 0 ? u.z : -u.z;
60
-
61
46
  // test if the two planes are parallel
62
47
  if (ax + ay + az < EPS5) {
63
48
  // Pn1 and Pn2 are near parallel
@@ -66,48 +51,50 @@ class Plane {
66
51
  if (Pn1.n.dot(v) == 0) {
67
52
  // Pn2.V0 lies in Pn1
68
53
  return COINCIDE; // Pn1 and Pn2 coincide
69
- } else {
54
+ }
55
+ else {
70
56
  return DISJOINT; // Pn1 and Pn2 are disjoint
71
57
  }
72
58
  }
73
-
74
59
  // Pn1 and Pn2 intersect in a line
75
60
  // first determine max abs coordinate of cross product
76
61
  let maxc; // max coordinate
77
62
  if (ax > ay) {
78
63
  if (ax > az) {
79
64
  maxc = 1;
80
- } else {
65
+ }
66
+ else {
81
67
  maxc = 3;
82
68
  }
83
- } else {
69
+ }
70
+ else {
84
71
  if (ay > az) {
85
72
  maxc = 2;
86
- } else {
73
+ }
74
+ else {
87
75
  maxc = 3;
88
76
  }
89
77
  }
90
-
91
78
  // next, to get a point on the intersect line
92
79
  // zero the max coord, and solve for the other two
93
80
  let iP = new Vec3(); // intersect point
94
-
95
81
  let d1, d2; // the constants in the 2 plane equations
96
82
  d1 = -Pn1.n.dot(Pn1.p); // note: could be pre-stored with plane
97
83
  d2 = -Pn2.n.dot(Pn2.p); // ditto
98
-
99
84
  // select max coordinate
100
85
  if (maxc === 1) {
101
86
  // intersect with x=0
102
87
  iP.x = 0;
103
88
  iP.y = (d2 * Pn1.n.z - d1 * Pn2.n.z) / u.x;
104
89
  iP.z = (d1 * Pn2.n.y - d2 * Pn1.n.y) / u.x;
105
- } else if (maxc === 2) {
90
+ }
91
+ else if (maxc === 2) {
106
92
  // intersect with y=0
107
93
  iP.x = (d1 * Pn2.n.z - d2 * Pn1.n.z) / u.y;
108
94
  iP.y = 0;
109
95
  iP.z = (d2 * Pn1.n.x - d1 * Pn2.n.x) / u.y;
110
- } else if (maxc === 3) {
96
+ }
97
+ else if (maxc === 3) {
111
98
  // intersect with z=0
112
99
  iP.x = (d2 * Pn1.n.y - d1 * Pn2.n.y) / u.z;
113
100
  iP.y = (d1 * Pn2.n.x - d2 * Pn1.n.x) / u.z;
@@ -118,5 +105,4 @@ class Plane {
118
105
  return INTERSECT;
119
106
  }
120
107
  }
121
-
122
- export {Plane};
108
+ export { Plane };
@@ -0,0 +1,373 @@
1
+ import { Vec3 } from "./Vec3";
2
+ import { Mat4 } from "./Mat4";
3
+ import { Mat3 } from "./Mat3";
4
+ /**
5
+ * A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.
6
+ * @constructor
7
+ * @param {Number} [x=0.0] The X component.
8
+ * @param {Number} [y=0.0] The Y component.
9
+ * @param {Number} [z=0.0] The Z component.
10
+ * @param {Number} [w=0.0] The W component.
11
+ */
12
+ export declare class Quat {
13
+ /**
14
+ * The X component.
15
+ * @public
16
+ * @type {Number}
17
+ * @default 0.0
18
+ */
19
+ x: number;
20
+ /**
21
+ * The Y component.
22
+ * @public
23
+ * @type {Number}
24
+ * @default 0.0
25
+ */
26
+ y: number;
27
+ /**
28
+ * The Z component.
29
+ * @public
30
+ * @type {Number}
31
+ * @default 0.0
32
+ */
33
+ z: number;
34
+ /**
35
+ * The W component.
36
+ * @public
37
+ * @type {Number}
38
+ * @default 0.0
39
+ */
40
+ w: number;
41
+ constructor(x?: number, y?: number, z?: number, w?: number);
42
+ /**
43
+ * Identity Quat.
44
+ * @const
45
+ * @type {Quat}
46
+ */
47
+ static get IDENTITY(): Quat;
48
+ /**
49
+ * Returns a Quat represents rotation around X axis.
50
+ * @static
51
+ * @param {number} a - The angle in radians to rotate around the axis.
52
+ * @returns {Quat} -
53
+ */
54
+ static xRotation(a: number): Quat;
55
+ /**
56
+ * Returns a Quat represents rotation around Y axis.
57
+ * @static
58
+ * @param {number} a - The angle in radians to rotate around the axis.
59
+ * @returns {Quat} -
60
+ */
61
+ static yRotation(a: number): Quat;
62
+ /**
63
+ * Returns a Quat represents rotation around Z axis.
64
+ * @static
65
+ * @param {number} a - The angle in radians to rotate around the axis.
66
+ * @returns {Quat} -
67
+ */
68
+ static zRotation(a: number): Quat;
69
+ /**
70
+ * Computes a Quat representing a rotation around an axis.
71
+ * @static
72
+ * @param {Vec3} axis - The axis of rotation.
73
+ * @param {number} [angle=0.0] The angle in radians to rotate around the axis.
74
+ * @returns {Quat} -
75
+ */
76
+ static axisAngleToQuat(axis: Vec3, angle?: number): Quat;
77
+ /**
78
+ * Computes a rotation from the given heading and up vector.
79
+ * @static
80
+ * @param {Vec3} forward - Heading target coordinates.
81
+ * @param {Vec3} up - Up vector.
82
+ * @returns {Quat} -
83
+ */
84
+ static getLookRotation(forward: Vec3, up: Vec3): Quat;
85
+ /**
86
+ * Computes a Quat from source point heading to the destination point.
87
+ * @static
88
+ * @param {Vec3} sourcePoint - Source coordinate.
89
+ * @param {Vec3} destPoint - Destination coordinate.
90
+ * @returns {Quat} -
91
+ */
92
+ static getLookAtSourceDest(sourcePoint: Vec3, destPoint: Vec3): Quat;
93
+ /**
94
+ * Compute rotation between two vectors.
95
+ * @static
96
+ * @param {Vec3} u - First vector.
97
+ * @param {Vec3} v - Second vector.
98
+ * @returns {Quat} -
99
+ */
100
+ static getRotationBetweenVectors(u: Vec3, v: Vec3): Quat;
101
+ /**
102
+ * Compute rotation between two vectors.
103
+ * @static
104
+ * @param {Vec3} u - First vector.
105
+ * @param {Vec3} v - Second vector.
106
+ * @param {Quat} res
107
+ * @returns {Quat} -
108
+ */
109
+ static getRotationBetweenVectorsRes(u: Vec3, v: Vec3, res: Quat): Quat;
110
+ /**
111
+ * Compute rotation between two vectors with around vector up
112
+ * for exactly opposite vectors. If vectors exactly in the same
113
+ * direction as returns identity Quat.
114
+ * @static
115
+ * @param {Vec3} source - First vector.
116
+ * @param {Vec3} dest - Second vector.
117
+ * @param {Vec3} up - Up vector.
118
+ * @returns {Quat} -
119
+ */
120
+ static getRotationBetweenVectorsUp(source: Vec3, dest: Vec3, up: Vec3): Quat;
121
+ /**
122
+ * Returns true if the components are zero.
123
+ * @public
124
+ * @returns {boolean} -
125
+ */
126
+ isZero(): boolean;
127
+ /**
128
+ * Clear Quat. Sets zeroes.
129
+ * @public
130
+ * @returns {Quat} -
131
+ */
132
+ clear(): Quat;
133
+ /**
134
+ * Sets Quat values.
135
+ * @public
136
+ * @param {Number} [x=0.0] The X component.
137
+ * @param {Number} [y=0.0] The Y component.
138
+ * @param {Number} [z=0.0] The Z component.
139
+ * @param {Number} [w=0.0] The W component.
140
+ * @returns {Quat} -
141
+ */
142
+ set(x: number, y: number, z: number, w: number): Quat;
143
+ /**
144
+ * Copy Quat values.
145
+ * @public
146
+ * @param {Quat} q - Copy Quat.
147
+ * @returns {Quat} -
148
+ */
149
+ copy(q: Quat): Quat;
150
+ /**
151
+ * Set current Quat instance to identity Quat.
152
+ * @public
153
+ * @returns {Quat} -
154
+ */
155
+ setIdentity(): Quat;
156
+ /**
157
+ * Duplicates a Quat instance.
158
+ * @public
159
+ * @returns {Quat} -
160
+ */
161
+ clone(): Quat;
162
+ /**
163
+ * Computes the componentwise sum of two Quats.
164
+ * @public
165
+ * @param {Quat} q - Quat to add.
166
+ * @returns {Quat} -
167
+ */
168
+ add(q: Quat): Quat;
169
+ /**
170
+ * Computes the componentwise difference of two Quats.
171
+ * @public
172
+ * @param {Quat} q - Quat to subtract.
173
+ * @returns {Quat} -
174
+ */
175
+ sub(q: Quat): Quat;
176
+ /**
177
+ * Multiplies the provided Quat componentwise by the provided scalar.
178
+ * @public
179
+ * @param {Number} scale - The scalar to multiply with.
180
+ * @returns {Quat} -
181
+ */
182
+ scaleTo(scale: number): Quat;
183
+ /**
184
+ * Multiplies the provided Quat componentwise.
185
+ * @public
186
+ * @param {Number} scale - The scalar to multiply with.
187
+ * @returns {Quat} -
188
+ */
189
+ scale(scale: number): Quat;
190
+ /**
191
+ * Converts Quat values to array.
192
+ * @public
193
+ * @returns {Array.<number>} - (exactly 4 entries)
194
+ */
195
+ toVec(): [number, number, number, number];
196
+ /**
197
+ * Sets current quaternion by spherical coordinates.
198
+ * @public
199
+ * @param {number} lat - Latitude.
200
+ * @param {number} lon - Longitude.
201
+ * @param {number} angle - Angle in radians.
202
+ * @returns {Quat} -
203
+ */
204
+ setFromSphericalCoords(lat: number, lon: number, angle: number): Quat;
205
+ /**
206
+ * Sets rotation with the given heading and up vectors.
207
+ * @static
208
+ * @param {Vec3} forward - Heading target coordinates.
209
+ * @param {Vec3} up - Up vector.
210
+ * @returns {Quat} -
211
+ */
212
+ setLookRotation(forward: Vec3, up: Vec3): Quat;
213
+ /**
214
+ * Gets spherical coordinates.
215
+ * @public
216
+ * @returns {Object} Returns object with latitude, longitude and alpha.
217
+ */
218
+ toSphericalCoords(): any;
219
+ /**
220
+ * Sets current Quat representing a rotation around an axis.
221
+ * @public
222
+ * @param {Vec3} axis - The axis of rotation.
223
+ * @param {number} angle The angle in radians to rotate around the axis.
224
+ * @returns {Quat} -
225
+ */
226
+ setFromAxisAngle(axis: Vec3, angle: number): Quat;
227
+ /**
228
+ * Returns axis and angle of the current Quat.
229
+ * @public
230
+ * @returns {Object} -
231
+ */
232
+ getAxisAngle(): any;
233
+ /**
234
+ * Sets current Quat by Euler's angles.
235
+ * @public
236
+ * @param {number} pitch - Pitch angle in degrees.
237
+ * @param {number} yaw - Yaw angle in degrees.
238
+ * @param {number} roll - Roll angle in degrees.
239
+ * @returns {Quat} -
240
+ */
241
+ setFromEulerAngles(pitch: number, yaw: number, roll: number): Quat;
242
+ /**
243
+ * Returns Euler's angles of the current Quat.
244
+ * @public
245
+ * @returns {Object} -
246
+ */
247
+ getEulerAngles(): any;
248
+ /**
249
+ * Computes a Quat from the provided 4x4 matrix instance.
250
+ * @public
251
+ * @param {Mat4} mx - The rotation matrix.
252
+ * @returns {Quat} -
253
+ */
254
+ setFromMatrix4(mx: Mat4): Quat;
255
+ /**
256
+ * Converts current Quat to the rotation 4x4 matrix.
257
+ * @public
258
+ * @params {Mat4} [out] - Output matrix
259
+ * @returns {Mat4} -
260
+ */
261
+ getMat4(out?: Mat4): Mat4;
262
+ /**
263
+ * Converts current Quat to the rotation 3x3 matrix.
264
+ * @public
265
+ * @returns {Mat3} -
266
+ * @todo NOT TESTED
267
+ */
268
+ getMat3(): Mat3;
269
+ /**
270
+ * Returns quaternion and vector production.
271
+ * @public
272
+ * @param {Vec3} v - 3d Vector.
273
+ * @returns {Vec3} -
274
+ */
275
+ mulVec3(v: Vec3): Vec3;
276
+ /**
277
+ * Computes the product of two Quats.
278
+ * @public
279
+ * @param {Quat} q - Quat to multiply.
280
+ * @returns {Quat} -
281
+ */
282
+ mul(q: Quat): Quat;
283
+ /**
284
+ * Computes the product of two Quats.
285
+ * @public
286
+ * @param {Quat} q - Quat to multiply.
287
+ * @returns {Quat} -
288
+ */
289
+ mulA(q: Quat): Quat;
290
+ /**
291
+ * Gets the conjugate of the Quat.
292
+ * @public
293
+ * @returns {Quat} -
294
+ */
295
+ conjugate(): Quat;
296
+ /**
297
+ * Computes the inverse of the Quat.
298
+ * @public
299
+ * @returns {Quat} -
300
+ */
301
+ inverse(): Quat;
302
+ /**
303
+ * Computes a magnitude of the Quat.
304
+ * @public
305
+ * @returns {number} -
306
+ */
307
+ magnitude(): number;
308
+ /**
309
+ * Computes a squared magnitude of the Quat.
310
+ * @public
311
+ * @returns {number} -
312
+ */
313
+ magnitude2(): number;
314
+ /**
315
+ * Computes the dot (scalar) product of two Quats.
316
+ * @public
317
+ * @param {Quat} q - Second quaternion.
318
+ * @returns {number} -
319
+ */
320
+ dot(q: Quat): number;
321
+ /**
322
+ * Current Quat normalization.
323
+ * @public
324
+ * @returns {Quat} -
325
+ */
326
+ normalize(): Quat;
327
+ /**
328
+ * Compares two Quats.
329
+ * @public
330
+ * @param {Quat} q - Second quaternion.
331
+ * @returns {Boolean} -
332
+ */
333
+ isEqual(q: Quat): boolean;
334
+ /**
335
+ * Performs a spherical linear interpolation between two Quats.
336
+ * @public
337
+ * @param {Quat} b - The end rotation Quat.
338
+ * @param {number} t - interpolation amount between the two Quats.
339
+ * @returns {Quat} -
340
+ */
341
+ slerp(b: Quat, t: number): Quat;
342
+ /**
343
+ * Returns a roll angle in radians.
344
+ * @public
345
+ * @param {Boolean} [reprojectAxis] -
346
+ * @returns {Number} -
347
+ */
348
+ getRoll(reprojectAxis?: boolean): number;
349
+ /**
350
+ * Returns a pitch angle in radians.
351
+ * @public
352
+ * @param {Boolean} [reprojectAxis] -
353
+ * @returns {number} -
354
+ */
355
+ getPitch(reprojectAxis?: boolean): number;
356
+ /**
357
+ * Returns a yaw angle in radians.
358
+ * @public
359
+ * @param {Boolean} [reprojectAxis] -
360
+ * @returns {number} -
361
+ */
362
+ getYaw(reprojectAxis?: boolean): number;
363
+ }
364
+ /**
365
+ * Creates Quat instance.
366
+ * @function
367
+ * @param {Number} [x=0.0] The X component.
368
+ * @param {Number} [y=0.0] The Y component.
369
+ * @param {Number} [z=0.0] The Z component.
370
+ * @param {Number} [w=0.0] The W component.
371
+ * @returns {Quat} -
372
+ */
373
+ export declare function quat(x?: number, y?: number, z?: number, w?: number): Quat;