@openglobus/og 0.11.1 → 0.11.6

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 (255) hide show
  1. package/package.json +18 -20
  2. package/src/og/Clock.js +11 -11
  3. package/src/og/Deferred.js +1 -1
  4. package/src/og/Events.js +9 -7
  5. package/src/og/Extent.js +117 -72
  6. package/src/og/Globe.js +35 -22
  7. package/src/og/ImageCanvas.js +24 -18
  8. package/src/og/Lock.js +2 -2
  9. package/src/og/LonLat.js +40 -37
  10. package/src/og/Popup.js +21 -15
  11. package/src/og/QueueArray.js +7 -3
  12. package/src/og/Rectangle.js +11 -6
  13. package/src/og/Stack.js +8 -5
  14. package/src/og/ajax.js +21 -33
  15. package/src/og/astro/astro.js +5 -5
  16. package/src/og/astro/earth.js +23 -17
  17. package/src/og/astro/jd.js +44 -39
  18. package/src/og/astro/orbit.js +20 -18
  19. package/src/og/astro/rotation.js +17 -8
  20. package/src/og/bv/Box.js +7 -3
  21. package/src/og/bv/Sphere.js +17 -9
  22. package/src/og/camera/Camera.js +137 -86
  23. package/src/og/camera/Frustum.js +30 -19
  24. package/src/og/camera/PlanetCamera.js +30 -26
  25. package/src/og/control/CompassButton.js +8 -2
  26. package/src/og/control/Control.js +13 -11
  27. package/src/og/control/DebugInfo.js +4 -1
  28. package/src/og/control/EarthCoordinates.js +62 -41
  29. package/src/og/control/EarthNavigation.js +20 -22
  30. package/src/og/control/GeoImageDragControl.js +1 -1
  31. package/src/og/control/KeyboardNavigation.js +12 -12
  32. package/src/og/control/LayerSwitcher.js +24 -23
  33. package/src/og/control/Lighting.js +1 -1
  34. package/src/og/control/MouseNavigation.js +1 -1
  35. package/src/og/control/ScaleControl.js +1 -1
  36. package/src/og/control/SegmentBoundVisualization.js +8 -9
  37. package/src/og/control/ShowFps.js +15 -10
  38. package/src/og/control/SimpleNavigation.js +8 -10
  39. package/src/og/control/Sun.js +25 -15
  40. package/src/og/control/ToggleWireframe.js +5 -5
  41. package/src/og/control/TouchNavigation.js +58 -45
  42. package/src/og/control/ZoomControl.js +41 -25
  43. package/src/og/control/index.js +4 -0
  44. package/src/og/ellipsoid/Ellipsoid.js +181 -85
  45. package/src/og/ellipsoid/wgs84.js +4 -4
  46. package/src/og/entity/BaseBillboard.js +97 -44
  47. package/src/og/entity/Billboard.js +15 -11
  48. package/src/og/entity/BillboardHandler.js +314 -64
  49. package/src/og/entity/Entity.js +106 -74
  50. package/src/og/entity/EntityCollection.js +72 -49
  51. package/src/og/entity/GeoObject.js +228 -0
  52. package/src/og/entity/GeoObjectHandler.js +910 -0
  53. package/src/og/entity/Geometry.js +29 -26
  54. package/src/og/entity/GeometryHandler.js +598 -126
  55. package/src/og/entity/Label.js +74 -40
  56. package/src/og/entity/LabelHandler.js +47 -246
  57. package/src/og/entity/LabelWorker.js +213 -0
  58. package/src/og/entity/Object3d.js +504 -0
  59. package/src/og/entity/PointCloud.js +81 -33
  60. package/src/og/entity/PointCloudHandler.js +9 -9
  61. package/src/og/entity/Polyline.js +39 -39
  62. package/src/og/entity/Ray.js +61 -28
  63. package/src/og/entity/ShapeHandler.js +1 -1
  64. package/src/og/entity/Strip.js +77 -48
  65. package/src/og/entity/StripHandler.js +27 -27
  66. package/src/og/entity/index.js +8 -16
  67. package/src/og/input/KeyboardHandler.js +107 -104
  68. package/src/og/input/MouseHandler.js +81 -78
  69. package/src/og/input/TouchHandler.js +55 -51
  70. package/src/og/layer/BaseGeoImage.js +61 -30
  71. package/src/og/layer/CanvasTiles.js +26 -24
  72. package/src/og/layer/GeoImage.js +10 -10
  73. package/src/og/layer/GeoTexture2d.js +1 -1
  74. package/src/og/layer/GeoVideo.js +3 -3
  75. package/src/og/layer/KML.js +66 -40
  76. package/src/og/layer/Layer.js +27 -17
  77. package/src/og/layer/Material.js +93 -61
  78. package/src/og/layer/Vector.js +118 -72
  79. package/src/og/layer/WMS.js +36 -19
  80. package/src/og/layer/XYZ.js +55 -48
  81. package/src/og/light/LightSource.js +47 -40
  82. package/src/og/math/Line2.js +24 -24
  83. package/src/og/math/Line3.js +103 -102
  84. package/src/og/math/Mat3.js +134 -121
  85. package/src/og/math/Mat4.js +603 -459
  86. package/src/og/math/Plane.js +21 -20
  87. package/src/og/math/Quat.js +980 -927
  88. package/src/og/math/Ray.js +195 -187
  89. package/src/og/math/Vec2.js +127 -117
  90. package/src/og/math/Vec3.js +206 -176
  91. package/src/og/math/Vec4.js +49 -53
  92. package/src/og/math/coder.js +18 -18
  93. package/src/og/math.js +12 -12
  94. package/src/og/mercator.js +11 -11
  95. package/src/og/proj/EPSG3857.js +4 -4
  96. package/src/og/proj/EPSG4326.js +4 -4
  97. package/src/og/proj/Proj.js +31 -31
  98. package/src/og/quadTree/EntityCollectionNode.js +310 -300
  99. package/src/og/quadTree/Node.js +1008 -993
  100. package/src/og/renderer/Renderer.js +768 -747
  101. package/src/og/renderer/RendererEvents.js +9 -6
  102. package/src/og/scene/Axes.js +1 -1
  103. package/src/og/scene/BaseNode.js +8 -9
  104. package/src/og/scene/Planet.js +115 -87
  105. package/src/og/scene/RenderNode.js +29 -22
  106. package/src/og/scene/SkyBox.js +1 -1
  107. package/src/og/segment/Segment.js +1886 -1878
  108. package/src/og/segment/SegmentLonLat.js +298 -268
  109. package/src/og/segment/segmentHelper.js +11 -11
  110. package/src/og/shaders/bloom.js +1 -1
  111. package/src/og/shaders/blur.js +2 -2
  112. package/src/og/shaders/depth.js +1 -1
  113. package/src/og/shaders/geoObject.js +211 -0
  114. package/src/og/shaders/label.js +1 -1
  115. package/src/og/shaders/lumFilter.js +1 -1
  116. package/src/og/shaders/pointCloud.js +42 -42
  117. package/src/og/shaders/screenFrame.js +1 -1
  118. package/src/og/shaders/shape.js +15 -21
  119. package/src/og/shaders/skybox.js +37 -37
  120. package/src/og/shaders/toneMapping.js +1 -1
  121. package/src/og/shapes/BaseShape.js +129 -57
  122. package/src/og/shapes/Icosphere.js +30 -15
  123. package/src/og/shapes/Sphere.js +13 -16
  124. package/src/og/terrain/BilTerrain.js +2 -1
  125. package/src/og/terrain/EmptyTerrain.js +2 -2
  126. package/src/og/terrain/Geoid.js +2 -2
  127. package/src/og/terrain/GlobusTerrain.js +10 -10
  128. package/src/og/terrain/MapboxTerrain.js +1 -1
  129. package/src/og/utils/GeoImageCreator.js +9 -9
  130. package/src/og/utils/Loader.js +6 -6
  131. package/src/og/utils/NormalMapCreator.js +13 -13
  132. package/src/og/utils/TerrainWorker.js +1 -1
  133. package/src/og/utils/TextureAtlas.js +20 -22
  134. package/src/og/utils/VectorTileCreator.js +5 -5
  135. package/src/og/utils/earcut.js +1 -1
  136. package/src/og/utils/shared.js +15 -15
  137. package/src/og/webgl/Framebuffer.js +101 -53
  138. package/src/og/webgl/Handler.js +125 -85
  139. package/src/og/webgl/Multisample.js +55 -27
  140. package/src/og/webgl/Program.js +80 -35
  141. package/src/og/webgl/ProgramController.js +27 -23
  142. package/src/og/webgl/callbacks.js +8 -8
  143. package/types/Clock.d.ts +6 -2
  144. package/types/Deferred.d.ts +1 -1
  145. package/types/Events.d.ts +8 -4
  146. package/types/Extent.d.ts +37 -33
  147. package/types/Globe.d.ts +15 -13
  148. package/types/ImageCanvas.d.ts +5 -3
  149. package/types/LonLat.d.ts +24 -24
  150. package/types/Popup.d.ts +4 -0
  151. package/types/QueueArray.d.ts +6 -2
  152. package/types/Rectangle.d.ts +10 -4
  153. package/types/Stack.d.ts +4 -0
  154. package/types/ajax.d.ts +1 -1
  155. package/types/astro/earth.d.ts +3 -2
  156. package/types/bv/Box.d.ts +10 -5
  157. package/types/bv/Sphere.d.ts +13 -7
  158. package/types/camera/Camera.d.ts +90 -81
  159. package/types/camera/Frustum.d.ts +26 -22
  160. package/types/camera/PlanetCamera.d.ts +49 -53
  161. package/types/control/CompassButton.d.ts +4 -4
  162. package/types/control/Control.d.ts +7 -4
  163. package/types/control/DebugInfo.d.ts +3 -4
  164. package/types/control/EarthCoordinates.d.ts +6 -6
  165. package/types/control/EarthNavigation.d.ts +42 -0
  166. package/types/control/KeyboardNavigation.d.ts +3 -4
  167. package/types/control/LayerSwitcher.d.ts +3 -5
  168. package/types/control/Lighting.d.ts +3 -3
  169. package/types/control/MouseNavigation.d.ts +47 -0
  170. package/types/control/ScaleControl.d.ts +3 -3
  171. package/types/control/ShowFps.d.ts +3 -4
  172. package/types/control/SimpleNavigation.d.ts +3 -6
  173. package/types/control/Sun.d.ts +8 -10
  174. package/types/control/ToggleWireframe.d.ts +3 -3
  175. package/types/control/TouchNavigation.d.ts +48 -0
  176. package/types/control/ZoomControl.d.ts +3 -4
  177. package/types/control/index.d.ts +3 -1
  178. package/types/ellipsoid/Ellipsoid.d.ts +47 -43
  179. package/types/ellipsoid/wgs84.d.ts +3 -2
  180. package/types/entity/BaseBillboard.d.ts +41 -34
  181. package/types/entity/Billboard.d.ts +7 -7
  182. package/types/entity/BillboardHandler.d.ts +4 -0
  183. package/types/entity/Entity.d.ts +101 -83
  184. package/types/entity/EntityCollection.d.ts +57 -43
  185. package/types/entity/GeoObject.d.ts +111 -0
  186. package/types/entity/GeoObjectHandler.d.ts +77 -0
  187. package/types/entity/Geometry.d.ts +9 -7
  188. package/types/entity/GeometryHandler.d.ts +2 -2
  189. package/types/entity/Label.d.ts +24 -29
  190. package/types/entity/LabelHandler.d.ts +9 -2
  191. package/types/entity/LabelWorker.d.ts +9 -0
  192. package/types/entity/PointCloud.d.ts +8 -8
  193. package/types/entity/PointCloudHandler.d.ts +3 -3
  194. package/types/entity/Polyline.d.ts +58 -55
  195. package/types/entity/Ray.d.ts +19 -18
  196. package/types/entity/Strip.d.ts +8 -7
  197. package/types/entity/StripHandler.d.ts +3 -3
  198. package/types/entity/index.d.ts +7 -7
  199. package/types/input/KeyboardHandler.d.ts +10 -0
  200. package/types/input/MouseHandler.d.ts +5 -0
  201. package/types/input/TouchHandler.d.ts +5 -0
  202. package/types/layer/BaseGeoImage.d.ts +23 -35
  203. package/types/layer/CanvasTiles.d.ts +15 -22
  204. package/types/layer/GeoImage.d.ts +5 -18
  205. package/types/layer/GeoVideo.d.ts +5 -30
  206. package/types/layer/KML.d.ts +20 -15
  207. package/types/layer/Layer.d.ts +326 -0
  208. package/types/layer/Material.d.ts +45 -0
  209. package/types/layer/Vector.d.ts +208 -0
  210. package/types/layer/WMS.d.ts +4 -7
  211. package/types/layer/XYZ.d.ts +19 -25
  212. package/types/light/LightSource.d.ts +54 -53
  213. package/types/math/Line2.d.ts +11 -0
  214. package/types/math/Line3.d.ts +10 -0
  215. package/types/math/Mat3.d.ts +30 -18
  216. package/types/math/Mat4.d.ts +71 -52
  217. package/types/math/Plane.d.ts +5 -4
  218. package/types/math/Quat.d.ts +379 -0
  219. package/types/math/Ray.d.ts +82 -0
  220. package/types/math/Vec2.d.ts +102 -101
  221. package/types/math/Vec3.d.ts +143 -142
  222. package/types/math/Vec4.d.ts +40 -39
  223. package/types/math/coder.d.ts +12 -11
  224. package/types/math.d.ts +8 -8
  225. package/types/mercator.d.ts +3 -3
  226. package/types/proj/EPSG3857.d.ts +3 -2
  227. package/types/proj/EPSG4326.d.ts +3 -2
  228. package/types/proj/Proj.d.ts +42 -0
  229. package/types/quadTree/EntityCollectionNode.d.ts +34 -0
  230. package/types/quadTree/Node.d.ts +61 -0
  231. package/types/renderer/Renderer.d.ts +300 -0
  232. package/types/renderer/RendererEvents.d.ts +10 -7
  233. package/types/scene/BaseNode.d.ts +9 -9
  234. package/types/scene/Planet.d.ts +131 -126
  235. package/types/scene/RenderNode.d.ts +22 -23
  236. package/types/segment/Segment.d.ts +279 -0
  237. package/types/segment/SegmentLonLat.d.ts +16 -0
  238. package/types/shaders/geoObject.d.ts +3 -0
  239. package/types/shapes/BaseShape.d.ts +43 -40
  240. package/types/shapes/Sphere.d.ts +7 -7
  241. package/types/terrain/BilTerrain.d.ts +0 -1
  242. package/types/terrain/EmptyTerrain.d.ts +4 -4
  243. package/types/terrain/GlobusTerrain.d.ts +17 -54
  244. package/types/terrain/MapboxTerrain.d.ts +0 -1
  245. package/types/utils/GeoImageCreator.d.ts +3 -2
  246. package/types/utils/TextureAtlas.d.ts +8 -8
  247. package/types/utils/shared.d.ts +25 -24
  248. package/types/webgl/Framebuffer.d.ts +5 -5
  249. package/types/webgl/Handler.d.ts +68 -43
  250. package/types/webgl/Multisample.d.ts +5 -5
  251. package/types/webgl/Program.d.ts +8 -2
  252. package/types/webgl/ProgramController.d.ts +18 -13
  253. package/src/og/inherits.js +0 -8
  254. package/src/og/utils/polylabel.js +0 -176
  255. package/types/inherits.d.ts +0 -4
