@openglobus/og 0.14.10 → 0.15.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 (140) hide show
  1. package/css/og.css +378 -275
  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 +18 -17
  8. package/src/og/Clock.js +218 -194
  9. package/src/og/Globe.js +5 -5
  10. package/src/og/Object3d.js +104 -145
  11. package/src/og/camera/Camera.js +31 -27
  12. package/src/og/camera/PlanetCamera.js +22 -14
  13. package/src/og/cons.js +107 -107
  14. package/src/og/control/Atmosphere.js +396 -0
  15. package/src/og/control/CompassButton.js +11 -18
  16. package/src/og/control/Control.js +187 -188
  17. package/src/og/control/GeoImageDragControl.js +84 -66
  18. package/src/og/control/LayerSwitcher.js +56 -138
  19. package/src/og/control/Lighting.js +314 -186
  20. package/src/og/control/MouseNavigation.js +2 -2
  21. package/src/og/control/RulerSwitcher.js +24 -19
  22. package/src/og/control/ScaleControl.js +30 -10
  23. package/src/og/control/SimpleSkyBackground.js +210 -0
  24. package/src/og/control/Sun.js +2 -0
  25. package/src/og/control/ZoomControl.js +30 -42
  26. package/src/og/control/index.js +6 -0
  27. package/src/og/control/ruler/RulerScene.js +5 -23
  28. package/src/og/control/selection/Selection.js +99 -0
  29. package/src/og/control/selection/SelectionScene.js +350 -0
  30. package/src/og/control/timeline/TimelineControl.js +99 -0
  31. package/src/og/control/timeline/TimelineModel.js +133 -0
  32. package/src/og/control/timeline/TimelineView.js +449 -0
  33. package/src/og/control/timeline/timelineUtils.js +132 -0
  34. package/src/og/ellipsoid/Ellipsoid.js +120 -93
  35. package/src/og/ellipsoid/wgs84.js +13 -13
  36. package/src/og/entity/Entity.js +36 -9
  37. package/src/og/entity/EntityCollection.js +0 -2
  38. package/src/og/entity/GeoObject.js +72 -56
  39. package/src/og/entity/GeoObjectHandler.js +487 -656
  40. package/src/og/entity/GeometryHandler.js +1341 -1337
  41. package/src/og/entity/Polyline.js +0 -16
  42. package/src/og/entity/Ray.js +0 -10
  43. package/src/og/entity/RayHandler.js +3 -44
  44. package/src/og/entity/Strip.js +1 -6
  45. package/src/og/index.js +10 -6
  46. package/src/og/input/input.js +3 -1
  47. package/src/og/layer/CanvasTiles.js +39 -34
  48. package/src/og/layer/Layer.js +69 -9
  49. package/src/og/layer/Material.js +1 -8
  50. package/src/og/layer/WMS.js +16 -5
  51. package/src/og/light/LightSource.js +2 -0
  52. package/src/og/math/Line3.js +140 -139
  53. package/src/og/math/Plane.js +118 -117
  54. package/src/og/math/Ray.js +242 -239
  55. package/src/og/math/Vec3.js +56 -37
  56. package/src/og/math/Vec4.js +3 -4
  57. package/src/og/math.js +21 -21
  58. package/src/og/quadTree/Node.js +5 -4
  59. package/src/og/quadTree/index.js +12 -0
  60. package/src/og/renderer/Renderer.js +64 -37
  61. package/src/og/renderer/RendererEvents.js +1071 -1065
  62. package/src/og/scene/Planet.js +352 -172
  63. package/src/og/scene/RenderNode.js +27 -12
  64. package/src/og/segment/Segment.js +0 -5
  65. package/src/og/shaders/atmos.js +332 -0
  66. package/src/og/shaders/drawnode.js +475 -109
  67. package/src/og/shaders/geoObject.js +96 -51
  68. package/src/og/shaders/polyline.js +212 -17
  69. package/src/og/shaders/ray.js +13 -6
  70. package/src/og/shaders/toneMapping.js +5 -5
  71. package/src/og/shaders/utils.js +88 -0
  72. package/src/og/terrain/GlobusTerrain.js +5 -4
  73. package/src/og/terrain/MapboxTerrain.js +231 -52
  74. package/src/og/ui/Button.js +106 -0
  75. package/src/og/ui/ButtonGroup.js +57 -0
  76. package/src/og/ui/Dialog.js +242 -0
  77. package/src/og/ui/Slider.js +144 -0
  78. package/src/og/ui/ToggleButton.js +51 -0
  79. package/src/og/{control → ui}/UIhelpers.js +11 -2
  80. package/src/og/ui/View.js +190 -0
  81. package/src/og/utils/shared.js +960 -942
  82. package/src/og/webgl/Framebuffer.js +308 -387
  83. package/src/og/webgl/Handler.js +90 -30
  84. package/src/og/webgl/Multisample.js +8 -0
  85. package/types/Clock.d.ts +7 -2
  86. package/types/Object3d.d.ts +14 -3
  87. package/types/camera/Camera.d.ts +18 -17
  88. package/types/camera/PlanetCamera.d.ts +3 -1
  89. package/types/control/Atmosphere.d.ts +15 -0
  90. package/types/control/CompassButton.d.ts +1 -2
  91. package/types/control/GeoImageDragControl.d.ts +7 -1
  92. package/types/control/LayerSwitcher.d.ts +5 -6
  93. package/types/control/Lighting.d.ts +32 -7
  94. package/types/control/ScaleControl.d.ts +2 -1
  95. package/types/control/SimpleSkyBackground.d.ts +15 -0
  96. package/types/control/ZoomControl.d.ts +0 -1
  97. package/types/control/index.d.ts +4 -1
  98. package/types/control/ruler/RulerScene.d.ts +0 -1
  99. package/types/control/selection/Selection.d.ts +49 -0
  100. package/types/control/selection/SelectionScene.d.ts +34 -0
  101. package/types/ellipsoid/Ellipsoid.d.ts +3 -2
  102. package/types/entity/Entity.d.ts +8 -0
  103. package/types/entity/GeoObject.d.ts +28 -22
  104. package/types/entity/GeoObjectHandler.d.ts +16 -56
  105. package/types/entity/Ray.d.ts +0 -3
  106. package/types/entity/RayHandler.d.ts +0 -4
  107. package/types/index.d.ts +7 -5
  108. package/types/input/input.d.ts +2 -0
  109. package/types/layer/CanvasTiles.d.ts +1 -0
  110. package/types/layer/Layer.d.ts +9 -0
  111. package/types/layer/WMS.d.ts +7 -3
  112. package/types/math/Plane.d.ts +1 -1
  113. package/types/math/Vec3.d.ts +19 -16
  114. package/types/math/Vec4.d.ts +2 -3
  115. package/types/math.d.ts +20 -20
  116. package/types/quadTree/index.d.ts +10 -0
  117. package/types/renderer/Renderer.d.ts +11 -37
  118. package/types/scene/Planet.d.ts +27 -1
  119. package/types/scene/RenderNode.d.ts +2 -1
  120. package/types/segment/Segment.d.ts +1 -1
  121. package/types/shaders/atmos.d.ts +4 -0
  122. package/types/shaders/drawnode.d.ts +3 -2
  123. package/types/shaders/utils.d.ts +1 -0
  124. package/types/terrain/GlobusTerrain.d.ts +1 -1
  125. package/types/terrain/MapboxTerrain.d.ts +2 -1
  126. package/types/ui/Button.d.ts +21 -0
  127. package/types/ui/Dialog.d.ts +41 -0
  128. package/types/ui/Slider.d.ts +30 -0
  129. package/types/ui/ToggleButton.d.ts +10 -0
  130. package/types/{control → ui}/UIhelpers.d.ts +1 -1
  131. package/types/ui/View.d.ts +32 -0
  132. package/types/utils/shared.d.ts +16 -14
  133. package/types/webgl/Framebuffer.d.ts +2 -5
  134. package/types/webgl/Handler.d.ts +15 -10
  135. package/types/webgl/Multisample.d.ts +2 -0
  136. package/src/og/ajax.js +0 -204
  137. package/src/og/entity/Object3d.js +0 -504
  138. package/src/og/utils/quadTreeType.js +0 -11
  139. package/types/ajax.d.ts +0 -24
  140. package/types/utils/quadTreeType.d.ts +0 -8
