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