@openglobus/og 0.15.5 → 0.16.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/README.md +1 -1
- package/css/og.css +1 -1
- 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 +13 -15
- package/src/og/Globe.js +5 -2
- package/src/og/LonLat.js +18 -1
- package/src/og/Object3d.js +21 -2
- package/src/og/bv/index.js +2 -2
- package/src/og/camera/PlanetCamera.js +4 -10
- package/src/og/control/LayerSwitcher.js +4 -3
- package/src/og/control/RulerSwitcher.js +2 -2
- package/src/og/control/ZoomControl.js +2 -2
- package/src/og/control/heightRuler/HeightRulerScene.js +6 -2
- package/src/og/control/index.js +5 -2
- package/src/og/control/ruler/RulerScene.js +11 -8
- package/src/og/control/timeline/TimelineControl.js +5 -3
- package/src/og/control/timeline/TimelineModel.js +4 -0
- package/src/og/control/timeline/TimelineView.js +10 -3
- package/src/og/control/visibleExtent/Segment.js +36 -42
- package/src/og/ellipsoid/Ellipsoid.js +23 -10
- package/src/og/entity/Entity.js +3 -3
- package/src/og/entity/EntityCollection.js +2 -2
- package/src/og/entity/Label.js +1 -1
- package/src/og/entity/Polyline.js +4 -2
- package/src/og/index.js +4 -7
- package/src/og/layer/CanvasTiles.js +70 -23
- package/src/og/layer/GeoImage.js +40 -18
- package/src/og/layer/Vector.js +14 -11
- package/src/og/layer/WMS.js +2 -2
- package/src/og/math.js +2 -1
- package/src/og/quadTree/EPSG4326QuadTreeStrategy.js +26 -0
- package/src/og/quadTree/Node.js +44 -50
- package/src/og/quadTree/index.js +2 -0
- package/src/og/renderer/Renderer.js +13 -1
- package/src/og/scene/Planet.js +4 -4
- package/src/og/scene/index.js +3 -3
- package/src/og/segment/Segment.js +88 -76
- package/src/og/shaders/drawnode.js +138 -89
- package/src/og/shaders/geoObject.js +57 -46
- package/src/og/shaders/ray.js +15 -21
- package/src/og/terrain/EmptyTerrain.js +19 -7
- package/src/og/terrain/GlobusTerrain.js +23 -18
- package/src/og/terrain/MapboxTerrain.js +7 -8
- package/src/og/terrain/index.js +4 -4
- package/src/og/utils/objParser.js +227 -0
- package/src/og/utils/shared.js +9 -0
- package/src/og/webgl/Handler.js +1 -3
- package/types/Globe.d.ts +2 -0
- package/types/LonLat.d.ts +12 -1
- package/types/Object3d.d.ts +2 -0
- package/types/Popup.d.ts +1 -1
- package/types/bv/index.d.ts +2 -2
- package/types/camera/PlanetCamera.d.ts +0 -7
- package/types/camera/index.d.ts +2 -2
- package/types/control/GeoImageDragControl.d.ts +1 -1
- package/types/control/LayerAnimation.d.ts +1 -1
- package/types/control/Lighting.d.ts +2 -2
- package/types/control/heightRuler/HeightRulerScene.d.ts +1 -1
- package/types/control/index.d.ts +3 -2
- package/types/control/ruler/RulerScene.d.ts +5 -4
- package/types/control/selection/SelectionScene.d.ts +3 -3
- package/types/control/timeline/TimelineControl.d.ts +10 -0
- package/types/control/timeline/TimelineModel.d.ts +33 -0
- package/types/control/timeline/TimelineView.d.ts +57 -0
- package/types/control/timeline/timelineUtils.d.ts +9 -0
- package/types/ellipsoid/Ellipsoid.d.ts +16 -9
- package/types/ellipsoid/index.d.ts +2 -2
- package/types/entity/Entity.d.ts +3 -3
- package/types/entity/EntityCollection.d.ts +2 -2
- package/types/entity/Label.d.ts +1 -1
- package/types/entity/Polyline.d.ts +1 -0
- package/types/index.d.ts +45 -46
- package/types/layer/CanvasTiles.d.ts +2 -1
- package/types/layer/GeoImage.d.ts +7 -1
- package/types/layer/GeoTexture2d.d.ts +1 -1
- package/types/layer/Vector.d.ts +3 -3
- package/types/layer/index.d.ts +9 -9
- package/types/math/Line2.d.ts +1 -1
- package/types/math/Line3.d.ts +1 -1
- package/types/math/index.d.ts +10 -10
- package/types/mercator.d.ts +1 -1
- package/types/quadTree/EPSG4326QuadTreeStrategy.d.ts +3 -0
- package/types/quadTree/EntityCollectionNode.d.ts +1 -1
- package/types/quadTree/index.d.ts +2 -0
- package/types/renderer/Renderer.d.ts +2 -2
- package/types/scene/Axes.d.ts +1 -1
- package/types/scene/SkyBox.d.ts +1 -1
- package/types/scene/index.d.ts +3 -3
- package/types/segment/Segment.d.ts +9 -11
- package/types/shaders/atmos.d.ts +1 -1
- package/types/shaders/billboard.d.ts +1 -1
- package/types/shaders/depth.d.ts +1 -1
- package/types/shaders/label.d.ts +1 -1
- package/types/shaders/pickingMask.d.ts +1 -1
- package/types/shaders/pointCloud.d.ts +1 -1
- package/types/shaders/polyline.d.ts +1 -1
- package/types/shaders/ray.d.ts +1 -1
- package/types/shaders/screenFrame.d.ts +1 -1
- package/types/shaders/skybox.d.ts +1 -1
- package/types/shaders/toneMapping.d.ts +1 -1
- package/types/terrain/BilTerrain.d.ts +1 -0
- package/types/terrain/EmptyTerrain.d.ts +13 -2
- package/types/terrain/GlobusTerrain.d.ts +2 -1
- package/types/terrain/MapboxTerrain.d.ts +1 -3
- package/types/terrain/index.d.ts +4 -4
- package/types/ui/Button.d.ts +1 -1
- package/types/ui/ButtonGroup.d.ts +12 -0
- package/types/ui/Dialog.d.ts +2 -2
- package/types/ui/Slider.d.ts +1 -1
- package/types/ui/ToggleButton.d.ts +1 -1
- package/types/ui/View.d.ts +1 -1
- package/types/utils/GeoImageCreator.d.ts +2 -2
- package/types/utils/ImagesCacheManager.d.ts +1 -1
- package/types/utils/Loader.d.ts +1 -1
- package/types/utils/VectorTileCreator.d.ts +1 -1
- package/types/utils/objParser.d.ts +8 -0
- package/types/utils/shared.d.ts +6 -0
- package/types/webgl/Handler.d.ts +2 -2
- package/src/og/index.core.js +0 -116
- package/src/og/index.webgl.js +0 -17
- package/types/index.core.d.ts +0 -65
- package/types/index.webgl.d.ts +0 -7
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export class TimelineModel {
|
|
2
|
+
constructor(options?: {});
|
|
3
|
+
_events: Events;
|
|
4
|
+
_current: any;
|
|
5
|
+
_rangeStart: any;
|
|
6
|
+
_rangeEnd: any;
|
|
7
|
+
_range: number;
|
|
8
|
+
_minDate: any;
|
|
9
|
+
_maxDate: any;
|
|
10
|
+
multiplier: any;
|
|
11
|
+
_requestAnimationFrameId: number;
|
|
12
|
+
_prevNow: number;
|
|
13
|
+
dt: number;
|
|
14
|
+
on(eventName: any, callback: any, sender: any): void;
|
|
15
|
+
off(eventName: any, callback: any): void;
|
|
16
|
+
play(): void;
|
|
17
|
+
stop(): void;
|
|
18
|
+
stopped(): boolean;
|
|
19
|
+
_animationFrameCallback(): void;
|
|
20
|
+
_frame(): void;
|
|
21
|
+
set current(arg: any);
|
|
22
|
+
get current(): any;
|
|
23
|
+
get range(): number;
|
|
24
|
+
set(rangeStart: any, rangeEnd: any): void;
|
|
25
|
+
set rangeStart(arg: any);
|
|
26
|
+
get rangeStart(): any;
|
|
27
|
+
set rangeEnd(arg: any);
|
|
28
|
+
get rangeEnd(): any;
|
|
29
|
+
get rangeStartTime(): any;
|
|
30
|
+
get rangeEndTime(): any;
|
|
31
|
+
get currentTime(): any;
|
|
32
|
+
}
|
|
33
|
+
import { Events } from '../../Events.js';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export class TimelineView extends View {
|
|
2
|
+
fillStyle: any;
|
|
3
|
+
_frameEl: any;
|
|
4
|
+
_currentEl: any;
|
|
5
|
+
_canvasEl: HTMLCanvasElement;
|
|
6
|
+
_ctx: CanvasRenderingContext2D;
|
|
7
|
+
_isMouseOver: boolean;
|
|
8
|
+
_isDragging: boolean;
|
|
9
|
+
_isCurrentDragging: boolean;
|
|
10
|
+
_isCurrentMouseOver: boolean;
|
|
11
|
+
_minWidth: number;
|
|
12
|
+
_canvasScale: number;
|
|
13
|
+
_millisecondsInPixel: number;
|
|
14
|
+
_clickPosX: number;
|
|
15
|
+
_clickRangeStart: Date;
|
|
16
|
+
_clickRangeEnd: Date;
|
|
17
|
+
_clickCurrentDate: Date;
|
|
18
|
+
_clickTime: number;
|
|
19
|
+
_clickDelay: number;
|
|
20
|
+
_onResizeObserver_: any;
|
|
21
|
+
_resizeObserver: ResizeObserver;
|
|
22
|
+
_pauseBtn: ToggleButton;
|
|
23
|
+
_playBtn: ToggleButton;
|
|
24
|
+
_buttons: ButtonGroup;
|
|
25
|
+
_visibility: any;
|
|
26
|
+
_onResizeObserver(): void;
|
|
27
|
+
set canvasScale(arg: number);
|
|
28
|
+
get canvasScale(): number;
|
|
29
|
+
resize(): void;
|
|
30
|
+
render(): TimelineView;
|
|
31
|
+
$controls: any;
|
|
32
|
+
setVisibility(visibility: any): void;
|
|
33
|
+
reset(): void;
|
|
34
|
+
play(): void;
|
|
35
|
+
pause(): void;
|
|
36
|
+
playBack(): void;
|
|
37
|
+
_onMouseWheel(e: any): void;
|
|
38
|
+
_onMouseWheelFF(e: any): void;
|
|
39
|
+
_zoom(pointerTime: any, pointerCenterOffsetX: any, dir: any): void;
|
|
40
|
+
_onMouseDown(e: any): void;
|
|
41
|
+
_onMouseUp(e: any): void;
|
|
42
|
+
_onMouseEnter(): void;
|
|
43
|
+
_onMouseOut(): void;
|
|
44
|
+
_onCurrentMouseEnter(): void;
|
|
45
|
+
_onCurrentMouseOut(): void;
|
|
46
|
+
_onMouseMove(e: any): void;
|
|
47
|
+
get clientWidth(): number;
|
|
48
|
+
get clientHeight(): number;
|
|
49
|
+
_resize(): void;
|
|
50
|
+
getOffsetbyTime(milliseconds: any): number;
|
|
51
|
+
_clearCanvas(): void;
|
|
52
|
+
_drawCurrent(): void;
|
|
53
|
+
draw(): void;
|
|
54
|
+
}
|
|
55
|
+
import { View } from '../../ui/View.js';
|
|
56
|
+
import { ToggleButton } from "../../ui/ToggleButton.js";
|
|
57
|
+
import { ButtonGroup } from "../../ui/ButtonGroup.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export function addSeconds(date: any, seconds: any): Date;
|
|
2
|
+
export function dateToStr(date: any, showTime?: boolean, showMilliseconds?: boolean): string;
|
|
3
|
+
export function createCanvasHTML(): HTMLCanvasElement;
|
|
4
|
+
export function getNearestTimeLeft(t: any, div: any): number;
|
|
5
|
+
export function drawNotch(ctx: any, xOffset?: number, size?: number, thickness?: number, color?: string): void;
|
|
6
|
+
export function drawText(ctx: any, text: any, x: any, y: any, font: string, fillStyle: string, align: string, baseLine: string, rotDeg: any): void;
|
|
7
|
+
export function getScale(seconds: any): number[];
|
|
8
|
+
export const SCALES: number[][];
|
|
9
|
+
export const MONTHS: string[];
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
* @param {number} polarSize - Polar ellipsoid size.
|
|
6
6
|
*/
|
|
7
7
|
export class Ellipsoid {
|
|
8
|
+
/**
|
|
9
|
+
* Returns angle between to bearin angles
|
|
10
|
+
* @param {number} a - First bearing angle
|
|
11
|
+
* @param {number} b - Second bearing angle
|
|
12
|
+
* @returns {number}
|
|
13
|
+
*/
|
|
14
|
+
static getAngleBetweenTwoBearings(a: number, b: number): number;
|
|
8
15
|
static getRelativeBearing(a: any, b: any): number;
|
|
9
16
|
/**
|
|
10
17
|
* Returns the midpoint between two points on the great circle.
|
|
@@ -88,22 +95,22 @@ export class Ellipsoid {
|
|
|
88
95
|
*/
|
|
89
96
|
public getPolarSize(): number;
|
|
90
97
|
/**
|
|
91
|
-
* Gets cartesian ECEF from Wgs84 geodetic
|
|
98
|
+
* Gets cartesian ECEF from Wgs84 geodetic coordinates.
|
|
92
99
|
* @public
|
|
93
|
-
* @param {LonLat} lonlat - Degrees geodetic
|
|
100
|
+
* @param {LonLat} lonlat - Degrees geodetic coordinates.
|
|
94
101
|
* @returns {Vec3} -
|
|
95
102
|
*/
|
|
96
103
|
public lonLatToCartesian(lonlat: LonLat): Vec3;
|
|
97
104
|
/**
|
|
98
|
-
* Gets cartesian ECEF from Wgs84 geodetic
|
|
105
|
+
* Gets cartesian ECEF from Wgs84 geodetic coordinates.
|
|
99
106
|
* @public
|
|
100
|
-
* @param {LonLat} lonlat - Degrees geodetic
|
|
107
|
+
* @param {LonLat} lonlat - Degrees geodetic coordinates.
|
|
101
108
|
* @param {Vec3} res - Output result.
|
|
102
109
|
* @returns {Vec3} -
|
|
103
110
|
*/
|
|
104
111
|
public lonLatToCartesianRes(lonlat: LonLat, res: Vec3): Vec3;
|
|
105
112
|
/**
|
|
106
|
-
* Gets cartesian ECEF from Wgs84 geodetic
|
|
113
|
+
* Gets cartesian ECEF from Wgs84 geodetic coordinates.
|
|
107
114
|
* @public
|
|
108
115
|
* @param {Number} lon - Longitude.
|
|
109
116
|
* @param {Number} lat - Latitude.
|
|
@@ -112,7 +119,7 @@ export class Ellipsoid {
|
|
|
112
119
|
*/
|
|
113
120
|
public geodeticToCartesian(lon: number, lat: number, height?: number): Vec3;
|
|
114
121
|
/**
|
|
115
|
-
* Gets Wgs84 geodetic
|
|
122
|
+
* Gets Wgs84 geodetic coordinates from cartesian ECEF.
|
|
116
123
|
* @public
|
|
117
124
|
* @param {Vec3} p - Cartesian coordinates.
|
|
118
125
|
* @returns {LonLat} -
|
|
@@ -120,13 +127,13 @@ export class Ellipsoid {
|
|
|
120
127
|
public projToSurface(p: Vec3): LonLat;
|
|
121
128
|
/**
|
|
122
129
|
* Converts 3d cartesian coordinates to geodetic
|
|
123
|
-
* @param {Vec3} cart - Cartesian
|
|
130
|
+
* @param {Vec3} cart - Cartesian coordinates
|
|
124
131
|
* @returns {LonLat} - Geodetic coordinates
|
|
125
132
|
*/
|
|
126
133
|
cartesianToLonLat(cart: Vec3): LonLat;
|
|
127
134
|
/**
|
|
128
135
|
* Converts 3d cartesian coordinates to geodetic
|
|
129
|
-
* @param {Vec3} cart - Cartesian
|
|
136
|
+
* @param {Vec3} cart - Cartesian coordinates
|
|
130
137
|
* @param {LonLat} res - Link geodetic coordinates variable
|
|
131
138
|
* @returns {LonLat} - Geodetic coordinates
|
|
132
139
|
*/
|
|
@@ -134,7 +141,7 @@ export class Ellipsoid {
|
|
|
134
141
|
/**
|
|
135
142
|
* Gets ellipsoid surface normal.
|
|
136
143
|
* @public
|
|
137
|
-
* @param {Vec3} coord - Spatial
|
|
144
|
+
* @param {Vec3} coord - Spatial coordinates.
|
|
138
145
|
* @return {Vec3} -
|
|
139
146
|
*/
|
|
140
147
|
public getSurfaceNormal3v(coord: Vec3): Vec3;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Ellipsoid } from
|
|
2
|
-
import { wgs84 } from
|
|
1
|
+
import { Ellipsoid } from './Ellipsoid.js';
|
|
2
|
+
import { wgs84 } from './wgs84.js';
|
|
3
3
|
export { Ellipsoid, wgs84 };
|
package/types/entity/Entity.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @param {Object} [options] - Entity options:
|
|
7
7
|
* @param {string} [options.name] - A human readable name to display to users. It does not have to be unique.
|
|
8
8
|
* @param {Vec3|Array.<number>} [options.cartesian] - Spatial entities like billboard, label etc. cartesian position.
|
|
9
|
-
* @param {LonLat} [options.lonlat] - Geodetic
|
|
9
|
+
* @param {LonLat} [options.lonlat] - Geodetic coordinates for an entities like billboard, label etc.
|
|
10
10
|
* @param {boolean} [options.aground] - True for entities that have to be placed on the relief.
|
|
11
11
|
* @param {boolean} [options.visibility] - Entity visibility.
|
|
12
12
|
* @param {*} [options.billboard] - Billboard options(see {@link og.Billboard}).
|
|
@@ -52,7 +52,7 @@ export class Entity {
|
|
|
52
52
|
*/
|
|
53
53
|
protected _cartesian: Vec3;
|
|
54
54
|
/**
|
|
55
|
-
* Geodetic entity
|
|
55
|
+
* Geodetic entity coordinates.
|
|
56
56
|
* @protected
|
|
57
57
|
* @type {LonLat}
|
|
58
58
|
*/
|
|
@@ -245,7 +245,7 @@ export class Entity {
|
|
|
245
245
|
*/
|
|
246
246
|
public getAltitude(): number;
|
|
247
247
|
/**
|
|
248
|
-
* Returns
|
|
248
|
+
* Returns cartesian position.
|
|
249
249
|
* @public
|
|
250
250
|
* @returns {Vec3} -
|
|
251
251
|
*/
|
|
@@ -250,7 +250,7 @@ export class EntityCollection {
|
|
|
250
250
|
*/
|
|
251
251
|
bindRenderNode(renderNode: RenderNode): void;
|
|
252
252
|
/**
|
|
253
|
-
* Updates
|
|
253
|
+
* Updates coordinates all lonLat entities in collection after collecction attached to the planet node.
|
|
254
254
|
* @private
|
|
255
255
|
* @param {Ellipsoid} ellipsoid - Globe ellipsoid.
|
|
256
256
|
*/
|
|
@@ -283,7 +283,7 @@ export class EntityCollection {
|
|
|
283
283
|
*/
|
|
284
284
|
public each(callback: Function): void;
|
|
285
285
|
/**
|
|
286
|
-
* Removes all entities from
|
|
286
|
+
* Removes all entities from collection and clear handlers.
|
|
287
287
|
* @public
|
|
288
288
|
*/
|
|
289
289
|
public clear(): void;
|
package/types/entity/Label.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @extends {BaseBillboard}
|
|
5
5
|
* @param {Object} [options] - Label options:
|
|
6
6
|
* @param {Vec3|Array.<number>} [options.position] - Billboard spatial position.
|
|
7
|
-
* @param {number} [options.rotation] - Screen angle
|
|
7
|
+
* @param {number} [options.rotation] - Screen angle rotation.
|
|
8
8
|
* @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
|
|
9
9
|
* @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
|
|
10
10
|
* @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
|
package/types/index.d.ts
CHANGED
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import * as mercator from "./mercator.js";
|
|
8
|
-
import * as utils from "./utils/shared.js";
|
|
9
|
-
import { input } from "./input/input.js";
|
|
1
|
+
import * as bv from './bv/index.js';
|
|
2
|
+
import * as jd from './astro/jd.js';
|
|
3
|
+
import * as math from './math.js';
|
|
4
|
+
import * as mercator from './mercator.js';
|
|
5
|
+
import * as utils from './utils/shared.js';
|
|
6
|
+
import { input } from './input/input.js';
|
|
10
7
|
export const Layer: typeof layer.Layer;
|
|
11
8
|
export const XYZ: typeof layer.XYZ;
|
|
12
9
|
export const Vector: typeof layer.Vector;
|
|
13
|
-
|
|
14
|
-
import * as
|
|
10
|
+
export const CanvasTiles: typeof layer.CanvasTiles;
|
|
11
|
+
import * as layer from './layer/index.js';
|
|
12
|
+
import * as terrain from './terrain/index.js';
|
|
15
13
|
export const Control: typeof control.Control;
|
|
16
|
-
import * as control from
|
|
17
|
-
import * as webgl from
|
|
18
|
-
import { wgs84 } from
|
|
19
|
-
import { Camera } from
|
|
20
|
-
import { Ellipsoid } from
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
14
|
+
import * as control from './control/index.js';
|
|
15
|
+
import * as webgl from './webgl/index.js';
|
|
16
|
+
import { wgs84 } from './ellipsoid/index.js';
|
|
17
|
+
import { Camera } from './camera/index.js';
|
|
18
|
+
import { Ellipsoid } from './ellipsoid/index.js';
|
|
19
|
+
import { Planet } from './scene/Planet.js';
|
|
20
|
+
import { PlanetCamera } from './camera/index.js';
|
|
21
|
+
import { Globe } from './Globe.js';
|
|
22
|
+
import { LightSource } from './light/LightSource.js';
|
|
24
23
|
export const EntityCollection: typeof entity.EntityCollection;
|
|
25
24
|
export const Handler: typeof webgl.Handler;
|
|
26
|
-
import { Renderer } from
|
|
27
|
-
import { Clock } from
|
|
28
|
-
import { Events } from
|
|
29
|
-
import { Extent } from
|
|
30
|
-
import { LonLat } from
|
|
31
|
-
import * as scene from
|
|
32
|
-
import { RenderNode } from
|
|
33
|
-
import { Line2 } from
|
|
34
|
-
import { Line3 } from
|
|
35
|
-
import { Mat3 } from
|
|
36
|
-
import { Mat4 } from
|
|
37
|
-
import { Plane } from
|
|
38
|
-
import { Quat } from
|
|
39
|
-
import { Ray } from
|
|
40
|
-
import { Vec2 } from
|
|
41
|
-
import { Vec3 } from
|
|
42
|
-
import { Vec4 } from
|
|
43
|
-
import * as entity from
|
|
25
|
+
import { Renderer } from './renderer/Renderer.js';
|
|
26
|
+
import { Clock } from './Clock.js';
|
|
27
|
+
import { Events } from './Events.js';
|
|
28
|
+
import { Extent } from './Extent.js';
|
|
29
|
+
import { LonLat } from './LonLat.js';
|
|
30
|
+
import * as scene from './scene/index.js';
|
|
31
|
+
import { RenderNode } from './scene/RenderNode.js';
|
|
32
|
+
import { Line2 } from './math/index.js';
|
|
33
|
+
import { Line3 } from './math/index.js';
|
|
34
|
+
import { Mat3 } from './math/index.js';
|
|
35
|
+
import { Mat4 } from './math/index.js';
|
|
36
|
+
import { Plane } from './math/index.js';
|
|
37
|
+
import { Quat } from './math/index.js';
|
|
38
|
+
import { Ray } from './math/index.js';
|
|
39
|
+
import { Vec2 } from './math/index.js';
|
|
40
|
+
import { Vec3 } from './math/index.js';
|
|
41
|
+
import { Vec4 } from './math/index.js';
|
|
42
|
+
import * as entity from './entity/index.js';
|
|
44
43
|
export const Entity: typeof entity.Entity;
|
|
45
|
-
import { Geoid } from
|
|
46
|
-
import { Popup } from
|
|
47
|
-
import { QuadTreeStrategy } from
|
|
48
|
-
import { MarsQuadTreeStrategy } from
|
|
49
|
-
import { EarthQuadTreeStrategy } from
|
|
50
|
-
import { Wgs84QuadTreeStrategy } from
|
|
51
|
-
import { quadTreeStrategyType } from
|
|
52
|
-
import { Object3d } from
|
|
53
|
-
export { bv, jd, math, mercator, utils, input, layer, terrain, control, webgl, wgs84, Camera, Ellipsoid, PlanetCamera, Globe, LightSource, Renderer, Clock, Events, Extent, LonLat, scene, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, entity, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, quadTreeStrategyType, Object3d };
|
|
44
|
+
import { Geoid } from './terrain/Geoid.js';
|
|
45
|
+
import { Popup } from './Popup.js';
|
|
46
|
+
import { QuadTreeStrategy } from './quadTree/index.js';
|
|
47
|
+
import { MarsQuadTreeStrategy } from './quadTree/index.js';
|
|
48
|
+
import { EarthQuadTreeStrategy } from './quadTree/index.js';
|
|
49
|
+
import { Wgs84QuadTreeStrategy } from './quadTree/index.js';
|
|
50
|
+
import { quadTreeStrategyType } from './quadTree/index.js';
|
|
51
|
+
import { Object3d } from './Object3d.js';
|
|
52
|
+
export { bv, jd, math, mercator, utils, input, layer, terrain, control, webgl, wgs84, Camera, Ellipsoid, Planet, PlanetCamera, Globe, LightSource, Renderer, Clock, Events, Extent, LonLat, scene, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, entity, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, quadTreeStrategyType, Object3d };
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
export class CanvasTiles extends Layer {
|
|
19
19
|
animated: any;
|
|
20
20
|
minNativeZoom: any;
|
|
21
|
+
maxNativeZoom: any;
|
|
21
22
|
/**
|
|
22
23
|
* Current creating tiles couter.
|
|
23
24
|
* @protected
|
|
@@ -66,7 +67,7 @@ export class CanvasTiles extends Layer {
|
|
|
66
67
|
public abortMaterialLoading(material: Material): void;
|
|
67
68
|
_dequeueRequest(): void;
|
|
68
69
|
_whilePendings(): any;
|
|
69
|
-
applyMaterial(material: any):
|
|
70
|
+
applyMaterial(material: any): any;
|
|
70
71
|
clearMaterial(material: any): void;
|
|
71
72
|
}
|
|
72
73
|
import { Layer } from "./Layer.js";
|
|
@@ -23,6 +23,7 @@ export class GeoImage extends BaseGeoImage {
|
|
|
23
23
|
* @param {String} srs - Image url path.
|
|
24
24
|
*/
|
|
25
25
|
public setSrc(src: any): void;
|
|
26
|
+
_onLoad_: any;
|
|
26
27
|
/**
|
|
27
28
|
* Sets image object.
|
|
28
29
|
* @public
|
|
@@ -31,9 +32,14 @@ export class GeoImage extends BaseGeoImage {
|
|
|
31
32
|
public setImage(image: new (width?: number, height?: number) => HTMLImageElement): void;
|
|
32
33
|
/**
|
|
33
34
|
* @private
|
|
34
|
-
* @param {Image} img
|
|
35
|
+
* @param {Image} [img]
|
|
35
36
|
*/
|
|
36
37
|
private _onLoad;
|
|
38
|
+
/**
|
|
39
|
+
* @private
|
|
40
|
+
* @param {Image} [img]
|
|
41
|
+
*/
|
|
42
|
+
private _applyImage;
|
|
37
43
|
/**
|
|
38
44
|
* Loads planet segment material. In this case - GeoImage source image.
|
|
39
45
|
* @virtual
|
package/types/layer/Vector.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ export class Vector extends Layer {
|
|
|
110
110
|
* Adds entity to the layer.
|
|
111
111
|
* @public
|
|
112
112
|
* @param {Entity} entity - Entity.
|
|
113
|
-
* @param {boolean} [rightNow] - Entity insertion option. False is
|
|
113
|
+
* @param {boolean} [rightNow] - Entity insertion option. False is default.
|
|
114
114
|
* @returns {layer.Vector} - Returns this layer.
|
|
115
115
|
*/
|
|
116
116
|
public add(entity: Entity, rightNow?: boolean): layer.Vector;
|
|
@@ -119,7 +119,7 @@ export class Vector extends Layer {
|
|
|
119
119
|
* @public
|
|
120
120
|
* @param {Entity} entity - Entity.
|
|
121
121
|
* @param {Number} index - Index position.
|
|
122
|
-
* @param {boolean} [rightNow] - Entity insertion option. False is
|
|
122
|
+
* @param {boolean} [rightNow] - Entity insertion option. False is default.
|
|
123
123
|
* @returns {layer.Vector} - Returns this layer.
|
|
124
124
|
*/
|
|
125
125
|
public insert(entity: Entity, index: number, rightNow?: boolean): layer.Vector;
|
|
@@ -128,7 +128,7 @@ export class Vector extends Layer {
|
|
|
128
128
|
* Adds entity array to the layer.
|
|
129
129
|
* @public
|
|
130
130
|
* @param {Array.<Entity>} entities - Entities array.
|
|
131
|
-
* @param {boolean} [rightNow] - Entity insertion option. False is
|
|
131
|
+
* @param {boolean} [rightNow] - Entity insertion option. False is default.
|
|
132
132
|
* @returns {layer.Vector} - Returns this layer.
|
|
133
133
|
*/
|
|
134
134
|
public addEntities(entities: Array<Entity>, rightNow?: boolean): layer.Vector;
|
package/types/layer/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CanvasTiles } from
|
|
2
|
-
import { GeoImage } from
|
|
3
|
-
import { GeoTexture2d } from
|
|
4
|
-
import { GeoVideo } from
|
|
5
|
-
import { KML } from
|
|
6
|
-
import { Layer } from
|
|
7
|
-
import { Vector } from
|
|
8
|
-
import { WMS } from
|
|
9
|
-
import { XYZ } from
|
|
1
|
+
import { CanvasTiles } from './CanvasTiles.js';
|
|
2
|
+
import { GeoImage } from './GeoImage.js';
|
|
3
|
+
import { GeoTexture2d } from './GeoTexture2d.js';
|
|
4
|
+
import { GeoVideo } from './GeoVideo.js';
|
|
5
|
+
import { KML } from './KML.js';
|
|
6
|
+
import { Layer } from './Layer.js';
|
|
7
|
+
import { Vector } from './Vector.js';
|
|
8
|
+
import { WMS } from './WMS.js';
|
|
9
|
+
import { XYZ } from './XYZ.js';
|
|
10
10
|
export { CanvasTiles, GeoImage, GeoTexture2d, GeoVideo, KML, Layer, Vector, WMS, XYZ };
|
package/types/math/Line2.d.ts
CHANGED
package/types/math/Line3.d.ts
CHANGED
package/types/math/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Line2 } from
|
|
2
|
-
import { Line3 } from
|
|
3
|
-
import { Mat3 } from
|
|
4
|
-
import { Mat4 } from
|
|
5
|
-
import { Plane } from
|
|
6
|
-
import { Quat } from
|
|
7
|
-
import { Ray } from
|
|
8
|
-
import { Vec2 } from
|
|
9
|
-
import { Vec3 } from
|
|
10
|
-
import { Vec4 } from
|
|
1
|
+
import { Line2 } from './Line2.js';
|
|
2
|
+
import { Line3 } from './Line3.js';
|
|
3
|
+
import { Mat3 } from './Mat3.js';
|
|
4
|
+
import { Mat4 } from './Mat4.js';
|
|
5
|
+
import { Plane } from './Plane.js';
|
|
6
|
+
import { Quat } from './Quat.js';
|
|
7
|
+
import { Ray } from './Ray.js';
|
|
8
|
+
import { Vec2 } from './Vec2.js';
|
|
9
|
+
import { Vec3 } from './Vec3.js';
|
|
10
|
+
import { Vec4 } from './Vec4.js';
|
|
11
11
|
export { Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4 };
|
package/types/mercator.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export namespace quadTreeStrategyType {
|
|
2
|
+
export { EPSG4326QuadTreeStrategy as epsg4326 };
|
|
2
3
|
export { EarthQuadTreeStrategy as earth };
|
|
3
4
|
export { MarsQuadTreeStrategy as mars };
|
|
4
5
|
export { Wgs84QuadTreeStrategy as wgs84 };
|
|
@@ -7,4 +8,5 @@ import { QuadTreeStrategy } from "./QuadTreeStrategy.js";
|
|
|
7
8
|
import { Wgs84QuadTreeStrategy } from "./Wgs84QuadTreeStrategy.js";
|
|
8
9
|
import { MarsQuadTreeStrategy } from "./MarsQuadTreeStrategy.js";
|
|
9
10
|
import { EarthQuadTreeStrategy } from "./EarthQuadTreeStrategy.js";
|
|
11
|
+
import { EPSG4326QuadTreeStrategy } from "./EPSG4326QuadTreeStrategy.js";
|
|
10
12
|
export { QuadTreeStrategy, Wgs84QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy };
|
|
@@ -86,7 +86,7 @@ export class Renderer {
|
|
|
86
86
|
*/
|
|
87
87
|
_depthCallbacks: Array<Renderer>;
|
|
88
88
|
depthFramebuffer: Framebuffer;
|
|
89
|
-
_msaa:
|
|
89
|
+
_msaa: any;
|
|
90
90
|
_internalFormat: string;
|
|
91
91
|
_format: string;
|
|
92
92
|
_type: string;
|
|
@@ -232,7 +232,7 @@ export class Renderer {
|
|
|
232
232
|
*/
|
|
233
233
|
public addNodes(nodesArr: Array<scene.RenderNode>): void;
|
|
234
234
|
getMaxMSAA(internalFormat: any): any;
|
|
235
|
-
getMSAA():
|
|
235
|
+
getMSAA(): any;
|
|
236
236
|
/**
|
|
237
237
|
* TODO: replace with cahce frendly linked list by bilboardHandler, label handler etc.
|
|
238
238
|
*/
|
package/types/scene/Axes.d.ts
CHANGED
package/types/scene/SkyBox.d.ts
CHANGED
package/types/scene/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Planet } from "./Planet";
|
|
2
|
-
import { Axes } from "./Axes";
|
|
3
|
-
import { SkyBox } from "./SkyBox";
|
|
1
|
+
import { Planet } from "./Planet.js";
|
|
2
|
+
import { Axes } from "./Axes.js";
|
|
3
|
+
import { SkyBox } from "./SkyBox.js";
|
|
4
4
|
export { Planet, Axes, SkyBox };
|
|
@@ -103,11 +103,6 @@ export class Segment {
|
|
|
103
103
|
* @type {boolean}
|
|
104
104
|
*/
|
|
105
105
|
normalMapReady: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Parent normal map is made allready(optimization parameter).
|
|
108
|
-
* @type {boolean}
|
|
109
|
-
*/
|
|
110
|
-
parentNormalMapReady: boolean;
|
|
111
106
|
/**
|
|
112
107
|
* Terrain is allready applied flag.
|
|
113
108
|
* @type {boolean}
|
|
@@ -194,16 +189,18 @@ export class Segment {
|
|
|
194
189
|
* @param {Float32Array} elevations - Elevation data.
|
|
195
190
|
*/
|
|
196
191
|
elevationsExists(elevations: Float32Array): void;
|
|
192
|
+
/**
|
|
193
|
+
* Keep plain elevation segment for rendering
|
|
194
|
+
*
|
|
195
|
+
* 'this.tileZoom <= this.planet.terrain.maxZoom' it means, that the segment is plain
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
198
|
+
elevationsNotExists(): void;
|
|
197
199
|
_checkEqualization(neighborSide: any, neigborNode: any): boolean;
|
|
198
200
|
equalize(): void;
|
|
199
201
|
engage(): void;
|
|
200
|
-
_plainSegmentWorkerCallback(data: any): void;
|
|
201
202
|
_terrainWorkerCallback(data: any): void;
|
|
202
203
|
normalMapTexturePtr: any;
|
|
203
|
-
/**
|
|
204
|
-
* Terrain is not obtained or not exists on the server.
|
|
205
|
-
*/
|
|
206
|
-
elevationsNotExists(): void;
|
|
207
204
|
_normalMapEdgeEqualize(side: any): void;
|
|
208
205
|
applyTerrain(elevations: any): void;
|
|
209
206
|
/**
|
|
@@ -242,6 +239,7 @@ export class Segment {
|
|
|
242
239
|
initialize(): void;
|
|
243
240
|
_assignGlobalTextureCoordinates(): void;
|
|
244
241
|
createPlainSegmentAsync(): void;
|
|
242
|
+
_plainSegmentWorkerCallback(data: any): void;
|
|
245
243
|
createPlainSegment(): void;
|
|
246
244
|
_createPlainVertices(): void;
|
|
247
245
|
/**
|
|
@@ -264,7 +262,7 @@ export class Segment {
|
|
|
264
262
|
getExtentMerc(): Extent;
|
|
265
263
|
getExtent(): Extent;
|
|
266
264
|
getNodeState(): any;
|
|
267
|
-
getNeighborSide(b: any): 0 | 1 |
|
|
265
|
+
getNeighborSide(b: any): 0 | 1 | 2 | 3 | -1;
|
|
268
266
|
}
|
|
269
267
|
import { Sphere } from "../bv/Sphere.js";
|
|
270
268
|
import { Box } from "../bv/Box.js";
|
package/types/shaders/atmos.d.ts
CHANGED
package/types/shaders/depth.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export function depth(): Program;
|
|
2
|
-
import { Program } from
|
|
2
|
+
import { Program } from '../webgl/Program.js';
|
package/types/shaders/label.d.ts
CHANGED