@openglobus/og 0.11.2 → 0.11.7
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 +13 -13
- package/src/og/Clock.js +10 -10
- package/src/og/Events.js +8 -6
- package/src/og/Extent.js +82 -41
- package/src/og/Globe.js +25 -13
- package/src/og/ImageCanvas.js +22 -16
- package/src/og/LonLat.js +16 -13
- package/src/og/Popup.js +21 -14
- package/src/og/QueueArray.js +6 -2
- package/src/og/Rectangle.js +11 -6
- package/src/og/Stack.js +5 -2
- package/src/og/ajax.js +21 -33
- package/src/og/astro/astro.js +5 -5
- package/src/og/astro/earth.js +22 -16
- package/src/og/astro/jd.js +23 -18
- package/src/og/astro/orbit.js +13 -11
- package/src/og/astro/rotation.js +17 -8
- package/src/og/bv/Box.js +7 -3
- package/src/og/bv/Sphere.js +14 -11
- package/src/og/camera/Camera.js +51 -54
- package/src/og/camera/Frustum.js +29 -18
- package/src/og/camera/PlanetCamera.js +32 -23
- package/src/og/control/CompassButton.js +5 -1
- package/src/og/control/Control.js +12 -10
- package/src/og/control/DebugInfo.js +4 -1
- package/src/og/control/EarthCoordinates.js +54 -33
- package/src/og/control/KeyboardNavigation.js +10 -10
- package/src/og/control/LayerSwitcher.js +22 -21
- package/src/og/control/Lighting.js +34 -3
- package/src/og/control/MouseNavigation.js +1 -1
- package/src/og/control/ScaleControl.js +1 -1
- package/src/og/control/SegmentBoundVisualization.js +6 -7
- package/src/og/control/ShowFps.js +13 -8
- package/src/og/control/SimpleNavigation.js +6 -8
- package/src/og/control/Sun.js +25 -15
- package/src/og/control/ToggleWireframe.js +4 -4
- package/src/og/control/TouchNavigation.js +44 -33
- package/src/og/control/ZoomControl.js +41 -25
- package/src/og/ellipsoid/Ellipsoid.js +162 -66
- package/src/og/ellipsoid/wgs84.js +4 -4
- package/src/og/entity/BaseBillboard.js +100 -56
- package/src/og/entity/Billboard.js +14 -10
- package/src/og/entity/BillboardHandler.js +317 -60
- package/src/og/entity/Entity.js +100 -68
- package/src/og/entity/EntityCollection.js +70 -47
- package/src/og/entity/GeoObject.js +228 -0
- package/src/og/entity/GeoObjectHandler.js +910 -0
- package/src/og/entity/Geometry.js +27 -24
- package/src/og/entity/GeometryHandler.js +596 -124
- package/src/og/entity/Label.js +80 -49
- package/src/og/entity/LabelHandler.js +45 -244
- package/src/og/entity/LabelWorker.js +218 -0
- package/src/og/entity/Object3d.js +504 -0
- package/src/og/entity/PointCloud.js +80 -32
- package/src/og/entity/PointCloudHandler.js +8 -8
- package/src/og/entity/Polyline.js +16 -16
- package/src/og/entity/Ray.js +60 -27
- package/src/og/entity/Strip.js +77 -48
- package/src/og/entity/StripHandler.js +26 -26
- package/src/og/entity/index.js +8 -16
- package/src/og/layer/BaseGeoImage.js +54 -23
- package/src/og/layer/CanvasTiles.js +24 -24
- package/src/og/layer/GeoImage.js +9 -9
- package/src/og/layer/GeoVideo.js +3 -3
- package/src/og/layer/KML.js +63 -37
- package/src/og/layer/Layer.js +44 -21
- package/src/og/layer/Material.js +23 -20
- package/src/og/layer/Vector.js +114 -68
- package/src/og/layer/WMS.js +34 -17
- package/src/og/layer/XYZ.js +48 -46
- package/src/og/light/LightSource.js +46 -39
- package/src/og/math/Mat3.js +34 -22
- package/src/og/math/Mat4.js +603 -459
- package/src/og/math/Plane.js +21 -20
- package/src/og/math/Quat.js +182 -139
- package/src/og/math/Ray.js +38 -33
- package/src/og/math/Vec2.js +85 -75
- package/src/og/math/Vec3.js +142 -112
- package/src/og/math/Vec4.js +27 -31
- package/src/og/math/coder.js +10 -10
- package/src/og/math.js +12 -12
- package/src/og/proj/EPSG3857.js +4 -4
- package/src/og/proj/EPSG4326.js +4 -4
- package/src/og/proj/Proj.js +4 -6
- package/src/og/quadTree/Node.js +8 -8
- package/src/og/renderer/Renderer.js +59 -52
- package/src/og/renderer/RendererEvents.js +50 -27
- package/src/og/scene/BaseNode.js +7 -8
- package/src/og/scene/Planet.js +102 -103
- package/src/og/scene/RenderNode.js +28 -21
- package/src/og/segment/Segment.js +26 -21
- package/src/og/segment/SegmentLonLat.js +5 -5
- package/src/og/shaders/drawnode.js +135 -142
- package/src/og/shaders/geoObject.js +211 -0
- package/src/og/shaders/pointCloud.js +41 -41
- package/src/og/shaders/shape.js +12 -18
- package/src/og/shaders/skybox.js +36 -36
- package/src/og/shaders/toneMapping.js +1 -0
- package/src/og/shapes/BaseShape.js +126 -54
- package/src/og/shapes/Icosphere.js +29 -14
- package/src/og/shapes/Sphere.js +12 -15
- package/src/og/terrain/BilTerrain.js +1 -0
- package/src/og/terrain/EmptyTerrain.js +2 -2
- package/src/og/terrain/GlobusTerrain.js +9 -9
- package/src/og/utils/FontAtlas.js +6 -2
- package/src/og/utils/TextureAtlas.js +22 -24
- package/src/og/utils/VectorTileCreator.js +1 -3
- package/src/og/utils/shared.js +16 -16
- package/src/og/webgl/Framebuffer.js +88 -40
- package/src/og/webgl/Handler.js +243 -169
- package/src/og/webgl/Multisample.js +47 -19
- package/src/og/webgl/Program.js +79 -34
- package/src/og/webgl/ProgramController.js +17 -13
- package/src/og/webgl/callbacks.js +8 -8
- package/src/og/inherits.js +0 -8
- package/src/og/utils/polylabel.js +0 -176
- package/types/Clock.d.ts +0 -90
- package/types/Deferred.d.ts +0 -6
- package/types/Events.d.ts +0 -73
- package/types/Extent.d.ts +0 -166
- package/types/Globe.d.ts +0 -75
- package/types/ImageCanvas.d.ts +0 -121
- package/types/Lock.d.ts +0 -12
- package/types/LonLat.d.ts +0 -108
- package/types/Popup.d.ts +0 -38
- package/types/QueueArray.d.ts +0 -15
- package/types/Rectangle.d.ts +0 -74
- package/types/Stack.d.ts +0 -15
- package/types/ajax.d.ts +0 -24
- package/types/arial.d.ts +0 -48
- package/types/astro/astro.d.ts +0 -38
- package/types/astro/earth.d.ts +0 -6
- package/types/astro/jd.d.ts +0 -254
- package/types/bv/Box.d.ts +0 -25
- package/types/bv/Sphere.d.ts +0 -38
- package/types/bv/index.d.ts +0 -3
- package/types/camera/Camera.d.ts +0 -303
- package/types/camera/Frustum.d.ts +0 -129
- package/types/camera/PlanetCamera.d.ts +0 -223
- package/types/camera/index.d.ts +0 -3
- package/types/cons.d.ts +0 -40
- package/types/control/CompassButton.d.ts +0 -18
- package/types/control/Control.d.ts +0 -101
- package/types/control/DebugInfo.d.ts +0 -16
- package/types/control/EarthCoordinates.d.ts +0 -47
- package/types/control/EarthNavigation.d.ts +0 -42
- package/types/control/GeoImageDragControl.d.ts +0 -6
- package/types/control/KeyboardNavigation.d.ts +0 -22
- package/types/control/LayerSwitcher.d.ts +0 -23
- package/types/control/Lighting.d.ts +0 -16
- package/types/control/MouseNavigation.d.ts +0 -51
- package/types/control/ScaleControl.d.ts +0 -22
- package/types/control/ShowFps.d.ts +0 -12
- package/types/control/SimpleNavigation.d.ts +0 -28
- package/types/control/Sun.d.ts +0 -52
- package/types/control/ToggleWireframe.d.ts +0 -12
- package/types/control/TouchNavigation.d.ts +0 -50
- package/types/control/ZoomControl.d.ts +0 -28
- package/types/control/index.d.ts +0 -17
- package/types/ellipsoid/Ellipsoid.d.ts +0 -142
- package/types/ellipsoid/index.d.ts +0 -3
- package/types/ellipsoid/wgs84.d.ts +0 -5
- package/types/entity/BaseBillboard.d.ts +0 -208
- package/types/entity/Billboard.d.ts +0 -94
- package/types/entity/BillboardHandler.d.ts +0 -74
- package/types/entity/Entity.d.ts +0 -331
- package/types/entity/EntityCollection.d.ts +0 -303
- package/types/entity/Geometry.d.ts +0 -73
- package/types/entity/GeometryHandler.d.ts +0 -76
- package/types/entity/Label.d.ts +0 -194
- package/types/entity/LabelHandler.d.ts +0 -24
- package/types/entity/PointCloud.d.ts +0 -174
- package/types/entity/PointCloudHandler.d.ts +0 -38
- package/types/entity/Polyline.d.ts +0 -304
- package/types/entity/PolylineHandler.d.ts +0 -18
- package/types/entity/Ray.d.ts +0 -123
- package/types/entity/RayHandler.d.ts +0 -67
- package/types/entity/ShapeHandler.d.ts +0 -22
- package/types/entity/Strip.d.ts +0 -118
- package/types/entity/StripHandler.d.ts +0 -38
- package/types/entity/index.d.ts +0 -8
- package/types/index.core.d.ts +0 -65
- package/types/index.d.ts +0 -45
- package/types/index.webgl.d.ts +0 -7
- package/types/inherits.d.ts +0 -4
- package/types/input/KeyboardHandler.d.ts +0 -10
- package/types/input/MouseHandler.d.ts +0 -5
- package/types/input/TouchHandler.d.ts +0 -5
- package/types/input/input.d.ts +0 -34
- package/types/layer/BaseGeoImage.d.ts +0 -107
- package/types/layer/CanvasTiles.d.ts +0 -75
- package/types/layer/GeoImage.d.ts +0 -65
- package/types/layer/GeoTexture2d.d.ts +0 -8
- package/types/layer/GeoVideo.d.ts +0 -80
- package/types/layer/KML.d.ts +0 -58
- package/types/layer/Layer.d.ts +0 -321
- package/types/layer/Material.d.ts +0 -48
- package/types/layer/Vector.d.ts +0 -228
- package/types/layer/WMS.d.ts +0 -66
- package/types/layer/XYZ.d.ts +0 -130
- package/types/layer/index.d.ts +0 -10
- package/types/light/LightSource.d.ts +0 -177
- package/types/math/Line2.d.ts +0 -11
- package/types/math/Line3.d.ts +0 -10
- package/types/math/Mat3.d.ts +0 -63
- package/types/math/Mat4.d.ts +0 -173
- package/types/math/Plane.d.ts +0 -17
- package/types/math/Quat.d.ts +0 -376
- package/types/math/Ray.d.ts +0 -81
- package/types/math/Vec2.d.ts +0 -308
- package/types/math/Vec3.d.ts +0 -459
- package/types/math/Vec4.d.ts +0 -161
- package/types/math/coder.d.ts +0 -42
- package/types/math/index.d.ts +0 -11
- package/types/math.d.ts +0 -261
- package/types/mercator.d.ts +0 -92
- package/types/proj/EPSG3857.d.ts +0 -5
- package/types/proj/EPSG4326.d.ts +0 -5
- package/types/proj/Proj.d.ts +0 -42
- package/types/quadTree/EntityCollectionNode.d.ts +0 -34
- package/types/quadTree/Node.d.ts +0 -61
- package/types/quadTree/quadTree.d.ts +0 -40
- package/types/renderer/Renderer.d.ts +0 -296
- package/types/renderer/RendererEvents.d.ts +0 -230
- package/types/res/images.d.ts +0 -3
- package/types/scene/Axes.d.ts +0 -11
- package/types/scene/BaseNode.d.ts +0 -60
- package/types/scene/Planet.d.ts +0 -574
- package/types/scene/RenderNode.d.ts +0 -143
- package/types/scene/SkyBox.d.ts +0 -10
- package/types/scene/index.d.ts +0 -4
- package/types/segment/Segment.d.ts +0 -271
- package/types/segment/SegmentLonLat.d.ts +0 -62
- package/types/segment/segmentHelper.d.ts +0 -13
- package/types/shaders/billboard.d.ts +0 -3
- package/types/shaders/depth.d.ts +0 -2
- package/types/shaders/drawnode.d.ts +0 -7
- package/types/shaders/label.d.ts +0 -4
- package/types/shaders/pointCloud.d.ts +0 -2
- package/types/shaders/polyline.d.ts +0 -3
- package/types/shaders/ray.d.ts +0 -2
- package/types/shaders/screenFrame.d.ts +0 -2
- package/types/shaders/shape.d.ts +0 -4
- package/types/shaders/skybox.d.ts +0 -2
- package/types/shaders/toneMapping.d.ts +0 -2
- package/types/shapes/BaseShape.d.ts +0 -247
- package/types/shapes/Sphere.d.ts +0 -41
- package/types/terrain/BilTerrain.d.ts +0 -8
- package/types/terrain/EmptyTerrain.d.ts +0 -72
- package/types/terrain/Geoid.d.ts +0 -26
- package/types/terrain/GlobusTerrain.d.ts +0 -153
- package/types/terrain/MapboxTerrain.d.ts +0 -8
- package/types/terrain/index.d.ts +0 -5
- package/types/utils/FontAtlas.d.ts +0 -14
- package/types/utils/GeoImageCreator.d.ts +0 -30
- package/types/utils/ImagesCacheManager.d.ts +0 -10
- package/types/utils/Loader.d.ts +0 -25
- package/types/utils/NormalMapCreator.d.ts +0 -39
- package/types/utils/PlainSegmentWorker.d.ts +0 -10
- package/types/utils/TerrainWorker.d.ts +0 -9
- package/types/utils/TextureAtlas.d.ts +0 -111
- package/types/utils/VectorTileCreator.d.ts +0 -16
- package/types/utils/colorTable.d.ts +0 -143
- package/types/utils/earcut.d.ts +0 -6
- package/types/utils/shared.d.ts +0 -230
- package/types/webgl/Framebuffer.d.ts +0 -135
- package/types/webgl/Handler.d.ts +0 -372
- package/types/webgl/Multisample.d.ts +0 -89
- package/types/webgl/Program.d.ts +0 -155
- package/types/webgl/ProgramController.d.ts +0 -84
- package/types/webgl/callbacks.d.ts +0 -1
- package/types/webgl/index.d.ts +0 -6
- package/types/webgl/types.d.ts +0 -2
package/src/og/scene/Planet.js
CHANGED
|
@@ -32,7 +32,7 @@ import { NIGHT, SPECULAR } from "../res/images.js";
|
|
|
32
32
|
import { Geoid } from "../terrain/Geoid.js";
|
|
33
33
|
import { isUndef } from "../utils/shared.js";
|
|
34
34
|
|
|
35
|
-
const MAX_LOD = 0
|
|
35
|
+
const MAX_LOD = 1.0;
|
|
36
36
|
const MIN_LOD = 0.75;
|
|
37
37
|
|
|
38
38
|
let _tempPickingPix_ = new Uint8Array(4),
|
|
@@ -89,10 +89,13 @@ const EVENT_NAMES = [
|
|
|
89
89
|
/**
|
|
90
90
|
* Main class for rendering planet
|
|
91
91
|
* @class
|
|
92
|
-
* @extends {
|
|
93
|
-
* @param {string} name - Planet name(Earth by default)
|
|
94
|
-
* @param {
|
|
95
|
-
* @param {Number} [maxGridSize=128] - Segment maximal grid size
|
|
92
|
+
* @extends {RenderNode}
|
|
93
|
+
* @param {string} [options.name="Earth"] - Planet name(Earth by default)
|
|
94
|
+
* @param {Ellipsoid} [options.ellipsoid] - Planet ellipsoid(WGS84 by default)
|
|
95
|
+
* @param {Number} [options.maxGridSize=128] - Segment maximal grid size
|
|
96
|
+
* @param {Number} [options.maxEqualZoomAltitude=15000000.0] - Maximal altitude since segments on the screen bacame the same zoom level
|
|
97
|
+
* @param {Number} [options.minEqualZoomAltitude=10000.0] - Minimal altitude since segments on the screen bacame the same zoom level
|
|
98
|
+
* @param {Number} [options.minEqualZoomCameraSlope=0.8] - Minimal camera slope above te globe where segments on the screen bacame the same zoom level
|
|
96
99
|
* @fires og.scene.Planet#draw
|
|
97
100
|
* @fires og.scene.Planet#layeradd
|
|
98
101
|
* @fires og.scene.Planet#baselayerchange
|
|
@@ -106,7 +109,7 @@ export class Planet extends RenderNode {
|
|
|
106
109
|
|
|
107
110
|
/**
|
|
108
111
|
* @public
|
|
109
|
-
* @type {
|
|
112
|
+
* @type {Ellipsoid}
|
|
110
113
|
*/
|
|
111
114
|
this.ellipsoid = options.ellipsoid || wgs84;
|
|
112
115
|
|
|
@@ -126,21 +129,21 @@ export class Planet extends RenderNode {
|
|
|
126
129
|
/**
|
|
127
130
|
* All layers array.
|
|
128
131
|
* @public
|
|
129
|
-
* @type {Array.<
|
|
132
|
+
* @type {Array.<Layer>}
|
|
130
133
|
*/
|
|
131
134
|
this.layers = [];
|
|
132
135
|
|
|
133
136
|
/**
|
|
134
137
|
* Current visible imagery tile layers array.
|
|
135
138
|
* @public
|
|
136
|
-
* @type {Array.<
|
|
139
|
+
* @type {Array.<Layer>}
|
|
137
140
|
*/
|
|
138
141
|
this.visibleTileLayers = [];
|
|
139
142
|
|
|
140
143
|
/**
|
|
141
144
|
* Current visible vector layers array.
|
|
142
145
|
* @protected
|
|
143
|
-
* @type {Array.<
|
|
146
|
+
* @type {Array.<layer.Vector>}
|
|
144
147
|
*/
|
|
145
148
|
this.visibleVectorLayers = [];
|
|
146
149
|
|
|
@@ -149,38 +152,42 @@ export class Planet extends RenderNode {
|
|
|
149
152
|
/**
|
|
150
153
|
* Vector layers visible nodes with collections.
|
|
151
154
|
* @protected
|
|
152
|
-
* @type {Array.<
|
|
155
|
+
* @type {Array.<EntityCollection>}
|
|
153
156
|
*/
|
|
154
157
|
this._frustumEntityCollections = [];
|
|
155
158
|
|
|
156
159
|
/**
|
|
157
160
|
* There is only one base layer on the globe when layer.isBaseLayer is true.
|
|
158
161
|
* @public
|
|
159
|
-
* @type {
|
|
162
|
+
* @type {Layer}
|
|
160
163
|
*/
|
|
161
164
|
this.baseLayer = null;
|
|
162
165
|
|
|
163
166
|
/**
|
|
164
167
|
* Terrain provider.
|
|
165
168
|
* @public
|
|
166
|
-
* @type {
|
|
169
|
+
* @type {Terrain}
|
|
167
170
|
*/
|
|
168
171
|
this.terrain = null;
|
|
169
172
|
|
|
170
173
|
/**
|
|
171
174
|
* Camera is this.renderer.activeCamera pointer.
|
|
172
175
|
* @public
|
|
173
|
-
* @type {
|
|
176
|
+
* @type {PlanetCamera}
|
|
174
177
|
*/
|
|
175
178
|
this.camera = null;
|
|
176
179
|
|
|
177
180
|
this._minAltitude = options.minAltitude;
|
|
178
181
|
this._maxAltitude = options.maxAltitude;
|
|
179
182
|
|
|
183
|
+
this.maxEqualZoomAltitude = options.maxEqualZoomAltitude || 15000000.0;
|
|
184
|
+
this.minEqualZoomAltitude = options.minEqualZoomAltitude || 10000.0;
|
|
185
|
+
this.minEqualZoomCameraSlope = options.minEqualZoomCameraSlope || 0.8;
|
|
186
|
+
|
|
180
187
|
/**
|
|
181
188
|
* Screen mouse pointer projected to planet cartesian position.
|
|
182
189
|
* @public
|
|
183
|
-
* @type {
|
|
190
|
+
* @type {Vec3}
|
|
184
191
|
*/
|
|
185
192
|
this.mousePositionOnEarth = new Vec3();
|
|
186
193
|
|
|
@@ -212,7 +219,7 @@ export class Planet extends RenderNode {
|
|
|
212
219
|
/**
|
|
213
220
|
* Planet's segments collected for rendering frame.
|
|
214
221
|
* @protected
|
|
215
|
-
* @type {
|
|
222
|
+
* @type {quadTree.Node}
|
|
216
223
|
*/
|
|
217
224
|
this._renderedNodes = [];
|
|
218
225
|
this._renderedNodesInFrustum = [];
|
|
@@ -220,42 +227,42 @@ export class Planet extends RenderNode {
|
|
|
220
227
|
/**
|
|
221
228
|
* Created nodes cache
|
|
222
229
|
* @protected
|
|
223
|
-
* @type {
|
|
230
|
+
* @type {quadTree.Node}
|
|
224
231
|
*/
|
|
225
232
|
this._quadTreeNodesCacheMerc = {};
|
|
226
233
|
|
|
227
234
|
/**
|
|
228
235
|
* Current visible mercator segments tree nodes array.
|
|
229
236
|
* @protected
|
|
230
|
-
* @type {
|
|
237
|
+
* @type {quadTree.Node}
|
|
231
238
|
*/
|
|
232
239
|
this._visibleNodes = {};
|
|
233
240
|
|
|
234
241
|
/**
|
|
235
242
|
* Current visible north pole nodes tree nodes array.
|
|
236
243
|
* @protected
|
|
237
|
-
* @type {
|
|
244
|
+
* @type {quadTree.Node}
|
|
238
245
|
*/
|
|
239
246
|
this._visibleNodesNorth = {};
|
|
240
247
|
|
|
241
248
|
/**
|
|
242
249
|
* Current visible south pole nodes tree nodes array.
|
|
243
250
|
* @protected
|
|
244
|
-
* @type {
|
|
251
|
+
* @type {quadTree.Node}
|
|
245
252
|
*/
|
|
246
253
|
this._visibleNodesSouth = {};
|
|
247
254
|
|
|
248
255
|
/**
|
|
249
256
|
* Layers activity lock.
|
|
250
257
|
* @public
|
|
251
|
-
* @type {
|
|
258
|
+
* @type {idle.Lock}
|
|
252
259
|
*/
|
|
253
260
|
this.layerLock = new Lock();
|
|
254
261
|
|
|
255
262
|
/**
|
|
256
263
|
* Terrain providers activity lock.
|
|
257
264
|
* @public
|
|
258
|
-
* @type {
|
|
265
|
+
* @type {idle.Lock}
|
|
259
266
|
*/
|
|
260
267
|
this.terrainLock = new Lock();
|
|
261
268
|
|
|
@@ -298,21 +305,21 @@ export class Planet extends RenderNode {
|
|
|
298
305
|
/**
|
|
299
306
|
* Mercator grid tree.
|
|
300
307
|
* @protected
|
|
301
|
-
* @type {
|
|
308
|
+
* @type {quadTree.Node}
|
|
302
309
|
*/
|
|
303
310
|
this._quadTree = null;
|
|
304
311
|
|
|
305
312
|
/**
|
|
306
313
|
* North grid tree.
|
|
307
314
|
* @protected
|
|
308
|
-
* @type {
|
|
315
|
+
* @type {quadTree.Node}
|
|
309
316
|
*/
|
|
310
317
|
this._quadTreeNorth = null;
|
|
311
318
|
|
|
312
319
|
/**
|
|
313
320
|
* South grid tree.
|
|
314
321
|
* @protected
|
|
315
|
-
* @type {
|
|
322
|
+
* @type {quadTree.Node}
|
|
316
323
|
*/
|
|
317
324
|
this._quadTreeSouth = null;
|
|
318
325
|
|
|
@@ -378,7 +385,7 @@ export class Planet extends RenderNode {
|
|
|
378
385
|
/**
|
|
379
386
|
* GeoImage creator.
|
|
380
387
|
* @protected
|
|
381
|
-
* @type{
|
|
388
|
+
* @type{utils.GeoImageCreator}
|
|
382
389
|
*/
|
|
383
390
|
this._geoImageCreator = null;
|
|
384
391
|
|
|
@@ -415,7 +422,7 @@ export class Planet extends RenderNode {
|
|
|
415
422
|
|
|
416
423
|
/**
|
|
417
424
|
* Add the given control to the renderer of the planet scene.
|
|
418
|
-
* @param {
|
|
425
|
+
* @param {control.Control} control - Control.
|
|
419
426
|
*/
|
|
420
427
|
addControl(control) {
|
|
421
428
|
control.planet = this;
|
|
@@ -427,11 +434,12 @@ export class Planet extends RenderNode {
|
|
|
427
434
|
if (minLod) {
|
|
428
435
|
this._minLodRatio = minLod;
|
|
429
436
|
}
|
|
437
|
+
this._renderCompletedActivated = false;
|
|
430
438
|
}
|
|
431
439
|
|
|
432
440
|
/**
|
|
433
441
|
* Add the given controls array to the renderer of the planet.
|
|
434
|
-
* @param {Array.<
|
|
442
|
+
* @param {Array.<control.Control>} cArr - Control array.
|
|
435
443
|
*/
|
|
436
444
|
addControls(cArr) {
|
|
437
445
|
for (var i = 0; i < cArr.length; i++) {
|
|
@@ -443,7 +451,7 @@ export class Planet extends RenderNode {
|
|
|
443
451
|
* Return layer by it name
|
|
444
452
|
* @param {string} name - Name of the layer. og.Layer.prototype.name
|
|
445
453
|
* @public
|
|
446
|
-
* @returns {
|
|
454
|
+
* @returns {Layer} -
|
|
447
455
|
*/
|
|
448
456
|
getLayerByName(name) {
|
|
449
457
|
var i = this.layers.length;
|
|
@@ -456,7 +464,7 @@ export class Planet extends RenderNode {
|
|
|
456
464
|
|
|
457
465
|
/**
|
|
458
466
|
* Adds the given layer to the planet.
|
|
459
|
-
* @param {
|
|
467
|
+
* @param {Layer} layer - Layer object.
|
|
460
468
|
* @public
|
|
461
469
|
*/
|
|
462
470
|
addLayer(layer) {
|
|
@@ -465,7 +473,7 @@ export class Planet extends RenderNode {
|
|
|
465
473
|
|
|
466
474
|
/**
|
|
467
475
|
* Dispatch layer visibility changing event.
|
|
468
|
-
* @param {
|
|
476
|
+
* @param {Layer} layer - Changed layer.
|
|
469
477
|
* @protected
|
|
470
478
|
*/
|
|
471
479
|
_onLayerVisibilityChanged(layer) {
|
|
@@ -474,7 +482,7 @@ export class Planet extends RenderNode {
|
|
|
474
482
|
|
|
475
483
|
/**
|
|
476
484
|
* Adds the given layers array to the planet.
|
|
477
|
-
* @param {Array.<
|
|
485
|
+
* @param {Array.<Layer>} layers - Layers array.
|
|
478
486
|
* @public
|
|
479
487
|
*/
|
|
480
488
|
addLayers(layers) {
|
|
@@ -485,8 +493,8 @@ export class Planet extends RenderNode {
|
|
|
485
493
|
|
|
486
494
|
/**
|
|
487
495
|
* Removes the given layer from the planet.
|
|
488
|
-
* @param {
|
|
489
|
-
* @return {
|
|
496
|
+
* @param {Layer} layer - Layer to remove.
|
|
497
|
+
* @return {Layer|undefined} The removed layer or undefined if the layer was not found.
|
|
490
498
|
* @public
|
|
491
499
|
*/
|
|
492
500
|
removeLayer(layer) {
|
|
@@ -496,7 +504,7 @@ export class Planet extends RenderNode {
|
|
|
496
504
|
/**
|
|
497
505
|
*
|
|
498
506
|
* @protected
|
|
499
|
-
* @param {
|
|
507
|
+
* @param {Layer} layer - Material layer.
|
|
500
508
|
*/
|
|
501
509
|
_clearLayerMaterial(layer) {
|
|
502
510
|
var lid = layer._id;
|
|
@@ -511,7 +519,7 @@ export class Planet extends RenderNode {
|
|
|
511
519
|
|
|
512
520
|
/**
|
|
513
521
|
* Get the collection of layers associated with this planet.
|
|
514
|
-
* @return {Array.<
|
|
522
|
+
* @return {Array.<Layer>} Layers array.
|
|
515
523
|
* @public
|
|
516
524
|
*/
|
|
517
525
|
getLayers() {
|
|
@@ -520,7 +528,7 @@ export class Planet extends RenderNode {
|
|
|
520
528
|
|
|
521
529
|
/**
|
|
522
530
|
* Sets base layer coverage to the planet.
|
|
523
|
-
* @param {
|
|
531
|
+
* @param {Layer} layer - Layer object.
|
|
524
532
|
* @public
|
|
525
533
|
*/
|
|
526
534
|
setBaseLayer(layer) {
|
|
@@ -543,6 +551,8 @@ export class Planet extends RenderNode {
|
|
|
543
551
|
* @param {number} factor - Elevation scale.
|
|
544
552
|
*/
|
|
545
553
|
setHeightFactor(factor) {
|
|
554
|
+
this._renderCompletedActivated = false;
|
|
555
|
+
|
|
546
556
|
if (this._heightFactor !== factor) {
|
|
547
557
|
this._heightFactor = factor;
|
|
548
558
|
this._quadTree.destroyBranches();
|
|
@@ -560,7 +570,7 @@ export class Planet extends RenderNode {
|
|
|
560
570
|
/**
|
|
561
571
|
* Sets terrain provider
|
|
562
572
|
* @public
|
|
563
|
-
* @param {
|
|
573
|
+
* @param {Terrain} terrain - Terrain provider.
|
|
564
574
|
*/
|
|
565
575
|
setTerrain(terrain) {
|
|
566
576
|
this._renderCompletedActivated = false;
|
|
@@ -721,31 +731,13 @@ export class Planet extends RenderNode {
|
|
|
721
731
|
}
|
|
722
732
|
|
|
723
733
|
// Creating quad trees nodes
|
|
724
|
-
this._quadTree = new Node(
|
|
725
|
-
Segment,
|
|
726
|
-
this,
|
|
727
|
-
quadTree.NW,
|
|
728
|
-
null,
|
|
729
|
-
0,
|
|
730
|
-
0,
|
|
734
|
+
this._quadTree = new Node(Segment, this, quadTree.NW, null, 0, 0,
|
|
731
735
|
Extent.createFromArray([-20037508.34, -20037508.34, 20037508.34, 20037508.34])
|
|
732
736
|
);
|
|
733
|
-
this._quadTreeNorth = new Node(
|
|
734
|
-
SegmentLonLat,
|
|
735
|
-
this,
|
|
736
|
-
quadTree.NW,
|
|
737
|
-
null,
|
|
738
|
-
0,
|
|
739
|
-
0,
|
|
737
|
+
this._quadTreeNorth = new Node(SegmentLonLat, this, quadTree.NW, null, 0, 0,
|
|
740
738
|
Extent.createFromArray([-180, mercator.MAX_LAT, 180, 90])
|
|
741
739
|
);
|
|
742
|
-
this._quadTreeSouth = new Node(
|
|
743
|
-
SegmentLonLat,
|
|
744
|
-
this,
|
|
745
|
-
quadTree.NW,
|
|
746
|
-
null,
|
|
747
|
-
0,
|
|
748
|
-
0,
|
|
740
|
+
this._quadTreeSouth = new Node(SegmentLonLat, this, quadTree.NW, null, 0, 0,
|
|
749
741
|
Extent.createFromArray([-180, -90, 180, mercator.MIN_LAT])
|
|
750
742
|
);
|
|
751
743
|
|
|
@@ -761,7 +753,7 @@ export class Planet extends RenderNode {
|
|
|
761
753
|
// loading Earth night glowing texture
|
|
762
754
|
if (this._useNightTexture) {
|
|
763
755
|
createImageBitmap(NIGHT).then(
|
|
764
|
-
(e) => (this._nightTexture = this.renderer.handler.
|
|
756
|
+
(e) => (this._nightTexture = this.renderer.handler.createTextureDefault(e))
|
|
765
757
|
);
|
|
766
758
|
}
|
|
767
759
|
|
|
@@ -811,7 +803,7 @@ export class Planet extends RenderNode {
|
|
|
811
803
|
this._quadTree.renderNode(true);
|
|
812
804
|
this._normalMapCreator.drawSingle(this._quadTree.segment);
|
|
813
805
|
|
|
814
|
-
for (
|
|
806
|
+
for (let i = 0; i < this._quadTree.nodes.length; i++) {
|
|
815
807
|
this._quadTree.nodes[i].segment.createPlainSegment();
|
|
816
808
|
this._quadTree.nodes[i].renderNode(true);
|
|
817
809
|
this._normalMapCreator.drawSingle(this._quadTree.nodes[i].segment);
|
|
@@ -822,7 +814,7 @@ export class Planet extends RenderNode {
|
|
|
822
814
|
this._quadTreeNorth.renderNode(true);
|
|
823
815
|
this._normalMapCreator.drawSingle(this._quadTreeNorth.segment);
|
|
824
816
|
|
|
825
|
-
for (
|
|
817
|
+
for (let i = 0; i < this._quadTreeNorth.nodes.length; i++) {
|
|
826
818
|
this._quadTreeNorth.nodes[i].segment.createPlainSegment();
|
|
827
819
|
this._quadTreeNorth.nodes[i].renderNode(true);
|
|
828
820
|
this._normalMapCreator.drawSingle(this._quadTreeNorth.nodes[i].segment);
|
|
@@ -833,7 +825,7 @@ export class Planet extends RenderNode {
|
|
|
833
825
|
this._quadTreeSouth.renderNode(true);
|
|
834
826
|
this._normalMapCreator.drawSingle(this._quadTreeSouth.segment);
|
|
835
827
|
|
|
836
|
-
for (
|
|
828
|
+
for (let i = 0; i < this._quadTreeSouth.nodes.length; i++) {
|
|
837
829
|
this._quadTreeSouth.nodes[i].segment.createPlainSegment();
|
|
838
830
|
this._quadTreeSouth.nodes[i].renderNode(true);
|
|
839
831
|
this._normalMapCreator.drawSingle(this._quadTreeSouth.nodes[i].segment);
|
|
@@ -986,13 +978,15 @@ export class Planet extends RenderNode {
|
|
|
986
978
|
* @protected
|
|
987
979
|
*/
|
|
988
980
|
_collectRenderNodes() {
|
|
981
|
+
let cam = this.camera;
|
|
982
|
+
|
|
989
983
|
this._lodRatio = math.lerp(
|
|
990
|
-
|
|
984
|
+
cam.slope < 0.0 ? 0.0 : cam.slope,
|
|
991
985
|
this._maxLodRatio,
|
|
992
986
|
this._minLodRatio
|
|
993
987
|
);
|
|
994
988
|
|
|
995
|
-
|
|
989
|
+
cam._insideSegment = null;
|
|
996
990
|
|
|
997
991
|
this._nodeCounterError_ = 0;
|
|
998
992
|
|
|
@@ -1008,12 +1002,12 @@ export class Planet extends RenderNode {
|
|
|
1008
1002
|
this.minCurrZoom = math.MAX;
|
|
1009
1003
|
this.maxCurrZoom = math.MIN;
|
|
1010
1004
|
|
|
1011
|
-
this._quadTree.renderTree(
|
|
1005
|
+
this._quadTree.renderTree(cam, 0, null);
|
|
1012
1006
|
|
|
1013
1007
|
if (
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1008
|
+
cam.slope > this.minEqualZoomCameraSlope &&
|
|
1009
|
+
cam._lonLat.height < this.maxEqualZoomAltitude &&
|
|
1010
|
+
cam._lonLat.height > this.minEqualZoomAltitude
|
|
1017
1011
|
) {
|
|
1018
1012
|
this.minCurrZoom = this.maxCurrZoom;
|
|
1019
1013
|
|
|
@@ -1048,18 +1042,20 @@ export class Planet extends RenderNode {
|
|
|
1048
1042
|
}
|
|
1049
1043
|
|
|
1050
1044
|
for (let i = 0, len = temp2.length; i < len; i++) {
|
|
1051
|
-
temp2[i].renderTree(
|
|
1045
|
+
temp2[i].renderTree(cam, this.maxCurrZoom, null);
|
|
1052
1046
|
}
|
|
1053
1047
|
}
|
|
1054
1048
|
|
|
1055
|
-
this._quadTreeNorth.renderTree(
|
|
1056
|
-
this._quadTreeSouth.renderTree(
|
|
1049
|
+
this._quadTreeNorth.renderTree(cam, 0, null);
|
|
1050
|
+
this._quadTreeSouth.renderTree(cam, 0, null);
|
|
1057
1051
|
}
|
|
1058
1052
|
|
|
1059
1053
|
_globalPreDraw() {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
this.
|
|
1054
|
+
let cam = this.camera;
|
|
1055
|
+
|
|
1056
|
+
this._distBeforeMemClear += this._prevCamEye.distance(cam.eye);
|
|
1057
|
+
this._prevCamEye.copy(cam.eye);
|
|
1058
|
+
cam.checkFly();
|
|
1063
1059
|
|
|
1064
1060
|
// free memory
|
|
1065
1061
|
if (this._createdNodesCount > MAX_NODES && this._distBeforeMemClear > 1000.0) {
|
|
@@ -1110,7 +1106,7 @@ export class Planet extends RenderNode {
|
|
|
1110
1106
|
gl.disable(gl.POLYGON_OFFSET_FILL);
|
|
1111
1107
|
|
|
1112
1108
|
if (frustumIndex === cam.FARTHEST_FRUSTUM_INDEX) {
|
|
1113
|
-
if (this._skipPreRender && (!this._renderCompletedActivated || cam.
|
|
1109
|
+
if (this._skipPreRender/* && (!this._renderCompletedActivated || cam.isMoved)*/) {
|
|
1114
1110
|
this._collectRenderNodes();
|
|
1115
1111
|
}
|
|
1116
1112
|
this._skipPreRender = true;
|
|
@@ -1133,11 +1129,14 @@ export class Planet extends RenderNode {
|
|
|
1133
1129
|
this._vectorTileCreator.frame();
|
|
1134
1130
|
}
|
|
1135
1131
|
|
|
1136
|
-
|
|
1137
|
-
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
1138
|
-
gl.enable(gl.BLEND);
|
|
1132
|
+
|
|
1139
1133
|
gl.enable(gl.CULL_FACE);
|
|
1140
1134
|
|
|
1135
|
+
gl.enable(gl.BLEND);
|
|
1136
|
+
gl.blendEquation(gl.FUNC_ADD);
|
|
1137
|
+
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
|
1138
|
+
//gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ZERO);
|
|
1139
|
+
|
|
1141
1140
|
if (this.lightEnabled) {
|
|
1142
1141
|
h.programs.drawnode_screen_wl.activate();
|
|
1143
1142
|
sh = h.programs.drawnode_screen_wl._program;
|
|
@@ -1155,7 +1154,7 @@ export class Planet extends RenderNode {
|
|
|
1155
1154
|
gl.TEXTURE_2D,
|
|
1156
1155
|
(this.camera._lonLat.height > 329958.0 &&
|
|
1157
1156
|
(this._nightTexture || this.transparentTexture)) ||
|
|
1158
|
-
|
|
1157
|
+
this.transparentTexture
|
|
1159
1158
|
);
|
|
1160
1159
|
gl.uniform1i(shu.nightTexture, this.SLICE_SIZE);
|
|
1161
1160
|
|
|
@@ -1457,8 +1456,8 @@ export class Planet extends RenderNode {
|
|
|
1457
1456
|
* Returns ray vector hit ellipsoid coordinates.
|
|
1458
1457
|
* If the ray doesn't hit ellipsoit returns null.
|
|
1459
1458
|
* @public
|
|
1460
|
-
* @param {
|
|
1461
|
-
* @returns {
|
|
1459
|
+
* @param {Ray} ray - Ray 3d.
|
|
1460
|
+
* @returns {Vec3} -
|
|
1462
1461
|
*/
|
|
1463
1462
|
getRayIntersectionEllipsoid(ray) {
|
|
1464
1463
|
return this.ellipsoid.hitRay(ray.origin, ray.direction);
|
|
@@ -1467,8 +1466,8 @@ export class Planet extends RenderNode {
|
|
|
1467
1466
|
/**
|
|
1468
1467
|
* Returns 2d screen coordanates projection point to the planet ellipsoid 3d coordinates.
|
|
1469
1468
|
* @public
|
|
1470
|
-
* @param {
|
|
1471
|
-
* @returns {
|
|
1469
|
+
* @param {math.Pixel} px - 2D sreen coordinates.
|
|
1470
|
+
* @returns {Vec3} -
|
|
1472
1471
|
*/
|
|
1473
1472
|
getCartesianFromPixelEllipsoid(px) {
|
|
1474
1473
|
var cam = this.renderer.activeCamera;
|
|
@@ -1478,7 +1477,7 @@ export class Planet extends RenderNode {
|
|
|
1478
1477
|
/**
|
|
1479
1478
|
* Returns 2d screen coordanates projection point to the planet ellipsoid geographical coordinates.
|
|
1480
1479
|
* @public
|
|
1481
|
-
* @param {
|
|
1480
|
+
* @param {math.Pixel} px - 2D screen coordinates.
|
|
1482
1481
|
* @returns {LonLat} -
|
|
1483
1482
|
*/
|
|
1484
1483
|
getLonLatFromPixelEllipsoid(px) {
|
|
@@ -1494,7 +1493,7 @@ export class Planet extends RenderNode {
|
|
|
1494
1493
|
* position or null if mouse cursor is outside the planet.
|
|
1495
1494
|
* @public
|
|
1496
1495
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
1497
|
-
* @returns {
|
|
1496
|
+
* @returns {Vec3} -
|
|
1498
1497
|
*/
|
|
1499
1498
|
getCartesianFromMouseTerrain(force) {
|
|
1500
1499
|
var ms = this.renderer.events.mouseState;
|
|
@@ -1509,9 +1508,9 @@ export class Planet extends RenderNode {
|
|
|
1509
1508
|
* Returns 3d cartesian coordinates on the relief planet by 2d screen coordinates.
|
|
1510
1509
|
* position or null if input coordinates is outside the planet.
|
|
1511
1510
|
* @public
|
|
1512
|
-
* @param {
|
|
1511
|
+
* @param {Vec2} px - Pixel screen 2d coordinates.
|
|
1513
1512
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
1514
|
-
* @returns {
|
|
1513
|
+
* @returns {Vec3} -
|
|
1515
1514
|
*/
|
|
1516
1515
|
getCartesianFromPixelTerrain(px, force) {
|
|
1517
1516
|
var distance = this.getDistanceFromPixel(px, force);
|
|
@@ -1526,7 +1525,7 @@ export class Planet extends RenderNode {
|
|
|
1526
1525
|
* Returns geographical coordinates on the relief planet by 2d screen coordinates.
|
|
1527
1526
|
* position or null if input coordinates is outside the planet.
|
|
1528
1527
|
* @public
|
|
1529
|
-
* @param {
|
|
1528
|
+
* @param {Vec2} px - Pixel screen 2d coordinates.
|
|
1530
1529
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
1531
1530
|
* @returns {LonLat} -
|
|
1532
1531
|
*/
|
|
@@ -1541,8 +1540,8 @@ export class Planet extends RenderNode {
|
|
|
1541
1540
|
/**
|
|
1542
1541
|
* Returns projected 2d screen coordinates by 3d cartesian coordiantes.
|
|
1543
1542
|
* @public
|
|
1544
|
-
* @param {
|
|
1545
|
-
* @returns {
|
|
1543
|
+
* @param {Vec3} coords - Cartesian coordinates.
|
|
1544
|
+
* @returns {Vec2} -
|
|
1546
1545
|
*/
|
|
1547
1546
|
getPixelFromCartesian(coords) {
|
|
1548
1547
|
return this.renderer.activeCamera.project(coords);
|
|
@@ -1552,7 +1551,7 @@ export class Planet extends RenderNode {
|
|
|
1552
1551
|
* Returns projected 2d screen coordinates by geographical coordinates.
|
|
1553
1552
|
* @public
|
|
1554
1553
|
* @param {LonLat} lonlat - Geographical coordinates.
|
|
1555
|
-
* @returns {
|
|
1554
|
+
* @returns {Vec2} -
|
|
1556
1555
|
*/
|
|
1557
1556
|
getPixelFromLonLat(lonlat) {
|
|
1558
1557
|
var coords = this.ellipsoid.lonLatToCartesian(lonlat);
|
|
@@ -1566,7 +1565,7 @@ export class Planet extends RenderNode {
|
|
|
1566
1565
|
* Returns distance from active camera to the the planet ellipsoid
|
|
1567
1566
|
* coordiantes unprojected by 2d screen coordiantes, or null if screen coordinates outside the planet.
|
|
1568
1567
|
* @public
|
|
1569
|
-
* @param {
|
|
1568
|
+
* @param {Vec2} px - Screen coordinates.
|
|
1570
1569
|
* @returns {number} -
|
|
1571
1570
|
*/
|
|
1572
1571
|
getDistanceFromPixelEllipsoid(px) {
|
|
@@ -1580,7 +1579,7 @@ export class Planet extends RenderNode {
|
|
|
1580
1579
|
* If screen coordinates inside the planet but relief is not exists in the
|
|
1581
1580
|
* point than function returns distance to the planet ellipsoid.
|
|
1582
1581
|
* @public
|
|
1583
|
-
* @param {
|
|
1582
|
+
* @param {Vec2} px - Screen coordinates.
|
|
1584
1583
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
1585
1584
|
* @returns {number} -
|
|
1586
1585
|
*/
|
|
@@ -1624,7 +1623,7 @@ export class Planet extends RenderNode {
|
|
|
1624
1623
|
/**
|
|
1625
1624
|
* Sets camera to the planet geographical extent.
|
|
1626
1625
|
* @public
|
|
1627
|
-
* @param {
|
|
1626
|
+
* @param {Extent} extent - Geographical extent.
|
|
1628
1627
|
*/
|
|
1629
1628
|
viewExtent(extent) {
|
|
1630
1629
|
this.renderer.activeCamera.viewExtent(extent);
|
|
@@ -1648,7 +1647,7 @@ export class Planet extends RenderNode {
|
|
|
1648
1647
|
/**
|
|
1649
1648
|
* Gets current viewing geographical extent.
|
|
1650
1649
|
* @public
|
|
1651
|
-
* @returns {
|
|
1650
|
+
* @returns {Extent} -
|
|
1652
1651
|
*/
|
|
1653
1652
|
getViewExtent() {
|
|
1654
1653
|
return this._viewExtent;
|
|
@@ -1680,7 +1679,7 @@ export class Planet extends RenderNode {
|
|
|
1680
1679
|
* Sets camera to the planet geographical position.
|
|
1681
1680
|
* @public
|
|
1682
1681
|
* @param {LonLat} lonlat - New geographical position.
|
|
1683
|
-
* @param {
|
|
1682
|
+
* @param {Vec3} [up] - Camera UP vector.
|
|
1684
1683
|
*/
|
|
1685
1684
|
viewLonLat(lonlat, up) {
|
|
1686
1685
|
this.renderer.activeCamera.setLonLat(lonlat, up);
|
|
@@ -1689,9 +1688,9 @@ export class Planet extends RenderNode {
|
|
|
1689
1688
|
/**
|
|
1690
1689
|
* Fly camera to the planet geographical extent.
|
|
1691
1690
|
* @public
|
|
1692
|
-
* @param {
|
|
1691
|
+
* @param {Extent} extent - Geographical extent.
|
|
1693
1692
|
* @param {Number} [height] - Height on the end of the flight route.
|
|
1694
|
-
* @param {
|
|
1693
|
+
* @param {Vec3} [up] - Camera UP vector on the end of a flying.
|
|
1695
1694
|
* @param {Number} [ampl] - Altitude amplitude factor.
|
|
1696
1695
|
* @param {cameraCallback} [startCallback] - Callback that calls after flying when flying is finished.
|
|
1697
1696
|
* @param {cameraCallback} [completeCallback] - Callback that calls befor the flying begins.
|
|
@@ -1710,9 +1709,9 @@ export class Planet extends RenderNode {
|
|
|
1710
1709
|
/**
|
|
1711
1710
|
* Fly camera to the new point.
|
|
1712
1711
|
* @public
|
|
1713
|
-
* @param {
|
|
1714
|
-
* @param {
|
|
1715
|
-
* @param {
|
|
1712
|
+
* @param {Vec3} cartesian - Fly coordiantes.
|
|
1713
|
+
* @param {Vec3} [look] - Camera "look at" point.
|
|
1714
|
+
* @param {Vec3} [up] - Camera UP vector on the end of a flying.
|
|
1716
1715
|
* @param {Number} [ampl] - Altitude amplitude factor.
|
|
1717
1716
|
* @param [completeCallback]
|
|
1718
1717
|
* @param [startCallback]
|
|
@@ -1734,8 +1733,8 @@ export class Planet extends RenderNode {
|
|
|
1734
1733
|
* Fly camera to the new geographical position.
|
|
1735
1734
|
* @public
|
|
1736
1735
|
* @param {LonLat} lonlat - Fly geographical coordiantes.
|
|
1737
|
-
* @param {
|
|
1738
|
-
* @param {
|
|
1736
|
+
* @param {Vec3} [look] - Camera "look at" point on the end of a flying.
|
|
1737
|
+
* @param {Vec3} [up] - Camera UP vector on the end of a flying.
|
|
1739
1738
|
* @param {Number} [ampl] - Altitude amplitude factor.
|
|
1740
1739
|
* @param [completeCallback]
|
|
1741
1740
|
* @param [startCallback]
|