@openglobus/og 0.15.4 → 0.16.0

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 (129) hide show
  1. package/README.md +4 -8
  2. package/css/og.css +1 -1
  3. package/dist/@openglobus/og.css +1 -1
  4. package/dist/@openglobus/og.esm.js +2 -2
  5. package/dist/@openglobus/og.esm.js.map +1 -1
  6. package/dist/@openglobus/og.umd.js +2 -2
  7. package/dist/@openglobus/og.umd.js.map +1 -1
  8. package/package.json +13 -14
  9. package/src/og/Globe.js +5 -2
  10. package/src/og/LonLat.js +224 -193
  11. package/src/og/Object3d.js +21 -2
  12. package/src/og/bv/index.js +2 -2
  13. package/src/og/camera/Camera.js +4 -16
  14. package/src/og/camera/PlanetCamera.js +15 -15
  15. package/src/og/control/KeyboardNavigation.js +153 -169
  16. package/src/og/control/MouseNavigation.js +0 -20
  17. package/src/og/control/RulerSwitcher.js +2 -2
  18. package/src/og/control/SimpleNavigation.js +10 -10
  19. package/src/og/control/ZoomControl.js +2 -2
  20. package/src/og/control/heightRuler/HeightRulerScene.js +6 -2
  21. package/src/og/control/index.js +5 -2
  22. package/src/og/control/ruler/RulerScene.js +11 -8
  23. package/src/og/control/timeline/TimelineControl.js +5 -3
  24. package/src/og/control/timeline/TimelineModel.js +4 -0
  25. package/src/og/control/timeline/TimelineView.js +10 -3
  26. package/src/og/control/visibleExtent/Segment.js +36 -42
  27. package/src/og/ellipsoid/Ellipsoid.js +41 -11
  28. package/src/og/entity/Entity.js +3 -3
  29. package/src/og/entity/EntityCollection.js +2 -2
  30. package/src/og/entity/Label.js +1 -1
  31. package/src/og/entity/Polyline.js +4 -2
  32. package/src/og/index.js +4 -7
  33. package/src/og/layer/CanvasTiles.js +70 -23
  34. package/src/og/layer/GeoImage.js +40 -18
  35. package/src/og/layer/Vector.js +21 -17
  36. package/src/og/layer/WMS.js +2 -2
  37. package/src/og/layer/XYZ.js +2 -2
  38. package/src/og/math.js +2 -1
  39. package/src/og/quadTree/EPSG4326QuadTreeStrategy.js +26 -0
  40. package/src/og/quadTree/EntityCollectionNode.js +8 -2
  41. package/src/og/quadTree/Node.js +44 -50
  42. package/src/og/quadTree/index.js +2 -0
  43. package/src/og/renderer/Renderer.js +14 -1
  44. package/src/og/scene/Planet.js +12 -8
  45. package/src/og/scene/index.js +3 -3
  46. package/src/og/segment/Segment.js +125 -120
  47. package/src/og/terrain/EmptyTerrain.js +19 -7
  48. package/src/og/terrain/GlobusTerrain.js +23 -18
  49. package/src/og/terrain/MapboxTerrain.js +7 -8
  50. package/src/og/terrain/index.js +4 -4
  51. package/src/og/utils/objParser.js +227 -0
  52. package/src/og/utils/shared.js +9 -0
  53. package/src/og/webgl/Handler.js +1 -3
  54. package/types/Globe.d.ts +2 -0
  55. package/types/LonLat.d.ts +20 -1
  56. package/types/Object3d.d.ts +2 -0
  57. package/types/Popup.d.ts +1 -1
  58. package/types/bv/index.d.ts +2 -2
  59. package/types/camera/PlanetCamera.d.ts +1 -8
  60. package/types/camera/index.d.ts +2 -2
  61. package/types/control/GeoImageDragControl.d.ts +1 -1
  62. package/types/control/LayerAnimation.d.ts +1 -1
  63. package/types/control/Lighting.d.ts +2 -2
  64. package/types/control/heightRuler/HeightRulerScene.d.ts +1 -1
  65. package/types/control/index.d.ts +3 -2
  66. package/types/control/ruler/RulerScene.d.ts +5 -4
  67. package/types/control/selection/SelectionScene.d.ts +3 -3
  68. package/types/control/timeline/TimelineControl.d.ts +10 -0
  69. package/types/control/timeline/TimelineModel.d.ts +33 -0
  70. package/types/control/timeline/TimelineView.d.ts +57 -0
  71. package/types/control/timeline/timelineUtils.d.ts +9 -0
  72. package/types/ellipsoid/Ellipsoid.d.ts +27 -8
  73. package/types/ellipsoid/index.d.ts +2 -2
  74. package/types/entity/Entity.d.ts +3 -3
  75. package/types/entity/EntityCollection.d.ts +2 -2
  76. package/types/entity/Label.d.ts +1 -1
  77. package/types/entity/Polyline.d.ts +1 -0
  78. package/types/index.d.ts +45 -46
  79. package/types/layer/CanvasTiles.d.ts +2 -1
  80. package/types/layer/GeoImage.d.ts +7 -1
  81. package/types/layer/GeoTexture2d.d.ts +1 -1
  82. package/types/layer/Vector.d.ts +3 -3
  83. package/types/layer/XYZ.d.ts +1 -1
  84. package/types/layer/index.d.ts +9 -9
  85. package/types/math/Line2.d.ts +1 -1
  86. package/types/math/Line3.d.ts +1 -1
  87. package/types/math/index.d.ts +10 -10
  88. package/types/mercator.d.ts +1 -1
  89. package/types/quadTree/EPSG4326QuadTreeStrategy.d.ts +3 -0
  90. package/types/quadTree/EntityCollectionNode.d.ts +1 -1
  91. package/types/quadTree/index.d.ts +2 -0
  92. package/types/renderer/Renderer.d.ts +2 -2
  93. package/types/scene/Axes.d.ts +1 -1
  94. package/types/scene/SkyBox.d.ts +1 -1
  95. package/types/scene/index.d.ts +3 -3
  96. package/types/segment/Segment.d.ts +11 -14
  97. package/types/shaders/atmos.d.ts +1 -1
  98. package/types/shaders/billboard.d.ts +1 -1
  99. package/types/shaders/depth.d.ts +1 -1
  100. package/types/shaders/label.d.ts +1 -1
  101. package/types/shaders/pickingMask.d.ts +1 -1
  102. package/types/shaders/pointCloud.d.ts +1 -1
  103. package/types/shaders/polyline.d.ts +1 -1
  104. package/types/shaders/ray.d.ts +1 -1
  105. package/types/shaders/screenFrame.d.ts +1 -1
  106. package/types/shaders/skybox.d.ts +1 -1
  107. package/types/shaders/toneMapping.d.ts +1 -1
  108. package/types/terrain/BilTerrain.d.ts +1 -0
  109. package/types/terrain/EmptyTerrain.d.ts +13 -2
  110. package/types/terrain/GlobusTerrain.d.ts +2 -1
  111. package/types/terrain/MapboxTerrain.d.ts +1 -3
  112. package/types/terrain/index.d.ts +4 -4
  113. package/types/ui/Button.d.ts +1 -1
  114. package/types/ui/ButtonGroup.d.ts +12 -0
  115. package/types/ui/Dialog.d.ts +2 -2
  116. package/types/ui/Slider.d.ts +1 -1
  117. package/types/ui/ToggleButton.d.ts +1 -1
  118. package/types/ui/View.d.ts +1 -1
  119. package/types/utils/GeoImageCreator.d.ts +2 -2
  120. package/types/utils/ImagesCacheManager.d.ts +1 -1
  121. package/types/utils/Loader.d.ts +1 -1
  122. package/types/utils/VectorTileCreator.d.ts +1 -1
  123. package/types/utils/objParser.d.ts +8 -0
  124. package/types/utils/shared.d.ts +6 -0
  125. package/types/webgl/Handler.d.ts +2 -2
  126. package/src/og/index.core.js +0 -116
  127. package/src/og/index.webgl.js +0 -17
  128. package/types/index.core.d.ts +0 -65
  129. package/types/index.webgl.d.ts +0 -7