@@ -0,0 +1,34 @@
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
+ frame(): void;
30
+ get ellipsoid(): any;
31
+ }
32
+ import { RenderNode } from "../../scene/RenderNode.js";
33
+ import { Entity } from "../../entity/Entity.js";
34
+ import { Vector } from "../../layer/Vector.js";
@@ -114,10 +114,11 @@ export class Ellipsoid {
114
114
  /**
115
115
  * Gets Wgs84 geodetic coordiantes from cartesian ECEF.
116
116
  * @public
117
- * @param {Vec3} cartesian - Cartesian coordinates.
117
+ * @param {Vec3} p - Cartesian coordinates.
118
118
  * @returns {LonLat} -
119
119
  */
120
- public cartesianToLonLat(cartesian: Vec3): LonLat;
120
+ public projToSurface(p: Vec3): LonLat;
121
+ cartesianToLonLat(cart: any): LonLat;
121
122
  /**
122
123
  * Gets ellipsoid surface normal.
123
124
  * @public
@@ -233,6 +233,14 @@ export class Entity {
233
233
  * @param {LonLat} lonlat - WGS84 coordinates.
234
234
  */
235
235
  public setLonLat(lonlat: LonLat): void;
236
+ /**
237
+ * Sets geodetic coordinates of the entity point object.
238
+ * @public
239
+ * @param {number} lon - Longitude.
240
+ * @param {number} lat - Latitude
241
+ * @param {number} [height] - Height
242
+ */
243
+ public setLonLat2(lon: number, lat: number, height?: number): void;
236
244
  /**
237
245
  * Sets entity altitude over the planet.
238
246
  * @public
@@ -4,9 +4,15 @@
4
4
  * @param {og.Vec3} [options.position] - Geo object position.
5
5
  */
6
6
  export class GeoObject {
7
- constructor(options: any);
8
- scale: any;
9
- scaleByDistance: Float32Array;
7
+ constructor(options?: {});
8
+ tag: any;
9
+ instanced: boolean;
10
+ /**
11
+ * Entity instance that holds this geo object.
12
+ * @protected
13
+ * @type {Entity}
14
+ */
15
+ protected _entity: Entity;
10
16
  /**
11
17
  * Geo object center cartesian position.
12
18
  * @protected
@@ -18,8 +24,7 @@ export class GeoObject {
18
24
  _pitch: any;
19
25
  _yaw: any;
20
26
  _roll: any;
21
- _planet: any;
22
- _lonLatAlt: LonLat;
27
+ _scale: any;
23
28
  /**
24
29
  * RGBA color.
25
30
  * @protected
@@ -29,15 +34,19 @@ export class GeoObject {
29
34
  _direction: Vec3;
30
35
  _handler: any;
31
36
  _handlerIndex: number;
32
- _vertices: any;
33
- _normals: any;
34
- _indices: any;
35
- instanced: any;
36
- tag: any;
37
- _indicesCount: any;
38
- _verticesCount: number;
39
- get planet(): any;
40
- get renderer(): any;
37
+ _tagData: any;
38
+ _tagDataIndex: number;
39
+ _object3d: any;
40
+ getPosition(): og.Vec3;
41
+ getPitch(): any;
42
+ getYaw(): any;
43
+ getRoll(): any;
44
+ getDirection(): Vec3;
45
+ get object3d(): any;
46
+ get vertices(): any;
47
+ get normals(): any;
48
+ get texCoords(): any;
49
+ get indices(): any;
41
50
  /**
42
51
  * Sets geo object opacity.
43
52
  * @public
@@ -45,7 +54,7 @@ export class GeoObject {
45
54
  */
46
55
  public setOpacity(a: number): void;
47
56
  /**
48
- * Sets RGBA color. Each channel from 0.0 to 1.0.
57
+ * Sets color.
49
58
  * @public
50
59
  * @param {number} r - Red.
51
60
  * @param {number} g - Green.
@@ -54,7 +63,7 @@ export class GeoObject {
54
63
  */
55
64
  public setColor(r: number, g: number, b: number, a: number): void;
56
65
  /**
57
- * Sets RGBA color. Each channel from 0.0 to 1.0.
66
+ * Sets color.
58
67
  * @public
59
68
  * @param {og.Vec4} color - RGBA vector.
60
69
  */
@@ -67,14 +76,13 @@ export class GeoObject {
67
76
  public setVisibility(visibility: boolean): void;
68
77
  _visibility: boolean;
69
78
  /**
70
- * Returns geo object visibility.
79
+ * Returns geo object visibility.
71
80
  * @public
72
81
  * @returns {boolean}
73
82
  */
74
83
  public getVisibility(): boolean;
75
- setLonLat(lon: any, lat: any, alt: any): void;
76
84
  /**
77
- * Sets geoObject position.
85
+ * Sets geo object position.
78
86
  * @public
79
87
  * @param {number} x - X coordinate.
80
88
  * @param {number} y - Y coordinate.
@@ -82,7 +90,7 @@ export class GeoObject {
82
90
  */
83
91
  public setPosition(x: number, y: number, z: number): void;
84
92
  /**
85
- * Sets billboard position.
93
+ * Sets geo object position.
86
94
  * @public
87
95
  * @param {og.Vec3} position - Cartesian coordinates.
88
96
  */
@@ -97,7 +105,6 @@ export class GeoObject {
97
105
  * @public
98
106
  */
99
107
  public remove(): void;
100
- _entity: any;
101
108
  /**
102
109
  * Sets billboard picking color.
103
110
  * @public
@@ -108,5 +115,4 @@ export class GeoObject {
108
115
  _qNorthFrame: Quat;
109
116
  }
110
117
  import { Vec3 } from "../math/index.js";
111
- import { LonLat } from "../LonLat.js";
112
118
  import { Quat } from "../math/index.js";
@@ -2,6 +2,7 @@ export class GeoObjectHandler {
2
2
  static set _staticCounter(arg: any);
3
3
  static get _staticCounter(): any;
4
4
  constructor(entityCollection: any);
5
+ __staticId: number;
5
6
  /**
6
7
  * Picking rendering option.
7
8
  * @public
@@ -9,73 +10,32 @@ export class GeoObjectHandler {
9
10
  */
10
11
  public pickingEnabled: boolean;
11
12
  _entityCollection: any;
12
- _renderer: any;
13
13
  _planet: any;
14
14
  _geoObjects: any[];
15
- _pitchRollArr: any[][];
16
- _sizeArr: any[][];
17
- _vertexArr: any[][];
18
- _positionHighArr: any[][];
19
- _positionLowArr: any[][];
20
- _directionArr: any[][];
21
- _rgbaArr: any[][];
22
- _normalsArr: any[][];
23
- _indicesArr: any[][];
24
- _pickingColorArr: any[][];
25
- _vehicleVisibleArr: any[][];
26
- _pitchRollBuffer: any[];
27
- _sizeBuffer: any[];
28
- _vertexBuffer: any[];
29
- _positionHighBuffer: any[];
30
- _positionLowBuffer: any[];
31
- _directionBuffer: any[];
32
- _rgbaBuffer: any[];
33
- _normalsBuffer: any[];
34
- _indicesBuffer: any[];
35
- _pickingColorBuffer: any[];
36
- _vehicleVisibleBuffer: any[];
37
- __staticId: number;
38
- _buffersUpdateCallbacks: (() => void)[];
39
- _changedBuffers: any[];
40
- _instancedTags: Map<any, any>;
41
- getObjectByIndex(index: any): any;
42
- createVertexBuffer(): void;
43
- createPitchRollBuffer(): void;
44
- createVisibleBuffer(): void;
45
- createSizeBuffer(): void;
46
- createPositionBuffer(): void;
47
- createRgbaBuffer(): void;
48
- createDirectionBuffer(): void;
49
- createNormalsBuffer(): void;
50
- createIndicesBuffer(): void;
51
- createPickingColorBuffer(): void;
15
+ _instanceDataMap: Map<any, any>;
16
+ _instanceDataMapValues: any[];
17
+ _dataTagUpdateQueue: any[];
52
18
  initProgram(): void;
53
19
  setRenderNode(renderNode: any): void;
54
- setRenderer(planet: any): void;
55
20
  _addGeoObjectToArray(geoObject: any): void;
56
21
  _displayPASS(): void;
57
22
  drawPicking(): void;
58
23
  _pickingPASS(): void;
59
- _recalculateIndices(startIndex: any): void;
60
- _addIndices(g: any): void;
61
- _removeIndices(geoObject: any): void;
62
- setDirectionArr(index: any, direction: any): void;
63
- setVisibility(index: any, visibility: any): void;
64
- setPositionArr(index: any, positionHigh: any, positionLow: any): void;
65
- setRgbaArr(index: any, rgba: any): void;
66
- getTagIndexByObjectIndex(index: any): any;
67
- getTagDataByObjectIndex(index: any): any;
68
- setPickingColorArr(index: any, color: any): void;
69
- setPitchRollArr(index: any, pitch: any, roll: any): void;
70
- setScaleArr(index: any, scale: any): void;
71
- refresh(): void;
72
- _removeGeoObjects(): void;
73
- clear(): void;
74
- _deleteBuffers(): void;
24
+ _loadDataTagTexture(tagData: any): Promise<void>;
25
+ setDirectionArr(tagData: any, tagDataIndex: any, direction: any): void;
26
+ setVisibility(tagData: any, tagDataIndex: any, visibility: any): void;
27
+ setPositionArr(tagData: any, tagDataIndex: any, positionHigh: any, positionLow: any): void;
28
+ setRgbaArr(tagData: any, tagDataIndex: any, rgba: any): void;
29
+ setPickingColorArr(tagData: any, tagDataIndex: any, color: any): void;
30
+ setPitchRollArr(tagData: any, tagDataIndex: any, pitch: any, roll: any): void;
31
+ setScaleArr(tagData: any, tagDataIndex: any, scale: any): void;
32
+ _updateTag(dataTag: any): void;
75
33
  update(): void;
34
+ _removeAll(): void;
35
+ clear(): void;
76
36
  draw(): void;
77
- _reindexGeoObjects(startIndex: any, tag: any): void;
78
37
  add(geoObject: any): void;
79
38
  remove(geoObject: any): void;
39
+ _clearDataTagQueue(): void;
80
40
  _removeGeoObject(geoObject: any): void;
81
41
  }
@@ -18,8 +18,6 @@ export class Ray {
18
18
  */
19
19
  public readonly id: number;
20
20
  _thickness: any;
21
- _length: any;
22
- _lengthHighLow: Float32Array;
23
21
  _startPosition: any;
24
22
  _startPositionHigh: Vec3;
25
23
  _startPositionLow: Vec3;
@@ -80,7 +78,6 @@ export class Ray {
80
78
  * @param {Vec3} position - Cartesian coordinates.
81
79
  */
82
80
  public setEndPosition3v(position: Vec3): void;
83
- setLength(length: any): void;
84
81
  setThickness(thickness: any): void;
85
82
  setColors4v(startColor: any, endColor: any): void;
86
83
  setColorsHTML(startColor: any, endColor: any): void;
@@ -17,7 +17,6 @@ export class RayHandler {
17
17
  _startPositionLowBuffer: any;
18
18
  _endPositionHighBuffer: any;
19
19
  _endPositionLowBuffer: any;
20
- _lengthBuffer: any;
21
20
  _thicknessBuffer: any;
22
21
  _rgbaBuffer: any;
23
22
  _vertexArr: any[];
@@ -25,7 +24,6 @@ export class RayHandler {
25
24
  _startPositionLowArr: any[];
26
25
  _endPositionHighArr: any[];
27
26
  _endPositionLowArr: any[];
28
- _lengthArr: any[];
29
27
  _thicknessArr: any[];
30
28
  _rgbaArr: any[];
31
29
  _pickingColorBuffer: any;
@@ -54,14 +52,12 @@ export class RayHandler {
54
52
  setPickingColorArr(index: any, color: any): void;
55
53
  setRgbaArr(index: any, startColor: any, endColor: any): void;
56
54
  setThicknessArr(index: any, thickness: any): void;
57
- setLengthArr(index: any, length: any): void;
58
55
  setVisibility(index: any, visibility: any): void;
59
56
  setVertexArr(index: any, vertexArr: any): void;
60
57
  createStartPositionBuffer(): void;
61
58
  createEndPositionBuffer(): void;
62
59
  createRgbaBuffer(): void;
63
60
  createThicknessBuffer(): void;
64
- createLengthBuffer(): void;
65
61
  createVertexBuffer(): void;
66
62
  createPickingColorBuffer(): void;
67
63
  }
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 };
@@ -37,4 +37,6 @@ export namespace input {
37
37
  const MB_LEFT: number;
38
38
  const MB_RIGHT: number;
39
39
  const MB_MIDDLE: number;
40
+ const KEY_BACK_SLASH: number;
41
+ const KEY_SINGLE_QUOTE: number;
40
42
  }
@@ -16,6 +16,7 @@
16
16
  * @fires og.layer.CanvasTiles#loadend
17
17
  */
18
18
  export class CanvasTiles extends Layer {
19
+ animated: any;
19
20
  minNativeZoom: any;
20
21
  /**
21
22
  * Current creating tiles couter.
@@ -158,6 +158,15 @@ export class Layer {
158
158
  * @type {Events}
159
159
  */
160
160
  public events: Events;
161
+ _ambient: Float32Array;
162
+ _diffuse: Float32Array;
163
+ _specular: Float32Array;
164
+ nightTextureCoefficient: any;
165
+ set diffuse(arg: any);
166
+ set ambient(arg: any);
167
+ set specular(arg: any);
168
+ set shininess(arg: any);
169
+ get normalMapCreator(): any;
161
170
  get instanceName(): string;
162
171
  get rendererEvents(): Events;
163
172
  set opacity(arg: number);
@@ -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
@@ -13,6 +13,6 @@ export class Plane {
13
13
  distance(p: any): any;
14
14
  getProjection(v: any, def: any): Vec3;
15
15
  getProjectionPoint(p: any, vh: any): any;
16
- getIntersection(Pn1: any, Pn2: any, L: any): 1 | 0 | 2;
16
+ getIntersection(Pn1: any, Pn2: any, L: any): 0 | 1 | 2;
17
17
  }
18
18
  import { Vec3 } from "./Vec3.js";
@@ -151,6 +151,9 @@ export class Vec3 {
151
151
  * @returns {Vec3} -
152
152
  */
153
153
  static div(a: Vec3, b: Vec3): Vec3;
154
+ static length2(a: any): any;
155
+ static length(a: any): any;
156
+ static dot(a: any, b: any): any;
154
157
  static get LERP_DELTA(): number;
155
158
  constructor(x?: number, y?: number, z?: number);
156
159
  /**
@@ -208,10 +211,10 @@ export class Vec3 {
208
211
  public equal(p: Vec3): boolean;
209
212
  /**
210
213
  * Copy input vector's values.
211
- * @param {Vec3} point3 - Vector to copy.
214
+ * @param {Vec3} p - Vector to copy.
212
215
  * @returns {Vec3} -
213
216
  */
214
- copy(point3: Vec3): Vec3;
217
+ copy(p: Vec3): Vec3;
215
218
  /**
216
219
  * Gets vector's length.
217
220
  * @public
@@ -233,31 +236,31 @@ export class Vec3 {
233
236
  /**
234
237
  * Adds vector to the current.
235
238
  * @public
236
- * @param {Vec3} point3 - Point to add.
239
+ * @param {Vec3} p - Point to add.
237
240
  * @returns {Vec3} -
238
241
  */
239
- public addA(point3: Vec3): Vec3;
242
+ public addA(p: Vec3): Vec3;
240
243
  /**
241
244
  * Gets two vectors summarization.
242
245
  * @public
243
- * @param {Vec3} point3 - Vector to add.
246
+ * @param {Vec3} p - Vector to add.
244
247
  * @returns {Vec3} Returns a sum vector.
245
248
  */
246
- public add(point3: Vec3): Vec3;
249
+ public add(p: Vec3): Vec3;
247
250
  /**
248
251
  * Subtract vector from the current.
249
252
  * @public
250
- * @param {Vec3} point3 - Subtract vector.
253
+ * @param {Vec3} p - Subtract vector.
251
254
  * @returns {Vec3} -
252
255
  */
253
- public subA(point3: Vec3): Vec3;
256
+ public subA(p: Vec3): Vec3;
254
257
  /**
255
258
  * Gets vector subtraction.
256
259
  * @public
257
- * @param {Vec3} point3 - Subtract vector.
260
+ * @param {Vec3} p - Subtract vector.
258
261
  * @return {Vec3} Returns new instance of a subtraction
259
262
  */
260
- public sub(point3: Vec3): Vec3;
263
+ public sub(p: Vec3): Vec3;
261
264
  /**
262
265
  * Scale current vector.
263
266
  * @public
@@ -303,10 +306,10 @@ export class Vec3 {
303
306
  /**
304
307
  * Gets vectors dot production.
305
308
  * @public
306
- * @param {Vec3} point3 - Another vector.
309
+ * @param {Vec3} a - Another vector.
307
310
  * @returns {number} -
308
311
  */
309
- public dot(point3: Vec3): number;
312
+ public dot(a: Vec3): number;
310
313
  /**
311
314
  * Gets vectors dot production.
312
315
  * @public
@@ -380,17 +383,17 @@ export class Vec3 {
380
383
  /**
381
384
  * Gets distance to point.
382
385
  * @public
383
- * @param {Vec3} point3 - Distant point.
386
+ * @param {Vec3} p - Distant point.
384
387
  * @returns {number} -
385
388
  */
386
- public distance(point3: Vec3): number;
389
+ public distance(p: Vec3): number;
387
390
  /**
388
391
  * Gets square distance to point.
389
392
  * @public
390
- * @param {Vec3} point3 - Distant point.
393
+ * @param {Vec3} p - Distant point.
391
394
  * @returns {number} -
392
395
  */
393
- public distance2(point3: Vec3): number;
396
+ public distance2(p: Vec3): number;
394
397
  /**
395
398
  * Sets vector's values.
396
399
  * @public
@@ -80,15 +80,14 @@ export class Vec4 {
80
80
  * Converts vector to a number array.
81
81
  * @public
82
82
  * @returns {Array.<number>} - (exactly 4 entries)
83
- * @deprecated
84
83
  */
85
- public toVec(): Array<number>;
84
+ public toArray(): Array<number>;
86
85
  /**
87
86
  * Converts vector to a number array.
88
87
  * @public
89
88
  * @returns {Array.<number>} - (exactly 4 entries)
90
89
  */
91
- public toArray(): Array<number>;
90
+ public toArray3(): Array<number>;
92
91
  /**
93
92
  * Sets vector's values.
94
93
  * @public
package/types/math.d.ts CHANGED
@@ -235,26 +235,26 @@ export const HOURS_TO_DEGREES: 15;
235
235
  export const DEGREES_TO_HOURS: number;
236
236
  /** @const */
237
237
  export const SQRT_HALF: number;
238
- export const EPSILON1: 0.1;
239
- export const EPSILON2: 0.01;
240
- export const EPSILON3: 0.001;
241
- export const EPSILON4: 0.0001;
242
- export const EPSILON5: 0.00001;
243
- export const EPSILON6: 0.000001;
244
- export const EPSILON7: 1e-7;
245
- export const EPSILON8: 1e-8;
246
- export const EPSILON9: 1e-9;
247
- export const EPSILON10: 1e-10;
248
- export const EPSILON11: 1e-11;
249
- export const EPSILON12: 1e-12;
250
- export const EPSILON13: 1e-13;
251
- export const EPSILON14: 1e-14;
252
- export const EPSILON15: 1e-15;
253
- export const EPSILON16: 1e-16;
254
- export const EPSILON17: 1e-17;
255
- export const EPSILON18: 1e-18;
256
- export const EPSILON19: 1e-19;
257
- export const EPSILON20: 1e-20;
238
+ export const EPS1: 0.1;
239
+ export const EPS2: 0.01;
240
+ export const EPS3: 0.001;
241
+ export const EPS4: 0.0001;
242
+ export const EPS5: 0.00001;
243
+ export const EPS6: 0.000001;
244
+ export const EPS7: 1e-7;
245
+ export const EPS8: 1e-8;
246
+ export const EPS9: 1e-9;
247
+ export const EPS10: 1e-10;
248
+ export const EPS11: 1e-11;
249
+ export const EPS12: 1e-12;
250
+ export const EPS13: 1e-13;
251
+ export const EPS14: 1e-14;
252
+ export const EPS15: 1e-15;
253
+ export const EPS16: 1e-16;
254
+ export const EPS17: 1e-17;
255
+ export const EPS18: 1e-18;
256
+ export const EPS19: 1e-19;
257
+ export const EPS20: 1e-20;
258
258
  /**
259
259
  * Equation function.
260
260
  */
@@ -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 };