@openglobus/og 0.10.4 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/css/og.css +1 -1
  2. package/package.json +11 -9
  3. package/src/og/Extent.js +274 -273
  4. package/src/og/Globe.js +11 -3
  5. package/src/og/LonLat.js +152 -146
  6. package/src/og/Popup.js +2 -1
  7. package/src/og/camera/PlanetCamera.js +112 -38
  8. package/src/og/control/EarthNavigation.js +259 -0
  9. package/src/og/control/MouseNavigation.js +68 -40
  10. package/src/og/entity/EntityCollection.js +1 -1
  11. package/src/og/entity/LabelHandler.js +366 -74
  12. package/src/og/entity/Polyline.js +3 -2
  13. package/src/og/layer/CanvasTiles.js +32 -30
  14. package/src/og/layer/KML.js +159 -0
  15. package/src/og/layer/Vector.js +5 -0
  16. package/src/og/layer/index.js +2 -1
  17. package/src/og/math/Vec2.js +448 -448
  18. package/src/og/math/Vec3.js +759 -757
  19. package/src/og/math/Vec4.js +216 -215
  20. package/src/og/quadTree/Node.js +67 -13
  21. package/src/og/renderer/RendererEvents.js +21 -16
  22. package/src/og/scene/Planet.js +25 -10
  23. package/src/og/segment/Segment.js +3 -3
  24. package/src/og/segment/SegmentLonLat.js +7 -0
  25. package/src/og/terrain/GlobusTerrain.js +4 -0
  26. package/src/og/utils/FontAtlas.js +1 -0
  27. package/src/og/utils/GeoImageCreator.js +123 -121
  28. package/src/og/utils/Loader.js +81 -80
  29. package/src/og/utils/NormalMapCreator.js +320 -318
  30. package/src/og/utils/VectorTileCreator.js +251 -250
  31. package/src/og/webgl/Framebuffer.js +265 -264
  32. package/src/og/webgl/Handler.js +1022 -1001
  33. package/src/og/webgl/Multisample.js +169 -168
  34. package/src/og/webgl/ProgramController.js +113 -112
  35. package/types/Clock.d.ts +90 -0
  36. package/types/Deferred.d.ts +6 -0
  37. package/types/Events.d.ts +73 -0
  38. package/types/Extent.d.ts +162 -0
  39. package/types/Globe.d.ts +80 -0
  40. package/types/ImageCanvas.d.ts +121 -0
  41. package/types/Lock.d.ts +12 -0
  42. package/types/LonLat.d.ts +108 -0
  43. package/types/Popup.d.ts +38 -0
  44. package/types/QueueArray.d.ts +15 -0
  45. package/types/Rectangle.d.ts +74 -0
  46. package/types/Stack.d.ts +15 -0
  47. package/types/ajax.d.ts +24 -0
  48. package/types/arial.d.ts +48 -0
  49. package/types/astro/astro.d.ts +38 -0
  50. package/types/astro/earth.d.ts +6 -0
  51. package/types/astro/jd.d.ts +254 -0
  52. package/types/bv/Box.d.ts +25 -0
  53. package/types/bv/Sphere.d.ts +32 -0
  54. package/types/bv/index.d.ts +3 -0
  55. package/types/camera/Camera.d.ts +303 -0
  56. package/types/camera/Frustum.d.ts +129 -0
  57. package/types/camera/PlanetCamera.d.ts +222 -0
  58. package/types/camera/index.d.ts +3 -0
  59. package/types/cons.d.ts +40 -0
  60. package/types/control/CompassButton.d.ts +17 -0
  61. package/types/control/Control.d.ts +101 -0
  62. package/types/control/DebugInfo.d.ts +16 -0
  63. package/types/control/EarthCoordinates.d.ts +47 -0
  64. package/types/control/GeoImageDragControl.d.ts +6 -0
  65. package/types/control/KeyboardNavigation.d.ts +22 -0
  66. package/types/control/LayerSwitcher.d.ts +23 -0
  67. package/types/control/Lighting.d.ts +16 -0
  68. package/types/control/ScaleControl.d.ts +22 -0
  69. package/types/control/ShowFps.d.ts +12 -0
  70. package/types/control/SimpleNavigation.d.ts +28 -0
  71. package/types/control/Sun.d.ts +52 -0
  72. package/types/control/ToggleWireframe.d.ts +12 -0
  73. package/types/control/ZoomControl.d.ts +28 -0
  74. package/types/control/index.d.ts +15 -0
  75. package/types/ellipsoid/Ellipsoid.d.ts +142 -0
  76. package/types/ellipsoid/index.d.ts +3 -0
  77. package/types/ellipsoid/wgs84.d.ts +5 -0
  78. package/types/entity/BaseBillboard.d.ts +208 -0
  79. package/types/entity/Billboard.d.ts +94 -0
  80. package/types/entity/BillboardHandler.d.ts +74 -0
  81. package/types/entity/Entity.d.ts +330 -0
  82. package/types/entity/EntityCollection.d.ts +303 -0
  83. package/types/entity/Geometry.d.ts +72 -0
  84. package/types/entity/GeometryHandler.d.ts +76 -0
  85. package/types/entity/Label.d.ts +194 -0
  86. package/types/entity/LabelHandler.d.ts +24 -0
  87. package/types/entity/PointCloud.d.ts +174 -0
  88. package/types/entity/PointCloudHandler.d.ts +38 -0
  89. package/types/entity/Polyline.d.ts +303 -0
  90. package/types/entity/PolylineHandler.d.ts +18 -0
  91. package/types/entity/Ray.d.ts +123 -0
  92. package/types/entity/RayHandler.d.ts +67 -0
  93. package/types/entity/ShapeHandler.d.ts +22 -0
  94. package/types/entity/Strip.d.ts +118 -0
  95. package/types/entity/StripHandler.d.ts +38 -0
  96. package/types/entity/index.d.ts +8 -0
  97. package/types/index.core.d.ts +65 -0
  98. package/types/index.d.ts +45 -0
  99. package/types/index.webgl.d.ts +7 -0
  100. package/types/inherits.d.ts +4 -0
  101. package/types/input/input.d.ts +34 -0
  102. package/types/layer/BaseGeoImage.d.ts +106 -0
  103. package/types/layer/CanvasTiles.d.ts +75 -0
  104. package/types/layer/GeoImage.d.ts +65 -0
  105. package/types/layer/GeoTexture2d.d.ts +8 -0
  106. package/types/layer/GeoVideo.d.ts +80 -0
  107. package/types/layer/KML.d.ts +58 -0
  108. package/types/layer/WMS.d.ts +66 -0
  109. package/types/layer/XYZ.d.ts +126 -0
  110. package/types/layer/index.d.ts +10 -0
  111. package/types/light/LightSource.d.ts +177 -0
  112. package/types/math/Mat3.d.ts +53 -0
  113. package/types/math/Mat4.d.ts +157 -0
  114. package/types/math/Plane.d.ts +17 -0
  115. package/types/math/Vec2.d.ts +308 -0
  116. package/types/math/Vec3.d.ts +459 -0
  117. package/types/math/Vec4.d.ts +161 -0
  118. package/types/math/coder.d.ts +42 -0
  119. package/types/math/index.d.ts +11 -0
  120. package/types/math.d.ts +261 -0
  121. package/types/mercator.d.ts +92 -0
  122. package/types/proj/EPSG3857.d.ts +5 -0
  123. package/types/proj/EPSG4326.d.ts +5 -0
  124. package/types/quadTree/quadTree.d.ts +40 -0
  125. package/types/renderer/RendererEvents.d.ts +230 -0
  126. package/types/res/images.d.ts +3 -0
  127. package/types/scene/Axes.d.ts +11 -0
  128. package/types/scene/BaseNode.d.ts +60 -0
  129. package/types/scene/Planet.d.ts +572 -0
  130. package/types/scene/RenderNode.d.ts +143 -0
  131. package/types/scene/SkyBox.d.ts +10 -0
  132. package/types/scene/index.d.ts +4 -0
  133. package/types/segment/segmentHelper.d.ts +13 -0
  134. package/types/shaders/billboard.d.ts +3 -0
  135. package/types/shaders/depth.d.ts +2 -0
  136. package/types/shaders/drawnode.d.ts +7 -0
  137. package/types/shaders/label.d.ts +4 -0
  138. package/types/shaders/pointCloud.d.ts +2 -0
  139. package/types/shaders/polyline.d.ts +3 -0
  140. package/types/shaders/ray.d.ts +2 -0
  141. package/types/shaders/screenFrame.d.ts +2 -0
  142. package/types/shaders/shape.d.ts +4 -0
  143. package/types/shaders/skybox.d.ts +2 -0
  144. package/types/shaders/toneMapping.d.ts +2 -0
  145. package/types/shapes/BaseShape.d.ts +247 -0
  146. package/types/shapes/Sphere.d.ts +41 -0
  147. package/types/terrain/BilTerrain.d.ts +8 -0
  148. package/types/terrain/EmptyTerrain.d.ts +72 -0
  149. package/types/terrain/Geoid.d.ts +26 -0
  150. package/types/terrain/GlobusTerrain.d.ts +153 -0
  151. package/types/terrain/MapboxTerrain.d.ts +8 -0
  152. package/types/terrain/index.d.ts +5 -0
  153. package/types/utils/FontAtlas.d.ts +14 -0
  154. package/types/utils/GeoImageCreator.d.ts +29 -0
  155. package/types/utils/ImagesCacheManager.d.ts +10 -0
  156. package/types/utils/Loader.d.ts +25 -0
  157. package/types/utils/NormalMapCreator.d.ts +39 -0
  158. package/types/utils/PlainSegmentWorker.d.ts +10 -0
  159. package/types/utils/TerrainWorker.d.ts +9 -0
  160. package/types/utils/TextureAtlas.d.ts +111 -0
  161. package/types/utils/VectorTileCreator.d.ts +16 -0
  162. package/types/utils/colorTable.d.ts +143 -0
  163. package/types/utils/earcut.d.ts +6 -0
  164. package/types/utils/shared.d.ts +230 -0
  165. package/types/webgl/Framebuffer.d.ts +135 -0
  166. package/types/webgl/Handler.d.ts +372 -0
  167. package/types/webgl/Multisample.d.ts +89 -0
  168. package/types/webgl/Program.d.ts +155 -0
  169. package/types/webgl/ProgramController.d.ts +84 -0
  170. package/types/webgl/callbacks.d.ts +1 -0
  171. package/types/webgl/index.d.ts +6 -0
  172. package/types/webgl/types.d.ts +2 -0