@@ -8,7 +8,10 @@
8
8
  export class Control {
9
9
  static set __staticCounter(arg: any);
10
10
  static get __staticCounter(): any;
11
- constructor(options: any);
11
+ /**
12
+ * @param {Object} [options] - Control activation options:
13
+ */
14
+ constructor(options?: any);
12
15
  _id: number;
13
16
  _name: any;
14
17
  /**
@@ -20,9 +23,9 @@ export class Control {
20
23
  /**
21
24
  * Assigned renderer.
22
25
  * @public
23
- * @type {og.Renderer}
26
+ * @type {Renderer}
24
27
  */
25
- public renderer: any;
28
+ public renderer: Renderer;
26
29
  /**
27
30
  * Auto activation flag.
28
31
  * @public
@@ -74,7 +77,7 @@ export class Control {
74
77
  /**
75
78
  * Assign renderer to the control.
76
79
  * @public
77
- * @type {og.Renderer}
80
+ * @type {Renderer}
78
81
  */
79
82
  public addTo(renderer: any): void;
80
83
  /**
@@ -2,15 +2,14 @@ export function debugInfo(options: any): DebugInfo;
2
2
  /**
3
3
  * Debug information
4
4
  * @class
5
- * @extends {og.control.Control}
5
+ * @extends {Control}
6
6
  * @param {Object} [options] - Control options.
7
7
  */
8
- export class DebugInfo {
9
- constructor(options: any);
8
+ export class DebugInfo extends Control {
10
9
  el: HTMLDivElement;
11
10
  _watch: any;
12
11
  addWatches(watches: any): void;
13
12
  addWatch(watch: any): void;
14
- oninit(): void;
15
13
  _frame(): void;
16
14
  }
15
+ import { Control } from "./Control.js";
@@ -2,13 +2,12 @@ export function earthCoordinates(options: any): EarthCoordinates;
2
2
  /**
3
3
  * Control displays mouse or screen center Earth coordinates.
4
4
  * @class
5
- * @extends {og.control.Control}
5
+ * @extends {Control}
6
6
  * @param {Object} [options] - Options:
7
7
  * @param {Boolean} [options.center] - Earth coordiantes by screen center otherwise mouse pointer. False is default.
8
8
  * @param {Boolean} [options.type] - Coordinates shown: 0 - is decimal degrees, 1 - degrees, 2 - mercator geodetic coordinates.
9
9
  */
10
- export class EarthCoordinates {
11
- constructor(options: any);
10
+ export class EarthCoordinates extends Control {
12
11
  /**
13
12
  * Display type.
14
13
  * @private
@@ -28,13 +27,13 @@ export class EarthCoordinates {
28
27
  */
29
28
  private _display;
30
29
  _center: any;
30
+ _centerDiv: HTMLDivElement;
31
31
  /**
32
32
  * Current position.
33
33
  * @public
34
- * @type {og.Vec3}
34
+ * @type {Vec3}
35
35
  */
36
- public position: any;
37
- oninit(): void;
36
+ public position: Vec3;
38
37
  /**
39
38
  * Sets coordinates capturing type.
40
39
  * @public
@@ -45,3 +44,4 @@ export class EarthCoordinates {
45
44
  _grabCoordinates(): void;
46
45
  _onMouseMove(): void;
47
46
  }
47
+ import { Control } from "./Control.js";
@@ -0,0 +1,42 @@
1
+ export class EarthNavigation extends Control {
2
+ grabbedPoint: Vec3;
3
+ inertia: number;
4
+ grabbedSpheroid: Sphere;
5
+ planet: any;
6
+ _vRot: Quat;
7
+ _hRot: Quat;
8
+ _a: number;
9
+ scaleRot: number;
10
+ currState: number;
11
+ positionState: {
12
+ h: number;
13
+ max: number;
14
+ min: number;
15
+ }[];
16
+ touches: Touch[];
17
+ switchZoomState(wheelDelta: any): void;
18
+ onMouseWheel(event: any): void;
19
+ onTouchStart(e: any): void;
20
+ onTouchEnd(e: any): void;
21
+ onTouchMove(e: any): void;
22
+ onMouseLeftButtonClick(): void;
23
+ stopRotation(): void;
24
+ onMouseLeftButtonUp(e: any): void;
25
+ onMouseLeftButtonDown(e: any): void;
26
+ onDraw(e: any): void;
27
+ }
28
+ import { Control } from "./Control.js";
29
+ import { Vec3 } from "../math/Vec3.js";
30
+ import { Sphere } from "../bv/Sphere.js";
31
+ import { Quat } from "../math/Quat.js";
32
+ declare class Touch {
33
+ x: number;
34
+ y: number;
35
+ prev_x: number;
36
+ prev_y: number;
37
+ grabbedPoint: Vec3;
38
+ grabbedSpheroid: Sphere;
39
+ dX: () => number;
40
+ dY: () => number;
41
+ }
42
+ export {};
@@ -2,13 +2,11 @@ export function keyboardNavigation(options: any): KeyboardNavigation;
2
2
  /**
3
3
  * Planet camera keyboard navigation. Use W,S,A,D and left shift key for fly around a planet.
4
4
  * @class
5
- * @extends {og.control.Control}
5
+ * @extends {Control}
6
6
  * @param {Object} [options] - Control options.
7
7
  */
8
- export class KeyboardNavigation {
9
- constructor(options: any);
8
+ export class KeyboardNavigation extends Control {
10
9
  step: any;
11
- oninit(): void;
12
10
  onCameraMoveForward(event: any): void;
13
11
  onCameraMoveBackward(event: any): void;
14
12
  onCameraStrifeLeft(event: any): void;
@@ -20,3 +18,4 @@ export class KeyboardNavigation {
20
18
  onCameraRollLeft(event: any): void;
21
19
  onCameraRollRight(event: any): void;
22
20
  }
21
+ import { Control } from "./Control.js";
@@ -1,18 +1,15 @@
1
1
  /**
2
2
  * Simple(OpenLayers like)layer switcher, includes base layers, overlays, geo images etc. groups.
3
3
  * @class
4
- * @extends {og.control.Control}
4
+ * @extends {Control}
5
5
  * @param {Object} [options] - Control options.
6
6
  */
7
- export class LayerSwitcher {
7
+ export class LayerSwitcher extends Control {
8
8
  static set numSwitches(arg: any);
9
9
  static get numSwitches(): any;
10
- constructor(options: any);
11
10
  dialog: HTMLDivElement;
12
11
  baseLayersDiv: HTMLDivElement;
13
12
  overlaysDiv: HTMLDivElement;
14
- _id: number;
15
- oninit(): void;
16
13
  onLayerAdded(layer: any): void;
17
14
  onLayerRemoved(layer: any): void;
18
15
  addSwitcher(type: any, obj: any, container: any, id: any): void;
@@ -21,3 +18,4 @@ export class LayerSwitcher {
21
18
  createDialog(): void;
22
19
  createSwitcher(): void;
23
20
  }
21
+ import { Control } from "./Control.js";
@@ -2,15 +2,15 @@ export function lighting(options: any): Lighting;
2
2
  /**
3
3
  * Helps to setup lighting.
4
4
  * @class
5
- * @extends {og.control.Control}
5
+ * @extends {Control}
6
6
  * @param {Object} [options] -
7
7
  */
8
- export class Lighting {
8
+ export class Lighting extends Control {
9
9
  constructor(options?: {});
10
10
  _selectedLayer: any;
11
11
  bindLayer(layer: any): void;
12
- oninit(): void;
13
12
  _fetchLayers(): void;
14
13
  _onLayerAdd(e: any): void;
15
14
  _onLayerRemove(e: any): void;
16
15
  }
16
+ import { Control } from "./Control.js";
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Mouse planet camera dragging control.
3
+ * @class
4
+ * @extends {Control}
5
+ * @param {Object} [options] - Control options.
6
+ */
7
+ export class MouseNavigation extends Control {
8
+ static getMovePointsFromPixelTerrain(cam: any, planet: any, stepsCount: any, delta: any, point: any, forward: any, dir: any): {}[];
9
+ grabbedPoint: Vec3;
10
+ _eye0: Vec3;
11
+ pointOnEarth: Vec3;
12
+ earthUp: Vec3;
13
+ inertia: number;
14
+ grabbedSpheroid: Sphere;
15
+ planet: any;
16
+ qRot: Quat;
17
+ scaleRot: number;
18
+ distDiff: number;
19
+ stepsCount: number;
20
+ stepsForward: {}[];
21
+ stepIndex: number;
22
+ _lmbDoubleClickActive: boolean;
23
+ minSlope: any;
24
+ _keyLock: Key;
25
+ activateDoubleClickZoom(): void;
26
+ deactivateDoubleClickZoom(): void;
27
+ onMouseEnter(e: any): void;
28
+ onMouseLeave(e: any): void;
29
+ onMouseWheel(event: any): void;
30
+ _deactivate: boolean;
31
+ onMouseLeftButtonDoubleClick(): void;
32
+ onMouseLeftButtonClick(): void;
33
+ stopRotation(): void;
34
+ onMouseLeftButtonUp(e: any): void;
35
+ onMouseLeftButtonDown(e: any): void;
36
+ onMouseRightButtonClick(e: any): void;
37
+ onMouseRightButtonDown(e: any): void;
38
+ onShiftFree(): void;
39
+ _shiftBusy: boolean;
40
+ onMouseMove(e: any): void;
41
+ onDraw(e: any): void;
42
+ }
43
+ import { Control } from "./Control.js";
44
+ import { Vec3 } from "../math/Vec3.js";
45
+ import { Sphere } from "../bv/Sphere.js";
46
+ import { Quat } from "../math/Quat.js";
47
+ import { Key } from "../Lock.js";
@@ -2,17 +2,16 @@ export function scaleControl(options: any): ScaleControl;
2
2
  /**
3
3
  * Planet zoom buttons control.
4
4
  * @class
5
- * @extends {og.control.Control}
5
+ * @extends {Control}
6
6
  * @params {Object} [options] - Control options.
7
7
  */
8
- export class ScaleControl {
8
+ export class ScaleControl extends Control {
9
9
  constructor(options?: {});
10
10
  _template: string;
11
11
  planet: any;
12
12
  _minWidth: number;
13
13
  _maxWidth: number;
14
14
  _renderTemplate(): ChildNode;
15
- oninit(): void;
16
15
  el: ChildNode;
17
16
  _scaleLabelEl: any;
18
17
  _draw(e: any): void;
@@ -20,3 +19,4 @@ export class ScaleControl {
20
19
  currWidth: number;
21
20
  _metersInMinSize: number;
22
21
  }
22
+ import { Control } from "./Control.js";
@@ -2,11 +2,10 @@ export function showFps(options: any): ShowFps;
2
2
  /**
3
3
  * Frame per second(FPS) display control.
4
4
  * @class
5
- * @extends {og.control.Control}
5
+ * @extends {Control}
6
6
  * @param {Object} [options] - Control options.
7
7
  */
8
- export class ShowFps {
9
- constructor(options: any);
10
- oninit(): void;
8
+ export class ShowFps extends Control {
11
9
  _draw(): void;
12
10
  }
11
+ import { Control } from "./Control.js";
@@ -5,16 +5,12 @@ export function simpleNavigation(options: any): SimpleNavigation;
5
5
  /**
6
6
  * Simple keyboard camera navigation with W,S,A,D and shift keys to fly around the scene.
7
7
  * @class
8
- * @extends {og.control.Control}
8
+ * @extends {Control}
9
9
  * @param {Object} [options] - Control options.
10
10
  */
11
- export class SimpleNavigation {
12
- constructor(options: any);
11
+ export class SimpleNavigation extends Control {
13
12
  camera: any;
14
13
  speed: any;
15
- onactivate(): void;
16
- ondeactivate(): void;
17
- oninit(): void;
18
14
  onCameraMoveForward(): void;
19
15
  onCameraMoveBackward(): void;
20
16
  onCameraStrifeLeft(): void;
@@ -26,3 +22,4 @@ export class SimpleNavigation {
26
22
  onCameraRollLeft(): void;
27
23
  onCameraRollRight(): void;
28
24
  }
25
+ import { Control } from "./Control.js";
@@ -2,18 +2,16 @@ export function sun(options: any): any;
2
2
  /**
3
3
  * Real Sun geocentric position control that place the Sun on the right place by the Earth.
4
4
  * @class
5
- * @extends {og.control.Control}
5
+ * @extends {Control}
6
6
  * @param {Object} [options] - Control options.
7
7
  */
8
- export class Sun {
9
- constructor(options: any);
10
- _name: string;
8
+ export class Sun extends Control {
11
9
  /**
12
10
  * Earth planet node.
13
11
  * @public
14
- * @type {og.scene.Planet}
12
+ * @type {Planet}
15
13
  */
16
- public planet: any;
14
+ public planet: Planet;
17
15
  /**
18
16
  * Sunlight position placed in the camera eye.
19
17
  * @private
@@ -24,9 +22,9 @@ export class Sun {
24
22
  /**
25
23
  * Light source.
26
24
  * @public
27
- * @type {og.LightSource}
25
+ * @type {LightSource}
28
26
  */
29
- public sunlight: any;
27
+ public sunlight: LightSource;
30
28
  /**
31
29
  * Current frame handler clock date and time.
32
30
  * @private
@@ -42,11 +40,11 @@ export class Sun {
42
40
  _clockPtr: any;
43
41
  _lightOn: boolean;
44
42
  _stopped: any;
45
- oninit(): void;
46
43
  stop(): void;
47
- onactivate(): void;
48
44
  bindClock(clock: any): void;
49
45
  _draw(): void;
50
46
  _f: number;
51
47
  _k: number;
52
48
  }
49
+ import { Control } from "./Control.js";
50
+ import { LightSource } from "../light/LightSource.js";
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Planet GL draw mode(TRIANGLE_STRIP/LINE_STRING) changer.
3
3
  * @class
4
- * @extends {og.control.Control}
4
+ * @extends {Control}
5
5
  * @param {Object} [options] - Control options.
6
6
  */
7
- export class ToggleWireframe {
7
+ export class ToggleWireframe extends Control {
8
8
  constructor(options?: {});
9
9
  _isActive: any;
10
- oninit(): void;
11
10
  toogleWireframe(e: any): void;
12
11
  }
12
+ import { Control } from "./Control.js";
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Touch pad planet camera dragging control.
3
+ * @class
4
+ * @extends {Control}
5
+ * @param {Object} [options] - Control options.
6
+ */
7
+ export class TouchNavigation extends Control {
8
+ grabbedPoint: Vec3;
9
+ inertia: number;
10
+ grabbedSpheroid: Sphere;
11
+ planet: any;
12
+ qRot: Quat;
13
+ scaleRot: number;
14
+ rot: number;
15
+ _eye0: Vec3;
16
+ stepsCount: number;
17
+ stepsForward: any;
18
+ stepIndex: number;
19
+ pointOnEarth: any;
20
+ earthUp: any;
21
+ touches: Touch[];
22
+ _keyLock: Key;
23
+ onTouchStart(e: any): void;
24
+ _touching: boolean;
25
+ _startTouchOne(e: any): void;
26
+ stopRotation(): void;
27
+ onDoubleTouch(e: any): void;
28
+ onTouchEnd(e: any): void;
29
+ onTouchCancel(e: any): void;
30
+ onTouchMove(e: any): void;
31
+ onDraw(e: any): void;
32
+ }
33
+ import { Control } from "./Control.js";
34
+ import { Vec3 } from "../math/Vec3.js";
35
+ import { Sphere } from "../bv/Sphere.js";
36
+ import { Quat } from "../math/Quat.js";
37
+ declare class Touch {
38
+ x: number;
39
+ y: number;
40
+ prev_x: number;
41
+ prev_y: number;
42
+ grabbedPoint: Vec3;
43
+ grabbedSpheroid: Sphere;
44
+ dX: () => number;
45
+ dY: () => number;
46
+ }
47
+ import { Key } from "../Lock.js";
48
+ export {};
@@ -2,15 +2,13 @@ export function zoomControl(options: any): ZoomControl;
2
2
  /**
3
3
  * Planet zoom buttons control.
4
4
  * @class
5
- * @extends {og.control.Control}
5
+ * @extends {Control}
6
6
  * @params {Object} [options] - Control options.
7
7
  */
8
- export class ZoomControl {
9
- constructor(options: any);
8
+ export class ZoomControl extends Control {
10
9
  _keyLock: Key;
11
10
  planet: any;
12
11
  _move: number;
13
- oninit(): void;
14
12
  /**
15
13
  * Planet zoom in.
16
14
  * @public
@@ -25,4 +23,5 @@ export class ZoomControl {
25
23
  stopZoom(): void;
26
24
  _draw(e: any): void;
27
25
  }
26
+ import { Control } from "./Control.js";
28
27
  import { Key } from "../Lock.js";
@@ -1,5 +1,7 @@
1
1
  import { Control } from "./Control.js";
2
+ import { CompassButton } from "./CompassButton.js";
2
3
  import { DebugInfo } from "./DebugInfo";
4
+ import { EarthNavigation } from "./EarthNavigation.js";
3
5
  import { EarthCoordinates } from "./EarthCoordinates.js";
4
6
  import { GeoImageDragControl } from "./GeoImageDragControl.js";
5
7
  import { KeyboardNavigation } from "./KeyboardNavigation.js";
@@ -12,4 +14,4 @@ import { ShowFps } from "./ShowFps.js";
12
14
  import { Sun } from "./Sun.js";
13
15
  import { ZoomControl } from "./ZoomControl.js";
14
16
  import { Lighting } from "./Lighting.js";
15
- export { Control, DebugInfo, EarthCoordinates, GeoImageDragControl, KeyboardNavigation, LayerSwitcher, MouseNavigation, ToggleWireframe, TouchNavigation, SimpleNavigation, ShowFps, Sun, ZoomControl, Lighting };
17
+ export { Control, CompassButton, DebugInfo, EarthNavigation, EarthCoordinates, GeoImageDragControl, KeyboardNavigation, LayerSwitcher, MouseNavigation, ToggleWireframe, TouchNavigation, SimpleNavigation, ShowFps, Sun, ZoomControl, Lighting };
@@ -8,48 +8,52 @@ export class Ellipsoid {
8
8
  static getRelativeBearing(a: any, b: any): number;
9
9
  /**
10
10
  * Returns the midpoint between two points on the great circle.
11
- * @param {og.LonLat} lonLat1 - Longitude/latitude of first point.
12
- * @param {og.LonLat} lonLat2 - Longitude/latitude of second point.
13
- * @return {og.LonLat} Midpoint between points.
11
+ * @param {LonLat} lonLat1 - Longitude/latitude of first point.
12
+ * @param {LonLat} lonLat2 - Longitude/latitude of second point.
13
+ * @return {LonLat} Midpoint between points.
14
14
  */
15
- static getMiddlePointOnGreatCircle(lonLat1: any, lonLat2: any): any;
15
+ static getMiddlePointOnGreatCircle(lonLat1: LonLat, lonLat2: LonLat): LonLat;
16
16
  /**
17
17
  * Returns the point at given fraction between two points on the great circle.
18
- * @param {og.LonLat} lonLat1 - Longitude/Latitude of source point.
19
- * @param {og.LonLat} lonLat2 - Longitude/Latitude of destination point.
18
+ * @param {LonLat} lonLat1 - Longitude/Latitude of source point.
19
+ * @param {LonLat} lonLat2 - Longitude/Latitude of destination point.
20
20
  * @param {number} fraction - Fraction between the two points (0 = source point, 1 = destination point).
21
- * @returns {og.LonLat} Intermediate point between points.
21
+ * @returns {LonLat} Intermediate point between points.
22
22
  */
23
- static getIntermediatePointOnGreatCircle(lonLat1: any, lonLat2: any, fraction: number): any;
23
+ static getIntermediatePointOnGreatCircle(lonLat1: LonLat, lonLat2: LonLat, fraction: number): LonLat;
24
24
  static getRhumbBearing(lonLat1: any, lonLat2: any): number;
25
25
  static getBearing(lonLat1: any, lonLat2: any): number;
26
26
  /**
27
27
  * Returns the (initial) bearing from source to destination point on the great circle.
28
- * @param {og.LonLat} lonLat1 - Longitude/latitude of source point.
29
- * @param {og.LonLat} lonLat2 - Longitude/latitude of destination point.
28
+ * @param {LonLat} lonLat1 - Longitude/latitude of source point.
29
+ * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
30
30
  * @return {number} Initial bearing in degrees from north.
31
31
  */
32
- static getInitialBearing(lonLat1: any, lonLat2: any): number;
32
+ static getInitialBearing(lonLat1: LonLat, lonLat2: LonLat): number;
33
33
  /**
34
34
  * Returns the point of intersection of two paths defined by point and bearing.
35
- * @param {og.LonLat} p1 - First point.
35
+ * @param {LonLat} p1 - First point.
36
36
  * @param {number} brng1 - Initial bearing from first point.
37
- * @param {og.LonLat} p2 - Second point.
37
+ * @param {LonLat} p2 - Second point.
38
38
  * @param {number} brng2 - Initial bearing from second point.
39
- * @return {og.LonLat|null} Destination point (null if no unique intersection defined).
39
+ * @return {LonLat|null} Destination point (null if no unique intersection defined).
40
40
  */
41
- static intersection(p1: any, brng1: number, p2: any, brng2: number): any | null;
41
+ static intersection(p1: LonLat, brng1: number, p2: LonLat, brng2: number): LonLat | null;
42
42
  /**
43
43
  * Returns final bearing arriving at destination destination point from lonLat1 point; the final bearing
44
44
  * will differ from the initial bearing by varying degrees according to distance and latitude.
45
- * @param {og.LonLat} lonLat1 - Longitude/latitude of source point.
46
- * @param {og.LonLat} lonLat2 - Longitude/latitude of destination point.
45
+ * @param {LonLat} lonLat1 - Longitude/latitude of source point.
46
+ * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
47
47
  * @return {number} Final bearing in degrees from north.
48
48
  */
49
- static getFinalBearing(lonLat1: any, lonLat2: any): number;
50
- constructor(equatorialSize: any, polarSize: any);
51
- _a: any;
52
- _b: any;
49
+ static getFinalBearing(lonLat1: LonLat, lonLat2: LonLat): number;
50
+ /**
51
+ * @param {number} equatorialSize - Equatorial ellipsoid size.
52
+ * @param {number} polarSize - Polar ellipsoid size.
53
+ */
54
+ constructor(equatorialSize: number, polarSize: number);
55
+ _a: number;
56
+ _b: number;
53
57
  _flattening: number;
54
58
  _f: number;
55
59
  _a2: number;
@@ -78,49 +82,49 @@ export class Ellipsoid {
78
82
  /**
79
83
  * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
80
84
  * @public
81
- * @param {og.LonLat} lonlat - Degrees geodetic coordiantes.
82
- * @returns {og.Vec3} -
85
+ * @param {LonLat} lonlat - Degrees geodetic coordiantes.
86
+ * @returns {Vec3} -
83
87
  */
84
- public lonLatToCartesian(lonlat: any): any;
88
+ public lonLatToCartesian(lonlat: LonLat): Vec3;
85
89
  /**
86
90
  * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
87
91
  * @public
88
- * @param {og.LonLat} lonlat - Degrees geodetic coordiantes.
89
- * @param {og.Vec3} res - Output result.
90
- * @returns {og.Vec3} -
92
+ * @param {LonLat} lonlat - Degrees geodetic coordiantes.
93
+ * @param {Vec3} res - Output result.
94
+ * @returns {Vec3} -
91
95
  */
92
- public lonLatToCartesianRes(lonlat: any, res: any): any;
96
+ public lonLatToCartesianRes(lonlat: LonLat, res: Vec3): Vec3;
93
97
  /**
94
98
  * Gets cartesian ECEF from Wgs84 geodetic coordiantes.
95
99
  * @public
96
100
  * @param {Number} lon - Longitude.
97
101
  * @param {Number} lat - Latitude.
98
102
  * @param {Number} height - Height.
99
- * @returns {og.Vec3} -
103
+ * @returns {Vec3} -
100
104
  */
101
- public geodeticToCartesian(lon: number, lat: number, height?: number): any;
105
+ public geodeticToCartesian(lon: number, lat: number, height?: number): Vec3;
102
106
  /**
103
107
  * Gets Wgs84 geodetic coordiantes from cartesian ECEF.
104
108
  * @public
105
- * @param {og.Vec3} cartesian - Cartesian coordinates.
106
- * @returns {og.LonLat} -
109
+ * @param {Vec3} cartesian - Cartesian coordinates.
110
+ * @returns {LonLat} -
107
111
  */
108
- public cartesianToLonLat(cartesian: any): any;
112
+ public cartesianToLonLat(cartesian: Vec3): LonLat;
109
113
  /**
110
114
  * Gets ellipsoid surface normal.
111
115
  * @public
112
- * @param {og.Vec3} coord - Spatial coordiantes.
113
- * @returns {og.Vec3} -
116
+ * @param {Vec3} coord - Spatial coordiantes.
117
+ * @returns {Vec3} -
114
118
  */
115
- public getSurfaceNormal3v(coord: any): any;
119
+ public getSurfaceNormal3v(coord: Vec3): Vec3;
116
120
  getBearingDestination(lonLat1: any, bearing: any, distance: any): LonLat;
117
121
  /**
118
122
  * Returns the distance from one point to another(using haversine formula) on the great circle.
119
- * @param {og.LonLat} lonLat1 - Longitude/latitude of source point.
120
- * @param {og.LonLat} lonLat2 - Longitude/latitude of destination point.
123
+ * @param {LonLat} lonLat1 - Longitude/latitude of source point.
124
+ * @param {LonLat} lonLat2 - Longitude/latitude of destination point.
121
125
  * @return {number} Distance between points.
122
126
  */
123
- getGreatCircleDistance(lonLat1: any, lonLat2: any): number;
127
+ getGreatCircleDistance(lonLat1: LonLat, lonLat2: LonLat): number;
124
128
  /**
125
129
  * Calculates the destination point given start point lat / lon, bearing(deg) and distance (m).
126
130
  *
@@ -132,11 +136,11 @@ export class Ellipsoid {
132
136
  * Returns ray vector hit ellipsoid coordinates.
133
137
  * If the ray doesn't hit ellipsoid returns null.
134
138
  * @public
135
- * @param {og.Vec3} origin - Ray origin point.
136
- * @param {og.Vec3} direction - Ray direction.
137
- * @returns {og.Vec3} -
139
+ * @param {Vec3} origin - Ray origin point.
140
+ * @param {Vec3} direction - Ray direction.
141
+ * @returns {Vec3} -
138
142
  */
139
- public hitRay(origin: any, direction: any): any;
143
+ public hitRay(origin: Vec3, direction: Vec3): Vec3;
140
144
  }
141
145
  import { Vec3 } from "../math/Vec3.js";
142
146
  import { LonLat } from "../LonLat.js";
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * WGS84 ellipsoid object.
3
- * @type {og.Ellipsoid}
3
+ * @type {Ellipsoid}
4
4
  */
5
- export const wgs84: any;
5
+ export const wgs84: Ellipsoid;
6
+ import { Ellipsoid } from "./Ellipsoid.js";