@openglobus/og 0.17.0 → 0.17.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.
Files changed (67) hide show
  1. package/dist/@openglobus/og.esm.js +2 -2
  2. package/dist/@openglobus/og.esm.js.map +1 -1
  3. package/dist/@openglobus/og.umd.js +2 -2
  4. package/dist/@openglobus/og.umd.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/og/Events.js +2 -2
  7. package/src/og/Globe.js +1 -1
  8. package/src/og/ImageCanvas.js +2 -2
  9. package/src/og/LonLat.js +1 -1
  10. package/src/og/Object3d.js +1 -1
  11. package/src/og/QueueArray.js +1 -1
  12. package/src/og/Stack.js +1 -1
  13. package/src/og/astro/earth.js +3 -3
  14. package/src/og/camera/Frustum.js +4 -4
  15. package/src/og/camera/PlanetCamera.js +7 -7
  16. package/src/og/cons.js +1 -1
  17. package/src/og/control/DebugInfo.js +3 -3
  18. package/src/og/control/EarthNavigation.js +6 -13
  19. package/src/og/control/Lighting.js +1 -1
  20. package/src/og/control/MouseNavigation.js +1 -1
  21. package/src/og/control/visibleExtent/Segment.js +2 -2
  22. package/src/og/ellipsoid/Ellipsoid.js +31 -50
  23. package/src/og/entity/BillboardHandler.js +3 -3
  24. package/src/og/entity/EntityCollection.js +7 -7
  25. package/src/og/entity/GeoObject.js +6 -4
  26. package/src/og/entity/GeoObjectHandler.js +30 -20
  27. package/src/og/entity/GeometryHandler.js +15 -15
  28. package/src/og/entity/LabelHandler.js +10 -10
  29. package/src/og/entity/LabelWorker.js +1 -1
  30. package/src/og/entity/PointCloud.js +2 -2
  31. package/src/og/entity/PointCloudHandler.js +2 -2
  32. package/src/og/entity/Polyline.js +11 -11
  33. package/src/og/entity/PolylineHandler.js +2 -2
  34. package/src/og/entity/RayHandler.js +2 -2
  35. package/src/og/entity/StripHandler.js +2 -2
  36. package/src/og/input/KeyboardHandler.js +6 -6
  37. package/src/og/layer/BaseGeoImage.js +1 -1
  38. package/src/og/layer/CanvasTiles.js +1 -1
  39. package/src/og/layer/Vector.js +2 -2
  40. package/src/og/math/Vec3.js +5 -0
  41. package/src/og/math.js +3 -3
  42. package/src/og/mercator.js +1 -1
  43. package/src/og/quadTree/Node.js +15 -14
  44. package/src/og/renderer/Renderer.js +5 -5
  45. package/src/og/scene/BaseNode.js +1 -1
  46. package/src/og/scene/Planet.js +16 -21
  47. package/src/og/scene/RenderNode.js +9 -9
  48. package/src/og/segment/Segment.js +2 -2
  49. package/src/og/segment/SegmentLonLat.js +1 -1
  50. package/src/og/segment/segmentHelper.js +12 -12
  51. package/src/og/shaders/atmos.js +1 -1
  52. package/src/og/utils/GeoImageCreator.js +1 -1
  53. package/src/og/utils/NormalMapCreator.js +3 -3
  54. package/src/og/utils/PlainSegmentWorker.js +9 -9
  55. package/src/og/utils/TerrainWorker.js +2 -2
  56. package/src/og/utils/TextureAtlas.js +1 -1
  57. package/src/og/utils/earcut.js +8 -8
  58. package/src/og/utils/shared.js +10 -10
  59. package/src/og/webgl/Framebuffer.js +2 -2
  60. package/src/og/webgl/Handler.js +1 -1
  61. package/src/og/webgl/Multisample.js +2 -2
  62. package/src/og/webgl/Program.js +4 -4
  63. package/types/ImageCanvas.d.ts +1 -1
  64. package/types/ellipsoid/Ellipsoid.d.ts +3 -1
  65. package/types/entity/GeoObject.d.ts +1 -2
  66. package/types/math/Vec3.d.ts +2 -0
  67. package/types/scene/Planet.d.ts +1 -2