@@ -6,7 +6,7 @@
6
6
  * @param {Object} [options] - Entity options:
7
7
  * @param {string} [options.name] - A human readable name to display to users. It does not have to be unique.
8
8
  * @param {Vec3|Array.<number>} [options.cartesian] - Spatial entities like billboard, label etc. cartesian position.
9
- * @param {LonLat} [options.lonlat] - Geodetic coordiantes for an entities like billboard, label etc.
9
+ * @param {LonLat} [options.lonlat] - Geodetic coordinates for an entities like billboard, label etc.
10
10
  * @param {boolean} [options.aground] - True for entities that have to be placed on the relief.
11
11
  * @param {boolean} [options.visibility] - Entity visibility.
12
12
  * @param {*} [options.billboard] - Billboard options(see {@link og.Billboard}).
@@ -52,7 +52,7 @@ export class Entity {
52
52
  */
53
53
  protected _cartesian: Vec3;
54
54
  /**
55
- * Geodetic entity coordiantes.
55
+ * Geodetic entity coordinates.
56
56
  * @protected
57
57
  * @type {LonLat}
58
58
  */
@@ -245,7 +245,7 @@ export class Entity {
245
245
  */
246
246
  public getAltitude(): number;
247
247
  /**
248
- * Returns carteain position.
248
+ * Returns cartesian position.
249
249
  * @public
250
250
  * @returns {Vec3} -
251
251
  */
@@ -250,7 +250,7 @@ export class EntityCollection {
250
250
  */
251
251
  bindRenderNode(renderNode: RenderNode): void;
252
252
  /**
253
- * Updates coordiantes all lonLat entities in collection after collecction attached to the planet node.
253
+ * Updates coordinates all lonLat entities in collection after collecction attached to the planet node.
254
254
  * @private
255
255
  * @param {Ellipsoid} ellipsoid - Globe ellipsoid.
256
256
  */
@@ -283,7 +283,7 @@ export class EntityCollection {
283
283
  */
284
284
  public each(callback: Function): void;
285
285
  /**
286
- * Removes all entities from colection and clear handlers.
286
+ * Removes all entities from collection and clear handlers.
287
287
  * @public
288
288
  */
289
289
  public clear(): void;
@@ -4,7 +4,7 @@
4
4
  * @extends {BaseBillboard}
5
5
  * @param {Object} [options] - Label options:
6
6
  * @param {Vec3|Array.<number>} [options.position] - Billboard spatial position.
7
- * @param {number} [options.rotation] - Screen angle rotaion.
7
+ * @param {number} [options.rotation] - Screen angle rotation.
8
8
  * @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
9
9
  * @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
10
10
  * @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
@@ -76,6 +76,7 @@ export class Polyline {
76
76
  * @type {number}
77
77
  */
78
78
  public thickness: number;
79
+ _opacity: any;
79
80
  /**
80
81
  * Polyline RGBA color.
81
82
  * @public
package/types/index.d.ts CHANGED
@@ -1,53 +1,52 @@
1
- export namespace version {
2
- const version: any;
3
- }
4
- import * as bv from "./bv/index.js";
5
- import * as jd from "./astro/jd.js";
6
- import * as math from "./math.js";
7
- import * as mercator from "./mercator.js";
8
- import * as utils from "./utils/shared.js";
9
- import { input } from "./input/input.js";
1
+ import * as bv from './bv/index.js';
2
+ import * as jd from './astro/jd.js';
3
+ import * as math from './math.js';
4
+ import * as mercator from './mercator.js';
5
+ import * as utils from './utils/shared.js';
6
+ import { input } from './input/input.js';
10
7
  export const Layer: typeof layer.Layer;
11
8
  export const XYZ: typeof layer.XYZ;
12
9
  export const Vector: typeof layer.Vector;
13
- import * as layer from "./layer/index.js";
14
- import * as terrain from "./terrain/index.js";
10
+ export const CanvasTiles: typeof layer.CanvasTiles;
11
+ import * as layer from './layer/index.js';
12
+ import * as terrain from './terrain/index.js';
15
13
  export const Control: typeof control.Control;
16
- import * as control from "./control/index.js";
17
- import * as webgl from "./webgl/index.js";
18
- import { wgs84 } from "./ellipsoid/index.js";
19
- import { Camera } from "./camera/index.js";
20
- import { Ellipsoid } from "./ellipsoid/index.js";
21
- import { PlanetCamera } from "./camera/index.js";
22
- import { Globe } from "./Globe.js";
23
- import { LightSource } from "./light/LightSource.js";
14
+ import * as control from './control/index.js';
15
+ import * as webgl from './webgl/index.js';
16
+ import { wgs84 } from './ellipsoid/index.js';
17
+ import { Camera } from './camera/index.js';
18
+ import { Ellipsoid } from './ellipsoid/index.js';
19
+ import { Planet } from './scene/Planet.js';
20
+ import { PlanetCamera } from './camera/index.js';
21
+ import { Globe } from './Globe.js';
22
+ import { LightSource } from './light/LightSource.js';
24
23
  export const EntityCollection: typeof entity.EntityCollection;
25
24
  export const Handler: typeof webgl.Handler;
26
- import { Renderer } from "./renderer/Renderer.js";
27
- import { Clock } from "./Clock.js";
28
- import { Events } from "./Events.js";
29
- import { Extent } from "./Extent.js";
30
- import { LonLat } from "./LonLat.js";
31
- import * as scene from "./scene/index.js";
32
- import { RenderNode } from "./scene/RenderNode.js";
33
- import { Line2 } from "./math/index.js";
34
- import { Line3 } from "./math/index.js";
35
- import { Mat3 } from "./math/index.js";
36
- import { Mat4 } from "./math/index.js";
37
- import { Plane } from "./math/index.js";
38
- import { Quat } from "./math/index.js";
39
- import { Ray } from "./math/index.js";
40
- import { Vec2 } from "./math/index.js";
41
- import { Vec3 } from "./math/index.js";
42
- import { Vec4 } from "./math/index.js";
43
- import * as entity from "./entity/index.js";
25
+ import { Renderer } from './renderer/Renderer.js';
26
+ import { Clock } from './Clock.js';
27
+ import { Events } from './Events.js';
28
+ import { Extent } from './Extent.js';
29
+ import { LonLat } from './LonLat.js';
30
+ import * as scene from './scene/index.js';
31
+ import { RenderNode } from './scene/RenderNode.js';
32
+ import { Line2 } from './math/index.js';
33
+ import { Line3 } from './math/index.js';
34
+ import { Mat3 } from './math/index.js';
35
+ import { Mat4 } from './math/index.js';
36
+ import { Plane } from './math/index.js';
37
+ import { Quat } from './math/index.js';
38
+ import { Ray } from './math/index.js';
39
+ import { Vec2 } from './math/index.js';
40
+ import { Vec3 } from './math/index.js';
41
+ import { Vec4 } from './math/index.js';
42
+ import * as entity from './entity/index.js';
44
43
  export const Entity: typeof entity.Entity;
45
- import { Geoid } from "./terrain/Geoid.js";
46
- import { Popup } from "./Popup.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";
52
- import { Object3d } from "./Object3d.js";
53
- 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, Object3d };
44
+ import { Geoid } from './terrain/Geoid.js';
45
+ import { Popup } from './Popup.js';
46
+ import { QuadTreeStrategy } from './quadTree/index.js';
47
+ import { MarsQuadTreeStrategy } from './quadTree/index.js';
48
+ import { EarthQuadTreeStrategy } from './quadTree/index.js';
49
+ import { Wgs84QuadTreeStrategy } from './quadTree/index.js';
50
+ import { quadTreeStrategyType } from './quadTree/index.js';
51
+ import { Object3d } from './Object3d.js';
52
+ export { bv, jd, math, mercator, utils, input, layer, terrain, control, webgl, wgs84, Camera, Ellipsoid, Planet, 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, Object3d };
@@ -18,6 +18,7 @@
18
18
  export class CanvasTiles extends Layer {
19
19
  animated: any;
20
20
  minNativeZoom: any;
21
+ maxNativeZoom: any;
21
22
  /**
22
23
  * Current creating tiles couter.
23
24
  * @protected
@@ -66,7 +67,7 @@ export class CanvasTiles extends Layer {
66
67
  public abortMaterialLoading(material: Material): void;
67
68
  _dequeueRequest(): void;
68
69
  _whilePendings(): any;
69
- applyMaterial(material: any): number[];
70
+ applyMaterial(material: any): any;
70
71
  clearMaterial(material: any): void;
71
72
  }
72
73
  import { Layer } from "./Layer.js";
@@ -23,6 +23,7 @@ export class GeoImage extends BaseGeoImage {
23
23
  * @param {String} srs - Image url path.
24
24
  */
25
25
  public setSrc(src: any): void;
26
+ _onLoad_: any;
26
27
  /**
27
28
  * Sets image object.
28
29
  * @public
@@ -31,9 +32,14 @@ export class GeoImage extends BaseGeoImage {
31
32
  public setImage(image: new (width?: number, height?: number) => HTMLImageElement): void;
32
33
  /**
33
34
  * @private
34
- * @param {Image} img
35
+ * @param {Image} [img]
35
36
  */
36
37
  private _onLoad;
38
+ /**
39
+ * @private
40
+ * @param {Image} [img]
41
+ */
42
+ private _applyImage;
37
43
  /**
38
44
  * Loads planet segment material. In this case - GeoImage source image.
39
45
  * @virtual
@@ -4,4 +4,4 @@ export class GeoTexture2d extends BaseGeoImage {
4
4
  setSize(width: any, height: any): void;
5
5
  abortMaterialLoading(material: any): void;
6
6
  }
7
- import { BaseGeoImage } from "./BaseGeoImage.js";
7
+ import { BaseGeoImage } from './BaseGeoImage.js';
@@ -110,7 +110,7 @@ export class Vector extends Layer {
110
110
  * Adds entity to the layer.
111
111
  * @public
112
112
  * @param {Entity} entity - Entity.
113
- * @param {boolean} [rightNow] - Entity insertion option. False is deafult.
113
+ * @param {boolean} [rightNow] - Entity insertion option. False is default.
114
114
  * @returns {layer.Vector} - Returns this layer.
115
115
  */
116
116
  public add(entity: Entity, rightNow?: boolean): layer.Vector;
@@ -119,7 +119,7 @@ export class Vector extends Layer {
119
119
  * @public
120
120
  * @param {Entity} entity - Entity.
121
121
  * @param {Number} index - Index position.
122
- * @param {boolean} [rightNow] - Entity insertion option. False is deafult.
122
+ * @param {boolean} [rightNow] - Entity insertion option. False is default.
123
123
  * @returns {layer.Vector} - Returns this layer.
124
124
  */
125
125
  public insert(entity: Entity, index: number, rightNow?: boolean): layer.Vector;
@@ -128,7 +128,7 @@ export class Vector extends Layer {
128
128
  * Adds entity array to the layer.
129
129
  * @public
130
130
  * @param {Array.<Entity>} entities - Entities array.
131
- * @param {boolean} [rightNow] - Entity insertion option. False is deafult.
131
+ * @param {boolean} [rightNow] - Entity insertion option. False is default.
132
132
  * @returns {layer.Vector} - Returns this layer.
133
133
  */
134
134
  public addEntities(entities: Array<Entity>, rightNow?: boolean): layer.Vector;
@@ -33,7 +33,7 @@ export class XYZ extends Layer {
33
33
  * @param {string} name - Layer name.
34
34
  * @param {*} options
35
35
  */
36
- constructor(name: string, options: any);
36
+ constructor(name: string, options?: any);
37
37
  /**
38
38
  * Tile url source template.
39
39
  * @public
@@ -1,10 +1,10 @@
1
- import { CanvasTiles } from "./CanvasTiles.js";
2
- import { GeoImage } from "./GeoImage.js";
3
- import { GeoTexture2d } from "./GeoTexture2d.js";
4
- import { GeoVideo } from "./GeoVideo.js";
5
- import { KML } from "./KML.js";
6
- import { Layer } from "./Layer.js";
7
- import { Vector } from "./Vector.js";
8
- import { WMS } from "./WMS.js";
9
- import { XYZ } from "./XYZ.js";
1
+ import { CanvasTiles } from './CanvasTiles.js';
2
+ import { GeoImage } from './GeoImage.js';
3
+ import { GeoTexture2d } from './GeoTexture2d.js';
4
+ import { GeoVideo } from './GeoVideo.js';
5
+ import { KML } from './KML.js';
6
+ import { Layer } from './Layer.js';
7
+ import { Vector } from './Vector.js';
8
+ import { WMS } from './WMS.js';
9
+ import { XYZ } from './XYZ.js';
10
10
  export { CanvasTiles, GeoImage, GeoTexture2d, GeoVideo, KML, Layer, Vector, WMS, XYZ };
@@ -8,4 +8,4 @@ export class Line2 {
8
8
  c: number;
9
9
  intersects(l: any): Vec2;
10
10
  }
11
- import { Vec2 } from "./Vec2.js";
11
+ import { Vec2 } from './Vec2.js';
@@ -7,4 +7,4 @@ export class Line3 {
7
7
  intersects(line: any, res: any, res2: any): boolean;
8
8
  getNearestDistancePoint(point: any, res: any): boolean;
9
9
  }
10
- import { Vec3 } from "./Vec3.js";
10
+ import { Vec3 } from './Vec3.js';
@@ -1,11 +1,11 @@
1
- import { Line2 } from "./Line2.js";
2
- import { Line3 } from "./Line3.js";
3
- import { Mat3 } from "./Mat3.js";
4
- import { Mat4 } from "./Mat4.js";
5
- import { Plane } from "./Plane.js";
6
- import { Quat } from "./Quat.js";
7
- import { Ray } from "./Ray.js";
8
- import { Vec2 } from "./Vec2.js";
9
- import { Vec3 } from "./Vec3.js";
10
- import { Vec4 } from "./Vec4.js";
1
+ import { Line2 } from './Line2.js';
2
+ import { Line3 } from './Line3.js';
3
+ import { Mat3 } from './Mat3.js';
4
+ import { Mat4 } from './Mat4.js';
5
+ import { Plane } from './Plane.js';
6
+ import { Quat } from './Quat.js';
7
+ import { Ray } from './Ray.js';
8
+ import { Vec2 } from './Vec2.js';
9
+ import { Vec3 } from './Vec3.js';
10
+ import { Vec4 } from './Vec4.js';
11
11
  export { Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4 };
@@ -88,5 +88,5 @@ export const MAX_LAT: number;
88
88
  * @type {number}
89
89
  */
90
90
  export const MIN_LAT: number;
91
- import { LonLat } from "./LonLat.js";
91
+ import { LonLat } from './LonLat.js';
92
92
  import { Extent } from "./Extent.js";
@@ -0,0 +1,3 @@
1
+ export class EPSG4326QuadTreeStrategy extends QuadTreeStrategy {
2
+ }
3
+ import { QuadTreeStrategy } from "./QuadTreeStrategy.js";
@@ -38,4 +38,4 @@ export class EntityCollectionNodeWGS84 extends EntityCollectionNode {
38
38
  */
39
39
  renderCollection(outArr: any, visibleNodes: any, renderingNode: any): void;
40
40
  }
41
- import { Sphere } from "../bv/Sphere.js";
41
+ import { Sphere } from '../bv/Sphere.js';
@@ -1,4 +1,5 @@
1
1
  export namespace quadTreeStrategyType {
2
+ export { EPSG4326QuadTreeStrategy as epsg4326 };
2
3
  export { EarthQuadTreeStrategy as earth };
3
4
  export { MarsQuadTreeStrategy as mars };
4
5
  export { Wgs84QuadTreeStrategy as wgs84 };
@@ -7,4 +8,5 @@ import { QuadTreeStrategy } from "./QuadTreeStrategy.js";
7
8
  import { Wgs84QuadTreeStrategy } from "./Wgs84QuadTreeStrategy.js";
8
9
  import { MarsQuadTreeStrategy } from "./MarsQuadTreeStrategy.js";
9
10
  import { EarthQuadTreeStrategy } from "./EarthQuadTreeStrategy.js";
11
+ import { EPSG4326QuadTreeStrategy } from "./EPSG4326QuadTreeStrategy.js";
10
12
  export { QuadTreeStrategy, Wgs84QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy };
@@ -86,7 +86,7 @@ export class Renderer {
86
86
  */
87
87
  _depthCallbacks: Array<Renderer>;
88
88
  depthFramebuffer: Framebuffer;
89
- _msaa: number;
89
+ _msaa: any;
90
90
  _internalFormat: string;
91
91
  _format: string;
92
92
  _type: string;
@@ -232,7 +232,7 @@ export class Renderer {
232
232
  */
233
233
  public addNodes(nodesArr: Array<scene.RenderNode>): void;
234
234
  getMaxMSAA(internalFormat: any): any;
235
- getMSAA(): number;
235
+ getMSAA(): any;
236
236
  /**
237
237
  * TODO: replace with cahce frendly linked list by bilboardHandler, label handler etc.
238
238
  */
@@ -8,4 +8,4 @@ export class Axes extends RenderNode {
8
8
  axisBuffer: any;
9
9
  axisColorBuffer: any;
10
10
  }
11
- import { RenderNode } from "./RenderNode.js";
11
+ import { RenderNode } from './RenderNode.js';
@@ -7,4 +7,4 @@ export class SkyBox extends RenderNode {
7
7
  init(): void;
8
8
  _createBuffers(): void;
9
9
  }
10
- import { RenderNode } from "./RenderNode.js";
10
+ import { RenderNode } from './RenderNode.js';
@@ -1,4 +1,4 @@
1
- import { Planet } from "./Planet";
2
- import { Axes } from "./Axes";
3
- import { SkyBox } from "./SkyBox";
1
+ import { Planet } from "./Planet.js";
2
+ import { Axes } from "./Axes.js";
3
+ import { SkyBox } from "./SkyBox.js";
4
4
  export { Planet, Axes, SkyBox };
@@ -103,11 +103,6 @@ export class Segment {
103
103
  * @type {boolean}
104
104
  */
105
105
  normalMapReady: boolean;
106
- /**
107
- * Parent normal map is made allready(optimization parameter).
108
- * @type {boolean}
109
- */
110
- parentNormalMapReady: boolean;
111
106
  /**
112
107
  * Terrain is allready applied flag.
113
108
  * @type {boolean}
@@ -163,10 +158,9 @@ export class Segment {
163
158
  * @public
164
159
  * @param {Entity} entity - Entity.
165
160
  * @param {Vec3} res - Point coordinates.
166
- * @param {Vec3} [normal] - Terrain point normal.
167
161
  * @returns {Vec3} -
168
162
  */
169
- public getEntityTerrainPoint(entity: Entity, res: Vec3, normal?: Vec3): Vec3;
163
+ public getEntityTerrainPoint(entity: Entity, res: Vec3): Vec3;
170
164
  isEntityInside(e: any): boolean;
171
165
  /**
172
166
  * Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
@@ -177,7 +171,7 @@ export class Segment {
177
171
  * @param {Vec3} [normal] - Terrain point normal.
178
172
  * @returns {number} -
179
173
  */
180
- public getTerrainPoint(xyz: Vec3, insideSegmentPosition: LonLat, res?: Vec3, normal?: Vec3): number;
174
+ public getTerrainPoint(xyz: Vec3, insideSegmentPosition: LonLat, res?: Vec3): number;
181
175
  /**
182
176
  * Project wgs86 to segment native projection.
183
177
  * @public
@@ -195,16 +189,18 @@ export class Segment {
195
189
  * @param {Float32Array} elevations - Elevation data.
196
190
  */
197
191
  elevationsExists(elevations: Float32Array): void;
192
+ /**
193
+ * Keep plain elevation segment for rendering
194
+ *
195
+ * 'this.tileZoom <= this.planet.terrain.maxZoom' it means, that the segment is plain
196
+ *
197
+ */
198
+ elevationsNotExists(): void;
198
199
  _checkEqualization(neighborSide: any, neigborNode: any): boolean;
199
200
  equalize(): void;
200
201
  engage(): void;
201
- _plainSegmentWorkerCallback(data: any): void;
202
202
  _terrainWorkerCallback(data: any): void;
203
203
  normalMapTexturePtr: any;
204
- /**
205
- * Terrain is not obtained or not exists on the server.
206
- */
207
- elevationsNotExists(): void;
208
204
  _normalMapEdgeEqualize(side: any): void;
209
205
  applyTerrain(elevations: any): void;
210
206
  /**
@@ -243,6 +239,7 @@ export class Segment {
243
239
  initialize(): void;
244
240
  _assignGlobalTextureCoordinates(): void;
245
241
  createPlainSegmentAsync(): void;
242
+ _plainSegmentWorkerCallback(data: any): void;
246
243
  createPlainSegment(): void;
247
244
  _createPlainVertices(): void;
248
245
  /**
@@ -265,7 +262,7 @@ export class Segment {
265
262
  getExtentMerc(): Extent;
266
263
  getExtent(): Extent;
267
264
  getNodeState(): any;
268
- getNeighborSide(b: any): 0 | 1 | -1 | 2 | 3;
265
+ getNeighborSide(b: any): 0 | 1 | 2 | 3 | -1;
269
266
  }
270
267
  import { Sphere } from "../bv/Sphere.js";
271
268
  import { Box } from "../bv/Box.js";
@@ -1,4 +1,4 @@
1
1
  export function transmittance(): Program;
2
2
  export function scattering(): Program;
3
3
  export const COMMON: string;
4
- import { Program } from "../webgl/Program.js";
4
+ import { Program } from '../webgl/Program.js';
@@ -1,3 +1,3 @@
1
1
  export function billboardPicking(): Program;
2
2
  export function billboard_screen(): Program;
3
- import { Program } from "../webgl/Program.js";
3
+ import { Program } from '../webgl/Program.js';
@@ -1,2 +1,2 @@
1
1
  export function depth(): Program;
2
- import { Program } from "../webgl/Program.js";
2
+ import { Program } from '../webgl/Program.js';
@@ -1,4 +1,4 @@
1
1
  export function label_webgl2(): Program;
2
2
  export function label_screen(): Program;
3
3
  export function labelPicking(): Program;
4
- import { Program } from "../webgl/Program.js";
4
+ import { Program } from '../webgl/Program.js';
@@ -1,2 +1,2 @@
1
1
  export function pickingMask(): Program;
2
- import { Program } from "../webgl/Program.js";
2
+ import { Program } from '../webgl/Program.js';
@@ -1,2 +1,2 @@
1
1
  export function pointCloud(): Program;
2
- import { Program } from "../webgl/Program.js";
2
+ import { Program } from '../webgl/Program.js';
@@ -1,3 +1,3 @@
1
1
  export function polyline_screen(): Program;
2
2
  export function polyline_picking(): Program;
3
- import { Program } from "../webgl/Program.js";
3
+ import { Program } from '../webgl/Program.js';
@@ -1,2 +1,2 @@
1
1
  export function rayScreen(): Program;
2
- import { Program } from "../webgl/Program.js";
2
+ import { Program } from '../webgl/Program.js';
@@ -1,2 +1,2 @@
1
1
  export function screenFrame(): Program;
2
- import { Program } from "../webgl/Program.js";
2
+ import { Program } from '../webgl/Program.js';
@@ -1,2 +1,2 @@
1
1
  export function skybox(): Program;
2
- import { Program } from "../webgl/Program.js";
2
+ import { Program } from '../webgl/Program.js';
@@ -1,2 +1,2 @@
1
1
  export function toneMapping(): Program;
2
- import { Program } from "../webgl/Program.js";
2
+ import { Program } from '../webgl/Program.js';
@@ -1,5 +1,6 @@
1
1
  export class BilTerrain extends GlobusTerrain {
2
2
  constructor(options: any);
3
+ equalizeVertices: boolean;
3
4
  minZoom: any;
4
5
  maxZoom: any;
5
6
  url: any;
@@ -1,11 +1,17 @@
1
1
  /**
2
2
  * Class represents terrain provider without elevation data.
3
- * @class
3
+ * @param {Object} [options] - Provider options:
4
+ * @param {string} [options.name="empty"] - Provider name.
5
+ * @param {number} [options.minZoom=2] - Minimal visible zoom index when terrain handler works.
6
+ * @param {number} [options.minZoom=50] - Maximal visible zoom index when terrain handler works.
7
+ * @param {number} [options.minNativeZoom=50] - Maximal available terrain zoom level.
8
+ * @param {Array.<number>} [options.gridSizeByZoom] - Array of segment triangulation grid sizes where array index agreed to the segment zoom index.
9
+ * @param {Array.<number>} [gridSizeByZoom] - Array of values, where each value corresponds to the size of a tile(or segment) on the globe. Each value must be power of two.
4
10
  */
5
11
  export class EmptyTerrain {
6
12
  static checkNoDataValue(noDataValues: any, value: any): boolean;
7
13
  constructor(options?: {});
8
- equalizeVertices: boolean;
14
+ equalizeVertices: any;
9
15
  equalizeNormals: boolean;
10
16
  isEmpty: boolean;
11
17
  /**
@@ -26,6 +32,11 @@ export class EmptyTerrain {
26
32
  * @type {number}
27
33
  */
28
34
  public maxZoom: number;
35
+ /**
36
+ * Maximal existent available zoom
37
+ * @type {number}
38
+ */
39
+ maxNativeZoom: number;
29
40
  /**
30
41
  * @public
31
42
  * @type {Array.<number>}
@@ -6,6 +6,7 @@
6
6
  * @param {Object} [options] - Provider options:
7
7
  * @param {number} [options.minZoom=3] - Minimal visible zoom index when terrain handler works.
8
8
  * @param {number} [options.minZoom=14] - Maximal visible zoom index when terrain handler works.
9
+ * @param {number} [options.minNativeZoom=14] - Maximal available terrain zoom level.
9
10
  * @param {string} [options.url="//openglobus.org/heights/srtm3/{z}/{y}/{x}.ddm"] - Terrain source path url template. Default is openglobus ddm elevation file.
10
11
  * @param {Array.<number>} [options.gridSizeByZoom] - Array of segment triangulation grid sizes where array index agreed to the segment zoom index.
11
12
  * @param {number} [options.plainGridSize=32] - Elevation grid size. Default is 32x32. Must be power of two.
@@ -52,7 +53,7 @@ export class GlobusTerrain extends EmptyTerrain {
52
53
  */
53
54
  private _urlRewriteCallback;
54
55
  isBlur(segment: any): boolean;
55
- getHeightAsync(lonLat: any, callback: any, zoom: any): boolean;
56
+ getHeightAsync(lonLat: any, callback: any, zoom: any, firstAttempt: any): boolean;
56
57
  getTileCache(lonLat: any, z: any): any;
57
58
  _getGroundHeightMerc(merc: any, tileData: any): number;
58
59
  /**
@@ -1,9 +1,6 @@
1
1
  export class MapboxTerrain extends GlobusTerrain {
2
2
  constructor(name: any, options?: {});
3
- equalizeVertices: any;
4
3
  equalizeNormals: any;
5
- minZoom: any;
6
- maxZoom: any;
7
4
  gridSizeByZoom: any;
8
5
  url: any;
9
6
  plainGridSize: any;
@@ -12,5 +9,6 @@ export class MapboxTerrain extends GlobusTerrain {
12
9
  _imageDataCache: {};
13
10
  _createTemporalCanvas(size: any): CanvasRenderingContext2D;
14
11
  _createHeights(data: any, tileIndex: any, tileX: any, tileY: any, tileZoom: any, extent: any, preventChildren: any): Float32Array;
12
+ getHeightAsync(lonLat: any, callback: any, zoom: any): boolean;
15
13
  }
16
14
  import { GlobusTerrain } from "./GlobusTerrain.js";
@@ -1,5 +1,5 @@
1
- import { EmptyTerrain } from "./EmptyTerrain";
2
- import { GlobusTerrain } from "./GlobusTerrain";
3
- import { MapboxTerrain } from "./MapboxTerrain";
4
- import { BilTerrain } from "./BilTerrain";
1
+ import { EmptyTerrain } from './EmptyTerrain.js';
2
+ import { GlobusTerrain } from './GlobusTerrain.js';
3
+ import { MapboxTerrain } from './MapboxTerrain.js';
4
+ import { BilTerrain } from './BilTerrain.js';
5
5
  export { EmptyTerrain, GlobusTerrain, MapboxTerrain, BilTerrain };
@@ -18,4 +18,4 @@ export class Button extends View {
18
18
  _onMouseClick(e: any): void;
19
19
  _clearEvents(): void;
20
20
  }
21
- import { View } from "./View.js";
21
+ import { View } from './View.js';