@openglobus/og 0.16.1 → 0.16.2
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/dist/@openglobus/og.esm.js +1 -1
- 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 +2 -1
- package/src/og/control/TouchNavigation.js +350 -341
- package/src/og/layer/KML.js +1 -3
- package/src/og/scene/Planet.js +1 -1
- package/src/og/utils/shared.js +1 -1
- package/types/Events.d.ts +3 -2
- package/types/control/TouchNavigation.d.ts +7 -2
- package/types/scene/Planet.d.ts +2 -2
- package/types/utils/shared.d.ts +2 -2
package/src/og/layer/KML.js
CHANGED
package/src/og/scene/Planet.js
CHANGED
|
@@ -1667,7 +1667,7 @@ export class Planet extends RenderNode {
|
|
|
1667
1667
|
* @public
|
|
1668
1668
|
* @param {Vec2} px - Pixel screen 2d coordinates.
|
|
1669
1669
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
1670
|
-
* @returns {Vec3} -
|
|
1670
|
+
* @returns {Vec3 | null} -
|
|
1671
1671
|
*/
|
|
1672
1672
|
getCartesianFromPixelTerrain(px) {
|
|
1673
1673
|
var distance = this.getDistanceFromPixel(px);
|
package/src/og/utils/shared.js
CHANGED
|
@@ -565,7 +565,7 @@ export function base64StringToBlog(string) {
|
|
|
565
565
|
* Callback throttling
|
|
566
566
|
* @param {any} func
|
|
567
567
|
* @param {Number} limit
|
|
568
|
-
* @param {
|
|
568
|
+
* @param {boolean} [skip]
|
|
569
569
|
*/
|
|
570
570
|
export function throttle(func, limit, skip) {
|
|
571
571
|
let lastFunc;
|
package/types/Events.d.ts
CHANGED
|
@@ -47,9 +47,10 @@ export class Events {
|
|
|
47
47
|
* @public
|
|
48
48
|
* @param {string} name - Event name to listen.
|
|
49
49
|
* @param {eventCallback} callback - Event callback function.
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {any} [sender] - Event callback function owner.
|
|
51
|
+
* @param {number} [priority] - Priority of event callback.
|
|
51
52
|
*/
|
|
52
|
-
public on(name: string, callback: eventCallback, sender
|
|
53
|
+
public on(name: string, callback: eventCallback, sender?: any, priority?: number): void;
|
|
53
54
|
/**
|
|
54
55
|
* Stop listening event name with specified callback function.
|
|
55
56
|
* @public
|
|
@@ -42,8 +42,13 @@ declare class Touch {
|
|
|
42
42
|
prev_y: number;
|
|
43
43
|
grabbedPoint: Vec3;
|
|
44
44
|
grabbedSpheroid: Sphere;
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
_vec: Vec2;
|
|
46
|
+
_vecPrev: Vec2;
|
|
47
|
+
get dY(): number;
|
|
48
|
+
get dX(): number;
|
|
49
|
+
get vec(): Vec2;
|
|
50
|
+
get vecPrev(): Vec2;
|
|
47
51
|
}
|
|
48
52
|
import { Key } from "../Lock.js";
|
|
53
|
+
import { Vec2 } from "../math/index.js";
|
|
49
54
|
export {};
|
package/types/scene/Planet.d.ts
CHANGED
|
@@ -465,9 +465,9 @@ export class Planet extends RenderNode {
|
|
|
465
465
|
* @public
|
|
466
466
|
* @param {Vec2} px - Pixel screen 2d coordinates.
|
|
467
467
|
* @param {Boolean} [force=false] - Force framebuffer rendering.
|
|
468
|
-
* @returns {Vec3} -
|
|
468
|
+
* @returns {Vec3 | null} -
|
|
469
469
|
*/
|
|
470
|
-
public getCartesianFromPixelTerrain(px: Vec2): Vec3;
|
|
470
|
+
public getCartesianFromPixelTerrain(px: Vec2): Vec3 | null;
|
|
471
471
|
/**
|
|
472
472
|
* Returns geographical coordinates on the relief planet by 2d screen coordinates.
|
|
473
473
|
* position or null if input coordinates is outside the planet.
|
package/types/utils/shared.d.ts
CHANGED
|
@@ -113,9 +113,9 @@ export function base64StringToBlog(string: any): Blob;
|
|
|
113
113
|
* Callback throttling
|
|
114
114
|
* @param {any} func
|
|
115
115
|
* @param {Number} limit
|
|
116
|
-
* @param {
|
|
116
|
+
* @param {boolean} [skip]
|
|
117
117
|
*/
|
|
118
|
-
export function throttle(func: any, limit: number, skip
|
|
118
|
+
export function throttle(func: any, limit: number, skip?: boolean): (...args: any[]) => void;
|
|
119
119
|
/**
|
|
120
120
|
*
|
|
121
121
|
* y2-----Q12--------------Q22---
|