@openglobus/og 1.0.0-rc11 → 1.0.0-rc15

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.
Files changed (35) hide show
  1. package/lib/Globe.d.ts +2 -0
  2. package/lib/camera/Camera.d.ts +8 -0
  3. package/lib/control/DebugInfo.d.ts +1 -0
  4. package/lib/control/FreeNavigation.d.ts +253 -0
  5. package/lib/control/Navigation.d.ts +6 -0
  6. package/lib/control/ShowFps.d.ts +15 -3
  7. package/lib/control/Sun.d.ts +2 -0
  8. package/lib/control/index.d.ts +1 -0
  9. package/lib/entity/EntityCollection.d.ts +5 -0
  10. package/lib/entity/billboard/BaseBillboardHandler.d.ts +6 -0
  11. package/lib/entity/geoObject/InstanceData.d.ts +6 -0
  12. package/lib/entity/geometry/Geometry.d.ts +18 -0
  13. package/lib/entity/geometry/GeometryHandler.d.ts +1 -0
  14. package/lib/entity/label/Label.d.ts +1 -1
  15. package/lib/entity/pointCloud/PointCloud.d.ts +1 -0
  16. package/lib/entity/pointCloud/PointCloudHandler.d.ts +5 -0
  17. package/lib/entity/polyline/Polyline.d.ts +15 -0
  18. package/lib/entity/polyline/PolylineBatchRenderer.d.ts +1 -0
  19. package/lib/entity/polyline/PolylineHandler.d.ts +5 -0
  20. package/lib/entity/ray/RayHandler.d.ts +1 -0
  21. package/lib/input/KeyboardHandler.d.ts +1 -0
  22. package/lib/layer/Layer.d.ts +8 -1
  23. package/lib/math/Line2.d.ts +1 -1
  24. package/lib/og.css +1 -1
  25. package/lib/og.es.js +1 -1
  26. package/lib/og.es.js.map +1 -1
  27. package/lib/quadTree/QuadTreeStrategy.d.ts +7 -0
  28. package/lib/renderer/Renderer.d.ts +51 -5
  29. package/lib/tsconfig.tsbuildinfo +1 -1
  30. package/lib/utils/GeoImageCreator.d.ts +7 -0
  31. package/lib/utils/Loader.d.ts +6 -0
  32. package/lib/utils/NormalMapCreator.d.ts +6 -0
  33. package/lib/utils/VectorTileCreator.d.ts +6 -0
  34. package/lib/webgl/Handler.d.ts +15 -0
  35. package/package.json +1 -1
package/lib/Globe.d.ts CHANGED
@@ -74,6 +74,7 @@ export interface IGlobeParams {
74
74
  frameOpacity?: number;
75
75
  shadeMode?: ShadeModeInput;
76
76
  reverseDepth?: boolean;
77
+ idleMode?: boolean;
77
78
  }
78
79
  /**
79
80
  * @typedef {Array<number>} LonLatCoordinate
@@ -109,6 +110,7 @@ export interface IGlobeParams {
109
110
  * @param {Array.<Layer>} [options.layers] - Planet layers.
110
111
  * @param {Extent | ExtentBoundingBox} [options.viewExtent] [options.viewExtent] - Viewable starting extent.
111
112
  * @param {boolean} [options.autoActivate=true] - Globe rendering auto activation flag. True is default.
113
+ * @param {boolean} [options.idleMode=false] - Skips a frame rendering when nothing has been changed. False is default.
112
114
  * @param {HTMLElement} [options.attributionContainer] - Container for attribution list.
113
115
  * @param {number} [options.maxGridSize=128] = Maximal segment grid size. 128 is default
114
116
  * @param {string} [options.fontsSrc] - Fonts collection url.
@@ -143,6 +143,13 @@ declare class Camera {
143
143
  protected _pb: Vec3;
144
144
  protected _peye: Vec3;
145
145
  isMoving: boolean;
146
+ /**
147
+ * Fires when the camera view or projection has been changed. It is assigned by the renderer
148
+ * to wake it up from the idle mode.
149
+ * @public
150
+ * @type {?function(): void}
151
+ */
152
+ onViewChange: (() => void) | null;
146
153
  protected _pViewAngle: number;
