@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,17 @@
|
|
|
1
|
+
export function compassButton(options: any): CompassButton;
|
|
2
|
+
/**
|
|
3
|
+
* Planet compass button
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @params {Object} [options] - Control options.
|
|
7
|
+
*/
|
|
8
|
+
export class CompassButton {
|
|
9
|
+
constructor(options: any);
|
|
10
|
+
planet: any;
|
|
11
|
+
_heading: any;
|
|
12
|
+
_svg: any;
|
|
13
|
+
oninit(): void;
|
|
14
|
+
_onClick(): void;
|
|
15
|
+
_draw(e: any): void;
|
|
16
|
+
setHeading(heading: any): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base control class for implementing renderer controls.
|
|
3
|
+
* All other controls extend from this class.
|
|
4
|
+
* @class
|
|
5
|
+
* @param {Object} [options] - Control activation options:
|
|
6
|
+
* @param {Boolean} [options.autoActivated=true] - If true - calls initialize function after the renderer assigning.
|
|
7
|
+
*/
|
|
8
|
+
export class Control {
|
|
9
|
+
static set __staticCounter(arg: any);
|
|
10
|
+
static get __staticCounter(): any;
|
|
11
|
+
constructor(options: any);
|
|
12
|
+
_id: number;
|
|
13
|
+
_name: any;
|
|
14
|
+
/**
|
|
15
|
+
* Control initialized.
|
|
16
|
+
* @protected
|
|
17
|
+
* @type {Boolean}
|
|
18
|
+
*/
|
|
19
|
+
protected _initialized: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Assigned renderer.
|
|
22
|
+
* @public
|
|
23
|
+
* @type {og.Renderer}
|
|
24
|
+
*/
|
|
25
|
+
public renderer: any;
|
|
26
|
+
/**
|
|
27
|
+
* Auto activation flag.
|
|
28
|
+
* @public
|
|
29
|
+
* @type {Boolean}
|
|
30
|
+
*/
|
|
31
|
+
public autoActivate: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Control activity.
|
|
34
|
+
* @protected
|
|
35
|
+
* @type {Boolean}
|
|
36
|
+
*/
|
|
37
|
+
protected _active: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Returns control name.
|
|
40
|
+
* @public
|
|
41
|
+
* @virtual
|
|
42
|
+
*/
|
|
43
|
+
public get name(): any;
|
|
44
|
+
/**
|
|
45
|
+
* Control initialization function have to be overriden.
|
|
46
|
+
* @public
|
|
47
|
+
* @virtual
|
|
48
|
+
*/
|
|
49
|
+
public oninit(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Control renderer assigning function have to be overriden.
|
|
52
|
+
* @public
|
|
53
|
+
* @virtual
|
|
54
|
+
*/
|
|
55
|
+
public onadd(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Control remove function have to be overriden.
|
|
58
|
+
* @public
|
|
59
|
+
* @virtual
|
|
60
|
+
*/
|
|
61
|
+
public onremove(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Control activation function have to be overriden.
|
|
64
|
+
* @public
|
|
65
|
+
* @virtual
|
|
66
|
+
*/
|
|
67
|
+
public onactivate(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Control deactivation function have to be overriden.
|
|
70
|
+
* @public
|
|
71
|
+
* @virtual
|
|
72
|
+
*/
|
|
73
|
+
public ondeactivate(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Assign renderer to the control.
|
|
76
|
+
* @public
|
|
77
|
+
* @type {og.Renderer}
|
|
78
|
+
*/
|
|
79
|
+
public addTo(renderer: any): void;
|
|
80
|
+
/**
|
|
81
|
+
* Assign renderer to the control.
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
public remove(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Activate control.
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
public activate(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Deactivate control.
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
public deactivate(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Is control active.
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
public isActive(): boolean;
|
|
100
|
+
isEqual(control: any): boolean;
|
|
101
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function debugInfo(options: any): DebugInfo;
|
|
2
|
+
/**
|
|
3
|
+
* Debug information
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @param {Object} [options] - Control options.
|
|
7
|
+
*/
|
|
8
|
+
export class DebugInfo {
|
|
9
|
+
constructor(options: any);
|
|
10
|
+
el: HTMLDivElement;
|
|
11
|
+
_watch: any;
|
|
12
|
+
addWatches(watches: any): void;
|
|
13
|
+
addWatch(watch: any): void;
|
|
14
|
+
oninit(): void;
|
|
15
|
+
_frame(): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export function earthCoordinates(options: any): EarthCoordinates;
|
|
2
|
+
/**
|
|
3
|
+
* Control displays mouse or screen center Earth coordinates.
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @param {Object} [options] - Options:
|
|
7
|
+
* @param {Boolean} [options.center] - Earth coordiantes by screen center otherwise mouse pointer. False is default.
|
|
8
|
+
* @param {Boolean} [options.type] - Coordinates shown: 0 - is decimal degrees, 1 - degrees, 2 - mercator geodetic coordinates.
|
|
9
|
+
*/
|
|
10
|
+
export class EarthCoordinates {
|
|
11
|
+
constructor(options: any);
|
|
12
|
+
/**
|
|
13
|
+
* Display type.
|
|
14
|
+
* @private
|
|
15
|
+
* @type {Boolean}
|
|
16
|
+
*/
|
|
17
|
+
private _displayType;
|
|
18
|
+
/**
|
|
19
|
+
* Current coordinates type converter.
|
|
20
|
+
* @private
|
|
21
|
+
* @function
|
|
22
|
+
*/
|
|
23
|
+
private _converter;
|
|
24
|
+
/**
|
|
25
|
+
* Display dom element.
|
|
26
|
+
* @private
|
|
27
|
+
* @type {Object}
|
|
28
|
+
*/
|
|
29
|
+
private _display;
|
|
30
|
+
_center: any;
|
|
31
|
+
/**
|
|
32
|
+
* Current position.
|
|
33
|
+
* @public
|
|
34
|
+
* @type {og.Vec3}
|
|
35
|
+
*/
|
|
36
|
+
public position: any;
|
|
37
|
+
oninit(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Sets coordinates capturing type.
|
|
40
|
+
* @public
|
|
41
|
+
* @param {Boolean} center - True - capture screen center, false - mouse pointer.
|
|
42
|
+
*/
|
|
43
|
+
public setCenter(center: boolean): void;
|
|
44
|
+
_showPosition(): void;
|
|
45
|
+
_grabCoordinates(): void;
|
|
46
|
+
_onMouseMove(): void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function keyboardNavigation(options: any): KeyboardNavigation;
|
|
2
|
+
/**
|
|
3
|
+
* Planet camera keyboard navigation. Use W,S,A,D and left shift key for fly around a planet.
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @param {Object} [options] - Control options.
|
|
7
|
+
*/
|
|
8
|
+
export class KeyboardNavigation {
|
|
9
|
+
constructor(options: any);
|
|
10
|
+
step: any;
|
|
11
|
+
oninit(): void;
|
|
12
|
+
onCameraMoveForward(event: any): void;
|
|
13
|
+
onCameraMoveBackward(event: any): void;
|
|
14
|
+
onCameraStrifeLeft(event: any): void;
|
|
15
|
+
onCameraStrifeRight(event: any): void;
|
|
16
|
+
onCameraLookUp(event: any): void;
|
|
17
|
+
onCameraLookDown(event: any): void;
|
|
18
|
+
onCameraTurnLeft(event: any): void;
|
|
19
|
+
onCameraTurnRight(event: any): void;
|
|
20
|
+
onCameraRollLeft(event: any): void;
|
|
21
|
+
onCameraRollRight(event: any): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple(OpenLayers like)layer switcher, includes base layers, overlays, geo images etc. groups.
|
|
3
|
+
* @class
|
|
4
|
+
* @extends {og.control.Control}
|
|
5
|
+
* @param {Object} [options] - Control options.
|
|
6
|
+
*/
|
|
7
|
+
export class LayerSwitcher {
|
|
8
|
+
static set numSwitches(arg: any);
|
|
9
|
+
static get numSwitches(): any;
|
|
10
|
+
constructor(options: any);
|
|
11
|
+
dialog: HTMLDivElement;
|
|
12
|
+
baseLayersDiv: HTMLDivElement;
|
|
13
|
+
overlaysDiv: HTMLDivElement;
|
|
14
|
+
_id: number;
|
|
15
|
+
oninit(): void;
|
|
16
|
+
onLayerAdded(layer: any): void;
|
|
17
|
+
onLayerRemoved(layer: any): void;
|
|
18
|
+
addSwitcher(type: any, obj: any, container: any, id: any): void;
|
|
19
|
+
createBaseLayersContainer(): void;
|
|
20
|
+
createOverlaysContainer(): void;
|
|
21
|
+
createDialog(): void;
|
|
22
|
+
createSwitcher(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function lighting(options: any): Lighting;
|
|
2
|
+
/**
|
|
3
|
+
* Helps to setup lighting.
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @param {Object} [options] -
|
|
7
|
+
*/
|
|
8
|
+
export class Lighting {
|
|
9
|
+
constructor(options?: {});
|
|
10
|
+
_selectedLayer: any;
|
|
11
|
+
bindLayer(layer: any): void;
|
|
12
|
+
oninit(): void;
|
|
13
|
+
_fetchLayers(): void;
|
|
14
|
+
_onLayerAdd(e: any): void;
|
|
15
|
+
_onLayerRemove(e: any): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function scaleControl(options: any): ScaleControl;
|
|
2
|
+
/**
|
|
3
|
+
* Planet zoom buttons control.
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @params {Object} [options] - Control options.
|
|
7
|
+
*/
|
|
8
|
+
export class ScaleControl {
|
|
9
|
+
constructor(options?: {});
|
|
10
|
+
_template: string;
|
|
11
|
+
planet: any;
|
|
12
|
+
_minWidth: number;
|
|
13
|
+
_maxWidth: number;
|
|
14
|
+
_renderTemplate(): ChildNode;
|
|
15
|
+
oninit(): void;
|
|
16
|
+
el: ChildNode;
|
|
17
|
+
_scaleLabelEl: any;
|
|
18
|
+
_draw(e: any): void;
|
|
19
|
+
_mPx: number;
|
|
20
|
+
currWidth: number;
|
|
21
|
+
_metersInMinSize: number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function showFps(options: any): ShowFps;
|
|
2
|
+
/**
|
|
3
|
+
* Frame per second(FPS) display control.
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @param {Object} [options] - Control options.
|
|
7
|
+
*/
|
|
8
|
+
export class ShowFps {
|
|
9
|
+
constructor(options: any);
|
|
10
|
+
oninit(): void;
|
|
11
|
+
_draw(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates simple navigation control instance.
|
|
3
|
+
*/
|
|
4
|
+
export function simpleNavigation(options: any): SimpleNavigation;
|
|
5
|
+
/**
|
|
6
|
+
* Simple keyboard camera navigation with W,S,A,D and shift keys to fly around the scene.
|
|
7
|
+
* @class
|
|
8
|
+
* @extends {og.control.Control}
|
|
9
|
+
* @param {Object} [options] - Control options.
|
|
10
|
+
*/
|
|
11
|
+
export class SimpleNavigation {
|
|
12
|
+
constructor(options: any);
|
|
13
|
+
camera: any;
|
|
14
|
+
speed: any;
|
|
15
|
+
onactivate(): void;
|
|
16
|
+
ondeactivate(): void;
|
|
17
|
+
oninit(): void;
|
|
18
|
+
onCameraMoveForward(): void;
|
|
19
|
+
onCameraMoveBackward(): void;
|
|
20
|
+
onCameraStrifeLeft(): void;
|
|
21
|
+
onCameraStrifeRight(): void;
|
|
22
|
+
onCameraLookUp(): void;
|
|
23
|
+
onCameraLookDown(): void;
|
|
24
|
+
onCameraTurnLeft(): void;
|
|
25
|
+
onCameraTurnRight(): void;
|
|
26
|
+
onCameraRollLeft(): void;
|
|
27
|
+
onCameraRollRight(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export function sun(options: any): any;
|
|
2
|
+
/**
|
|
3
|
+
* Real Sun geocentric position control that place the Sun on the right place by the Earth.
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @param {Object} [options] - Control options.
|
|
7
|
+
*/
|
|
8
|
+
export class Sun {
|
|
9
|
+
constructor(options: any);
|
|
10
|
+
_name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Earth planet node.
|
|
13
|
+
* @public
|
|
14
|
+
* @type {og.scene.Planet}
|
|
15
|
+
*/
|
|
16
|
+
public planet: any;
|
|
17
|
+
/**
|
|
18
|
+
* Sunlight position placed in the camera eye.
|
|
19
|
+
* @private
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
*/
|
|
22
|
+
private offsetVertical;
|
|
23
|
+
offsetHorizontal: any;
|
|
24
|
+
/**
|
|
25
|
+
* Light source.
|
|
26
|
+
* @public
|
|
27
|
+
* @type {og.LightSource}
|
|
28
|
+
*/
|
|
29
|
+
public sunlight: any;
|
|
30
|
+
/**
|
|
31
|
+
* Current frame handler clock date and time.
|
|
32
|
+
* @private
|
|
33
|
+
* @type {Number}
|
|
34
|
+
*/
|
|
35
|
+
private _currDate;
|
|
36
|
+
/**
|
|
37
|
+
* Previous frame handler clock date and time.
|
|
38
|
+
* @private
|
|
39
|
+
* @type {Number}
|
|
40
|
+
*/
|
|
41
|
+
private _prevDate;
|
|
42
|
+
_clockPtr: any;
|
|
43
|
+
_lightOn: boolean;
|
|
44
|
+
_stopped: any;
|
|
45
|
+
oninit(): void;
|
|
46
|
+
stop(): void;
|
|
47
|
+
onactivate(): void;
|
|
48
|
+
bindClock(clock: any): void;
|
|
49
|
+
_draw(): void;
|
|
50
|
+
_f: number;
|
|
51
|
+
_k: number;
|
|
52
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planet GL draw mode(TRIANGLE_STRIP/LINE_STRING) changer.
|
|
3
|
+
* @class
|
|
4
|
+
* @extends {og.control.Control}
|
|
5
|
+
* @param {Object} [options] - Control options.
|
|
6
|
+
*/
|
|
7
|
+
export class ToggleWireframe {
|
|
8
|
+
constructor(options?: {});
|
|
9
|
+
_isActive: any;
|
|
10
|
+
oninit(): void;
|
|
11
|
+
toogleWireframe(e: any): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export function zoomControl(options: any): ZoomControl;
|
|
2
|
+
/**
|
|
3
|
+
* Planet zoom buttons control.
|
|
4
|
+
* @class
|
|
5
|
+
* @extends {og.control.Control}
|
|
6
|
+
* @params {Object} [options] - Control options.
|
|
7
|
+
*/
|
|
8
|
+
export class ZoomControl {
|
|
9
|
+
constructor(options: any);
|
|
10
|
+
_keyLock: Key;
|
|
11
|
+
planet: any;
|
|
12
|
+
_move: number;
|
|
13
|
+
oninit(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Planet zoom in.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
public zoomIn(): void;
|
|
19
|
+
_targetPoint: any;
|
|
20
|
+
/**
|
|
21
|
+
* Planet zoom out.
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
public zoomOut(): void;
|
|
25
|
+
stopZoom(): void;
|
|
26
|
+
_draw(e: any): void;
|
|
27
|
+
}
|
|
28
|
+
import { Key } from "../Lock.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Control } from "./Control.js";
|
|
2
|
+
import { DebugInfo } from "./DebugInfo";
|
|
3
|
+
import { EarthCoordinates } from "./EarthCoordinates.js";
|
|
4
|
+
import { GeoImageDragControl } from "./GeoImageDragControl.js";
|
|
5
|
+
import { KeyboardNavigation } from "./KeyboardNavigation.js";
|
|
6
|
+
import { LayerSwitcher } from "./LayerSwitcher.js";
|
|
7
|
+
import { MouseNavigation } from "./MouseNavigation.js";
|
|
8
|
+
import { ToggleWireframe } from "./ToggleWireframe.js";
|
|
9
|
+
import { TouchNavigation } from "./TouchNavigation.js";
|
|
10
|
+
import { SimpleNavigation } from "./SimpleNavigation.js";
|
|
11
|
+
import { ShowFps } from "./ShowFps.js";
|
|
12
|
+
import { Sun } from "./Sun.js";
|
|
13
|
+
import { ZoomControl } from "./ZoomControl.js";
|
|
14
|
+
import { Lighting } from "./Lighting.js";
|
|
15
|
+
export { Control, DebugInfo, EarthCoordinates, GeoImageDragControl, KeyboardNavigation, LayerSwitcher, MouseNavigation, ToggleWireframe, TouchNavigation, SimpleNavigation, ShowFps, Sun, ZoomControl, Lighting };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class represents a plant ellipsoid.
|
|
3
|
+
* @class
|
|
4
|
+
* @param {number} equatorialSize - Equatorial ellipsoid size.
|
|
5
|
+
* @param {number} polarSize - Polar ellipsoid size.
|
|
6
|
+
*/
|
|
7
|
+
export class Ellipsoid {
|
|
8
|
+
static getRelativeBearing(a: any, b: any): number;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the midpoint between two points on the great circle.
|
|
11
|
+
* @param {og.LonLat} lonLat1 - Longitude/latitude of first point.
|
|
12
|
+
* @param {og.LonLat} lonLat2 - Longitude/latitude of second point.
|
|
13
|
+
* @return {og.LonLat} Midpoint between points.
|
|
14
|
+
*/
|
|
15
|
+
static getMiddlePointOnGreatCircle(lonLat1: any, lonLat2: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* Returns the point at given fraction between two points on the great circle.
|
|
18
|
+
* @param {og.LonLat} lonLat1 - Longitude/Latitude of source point.
|
|
19
|
+
* @param {og.LonLat} lonLat2 - Longitude/Latitude of destination point.
|
|
20
|
+
* @param {number} fraction - Fraction between the two points (0 = source point, 1 = destination point).
|
|
21
|
+
* @returns {og.LonLat} Intermediate point between points.
|
|
22
|
+
*/
|
|
23
|
+
static getIntermediatePointOnGreatCircle(lonLat1: any, lonLat2: any, fraction: number): any;
|
|
24
|
+
static getRhumbBearing(lonLat1: any, lonLat2: any): number;
|
|
25
|
+
static getBearing(lonLat1: any, lonLat2: any): number;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the (initial) bearing from source to destination point on the great circle.
|
|
28
|
+
* @param {og.LonLat} lonLat1 - Longitude/latitude of source point.
|
|
29
|
+
* @param {og.LonLat} lonLat2 - Longitude/latitude of destination point.
|
|
30
|
+
* @return {number} Initial bearing in degrees from north.
|
|
31
|
+
*/
|
|
32
|
+
static getInitialBearing(lonLat1: any, lonLat2: any): number;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the point of intersection of two paths defined by point and bearing.
|
|
35
|
+
* @param {og.LonLat} p1 - First point.
|
|
36
|
+
* @param {number} brng1 - Initial bearing from first point.
|
|
37
|
+
* @param {og.LonLat} p2 - Second point.
|
|
38
|
+
* @param {number} brng2 - Initial bearing from second point.
|
|
39
|
+
* @return {og.LonLat|null} Destination point (null if no unique intersection defined).
|
|
40
|
+
*/
|
|
41
|
+
static intersection(p1: any, brng1: number, p2: any, brng2: number): any | null;
|
|
42
|
+
/**
|
|
43
|
+
* Returns final bearing arriving at destination destination point from lonLat1 point; the final bearing
|
|
44
|
+
* will differ from the initial bearing by varying degrees according to distance and latitude.
|
|
45
|
+
* @param {og.LonLat} lonLat1 - Longitude/latitude of source point.
|
|
46
|
+
* @param {og.LonLat} lonLat2 - Longitude/latitude of destination point.
|
|
47
|
+
* @return {number} Final bearing in degrees from north.
|
|
48
|
+
*/
|
|
49
|
+
static getFinalBearing(lonLat1: any, lonLat2: any): number;
|
|
50
|
+
constructor(equatorialSize: any, polarSize: any);
|
|
51
|
+
_a: any;
|
|
52
|
+
_b: any;
|
|
53
|
+
_flattening: number;
|
|
54
|
+
_f: number;
|
|
55
|
+
_a2: number;
|
|
56
|
+
_b2: number;
|
|
57
|
+
_e: number;
|
|
58
|
+
_e2: number;
|
|
59
|
+
_e22: number;
|
|
60
|
+
_k: number;
|
|
61
|
+
_k2: number;
|
|
62
|
+
_radii: Vec3;
|
|
63
|
+
_radii2: Vec3;
|
|
64
|
+
_invRadii: Vec3;
|
|
65
|
+
_invRadii2: Vec3;
|
|
66
|
+
/**
|
|
67
|
+
* Gets ellipsoid equatorial size.
|
|
68
|
+
* @public
|
|
69
|
+
* @returns {number} -
|
|
70
|
+
*/
|
|
71
|
+
public getEquatorialSize(): number;
|
|
72
|
+
/**
|
|
73
|
+
* Gets ellipsoid polar size.
|
|
74
|
+
* @public
|
|
75
|
+
* @returns {number} -
|
|
76
|
+
*/
|
|
77
|
+
public getPolarSize(): number;
|
|
78
|
+
/**
|
|
79
|
+
* Gets cartesian ECEF from Wgs84 geodetic coordiantes.
|
|
80
|
+
* @public
|
|
81
|
+
* @param {og.LonLat} lonlat - Degrees geodetic coordiantes.
|
|
82
|
+
* @returns {og.Vec3} -
|
|
83
|
+
*/
|
|
84
|
+
public lonLatToCartesian(lonlat: any): any;
|
|
85
|
+
/**
|
|
86
|
+
* Gets cartesian ECEF from Wgs84 geodetic coordiantes.
|
|
87
|
+
* @public
|
|
88
|
+
* @param {og.LonLat} lonlat - Degrees geodetic coordiantes.
|
|
89
|
+
* @param {og.Vec3} res - Output result.
|
|
90
|
+
* @returns {og.Vec3} -
|
|
91
|
+
*/
|
|
92
|
+
public lonLatToCartesianRes(lonlat: any, res: any): any;
|
|
93
|
+
/**
|
|
94
|
+
* Gets cartesian ECEF from Wgs84 geodetic coordiantes.
|
|
95
|
+
* @public
|
|
96
|
+
* @param {Number} lon - Longitude.
|
|
97
|
+
* @param {Number} lat - Latitude.
|
|
98
|
+
* @param {Number} height - Height.
|
|
99
|
+
* @returns {og.Vec3} -
|
|
100
|
+
*/
|
|
101
|
+
public geodeticToCartesian(lon: number, lat: number, height?: number): any;
|
|
102
|
+
/**
|
|
103
|
+
* Gets Wgs84 geodetic coordiantes from cartesian ECEF.
|
|
104
|
+
* @public
|
|
105
|
+
* @param {og.Vec3} cartesian - Cartesian coordinates.
|
|
106
|
+
* @returns {og.LonLat} -
|
|
107
|
+
*/
|
|
108
|
+
public cartesianToLonLat(cartesian: any): any;
|
|
109
|
+
/**
|
|
110
|
+
* Gets ellipsoid surface normal.
|
|
111
|
+
* @public
|
|
112
|
+
* @param {og.Vec3} coord - Spatial coordiantes.
|
|
113
|
+
* @returns {og.Vec3} -
|
|
114
|
+
*/
|
|
115
|
+
public getSurfaceNormal3v(coord: any): any;
|
|
116
|
+
getBearingDestination(lonLat1: any, bearing: any, distance: any): LonLat;
|
|
117
|
+
/**
|
|
118
|
+
* Returns the distance from one point to another(using haversine formula) on the great circle.
|
|
119
|
+
* @param {og.LonLat} lonLat1 - Longitude/latitude of source point.
|
|
120
|
+
* @param {og.LonLat} lonLat2 - Longitude/latitude of destination point.
|
|
121
|
+
* @return {number} Distance between points.
|
|
122
|
+
*/
|
|
123
|
+
getGreatCircleDistance(lonLat1: any, lonLat2: any): number;
|
|
124
|
+
/**
|
|
125
|
+
* Calculates the destination point given start point lat / lon, bearing(deg) and distance (m).
|
|
126
|
+
*
|
|
127
|
+
* Taken from http://movable-type.co.uk/scripts/latlong-vincenty-direct.html and optimized / cleaned up by Mathias Bynens <http://mathiasbynens.be/>
|
|
128
|
+
* Based on the Vincenty direct formula by T. Vincenty, “Direct and Inverse Solutions of Geodesics on the Ellipsoid with application of nested equations”, Survey Review, vol XXII no 176, 1975 <http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf>
|
|
129
|
+
*/
|
|
130
|
+
getGreatCircleDestination(lonLat: any, brng: any, dist: any): LonLat;
|
|
131
|
+
/**
|
|
132
|
+
* Returns ray vector hit ellipsoid coordinates.
|
|
133
|
+
* If the ray doesn't hit ellipsoid returns null.
|
|
134
|
+
* @public
|
|
135
|
+
* @param {og.Vec3} origin - Ray origin point.
|
|
136
|
+
* @param {og.Vec3} direction - Ray direction.
|
|
137
|
+
* @returns {og.Vec3} -
|
|
138
|
+
*/
|
|
139
|
+
public hitRay(origin: any, direction: any): any;
|
|
140
|
+
}
|
|
141
|
+
import { Vec3 } from "../math/Vec3.js";
|
|
142
|
+
import { LonLat } from "../LonLat.js";
|