@openglobus/og 0.12.1 → 0.13.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 (230) hide show
  1. package/README.md +0 -2
  2. package/dist/@openglobus/og.css +1 -0
  3. package/dist/@openglobus/og.esm.js +21 -0
  4. package/dist/@openglobus/og.esm.js.map +1 -0
  5. package/dist/@openglobus/og.umd.js +21 -0
  6. package/dist/@openglobus/og.umd.js.map +1 -0
  7. package/package.json +8 -8
  8. package/src/og/Extent.js +3 -3
  9. package/src/og/Globe.js +277 -275
  10. package/src/og/ImageCanvas.js +3 -3
  11. package/src/og/LonLat.js +9 -9
  12. package/src/og/QueueArray.js +2 -2
  13. package/src/og/Rectangle.js +5 -5
  14. package/src/og/bv/Box.js +1 -1
  15. package/src/og/bv/Sphere.js +2 -2
  16. package/src/og/camera/Camera.js +1 -1
  17. package/src/og/camera/PlanetCamera.js +649 -646
  18. package/src/og/control/LayerSwitcher.js +1 -1
  19. package/src/og/control/MouseNavigation.js +22 -13
  20. package/src/og/control/MouseWheelZoomControl.js +2 -2
  21. package/src/og/control/ScaleControl.js +1 -1
  22. package/src/og/control/TouchNavigation.js +319 -319
  23. package/src/og/control/ZoomControl.js +132 -132
  24. package/src/og/control/visibleExtent/Segment.js +12 -12
  25. package/src/og/ellipsoid/Ellipsoid.js +577 -567
  26. package/src/og/entity/BillboardHandler.js +878 -1051
  27. package/src/og/entity/Entity.js +1 -1
  28. package/src/og/entity/EntityCollection.js +847 -857
  29. package/src/og/entity/GeoObjectHandler.js +37 -18
  30. package/src/og/entity/LabelHandler.js +888 -1040
  31. package/src/og/entity/LabelWorker.js +0 -6
  32. package/src/og/entity/PointCloud.js +495 -495
  33. package/src/og/entity/Polyline.js +2218 -2222
  34. package/src/og/entity/RayHandler.js +1 -1
  35. package/src/og/layer/CanvasTiles.js +6 -3
  36. package/src/og/layer/GeoImage.js +1 -1
  37. package/src/og/layer/KML.js +24 -17
  38. package/src/og/layer/Layer.js +806 -751
  39. package/src/og/layer/Vector.js +997 -1010
  40. package/src/og/layer/XYZ.js +359 -357
  41. package/src/og/math/Line2.js +4 -4
  42. package/src/og/math/Quat.js +2 -2
  43. package/src/og/math/Ray.js +2 -2
  44. package/src/og/math/Vec2.js +524 -524
  45. package/src/og/math/Vec3.js +900 -900
  46. package/src/og/math/Vec4.js +261 -261
  47. package/src/og/math.js +397 -398
  48. package/src/og/quadTree/EntityCollectionNode.js +389 -387
  49. package/src/og/renderer/Renderer.js +14 -20
  50. package/src/og/renderer/RendererEvents.js +1034 -1045
  51. package/src/og/scene/Planet.js +26 -23
  52. package/src/og/scene/RenderNode.js +347 -354
  53. package/src/og/segment/Segment.js +3 -1
  54. package/src/og/segment/SegmentLonLat.js +1 -4
  55. package/src/og/shaders/billboard.js +220 -204
  56. package/src/og/shaders/drawnode.js +603 -603
  57. package/src/og/shaders/geoObject.js +15 -6
  58. package/src/og/shaders/label.js +596 -456
  59. package/src/og/shaders/polyline.js +365 -361
  60. package/src/og/terrain/MapboxTerrain.js +1 -1
  61. package/src/og/utils/FontAtlas.js +209 -200
  62. package/src/og/utils/GeoImageCreator.js +4 -5
  63. package/src/og/utils/TextureAtlas.js +4 -4
  64. package/src/og/utils/VectorTileCreator.js +414 -414
  65. package/src/og/utils/shared.js +1 -1
  66. package/src/og/webgl/Handler.js +28 -60
  67. package/src/og/webgl/Multisample.js +260 -260
  68. package/src/og/webgl/Program.js +411 -396
  69. package/types/Clock.d.ts +94 -0
  70. package/types/Deferred.d.ts +6 -0
  71. package/types/Events.d.ts +77 -0
  72. package/types/Extent.d.ts +166 -0
  73. package/types/Globe.d.ts +85 -0
  74. package/types/ImageCanvas.d.ts +123 -0
  75. package/types/Lock.d.ts +12 -0
  76. package/types/LonLat.d.ts +108 -0
  77. package/types/Popup.d.ts +42 -0
  78. package/types/QueueArray.d.ts +19 -0
  79. package/types/Rectangle.d.ts +80 -0
  80. package/types/Stack.d.ts +19 -0
  81. package/types/ajax.d.ts +24 -0
  82. package/types/arial.d.ts +48 -0
  83. package/types/astro/astro.d.ts +38 -0
  84. package/types/astro/earth.d.ts +7 -0
  85. package/types/astro/jd.d.ts +254 -0
  86. package/types/bv/Box.d.ts +30 -0
  87. package/types/bv/Sphere.d.ts +38 -0
  88. package/types/bv/index.d.ts +3 -0
  89. package/types/camera/Camera.d.ts +312 -0
  90. package/types/camera/Frustum.d.ts +133 -0
  91. package/types/camera/PlanetCamera.d.ts +219 -0
  92. package/types/camera/index.d.ts +3 -0
  93. package/types/cons.d.ts +40 -0
  94. package/types/control/CompassButton.d.ts +17 -0
  95. package/types/control/Control.d.ts +104 -0
  96. package/types/control/DebugInfo.d.ts +15 -0
  97. package/types/control/EarthCoordinates.d.ts +47 -0
  98. package/types/control/EarthNavigation.d.ts +43 -0
  99. package/types/control/GeoImageDragControl.d.ts +6 -0
  100. package/types/control/KeyboardNavigation.d.ts +21 -0
  101. package/types/control/LayerSwitcher.d.ts +21 -0
  102. package/types/control/Lighting.d.ts +16 -0
  103. package/types/control/MouseNavigation.d.ts +48 -0
  104. package/types/control/MouseWheelZoomControl.d.ts +45 -0
  105. package/types/control/ScaleControl.d.ts +22 -0
  106. package/types/control/ShowFps.d.ts +11 -0
  107. package/types/control/SimpleNavigation.d.ts +25 -0
  108. package/types/control/Sun.d.ts +50 -0
  109. package/types/control/ToggleWireframe.d.ts +12 -0
  110. package/types/control/TouchNavigation.d.ts +48 -0
  111. package/types/control/ZoomControl.d.ts +27 -0
  112. package/types/control/index.d.ts +18 -0
  113. package/types/ellipsoid/Ellipsoid.d.ts +153 -0
  114. package/types/ellipsoid/index.d.ts +3 -0
  115. package/types/ellipsoid/wgs84.d.ts +6 -0
  116. package/types/entity/BaseBillboard.d.ts +215 -0
  117. package/types/entity/Billboard.d.ts +94 -0
  118. package/types/entity/BillboardHandler.d.ts +75 -0
  119. package/types/entity/Entity.d.ts +348 -0
  120. package/types/entity/EntityCollection.d.ts +309 -0
  121. package/types/entity/GeoObject.d.ts +111 -0
  122. package/types/entity/GeoObjectHandler.d.ts +81 -0
  123. package/types/entity/Geometry.d.ts +74 -0
  124. package/types/entity/GeometryHandler.d.ts +76 -0
  125. package/types/entity/Label.d.ts +189 -0
  126. package/types/entity/LabelHandler.d.ts +29 -0
  127. package/types/entity/LabelWorker.d.ts +11 -0
  128. package/types/entity/PointCloud.d.ts +174 -0
  129. package/types/entity/PointCloudHandler.d.ts +38 -0
  130. package/types/entity/Polyline.d.ts +306 -0
  131. package/types/entity/PolylineHandler.d.ts +18 -0
  132. package/types/entity/Ray.d.ts +124 -0
  133. package/types/entity/RayHandler.d.ts +67 -0
  134. package/types/entity/ShapeHandler.d.ts +22 -0
  135. package/types/entity/Strip.d.ts +119 -0
  136. package/types/entity/StripHandler.d.ts +38 -0
  137. package/types/entity/index.d.ts +8 -0
  138. package/types/index.core.d.ts +65 -0
  139. package/types/index.d.ts +45 -0
  140. package/types/index.webgl.d.ts +7 -0
  141. package/types/input/KeyboardHandler.d.ts +10 -0
  142. package/types/input/MouseHandler.d.ts +5 -0
  143. package/types/input/TouchHandler.d.ts +5 -0
  144. package/types/input/input.d.ts +34 -0
  145. package/types/layer/BaseGeoImage.d.ts +94 -0
  146. package/types/layer/CanvasTiles.d.ts +67 -0
  147. package/types/layer/GeoImage.d.ts +52 -0
  148. package/types/layer/GeoTexture2d.d.ts +8 -0
  149. package/types/layer/GeoVideo.d.ts +55 -0
  150. package/types/layer/KML.d.ts +68 -0
  151. package/types/layer/Layer.d.ts +315 -0
  152. package/types/layer/Material.d.ts +45 -0
  153. package/types/layer/Vector.d.ts +201 -0
  154. package/types/layer/WMS.d.ts +61 -0
  155. package/types/layer/XYZ.d.ts +119 -0
  156. package/types/layer/index.d.ts +10 -0
  157. package/types/light/LightSource.d.ts +178 -0
  158. package/types/math/Line2.d.ts +11 -0
  159. package/types/math/Line3.d.ts +10 -0
  160. package/types/math/Mat3.d.ts +65 -0
  161. package/types/math/Mat4.d.ts +176 -0
  162. package/types/math/Plane.d.ts +18 -0
  163. package/types/math/Quat.d.ts +379 -0
  164. package/types/math/Ray.d.ts +82 -0
  165. package/types/math/Vec2.d.ts +309 -0
  166. package/types/math/Vec3.d.ts +467 -0
  167. package/types/math/Vec4.d.ts +162 -0
  168. package/types/math/coder.d.ts +43 -0
  169. package/types/math/index.d.ts +11 -0
  170. package/types/math.d.ts +261 -0
  171. package/types/mercator.d.ts +92 -0
  172. package/types/proj/EPSG3857.d.ts +6 -0
  173. package/types/proj/EPSG4326.d.ts +6 -0
  174. package/types/proj/Proj.d.ts +42 -0
  175. package/types/quadTree/EntityCollectionNode.d.ts +34 -0
  176. package/types/quadTree/Node.d.ts +60 -0
  177. package/types/quadTree/quadTree.d.ts +40 -0
  178. package/types/renderer/Renderer.d.ts +290 -0
  179. package/types/renderer/RendererEvents.d.ts +237 -0
  180. package/types/res/images.d.ts +3 -0
  181. package/types/scene/Axes.d.ts +11 -0
  182. package/types/scene/BaseNode.d.ts +60 -0
  183. package/types/scene/Planet.d.ts +576 -0
  184. package/types/scene/RenderNode.d.ts +142 -0
  185. package/types/scene/SkyBox.d.ts +10 -0
  186. package/types/scene/index.d.ts +4 -0
  187. package/types/segment/Segment.d.ts +275 -0
  188. package/types/segment/SegmentLonLat.d.ts +17 -0
  189. package/types/segment/Slice.d.ts +10 -0
  190. package/types/segment/segmentHelper.d.ts +13 -0
  191. package/types/shaders/billboard.d.ts +3 -0
  192. package/types/shaders/depth.d.ts +2 -0
  193. package/types/shaders/drawnode.d.ts +7 -0
  194. package/types/shaders/geoObject.d.ts +3 -0
  195. package/types/shaders/label.d.ts +4 -0
  196. package/types/shaders/pointCloud.d.ts +2 -0
  197. package/types/shaders/polyline.d.ts +3 -0
  198. package/types/shaders/ray.d.ts +2 -0
  199. package/types/shaders/screenFrame.d.ts +2 -0
  200. package/types/shaders/shape.d.ts +4 -0
  201. package/types/shaders/skybox.d.ts +2 -0
  202. package/types/shaders/toneMapping.d.ts +2 -0
  203. package/types/shapes/BaseShape.d.ts +250 -0
  204. package/types/shapes/Sphere.d.ts +41 -0
  205. package/types/terrain/BilTerrain.d.ts +7 -0
  206. package/types/terrain/EmptyTerrain.d.ts +73 -0
  207. package/types/terrain/Geoid.d.ts +26 -0
  208. package/types/terrain/GlobusTerrain.d.ts +116 -0
  209. package/types/terrain/MapboxTerrain.d.ts +7 -0
  210. package/types/terrain/index.d.ts +5 -0
  211. package/types/utils/FontAtlas.d.ts +16 -0
  212. package/types/utils/GeoImageCreator.d.ts +30 -0
  213. package/types/utils/ImagesCacheManager.d.ts +10 -0
  214. package/types/utils/Loader.d.ts +25 -0
  215. package/types/utils/NormalMapCreator.d.ts +39 -0
  216. package/types/utils/PlainSegmentWorker.d.ts +10 -0
  217. package/types/utils/TerrainWorker.d.ts +9 -0
  218. package/types/utils/TextureAtlas.d.ts +111 -0
  219. package/types/utils/VectorTileCreator.d.ts +16 -0
  220. package/types/utils/colorTable.d.ts +143 -0
  221. package/types/utils/earcut.d.ts +6 -0
  222. package/types/utils/shared.d.ts +231 -0
  223. package/types/webgl/Framebuffer.d.ts +135 -0
  224. package/types/webgl/Handler.d.ts +392 -0
  225. package/types/webgl/Multisample.d.ts +89 -0
  226. package/types/webgl/Program.d.ts +163 -0
  227. package/types/webgl/ProgramController.d.ts +89 -0
  228. package/types/webgl/callbacks.d.ts +1 -0
  229. package/types/webgl/index.d.ts +6 -0
  230. package/types/webgl/types.d.ts +2 -0