147
154
  protected _pAspect: number;
148
155
  protected _pWidth: number;
@@ -233,6 +240,7 @@ declare class Camera {
233
240
  * @param {IFlyCartesianParams} [params] - Flight parameters
234
241
  */
235
242
  flyCartesian(cartesian: Vec3, params?: IFlyCartesianParams): void;
243
+ protected _startFlying(): void;
236
244
  /**
237
245
  * Breaks the flight.
238
246
  * @public
@@ -16,6 +16,7 @@ export declare class DebugInfo extends Control {
16
16
  protected _toggleBtn: ToggleButton;
17
17
  protected _dialog: Dialog<null>;
18
18
  protected _canvasTiles: CanvasTiles;
19
+ protected _drawnFrames: number;
19
20
  constructor(options?: IDebugInfoParams);
20
21
  addWatches(watches: IDebugInfoWatch[]): void;
21
22
  addWatch(watch: IDebugInfoWatch): void;
@@ -0,0 +1,253 @@
1
+ import type { IControlParams } from "./Control";
2
+ import { Control } from "./Control";
3
+ import type { IMouseState } from "../renderer/RendererEvents";
4
+ import { Navigation } from "./Navigation";
5
+ import type { Vec2 } from "../math/Vec2";
6
+ import { Vec3 } from "../math/Vec3";
7
+ import { type EventsHandler } from "../Events";
8
+ export interface IFreeNavigationParams extends IControlParams {
9
+ speed?: number;
10
+ minSpeed?: number;
11
+ maxSpeed?: number;
12
+ speedStep?: number;
13
+ speedFactor?: number;
14
+ lookSensitivity?: number;
15
+ rollSpeed?: number;
16
+ accelerationTime?: number;
17
+ decelerationTime?: number;
18
+ pitchLimit?: number;
19
+ invertY?: boolean;
20
+ pointerLock?: boolean;
21
+ toggleKey?: number;
22
+ showInfo?: boolean;
23
+ }
24
+ export type FreeNavigationEventsList = ["move", "rotate", "speedchange", "activate", "deactivate"];
25
+ /**
26
+ * Free-flight camera navigation.
27
+ *
28
+ * - W/S — move forward/backward
29
+ * - A/D — strafe left/right
30
+ * - Space/Ctrl — increase/decrease altitude
31
+ * - Shift — hold to move without changing the camera height above the ellipsoid
32
+ * - Q/E — roll
33
+ * - Mouse — look around
34
+ * - Mouse wheel — adjust movement speed
35
+ * - Right mouse button — hold to keep the point under the screen center in the center
36
+ * - F — activate and deactivate the control, see `toggleKey`
37
+ *
38
+ * Yaw follows the local ellipsoid normal, while pitch uses the camera's right vector.
39
+ * The camera preserves its orientation relative to the local horizon while moving.
40
+ *
41
+ * By default, pointer lock allows unrestricted mouse rotation. Pressing Escape releases
42
+ * the pointer and deactivates the control. Set `pointerLock` to `false` to use regular
43
+ * mouse movement instead.
44
+ *
45
+ * The control conflicts with the {@link Navigation} control, so an active {@link Navigation}
46
+ * is deactivated while the free navigation is active, and restored back on deactivation.
47
+ *
48
+ * @class
49
+ * @extends {Control}
50
+ * @param {IFreeNavigationParams} [options] - Free navigation options:
51
+ * @param {number} [options.speed] - Initial selected movement speed in m/s. Default is 0
52
+ * @param {number} [options.minSpeed] - Minimal selected movement speed in m/s. Default is -300
53
+ * @param {number} [options.maxSpeed] - Maximal selected movement speed in m/s. Default is 1000000
54
+ * @param {number} [options.speedStep] - Mouse wheel speed step near the zero speed in m/s. Default is 1
55
+ * @param {number} [options.speedFactor] - Relative speed increment per one mouse wheel step. Default is 0.45
56
+ * @param {number} [options.lookSensitivity] - Camera rotation angle in radians per mouse move pixel
57
+ * @param {number} [options.rollSpeed] - Q/E roll angular speed in radians per second the smoothed
58
+ * roll velocity approaches
59
+ * @param {number} [options.accelerationTime] - Acceleration smoothing time in seconds. Default is 0.6
60
+ * @param {number} [options.decelerationTime] - Deceleration smoothing time in seconds. Default is 0.4
61
+ * @param {number} [options.pitchLimit] - Maximal pitch angle above and below the local horizon in radians
62
+ * @param {boolean} [options.invertY] - Inverts vertical mouse rotation direction. Default is false
63
+ * @param {boolean} [options.pointerLock] - Locks and hides the mouse pointer. Default is true
64
+ * @param {number} [options.toggleKey] - Key code which activates and deactivates the control,
65
+ * it works while the control is inactive as well. Zero disables it. Default is `input.KEY_F`
66
+ * @param {boolean} [options.showInfo] - Shows the movement speed and the key hint. Default is false
67
+ * @fires move
68
+ * @fires rotate
69
+ * @fires speedchange
70
+ * @fires activate
71
+ * @fires deactivate
72
+ */
73
+ export declare class FreeNavigation extends Control {
74
+ events: EventsHandler<FreeNavigationEventsList>;
75
+ minSpeed: number;
76
+ maxSpeed: number;
77
+ speedStep: number;
78
+ speedFactor: number;
79
+ lookSensitivity: number;
80
+ rollSpeed: number;
81
+ accelerationTime: number;
82
+ decelerationTime: number;
83
+ pitchLimit: number;
84
+ invertY: boolean;
85
+ pointerLock: boolean;
86
+ toggleKey: number;
87
+ /**
88
+ * Current camera velocity in meters per second.
89
+ * @public
90
+ * @type {Vec3}
91
+ */
92
+ vel: Vec3;
93
+ /**
94
+ * Current camera roll angular velocity in radians per second.
95
+ * @public
96
+ * @type {number}
97
+ */
98
+ rollVel: number;
99
+ /**
100
+ * Selected movement speed in meters per second.
101
+ * @protected
102
+ * @type {number}
103
+ */
104
+ protected _speed: number;
105
+ protected _moveForward: boolean;
106
+ protected _moveBackward: boolean;
107
+ protected _moveLeft: boolean;
108
+ protected _moveRight: boolean;
109
+ protected _moveUp: boolean;
110
+ protected _moveDown: boolean;
111
+ protected _rollDir: number;
112
+ protected _dx: number;
113
+ protected _dy: number;
114
+ protected _skipPointerMove: boolean;
115
+ protected _targetPoint: Vec3 | null;
116
+ protected _targetRequest: number;
117
+ protected _holdHeight: number | null;
118
+ protected _lastFrameTime: number;
119
+ protected _frameDeltaTime: number;
120
+ protected _infoEl: HTMLElement | null;
121
+ protected _suspendedNavigation: Navigation[];
122
+ constructor(options?: IFreeNavigationParams);
123
+ onadd(): void;
124
+ oninit(): void;
125
+ onremove(): void;
126
+ /**
127
+ * Activates the control when it is inactive and deactivates it otherwise.
128
+ * @public
129
+ */
130
+ toggle(): void;
131
+ protected _onToggleKey: () => void;
132
+ protected _updateInfo(): void;
133
+ onactivate(): void;
134
+ ondeactivate(): void;
135
+ /**
136
+ * Returns selected movement speed in meters per second.
137
+ * @public
138
+ * @return {number} -
139
+ */
140
+ get speed(): number;
141
+ /**
142
+ * Sets selected movement speed in meters per second.
143
+ * @public
144
+ * @param {number} speed - Speed in m/s.
145
+ */
146
+ set speed(speed: number);
147
+ /**
148
+ * Sets selected movement speed in meters per second, clamped to the min and max speed.
149
+ * @public
150
+ * @param {number} speed - Speed in m/s.
151
+ */
152
+ setSpeed(speed: number): void;
153
+ /**
154
+ * Changes the movement speed by the given number of wheel steps.
155
+ *
156
+ * The speed step increases with the current speed. Changes are reversible,
157
+ * and zero speed is always reachable.
158
+ * @public
159
+ * @param {number} steps - Number of the wheel steps, negative decreases the speed.
160
+ */
161
+ stepSpeed(steps: number): void;
162
+ /**
163
+ * True when the mouse pointer is locked by the control.
164
+ * @public
165
+ * @return {boolean} -
166
+ */
167
+ isPointerLocked(): boolean;
168
+ /**
169
+ * Locks and hides the mouse pointer over the canvas.
170
+ * @public
171
+ */
172
+ requestPointerLock(): void;
173
+ /**
174
+ * Releases the mouse pointer.
175
+ * @public
176
+ */
177
+ exitPointerLock(): void;
178
+ /**
179
+ * Locked target point in the cartesian coordinates, or null when no target is locked.
180
+ * @public
181
+ * @return {Vec3 | null} -
182
+ */
183
+ get targetPoint(): Vec3 | null;
184
+ /**
185
+ * Locks the target point, so the camera keeps looking at it wherever it moves,
186
+ * @public
187
+ * @param {Vec3} [point] - Target point in the cartesian coordinates.
188
+ */
189
+ lockTarget(point?: Vec3 | null): void;
190
+ /**
191
+ * Releases the locked target point.
192
+ * @public
193
+ */
194
+ unlockTarget(): void;
195
+ /**
196
+ * Stops the camera movement and releases the locked target point.
197
+ * @public
198
+ */
199
+ stop(): void;
200
+ protected onPreDraw(): void;
201
+ protected _hasInput(): boolean;
202
+ protected _resetInput(): void;
203
+ private _onCameraFly;
204
+ protected _onMouseMove: (e: IMouseState) => void;
205
+ protected _onLockedMouseMove: (e: MouseEvent) => void;
206
+ protected _onPointerLockChange: () => void;
207
+ protected _onLDown: () => void;
208
+ protected _onRDown: () => void;
209
+ protected _onRUp: () => void;
210
+ protected _onKeyEscape: () => void;
211
+ protected _onMouseLeave: () => void;
212
+ protected _onMouseWheel: (e: IMouseState) => void;
213
+ protected _onKeyForward: () => void;
214
+ protected _onKeyBackward: () => void;
215
+ protected _onKeyLeft: () => void;
216
+ protected _onKeyRight: () => void;
217
+ protected _onKeyUp: () => void;
218
+ protected _onKeyDown: () => void;
219
+ protected _onKeyRollLeft: () => void;
220
+ protected _onKeyRollRight: () => void;
221
+ protected _getLocalUp(eye: Vec3): Vec3;
222
+ protected _getTargetPixel(): Vec2;
223
+ protected _pickTargetPoint(px: Vec2): Vec3 | null;
224
+ protected _handleTargetLock(): void;
225
+ protected _handleRotation(): void;
226
+ /**
227
+ * Clamps the pitch rotation angle.
228
+ * @protected
229
+ * @param {number} angle - Pitch angle in radians.
230
+ * @param {Vec3} forward - Camera forward vector.
231
+ * @param {Vec3} right - Camera right vector.
232
+ * @param {Vec3} localUp - Local reference frame up direction.
233
+ * @return {number} - Applicable pitch angle in radians.
234
+ */
235
+ protected _limitPitch(angle: number, forward: Vec3, right: Vec3, localUp: Vec3): number;
236
+ /**
237
+ * Rollls the camera around its forward axis and keeps its angular velocity smoothed.
238
+ * @protected
239
+ */
240
+ protected _handleRoll(): void;
241
+ protected _orthonormalizeCamera(): void;
242
+ /**
243
+ * Moves the camera and keeps its orientation in the local reference frame.
244
+ * @protected
245
+ */
246
+ protected _handleMove(): void;
247
+ protected _isHeightHold(): boolean;
248
+ protected _handleHeightHold(): void;
249
+ protected _suspendNavigation(): void;
250
+ protected _restoreNavigation(): void;
251
+ protected _updateFrameDeltaTime(): void;
252
+ protected get dt(): number;
253
+ }
@@ -100,6 +100,12 @@ export declare class Navigation extends Control {
100
100
  onactivate(): void;
101
101
  ondeactivate(): void;
102
102
  protected onPreDraw(): void;
103
+ /**
104
+ * Returns true while the inertia has not been damped yet.
105
+ * @public
106
+ * @returns {boolean}
107
+ */
108
+ isMoving(): boolean;
103
109
  _onShiftFree: () => void;
104
110
  private _onCameraFly;
105
111
  protected _onMouseMove: (e: IMouseState) => void;
@@ -1,10 +1,22 @@
1
+ import { Button } from "../ui/Button";
1
2
  import { Control } from "./Control";
2
3
  import type { IControlParams } from "./Control";
3
4
  /**
4
- * Frame per second(FPS) display control.
5
+ * Frames per second(FPS) display control. It looks like a map button in the top right
6
+ * corner and shows the current frame rate instead of an icon.
7
+ *
8
+ * Note that the rate is measured by the control itself and not taken from
9
+ * {@link Handler#deltaTime}, which is clamped and does not represent the real frame time.
10
+ * @class
11
+ * @extends {Control}
5
12
  */
6
13
  export declare class ShowFps extends Control {
7
- constructor(options: IControlParams);
14
+ protected _btn: Button | null;
15
+ protected _text: HTMLElement | null;
16
+ protected _frames: number;
17
+ protected _measureStart: number;
18
+ constructor(options?: IControlParams);
8
19
  oninit(): void;
9
- protected _draw(): void;
20
+ onremove(): void;
21
+ protected _draw: () => void;
10
22
  }
@@ -41,6 +41,7 @@ export declare class Sun extends Control {
41
41
  localDateTime: Date | null;
42
42
  protected _currDate: number;
43
43
  protected _prevDate: number;
44
+ protected _redrawDate: number;
44
45
  protected _clockPtr: Clock | null;
45
46
  protected _lightOn: boolean;
46
47
  protected _stopped: boolean;
@@ -49,6 +50,7 @@ export declare class Sun extends Control {
49
50
  protected _sunlightPosition: Vec3;
50
51
  constructor(options?: ISunParams);
51
52
  oninit(): void;
53
+ protected _onClockTick: () => void;
52
54
  stop(): void;
53
55
  start(): void;
54
56
  onactivate(): void;
@@ -3,6 +3,7 @@ export * from "./Control";
3
3
  export * from "./DebugInfo";
4
4
  export * from "./DrawingSwitcher";
5
5
  export * from "./EarthCoordinates";
6
+ export * from "./FreeNavigation";
6
7
  export * from "./GeoImageDragControl";
7
8
  export * from "./KeyboardNavigation";
8
9
  export * from "./LayerAnimation";
@@ -241,6 +241,11 @@ declare class EntityCollection {
241
241
  * @param {boolean} visibility - Visibility flag.
242
242
  */
243
243
  setVisibility(visibility: boolean): void;
244
+ /**
245
+ * Requests the next frame to be rendered.
246
+ * @public
247
+ */
248
+ requestRedraw(): void;
244
249
  /**
245
250
  * Returns collection visibility.
246
251
  * @public
@@ -56,6 +56,12 @@ declare class BaseBillboardHandler {
56
56
  initProgram(): void;
57
57
  setRenderer(renderer: Renderer): void;
58
58
  refresh(): void;
59
+ /**
60
+ * Marks a buffer to be updated in the next frame and requests the frame to be rendered.
61
+ * @protected
62
+ * @param {number} index - Buffer index.
63
+ */
64
+ protected _setChangedBuffer(index: number): void;
59
65
  protected _removeBillboards(): void;
60
66
  clear(): void;
61
67
  protected _deleteBuffers(): void;
@@ -79,6 +79,12 @@ export declare class InstanceData {
79
79
  createIndicesBuffer(): void;
80
80
  createPickingColorBuffer(): void;
81
81
  refresh(): void;
82
+ /**
83
+ * Marks a buffer to be updated in the next frame and requests the frame to be rendered.
84
+ * @public
85
+ * @param {number} index - Buffer index.
86
+ */
87
+ setChangedBuffer(index: number): void;
82
88
  update(): void;
83
89
  private _createColorTexture;
84
90
  private _createNormalTexture;
@@ -110,6 +110,24 @@ declare class Geometry {
110
110
  setLineColor(r: number, g: number, b: number, a?: number): Geometry;
111
111
  setStrokeColor4v(rgba: Vec4): Geometry;
112
112
  setLineColor4v(rgba: Vec4): Geometry;
113
+ /**
114
+ * Gets geometry fill color.
115
+ * @public
116
+ * @returns {Vec4} Copy of the normalized RGBA fill color.
117
+ */
118
+ getFillColor4v(): Vec4;
119
+ /**
120
+ * Gets geometry line color.
121
+ * @public
122
+ * @returns {Vec4} Copy of the normalized RGBA line color.
123
+ */
124
+ getLineColor4v(): Vec4;
125
+ /**
126
+ * Gets geometry stroke color.
127
+ * @public
128
+ * @returns {Vec4} Copy of the normalized RGBA stroke color.
129
+ */
130
+ getStrokeColor4v(): Vec4;
113
131
  setStrokeOpacity(opacity: number): Geometry;
114
132
  setLineOpacity(opacity: number): Geometry;
115
133
  setStrokeWidth(width: number): Geometry;
@@ -60,6 +60,7 @@ declare class GeometryHandler {
60
60
  protected _refreshPlanetNode(treeNode: Node): void;
61
61
  protected _updatePlanet(): void;
62
62
  protected refresh(): void;
63
+ protected _setChangedBuffer(index: number): void;
63
64
  update(): void;
64
65
  setGeometryVisibility(geometry: Geometry): void;
65
66
  setPolyColorArr(geometry: Geometry, color: Vec4): void;
@@ -130,7 +130,7 @@ declare class Label extends BaseBillboard {
130
130
  * @public
131
131
  * @returns {string}
132
132
  */
133
- getAlign(): number;
133
+ getAlign(): string;
134
134
  /**
135
135
  * Sets font face family.
136
136
  * @public
@@ -167,6 +167,7 @@ declare class PointCloud {
167
167
  insertPoint(index: number, point: Poi): void;
168
168
  draw(): void;
169
169
  drawPicking(): void;
170
+ protected _setChangedBuffer(index: number): void;
170
171
  /**
171
172
  * Update gl buffers.
172
173
  * @protected
@@ -30,6 +30,11 @@ declare class PointCloudHandler {
30
30
  */
31
31
  protected _pointClouds: PointCloud[];
32
32
  constructor(entityCollection: EntityCollection);
33
+ /**
34
+ * Requests the next frame to be rendered.
35
+ * @public
36
+ */
37
+ requestRedraw(): void;
33
38
  protected _initProgram(): void;
34
39
  bindScene(scene: Scene): void;
35
40
  add(pointCloud: PointCloud): void;
@@ -3,6 +3,7 @@ import { LonLat } from "../../LonLat";
3
3
  import { Vec3 } from "../../math/Vec3";
4
4
  import type { NumberArray3 } from "../../math/Vec3";
5
5
  import type { NumberArray2 } from "../../math/Vec2";
6
+ import { Vec4 } from "../../math/Vec4";
6
7
  import type { NumberArray4 } from "../../math/Vec4";
7
8
  import type { HTMLImageElementExt } from "../../utils/ImagesCacheManager";
8
9
  import { PolylineHandler } from "./PolylineHandler";
@@ -228,6 +229,20 @@ declare class Polyline {
228
229
  * @param {string} htmlColor - HTML color.
229
230
  */
230
231
  setColorHTML(htmlColor: string): void;
232
+ /**
233
+ * Gets polyline HTML color.
234
+ * @public
235
+ * @param {number} [index=0] - Segment index.
236
+ * @returns {string | undefined} HTML color, or undefined when no color is set.
237
+ */
238
+ getColorHTML(index?: number): string | undefined;
239
+ /**
240
+ * Gets polyline color as a normalized RGBA vector.
241
+ * @public
242
+ * @param {number} [index=0] - Segment index.
243
+ * @returns {Vec4 | undefined} Normalized RGBA color, or undefined when no color is set.
244
+ */
245
+ getColor4v(index?: number): Vec4 | undefined;
231
246
  /**
232
247
  * Clear polyline data.
233
248
  * @public
@@ -409,6 +409,7 @@ declare class PolylineBatchRenderer {
409
409
  * @protected
410
410
  */
411
411
  protected _refresh(): void;
412
+ protected _setChangedBuffer(index: number): void;
412
413
  /**
413
414
  * Updates render buffers.
414
415
  * @protected
@@ -20,6 +20,11 @@ declare class PolylineHandler {
20
20
  protected _polylines: Polyline[];
21
21
  constructor(entityCollection: EntityCollection);
22
22
  setVisibleSphere(p: Vec3, r: number): void;
23
+ /**
24
+ * Requests the next frame to be rendered.
25
+ * @public
26
+ */
27
+ requestRedraw(): void;
23
28
  protected _initProgram(): void;
24
29
  bindScene(scene: Scene): void;
25
30
  add(polyline: Polyline): void;
@@ -55,6 +55,7 @@ declare class RayHandler {
55
55
  initProgram(): void;
56
56
  setRenderer(renderer: Renderer): void;
57
57
  refresh(): void;
58
+ protected _setChangedBuffer(index: number): void;
58
59
  protected _removeRays(): void;
59
60
  clear(): void;
60
61
  protected _deleteBuffers(): void;
@@ -13,6 +13,7 @@ declare class KeyboardHandler {
13
13
  protected _event: KeyboardEvent | null;
14
14
  protected _active: boolean;
15
15
  protected _stampCache: Record<string, number>;
16
+ onKeyEvent: ((event: KeyboardEvent) => void) | null;
16
17
  constructor();
17
18
  getcurrentlyPressedKeys(): Record<number, boolean>;
18
19
  getPressedKeysCallbacks(): Record<number, ICallbackHandler[]>;
@@ -136,7 +136,7 @@ declare class Layer {
136
136
  */
137
137
  _planet: Planet | null;
138
138
  createTexture: Function | null;
139
- nightTextureCoefficient: number;
139
+ protected _nightTextureCoefficient: number;
140
140
  protected _hasImageryTiles: boolean;
141
141
  /**
142
142
  * Layer global opacity.
@@ -225,6 +225,13 @@ declare class Layer {
225
225
  get instanceName(): string;
226
226
  get rendererEvents(): EventsHandler<LayerEventsList>;
227
227
  set opacity(opacity: number);
228
+ /**
229
+ * Night texture blending coefficient.
230
+ * @public
231
+ * @type {number}
232
+ */
233
+ set nightTextureCoefficient(coefficient: number);
234
+ get nightTextureCoefficient(): number;
228
235
  set pickingEnabled(picking: boolean);
229
236
  get pickingEnabled(): boolean;
230
237
  /**
@@ -14,7 +14,7 @@ export declare class Line2 {
14
14
  * Finds the intersection of the line with a circle.
15
15
  * @param {Vec2} center - Circle center.
16
16
  * @param {number} radius - Circle radius.
17
- * @returns {[Vec2] | [Vec2, Vec2] | []}
17
+ * @returns {Array.<Vec2>} Zero, one, or two intersection points.
18
18
  */
19
19
  getCircleIntersection(center: Vec2, radius: number): [] | [Vec2] | [Vec2, Vec2];
20
20
  }