@openglobus/og 0.11.1 → 0.11.6

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 (255) hide show
  1. package/package.json +18 -20
  2. package/src/og/Clock.js +11 -11
  3. package/src/og/Deferred.js +1 -1
  4. package/src/og/Events.js +9 -7
  5. package/src/og/Extent.js +117 -72
  6. package/src/og/Globe.js +35 -22
  7. package/src/og/ImageCanvas.js +24 -18
  8. package/src/og/Lock.js +2 -2
  9. package/src/og/LonLat.js +40 -37
  10. package/src/og/Popup.js +21 -15
  11. package/src/og/QueueArray.js +7 -3
  12. package/src/og/Rectangle.js +11 -6
  13. package/src/og/Stack.js +8 -5
  14. package/src/og/ajax.js +21 -33
  15. package/src/og/astro/astro.js +5 -5
  16. package/src/og/astro/earth.js +23 -17
  17. package/src/og/astro/jd.js +44 -39
  18. package/src/og/astro/orbit.js +20 -18
  19. package/src/og/astro/rotation.js +17 -8
  20. package/src/og/bv/Box.js +7 -3
  21. package/src/og/bv/Sphere.js +17 -9
  22. package/src/og/camera/Camera.js +137 -86
  23. package/src/og/camera/Frustum.js +30 -19
  24. package/src/og/camera/PlanetCamera.js +30 -26
  25. package/src/og/control/CompassButton.js +8 -2
  26. package/src/og/control/Control.js +13 -11
  27. package/src/og/control/DebugInfo.js +4 -1
  28. package/src/og/control/EarthCoordinates.js +62 -41
  29. package/src/og/control/EarthNavigation.js +20 -22
  30. package/src/og/control/GeoImageDragControl.js +1 -1
  31. package/src/og/control/KeyboardNavigation.js +12 -12
  32. package/src/og/control/LayerSwitcher.js +24 -23
  33. package/src/og/control/Lighting.js +1 -1
  34. package/src/og/control/MouseNavigation.js +1 -1
  35. package/src/og/control/ScaleControl.js +1 -1
  36. package/src/og/control/SegmentBoundVisualization.js +8 -9
  37. package/src/og/control/ShowFps.js +15 -10
  38. package/src/og/control/SimpleNavigation.js +8 -10
  39. package/src/og/control/Sun.js +25 -15
  40. package/src/og/control/ToggleWireframe.js +5 -5
  41. package/src/og/control/TouchNavigation.js +58 -45
  42. package/src/og/control/ZoomControl.js +41 -25
  43. package/src/og/control/index.js +4 -0
  44. package/src/og/ellipsoid/Ellipsoid.js +181 -85
  45. package/src/og/ellipsoid/wgs84.js +4 -4
  46. package/src/og/entity/BaseBillboard.js +97 -44
  47. package/src/og/entity/Billboard.js +15 -11
  48. package/src/og/entity/BillboardHandler.js +314 -64
  49. package/src/og/entity/Entity.js +106 -74
  50. package/src/og/entity/EntityCollection.js +72 -49
  51. package/src/og/entity/GeoObject.js +228 -0
  52. package/src/og/entity/GeoObjectHandler.js +910 -0
  53. package/src/og/entity/Geometry.js +29 -26
  54. package/src/og/entity/GeometryHandler.js +598 -126
  55. package/src/og/entity/Label.js +74 -40
  56. package/src/og/entity/LabelHandler.js +47 -246
  57. package/src/og/entity/LabelWorker.js +213 -0
  58. package/src/og/entity/Object3d.js +504 -0
  59. package/src/og/entity/PointCloud.js +81 -33
  60. package/src/og/entity/PointCloudHandler.js +9 -9
  61. package/src/og/entity/Polyline.js +39 -39
  62. package/src/og/entity/Ray.js +61 -28
  63. package/src/og/entity/ShapeHandler.js +1 -1
  64. package/src/og/entity/Strip.js +77 -48
  65. package/src/og/entity/StripHandler.js +27 -27
  66. package/src/og/entity/index.js +8 -16
  67. package/src/og/input/KeyboardHandler.js +107 -104
  68. package/src/og/input/MouseHandler.js +81 -78
  69. package/src/og/input/TouchHandler.js +55 -51
  70. package/src/og/layer/BaseGeoImage.js +61 -30
  71. package/src/og/layer/CanvasTiles.js +26 -24
  72. package/src/og/layer/GeoImage.js +10 -10
  73. package/src/og/layer/GeoTexture2d.js +1 -1
  74. package/src/og/layer/GeoVideo.js +3 -3
  75. package/src/og/layer/KML.js +66 -40
  76. package/src/og/layer/Layer.js +27 -17
  77. package/src/og/layer/Material.js +93 -61
  78. package/src/og/layer/Vector.js +118 -72
  79. package/src/og/layer/WMS.js +36 -19
  80. package/src/og/layer/XYZ.js +55 -48
  81. package/src/og/light/LightSource.js +47 -40
  82. package/src/og/math/Line2.js +24 -24
  83. package/src/og/math/Line3.js +103 -102
  84. package/src/og/math/Mat3.js +134 -121
  85. package/src/og/math/Mat4.js +603 -459
  86. package/src/og/math/Plane.js +21 -20
  87. package/src/og/math/Quat.js +980 -927
  88. package/src/og/math/Ray.js +195 -187
  89. package/src/og/math/Vec2.js +127 -117
  90. package/src/og/math/Vec3.js +206 -176
  91. package/src/og/math/Vec4.js +49 -53
  92. package/src/og/math/coder.js +18 -18
  93. package/src/og/math.js +12 -12
  94. package/src/og/mercator.js +11 -11
  95. package/src/og/proj/EPSG3857.js +4 -4
  96. package/src/og/proj/EPSG4326.js +4 -4
  97. package/src/og/proj/Proj.js +31 -31
  98. package/src/og/quadTree/EntityCollectionNode.js +310 -300
  99. package/src/og/quadTree/Node.js +1008 -993
  100. package/src/og/renderer/Renderer.js +768 -747
  101. package/src/og/renderer/RendererEvents.js +9 -6
  102. package/src/og/scene/Axes.js +1 -1
  103. package/src/og/scene/BaseNode.js +8 -9
  104. package/src/og/scene/Planet.js +115 -87
  105. package/src/og/scene/RenderNode.js +29 -22
  106. package/src/og/scene/SkyBox.js +1 -1
  107. package/src/og/segment/Segment.js +1886 -1878
  108. package/src/og/segment/SegmentLonLat.js +298 -268
  109. package/src/og/segment/segmentHelper.js +11 -11
  110. package/src/og/shaders/bloom.js +1 -1
  111. package/src/og/shaders/blur.js +2 -2
  112. package/src/og/shaders/depth.js +1 -1
  113. package/src/og/shaders/geoObject.js +211 -0
  114. package/src/og/shaders/label.js +1 -1
  115. package/src/og/shaders/lumFilter.js +1 -1
  116. package/src/og/shaders/pointCloud.js +42 -42
  117. package/src/og/shaders/screenFrame.js +1 -1
  118. package/src/og/shaders/shape.js +15 -21
  119. package/src/og/shaders/skybox.js +37 -37
  120. package/src/og/shaders/toneMapping.js +1 -1
  121. package/src/og/shapes/BaseShape.js +129 -57
  122. package/src/og/shapes/Icosphere.js +30 -15
  123. package/src/og/shapes/Sphere.js +13 -16
  124. package/src/og/terrain/BilTerrain.js +2 -1
  125. package/src/og/terrain/EmptyTerrain.js +2 -2
  126. package/src/og/terrain/Geoid.js +2 -2
  127. package/src/og/terrain/GlobusTerrain.js +10 -10
  128. package/src/og/terrain/MapboxTerrain.js +1 -1
  129. package/src/og/utils/GeoImageCreator.js +9 -9
  130. package/src/og/utils/Loader.js +6 -6
  131. package/src/og/utils/NormalMapCreator.js +13 -13
  132. package/src/og/utils/TerrainWorker.js +1 -1
  133. package/src/og/utils/TextureAtlas.js +20 -22
  134. package/src/og/utils/VectorTileCreator.js +5 -5
  135. package/src/og/utils/earcut.js +1 -1
  136. package/src/og/utils/shared.js +15 -15
  137. package/src/og/webgl/Framebuffer.js +101 -53
  138. package/src/og/webgl/Handler.js +125 -85
  139. package/src/og/webgl/Multisample.js +55 -27
  140. package/src/og/webgl/Program.js +80 -35
  141. package/src/og/webgl/ProgramController.js +27 -23
  142. package/src/og/webgl/callbacks.js +8 -8
  143. package/types/Clock.d.ts +6 -2
  144. package/types/Deferred.d.ts +1 -1
  145. package/types/Events.d.ts +8 -4
  146. package/types/Extent.d.ts +37 -33
  147. package/types/Globe.d.ts +15 -13
  148. package/types/ImageCanvas.d.ts +5 -3
  149. package/types/LonLat.d.ts +24 -24
  150. package/types/Popup.d.ts +4 -0
  151. package/types/QueueArray.d.ts +6 -2
  152. package/types/Rectangle.d.ts +10 -4
  153. package/types/Stack.d.ts +4 -0
  154. package/types/ajax.d.ts +1 -1
  155. package/types/astro/earth.d.ts +3 -2
  156. package/types/bv/Box.d.ts +10 -5
  157. package/types/bv/Sphere.d.ts +13 -7
  158. package/types/camera/Camera.d.ts +90 -81
  159. package/types/camera/Frustum.d.ts +26 -22
  160. package/types/camera/PlanetCamera.d.ts +49 -53
  161. package/types/control/CompassButton.d.ts +4 -4
  162. package/types/control/Control.d.ts +7 -4
  163. package/types/control/DebugInfo.d.ts +3 -4
  164. package/types/control/EarthCoordinates.d.ts +6 -6
  165. package/types/control/EarthNavigation.d.ts +42 -0
  166. package/types/control/KeyboardNavigation.d.ts +3 -4
  167. package/types/control/LayerSwitcher.d.ts +3 -5
  168. package/types/control/Lighting.d.ts +3 -3
  169. package/types/control/MouseNavigation.d.ts +47 -0
  170. package/types/control/ScaleControl.d.ts +3 -3
  171. package/types/control/ShowFps.d.ts +3 -4
  172. package/types/control/SimpleNavigation.d.ts +3 -6
  173. package/types/control/Sun.d.ts +8 -10
  174. package/types/control/ToggleWireframe.d.ts +3 -3
  175. package/types/control/TouchNavigation.d.ts +48 -0
  176. package/types/control/ZoomControl.d.ts +3 -4
  177. package/types/control/index.d.ts +3 -1
  178. package/types/ellipsoid/Ellipsoid.d.ts +47 -43
  179. package/types/ellipsoid/wgs84.d.ts +3 -2
  180. package/types/entity/BaseBillboard.d.ts +41 -34
  181. package/types/entity/Billboard.d.ts +7 -7
  182. package/types/entity/BillboardHandler.d.ts +4 -0
  183. package/types/entity/Entity.d.ts +101 -83
  184. package/types/entity/EntityCollection.d.ts +57 -43
  185. package/types/entity/GeoObject.d.ts +111 -0
  186. package/types/entity/GeoObjectHandler.d.ts +77 -0
  187. package/types/entity/Geometry.d.ts +9 -7
  188. package/types/entity/GeometryHandler.d.ts +2 -2
  189. package/types/entity/Label.d.ts +24 -29
  190. package/types/entity/LabelHandler.d.ts +9 -2
  191. package/types/entity/LabelWorker.d.ts +9 -0
  192. package/types/entity/PointCloud.d.ts +8 -8
  193. package/types/entity/PointCloudHandler.d.ts +3 -3
  194. package/types/entity/Polyline.d.ts +58 -55
  195. package/types/entity/Ray.d.ts +19 -18
  196. package/types/entity/Strip.d.ts +8 -7
  197. package/types/entity/StripHandler.d.ts +3 -3
  198. package/types/entity/index.d.ts +7 -7
  199. package/types/input/KeyboardHandler.d.ts +10 -0
  200. package/types/input/MouseHandler.d.ts +5 -0
  201. package/types/input/TouchHandler.d.ts +5 -0
  202. package/types/layer/BaseGeoImage.d.ts +23 -35
  203. package/types/layer/CanvasTiles.d.ts +15 -22
  204. package/types/layer/GeoImage.d.ts +5 -18
  205. package/types/layer/GeoVideo.d.ts +5 -30
  206. package/types/layer/KML.d.ts +20 -15
  207. package/types/layer/Layer.d.ts +326 -0
  208. package/types/layer/Material.d.ts +45 -0
  209. package/types/layer/Vector.d.ts +208 -0
  210. package/types/layer/WMS.d.ts +4 -7
  211. package/types/layer/XYZ.d.ts +19 -25
  212. package/types/light/LightSource.d.ts +54 -53
  213. package/types/math/Line2.d.ts +11 -0
  214. package/types/math/Line3.d.ts +10 -0
  215. package/types/math/Mat3.d.ts +30 -18
  216. package/types/math/Mat4.d.ts +71 -52
  217. package/types/math/Plane.d.ts +5 -4
  218. package/types/math/Quat.d.ts +379 -0
  219. package/types/math/Ray.d.ts +82 -0
  220. package/types/math/Vec2.d.ts +102 -101
  221. package/types/math/Vec3.d.ts +143 -142
  222. package/types/math/Vec4.d.ts +40 -39
  223. package/types/math/coder.d.ts +12 -11
  224. package/types/math.d.ts +8 -8
  225. package/types/mercator.d.ts +3 -3
  226. package/types/proj/EPSG3857.d.ts +3 -2
  227. package/types/proj/EPSG4326.d.ts +3 -2
  228. package/types/proj/Proj.d.ts +42 -0
  229. package/types/quadTree/EntityCollectionNode.d.ts +34 -0
  230. package/types/quadTree/Node.d.ts +61 -0
  231. package/types/renderer/Renderer.d.ts +300 -0
  232. package/types/renderer/RendererEvents.d.ts +10 -7
  233. package/types/scene/BaseNode.d.ts +9 -9
  234. package/types/scene/Planet.d.ts +131 -126
  235. package/types/scene/RenderNode.d.ts +22 -23
  236. package/types/segment/Segment.d.ts +279 -0
  237. package/types/segment/SegmentLonLat.d.ts +16 -0
  238. package/types/shaders/geoObject.d.ts +3 -0
  239. package/types/shapes/BaseShape.d.ts +43 -40
  240. package/types/shapes/Sphere.d.ts +7 -7
  241. package/types/terrain/BilTerrain.d.ts +0 -1
  242. package/types/terrain/EmptyTerrain.d.ts +4 -4
  243. package/types/terrain/GlobusTerrain.d.ts +17 -54
  244. package/types/terrain/MapboxTerrain.d.ts +0 -1
  245. package/types/utils/GeoImageCreator.d.ts +3 -2
  246. package/types/utils/TextureAtlas.d.ts +8 -8
  247. package/types/utils/shared.d.ts +25 -24
  248. package/types/webgl/Framebuffer.d.ts +5 -5
  249. package/types/webgl/Handler.d.ts +68 -43
  250. package/types/webgl/Multisample.d.ts +5 -5
  251. package/types/webgl/Program.d.ts +8 -2
  252. package/types/webgl/ProgramController.d.ts +18 -13
  253. package/src/og/inherits.js +0 -8
  254. package/src/og/utils/polylabel.js +0 -176
  255. package/types/inherits.d.ts +0 -4