@@ -0,0 +1,348 @@
1
+ /**
2
+ * Entity instances aggregate multiple forms of visualization into a single high-level object.
3
+ * They can be created manually and added to entity collection.
4
+ *
5
+ * @class
6
+ * @param {Object} [options] - Entity options:
7
+ * @param {string} [options.name] - A human readable name to display to users. It does not have to be unique.
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
+ * @param {boolean} [options.aground] - True for entities that have to be placed on the relief.
11
+ * @param {boolean} [options.visibility] - Entity visibility.
12
+ * @param {*} [options.billboard] - Billboard options(see {@link og.Billboard}).
13
+ * @param {*} [options.label] - Label options(see {@link og.Label}).
14
+ * @param {*} [options.sphere] - Sphere options(see {@link og.shape.Sphere}).
15
+ * @param {*} [options.box] - Sphere options(see {@link og.shape.Box}).
16
+ * @param {*} [options.polyline] - Polyline options(see {@link og.Polyline}).
17
+ * @param {*} [options.ray] - Ray options(see {@link og.Ray}).
18
+ * @param {*} [options.pointCloud] - Point cloud options(see {@link og.PointCloud}).
19
+ * @param {*} [options.geometry] - Geometry options (see {@link og.Geometry}), available for vector layer only.
20
+ * @param {*} [options.properties] - Entity custom properties.
21
+ */
22
+ export class Entity {
23
+ static set _staticCounter(arg: any);
24
+ static get _staticCounter(): any;
25
+ constructor(options: any);
26
+ /**
27
+ * Unic identifier.
28
+ * @public
29
+ * @readonly
30
+ */
31
+ public readonly id: number;
32
+ /**
33
+ * Entity user defined properties.
34
+ * @public
35
+ * @type {Object}
36
+ */
37
+ public properties: any;
38
+ /**
39
+ * Children entities.
40
+ * @public
41
+ * @type {Array.<Entity>}
42
+ */
43
+ public childrenNodes: Array<Entity>;
44
+ /**
45
+ * Parent entity.
46
+ * @public
47
+ * @type {Entity}
48
+ */
49
+ public parent: Entity;
50
+ /**
51
+ * Entity cartesian position.
52
+ * @protected
53
+ * @type {Vec3}
54
+ */
55
+ protected _cartesian: Vec3;
56
+ /**
57
+ * Geodetic entity coordiantes.
58
+ * @protected
59
+ * @type {LonLat}
60
+ */
61
+ protected _lonlat: LonLat;
62
+ /**
63
+ * World Mercator entity coordinates.
64
+ * @protected
65
+ * @type {LonLat}
66
+ */
67
+ protected _lonlatMerc: LonLat;
68
+ /**
69
+ * Entity visible terrain altitude.
70
+ * @protected
71
+ * @type {number}
72
+ */
73
+ protected _altitude: number;
74
+ /**
75
+ * Visibility flag.
76
+ * @protected
77
+ * @type {boolean}
78
+ */
79
+ protected _visibility: boolean;
80
+ /**
81
+ * Entity collection that this entity belongs to.
82
+ * @protected
83
+ * @type {EntityCollection}
84
+ */
85
+ protected _entityCollection: EntityCollection;
86
+ /**
87
+ * Entity collection array store index.
88
+ * @protected
89
+ * @type {number}
90
+ */
91
+ protected _entityCollectionIndex: number;
92
+ /**
93
+ * Assigned vector layer pointer.
94
+ * @protected
95
+ * @type {layer.Vector}
96
+ */
97
+ protected _layer: layer.Vector;
98
+ /**
99
+ * Assigned vector layer entity array index.
100
+ * @protected
101
+ * @type {number}
102
+ */
103
+ protected _layerIndex: number;
104
+ /**
105
+ * Picking color.
106
+ * @protected
107
+ * @type {Vec3}
108
+ */
109
+ protected _pickingColor: Vec3;
110
+ _featureConstructorArray: {
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))[];
120
+ };
121
+ /**
122
+ * Billboard entity.
123
+ * @public
124
+ * @type {Billboard}
125
+ */
126
+ public billboard: Billboard;
127
+ /**
128
+ * Text label entity.
129
+ * @public
130
+ * @type {Label}
131
+ */
132
+ public label: Label;
133
+ /**
134
+ * Shape entity.
135
+ * @public
136
+ * @type {shape.BaseShape}
137
+ */
138
+ public shape: shape.BaseShape;
139
+ /**
140
+ * Polyline entity.
141
+ * @public
142
+ * @type {Polyline}
143
+ */
144
+ public polyline: Polyline;
145
+ /**
146
+ * Ray entity.
147
+ * @public
148
+ * @type {ray}
149
+ */
150
+ public ray: ray;
151
+ /**
152
+ * PointCloud entity.
153
+ * @public
154
+ * @type {PointCloud}
155
+ */
156
+ public pointCloud: PointCloud;
157
+ /**
158
+ * Geometry entity(available for vector layer only).
159
+ * @public
160
+ * @type {Geometry}
161
+ */
162
+ public geometry: Geometry;
163
+ /**
164
+ * Geo object entity
165
+ * @public
166
+ * @type {og.Geometry}
167
+ */
168
+ public geoObject: og.Geometry;
169
+ /**
170
+ * Strip entity.
171
+ * @public
172
+ * @type {Strip}
173
+ */
174
+ public strip: Strip;
175
+ get instanceName(): string;
176
+ _createOptionFeature(featureName: any, options: any): any;
177
+ getCollectionIndex(): number;
178
+ /**
179
+ * Adds current entity into the specified entity collection.
180
+ * @public
181
+ * @param {EntityCollection|Vector} collection - Specified entity collection or vector layer.
182
+ * @param {Boolean} [rightNow=false] - Entity insertion option for vector layer.
183
+ * @returns {Entity} - This object.
184
+ */
185
+ public addTo(collection: EntityCollection | Vector, rightNow?: boolean): Entity;
186
+ /**
187
+ * Removes current entity from collection and layer.
188
+ * @public
189
+ */
190
+ public remove(): void;
191
+ /**
192
+ * Sets the entity visibility.
193
+ * @public
194
+ * @param {boolean} visibility - Entity visibility.
195
+ */
196
+ public setVisibility(visibility: boolean): void;
197
+ /**
198
+ * Returns entity visibility.
199
+ * @public
200
+ * @returns {boolean} -
201
+ */
202
+ public getVisibility(): boolean;
203
+ /**
204
+ * Sets entity cartesian position.
205
+ * @public
206
+ * @param {Vec3} cartesian - Cartesian position in 3d space.
207
+ */
208
+ public setCartesian3v(cartesian: Vec3): void;
209
+ /**
210
+ * Sets entity cartesian position.
211
+ * @public
212
+ * @param {number} x - 3d space X - position.
213
+ * @param {number} y - 3d space Y - position.
214
+ * @param {number} z - 3d space Z - position.
215
+ */
216
+ public setCartesian(x: number, y: number, z: number): void;
217
+ /**
218
+ * Sets entity cartesian position without event dispatching.
219
+ * @protected
220
+ * @param {Vec3} cartesian - Cartesian position in 3d space.
221
+ * @param {boolean} skipLonLat - skip geodetic calculation.
222
+ */
223
+ protected _setCartesian3vSilent(cartesian: Vec3, skipLonLat: boolean): void;
224
+ /**
225
+ * Gets entity geodetic coordinates.
226
+ * @public
227
+ * @returns {LonLat} -
228
+ */
229
+ public getLonLat(): LonLat;
230
+ /**
231
+ * Sets geodetic coordinates of the entity point object.
232
+ * @public
233
+ * @param {LonLat} lonlat - WGS84 coordinates.
234
+ */
235
+ public setLonLat(lonlat: LonLat): void;
236
+ /**
237
+ * Sets entity altitude over the planet.
238
+ * @public
239
+ * @param {number} altitude - Altitude.
240
+ */
241
+ public setAltitude(altitude: number): void;
242
+ /**
243
+ * Sets entity altitude over the planet.
244
+ * @public
245
+ * @return {number} Altitude.
246
+ */
247
+ public getAltitude(): number;
248
+ /**
249
+ * Returns carteain position.
250
+ * @public
251
+ * @returns {Vec3} -
252
+ */
253
+ public getCartesian(): Vec3;
254
+ /**
255
+ * Sets entity billboard.
256
+ * @public
257
+ * @param {Billboard} billboard - Billboard object.
258
+ * @returns {Billboard} -
259
+ */
260
+ public setBillboard(billboard: Billboard): Billboard;
261
+ /**
262
+ * Sets entity label.
263
+ * @public
264
+ * @param {Label} label - Text label.
265
+ * @returns {Label} -
266
+ */
267
+ public setLabel(label: Label): Label;
268
+ /**
269
+ * Sets entity ray.
270
+ * @public
271
+ * @param {Ray} ray - Ray object.
272
+ * @returns {Ray} -
273
+ */
274
+ public setRay(ray: Ray): Ray;
275
+ /**
276
+ * Sets entity shape.
277
+ * @public
278
+ * @param {BaseShape} shape - Shape object.
279
+ * @returns {Polyline} -
280
+ */
281
+ public setShape(shape: BaseShape): Polyline;
282
+ /**
283
+ * Sets entity polyline.
284
+ * @public
285
+ * @param {Polyline} polyline - Polyline object.
286
+ * @returns {Polyline} -
287
+ */
288
+ public setPolyline(polyline: Polyline): Polyline;
289
+ /**
290
+ * Sets entity pointCloud.
291
+ * @public
292
+ * @param {PointCloud} pointCloud - PointCloud object.
293
+ * @returns {PointCloud} -
294
+ */
295
+ public setPointCloud(pointCloud: PointCloud): PointCloud;
296
+ /**
297
+ * Sets entity geometry.
298
+ * @public
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} -
308
+ */
309
+ public setGeoObject(geoObject: GeoObject): GeoObject;
310
+ /**
311
+ * Sets entity strip.
312
+ * @public
313
+ * @param {Strip} strip - Strip object.
314
+ * @returns {Strip} -
315
+ */
316
+ public setStrip(strip: Strip): Strip;
317
+ get layer(): layer.Vector;
318
+ get rendererEvents(): any;
319
+ /**
320
+ * Append child entity.
321
+ * @public
322
+ * @param {Entity} entity - Child entity.
323
+ */
324
+ public appendChild(entity: Entity): void;
325
+ /**
326
+ * Appends entity items(billboard, label etc.) picking color.
327
+ * @public
328
+ */
329
+ public setPickingColor(): void;
330
+ /**
331
+ * Return geodethic extent.
332
+ * @returns {Extent} -
333
+ */
334
+ getExtent(): Extent;
335
+ isEqual(entity: any): boolean;
336
+ }
337
+ import { Vec3 } from "../math/Vec3.js";
338
+ import { LonLat } from "../LonLat.js";
339
+ import { Billboard } from "./Billboard.js";
340
+ import { Label } from "./Label.js";
341
+ import { Sphere } from "../shapes/Sphere.js";
342
+ import { Polyline } from "./Polyline.js";
343
+ import { PointCloud } from "./PointCloud.js";
344
+ import { Geometry } from "./Geometry.js";
345
+ import { GeoObject } from "./GeoObject.js";
346
+ import { Strip } from "./Strip.js";
347
+ import { Ray } from "./Ray.js";
348
+ import { Extent } from "../Extent.js";
@@ -0,0 +1,309 @@
1
+ /**
2
+ * An observable collection of og.Entity instances where each entity has a unique id.
3
+ * Entity collection provide handlers for an each type of entity like billboard, label or 3ds object.
4
+ * @constructor
5
+ * @param {Object} [options] - Entity options:
6
+ * @param {Array.<Entity>} [options.entities] - Entities array.
7
+ * @param {boolean} [options.visibility=true] - Entity visibility.
8
+ * @param {Array.<number>} [options.scaleByDistance] - Entity scale by distance parameters. (exactly 3 entries)
9
+ * First index - near distance to the entity, after entity becomes full scale.
10
+ * Second index - far distance to the entity, when entity becomes zero scale.
11
+ * Third index - far distance to the entity, when entity becomes invisible.
12
+ * @param {number} [options.opacity] - Entity global opacity.
13
+ * @param {boolean} [options.pickingEnabled=true] - Entity picking enable.
14
+ * @param {Number} [options.polygonOffsetUnits=0.0] - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. The default value is 0.
15
+ * @fires og.EntityCollection#entitymove
16
+ * @fires og.EntityCollection#draw
17
+ * @fires og.EntityCollection#drawend
18
+ * @fires og.EntityCollection#add
19
+ * @fires og.EntityCollection#remove
20
+ * @fires og.EntityCollection#entityadd
21
+ * @fires og.EntityCollection#entityremove
22
+ * @fires og.EntityCollection#visibilitychange
23
+ * @fires og.EntityCollection#mousemove
24
+ * @fires og.EntityCollection#mouseenter
25
+ * @fires og.EntityCollection#mouseleave
26
+ * @fires og.EntityCollection#lclick
27
+ * @fires og.EntityCollection#rclick
28
+ * @fires og.EntityCollection#mclick
29
+ * @fires og.EntityCollection#ldblclick
30
+ * @fires og.EntityCollection#rdblclick
31
+ * @fires og.EntityCollection#mdblclick
32
+ * @fires og.EntityCollection#lup
33
+ * @fires og.EntityCollection#rup
34
+ * @fires og.EntityCollection#mup
35
+ * @fires og.EntityCollection#ldown
36
+ * @fires og.EntityCollection#rdown
37
+ * @fires og.EntityCollection#mdown
38
+ * @fires og.EntityCollection#lhold
39
+ * @fires og.EntityCollection#rhold
40
+ * @fires og.EntityCollection#mhold
41
+ * @fires og.EntityCollection#mousewheel
42
+ * @fires og.EntityCollection#touchmove
43
+ * @fires og.EntityCollection#touchstart
44
+ * @fires og.EntityCollection#touchend
45
+ * @fires og.EntityCollection#doubletouch
46
+ * @fires og.EntityCollection#touchleave
47
+ * @fires og.EntityCollection#touchenter
48
+ */
49
+ export class EntityCollection {
50
+ static set _staticCounter(arg: any);
51
+ static get _staticCounter(): any;
52
+ constructor(options: any);
53
+ /**
54
+ * Unic identifier.
55
+ * @public
56
+ * @readonly
57
+ */
58
+ public readonly id: number;
59
+ /**
60
+ * Render node collections array index.
61
+ * @protected
62
+ * @type {number}
63
+ */
64
+ protected _renderNodeIndex: number;
65
+ /**
66
+ * Render node context.
67
+ * @public
68
+ * @type {RenderNode}
69
+ */
70
+ public renderNode: RenderNode;
71
+ /**
72
+ * Visibility option.
73
+ * @protected
74
+ * @type {boolean}
75
+ */
76
+ protected _visibility: boolean;
77
+ /**
78
+ * Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
79
+ * @public
80
+ * @type {Number}
81
+ */
82
+ public polygonOffsetUnits: number;
83
+ /**
84
+ * Billboards handler
85
+ * @public
86
+ * @type {BillboardHandler}
87
+ */
88
+ public billboardHandler: BillboardHandler;
89
+ /**
90
+ * Labels handler
91
+ * @public
92
+ * @type {LabelHandler}
93
+ */
94
+ public labelHandler: LabelHandler;
95
+ /**
96
+ * Shape handler
97
+ * @public
98
+ * @type {ShapeHandler}
99
+ */
100
+ public shapeHandler: ShapeHandler;
101
+ /**
102
+ * Polyline handler
103
+ * @public
104
+ * @type {PolylineHandler}
105
+ */
106
+ public polylineHandler: PolylineHandler;
107
+ /**
108
+ * Ray handler
109
+ * @public
110
+ * @type {RayHandler}
111
+ */
112
+ public rayHandler: RayHandler;
113
+ /**
114
+ * PointCloud handler
115
+ * @public
116
+ * @type {PointCloudHandler}
117
+ */
118
+ public pointCloudHandler: PointCloudHandler;
119
+ /**
120
+ * Strip handler
121
+ * @public
122
+ * @type {StripHandler}
123
+ */
124
+ public stripHandler: StripHandler;
125
+ /**
126
+ * Geo object handler
127
+ * @public
128
+ * @type {og.GeoObjectHandler}
129
+ */
130
+ public geoObjectHandler: og.GeoObjectHandler;
131
+ /**
132
+ * Entities array.
133
+ * @protected
134
+ * @type {Array.<Entity>}
135
+ */
136
+ protected _entities: Array<Entity>;
137
+ /**
138
+ * First index - near distance to the entity, after entity becomes full scale.
139
+ * Second index - far distance to the entity, when entity becomes zero scale.
140
+ * Third index - far distance to the entity, when entity becomes invisible.
141
+ * @public
142
+ * @type {Array.<number>} - (exactly 3 entries)
143
+ */
144
+ public scaleByDistance: Array<number>;
145
+ pickingScale: any;
146
+ /**
147
+ * Global opacity.
148
+ * @protected
149
+ * @type {number}
150
+ */
151
+ protected _opacity: number;
152
+ /**
153
+ * Opacity state during the animated opacity.
154
+ * @protected
155
+ * @type {number}
156
+ */
157
+ protected _fadingOpacity: number;
158
+ /**
159
+ * Entity collection events handler.
160
+ * @public
161
+ * @type {Events}
162
+ */
163
+ public events: Events;
164
+ rendererEvents: Events;
165
+ /**
166
+ * Sets collection visibility.
167
+ * @public
168
+ * @param {boolean} visibility - Visibility flag.
169
+ */
170
+ public setVisibility(visibility: boolean): void;
171
+ /**
172
+ * Returns collection visibility.
173
+ * @public
174
+ * @returns {boolean} -
175
+ */
176
+ public getVisibility(): boolean;
177
+ /**
178
+ * Sets collection opacity.
179
+ * @public
180
+ * @param {number} opacity - Opacity.
181
+ */
182
+ public setOpacity(opacity: number): void;
183
+ /**
184
+ * Sets collection picking ability.
185
+ * @public
186
+ * @param {boolean} enable - Picking enable flag.
187
+ */
188
+ public setPickingEnabled(enable: boolean): void;
189
+ /**
190
+ * Gets collection opacity.
191
+ * @public
192
+ * @returns {number} -
193
+ */
194
+ public getOpacity(): number;
195
+ /**
196
+ * Sets scale by distance parameters.
197
+ * @public
198
+ * @param {number} near - Full scale entity distance.
199
+ * @param {number} far - Zerol scale entity distance.
200
+ * @param {number} [farInvisible] - Entity visibility distance.
201
+ */
202
+ public setScaleByDistance(near: number, far: number, farInvisible?: number): void;
203
+ _addRecursively(entity: any): void;
204
+ /**
205
+ * Adds entity to the collection and returns collection.
206
+ * @public
207
+ * @param {Entity} entity - Entity.
208
+ * @returns {EntityCollection} -
209
+ */
210
+ public add(entity: Entity): EntityCollection;
211
+ /**
212
+ * Adds entities array to the collection and returns collection.
213
+ * @public
214
+ * @param {Array.<Entity>} entities - Entities array.
215
+ * @returns {EntityCollection} -
216
+ */
217
+ public addEntities(entities: Array<Entity>): EntityCollection;
218
+ /**
219
+ * Returns true if the entity belongs this collection, otherwise returns false.
220
+ * @public
221
+ * @param {Entity} entity - Entity.
222
+ * @returns {boolean} -
223
+ */
224
+ public belongs(entity: Entity): boolean;
225
+ _removeRecursively(entity: any): void;
226
+ /**
227
+ * Removes entity from this collection.
228
+ * @public
229
+ * @param {Entity} entity - Entity to remove.
230
+ */
231
+ public removeEntity(entity: Entity): void;
232
+ _removeEntitySilent(entity: any): void;
233
+ /**
234
+ * Creates or refresh collected entities picking color.
235
+ * @public
236
+ */
237
+ public createPickingColors(): void;
238
+ /**
239
+ * Refresh collected entities indexes from startIndex entitytes collection array position.
240
+ * @public
241
+ * @param {number} startIndex - Entities collection array index.
242
+ */
243
+ public reindexEntitiesArray(startIndex: number): void;
244
+ /**
245
+ * Adds this collection to render node.
246
+ * @public
247
+ * @param {RenderNode} renderNode - Render node.
248
+ * @param {boolean} [isHidden] - Uses in vector layers that render in planet render specific function.
249
+ * @returns {EntityCollection} -
250
+ */
251
+ public addTo(renderNode: RenderNode, isHidden?: boolean): EntityCollection;
252
+ /**
253
+ * This function is called in the RenderNode assign function.
254
+ * @param {RenderNode} renderNode
255
+ */
256
+ bindRenderNode(renderNode: RenderNode): void;
257
+ /**
258
+ * Updates coordiantes all lonLat entities in collection after collecction attached to the planet node.
259
+ * @private
260
+ * @param {Ellipsoid} ellipsoid - Globe ellipsoid.
261
+ */
262
+ private _updateGeodeticCoordinates;
263
+ /**
264
+ * Updates billboard texture atlas.
265
+ * @public
266
+ */
267
+ public updateBillboardsTextureAtlas(): void;
268
+ /**
269
+ * Updates labels font atlas.
270
+ * @public
271
+ */
272
+ public updateLabelsFontAtlas(): void;
273
+ /**
274
+ * Removes collection from render node.
275
+ * @public
276
+ */
277
+ public remove(): void;
278
+ /**
279
+ * Gets entity array.
280
+ * @public
281
+ * @returns {Array.<Entity>} -
282
+ */
283
+ public getEntities(): Array<Entity>;
284
+ /**
285
+ * Safety entities loop.
286
+ * @public
287
+ * @param {function} callback - Entity callback.
288
+ */
289
+ public each(callback: Function): void;
290
+ /**
291
+ * Removes all entities from colection and clear handlers.
292
+ * @public
293
+ */
294
+ public clear(): void;
295
+ /**
296
+ * Clears entity recursevely.
297
+ * @private
298
+ * @param {Entity} entity - Entity to clear.
299
+ */
300
+ private _clearEntity;
301
+ }
302
+ import { BillboardHandler } from "./BillboardHandler.js";
303
+ import { LabelHandler } from "./LabelHandler.js";
304
+ import { ShapeHandler } from "./ShapeHandler.js";
305
+ import { PolylineHandler } from "./PolylineHandler.js";
306
+ import { RayHandler } from "./RayHandler.js";
307
+ import { PointCloudHandler } from "./PointCloudHandler.js";
308
+ import { StripHandler } from "./StripHandler.js";
309
+ import { Events } from "../Events.js";