@openglobus/og 0.15.3 → 0.15.4

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 (57) hide show
  1. package/css/og.css +24 -15
  2. package/dist/@openglobus/og.css +1 -1
  3. package/dist/@openglobus/og.esm.js +2 -2
  4. package/dist/@openglobus/og.esm.js.map +1 -1
  5. package/dist/@openglobus/og.umd.js +2 -2
  6. package/dist/@openglobus/og.umd.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/og/Globe.js +4 -0
  9. package/src/og/Object3d.js +1 -1
  10. package/src/og/control/DebugInfo.js +263 -165
  11. package/src/og/control/RulerSwitcher.js +4 -1
  12. package/src/og/control/SimpleNavigation.js +123 -128
  13. package/src/og/control/heightRuler/HeightRuler.js +12 -0
  14. package/src/og/control/heightRuler/HeightRulerScene.js +224 -0
  15. package/src/og/control/heightRuler/HeightRulerSwitcher.js +15 -0
  16. package/src/og/control/index.js +2 -0
  17. package/src/og/control/ruler/RulerScene.js +106 -79
  18. package/src/og/entity/Entity.js +6 -6
  19. package/src/og/entity/EntityCollection.js +4 -0
  20. package/src/og/entity/GeoObjectHandler.js +3 -0
  21. package/src/og/layer/BaseGeoImage.js +152 -16
  22. package/src/og/layer/GeoImage.js +0 -91
  23. package/src/og/layer/GeoTexture2d.js +54 -143
  24. package/src/og/layer/GeoVideo.js +6 -107
  25. package/src/og/layer/Material.js +1 -1
  26. package/src/og/layer/Vector.js +1 -0
  27. package/src/og/renderer/Renderer.js +90 -94
  28. package/src/og/renderer/RendererEvents.js +39 -23
  29. package/src/og/scene/BaseNode.js +113 -113
  30. package/src/og/scene/Planet.js +11 -8
  31. package/src/og/scene/RenderNode.js +42 -9
  32. package/src/og/segment/Segment.js +3 -3
  33. package/src/og/shaders/geoObject.js +12 -10
  34. package/src/og/shaders/pickingMask.js +1 -1
  35. package/src/og/utils/GeoImageCreator.js +61 -21
  36. package/src/og/utils/VectorTileCreator.js +32 -49
  37. package/src/og/webgl/Framebuffer.js +5 -0
  38. package/types/control/DebugInfo.d.ts +4 -0
  39. package/types/control/SimpleNavigation.d.ts +1 -0
  40. package/types/control/heightRuler/HeightRuler.d.ts +6 -0
  41. package/types/control/heightRuler/HeightRulerScene.d.ts +23 -0
  42. package/types/control/index.d.ts +2 -1
  43. package/types/control/ruler/RulerScene.d.ts +8 -5
  44. package/types/control/selection/SelectionScene.d.ts +0 -1
  45. package/types/entity/EntityCollection.d.ts +1 -0
  46. package/types/layer/BaseGeoImage.d.ts +17 -3
  47. package/types/layer/GeoImage.d.ts +0 -8
  48. package/types/layer/GeoTexture2d.d.ts +0 -2
  49. package/types/layer/GeoVideo.d.ts +0 -8
  50. package/types/renderer/Renderer.d.ts +12 -3
  51. package/types/scene/Axes.d.ts +1 -1
  52. package/types/scene/BaseNode.d.ts +2 -2
  53. package/types/scene/Planet.d.ts +0 -5
  54. package/types/scene/RenderNode.d.ts +16 -9
  55. package/types/scene/SkyBox.d.ts +1 -1
  56. package/types/utils/VectorTileCreator.d.ts +1 -3
  57. package/types/webgl/Framebuffer.d.ts +1 -0
@@ -5,23 +5,23 @@
5
5
  'use strict';
6
6
 
7
7
  import { doubleToTwoFloats2 } from '../math/coder.js';
8
- import * as quadTree from '../quadTree/quadTree.js';
8
+ import { RENDERING } from '../quadTree/quadTree.js';
9
9
  import { Framebuffer } from '../webgl/Framebuffer.js';
10
10
  import { Program } from '../webgl/Program.js';
11
11
 
12
12
  let tempArr = new Float32Array(2);
13
13
 
