@openglobus/og 0.12.4 → 0.13.2
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 +887 -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 +607 -603
- package/src/og/shaders/label.js +576 -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/types/bv/Box.d.ts
CHANGED
package/types/bv/Sphere.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @param {number} [options.viewAngle=37] - Camera angle of view. Default is 35.0
|
|
9
9
|
* @param {number} [options.near] - Camera near plane distance. Default is 1.0
|
|
10
10
|
* @param {number} [options.far] - Camera far plane distance. Deafult is og.math.MAX
|
|
11
|
-
* @param {number} [options.minAltitude] - Minimal altitude for the camera. Deafult is
|
|
11
|
+
* @param {number} [options.minAltitude] - Minimal altitude for the camera. Deafult is 5
|
|
12
12
|
* @param {number} [options.maxAltitude] - Maximal altitude for the camera. Deafult is 20000000
|
|
13
13
|
* @param {Vec3} [options.eye] - Camera eye position. Default (0,0,0)
|
|
14
14
|
* @param {Vec3} [options.look] - Camera look position. Default (0,0,0)
|
|
@@ -153,8 +153,8 @@ export class PlanetCamera extends Camera {
|
|
|
153
153
|
* @param {cameraCallback} [startCallback] - Callback that calls befor the flying begins.
|
|
154
154
|
* @param [frameCallback]
|
|
155
155
|
*/
|
|
156
|
-
public flyCartesian(cartesian: Vec3, look?: Vec3, up?: Vec3, ampl?: number, completeCallback?: cameraCallback, startCallback?: cameraCallback, frameCallback?:
|
|
157
|
-
_frameCallback:
|
|
156
|
+
public flyCartesian(cartesian: Vec3, look?: Vec3, up?: Vec3, ampl?: number, completeCallback?: cameraCallback, startCallback?: cameraCallback, frameCallback?: () => void): void;
|
|
157
|
+
_frameCallback: () => void;
|
|
158
158
|
/**
|
|
159
159
|
* Flies to the geo coordiantes.
|
|
160
160
|
* @public
|
|
@@ -12,7 +12,7 @@ export class LayerSwitcher extends Control {
|
|
|
12
12
|
overlaysDiv: HTMLDivElement;
|
|
13
13
|
onLayerAdded(layer: any): void;
|
|
14
14
|
onLayerRemoved(layer: any): void;
|
|
15
|
-
addSwitcher(type: any, obj: any, container: any, id
|
|
15
|
+
addSwitcher(type: any, obj: any, container: any, id?: string): void;
|
|
16
16
|
createBaseLayersContainer(): void;
|
|
17
17
|
createOverlaysContainer(): void;
|
|
18
18
|
createDialog(): void;
|
|
@@ -114,10 +114,17 @@ export class Ellipsoid {
|
|
|
114
114
|
* Gets ellipsoid surface normal.
|
|
115
115
|
* @public
|
|
116
116
|
* @param {Vec3} coord - Spatial coordiantes.
|
|
117
|
-
* @
|
|
117
|
+
* @return {Vec3} -
|
|
118
118
|
*/
|
|
119
119
|
public getSurfaceNormal3v(coord: Vec3): Vec3;
|
|
120
|
-
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @param {LonLat} lonLat1
|
|
123
|
+
* @param {number} [bearing]
|
|
124
|
+
* @param {number} [distance]
|
|
125
|
+
* @return {LonLat} -
|
|
126
|
+
*/
|
|
127
|
+
getBearingDestination(lonLat1: LonLat, bearing?: number, distance?: number): LonLat;
|
|
121
128
|
/**
|
|
122
129
|
* Returns the distance from one point to another(using haversine formula) on the great circle.
|
|
123
130
|
* @param {LonLat} lonLat1 - Longitude/latitude of source point.
|
|
@@ -24,7 +24,6 @@ export class BillboardHandler {
|
|
|
24
24
|
_rotationBuffer: any;
|
|
25
25
|
_texCoordBuffer: any;
|
|
26
26
|
_vertexBuffer: any;
|
|
27
|
-
_alignedAxisBuffer: any;
|
|
28
27
|
_texCoordArr: Float32Array;
|
|
29
28
|
_vertexArr: Float32Array;
|
|
30
29
|
_positionHighArr: Float32Array;
|
|
@@ -33,7 +32,6 @@ export class BillboardHandler {
|
|
|
33
32
|
_offsetArr: Float32Array;
|
|
34
33
|
_rgbaArr: Float32Array;
|
|
35
34
|
_rotationArr: Float32Array;
|
|
36
|
-
_alignedAxisArr: Float32Array;
|
|
37
35
|
_pickingColorBuffer: any;
|
|
38
36
|
_pickingColorArr: Float32Array;
|
|
39
37
|
_buffersUpdateCallbacks: (() => void)[];
|
|
@@ -65,7 +63,6 @@ export class BillboardHandler {
|
|
|
65
63
|
setTexCoordArr(index: any, tcoordArr: any): void;
|
|
66
64
|
setVisibility(index: any, visibility: any): void;
|
|
67
65
|
setVertexArr(index: any, vertexArr: any): void;
|
|
68
|
-
setAlignedAxisArr(index: any, alignedAxis: any): void;
|
|
69
66
|
createPositionBuffer(): void;
|
|
70
67
|
createSizeBuffer(): void;
|
|
71
68
|
createOffsetBuffer(): void;
|
|
@@ -73,7 +70,6 @@ export class BillboardHandler {
|
|
|
73
70
|
createRotationBuffer(): void;
|
|
74
71
|
createVertexBuffer(): void;
|
|
75
72
|
createTexCoordBuffer(): void;
|
|
76
|
-
createAlignedAxisBuffer(): void;
|
|
77
73
|
createPickingColorBuffer(): void;
|
|
78
74
|
refreshTexCoordsArr(): void;
|
|
79
75
|
}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* Third index - far distance to the entity, when entity becomes invisible.
|
|
12
12
|
* @param {number} [options.opacity] - Entity global opacity.
|
|
13
13
|
* @param {boolean} [options.pickingEnabled=true] - Entity picking enable.
|
|
14
|
-
* @param {Number} [options.polygonOffsetFactor=0.0] - The scale factor for the variable depth offset. The default value is 0.
|
|
15
14
|
* @param {Number} [options.polygonOffsetUnits=0.0] - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. The default value is 0.
|
|
16
15
|
* @fires og.EntityCollection#entitymove
|
|
17
16
|
* @fires og.EntityCollection#draw
|
|
@@ -75,12 +74,6 @@ export class EntityCollection {
|
|
|
75
74
|
* @type {boolean}
|
|
76
75
|
*/
|
|
77
76
|
protected _visibility: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Specifies the scale factor for gl.polygonOffset function to calculate depth values, 0.0 is default.
|
|
80
|
-
* @public
|
|
81
|
-
* @type {Number}
|
|
82
|
-
*/
|
|
83
|
-
public polygonOffsetFactor: number;
|
|
84
77
|
/**
|
|
85
78
|
* Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
|
|
86
79
|
* @public
|
|
@@ -169,7 +162,6 @@ export class EntityCollection {
|
|
|
169
162
|
*/
|
|
170
163
|
public events: Events;
|
|
171
164
|
rendererEvents: Events;
|
|
172
|
-
setPolygonOffset(factor: any, units: any): void;
|
|
173
165
|
/**
|
|
174
166
|
* Sets collection visibility.
|
|
175
167
|
* @public
|
|
@@ -7,12 +7,10 @@ export class LabelHandler extends BillboardHandler {
|
|
|
7
7
|
constructor(entityCollection: any, maxLetters?: any);
|
|
8
8
|
_gliphParamBuffer: any;
|
|
9
9
|
_fontIndexBuffer: any;
|
|
10
|
-
_noOutlineBuffer: any;
|
|
11
10
|
_outlineBuffer: any;
|
|
12
11
|
_outlineColorBuffer: any;
|
|
13
12
|
_gliphParamArr: Float32Array;
|
|
14
13
|
_fontIndexArr: Float32Array;
|
|
15
|
-
_noOutlineArr: Float32Array;
|
|
16
14
|
_outlineArr: Float32Array;
|
|
17
15
|
_outlineColorArr: Float32Array;
|
|
18
16
|
_maxLetters: any;
|
|
@@ -160,7 +160,7 @@ export class Polyline {
|
|
|
160
160
|
*/
|
|
161
161
|
protected _setEqualPathLonLat(pathLonLat: LonLat[]): void;
|
|
162
162
|
setPointLonLat(lonlat: any, index: any, segmentIndex: any): void;
|
|
163
|
-
setPoint3v(coordinates: any, index
|
|
163
|
+
setPoint3v(coordinates: any, index?: number, segmentIndex?: number, skipLonLat?: boolean): void;
|
|
164
164
|
_resizePathLengths(index?: number): void;
|
|
165
165
|
removeSegment(index: any): void;
|
|
166
166
|
removePoint(index: any, multiLineIndex?: number): void;
|
package/types/layer/KML.d.ts
CHANGED
|
@@ -10,26 +10,26 @@ export class KML extends Vector {
|
|
|
10
10
|
*/
|
|
11
11
|
_color: string;
|
|
12
12
|
/**
|
|
13
|
-
* @
|
|
13
|
+
* @public
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
public _extractCoordonatesFromKml(xmlDoc: any): any[];
|
|
16
16
|
/**
|
|
17
17
|
* Creates billboards or polylines from array of lonlat.
|
|
18
|
-
* @
|
|
18
|
+
* @public
|
|
19
19
|
* @param {Array} coordonates
|
|
20
20
|
* @param {string} color
|
|
21
21
|
* @returns {Array<Entity>}
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
public _convertCoordonatesIntoEntities(coordinates: any, color: string, billboard: any): Array<Entity>;
|
|
24
24
|
/**
|
|
25
|
-
* @
|
|
25
|
+
* @public
|
|
26
26
|
* @returns {Document}
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
public _getXmlContent(file: any): Document;
|
|
29
29
|
/**
|
|
30
|
-
* @
|
|
30
|
+
* @public
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
public _expandExtents(extent1: any, extent2: any): any;
|
|
33
33
|
/**
|
|
34
34
|
* @public
|
|
35
35
|
* @param {File[]} kmls
|
|
@@ -47,9 +47,9 @@ export class KML extends Vector {
|
|
|
47
47
|
*/
|
|
48
48
|
public setColor(color: string): void;
|
|
49
49
|
/**
|
|
50
|
-
* @
|
|
50
|
+
* @public
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
public _getKmlFromUrl(url: any): Promise<any>;
|
|
53
53
|
/**
|
|
54
54
|
* @public
|
|
55
55
|
* @param {string} url - Url of the KML to display. './myFile.kml' or 'http://mySite/myFile.kml' for example.
|
|
@@ -63,6 +63,6 @@ export class KML extends Vector {
|
|
|
63
63
|
}>;
|
|
64
64
|
}
|
|
65
65
|
import { Vector } from "./Vector.js";
|
|
66
|
-
import { Billboard } from "../entity/Billboard.js";
|
|
67
66
|
import { Entity } from "../entity/Entity.js";
|
|
67
|
+
import { Billboard } from "../entity/Billboard.js";
|
|
68
68
|
import { Extent } from "../Extent.js";
|
package/types/layer/Layer.d.ts
CHANGED
|
@@ -158,6 +158,7 @@ export class Layer {
|
|
|
158
158
|
protected _pickingColor: Vec3;
|
|
159
159
|
_pickingEnabled: any;
|
|
160
160
|
_isPreloadDone: boolean;
|
|
161
|
+
_preLoadZoomLevels: any;
|
|
161
162
|
/**
|
|
162
163
|
* Events handler.
|
|
163
164
|
* @public
|
|
@@ -279,6 +280,9 @@ export class Layer {
|
|
|
279
280
|
* @param {boolean} visibility - Layer visibility.
|
|
280
281
|
*/
|
|
281
282
|
public setVisibility(visibility: boolean): void;
|
|
283
|
+
_forceMaterialApply(segment: any): void;
|
|
284
|
+
_preLoadRecursive(node: any, maxZoom: any): void;
|
|
285
|
+
_preLoad(): void;
|
|
282
286
|
/**
|
|
283
287
|
* Gets layer visibility.
|
|
284
288
|
* @public
|
package/types/layer/Vector.d.ts
CHANGED
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
* @param {boolean} [options.async=true] - Asynchronous vector data handling before rendering. True for optimization huge data.
|
|
21
21
|
* @param {boolean} [options.clampToGround = false] - Clamp vector data to the ground.
|
|
22
22
|
* @param {boolean} [options.relativeToGround = false] - Place vector data relative to the ground relief.
|
|
23
|
-
* @param {Number} [options.
|
|
24
|
-
* @param {Number} [options.polygonOffsetUnits=-637000.0] - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset.
|
|
23
|
+
* @param {Number} [options.polygonOffsetUnits=0.0] - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset.
|
|
25
24
|
*
|
|
26
25
|
* @fires og.layer.Vector#entitymove
|
|
27
26
|
* @fires og.layer.Vector#draw
|
|
@@ -87,12 +86,6 @@ export class Vector extends Layer {
|
|
|
87
86
|
_counter: number;
|
|
88
87
|
_deferredEntitiesPendingQueue: QueueArray;
|
|
89
88
|
_pendingsQueue: any[];
|
|
90
|
-
/**
|
|
91
|
-
* Specifies the scale factor for gl.polygonOffset function to calculate depth values, 0.0 is default.
|
|
92
|
-
* @public
|
|
93
|
-
* @type {Number}
|
|
94
|
-
*/
|
|
95
|
-
public polygonOffsetFactor: number;
|
|
96
89
|
/**
|
|
97
90
|
* Specifies the scale Units for gl.polygonOffset function to calculate depth values, 0.0 is default.
|
|
98
91
|
* @public
|
package/types/math/Line2.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ export class Line2 {
|
|
|
2
2
|
static get(p0: any, p1: any): Line2;
|
|
3
3
|
static getParallel(l: any, p: any): Line2;
|
|
4
4
|
static getIntersection(L0: any, L1: any): Vec2;
|
|
5
|
-
constructor(a
|
|
6
|
-
a:
|
|
7
|
-
b:
|
|
8
|
-
c:
|
|
5
|
+
constructor(a?: number, b?: number, c?: number);
|
|
6
|
+
a: number;
|
|
7
|
+
b: number;
|
|
8
|
+
c: number;
|
|
9
9
|
intersects(l: any): Vec2;
|
|
10
10
|
}
|
|
11
11
|
import { Vec2 } from "./Vec2.js";
|
package/types/math/Ray.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export class Ray {
|
|
|
21
21
|
static get INPLANE(): number;
|
|
22
22
|
/** @const */
|
|
23
23
|
static get AWAY(): number;
|
|
24
|
-
constructor(origin
|
|
24
|
+
constructor(origin?: Vec3, direction?: Vec3);
|
|
25
25
|
/**
|
|
26
26
|
* The origin of the ray.
|
|
27
27
|
* @public
|
|
@@ -59,7 +59,7 @@ export class Ray {
|
|
|
59
59
|
* @returns {number} - Hit code, could 0 - og.Ray.OUTSIDE, 1 - og.Ray.INSIDE,
|
|
60
60
|
* 2 - og.Ray.INPLANE and 3 - og.Ray.AWAY(ray goes away from triangle).
|
|
61
61
|
*/
|
|
62
|
-
public hitTriangle(v0: Vec3, v1: Vec3, v2: Vec3, res: Vec3
|
|
62
|
+
public hitTriangle(v0: Vec3, v1: Vec3, v2: Vec3, res: Vec3): number;
|
|
63
63
|
/**
|
|
64
64
|
* Gets a ray hit a plane result. If the ray cross the plane returns 1 - og.Ray.INSIDE otherwise returns 0 - og.Ray.OUTSIDE.
|
|
65
65
|
* @public
|
package/types/math/Vec2.d.ts
CHANGED
package/types/math/Vec3.d.ts
CHANGED
package/types/math/Vec4.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class Vec4 {
|
|
|
30
30
|
* @returns {Vec4}
|
|
31
31
|
*/
|
|
32
32
|
static fromVec(arr: any): Vec4;
|
|
33
|
-
constructor(x
|
|
33
|
+
constructor(x?: number, y?: number, z?: number, w?: number);
|
|
34
34
|
/**
|
|
35
35
|
* @public
|
|
36
36
|
* @type {number}
|
|
@@ -62,7 +62,7 @@ export class Vec4 {
|
|
|
62
62
|
* @public
|
|
63
63
|
* @returns {Vec4}
|
|
64
64
|
*/
|
|
65
|
-
public clone(
|
|
65
|
+
public clone(): Vec4;
|
|
66
66
|
/**
|
|
67
67
|
* Compares with vector. Returns true if it equals another.
|
|
68
68
|
* @public
|
package/types/math.d.ts
CHANGED
|
@@ -197,7 +197,7 @@ export function solve_iteration_fixed(f: equationCallback, x0: number, maxIter:
|
|
|
197
197
|
* @param {number} maxIter - Maximum iterations.
|
|
198
198
|
* @returns {number} -
|
|
199
199
|
*/
|
|
200
|
-
export function solve_iteration(f: equationCallback, x0: number, err: number, maxIter
|
|
200
|
+
export function solve_iteration(f: equationCallback, x0: number, err: number, maxIter?: number): number;
|
|
201
201
|
/** @const */
|
|
202
202
|
export const TWO_PI: number;
|
|
203
203
|
/** @const */
|
|
@@ -37,7 +37,6 @@ export class RendererEvents extends Events {
|
|
|
37
37
|
* @enum {Object}
|
|
38
38
|
*/
|
|
39
39
|
public mouseState: {
|
|
40
|
-
anyEvent: () => boolean;
|
|
41
40
|
/** Current screen mouse X position. */
|
|
42
41
|
clientX: number;
|
|
43
42
|
/** Current screen mouse Y position. */
|
|
@@ -161,6 +160,7 @@ export class RendererEvents extends Events {
|
|
|
161
160
|
_rclickY: number;
|
|
162
161
|
_mclickX: number;
|
|
163
162
|
_mclickY: number;
|
|
163
|
+
pointerEvent(): number | boolean;
|
|
164
164
|
set active(arg: boolean);
|
|
165
165
|
get active(): boolean;
|
|
166
166
|
/**
|
package/types/shaders/label.d.ts
CHANGED
|
@@ -3,12 +3,13 @@ export class FontAtlas {
|
|
|
3
3
|
atlasIndexes: {};
|
|
4
4
|
atlasIndexesDeferred: any[];
|
|
5
5
|
tokenImageSize: number;
|
|
6
|
-
samplerArr:
|
|
6
|
+
samplerArr: Uint32Array;
|
|
7
|
+
sdfParamsArr: Float32Array;
|
|
7
8
|
_handler: any;
|
|
8
9
|
assignHandler(handler: any): void;
|
|
9
10
|
getFontIndex(face: any): any;
|
|
10
11
|
getFullIndex(face: any): any;
|
|
11
|
-
_applyFontDataToAtlas(atlas: any, data: any): void;
|
|
12
|
+
_applyFontDataToAtlas(atlas: any, data: any, index?: number): void;
|
|
12
13
|
initFont(faceName: any, dataJson: any, imageBase64: any): void;
|
|
13
14
|
_createTexture(atlas: any, img: any): void;
|
|
14
15
|
loadFont(faceName: any, srcDir: any, atlasUrl: any): void;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @param {number} [height] - Texture atlas height, if it hasn't 1024 default..
|
|
7
7
|
*/
|
|
8
8
|
export class TextureAtlas {
|
|
9
|
-
constructor(width
|
|
9
|
+
constructor(width?: number, height?: number);
|
|
10
10
|
/**
|
|
11
11
|
* Atlas nodes where input images store. It can be access by image.__nodeIndex.
|
|
12
12
|
* @public
|
|
@@ -100,11 +100,11 @@ export class TextureAtlas {
|
|
|
100
100
|
* @param {Rectangle} rect - Node image rectangle.
|
|
101
101
|
*/
|
|
102
102
|
export class TextureAtlasNode {
|
|
103
|
-
constructor(rect: any, texCoords
|
|
103
|
+
constructor(rect: any, texCoords?: any[]);
|
|
104
104
|
childNodes: any[];
|
|
105
105
|
image: any;
|
|
106
106
|
rect: any;
|
|
107
|
-
texCoords: any;
|
|
107
|
+
texCoords: any[];
|
|
108
108
|
atlas: any;
|
|
109
109
|
insert(img: any): any;
|
|
110
110
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export class VectorTileCreator {
|
|
2
|
-
constructor(planet: any, maxFrames
|
|
3
|
-
_width:
|
|
4
|
-
_height:
|
|
2
|
+
constructor(planet: any, maxFrames?: number, width?: number, height?: number);
|
|
3
|
+
_width: number;
|
|
4
|
+
_height: number;
|
|
5
5
|
_handler: any;
|
|
6
6
|
_planet: any;
|
|
7
7
|
_framebuffer: Framebuffer;
|
|
8
|
-
MAX_FRAMES:
|
|
8
|
+
MAX_FRAMES: number;
|
|
9
9
|
_currentFrame: number;
|
|
10
10
|
_queue: any[];
|
|
11
11
|
_initialize(): void;
|
package/types/utils/shared.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export function createVector4(v: any, def: any): any;
|
|
|
48
48
|
export function createColorRGBA(c: any, def: any): any;
|
|
49
49
|
export function createColorRGB(c: any, def: any): any;
|
|
50
50
|
export function createExtent(e: any, def: any): any;
|
|
51
|
-
export function createLonLat(l: any, def
|
|
51
|
+
export function createLonLat(l: any, def?: any): any;
|
|
52
52
|
export function binarySearchFast(arr: any, x: any): number;
|
|
53
53
|
/**
|
|
54
54
|
* Finds an item in a sorted array.
|
package/types/webgl/Handler.d.ts
CHANGED
|
@@ -104,6 +104,7 @@ export class Handler {
|
|
|
104
104
|
ANISOTROPIC: any;
|
|
105
105
|
};
|
|
106
106
|
createTextureDefault: any;
|
|
107
|
+
createTexture_n: (image: any, internalFormat: any) => any;
|
|
107
108
|
/**
|
|
108
109
|
* Sets animation frame function.
|
|
109
110
|
* @public
|
|
@@ -252,7 +253,6 @@ export class Handler {
|
|
|
252
253
|
* @public
|
|
253
254
|
*/
|
|
254
255
|
public initialize(): void;
|
|
255
|
-
createTexture_n: any;
|
|
256
256
|
createTexture_l: any;
|
|
257
257
|
createTexture_mm: any;
|
|
258
258
|
createTexture_a: any;
|
|
@@ -261,36 +261,6 @@ export class Handler {
|
|
|
261
261
|
* @private
|
|
262
262
|
*/
|
|
263
263
|
private _setDefaults;
|
|
264
|
-
/**
|
|
265
|
-
* Activate depth test.
|
|
266
|
-
* @public
|
|
267
|
-
*/
|
|
268
|
-
public activateDepthTest(): void;
|
|
269
|
-
/**
|
|
270
|
-
* Deactivate depth test.
|
|
271
|
-
* @public
|
|
272
|
-
*/
|
|
273
|
-
public deactivateDepthTest(): void;
|
|
274
|
-
/**
|
|
275
|
-
* Activate face culling.
|
|
276
|
-
* @public
|
|
277
|
-
*/
|
|
278
|
-
public activateFaceCulling(): void;
|
|
279
|
-
/**
|
|
280
|
-
* Deactivate face cullting.
|
|
281
|
-
* @public
|
|
282
|
-
*/
|
|
283
|
-
public deactivateFaceCulling(): void;
|
|
284
|
-
/**
|
|
285
|
-
* Activate blending.
|
|
286
|
-
* @public
|
|
287
|
-
*/
|
|
288
|
-
public activateBlending(): void;
|
|
289
|
-
/**
|
|
290
|
-
* Deactivate blending.
|
|
291
|
-
* @public
|
|
292
|
-
*/
|
|
293
|
-
public deactivateBlending(): void;
|
|
294
264
|
/**
|
|
295
265
|
* Creates STREAM_DRAW ARRAY buffer.
|
|
296
266
|
* @public
|
|
@@ -392,6 +362,11 @@ export class Handler {
|
|
|
392
362
|
public start(): void;
|
|
393
363
|
stop(): void;
|
|
394
364
|
_requestAnimationFrameId: number;
|
|
365
|
+
/**
|
|
366
|
+
* Check is gl context type equals webgl2
|
|
367
|
+
* @public
|
|
368
|
+
*/
|
|
369
|
+
public isWebGl2(): boolean;
|
|
395
370
|
/**
|
|
396
371
|
* Make animation.
|
|
397
372
|
* @private
|
package/types/webgl/Program.d.ts
CHANGED
|
@@ -147,6 +147,7 @@ export class Program {
|
|
|
147
147
|
* @public
|
|
148
148
|
*/
|
|
149
149
|
public enableAttribArrays(): void;
|
|
150
|
+
vertexAttribDivisor(index: any, divisor: any): void;
|
|
150
151
|
/**
|
|
151
152
|
* Delete program.
|
|
152
153
|
* @public
|
|
@@ -158,4 +159,5 @@ export class Program {
|
|
|
158
159
|
* @param {Object} gl - WebGl context.
|
|
159
160
|
*/
|
|
160
161
|
public createProgram(gl: any): void;
|
|
162
|
+
drawElementsInstanced: any;
|
|
161
163
|
}
|