@openglobus/og 0.11.1 → 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 +18 -20
- package/src/og/Clock.js +11 -11
- package/src/og/Deferred.js +1 -1
- package/src/og/Events.js +9 -7
- package/src/og/Extent.js +117 -72
- package/src/og/Globe.js +35 -22
- package/src/og/ImageCanvas.js +24 -18
- package/src/og/Lock.js +2 -2
- package/src/og/LonLat.js +40 -37
- package/src/og/Popup.js +21 -15
- package/src/og/QueueArray.js +7 -3
- package/src/og/Rectangle.js +11 -6
- package/src/og/Stack.js +8 -5
- package/src/og/ajax.js +21 -33
- package/src/og/astro/astro.js +5 -5
- package/src/og/astro/earth.js +23 -17
- package/src/og/astro/jd.js +44 -39
- package/src/og/astro/orbit.js +20 -18
- package/src/og/astro/rotation.js +17 -8
- package/src/og/bv/Box.js +7 -3
- package/src/og/bv/Sphere.js +17 -9
- package/src/og/camera/Camera.js +137 -86
- package/src/og/camera/Frustum.js +30 -19
- package/src/og/camera/PlanetCamera.js +30 -26
- package/src/og/control/CompassButton.js +8 -2
- package/src/og/control/Control.js +13 -11
- package/src/og/control/DebugInfo.js +4 -1
- package/src/og/control/EarthCoordinates.js +62 -41
- package/src/og/control/EarthNavigation.js +20 -22
- package/src/og/control/GeoImageDragControl.js +1 -1
- package/src/og/control/KeyboardNavigation.js +12 -12
- package/src/og/control/LayerSwitcher.js +24 -23
- package/src/og/control/Lighting.js +1 -1
- package/src/og/control/MouseNavigation.js +1 -1
- package/src/og/control/ScaleControl.js +1 -1
- package/src/og/control/SegmentBoundVisualization.js +8 -9
- package/src/og/control/ShowFps.js +15 -10
- package/src/og/control/SimpleNavigation.js +8 -10
- package/src/og/control/Sun.js +25 -15
- package/src/og/control/ToggleWireframe.js +5 -5
- package/src/og/control/TouchNavigation.js +58 -45
- package/src/og/control/ZoomControl.js +41 -25
- package/src/og/control/index.js +4 -0
- package/src/og/ellipsoid/Ellipsoid.js +181 -85
- package/src/og/ellipsoid/wgs84.js +4 -4
- package/src/og/entity/BaseBillboard.js +97 -44
- package/src/og/entity/Billboard.js +15 -11
- package/src/og/entity/BillboardHandler.js +314 -64
- package/src/og/entity/Entity.js +106 -74
- package/src/og/entity/EntityCollection.js +72 -49
- package/src/og/entity/GeoObject.js +228 -0
- package/src/og/entity/GeoObjectHandler.js +910 -0
- package/src/og/entity/Geometry.js +29 -26
- package/src/og/entity/GeometryHandler.js +598 -126
- package/src/og/entity/Label.js +74 -40
- package/src/og/entity/LabelHandler.js +47 -246
- package/src/og/entity/LabelWorker.js +213 -0
- package/src/og/entity/Object3d.js +504 -0
- package/src/og/entity/PointCloud.js +81 -33
- package/src/og/entity/PointCloudHandler.js +9 -9
- package/src/og/entity/Polyline.js +39 -39
- package/src/og/entity/Ray.js +61 -28
- package/src/og/entity/ShapeHandler.js +1 -1
- package/src/og/entity/Strip.js +77 -48
- package/src/og/entity/StripHandler.js +27 -27
- package/src/og/entity/index.js +8 -16
- package/src/og/input/KeyboardHandler.js +107 -104
- package/src/og/input/MouseHandler.js +81 -78
- package/src/og/input/TouchHandler.js +55 -51
- package/src/og/layer/BaseGeoImage.js +61 -30
- package/src/og/layer/CanvasTiles.js +26 -24
- package/src/og/layer/GeoImage.js +10 -10
- package/src/og/layer/GeoTexture2d.js +1 -1
- package/src/og/layer/GeoVideo.js +3 -3
- package/src/og/layer/KML.js +66 -40
- package/src/og/layer/Layer.js +27 -17
- package/src/og/layer/Material.js +93 -61
- package/src/og/layer/Vector.js +118 -72
- package/src/og/layer/WMS.js +36 -19
- package/src/og/layer/XYZ.js +55 -48
- package/src/og/light/LightSource.js +47 -40
- package/src/og/math/Line2.js +24 -24
- package/src/og/math/Line3.js +103 -102
- package/src/og/math/Mat3.js +134 -121
- package/src/og/math/Mat4.js +603 -459
- package/src/og/math/Plane.js +21 -20
- package/src/og/math/Quat.js +980 -927
- package/src/og/math/Ray.js +195 -187
- package/src/og/math/Vec2.js +127 -117
- package/src/og/math/Vec3.js +206 -176
- package/src/og/math/Vec4.js +49 -53
- package/src/og/math/coder.js +18 -18
- package/src/og/math.js +12 -12
- package/src/og/mercator.js +11 -11
- package/src/og/proj/EPSG3857.js +4 -4
- package/src/og/proj/EPSG4326.js +4 -4
- package/src/og/proj/Proj.js +31 -31
- package/src/og/quadTree/EntityCollectionNode.js +310 -300
- package/src/og/quadTree/Node.js +1008 -993
- package/src/og/renderer/Renderer.js +768 -747
- package/src/og/renderer/RendererEvents.js +9 -6
- package/src/og/scene/Axes.js +1 -1
- package/src/og/scene/BaseNode.js +8 -9
- package/src/og/scene/Planet.js +115 -87
- package/src/og/scene/RenderNode.js +29 -22
- package/src/og/scene/SkyBox.js +1 -1
- package/src/og/segment/Segment.js +1886 -1878
- package/src/og/segment/SegmentLonLat.js +298 -268
- package/src/og/segment/segmentHelper.js +11 -11
- package/src/og/shaders/bloom.js +1 -1
- package/src/og/shaders/blur.js +2 -2
- package/src/og/shaders/depth.js +1 -1
- package/src/og/shaders/geoObject.js +211 -0
- package/src/og/shaders/label.js +1 -1
- package/src/og/shaders/lumFilter.js +1 -1
- package/src/og/shaders/pointCloud.js +42 -42
- package/src/og/shaders/screenFrame.js +1 -1
- package/src/og/shaders/shape.js +15 -21
- package/src/og/shaders/skybox.js +37 -37
- package/src/og/shaders/toneMapping.js +1 -1
- package/src/og/shapes/BaseShape.js +129 -57
- package/src/og/shapes/Icosphere.js +30 -15
- package/src/og/shapes/Sphere.js +13 -16
- package/src/og/terrain/BilTerrain.js +2 -1
- package/src/og/terrain/EmptyTerrain.js +2 -2
- package/src/og/terrain/Geoid.js +2 -2
- package/src/og/terrain/GlobusTerrain.js +10 -10
- package/src/og/terrain/MapboxTerrain.js +1 -1
- package/src/og/utils/GeoImageCreator.js +9 -9
- package/src/og/utils/Loader.js +6 -6
- package/src/og/utils/NormalMapCreator.js +13 -13
- package/src/og/utils/TerrainWorker.js +1 -1
- package/src/og/utils/TextureAtlas.js +20 -22
- package/src/og/utils/VectorTileCreator.js +5 -5
- package/src/og/utils/earcut.js +1 -1
- package/src/og/utils/shared.js +15 -15
- package/src/og/webgl/Framebuffer.js +101 -53
- package/src/og/webgl/Handler.js +125 -85
- package/src/og/webgl/Multisample.js +55 -27
- package/src/og/webgl/Program.js +80 -35
- package/src/og/webgl/ProgramController.js +27 -23
- package/src/og/webgl/callbacks.js +8 -8
- package/types/Clock.d.ts +6 -2
- package/types/Deferred.d.ts +1 -1
- package/types/Events.d.ts +8 -4
- package/types/Extent.d.ts +37 -33
- package/types/Globe.d.ts +15 -13
- package/types/ImageCanvas.d.ts +5 -3
- package/types/LonLat.d.ts +24 -24
- package/types/Popup.d.ts +4 -0
- package/types/QueueArray.d.ts +6 -2
- package/types/Rectangle.d.ts +10 -4
- package/types/Stack.d.ts +4 -0
- package/types/ajax.d.ts +1 -1
- package/types/astro/earth.d.ts +3 -2
- package/types/bv/Box.d.ts +10 -5
- package/types/bv/Sphere.d.ts +13 -7
- package/types/camera/Camera.d.ts +90 -81
- package/types/camera/Frustum.d.ts +26 -22
- package/types/camera/PlanetCamera.d.ts +49 -53
- package/types/control/CompassButton.d.ts +4 -4
- package/types/control/Control.d.ts +7 -4
- package/types/control/DebugInfo.d.ts +3 -4
- package/types/control/EarthCoordinates.d.ts +6 -6
- package/types/control/EarthNavigation.d.ts +42 -0
- package/types/control/KeyboardNavigation.d.ts +3 -4
- package/types/control/LayerSwitcher.d.ts +3 -5
- package/types/control/Lighting.d.ts +3 -3
- package/types/control/MouseNavigation.d.ts +47 -0
- package/types/control/ScaleControl.d.ts +3 -3
- package/types/control/ShowFps.d.ts +3 -4
- package/types/control/SimpleNavigation.d.ts +3 -6
- package/types/control/Sun.d.ts +8 -10
- package/types/control/ToggleWireframe.d.ts +3 -3
- package/types/control/TouchNavigation.d.ts +48 -0
- package/types/control/ZoomControl.d.ts +3 -4
- package/types/control/index.d.ts +3 -1
- package/types/ellipsoid/Ellipsoid.d.ts +47 -43
- package/types/ellipsoid/wgs84.d.ts +3 -2
- package/types/entity/BaseBillboard.d.ts +41 -34
- package/types/entity/Billboard.d.ts +7 -7
- package/types/entity/BillboardHandler.d.ts +4 -0
- package/types/entity/Entity.d.ts +101 -83
- package/types/entity/EntityCollection.d.ts +57 -43
- package/types/entity/GeoObject.d.ts +111 -0
- package/types/entity/GeoObjectHandler.d.ts +77 -0
- package/types/entity/Geometry.d.ts +9 -7
- package/types/entity/GeometryHandler.d.ts +2 -2
- package/types/entity/Label.d.ts +24 -29
- package/types/entity/LabelHandler.d.ts +9 -2
- package/types/entity/LabelWorker.d.ts +9 -0
- package/types/entity/PointCloud.d.ts +8 -8
- package/types/entity/PointCloudHandler.d.ts +3 -3
- package/types/entity/Polyline.d.ts +58 -55
- package/types/entity/Ray.d.ts +19 -18
- package/types/entity/Strip.d.ts +8 -7
- package/types/entity/StripHandler.d.ts +3 -3
- package/types/entity/index.d.ts +7 -7
- package/types/input/KeyboardHandler.d.ts +10 -0
- package/types/input/MouseHandler.d.ts +5 -0
- package/types/input/TouchHandler.d.ts +5 -0
- package/types/layer/BaseGeoImage.d.ts +23 -35
- package/types/layer/CanvasTiles.d.ts +15 -22
- package/types/layer/GeoImage.d.ts +5 -18
- package/types/layer/GeoVideo.d.ts +5 -30
- package/types/layer/KML.d.ts +20 -15
- package/types/layer/Layer.d.ts +326 -0
- package/types/layer/Material.d.ts +45 -0
- package/types/layer/Vector.d.ts +208 -0
- package/types/layer/WMS.d.ts +4 -7
- package/types/layer/XYZ.d.ts +19 -25
- package/types/light/LightSource.d.ts +54 -53
- package/types/math/Line2.d.ts +11 -0
- package/types/math/Line3.d.ts +10 -0
- package/types/math/Mat3.d.ts +30 -18
- package/types/math/Mat4.d.ts +71 -52
- package/types/math/Plane.d.ts +5 -4
- package/types/math/Quat.d.ts +379 -0
- package/types/math/Ray.d.ts +82 -0
- package/types/math/Vec2.d.ts +102 -101
- package/types/math/Vec3.d.ts +143 -142
- package/types/math/Vec4.d.ts +40 -39
- package/types/math/coder.d.ts +12 -11
- package/types/math.d.ts +8 -8
- package/types/mercator.d.ts +3 -3
- package/types/proj/EPSG3857.d.ts +3 -2
- package/types/proj/EPSG4326.d.ts +3 -2
- package/types/proj/Proj.d.ts +42 -0
- package/types/quadTree/EntityCollectionNode.d.ts +34 -0
- package/types/quadTree/Node.d.ts +61 -0
- package/types/renderer/Renderer.d.ts +300 -0
- package/types/renderer/RendererEvents.d.ts +10 -7
- package/types/scene/BaseNode.d.ts +9 -9
- package/types/scene/Planet.d.ts +131 -126
- package/types/scene/RenderNode.d.ts +22 -23
- package/types/segment/Segment.d.ts +279 -0
- package/types/segment/SegmentLonLat.d.ts +16 -0
- package/types/shaders/geoObject.d.ts +3 -0
- package/types/shapes/BaseShape.d.ts +43 -40
- package/types/shapes/Sphere.d.ts +7 -7
- package/types/terrain/BilTerrain.d.ts +0 -1
- package/types/terrain/EmptyTerrain.d.ts +4 -4
- package/types/terrain/GlobusTerrain.d.ts +17 -54
- package/types/terrain/MapboxTerrain.d.ts +0 -1
- package/types/utils/GeoImageCreator.d.ts +3 -2
- package/types/utils/TextureAtlas.d.ts +8 -8
- package/types/utils/shared.d.ts +25 -24
- package/types/webgl/Framebuffer.d.ts +5 -5
- package/types/webgl/Handler.d.ts +68 -43
- package/types/webgl/Multisample.d.ts +5 -5
- package/types/webgl/Program.d.ts +8 -2
- package/types/webgl/ProgramController.d.ts +18 -13
- package/src/og/inherits.js +0 -8
- package/src/og/utils/polylabel.js +0 -176
- package/types/inherits.d.ts +0 -4
package/types/math/Vec4.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* @param {number} [y] - Second value.
|
|
6
6
|
* @param {number} [z] - Third value.
|
|
7
7
|
* @param {number} [w] - Fourth value.
|
|
8
|
-
* @returns {
|
|
8
|
+
* @returns {Vec4}
|
|
9
9
|
*/
|
|
10
|
-
export function vec4(x?: number, y?: number, z?: number, w?: number):
|
|
10
|
+
export function vec4(x?: number, y?: number, z?: number, w?: number): Vec4;
|
|
11
11
|
/**
|
|
12
12
|
* Class represents a 4d vector.
|
|
13
13
|
* @class
|
|
@@ -20,16 +20,16 @@ export class Vec4 {
|
|
|
20
20
|
/**
|
|
21
21
|
* Identity vector [0,0,0,1].
|
|
22
22
|
* @const
|
|
23
|
-
* @type {
|
|
23
|
+
* @type {Vec4}
|
|
24
24
|
*/
|
|
25
|
-
static get identity():
|
|
25
|
+
static get identity(): Vec4;
|
|
26
26
|
/**
|
|
27
27
|
* Creates 4d vector from array.
|
|
28
28
|
* @function
|
|
29
|
-
* @param {Array.<number
|
|
30
|
-
* @returns {
|
|
29
|
+
* @param {Array.<number>} - (exactly 4 entries)
|
|
30
|
+
* @returns {Vec4}
|
|
31
31
|
*/
|
|
32
|
-
static fromVec(arr: any):
|
|
32
|
+
static fromVec(arr: any): Vec4;
|
|
33
33
|
constructor(x: any, y: any, z: any, w: any);
|
|
34
34
|
/**
|
|
35
35
|
* @public
|
|
@@ -54,41 +54,41 @@ export class Vec4 {
|
|
|
54
54
|
/**
|
|
55
55
|
* Converts to 3d vector, without fourth value.
|
|
56
56
|
* @public
|
|
57
|
-
* @returns {
|
|
57
|
+
* @returns {Vec3}
|
|
58
58
|
*/
|
|
59
|
-
public toVec3():
|
|
59
|
+
public toVec3(): Vec3;
|
|
60
60
|
/**
|
|
61
61
|
* Returns clone vector.
|
|
62
62
|
* @public
|
|
63
|
-
* @returns {
|
|
63
|
+
* @returns {Vec4}
|
|
64
64
|
*/
|
|
65
|
-
public clone(v: any):
|
|
65
|
+
public clone(v: any): Vec4;
|
|
66
66
|
/**
|
|
67
67
|
* Compares with vector. Returns true if it equals another.
|
|
68
68
|
* @public
|
|
69
|
-
* @param {
|
|
69
|
+
* @param {Vec4} p - Vector to compare.
|
|
70
70
|
* @returns {boolean}
|
|
71
71
|
*/
|
|
72
72
|
public equal(v: any): boolean;
|
|
73
73
|
/**
|
|
74
74
|
* Copy input vector's values.
|
|
75
|
-
* @param {
|
|
76
|
-
* @returns {
|
|
75
|
+
* @param {Vec4} v - Vector to copy.
|
|
76
|
+
* @returns {Vec4}
|
|
77
77
|
*/
|
|
78
|
-
copy(v:
|
|
78
|
+
copy(v: Vec4): Vec4;
|
|
79
79
|
/**
|
|
80
80
|
* Converts vector to a number array.
|
|
81
81
|
* @public
|
|
82
|
-
* @returns {Array.<number
|
|
82
|
+
* @returns {Array.<number>} - (exactly 4 entries)
|
|
83
83
|
* @deprecated
|
|
84
84
|
*/
|
|
85
|
-
public toVec(): Array<number
|
|
85
|
+
public toVec(): Array<number>;
|
|
86
86
|
/**
|
|
87
87
|
* Converts vector to a number array.
|
|
88
88
|
* @public
|
|
89
|
-
* @returns {Array.<number
|
|
89
|
+
* @returns {Array.<number>} - (exactly 4 entries)
|
|
90
90
|
*/
|
|
91
|
-
public toArray(): Array<number
|
|
91
|
+
public toArray(): Array<number>;
|
|
92
92
|
/**
|
|
93
93
|
* Sets vector's values.
|
|
94
94
|
* @public
|
|
@@ -96,62 +96,62 @@ export class Vec4 {
|
|
|
96
96
|
* @param {number} y - Value Y.
|
|
97
97
|
* @param {number} z - Value Z.
|
|
98
98
|
* @param {number} w - Value W.
|
|
99
|
-
* @returns {
|
|
99
|
+
* @returns {Vec4}
|
|
100
100
|
*/
|
|
101
|
-
public set(x: number, y: number, z: number, w: number):
|
|
101
|
+
public set(x: number, y: number, z: number, w: number): Vec4;
|
|
102
102
|
/**
|
|
103
103
|
* Adds vector to the current.
|
|
104
104
|
* @public
|
|
105
|
-
* @param {
|
|
106
|
-
* @returns {
|
|
105
|
+
* @param {Vec4}
|
|
106
|
+
* @returns {Vec4}
|
|
107
107
|
*/
|
|
108
|
-
public addA(v: any):
|
|
108
|
+
public addA(v: any): Vec4;
|
|
109
109
|
/**
|
|
110
110
|
* Subtract vector from the current.
|
|
111
111
|
* @public
|
|
112
|
-
* @param {
|
|
113
|
-
* @returns {
|
|
112
|
+
* @param {Vec4} v - Subtract vector.
|
|
113
|
+
* @returns {Vec4}
|
|
114
114
|
*/
|
|
115
|
-
public subA(v:
|
|
115
|
+
public subA(v: Vec4): Vec4;
|
|
116
116
|
/**
|
|
117
117
|
* Scale current vector.
|
|
118
118
|
* @public
|
|
119
119
|
* @param {number} scale - Scale value.
|
|
120
|
-
* @returns {
|
|
120
|
+
* @returns {Vec4}
|
|
121
121
|
*/
|
|
122
|
-
public scale(scale: number):
|
|
122
|
+
public scale(scale: number): Vec4;
|
|
123
123
|
/**
|
|
124
124
|
* Makes vector affinity. Thereby fourh component becomes to 1.0.
|
|
125
125
|
* @public
|
|
126
|
-
* @returns {
|
|
126
|
+
* @returns {Vec4}
|
|
127
127
|
*/
|
|
128
|
-
public affinity():
|
|
128
|
+
public affinity(): Vec4;
|
|
129
129
|
/**
|
|
130
130
|
* Scale current vector to another instance.
|
|
131
131
|
* @public
|
|
132
132
|
* @param {number} scale - Scale value.
|
|
133
|
-
* @returns {
|
|
133
|
+
* @returns {Vec3}
|
|
134
134
|
*/
|
|
135
|
-
public scaleTo(scale: number):
|
|
135
|
+
public scaleTo(scale: number): Vec3;
|
|
136
136
|
/**
|
|
137
137
|
* Vector's edge function that returns vector where each component is 0.0 if it's smaller then edge and otherwise 1.0.
|
|
138
138
|
* @public
|
|
139
|
-
* @returns {
|
|
139
|
+
* @returns {Vec4}
|
|
140
140
|
*/
|
|
141
|
-
public getStep(edge: any):
|
|
141
|
+
public getStep(edge: any): Vec4;
|
|
142
142
|
/**
|
|
143
143
|
* The vector fract function returns the vector of fractional parts of each value, i.e. x minus floor(x).
|
|
144
144
|
* @public
|
|
145
|
-
* @returns {
|
|
145
|
+
* @returns {Vec4}
|
|
146
146
|
*/
|
|
147
|
-
public getFrac(v: any):
|
|
147
|
+
public getFrac(v: any): Vec4;
|
|
148
148
|
/**
|
|
149
149
|
* Gets vectors dot production.
|
|
150
150
|
* @public
|
|
151
|
-
* @param {
|
|
151
|
+
* @param {math.Vec4} v - Another vector.
|
|
152
152
|
* @returns {number} - Dot product.
|
|
153
153
|
*/
|
|
154
|
-
public dot(v:
|
|
154
|
+
public dot(v: math.Vec4): number;
|
|
155
155
|
/**
|
|
156
156
|
* Returns true if vector's values are zero.
|
|
157
157
|
* @public
|
|
@@ -159,3 +159,4 @@ export class Vec4 {
|
|
|
159
159
|
*/
|
|
160
160
|
public isZero(): boolean;
|
|
161
161
|
}
|
|
162
|
+
import { Vec3 } from "./Vec3.js";
|
package/types/math/coder.d.ts
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* Encode 32 bit float value to the RGBA vector.
|
|
3
3
|
* @function
|
|
4
4
|
* @param {number} v - 32 bit float value.
|
|
5
|
-
* @returns {
|
|
5
|
+
* @returns {math.Vec4} - RGBA vector value.
|
|
6
6
|
*/
|
|
7
|
-
export function encodeFloatToRGBA(v: number):
|
|
7
|
+
export function encodeFloatToRGBA(v: number): math.Vec4;
|
|
8
8
|
/**
|
|
9
9
|
* Decode RGBA vector to 32 bit float value.
|
|
10
10
|
* @function
|
|
11
|
-
* @param {
|
|
11
|
+
* @param {Vec4} rgba - RGBA encoded 32 bit float value.
|
|
12
12
|
* @returns {number} - Float value.
|
|
13
13
|
*/
|
|
14
|
-
export function decodeFloatFromRGBA(rgba:
|
|
14
|
+
export function decodeFloatFromRGBA(rgba: Vec4): number;
|
|
15
15
|
/**
|
|
16
16
|
* Decode RGBA vector to 32 bit float value.
|
|
17
17
|
* @function
|
|
18
|
-
* @param {
|
|
18
|
+
* @param {Vec4} rgba - RGBA encoded 32 bit float value.
|
|
19
19
|
* @returns {number} - Float value.
|
|
20
20
|
*/
|
|
21
21
|
export function decodeFloatFromRGBAArr(arr: any, use32: any): number;
|
|
@@ -23,20 +23,21 @@ export function decodeFloatFromRGBAArr(arr: any, use32: any): number;
|
|
|
23
23
|
* Separate 64 bit value to two 32 bit float values.
|
|
24
24
|
* @function
|
|
25
25
|
* @param {number} value - Double type value.
|
|
26
|
-
* @returns {Array.<number
|
|
26
|
+
* @returns {Array.<number>} Encoded array. (exactly 2 entries)
|
|
27
27
|
*/
|
|
28
|
-
export function doubleToTwoFloats(value: number): Array<number
|
|
28
|
+
export function doubleToTwoFloats(value: number): Array<number>;
|
|
29
29
|
/**
|
|
30
30
|
* Separate 64 bit value to two 32 bit float values.
|
|
31
31
|
* @function
|
|
32
32
|
* @param {number} value - Double type value.
|
|
33
|
-
* @returns {Array.<number
|
|
33
|
+
* @returns {Array.<number>} Encoded array. (exactly 2 entries)
|
|
34
34
|
*/
|
|
35
|
-
export function doubleToTwoFloats2(value: number, highLowArr: any): Array<number
|
|
35
|
+
export function doubleToTwoFloats2(value: number, highLowArr: any): Array<number>;
|
|
36
36
|
/**
|
|
37
37
|
* Separate 64 bit value to two 32 bit float values.
|
|
38
38
|
* @function
|
|
39
39
|
* @param {number} value - Double type value.
|
|
40
|
-
* @returns {Array.<number
|
|
40
|
+
* @returns {Array.<number>} Encoded array. (exactly 2 entries)
|
|
41
41
|
*/
|
|
42
|
-
export function doubleToTwoFloatsV2(value: number, highLowVec: any): Array<number
|
|
42
|
+
export function doubleToTwoFloatsV2(value: number, highLowVec: any): Array<number>;
|
|
43
|
+
import { Vec4 } from "./Vec4.js";
|
package/types/math.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {number} base - Base value.
|
|
6
6
|
* @returns {number} -
|
|
7
7
|
* @example
|
|
8
|
-
*
|
|
8
|
+
* log(64, 2)
|
|
9
9
|
* //returns 6
|
|
10
10
|
*/
|
|
11
11
|
export function log(n: number, base: number): number;
|
|
@@ -17,7 +17,7 @@ export function log(n: number, base: number): number;
|
|
|
17
17
|
* @param {number} max - Maximal edge.
|
|
18
18
|
* @returns {number} -
|
|
19
19
|
* @example
|
|
20
|
-
*
|
|
20
|
+
* clamp(12, 1, 5)
|
|
21
21
|
* //returns 5
|
|
22
22
|
*/
|
|
23
23
|
export function clamp(number: number, min: number, max: number): number;
|
|
@@ -150,13 +150,13 @@ export function bezier1v(t: any, p0: any, p1: any, p2: any, p3: any): number;
|
|
|
150
150
|
* Performs a 3D bezier interpolation.
|
|
151
151
|
* @function
|
|
152
152
|
* @param {number} t - Interpolation value.
|
|
153
|
-
* @param {
|
|
154
|
-
* @param {
|
|
155
|
-
* @param {
|
|
156
|
-
* @param {
|
|
157
|
-
* @returns {
|
|
153
|
+
* @param {Vec3} p0 - First control point.
|
|
154
|
+
* @param {Vec3} p1 - Second control point.
|
|
155
|
+
* @param {Vec3} p2 - Third control point.
|
|
156
|
+
* @param {Vec3} p3 - Fourth control point.
|
|
157
|
+
* @returns {Vec3} -
|
|
158
158
|
*/
|
|
159
|
-
export function bezier3v(t: number, p0:
|
|
159
|
+
export function bezier3v(t: number, p0: Vec3, p1: Vec3, p2: Vec3, p3: Vec3): Vec3;
|
|
160
160
|
/**
|
|
161
161
|
* Clamp angle value within 360.
|
|
162
162
|
* @function
|
package/types/mercator.d.ts
CHANGED
|
@@ -48,10 +48,10 @@ export function getTileY(lat: number, zoom: number): number;
|
|
|
48
48
|
/**
|
|
49
49
|
* Converts geodetic coordinate array to mercator coordinate array.
|
|
50
50
|
* @function
|
|
51
|
-
* @param {Array.<
|
|
52
|
-
* @returns {Array.<
|
|
51
|
+
* @param {Array.<LonLat>} lonLatArr - LonLat array to convert.
|
|
52
|
+
* @returns {Array.<LonLat>}
|
|
53
53
|
*/
|
|
54
|
-
export function forwardArray(lonlatArr: any): Array<
|
|
54
|
+
export function forwardArray(lonlatArr: any): Array<LonLat>;
|
|
55
55
|
export function getTileExtent(x: any, y: any, z: any): Extent;
|
|
56
56
|
/**
|
|
57
57
|
* Mercator size.
|
package/types/proj/EPSG3857.d.ts
CHANGED
package/types/proj/EPSG4326.d.ts
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* *
|
|
3
|
+
*/
|
|
4
|
+
export type Units = string;
|
|
5
|
+
export namespace Units {
|
|
6
|
+
const DEGREES: string;
|
|
7
|
+
const FEET: string;
|
|
8
|
+
const METERS: string;
|
|
9
|
+
const KILOMETERS: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Meters per unit lookup table.
|
|
13
|
+
* @const
|
|
14
|
+
* @type {Object.<og.proj.Units, number>}
|
|
15
|
+
*/
|
|
16
|
+
export const METERS_PER_UNIT: any;
|
|
17
|
+
export class Proj {
|
|
18
|
+
constructor(options: any);
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
* @type {string}
|
|
22
|
+
*/
|
|
23
|
+
public code: string;
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* @type {proj.Units}
|
|
27
|
+
*/
|
|
28
|
+
public units: proj.Units;
|
|
29
|
+
/**
|
|
30
|
+
* Projection identifier, especially usefull for comparison.
|
|
31
|
+
* @const
|
|
32
|
+
* @type {integer}
|
|
33
|
+
*/
|
|
34
|
+
id: integer;
|
|
35
|
+
/**
|
|
36
|
+
* Compare projections.
|
|
37
|
+
* @public
|
|
38
|
+
* @param {Proj} proj - Projetion object.
|
|
39
|
+
* @returns {boolean}
|
|
40
|
+
*/
|
|
41
|
+
public equal(proj: Proj): boolean;
|
|
42
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export class EntityCollectionNode {
|
|
2
|
+
constructor(layer: any, partId: any, parent: any, id: any, extent: any, planet: any, zoom: any);
|
|
3
|
+
layer: any;
|
|
4
|
+
parentNode: any;
|
|
5
|
+
childrenNodes: any[];
|
|
6
|
+
partId: any;
|
|
7
|
+
nodeId: any;
|
|
8
|
+
state: any;
|
|
9
|
+
extent: any;
|
|
10
|
+
count: number;
|
|
11
|
+
deferredEntities: any[];
|
|
12
|
+
entityCollection: any;
|
|
13
|
+
zoom: any;
|
|
14
|
+
_inTheQueue: boolean;
|
|
15
|
+
bsphere: Sphere;
|
|
16
|
+
insertEntity(entity: any, rightNow: any): void;
|
|
17
|
+
_addEntitiesToCollection(entities: any, rightNow: any): void;
|
|
18
|
+
_setExtentBounds(): void;
|
|
19
|
+
__setLonLat__(entity: any): any;
|
|
20
|
+
buildTree(entities: any, rightNow: any): void;
|
|
21
|
+
isInside(entity: any): any;
|
|
22
|
+
createChildrenNodes(): void;
|
|
23
|
+
collectRenderCollectionsPASS1(visibleNodes: any, outArr: any): void;
|
|
24
|
+
collectRenderCollectionsPASS2(visibleNodes: any, outArr: any, renderingNodeId: any): void;
|
|
25
|
+
applyCollection(): void;
|
|
26
|
+
traverseTree(callback: any): void;
|
|
27
|
+
renderCollection(outArr: any, visibleNodes: any, renderingNodeId: any): void;
|
|
28
|
+
alignEntityToTheGround(entity: any, segment: any): void;
|
|
29
|
+
isVisible(): boolean;
|
|
30
|
+
}
|
|
31
|
+
export class EntityCollectionNodeWGS84 extends EntityCollectionNode {
|
|
32
|
+
isNorth: boolean;
|
|
33
|
+
}
|
|
34
|
+
import { Sphere } from "../bv/Sphere.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quad tree planet segment node.
|
|
3
|
+
* @constructor
|
|
4
|
+
* @param {Segment|og.planetSegment.SegmentLonLat} segmentPrototype - Planet segment node constructor.
|
|
5
|
+
* @param {RenderNode} planet - Planet render node.
|
|
6
|
+
* @param {number} partId - NorthEast, SouthWest etc.
|
|
7
|
+
* @param {quadTree.Node} parent - Parent of this node.
|
|
8
|
+
* @param {number} id - Tree node identifier (id * 4 + 1);
|
|
9
|
+
* @param {number} tileZoom - Deep index of the quad tree.
|
|
10
|
+
* @param {Extent} extent - Planet segment extent.
|
|
11
|
+
*/
|
|
12
|
+
export class Node {
|
|
13
|
+
constructor(SegmentPrototype: any, planet: any, partId: any, parent: any, id: any, tileZoom: any, extent: any);
|
|
14
|
+
SegmentPrototype: any;
|
|
15
|
+
planet: any;
|
|
16
|
+
parentNode: any;
|
|
17
|
+
partId: any;
|
|
18
|
+
nodeId: any;
|
|
19
|
+
state: number;
|
|
20
|
+
appliedTerrainNodeId: number;
|
|
21
|
+
sideSize: number[];
|
|
22
|
+
sideSizeLog2: number[];
|
|
23
|
+
ready: boolean;
|
|
24
|
+
neighbors: any[][];
|
|
25
|
+
equalizedNeighborId: number[];
|
|
26
|
+
equalizedNeighborGridSize: number[];
|
|
27
|
+
nodes: any[];
|
|
28
|
+
segment: any;
|
|
29
|
+
_cameraInside: boolean;
|
|
30
|
+
inFrustum: number;
|
|
31
|
+
createChildrenNodes(): void;
|
|
32
|
+
createBounds(): void;
|
|
33
|
+
getState(): number;
|
|
34
|
+
/**
|
|
35
|
+
* Returns the same deep existent neighbour node.
|
|
36
|
+
* @public
|
|
37
|
+
* @param {Number} side - Neighbour side index e.g. og.quadTree.N, og.quadTree.W etc.
|
|
38
|
+
* @returns {quadTree.Node} -
|
|
39
|
+
*/
|
|
40
|
+
public getEqualNeighbor(side: number): quadTree.Node;
|
|
41
|
+
isBrother(node: any): boolean;
|
|
42
|
+
renderTree(cam: any, maxZoom: any, terrainReadySegment: any, stopLoading: any): void;
|
|
43
|
+
traverseNodes(cam: any, maxZoom: any, terrainReadySegment: any, stopLoading: any): void;
|
|
44
|
+
prepareForRendering(cam: any, altVis: any, inFrustum: any, terrainReadySegment: any, stopLoading: any): void;
|
|
45
|
+
renderNode(inFrustum: any, onlyTerrain: any, terrainReadySegment: any, stopLoading: any): void;
|
|
46
|
+
/**
|
|
47
|
+
* Seraching for neighbours and pickup current node to render processing.
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
public addToRender(inFrustum: any): void;
|
|
51
|
+
getCommonSide(node: any): any;
|
|
52
|
+
___getCommonSide___(b: any): any;
|
|
53
|
+
whileNormalMapCreating(): void;
|
|
54
|
+
whileTerrainLoading(terrainReadySegment: any, stopLoading: any): void;
|
|
55
|
+
destroy(): void;
|
|
56
|
+
clearTree(): void;
|
|
57
|
+
clearBranches(): void;
|
|
58
|
+
destroyBranches(): void;
|
|
59
|
+
traverseTree(callback: any): void;
|
|
60
|
+
getOffsetOppositeNeighbourSide(neighbourNode: any, side: any): number;
|
|
61
|
+
}
|