@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
@@ -3,7 +3,7 @@
3
3
  * Entity collection provide handlers for an each type of entity like billboard, label or 3ds object.
4
4
  * @constructor
5
5
  * @param {Object} [options] - Entity options:
6
- * @param {Array.<og.Entity>} [options.entities] - Entities array.
6
+ * @param {Array.<Entity>} [options.entities] - Entities array.
7
7
  * @param {boolean} [options.visibility=true] - Entity visibility.
8
8
  * @param {Array.<number>} [options.scaleByDistance] - Entity scale by distance parameters. (exactly 3 entries)
9
9
  * First index - near distance to the entity, after entity becomes full scale.
@@ -66,9 +66,9 @@ export class EntityCollection {
66
66
  /**
67
67
  * Render node context.
68
68
  * @public
69
- * @type {og.scene.RenderNode}
69
+ * @type {RenderNode}
70
70
  */
71
- public renderNode: any;
71
+ public renderNode: RenderNode;
72
72
  /**
73
73
  * Visibility option.
74
74
  * @protected
@@ -90,59 +90,65 @@ export class EntityCollection {
90
90
  /**
91
91
  * Billboards handler
92
92
  * @public
93
- * @type {og.BillboardHandler}
93
+ * @type {BillboardHandler}
94
94
  */
95
- public billboardHandler: any;
95
+ public billboardHandler: BillboardHandler;
96
96
  /**
97
97
  * Labels handler
98
98
  * @public
99
- * @type {og.LabelHandler}
99
+ * @type {LabelHandler}
100
100
  */
101
- public labelHandler: any;
101
+ public labelHandler: LabelHandler;
102
102
  /**
103
103
  * Shape handler
104
104
  * @public
105
- * @type {og.ShapeHandler}
105
+ * @type {ShapeHandler}
106
106
  */
107
- public shapeHandler: any;
107
+ public shapeHandler: ShapeHandler;
108
108
  /**
109
109
  * Polyline handler
110
110
  * @public
111
- * @type {og.PolylineHandler}
111
+ * @type {PolylineHandler}
112
112
  */
113
- public polylineHandler: any;
113
+ public polylineHandler: PolylineHandler;
114
114
  /**
115
115
  * Ray handler
116
116
  * @public
117
- * @type {og.RayHandler}
117
+ * @type {RayHandler}
118
118
  */
119
- public rayHandler: any;
119
+ public rayHandler: RayHandler;
120
120
  /**
121
121
  * PointCloud handler
122
122
  * @public
123
- * @type {og.PointCloudHandler}
123
+ * @type {PointCloudHandler}
124
124
  */
125
- public pointCloudHandler: any;
125
+ public pointCloudHandler: PointCloudHandler;
126
126
  /**
127
127
  * Strip handler
128
128
  * @public
129
- * @type {og.StripHandler}
129
+ * @type {StripHandler}
130
130
  */
131
- public stripHandler: any;
131
+ public stripHandler: StripHandler;
132
+ /**
133
+ * Geo object handler
134
+ * @public
135
+ * @type {og.GeoObjectHandler}
136
+ */
137
+ public geoObjectHandler: og.GeoObjectHandler;
132
138
  /**
133
139
  * Entities array.
134
140
  * @protected
135
- * @type {Array.<og.Entity>}
141
+ * @type {Array.<Entity>}
136
142
  */
137
- protected _entities: Array<any>;
143
+ protected _entities: Array<Entity>;
138
144
  /**
139
145
  * First index - near distance to the entity, after entity becomes full scale.
140
146
  * Second index - far distance to the entity, when entity becomes zero scale.
141
147
  * Third index - far distance to the entity, when entity becomes invisible.
142
148
  * @public
143
- * @type {Array.<number,number,number>}
149
+ * @type {Array.<number>} - (exactly 3 entries)
144
150
  */
145
- public scaleByDistance: Array<number, number, number>;
151
+ public scaleByDistance: Array<number>;
146
152
  pickingScale: any;
147
153
  /**
148
154
  * Global opacity.
@@ -159,10 +165,10 @@ export class EntityCollection {
159
165
  /**
160
166
  * Entity collection events handler.
161
167
  * @public
162
- * @type {og.Events}
168
+ * @type {Events}
163
169
  */
164
- public events: any;
165
- rendererEvents: any;
170
+ public events: Events;
171
+ rendererEvents: Events;
166
172
  setPolygonOffset(factor: any, units: any): void;
167
173
  /**
168
174
  * Sets collection visibility.
@@ -206,31 +212,31 @@ export class EntityCollection {
206
212
  /**
207
213
  * Adds entity to the collection and returns collection.
208
214
  * @public
209
- * @param {og.Entity} entity - Entity.
210
- * @returns {og.EntityCollection} -
215
+ * @param {Entity} entity - Entity.
216
+ * @returns {EntityCollection} -
211
217
  */
212
- public add(entity: any): any;
218
+ public add(entity: Entity): EntityCollection;
213
219
  /**
214
220
  * Adds entities array to the collection and returns collection.
215
221
  * @public
216
- * @param {Array.<og.Entity>} entities - Entities array.
217
- * @returns {og.EntityCollection} -
222
+ * @param {Array.<Entity>} entities - Entities array.
223
+ * @returns {EntityCollection} -
218
224
  */
219
- public addEntities(entities: Array<any>): any;
225
+ public addEntities(entities: Array<Entity>): EntityCollection;
220
226
  /**
221
227
  * Returns true if the entity belongs this collection, otherwise returns false.
222
228
  * @public
223
- * @param {og.Entity} entity - Entity.
229
+ * @param {Entity} entity - Entity.
224
230
  * @returns {boolean} -
225
231
  */
226
- public belongs(entity: any): boolean;
232
+ public belongs(entity: Entity): boolean;
227
233
  _removeRecursively(entity: any): void;
228
234
  /**
229
235
  * Removes entity from this collection.
230
236
  * @public
231
- * @param {og.Entity} entity - Entity to remove.
237
+ * @param {Entity} entity - Entity to remove.
232
238
  */
233
- public removeEntity(entity: any): void;
239
+ public removeEntity(entity: Entity): void;
234
240
  _removeEntitySilent(entity: any): void;
235
241
  /**
236
242
  * Creates or refresh collected entities picking color.
@@ -246,20 +252,20 @@ export class EntityCollection {
246
252
  /**
247
253
  * Adds this collection to render node.
248
254
  * @public
249
- * @param {og.scene.RenderNode} renderNode - Render node.
255
+ * @param {RenderNode} renderNode - Render node.
250
256
  * @param {boolean} [isHidden] - Uses in vector layers that render in planet render specific function.
251
- * @returns {og.EntityCollection} -
257
+ * @returns {EntityCollection} -
252
258
  */
253
- public addTo(renderNode: any, isHidden?: boolean): any;
259
+ public addTo(renderNode: RenderNode, isHidden?: boolean): EntityCollection;
254
260
  /**
255
261
  * This function is called in the RenderNode assign function.
256
- * @param {og.RenderNode} renderNode
262
+ * @param {RenderNode} renderNode
257
263
  */
258
- bindRenderNode(renderNode: any): void;
264
+ bindRenderNode(renderNode: RenderNode): void;
259
265
  /**
260
266
  * Updates coordiantes all lonLat entities in collection after collecction attached to the planet node.
261
267
  * @private
262
- * @param {og.Ellipsoid} ellipsoid - Globe ellipsoid.
268
+ * @param {Ellipsoid} ellipsoid - Globe ellipsoid.
263
269
  */
264
270
  private _updateGeodeticCoordinates;
265
271
  /**
@@ -280,9 +286,9 @@ export class EntityCollection {
280
286
  /**
281
287
  * Gets entity array.
282
288
  * @public
283
- * @returns {Array.<og.Entity>} -
289
+ * @returns {Array.<Entity>} -
284
290
  */
285
- public getEntities(): Array<any>;
291
+ public getEntities(): Array<Entity>;
286
292
  /**
287
293
  * Safety entities loop.
288
294
  * @public
@@ -297,7 +303,15 @@ export class EntityCollection {
297
303
  /**
298
304
  * Clears entity recursevely.
299
305
  * @private
300
- * @param {og.Entity} entity - Entity to clear.
306
+ * @param {Entity} entity - Entity to clear.
301
307
  */
302
308
  private _clearEntity;
303
309
  }