@@ -0,0 +1,572 @@
1
+ /**
2
+ * Main class for rendering planet
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
8
+ * @fires og.scene.Planet#draw
9
+ * @fires og.scene.Planet#layeradd
10
+ * @fires og.scene.Planet#baselayerchange
11
+ * @fires og.scene.Planet#layerremove
12
+ * @fires og.scene.Planet#layervisibilitychange
13
+ * @fires og.scene.Planet#geoimageadd
14
+ */
15
+ export class Planet {
16
+ static getBearingNorthRotationQuat(cartesian: any): any;
17
+ constructor(options?: {});
18
+ /**
19
+ * @public
20
+ * @type {og.Ellipsoid}
21
+ */
22
+ public ellipsoid: any;
23
+ /**
24
+ * @public
25
+ * @type {Boolean}
26
+ */
27
+ public lightEnabled: boolean;
28
+ /**
29
+ * Squared ellipsoid radius.
30
+ * @protected
31
+ * @type {number}
32
+ */
33
+ protected _planetRadius2: number;
34
+ /**
35
+ * All layers array.
36
+ * @public
37
+ * @type {Array.<og.Layer>}
38
+ */
39
+ public layers: Array<any>;
40
+ /**
41
+ * Current visible imagery tile layers array.
42
+ * @public
43
+ * @type {Array.<og.Layer>}
44
+ */
45
+ public visibleTileLayers: Array<any>;
46
+ /**
47
+ * Current visible vector layers array.
48
+ * @protected
49
+ * @type {Array.<og.layer.Vector>}
50
+ */
51
+ protected visibleVectorLayers: Array<any>;
52
+ _visibleTileLayerSlices: any[];
53
+ /**
54
+ * Vector layers visible nodes with collections.
55
+ * @protected
56
+ * @type {Array.<og.EntityCollection>}
57
+ */
58
+ protected _frustumEntityCollections: Array<any>;
59
+ /**
60
+ * There is only one base layer on the globe when layer.isBaseLayer is true.
61
+ * @public
62
+ * @type {og.Layer}
63
+ */
64
+ public baseLayer: any;
65
+ /**
66
+ * Terrain provider.
67
+ * @public
68
+ * @type {og.terrain.Terrain}
69
+ */
70
+ public terrain: any;
71
+ /**
72
+ * Camera is this.renderer.activeCamera pointer.
73
+ * @public
74
+ * @type {og.PlanetCamera}
75
+ */
76
+ public camera: any;
77
+ _minAltitude: any;
78
+ _maxAltitude: any;
79
+ /**
80
+ * Screen mouse pointer projected to planet cartesian position.
81
+ * @public
82
+ * @type {og.Vec3}
83
+ */
84
+ public mousePositionOnEarth: any;
85
+ emptyTexture: any;
86
+ transparentTexture: any;
87
+ defaultTexture: any;
88
+ /**
89
+ * Current visible minimal zoom index planet segment.
90
+ * @public
91
+ * @type {number}
92
+ */
93
+ public minCurrZoom: number;
94
+ /**
95
+ * Current visible maximal zoom index planet segment.
96
+ * @public
97
+ * @type {number}
98
+ */
99
+ public maxCurrZoom: number;
100
+ _viewExtent: any;
101
+ /**
102
+ * @protected
103
+ */
104
+ protected _createdNodesCount: number;
105
+ /**
106
+ * Planet's segments collected for rendering frame.
107
+ * @protected
108
+ * @type {og.quadTree.Node}
109
+ */
110
+ protected _renderedNodes: any;
111
+ _renderedNodesInFrustum: any[];
112
+ /**
113
+ * Created nodes cache
114
+ * @protected
115
+ * @type {og.quadTree.Node}
116
+ */
117
+ protected _quadTreeNodesCacheMerc: any;
118
+ /**
119
+ * Current visible mercator segments tree nodes array.
120
+ * @protected
121
+ * @type {og.quadTree.Node}
122
+ */
123
+ protected _visibleNodes: any;
124
+ /**
125
+ * Current visible north pole nodes tree nodes array.
126
+ * @protected
127
+ * @type {og.quadTree.Node}
128
+ */
129
+ protected _visibleNodesNorth: any;
130
+ /**
131
+ * Current visible south pole nodes tree nodes array.
132
+ * @protected
133
+ * @type {og.quadTree.Node}
134
+ */
135
+ protected _visibleNodesSouth: any;
136
+ /**
137
+ * Layers activity lock.
138
+ * @public
139
+ * @type {og.idle.Lock}
140
+ */
141
+ public layerLock: any;
142
+ /**
143
+ * Terrain providers activity lock.
144
+ * @public
145
+ * @type {og.idle.Lock}
146
+ */
147
+ public terrainLock: any;
148
+ /**
149
+ * Layer's transparent colors.
150
+ * @protected
151
+ */
152
+ protected _tcolorArr: any[];
153
+ /**
154
+ * Height scale factor. 1 - is normal elevation scale.
155
+ * @protected
156
+ * @type {number}
157
+ */
158
+ protected _heightFactor: number;
159
+ /**
160
+ * Precomputed indexes array for differrent grid size segments.
161
+ * @protected
162
+ * @type {Array.<Array.<number>>}
163
+ */
164
+ protected _indexesCache: Array<Array<number>>;
165
+ _indexesCacheToRemove: any[];
166
+ _indexesCacheToRemoveCounter: number;
167
+ /**
168
+ * Precomputed texture coordinates buffers for differrent grid size segments.
169
+ * @protected
170
+ * @type {Array.<Array.<number>>}
171
+ */
172
+ protected _textureCoordsBufferCache: Array<Array<number>>;
173
+ /**
174
+ * Framebuffer for relief. Is null when WEBGL_draw_buffers extension initialized.
175
+ * @protected
176
+ * @type {Object}
177
+ */
178
+ protected _heightPickingFramebuffer: any;
179
+ /**
180
+ * Mercator grid tree.
181
+ * @protected
182
+ * @type {og.quadTree.Node}
183
+ */
184
+ protected _quadTree: any;
185
+ /**
186
+ * North grid tree.
187
+ * @protected
188
+ * @type {og.quadTree.Node}
189
+ */
190
+ protected _quadTreeNorth: any;
191
+ /**
192
+ * South grid tree.
193
+ * @protected
194
+ * @type {og.quadTree.Node}
195
+ */
196
+ protected _quadTreeSouth: any;
197
+ /**
198
+ * Night glowing gl texture.
199
+ * @protected
200
+ */
201
+ protected _nightTexture: any;
202
+ /**
203
+ * Specular mask gl texture.
204
+ * @protected
205
+ */
206
+ protected _specularTexture: any;
207
+ /**
208
+ * True for rendering night glowing texture.
209
+ * @protected
210
+ * @type {boolean}
211
+ */
212
+ protected _useNightTexture: boolean;
213
+ /**
214
+ * True for rendering specular mask texture.
215
+ * @protected
216
+ * @type {boolean}
217
+ */
218
+ protected _useSpecularTexture: boolean;
219
+ _maxGridSize: number;
220
+ /**
221
+ * Segment multiple textures size.(4 - convinient value for the most devices)
222
+ * @const
223
+ * @public
224
+ */
225
+ public SLICE_SIZE: number;
226
+ SLICE_SIZE_4: number;
227
+ SLICE_SIZE_3: number;
228
+ /**
229
+ * Level of the visible segment detalization.
230
+ * @public
231
+ * @type {number}
232
+ */
233
+ public _lodRatio: number;
234
+ _maxLodRatio: number;
235
+ _minLodRatio: number;
236
+ _diffuseMaterialArr: Float32Array;
237
+ _ambientMaterialArr: Float32Array;
238
+ _specularMaterialArr: Float32Array;
239
+ _tileOffsetArr: Float32Array;
240
+ _visibleExtentOffsetArr: Float32Array;
241
+ _transparentColorArr: Float32Array;
242
+ _pickingColorArr: Float32Array;
243
+ _samplerArr: Int32Array;
244
+ _pickingMaskArr: Int32Array;
245
+ /**
246
+ * GeoImage creator.
247
+ * @protected
248
+ * @type{og.utils.GeoImageCreator}
249
+ */
250
+ protected _geoImageCreator: any;
251
+ _vectorTileCreator: VectorTileCreator;
252
+ _normalMapCreator: NormalMapCreator;
253
+ _terrainWorker: TerrainWorker;
254
+ _plainSegmentWorker: PlainSegmentWorker;
255
+ _tileLoader: Loader;
256
+ _memKey: Key;
257
+ _distBeforeMemClear: number;
258
+ _prevCamEye: Vec3;
259
+ _initialized: boolean;
260
+ always: any[];
261
+ _renderCompleted: boolean;
262
+ /**
263
+ * Add the given control to the renderer of the planet scene.
264
+ * @param {og.control.Control} control - Control.
265
+ */
266
+ addControl(control: any): void;
267
+ setRatioLod(maxLod: any, minLod: any): void;
268
+ /**
269
+ * Add the given controls array to the renderer of the planet.
270
+ * @param {Array.<og.control.Control>} cArr - Control array.
271
+ */
272
+ addControls(cArr: Array<any>): void;
273
+ /**
274
+ * Return layer by it name
275
+ * @param {string} name - Name of the layer. og.Layer.prototype.name
276
+ * @public
277
+ * @returns {og.Layer} -
278
+ */
279
+ public getLayerByName(name: string): any;
280
+ /**
281
+ * Adds the given layer to the planet.
282
+ * @param {og.Layer} layer - Layer object.
283
+ * @public
284
+ */
285
+ public addLayer(layer: any): void;
286
+ /**
287
+ * Dispatch layer visibility changing event.
288
+ * @param {og.Layer} layer - Changed layer.
289
+ * @protected
290
+ */
291
+ protected _onLayerVisibilityChanged(layer: any): void;
292
+ /**
293
+ * Adds the given layers array to the planet.
294
+ * @param {Array.<og.Layer>} layers - Layers array.
295
+ * @public
296
+ */
297
+ public addLayers(layers: Array<any>): void;
298
+ /**
299
+ * 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
+ * @public
303
+ */
304
+ public removeLayer(layer: any): any | undefined;
305
+ /**
306
+ *
307
+ * @protected
308
+ * @param {og.Layer} layer - Material layer.
309
+ */
310
+ protected _clearLayerMaterial(layer: any): void;
311
+ /**
312
+ * Get the collection of layers associated with this planet.
313
+ * @return {Array.<og.Layer>} Layers array.
314
+ * @public
315
+ */
316
+ public getLayers(): Array<any>;
317
+ /**
318
+ * Sets base layer coverage to the planet.
319
+ * @param {og.Layer} layer - Layer object.
320
+ * @public
321
+ */
322
+ public setBaseLayer(layer: any): void;
323
+ /**
324
+ * Sets elevation scale. 1.0 is default.
325
+ * @param {number} factor - Elevation scale.
326
+ */
327
+ setHeightFactor(factor: number): void;
328
+ /**
329
+ * Gets elevation scale.
330
+ * @returns {number} Terrain elevation scale
331
+ */
332
+ getHeightFactor(): number;
333
+ /**
334
+ * Sets terrain provider
335
+ * @public
336
+ * @param {og.terrain.Terrain} terrain - Terrain provider.
337
+ */
338
+ public setTerrain(terrain: any): void;
339
+ /**
340
+ * @virtual
341
+ * @protected
342
+ */
343
+ protected _initializeShaders(): void;
344
+ /**
345
+ * @virtual
346
+ * @public
347
+ */
348
+ public init(): void;
349
+ _renderCompletedActivated: boolean;
350
+ drawMode: any;
351
+ clearIndexesCache(): void;
352
+ _preRender(): void;
353
+ /**
354
+ * Creates default textures first for nirth pole and whole globe and second for south pole.
355
+ * @public
356
+ * @param{Object} param0 -
357
+ * @param{Object} param1 -
358
+ */
359
+ public createDefaultTextures(param0: any, param1: any): void;
360
+ /**
361
+ * Updates attribution lists
362
+ * @public
363
+ */
364
+ public updateAttributionsList(): void;
365
+ /**
366
+ * Updates visible layers.
367
+ * @public
368
+ */
369
+ public updateVisibleLayers(): void;
370
+ /**
371
+ * Sort visible layer - preparing for rendering.
372
+ * @protected
373
+ */
374
+ protected _sortLayers(): void;
375
+ _clearRenderedNodeList(): void;
376
+ /**
377
+ * Collects visible quad nodes.
378
+ * @protected
379
+ */
380
+ protected _collectRenderNodes(): void;
381
+ _nodeCounterError_: number;
382
+ _globalPreDraw(): void;
383
+ /**
384
+ * Render node callback.
385
+ * @public
386
+ */
387
+ public frame(): void;
388
+ _checkRendercompleted(): void;
389
+ /**
390
+ * @protected
391
+ */
392
+ protected _renderScreenNodesPASS(): void;
393
+ /**
394
+ * @protected
395
+ */
396
+ protected _renderHeightPickingFramebufferPASS(): void;
397
+ /**
398
+ * @protected
399
+ */
400
+ protected _renderColorPickingFramebufferPASS(): void;
401
+ /**
402
+ * @protected
403
+ */
404
+ protected _renderDepthFramebufferPASS(): void;
405
+ _collectVectorLayerCollections(): void;
406
+ /**
407
+ * Vector layers picking pass.
408
+ * @protected
409
+ */
410
+ protected _frustumEntityCollectionPickingCallback(): void;
411
+ /**
412
+ * Starts clear memory thread.
413
+ * @public
414
+ */
415
+ public memClear(): void;
416
+ /**
417
+ * Returns ray vector hit ellipsoid coordinates.
418
+ * If the ray doesn't hit ellipsoit returns null.
419
+ * @public
420
+ * @param {og.Ray} ray - Ray 3d.
421
+ * @returns {og.Vec3} -
422
+ */
423
+ public getRayIntersectionEllipsoid(ray: any): any;
424
+ /**
425
+ * Returns 2d screen coordanates projection point to the planet ellipsoid 3d coordinates.
426
+ * @public
427
+ * @param {og.math.Pixel} px - 2D sreen coordinates.
428
+ * @returns {og.Vec3} -
429
+ */
430
+ public getCartesianFromPixelEllipsoid(px: any): any;
431
+ /**
432
+ * Returns 2d screen coordanates projection point to the planet ellipsoid geographical coordinates.
433
+ * @public
434
+ * @param {og.math.Pixel} px - 2D screen coordinates.
435
+ * @returns {og.LonLat} -
436
+ */
437
+ public getLonLatFromPixelEllipsoid(px: any): any;
438
+ /**
439
+ * Returns 3d cartesian coordinates on the relief planet by mouse cursor
440
+ * position or null if mouse cursor is outside the planet.
441
+ * @public
442
+ * @param {Boolean} [force=false] - Force framebuffer rendering.
443
+ * @returns {og.Vec3} -
444
+ */
445
+ public getCartesianFromMouseTerrain(force?: boolean): any;
446
+ /**
447
+ * Returns 3d cartesian coordinates on the relief planet by 2d screen coordinates.
448
+ * position or null if input coordinates is outside the planet.
449
+ * @public
450
+ * @param {og.Vec2} px - Pixel screen 2d coordinates.
451
+ * @param {Boolean} [force=false] - Force framebuffer rendering.
452
+ * @returns {og.Vec3} -
453
+ */
454
+ public getCartesianFromPixelTerrain(px: any, force?: boolean): any;
455
+ /**
456
+ * Returns geographical coordinates on the relief planet by 2d screen coordinates.
457
+ * position or null if input coordinates is outside the planet.
458
+ * @public
459
+ * @param {og.Vec2} px - Pixel screen 2d coordinates.
460
+ * @param {Boolean} [force=false] - Force framebuffer rendering.
461
+ * @returns {og.LonLat} -
462
+ */
463
+ public getLonLatFromPixelTerrain(px: any, force?: boolean): any;
464
+ /**
465
+ * Returns projected 2d screen coordinates by 3d cartesian coordiantes.
466
+ * @public
467
+ * @param {og.Vec3} coords - Cartesian coordinates.
468
+ * @returns {og.Vec2} -
469
+ */
470
+ public getPixelFromCartesian(coords: any): any;
471
+ /**
472
+ * Returns projected 2d screen coordinates by geographical coordinates.
473
+ * @public
474
+ * @param {og.LonLat} lonlat - Geographical coordinates.
475
+ * @returns {og.Vec2} -
476
+ */
477
+ public getPixelFromLonLat(lonlat: any): any;
478
+ /**
479
+ * Returns distance from active camera to the the planet ellipsoid
480
+ * coordiantes unprojected by 2d screen coordiantes, or null if screen coordinates outside the planet.
481
+ * @public
482
+ * @param {og.Vec2} px - Screen coordinates.
483
+ * @returns {number} -
484
+ */
485
+ public getDistanceFromPixelEllipsoid(px: any): number;
486
+ /**
487
+ * Returns distance from active camera to the the relief planet coordiantes unprojected
488
+ * by 2d screen coordiantes, or null if screen coordinates outside the planet.
489
+ * If screen coordinates inside the planet but relief is not exists in the
490
+ * point than function returns distance to the planet ellipsoid.
491
+ * @public
492
+ * @param {og.Vec2} px - Screen coordinates.
493
+ * @param {Boolean} [force=false] - Force framebuffer rendering.
494
+ * @returns {number} -
495
+ */
496
+ public getDistanceFromPixel(px: any): number;
497
+ /**
498
+ * Sets camera to the planet geographical extent.
499
+ * @public
500
+ * @param {og.Extent} extent - Geographical extent.
501
+ */
502
+ public viewExtent(extent: any): void;
503
+ /**
504
+ * Sets camera to the planet geographical extent.
505
+ * @public
506
+ * @param {Array.<number,number,number,number>} extentArr - Geographical extent array,
507
+ * where index 0 - southwest longitude, 1 - latitude southwest, 2 - longitude northeast, 3 - latitude northeast.
508
+ */
509
+ public viewExtentArr(extentArr: Array<number, number, number, number>): void;
510
+ /**
511
+ * Gets current viewing geographical extent.
512
+ * @public
513
+ * @returns {og.Extent} -
514
+ */
515
+ public getViewExtent(): any;
516
+ /**
517
+ * Sets camera to the planet geographical position.
518
+ * @public
519
+ * @param {og.LonLat} lonlat - New geographical position.
520
+ * @param {og.Vec3} [up] - Camera UP vector.
521
+ */
522
+ public viewLonLat(lonlat: any, up?: any): void;
523
+ /**
524
+ * Fly camera to the planet geographical extent.
525
+ * @public
526
+ * @param {og.Extent} extent - Geographical extent.
527
+ * @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 {Number} [ampl] - Altitude amplitude factor.
530
+ * @param {cameraCallback} [startCallback] - Callback that calls after flying when flying is finished.
531
+ * @param {cameraCallback} [completeCallback] - Callback that calls befor the flying begins.
532
+ */
533
+ public flyExtent(extent: any, height?: number, up?: any, ampl?: number, completeCallback?: any, startCallback?: any): void;
534
+ /**
535
+ * Fly camera to the new point.
536
+ * @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.
540
+ * @param {Number} [ampl] - Altitude amplitude factor.
541
+ * @param [completeCallback]
542
+ * @param [startCallback]
543
+ * @param [frameCallback]
544
+ */
545
+ public flyCartesian(cartesian: any, look?: any, up?: any, ampl?: number, completeCallback?: any, startCallback?: any, frameCallback?: any): void;
546
+ /**
547
+ * Fly camera to the new geographical position.
548
+ * @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.
552
+ * @param {Number} [ampl] - Altitude amplitude factor.
553
+ * @param [completeCallback]
554
+ * @param [startCallback]
555
+ * @param [frameCallback]
556
+ */
557
+ public flyLonLat(lonlat: any, look?: any, up?: any, ampl?: number, completeCallback?: any, startCallback?: any, frameCallback?: any): void;
558
+ /**
559
+ * Breaks the flight.
560
+ * @public
561
+ */
562
+ public stopFlying(): void;
563
+ updateBillboardsTexCoords(): void;
564
+ getEntityTerrainPoint(entity: any, res: any): any;
565
+ }
566
+ import { VectorTileCreator } from "../utils/VectorTileCreator.js";
567
+ import { NormalMapCreator } from "../utils/NormalMapCreator.js";
568
+ import { TerrainWorker } from "../utils/TerrainWorker.js";
569
+ import { PlainSegmentWorker } from "../utils/PlainSegmentWorker.js";
570
+ import { Loader } from "../utils/Loader.js";
571
+ import { Key } from "../Lock.js";
572
+ import { Vec3 } from "../math/index.js";
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Render node is a logical part of a render mechanism. Represents scene rendering.
3
+ * Forexample one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc.
4
+ * Each render node has own model view space defined with matrices(scale, rotation, translation, transformation).
5
+ * There are collections of ligh sources, entities and so on in the node.
6
+ * Access to the node is renderer.renderNodes["Earth"]
7
+ * @class
8
+ * @extends {og.RenderNode}
9
+ * @param {string} name - Node name.
10
+ */
11
+ export class RenderNode {
12
+ constructor(name: any);
13
+ /**
14
+ * Renderer that calls frame() callback.
15
+ * @public
16
+ * @type {og.Renderer}
17
+ */
18
+ public renderer: any;
19
+ drawMode: number;
20
+ /** Show rendering.
21
+ * @public
22
+ */
23
+ public show: boolean;
24
+ _isActive: boolean;
25
+ /**
26
+ * Lighting calculations.
27
+ * @public
28
+ * @type {boolean}
29
+ */
30
+ public lightEnabled: boolean;
31
+ /**
32
+ * Point light array.
33
+ * @private
34
+ * @type {Array.<og.LightSource>}
35
+ */
36
+ private _lights;
37
+ _lightsTransformedPositions: any[];
38
+ _lightsParamsv: any[];
39
+ _lightsParamsf: any[];
40
+ _lightsNames: any[];
41
+ /**
42
+ * Entity collection array.
43
+ * @public
44
+ * @type {Array.<og.EntityCollection>}
45
+ */
46
+ public entityCollections: Array<any>;
47
+ _pickingId: number;
48
+ events: Events;
49
+ /**
50
+ * Adds node to the current hierarchy.
51
+ * @public
52
+ * @type {og.RenderNode}
53
+ */
54
+ public addNode(node: any): void;
55
+ /**
56
+ * Assign render node with renderer.
57
+ * @public
58
+ * @param {og.Renderer} renderer - Redner node's renderer.
59
+ */
60
+ public assign(renderer: any): void;
61
+ onremove(): void;
62
+ remove(): void;
63
+ /**
64
+ * Adds entity collection.
65
+ * @public
66
+ * @param {og.EntityCollection} entityCollection - Entity collection.
67
+ * @param {boolean} [isHidden] - If it's true that this collection has specific rendering.
68
+ * @returns {og.scene.RenderNode} -
69
+ */
70
+ public addEntityCollection(entityCollection: any, isHidden?: boolean): any;
71
+ /**
72
+ * Removes entity collection.
73
+ * @public
74
+ * @param {og.EntityCollection} entityCollection - Entity collection for remove.
75
+ */
76
+ public removeEntityCollection(entityCollection: any): void;
77
+ /**
78
+ * Adds point light source.
79
+ * @public
80
+ * @param {og.LightSource} light - Light source.
81
+ * @returns {og.scene.RenderNode}
82
+ */
83
+ public addLight(light: any): any;
84
+ /**
85
+ * Gets light object by its name.
86
+ * @public
87
+ * @param {string} name - Point light name.
88
+ * @returns {og.LightSource}
89
+ */
90
+ public getLightByName(name: string): any;
91
+ /**
92
+ * Removes light source.
93
+ * @public
94
+ * @param {og.LightSource} light - Light source object.
95
+ */
96
+ public removeLight(light: any): void;
97
+ /**
98
+ * Calls render frame node's callback. Used in renderer.
99
+ * @public
100
+ */
101
+ public drawNode(frustum: any, frustumIndex: any): void;
102
+ /**
103
+ * Gets render node activity.
104
+ * @public
105
+ * @returns {Boolean} -
106
+ */
107
+ public isActive(): boolean;
108
+ /**
109
+ * Rendering activation.
110
+ * @public
111
+ * @param {boolean} isActive - Activation flag.
112
+ */
113
+ public setActive(isActive: boolean): void;
114
+ /**
115
+ * Sets draw mode
116
+ * @public
117
+ * @param {Number} mode - Draw mode, such as gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.LINES etc.
118
+ */
119
+ public setDrawMode(mode: number): void;
120
+ /**
121
+ * IMPORTANT: This function have to be called manualy in each render node frame callback, before drawing scene geometry.
122
+ * @public
123
+ */
124
+ public transformLights(): void;
125
+ updateBillboardsTexCoords(): void;
126
+ /**
127
+ * @private
128
+ */
129
+ private _drawNodes;
130
+ drawEntityCollections(ec: any): void;
131
+ /**
132
+ * Draw entity collections picking frame.
133
+ * @public
134
+ * @param {Array<og.EntityCollection>} ec - Entity collection array.
135
+ */
136
+ public drawPickingEntityCollections(ec: Array<any>): void;
137
+ /**
138
+ * Picking entity frame callback
139
+ * @private
140
+ */
141
+ private _entityCollectionPickingCallback;
142
+ }
143
+ import { Events } from "../Events.js";