@openglobus/og 0.16.1 → 0.16.3

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.
@@ -1,7 +1,3 @@
1
- /**
2
- * @module og/layer/KML
3
- */
4
-
5
1
  "use strict";
6
2
  import { Billboard } from "../entity/Billboard.js";
7
3
  import { Entity } from "../entity/Entity.js";
@@ -89,7 +85,7 @@ export class KML extends Vector {
89
85
  if (!placemark) return;
90
86
 
91
87
  const nameTags = Array.from(placemark.getElementsByTagName("name"))
92
- const name = nameTags && nameTags[0]?.innerHTML?.trim() || '';
88
+ const name = nameTags && nameTags.length > 0 ? nameTags[0].innerHTML.trim() : '';
93
89
 
94
90
  const { iconHeading, iconURL, iconColor, lineWidth, lineColor } = this._extractStyle(placemark);
95
91
 
@@ -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);
@@ -565,7 +565,7 @@ export function base64StringToBlog(string) {
565
565
  * Callback throttling
566
566
  * @param {any} func
567
567
  * @param {Number} limit
568
- * @param {Number} skip
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 {Object} sender - Event callback function owner.
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: any, priority?: number): void;
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
- dX: () => number;
46
- dY: () => number;
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 {};
@@ -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.
@@ -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 {Number} skip
116
+ * @param {boolean} [skip]
117
117
  */
118
- export function throttle(func: any, limit: number, skip: number): (...args: any[]) => void;
118
+ export function throttle(func: any, limit: number, skip?: boolean): (...args: any[]) => void;
119
119
  /**
120
120
  *
121
121
  * y2-----Q12--------------Q22---