@openglobus/og 0.14.2 → 0.14.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.
package/src/og/index.js CHANGED
@@ -37,16 +37,18 @@ import { RenderNode } from './scene/RenderNode.js';
37
37
 
38
38
  import { Popup } from './Popup.js';
39
39
 
40
- import { QuadTreeStrategy } from './quadTree/QuadTreeStrategy.js';
41
- import { MarsQuadTreeStrategy } from './quadTree/MarsQuadTreeStrategy.js';
42
- import { EarthQuadTreeStrategy } from './quadTree/EarthQuadTreeStrategy.js';
43
- import { Wgs84QuadTreeStrategy } from './quadTree/Wgs84QuadTreeStrategy.js';
44
- import { quadTreeStrategyType } from './utils/quadTreeType.js';
40
+ import {
41
+ EarthQuadTreeStrategy,
42
+ MarsQuadTreeStrategy,
43
+ QuadTreeStrategy,
44
+ quadTreeStrategyType,
45
+ Wgs84QuadTreeStrategy
46
+ } from './quadTree/index.js';
45
47
 
46
48
  import pkg from "../../package.json";
47
49
 
48
50
  const { Handler } = webgl, { Control } = control;
49
- const { Layer } = layer;
51
+ const { Layer, Vector, XYZ} = layer;
50
52
  const {
51
53
  EntityCollection,
52
54
  Entity
@@ -65,6 +67,8 @@ export {
65
67
  utils,
66
68
  input,
67
69
  Layer,
70
+ XYZ,
71
+ Vector,
68
72
  layer,
69
73
  terrain,
70
74
  Control,
@@ -27,6 +27,7 @@ import { XYZ } from "./XYZ.js";
27
27
  * @param {number} [options.height=256] - Tile height.
28
28
  * @param {string} options.layers - WMS layers string.
29
29
  * @param {string} [options.version="1.1.1"] - WMS version.
30
+ * @param {Object} extra - Extra parameters (by WMS rreference or by WMS service vendors) to pass to WMS service.
30
31
  * @example:
31
32
  * new og.layer.WMS("USA States", {
32
33
  * isBaseLayer: false,
@@ -36,16 +37,23 @@ import { XYZ } from "./XYZ.js";
36
37
  * zIndex: 50,
37
38
  * attribution: 'USA states - geoserver WMS example',
38
39
  * version: "1.1.1",
39
- * visibility: false }
40
+ * visibility: false }, {
41
+ * transparent: true,
42
+ * sld: "style.sld"}
40
43
  * );
41
44
  *
42
45
  * @fires og.layer.XYZ#load
43
46
  * @fires og.layer.XYZ#loadend
44
47
  */
45
48
  class WMS extends XYZ {
46
- constructor(name, options) {
49
+
50
+
51
+ constructor(name, options, extra) {
47
52
  super(name, options);
48
53
 
54
+ this._extra = new URLSearchParams(extra).toString();
55
+
56
+
49
57
  if (!options.extent) {
50
58
  this.setExtent(new Extent(new LonLat(-180.0, -90), new LonLat(180.0, 90)));
51
59
  }
@@ -85,10 +93,12 @@ class WMS extends XYZ {
85
93
  srs,
86
94
  bbox,
87
95
  width = 256,
88
- height = 256
96
+ height = 256,
97
+ extra
98
+
89
99
  ) {
90
100
  return `${url}/wms?LAYERS=${layers}&FORMAT=${format}&SERVICE=WMS&VERSION=${version}&REQUEST=${request}
91
- &SRS=${srs}&BBOX=${bbox}&WIDTH=${width}&HEIGHT=${height}`;
101
+ &SRS=${srs}&BBOX=${bbox}&WIDTH=${width}&HEIGHT=${height}&` + extra;
92
102
  }
93
103
 
94
104
  static get_bbox_v1_1_1(extent) {
@@ -133,7 +143,8 @@ class WMS extends XYZ {
133
143
  segment._projection.code,
134
144
  this._getBbox(segment.getExtent()),
135
145
  this.imageWidth,
136
- this.imageHeight
146
+ this.imageHeight,
147
+ this._extra
137
148
  );
138
149
  }
139
150
 
@@ -235,7 +235,7 @@ class Node {
235
235
  let eye = cam.eye;
236
236
  let horizonDist = eye.length2() - this.planet.ellipsoid._b2;
237
237
 
238
- let altVis = seg.tileZoom > 19 || (seg.tileZoom < 4 && !seg.terrainReady) || seg.tileZoom < 2;
238
+ let altVis = seg.tileZoom > 19 || (seg.tileZoom < 5 && !seg.terrainReady) || seg.tileZoom < 2;
239
239
 
240
240
  if (h > 21000) {
241
241
  altVis = altVis || eye.distance2(seg._sw) < horizonDist || eye.distance2(seg._nw) < horizonDist || eye.distance2(seg._ne) < horizonDist || eye.distance2(seg._se) < horizonDist;
@@ -0,0 +1,12 @@
1
+ import { EarthQuadTreeStrategy } from "./EarthQuadTreeStrategy.js";
2
+ import { MarsQuadTreeStrategy } from "./MarsQuadTreeStrategy.js";
3
+ import { Wgs84QuadTreeStrategy } from "./Wgs84QuadTreeStrategy.js";
4
+ import { QuadTreeStrategy } from "./QuadTreeStrategy.js";
5
+
6
+ const quadTreeStrategyType = {
7
+ earth: EarthQuadTreeStrategy,
8
+ mars: MarsQuadTreeStrategy,
9
+ wgs84: Wgs84QuadTreeStrategy
10
+ }
11
+
12
+ export { quadTreeStrategyType, QuadTreeStrategy, Wgs84QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy };
@@ -54,6 +54,9 @@ let __depthCallbackCounter__ = 0;
54
54
  * @fires og.RendererEvents#touchleave
55
55
  * @fires og.RendererEvents#touchenter
56
56
  */
57
+
58
+ let __resizeTimeout;
59
+
57
60
  class Renderer {
58
61
  constructor(handler, params) {
59
62
  params = params || {};
@@ -80,8 +83,6 @@ class Renderer {
80
83
 
81
84
  this.brightThreshold = 0.9;
82
85
 
83
- this.backgroundColor = params.backgroundColor || new Vec3(115 / 255, 203 / 255, 249 / 255);
84
-
85
86
  /**
86
87
  * Render nodes drawing queue.
87
88
  * @private
@@ -480,8 +481,13 @@ class Renderer {
480
481
  }
481
482
 
482
483
  this.handler.ONCANVASRESIZE = () => {
483
- this.resize();
484
+ this._resizeStart();
484
485
  this.events.dispatch(this.events.resize, this.handler.canvas);
486
+ clearTimeout(__resizeTimeout);
487
+ __resizeTimeout = setTimeout(() => {
488
+ this._resizeEnd();
489
+ this.events.dispatch(this.events.resizeend, this.handler.canvas);
490
+ }, 500);
485
491
  };
486
492
 
487
493
  this._screenFrameCornersBuffer = this.handler.createArrayBuffer(
@@ -501,6 +507,10 @@ class Renderer {
501
507
  this.fontAtlas.initFont("arial", arial.data, arial.image);
502
508
  }
503
509
 
510
+ resize() {
511
+ this._resizeEnd();
512
+ }
513
+
504
514
  setCurrentScreen(screenName) {
505
515
  this._currentOutput = screenName;
506
516
  if (this.screenTexture[screenName]) {
@@ -508,22 +518,24 @@ class Renderer {
508
518
  }
509
519
  }
510
520
 
511
- resize() {
521
+ _resizeStart() {
512
522
  let c = this.handler.canvas;
513
- this.activeCamera.setAspectRatio(c.width / c.height);
514
- this.sceneFramebuffer.setSize(c.width, c.height);
515
523
 
516
- this.blitFramebuffer &&
517
- this.blitFramebuffer.setSize(c.width, c.height, true);
524
+ this.activeCamera.setAspectRatio(c.width / c.height);
525
+ this.sceneFramebuffer.setSize(c.width * 0.5, c.height * 0.5);
526
+ this.blitFramebuffer && this.blitFramebuffer.setSize(c.width * 0.5, c.height * 0.5, true);
527
+ }
518
528
 
519
- this.toneMappingFramebuffer &&
520
- this.toneMappingFramebuffer.setSize(c.width, c.height, true);
529
+ _resizeEnd() {
530
+ let c = this.handler.canvas;
521
531
 
522
- this.depthFramebuffer &&
523
- this.depthFramebuffer.setSize(c.clientWidth, c.clientHeight, true);
532
+ this.activeCamera.setAspectRatio(c.width / c.height);
533
+ this.sceneFramebuffer.setSize(c.width, c.height);
534
+ this.blitFramebuffer && this.blitFramebuffer.setSize(c.width, c.height, true);
524
535
 
525
- this.screenDepthFramebuffer &&
526
- this.screenDepthFramebuffer.setSize(c.clientWidth, c.clientHeight, true);
536
+ this.toneMappingFramebuffer && this.toneMappingFramebuffer.setSize(c.width, c.height, true);
537
+ this.depthFramebuffer && this.depthFramebuffer.setSize(c.clientWidth, c.clientHeight, true);
538
+ this.screenDepthFramebuffer && this.screenDepthFramebuffer.setSize(c.clientWidth, c.clientHeight, true);
527
539
 
528
540
  if (this.handler.gl.type === "webgl") {
529
541
  this.screenTexture.screen = this.sceneFramebuffer.textures[0];
@@ -540,6 +552,36 @@ class Renderer {
540
552
  this.setCurrentScreen(this._currentOutput);
541
553
  }
542
554
 
555
+ // resize() {
556
+ // let c = this.handler.canvas;
557
+ //
558
+ // this.activeCamera.setAspectRatio(c.width / c.height);
559
+ //
560
+ // this.sceneFramebuffer.setSize(c.width, c.height);
561
+ //
562
+ // this.blitFramebuffer && this.blitFramebuffer.setSize(c.width, c.height, true);
563
+ //
564
+ // this.toneMappingFramebuffer && this.toneMappingFramebuffer.setSize(c.width, c.height, true);
565
+ //
566
+ // this.depthFramebuffer && this.depthFramebuffer.setSize(c.clientWidth, c.clientHeight, true);
567
+ //
568
+ // this.screenDepthFramebuffer && this.screenDepthFramebuffer.setSize(c.clientWidth, c.clientHeight, true);
569
+ //
570
+ // if (this.handler.gl.type === "webgl") {
571
+ // this.screenTexture.screen = this.sceneFramebuffer.textures[0];
572
+ // this.screenTexture.picking = this.pickingFramebuffer.textures[0];
573
+ // this.screenTexture.depth = this.screenDepthFramebuffer.textures[0];
574
+ // this.screenTexture.frustum = this.depthFramebuffer.textures[0];
575
+ // } else {
576
+ // this.screenTexture.screen = this.toneMappingFramebuffer.textures[0];
577
+ // this.screenTexture.picking = this.pickingFramebuffer.textures[0];
578
+ // this.screenTexture.depth = this.screenDepthFramebuffer.textures[0];
579
+ // this.screenTexture.frustum = this.depthFramebuffer.textures[0];
580
+ // }
581
+ //
582
+ // this.setCurrentScreen(this._currentOutput);
583
+ // }
584
+
543
585
  removeNode(renderNode) {
544
586
  renderNode.remove();
545
587
  }
@@ -899,6 +899,12 @@ const EVENT_NAMES = [
899
899
  */
900
900
  "resize",
901
901
 
902
+ /**
903
+ * Triggered when screen is resized.
904
+ * @event og.RendererEvents#resizeend
905
+ */
906
+ "resizeend",
907
+
902
908
  /**
903
909
  * Mouse enters the work screen
904
910
  * @event og.RendererEvents#mouseenter
@@ -422,6 +422,10 @@ export class Planet extends RenderNode {
422
422
 
423
423
  this._terrainCompleted = false;
424
424
  this._terrainCompletedActivated = false;
425
+
426
+ this._collectRenderNodesIsActive = true;
427
+
428
+ this._skipPreRender = false;
425
429
  }
426
430
 
427
431
  static getBearingNorthRotationQuat(cartesian) {
@@ -724,6 +728,11 @@ export class Planet extends RenderNode {
724
728
  this._terrainCompletedActivated = false;
725
729
  });
726
730
 
731
+ this.renderer.events.on("resizeend", () => {
732
+ this._renderCompletedActivated = false;
733
+ this._terrainCompletedActivated = false;
734
+ });
735
+
727
736
  // Initialize texture coordinates buffer pool
728
737
  this._textureCoordsBufferCache = [];
729
738
 
@@ -966,8 +975,9 @@ export class Planet extends RenderNode {
966
975
  // clearing all node list
967
976
  this._renderedNodes.length = 0;
968
977
  this._renderedNodes = [];
978
+ }
969
979
 
970
- // clearing nodes in frustums
980
+ _clearRenderNodesInFrustum() {
971
981
  for (let i = 0, len = this._renderedNodesInFrustum.length; i < len; i++) {
972
982
  this._renderedNodesInFrustum[i].length = 0;
973
983
  this._renderedNodesInFrustum[i] = [];
@@ -980,13 +990,12 @@ export class Planet extends RenderNode {
980
990
  */
981
991
  _collectRenderNodes() {
982
992
  let cam = this.camera;
983
-
984
993
  this._lodSize = math.lerp(cam.slope < 0.0 ? 0.0 : cam.slope, this._curLodSize, this._minLodSize);
985
-
986
994
  cam._insideSegment = null;
987
995
 
988
996
  // clear first
989
997
  this._clearRenderedNodeList();
998
+ this._clearRenderNodesInFrustum();
990
999
 
991
1000
  this._viewExtent.southWest.set(180, 180);
992
1001
  this._viewExtent.northEast.set(-180, -180);
@@ -1004,7 +1013,12 @@ export class Planet extends RenderNode {
1004
1013
 
1005
1014
  this.minCurrZoom = this.maxCurrZoom;
1006
1015
 
1007
- let temp = this._renderedNodes, rf = this._renderedNodesInFrustum, temp2 = [];
1016
+ let temp = this._renderedNodes,
1017
+ rf = this._renderedNodesInFrustum,
1018
+ temp2 = [];
1019
+
1020
+ this._clearRenderNodesInFrustum();
1021
+ this._renderedNodes = [];
1008
1022
 
1009
1023
  for (var i = 0, len = temp.length; i < len; i++) {
1010
1024
  var ri = temp[i];
@@ -1028,7 +1042,6 @@ export class Planet extends RenderNode {
1028
1042
  temp2[i].renderTree(cam, this.maxCurrZoom, null);
1029
1043
  }
1030
1044
  }
1031
-
1032
1045
  }
1033
1046
 
1034
1047
  _globalPreDraw() {
@@ -1090,6 +1103,16 @@ export class Planet extends RenderNode {
1090
1103
  this._terrainCompleted = true;
1091
1104
  }
1092
1105
 
1106
+ lockQuadTree() {
1107
+ this._collectRenderNodesIsActive = false;
1108
+ this.camera.setTerrainCollisionActivity(false);
1109
+ }
1110
+
1111
+ unlockQuadTree() {
1112
+ this._collectRenderNodesIsActive = true;
1113
+ this.camera.setTerrainCollisionActivity(true);
1114
+ }
1115
+
1093
1116
  /**
1094
1117
  * @protected
1095
1118
  */
@@ -1103,7 +1126,7 @@ export class Planet extends RenderNode {
1103
1126
  let frustumIndex = cam.getCurrentFrustum(), firstPass = frustumIndex === cam.FARTHEST_FRUSTUM_INDEX;
1104
1127
 
1105
1128
  if (firstPass) {
1106
- if (this._skipPreRender) {
1129
+ if (this._skipPreRender && this._collectRenderNodesIsActive) {
1107
1130
  this._collectRenderNodes();
1108
1131
  }
1109
1132
  this._skipPreRender = true;
@@ -82,6 +82,8 @@ export class PlanetCamera extends Camera {
82
82
  _numFrames: number;
83
83
  _completeCallback: any;
84
84
  _flying: boolean;
85
+ _checkTerrainCollision: boolean;
86
+ setTerrainCollisionActivity(isActive: any): void;
85
87
  eyeNorm: Vec3;
86
88
  updateGeodeticPosition(): void;
87
89
  /**
@@ -10,4 +10,4 @@ export function nodesToArray(nodeList: any): any[];
10
10
  export function setAllCSSclass(CSSclass: any, nodeArray: any): any;
11
11
  export function allMenuBtnOFF(): void;
12
12
  export function allDialogsHide(): void;
13
- export function btnClickHandler(btn_id: any, dialog_id: any, dialog_selector: any, btn_icon_id: any): void;
13
+ export function btnClickHandler(btn_id: any, dialog_id: any, dialog_selector: any, btn_icon_id: any, callback: any): void;
@@ -11,10 +11,13 @@ import { ToggleWireframe } from "./ToggleWireframe.js";
11
11
  import { TouchNavigation } from "./TouchNavigation.js";
12
12
  import { SimpleNavigation } from "./SimpleNavigation.js";
13
13
  import { ShowFps } from "./ShowFps.js";
14
+ import { ScaleControl } from "./ScaleControl.js";
14
15
  import { Sun } from "./Sun.js";
15
16
  import { ZoomControl } from "./ZoomControl.js";
16
17
  import { MouseWheelZoomControl } from "./MouseWheelZoomControl.js";
17
18
  import { Lighting } from "./Lighting.js";
18
19
  import { Ruler } from "./ruler/Ruler.js";
20
+ import { SimpleSkyBackground } from "./SimpleSkyBackground.js";
21
+ import { Selection } from "./selection/Selection.js";
19
22
  import { LayerAnimation } from "./LayerAnimation.js";
20
- export { Control, CompassButton, DebugInfo, EarthNavigation, EarthCoordinates, GeoImageDragControl, KeyboardNavigation, LayerSwitcher, MouseNavigation, ToggleWireframe, TouchNavigation, SimpleNavigation, ShowFps, Sun, ZoomControl, MouseWheelZoomControl, Lighting, Ruler, LayerAnimation };
23
+ export { Control, CompassButton, DebugInfo, EarthNavigation, EarthCoordinates, GeoImageDragControl, KeyboardNavigation, LayerSwitcher, MouseNavigation, ToggleWireframe, TouchNavigation, SimpleNavigation, ShowFps, ScaleControl, Sun, ZoomControl, MouseWheelZoomControl, Lighting, Ruler, SimpleSkyBackground, Selection, LayerAnimation };
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Activate Selection
3
+ * @class
4
+ * @extends {Control}
5
+ * @param {Object} [options] - Control options.
6
+ * @param {Array} [options.activationIconClasses] - array with a list of classes to change the button icons
7
+ * @param {boolean} [options.ignoreTerrain=false].
8
+ * @param {function} options.onSelect - callback (extent) => {} where extent is selected extent array [minLon,minLat,maxLon,maxLat]
9
+ * @param {boolean} [options.autoSelectionHide=false] - clear selection rectangle after passing extent to callback
10
+ * @example:
11
+ * to use bootstrap icons, include
12
+ * <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css">
13
+ *
14
+ * new Selection({
15
+ * activationIconClasses: ['bi', 'bi-bounding-box-circles'],
16
+ * ignoreTerrain: false,
17
+ * autoSelectionHide:true,
18
+ * onSelect: (extent) => {
19
+ *
20
+ * var vectorSource = new ol.source.Vector({
21
+ * format: new GeoJSON(),
22
+ * url: function (extent) {
23
+ * return 'https://snap.ogs.trieste.it/geoserver/snap/ows?service=WFS&' +
24
+ * 'version=1.1.0&request=GetFeature&typename=snap:all_dataset_segy_view&' +
25
+ * 'outputFormat=application/json&srsname=EPSG:4326&' +
26
+ * 'bbox=' + extent.join(',') + ',EPSG:4326';
27
+ * },
28
+ * strategy: function (extent, resolution) {
29
+ * if (this.resolution && this.resolution != resolution) {
30
+ * this.loadedExtentsRtree_.clear();
31
+ * }
32
+ * return [extent];
33
+ * }
34
+ * });
35
+ *
36
+ * vectorSource.loadFeatures(extent);
37
+ *
38
+ * console.log(extent);
39
+ *
40
+ * }
41
+ * });
42
+ */
43
+ export class Selection extends Control {
44
+ constructor(options?: {});
45
+ _activationIconClasses: any;
46
+ _selectorScene: SelectionScene;
47
+ set ignoreTerrain(arg: any);
48
+ createSelectorButton(): void;
49
+ }
50
+ import { Control } from "../Control.js";
51
+ import { SelectionScene } from "./SelectionScene.js";
@@ -0,0 +1,35 @@
1
+ export class SelectionScene extends RenderNode {
2
+ constructor(options?: {});
3
+ _ignoreTerrain: any;
4
+ _onSelect: any;
5
+ _autoSelectionHide: any;
6
+ _planet: any;
7
+ _startLonLat: any;
8
+ _heading: number;
9
+ _propsLabel: Entity;
10
+ _trackEntity: Entity;
11
+ _cornerEntity: Entity[];
12
+ _trackLayer: Vector;
13
+ _cornersLayer: Vector;
14
+ set ignoreTerrain(arg: any);
15
+ bindPlanet(planet: any): void;
16
+ init(): void;
17
+ _activate(): void;
18
+ _onMouseMove_: any;
19
+ _onMouseLdown_: any;
20
+ _onMouseLup_: any;
21
+ _deactivate(): void;
22
+ _onMouseLdown(e: any): void;
23
+ _onMouseLup(e: any): void;
24
+ _pickedCorner: any;
25
+ _anchorLonLat: any;
26
+ _drawLine(startLonLat: any, endLonLat: any, startPos: any): void;
27
+ _onMouseMove(e: any): void;
28
+ clear(): void;
29
+ getScale(cart: any): number;
30
+ frame(): void;
31
+ get ellipsoid(): any;
32
+ }
33
+ import { RenderNode } from "../../scene/RenderNode.js";
34
+ import { Entity } from "../../entity/Entity.js";
35
+ import { Vector } from "../../layer/Vector.js";
package/types/index.d.ts CHANGED
@@ -8,6 +8,8 @@ import * as mercator from "./mercator.js";
8
8
  import * as utils from "./utils/shared.js";
9
9
  import { input } from "./input/input.js";
10
10
  export const Layer: typeof layer.Layer;
11
+ export const XYZ: typeof layer.XYZ;
12
+ export const Vector: typeof layer.Vector;
11
13
  import * as layer from "./layer/index.js";
12
14
  import * as terrain from "./terrain/index.js";
13
15
  export const Control: typeof control.Control;
@@ -42,9 +44,9 @@ import * as entity from "./entity/index.js";
42
44
  export const Entity: typeof entity.Entity;
43
45
  import { Geoid } from "./terrain/Geoid.js";
44
46
  import { Popup } from "./Popup.js";
45
- import { QuadTreeStrategy } from "./quadTree/QuadTreeStrategy.js";
46
- import { MarsQuadTreeStrategy } from "./quadTree/MarsQuadTreeStrategy.js";
47
- import { EarthQuadTreeStrategy } from "./quadTree/EarthQuadTreeStrategy.js";
48
- import { Wgs84QuadTreeStrategy } from "./quadTree/Wgs84QuadTreeStrategy.js";
49
- import { quadTreeStrategyType } from "./utils/quadTreeType.js";
47
+ import { QuadTreeStrategy } from "./quadTree/index.js";
48
+ import { MarsQuadTreeStrategy } from "./quadTree/index.js";
49
+ import { EarthQuadTreeStrategy } from "./quadTree/index.js";
50
+ import { Wgs84QuadTreeStrategy } from "./quadTree/index.js";
51
+ import { quadTreeStrategyType } from "./quadTree/index.js";
50
52
  export { bv, jd, math, mercator, utils, input, layer, terrain, control, webgl, wgs84, Camera, Ellipsoid, PlanetCamera, Globe, LightSource, Renderer, Clock, Events, Extent, LonLat, scene, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, entity, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, quadTreeStrategyType };
@@ -16,6 +16,7 @@
16
16
  * @param {number} [options.height=256] - Tile height.
17
17
  * @param {string} options.layers - WMS layers string.
18
18
  * @param {string} [options.version="1.1.1"] - WMS version.
19
+ * @param {Object} extra - Extra parameters (by WMS rreference or by WMS service vendors) to pass to WMS service.
19
20
  * @example:
20
21
  * new og.layer.WMS("USA States", {
21
22
  * isBaseLayer: false,
@@ -25,17 +26,20 @@
25
26
  * zIndex: 50,
26
27
  * attribution: 'USA states - geoserver WMS example',
27
28
  * version: "1.1.1",
28
- * visibility: false }
29
+ * visibility: false }, {
30
+ * transparent: true,
31
+ * sld: "style.sld"}
29
32
  * );
30
33
  *
31
34
  * @fires og.layer.XYZ#load
32
35
  * @fires og.layer.XYZ#loadend
33
36
  */
34
37
  export class WMS extends XYZ {
35
- static createRequestUrl(url: any, layers: any, format: string, version: string, request: string, srs: any, bbox: any, width?: number, height?: number): string;
38
+ static createRequestUrl(url: any, layers: any, format: string, version: string, request: string, srs: any, bbox: any, width: number, height: number, extra: any): string;
36
39
  static get_bbox_v1_1_1(extent: any): string;
37
40
  static get_bbox_v1_3_0(extent: any): string;
38
- constructor(name: any, options: any);
41
+ constructor(name: any, options: any, extra: any);
42
+ _extra: string;
39
43
  /**
40
44
  * WMS layers string.
41
45
  * @public
@@ -0,0 +1,10 @@
1
+ export namespace quadTreeStrategyType {
2
+ export { EarthQuadTreeStrategy as earth };
3
+ export { MarsQuadTreeStrategy as mars };
4
+ export { Wgs84QuadTreeStrategy as wgs84 };
5
+ }
6
+ import { QuadTreeStrategy } from "./QuadTreeStrategy.js";
7
+ import { Wgs84QuadTreeStrategy } from "./Wgs84QuadTreeStrategy.js";
8
+ import { MarsQuadTreeStrategy } from "./MarsQuadTreeStrategy.js";
9
+ import { EarthQuadTreeStrategy } from "./EarthQuadTreeStrategy.js";
10
+ export { QuadTreeStrategy, Wgs84QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy };
@@ -1,36 +1,3 @@
1
- /**
2
- * Represents high level WebGL context interface that starts WebGL handler working in real time.
3
- * @class
4
- * @param {Handler} handler - WebGL handler context.
5
- * @param {Object} [params] - Renderer parameters:
6
- * @fires og.RendererEvents#draw
7
- * @fires og.RendererEvents#resize
8
- * @fires og.RendererEvents#mousemove
9
- * @fires og.RendererEvents#mousestop
10
- * @fires og.RendererEvents#lclick
11
- * @fires og.RendererEvents#rclick
12
- * @fires og.RendererEvents#mclick
13
- * @fires og.RendererEvents#ldblclick
14
- * @fires og.RendererEvents#rdblclick
15
- * @fires og.RendererEvents#mdblclick
16
- * @fires og.RendererEvents#lup
17
- * @fires og.RendererEvents#rup
18
- * @fires og.RendererEvents#mup
19
- * @fires og.RendererEvents#ldown
20
- * @fires og.RendererEvents#rdown
21
- * @fires og.RendererEvents#mdown
22
- * @fires og.RendererEvents#lhold
23
- * @fires og.RendererEvents#rhold
24
- * @fires og.RendererEvents#mhold
25
- * @fires og.RendererEvents#mousewheel
26
- * @fires og.RendererEvents#touchstart
27
- * @fires og.RendererEvents#touchend
28
- * @fires og.RendererEvents#touchcancel
29
- * @fires og.RendererEvents#touchmove
30
- * @fires og.RendererEvents#doubletouch
31
- * @fires og.RendererEvents#touchleave
32
- * @fires og.RendererEvents#touchenter
33
- */
34
1
  export class Renderer {
35
2
  constructor(handler: any, params: any);
36
3
  /**
@@ -49,7 +16,6 @@ export class Renderer {
49
16
  gamma: number;
50
17
  whitepoint: number;
51
18
  brightThreshold: number;
52
- backgroundColor: any;
53
19
  /**
54
20
  * Render nodes drawing queue.
55
21
  * @private
@@ -230,8 +196,10 @@ export class Renderer {
230
196
  };
231
197
  _screenFrameCornersBuffer: any;
232
198
  outputTexture: any;
233
- setCurrentScreen(screenName: any): void;
234
199
  resize(): void;
200
+ setCurrentScreen(screenName: any): void;
201
+ _resizeStart(): void;
202
+ _resizeEnd(): void;
235
203
  removeNode(renderNode: any): void;
236
204
  /**
237
205
  * Adds render node to the renderer.
@@ -251,6 +251,8 @@ export class Planet extends RenderNode {
251
251
  _renderCompletedActivated: boolean;
252
252
  _terrainCompleted: boolean;
253
253
  _terrainCompletedActivated: boolean;
254
+ _collectRenderNodesIsActive: boolean;
255
+ _skipPreRender: boolean;
254
256
  set diffuse(arg: any);
255
257
  set ambient(arg: any);
256
258
  set specular(arg: any);
@@ -349,7 +351,6 @@ export class Planet extends RenderNode {
349
351
  clearIndexesCache(): void;
350
352
  _preRender(): void;
351
353
  _preLoad(): void;
352
- _skipPreRender: boolean;
353
354
  /**
354
355
  * Creates default textures first for nirth pole and whole globe and second for south pole.
355
356
  * @public
@@ -379,6 +380,7 @@ export class Planet extends RenderNode {
379
380
  */
380
381
  protected _sortLayers(): void;
381
382
  _clearRenderedNodeList(): void;
383
+ _clearRenderNodesInFrustum(): void;
382
384
  /**
383
385
  * Collects visible quad nodes.
384
386
  * @protected
@@ -391,6 +393,8 @@ export class Planet extends RenderNode {
391
393
  */
392
394
  public frame(): void;
393
395
  _checkRendercompleted(): void;
396
+ lockQuadTree(): void;
397
+ unlockQuadTree(): void;
394
398
  /**
395
399
  * @protected
396
400
  */
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- import { EarthQuadTreeStrategy } from "../quadTree/EarthQuadTreeStrategy.js";
4
- import { MarsQuadTreeStrategy } from "../quadTree/MarsQuadTreeStrategy.js";
5
- import { Wgs84QuadTreeStrategy } from "../quadTree/Wgs84QuadTreeStrategy.js";
6
-
7
- export const quadTreeStrategyType = {
8
- earth: EarthQuadTreeStrategy,
9
- mars: MarsQuadTreeStrategy,
10
- wgs84: Wgs84QuadTreeStrategy
11
- }
@@ -1,8 +0,0 @@
1
- export namespace quadTreeStrategyType {
2
- export { EarthQuadTreeStrategy as earth };
3
- export { MarsQuadTreeStrategy as mars };
4
- export { Wgs84QuadTreeStrategy as wgs84 };
5
- }
6
- import { EarthQuadTreeStrategy } from "../quadTree/EarthQuadTreeStrategy.js";
7
- import { MarsQuadTreeStrategy } from "../quadTree/MarsQuadTreeStrategy.js";
8
- import { Wgs84QuadTreeStrategy } from "../quadTree/Wgs84QuadTreeStrategy.js";