@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
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * Main class for rendering planet
3
3
  * @class
4
- * @extends {og.scene.RenderNode}
5
- * @param {string} name - Planet name(Earth by default)
6
- * @param {og.Ellipsoid} ellipsoid - Planet ellipsoid(WGS84 by default)
7
- * @param {Number} [maxGridSize=128] - Segment maximal grid size
4
+ * @extends {RenderNode}
5
+ * @param {string} [options.name="Earth"] - Planet name(Earth by default)
6
+ * @param {Ellipsoid} [options.ellipsoid] - Planet ellipsoid(WGS84 by default)
7
+ * @param {Number} [options.maxGridSize=128] - Segment maximal grid size
8
+ * @param {Number} [options.maxEqualZoomAltitude=850000.0] - Maximal altitude since segments on the screen bacame the same zoom level
9
+ * @param {Number} [options.minEqualZoomAltitude=10000.0] - Minimal altitude since segments on the screen bacame the same zoom level
10
+ * @param {Number} [options.minEqualZoomCameraSlope=0.8] - Minimal camera slope above te globe where segments on the screen bacame the same zoom level
8
11
  * @fires og.scene.Planet#draw
9
12
  * @fires og.scene.Planet#layeradd
10
13
  * @fires og.scene.Planet#baselayerchange
@@ -12,19 +15,14 @@
12
15
  * @fires og.scene.Planet#layervisibilitychange
13
16
  * @fires og.scene.Planet#geoimageadd
14
17
  */