310
+ import { BillboardHandler } from "./BillboardHandler.js";
311
+ import { LabelHandler } from "./LabelHandler.js";
312
+ import { ShapeHandler } from "./ShapeHandler.js";
313
+ import { PolylineHandler } from "./PolylineHandler.js";
314
+ import { RayHandler } from "./RayHandler.js";
315
+ import { PointCloudHandler } from "./PointCloudHandler.js";
316
+ import { StripHandler } from "./StripHandler.js";
317
+ import { Events } from "../Events.js";
@@ -0,0 +1,111 @@
1
+ /**
2
+ * @class
3
+ * @param {Object} options - Geo object parameters:
4
+ * @param {og.Vec3} [options.position] - Geo object position.
5
+ */
6
+ export class GeoObject {
7
+ constructor(options: any);
8
+ scale: any;
9
+ scaleByDistance: Float32Array;
10
+ /**
11
+ * Geo object center cartesian position.
12
+ * @protected
13
+ * @type {og.Vec3}
14
+ */
15
+ protected _position: og.Vec3;
16
+ _positionHigh: Vec3;
17
+ _positionLow: Vec3;
18
+ _pitch: any;
19
+ _yaw: any;
20
+ _roll: any;
21
+ _planet: any;
22
+ _lonLatAlt: LonLat;
23
+ /**
24
+ * RGBA color.
25
+ * @protected
26
+ * @type {og.Vec4}
27
+ */
28
+ protected _color: og.Vec4;
29
+ _direction: Vec3;
30
+ _handler: any;
31
+ _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;
41
+ /**
42
+ * Sets geo object opacity.
43
+ * @public
44
+ * @param {number} a - Billboard opacity.
45
+ */
46
+ public setOpacity(a: number): void;
47
+ /**
48
+ * Sets RGBA color. Each channel from 0.0 to 1.0.
49
+ * @public
50
+ * @param {number} r - Red.
51
+ * @param {number} g - Green.
52
+ * @param {number} b - Blue.
53
+ * @param {number} a - Alpha.
54
+ */
55
+ public setColor(r: number, g: number, b: number, a: number): void;
56
+ /**
57
+ * Sets RGBA color. Each channel from 0.0 to 1.0.
58
+ * @public
59
+ * @param {og.Vec4} color - RGBA vector.
60
+ */
61
+ public setColor4v(color: og.Vec4): void;
62
+ /**
63
+ * Sets geo object visibility.
64
+ * @public
65
+ * @param {boolean} visibility - Visibility flag.
66
+ */
67
+ public setVisibility(visibility: boolean): void;
68
+ _visibility: boolean;
69
+ /**
70
+ * Returns geo object visibility.
71
+ * @public
72
+ * @returns {boolean}
73
+ */
74
+ public getVisibility(): boolean;
75
+ setLonLat(lon: any, lat: any, alt: any): void;
76
+ /**
77
+ * Sets geoObject position.
78
+ * @public
79
+ * @param {number} x - X coordinate.
80
+ * @param {number} y - Y coordinate.
81
+ * @param {number} z - Z coordinate.
82
+ */
83
+ public setPosition(x: number, y: number, z: number): void;
84
+ /**
85
+ * Sets billboard position.
86
+ * @public
87
+ * @param {og.Vec3} position - Cartesian coordinates.
88
+ */
89
+ public setPosition3v(position: og.Vec3): void;
90
+ setYaw(yaw: any): void;
91
+ setPitch(pitch: any): void;
92
+ setRoll(roll: any): void;
93
+ setScale(scale: any): void;
94
+ /**
95
+ * Removes geo object from handler.
96
+ * @public
97
+ */
98
+ public remove(): void;
99
+ _entity: any;
100
+ /**
101
+ * Sets billboard picking color.
102
+ * @public
103
+ * @param {og.Vec3} color - Picking color.
104
+ */
105
+ public setPickingColor3v(color: og.Vec3): void;
106
+ updateDirection(): void;
107
+ _qNorthFrame: Quat;
108
+ }
109
+ import { Vec3 } from "../math/index.js";
110
+ import { LonLat } from "../LonLat.js";
111
+ import { Quat } from "../math/index.js";
@@ -0,0 +1,77 @@
1
+ export class GeoObjectHandler {
2
+ static set _staticCounter(arg: any);
3
+ static get _staticCounter(): any;
4
+ constructor(entityCollection: any);
5
+ /**
6
+ * Picking rendering option.
7
+ * @public
8
+ * @type {boolean}
9
+ */
10
+ public pickingEnabled: boolean;
11
+ _entityCollection: any;
12
+ _renderer: any;
13
+ _planet: any;
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
+ _pitchRollBuffer: any[];
26
+ _sizeBuffer: any[];
27
+ _vertexBuffer: any[];
28
+ _positionHighBuffer: any[];
29
+ _positionLowBuffer: any[];
30
+ _directionBuffer: any[];
31
+ _rgbaBuffer: any[];
32
+ _normalsBuffer: any[];
33
+ _indicesBuffer: any[];
34
+ _pickingColorBuffer: any[];
35
+ __staticId: number;
36
+ _buffersUpdateCallbacks: (() => void)[];
37
+ _changedBuffers: any[];
38
+ _instancedTags: any;
39
+ getObjectByIndex(index: any): any;
40
+ createVertexBuffer(): void;
41
+ createPitchRollBuffer(): void;
42
+ createSizeBuffer(): void;
43
+ createPositionBuffer(): void;
44
+ createRgbaBuffer(): void;
45
+ createDirectionBuffer(): void;
46
+ createNormalsBuffer(): void;
47
+ createIndicesBuffer(): void;
48
+ createPickingColorBuffer(): void;
49
+ initProgram(): void;
50
+ setRenderNode(renderNode: any): void;
51
+ setRenderer(planet: any): void;
52
+ _addGeoObjectToArray(geoObject: any): void;
53
+ _displayPASS(): void;
54
+ drawPicking(): void;
55
+ _pickingPASS(): void;
56
+ _recalculateIndices(): void;
57
+ setVertexArr(index: any, vertexArr: any): void;
58
+ setDirectionArr(index: any, direction: any): void;
59
+ setVisibility(index: any, visibility: any): void;
60
+ setPositionArr(index: any, positionHigh: any, positionLow: any): void;
61
+ setRgbaArr(index: any, rgba: any): void;
62
+ getTagIndexByObjectIndex(index: any): any;
63
+ getTagDataByObjectIndex(index: any): any;
64
+ setPickingColorArr(index: any, color: any): void;
65
+ setPitchRollArr(index: any, pitch: any, roll: any): void;
66
+ setScaleArr(index: any, scale: any): void;
67
+ refresh(): void;
68
+ _removeGeoObjects(): void;
69
+ clear(): void;
70
+ _deleteBuffers(): void;
71
+ update(): void;
72
+ draw(): void;
73
+ _reindexGeoObjects(startIndex: any, tag: any): void;
74
+ add(geoObject: any): void;
75
+ remove(geoObject: any): void;
76
+ _removeGeoObject(geoObject: any): void;
77
+ }
@@ -6,18 +6,18 @@ export class Geometry {
6
6
  * Returns geometry feature extent.
7
7
  @static
8
8
  @param {Object} geometryObj - GeoJSON style geometry feature.
9
- @param {og.LonLat[]} outCoordinates - Geometry feature coordinates clone.
10
- @returns {og.Extent} -
9
+ @param {LonLat[]} outCoordinates - Geometry feature coordinates clone.
10
+ @returns {Extent} -
11
11
  */
12
- static getExtent(geometryObj: any, outCoordinates: any[]): any;
12
+ static getExtent(geometryObj: any, outCoordinates: LonLat[]): Extent;
13
13
  constructor(options: any);
14
14
  _id: number;
15
15
  /**
16
16
  * Entity instance that holds this geometry.
17
17
  * @protected
18
- * @type {og.Entity}
18
+ * @type {Entity}
19
19
  */
20
- protected _entity: any;
20
+ protected _entity: Entity;
21
21
  _handler: any;
22
22
  _handlerIndex: number;
23
23
  _polyVerticesHighMerc: any[];
@@ -40,7 +40,7 @@ export class Geometry {
40
40
  _lineColorsHandlerIndex: number;
41
41
  _type: any;
42
42
  _coordinates: any[];
43
- _extent: any;
43
+ _extent: Extent;
44
44
  _style: any;
45
45
  _visibility: any;
46
46
  _pickingReady: boolean;
@@ -60,7 +60,7 @@ export class Geometry {
60
60
  setVisibility(visibility: any): Geometry;
61
61
  getVisibility(): any;
62
62
  remove(): void;
63
- getExtent(): any;
63
+ getExtent(): Extent;
64
64
  getType(): any;
65
65
  }
66
66
  export namespace GeometryType {
@@ -70,3 +70,5 @@ export namespace GeometryType {
70
70
  const MULTIPOLYGON: number;
71
71
  const MULTILINESTRING: number;
72
72
  }
73
+ import { Extent } from "../Extent.js";
74
+ import { LonLat } from "../LonLat.js";
@@ -44,9 +44,9 @@ export class GeometryHandler {
44
44
  assignHandler(handler: any): void;
45
45
  /**
46
46
  * @public
47
- * @param {og.Geometry} geometry - Geometry object.
47
+ * @param {Geometry} geometry - Geometry object.
48
48
  */
49
- public add(geometry: any): void;
49
+ public add(geometry: Geometry): void;
50
50
  remove(geometry: any): void;
51
51
  _refreshRecursevely(geometry: any, treeNode: any): void;
52
52
  _refreshRecursevelyExt(extent: any, treeNode: any): void;
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Billboard text label.
3
3
  * @class
4
- * @extends {og.BaseBillboard}
4
+ * @extends {BaseBillboard}
5
5
  * @param {Object} [options] - Label 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.text] - Text string.
13
13
  * @param {string} [options.face] - HTML5 font face.
@@ -15,11 +15,10 @@
15
15
  * @param {string} [options.style] - HTML5 font style. Example 'normal', 'italic'.
16
16
  * @param {string} [options.weight] - HTML5 font weight. Example 'normal', 'bold'.
17
17
  * @param {number} [options.outline] - Text outline size. 0 - no outline, 1 - maximum outline. Default 0.58.
18
- * @param {og.Vec4|string|Array.<number>} [options.outlineColor] - Outline color.
19
- * @param {og.Label.ALIGN} [options.align] - Text horizontal align: "left", "right" and "center".
18
+ * @param {Vec4|string|Array.<number>} [options.outlineColor] - Outline color.
19
+ * @param {Label.ALIGN} [options.align] - Text horizontal align: "left", "right" and "center".
20
20
  */
21
- export class Label {
22
- constructor(options: any);
21
+ export class Label extends BaseBillboard {
23
22
  /**
24
23
  * Label text string.
25
24
  * @private
@@ -47,13 +46,13 @@ export class Label {
47
46
  /**
48
47
  * Label outline color.
49
48
  * @private
50
- * @type {og.Vec4}
49
+ * @type {Vec4}
51
50
  */
52
51
  private _outlineColor;
53
52
  /**
54
53
  * Text horizontal align: "left", "right" and "center".
55
54
  * @private
56
- * @type {og.Label.ALIGN}
55
+ * @type {Label.ALIGN}
57
56
  */
58
57
  private _align;
59
58
  /**
@@ -65,7 +64,7 @@ export class Label {
65
64
  /**
66
65
  * Font atlas pointer.
67
66
  * @private
68
- * @type {og.utils.FontAtlas}
67
+ * @type {utils.FontAtlas}
69
68
  */
70
69
  private _fontAtlas;
71
70
  /**
@@ -84,15 +83,15 @@ export class Label {
84
83
  /**
85
84
  * Sets label text align. Could be center, left or right. Left is default.
86
85
  * @public
87
- * @param {og.Label.ALIGN} align - Text align.
86
+ * @param {Label.ALIGN} align - Text align.
88
87
  */
89
- public setAlign(align: any): void;
88
+ public setAlign(align: Label.ALIGN): void;
90
89
  /**
91
90
  * Gets label text current alignment.
92
91
  * @public
93
- * @returns {og.Label.ALIGN}
92
+ * @returns {Label.ALIGN}
94
93
  */
95
- public getAlign(): any;
94
+ public getAlign(): Label.ALIGN;
96
95
  /**
97
96
  * Sets font face family.
98
97
  * @public
@@ -129,12 +128,6 @@ export class Label {
129
128
  * @returns {number}
130
129
  */
131
130
  public getOutline(): number;
132
- /**
133
- * Sets label opacity.
134
- * @public
135
- * @param {number} a - Label opacity.
136
- */
137
- public setOpacity(a: number): void;
138
131
  /**
139
132
  * Sets text outline color.
140
133
  * @public
@@ -147,9 +140,9 @@ export class Label {
147
140
  /**
148
141
  * Sets text outline color.
149
142
  * @public
150
- * @param {og.Vec4} rgba - Color vector.
143
+ * @param {Vec4} rgba - Color vector.
151
144
  */
152
- public setOutlineColor4v(rgba: any): void;
145
+ public setOutlineColor4v(rgba: Vec4): void;
153
146
  /**
154
147
  * Sets text outline color HTML string.
155
148
  * @public
@@ -159,9 +152,9 @@ export class Label {
159
152
  /**
160
153
  * Gets outline color vector.
161
154
  * @public
162
- * @returns {og.Vec4}
155
+ * @returns {Vec4}
163
156
  */
164
- public getOutlineColor(): any;
157
+ public getOutlineColor(): Vec4;
165
158
  /**
166
159
  * Sets outline opacity. Actually outline color alpha value.
167
160
  * @public
@@ -178,17 +171,19 @@ export class Label {
178
171
  * Updates label parameters.
179
172
  * @public
180
173
  */
181
- public update(): void;
174
+ public update(): Promise<void>;
182
175
  _applyFontIndex(fontIndex: any): void;
183
176
  /**
184
177
  * Assigns font atlas and update.
185
178
  * @public
186
- * @param {og.utils.FontAtlas} fontAtlas - Font atlas.
179
+ * @param {utils.FontAtlas} fontAtlas - Font atlas.
187
180
  */
188
- public assignFontAtlas(fontAtlas: any): void;
181
+ public assignFontAtlas(fontAtlas: utils.FontAtlas): void;
189
182
  }
190
183
  export namespace ALIGN {
191
184
  const RIGHT: number;
192
185
  const LEFT: number;
193
186
  const CENTER: number;
194
187
  }
188
+ import { BaseBillboard } from "./BaseBillboard.js";
189
+ import { Vec4 } from "../math/Vec4.js";
@@ -1,5 +1,10 @@
1
1
  export class LabelHandler extends BillboardHandler {
2
- constructor(entityCollection: any, maxLetters?: number);
2
+ /**
3
+ *
4
+ * @param {*} entityCollection
5
+ * @param {*} maxLetters
6
+ */
7
+ constructor(entityCollection: any, maxLetters?: any);
3
8
  _gliphParamBuffer: any;
4
9
  _fontIndexBuffer: any;
5
10
  _noOutlineBuffer: any;
@@ -10,8 +15,10 @@ export class LabelHandler extends BillboardHandler {
10
15
  _noOutlineArr: Float32Array;
11
16
  _outlineArr: Float32Array;
12
17
  _outlineColorArr: Float32Array;
13
- _maxLetters: number;
18
+ _maxLetters: any;
19
+ _addLabelToArrays(label: any): void;
14
20
  assignFontAtlas(label: any): void;
21
+ workerCallback(data: any, label: any): void;
15
22
  setText(index: any, text: any, fontIndex: any, align: any): void;
16
23
  setOutlineColorArr(index: any, rgba: any): void;
17
24
  setOutlineArr(index: any, outline: any): void;
@@ -0,0 +1,9 @@
1
+ export class LabelWorker {
2
+ constructor(numWorkers?: number);
3
+ _id: number;
4
+ _source: {};
5
+ _freeWorkerQueue: Worker[];
6
+ _pendingQueue: any[];
7
+ check(): void;
8
+ make(handler: any, label: any): void;
9
+ }