@openglobus/og 0.11.5 → 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.
- package/package.json +5 -7
- package/src/og/Clock.js +6 -10
- package/src/og/Events.js +5 -7
- package/src/og/Extent.js +73 -32
- package/src/og/ImageCanvas.js +18 -15
- package/src/og/LonLat.js +13 -10
- package/src/og/Popup.js +18 -17
- package/src/og/QueueArray.js +3 -4
- package/src/og/Rectangle.js +4 -6
- package/src/og/Stack.js +2 -4
- package/src/og/ajax.js +20 -14
- package/src/og/astro/earth.js +21 -15
- package/src/og/bv/Box.js +2 -3
- package/src/og/bv/Sphere.js +10 -7
- package/src/og/camera/Frustum.js +19 -12
- package/src/og/camera/PlanetCamera.js +0 -1
- package/src/og/control/CompassButton.js +1 -2
- package/src/og/control/Control.js +7 -9
- package/src/og/control/DebugInfo.js +0 -1
- package/src/og/control/KeyboardNavigation.js +9 -9
- package/src/og/control/LayerSwitcher.js +21 -20
- package/src/og/control/SegmentBoundVisualization.js +5 -6
- package/src/og/control/ShowFps.js +12 -7
- package/src/og/control/SimpleNavigation.js +5 -7
- package/src/og/control/Sun.js +22 -12
- package/src/og/control/ToggleWireframe.js +3 -3
- package/src/og/control/TouchNavigation.js +43 -32
- package/src/og/control/ZoomControl.js +40 -24
- package/src/og/ellipsoid/Ellipsoid.js +148 -56
- package/src/og/ellipsoid/wgs84.js +3 -3
- package/src/og/entity/BaseBillboard.js +65 -14
- package/src/og/entity/Billboard.js +9 -5
- package/src/og/entity/BillboardHandler.js +310 -64
- package/src/og/entity/Entity.js +39 -1
- package/src/og/entity/EntityCollection.js +47 -24
- package/src/og/entity/GeoObject.js +228 -0
- package/src/og/entity/GeoObjectHandler.js +910 -0
- package/src/og/entity/GeometryHandler.js +595 -123
- package/src/og/entity/Label.js +53 -18
- package/src/og/entity/LabelHandler.js +42 -244
- package/src/og/entity/LabelWorker.js +213 -0
- package/src/og/entity/Object3d.js +504 -0
- package/src/og/entity/PointCloud.js +76 -28
- package/src/og/entity/PointCloudHandler.js +5 -5
- package/src/og/entity/Ray.js +49 -16
- package/src/og/entity/Strip.js +72 -43
- package/src/og/entity/StripHandler.js +23 -23
- package/src/og/layer/BaseGeoImage.js +50 -19
- package/src/og/layer/CanvasTiles.js +16 -16
- package/src/og/layer/GeoImage.js +6 -6
- package/src/og/layer/KML.js +55 -33
- package/src/og/layer/Layer.js +3 -3
- package/src/og/layer/Vector.js +94 -48
- package/src/og/layer/WMS.js +33 -16
- package/src/og/light/LightSource.js +19 -12
- package/src/og/math/Mat3.js +24 -12
- package/src/og/math/Mat4.js +603 -603
- package/src/og/math/Plane.js +19 -18
- package/src/og/math/Ray.js +17 -12
- package/src/og/math/Vec2.js +24 -14
- package/src/og/math/Vec3.js +60 -30
- package/src/og/math/coder.js +7 -7
- package/src/og/proj/EPSG3857.js +3 -3
- package/src/og/proj/EPSG4326.js +3 -3
- package/src/og/proj/Proj.js +2 -4
- package/src/og/quadTree/Node.js +31 -17
- package/src/og/renderer/Renderer.js +23 -6
- package/src/og/renderer/RendererEvents.js +1 -1
- package/src/og/scene/BaseNode.js +2 -3
- package/src/og/scene/Planet.js +2 -2
- package/src/og/scene/RenderNode.js +15 -8
- package/src/og/shaders/geoObject.js +211 -0
- package/src/og/shaders/pointCloud.js +41 -41
- package/src/og/shaders/shape.js +12 -18
- package/src/og/shaders/skybox.js +36 -36
- package/src/og/shapes/BaseShape.js +107 -35
- package/src/og/shapes/Icosphere.js +25 -10
- package/src/og/shapes/Sphere.js +8 -11
- package/src/og/utils/TextureAtlas.js +16 -18
- package/src/og/utils/shared.js +1 -1
- package/src/og/webgl/Handler.js +68 -49
- package/src/og/webgl/Multisample.js +44 -16
- package/src/og/webgl/Program.js +78 -33
- package/src/og/webgl/callbacks.js +3 -3
- package/types/Deferred.d.ts +1 -1
- package/types/Events.d.ts +2 -2
- package/types/Extent.d.ts +1 -1
- package/types/Rectangle.d.ts +1 -1
- package/types/ajax.d.ts +1 -1
- package/types/bv/Box.d.ts +1 -1
- package/types/bv/Sphere.d.ts +1 -1
- package/types/camera/Camera.d.ts +5 -5
- package/types/camera/Frustum.d.ts +6 -6
- package/types/camera/PlanetCamera.d.ts +8 -8
- package/types/control/Control.d.ts +1 -1
- package/types/control/EarthCoordinates.d.ts +1 -1
- package/types/control/Sun.d.ts +1 -1
- package/types/entity/BaseBillboard.d.ts +15 -8
- package/types/entity/Entity.d.ts +24 -9
- package/types/entity/EntityCollection.d.ts +15 -9
- package/types/entity/GeoObject.d.ts +111 -0
- package/types/entity/GeoObjectHandler.d.ts +77 -0
- package/types/entity/Geometry.d.ts +1 -1
- package/types/entity/GeometryHandler.d.ts +1 -1
- package/types/entity/Label.d.ts +3 -3
- package/types/entity/LabelHandler.d.ts +2 -0
- package/types/entity/LabelWorker.d.ts +9 -0
- package/types/entity/PointCloud.d.ts +1 -1
- package/types/entity/Polyline.d.ts +5 -5
- package/types/entity/Ray.d.ts +1 -1
- package/types/entity/Strip.d.ts +1 -1
- package/types/layer/BaseGeoImage.d.ts +3 -3
- package/types/layer/CanvasTiles.d.ts +5 -5
- package/types/layer/GeoImage.d.ts +1 -1
- package/types/layer/GeoVideo.d.ts +1 -1
- package/types/layer/Layer.d.ts +5 -5
- package/types/layer/Vector.d.ts +9 -9
- package/types/layer/XYZ.d.ts +3 -3
- package/types/light/LightSource.d.ts +7 -7
- package/types/math/Plane.d.ts +1 -1
- package/types/math/Ray.d.ts +1 -1
- package/types/math/Vec2.d.ts +34 -34
- package/types/math/Vec3.d.ts +1 -1
- package/types/math/Vec4.d.ts +1 -1
- package/types/math/coder.d.ts +1 -1
- package/types/math.d.ts +1 -1
- package/types/proj/Proj.d.ts +2 -2
- package/types/quadTree/Node.d.ts +1 -1
- package/types/renderer/Renderer.d.ts +12 -10
- package/types/renderer/RendererEvents.d.ts +1 -1
- package/types/scene/BaseNode.d.ts +4 -4
- package/types/scene/Planet.d.ts +40 -40
- package/types/scene/RenderNode.d.ts +9 -9
- package/types/segment/Segment.d.ts +9 -9
- package/types/shaders/geoObject.d.ts +3 -0
- package/types/shapes/BaseShape.d.ts +5 -5
- package/types/terrain/EmptyTerrain.d.ts +2 -2
- package/types/terrain/GlobusTerrain.d.ts +4 -4
- package/types/utils/TextureAtlas.d.ts +4 -4
- package/types/utils/shared.d.ts +9 -9
- package/types/webgl/Framebuffer.d.ts +1 -1
- package/types/webgl/Handler.d.ts +16 -7
- package/types/webgl/Multisample.d.ts +2 -2
- package/types/webgl/Program.d.ts +6 -0
- package/types/webgl/ProgramController.d.ts +1 -1
package/types/scene/Planet.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export class Planet extends RenderNode {
|
|
|
22
22
|
* @public
|
|
23
23
|
* @type {Ellipsoid}
|
|
24
24
|
*/
|
|
25
|
-
public ellipsoid:
|
|
25
|
+
public ellipsoid: Ellipsoid;
|
|
26
26
|
/**
|
|
27
27
|
* Squared ellipsoid radius.
|
|
28
28
|
* @protected
|
|
@@ -34,38 +34,38 @@ export class Planet extends RenderNode {
|
|
|
34
34
|
* @public
|
|
35
35
|
* @type {Array.<Layer>}
|
|
36
36
|
*/
|
|
37
|
-
public layers: Array<
|
|
37
|
+
public layers: Array<Layer>;
|
|
38
38
|
/**
|
|
39
39
|
* Current visible imagery tile layers array.
|
|
40
40
|
* @public
|
|
41
41
|
* @type {Array.<Layer>}
|
|
42
42
|
*/
|
|
43
|
-
public visibleTileLayers: Array<
|
|
43
|
+
public visibleTileLayers: Array<Layer>;
|
|
44
44
|
/**
|
|
45
45
|
* Current visible vector layers array.
|
|
46
46
|
* @protected
|
|
47
47
|
* @type {Array.<layer.Vector>}
|
|
48
48
|
*/
|
|
49
|
-
protected visibleVectorLayers: Array<
|
|
49
|
+
protected visibleVectorLayers: Array<layer.Vector>;
|
|
50
50
|
_visibleTileLayerSlices: any[];
|
|
51
51
|
/**
|
|
52
52
|
* Vector layers visible nodes with collections.
|
|
53
53
|
* @protected
|
|
54
54
|
* @type {Array.<EntityCollection>}
|
|
55
55
|
*/
|
|
56
|
-
protected _frustumEntityCollections: Array<
|
|
56
|
+
protected _frustumEntityCollections: Array<EntityCollection>;
|
|
57
57
|
/**
|
|
58
58
|
* There is only one base layer on the globe when layer.isBaseLayer is true.
|
|
59
59
|
* @public
|
|
60
60
|
* @type {Layer}
|
|
61
61
|
*/
|
|
62
|
-
public baseLayer:
|
|
62
|
+
public baseLayer: Layer;
|
|
63
63
|
/**
|
|
64
64
|
* Terrain provider.
|
|
65
65
|
* @public
|
|
66
66
|
* @type {Terrain}
|
|
67
67
|
*/
|
|
68
|
-
public terrain:
|
|
68
|
+
public terrain: Terrain;
|
|
69
69
|
/**
|
|
70
70
|
* Camera is this.renderer.activeCamera pointer.
|
|
71
71
|
* @public
|
|
@@ -108,44 +108,44 @@ export class Planet extends RenderNode {
|
|
|
108
108
|
* @protected
|
|
109
109
|
* @type {quadTree.Node}
|
|
110
110
|
*/
|
|
111
|
-
protected _renderedNodes:
|
|
111
|
+
protected _renderedNodes: quadTree.Node;
|
|
112
112
|
_renderedNodesInFrustum: any[];
|
|
113
113
|
/**
|
|
114
114
|
* Created nodes cache
|
|
115
115
|
* @protected
|
|
116
116
|
* @type {quadTree.Node}
|
|
117
117
|
*/
|
|
118
|
-
protected _quadTreeNodesCacheMerc:
|
|
118
|
+
protected _quadTreeNodesCacheMerc: quadTree.Node;
|
|
119
119
|
/**
|
|
120
120
|
* Current visible mercator segments tree nodes array.
|
|
121
121
|
* @protected
|
|
122
122
|
* @type {quadTree.Node}
|
|
123
123
|
*/
|
|
124
|
-
protected _visibleNodes:
|
|
124
|
+
protected _visibleNodes: quadTree.Node;
|
|
125
125
|
/**
|
|
126
126
|
* Current visible north pole nodes tree nodes array.
|
|
127
127
|
* @protected
|
|
128
128
|
* @type {quadTree.Node}
|
|
129
129
|
*/
|
|
130
|
-
protected _visibleNodesNorth:
|
|
130
|
+
protected _visibleNodesNorth: quadTree.Node;
|
|
131
131
|
/**
|
|
132
132
|
* Current visible south pole nodes tree nodes array.
|
|
133
133
|
* @protected
|
|
134
134
|
* @type {quadTree.Node}
|
|
135
135
|
*/
|
|
136
|
-
protected _visibleNodesSouth:
|
|
136
|
+
protected _visibleNodesSouth: quadTree.Node;
|
|
137
137
|
/**
|
|
138
138
|
* Layers activity lock.
|
|
139
139
|
* @public
|
|
140
140
|
* @type {idle.Lock}
|
|
141
141
|
*/
|
|
142
|
-
public layerLock:
|
|
142
|
+
public layerLock: idle.Lock;
|
|
143
143
|
/**
|
|
144
144
|
* Terrain providers activity lock.
|
|
145
145
|
* @public
|
|
146
146
|
* @type {idle.Lock}
|
|
147
147
|
*/
|
|
148
|
-
public terrainLock:
|
|
148
|
+
public terrainLock: idle.Lock;
|
|
149
149
|
/**
|
|
150
150
|
* Layer's transparent colors.
|
|
151
151
|
* @protected
|
|
@@ -182,19 +182,19 @@ export class Planet extends RenderNode {
|
|
|
182
182
|
* @protected
|
|
183
183
|
* @type {quadTree.Node}
|
|
184
184
|
*/
|
|
185
|
-
protected _quadTree:
|
|
185
|
+
protected _quadTree: quadTree.Node;
|
|
186
186
|
/**
|
|
187
187
|
* North grid tree.
|
|
188
188
|
* @protected
|
|
189
189
|
* @type {quadTree.Node}
|
|
190
190
|
*/
|
|
191
|
-
protected _quadTreeNorth:
|
|
191
|
+
protected _quadTreeNorth: quadTree.Node;
|
|
192
192
|
/**
|
|
193
193
|
* South grid tree.
|
|
194
194
|
* @protected
|
|
195
195
|
* @type {quadTree.Node}
|
|
196
196
|
*/
|
|
197
|
-
protected _quadTreeSouth:
|
|
197
|
+
protected _quadTreeSouth: quadTree.Node;
|
|
198
198
|
/**
|
|
199
199
|
* Night glowing gl texture.
|
|
200
200
|
* @protected
|
|
@@ -217,7 +217,7 @@ export class Planet extends RenderNode {
|
|
|
217
217
|
* @type {boolean}
|
|
218
218
|
*/
|
|
219
219
|
protected _useSpecularTexture: boolean;
|
|
220
|
-
_maxGridSize:
|
|
220
|
+
_maxGridSize: any;
|
|
221
221
|
/**
|
|
222
222
|
* Segment multiple textures size.(4 - convinient value for the most devices)
|
|
223
223
|
* @const
|
|
@@ -248,7 +248,7 @@ export class Planet extends RenderNode {
|
|
|
248
248
|
* @protected
|
|
249
249
|
* @type{utils.GeoImageCreator}
|
|
250
250
|
*/
|
|
251
|
-
protected _geoImageCreator:
|
|
251
|
+
protected _geoImageCreator: utils.GeoImageCreator;
|
|
252
252
|
_vectorTileCreator: VectorTileCreator;
|
|
253
253
|
_normalMapCreator: NormalMapCreator;
|
|
254
254
|
_terrainWorker: TerrainWorker;
|
|
@@ -264,64 +264,64 @@ export class Planet extends RenderNode {
|
|
|
264
264
|
* Add the given control to the renderer of the planet scene.
|
|
265
265
|
* @param {control.Control} control - Control.
|
|
266
266
|
*/
|
|
267
|
-
addControl(control:
|
|
267
|
+
addControl(control: control.Control): void;
|
|
268
268
|
setRatioLod(maxLod: any, minLod: any): void;
|
|
269
269
|
_renderCompletedActivated: boolean;
|
|
270
270
|
/**
|
|
271
271
|
* Add the given controls array to the renderer of the planet.
|
|
272
272
|
* @param {Array.<control.Control>} cArr - Control array.
|
|
273
273
|
*/
|
|
274
|
-
addControls(cArr: Array<
|
|
274
|
+
addControls(cArr: Array<control.Control>): void;
|
|
275
275
|
/**
|
|
276
276
|
* Return layer by it name
|
|
277
277
|
* @param {string} name - Name of the layer. og.Layer.prototype.name
|
|
278
278
|
* @public
|
|
279
279
|
* @returns {Layer} -
|
|
280
280
|
*/
|
|
281
|
-
public getLayerByName(name: string):
|
|
281
|
+
public getLayerByName(name: string): Layer;
|
|
282
282
|
/**
|
|
283
283
|
* Adds the given layer to the planet.
|
|
284
284
|
* @param {Layer} layer - Layer object.
|
|
285
285
|
* @public
|
|
286
286
|
*/
|
|
287
|
-
public addLayer(layer:
|
|
287
|
+
public addLayer(layer: Layer): void;
|
|
288
288
|
/**
|
|
289
289
|
* Dispatch layer visibility changing event.
|
|
290
290
|
* @param {Layer} layer - Changed layer.
|
|
291
291
|
* @protected
|
|
292
292
|
*/
|
|
293
|
-
protected _onLayerVisibilityChanged(layer:
|
|
293
|
+
protected _onLayerVisibilityChanged(layer: Layer): void;
|
|
294
294
|
/**
|
|
295
295
|
* Adds the given layers array to the planet.
|
|
296
296
|
* @param {Array.<Layer>} layers - Layers array.
|
|
297
297
|
* @public
|
|
298
298
|
*/
|
|
299
|
-
public addLayers(layers: Array<
|
|
299
|
+
public addLayers(layers: Array<Layer>): void;
|
|
300
300
|
/**
|
|
301
301
|
* Removes the given layer from the planet.
|
|
302
302
|
* @param {Layer} layer - Layer to remove.
|
|
303
303
|
* @return {Layer|undefined} The removed layer or undefined if the layer was not found.
|
|
304
304
|
* @public
|
|
305
305
|
*/
|
|
306
|
-
public removeLayer(layer:
|
|
306
|
+
public removeLayer(layer: Layer): Layer | undefined;
|
|
307
307
|
/**
|
|
308
308
|
*
|
|
309
309
|
* @protected
|
|
310
310
|
* @param {Layer} layer - Material layer.
|
|
311
311
|
*/
|
|
312
|
-
protected _clearLayerMaterial(layer:
|
|
312
|
+
protected _clearLayerMaterial(layer: Layer): void;
|
|
313
313
|
/**
|
|
314
314
|
* Get the collection of layers associated with this planet.
|
|
315
315
|
* @return {Array.<Layer>} Layers array.
|
|
316
316
|
* @public
|
|
317
317
|
*/
|
|
318
|
-
public getLayers(): Array<
|
|
318
|
+
public getLayers(): Array<Layer>;
|
|
319
319
|
/**
|
|
320
320
|
* Sets base layer coverage to the planet.
|
|
321
321
|
* @param {Layer} layer - Layer object.
|
|
322
322
|
* @public
|
|
323
323
|
*/
|
|
324
|
-
public setBaseLayer(layer:
|
|
324
|
+
public setBaseLayer(layer: Layer): void;
|
|
325
325
|
/**
|
|
326
326
|
* Sets elevation scale. 1.0 is default.
|
|
327
327
|
* @param {number} factor - Elevation scale.
|
|
@@ -337,7 +337,7 @@ export class Planet extends RenderNode {
|
|
|
337
337
|
* @public
|
|
338
338
|
* @param {Terrain} terrain - Terrain provider.
|
|
339
339
|
*/
|
|
340
|
-
public setTerrain(terrain:
|
|
340
|
+
public setTerrain(terrain: Terrain): void;
|
|
341
341
|
/**
|
|
342
342
|
* @virtual
|
|
343
343
|
* @protected
|
|
@@ -421,21 +421,21 @@ export class Planet extends RenderNode {
|
|
|
421
421
|
* @param {Ray} ray - Ray 3d.
|
|
422
422
|
* @returns {Vec3} -
|
|
423
423
|
*/
|
|
424
|
-
public getRayIntersectionEllipsoid(ray:
|
|
424
|
+
public getRayIntersectionEllipsoid(ray: Ray): Vec3;
|
|
425
425
|
/**
|
|
426
426
|
* Returns 2d screen coordanates projection point to the planet ellipsoid 3d coordinates.
|
|
427
427
|
* @public
|
|
428
428
|
* @param {math.Pixel} px - 2D sreen coordinates.
|
|
429
429
|
* @returns {Vec3} -
|
|
430
430
|
*/
|
|
431
|
-
public getCartesianFromPixelEllipsoid(px:
|
|
431
|
+
public getCartesianFromPixelEllipsoid(px: math.Pixel): Vec3;
|
|
432
432
|
/**
|
|
433
433
|
* Returns 2d screen coordanates projection point to the planet ellipsoid geographical coordinates.
|
|
434
434
|
* @public
|
|
435
435
|
* @param {math.Pixel} px - 2D screen coordinates.
|
|
436
436
|
* @returns {LonLat} -
|
|
437
437
|
*/
|
|
438
|
-
public getLonLatFromPixelEllipsoid(px:
|
|
438
|
+
public getLonLatFromPixelEllipsoid(px: math.Pixel): LonLat;
|
|
439
439
|
/**
|
|
440
440
|
* Returns 3d cartesian coordinates on the relief planet by mouse cursor
|
|
441
441
|
* position or null if mouse cursor is outside the planet.
|
|
@@ -452,7 +452,7 @@ export class Planet extends RenderNode {
|
|
|
452
452
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
453
453
|
* @returns {Vec3} -
|
|
454
454
|
*/
|
|
455
|
-
public getCartesianFromPixelTerrain(px:
|
|
455
|
+
public getCartesianFromPixelTerrain(px: Vec2, force?: boolean): Vec3;
|
|
456
456
|
/**
|
|
457
457
|
* Returns geographical coordinates on the relief planet by 2d screen coordinates.
|
|
458
458
|
* position or null if input coordinates is outside the planet.
|
|
@@ -461,21 +461,21 @@ export class Planet extends RenderNode {
|
|
|
461
461
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
462
462
|
* @returns {LonLat} -
|
|
463
463
|
*/
|
|
464
|
-
public getLonLatFromPixelTerrain(px:
|
|
464
|
+
public getLonLatFromPixelTerrain(px: Vec2, force?: boolean): LonLat;
|
|
465
465
|
/**
|
|
466
466
|
* Returns projected 2d screen coordinates by 3d cartesian coordiantes.
|
|
467
467
|
* @public
|
|
468
468
|
* @param {Vec3} coords - Cartesian coordinates.
|
|
469
469
|
* @returns {Vec2} -
|
|
470
470
|
*/
|
|
471
|
-
public getPixelFromCartesian(coords: Vec3):
|
|
471
|
+
public getPixelFromCartesian(coords: Vec3): Vec2;
|
|
472
472
|
/**
|
|
473
473
|
* Returns projected 2d screen coordinates by geographical coordinates.
|
|
474
474
|
* @public
|
|
475
475
|
* @param {LonLat} lonlat - Geographical coordinates.
|
|
476
476
|
* @returns {Vec2} -
|
|
477
477
|
*/
|
|
478
|
-
public getPixelFromLonLat(lonlat: LonLat):
|
|
478
|
+
public getPixelFromLonLat(lonlat: LonLat): Vec2;
|
|
479
479
|
/**
|
|
480
480
|
* Returns distance from active camera to the the planet ellipsoid
|
|
481
481
|
* coordiantes unprojected by 2d screen coordiantes, or null if screen coordinates outside the planet.
|
|
@@ -483,7 +483,7 @@ export class Planet extends RenderNode {
|
|
|
483
483
|
* @param {Vec2} px - Screen coordinates.
|
|
484
484
|
* @returns {number} -
|
|
485
485
|
*/
|
|
486
|
-
public getDistanceFromPixelEllipsoid(px:
|
|
486
|
+
public getDistanceFromPixelEllipsoid(px: Vec2): number;
|
|
487
487
|
/**
|
|
488
488
|
* Returns distance from active camera to the the relief planet coordiantes unprojected
|
|
489
489
|
* by 2d screen coordiantes, or null if screen coordinates outside the planet.
|
|
@@ -494,7 +494,7 @@ export class Planet extends RenderNode {
|
|
|
494
494
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
495
495
|
* @returns {number} -
|
|
496
496
|
*/
|
|
497
|
-
public getDistanceFromPixel(px:
|
|
497
|
+
public getDistanceFromPixel(px: Vec2): number;
|
|
498
498
|
/**
|
|
499
499
|
* Sets camera to the planet geographical extent.
|
|
500
500
|
* @public
|
|
@@ -531,7 +531,7 @@ export class Planet extends RenderNode {
|
|
|
531
531
|
* @param {cameraCallback} [startCallback] - Callback that calls after flying when flying is finished.
|
|
532
532
|
* @param {cameraCallback} [completeCallback] - Callback that calls befor the flying begins.
|
|
533
533
|
*/
|
|
534
|
-
public flyExtent(extent: Extent, height?: number, up?: Vec3, ampl?: number, completeCallback?:
|
|
534
|
+
public flyExtent(extent: Extent, height?: number, up?: Vec3, ampl?: number, completeCallback?: cameraCallback, startCallback?: cameraCallback): void;
|
|
535
535
|
/**
|
|
536
536
|
* Fly camera to the new point.
|
|
537
537
|
* @public
|
|
@@ -14,7 +14,7 @@ export class RenderNode {
|
|
|
14
14
|
* @public
|
|
15
15
|
* @type {Renderer}
|
|
16
16
|
*/
|
|
17
|
-
public renderer:
|
|
17
|
+
public renderer: Renderer;
|
|
18
18
|
drawMode: number;
|
|
19
19
|
/** Show rendering.
|
|
20
20
|
* @public
|
|
@@ -42,7 +42,7 @@ export class RenderNode {
|
|
|
42
42
|
* @public
|
|
43
43
|
* @type {Array.<EntityCollection>}
|
|
44
44
|
*/
|
|
45
|
-
public entityCollections: Array<
|
|
45
|
+
public entityCollections: Array<EntityCollection>;
|
|
46
46
|
_pickingId: number;
|
|
47
47
|
events: Events;
|
|
48
48
|
/**
|
|
@@ -56,7 +56,7 @@ export class RenderNode {
|
|
|
56
56
|
* @public
|
|
57
57
|
* @param {Renderer} renderer - Redner node's renderer.
|
|
58
58
|
*/
|
|
59
|
-
public assign(renderer:
|
|
59
|
+
public assign(renderer: Renderer): void;
|
|
60
60
|
onremove(): void;
|
|
61
61
|
remove(): void;
|
|
62
62
|
/**
|
|
@@ -66,33 +66,33 @@ export class RenderNode {
|
|
|
66
66
|
* @param {boolean} [isHidden] - If it's true that this collection has specific rendering.
|
|
67
67
|
* @returns {RenderNode} -
|
|
68
68
|
*/
|
|
69
|
-
public addEntityCollection(entityCollection:
|
|
69
|
+
public addEntityCollection(entityCollection: EntityCollection, isHidden?: boolean): RenderNode;
|
|
70
70
|
/**
|
|
71
71
|
* Removes entity collection.
|
|
72
72
|
* @public
|
|
73
73
|
* @param {EntityCollection} entityCollection - Entity collection for remove.
|
|
74
74
|
*/
|
|
75
|
-
public removeEntityCollection(entityCollection:
|
|
75
|
+
public removeEntityCollection(entityCollection: EntityCollection): void;
|
|
76
76
|
/**
|
|
77
77
|
* Adds point light source.
|
|
78
78
|
* @public
|
|
79
79
|
* @param {LightSource} light - Light source.
|
|
80
80
|
* @returns {RenderNode}
|
|
81
81
|
*/
|
|
82
|
-
public addLight(light:
|
|
82
|
+
public addLight(light: LightSource): RenderNode;
|
|
83
83
|
/**
|
|
84
84
|
* Gets light object by its name.
|
|
85
85
|
* @public
|
|
86
86
|
* @param {string} name - Point light name.
|
|
87
87
|
* @returns {LightSource}
|
|
88
88
|
*/
|
|
89
|
-
public getLightByName(name: string):
|
|
89
|
+
public getLightByName(name: string): LightSource;
|
|
90
90
|
/**
|
|
91
91
|
* Removes light source.
|
|
92
92
|
* @public
|
|
93
93
|
* @param {LightSource} light - Light source object.
|
|
94
94
|
*/
|
|
95
|
-
public removeLight(light:
|
|
95
|
+
public removeLight(light: LightSource): void;
|
|
96
96
|
/**
|
|
97
97
|
* Calls render frame node's callback. Used in renderer.
|
|
98
98
|
* @public
|
|
@@ -132,7 +132,7 @@ export class RenderNode {
|
|
|
132
132
|
* @public
|
|
133
133
|
* @param {Array<og.EntityCollection>} ec - Entity collection array.
|
|
134
134
|
*/
|
|
135
|
-
public drawPickingEntityCollections(ec: Array<
|
|
135
|
+
public drawPickingEntityCollections(ec: Array<og.EntityCollection>): void;
|
|
136
136
|
/**
|
|
137
137
|
* Picking entity frame callback
|
|
138
138
|
* @private
|
|
@@ -14,7 +14,7 @@ export class Segment {
|
|
|
14
14
|
* @param {number} tileZoom - Zoom index.
|
|
15
15
|
* @param {Extent} extent - Segment extent.
|
|
16
16
|
*/
|
|
17
|
-
constructor(node:
|
|
17
|
+
constructor(node: quadTree.Node, planet: Planet, tileZoom: number, extent: Extent);
|
|
18
18
|
isPole: boolean;
|
|
19
19
|
_tileGroup: number;
|
|
20
20
|
_projection: import("../proj/Proj.js").Proj;
|
|
@@ -22,17 +22,17 @@ export class Segment {
|
|
|
22
22
|
* Quad tree node of the segment.
|
|
23
23
|
* @type {quadTree.Node}
|
|
24
24
|
*/
|
|
25
|
-
node:
|
|
25
|
+
node: quadTree.Node;
|
|
26
26
|
/**
|
|
27
27
|
* Planet pointer.
|
|
28
28
|
* @type {Planet}
|
|
29
29
|
*/
|
|
30
|
-
planet:
|
|
30
|
+
planet: Planet;
|
|
31
31
|
/**
|
|
32
32
|
* WebGl handler pointer.
|
|
33
33
|
* @type {Handler}
|
|
34
34
|
*/
|
|
35
|
-
handler:
|
|
35
|
+
handler: Handler;
|
|
36
36
|
/**
|
|
37
37
|
* Segment bounding sphere
|
|
38
38
|
* @type {Sphere}
|
|
@@ -84,7 +84,7 @@ export class Segment {
|
|
|
84
84
|
* Texture materials array.
|
|
85
85
|
* @type {Array.<planetSegment.Material>}
|
|
86
86
|
*/
|
|
87
|
-
materials: Array<
|
|
87
|
+
materials: Array<planetSegment.Material>;
|
|
88
88
|
/**
|
|
89
89
|
* Plain segment vertices was created.
|
|
90
90
|
* @type {boolean}
|
|
@@ -155,7 +155,7 @@ export class Segment {
|
|
|
155
155
|
* @param {Camera} camera - Camera object.
|
|
156
156
|
* @returns {boolean} -
|
|
157
157
|
*/
|
|
158
|
-
public acceptForRendering(camera:
|
|
158
|
+
public acceptForRendering(camera: Camera): boolean;
|
|
159
159
|
/**
|
|
160
160
|
* Returns entity terrain point.
|
|
161
161
|
* @public
|
|
@@ -164,7 +164,7 @@ export class Segment {
|
|
|
164
164
|
* @param {Vec3} [normal] - Terrain point normal.
|
|
165
165
|
* @returns {Vec3} -
|
|
166
166
|
*/
|
|
167
|
-
public getEntityTerrainPoint(entity:
|
|
167
|
+
public getEntityTerrainPoint(entity: Entity, res: Vec3, normal?: Vec3): Vec3;
|
|
168
168
|
isEntityInside(e: any): boolean;
|
|
169
169
|
/**
|
|
170
170
|
* Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
|
|
@@ -255,7 +255,7 @@ export class Segment {
|
|
|
255
255
|
* @param {Layer} layer - Layer object.
|
|
256
256
|
* @returns {planetSegment.Material} - Segment material.
|
|
257
257
|
*/
|
|
258
|
-
public getMaterialByLayer(layer: Layer):
|
|
258
|
+
public getMaterialByLayer(layer: Layer): planetSegment.Material;
|
|
259
259
|
_getLayerExtentOffset(layer: any): number[];
|
|
260
260
|
screenRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
|
|
261
261
|
heightPickingRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
|
|
@@ -269,7 +269,7 @@ export class Segment {
|
|
|
269
269
|
getExtentMerc(): Extent;
|
|
270
270
|
getExtent(): Extent;
|
|
271
271
|
getNodeState(): any;
|
|
272
|
-
getNeighborSide(b: any):
|
|
272
|
+
getNeighborSide(b: any): 0 | 1 | 2 | 3 | -1;
|
|
273
273
|
}
|
|
274
274
|
import { Sphere } from "../bv/Sphere.js";
|
|
275
275
|
import { Box } from "../bv/Box.js";
|
|
@@ -128,7 +128,7 @@ export class BaseShape {
|
|
|
128
128
|
* @protected
|
|
129
129
|
* @type {RenderNode}
|
|
130
130
|
*/
|
|
131
|
-
protected _renderNode:
|
|
131
|
+
protected _renderNode: RenderNode;
|
|
132
132
|
/**
|
|
133
133
|
* Assigned picking color.
|
|
134
134
|
* @protected
|
|
@@ -140,13 +140,13 @@ export class BaseShape {
|
|
|
140
140
|
* @protected
|
|
141
141
|
* @type {Entity}
|
|
142
142
|
*/
|
|
143
|
-
protected _entity:
|
|
143
|
+
protected _entity: Entity;
|
|
144
144
|
/**
|
|
145
145
|
* Handler that stores and renders this shape object.
|
|
146
146
|
* @protected
|
|
147
147
|
* @type {ShapeHandler}
|
|
148
148
|
*/
|
|
149
|
-
protected _handler:
|
|
149
|
+
protected _handler: ShapeHandler;
|
|
150
150
|
/**
|
|
151
151
|
* Shape handler array index.
|
|
152
152
|
* @protected
|
|
@@ -169,7 +169,7 @@ export class BaseShape {
|
|
|
169
169
|
* @public
|
|
170
170
|
* @param {Vec4} color - RGBA color vector.
|
|
171
171
|
*/
|
|
172
|
-
public setColor4v(color:
|
|
172
|
+
public setColor4v(color: Vec4): void;
|
|
173
173
|
/**
|
|
174
174
|
* Sets shape opacity value.
|
|
175
175
|
* @public
|
|
@@ -198,7 +198,7 @@ export class BaseShape {
|
|
|
198
198
|
* @public
|
|
199
199
|
* @param {RenderNode} renderNode - Render node to assign.
|
|
200
200
|
*/
|
|
201
|
-
public setRenderNode(renderNode:
|
|
201
|
+
public setRenderNode(renderNode: RenderNode): void;
|
|
202
202
|
/**
|
|
203
203
|
* Sets shape position.
|
|
204
204
|
* @public
|
|
@@ -42,7 +42,7 @@ export class EmptyTerrain {
|
|
|
42
42
|
* @protected
|
|
43
43
|
* @type {Planet}
|
|
44
44
|
*/
|
|
45
|
-
protected _planet:
|
|
45
|
+
protected _planet: Planet;
|
|
46
46
|
_geoid: any;
|
|
47
47
|
isBlur(): boolean;
|
|
48
48
|
set maxNodeZoom(arg: number);
|
|
@@ -55,7 +55,7 @@ export class EmptyTerrain {
|
|
|
55
55
|
* @virtual
|
|
56
56
|
* @param {Segment} segment - Segment to create elevation data.
|
|
57
57
|
*/
|
|
58
|
-
public handleSegmentTerrain(segment:
|
|
58
|
+
public handleSegmentTerrain(segment: Segment): void;
|
|
59
59
|
isReady(): any;
|
|
60
60
|
/**
|
|
61
61
|
* Abstract function
|
|
@@ -74,7 +74,7 @@ export class GlobusTerrain extends EmptyTerrain {
|
|
|
74
74
|
* @param {Segment} segment - Segment that wants a terrain data.
|
|
75
75
|
* @param {boolean} forceLoading
|
|
76
76
|
*/
|
|
77
|
-
public loadTerrain(segment:
|
|
77
|
+
public loadTerrain(segment: Segment, forceLoading: boolean): void;
|
|
78
78
|
/**
|
|
79
79
|
* Creates query url.
|
|
80
80
|
* @protected
|
|
@@ -82,14 +82,14 @@ export class GlobusTerrain extends EmptyTerrain {
|
|
|
82
82
|
* @param {Segment} segment -
|
|
83
83
|
* @returns {string} -
|
|
84
84
|
*/
|
|
85
|
-
protected _createUrl(segment:
|
|
85
|
+
protected _createUrl(segment: Segment): string;
|
|
86
86
|
/**
|
|
87
87
|
* Returns actual url query string.
|
|
88
88
|
* @protected
|
|
89
89
|
* @param {Segment} segment - Segment that loads image data.
|
|
90
90
|
* @returns {string} - Url string.
|
|
91
91
|
*/
|
|
92
|
-
protected _getHTTPRequestString(segment:
|
|
92
|
+
protected _getHTTPRequestString(segment: Segment): string;
|
|
93
93
|
/**
|
|
94
94
|
* Sets url rewrite callback, used for custom url rewriting for every tile laoding.
|
|
95
95
|
* @public
|
|
@@ -109,7 +109,7 @@ export class GlobusTerrain extends EmptyTerrain {
|
|
|
109
109
|
* @param {Segment} segment -
|
|
110
110
|
* @param {*} data -
|
|
111
111
|
*/
|
|
112
|
-
protected _applyElevationsData(segment:
|
|
112
|
+
protected _applyElevationsData(segment: Segment, elevations: any): void;
|
|
113
113
|
}
|
|
114
114
|
import { EmptyTerrain } from "./EmptyTerrain.js";
|
|
115
115
|
import { Events } from "../Events.js";
|
|
@@ -12,7 +12,7 @@ export class TextureAtlas {
|
|
|
12
12
|
* @public
|
|
13
13
|
* @type {Array.<utils.TextureAtlasNode >}
|
|
14
14
|
*/
|
|
15
|
-
public nodes: Array<
|
|
15
|
+
public nodes: Array<utils.TextureAtlasNode>;
|
|
16
16
|
/**
|
|
17
17
|
* Created gl texture.
|
|
18
18
|
* @public
|
|
@@ -23,7 +23,7 @@ export class TextureAtlas {
|
|
|
23
23
|
* @public
|
|
24
24
|
* @type {canvas}
|
|
25
25
|
*/
|
|
26
|
-
public canvas:
|
|
26
|
+
public canvas: canvas;
|
|
27
27
|
_handler: any;
|
|
28
28
|
_images: any[];
|
|
29
29
|
_btree: TextureAtlasNode;
|
|
@@ -51,7 +51,7 @@ export class TextureAtlas {
|
|
|
51
51
|
* @public
|
|
52
52
|
* @param {Handler} handler - WebGL handler.
|
|
53
53
|
*/
|
|
54
|
-
public assignHandler(handler:
|
|
54
|
+
public assignHandler(handler: Handler): void;
|
|
55
55
|
/**
|
|
56
56
|
* Returns image diagonal size.
|
|
57
57
|
* @param {Object} image - JavaSript image object.
|
|
@@ -66,7 +66,7 @@ export class TextureAtlas {
|
|
|
66
66
|
* and store image in the curent atlas sheme.
|
|
67
67
|
* @returns {utils.TextureAtlasNode} -
|
|
68
68
|
*/
|
|
69
|
-
public addImage(image: any, fastInsert?: boolean):
|
|
69
|
+
public addImage(image: any, fastInsert?: boolean): utils.TextureAtlasNode;
|
|
70
70
|
_completeNode(nodes: any, node: any): void;
|
|
71
71
|
/**
|
|
72
72
|
* Main atlas making function.
|
package/types/utils/shared.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export function readTextFile(fileUrl: string): string;
|
|
|
14
14
|
* @param {number} [opacity] - Opacity for the output vector.
|
|
15
15
|
* @returns {math.Vec4} -
|
|
16
16
|
*/
|
|
17
|
-
export function htmlColorToRgba(htmlColor: string, opacity?: number):
|
|
17
|
+
export function htmlColorToRgba(htmlColor: string, opacity?: number): math.Vec4;
|
|
18
18
|
export function htmlColorToFloat32Array(htmlColor: any, opacity: any): Float32Array;
|
|
19
19
|
/**
|
|
20
20
|
* Convert html color string to the RGB number vector.
|
|
@@ -86,7 +86,7 @@ export function binaryInsert(ar: any[], el: any, compare_fn: any): number;
|
|
|
86
86
|
* @param {boolean} [isSegment] - Lines are segments.
|
|
87
87
|
* @return {math.Vec2} - Intersection coordinate.
|
|
88
88
|
*/
|
|
89
|
-
export function getLinesIntersection2v(start1:
|
|
89
|
+
export function getLinesIntersection2v(start1: math.Vec2, end1: math.Vec2, start2: math.Vec2, end2: math.Vec2, isSegment?: boolean): math.Vec2;
|
|
90
90
|
/**
|
|
91
91
|
* Returns two segment lines intersection coordinate.
|
|
92
92
|
* @static
|
|
@@ -97,7 +97,7 @@ export function getLinesIntersection2v(start1: any, end1: any, start2: any, end2
|
|
|
97
97
|
* @param {boolean} [isSegment] - Lines are segments.
|
|
98
98
|
* @return {math.Vec2} - Intersection coordinate.
|
|
99
99
|
*/
|
|
100
|
-
export function getLinesIntersectionLonLat(start1:
|
|
100
|
+
export function getLinesIntersectionLonLat(start1: math.Vec2, end1: math.Vec2, start2: math.Vec2, end2: math.Vec2, isSegment?: boolean): math.Vec2;
|
|
101
101
|
/**
|
|
102
102
|
* Converts XML to JSON
|
|
103
103
|
* @static
|
|
@@ -150,26 +150,26 @@ export function extractElevationTiles(rgbaData: any, outCurrenElevations: any, o
|
|
|
150
150
|
* @param {TypedArray} a
|
|
151
151
|
* @param {TypedArray} b
|
|
152
152
|
*/
|
|
153
|
-
export function concatTypedArrays(a:
|
|
153
|
+
export function concatTypedArrays(a: TypedArray, b: TypedArray): any;
|
|
154
154
|
/**
|
|
155
155
|
* Concatenates two the same arrays
|
|
156
156
|
* @param {TypedArray | Array} a
|
|
157
157
|
* @param {TypedArray | Array} b
|
|
158
158
|
*/
|
|
159
|
-
export function concatArrays(a:
|
|
159
|
+
export function concatArrays(a: TypedArray | any[], b: TypedArray | any[]): any;
|
|
160
160
|
/**
|
|
161
161
|
* Convert simple array to typed
|
|
162
162
|
* @param arr {Array}
|
|
163
163
|
* @param ctor {Float32ArrayConstructor}
|
|
164
164
|
* @returns {TypedArray}
|
|
165
165
|
*/
|
|
166
|
-
export function makeArrayTyped(arr: any[], ctor?: Float32ArrayConstructor):
|
|
166
|
+
export function makeArrayTyped(arr: any[], ctor?: Float32ArrayConstructor): TypedArray;
|
|
167
167
|
/**
|
|
168
168
|
* Convert typed array to array
|
|
169
169
|
* @param arr {TypedArray}
|
|
170
170
|
* @returns {Array}
|
|
171
171
|
*/
|
|
172
|
-
export function makeArray(arr:
|
|
172
|
+
export function makeArray(arr: TypedArray): any[];
|
|
173
173
|
/**
|
|
174
174
|
*
|
|
175
175
|
* @param {TypedArray | Array} arr
|
|
@@ -177,7 +177,7 @@ export function makeArray(arr: any): any[];
|
|
|
177
177
|
* @param {Number} deleteCount
|
|
178
178
|
* @param {Array} elements
|
|
179
179
|
*/
|
|
180
|
-
export function spliceArray(arr:
|
|
180
|
+
export function spliceArray(arr: TypedArray | any[], starting: number, deleteCount: number, elements: any[]): any;
|
|
181
181
|
/**
|
|
182
182
|
*
|
|
183
183
|
* @param {TypedArray} arr
|
|
@@ -185,7 +185,7 @@ export function spliceArray(arr: any | any[], starting: number, deleteCount: num
|
|
|
185
185
|
* @param {Number} deleteCount
|
|
186
186
|
* @param {Array} elements
|
|
187
187
|
*/
|
|
188
|
-
export function spliceTypedArray(arr:
|
|
188
|
+
export function spliceTypedArray(arr: TypedArray, starting: number, deleteCount: number, elements?: any[]): any;
|
|
189
189
|
/**
|
|
190
190
|
* Returns triangle coordinate array from inside of the source triangle array.
|
|
191
191
|
* @static
|