15
- export class Planet {
16
- static getBearingNorthRotationQuat(cartesian: any): any;
18
+ export class Planet extends RenderNode {
19
+ static getBearingNorthRotationQuat(cartesian: any): Quat;
17
20
  constructor(options?: {});
18
21
  /**
19
22
  * @public
20
- * @type {og.Ellipsoid}
23
+ * @type {Ellipsoid}
21
24
  */
22
- public ellipsoid: any;
23
- /**
24
- * @public
25
- * @type {Boolean}
26
- */
27
- public lightEnabled: boolean;
25
+ public ellipsoid: Ellipsoid;
28
26
  /**
29
27
  * Squared ellipsoid radius.
30
28
  * @protected
@@ -34,54 +32,57 @@ export class Planet {
34
32
  /**
35
33
  * All layers array.
36
34
  * @public
37
- * @type {Array.<og.Layer>}
35
+ * @type {Array.<Layer>}
38
36
  */
39
- public layers: Array<any>;
37
+ public layers: Array<Layer>;
40
38
  /**
41
39
  * Current visible imagery tile layers array.
42
40
  * @public
43
- * @type {Array.<og.Layer>}
41
+ * @type {Array.<Layer>}
44
42
  */
45
- public visibleTileLayers: Array<any>;
43
+ public visibleTileLayers: Array<Layer>;
46
44
  /**
47
45
  * Current visible vector layers array.
48
46
  * @protected
49
- * @type {Array.<og.layer.Vector>}
47
+ * @type {Array.<layer.Vector>}
50
48
  */
51
- protected visibleVectorLayers: Array<any>;
49
+ protected visibleVectorLayers: Array<layer.Vector>;
52
50
  _visibleTileLayerSlices: any[];
53
51
  /**
54
52
  * Vector layers visible nodes with collections.
55
53
  * @protected
56
- * @type {Array.<og.EntityCollection>}
54
+ * @type {Array.<EntityCollection>}
57
55
  */
58
- protected _frustumEntityCollections: Array<any>;
56
+ protected _frustumEntityCollections: Array<EntityCollection>;
59
57
  /**
60
58
  * There is only one base layer on the globe when layer.isBaseLayer is true.
61
59
  * @public
62
- * @type {og.Layer}
60
+ * @type {Layer}
63
61
  */
64
- public baseLayer: any;
62
+ public baseLayer: Layer;
65
63
  /**
66
64
  * Terrain provider.
67
65
  * @public
68
- * @type {og.terrain.Terrain}
66
+ * @type {Terrain}
69
67
  */
70
- public terrain: any;
68
+ public terrain: Terrain;
71
69
  /**
72
70
  * Camera is this.renderer.activeCamera pointer.
73
71
  * @public
74
- * @type {og.PlanetCamera}
72
+ * @type {PlanetCamera}
75
73
  */
76
- public camera: any;
74
+ public camera: PlanetCamera;
77
75
  _minAltitude: any;
78
76
  _maxAltitude: any;
77
+ maxEqualZoomAltitude: any;
78
+ minEqualZoomAltitude: any;
79
+ minEqualZoomCameraSlope: any;
79
80
  /**
80
81
  * Screen mouse pointer projected to planet cartesian position.
81
82
  * @public
82
- * @type {og.Vec3}
83
+ * @type {Vec3}
83
84
  */
84
- public mousePositionOnEarth: any;
85
+ public mousePositionOnEarth: Vec3;
85
86
  emptyTexture: any;
86
87
  transparentTexture: any;
87
88
  defaultTexture: any;
@@ -105,46 +106,46 @@ export class Planet {
105
106
  /**
106
107
  * Planet's segments collected for rendering frame.
107
108
  * @protected
108
- * @type {og.quadTree.Node}
109
+ * @type {quadTree.Node}
109
110
  */
110
- protected _renderedNodes: any;
111
+ protected _renderedNodes: quadTree.Node;
111
112
  _renderedNodesInFrustum: any[];
112
113
  /**
113
114
  * Created nodes cache
114
115
  * @protected
115
- * @type {og.quadTree.Node}
116
+ * @type {quadTree.Node}
116
117
  */
117
- protected _quadTreeNodesCacheMerc: any;
118
+ protected _quadTreeNodesCacheMerc: quadTree.Node;
118
119
  /**
119
120
  * Current visible mercator segments tree nodes array.
120
121
  * @protected
121
- * @type {og.quadTree.Node}
122
+ * @type {quadTree.Node}
122
123
  */
123
- protected _visibleNodes: any;
124
+ protected _visibleNodes: quadTree.Node;
124
125
  /**
125
126
  * Current visible north pole nodes tree nodes array.
126
127
  * @protected
127
- * @type {og.quadTree.Node}
128
+ * @type {quadTree.Node}
128
129
  */
129
- protected _visibleNodesNorth: any;
130
+ protected _visibleNodesNorth: quadTree.Node;
130
131
  /**
131
132
  * Current visible south pole nodes tree nodes array.
132
133
  * @protected
133
- * @type {og.quadTree.Node}
134
+ * @type {quadTree.Node}
134
135
  */
135
- protected _visibleNodesSouth: any;
136
+ protected _visibleNodesSouth: quadTree.Node;
136
137
  /**
137
138
  * Layers activity lock.
138
139
  * @public
139
- * @type {og.idle.Lock}
140
+ * @type {idle.Lock}
140
141
  */
141
- public layerLock: any;
142
+ public layerLock: idle.Lock;
142
143
  /**
143
144
  * Terrain providers activity lock.
144
145
  * @public
145
- * @type {og.idle.Lock}
146
+ * @type {idle.Lock}
146
147
  */
147
- public terrainLock: any;
148
+ public terrainLock: idle.Lock;
148
149
  /**
149
150
  * Layer's transparent colors.
150
151
  * @protected
@@ -179,21 +180,21 @@ export class Planet {
179
180
  /**
180
181
  * Mercator grid tree.
181
182
  * @protected
182
- * @type {og.quadTree.Node}
183
+ * @type {quadTree.Node}
183
184
  */
184
- protected _quadTree: any;
185
+ protected _quadTree: quadTree.Node;
185
186
  /**
186
187
  * North grid tree.
187
188
  * @protected
188
- * @type {og.quadTree.Node}
189
+ * @type {quadTree.Node}
189
190
  */
190
- protected _quadTreeNorth: any;
191
+ protected _quadTreeNorth: quadTree.Node;
191
192
  /**
192
193
  * South grid tree.
193
194
  * @protected
194
- * @type {og.quadTree.Node}
195
+ * @type {quadTree.Node}
195
196
  */
196
- protected _quadTreeSouth: any;
197
+ protected _quadTreeSouth: quadTree.Node;
197
198
  /**
198
199
  * Night glowing gl texture.
199
200
  * @protected
@@ -216,7 +217,7 @@ export class Planet {
216
217
  * @type {boolean}
217
218
  */
218
219
  protected _useSpecularTexture: boolean;
219
- _maxGridSize: number;
220
+ _maxGridSize: any;
220
221
  /**
221
222
  * Segment multiple textures size.(4 - convinient value for the most devices)
222
223
  * @const
@@ -245,9 +246,9 @@ export class Planet {
245
246
  /**
246
247
  * GeoImage creator.
247
248
  * @protected
248
- * @type{og.utils.GeoImageCreator}
249
+ * @type{utils.GeoImageCreator}
249
250
  */
250
- protected _geoImageCreator: any;
251
+ protected _geoImageCreator: utils.GeoImageCreator;
251
252
  _vectorTileCreator: VectorTileCreator;
252
253
  _normalMapCreator: NormalMapCreator;
253
254
  _terrainWorker: TerrainWorker;
@@ -261,65 +262,66 @@ export class Planet {
261
262
  _renderCompleted: boolean;
262
263
  /**
263
264
  * Add the given control to the renderer of the planet scene.
264
- * @param {og.control.Control} control - Control.
265
+ * @param {control.Control} control - Control.
265
266
  */
266
- addControl(control: any): void;
267
+ addControl(control: control.Control): void;
267
268
  setRatioLod(maxLod: any, minLod: any): void;
269
+ _renderCompletedActivated: boolean;
268
270
  /**
269
271
  * Add the given controls array to the renderer of the planet.
270
- * @param {Array.<og.control.Control>} cArr - Control array.
272
+ * @param {Array.<control.Control>} cArr - Control array.
271
273
  */
272
- addControls(cArr: Array<any>): void;
274
+ addControls(cArr: Array<control.Control>): void;
273
275
  /**
274
276
  * Return layer by it name
275
277
  * @param {string} name - Name of the layer. og.Layer.prototype.name
276
278
  * @public
277
- * @returns {og.Layer} -
279
+ * @returns {Layer} -
278
280
  */
279
- public getLayerByName(name: string): any;
281
+ public getLayerByName(name: string): Layer;
280
282
  /**
281
283
  * Adds the given layer to the planet.
282
- * @param {og.Layer} layer - Layer object.
284
+ * @param {Layer} layer - Layer object.
283
285
  * @public
284
286
  */
285
- public addLayer(layer: any): void;
287
+ public addLayer(layer: Layer): void;
286
288
  /**
287
289
  * Dispatch layer visibility changing event.
288
- * @param {og.Layer} layer - Changed layer.
290
+ * @param {Layer} layer - Changed layer.
289
291
  * @protected
290
292
  */
291
- protected _onLayerVisibilityChanged(layer: any): void;
293
+ protected _onLayerVisibilityChanged(layer: Layer): void;
292
294
  /**
293
295
  * Adds the given layers array to the planet.
294
- * @param {Array.<og.Layer>} layers - Layers array.
296
+ * @param {Array.<Layer>} layers - Layers array.
295
297
  * @public
296
298
  */
297
- public addLayers(layers: Array<any>): void;
299
+ public addLayers(layers: Array<Layer>): void;
298
300
  /**
299
301
  * Removes the given layer from the planet.
300
- * @param {og.Layer} layer - Layer to remove.
301
- * @return {og.Layer|undefined} The removed layer or undefined if the layer was not found.
302
+ * @param {Layer} layer - Layer to remove.
303
+ * @return {Layer|undefined} The removed layer or undefined if the layer was not found.
302
304
  * @public
303
305
  */
304
- public removeLayer(layer: any): any | undefined;
306
+ public removeLayer(layer: Layer): Layer | undefined;
305
307
  /**
306
308
  *
307
309
  * @protected
308
- * @param {og.Layer} layer - Material layer.
310
+ * @param {Layer} layer - Material layer.
309
311
  */
310
- protected _clearLayerMaterial(layer: any): void;
312
+ protected _clearLayerMaterial(layer: Layer): void;
311
313
  /**
312
314
  * Get the collection of layers associated with this planet.
313
- * @return {Array.<og.Layer>} Layers array.
315
+ * @return {Array.<Layer>} Layers array.
314
316
  * @public
315
317
  */
316
- public getLayers(): Array<any>;
318
+ public getLayers(): Array<Layer>;
317
319
  /**
318
320
  * Sets base layer coverage to the planet.
319
- * @param {og.Layer} layer - Layer object.
321
+ * @param {Layer} layer - Layer object.
320
322
  * @public
321
323
  */
322
- public setBaseLayer(layer: any): void;
324
+ public setBaseLayer(layer: Layer): void;
323
325
  /**
324
326
  * Sets elevation scale. 1.0 is default.
325
327
  * @param {number} factor - Elevation scale.
@@ -333,9 +335,9 @@ export class Planet {
333
335
  /**
334
336
  * Sets terrain provider
335
337
  * @public
336
- * @param {og.terrain.Terrain} terrain - Terrain provider.
338
+ * @param {Terrain} terrain - Terrain provider.
337
339
  */
338
- public setTerrain(terrain: any): void;
340
+ public setTerrain(terrain: Terrain): void;
339
341
  /**
340
342
  * @virtual
341
343
  * @protected
@@ -346,8 +348,6 @@ export class Planet {
346
348
  * @public
347
349
  */
348
350
  public init(): void;
349
- _renderCompletedActivated: boolean;
350
- drawMode: any;
351
351
  clearIndexesCache(): void;
352
352
  _preRender(): void;
353
353
  /**
@@ -390,6 +390,7 @@ export class Planet {
390
390
  * @protected
391
391
  */
392
392
  protected _renderScreenNodesPASS(): void;
393
+ _skipPreRender: boolean;
393
394
  /**
394
395
  * @protected
395
396
  */
@@ -417,156 +418,160 @@ export class Planet {
417
418
  * Returns ray vector hit ellipsoid coordinates.
418
419
  * If the ray doesn't hit ellipsoit returns null.
419
420
  * @public
420
- * @param {og.Ray} ray - Ray 3d.
421
- * @returns {og.Vec3} -
421
+ * @param {Ray} ray - Ray 3d.
422
+ * @returns {Vec3} -
422
423
  */
423
- public getRayIntersectionEllipsoid(ray: any): any;
424
+ public getRayIntersectionEllipsoid(ray: Ray): Vec3;
424
425
  /**
425
426
  * Returns 2d screen coordanates projection point to the planet ellipsoid 3d coordinates.
426
427
  * @public
427
- * @param {og.math.Pixel} px - 2D sreen coordinates.
428
- * @returns {og.Vec3} -
428
+ * @param {math.Pixel} px - 2D sreen coordinates.
429
+ * @returns {Vec3} -
429
430
  */
430
- public getCartesianFromPixelEllipsoid(px: any): any;
431
+ public getCartesianFromPixelEllipsoid(px: math.Pixel): Vec3;
431
432
  /**
432
433
  * Returns 2d screen coordanates projection point to the planet ellipsoid geographical coordinates.
433
434
  * @public
434
- * @param {og.math.Pixel} px - 2D screen coordinates.
435
- * @returns {og.LonLat} -
435
+ * @param {math.Pixel} px - 2D screen coordinates.
436
+ * @returns {LonLat} -
436
437
  */
437
- public getLonLatFromPixelEllipsoid(px: any): any;
438
+ public getLonLatFromPixelEllipsoid(px: math.Pixel): LonLat;
438
439
  /**
439
440
  * Returns 3d cartesian coordinates on the relief planet by mouse cursor
440
441
  * position or null if mouse cursor is outside the planet.
441
442
  * @public
442
443
  * @param {Boolean} [force=false] - Force framebuffer rendering.
443
- * @returns {og.Vec3} -
444
+ * @returns {Vec3} -
444
445
  */
445
- public getCartesianFromMouseTerrain(force?: boolean): any;
446
+ public getCartesianFromMouseTerrain(force?: boolean): Vec3;
446
447
  /**
447
448
  * Returns 3d cartesian coordinates on the relief planet by 2d screen coordinates.
448
449
  * position or null if input coordinates is outside the planet.
449
450
  * @public
450
- * @param {og.Vec2} px - Pixel screen 2d coordinates.
451
+ * @param {Vec2} px - Pixel screen 2d coordinates.
451
452
  * @param {Boolean} [force=false] - Force framebuffer rendering.
452
- * @returns {og.Vec3} -
453
+ * @returns {Vec3} -
453
454
  */
454
- public getCartesianFromPixelTerrain(px: any, force?: boolean): any;
455
+ public getCartesianFromPixelTerrain(px: Vec2, force?: boolean): Vec3;
455
456
  /**
456
457
  * Returns geographical coordinates on the relief planet by 2d screen coordinates.
457
458
  * position or null if input coordinates is outside the planet.
458
459
  * @public
459
- * @param {og.Vec2} px - Pixel screen 2d coordinates.
460
+ * @param {Vec2} px - Pixel screen 2d coordinates.
460
461
  * @param {Boolean} [force=false] - Force framebuffer rendering.
461
- * @returns {og.LonLat} -
462
+ * @returns {LonLat} -
462
463
  */
463
- public getLonLatFromPixelTerrain(px: any, force?: boolean): any;
464
+ public getLonLatFromPixelTerrain(px: Vec2, force?: boolean): LonLat;
464
465
  /**
465
466
  * Returns projected 2d screen coordinates by 3d cartesian coordiantes.
466
467
  * @public
467
- * @param {og.Vec3} coords - Cartesian coordinates.
468
- * @returns {og.Vec2} -
468
+ * @param {Vec3} coords - Cartesian coordinates.
469
+ * @returns {Vec2} -
469
470
  */
470
- public getPixelFromCartesian(coords: any): any;
471
+ public getPixelFromCartesian(coords: Vec3): Vec2;
471
472
  /**
472
473
  * Returns projected 2d screen coordinates by geographical coordinates.
473
474
  * @public
474
- * @param {og.LonLat} lonlat - Geographical coordinates.
475
- * @returns {og.Vec2} -
475
+ * @param {LonLat} lonlat - Geographical coordinates.
476
+ * @returns {Vec2} -
476
477
  */
477
- public getPixelFromLonLat(lonlat: any): any;
478
+ public getPixelFromLonLat(lonlat: LonLat): Vec2;
478
479
  /**
479
480
  * Returns distance from active camera to the the planet ellipsoid
480
481
  * coordiantes unprojected by 2d screen coordiantes, or null if screen coordinates outside the planet.
481
482
  * @public
482
- * @param {og.Vec2} px - Screen coordinates.
483
+ * @param {Vec2} px - Screen coordinates.
483
484
  * @returns {number} -
484
485
  */
485
- public getDistanceFromPixelEllipsoid(px: any): number;
486
+ public getDistanceFromPixelEllipsoid(px: Vec2): number;
486
487
  /**
487
488
  * Returns distance from active camera to the the relief planet coordiantes unprojected
488
489
  * by 2d screen coordiantes, or null if screen coordinates outside the planet.
489
490
  * If screen coordinates inside the planet but relief is not exists in the
490
491
  * point than function returns distance to the planet ellipsoid.
491
492
  * @public
492
- * @param {og.Vec2} px - Screen coordinates.
493
+ * @param {Vec2} px - Screen coordinates.
493
494
  * @param {Boolean} [force=false] - Force framebuffer rendering.
494
495
  * @returns {number} -
495
496
  */
496
- public getDistanceFromPixel(px: any): number;
497
+ public getDistanceFromPixel(px: Vec2): number;
497
498
  /**
498
499
  * Sets camera to the planet geographical extent.
499
500
  * @public
500
- * @param {og.Extent} extent - Geographical extent.
501
+ * @param {Extent} extent - Geographical extent.
501
502
  */
502
- public viewExtent(extent: any): void;
503
+ public viewExtent(extent: Extent): void;
503
504
  /**
504
505
  * Sets camera to the planet geographical extent.
505
506
  * @public
506
- * @param {Array.<number,number,number,number>} extentArr - Geographical extent array,
507
+ * @param {Array.<number>} extentArr - Geographical extent array, (exactly 4 entries)
507
508
  * where index 0 - southwest longitude, 1 - latitude southwest, 2 - longitude northeast, 3 - latitude northeast.
508
509
  */
509
- public viewExtentArr(extentArr: Array<number, number, number, number>): void;
510
+ public viewExtentArr(extentArr: Array<number>): void;
510
511
  /**
511
512
  * Gets current viewing geographical extent.
512
513
  * @public
513
- * @returns {og.Extent} -
514
+ * @returns {Extent} -
514
515
  */
515
- public getViewExtent(): any;
516
+ public getViewExtent(): Extent;
516
517
  /**
517
518
  * Sets camera to the planet geographical position.
518
519
  * @public
519
- * @param {og.LonLat} lonlat - New geographical position.
520
- * @param {og.Vec3} [up] - Camera UP vector.
520
+ * @param {LonLat} lonlat - New geographical position.
521
+ * @param {Vec3} [up] - Camera UP vector.
521
522
  */
522
- public viewLonLat(lonlat: any, up?: any): void;
523
+ public viewLonLat(lonlat: LonLat, up?: Vec3): void;
523
524
  /**
524
525
  * Fly camera to the planet geographical extent.
525
526
  * @public
526
- * @param {og.Extent} extent - Geographical extent.
527
+ * @param {Extent} extent - Geographical extent.
527
528
  * @param {Number} [height] - Height on the end of the flight route.
528
- * @param {og.Vec3} [up] - Camera UP vector on the end of a flying.
529
+ * @param {Vec3} [up] - Camera UP vector on the end of a flying.
529
530
  * @param {Number} [ampl] - Altitude amplitude factor.
530
531
  * @param {cameraCallback} [startCallback] - Callback that calls after flying when flying is finished.
531
532
  * @param {cameraCallback} [completeCallback] - Callback that calls befor the flying begins.
532
533
  */
533
- public flyExtent(extent: any, height?: number, up?: any, ampl?: number, completeCallback?: any, startCallback?: any): void;
534
+ public flyExtent(extent: Extent, height?: number, up?: Vec3, ampl?: number, completeCallback?: cameraCallback, startCallback?: cameraCallback): void;
534
535
  /**
535
536
  * Fly camera to the new point.
536
537
  * @public
537
- * @param {og.Vec3} cartesian - Fly coordiantes.
538
- * @param {og.Vec3} [look] - Camera "look at" point.
539
- * @param {og.Vec3} [up] - Camera UP vector on the end of a flying.
538
+ * @param {Vec3} cartesian - Fly coordiantes.
539
+ * @param {Vec3} [look] - Camera "look at" point.
540
+ * @param {Vec3} [up] - Camera UP vector on the end of a flying.
540
541
  * @param {Number} [ampl] - Altitude amplitude factor.
541
542
  * @param [completeCallback]
542
543
  * @param [startCallback]
543
544
  * @param [frameCallback]
544
545
  */
545
- public flyCartesian(cartesian: any, look?: any, up?: any, ampl?: number, completeCallback?: any, startCallback?: any, frameCallback?: any): void;
546
+ public flyCartesian(cartesian: Vec3, look?: Vec3, up?: Vec3, ampl?: number, completeCallback?: any, startCallback?: any, frameCallback?: any): void;
546
547
  /**
547
548
  * Fly camera to the new geographical position.
548
549
  * @public
549
- * @param {og.LonLat} lonlat - Fly geographical coordiantes.
550
- * @param {og.Vec3} [look] - Camera "look at" point on the end of a flying.
551
- * @param {og.Vec3} [up] - Camera UP vector on the end of a flying.
550
+ * @param {LonLat} lonlat - Fly geographical coordiantes.
551
+ * @param {Vec3} [look] - Camera "look at" point on the end of a flying.
552
+ * @param {Vec3} [up] - Camera UP vector on the end of a flying.
552
553
  * @param {Number} [ampl] - Altitude amplitude factor.
553
554
  * @param [completeCallback]
554
555
  * @param [startCallback]
555
556
  * @param [frameCallback]
556
557
  */
557
- public flyLonLat(lonlat: any, look?: any, up?: any, ampl?: number, completeCallback?: any, startCallback?: any, frameCallback?: any): void;
558
+ public flyLonLat(lonlat: LonLat, look?: Vec3, up?: Vec3, ampl?: number, completeCallback?: any, startCallback?: any, frameCallback?: any): void;
558
559
  /**
559
560
  * Breaks the flight.
560
561
  * @public
561
562
  */
562
563
  public stopFlying(): void;
563
- updateBillboardsTexCoords(): void;
564
564
  getEntityTerrainPoint(entity: any, res: any): any;
565
565
  }
566
+ import { RenderNode } from "./RenderNode.js";
567
+ import { PlanetCamera } from "../camera/PlanetCamera.js";
568
+ import { Vec3 } from "../math/index.js";
566
569
  import { VectorTileCreator } from "../utils/VectorTileCreator.js";
567
570
  import { NormalMapCreator } from "../utils/NormalMapCreator.js";
568
571
  import { TerrainWorker } from "../utils/TerrainWorker.js";
569
572
  import { PlainSegmentWorker } from "../utils/PlainSegmentWorker.js";
570
573
  import { Loader } from "../utils/Loader.js";
571
574
  import { Key } from "../Lock.js";
572
- import { Vec3 } from "../math/index.js";
575
+ import { LonLat } from "../LonLat.js";
576
+ import { Extent } from "../Extent.js";
577
+ import { Quat } from "../math/index.js";
@@ -5,17 +5,16 @@
5
5
  * There are collections of ligh sources, entities and so on in the node.
6
6
  * Access to the node is renderer.renderNodes["Earth"]
7
7
  * @class
8
- * @extends {og.RenderNode}
8
+ * @extends {RenderNode}
9
9
  * @param {string} name - Node name.
10
10
  */
11
11
  export class RenderNode {
12
- constructor(name: any);
13
12
  /**
14
13
  * Renderer that calls frame() callback.
15
14
  * @public
16
- * @type {og.Renderer}
15
+ * @type {Renderer}
17
16
  */
18
- public renderer: any;
17
+ public renderer: Renderer;
19
18
  drawMode: number;
20
19
  /** Show rendering.
21
20
  * @public
@@ -31,7 +30,7 @@ export class RenderNode {
31
30
  /**
32
31
  * Point light array.
33
32
  * @private
34
- * @type {Array.<og.LightSource>}
33
+ * @type {Array.<LightSource>}
35
34
  */
36
35
  private _lights;
37
36
  _lightsTransformedPositions: any[];
@@ -41,59 +40,59 @@ export class RenderNode {
41
40
  /**
42
41
  * Entity collection array.
43
42
  * @public
44
- * @type {Array.<og.EntityCollection>}
43
+ * @type {Array.<EntityCollection>}
45
44
  */
46
- public entityCollections: Array<any>;
45
+ public entityCollections: Array<EntityCollection>;
47
46
  _pickingId: number;
48
47
  events: Events;
49
48
  /**
50
49
  * Adds node to the current hierarchy.
51
50
  * @public
52
- * @type {og.RenderNode}
51
+ * @type {RenderNode}
53
52
  */
54
53
  public addNode(node: any): void;
55
54
  /**
56
55
  * Assign render node with renderer.
57
56
  * @public
58
- * @param {og.Renderer} renderer - Redner node's renderer.
57
+ * @param {Renderer} renderer - Redner node's renderer.
59
58
  */
60
- public assign(renderer: any): void;
59
+ public assign(renderer: Renderer): void;
61
60
  onremove(): void;
62
61
  remove(): void;
63
62
  /**
64
63
  * Adds entity collection.
65
64
  * @public
66
- * @param {og.EntityCollection} entityCollection - Entity collection.
65
+ * @param {EntityCollection} entityCollection - Entity collection.
67
66
  * @param {boolean} [isHidden] - If it's true that this collection has specific rendering.
68
- * @returns {og.scene.RenderNode} -
67
+ * @returns {RenderNode} -
69
68
  */
70
- public addEntityCollection(entityCollection: any, isHidden?: boolean): any;
69
+ public addEntityCollection(entityCollection: EntityCollection, isHidden?: boolean): RenderNode;
71
70
  /**
72
71
  * Removes entity collection.
73
72
  * @public
74
- * @param {og.EntityCollection} entityCollection - Entity collection for remove.
73
+ * @param {EntityCollection} entityCollection - Entity collection for remove.
75
74
  */
76
- public removeEntityCollection(entityCollection: any): void;
75
+ public removeEntityCollection(entityCollection: EntityCollection): void;
77
76
  /**
78
77
  * Adds point light source.
79
78
  * @public
80
- * @param {og.LightSource} light - Light source.
81
- * @returns {og.scene.RenderNode}
79
+ * @param {LightSource} light - Light source.
80
+ * @returns {RenderNode}
82
81
  */
83
- public addLight(light: any): any;
82
+ public addLight(light: LightSource): RenderNode;
84
83
  /**
85
84
  * Gets light object by its name.
86
85
  * @public
87
86
  * @param {string} name - Point light name.
88
- * @returns {og.LightSource}
87
+ * @returns {LightSource}
89
88
  */
90
- public getLightByName(name: string): any;
89
+ public getLightByName(name: string): LightSource;
91
90
  /**
92
91
  * Removes light source.
93
92
  * @public
94
- * @param {og.LightSource} light - Light source object.
93
+ * @param {LightSource} light - Light source object.
95
94
  */
96
- public removeLight(light: any): void;
95
+ public removeLight(light: LightSource): void;
97
96
  /**
98
97
  * Calls render frame node's callback. Used in renderer.
99
98
  * @public
@@ -133,7 +132,7 @@ export class RenderNode {
133
132
  * @public
134
133
  * @param {Array<og.EntityCollection>} ec - Entity collection array.
135
134
  */
136
- public drawPickingEntityCollections(ec: Array<any>): void;
135
+ public drawPickingEntityCollections(ec: Array<og.EntityCollection>): void;
137
136
  /**
138
137
  * Picking entity frame callback
139
138
  * @private