@openglobus/og 0.11.5 → 0.11.6
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/package.json +5 -7
- package/src/og/Clock.js +6 -10
- package/src/og/Events.js +5 -7
- package/src/og/Extent.js +73 -32
- package/src/og/ImageCanvas.js +18 -15
- package/src/og/LonLat.js +13 -10
- package/src/og/Popup.js +18 -17
- package/src/og/QueueArray.js +3 -4
- package/src/og/Rectangle.js +4 -6
- package/src/og/Stack.js +2 -4
- package/src/og/ajax.js +20 -14
- package/src/og/astro/earth.js +21 -15
- package/src/og/bv/Box.js +2 -3
- package/src/og/bv/Sphere.js +10 -7
- package/src/og/camera/Frustum.js +19 -12
- package/src/og/camera/PlanetCamera.js +0 -1
- package/src/og/control/CompassButton.js +1 -2
- package/src/og/control/Control.js +7 -9
- package/src/og/control/DebugInfo.js +0 -1
- package/src/og/control/KeyboardNavigation.js +9 -9
- package/src/og/control/LayerSwitcher.js +21 -20
- package/src/og/control/SegmentBoundVisualization.js +5 -6
- package/src/og/control/ShowFps.js +12 -7
- package/src/og/control/SimpleNavigation.js +5 -7
- package/src/og/control/Sun.js +22 -12
- package/src/og/control/ToggleWireframe.js +3 -3
- package/src/og/control/TouchNavigation.js +43 -32
- package/src/og/control/ZoomControl.js +40 -24
- package/src/og/ellipsoid/Ellipsoid.js +148 -56
- package/src/og/ellipsoid/wgs84.js +3 -3
- package/src/og/entity/BaseBillboard.js +65 -14
- package/src/og/entity/Billboard.js +9 -5
- package/src/og/entity/BillboardHandler.js +310 -64
- package/src/og/entity/Entity.js +39 -1
- package/src/og/entity/EntityCollection.js +47 -24
- package/src/og/entity/GeoObject.js +228 -0
- package/src/og/entity/GeoObjectHandler.js +910 -0
- package/src/og/entity/GeometryHandler.js +595 -123
- package/src/og/entity/Label.js +53 -18
- package/src/og/entity/LabelHandler.js +42 -244
- package/src/og/entity/LabelWorker.js +213 -0
- package/src/og/entity/Object3d.js +504 -0
- package/src/og/entity/PointCloud.js +76 -28
- package/src/og/entity/PointCloudHandler.js +5 -5
- package/src/og/entity/Ray.js +49 -16
- package/src/og/entity/Strip.js +72 -43
- package/src/og/entity/StripHandler.js +23 -23
- package/src/og/layer/BaseGeoImage.js +50 -19
- package/src/og/layer/CanvasTiles.js +16 -16
- package/src/og/layer/GeoImage.js +6 -6
- package/src/og/layer/KML.js +55 -33
- package/src/og/layer/Layer.js +3 -3
- package/src/og/layer/Vector.js +94 -48
- package/src/og/layer/WMS.js +33 -16
- package/src/og/light/LightSource.js +19 -12
- package/src/og/math/Mat3.js +24 -12
- package/src/og/math/Mat4.js +603 -603
- package/src/og/math/Plane.js +19 -18
- package/src/og/math/Ray.js +17 -12
- package/src/og/math/Vec2.js +24 -14
- package/src/og/math/Vec3.js +60 -30
- package/src/og/math/coder.js +7 -7
- package/src/og/proj/EPSG3857.js +3 -3
- package/src/og/proj/EPSG4326.js +3 -3
- package/src/og/proj/Proj.js +2 -4
- package/src/og/quadTree/Node.js +31 -17
- package/src/og/renderer/Renderer.js +23 -6
- package/src/og/renderer/RendererEvents.js +1 -1
- package/src/og/scene/BaseNode.js +2 -3
- package/src/og/scene/Planet.js +2 -2
- package/src/og/scene/RenderNode.js +15 -8
- package/src/og/shaders/geoObject.js +211 -0
- package/src/og/shaders/pointCloud.js +41 -41
- package/src/og/shaders/shape.js +12 -18
- package/src/og/shaders/skybox.js +36 -36
- package/src/og/shapes/BaseShape.js +107 -35
- package/src/og/shapes/Icosphere.js +25 -10
- package/src/og/shapes/Sphere.js +8 -11
- package/src/og/utils/TextureAtlas.js +16 -18
- package/src/og/utils/shared.js +1 -1
- package/src/og/webgl/Handler.js +68 -49
- package/src/og/webgl/Multisample.js +44 -16
- package/src/og/webgl/Program.js +78 -33
- package/src/og/webgl/callbacks.js +3 -3
- package/types/Deferred.d.ts +1 -1
- package/types/Events.d.ts +2 -2
- package/types/Extent.d.ts +1 -1
- package/types/Rectangle.d.ts +1 -1
- package/types/ajax.d.ts +1 -1
- package/types/bv/Box.d.ts +1 -1
- package/types/bv/Sphere.d.ts +1 -1
- package/types/camera/Camera.d.ts +5 -5
- package/types/camera/Frustum.d.ts +6 -6
- package/types/camera/PlanetCamera.d.ts +8 -8
- package/types/control/Control.d.ts +1 -1
- package/types/control/EarthCoordinates.d.ts +1 -1
- package/types/control/Sun.d.ts +1 -1
- package/types/entity/BaseBillboard.d.ts +15 -8
- package/types/entity/Entity.d.ts +24 -9
- package/types/entity/EntityCollection.d.ts +15 -9
- package/types/entity/GeoObject.d.ts +111 -0
- package/types/entity/GeoObjectHandler.d.ts +77 -0
- package/types/entity/Geometry.d.ts +1 -1
- package/types/entity/GeometryHandler.d.ts +1 -1
- package/types/entity/Label.d.ts +3 -3
- package/types/entity/LabelHandler.d.ts +2 -0
- package/types/entity/LabelWorker.d.ts +9 -0
- package/types/entity/PointCloud.d.ts +1 -1
- package/types/entity/Polyline.d.ts +5 -5
- package/types/entity/Ray.d.ts +1 -1
- package/types/entity/Strip.d.ts +1 -1
- package/types/layer/BaseGeoImage.d.ts +3 -3
- package/types/layer/CanvasTiles.d.ts +5 -5
- package/types/layer/GeoImage.d.ts +1 -1
- package/types/layer/GeoVideo.d.ts +1 -1
- package/types/layer/Layer.d.ts +5 -5
- package/types/layer/Vector.d.ts +9 -9
- package/types/layer/XYZ.d.ts +3 -3
- package/types/light/LightSource.d.ts +7 -7
- package/types/math/Plane.d.ts +1 -1
- package/types/math/Ray.d.ts +1 -1
- package/types/math/Vec2.d.ts +34 -34
- package/types/math/Vec3.d.ts +1 -1
- package/types/math/Vec4.d.ts +1 -1
- package/types/math/coder.d.ts +1 -1
- package/types/math.d.ts +1 -1
- package/types/proj/Proj.d.ts +2 -2
- package/types/quadTree/Node.d.ts +1 -1
- package/types/renderer/Renderer.d.ts +12 -10
- package/types/renderer/RendererEvents.d.ts +1 -1
- package/types/scene/BaseNode.d.ts +4 -4
- package/types/scene/Planet.d.ts +40 -40
- package/types/scene/RenderNode.d.ts +9 -9
- package/types/segment/Segment.d.ts +9 -9
- package/types/shaders/geoObject.d.ts +3 -0
- package/types/shapes/BaseShape.d.ts +5 -5
- package/types/terrain/EmptyTerrain.d.ts +2 -2
- package/types/terrain/GlobusTerrain.d.ts +4 -4
- package/types/utils/TextureAtlas.d.ts +4 -4
- package/types/utils/shared.d.ts +9 -9
- package/types/webgl/Framebuffer.d.ts +1 -1
- package/types/webgl/Handler.d.ts +16 -7
- package/types/webgl/Multisample.d.ts +2 -2
- package/types/webgl/Program.d.ts +6 -0
- package/types/webgl/ProgramController.d.ts +1 -1
package/src/og/math/Mat3.js
CHANGED
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
* @module og/math/Mat3
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
"use strict";
|
|
6
6
|
|
|
7
|
-
import { Mat4 } from
|
|
8
|
-
import { Vec3 } from
|
|
7
|
+
import { Mat4 } from "./Mat4.js";
|
|
8
|
+
import { Vec3 } from "./Vec3.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Class represents a 3x3 matrix.
|
|
12
12
|
* @class
|
|
13
13
|
*/
|
|
14
14
|
export class Mat3 {
|
|
15
|
-
|
|
16
15
|
constructor() {
|
|
17
16
|
/**
|
|
18
17
|
* A 3x3 matrix, indexable as a column-major order array.
|
|
@@ -70,9 +69,15 @@ export class Mat3 {
|
|
|
70
69
|
transposeTo() {
|
|
71
70
|
var res = new Mat3();
|
|
72
71
|
var m = this._m;
|
|
73
|
-
res._m[0] = m[0];
|
|
74
|
-
res._m[
|
|
75
|
-
res._m[
|
|
72
|
+
res._m[0] = m[0];
|
|
73
|
+
res._m[1] = m[3];
|
|
74
|
+
res._m[2] = m[6];
|
|
75
|
+
res._m[3] = m[1];
|
|
76
|
+
res._m[4] = m[4];
|
|
77
|
+
res._m[5] = m[7];
|
|
78
|
+
res._m[6] = m[2];
|
|
79
|
+
res._m[7] = m[5];
|
|
80
|
+
res._m[8] = m[8];
|
|
76
81
|
return res;
|
|
77
82
|
}
|
|
78
83
|
|
|
@@ -82,9 +87,15 @@ export class Mat3 {
|
|
|
82
87
|
* @returns {Mat3}
|
|
83
88
|
*/
|
|
84
89
|
setIdentity() {
|
|
85
|
-
this._m[0] = 1;
|
|
86
|
-
this._m[
|
|
87
|
-
this._m[
|
|
90
|
+
this._m[0] = 1;
|
|
91
|
+
this._m[1] = 0;
|
|
92
|
+
this._m[2] = 0;
|
|
93
|
+
this._m[3] = 0;
|
|
94
|
+
this._m[4] = 1;
|
|
95
|
+
this._m[5] = 0;
|
|
96
|
+
this._m[6] = 0;
|
|
97
|
+
this._m[7] = 0;
|
|
98
|
+
this._m[8] = 1;
|
|
88
99
|
return this;
|
|
89
100
|
}
|
|
90
101
|
|
|
@@ -95,7 +106,9 @@ export class Mat3 {
|
|
|
95
106
|
* @returns {Vec3}
|
|
96
107
|
*/
|
|
97
108
|
mulVec(p) {
|
|
98
|
-
var d = p.x,
|
|
109
|
+
var d = p.x,
|
|
110
|
+
e = p.y,
|
|
111
|
+
g = p.z;
|
|
99
112
|
var m = this._m;
|
|
100
113
|
return new Vec3(
|
|
101
114
|
m[0] * d + m[3] * e + m[6] * g,
|
|
@@ -131,7 +144,6 @@ export class Mat3 {
|
|
|
131
144
|
b[15] = 1;
|
|
132
145
|
return res;
|
|
133
146
|
}
|
|
134
|
-
|
|
135
147
|
}
|
|
136
148
|
|
|
137
149
|
/**
|