@openglobus/og 0.10.4 → 0.11.1

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 (172) hide show
  1. package/css/og.css +1 -1
  2. package/package.json +11 -9
  3. package/src/og/Extent.js +274 -273
  4. package/src/og/Globe.js +11 -3
  5. package/src/og/LonLat.js +152 -146
  6. package/src/og/Popup.js +2 -1
  7. package/src/og/camera/PlanetCamera.js +112 -38
  8. package/src/og/control/EarthNavigation.js +259 -0
  9. package/src/og/control/MouseNavigation.js +68 -40
  10. package/src/og/entity/EntityCollection.js +1 -1
  11. package/src/og/entity/LabelHandler.js +366 -74
  12. package/src/og/entity/Polyline.js +3 -2
  13. package/src/og/layer/CanvasTiles.js +32 -30
  14. package/src/og/layer/KML.js +159 -0
  15. package/src/og/layer/Vector.js +5 -0
  16. package/src/og/layer/index.js +2 -1
  17. package/src/og/math/Vec2.js +448 -448
  18. package/src/og/math/Vec3.js +759 -757
  19. package/src/og/math/Vec4.js +216 -215
  20. package/src/og/quadTree/Node.js +67 -13
  21. package/src/og/renderer/RendererEvents.js +21 -16
  22. package/src/og/scene/Planet.js +25 -10
  23. package/src/og/segment/Segment.js +3 -3
  24. package/src/og/segment/SegmentLonLat.js +7 -0
  25. package/src/og/terrain/GlobusTerrain.js +4 -0
  26. package/src/og/utils/FontAtlas.js +1 -0
  27. package/src/og/utils/GeoImageCreator.js +123 -121
  28. package/src/og/utils/Loader.js +81 -80
  29. package/src/og/utils/NormalMapCreator.js +320 -318
  30. package/src/og/utils/VectorTileCreator.js +251 -250
  31. package/src/og/webgl/Framebuffer.js +265 -264
  32. package/src/og/webgl/Handler.js +1022 -1001
  33. package/src/og/webgl/Multisample.js +169 -168
  34. package/src/og/webgl/ProgramController.js +113 -112
  35. package/types/Clock.d.ts +90 -0
  36. package/types/Deferred.d.ts +6 -0
  37. package/types/Events.d.ts +73 -0
  38. package/types/Extent.d.ts +162 -0
  39. package/types/Globe.d.ts +80 -0
  40. package/types/ImageCanvas.d.ts +121 -0
  41. package/types/Lock.d.ts +12 -0
  42. package/types/LonLat.d.ts +108 -0
  43. package/types/Popup.d.ts +38 -0
  44. package/types/QueueArray.d.ts +15 -0
  45. package/types/Rectangle.d.ts +74 -0
  46. package/types/Stack.d.ts +15 -0
  47. package/types/ajax.d.ts +24 -0
  48. package/types/arial.d.ts +48 -0
  49. package/types/astro/astro.d.ts +38 -0
  50. package/types/astro/earth.d.ts +6 -0
  51. package/types/astro/jd.d.ts +254 -0
  52. package/types/bv/Box.d.ts +25 -0
  53. package/types/bv/Sphere.d.ts +32 -0
  54. package/types/bv/index.d.ts +3 -0
  55. package/types/camera/Camera.d.ts +303 -0
  56. package/types/camera/Frustum.d.ts +129 -0
  57. package/types/camera/PlanetCamera.d.ts +222 -0
  58. package/types/camera/index.d.ts +3 -0
  59. package/types/cons.d.ts +40 -0
  60. package/types/control/CompassButton.d.ts +17 -0
  61. package/types/control/Control.d.ts +101 -0
  62. package/types/control/DebugInfo.d.ts +16 -0
  63. package/types/control/EarthCoordinates.d.ts +47 -0
  64. package/types/control/GeoImageDragControl.d.ts +6 -0
  65. package/types/control/KeyboardNavigation.d.ts +22 -0
  66. package/types/control/LayerSwitcher.d.ts +23 -0
  67. package/types/control/Lighting.d.ts +16 -0
  68. package/types/control/ScaleControl.d.ts +22 -0
  69. package/types/control/ShowFps.d.ts +12 -0
  70. package/types/control/SimpleNavigation.d.ts +28 -0
  71. package/types/control/Sun.d.ts +52 -0
  72. package/types/control/ToggleWireframe.d.ts +12 -0
  73. package/types/control/ZoomControl.d.ts +28 -0
  74. package/types/control/index.d.ts +15 -0
  75. package/types/ellipsoid/Ellipsoid.d.ts +142 -0
  76. package/types/ellipsoid/index.d.ts +3 -0
  77. package/types/ellipsoid/wgs84.d.ts +5 -0
  78. package/types/entity/BaseBillboard.d.ts +208 -0
  79. package/types/entity/Billboard.d.ts +94 -0
  80. package/types/entity/BillboardHandler.d.ts +74 -0
  81. package/types/entity/Entity.d.ts +330 -0
  82. package/types/entity/EntityCollection.d.ts +303 -0
  83. package/types/entity/Geometry.d.ts +72 -0
  84. package/types/entity/GeometryHandler.d.ts +76 -0
  85. package/types/entity/Label.d.ts +194 -0
  86. package/types/entity/LabelHandler.d.ts +24 -0
  87. package/types/entity/PointCloud.d.ts +174 -0
  88. package/types/entity/PointCloudHandler.d.ts +38 -0
  89. package/types/entity/Polyline.d.ts +303 -0
  90. package/types/entity/PolylineHandler.d.ts +18 -0
  91. package/types/entity/Ray.d.ts +123 -0
  92. package/types/entity/RayHandler.d.ts +67 -0
  93. package/types/entity/ShapeHandler.d.ts +22 -0
  94. package/types/entity/Strip.d.ts +118 -0
  95. package/types/entity/StripHandler.d.ts +38 -0
  96. package/types/entity/index.d.ts +8 -0
  97. package/types/index.core.d.ts +65 -0
  98. package/types/index.d.ts +45 -0
  99. package/types/index.webgl.d.ts +7 -0
  100. package/types/inherits.d.ts +4 -0
  101. package/types/input/input.d.ts +34 -0
  102. package/types/layer/BaseGeoImage.d.ts +106 -0
  103. package/types/layer/CanvasTiles.d.ts +75 -0
  104. package/types/layer/GeoImage.d.ts +65 -0
  105. package/types/layer/GeoTexture2d.d.ts +8 -0
  106. package/types/layer/GeoVideo.d.ts +80 -0
  107. package/types/layer/KML.d.ts +58 -0
  108. package/types/layer/WMS.d.ts +66 -0
  109. package/types/layer/XYZ.d.ts +126 -0
  110. package/types/layer/index.d.ts +10 -0
  111. package/types/light/LightSource.d.ts +177 -0
  112. package/types/math/Mat3.d.ts +53 -0
  113. package/types/math/Mat4.d.ts +157 -0
  114. package/types/math/Plane.d.ts +17 -0
  115. package/types/math/Vec2.d.ts +308 -0
  116. package/types/math/Vec3.d.ts +459 -0
  117. package/types/math/Vec4.d.ts +161 -0
  118. package/types/math/coder.d.ts +42 -0
  119. package/types/math/index.d.ts +11 -0
  120. package/types/math.d.ts +261 -0
  121. package/types/mercator.d.ts +92 -0
  122. package/types/proj/EPSG3857.d.ts +5 -0
  123. package/types/proj/EPSG4326.d.ts +5 -0
  124. package/types/quadTree/quadTree.d.ts +40 -0
  125. package/types/renderer/RendererEvents.d.ts +230 -0
  126. package/types/res/images.d.ts +3 -0
  127. package/types/scene/Axes.d.ts +11 -0
  128. package/types/scene/BaseNode.d.ts +60 -0
  129. package/types/scene/Planet.d.ts +572 -0
  130. package/types/scene/RenderNode.d.ts +143 -0
  131. package/types/scene/SkyBox.d.ts +10 -0
  132. package/types/scene/index.d.ts +4 -0
  133. package/types/segment/segmentHelper.d.ts +13 -0
  134. package/types/shaders/billboard.d.ts +3 -0
  135. package/types/shaders/depth.d.ts +2 -0
  136. package/types/shaders/drawnode.d.ts +7 -0
  137. package/types/shaders/label.d.ts +4 -0
  138. package/types/shaders/pointCloud.d.ts +2 -0
  139. package/types/shaders/polyline.d.ts +3 -0
  140. package/types/shaders/ray.d.ts +2 -0
  141. package/types/shaders/screenFrame.d.ts +2 -0
  142. package/types/shaders/shape.d.ts +4 -0
  143. package/types/shaders/skybox.d.ts +2 -0
  144. package/types/shaders/toneMapping.d.ts +2 -0
  145. package/types/shapes/BaseShape.d.ts +247 -0
  146. package/types/shapes/Sphere.d.ts +41 -0
  147. package/types/terrain/BilTerrain.d.ts +8 -0
  148. package/types/terrain/EmptyTerrain.d.ts +72 -0
  149. package/types/terrain/Geoid.d.ts +26 -0
  150. package/types/terrain/GlobusTerrain.d.ts +153 -0
  151. package/types/terrain/MapboxTerrain.d.ts +8 -0
  152. package/types/terrain/index.d.ts +5 -0
  153. package/types/utils/FontAtlas.d.ts +14 -0
  154. package/types/utils/GeoImageCreator.d.ts +29 -0
  155. package/types/utils/ImagesCacheManager.d.ts +10 -0
  156. package/types/utils/Loader.d.ts +25 -0
  157. package/types/utils/NormalMapCreator.d.ts +39 -0
  158. package/types/utils/PlainSegmentWorker.d.ts +10 -0
  159. package/types/utils/TerrainWorker.d.ts +9 -0
  160. package/types/utils/TextureAtlas.d.ts +111 -0
  161. package/types/utils/VectorTileCreator.d.ts +16 -0
  162. package/types/utils/colorTable.d.ts +143 -0
  163. package/types/utils/earcut.d.ts +6 -0
  164. package/types/utils/shared.d.ts +230 -0
  165. package/types/webgl/Framebuffer.d.ts +135 -0
  166. package/types/webgl/Handler.d.ts +372 -0
  167. package/types/webgl/Multisample.d.ts +89 -0
  168. package/types/webgl/Program.d.ts +155 -0
  169. package/types/webgl/ProgramController.d.ts +84 -0
  170. package/types/webgl/callbacks.d.ts +1 -0
  171. package/types/webgl/index.d.ts +6 -0
  172. package/types/webgl/types.d.ts +2 -0