@@ -2,11 +2,11 @@
2
2
  * Base prototype for billboard and label classes.
3
3
  * @class
4
4
  * @param {Object} [options] - Options:
5
- * @param {og.Vec3|Array.<number>} [options.position] - Billboard spatial position.
5
+ * @param {Vec3|Array.<number>} [options.position] - Billboard spatial position.
6
6
  * @param {number} [options.rotation] - Screen angle rotaion.
7
- * @param {og.Vec4|string|Array.<number>} [options.color] - Billboard color.
8
- * @param {og.Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
9
- * @param {og.Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
7
+ * @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
8
+ * @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
9
+ * @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
10
10
  * @param {boolean} [options.visibility] - Visibility.
11
11
  */
12
12
  export class BaseBillboard {
@@ -23,9 +23,9 @@ export class BaseBillboard {
23
23
  /**
24
24
  * Billboard center cartesian position.
25
25
  * @protected
26
- * @type {og.Vec3}
26
+ * @type {Vec3}
27
27
  */
28
- protected _position: any;
28
+ protected _position: Vec3;
29
29
  _positionHigh: Vec3;
30
30
  _positionLow: Vec3;
31
31
  /**
@@ -37,21 +37,21 @@ export class BaseBillboard {
37
37
  /**
38
38
  * RGBA color.
39
39
  * @protected
40
- * @type {og.Vec4}
40
+ * @type {Vec4}
41
41
  */
42
- protected _color: any;
42
+ protected _color: Vec4;
43
43
  /**
44
44
  * Cartesian aligned axis vector.
45
45
  * @protected
46
- * @type {og.Vec3}
46
+ * @type {Vec3}
47
47
  */
48
- protected _alignedAxis: any;
48
+ protected _alignedAxis: Vec3;
49
49
  /**
50
50
  * Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.
51
51
  * @protected
52
- * @type {og.math.Vecto3}
52
+ * @type {math.Vecto3}
53
53
  */
54
- protected _offset: any;
54
+ protected _offset: math.Vecto3;
55
55
  /**
56
56
  * Billboard visibility.
57
57
  * @protected
@@ -61,21 +61,28 @@ export class BaseBillboard {
61
61
  /**
62
62
  * Entity instance that holds this billboard.
63
63
  * @protected
64
- * @type {og.Entity}
64
+ * @type {Entity}
65
65
  */
66
- protected _entity: any;
66
+ protected _entity: Entity;
67
67
  /**
68
68
  * Handler that stores and renders this billboard object.
69
69
  * @protected
70
- * @type {og.BillboardHandler}
70
+ * @type {BillboardHandler}
71
71
  */
72
- protected _handler: any;
72
+ protected _handler: BillboardHandler;
73
73
  /**
74
74
  * Billboard handler array index.
75
75
  * @protected
76
76
  * @type {number}
77
77
  */
78
78
  protected _handlerIndex: number;
79
+ /**
80
+ * An indication that the object is ready to draw
81
+ * @protected
82
+ * @type {number}
83
+ */
84
+ protected _isReady: number;
85
+ _lockId: number;
79
86
  /**
80
87
  * Sets billboard position.
81
88
  * @public
@@ -87,15 +94,15 @@ export class BaseBillboard {
87
94
  /**
88
95
  * Sets billboard position.
89
96
  * @public
90
- * @param {og.Vec3} position - Cartesian coordinates.
97
+ * @param {Vec3} position - Cartesian coordinates.
91
98
  */
92
- public setPosition3v(position: any): void;
99
+ public setPosition3v(position: Vec3): void;
93
100
  /**
94
101
  * Returns billboard position.
95
102
  * @public
96
- * @returns {og.Vec3}
103
+ * @returns {Vec3}
97
104
  */
98
- public getPosition(): any;
105
+ public getPosition(): Vec3;
99
106
  /**
100
107
  * Sets screen space offset.
101
108
  * @public
@@ -107,15 +114,15 @@ export class BaseBillboard {
107
114
  /**
108
115
  * Sets screen space offset.
109
116
  * @public
110
- * @param {og.Vec2} offset - Offset size.
117
+ * @param {Vec2} offset - Offset size.
111
118
  */
112
- public setOffset3v(offset: any): void;
119
+ public setOffset3v(offset: Vec2): void;
113
120
  /**
114
121
  * Returns billboard screen space offset size.
115
122
  * @public
116
- * @returns {og.Vec3}
123
+ * @returns {Vec3}
117
124
  */
118
- public getOffset(): any;
125
+ public getOffset(): Vec3;
119
126
  /**
120
127
  * Sets billboard screen space rotation in radians.
121
128
  * @public
@@ -146,9 +153,9 @@ export class BaseBillboard {
146
153
  /**
147
154
  * Sets RGBA color. Each channel from 0.0 to 1.0.
148
155
  * @public
149
- * @param {og.Vec4} color - RGBA vector.
156
+ * @param {Vec4} color - RGBA vector.
150
157
  */
151
- public setColor4v(color: any): void;
158
+ public setColor4v(color: Vec4): void;
152
159
  /**
153
160
  * Sets billboard color.
154
161
  * @public
@@ -158,9 +165,9 @@ export class BaseBillboard {
158
165
  /**
159
166
  * Returns RGBA color.
160
167
  * @public
161
- * @returns {og.Vec4}
168
+ * @returns {Vec4}
162
169
  */
163
- public getColor(): any;
170
+ public getColor(): Vec4;
164
171
  /**
165
172
  * Sets billboard visibility.
166
173
  * @public
@@ -184,15 +191,15 @@ export class BaseBillboard {
184
191
  /**
185
192
  * Sets billboard aligned vector.
186
193
  * @public
187
- * @param {og.math.Vecto3} alignedAxis - Vector to align.
194
+ * @param {math.Vecto3} alignedAxis - Vector to align.
188
195
  */
189
- public setAlignedAxis3v(alignedAxis: any): void;
196
+ public setAlignedAxis3v(alignedAxis: math.Vecto3): void;
190
197
  /**
191
198
  * Returns aligned vector.
192
199
  * @public
193
- * @returns {og.Vec3}
200
+ * @returns {Vec3}
194
201
  */
195
- public getAlignedAxis(): any;
202
+ public getAlignedAxis(): Vec3;
196
203
  /**
197
204
  * Removes billboard from hander.
198
205
  * @public
@@ -201,8 +208,8 @@ export class BaseBillboard {
201
208
  /**
202
209
  * Sets billboard picking color.
203
210
  * @public
204
- * @param {og.Vec3} color - Picking color.
211
+ * @param {Vec3} color - Picking color.
205
212
  */
206
- public setPickingColor3v(color: any): void;
213
+ public setPickingColor3v(color: Vec3): void;
207
214
  }
208
215
  import { Vec3 } from "../math/Vec3.js";
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Represents basic quad billboard image.
3
3
  * @class
4
- * @extends {og.BaseBillboard}
4
+ * @extends {BaseBillboard}
5
5
  * @param {Object} [options] - Options:
6
- * @param {og.Vec3|Array.<number>} [options.position] - Billboard spatial position.
6
+ * @param {Vec3|Array.<number>} [options.position] - Billboard spatial position.
7
7
  * @param {number} [options.rotation] - Screen angle rotaion.
8
- * @param {og.Vec4|string|Array.<number>} [options.color] - Billboard color.
9
- * @param {og.Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
10
- * @param {og.Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
8
+ * @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
9
+ * @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
10
+ * @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
11
11
  * @param {boolean} [options.visibility] - Visibility.
12
12
  * @param {string} [options.src] - Billboard image url source.
13
13
  * @param {Image} [options.image] - Billboard image object.
@@ -15,8 +15,7 @@
15
15
  * @param {number} [options.height] - Screen height.
16
16
  * @param {number} [options.scale] - Billboard scale.
17
17
  */
18
- export class Billboard {
19
- constructor(options: any);
18
+ export class Billboard extends BaseBillboard {
20
19
  /**
21
20
  * Image src.
22
21
  * @protected
@@ -92,3 +91,4 @@ export class Billboard {
92
91
  */
93
92
  public getHeight(): number;
94
93
  }
94
+ import { BaseBillboard } from "./BaseBillboard.js";
@@ -2,6 +2,10 @@ export class BillboardHandler {
2
2
  static set _staticCounter(arg: any);
3
3
  static get _staticCounter(): any;
4
4
  static concArr(dest: any, curr: any): void;
5
+ /**
6
+ *
7
+ * @param {*} entityCollection
8
+ */
5
9
  constructor(entityCollection: any);
6
10
  /**
7
11
  * Picking rendering option.
@@ -5,8 +5,8 @@
5
5
  * @class
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
- * @param {og.Vec3|Array.<number>} [options.cartesian] - Spatial entities like billboard, label, sphere etc. cartesian position.
9
- * @param {og.LonLat} [options.lonlat] - Geodetic coordiantes for an entities like billboard, label, sphere etc.
8
+ * @param {Vec3|Array.<number>} [options.cartesian] - Spatial entities like billboard, label, sphere etc. cartesian position.
9
+ * @param {LonLat} [options.lonlat] - Geodetic coordiantes for an entities like billboard, label, sphere 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}).
@@ -38,33 +38,33 @@ export class Entity {
38
38
  /**
39
39
  * Children entities.
40
40
  * @public
41
- * @type {Array.<og.Entity>}
41
+ * @type {Array.<Entity>}
42
42
  */
43
- public childrenNodes: Array<any>;
43
+ public childrenNodes: Array<Entity>;
44
44
  /**
45
45
  * Parent entity.
46
46
  * @public
47
- * @type {og.Entity}
47
+ * @type {Entity}
48
48
  */
49
- public parent: any;
49
+ public parent: Entity;
50
50
  /**
51
51
  * Entity cartesian position.
52
52
  * @protected
53
- * @type {og.Vec3}
53
+ * @type {Vec3}
54
54
  */
55
- protected _cartesian: any;
55
+ protected _cartesian: Vec3;
56
56
  /**
57
57
  * Geodetic entity coordiantes.
58
58
  * @protected
59
- * @type {og.LonLat}
59
+ * @type {LonLat}
60
60
  */
61
- protected _lonlat: any;
61
+ protected _lonlat: LonLat;
62
62
  /**
63
63
  * World Mercator entity coordinates.
64
64
  * @protected
65
- * @type {og.LonLat}
65
+ * @type {LonLat}
66
66
  */
67
- protected _lonlatMerc: any;
67
+ protected _lonlatMerc: LonLat;
68
68
  /**
69
69
  * Entity visible terrain altitude.
70
70
  * @protected
@@ -80,9 +80,9 @@ export class Entity {
80
80
  /**
81
81
  * Entity collection that this entity belongs to.
82
82
  * @protected
83
- * @type {og.EntityCollection}
83
+ * @type {EntityCollection}
84
84
  */
85
- protected _entityCollection: any;
85
+ protected _entityCollection: EntityCollection;
86
86
  /**
87
87
  * Entity collection array store index.
88
88
  * @protected
@@ -92,9 +92,9 @@ export class Entity {
92
92
  /**
93
93
  * Assigned vector layer pointer.
94
94
  * @protected
95
- * @type {og.layer.Vector}
95
+ * @type {layer.Vector}
96
96
  */
97
- protected _layer: any;
97
+ protected _layer: layer.Vector;
98
98
  /**
99
99
  * Assigned vector layer entity array index.
100
100
  * @protected
@@ -104,78 +104,85 @@ export class Entity {
104
104
  /**
105
105
  * Picking color.
106
106
  * @protected
107
- * @type {og.Vec3}
107
+ * @type {Vec3}
108
108
  */
109
- protected _pickingColor: any;
109
+ protected _pickingColor: Vec3;
110
110
  _featureConstructorArray: {
111
- billboard: (typeof Billboard | ((billboard: any) => any))[];
112
- label: (typeof Label | ((label: any) => any))[];
113
- sphere: (typeof Sphere | ((shape: any) => any))[];
114
- polyline: (typeof Polyline | ((polyline: any) => any))[];
115
- pointCloud: (typeof PointCloud | ((pointCloud: any) => any))[];
116
- geometry: (typeof Geometry | ((geometry: any) => any))[];
117
- strip: (typeof Strip | ((strip: any) => any))[];
118
- ray: (typeof Ray | ((ray: any) => any))[];
111
+ billboard: (typeof Billboard | ((billboard: Billboard) => Billboard))[];
112
+ label: (typeof Label | ((label: Label) => Label))[];
113
+ sphere: (typeof Sphere | ((shape: BaseShape) => Polyline))[];
114
+ polyline: (typeof Polyline | ((polyline: Polyline) => Polyline))[];
115
+ pointCloud: (typeof PointCloud | ((pointCloud: PointCloud) => PointCloud))[];
116
+ geometry: (typeof Geometry | ((geometry: Geometry) => Geometry))[];
117
+ geoObject: (typeof GeoObject | ((geoObject: GeoObject) => GeoObject))[];
118
+ strip: (typeof Strip | ((strip: Strip) => Strip))[];
119
+ ray: (typeof Ray | ((ray: Ray) => Ray))[];
119
120
  };
120
121
  /**
121
122
  * Billboard entity.
122
123
  * @public
123
- * @type {og.Billboard}
124
+ * @type {Billboard}
124
125
  */
125
- public billboard: any;
126
+ public billboard: Billboard;
126
127
  /**
127
128
  * Text label entity.
128
129
  * @public
129
- * @type {og.Label}
130
+ * @type {Label}
130
131
  */
131
- public label: any;
132
+ public label: Label;
132
133
  /**
133
134
  * Shape entity.
134
135
  * @public
135
- * @type {og.shape.BaseShape}
136
+ * @type {shape.BaseShape}
136
137
  */
137
- public shape: any;
138
+ public shape: shape.BaseShape;
138
139
  /**
139
140
  * Polyline entity.
140
141
  * @public
141
- * @type {og.Polyline}
142
+ * @type {Polyline}
142
143
  */
143
- public polyline: any;
144
+ public polyline: Polyline;
144
145
  /**
145
146
  * Ray entity.
146
147
  * @public
147
- * @type {og.ray}
148
+ * @type {ray}
148
149
  */
149
- public ray: any;
150
+ public ray: ray;
150
151
  /**
151
152
  * PointCloud entity.
152
153
  * @public
153
- * @type {og.PointCloud}
154
+ * @type {PointCloud}
154
155
  */
155
- public pointCloud: any;
156
+ public pointCloud: PointCloud;
156
157
  /**
157
158
  * Geometry entity(available for vector layer only).
158
159
  * @public
160
+ * @type {Geometry}
161
+ */
162
+ public geometry: Geometry;
163
+ /**
164
+ * Geo object entity
165
+ * @public
159
166
  * @type {og.Geometry}
160
167
  */
161
- public geometry: any;
168
+ public geoObject: og.Geometry;
162
169
  /**
163
170
  * Strip entity.
164
171
  * @public
165
- * @type {og.Strip}
172
+ * @type {Strip}
166
173
  */
167
- public strip: any;
174
+ public strip: Strip;
168
175
  get instanceName(): string;
169
176
  _createOptionFeature(featureName: any, options: any): any;
170
177
  getCollectionIndex(): number;
171
178
  /**
172
179
  * Adds current entity into the specified entity collection.
173
180
  * @public
174
- * @param {og.EntityCollection|og.layer.Vector} collection - Specified entity collection or vector layer.
181
+ * @param {EntityCollection|Vector} collection - Specified entity collection or vector layer.
175
182
  * @param {Boolean} [rightNow=false] - Entity insertion option for vector layer.
176
- * @returns {og.Entity} - This object.
183
+ * @returns {Entity} - This object.
177
184
  */
178
- public addTo(collection: any | any, rightNow?: boolean): any;
185
+ public addTo(collection: EntityCollection | Vector, rightNow?: boolean): Entity;
179
186
  /**
180
187
  * Removes current entity from collection and layer.
181
188
  * @public
@@ -196,9 +203,9 @@ export class Entity {
196
203
  /**
197
204
  * Sets entity cartesian position.
198
205
  * @public
199
- * @param {og.Vec3} cartesian - Cartesian position in 3d space.
206
+ * @param {Vec3} cartesian - Cartesian position in 3d space.
200
207
  */
201
- public setCartesian3v(cartesian: any): void;
208
+ public setCartesian3v(cartesian: Vec3): void;
202
209
  /**
203
210
  * Sets entity cartesian position.
204
211
  * @public
@@ -210,22 +217,22 @@ export class Entity {
210
217
  /**
211
218
  * Sets entity cartesian position without event dispatching.
212
219
  * @protected
213
- * @param {og.Vec3} cartesian - Cartesian position in 3d space.
220
+ * @param {Vec3} cartesian - Cartesian position in 3d space.
214
221
  * @param {boolean} skipLonLat - skip geodetic calculation.
215
222
  */
216
- protected _setCartesian3vSilent(cartesian: any, skipLonLat: boolean): void;
223
+ protected _setCartesian3vSilent(cartesian: Vec3, skipLonLat: boolean): void;
217
224
  /**
218
225
  * Gets entity geodetic coordinates.
219
226
  * @public
220
- * @returns {og.LonLat} -
227
+ * @returns {LonLat} -
221
228
  */
222
- public getLonLat(): any;
229
+ public getLonLat(): LonLat;
223
230
  /**
224
231
  * Sets geodetic coordinates of the entity point object.
225
232
  * @public
226
- * @param {og.LonLat} lonlat - WGS84 coordinates.
233
+ * @param {LonLat} lonlat - WGS84 coordinates.
227
234
  */
228
- public setLonLat(lonlat: any): void;
235
+ public setLonLat(lonlat: LonLat): void;
229
236
  /**
230
237
  * Sets entity altitude over the planet.
231
238
  * @public
@@ -241,73 +248,80 @@ export class Entity {
241
248
  /**
242
249
  * Returns carteain position.
243
250
  * @public
244
- * @returns {og.Vec3} -
251
+ * @returns {Vec3} -
245
252
  */
246
- public getCartesian(): any;
253
+ public getCartesian(): Vec3;
247
254
  /**
248
255
  * Sets entity billboard.
249
256
  * @public
250
- * @param {og.Billboard} billboard - Billboard object.
251
- * @returns {og.Billboard} -
257
+ * @param {Billboard} billboard - Billboard object.
258
+ * @returns {Billboard} -
252
259
  */
253
- public setBillboard(billboard: any): any;
260
+ public setBillboard(billboard: Billboard): Billboard;
254
261
  /**
255
262
  * Sets entity label.
256
263
  * @public
257
- * @param {og.Label} label - Text label.
258
- * @returns {og.Label} -
264
+ * @param {Label} label - Text label.
265
+ * @returns {Label} -
259
266
  */
260
- public setLabel(label: any): any;
267
+ public setLabel(label: Label): Label;
261
268
  /**
262
269
  * Sets entity ray.
263
270
  * @public
264
- * @param {og.Ray} ray - Ray object.
265
- * @returns {og.Ray} -
271
+ * @param {Ray} ray - Ray object.
272
+ * @returns {Ray} -
266
273
  */
267
- public setRay(ray: any): any;
274
+ public setRay(ray: Ray): Ray;
268
275
  /**
269
276
  * Sets entity shape.
270
277
  * @public
271
- * @param {og.BaseShape} shape - Shape object.
272
- * @returns {og.Polyline} -
278
+ * @param {BaseShape} shape - Shape object.
279
+ * @returns {Polyline} -
273
280
  */
274
- public setShape(shape: any): any;
281
+ public setShape(shape: BaseShape): Polyline;
275
282
  /**
276
283
  * Sets entity polyline.
277
284
  * @public
278
- * @param {og.Polyline} polyline - Polyline object.
279
- * @returns {og.Polyline} -
285
+ * @param {Polyline} polyline - Polyline object.
286
+ * @returns {Polyline} -
280
287
  */
281
- public setPolyline(polyline: any): any;
288
+ public setPolyline(polyline: Polyline): Polyline;
282
289
  /**
283
290
  * Sets entity pointCloud.
284
291
  * @public
285
- * @param {og.PointCloud} pointCloud - PointCloud object.
286
- * @returns {og.PointCloud} -
292
+ * @param {PointCloud} pointCloud - PointCloud object.
293
+ * @returns {PointCloud} -
287
294
  */
288
- public setPointCloud(pointCloud: any): any;
295
+ public setPointCloud(pointCloud: PointCloud): PointCloud;
289
296
  /**
290
297
  * Sets entity geometry.
291
298
  * @public
292
- * @param {og.Geometry} geometry - Geometry object.
293
- * @returns {og.Geometry} -
299
+ * @param {Geometry} geometry - Geometry object.
300
+ * @returns {Geometry} -
301
+ */
302
+ public setGeometry(geometry: Geometry): Geometry;
303
+ /**
304
+ * Sets entity geoObject.
305
+ * @public
306
+ * @param {GeoObject} geoObject - GeoObject.
307
+ * @returns {GeoObject} -
294
308
  */
295
- public setGeometry(geometry: any): any;
309
+ public setGeoObject(geoObject: GeoObject): GeoObject;
296
310
  /**
297
311
  * Sets entity strip.
298
312
  * @public
299
- * @param {og.Strip} strip - Strip object.
300
- * @returns {og.Strip} -
313
+ * @param {Strip} strip - Strip object.
314
+ * @returns {Strip} -
301
315
  */
302
- public setStrip(strip: any): any;
303
- get layer(): any;
316
+ public setStrip(strip: Strip): Strip;
317
+ get layer(): layer.Vector;
304
318
  get rendererEvents(): any;
305
319
  /**
306
320
  * Append child entity.
307
321
  * @public
308
- * @param {og.Entity} entity - Child entity.
322
+ * @param {Entity} entity - Child entity.
309
323
  */
310
- public appendChild(entity: any): void;
324
+ public appendChild(entity: Entity): void;
311
325
  /**
312
326
  * Appends entity items(billboard, label etc.) picking color.
313
327
  * @public
@@ -315,16 +329,20 @@ export class Entity {
315
329
  public setPickingColor(): void;
316
330
  /**
317
331
  * Return geodethic extent.
318
- * @returns {og.Extent} -
332
+ * @returns {Extent} -
319
333
  */
320
- getExtent(): any;
334
+ getExtent(): Extent;
321
335
  isEqual(entity: any): boolean;
322
336
  }
337
+ import { Vec3 } from "../math/Vec3.js";
338
+ import { LonLat } from "../LonLat.js";
323
339
  import { Billboard } from "./Billboard.js";
324
340
  import { Label } from "./Label.js";
325
341
  import { Sphere } from "../shapes/Sphere.js";
326
342
  import { Polyline } from "./Polyline.js";
327
343
  import { PointCloud } from "./PointCloud.js";
328
344
  import { Geometry } from "./Geometry.js";
345
+ import { GeoObject } from "./GeoObject.js";
329
346
  import { Strip } from "./Strip.js";
330
347
  import { Ray } from "./Ray.js";
348
+ import { Extent } from "../Extent.js";