@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Entity collection provide handlers for an each type of entity like billboard, label or 3ds object.
|
|
4
4
|
* @constructor
|
|
5
5
|
* @param {Object} [options] - Entity options:
|
|
6
|
-
* @param {Array.<
|
|
6
|
+
* @param {Array.<Entity>} [options.entities] - Entities array.
|
|
7
7
|
* @param {boolean} [options.visibility=true] - Entity visibility.
|
|
8
8
|
* @param {Array.<number>} [options.scaleByDistance] - Entity scale by distance parameters. (exactly 3 entries)
|
|
9
9
|
* First index - near distance to the entity, after entity becomes full scale.
|
|
@@ -66,9 +66,9 @@ export class EntityCollection {
|
|
|
66
66
|
/**
|
|
67
67
|
* Render node context.
|
|
68
68
|
* @public
|
|
69
|
-
* @type {
|
|
69
|
+
* @type {RenderNode}
|
|
70
70
|
*/
|
|
71
|
-
public renderNode:
|
|
71
|
+
public renderNode: RenderNode;
|
|
72
72
|
/**
|
|
73
73
|
* Visibility option.
|
|
74
74
|
* @protected
|
|
@@ -90,59 +90,65 @@ export class EntityCollection {
|
|
|
90
90
|
/**
|
|
91
91
|
* Billboards handler
|
|
92
92
|
* @public
|
|
93
|
-
* @type {
|
|
93
|
+
* @type {BillboardHandler}
|
|
94
94
|
*/
|
|
95
|
-
public billboardHandler:
|
|
95
|
+
public billboardHandler: BillboardHandler;
|
|
96
96
|
/**
|
|
97
97
|
* Labels handler
|
|
98
98
|
* @public
|
|
99
|
-
* @type {
|
|
99
|
+
* @type {LabelHandler}
|
|
100
100
|
*/
|
|
101
|
-
public labelHandler:
|
|
101
|
+
public labelHandler: LabelHandler;
|
|
102
102
|
/**
|
|
103
103
|
* Shape handler
|
|
104
104
|
* @public
|
|
105
|
-
* @type {
|
|
105
|
+
* @type {ShapeHandler}
|
|
106
106
|
*/
|
|
107
|
-
public shapeHandler:
|
|
107
|
+
public shapeHandler: ShapeHandler;
|
|
108
108
|
/**
|
|
109
109
|
* Polyline handler
|
|
110
110
|
* @public
|
|
111
|
-
* @type {
|
|
111
|
+
* @type {PolylineHandler}
|
|
112
112
|
*/
|
|
113
|
-
public polylineHandler:
|
|
113
|
+
public polylineHandler: PolylineHandler;
|
|
114
114
|
/**
|
|
115
115
|
* Ray handler
|
|
116
116
|
* @public
|
|
117
|
-
* @type {
|
|
117
|
+
* @type {RayHandler}
|
|
118
118
|
*/
|
|
119
|
-
public rayHandler:
|
|
119
|
+
public rayHandler: RayHandler;
|
|
120
120
|
/**
|
|
121
121
|
* PointCloud handler
|
|
122
122
|
* @public
|
|
123
|
-
* @type {
|
|
123
|
+
* @type {PointCloudHandler}
|
|
124
124
|
*/
|
|
125
|
-
public pointCloudHandler:
|
|
125
|
+
public pointCloudHandler: PointCloudHandler;
|
|
126
126
|
/**
|
|
127
127
|
* Strip handler
|
|
128
128
|
* @public
|
|
129
|
-
* @type {
|
|
129
|
+
* @type {StripHandler}
|
|
130
130
|
*/
|
|
131
|
-
public stripHandler:
|
|
131
|
+
public stripHandler: StripHandler;
|
|
132
|
+
/**
|
|
133
|
+
* Geo object handler
|
|
134
|
+
* @public
|
|
135
|
+
* @type {og.GeoObjectHandler}
|
|
136
|
+
*/
|
|
137
|
+
public geoObjectHandler: og.GeoObjectHandler;
|
|
132
138
|
/**
|
|
133
139
|
* Entities array.
|
|
134
140
|
* @protected
|
|
135
|
-
* @type {Array.<
|
|
141
|
+
* @type {Array.<Entity>}
|
|
136
142
|
*/
|
|
137
|
-
protected _entities: Array<
|
|
143
|
+
protected _entities: Array<Entity>;
|
|
138
144
|
/**
|
|
139
145
|
* First index - near distance to the entity, after entity becomes full scale.
|
|
140
146
|
* Second index - far distance to the entity, when entity becomes zero scale.
|
|
141
147
|
* Third index - far distance to the entity, when entity becomes invisible.
|
|
142
148
|
* @public
|
|
143
|
-
* @type {Array.<number
|
|
149
|
+
* @type {Array.<number>} - (exactly 3 entries)
|
|
144
150
|
*/
|
|
145
|
-
public scaleByDistance: Array<number
|
|
151
|
+
public scaleByDistance: Array<number>;
|
|
146
152
|
pickingScale: any;
|
|
147
153
|
/**
|
|
148
154
|
* Global opacity.
|
|
@@ -159,10 +165,10 @@ export class EntityCollection {
|
|
|
159
165
|
/**
|
|
160
166
|
* Entity collection events handler.
|
|
161
167
|
* @public
|
|
162
|
-
* @type {
|
|
168
|
+
* @type {Events}
|
|
163
169
|
*/
|
|
164
|
-
public events:
|
|
165
|
-
rendererEvents:
|
|
170
|
+
public events: Events;
|
|
171
|
+
rendererEvents: Events;
|
|
166
172
|
setPolygonOffset(factor: any, units: any): void;
|
|
167
173
|
/**
|
|
168
174
|
* Sets collection visibility.
|
|
@@ -206,31 +212,31 @@ export class EntityCollection {
|
|
|
206
212
|
/**
|
|
207
213
|
* Adds entity to the collection and returns collection.
|
|
208
214
|
* @public
|
|
209
|
-
* @param {
|
|
210
|
-
* @returns {
|
|
215
|
+
* @param {Entity} entity - Entity.
|
|
216
|
+
* @returns {EntityCollection} -
|
|
211
217
|
*/
|
|
212
|
-
public add(entity:
|
|
218
|
+
public add(entity: Entity): EntityCollection;
|
|
213
219
|
/**
|
|
214
220
|
* Adds entities array to the collection and returns collection.
|
|
215
221
|
* @public
|
|
216
|
-
* @param {Array.<
|
|
217
|
-
* @returns {
|
|
222
|
+
* @param {Array.<Entity>} entities - Entities array.
|
|
223
|
+
* @returns {EntityCollection} -
|
|
218
224
|
*/
|
|
219
|
-
public addEntities(entities: Array<
|
|
225
|
+
public addEntities(entities: Array<Entity>): EntityCollection;
|
|
220
226
|
/**
|
|
221
227
|
* Returns true if the entity belongs this collection, otherwise returns false.
|
|
222
228
|
* @public
|
|
223
|
-
* @param {
|
|
229
|
+
* @param {Entity} entity - Entity.
|
|
224
230
|
* @returns {boolean} -
|
|
225
231
|
*/
|
|
226
|
-
public belongs(entity:
|
|
232
|
+
public belongs(entity: Entity): boolean;
|
|
227
233
|
_removeRecursively(entity: any): void;
|
|
228
234
|
/**
|
|
229
235
|
* Removes entity from this collection.
|
|
230
236
|
* @public
|
|
231
|
-
* @param {
|
|
237
|
+
* @param {Entity} entity - Entity to remove.
|
|
232
238
|
*/
|
|
233
|
-
public removeEntity(entity:
|
|
239
|
+
public removeEntity(entity: Entity): void;
|
|
234
240
|
_removeEntitySilent(entity: any): void;
|
|
235
241
|
/**
|
|
236
242
|
* Creates or refresh collected entities picking color.
|
|
@@ -246,20 +252,20 @@ export class EntityCollection {
|
|
|
246
252
|
/**
|
|
247
253
|
* Adds this collection to render node.
|
|
248
254
|
* @public
|
|
249
|
-
* @param {
|
|
255
|
+
* @param {RenderNode} renderNode - Render node.
|
|
250
256
|
* @param {boolean} [isHidden] - Uses in vector layers that render in planet render specific function.
|
|
251
|
-
* @returns {
|
|
257
|
+
* @returns {EntityCollection} -
|
|
252
258
|
*/
|
|
253
|
-
public addTo(renderNode:
|
|
259
|
+
public addTo(renderNode: RenderNode, isHidden?: boolean): EntityCollection;
|
|
254
260
|
/**
|
|
255
261
|
* This function is called in the RenderNode assign function.
|
|
256
|
-
* @param {
|
|
262
|
+
* @param {RenderNode} renderNode
|
|
257
263
|
*/
|
|
258
|
-
bindRenderNode(renderNode:
|
|
264
|
+
bindRenderNode(renderNode: RenderNode): void;
|
|
259
265
|
/**
|
|
260
266
|
* Updates coordiantes all lonLat entities in collection after collecction attached to the planet node.
|
|
261
267
|
* @private
|
|
262
|
-
* @param {
|
|
268
|
+
* @param {Ellipsoid} ellipsoid - Globe ellipsoid.
|
|
263
269
|
*/
|
|
264
270
|
private _updateGeodeticCoordinates;
|
|
265
271
|
/**
|
|
@@ -280,9 +286,9 @@ export class EntityCollection {
|
|
|
280
286
|
/**
|
|
281
287
|
* Gets entity array.
|
|
282
288
|
* @public
|
|
283
|
-
* @returns {Array.<
|
|
289
|
+
* @returns {Array.<Entity>} -
|
|
284
290
|
*/
|
|
285
|
-
public getEntities(): Array<
|
|
291
|
+
public getEntities(): Array<Entity>;
|
|
286
292
|
/**
|
|
287
293
|
* Safety entities loop.
|
|
288
294
|
* @public
|
|
@@ -297,7 +303,15 @@ export class EntityCollection {
|
|
|
297
303
|
/**
|
|
298
304
|
* Clears entity recursevely.
|
|
299
305
|
* @private
|
|
300
|
-
* @param {
|
|
306
|
+
* @param {Entity} entity - Entity to clear.
|
|
301
307
|
*/
|
|
302
308
|
private _clearEntity;
|
|
303
309
|
}
|
|
310
|
+
import { BillboardHandler } from "./BillboardHandler.js";
|
|
311
|
+
import { LabelHandler } from "./LabelHandler.js";
|
|
312
|
+
import { ShapeHandler } from "./ShapeHandler.js";
|
|
313
|
+
import { PolylineHandler } from "./PolylineHandler.js";
|
|
314
|
+
import { RayHandler } from "./RayHandler.js";
|
|
315
|
+
import { PointCloudHandler } from "./PointCloudHandler.js";
|
|
316
|
+
import { StripHandler } from "./StripHandler.js";
|
|
317
|
+
import { Events } from "../Events.js";
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @class
|
|
3
|
+
* @param {Object} options - Geo object parameters:
|
|
4
|
+
* @param {og.Vec3} [options.position] - Geo object position.
|
|
5
|
+
*/
|
|
6
|
+
export class GeoObject {
|
|
7
|
+
constructor(options: any);
|
|
8
|
+
scale: any;
|
|
9
|
+
scaleByDistance: Float32Array;
|
|
10
|
+
/**
|
|
11
|
+
* Geo object center cartesian position.
|
|
12
|
+
* @protected
|
|
13
|
+
* @type {og.Vec3}
|
|
14
|
+
*/
|
|
15
|
+
protected _position: og.Vec3;
|
|
16
|
+
_positionHigh: Vec3;
|
|
17
|
+
_positionLow: Vec3;
|
|
18
|
+
_pitch: any;
|
|
19
|
+
_yaw: any;
|
|
20
|
+
_roll: any;
|
|
21
|
+
_planet: any;
|
|
22
|
+
_lonLatAlt: LonLat;
|
|
23
|
+
/**
|
|
24
|
+
* RGBA color.
|
|
25
|
+
* @protected
|
|
26
|
+
* @type {og.Vec4}
|
|
27
|
+
*/
|
|
28
|
+
protected _color: og.Vec4;
|
|
29
|
+
_direction: Vec3;
|
|
30
|
+
_handler: any;
|
|
31
|
+
_handlerIndex: number;
|
|
32
|
+
_vertices: any;
|
|
33
|
+
_normals: any;
|
|
34
|
+
_indices: any;
|
|
35
|
+
instanced: any;
|
|
36
|
+
tag: any;
|
|
37
|
+
_indicesCount: any;
|
|
38
|
+
_verticesCount: number;
|
|
39
|
+
get planet(): any;
|
|
40
|
+
get renderer(): any;
|
|
41
|
+
/**
|
|
42
|
+
* Sets geo object opacity.
|
|
43
|
+
* @public
|
|
44
|
+
* @param {number} a - Billboard opacity.
|
|
45
|
+
*/
|
|
46
|
+
public setOpacity(a: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* Sets RGBA color. Each channel from 0.0 to 1.0.
|
|
49
|
+
* @public
|
|
50
|
+
* @param {number} r - Red.
|
|
51
|
+
* @param {number} g - Green.
|
|
52
|
+
* @param {number} b - Blue.
|
|
53
|
+
* @param {number} a - Alpha.
|
|
54
|
+
*/
|
|
55
|
+
public setColor(r: number, g: number, b: number, a: number): void;
|
|
56
|
+
/**
|
|
57
|
+
* Sets RGBA color. Each channel from 0.0 to 1.0.
|
|
58
|
+
* @public
|
|
59
|
+
* @param {og.Vec4} color - RGBA vector.
|
|
60
|
+
*/
|
|
61
|
+
public setColor4v(color: og.Vec4): void;
|
|
62
|
+
/**
|
|
63
|
+
* Sets geo object visibility.
|
|
64
|
+
* @public
|
|
65
|
+
* @param {boolean} visibility - Visibility flag.
|
|
66
|
+
*/
|
|
67
|
+
public setVisibility(visibility: boolean): void;
|
|
68
|
+
_visibility: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Returns geo object visibility.
|
|
71
|
+
* @public
|
|
72
|
+
* @returns {boolean}
|
|
73
|
+
*/
|
|
74
|
+
public getVisibility(): boolean;
|
|
75
|
+
setLonLat(lon: any, lat: any, alt: any): void;
|
|
76
|
+
/**
|
|
77
|
+
* Sets geoObject position.
|
|
78
|
+
* @public
|
|
79
|
+
* @param {number} x - X coordinate.
|
|
80
|
+
* @param {number} y - Y coordinate.
|
|
81
|
+
* @param {number} z - Z coordinate.
|
|
82
|
+
*/
|
|
83
|
+
public setPosition(x: number, y: number, z: number): void;
|
|
84
|
+
/**
|
|
85
|
+
* Sets billboard position.
|
|
86
|
+
* @public
|
|
87
|
+
* @param {og.Vec3} position - Cartesian coordinates.
|
|
88
|
+
*/
|
|
89
|
+
public setPosition3v(position: og.Vec3): void;
|
|
90
|
+
setYaw(yaw: any): void;
|
|
91
|
+
setPitch(pitch: any): void;
|
|
92
|
+
setRoll(roll: any): void;
|
|
93
|
+
setScale(scale: any): void;
|
|
94
|
+
/**
|
|
95
|
+
* Removes geo object from handler.
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
public remove(): void;
|
|
99
|
+
_entity: any;
|
|
100
|
+
/**
|
|
101
|
+
* Sets billboard picking color.
|
|
102
|
+
* @public
|
|
103
|
+
* @param {og.Vec3} color - Picking color.
|
|
104
|
+
*/
|
|
105
|
+
public setPickingColor3v(color: og.Vec3): void;
|
|
106
|
+
updateDirection(): void;
|
|
107
|
+
_qNorthFrame: Quat;
|
|
108
|
+
}
|
|
109
|
+
import { Vec3 } from "../math/index.js";
|
|
110
|
+
import { LonLat } from "../LonLat.js";
|
|
111
|
+
import { Quat } from "../math/index.js";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export class GeoObjectHandler {
|
|
2
|
+
static set _staticCounter(arg: any);
|
|
3
|
+
static get _staticCounter(): any;
|
|
4
|
+
constructor(entityCollection: any);
|
|
5
|
+
/**
|
|
6
|
+
* Picking rendering option.
|
|
7
|
+
* @public
|
|
8
|
+
* @type {boolean}
|
|
9
|
+
*/
|
|
10
|
+
public pickingEnabled: boolean;
|
|
11
|
+
_entityCollection: any;
|
|
12
|
+
_renderer: any;
|
|
13
|
+
_planet: any;
|
|
14
|
+
_geoObjects: any[];
|
|
15
|
+
_pitchRollArr: any[][];
|
|
16
|
+
_sizeArr: any[][];
|
|
17
|
+
_vertexArr: any[][];
|
|
18
|
+
_positionHighArr: any[][];
|
|
19
|
+
_positionLowArr: any[][];
|
|
20
|
+
_directionArr: any[][];
|
|
21
|
+
_rgbaArr: any[][];
|
|
22
|
+
_normalsArr: any[][];
|
|
23
|
+
_indicesArr: any[][];
|
|
24
|
+
_pickingColorArr: any[][];
|
|
25
|
+
_pitchRollBuffer: any[];
|
|
26
|
+
_sizeBuffer: any[];
|
|
27
|
+
_vertexBuffer: any[];
|
|
28
|
+
_positionHighBuffer: any[];
|
|
29
|
+
_positionLowBuffer: any[];
|
|
30
|
+
_directionBuffer: any[];
|
|
31
|
+
_rgbaBuffer: any[];
|
|
32
|
+
_normalsBuffer: any[];
|
|
33
|
+
_indicesBuffer: any[];
|
|
34
|
+
_pickingColorBuffer: any[];
|
|
35
|
+
__staticId: number;
|
|
36
|
+
_buffersUpdateCallbacks: (() => void)[];
|
|
37
|
+
_changedBuffers: any[];
|
|
38
|
+
_instancedTags: any;
|
|
39
|
+
getObjectByIndex(index: any): any;
|
|
40
|
+
createVertexBuffer(): void;
|
|
41
|
+
createPitchRollBuffer(): void;
|
|
42
|
+
createSizeBuffer(): void;
|
|
43
|
+
createPositionBuffer(): void;
|
|
44
|
+
createRgbaBuffer(): void;
|
|
45
|
+
createDirectionBuffer(): void;
|
|
46
|
+
createNormalsBuffer(): void;
|
|
47
|
+
createIndicesBuffer(): void;
|
|
48
|
+
createPickingColorBuffer(): void;
|
|
49
|
+
initProgram(): void;
|
|
50
|
+
setRenderNode(renderNode: any): void;
|
|
51
|
+
setRenderer(planet: any): void;
|
|
52
|
+
_addGeoObjectToArray(geoObject: any): void;
|
|
53
|
+
_displayPASS(): void;
|
|
54
|
+
drawPicking(): void;
|
|
55
|
+
_pickingPASS(): void;
|
|
56
|
+
_recalculateIndices(): void;
|
|
57
|
+
setVertexArr(index: any, vertexArr: any): void;
|
|
58
|
+
setDirectionArr(index: any, direction: any): void;
|
|
59
|
+
setVisibility(index: any, visibility: any): void;
|
|
60
|
+
setPositionArr(index: any, positionHigh: any, positionLow: any): void;
|
|
61
|
+
setRgbaArr(index: any, rgba: any): void;
|
|
62
|
+
getTagIndexByObjectIndex(index: any): any;
|
|
63
|
+
getTagDataByObjectIndex(index: any): any;
|
|
64
|
+
setPickingColorArr(index: any, color: any): void;
|
|
65
|
+
setPitchRollArr(index: any, pitch: any, roll: any): void;
|
|
66
|
+
setScaleArr(index: any, scale: any): void;
|
|
67
|
+
refresh(): void;
|
|
68
|
+
_removeGeoObjects(): void;
|
|
69
|
+
clear(): void;
|
|
70
|
+
_deleteBuffers(): void;
|
|
71
|
+
update(): void;
|
|
72
|
+
draw(): void;
|
|
73
|
+
_reindexGeoObjects(startIndex: any, tag: any): void;
|
|
74
|
+
add(geoObject: any): void;
|
|
75
|
+
remove(geoObject: any): void;
|
|
76
|
+
_removeGeoObject(geoObject: any): void;
|
|
77
|
+
}
|
|
@@ -6,18 +6,18 @@ export class Geometry {
|
|
|
6
6
|
* Returns geometry feature extent.
|
|
7
7
|
@static
|
|
8
8
|
@param {Object} geometryObj - GeoJSON style geometry feature.
|
|
9
|
-
@param {
|
|
10
|
-
@returns {
|
|
9
|
+
@param {LonLat[]} outCoordinates - Geometry feature coordinates clone.
|
|
10
|
+
@returns {Extent} -
|
|
11
11
|
*/
|
|
12
|
-
static getExtent(geometryObj: any, outCoordinates:
|
|
12
|
+
static getExtent(geometryObj: any, outCoordinates: LonLat[]): Extent;
|
|
13
13
|
constructor(options: any);
|
|
14
14
|
_id: number;
|
|
15
15
|
/**
|
|
16
16
|
* Entity instance that holds this geometry.
|
|
17
17
|
* @protected
|
|
18
|
-
* @type {
|
|
18
|
+
* @type {Entity}
|
|
19
19
|
*/
|
|
20
|
-
protected _entity:
|
|
20
|
+
protected _entity: Entity;
|
|
21
21
|
_handler: any;
|
|
22
22
|
_handlerIndex: number;
|
|
23
23
|
_polyVerticesHighMerc: any[];
|
|
@@ -40,7 +40,7 @@ export class Geometry {
|
|
|
40
40
|
_lineColorsHandlerIndex: number;
|
|
41
41
|
_type: any;
|
|
42
42
|
_coordinates: any[];
|
|
43
|
-
_extent:
|
|
43
|
+
_extent: Extent;
|
|
44
44
|
_style: any;
|
|
45
45
|
_visibility: any;
|
|
46
46
|
_pickingReady: boolean;
|
|
@@ -60,7 +60,7 @@ export class Geometry {
|
|
|
60
60
|
setVisibility(visibility: any): Geometry;
|
|
61
61
|
getVisibility(): any;
|
|
62
62
|
remove(): void;
|
|
63
|
-
getExtent():
|
|
63
|
+
getExtent(): Extent;
|
|
64
64
|
getType(): any;
|
|
65
65
|
}
|
|
66
66
|
export namespace GeometryType {
|
|
@@ -70,3 +70,5 @@ export namespace GeometryType {
|
|
|
70
70
|
const MULTIPOLYGON: number;
|
|
71
71
|
const MULTILINESTRING: number;
|
|
72
72
|
}
|
|
73
|
+
import { Extent } from "../Extent.js";
|
|
74
|
+
import { LonLat } from "../LonLat.js";
|
|
@@ -44,9 +44,9 @@ export class GeometryHandler {
|
|
|
44
44
|
assignHandler(handler: any): void;
|
|
45
45
|
/**
|
|
46
46
|
* @public
|
|
47
|
-
* @param {
|
|
47
|
+
* @param {Geometry} geometry - Geometry object.
|
|
48
48
|
*/
|
|
49
|
-
public add(geometry:
|
|
49
|
+
public add(geometry: Geometry): void;
|
|
50
50
|
remove(geometry: any): void;
|
|
51
51
|
_refreshRecursevely(geometry: any, treeNode: any): void;
|
|
52
52
|
_refreshRecursevelyExt(extent: any, treeNode: any): void;
|
package/types/entity/Label.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Billboard text label.
|
|
3
3
|
* @class
|
|
4
|
-
* @extends {
|
|
4
|
+
* @extends {BaseBillboard}
|
|
5
5
|
* @param {Object} [options] - Label 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.text] - Text string.
|
|
13
13
|
* @param {string} [options.face] - HTML5 font face.
|
|
@@ -15,11 +15,10 @@
|
|
|
15
15
|
* @param {string} [options.style] - HTML5 font style. Example 'normal', 'italic'.
|
|
16
16
|
* @param {string} [options.weight] - HTML5 font weight. Example 'normal', 'bold'.
|
|
17
17
|
* @param {number} [options.outline] - Text outline size. 0 - no outline, 1 - maximum outline. Default 0.58.
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {
|
|
18
|
+
* @param {Vec4|string|Array.<number>} [options.outlineColor] - Outline color.
|
|
19
|
+
* @param {Label.ALIGN} [options.align] - Text horizontal align: "left", "right" and "center".
|
|
20
20
|
*/
|
|
21
|
-
export class Label {
|
|
22
|
-
constructor(options: any);
|
|
21
|
+
export class Label extends BaseBillboard {
|
|
23
22
|
/**
|
|
24
23
|
* Label text string.
|
|
25
24
|
* @private
|
|
@@ -47,13 +46,13 @@ export class Label {
|
|
|
47
46
|
/**
|
|
48
47
|
* Label outline color.
|
|
49
48
|
* @private
|
|
50
|
-
* @type {
|
|
49
|
+
* @type {Vec4}
|
|
51
50
|
*/
|
|
52
51
|
private _outlineColor;
|
|
53
52
|
/**
|
|
54
53
|
* Text horizontal align: "left", "right" and "center".
|
|
55
54
|
* @private
|
|
56
|
-
* @type {
|
|
55
|
+
* @type {Label.ALIGN}
|
|
57
56
|
*/
|
|
58
57
|
private _align;
|
|
59
58
|
/**
|
|
@@ -65,7 +64,7 @@ export class Label {
|
|
|
65
64
|
/**
|
|
66
65
|
* Font atlas pointer.
|
|
67
66
|
* @private
|
|
68
|
-
* @type {
|
|
67
|
+
* @type {utils.FontAtlas}
|
|
69
68
|
*/
|
|
70
69
|
private _fontAtlas;
|
|
71
70
|
/**
|
|
@@ -84,15 +83,15 @@ export class Label {
|
|
|
84
83
|
/**
|
|
85
84
|
* Sets label text align. Could be center, left or right. Left is default.
|
|
86
85
|
* @public
|
|
87
|
-
* @param {
|
|
86
|
+
* @param {Label.ALIGN} align - Text align.
|
|
88
87
|
*/
|
|
89
|
-
public setAlign(align:
|
|
88
|
+
public setAlign(align: Label.ALIGN): void;
|
|
90
89
|
/**
|
|
91
90
|
* Gets label text current alignment.
|
|
92
91
|
* @public
|
|
93
|
-
* @returns {
|
|
92
|
+
* @returns {Label.ALIGN}
|
|
94
93
|
*/
|
|
95
|
-
public getAlign():
|
|
94
|
+
public getAlign(): Label.ALIGN;
|
|
96
95
|
/**
|
|
97
96
|
* Sets font face family.
|
|
98
97
|
* @public
|
|
@@ -129,12 +128,6 @@ export class Label {
|
|
|
129
128
|
* @returns {number}
|
|
130
129
|
*/
|
|
131
130
|
public getOutline(): number;
|
|
132
|
-
/**
|
|
133
|
-
* Sets label opacity.
|
|
134
|
-
* @public
|
|
135
|
-
* @param {number} a - Label opacity.
|
|
136
|
-
*/
|
|
137
|
-
public setOpacity(a: number): void;
|
|
138
131
|
/**
|
|
139
132
|
* Sets text outline color.
|
|
140
133
|
* @public
|
|
@@ -147,9 +140,9 @@ export class Label {
|
|
|
147
140
|
/**
|
|
148
141
|
* Sets text outline color.
|
|
149
142
|
* @public
|
|
150
|
-
* @param {
|
|
143
|
+
* @param {Vec4} rgba - Color vector.
|
|
151
144
|
*/
|
|
152
|
-
public setOutlineColor4v(rgba:
|
|
145
|
+
public setOutlineColor4v(rgba: Vec4): void;
|
|
153
146
|
/**
|
|
154
147
|
* Sets text outline color HTML string.
|
|
155
148
|
* @public
|
|
@@ -159,9 +152,9 @@ export class Label {
|
|
|
159
152
|
/**
|
|
160
153
|
* Gets outline color vector.
|
|
161
154
|
* @public
|
|
162
|
-
* @returns {
|
|
155
|
+
* @returns {Vec4}
|
|
163
156
|
*/
|
|
164
|
-
public getOutlineColor():
|
|
157
|
+
public getOutlineColor(): Vec4;
|
|
165
158
|
/**
|
|
166
159
|
* Sets outline opacity. Actually outline color alpha value.
|
|
167
160
|
* @public
|
|
@@ -178,17 +171,19 @@ export class Label {
|
|
|
178
171
|
* Updates label parameters.
|
|
179
172
|
* @public
|
|
180
173
|
*/
|
|
181
|
-
public update(): void
|
|
174
|
+
public update(): Promise<void>;
|
|
182
175
|
_applyFontIndex(fontIndex: any): void;
|
|
183
176
|
/**
|
|
184
177
|
* Assigns font atlas and update.
|
|
185
178
|
* @public
|
|
186
|
-
* @param {
|
|
179
|
+
* @param {utils.FontAtlas} fontAtlas - Font atlas.
|
|
187
180
|
*/
|
|
188
|
-
public assignFontAtlas(fontAtlas:
|
|
181
|
+
public assignFontAtlas(fontAtlas: utils.FontAtlas): void;
|
|
189
182
|
}
|
|
190
183
|
export namespace ALIGN {
|
|
191
184
|
const RIGHT: number;
|
|
192
185
|
const LEFT: number;
|
|
193
186
|
const CENTER: number;
|
|
194
187
|
}
|
|
188
|
+
import { BaseBillboard } from "./BaseBillboard.js";
|
|
189
|
+
import { Vec4 } from "../math/Vec4.js";
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export class LabelHandler extends BillboardHandler {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {*} entityCollection
|
|
5
|
+
* @param {*} maxLetters
|
|
6
|
+
*/
|
|
7
|
+
constructor(entityCollection: any, maxLetters?: any);
|
|
3
8
|
_gliphParamBuffer: any;
|
|
4
9
|
_fontIndexBuffer: any;
|
|
5
10
|
_noOutlineBuffer: any;
|
|
@@ -10,8 +15,10 @@ export class LabelHandler extends BillboardHandler {
|
|
|
10
15
|
_noOutlineArr: Float32Array;
|
|
11
16
|
_outlineArr: Float32Array;
|
|
12
17
|
_outlineColorArr: Float32Array;
|
|
13
|
-
_maxLetters:
|
|
18
|
+
_maxLetters: any;
|
|
19
|
+
_addLabelToArrays(label: any): void;
|
|
14
20
|
assignFontAtlas(label: any): void;
|
|
21
|
+
workerCallback(data: any, label: any): void;
|
|
15
22
|
setText(index: any, text: any, fontIndex: any, align: any): void;
|
|
16
23
|
setOutlineColorArr(index: any, rgba: any): void;
|
|
17
24
|
setOutlineArr(index: any, outline: any): void;
|