@@ -0,0 +1,303 @@
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.<og.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.polygonOffsetFactor=0.0] - The scale factor for the variable depth offset. The default value is 0.
15
+ * @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.
16
+ * @fires og.EntityCollection#entitymove
17
+ * @fires og.EntityCollection#draw
18
+ * @fires og.EntityCollection#drawend
19
+ * @fires og.EntityCollection#add
20
+ * @fires og.EntityCollection#remove
21
+ * @fires og.EntityCollection#entityadd
22
+ * @fires og.EntityCollection#entityremove
23
+ * @fires og.EntityCollection#visibilitychange
24
+ * @fires og.EntityCollection#mousemove
25
+ * @fires og.EntityCollection#mouseenter
26
+ * @fires og.EntityCollection#mouseleave
27
+ * @fires og.EntityCollection#lclick
28
+ * @fires og.EntityCollection#rclick
29
+ * @fires og.EntityCollection#mclick
30
+ * @fires og.EntityCollection#ldblclick
31
+ * @fires og.EntityCollection#rdblclick
32
+ * @fires og.EntityCollection#mdblclick
33
+ * @fires og.EntityCollection#lup
34
+ * @fires og.EntityCollection#rup
35
+ * @fires og.EntityCollection#mup
36
+ * @fires og.EntityCollection#ldown
37
+ * @fires og.EntityCollection#rdown
38
+ * @fires og.EntityCollection#mdown
39
+ * @fires og.EntityCollection#lhold
40
+ * @fires og.EntityCollection#rhold
41
+ * @fires og.EntityCollection#mhold
42
+ * @fires og.EntityCollection#mousewheel
43
+ * @fires og.EntityCollection#touchmove
44
+ * @fires og.EntityCollection#touchstart
45
+ * @fires og.EntityCollection#touchend
46
+ * @fires og.EntityCollection#doubletouch
47
+ * @fires og.EntityCollection#touchleave
48
+ * @fires og.EntityCollection#touchenter
49
+ */
50
+ export class EntityCollection {
51
+ static set _staticCounter(arg: any);
52
+ static get _staticCounter(): any;
53
+ constructor(options: any);
54
+ /**
55
+ * Unic identifier.
56
+ * @public
57
+ * @readonly
58
+ */
59
+ public readonly id: number;
60
+ /**
61
+ * Render node collections array index.
62
+ * @protected
63
+ * @type {number}
64
+ */
65
+ protected _renderNodeIndex: number;
66
+ /**
67
+ * Render node context.
68
+ * @public
69
+ * @type {og.scene.RenderNode}
70
+ */
71
+ public renderNode: any;
72
+ /**
73
+ * Visibility option.
74
+ * @protected
75
+ * @type {boolean}
76
+ */
77
+ protected _visibility: boolean;
78
+ /**
79
+ * Specifies the scale factor for gl.polygonOffset function to calculate depth values, 0.0 is default.
80
+ * @public
81
+ * @type {Number}
82
+ */
83
+ public polygonOffsetFactor: number;
84
+ /**
85
+ * Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
86
+ * @public
87
+ * @type {Number}
88
+ */
89
+ public polygonOffsetUnits: number;
90
+ /**
91
+ * Billboards handler
92
+ * @public
93
+ * @type {og.BillboardHandler}
94
+ */
95
+ public billboardHandler: any;
96
+ /**
97
+ * Labels handler
98
+ * @public
99
+ * @type {og.LabelHandler}
100
+ */
101
+ public labelHandler: any;
102
+ /**
103
+ * Shape handler
104
+ * @public
105
+ * @type {og.ShapeHandler}
106
+ */
107
+ public shapeHandler: any;
108
+ /**
109
+ * Polyline handler
110
+ * @public
111
+ * @type {og.PolylineHandler}
112
+ */
113
+ public polylineHandler: any;
114
+ /**
115
+ * Ray handler
116
+ * @public
117
+ * @type {og.RayHandler}
118
+ */
119
+ public rayHandler: any;
120
+ /**
121
+ * PointCloud handler
122
+ * @public
123
+ * @type {og.PointCloudHandler}
124
+ */
125
+ public pointCloudHandler: any;
126
+ /**
127
+ * Strip handler
128
+ * @public
129
+ * @type {og.StripHandler}
130
+ */
131
+ public stripHandler: any;
132
+ /**
133
+ * Entities array.
134
+ * @protected
135
+ * @type {Array.<og.Entity>}
136
+ */
137
+ protected _entities: Array<any>;
138
+ /**
139
+ * First index - near distance to the entity, after entity becomes full scale.
140
+ * Second index - far distance to the entity, when entity becomes zero scale.
141
+ * Third index - far distance to the entity, when entity becomes invisible.
142
+ * @public
143
+ * @type {Array.<number,number,number>}
144
+ */
145
+ public scaleByDistance: Array<number, number, number>;
146
+ pickingScale: any;
147
+ /**
148
+ * Global opacity.
149
+ * @protected
150
+ * @type {number}
151
+ */
152
+ protected _opacity: number;
153
+ /**
154
+ * Opacity state during the animated opacity.
155
+ * @protected
156
+ * @type {number}
157
+ */
158
+ protected _fadingOpacity: number;
159
+ /**
160
+ * Entity collection events handler.
161
+ * @public
162
+ * @type {og.Events}
163
+ */
164
+ public events: any;
165
+ rendererEvents: any;
166
+ setPolygonOffset(factor: any, units: any): void;
167
+ /**
168
+ * Sets collection visibility.
169
+ * @public
170
+ * @param {boolean} visibility - Visibility flag.
171
+ */
172
+ public setVisibility(visibility: boolean): void;
173
+ /**
174
+ * Returns collection visibility.
175
+ * @public
176
+ * @returns {boolean} -
177
+ */
178
+ public getVisibility(): boolean;
179
+ /**
180
+ * Sets collection opacity.
181
+ * @public
182
+ * @param {number} opacity - Opacity.
183
+ */
184
+ public setOpacity(opacity: number): void;
185
+ /**
186
+ * Sets collection picking ability.
187
+ * @public
188
+ * @param {boolean} enable - Picking enable flag.
189
+ */
190
+ public setPickingEnabled(enable: boolean): void;
191
+ /**
192
+ * Gets collection opacity.
193
+ * @public
194
+ * @returns {number} -
195
+ */
196
+ public getOpacity(): number;
197
+ /**
198
+ * Sets scale by distance parameters.
199
+ * @public
200
+ * @param {number} near - Full scale entity distance.
201
+ * @param {number} far - Zerol scale entity distance.
202
+ * @param {number} [farInvisible] - Entity visibility distance.
203
+ */
204
+ public setScaleByDistance(near: number, far: number, farInvisible?: number): void;
205
+ _addRecursively(entity: any): void;
206
+ /**
207
+ * Adds entity to the collection and returns collection.
208
+ * @public
209
+ * @param {og.Entity} entity - Entity.
210
+ * @returns {og.EntityCollection} -
211
+ */
212
+ public add(entity: any): any;
213
+ /**
214
+ * Adds entities array to the collection and returns collection.
215
+ * @public
216
+ * @param {Array.<og.Entity>} entities - Entities array.
217
+ * @returns {og.EntityCollection} -
218
+ */
219
+ public addEntities(entities: Array<any>): any;
220
+ /**
221
+ * Returns true if the entity belongs this collection, otherwise returns false.
222
+ * @public
223
+ * @param {og.Entity} entity - Entity.
224
+ * @returns {boolean} -
225
+ */
226
+ public belongs(entity: any): boolean;
227
+ _removeRecursively(entity: any): void;
228
+ /**
229
+ * Removes entity from this collection.
230
+ * @public
231
+ * @param {og.Entity} entity - Entity to remove.
232
+ */
233
+ public removeEntity(entity: any): void;
234
+ _removeEntitySilent(entity: any): void;
235
+ /**
236
+ * Creates or refresh collected entities picking color.
237
+ * @public
238
+ */
239
+ public createPickingColors(): void;
240
+ /**
241
+ * Refresh collected entities indexes from startIndex entitytes collection array position.
242
+ * @public
243
+ * @param {number} startIndex - Entities collection array index.
244
+ */
245
+ public reindexEntitiesArray(startIndex: number): void;
246
+ /**
247
+ * Adds this collection to render node.
248
+ * @public
249
+ * @param {og.scene.RenderNode} renderNode - Render node.
250
+ * @param {boolean} [isHidden] - Uses in vector layers that render in planet render specific function.
251
+ * @returns {og.EntityCollection} -
252
+ */
253
+ public addTo(renderNode: any, isHidden?: boolean): any;
254
+ /**
255
+ * This function is called in the RenderNode assign function.
256
+ * @param {og.RenderNode} renderNode
257
+ */
258
+ bindRenderNode(renderNode: any): void;
259
+ /**
260
+ * Updates coordiantes all lonLat entities in collection after collecction attached to the planet node.
261
+ * @private
262
+ * @param {og.Ellipsoid} ellipsoid - Globe ellipsoid.
263
+ */
264
+ private _updateGeodeticCoordinates;
265
+ /**
266
+ * Updates billboard texture atlas.
267
+ * @public
268
+ */
269
+ public updateBillboardsTextureAtlas(): void;
270
+ /**
271
+ * Updates labels font atlas.
272
+ * @public
273
+ */
274
+ public updateLabelsFontAtlas(): void;
275
+ /**
276
+ * Removes collection from render node.
277
+ * @public
278
+ */
279
+ public remove(): void;
280
+ /**
281
+ * Gets entity array.
282
+ * @public
283
+ * @returns {Array.<og.Entity>} -
284
+ */
285
+ public getEntities(): Array<any>;
286
+ /**
287
+ * Safety entities loop.
288
+ * @public
289
+ * @param {function} callback - Entity callback.
290
+ */
291
+ public each(callback: Function): void;
292
+ /**
293
+ * Removes all entities from colection and clear handlers.
294
+ * @public
295
+ */
296
+ public clear(): void;
297
+ /**
298
+ * Clears entity recursevely.
299
+ * @private
300
+ * @param {og.Entity} entity - Entity to clear.
301
+ */
302
+ private _clearEntity;
303
+ }
@@ -0,0 +1,72 @@
1
+ export class Geometry {
2
+ static set _staticCounter(arg: any);
3
+ static get _staticCounter(): any;
4
+ static getType(typeStr: any): any;
5
+ /**
6
+ * Returns geometry feature extent.
7
+ @static
8
+ @param {Object} geometryObj - GeoJSON style geometry feature.
9
+ @param {og.LonLat[]} outCoordinates - Geometry feature coordinates clone.
10
+ @returns {og.Extent} -
11
+ */
12
+ static getExtent(geometryObj: any, outCoordinates: any[]): any;
13
+ constructor(options: any);
14
+ _id: number;
15
+ /**
16
+ * Entity instance that holds this geometry.
17
+ * @protected
18
+ * @type {og.Entity}
19
+ */
20
+ protected _entity: any;
21
+ _handler: any;
22
+ _handlerIndex: number;
23
+ _polyVerticesHighMerc: any[];
24
+ _polyVerticesLowMerc: any[];
25
+ _polyVerticesLength: number;
26
+ _polyIndexesLength: number;
27
+ _polyVerticesHandlerIndex: number;
28
+ _polyIndexesHandlerIndex: number;
29
+ _lineVerticesHighMerc: any[];
30
+ _lineVerticesLowMerc: any[];
31
+ _lineVerticesLength: number;
32
+ _lineOrdersLength: number;
33
+ _lineIndexesLength: number;
34
+ _lineColorsLength: number;
35
+ _lineThicknessLength: number;
36
+ _lineVerticesHandlerIndex: number;
37
+ _lineOrdersHandlerIndex: number;
38
+ _lineIndexesHandlerIndex: number;
39
+ _lineThicknessHandlerIndex: number;
40
+ _lineColorsHandlerIndex: number;
41
+ _type: any;
42
+ _coordinates: any[];
43
+ _extent: any;
44
+ _style: any;
45
+ _visibility: any;
46
+ _pickingReady: boolean;
47
+ setGeometry(geoJson: any): Geometry;
48
+ setFillColor(r: any, g: any, b: any, a: any): Geometry;
49
+ setFillColor4v(rgba: any): Geometry;
50
+ setStrokeColor(r: any, g: any, b: any, a: any): Geometry;
51
+ setLineColor(r: any, g: any, b: any, a: any): Geometry;
52
+ setStrokeColor4v(rgba: any): Geometry;
53
+ setLineColor4v(rgba: any): Geometry;
54
+ setStrokeOpacity(opacity: any): Geometry;
55
+ setLineOpacity(opacity: any): Geometry;
56
+ setStrokeWidth(width: any): Geometry;
57
+ bringToFront(): Geometry;
58
+ setLineWidth(width: any): Geometry;
59
+ setFillOpacity(opacity: any): Geometry;
60
+ setVisibility(visibility: any): Geometry;
61
+ getVisibility(): any;
62
+ remove(): void;
63
+ getExtent(): any;
64
+ getType(): any;
65
+ }
66
+ export namespace GeometryType {
67
+ const POINT: number;
68
+ const LINESTRING: number;
69
+ const POLYGON: number;
70
+ const MULTIPOLYGON: number;
71
+ const MULTILINESTRING: number;
72
+ }
@@ -0,0 +1,76 @@
1
+ export class GeometryHandler {
2
+ static set _staticCounter(arg: any);
3
+ static get _staticCounter(): any;
4
+ static appendLineData(pathArr: any, isClosed: any, color: any, pickingColor: any, thickness: any, strokeColor: any, strokeSize: any, outVerticesHigh: any, outVerticesLow: any, outOrders: any, outIndexes: any, outColors: any, outPickingColors: any, outThickness: any, outStrokeColors: any, outStrokes: any, outVerticesHigh2: any, outVerticesLow2: any): void;
5
+ constructor(layer: any);
6
+ __staticId: number;
7
+ _layer: any;
8
+ _handler: any;
9
+ _geometries: any[];
10
+ _updatedGeometryArr: any[];
11
+ _updatedGeometry: {};
12
+ _removeGeometryExtentArr: any[];
13
+ _removeGeometryExtents: {};
14
+ _polyVerticesHighMerc: any[];
15
+ _polyVerticesLowMerc: any[];
16
+ _polyColors: any[];
17
+ _polyPickingColors: any[];
18
+ _polyIndexes: any[];
19
+ _lineVerticesHighMerc: any[];
20
+ _lineVerticesLowMerc: any[];
21
+ _lineOrders: any[];
22
+ _lineIndexes: any[];
23
+ _lineColors: any[];
24
+ _linePickingColors: any[];
25
+ _lineThickness: any[];
26
+ _lineStrokes: any[];
27
+ _lineStrokeColors: any[];
28
+ _polyVerticesHighBufferMerc: any;
29
+ _polyVerticesLowBufferMerc: any;
30
+ _polyColorsBuffer: any;
31
+ _polyPickingColorsBuffer: any;
32
+ _polyIndexesBuffer: any;
33
+ _lineVerticesHighBufferMerc: any;
34
+ _lineVerticesLowBufferMerc: any;
35
+ _lineColorsBuffer: any;
36
+ _linePickingColorsBuffer: any;
37
+ _lineThicknessBuffer: any;
38
+ _lineStrokesBuffer: any;
39
+ _lineStrokeColorsBuffer: any;
40
+ _lineOrdersBuffer: any;
41
+ _lineIndexesBuffer: any;
42
+ _buffersUpdateCallbacks: (() => void)[];
43
+ _changedBuffers: any[];
44
+ assignHandler(handler: any): void;
45
+ /**
46
+ * @public
47
+ * @param {og.Geometry} geometry - Geometry object.
48
+ */
49
+ public add(geometry: any): void;
50
+ remove(geometry: any): void;
51
+ _refreshRecursevely(geometry: any, treeNode: any): void;
52
+ _refreshRecursevelyExt(extent: any, treeNode: any): void;
53
+ _refreshPlanetNode(treeNode: any): void;
54
+ _updatePlanet(): void;
55
+ refresh(): void;
56
+ update(): void;
57
+ setGeometryVisibility(geometry: any): void;
58
+ setPolyColorArr(geometry: any, color: any): void;
59
+ setLineStrokeColorArr(geometry: any, color: any): void;
60
+ setLineColorArr(geometry: any, color: any): void;
61
+ setLineStrokeArr(geometry: any, width: any): void;
62
+ setLineThicknessArr(geometry: any, width: any): void;
63
+ bringToFront(geometry: any): void;
64
+ createPolyVerticesBuffer(): void;
65
+ createPolyIndexesBuffer(): void;
66
+ createPolyColorsBuffer(): void;
67
+ createPolyPickingColorsBuffer(): void;
68
+ createLineVerticesBuffer(): void;
69
+ createLineIndexesBuffer(): void;
70
+ createLineOrdersBuffer(): void;
71
+ createLineColorsBuffer(): void;
72
+ createLinePickingColorsBuffer(): void;
73
+ createLineThicknessBuffer(): void;
74
+ createLineStrokesBuffer(): void;
75
+ createLineStrokeColorsBuffer(): void;
76
+ }
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Billboard text label.
3
+ * @class
4
+ * @extends {og.BaseBillboard}
5
+ * @param {Object} [options] - Label options:
6
+ * @param {og.Vec3|Array.<number>} [options.position] - Billboard spatial position.
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.
11
+ * @param {boolean} [options.visibility] - Visibility.
12
+ * @param {string} [options.text] - Text string.
13
+ * @param {string} [options.face] - HTML5 font face.
14
+ * @param {number} [options.size] - Font size in pixels.
15
+ * @param {string} [options.style] - HTML5 font style. Example 'normal', 'italic'.
16
+ * @param {string} [options.weight] - HTML5 font weight. Example 'normal', 'bold'.
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".
20
+ */
21
+ export class Label {
22
+ constructor(options: any);
23
+ /**
24
+ * Label text string.
25
+ * @private
26
+ * @type {string}
27
+ */
28
+ private _text;
29
+ /**
30
+ * HTML5 font face.
31
+ * @private
32
+ * @type {string}
33
+ */
34
+ private _face;
35
+ /**
36
+ * Font size in pixels.
37
+ * @private
38
+ * @type {number}
39
+ */
40
+ private _size;
41
+ /**
42
+ * Label outline.
43
+ * @private
44
+ * @type {number}
45
+ */
46
+ private _outline;
47
+ /**
48
+ * Label outline color.
49
+ * @private
50
+ * @type {og.Vec4}
51
+ */
52
+ private _outlineColor;
53
+ /**
54
+ * Text horizontal align: "left", "right" and "center".
55
+ * @private
56
+ * @type {og.Label.ALIGN}
57
+ */
58
+ private _align;
59
+ /**
60
+ * Label font atlas index.
61
+ * @private
62
+ * @type {number}
63
+ */
64
+ private _fontIndex;
65
+ /**
66
+ * Font atlas pointer.
67
+ * @private
68
+ * @type {og.utils.FontAtlas}
69
+ */
70
+ private _fontAtlas;
71
+ /**
72
+ * Sets lablel text.
73
+ * @public
74
+ * @param {string} text - Text string.
75
+ * It can't be bigger than maximum labelHandler _maxLetters value.
76
+ */
77
+ public setText(text: string): void;
78
+ /**
79
+ * Gets current text string.
80
+ * @public
81
+ * @returns {string}
82
+ */
83
+ public getText(): string;
84
+ /**
85
+ * Sets label text align. Could be center, left or right. Left is default.
86
+ * @public
87
+ * @param {og.Label.ALIGN} align - Text align.
88
+ */
89
+ public setAlign(align: any): void;
90
+ /**
91
+ * Gets label text current alignment.
92
+ * @public
93
+ * @returns {og.Label.ALIGN}
94
+ */
95
+ public getAlign(): any;
96
+ /**
97
+ * Sets font face family.
98
+ * @public
99
+ * @param {string} face - Font face family.
100
+ */
101
+ public setFace(face: string): void;
102
+ /**
103
+ * Gets current font face.
104
+ * @public
105
+ * @returns {string}
106
+ */
107
+ public getFace(): string;
108
+ /**
109
+ * Sets label font size in pixels.
110
+ * @public
111
+ * @param {number} size - Label size in pixels.
112
+ */
113
+ public setSize(size: number): void;
114
+ /**
115
+ * Gets label size in pixels.
116
+ * @public
117
+ * @returns {number}
118
+ */
119
+ public getSize(): number;
120
+ /**
121
+ * Sets text outline border size. Where 0 - is no outline and 1 - is the maximum outline size.
122
+ * @public
123
+ * @param {number} outline - Text outline size.
124
+ */
125
+ public setOutline(outline: number): void;
126
+ /**
127
+ * Gets text current outline size.
128
+ * @public
129
+ * @returns {number}
130
+ */
131
+ public getOutline(): number;
132
+ /**
133
+ * Sets label opacity.
134
+ * @public
135
+ * @param {number} a - Label opacity.
136
+ */
137
+ public setOpacity(a: number): void;
138
+ /**
139
+ * Sets text outline color.
140
+ * @public
141
+ * @param {number} r - Red.
142
+ * @param {number} g - Green.
143
+ * @param {number} b - Blue.
144
+ * @param {number} a - Alpha.
145
+ */
146
+ public setOutlineColor(r: number, g: number, b: number, a: number): void;
147
+ /**
148
+ * Sets text outline color.
149
+ * @public
150
+ * @param {og.Vec4} rgba - Color vector.
151
+ */
152
+ public setOutlineColor4v(rgba: any): void;
153
+ /**
154
+ * Sets text outline color HTML string.
155
+ * @public
156
+ * @param {string} color - HTML string color.
157
+ */
158
+ public setOutlineColorHTML(color: string): void;
159
+ /**
160
+ * Gets outline color vector.
161
+ * @public
162
+ * @returns {og.Vec4}
163
+ */
164
+ public getOutlineColor(): any;
165
+ /**
166
+ * Sets outline opacity. Actually outline color alpha value.
167
+ * @public
168
+ * @param {number} opacity - Outline opacity.
169
+ */
170
+ public setOutlineOpacity(opacity: number): void;
171
+ /**
172
+ * Gets outline opacity value.
173
+ * @public
174
+ * @returns {number}
175
+ */
176
+ public getOutlineOpacity(): number;
177
+ /**
178
+ * Updates label parameters.
179
+ * @public
180
+ */
181
+ public update(): void;
182
+ _applyFontIndex(fontIndex: any): void;
183
+ /**
184
+ * Assigns font atlas and update.
185
+ * @public
186
+ * @param {og.utils.FontAtlas} fontAtlas - Font atlas.
187
+ */
188
+ public assignFontAtlas(fontAtlas: any): void;
189
+ }
190
+ export namespace ALIGN {
191
+ const RIGHT: number;
192
+ const LEFT: number;
193
+ const CENTER: number;
194
+ }
@@ -0,0 +1,24 @@
1
+ export class LabelHandler extends BillboardHandler {
2
+ constructor(entityCollection: any, maxLetters?: number);
3
+ _gliphParamBuffer: any;
4
+ _fontIndexBuffer: any;
5
+ _noOutlineBuffer: any;
6
+ _outlineBuffer: any;
7
+ _outlineColorBuffer: any;
8
+ _gliphParamArr: Float32Array;
9
+ _fontIndexArr: Float32Array;
10
+ _noOutlineArr: Float32Array;
11
+ _outlineArr: Float32Array;
12
+ _outlineColorArr: Float32Array;
13
+ _maxLetters: number;
14
+ assignFontAtlas(label: any): void;
15
+ setText(index: any, text: any, fontIndex: any, align: any): void;
16
+ setOutlineColorArr(index: any, rgba: any): void;
17
+ setOutlineArr(index: any, outline: any): void;
18
+ setFontIndexArr(index: any, fontIndex: any): void;
19
+ createFontIndexBuffer(): void;
20
+ createOutlineBuffer(): void;
21
+ createOutlineColorBuffer(): void;
22
+ setMaxLetters(c: any): void;
23
+ }
24
+ import { BillboardHandler } from "./BillboardHandler.js";