14
+ const MAX_FRAME_TIME = 25.0;
15
+
14
16
  export class VectorTileCreator {
15
17
 
16
- constructor(planet, maxFrames = 5, width = 256, height = 256) {
18
+ constructor(planet, width = 512, height = 512) {
17
19
 
18
20
  this._width = width;
19
21
  this._height = height;
20
22
  this._handler = planet.renderer.handler;
21
23
  this._planet = planet;
22
24
  this._framebuffer = null;
23
- this.MAX_FRAMES = maxFrames;
24
- this._currentFrame = 0;
25
25
  this._queue = [];
26
26
  this._initialize();
27
27
  }
@@ -193,44 +193,38 @@ export class VectorTileCreator {
193
193
 
194
194
  frame() {
195
195
  if (this._planet.layerLock.isFree() && this._queue.length) {
196
- var h = this._handler,
196
+ let h = this._handler,
197
197
  gl = h.gl;
198
198
 
199
199
  gl.disable(gl.CULL_FACE);
200
200
  gl.disable(gl.DEPTH_TEST);
201
201
 
202
- // gl.enable(gl.BLEND);
203
- // gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);
204
- // gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
205
-
206
- var hLine = h.programs.vectorTileLineRasterization,
202
+ let hLine = h.programs.vectorTileLineRasterization,
207
203
  hPoly = h.programs.vectorTilePolygonRasterization;
208
204
 
209
- var _w = this._width,
205
+ let _w = this._width,
210
206
  _h = this._height,
211
207
  width = _w,
212
208
  height = _h,
213
209
  _w2 = width << 1,
214
210
  _h2 = height << 1;
215
211
 
216
- var pickingMask = null,
217
- texture = null;
218
-
219
212
  // var prevLayerId = -1;
220
213
 
221
- var extentParamsHigh = new Float32Array(4);
222
- var extentParamsLow = new Float32Array(4);
214
+ let extentParamsHigh = new Float32Array(4);
215
+ let extentParamsLow = new Float32Array(4);
223
216
 
224
- var f = this._framebuffer.activate();
217
+ let f = this._framebuffer.activate();
225
218
 
226
- var deltaTime = 0,
219
+ let deltaTime = 0,
227
220
  startTime = window.performance.now();
228
221
 
229
- while (this._planet.layerLock.isFree() && this._queue.length && deltaTime < 0.25) {
230
- var material = this._queue.shift();
231
- if (material.isLoading && material.segment.node.getState() === quadTree.RENDERING) {
222
+ while (this._queue.length && deltaTime < MAX_FRAME_TIME) {
223
+ let material = this._queue.shift();
224
+ if (material.isLoading && material.segment.node.getState() === RENDERING) {
225
+ let pickingEnabled = material.layer._pickingEnabled;
232
226
 
233
- if (material.segment.tileZoom <= 3) {
227
+ if (material.segment.tileZoom < 4) {
234
228
  width = _w2;
235
229
  height = _h2;
236
230
  } else {
@@ -238,7 +232,10 @@ export class VectorTileCreator {
238
232
  height = _h;
239
233
  }
240
234
 
241
- texture = material._updateTexture || h.createEmptyTexture_l(width, height);
235
+ let texture = material._updateTexture || h.createEmptyTexture_l(width, height);
236
+ let pickingMask = pickingEnabled ? material._updatePickingMask || h.createEmptyTexture_n(width, height) : null;
237
+
238
+ material.applyTexture(texture, pickingMask);
242
239
 
243
240
  f.setSize(width, height);
244
241
 
@@ -247,7 +244,7 @@ export class VectorTileCreator {
247
244
  gl.clearColor(0.0, 0.0, 0.0, 0.0);
248
245
  gl.clear(gl.COLOR_BUFFER_BIT);
249
246
 
250
- var extent = material.segment.getExtentMerc();
247
+ let extent = material.segment.getExtentMerc();
251
248
 
252
249
  doubleToTwoFloats2(extent.southWest.lon, tempArr);
253
250
  extentParamsHigh[0] = tempArr[0];
@@ -261,11 +258,11 @@ export class VectorTileCreator {
261
258
  extentParamsHigh[3] = 2.0 / extent.getHeight();
262
259
 
263
260
  hPoly.activate();
264
- var sh = hPoly._program;
265
- var sha = sh.attributes,
261
+ let sh = hPoly._program;
262
+ let sha = sh.attributes,
266
263
  shu = sh.uniforms;
267
264
 
268
- var geomHandler = material.layer._geometryHandler;
265
+ let geomHandler = material.layer._geometryHandler;
269
266
 
270
267
  //=========================================
271
268
  //Polygon rendering
@@ -287,26 +284,16 @@ export class VectorTileCreator {
287
284
  gl.drawElements(gl.TRIANGLES, geomHandler._polyIndexesBuffer.numItems, gl.UNSIGNED_INT, 0);
288
285
 
289
286
  //Polygon picking PASS
290
- if (material.layer._pickingEnabled) {
291
- if (!material.pickingReady) {
292
- if (material._updatePickingMask) {
293
- pickingMask = material._updatePickingMask;
294
- } else {
295
- pickingMask = h.createEmptyTexture_n(width, height);
296
- }
297
-
298
- f.bindOutputTexture(pickingMask);
287
+ if (pickingEnabled) {
288
+ f.bindOutputTexture(pickingMask);
299
289
 
300
- gl.clearColor(0.0, 0.0, 0.0, 0.0);
301
- gl.clear(gl.COLOR_BUFFER_BIT);
290
+ gl.clearColor(0.0, 0.0, 0.0, 0.0);
291
+ gl.clear(gl.COLOR_BUFFER_BIT);
302
292
 
303
- gl.bindBuffer(gl.ARRAY_BUFFER, geomHandler._polyPickingColorsBuffer);
304
- gl.vertexAttribPointer(sha.colors, geomHandler._polyPickingColorsBuffer.itemSize, gl.FLOAT, false, 0, 0);
293
+ gl.bindBuffer(gl.ARRAY_BUFFER, geomHandler._polyPickingColorsBuffer);
294
+ gl.vertexAttribPointer(sha.colors, geomHandler._polyPickingColorsBuffer.itemSize, gl.FLOAT, false, 0, 0);
305
295
 
306
- gl.drawElements(gl.TRIANGLES, geomHandler._polyIndexesBuffer.numItems, gl.UNSIGNED_INT, 0);
307
- } else {
308
- pickingMask = material.pickingMask;
309
- }
296
+ gl.drawElements(gl.TRIANGLES, geomHandler._polyIndexesBuffer.numItems, gl.UNSIGNED_INT, 0);
310
297
  }
311
298
 
312
299
  //=========================================
@@ -379,22 +366,18 @@ export class VectorTileCreator {
379
366
  gl.uniform1f(shu.alpha, 1.0);
380
367
  gl.drawElements(gl.TRIANGLE_STRIP, geomHandler._lineIndexesBuffer.numItems, gl.UNSIGNED_INT, 0);
381
368
 
382
- if (material.layer._pickingEnabled && !material.pickingReady) {
369
+ if (pickingEnabled) {
383
370
  f.bindOutputTexture(pickingMask);
384
371
  gl.uniform1f(shu.thicknessOutline, 8);
385
372
  gl.bindBuffer(gl.ARRAY_BUFFER, geomHandler._linePickingColorsBuffer);
386
373
  gl.vertexAttribPointer(sha.color, geomHandler._linePickingColorsBuffer.itemSize, gl.FLOAT, false, 0, 0);
387
374
  gl.drawElements(gl.TRIANGLE_STRIP, geomHandler._lineIndexesBuffer.numItems, gl.UNSIGNED_INT, 0);
388
375
  }
389
-
390
- material.applyTexture(texture, pickingMask);
391
-
392
376
  } else {
393
377
  material.isLoading = false;
394
378
  }
395
379
 
396
380
  deltaTime = window.performance.now() - startTime;
397
- // prevLayerId = material.layer._id;
398
381
  }
399
382
 
400
383
  gl.enable(gl.DEPTH_TEST);
@@ -214,6 +214,11 @@ export class Framebuffer {
214
214
  }
215
215
  }
216
216
 
217
+ checkStatus() {
218
+ let gl = this.handler.gl;
219
+ return gl.checkFramebufferStatus(gl.FRAMEBUFFER);
220
+ }
221
+
217
222
  /**
218
223
  * Returns framebuffer completed.
219
224
  * @public
@@ -8,8 +8,12 @@ export function debugInfo(options: any): DebugInfo;
8
8
  export class DebugInfo extends Control {
9
9
  el: HTMLDivElement;
10
10
  _watch: any;
11
+ _toggleBtn: ToggleButton;
12
+ _dialog: Dialog;
11
13
  addWatches(watches: any): void;
12
14
  addWatch(watch: any): void;
13
15
  _frame(): void;
14
16
  }
15
17
  import { Control } from "./Control.js";
18
+ import { ToggleButton } from "../ui/ToggleButton.js";
19
+ import { Dialog } from "../ui/Dialog.js";
@@ -9,6 +9,7 @@ export function simpleNavigation(options: any): SimpleNavigation;
9
9
  * @param {Object} [options] - Control options.
10
10
  */
11
11
  export class SimpleNavigation extends Control {
12
+ constructor(options?: {});
12
13
  camera: any;
13
14
  speed: any;
14
15
  onCameraMoveForward(): void;
@@ -0,0 +1,6 @@
1
+ export class HeightRuler extends Ruler {
2
+ constructor(options: any);
3
+ _rulerScene: HeightRulerScene;
4
+ }
5
+ import { Ruler } from "../ruler/Ruler.js";
6
+ import { HeightRulerScene } from "./HeightRulerScene.js";
@@ -0,0 +1,23 @@
1
+ export class HeightRulerScene extends RulerScene {
2
+ _geoRulerLayer: Vector;
3
+ get deltaLabel(): Entity;
4
+ get startLabel(): Entity;
5
+ get endLabel(): Entity;
6
+ get corners(): Entity[];
7
+ get startCorner(): Entity;
8
+ get endCorner(): Entity;
9
+ get startCornerLonLat(): import("../../LonLat.js").LonLat;
10
+ get startCornerHeight(): number;
11
+ get endCornerLonLat(): import("../../LonLat.js").LonLat;
12
+ get endCornerHeight(): number;
13
+ get maxHeightCornerLonLat(): import("../../LonLat.js").LonLat;
14
+ get minHeightCornerLonLat(): import("../../LonLat.js").LonLat;
15
+ get deltaHeight(): number;
16
+ _updateHeightRaysAndLabels(): Promise<void>;
17
+ _rayH: Entity;
18
+ _rayV: Entity;
19
+ _heightLabels: Entity[];
20
+ }
21
+ import { RulerScene } from "../ruler/RulerScene.js";
22
+ import { Vector } from "../../layer/Vector.js";
23
+ import { Entity } from "../../entity/Entity.js";
@@ -17,7 +17,8 @@ import { ZoomControl } from "./ZoomControl.js";
17
17
  import { MouseWheelZoomControl } from "./MouseWheelZoomControl.js";
18
18
  import { Lighting } from "./Lighting.js";
19
19
  import { Ruler } from "./ruler/Ruler.js";
20
+ import { HeightRuler } from "./heightRuler/HeightRuler.js";
20
21
  import { SimpleSkyBackground } from "./SimpleSkyBackground.js";
21
22
  import { Selection } from "./selection/Selection.js";
22
23
  import { LayerAnimation } from "./LayerAnimation.js";
23
- export { Control, CompassButton, DebugInfo, EarthNavigation, EarthCoordinates, GeoImageDragControl, KeyboardNavigation, LayerSwitcher, MouseNavigation, ToggleWireframe, TouchNavigation, SimpleNavigation, ShowFps, ScaleControl, Sun, ZoomControl, MouseWheelZoomControl, Lighting, Ruler, SimpleSkyBackground, Selection, LayerAnimation };
24
+ export { Control, CompassButton, DebugInfo, EarthNavigation, EarthCoordinates, GeoImageDragControl, KeyboardNavigation, LayerSwitcher, MouseNavigation, ToggleWireframe, TouchNavigation, SimpleNavigation, ShowFps, ScaleControl, Sun, ZoomControl, MouseWheelZoomControl, Lighting, Ruler, HeightRuler, SimpleSkyBackground, Selection, LayerAnimation };
@@ -1,3 +1,4 @@
1
+ export function distanceFormat(v: any): string;
1
2
  export class RulerScene extends RenderNode {
2
3
  constructor(options?: {});
3
4
  _ignoreTerrain: any;
@@ -9,14 +10,16 @@ export class RulerScene extends RenderNode {
9
10
  _startPos: any;
10
11
  _startClick: Vec2;
11
12
  _heading: number;
12
- _propsLabel: Entity;
13
- _trackEntity: Entity;
14
- _cornerEntity: Entity[];
15
13
  _trackLayer: Vector;
14
+ _labelLayer: Vector;
16
15
  _cornersLayer: Vector;
17
16
  set ignoreTerrain(arg: any);
18
17
  bindPlanet(planet: any): void;
18
+ _createCorners(): void;
19
+ _cornerEntity: Entity[];
19
20
  init(): void;
21
+ _propsLabel: Entity;
22
+ _trackEntity: Entity;
20
23
  _activate(): void;
21
24
  _onLclick_: any;
22
25
  _onMouseMove_: any;
@@ -39,10 +42,10 @@ export class RulerScene extends RenderNode {
39
42
  _drawLine(startLonLat: any, endLonLat: any, startPos: any): void;
40
43
  _onMouseMove(e: any): void;
41
44
  clear(): void;
42
- frame(): void;
45
+ isCornersPositionChanged(): boolean;
43
46
  get ellipsoid(): any;
44
47
  }
45
48
  import { RenderNode } from "../../scene/RenderNode.js";
46
49
  import { Vec2 } from "../../math/Vec2.js";
47
- import { Entity } from "../../entity/Entity.js";
48
50
  import { Vector } from "../../layer/Vector.js";
51
+ import { Entity } from "../../entity/Entity.js";
@@ -26,7 +26,6 @@ export class SelectionScene extends RenderNode {
26
26
  _drawLine(startLonLat: any, endLonLat: any, startPos: any): void;
27
27
  _onMouseMove(e: any): void;
28
28
  clear(): void;
29
- frame(): void;
30
29
  get ellipsoid(): any;
31
30
  }
32
31
  import { RenderNode } from "../../scene/RenderNode.js";
@@ -194,6 +194,7 @@ export class EntityCollection {
194
194
  * @param {number} [farInvisible] - Entity visibility distance.
195
195
  */
196
196
  public setScaleByDistance(near: number, far: number, farInvisible?: number): void;
197
+ appendChildEntity(entity: any): void;
197
198
  _addRecursively(entity: any): void;
198
199
  /**
199
200
  * Adds entity to the collection and returns collection.
@@ -12,7 +12,12 @@ export class BaseGeoImage extends Layer {
12
12
  _sourceTexture: any;
13
13
  _materialTexture: any;
14
14
  _gridBuffer: any;
15
- _extentWgs84Params: number[];
15
+ _extentWgs84Params: any;
16
+ _extentWgs84ParamsHigh: Float32Array;
17
+ _extentWgs84ParamsLow: Float32Array;
18
+ _extentMercParams: any;
19
+ _extentMercParamsHigh: Float32Array;
20
+ _extentMercParamsLow: Float32Array;
16
21
  _refreshFrame: boolean;
17
22
  _frameCreated: boolean;
18
23
  _sourceCreated: boolean;
@@ -26,7 +31,7 @@ export class BaseGeoImage extends Layer {
26
31
  /**
27
32
  * rendering function pointer
28
33
  */
29
- rendering: any;
34
+ rendering: (() => void) | (() => void);
30
35
  get isIdle(): boolean;
31
36
  addTo(planet: any): BaseGeoImage;
32
37
  _onLoadend_: any;
@@ -65,7 +70,8 @@ export class BaseGeoImage extends Layer {
65
70
  */
66
71
  protected _createFrame(): void;
67
72
  _cornersMerc: any[];
68
- _extentMercParams: number[];
73
+ _gridBufferHigh: any;
74
+ _gridBufferLow: any;
69
75
  /**
70
76
  * @virtual
71
77
  * @param {Material} material - GeoImage material.
@@ -96,6 +102,14 @@ export class BaseGeoImage extends Layer {
96
102
  * @returns {Number} Frame height.
97
103
  */
98
104
  public get getFrameHeight(): number;
105
+ /**
106
+ * Method depends on GeoImage instance
107
+ * @virtual
108
+ * @private
109
+ */
110
+ private _createSourceTexture;
111
+ _renderingProjType1(): void;
112
+ _renderingProjType0(): void;
99
113
  }
100
114
  import { Layer } from "./Layer.js";
101
115
  import { Extent } from "../Extent.js";
@@ -29,12 +29,6 @@ export class GeoImage extends BaseGeoImage {
29
29
  * @param {Image} image - Image object.
30
30
  */
31
31
  public setImage(image: new (width?: number, height?: number) => HTMLImageElement): void;
32
- /**
33
- * Creates source gl texture.
34
- * @virtual
35
- * @protected
36
- */
37
- protected _createSourceTexture(): void;
38
32
  /**
39
33
  * @private
40
34
  * @param {Image} img
@@ -47,7 +41,5 @@ export class GeoImage extends BaseGeoImage {
47
41
  * @param {Material} material - GeoImage planet material.
48
42
  */
49
43
  public loadMaterial(material: Material): void;
50
- _renderingProjType1(): void;
51
- _renderingProjType0(): void;
52
44
  }
53
45
  import { BaseGeoImage } from "./BaseGeoImage.js";
@@ -3,7 +3,5 @@ export class GeoTexture2d extends BaseGeoImage {
3
3
  bindTexture(texture: any): void;
4
4
  setSize(width: any, height: any): void;
5
5
  abortMaterialLoading(material: any): void;
6
- _renderingProjType1(): void;
7
- _renderingProjType0(): void;
8
6
  }
9
7
  import { BaseGeoImage } from "./BaseGeoImage.js";
@@ -28,12 +28,6 @@ export class GeoVideo extends BaseGeoImage {
28
28
  * @param {Object} video - HTML5 video element object.
29
29
  */
30
30
  public setVideoElement(video: any): void;
31
- /**
32
- * Creates or refresh source video GL texture.
33
- * @virtual
34
- * @protected
35
- */
36
- protected _createSourceTexture(): void;
37
31
  /**
38
32
  * @private
39
33
  */
@@ -49,7 +43,5 @@ export class GeoVideo extends BaseGeoImage {
49
43
  * @param {Material} material - GeoImage planet material.
50
44
  */
51
45
  public loadMaterial(material: Material): void;
52
- _renderingProjType1(): void;
53
- _renderingProjType0(): void;
54
46
  }
55
47
  import { BaseGeoImage } from "./BaseGeoImage.js";
@@ -1,5 +1,5 @@
1
1
  export class Renderer {
2
- constructor(handler: any, params: any);
2
+ constructor(handler: any, params?: {});
3
3
  /**
4
4
  * Div element with WebGL canvas. Assigned in Globe class.
5
5
  * @public
@@ -138,7 +138,9 @@ export class Renderer {
138
138
  * @param {Number} id - Handler id to remove.
139
139
  */
140
140
  removePickingCallback(id: number): void;
141
- getPickingObjectByColor(r: any, g: any, b: any): any;
141
+ getPickingObject(r: any, g: any, b: any): any;
142
+ getPickingObjectArr(arr: any): any;
143
+ getPickingObject3v(vec: any): any;
142
144
  /**
143
145
  * Assign picking color to the object.
144
146
  * @public
@@ -240,7 +242,14 @@ export class Renderer {
240
242
  * @public
241
243
  * @param {Array<og.EntityCollection>} ec - Entity collection array.
242
244
  */
243
- public _drawEntityCollections(): void;
245
+ public _drawOpaqueEntityCollections(): void;
246
+ /**
247
+ * Draws entity collections.
248
+ * @public
249
+ * @param {Array<og.EntityCollection>} ec - Entity collection array.
250
+ */
251
+ public _drawTransparentEntityCollections(): void;
252
+ _clearEntityCollectionQueue(): void;
244
253
  /**
245
254
  * Draw nodes.
246
255
  * @public
@@ -1,9 +1,9 @@
1
1
  export class Axes extends RenderNode {
2
+ constructor(size: any);
2
3
  size: any;
3
4
  axesBuffer: any;
4
5
  axesColorBuffer: any;
5
6
  init(): void;
6
- frame(): void;
7
7
  createAxisBuffer(gridSize: any): void;
8
8
  axisBuffer: any;
9
9
  axisColorBuffer: any;
@@ -16,9 +16,9 @@ export class BaseNode {
16
16
  /**
17
17
  * Top scene tree node pointer.
18
18
  * @public
19
- * @type {RenderNode}
19
+ * @type {BaseNode}
20
20
  */
21
- public topNode: RenderNode;
21
+ public topNode: BaseNode;
22
22
  _dictionary: BaseNode[];
23
23
  /**
24
24
  * Children nodes.
@@ -398,11 +398,6 @@ export class Planet extends RenderNode {
398
398
  */
399
399
  protected _collectRenderNodes(): void;
400
400
  _globalPreDraw(): void;
401
- /**
402
- * Render node callback.
403
- * @public
404
- */
405
- public frame(): void;
406
401
  _checkRendercompleted(): void;
407
402
  lockQuadTree(): void;
408
403
  unlockQuadTree(): void;
@@ -1,14 +1,15 @@
1
1
  /**
2
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.
3
+ * For example one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc.
4
4
  * Each render node has own model view space defined with matrices(scale, rotation, translation, transformation).
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 {RenderNode}
8
+ * @extends {BaseNode}
9
9
  * @param {string} name - Node name.
10
10
  */
11
- export class RenderNode {
11
+ export class RenderNode extends BaseNode {
12
+ constructor(name?: string);
12
13
  /**
13
14
  * Renderer that calls frame() callback.
14
15
  * @public
@@ -45,12 +46,6 @@ export class RenderNode {
45
46
  public entityCollections: Array<EntityCollection>;
46
47
  _pickingId: number;
47
48
  events: Events;
48
- /**
49
- * Adds node to the current hierarchy.
50
- * @public
51
- * @type {RenderNode}
52
- */
53
- public addNode(node: any): void;
54
49
  /**
55
50
  * Assign render node with renderer.
56
51
  * @public
@@ -93,6 +88,11 @@ export class RenderNode {
93
88
  * @param {LightSource} light - Light source object.
94
89
  */
95
90
  public removeLight(light: LightSource): void;
91
+ /**
92
+ * Calls render frame node's callback. Used in renderer.
93
+ * @public
94
+ */
95
+ public preDrawNode(frustum: any, frustumIndex: any): void;
96
96
  /**
97
97
  * Calls render frame node's callback. Used in renderer.
98
98
  * @public
@@ -123,6 +123,12 @@ export class RenderNode {
123
123
  public transformLights(): void;
124
124
  updateBillboardsTexCoords(): void;
125
125
  updateGeoObjectsTexCoords(): void;
126
+ frame(): void;
127
+ preFrame(): void;
128
+ /**
129
+ * @private
130
+ */
131
+ private _preDrawNodes;
126
132
  /**
127
133
  * @private
128
134
  */
@@ -140,4 +146,5 @@ export class RenderNode {
140
146
  */
141
147
  private _entityCollectionPickingCallback;
142
148
  }
149
+ import { BaseNode } from "./BaseNode.js";
143
150
  import { Events } from "../Events.js";
@@ -1,10 +1,10 @@
1
1
  export class SkyBox extends RenderNode {
2
2
  static createDefault(RESOURCES_URL: any): SkyBox;
3
+ constructor(params: any);
3
4
  params: any;
4
5
  vertexPositionBuffer: any;
5
6
  texture: any;
6
7
  init(): void;
7
- frame(): void;
8
8
  _createBuffers(): void;
9
9
  }
10
10
  import { RenderNode } from "./RenderNode.js";
@@ -1,12 +1,10 @@
1
1
  export class VectorTileCreator {
2
- constructor(planet: any, maxFrames?: number, width?: number, height?: number);
2
+ constructor(planet: any, width?: number, height?: number);
3
3
  _width: number;
4
4
  _height: number;
5
5
  _handler: any;
6
6
  _planet: any;
7
7
  _framebuffer: Framebuffer;
8
- MAX_FRAMES: number;
9
- _currentFrame: number;
10
8
  _queue: any[];
11
9
  _initialize(): void;
12
10
  frame(): void;
@@ -89,6 +89,7 @@ export class Framebuffer {
89
89
  * @param {number} height - Framebuffer height.
90
90
  */
91
91
  public setSize(width: number, height: number, forceDestroy: any): void;
92
+ checkStatus(): any;
92
93
  /**
93
94
  * Returns framebuffer completed.
94
95
  * @public