@openglobus/og 0.12.4 → 0.13.0
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 +0 -2
- 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 +7 -7
- package/src/og/Extent.js +3 -3
- package/src/og/Globe.js +277 -275
- package/src/og/ImageCanvas.js +3 -3
- package/src/og/LonLat.js +9 -9
- package/src/og/QueueArray.js +2 -2
- package/src/og/Rectangle.js +5 -5
- package/src/og/bv/Box.js +1 -1
- package/src/og/bv/Sphere.js +2 -2
- package/src/og/camera/Camera.js +1 -1
- package/src/og/camera/PlanetCamera.js +649 -646
- package/src/og/control/LayerSwitcher.js +1 -1
- package/src/og/control/MouseNavigation.js +22 -13
- package/src/og/control/MouseWheelZoomControl.js +2 -2
- package/src/og/control/ScaleControl.js +1 -1
- package/src/og/control/TouchNavigation.js +319 -319
- package/src/og/control/ZoomControl.js +132 -132
- package/src/og/control/visibleExtent/Segment.js +12 -12
- package/src/og/ellipsoid/Ellipsoid.js +577 -567
- package/src/og/entity/BillboardHandler.js +878 -1051
- package/src/og/entity/Entity.js +1 -1
- package/src/og/entity/EntityCollection.js +847 -857
- package/src/og/entity/GeoObjectHandler.js +2 -2
- package/src/og/entity/LabelHandler.js +888 -1040
- package/src/og/entity/LabelWorker.js +0 -6
- package/src/og/entity/PointCloud.js +495 -495
- package/src/og/entity/Polyline.js +2218 -2222
- package/src/og/entity/RayHandler.js +1 -1
- package/src/og/layer/CanvasTiles.js +6 -3
- package/src/og/layer/GeoImage.js +1 -1
- package/src/og/layer/KML.js +5 -5
- package/src/og/layer/Layer.js +800 -752
- package/src/og/layer/Vector.js +997 -1010
- package/src/og/layer/XYZ.js +359 -357
- package/src/og/math/Line2.js +4 -4
- package/src/og/math/Quat.js +2 -2
- package/src/og/math/Ray.js +2 -2
- package/src/og/math/Vec2.js +524 -524
- package/src/og/math/Vec3.js +900 -900
- package/src/og/math/Vec4.js +261 -261
- package/src/og/math.js +397 -398
- package/src/og/quadTree/EntityCollectionNode.js +389 -387
- package/src/og/renderer/Renderer.js +14 -20
- package/src/og/renderer/RendererEvents.js +1034 -1045
- package/src/og/scene/Planet.js +12 -9
- package/src/og/scene/RenderNode.js +347 -354
- package/src/og/segment/Segment.js +3 -1
- package/src/og/segment/SegmentLonLat.js +1 -4
- package/src/og/shaders/billboard.js +220 -204
- package/src/og/shaders/drawnode.js +603 -603
- package/src/og/shaders/label.js +596 -456
- package/src/og/shaders/polyline.js +365 -361
- package/src/og/terrain/MapboxTerrain.js +1 -1
- package/src/og/utils/FontAtlas.js +209 -200
- package/src/og/utils/GeoImageCreator.js +4 -5
- package/src/og/utils/TextureAtlas.js +4 -4
- package/src/og/utils/VectorTileCreator.js +414 -414
- package/src/og/utils/shared.js +1 -1
- package/src/og/webgl/Handler.js +28 -60
- package/src/og/webgl/Multisample.js +260 -260
- package/src/og/webgl/Program.js +411 -396
- package/types/bv/Box.d.ts +1 -1
- package/types/bv/Sphere.d.ts +1 -1
- package/types/camera/PlanetCamera.d.ts +3 -3
- package/types/control/LayerSwitcher.d.ts +1 -1
- package/types/ellipsoid/Ellipsoid.d.ts +9 -2
- package/types/entity/BillboardHandler.d.ts +0 -4
- package/types/entity/EntityCollection.d.ts +0 -8
- package/types/entity/LabelHandler.d.ts +0 -2
- package/types/entity/Polyline.d.ts +1 -1
- package/types/layer/KML.d.ts +11 -11
- package/types/layer/Layer.d.ts +4 -0
- package/types/layer/Vector.d.ts +1 -8
- package/types/math/Line2.d.ts +4 -4
- package/types/math/Ray.d.ts +2 -2
- package/types/math/Vec2.d.ts +1 -1
- package/types/math/Vec3.d.ts +1 -1
- package/types/math/Vec4.d.ts +2 -2
- package/types/math.d.ts +1 -1
- package/types/renderer/Renderer.d.ts +1 -1
- package/types/renderer/RendererEvents.d.ts +1 -1
- package/types/shaders/label.d.ts +1 -1
- package/types/utils/FontAtlas.d.ts +3 -2
- package/types/utils/TextureAtlas.d.ts +3 -3
- package/types/utils/VectorTileCreator.d.ts +4 -4
- package/types/utils/shared.d.ts +1 -1
- package/types/webgl/Handler.d.ts +6 -31
- package/types/webgl/Program.d.ts +2 -0
package/src/og/math/Line2.js
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
import { Vec2 } from './Vec2.js';
|
|
8
8
|
|
|
9
9
|
export class Line2 {
|
|
10
|
-
constructor(a, b, c) {
|
|
11
|
-
this.a = a
|
|
12
|
-
this.b = b
|
|
13
|
-
this.c = c
|
|
10
|
+
constructor(a = 0, b = 0, c = 0) {
|
|
11
|
+
this.a = a;
|
|
12
|
+
this.b = b;
|
|
13
|
+
this.c = c;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
static get(p0, p1) {
|
package/src/og/math/Quat.js
CHANGED
|
@@ -20,7 +20,7 @@ export class Quat {
|
|
|
20
20
|
* @param {Number} [z=0.0] The Z component.
|
|
21
21
|
* @param {Number} [w=0.0] The W component.
|
|
22
22
|
*/
|
|
23
|
-
constructor(x, y, z, w) {
|
|
23
|
+
constructor(x = 0.0, y = 0.0, z = 0.0, w = 0.0) {
|
|
24
24
|
/**
|
|
25
25
|
* The X component.
|
|
26
26
|
* @public
|
|
@@ -946,7 +946,7 @@ export class Quat {
|
|
|
946
946
|
* @param {Boolean} [reprojectAxis] -
|
|
947
947
|
* @returns {number} -
|
|
948
948
|
*/
|
|
949
|
-
getYaw(reprojectAxis) {
|
|
949
|
+
getYaw(reprojectAxis = false) {
|
|
950
950
|
var x = this.x,
|
|
951
951
|
y = this.y,
|
|
952
952
|
z = this.z,
|
package/src/og/math/Ray.js
CHANGED
|
@@ -14,7 +14,7 @@ import { Vec3 } from "./Vec3.js";
|
|
|
14
14
|
* @param {Vec3} direction - The direction of the ray.
|
|
15
15
|
*/
|
|
16
16
|
export class Ray {
|
|
17
|
-
constructor(origin, direction) {
|
|
17
|
+
constructor(origin = Vec3.ZERO, direction = Vec3.ZERO) {
|
|
18
18
|
/**
|
|
19
19
|
* The origin of the ray.
|
|
20
20
|
* @public
|
|
@@ -81,7 +81,7 @@ export class Ray {
|
|
|
81
81
|
* @returns {number} - Hit code, could 0 - og.Ray.OUTSIDE, 1 - og.Ray.INSIDE,
|
|
82
82
|
* 2 - og.Ray.INPLANE and 3 - og.Ray.AWAY(ray goes away from triangle).
|
|
83
83
|
*/
|
|
84
|
-
hitTriangle(v0, v1, v2, res
|
|
84
|
+
hitTriangle(v0, v1, v2, res) {
|
|
85
85
|
var u = v1.sub(v0);
|
|
86
86
|
var v = v2.sub(v0);
|
|
87
87
|
var n = u.cross(v);
|