@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.
- package/css/og.css +1 -1
- package/package.json +11 -9
- package/src/og/Extent.js +274 -273
- package/src/og/Globe.js +11 -3
- package/src/og/LonLat.js +152 -146
- package/src/og/Popup.js +2 -1
- package/src/og/camera/PlanetCamera.js +112 -38
- package/src/og/control/EarthNavigation.js +259 -0
- package/src/og/control/MouseNavigation.js +68 -40
- package/src/og/entity/EntityCollection.js +1 -1
- package/src/og/entity/LabelHandler.js +366 -74
- package/src/og/entity/Polyline.js +3 -2
- package/src/og/layer/CanvasTiles.js +32 -30
- package/src/og/layer/KML.js +159 -0
- package/src/og/layer/Vector.js +5 -0
- package/src/og/layer/index.js +2 -1
- package/src/og/math/Vec2.js +448 -448
- package/src/og/math/Vec3.js +759 -757
- package/src/og/math/Vec4.js +216 -215
- package/src/og/quadTree/Node.js +67 -13
- package/src/og/renderer/RendererEvents.js +21 -16
- package/src/og/scene/Planet.js +25 -10
- package/src/og/segment/Segment.js +3 -3
- package/src/og/segment/SegmentLonLat.js +7 -0
- package/src/og/terrain/GlobusTerrain.js +4 -0
- package/src/og/utils/FontAtlas.js +1 -0
- package/src/og/utils/GeoImageCreator.js +123 -121
- package/src/og/utils/Loader.js +81 -80
- package/src/og/utils/NormalMapCreator.js +320 -318
- package/src/og/utils/VectorTileCreator.js +251 -250
- package/src/og/webgl/Framebuffer.js +265 -264
- package/src/og/webgl/Handler.js +1022 -1001
- package/src/og/webgl/Multisample.js +169 -168
- package/src/og/webgl/ProgramController.js +113 -112
- package/types/Clock.d.ts +90 -0
- package/types/Deferred.d.ts +6 -0
- package/types/Events.d.ts +73 -0
- package/types/Extent.d.ts +162 -0
- package/types/Globe.d.ts +80 -0
- package/types/ImageCanvas.d.ts +121 -0
- package/types/Lock.d.ts +12 -0
- package/types/LonLat.d.ts +108 -0
- package/types/Popup.d.ts +38 -0
- package/types/QueueArray.d.ts +15 -0
- package/types/Rectangle.d.ts +74 -0
- package/types/Stack.d.ts +15 -0
- package/types/ajax.d.ts +24 -0
- package/types/arial.d.ts +48 -0
- package/types/astro/astro.d.ts +38 -0
- package/types/astro/earth.d.ts +6 -0
- package/types/astro/jd.d.ts +254 -0
- package/types/bv/Box.d.ts +25 -0
- package/types/bv/Sphere.d.ts +32 -0
- package/types/bv/index.d.ts +3 -0
- package/types/camera/Camera.d.ts +303 -0
- package/types/camera/Frustum.d.ts +129 -0
- package/types/camera/PlanetCamera.d.ts +222 -0
- package/types/camera/index.d.ts +3 -0
- package/types/cons.d.ts +40 -0
- package/types/control/CompassButton.d.ts +17 -0
- package/types/control/Control.d.ts +101 -0
- package/types/control/DebugInfo.d.ts +16 -0
- package/types/control/EarthCoordinates.d.ts +47 -0
- package/types/control/GeoImageDragControl.d.ts +6 -0
- package/types/control/KeyboardNavigation.d.ts +22 -0
- package/types/control/LayerSwitcher.d.ts +23 -0
- package/types/control/Lighting.d.ts +16 -0
- package/types/control/ScaleControl.d.ts +22 -0
- package/types/control/ShowFps.d.ts +12 -0
- package/types/control/SimpleNavigation.d.ts +28 -0
- package/types/control/Sun.d.ts +52 -0
- package/types/control/ToggleWireframe.d.ts +12 -0
- package/types/control/ZoomControl.d.ts +28 -0
- package/types/control/index.d.ts +15 -0
- package/types/ellipsoid/Ellipsoid.d.ts +142 -0
- package/types/ellipsoid/index.d.ts +3 -0
- package/types/ellipsoid/wgs84.d.ts +5 -0
- package/types/entity/BaseBillboard.d.ts +208 -0
- package/types/entity/Billboard.d.ts +94 -0
- package/types/entity/BillboardHandler.d.ts +74 -0
- package/types/entity/Entity.d.ts +330 -0
- package/types/entity/EntityCollection.d.ts +303 -0
- package/types/entity/Geometry.d.ts +72 -0
- package/types/entity/GeometryHandler.d.ts +76 -0
- package/types/entity/Label.d.ts +194 -0
- package/types/entity/LabelHandler.d.ts +24 -0
- package/types/entity/PointCloud.d.ts +174 -0
- package/types/entity/PointCloudHandler.d.ts +38 -0
- package/types/entity/Polyline.d.ts +303 -0
- package/types/entity/PolylineHandler.d.ts +18 -0
- package/types/entity/Ray.d.ts +123 -0
- package/types/entity/RayHandler.d.ts +67 -0
- package/types/entity/ShapeHandler.d.ts +22 -0
- package/types/entity/Strip.d.ts +118 -0
- package/types/entity/StripHandler.d.ts +38 -0
- package/types/entity/index.d.ts +8 -0
- package/types/index.core.d.ts +65 -0
- package/types/index.d.ts +45 -0
- package/types/index.webgl.d.ts +7 -0
- package/types/inherits.d.ts +4 -0
- package/types/input/input.d.ts +34 -0
- package/types/layer/BaseGeoImage.d.ts +106 -0
- package/types/layer/CanvasTiles.d.ts +75 -0
- package/types/layer/GeoImage.d.ts +65 -0
- package/types/layer/GeoTexture2d.d.ts +8 -0
- package/types/layer/GeoVideo.d.ts +80 -0
- package/types/layer/KML.d.ts +58 -0
- package/types/layer/WMS.d.ts +66 -0
- package/types/layer/XYZ.d.ts +126 -0
- package/types/layer/index.d.ts +10 -0
- package/types/light/LightSource.d.ts +177 -0
- package/types/math/Mat3.d.ts +53 -0
- package/types/math/Mat4.d.ts +157 -0
- package/types/math/Plane.d.ts +17 -0
- package/types/math/Vec2.d.ts +308 -0
- package/types/math/Vec3.d.ts +459 -0
- package/types/math/Vec4.d.ts +161 -0
- package/types/math/coder.d.ts +42 -0
- package/types/math/index.d.ts +11 -0
- package/types/math.d.ts +261 -0
- package/types/mercator.d.ts +92 -0
- package/types/proj/EPSG3857.d.ts +5 -0
- package/types/proj/EPSG4326.d.ts +5 -0
- package/types/quadTree/quadTree.d.ts +40 -0
- package/types/renderer/RendererEvents.d.ts +230 -0
- package/types/res/images.d.ts +3 -0
- package/types/scene/Axes.d.ts +11 -0
- package/types/scene/BaseNode.d.ts +60 -0
- package/types/scene/Planet.d.ts +572 -0
- package/types/scene/RenderNode.d.ts +143 -0
- package/types/scene/SkyBox.d.ts +10 -0
- package/types/scene/index.d.ts +4 -0
- package/types/segment/segmentHelper.d.ts +13 -0
- package/types/shaders/billboard.d.ts +3 -0
- package/types/shaders/depth.d.ts +2 -0
- package/types/shaders/drawnode.d.ts +7 -0
- package/types/shaders/label.d.ts +4 -0
- package/types/shaders/pointCloud.d.ts +2 -0
- package/types/shaders/polyline.d.ts +3 -0
- package/types/shaders/ray.d.ts +2 -0
- package/types/shaders/screenFrame.d.ts +2 -0
- package/types/shaders/shape.d.ts +4 -0
- package/types/shaders/skybox.d.ts +2 -0
- package/types/shaders/toneMapping.d.ts +2 -0
- package/types/shapes/BaseShape.d.ts +247 -0
- package/types/shapes/Sphere.d.ts +41 -0
- package/types/terrain/BilTerrain.d.ts +8 -0
- package/types/terrain/EmptyTerrain.d.ts +72 -0
- package/types/terrain/Geoid.d.ts +26 -0
- package/types/terrain/GlobusTerrain.d.ts +153 -0
- package/types/terrain/MapboxTerrain.d.ts +8 -0
- package/types/terrain/index.d.ts +5 -0
- package/types/utils/FontAtlas.d.ts +14 -0
- package/types/utils/GeoImageCreator.d.ts +29 -0
- package/types/utils/ImagesCacheManager.d.ts +10 -0
- package/types/utils/Loader.d.ts +25 -0
- package/types/utils/NormalMapCreator.d.ts +39 -0
- package/types/utils/PlainSegmentWorker.d.ts +10 -0
- package/types/utils/TerrainWorker.d.ts +9 -0
- package/types/utils/TextureAtlas.d.ts +111 -0
- package/types/utils/VectorTileCreator.d.ts +16 -0
- package/types/utils/colorTable.d.ts +143 -0
- package/types/utils/earcut.d.ts +6 -0
- package/types/utils/shared.d.ts +230 -0
- package/types/webgl/Framebuffer.d.ts +135 -0
- package/types/webgl/Handler.d.ts +372 -0
- package/types/webgl/Multisample.d.ts +89 -0
- package/types/webgl/Program.d.ts +155 -0
- package/types/webgl/ProgramController.d.ts +84 -0
- package/types/webgl/callbacks.d.ts +1 -0
- package/types/webgl/index.d.ts +6 -0
- package/types/webgl/types.d.ts +2 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base prototype for billboard and label classes.
|
|
3
|
+
* @class
|
|
4
|
+
* @param {Object} [options] - Options:
|
|
5
|
+
* @param {og.Vec3|Array.<number>} [options.position] - Billboard spatial position.
|
|
6
|
+
* @param {number} [options.rotation] - Screen angle rotaion.
|
|
7
|
+
* @param {og.Vec4|string|Array.<number>} [options.color] - Billboard color.
|
|
8
|
+
* @param {og.Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
|
|
9
|
+
* @param {og.Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
|
|
10
|
+
* @param {boolean} [options.visibility] - Visibility.
|
|
11
|
+
*/
|
|
12
|
+
export class BaseBillboard {
|
|
13
|
+
static set _staticCounter(arg: any);
|
|
14
|
+
static get _staticCounter(): any;
|
|
15
|
+
constructor(options: any);
|
|
16
|
+
/**
|
|
17
|
+
* Object unic identifier.
|
|
18
|
+
* @public
|
|
19
|
+
* @readonly
|
|
20
|
+
* @type {number}
|
|
21
|
+
*/
|
|
22
|
+
public readonly id: number;
|
|
23
|
+
/**
|
|
24
|
+
* Billboard center cartesian position.
|
|
25
|
+
* @protected
|
|
26
|
+
* @type {og.Vec3}
|
|
27
|
+
*/
|
|
28
|
+
protected _position: any;
|
|
29
|
+
_positionHigh: Vec3;
|
|
30
|
+
_positionLow: Vec3;
|
|
31
|
+
/**
|
|
32
|
+
* Screen space rotation angle.
|
|
33
|
+
* @protected
|
|
34
|
+
* @type {number}
|
|
35
|
+
*/
|
|
36
|
+
protected _rotation: number;
|
|
37
|
+
/**
|
|
38
|
+
* RGBA color.
|
|
39
|
+
* @protected
|
|
40
|
+
* @type {og.Vec4}
|
|
41
|
+
*/
|
|
42
|
+
protected _color: any;
|
|
43
|
+
/**
|
|
44
|
+
* Cartesian aligned axis vector.
|
|
45
|
+
* @protected
|
|
46
|
+
* @type {og.Vec3}
|
|
47
|
+
*/
|
|
48
|
+
protected _alignedAxis: any;
|
|
49
|
+
/**
|
|
50
|
+
* Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.
|
|
51
|
+
* @protected
|
|
52
|
+
* @type {og.math.Vecto3}
|
|
53
|
+
*/
|
|
54
|
+
protected _offset: any;
|
|
55
|
+
/**
|
|
56
|
+
* Billboard visibility.
|
|
57
|
+
* @protected
|
|
58
|
+
* @type {boolean}
|
|
59
|
+
*/
|
|
60
|
+
protected _visibility: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Entity instance that holds this billboard.
|
|
63
|
+
* @protected
|
|
64
|
+
* @type {og.Entity}
|
|
65
|
+
*/
|
|
66
|
+
protected _entity: any;
|
|
67
|
+
/**
|
|
68
|
+
* Handler that stores and renders this billboard object.
|
|
69
|
+
* @protected
|
|
70
|
+
* @type {og.BillboardHandler}
|
|
71
|
+
*/
|
|
72
|
+
protected _handler: any;
|
|
73
|
+
/**
|
|
74
|
+
* Billboard handler array index.
|
|
75
|
+
* @protected
|
|
76
|
+
* @type {number}
|
|
77
|
+
*/
|
|
78
|
+
protected _handlerIndex: number;
|
|
79
|
+
/**
|
|
80
|
+
* Sets billboard position.
|
|
81
|
+
* @public
|
|
82
|
+
* @param {number} x - X coordinate.
|
|
83
|
+
* @param {number} y - Y coordinate.
|
|
84
|
+
* @param {number} z - Z coordinate.
|
|
85
|
+
*/
|
|
86
|
+
public setPosition(x: number, y: number, z: number): void;
|
|
87
|
+
/**
|
|
88
|
+
* Sets billboard position.
|
|
89
|
+
* @public
|
|
90
|
+
* @param {og.Vec3} position - Cartesian coordinates.
|
|
91
|
+
*/
|
|
92
|
+
public setPosition3v(position: any): void;
|
|
93
|
+
/**
|
|
94
|
+
* Returns billboard position.
|
|
95
|
+
* @public
|
|
96
|
+
* @returns {og.Vec3}
|
|
97
|
+
*/
|
|
98
|
+
public getPosition(): any;
|
|
99
|
+
/**
|
|
100
|
+
* Sets screen space offset.
|
|
101
|
+
* @public
|
|
102
|
+
* @param {number} x - X offset.
|
|
103
|
+
* @param {number} y - Y offset.
|
|
104
|
+
* @param {number} [z] - Z offset.
|
|
105
|
+
*/
|
|
106
|
+
public setOffset(x: number, y: number, z?: number): void;
|
|
107
|
+
/**
|
|
108
|
+
* Sets screen space offset.
|
|
109
|
+
* @public
|
|
110
|
+
* @param {og.Vec2} offset - Offset size.
|
|
111
|
+
*/
|
|
112
|
+
public setOffset3v(offset: any): void;
|
|
113
|
+
/**
|
|
114
|
+
* Returns billboard screen space offset size.
|
|
115
|
+
* @public
|
|
116
|
+
* @returns {og.Vec3}
|
|
117
|
+
*/
|
|
118
|
+
public getOffset(): any;
|
|
119
|
+
/**
|
|
120
|
+
* Sets billboard screen space rotation in radians.
|
|
121
|
+
* @public
|
|
122
|
+
* @param {number} rotation - Screen space rotation in radians.
|
|
123
|
+
*/
|
|
124
|
+
public setRotation(rotation: number): void;
|
|
125
|
+
/**
|
|
126
|
+
* Gets screen space rotation.
|
|
127
|
+
* @public
|
|
128
|
+
* @returns {number}
|
|
129
|
+
*/
|
|
130
|
+
public getRotation(): number;
|
|
131
|
+
/**
|
|
132
|
+
* Sets billboard opacity.
|
|
133
|
+
* @public
|
|
134
|
+
* @param {number} a - Billboard opacity.
|
|
135
|
+
*/
|
|
136
|
+
public setOpacity(a: number): void;
|
|
137
|
+
/**
|
|
138
|
+
* Sets RGBA color. Each channel from 0.0 to 1.0.
|
|
139
|
+
* @public
|
|
140
|
+
* @param {number} r - Red.
|
|
141
|
+
* @param {number} g - Green.
|
|
142
|
+
* @param {number} b - Blue.
|
|
143
|
+
* @param {number} a - Alpha.
|
|
144
|
+
*/
|
|
145
|
+
public setColor(r: number, g: number, b: number, a: number): void;
|
|
146
|
+
/**
|
|
147
|
+
* Sets RGBA color. Each channel from 0.0 to 1.0.
|
|
148
|
+
* @public
|
|
149
|
+
* @param {og.Vec4} color - RGBA vector.
|
|
150
|
+
*/
|
|
151
|
+
public setColor4v(color: any): void;
|
|
152
|
+
/**
|
|
153
|
+
* Sets billboard color.
|
|
154
|
+
* @public
|
|
155
|
+
* @param {string} color - HTML style color.
|
|
156
|
+
*/
|
|
157
|
+
public setColorHTML(color: string): void;
|
|
158
|
+
/**
|
|
159
|
+
* Returns RGBA color.
|
|
160
|
+
* @public
|
|
161
|
+
* @returns {og.Vec4}
|
|
162
|
+
*/
|
|
163
|
+
public getColor(): any;
|
|
164
|
+
/**
|
|
165
|
+
* Sets billboard visibility.
|
|
166
|
+
* @public
|
|
167
|
+
* @param {boolean} visibility - Visibility flag.
|
|
168
|
+
*/
|
|
169
|
+
public setVisibility(visibility: boolean): void;
|
|
170
|
+
/**
|
|
171
|
+
* Returns billboard visibility.
|
|
172
|
+
* @public
|
|
173
|
+
* @returns {boolean}
|
|
174
|
+
*/
|
|
175
|
+
public getVisibility(): boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Sets billboard cartesian aligned vector.
|
|
178
|
+
* @public
|
|
179
|
+
* @param {number} x - Aligned vector X coordinate.
|
|
180
|
+
* @param {number} y - Aligned vector Y coordinate.
|
|
181
|
+
* @param {number} z - Aligned vector Z coordinate.
|
|
182
|
+
*/
|
|
183
|
+
public setAlignedAxis(x: number, y: number, z: number): void;
|
|
184
|
+
/**
|
|
185
|
+
* Sets billboard aligned vector.
|
|
186
|
+
* @public
|
|
187
|
+
* @param {og.math.Vecto3} alignedAxis - Vector to align.
|
|
188
|
+
*/
|
|
189
|
+
public setAlignedAxis3v(alignedAxis: any): void;
|
|
190
|
+
/**
|
|
191
|
+
* Returns aligned vector.
|
|
192
|
+
* @public
|
|
193
|
+
* @returns {og.Vec3}
|
|
194
|
+
*/
|
|
195
|
+
public getAlignedAxis(): any;
|
|
196
|
+
/**
|
|
197
|
+
* Removes billboard from hander.
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
public remove(): void;
|
|
201
|
+
/**
|
|
202
|
+
* Sets billboard picking color.
|
|
203
|
+
* @public
|
|
204
|
+
* @param {og.Vec3} color - Picking color.
|
|
205
|
+
*/
|
|
206
|
+
public setPickingColor3v(color: any): void;
|
|
207
|
+
}
|
|
208
|
+
import { Vec3 } from "../math/Vec3.js";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents basic quad billboard image.
|
|
3
|
+
* @class
|
|
4
|
+
* @extends {og.BaseBillboard}
|
|
5
|
+
* @param {Object} [options] - 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.src] - Billboard image url source.
|
|
13
|
+
* @param {Image} [options.image] - Billboard image object.
|
|
14
|
+
* @param {number} [options.width] - Screen width.
|
|
15
|
+
* @param {number} [options.height] - Screen height.
|
|
16
|
+
* @param {number} [options.scale] - Billboard scale.
|
|
17
|
+
*/
|
|
18
|
+
export class Billboard {
|
|
19
|
+
constructor(options: any);
|
|
20
|
+
/**
|
|
21
|
+
* Image src.
|
|
22
|
+
* @protected
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
protected _src: string;
|
|
26
|
+
/**
|
|
27
|
+
* Image object.
|
|
28
|
+
* @protected
|
|
29
|
+
* @type {Object}
|
|
30
|
+
*/
|
|
31
|
+
protected _image: any;
|
|
32
|
+
_scale: number;
|
|
33
|
+
/**
|
|
34
|
+
* Billboard screen width.
|
|
35
|
+
* @protected
|
|
36
|
+
* @type {number}
|
|
37
|
+
*/
|
|
38
|
+
protected _width: number;
|
|
39
|
+
/**
|
|
40
|
+
* Billboard screen height.
|
|
41
|
+
* @protected
|
|
42
|
+
* @type {number}
|
|
43
|
+
*/
|
|
44
|
+
protected _height: number;
|
|
45
|
+
/**
|
|
46
|
+
* Sets billboard image url source.
|
|
47
|
+
* @public
|
|
48
|
+
* @param {string} src - Image url.
|
|
49
|
+
*/
|
|
50
|
+
public setSrc(src: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Sets image object.
|
|
53
|
+
* @public
|
|
54
|
+
* @param {Object} image - JavaScript image object.
|
|
55
|
+
*/
|
|
56
|
+
public setImage(image: any): void;
|
|
57
|
+
/**
|
|
58
|
+
* Sets billboard screen size in pixels.
|
|
59
|
+
* @public
|
|
60
|
+
* @param {number} width - Billboard width.
|
|
61
|
+
* @param {number} height - Billboard height.
|
|
62
|
+
*/
|
|
63
|
+
public setSize(width: number, height: number): void;
|
|
64
|
+
/**
|
|
65
|
+
* Returns billboard screen size.
|
|
66
|
+
* @public
|
|
67
|
+
* @returns {Object}
|
|
68
|
+
*/
|
|
69
|
+
public getSize(): any;
|
|
70
|
+
/**
|
|
71
|
+
* Sets billboard screen width.
|
|
72
|
+
* @public
|
|
73
|
+
* @param {number} width - Width.
|
|
74
|
+
*/
|
|
75
|
+
public setWidth(width: number): void;
|
|
76
|
+
/**
|
|
77
|
+
* Gets billboard screen width.
|
|
78
|
+
* @public
|
|
79
|
+
* @returns {number}
|
|
80
|
+
*/
|
|
81
|
+
public getWidth(): number;
|
|
82
|
+
/**
|
|
83
|
+
* Sets billboard screen heigh.
|
|
84
|
+
* @public
|
|
85
|
+
* @param {number} height - Height.
|
|
86
|
+
*/
|
|
87
|
+
public setHeight(height: number): void;
|
|
88
|
+
/**
|
|
89
|
+
* Gets billboard screen height.
|
|
90
|
+
* @public
|
|
91
|
+
* @returns {number}
|
|
92
|
+
*/
|
|
93
|
+
public getHeight(): number;
|
|
94
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export class BillboardHandler {
|
|
2
|
+
static set _staticCounter(arg: any);
|
|
3
|
+
static get _staticCounter(): any;
|
|
4
|
+
static concArr(dest: any, curr: any): void;
|
|
5
|
+
constructor(entityCollection: any);
|
|
6
|
+
/**
|
|
7
|
+
* Picking rendering option.
|
|
8
|
+
* @public
|
|
9
|
+
* @type {boolean}
|
|
10
|
+
*/
|
|
11
|
+
public pickingEnabled: boolean;
|
|
12
|
+
_entityCollection: any;
|
|
13
|
+
_renderer: any;
|
|
14
|
+
_billboards: any[];
|
|
15
|
+
_positionHighBuffer: any;
|
|
16
|
+
_positionLowBuffer: any;
|
|
17
|
+
_sizeBuffer: any;
|
|
18
|
+
_offsetBuffer: any;
|
|
19
|
+
_rgbaBuffer: any;
|
|
20
|
+
_rotationBuffer: any;
|
|
21
|
+
_texCoordBuffer: any;
|
|
22
|
+
_vertexBuffer: any;
|
|
23
|
+
_alignedAxisBuffer: any;
|
|
24
|
+
_texCoordArr: Float32Array;
|
|
25
|
+
_vertexArr: Float32Array;
|
|
26
|
+
_positionHighArr: Float32Array;
|
|
27
|
+
_positionLowArr: Float32Array;
|
|
28
|
+
_sizeArr: Float32Array;
|
|
29
|
+
_offsetArr: Float32Array;
|
|
30
|
+
_rgbaArr: Float32Array;
|
|
31
|
+
_rotationArr: Float32Array;
|
|
32
|
+
_alignedAxisArr: Float32Array;
|
|
33
|
+
_pickingColorBuffer: any;
|
|
34
|
+
_pickingColorArr: Float32Array;
|
|
35
|
+
_buffersUpdateCallbacks: (() => void)[];
|
|
36
|
+
_changedBuffers: any[];
|
|
37
|
+
__staticId: number;
|
|
38
|
+
initProgram(): void;
|
|
39
|
+
setRenderer(renderer: any): void;
|
|
40
|
+
refresh(): void;
|
|
41
|
+
_removeBillboards(): void;
|
|
42
|
+
clear(): void;
|
|
43
|
+
_deleteBuffers(): void;
|
|
44
|
+
update(): void;
|
|
45
|
+
add(billboard: any): void;
|
|
46
|
+
_addBillboardToArrays(billboard: any): void;
|
|
47
|
+
_displayPASS(): void;
|
|
48
|
+
_pickingPASS(): void;
|
|
49
|
+
draw(): void;
|
|
50
|
+
drawPicking(): void;
|
|
51
|
+
reindexBillbordsArray(startIndex: any): void;
|
|
52
|
+
_removeBillboard(billboard: any): void;
|
|
53
|
+
remove(billboard: any): void;
|
|
54
|
+
setPositionArr(index: any, positionHigh: any, positionLow: any): void;
|
|
55
|
+
setPickingColorArr(index: any, color: any): void;
|
|
56
|
+
setSizeArr(index: any, width: any, height: any): void;
|
|
57
|
+
setOffsetArr(index: any, offset: any): void;
|
|
58
|
+
setRgbaArr(index: any, rgba: any): void;
|
|
59
|
+
setRotationArr(index: any, rotation: any): void;
|
|
60
|
+
setTexCoordArr(index: any, tcoordArr: any): void;
|
|
61
|
+
setVisibility(index: any, visibility: any): void;
|
|
62
|
+
setVertexArr(index: any, vertexArr: any): void;
|
|
63
|
+
setAlignedAxisArr(index: any, alignedAxis: any): void;
|
|
64
|
+
createPositionBuffer(): void;
|
|
65
|
+
createSizeBuffer(): void;
|
|
66
|
+
createOffsetBuffer(): void;
|
|
67
|
+
createRgbaBuffer(): void;
|
|
68
|
+
createRotationBuffer(): void;
|
|
69
|
+
createVertexBuffer(): void;
|
|
70
|
+
createTexCoordBuffer(): void;
|
|
71
|
+
createAlignedAxisBuffer(): void;
|
|
72
|
+
createPickingColorBuffer(): void;
|
|
73
|
+
refreshTexCoordsArr(): void;
|
|
74
|
+
}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entity instances aggregate multiple forms of visualization into a single high-level object.
|
|
3
|
+
* They can be created manually and added to entity collection.
|
|
4
|
+
*
|
|
5
|
+
* @class
|
|
6
|
+
* @param {Object} [options] - Entity options:
|
|
7
|
+
* @param {string} [options.name] - A human readable name to display to users. It does not have to be unique.
|
|
8
|
+
* @param {og.Vec3|Array.<number>} [options.cartesian] - Spatial entities like billboard, label, sphere etc. cartesian position.
|
|
9
|
+
* @param {og.LonLat} [options.lonlat] - Geodetic coordiantes for an entities like billboard, label, sphere etc.
|
|
10
|
+
* @param {boolean} [options.aground] - True for entities that have to be placed on the relief.
|
|
11
|
+
* @param {boolean} [options.visibility] - Entity visibility.
|
|
12
|
+
* @param {*} [options.billboard] - Billboard options(see {@link og.Billboard}).
|
|
13
|
+
* @param {*} [options.label] - Label options(see {@link og.Label}).
|
|
14
|
+
* @param {*} [options.sphere] - Sphere options(see {@link og.shape.Sphere}).
|
|
15
|
+
* @param {*} [options.box] - Sphere options(see {@link og.shape.Box}).
|
|
16
|
+
* @param {*} [options.polyline] - Polyline options(see {@link og.Polyline}).
|
|
17
|
+
* @param {*} [options.ray] - Ray options(see {@link og.Ray}).
|
|
18
|
+
* @param {*} [options.pointCloud] - Point cloud options(see {@link og.PointCloud}).
|
|
19
|
+
* @param {*} [options.geometry] - Geometry options (see {@link og.Geometry}), available for vector layer only.
|
|
20
|
+
* @param {*} [options.properties] - Entity custom properties.
|
|
21
|
+
*/
|
|
22
|
+
export class Entity {
|
|
23
|
+
static set _staticCounter(arg: any);
|
|
24
|
+
static get _staticCounter(): any;
|
|
25
|
+
constructor(options: any);
|
|
26
|
+
/**
|
|
27
|
+
* Unic identifier.
|
|
28
|
+
* @public
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
public readonly id: number;
|
|
32
|
+
/**
|
|
33
|
+
* Entity user defined properties.
|
|
34
|
+
* @public
|
|
35
|
+
* @type {Object}
|
|
36
|
+
*/
|
|
37
|
+
public properties: any;
|
|
38
|
+
/**
|
|
39
|
+
* Children entities.
|
|
40
|
+
* @public
|
|
41
|
+
* @type {Array.<og.Entity>}
|
|
42
|
+
*/
|
|
43
|
+
public childrenNodes: Array<any>;
|
|
44
|
+
/**
|
|
45
|
+
* Parent entity.
|
|
46
|
+
* @public
|
|
47
|
+
* @type {og.Entity}
|
|
48
|
+
*/
|
|
49
|
+
public parent: any;
|
|
50
|
+
/**
|
|
51
|
+
* Entity cartesian position.
|
|
52
|
+
* @protected
|
|
53
|
+
* @type {og.Vec3}
|
|
54
|
+
*/
|
|
55
|
+
protected _cartesian: any;
|
|
56
|
+
/**
|
|
57
|
+
* Geodetic entity coordiantes.
|
|
58
|
+
* @protected
|
|
59
|
+
* @type {og.LonLat}
|
|
60
|
+
*/
|
|
61
|
+
protected _lonlat: any;
|
|
62
|
+
/**
|
|
63
|
+
* World Mercator entity coordinates.
|
|
64
|
+
* @protected
|
|
65
|
+
* @type {og.LonLat}
|
|
66
|
+
*/
|
|
67
|
+
protected _lonlatMerc: any;
|
|
68
|
+
/**
|
|
69
|
+
* Entity visible terrain altitude.
|
|
70
|
+
* @protected
|
|
71
|
+
* @type {number}
|
|
72
|
+
*/
|
|
73
|
+
protected _altitude: number;
|
|
74
|
+
/**
|
|
75
|
+
* Visibility flag.
|
|
76
|
+
* @protected
|
|
77
|
+
* @type {boolean}
|
|
78
|
+
*/
|
|
79
|
+
protected _visibility: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Entity collection that this entity belongs to.
|
|
82
|
+
* @protected
|
|
83
|
+
* @type {og.EntityCollection}
|
|
84
|
+
*/
|
|
85
|
+
protected _entityCollection: any;
|
|
86
|
+
/**
|
|
87
|
+
* Entity collection array store index.
|
|
88
|
+
* @protected
|
|
89
|
+
* @type {number}
|
|
90
|
+
*/
|
|
91
|
+
protected _entityCollectionIndex: number;
|
|
92
|
+
/**
|
|
93
|
+
* Assigned vector layer pointer.
|
|
94
|
+
* @protected
|
|
95
|
+
* @type {og.layer.Vector}
|
|
96
|
+
*/
|
|
97
|
+
protected _layer: any;
|
|
98
|
+
/**
|
|
99
|
+
* Assigned vector layer entity array index.
|
|
100
|
+
* @protected
|
|
101
|
+
* @type {number}
|
|
102
|
+
*/
|
|
103
|
+
protected _layerIndex: number;
|
|
104
|
+
/**
|
|
105
|
+
* Picking color.
|
|
106
|
+
* @protected
|
|
107
|
+
* @type {og.Vec3}
|
|
108
|
+
*/
|
|
109
|
+
protected _pickingColor: any;
|
|
110
|
+
_featureConstructorArray: {
|
|
111
|
+
billboard: (typeof Billboard | ((billboard: any) => any))[];
|
|
112
|
+
label: (typeof Label | ((label: any) => any))[];
|
|
113
|
+
sphere: (typeof Sphere | ((shape: any) => any))[];
|
|
114
|
+
polyline: (typeof Polyline | ((polyline: any) => any))[];
|
|
115
|
+
pointCloud: (typeof PointCloud | ((pointCloud: any) => any))[];
|
|
116
|
+
geometry: (typeof Geometry | ((geometry: any) => any))[];
|
|
117
|
+
strip: (typeof Strip | ((strip: any) => any))[];
|
|
118
|
+
ray: (typeof Ray | ((ray: any) => any))[];
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Billboard entity.
|
|
122
|
+
* @public
|
|
123
|
+
* @type {og.Billboard}
|
|
124
|
+
*/
|
|
125
|
+
public billboard: any;
|
|
126
|
+
/**
|
|
127
|
+
* Text label entity.
|
|
128
|
+
* @public
|
|
129
|
+
* @type {og.Label}
|
|
130
|
+
*/
|
|
131
|
+
public label: any;
|
|
132
|
+
/**
|
|
133
|
+
* Shape entity.
|
|
134
|
+
* @public
|
|
135
|
+
* @type {og.shape.BaseShape}
|
|
136
|
+
*/
|
|
137
|
+
public shape: any;
|
|
138
|
+
/**
|
|
139
|
+
* Polyline entity.
|
|
140
|
+
* @public
|
|
141
|
+
* @type {og.Polyline}
|
|
142
|
+
*/
|
|
143
|
+
public polyline: any;
|
|
144
|
+
/**
|
|
145
|
+
* Ray entity.
|
|
146
|
+
* @public
|
|
147
|
+
* @type {og.ray}
|
|
148
|
+
*/
|
|
149
|
+
public ray: any;
|
|
150
|
+
/**
|
|
151
|
+
* PointCloud entity.
|
|
152
|
+
* @public
|
|
153
|
+
* @type {og.PointCloud}
|
|
154
|
+
*/
|
|
155
|
+
public pointCloud: any;
|
|
156
|
+
/**
|
|
157
|
+
* Geometry entity(available for vector layer only).
|
|
158
|
+
* @public
|
|
159
|
+
* @type {og.Geometry}
|
|
160
|
+
*/
|
|
161
|
+
public geometry: any;
|
|
162
|
+
/**
|
|
163
|
+
* Strip entity.
|
|
164
|
+
* @public
|
|
165
|
+
* @type {og.Strip}
|
|
166
|
+
*/
|
|
167
|
+
public strip: any;
|
|
168
|
+
get instanceName(): string;
|
|
169
|
+
_createOptionFeature(featureName: any, options: any): any;
|
|
170
|
+
getCollectionIndex(): number;
|
|
171
|
+
/**
|
|
172
|
+
* Adds current entity into the specified entity collection.
|
|
173
|
+
* @public
|
|
174
|
+
* @param {og.EntityCollection|og.layer.Vector} collection - Specified entity collection or vector layer.
|
|
175
|
+
* @param {Boolean} [rightNow=false] - Entity insertion option for vector layer.
|
|
176
|
+
* @returns {og.Entity} - This object.
|
|
177
|
+
*/
|
|
178
|
+
public addTo(collection: any | any, rightNow?: boolean): any;
|
|
179
|
+
/**
|
|
180
|
+
* Removes current entity from collection and layer.
|
|
181
|
+
* @public
|
|
182
|
+
*/
|
|
183
|
+
public remove(): void;
|
|
184
|
+
/**
|
|
185
|
+
* Sets the entity visibility.
|
|
186
|
+
* @public
|
|
187
|
+
* @param {boolean} visibility - Entity visibility.
|
|
188
|
+
*/
|
|
189
|
+
public setVisibility(visibility: boolean): void;
|
|
190
|
+
/**
|
|
191
|
+
* Returns entity visibility.
|
|
192
|
+
* @public
|
|
193
|
+
* @returns {boolean} -
|
|
194
|
+
*/
|
|
195
|
+
public getVisibility(): boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Sets entity cartesian position.
|
|
198
|
+
* @public
|
|
199
|
+
* @param {og.Vec3} cartesian - Cartesian position in 3d space.
|
|
200
|
+
*/
|
|
201
|
+
public setCartesian3v(cartesian: any): void;
|
|
202
|
+
/**
|
|
203
|
+
* Sets entity cartesian position.
|
|
204
|
+
* @public
|
|
205
|
+
* @param {number} x - 3d space X - position.
|
|
206
|
+
* @param {number} y - 3d space Y - position.
|
|
207
|
+
* @param {number} z - 3d space Z - position.
|
|
208
|
+
*/
|
|
209
|
+
public setCartesian(x: number, y: number, z: number): void;
|
|
210
|
+
/**
|
|
211
|
+
* Sets entity cartesian position without event dispatching.
|
|
212
|
+
* @protected
|
|
213
|
+
* @param {og.Vec3} cartesian - Cartesian position in 3d space.
|
|
214
|
+
* @param {boolean} skipLonLat - skip geodetic calculation.
|
|
215
|
+
*/
|
|
216
|
+
protected _setCartesian3vSilent(cartesian: any, skipLonLat: boolean): void;
|
|
217
|
+
/**
|
|
218
|
+
* Gets entity geodetic coordinates.
|
|
219
|
+
* @public
|
|
220
|
+
* @returns {og.LonLat} -
|
|
221
|
+
*/
|
|
222
|
+
public getLonLat(): any;
|
|
223
|
+
/**
|
|
224
|
+
* Sets geodetic coordinates of the entity point object.
|
|
225
|
+
* @public
|
|
226
|
+
* @param {og.LonLat} lonlat - WGS84 coordinates.
|
|
227
|
+
*/
|
|
228
|
+
public setLonLat(lonlat: any): void;
|
|
229
|
+
/**
|
|
230
|
+
* Sets entity altitude over the planet.
|
|
231
|
+
* @public
|
|
232
|
+
* @param {number} altitude - Altitude.
|
|
233
|
+
*/
|
|
234
|
+
public setAltitude(altitude: number): void;
|
|
235
|
+
/**
|
|
236
|
+
* Sets entity altitude over the planet.
|
|
237
|
+
* @public
|
|
238
|
+
* @return {number} Altitude.
|
|
239
|
+
*/
|
|
240
|
+
public getAltitude(): number;
|
|
241
|
+
/**
|
|
242
|
+
* Returns carteain position.
|
|
243
|
+
* @public
|
|
244
|
+
* @returns {og.Vec3} -
|
|
245
|
+
*/
|
|
246
|
+
public getCartesian(): any;
|
|
247
|
+
/**
|
|
248
|
+
* Sets entity billboard.
|
|
249
|
+
* @public
|
|
250
|
+
* @param {og.Billboard} billboard - Billboard object.
|
|
251
|
+
* @returns {og.Billboard} -
|
|
252
|
+
*/
|
|
253
|
+
public setBillboard(billboard: any): any;
|
|
254
|
+
/**
|
|
255
|
+
* Sets entity label.
|
|
256
|
+
* @public
|
|
257
|
+
* @param {og.Label} label - Text label.
|
|
258
|
+
* @returns {og.Label} -
|
|
259
|
+
*/
|
|
260
|
+
public setLabel(label: any): any;
|
|
261
|
+
/**
|
|
262
|
+
* Sets entity ray.
|
|
263
|
+
* @public
|
|
264
|
+
* @param {og.Ray} ray - Ray object.
|
|
265
|
+
* @returns {og.Ray} -
|
|
266
|
+
*/
|
|
267
|
+
public setRay(ray: any): any;
|
|
268
|
+
/**
|
|
269
|
+
* Sets entity shape.
|
|
270
|
+
* @public
|
|
271
|
+
* @param {og.BaseShape} shape - Shape object.
|
|
272
|
+
* @returns {og.Polyline} -
|
|
273
|
+
*/
|
|
274
|
+
public setShape(shape: any): any;
|
|
275
|
+
/**
|
|
276
|
+
* Sets entity polyline.
|
|
277
|
+
* @public
|
|
278
|
+
* @param {og.Polyline} polyline - Polyline object.
|
|
279
|
+
* @returns {og.Polyline} -
|
|
280
|
+
*/
|
|
281
|
+
public setPolyline(polyline: any): any;
|
|
282
|
+
/**
|
|
283
|
+
* Sets entity pointCloud.
|
|
284
|
+
* @public
|
|
285
|
+
* @param {og.PointCloud} pointCloud - PointCloud object.
|
|
286
|
+
* @returns {og.PointCloud} -
|
|
287
|
+
*/
|
|
288
|
+
public setPointCloud(pointCloud: any): any;
|
|
289
|
+
/**
|
|
290
|
+
* Sets entity geometry.
|
|
291
|
+
* @public
|
|
292
|
+
* @param {og.Geometry} geometry - Geometry object.
|
|
293
|
+
* @returns {og.Geometry} -
|
|
294
|
+
*/
|
|
295
|
+
public setGeometry(geometry: any): any;
|
|
296
|
+
/**
|
|
297
|
+
* Sets entity strip.
|
|
298
|
+
* @public
|
|
299
|
+
* @param {og.Strip} strip - Strip object.
|
|
300
|
+
* @returns {og.Strip} -
|
|
301
|
+
*/
|
|
302
|
+
public setStrip(strip: any): any;
|
|
303
|
+
get layer(): any;
|
|
304
|
+
get rendererEvents(): any;
|
|
305
|
+
/**
|
|
306
|
+
* Append child entity.
|
|
307
|
+
* @public
|
|
308
|
+
* @param {og.Entity} entity - Child entity.
|
|
309
|
+
*/
|
|
310
|
+
public appendChild(entity: any): void;
|
|
311
|
+
/**
|
|
312
|
+
* Appends entity items(billboard, label etc.) picking color.
|
|
313
|
+
* @public
|
|
314
|
+
*/
|
|
315
|
+
public setPickingColor(): void;
|
|
316
|
+
/**
|
|
317
|
+
* Return geodethic extent.
|
|
318
|
+
* @returns {og.Extent} -
|
|
319
|
+
*/
|
|
320
|
+
getExtent(): any;
|
|
321
|
+
isEqual(entity: any): boolean;
|
|
322
|
+
}
|
|
323
|
+
import { Billboard } from "./Billboard.js";
|
|
324
|
+
import { Label } from "./Label.js";
|
|
325
|
+
import { Sphere } from "../shapes/Sphere.js";
|
|
326
|
+
import { Polyline } from "./Polyline.js";
|
|
327
|
+
import { PointCloud } from "./PointCloud.js";
|
|
328
|
+
import { Geometry } from "./Geometry.js";
|
|
329
|
+
import { Strip } from "./Strip.js";
|
|
330
|
+
import { Ray } from "./Ray.js";
|