@@ -121,7 +121,7 @@ export class Framebuffer {
121
121
  destroy() {
122
122
  var gl = this.handler.gl;
123
123
 
124
- for (var i = 0; i < this.textures.length; i++) {
124
+ for (let i = 0; i < this.textures.length; i++) {
125
125
  gl.deleteTexture(this.textures[i]);
126
126
  }
127
127
  this.textures = new Array(this._size);
@@ -148,7 +148,7 @@ export class Framebuffer {
148
148
 
149
149
  if (!this._isBare) {
150
150
  let attachmentArr = [];
151
- for (var i = 0; i < this.textures.length; i++) {
151
+ for (let i = 0; i < this.textures.length; i++) {
152
152
  let ti = this.textures[i] || this.handler.createEmptyTexture2DExt(this._width, this._height, this._filter, this._internalFormatArr[i], this._formatArr[i], this._typeArr[i]);
153
153
 
154
154
  let att_i = gl[this._attachmentArr[i]];
@@ -1138,7 +1138,7 @@ class Handler {
1138
1138
  // const data = new DataView(xhr.response);
1139
1139
  // const array =
1140
1140
  // new Float32Array(data.byteLength / Float32Array.BYTES_PER_ELEMENT);
1141
- // for (var i = 0; i < array.length; ++i) {
1141
+ // for (let i = 0; i < array.length; ++i) {
1142
1142
  // array[i] = data.getFloat32(i * Float32Array.BYTES_PER_ELEMENT, true);
1143
1143
  // }
1144
1144
  // callback(array);
@@ -88,7 +88,7 @@ export class Multisample {
88
88
  destroy() {
89
89
  var gl = this.handler.gl;
90
90
 
91
- for (var i = 0; i < this.renderbuffers.length; i++) {
91
+ for (let i = 0; i < this.renderbuffers.length; i++) {
92
92
  gl.deleteRenderbuffer(this.renderbuffers[i]);
93
93
  }
94
94
  this.renderbuffers = new Array(this._size);
@@ -116,7 +116,7 @@ export class Multisample {
116
116
  gl.bindFramebuffer(gl.FRAMEBUFFER, this._fbo);
117
117
 
118
118
  let colorAttachments = [];
119
- for (var i = 0; i < this.renderbuffers.length; i++) {
119
+ for (let i = 0; i < this.renderbuffers.length; i++) {
120
120
  let rb = gl.createRenderbuffer();
121
121
  gl.bindRenderbuffer(gl.RENDERBUFFER, rb);
122
122
 
@@ -154,7 +154,7 @@ class Program {
154
154
  */
155
155
  set(material) {
156
156
  this._textureID = 0;
157
- for (var i in material) {
157
+ for (let i in material) {
158
158
  this._variables[i].value = material[i];
159
159
  this._variables[i]._callback(this, this._variables[i]);
160
160
  }
@@ -167,7 +167,7 @@ class Program {
167
167
  apply() {
168
168
  this._textureID = 0;
169
169
  var v = this._variables;
170
- for (var i in v) {
170
+ for (let i in v) {
171
171
  v[i]._callback(this, v[i]);
172
172
  }
173
173
  }
@@ -318,7 +318,7 @@ class Program {
318
318
 
319
319
  this.use();
320
320
 
321
- for (var a in this._attributes) {
321
+ for (let a in this._attributes) {
322
322
  //this.attributes[a]._name = a;
323
323
  this._variables[a] = this._attributes[a];
324
324
 
@@ -371,7 +371,7 @@ class Program {
371
371
  this.attributes[a] = this._p[a];
372
372
  }
373
373
 
374
- for (var u in this._uniforms) {
374
+ for (let u in this._uniforms) {
375
375
  //this.uniforms[u]._name = u;
376
376
 
377
377
  if (typeof this._uniforms[u].type === "string") {
@@ -41,7 +41,7 @@ export class ImageCanvas {
41
41
  * Fills canvas RGBA with color.
42
42
  * @public
43
43
  */
44
- public fill(c: any): void;
44
+ public fill(color: any): void;
45
45
  /**
46
46
  * Gets canvas pixels RGBA data.
47
47
  * @public
@@ -92,7 +92,7 @@ export class Ellipsoid {
92
92
  * @param {Number} height - Height.
93
93
  * @returns {Vec3} -
94
94
  */
95
- public geodeticToCartesian(lon: number, lat: number, height?: number): Vec3;
95
+ public geodeticToCartesian(lon: number, lat: number, height: number, res: any): Vec3;
96
96
  /**
97
97
  * Gets Wgs84 geodetic coordinates from cartesian ECEF.
98
98
  * @public
@@ -155,6 +155,7 @@ export class Ellipsoid {
155
155
  * @returns {Vec3} -
156
156
  */
157
157
  public hitRay(origin: Vec3, direction: Vec3): Vec3;
158
+ getNorthFrameRotation(cartesian: any): Quat;
158
159
  /**
159
160
  * @todo this is not precise function, needs to be replaced or removed
160
161
  * @param lonLat1
@@ -166,3 +167,4 @@ export class Ellipsoid {
166
167
  }
167
168
  import { Vec3 } from "../math/Vec3.js";
168
169
  import { LonLat } from "../LonLat.js";
170
+ import { Quat } from "../math/Quat.js";
@@ -112,7 +112,6 @@ export class GeoObject {
112
112
  */
113
113
  public setPickingColor3v(color: og.Vec3): void;
114
114
  updateDirection(): void;
115
- _qNorthFrame: Quat;
115
+ _qNorthFrame: any;
116
116
  }
117
117
  import { Vec3 } from "../math/index.js";
118
- import { Quat } from "../math/index.js";
@@ -35,6 +35,8 @@ export class Vec3 {
35
35
  static get UNIT_Y(): Vec3;
36
36
  /** @const */
37
37
  static get UNIT_Z(): Vec3;
38
+ /** @const */
39
+ static get NORTH(): Vec3;
38
40
  /**
39
41
  * Separate 63 bit Vec3 to two Vec3 32 bit float values.
40
42
  * @function
@@ -16,7 +16,6 @@
16
16
  * @fires og.scene.Planet#geoimageadd
17
17
  */
18
18
  export class Planet extends RenderNode {
19
- static getBearingNorthRotationQuat(cartesian: any): Quat;
20
19
  constructor(options?: {});
21
20
  _cameraFrustums: any;
22
21
  /**
@@ -260,6 +259,7 @@ export class Planet extends RenderNode {
260
259
  _renderScreenNodesPASS: () => void;
261
260
  _atmosphereEnabled: any;
262
261
  _atmosphereMaxMinOpacity: Float32Array;
262
+ getNorthFrameRotation(cartesian: any): any;
263
263
  set atmosphereMaxOpacity(arg: number);
264
264
  get atmosphereMaxOpacity(): number;
265
265
  set atmosphereMinOpacity(arg: number);
@@ -593,4 +593,3 @@ import { PlainSegmentWorker } from "../utils/PlainSegmentWorker.js";
593
593
  import { Loader } from "../utils/Loader.js";
594
594
  import { Key } from "../Lock.js";
595
595
  import { LonLat } from "../LonLat.js";
596
- import { Quat } from "../math/index.js";