@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/types/layer/Vector.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export class Vector extends Layer {
|
|
|
112
112
|
* @param {boolean} [rightNow] - Entity insertion option. False is deafult.
|
|
113
113
|
* @returns {layer.Vector} - Returns this layer.
|
|
114
114
|
*/
|
|
115
|
-
public add(entity: Entity, rightNow?: boolean):
|
|
115
|
+
public add(entity: Entity, rightNow?: boolean): layer.Vector;
|
|
116
116
|
/**
|
|
117
117
|
* Adds entity to the layer in the index position.
|
|
118
118
|
* @public
|
|
@@ -121,7 +121,7 @@ export class Vector extends Layer {
|
|
|
121
121
|
* @param {boolean} [rightNow] - Entity insertion option. False is deafult.
|
|
122
122
|
* @returns {layer.Vector} - Returns this layer.
|
|
123
123
|
*/
|
|
124
|
-
public insert(entity: Entity, index: number, rightNow?: boolean):
|
|
124
|
+
public insert(entity: Entity, index: number, rightNow?: boolean): layer.Vector;
|
|
125
125
|
_proceedEntity(entity: any, rightNow: any): void;
|
|
126
126
|
/**
|
|
127
127
|
* Adds entity array to the layer.
|
|
@@ -130,7 +130,7 @@ export class Vector extends Layer {
|
|
|
130
130
|
* @param {boolean} [rightNow] - Entity insertion option. False is deafult.
|
|
131
131
|
* @returns {layer.Vector} - Returns this layer.
|
|
132
132
|
*/
|
|
133
|
-
public addEntities(entities: Array<Entity>, rightNow?: boolean):
|
|
133
|
+
public addEntities(entities: Array<Entity>, rightNow?: boolean): layer.Vector;
|
|
134
134
|
/**
|
|
135
135
|
* Remove entity from layer.
|
|
136
136
|
* TODO: memory leaks.
|
|
@@ -138,7 +138,7 @@ export class Vector extends Layer {
|
|
|
138
138
|
* @param {Entity} entity - Entity to remove.
|
|
139
139
|
* @returns {layer.Vector} - Returns this layer.
|
|
140
140
|
*/
|
|
141
|
-
public removeEntity(entity: Entity):
|
|
141
|
+
public removeEntity(entity: Entity): layer.Vector;
|
|
142
142
|
/**
|
|
143
143
|
* Refresh collected entities indexes from startIndex entitytes collection array position.
|
|
144
144
|
* @public
|
|
@@ -151,7 +151,7 @@ export class Vector extends Layer {
|
|
|
151
151
|
* @param {Array.<Entity>} entities - Entity array.
|
|
152
152
|
* @returns {layer.Vector} - Returns this layer.
|
|
153
153
|
*/
|
|
154
|
-
public removeEntities(entities: Array<Entity>):
|
|
154
|
+
public removeEntities(entities: Array<Entity>): layer.Vector;
|
|
155
155
|
/**
|
|
156
156
|
* Sets scale by distance parameters.
|
|
157
157
|
* @public
|
|
@@ -160,7 +160,7 @@ export class Vector extends Layer {
|
|
|
160
160
|
* @param {number} [farInvisible] - Entity visibility distance.
|
|
161
161
|
* @returns {layer.Vector} -
|
|
162
162
|
*/
|
|
163
|
-
public setScaleByDistance(near: number, far: number, farInvisible?: number):
|
|
163
|
+
public setScaleByDistance(near: number, far: number, farInvisible?: number): layer.Vector;
|
|
164
164
|
/**
|
|
165
165
|
* Safety entities loop.
|
|
166
166
|
* @public
|
|
@@ -173,7 +173,7 @@ export class Vector extends Layer {
|
|
|
173
173
|
* @param {Array.<Entity>} entities - New entity array.
|
|
174
174
|
* @returns {layer.Vector} - Returns layer instance.
|
|
175
175
|
*/
|
|
176
|
-
public setEntities(entities: Array<Entity>):
|
|
176
|
+
public setEntities(entities: Array<Entity>): layer.Vector;
|
|
177
177
|
_createEntityCollectionsTree(entitiesForTree: any): void;
|
|
178
178
|
_bindEventsDefault(entityCollection: any): void;
|
|
179
179
|
_collectStripCollectionPASS(outArr: any): void;
|
|
@@ -188,13 +188,13 @@ export class Vector extends Layer {
|
|
|
188
188
|
* @virtual
|
|
189
189
|
* @param {Segment.Material} material - Current material.
|
|
190
190
|
*/
|
|
191
|
-
public loadMaterial(material:
|
|
191
|
+
public loadMaterial(material: Segment.Material): void;
|
|
192
192
|
/**
|
|
193
193
|
* Abort exact material loading.
|
|
194
194
|
* @public
|
|
195
195
|
* @param {Material} material - Segment material.
|
|
196
196
|
*/
|
|
197
|
-
public abortMaterialLoading(material:
|
|
197
|
+
public abortMaterialLoading(material: Material): void;
|
|
198
198
|
applyMaterial(material: any): number[];
|
|
199
199
|
clearMaterial(material: any): void;
|
|
200
200
|
update(): void;
|
package/types/layer/XYZ.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export class XYZ extends Layer {
|
|
|
91
91
|
* @virtual
|
|
92
92
|
* @param {Material} material - Loads current material.
|
|
93
93
|
*/
|
|
94
|
-
public loadMaterial(material:
|
|
94
|
+
public loadMaterial(material: Material, forceLoading: any): void;
|
|
95
95
|
/**
|
|
96
96
|
* Creates query url.
|
|
97
97
|
* @protected
|
|
@@ -99,7 +99,7 @@ export class XYZ extends Layer {
|
|
|
99
99
|
* @param {Segment} segment - Creates specific url for current segment.
|
|
100
100
|
* @returns {String} - Returns url string.
|
|
101
101
|
*/
|
|
102
|
-
protected _createUrl(segment:
|
|
102
|
+
protected _createUrl(segment: Segment): string;
|
|
103
103
|
_getSubdomain(): any;
|
|
104
104
|
/**
|
|
105
105
|
* Returns actual url query string.
|
|
@@ -107,7 +107,7 @@ export class XYZ extends Layer {
|
|
|
107
107
|
* @param {Segment} segment - Segment that loads image data.
|
|
108
108
|
* @returns {string} - Url string.
|
|
109
109
|
*/
|
|
110
|
-
protected _getHTTPRequestString(segment:
|
|
110
|
+
protected _getHTTPRequestString(segment: Segment): string;
|
|
111
111
|
/**
|
|
112
112
|
* Sets url rewrite callback, used for custom url rewriting for every tile laoding.
|
|
113
113
|
* @public
|
|
@@ -24,7 +24,7 @@ export class LightSource {
|
|
|
24
24
|
* @protected
|
|
25
25
|
* @type {RenderNode}
|
|
26
26
|
*/
|
|
27
|
-
protected _renderNode:
|
|
27
|
+
protected _renderNode: RenderNode;
|
|
28
28
|
/**
|
|
29
29
|
* Light position.
|
|
30
30
|
* @protected
|
|
@@ -132,11 +132,11 @@ export class LightSource {
|
|
|
132
132
|
*/
|
|
133
133
|
public setSpecular3v(rgb: Vec3): LightSource;
|
|
134
134
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
* Set ambient color.
|
|
136
|
+
* @public
|
|
137
|
+
* @param {Vec3} rgb - Ambient color.
|
|
138
|
+
* @returns {LightSource}
|
|
139
|
+
*/
|
|
140
140
|
public setAmbient(r: any, g: any, b: any): LightSource;
|
|
141
141
|
/**
|
|
142
142
|
* Set diffuse color.
|
|
@@ -168,7 +168,7 @@ export class LightSource {
|
|
|
168
168
|
* @param {RenderNode} renderNode - Render node scene.
|
|
169
169
|
* @returns {LightSource}
|
|
170
170
|
*/
|
|
171
|
-
public addTo(renderNode:
|
|
171
|
+
public addTo(renderNode: RenderNode): LightSource;
|
|
172
172
|
/**
|
|
173
173
|
* Removes from render node scene.
|
|
174
174
|
* @public
|
package/types/math/Plane.d.ts
CHANGED
|
@@ -13,6 +13,6 @@ export class Plane {
|
|
|
13
13
|
distance(p: any): any;
|
|
14
14
|
getProjection(v: any, def: any): Vec3;
|
|
15
15
|
getProjectionPoint(p: any, vh: any): any;
|
|
16
|
-
getIntersection(Pn1: any, Pn2: any, L: any):
|
|
16
|
+
getIntersection(Pn1: any, Pn2: any, L: any): 0 | 1 | 2;
|
|
17
17
|
}
|
|
18
18
|
import { Vec3 } from "./Vec3.js";
|
package/types/math/Ray.d.ts
CHANGED
package/types/math/Vec2.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {number} [y] - Second value.
|
|
6
6
|
* @returns {math.Vec2}
|
|
7
7
|
*/
|
|
8
|
-
export function vec2(x?: number, y?: number):
|
|
8
|
+
export function vec2(x?: number, y?: number): math.Vec2;
|
|
9
9
|
/**
|
|
10
10
|
* Class represents a 3d vector.
|
|
11
11
|
* @class
|
|
@@ -30,7 +30,7 @@ export class Vec2 {
|
|
|
30
30
|
* @param {math.Vec2} b - Second vector.
|
|
31
31
|
* @returns {math.Vec2} - Summary vector.
|
|
32
32
|
*/
|
|
33
|
-
static add(a:
|
|
33
|
+
static add(a: math.Vec2, b: math.Vec2): math.Vec2;
|
|
34
34
|
/**
|
|
35
35
|
* Returns two vectors subtraction.
|
|
36
36
|
* @static
|
|
@@ -38,7 +38,7 @@ export class Vec2 {
|
|
|
38
38
|
* @param {math.Vec2} b - Second vector.
|
|
39
39
|
* @returns {math.Vec2} - Vectors subtraction.
|
|
40
40
|
*/
|
|
41
|
-
static sub(a:
|
|
41
|
+
static sub(a: math.Vec2, b: math.Vec2): math.Vec2;
|
|
42
42
|
/**
|
|
43
43
|
* Returns scaled vector.
|
|
44
44
|
* @static
|
|
@@ -46,7 +46,7 @@ export class Vec2 {
|
|
|
46
46
|
* @param {number} scale - Scale value.
|
|
47
47
|
* @returns {math.Vec2}
|
|
48
48
|
*/
|
|
49
|
-
static scale(a:
|
|
49
|
+
static scale(a: math.Vec2, scale: number): math.Vec2;
|
|
50
50
|
/**
|
|
51
51
|
* Returns two vectors production.
|
|
52
52
|
* @static
|
|
@@ -54,7 +54,7 @@ export class Vec2 {
|
|
|
54
54
|
* @param {math.Vec2} b - Second vector.
|
|
55
55
|
* @returns {math.Vec2}
|
|
56
56
|
*/
|
|
57
|
-
static mul(a:
|
|
57
|
+
static mul(a: math.Vec2, b: math.Vec2): math.Vec2;
|
|
58
58
|
/**
|
|
59
59
|
* Returns vector components division product one to another.
|
|
60
60
|
* @static
|
|
@@ -62,7 +62,7 @@ export class Vec2 {
|
|
|
62
62
|
* @param {math.Vec2} b - Second vector.
|
|
63
63
|
* @returns {math.Vec2}
|
|
64
64
|
*/
|
|
65
|
-
static div(a:
|
|
65
|
+
static div(a: math.Vec2, b: math.Vec2): math.Vec2;
|
|
66
66
|
/**
|
|
67
67
|
* Get projection of the first vector to the second.
|
|
68
68
|
* @static
|
|
@@ -70,7 +70,7 @@ export class Vec2 {
|
|
|
70
70
|
* @param {math.Vec2} a - Second vector.
|
|
71
71
|
* @returns {math.Vec2}
|
|
72
72
|
*/
|
|
73
|
-
static proj_b_to_a(b:
|
|
73
|
+
static proj_b_to_a(b: math.Vec2, a: math.Vec2): math.Vec2;
|
|
74
74
|
/**
|
|
75
75
|
* Gets angle between two vectors.
|
|
76
76
|
* @static
|
|
@@ -78,7 +78,7 @@ export class Vec2 {
|
|
|
78
78
|
* @param {math.Vec2} b - Second vector.
|
|
79
79
|
* @returns {number}
|
|
80
80
|
*/
|
|
81
|
-
static angle(a:
|
|
81
|
+
static angle(a: math.Vec2, b: math.Vec2): number;
|
|
82
82
|
/**
|
|
83
83
|
* Makes vectors normalized and orthogonal to each other.
|
|
84
84
|
* @static
|
|
@@ -86,7 +86,7 @@ export class Vec2 {
|
|
|
86
86
|
* @param {math.Vec2} tangent - Tangent vector.
|
|
87
87
|
* @returns {math.Vec2}
|
|
88
88
|
*/
|
|
89
|
-
static orthoNormalize(normal:
|
|
89
|
+
static orthoNormalize(normal: math.Vec2, tangent: math.Vec2): math.Vec2;
|
|
90
90
|
static get LERP_DELTA(): number;
|
|
91
91
|
constructor(x: any, y: any);
|
|
92
92
|
/**
|
|
@@ -110,20 +110,20 @@ export class Vec2 {
|
|
|
110
110
|
* @public
|
|
111
111
|
* @returns {math.Vec2}
|
|
112
112
|
*/
|
|
113
|
-
public clone():
|
|
113
|
+
public clone(): math.Vec2;
|
|
114
114
|
/**
|
|
115
115
|
* Compares with vector. Returns true if it equals another.
|
|
116
116
|
* @public
|
|
117
117
|
* @param {math.Vec2} p - Vector to compare.
|
|
118
118
|
* @returns {boolean}
|
|
119
119
|
*/
|
|
120
|
-
public equal(p:
|
|
120
|
+
public equal(p: math.Vec2): boolean;
|
|
121
121
|
/**
|
|
122
122
|
* Copy input vector's values.
|
|
123
123
|
* @param {math.Vec2} point2 - Vector to copy.
|
|
124
124
|
* @returns {math.Vec2}
|
|
125
125
|
*/
|
|
126
|
-
copy(point2:
|
|
126
|
+
copy(point2: math.Vec2): math.Vec2;
|
|
127
127
|
/**
|
|
128
128
|
* Gets vector's length.
|
|
129
129
|
* @public
|
|
@@ -142,70 +142,70 @@ export class Vec2 {
|
|
|
142
142
|
* @param {math.Vec2}
|
|
143
143
|
* @returns {math.Vec2}
|
|
144
144
|
*/
|
|
145
|
-
public addA(v: any):
|
|
145
|
+
public addA(v: any): math.Vec2;
|
|
146
146
|
/**
|
|
147
147
|
* Summarize two vectors.
|
|
148
148
|
* @public
|
|
149
149
|
* @param {math.Vec2}
|
|
150
150
|
* @returns {math.Vec2}
|
|
151
151
|
*/
|
|
152
|
-
public add(v: any):
|
|
152
|
+
public add(v: any): math.Vec2;
|
|
153
153
|
/**
|
|
154
154
|
* Subtract vector from the current where results saved on the current instance.
|
|
155
155
|
* @public
|
|
156
156
|
* @param {math.Vec2} v - Subtract vector.
|
|
157
157
|
* @returns {math.Vec2}
|
|
158
158
|
*/
|
|
159
|
-
public subA(v:
|
|
159
|
+
public subA(v: math.Vec2): math.Vec2;
|
|
160
160
|
/**
|
|
161
161
|
* Subtract vector from the current.
|
|
162
162
|
* @public
|
|
163
163
|
* @param {math.Vec2} v - Subtract vector.
|
|
164
164
|
* @returns {math.Vec2}
|
|
165
165
|
*/
|
|
166
|
-
public sub(v:
|
|
166
|
+
public sub(v: math.Vec2): math.Vec2;
|
|
167
167
|
/**
|
|
168
168
|
* Scale current vector.
|
|
169
169
|
* @public
|
|
170
170
|
* @param {number} scale - Scale value.
|
|
171
171
|
* @returns {math.Vec2}
|
|
172
172
|
*/
|
|
173
|
-
public scale(scale: number):
|
|
173
|
+
public scale(scale: number): math.Vec2;
|
|
174
174
|
/**
|
|
175
175
|
* Scale current vector to another instance.
|
|
176
176
|
* @public
|
|
177
177
|
* @param {number} scale - Scale value.
|
|
178
178
|
* @returns {math.Vec2}
|
|
179
179
|
*/
|
|
180
|
-
public scaleTo(scale: number):
|
|
180
|
+
public scaleTo(scale: number): math.Vec2;
|
|
181
181
|
/**
|
|
182
182
|
* Multiply current vector object to another and store result in the current instance.
|
|
183
183
|
* @public
|
|
184
184
|
* @param {math.Vec2} vec - Multiply vector.
|
|
185
185
|
* @returns {math.Vec2}
|
|
186
186
|
*/
|
|
187
|
-
public mulA(vec:
|
|
187
|
+
public mulA(vec: math.Vec2): math.Vec2;
|
|
188
188
|
/**
|
|
189
189
|
* Multiply current vector object to another and returns new vector instance.
|
|
190
190
|
* @public
|
|
191
191
|
* @param {math.Vec2} vec - Multiply vector.
|
|
192
192
|
* @returns {math.Vec2}
|
|
193
193
|
*/
|
|
194
|
-
public mul(vec:
|
|
194
|
+
public mul(vec: math.Vec2): math.Vec2;
|
|
195
195
|
/**
|
|
196
196
|
* Divide current vector's components to another. Results stores in the current vector object.
|
|
197
197
|
* @public
|
|
198
198
|
* @param {math.Vec2}
|
|
199
199
|
* @returns {math.Vec2}
|
|
200
200
|
*/
|
|
201
|
-
public divA(vec: any):
|
|
201
|
+
public divA(vec: any): math.Vec2;
|
|
202
202
|
/**
|
|
203
203
|
* Gets vectors dot production.
|
|
204
204
|
* @public
|
|
205
205
|
* @param {math.Vec2} v - Another vector.
|
|
206
206
|
* @returns {number}
|
|
207
207
|
*/
|
|
208
|
-
public dot(v:
|
|
208
|
+
public dot(v: math.Vec2): number;
|
|
209
209
|
/**
|
|
210
210
|
* Gets vectors dot production.
|
|
211
211
|
* @public
|
|
@@ -219,25 +219,25 @@ export class Vec2 {
|
|
|
219
219
|
* @param {math.Vec2} v - Another vector.
|
|
220
220
|
* @returns {math.Vec2}
|
|
221
221
|
*/
|
|
222
|
-
public cross(v:
|
|
222
|
+
public cross(v: math.Vec2): math.Vec2;
|
|
223
223
|
/**
|
|
224
224
|
* Sets vector to zero.
|
|
225
225
|
* @public
|
|
226
226
|
* @returns {math.Vec2}
|
|
227
227
|
*/
|
|
228
|
-
public clear():
|
|
228
|
+
public clear(): math.Vec2;
|
|
229
229
|
/**
|
|
230
230
|
* Returns normalized vector.
|
|
231
231
|
* @public
|
|
232
232
|
* @returns {math.Vec2}
|
|
233
233
|
*/
|
|
234
|
-
public normal():
|
|
234
|
+
public normal(): math.Vec2;
|
|
235
235
|
/**
|
|
236
236
|
* Normalize current vector.
|
|
237
237
|
* @public
|
|
238
238
|
* @returns {math.Vec2}
|
|
239
239
|
*/
|
|
240
|
-
public normalize():
|
|
240
|
+
public normalize(): math.Vec2;
|
|
241
241
|
/**
|
|
242
242
|
* Converts vector to a number array.
|
|
243
243
|
* @public
|
|
@@ -250,7 +250,7 @@ export class Vec2 {
|
|
|
250
250
|
* @param {math.Vec2} p - Distant point.
|
|
251
251
|
* @returns {number}
|
|
252
252
|
*/
|
|
253
|
-
public distance(p:
|
|
253
|
+
public distance(p: math.Vec2): number;
|
|
254
254
|
/**
|
|
255
255
|
* Sets vector's values.
|
|
256
256
|
* @public
|
|
@@ -258,19 +258,19 @@ export class Vec2 {
|
|
|
258
258
|
* @param {number} y - Value Y.
|
|
259
259
|
* @returns {math.Vec2}
|
|
260
260
|
*/
|
|
261
|
-
public set(x: number, y: number):
|
|
261
|
+
public set(x: number, y: number): math.Vec2;
|
|
262
262
|
/**
|
|
263
263
|
* Negate current vector.
|
|
264
264
|
* @public
|
|
265
265
|
* @returns {math.Vec2}
|
|
266
266
|
*/
|
|
267
|
-
public negate():
|
|
267
|
+
public negate(): math.Vec2;
|
|
268
268
|
/**
|
|
269
269
|
* Negate current vector to another instance.
|
|
270
270
|
* @public
|
|
271
271
|
* @returns {math.Vec2}
|
|
272
272
|
*/
|
|
273
|
-
public negateTo():
|
|
273
|
+
public negateTo(): math.Vec2;
|
|
274
274
|
/**
|
|
275
275
|
* Gets projected point coordinates of the current vector on the ray.
|
|
276
276
|
* @public
|
|
@@ -278,14 +278,14 @@ export class Vec2 {
|
|
|
278
278
|
* @param {math.Vec2} direction - Ray direction.
|
|
279
279
|
* @returns {math.Vec2}
|
|
280
280
|
*/
|
|
281
|
-
public projToRay(pos:
|
|
281
|
+
public projToRay(pos: math.Vec2, direction: math.Vec2): math.Vec2;
|
|
282
282
|
/**
|
|
283
283
|
* Gets angle between two vectors.
|
|
284
284
|
* @public
|
|
285
285
|
* @param {math.Vec2} a - Another vector.
|
|
286
286
|
* @returns {number}
|
|
287
287
|
*/
|
|
288
|
-
public angle(a:
|
|
288
|
+
public angle(a: math.Vec2): number;
|
|
289
289
|
/**
|
|
290
290
|
* Returns two vectors linear interpolation.
|
|
291
291
|
* @public
|
|
@@ -293,7 +293,7 @@ export class Vec2 {
|
|
|
293
293
|
* @param {number} l - Interpolate value.
|
|
294
294
|
* @returns {math.Vec2}
|
|
295
295
|
*/
|
|
296
|
-
public lerp(v1: any, v2:
|
|
296
|
+
public lerp(v1: any, v2: math.Vec2, l: number): math.Vec2;
|
|
297
297
|
/**
|
|
298
298
|
* Spherically interpolates between two vectors.
|
|
299
299
|
* Interpolates between current and v2 vector by amount t. The difference between this and linear interpolation (aka, "lerp") is that
|
|
@@ -304,6 +304,6 @@ export class Vec2 {
|
|
|
304
304
|
* @param {number} t - The parameter t is clamped to the range [0, 1].
|
|
305
305
|
* @returns {math.Vec2}
|
|
306
306
|
*/
|
|
307
|
-
public slerp(v2:
|
|
307
|
+
public slerp(v2: math.Vec2, t: number): math.Vec2;
|
|
308
308
|
}
|
|
309
309
|
import { Vec3 } from "./Vec3.js";
|
package/types/math/Vec3.d.ts
CHANGED
|
@@ -122,7 +122,7 @@ export class Vec3 {
|
|
|
122
122
|
* @static
|
|
123
123
|
* @param {Vec3} b - Vector to project.
|
|
124
124
|
* @param {Vec3} n - Plane normal.
|
|
125
|
-
|
|
125
|
+
* @param {Vec3} [def] - Default value for non existed result.
|
|
126
126
|
* @returns {Vec3} -
|
|
127
127
|
*/
|
|
128
128
|
static proj_b_to_plane(b: Vec3, n: Vec3, def?: Vec3): Vec3;
|
package/types/math/Vec4.d.ts
CHANGED
package/types/math/coder.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param {number} v - 32 bit float value.
|
|
5
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
|
package/types/math.d.ts
CHANGED
|
@@ -156,7 +156,7 @@ export function bezier1v(t: any, p0: any, p1: any, p2: any, p3: any): number;
|
|
|
156
156
|
* @param {Vec3} p3 - Fourth control point.
|
|
157
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/proj/Proj.d.ts
CHANGED
|
@@ -25,13 +25,13 @@ export class Proj {
|
|
|
25
25
|
* @public
|
|
26
26
|
* @type {proj.Units}
|
|
27
27
|
*/
|
|
28
|
-
public units:
|
|
28
|
+
public units: proj.Units;
|
|
29
29
|
/**
|
|
30
30
|
* Projection identifier, especially usefull for comparison.
|
|
31
31
|
* @const
|
|
32
32
|
* @type {integer}
|
|
33
33
|
*/
|
|
34
|
-
id:
|
|
34
|
+
id: integer;
|
|
35
35
|
/**
|
|
36
36
|
* Compare projections.
|
|
37
37
|
* @public
|
package/types/quadTree/Node.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export class Node {
|
|
|
37
37
|
* @param {Number} side - Neighbour side index e.g. og.quadTree.N, og.quadTree.W etc.
|
|
38
38
|
* @returns {quadTree.Node} -
|
|
39
39
|
*/
|
|
40
|
-
public getEqualNeighbor(side: number):
|
|
40
|
+
public getEqualNeighbor(side: number): quadTree.Node;
|
|
41
41
|
isBrother(node: any): boolean;
|
|
42
42
|
renderTree(cam: any, maxZoom: any, terrainReadySegment: any, stopLoading: any): void;
|
|
43
43
|
traverseNodes(cam: any, maxZoom: any, terrainReadySegment: any, stopLoading: any): void;
|
|
@@ -44,7 +44,7 @@ export class Renderer {
|
|
|
44
44
|
* @public
|
|
45
45
|
* @type {Handler}
|
|
46
46
|
*/
|
|
47
|
-
public handler:
|
|
47
|
+
public handler: Handler;
|
|
48
48
|
exposure: number;
|
|
49
49
|
gamma: number;
|
|
50
50
|
whitepoint: number;
|
|
@@ -136,15 +136,16 @@ export class Renderer {
|
|
|
136
136
|
* @protected
|
|
137
137
|
* @type {utils.TextureAtlas}
|
|
138
138
|
*/
|
|
139
|
-
protected billboardsTextureAtlas:
|
|
139
|
+
protected billboardsTextureAtlas: utils.TextureAtlas;
|
|
140
140
|
/**
|
|
141
141
|
* Texture font atlas for the font families and styles. One atlas per node.
|
|
142
142
|
* @public
|
|
143
143
|
* @type {utils.FontAtlas}
|
|
144
144
|
*/
|
|
145
|
-
public fontAtlas:
|
|
145
|
+
public fontAtlas: utils.FontAtlas;
|
|
146
146
|
_entityCollections: any[];
|
|
147
147
|
_currentOutput: string;
|
|
148
|
+
labelWorker: LabelWorker;
|
|
148
149
|
/**
|
|
149
150
|
* Sets renderer events activity.
|
|
150
151
|
* @param {Boolean} activity - Events activity.
|
|
@@ -195,22 +196,22 @@ export class Renderer {
|
|
|
195
196
|
* @public
|
|
196
197
|
* @returns {math.Vec2} -
|
|
197
198
|
*/
|
|
198
|
-
public getCenter():
|
|
199
|
+
public getCenter(): math.Vec2;
|
|
199
200
|
/**
|
|
200
201
|
* Add the given control to the renderer.
|
|
201
202
|
* @param {control.Control} control - Control.
|
|
202
203
|
*/
|
|
203
|
-
addControl(control:
|
|
204
|
+
addControl(control: control.Control): void;
|
|
204
205
|
/**
|
|
205
206
|
* Add the given controls array to the planet node.
|
|
206
207
|
* @param {Array.<control.Control>} cArr - Control array.
|
|
207
208
|
*/
|
|
208
|
-
addControls(cArr: Array<
|
|
209
|
+
addControls(cArr: Array<control.Control>): void;
|
|
209
210
|
/**
|
|
210
211
|
* Remove control from the renderer.
|
|
211
212
|
* @param {control.Control} control - Control.
|
|
212
213
|
*/
|
|
213
|
-
removeControl(control:
|
|
214
|
+
removeControl(control: control.Control): void;
|
|
214
215
|
/**
|
|
215
216
|
* Renderer initialization.
|
|
216
217
|
* @public
|
|
@@ -240,19 +241,19 @@ export class Renderer {
|
|
|
240
241
|
* @public
|
|
241
242
|
* @param {RenderNode} renderNode - Render node.
|
|
242
243
|
*/
|
|
243
|
-
public addNode(renderNode:
|
|
244
|
+
public addNode(renderNode: RenderNode): void;
|
|
244
245
|
/**
|
|
245
246
|
* Adds render node to the renderer before specific node.
|
|
246
247
|
* @public
|
|
247
248
|
* @param {RenderNode} renderNode - Render node.
|
|
248
249
|
*/
|
|
249
|
-
public addNodeBefore(renderNode:
|
|
250
|
+
public addNodeBefore(renderNode: RenderNode, renderNodeBefore: any): void;
|
|
250
251
|
/**
|
|
251
252
|
* Adds render nodes array to the renderer.
|
|
252
253
|
* @public
|
|
253
254
|
* @param {Array.<scene.RenderNode>} nodesArr - Render nodes array.
|
|
254
255
|
*/
|
|
255
|
-
public addNodes(nodesArr: Array<
|
|
256
|
+
public addNodes(nodesArr: Array<scene.RenderNode>): void;
|
|
256
257
|
getMaxMSAA(internalFormat: any): any;
|
|
257
258
|
getMSAA(): any;
|
|
258
259
|
/**
|
|
@@ -296,3 +297,4 @@ import { Camera } from "../camera/Camera.js";
|
|
|
296
297
|
import { RendererEvents } from "./RendererEvents.js";
|
|
297
298
|
import { Framebuffer } from "../webgl/index.js";
|
|
298
299
|
import { Multisample } from "../webgl/index.js";
|
|
300
|
+
import { LabelWorker } from "../entity/LabelWorker.js";
|
|
@@ -18,20 +18,20 @@ export class BaseNode {
|
|
|
18
18
|
* @public
|
|
19
19
|
* @type {RenderNode}
|
|
20
20
|
*/
|
|
21
|
-
public topNode:
|
|
21
|
+
public topNode: RenderNode;
|
|
22
22
|
_dictionary: BaseNode[];
|
|
23
23
|
/**
|
|
24
24
|
* Children nodes.
|
|
25
25
|
* @public
|
|
26
26
|
* @type {Array.<RenderNode>}
|
|
27
27
|
*/
|
|
28
|
-
public childNodes: Array<
|
|
28
|
+
public childNodes: Array<RenderNode>;
|
|
29
29
|
/**
|
|
30
30
|
* Parent node pointer.
|
|
31
31
|
* @public
|
|
32
32
|
* @type {RenderNode}
|
|
33
33
|
*/
|
|
34
|
-
public parentNode:
|
|
34
|
+
public parentNode: RenderNode;
|
|
35
35
|
__staticId: number;
|
|
36
36
|
/**
|
|
37
37
|
* Adds node to the current hierarchy.
|
|
@@ -50,7 +50,7 @@ export class BaseNode {
|
|
|
50
50
|
* @param {string} name - Node name.
|
|
51
51
|
* @return {RenderNode} Node object in the current node.
|
|
52
52
|
*/
|
|
53
|
-
public getNodeByName(name: string):
|
|
53
|
+
public getNodeByName(name: string): RenderNode;
|
|
54
54
|
/**
|
|
55
55
|
* Clear current node.
|
|
56
56
|
* @protected
|