@openglobus/og 0.13.4 → 0.13.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/css/og.css +66 -25
- package/dist/@openglobus/og.css +1 -1
- package/dist/@openglobus/og.esm.js +2 -2
- package/dist/@openglobus/og.esm.js.map +1 -1
- package/dist/@openglobus/og.umd.js +2 -2
- package/dist/@openglobus/og.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/og/Events.js +188 -188
- package/src/og/Extent.js +1 -9
- package/src/og/Globe.js +1 -0
- package/src/og/control/DebugInfo.js +15 -4
- package/src/og/control/EarthCoordinates.js +151 -160
- package/src/og/control/KeyboardNavigation.js +48 -2
- package/src/og/control/TouchNavigation.js +13 -13
- package/src/og/control/ZoomControl.js +1 -1
- package/src/og/ellipsoid/Ellipsoid.js +1 -1
- package/src/og/entity/Billboard.js +165 -165
- package/src/og/entity/BillboardHandler.js +1 -1
- package/src/og/entity/Geometry.js +319 -319
- package/src/og/entity/Label.js +348 -346
- package/src/og/entity/LabelHandler.js +44 -37
- package/src/og/input/input.js +7 -1
- package/src/og/layer/CanvasTiles.js +8 -8
- package/src/og/layer/KML.js +181 -12
- package/src/og/layer/Layer.js +4 -2
- package/src/og/layer/XYZ.js +4 -2
- package/src/og/quadTree/Node.js +1 -0
- package/src/og/renderer/RendererEvents.js +17 -3
- package/src/og/scene/Planet.js +89 -30
- package/src/og/segment/Segment.js +1 -0
- package/src/og/shaders/label.js +56 -13
- package/src/og/terrain/EmptyTerrain.js +164 -146
- package/src/og/terrain/Geoid.js +246 -241
- package/src/og/terrain/GlobusTerrain.js +23 -24
- package/src/og/terrain/MapboxTerrain.js +292 -294
- package/src/og/utils/FontAtlas.js +25 -15
- package/src/og/utils/Loader.js +53 -12
- package/src/og/utils/PlainSegmentWorker.js +38 -26
- package/src/og/utils/TextureAtlas.js +291 -280
- package/src/og/utils/units.js +78 -0
- package/types/control/EarthCoordinates.d.ts +27 -30
- package/types/control/KeyboardNavigation.d.ts +3 -0
- package/types/entity/Label.d.ts +1 -0
- package/types/entity/LabelHandler.d.ts +1 -1
- package/types/input/input.d.ts +6 -0
- package/types/layer/KML.d.ts +26 -1
- package/types/renderer/RendererEvents.d.ts +2 -0
- package/types/scene/Planet.d.ts +10 -1
- package/types/terrain/EmptyTerrain.d.ts +4 -1
- package/types/terrain/Geoid.d.ts +1 -10
- package/types/terrain/GlobusTerrain.d.ts +0 -2
- package/types/terrain/MapboxTerrain.d.ts +1 -1
- package/types/utils/Loader.d.ts +3 -0
- package/types/utils/TextureAtlas.d.ts +2 -0
- package/types/utils/units.d.ts +20 -0
|
@@ -1,47 +1,44 @@
|
|
|
1
|
-
export function earthCoordinates(options: any): EarthCoordinates;
|
|
2
1
|
/**
|
|
3
2
|
* Control displays mouse or screen center Earth coordinates.
|
|
4
3
|
* @class
|
|
5
|
-
* @extends {Control}
|
|
4
|
+
* @extends {og.control.Control}
|
|
6
5
|
* @param {Object} [options] - Options:
|
|
7
6
|
* @param {Boolean} [options.center] - Earth coordiantes by screen center otherwise mouse pointer. False is default.
|
|
8
7
|
* @param {Boolean} [options.type] - Coordinates shown: 0 - is decimal degrees, 1 - degrees, 2 - mercator geodetic coordinates.
|
|
9
8
|
*/
|
|
10
|
-
export class EarthCoordinates
|
|
9
|
+
export class EarthCoordinates {
|
|
10
|
+
constructor(options: any);
|
|
11
11
|
/**
|
|
12
12
|
* Display type.
|
|
13
13
|
* @private
|
|
14
14
|
* @type {Boolean}
|
|
15
15
|
*/
|
|
16
|
-
private
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* @private
|
|
20
|
-
* @function
|
|
21
|
-
*/
|
|
22
|
-
private _converter;
|
|
23
|
-
/**
|
|
24
|
-
* Display dom element.
|
|
25
|
-
* @private
|
|
26
|
-
* @type {Object}
|
|
27
|
-
*/
|
|
28
|
-
private _display;
|
|
29
|
-
_center: any;
|
|
30
|
-
_centerDiv: HTMLDivElement;
|
|
16
|
+
private _type;
|
|
17
|
+
_TYPE_FUNC: ((ll: any) => void)[];
|
|
18
|
+
_showFn: any;
|
|
31
19
|
/**
|
|
32
20
|
* Current position.
|
|
33
21
|
* @public
|
|
34
|
-
* @type {Vec3}
|
|
35
|
-
*/
|
|
36
|
-
public position: Vec3;
|
|
37
|
-
/**
|
|
38
|
-
* Sets coordinates capturing type.
|
|
39
|
-
* @public
|
|
40
|
-
* @param {Boolean} center - True - capture screen center, false - mouse pointer.
|
|
22
|
+
* @type {og.Vec3}
|
|
41
23
|
*/
|
|
42
|
-
public
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
24
|
+
public _lonLat: og.Vec3;
|
|
25
|
+
_latSideEl: Element;
|
|
26
|
+
_lonSideEl: Element;
|
|
27
|
+
_latValEl: Element;
|
|
28
|
+
_lonValEl: Element;
|
|
29
|
+
_heightEl: Element;
|
|
30
|
+
_altUnitVal: any;
|
|
31
|
+
_heightModeVal: any;
|
|
32
|
+
_altUnit: any;
|
|
33
|
+
_heightMode: any;
|
|
34
|
+
_centerMode: any;
|
|
35
|
+
_SHOW_DECIMAL(ll: any): void;
|
|
36
|
+
_SHOW_DEGREE(ll: any): void;
|
|
37
|
+
_createCenterEl(): HTMLDivElement;
|
|
38
|
+
_updateUnits(): void;
|
|
39
|
+
_refreshCoordinates(): void;
|
|
40
|
+
oninit(): void;
|
|
41
|
+
_el: HTMLDivElement;
|
|
42
|
+
_grabCoordinates(px: any): void;
|
|
43
|
+
_showHeight(): Promise<void>;
|
|
46
44
|
}
|
|
47
|
-
import { Control } from "./Control.js";
|
|
@@ -13,8 +13,11 @@ export class KeyboardNavigation extends Control {
|
|
|
13
13
|
onCameraStrifeRight(event: any): void;
|
|
14
14
|
onCameraLookUp(event: any): void;
|
|
15
15
|
onCameraLookDown(event: any): void;
|
|
16
|
+
onCameraLookLeft(event: any): void;
|
|
17
|
+
onCameraLookRight(event: any): void;
|
|
16
18
|
onCameraTurnLeft(event: any): void;
|
|
17
19
|
onCameraTurnRight(event: any): void;
|
|
20
|
+
onCameraRollNorth(event: any): void;
|
|
18
21
|
onCameraRollLeft(event: any): void;
|
|
19
22
|
onCameraRollRight(event: any): void;
|
|
20
23
|
}
|
package/types/entity/Label.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export class LabelHandler extends BillboardHandler {
|
|
|
17
17
|
_addLabelToArrays(label: any): void;
|
|
18
18
|
assignFontAtlas(label: any): void;
|
|
19
19
|
workerCallback(data: any, label: any): void;
|
|
20
|
-
setText(index: any, text: any, fontIndex: any, align: any): void;
|
|
20
|
+
setText(index: any, text: any, fontIndex: any, align: any, isRTL?: boolean): void;
|
|
21
21
|
setOutlineColorArr(index: any, rgba: any): void;
|
|
22
22
|
setOutlineArr(index: any, outline: any): void;
|
|
23
23
|
setFontIndexArr(index: any, fontIndex: any): void;
|
package/types/input/input.d.ts
CHANGED
|
@@ -3,11 +3,14 @@ export namespace input {
|
|
|
3
3
|
const KEY_ALT: number;
|
|
4
4
|
const KEY_SHIFT: number;
|
|
5
5
|
const KEY_SPACE: number;
|
|
6
|
+
const KEY_PGUP: number;
|
|
7
|
+
const KEY_PGDN: number;
|
|
6
8
|
const KEY_LEFT: number;
|
|
7
9
|
const KEY_UP: number;
|
|
8
10
|
const KEY_RIGHT: number;
|
|
9
11
|
const KEY_DOWN: number;
|
|
10
12
|
const KEY_PRINTSCREEN: number;
|
|
13
|
+
const KEY_EQUALS: number;
|
|
11
14
|
const KEY_A: number;
|
|
12
15
|
const KEY_C: number;
|
|
13
16
|
const KEY_D: number;
|
|
@@ -17,6 +20,7 @@ export namespace input {
|
|
|
17
20
|
const KEY_I: number;
|
|
18
21
|
const KEY_K: number;
|
|
19
22
|
const KEY_L: number;
|
|
23
|
+
const KEY_N: number;
|
|
20
24
|
const KEY_O: number;
|
|
21
25
|
const KEY_P: number;
|
|
22
26
|
const KEY_Q: number;
|
|
@@ -26,7 +30,9 @@ export namespace input {
|
|
|
26
30
|
const KEY_W: number;
|
|
27
31
|
const KEY_X: number;
|
|
28
32
|
const KEY_Z: number;
|
|
33
|
+
const KEY_PLUS: number;
|
|
29
34
|
const KEY_F1: number;
|
|
35
|
+
const KEY_MINUS: number;
|
|
30
36
|
const KEY_APOSTROPHE: number;
|
|
31
37
|
const MB_LEFT: number;
|
|
32
38
|
const MB_RIGHT: number;
|
package/types/layer/KML.d.ts
CHANGED
|
@@ -13,6 +13,31 @@ export class KML extends Vector {
|
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
15
|
public _extractCoordonatesFromKml(xmlDoc: any): any[];
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
private _AGBRtoRGBA;
|
|
20
|
+
/**
|
|
21
|
+
* @private
|
|
22
|
+
returns array of longitude, latitude, altitude (altitude optional)
|
|
23
|
+
*/
|
|
24
|
+
private _parseKMLcoordinates;
|
|
25
|
+
/**
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
private _kmlPlacemarkToEntity;
|
|
29
|
+
_extractStyle(placemark: any): {
|
|
30
|
+
iconHeading: number;
|
|
31
|
+
iconURL: any;
|
|
32
|
+
iconColor: string;
|
|
33
|
+
lineWidth: number;
|
|
34
|
+
lineColor: string;
|
|
35
|
+
};
|
|
36
|
+
_parseKML(xml: any, extent: any, entities?: any): any;
|
|
37
|
+
_convertKMLintoEntities(xml: any): {
|
|
38
|
+
entities: any;
|
|
39
|
+
extent: Extent;
|
|
40
|
+
};
|
|
16
41
|
/**
|
|
17
42
|
* Creates billboards or polylines from array of lonlat.
|
|
18
43
|
* @public
|
|
@@ -63,6 +88,6 @@ export class KML extends Vector {
|
|
|
63
88
|
}>;
|
|
64
89
|
}
|
|
65
90
|
import { Vector } from "./Vector.js";
|
|
91
|
+
import { Extent } from "../Extent.js";
|
|
66
92
|
import { Entity } from "../entity/Entity.js";
|
|
67
93
|
import { Billboard } from "../entity/Billboard.js";
|
|
68
|
-
import { Extent } from "../Extent.js";
|
|
@@ -134,6 +134,8 @@ export class RendererEvents extends Events {
|
|
|
134
134
|
prev_x: number;
|
|
135
135
|
/** Previous touch Y coordinate. */
|
|
136
136
|
prev_y: number;
|
|
137
|
+
/** Screen touch position world direction. */
|
|
138
|
+
direction: Vec3;
|
|
137
139
|
/** JavaScript touching system event message. */
|
|
138
140
|
sys: any;
|
|
139
141
|
/** Current touched(picking) object. */
|
package/types/scene/Planet.d.ts
CHANGED
|
@@ -259,6 +259,9 @@ export class Planet extends RenderNode {
|
|
|
259
259
|
_initialized: boolean;
|
|
260
260
|
always: any[];
|
|
261
261
|
_renderCompleted: boolean;
|
|
262
|
+
_renderCompletedActivated: boolean;
|
|
263
|
+
_terrainCompleted: boolean;
|
|
264
|
+
_terrainCompletedActivated: boolean;
|
|
262
265
|
/**
|
|
263
266
|
* Add the given control to the renderer of the planet scene.
|
|
264
267
|
* @param {control.Control} control - Control.
|
|
@@ -266,7 +269,6 @@ export class Planet extends RenderNode {
|
|
|
266
269
|
addControl(control: control.Control): void;
|
|
267
270
|
get lodSize(): number;
|
|
268
271
|
setLodSize(currentLodSize: any, minLodSize: any, maxLodSize: any): void;
|
|
269
|
-
_renderCompletedActivated: boolean;
|
|
270
272
|
/**
|
|
271
273
|
* Add the given controls array to the renderer of the planet.
|
|
272
274
|
* @param {Array.<control.Control>} cArr - Control array.
|
|
@@ -369,6 +371,11 @@ export class Planet extends RenderNode {
|
|
|
369
371
|
* @public
|
|
370
372
|
*/
|
|
371
373
|
public updateVisibleLayers(): void;
|
|
374
|
+
/**
|
|
375
|
+
* Apply to render list of layer attributions
|
|
376
|
+
* @private
|
|
377
|
+
*/
|
|
378
|
+
private _applyAttribution;
|
|
372
379
|
/**
|
|
373
380
|
* Sort visible layer - preparing for rendering.
|
|
374
381
|
* @protected
|
|
@@ -561,6 +568,8 @@ export class Planet extends RenderNode {
|
|
|
561
568
|
*/
|
|
562
569
|
public stopFlying(): void;
|
|
563
570
|
getEntityTerrainPoint(entity: any, res: any): any;
|
|
571
|
+
getHeightDefault(lonLat: any): Promise<any>;
|
|
572
|
+
getHeightAboveELL(lonLat: any): Promise<any>;
|
|
564
573
|
}
|
|
565
574
|
import { RenderNode } from "./RenderNode.js";
|
|
566
575
|
import { PlanetCamera } from "../camera/PlanetCamera.js";
|
|
@@ -45,11 +45,13 @@ export class EmptyTerrain {
|
|
|
45
45
|
*/
|
|
46
46
|
protected _planet: Planet;
|
|
47
47
|
_geoid: any;
|
|
48
|
+
_isReady: boolean;
|
|
48
49
|
isBlur(): boolean;
|
|
49
50
|
set maxNodeZoom(arg: number);
|
|
50
51
|
get maxNodeZoom(): number;
|
|
51
52
|
set geoid(arg: any);
|
|
52
53
|
get geoid(): any;
|
|
54
|
+
getGeoid(): any;
|
|
53
55
|
/**
|
|
54
56
|
* Loads or creates segment elevation data.
|
|
55
57
|
* @public
|
|
@@ -57,7 +59,7 @@ export class EmptyTerrain {
|
|
|
57
59
|
* @param {Segment} segment - Segment to create elevation data.
|
|
58
60
|
*/
|
|
59
61
|
public handleSegmentTerrain(segment: Segment): void;
|
|
60
|
-
isReady():
|
|
62
|
+
isReady(): boolean;
|
|
61
63
|
/**
|
|
62
64
|
* Abstract function
|
|
63
65
|
* @public
|
|
@@ -70,4 +72,5 @@ export class EmptyTerrain {
|
|
|
70
72
|
* @abstract
|
|
71
73
|
*/
|
|
72
74
|
public clearCache(): void;
|
|
75
|
+
getHeightAsync(lonLat: any, callback: any): boolean;
|
|
73
76
|
}
|
package/types/terrain/Geoid.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
export class Geoid {
|
|
2
|
-
static loadModel(url: any): Promise<
|
|
3
|
-
scale: number;
|
|
4
|
-
offset: number;
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
rlonres: number;
|
|
8
|
-
rlatres: number;
|
|
9
|
-
i: number;
|
|
10
|
-
rawfile: Uint8Array;
|
|
11
|
-
}>;
|
|
2
|
+
static loadModel(url: any): Promise<any>;
|
|
12
3
|
constructor(options?: {});
|
|
13
4
|
model: any;
|
|
14
5
|
src: any;
|
|
@@ -48,8 +48,6 @@ export class GlobusTerrain extends EmptyTerrain {
|
|
|
48
48
|
* @returns {string} - Url query string.
|
|
49
49
|
*/
|
|
50
50
|
private _urlRewriteCallback;
|
|
51
|
-
getGeoid(): any;
|
|
52
|
-
getHeightAsync(lonLat: any, callback: any, zoom: any): boolean;
|
|
53
51
|
getTileCache(lonLat: any, z: any): any;
|
|
54
52
|
_getGroundHeightMerc(merc: any, tileData: any): number;
|
|
55
53
|
/**
|
package/types/utils/Loader.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export class Loader {
|
|
|
4
4
|
events: Events;
|
|
5
5
|
_loading: number;
|
|
6
6
|
_queue: any[];
|
|
7
|
+
_senderRequestCounter: any[];
|
|
7
8
|
_promises: {
|
|
8
9
|
json: (r: any) => any;
|
|
9
10
|
blob: (r: any) => any;
|
|
@@ -19,6 +20,8 @@ export class Loader {
|
|
|
19
20
|
status: string;
|
|
20
21
|
msg: any;
|
|
21
22
|
}>;
|
|
23
|
+
_checkLoadend(request: any, sender: any): void;
|
|
24
|
+
_handleResponse(q: any, response: any): void;
|
|
22
25
|
_exec(): Promise<void>;
|
|
23
26
|
abort(): void;
|
|
24
27
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function convert(from: any, to: any, val: any): any;
|
|
2
|
+
export function convertExt(isNotNaN: any, unitFrom: any, unitTo: any, val: any, fixed: any): any;
|
|
3
|
+
export function toString(u: any): string;
|
|
4
|
+
export const ELL: 0;
|
|
5
|
+
export const MSL: 1;
|
|
6
|
+
export const GND: 2;
|
|
7
|
+
export namespace heightMode {
|
|
8
|
+
export { ELL as ell };
|
|
9
|
+
export { MSL as msl };
|
|
10
|
+
export { GND as gnd };
|
|
11
|
+
}
|
|
12
|
+
export const m: 0;
|
|
13
|
+
export const km: 1;
|
|
14
|
+
export const ft: 2;
|
|
15
|
+
export const s: 3;
|
|
16
|
+
export const h: 4;
|
|
17
|
+
export const ms: 5;
|
|
18
|
+
export const kmh: 6;
|
|
19
|
+
export const fts: 7;
|
|
20
|
+
export const _tenth: number[];
|