@openglobus/og 0.10.6 → 0.11.1
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 +10 -7
- package/src/og/Extent.js +1 -1
- package/src/og/LonLat.js +7 -2
- package/src/og/Popup.js +2 -1
- package/src/og/camera/PlanetCamera.js +4 -2
- package/src/og/entity/EntityCollection.js +1 -1
- package/src/og/entity/LabelHandler.js +366 -74
- package/src/og/entity/Polyline.js +3 -2
- package/src/og/layer/KML.js +7 -5
- package/src/og/layer/Vector.js +5 -0
- package/src/og/layer/index.js +2 -1
- package/src/og/math/Vec2.js +448 -448
- package/src/og/math/Vec3.js +759 -757
- package/src/og/math/Vec4.js +216 -215
- package/src/og/scene/Planet.js +14 -4
- package/src/og/segment/SegmentLonLat.js +7 -0
- package/src/og/terrain/GlobusTerrain.js +4 -0
- package/src/og/utils/GeoImageCreator.js +123 -121
- package/src/og/utils/Loader.js +81 -80
- package/src/og/utils/NormalMapCreator.js +320 -318
- package/src/og/utils/VectorTileCreator.js +251 -250
- package/src/og/webgl/Framebuffer.js +265 -264
- package/src/og/webgl/Handler.js +1022 -1022
- package/src/og/webgl/Multisample.js +169 -168
- package/src/og/webgl/ProgramController.js +113 -112
- package/types/Clock.d.ts +90 -0
- package/types/Deferred.d.ts +6 -0
- package/types/Events.d.ts +73 -0
- package/types/Extent.d.ts +162 -0
- package/types/Globe.d.ts +80 -0
- package/types/ImageCanvas.d.ts +121 -0
- package/types/Lock.d.ts +12 -0
- package/types/LonLat.d.ts +108 -0
- package/types/Popup.d.ts +38 -0
- package/types/QueueArray.d.ts +15 -0
- package/types/Rectangle.d.ts +74 -0
- package/types/Stack.d.ts +15 -0
- package/types/ajax.d.ts +24 -0
- package/types/arial.d.ts +48 -0
- package/types/astro/astro.d.ts +38 -0
- package/types/astro/earth.d.ts +6 -0
- package/types/astro/jd.d.ts +254 -0
- package/types/bv/Box.d.ts +25 -0
- package/types/bv/Sphere.d.ts +32 -0
- package/types/bv/index.d.ts +3 -0
- package/types/camera/Camera.d.ts +303 -0
- package/types/camera/Frustum.d.ts +129 -0
- package/types/camera/PlanetCamera.d.ts +222 -0
- package/types/camera/index.d.ts +3 -0
- package/types/cons.d.ts +40 -0
- package/types/control/CompassButton.d.ts +17 -0
- package/types/control/Control.d.ts +101 -0
- package/types/control/DebugInfo.d.ts +16 -0
- package/types/control/EarthCoordinates.d.ts +47 -0
- package/types/control/GeoImageDragControl.d.ts +6 -0
- package/types/control/KeyboardNavigation.d.ts +22 -0
- package/types/control/LayerSwitcher.d.ts +23 -0
- package/types/control/Lighting.d.ts +16 -0
- package/types/control/ScaleControl.d.ts +22 -0
- package/types/control/ShowFps.d.ts +12 -0
- package/types/control/SimpleNavigation.d.ts +28 -0
- package/types/control/Sun.d.ts +52 -0
- package/types/control/ToggleWireframe.d.ts +12 -0
- package/types/control/ZoomControl.d.ts +28 -0
- package/types/control/index.d.ts +15 -0
- package/types/ellipsoid/Ellipsoid.d.ts +142 -0
- package/types/ellipsoid/index.d.ts +3 -0
- package/types/ellipsoid/wgs84.d.ts +5 -0
- package/types/entity/BaseBillboard.d.ts +208 -0
- package/types/entity/Billboard.d.ts +94 -0
- package/types/entity/BillboardHandler.d.ts +74 -0
- package/types/entity/Entity.d.ts +330 -0
- package/types/entity/EntityCollection.d.ts +303 -0
- package/types/entity/Geometry.d.ts +72 -0
- package/types/entity/GeometryHandler.d.ts +76 -0
- package/types/entity/Label.d.ts +194 -0
- package/types/entity/LabelHandler.d.ts +24 -0
- package/types/entity/PointCloud.d.ts +174 -0
- package/types/entity/PointCloudHandler.d.ts +38 -0
- package/types/entity/Polyline.d.ts +303 -0
- package/types/entity/PolylineHandler.d.ts +18 -0
- package/types/entity/Ray.d.ts +123 -0
- package/types/entity/RayHandler.d.ts +67 -0
- package/types/entity/ShapeHandler.d.ts +22 -0
- package/types/entity/Strip.d.ts +118 -0
- package/types/entity/StripHandler.d.ts +38 -0
- package/types/entity/index.d.ts +8 -0
- package/types/index.core.d.ts +65 -0
- package/types/index.d.ts +45 -0
- package/types/index.webgl.d.ts +7 -0
- package/types/inherits.d.ts +4 -0
- package/types/input/input.d.ts +34 -0
- package/types/layer/BaseGeoImage.d.ts +106 -0
- package/types/layer/CanvasTiles.d.ts +75 -0
- package/types/layer/GeoImage.d.ts +65 -0
- package/types/layer/GeoTexture2d.d.ts +8 -0
- package/types/layer/GeoVideo.d.ts +80 -0
- package/types/layer/KML.d.ts +58 -0
- package/types/layer/WMS.d.ts +66 -0
- package/types/layer/XYZ.d.ts +126 -0
- package/types/layer/index.d.ts +10 -0
- package/types/light/LightSource.d.ts +177 -0
- package/types/math/Mat3.d.ts +53 -0
- package/types/math/Mat4.d.ts +157 -0
- package/types/math/Plane.d.ts +17 -0
- package/types/math/Vec2.d.ts +308 -0
- package/types/math/Vec3.d.ts +459 -0
- package/types/math/Vec4.d.ts +161 -0
- package/types/math/coder.d.ts +42 -0
- package/types/math/index.d.ts +11 -0
- package/types/math.d.ts +261 -0
- package/types/mercator.d.ts +92 -0
- package/types/proj/EPSG3857.d.ts +5 -0
- package/types/proj/EPSG4326.d.ts +5 -0
- package/types/quadTree/quadTree.d.ts +40 -0
- package/types/renderer/RendererEvents.d.ts +230 -0
- package/types/res/images.d.ts +3 -0
- package/types/scene/Axes.d.ts +11 -0
- package/types/scene/BaseNode.d.ts +60 -0
- package/types/scene/Planet.d.ts +572 -0
- package/types/scene/RenderNode.d.ts +143 -0
- package/types/scene/SkyBox.d.ts +10 -0
- package/types/scene/index.d.ts +4 -0
- package/types/segment/segmentHelper.d.ts +13 -0
- package/types/shaders/billboard.d.ts +3 -0
- package/types/shaders/depth.d.ts +2 -0
- package/types/shaders/drawnode.d.ts +7 -0
- package/types/shaders/label.d.ts +4 -0
- package/types/shaders/pointCloud.d.ts +2 -0
- package/types/shaders/polyline.d.ts +3 -0
- package/types/shaders/ray.d.ts +2 -0
- package/types/shaders/screenFrame.d.ts +2 -0
- package/types/shaders/shape.d.ts +4 -0
- package/types/shaders/skybox.d.ts +2 -0
- package/types/shaders/toneMapping.d.ts +2 -0
- package/types/shapes/BaseShape.d.ts +247 -0
- package/types/shapes/Sphere.d.ts +41 -0
- package/types/terrain/BilTerrain.d.ts +8 -0
- package/types/terrain/EmptyTerrain.d.ts +72 -0
- package/types/terrain/Geoid.d.ts +26 -0
- package/types/terrain/GlobusTerrain.d.ts +153 -0
- package/types/terrain/MapboxTerrain.d.ts +8 -0
- package/types/terrain/index.d.ts +5 -0
- package/types/utils/FontAtlas.d.ts +14 -0
- package/types/utils/GeoImageCreator.d.ts +29 -0
- package/types/utils/ImagesCacheManager.d.ts +10 -0
- package/types/utils/Loader.d.ts +25 -0
- package/types/utils/NormalMapCreator.d.ts +39 -0
- package/types/utils/PlainSegmentWorker.d.ts +10 -0
- package/types/utils/TerrainWorker.d.ts +9 -0
- package/types/utils/TextureAtlas.d.ts +111 -0
- package/types/utils/VectorTileCreator.d.ts +16 -0
- package/types/utils/colorTable.d.ts +143 -0
- package/types/utils/earcut.d.ts +6 -0
- package/types/utils/shared.d.ts +230 -0
- package/types/webgl/Framebuffer.d.ts +135 -0
- package/types/webgl/Handler.d.ts +372 -0
- package/types/webgl/Multisample.d.ts +89 -0
- package/types/webgl/Program.d.ts +155 -0
- package/types/webgl/ProgramController.d.ts +84 -0
- package/types/webgl/callbacks.d.ts +1 -0
- package/types/webgl/index.d.ts +6 -0
- package/types/webgl/types.d.ts +2 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class SkyBox extends RenderNode {
|
|
2
|
+
static createDefault(RESOURCES_URL: any): SkyBox;
|
|
3
|
+
params: any;
|
|
4
|
+
vertexPositionBuffer: any;
|
|
5
|
+
texture: any;
|
|
6
|
+
init(): void;
|
|
7
|
+
frame(): void;
|
|
8
|
+
_createBuffers(): void;
|
|
9
|
+
}
|
|
10
|
+
import { RenderNode } from "./RenderNode.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function getInstance(): SegmentHelper;
|
|
2
|
+
declare class SegmentHelper {
|
|
3
|
+
constructor(maxGridSize?: number);
|
|
4
|
+
_maxGridSize: number;
|
|
5
|
+
get maxGridSize(): number;
|
|
6
|
+
init(): void;
|
|
7
|
+
centerIndexesTable: Uint32Array[];
|
|
8
|
+
skirtsIndexesTable: any[][];
|
|
9
|
+
setMaxGridSize(gridSize: any): void;
|
|
10
|
+
createSegmentIndexes(size: any, sidesSizes: any): Uint32Array;
|
|
11
|
+
initTextureCoordsTable(pow: any): Uint16Array[];
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function drawnode_screen_nl(): Program;
|
|
2
|
+
export function drawnode_screen_wl(): Program;
|
|
3
|
+
export function drawnode_screen_wl_webgl2(): Program;
|
|
4
|
+
export function drawnode_colorPicking(): Program;
|
|
5
|
+
export function drawnode_heightPicking(): Program;
|
|
6
|
+
export function drawnode_depth(): Program;
|
|
7
|
+
import { Program } from "../webgl/Program.js";
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base geometry shape class.
|
|
3
|
+
* @class
|
|
4
|
+
* @param {Object} options - Shape parameters:
|
|
5
|
+
* @param {og.Vec3} [options.position] - Shape position.
|
|
6
|
+
* @param {og.Quat} [options.orientation] - Shape orientation(rotation).
|
|
7
|
+
* @param {og.Vec3} [options.scale] - Scale vector.
|
|
8
|
+
* @param {Array.<number,number,number,number>} [options.color] - Shape RGBA color.
|
|
9
|
+
* @param {string} [options.src] - Texture image url source.
|
|
10
|
+
* @param {boolean} [options.visibility] - Shape visibility.
|
|
11
|
+
*/
|
|
12
|
+
export class BaseShape {
|
|
13
|
+
static set _staticCounter(arg: any);
|
|
14
|
+
static get _staticCounter(): any;
|
|
15
|
+
constructor(options: any);
|
|
16
|
+
/**
|
|
17
|
+
* Unic identifier.
|
|
18
|
+
* @public
|
|
19
|
+
* @readonly
|
|
20
|
+
* @type {number}
|
|
21
|
+
*/
|
|
22
|
+
public readonly id: number;
|
|
23
|
+
/**
|
|
24
|
+
* Shape position.
|
|
25
|
+
* @public
|
|
26
|
+
* @type {og.Vec3}
|
|
27
|
+
*/
|
|
28
|
+
public position: any;
|
|
29
|
+
/**
|
|
30
|
+
* Shape orientation(rotation)
|
|
31
|
+
* @public
|
|
32
|
+
* @type {og.Quat}
|
|
33
|
+
*/
|
|
34
|
+
public orientation: any;
|
|
35
|
+
/**
|
|
36
|
+
* Scale.
|
|
37
|
+
* @public
|
|
38
|
+
* @type {og.Vec3}
|
|
39
|
+
*/
|
|
40
|
+
public scale: any;
|
|
41
|
+
/**
|
|
42
|
+
* Shape RGBA color.
|
|
43
|
+
* @public
|
|
44
|
+
* @type {Array.<number,number,number,number>}
|
|
45
|
+
*/
|
|
46
|
+
public color: Array<number, number, number, number>;
|
|
47
|
+
/**
|
|
48
|
+
* Shape visibility.
|
|
49
|
+
* @public
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
*/
|
|
52
|
+
public visibility: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Image url source.
|
|
55
|
+
* @protected
|
|
56
|
+
* @type {string}
|
|
57
|
+
*/
|
|
58
|
+
protected _src: string;
|
|
59
|
+
/**
|
|
60
|
+
* Vertices position gl buffer.
|
|
61
|
+
* @protected
|
|
62
|
+
*/
|
|
63
|
+
protected _positionBuffer: any;
|
|
64
|
+
/**
|
|
65
|
+
* Vertices normal gl buffer.
|
|
66
|
+
* @protected
|
|
67
|
+
*/
|
|
68
|
+
protected _normalBuffer: any;
|
|
69
|
+
/**
|
|
70
|
+
* Vertices indexes gl buffer.
|
|
71
|
+
* @protected
|
|
72
|
+
*/
|
|
73
|
+
protected _indexBuffer: any;
|
|
74
|
+
/**
|
|
75
|
+
* Vertex texture coordinates gl buffer.
|
|
76
|
+
* @protected
|
|
77
|
+
*/
|
|
78
|
+
protected _textureCoordBuffer: any;
|
|
79
|
+
/**
|
|
80
|
+
* Vertex positions.
|
|
81
|
+
* @protected
|
|
82
|
+
* @type {Array.<number>}
|
|
83
|
+
*/
|
|
84
|
+
protected _positionData: Array<number>;
|
|
85
|
+
/**
|
|
86
|
+
* Vertex normals.
|
|
87
|
+
* @protected
|
|
88
|
+
* @type {Array.<number>}
|
|
89
|
+
*/
|
|
90
|
+
protected _normalData: Array<number>;
|
|
91
|
+
/**
|
|
92
|
+
* Vertex indeces.
|
|
93
|
+
* @protected
|
|
94
|
+
* @type {Array.<number>}
|
|
95
|
+
*/
|
|
96
|
+
protected _indexData: Array<number>;
|
|
97
|
+
/**
|
|
98
|
+
* Vertex texture coordinates.
|
|
99
|
+
* @protected
|
|
100
|
+
* @type {Array.<number>}
|
|
101
|
+
*/
|
|
102
|
+
protected _textureCoordData: Array<number>;
|
|
103
|
+
/**
|
|
104
|
+
* Scale matrix.
|
|
105
|
+
* @protected
|
|
106
|
+
* @type {og.Mat4}
|
|
107
|
+
*/
|
|
108
|
+
protected _mxScale: any;
|
|
109
|
+
/**
|
|
110
|
+
* Translation matrix.
|
|
111
|
+
* @protected
|
|
112
|
+
* @type {og.Mat4}
|
|
113
|
+
*/
|
|
114
|
+
protected _mxTranslation: any;
|
|
115
|
+
/**
|
|
116
|
+
* Model matrix.
|
|
117
|
+
* @protected
|
|
118
|
+
* @type {og.Mat4}
|
|
119
|
+
*/
|
|
120
|
+
protected _mxModel: any;
|
|
121
|
+
/**
|
|
122
|
+
* Gl texture pointer.
|
|
123
|
+
* @protected
|
|
124
|
+
*/
|
|
125
|
+
protected texture: any;
|
|
126
|
+
/**
|
|
127
|
+
* Assigned render node.
|
|
128
|
+
* @protected
|
|
129
|
+
* @type {og.scene.RenderNode}
|
|
130
|
+
*/
|
|
131
|
+
protected _renderNode: any;
|
|
132
|
+
/**
|
|
133
|
+
* Assigned picking color.
|
|
134
|
+
* @protected
|
|
135
|
+
* @type {Array.<number,number,number>}
|
|
136
|
+
*/
|
|
137
|
+
protected _pickingColor: Array<number, number, number>;
|
|
138
|
+
/**
|
|
139
|
+
* Entity instance that holds this shape.
|
|
140
|
+
* @protected
|
|
141
|
+
* @type {og.Entity}
|
|
142
|
+
*/
|
|
143
|
+
protected _entity: any;
|
|
144
|
+
/**
|
|
145
|
+
* Handler that stores and renders this shape object.
|
|
146
|
+
* @protected
|
|
147
|
+
* @type {og.ShapeHandler}
|
|
148
|
+
*/
|
|
149
|
+
protected _handler: any;
|
|
150
|
+
/**
|
|
151
|
+
* Shape handler array index.
|
|
152
|
+
* @protected
|
|
153
|
+
* @type {number}
|
|
154
|
+
*/
|
|
155
|
+
protected _handlerIndex: number;
|
|
156
|
+
/**
|
|
157
|
+
* Clear shape parameters.
|
|
158
|
+
* @public
|
|
159
|
+
*/
|
|
160
|
+
public clear(): void;
|
|
161
|
+
/**
|
|
162
|
+
* Sets shape color.
|
|
163
|
+
* @public
|
|
164
|
+
* @param {Array.<number,number,number,number>} color - RGBA color values array.
|
|
165
|
+
*/
|
|
166
|
+
public setColor(color: Array<number, number, number, number>): void;
|
|
167
|
+
/**
|
|
168
|
+
* Sets shape color.
|
|
169
|
+
* @public
|
|
170
|
+
* @param {og.Vec4} color - RGBA color vector.
|
|
171
|
+
*/
|
|
172
|
+
public setColor4v(color: any): void;
|
|
173
|
+
/**
|
|
174
|
+
* Sets shape opacity value.
|
|
175
|
+
* @public
|
|
176
|
+
* @param {number} opacity - Opacity value.
|
|
177
|
+
*/
|
|
178
|
+
public setOpacity(opacity: number): void;
|
|
179
|
+
/**
|
|
180
|
+
* Delete gl buffers.
|
|
181
|
+
* @protected
|
|
182
|
+
*/
|
|
183
|
+
protected _deleteBuffers(): void;
|
|
184
|
+
/**
|
|
185
|
+
* Sets shape visibility.
|
|
186
|
+
* @public
|
|
187
|
+
* @param {boolean} visibility - Visibility.
|
|
188
|
+
*/
|
|
189
|
+
public setVisibility(visibility: boolean): void;
|
|
190
|
+
/**
|
|
191
|
+
* Gets visibilty flag.
|
|
192
|
+
* @public
|
|
193
|
+
* @returns {boolean} -
|
|
194
|
+
*/
|
|
195
|
+
public getVisibility(): boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Assign render node.
|
|
198
|
+
* @public
|
|
199
|
+
* @param {og.scene.RenderNode} renderNode - Render node to assign.
|
|
200
|
+
*/
|
|
201
|
+
public setRenderNode(renderNode: any): void;
|
|
202
|
+
/**
|
|
203
|
+
* Sets shape position.
|
|
204
|
+
* @public
|
|
205
|
+
* @param {og.Vec3} position - Shape position.
|
|
206
|
+
*/
|
|
207
|
+
public setPosition3v(position: any): void;
|
|
208
|
+
/**
|
|
209
|
+
* Translate shape position to vector.
|
|
210
|
+
* @public
|
|
211
|
+
* @param {og.Vec3} vec - Translation vector.
|
|
212
|
+
*/
|
|
213
|
+
public translate3v(vec: any): void;
|
|
214
|
+
/**
|
|
215
|
+
* Sets shape scale.
|
|
216
|
+
* @param {og.Vec3} scale - Scale vector.
|
|
217
|
+
*/
|
|
218
|
+
setScale3v(scale: any): void;
|
|
219
|
+
setScale(scale: any): void;
|
|
220
|
+
/**
|
|
221
|
+
* Removes shape from shape handler.
|
|
222
|
+
* @public
|
|
223
|
+
*/
|
|
224
|
+
public remove(): void;
|
|
225
|
+
/**
|
|
226
|
+
* Assign picking color.
|
|
227
|
+
* @protected
|
|
228
|
+
* @param {og.Vec3} color - Picking RGB color.
|
|
229
|
+
*/
|
|
230
|
+
protected setPickingColor3v(color: any): void;
|
|
231
|
+
/**
|
|
232
|
+
* Creates buffers.
|
|
233
|
+
* @protected
|
|
234
|
+
*/
|
|
235
|
+
protected _createBuffers(): void;
|
|
236
|
+
/**
|
|
237
|
+
* Update model matrix.
|
|
238
|
+
* @public
|
|
239
|
+
*/
|
|
240
|
+
public refresh(): void;
|
|
241
|
+
/**
|
|
242
|
+
* Shape rendering.
|
|
243
|
+
* @public
|
|
244
|
+
*/
|
|
245
|
+
public draw(): void;
|
|
246
|
+
drawPicking(): void;
|
|
247
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @class
|
|
3
|
+
* @extends {og.shape.BaseShape}
|
|
4
|
+
* @param {Object} options - Sphere parameters:
|
|
5
|
+
* @param {og.Vec3} [options.position] - Sphere position.
|
|
6
|
+
* @param {og.Quat} [options.orientation] - Sphere orientation(rotation).
|
|
7
|
+
* @param {og.Vec3} [options.scale] - Scale vector.
|
|
8
|
+
* @param {Array.<number,number,number,number>} [options.color] - Sphere RGBA color.
|
|
9
|
+
* @param {string} [options.src] - Texture image url source.
|
|
10
|
+
* @param {boolean} [options.visibility] - Sphere visibility.
|
|
11
|
+
* @param {number} [options.radius=100] - Sphere radius.
|
|
12
|
+
* @param {number} [options.latBands=16] - Number of latitude bands.
|
|
13
|
+
* @param {number} [options.lonBands=16] - Number of longitude bands.
|
|
14
|
+
*/
|
|
15
|
+
export class Sphere {
|
|
16
|
+
constructor(options: any);
|
|
17
|
+
/**
|
|
18
|
+
* Sphere radius.
|
|
19
|
+
* @protected
|
|
20
|
+
* @type {number}
|
|
21
|
+
*/
|
|
22
|
+
protected _radius: number;
|
|
23
|
+
/**
|
|
24
|
+
* Number of latitude bands.
|
|
25
|
+
* @protected
|
|
26
|
+
* @type {number}
|
|
27
|
+
*/
|
|
28
|
+
protected _latBands: number;
|
|
29
|
+
/**
|
|
30
|
+
* Number of longitude bands.
|
|
31
|
+
* @protected
|
|
32
|
+
* @type {number}
|
|
33
|
+
*/
|
|
34
|
+
protected _lonBands: number;
|
|
35
|
+
/**
|
|
36
|
+
* Create specific shape vertices data.
|
|
37
|
+
* @protected
|
|
38
|
+
* @virtual
|
|
39
|
+
*/
|
|
40
|
+
protected _createData(): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class represents terrain provider without elevation data.
|
|
3
|
+
* @class
|
|
4
|
+
*/
|
|
5
|
+
export class EmptyTerrain {
|
|
6
|
+
static checkNoDataValue(noDataValues: any, value: any): boolean;
|
|
7
|
+
constructor(options?: {});
|
|
8
|
+
equalizeVertices: boolean;
|
|
9
|
+
equalizeNormals: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Provider name is "empty"
|
|
12
|
+
* @public
|
|
13
|
+
* @type {string}
|
|
14
|
+
*/
|
|
15
|
+
public name: string;
|
|
16
|
+
/**
|
|
17
|
+
* Minimal z-index value for segment elevation data handling.
|
|
18
|
+
* @public
|
|
19
|
+
* @type {number}
|
|
20
|
+
*/
|
|
21
|
+
public minZoom: number;
|
|
22
|
+
/**
|
|
23
|
+
* Maximal z-index value for segment elevation data handling.
|
|
24
|
+
* @public
|
|
25
|
+
* @type {number}
|
|
26
|
+
*/
|
|
27
|
+
public maxZoom: number;
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
* @type {Array.<number>}
|
|
31
|
+
*/
|
|
32
|
+
public gridSizeByZoom: Array<number>;
|
|
33
|
+
_maxNodeZoom: number;
|
|
34
|
+
/**
|
|
35
|
+
* Elevation grid size. Currend is 2x2 is the smallest grid size.
|
|
36
|
+
* @public
|
|
37
|
+
* @type {number}
|
|
38
|
+
*/
|
|
39
|
+
public plainGridSize: number;
|
|
40
|
+
/**
|
|
41
|
+
* Planet node.
|
|
42
|
+
* @protected
|
|
43
|
+
* @type {og.scene.Planet}
|
|
44
|
+
*/
|
|
45
|
+
protected _planet: any;
|
|
46
|
+
_geoid: any;
|
|
47
|
+
isBlur(): boolean;
|
|
48
|
+
set maxNodeZoom(arg: number);
|
|
49
|
+
get maxNodeZoom(): number;
|
|
50
|
+
set geoid(arg: any);
|
|
51
|
+
get geoid(): any;
|
|
52
|
+
/**
|
|
53
|
+
* Loads or creates segment elevation data.
|
|
54
|
+
* @public
|
|
55
|
+
* @virtual
|
|
56
|
+
* @param {og.planetSegment.Segment} segment - Segment to create elevation data.
|
|
57
|
+
*/
|
|
58
|
+
public handleSegmentTerrain(segment: any): void;
|
|
59
|
+
isReady(): any;
|
|
60
|
+
/**
|
|
61
|
+
* Abstract function
|
|
62
|
+
* @public
|
|
63
|
+
* @abstract
|
|
64
|
+
*/
|
|
65
|
+
public abortLoading(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Abstract function
|
|
68
|
+
* @public
|
|
69
|
+
* @abstract
|
|
70
|
+
*/
|
|
71
|
+
public clearCache(): void;
|
|
72
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class Geoid {
|
|
2
|
+
static loadModel(url: any): Promise<{
|
|
3
|
+
scale: number;
|
|
4
|
+
offset: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
rlonres: number;
|
|
8
|
+
rlatres: number;
|
|
9
|
+
i: number;
|
|
10
|
+
rawfile: Uint8Array;
|
|
11
|
+
}>;
|
|
12
|
+
constructor(options?: {});
|
|
13
|
+
model: any;
|
|
14
|
+
src: any;
|
|
15
|
+
_cached_ix: any;
|
|
16
|
+
_cached_iy: number;
|
|
17
|
+
_v00: number;
|
|
18
|
+
_v01: number;
|
|
19
|
+
_v10: number;
|
|
20
|
+
_v11: number;
|
|
21
|
+
_t: any;
|
|
22
|
+
setModel(model: any): void;
|
|
23
|
+
_rawval(ix: any, iy: any): number;
|
|
24
|
+
getHeightLonLat(lonlat: any): any;
|
|
25
|
+
getHeight(lon: any, lat: any): any;
|
|
26
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class that loads segment elevation data, converts it to the array and passes it to the planet segment.
|
|
3
|
+
* @class
|
|
4
|
+
* @extends {og.terrain.EmptyTerrain}
|
|
5
|
+
* @param {string} [name=""] - Terrain provider name.
|
|
6
|
+
* @param {Object} [options] - Provider options:
|
|
7
|
+
* @param {number} [options.minZoom=3] - Minimal visible zoom index when terrain handler works.
|
|
8
|
+
* @param {number} [options.minZoom=14] - Maximal visible zoom index when terrain handler works.
|
|
9
|
+
* @param {string} [options.url="//openglobus.org/heights/srtm3/{z}/{y}/{x}.ddm"] - Terrain source path url template. Default is openglobus ddm elevation file.
|
|
10
|
+
* @param {Array.<number>} [options.gridSizeByZoom] - Array of segment triangulation grid sizes where array index agreed to the segment zoom index.
|
|
11
|
+
* @param {number} [options.plainGridSize=32] - Elevation grid size. Default is 32x32. Must be power of two.
|
|
12
|
+
* @param {string} [options.responseType="arraybuffer"] - Ajax responce type.
|
|
13
|
+
* @param {number} [options.MAX_LOADING_TILES] - Maximum at one time loading tiles.
|
|
14
|
+
* @param {Array.<number>} [gridSizeByZoom] - Array of values, where each value corresponds to the size of a tile(or segment) on the globe. Each value must be power of two.
|
|
15
|
+
* @fires og.terrain.GlobusTerrain#load
|
|
16
|
+
* @fires og.terrain.GlobusTerrain#loadend
|
|
17
|
+
*/
|
|
18
|
+
export class GlobusTerrain {
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} [name]
|
|
21
|
+
* @param {*} [options]
|
|
22
|
+
*/
|
|
23
|
+
constructor(name?: string, options?: any);
|
|
24
|
+
/**
|
|
25
|
+
* Events handler.
|
|
26
|
+
* @public
|
|
27
|
+
* @type {og.Events}
|
|
28
|
+
*/
|
|
29
|
+
public events: any;
|
|
30
|
+
equalizeNormals: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Provider name.
|
|
33
|
+
* @public
|
|
34
|
+
* @type {string}
|
|
35
|
+
*/
|
|
36
|
+
public name: string;
|
|
37
|
+
/**
|
|
38
|
+
* Minimal visible zoom index when terrain handler works.
|
|
39
|
+
* @public
|
|
40
|
+
* @type {number}
|
|
41
|
+
*/
|
|
42
|
+
public minZoom: number;
|
|
43
|
+
/**
|
|
44
|
+
* Maximal visible zoom index when terrain handler works.
|
|
45
|
+
* @public
|
|
46
|
+
* @type {number}
|
|
47
|
+
*/
|
|
48
|
+
public maxZoom: number;
|
|
49
|
+
/**
|
|
50
|
+
* Terrain source path url template.
|
|
51
|
+
* @public
|
|
52
|
+
* @type {string}
|
|
53
|
+
*/
|
|
54
|
+
public url: string;
|
|
55
|
+
/**
|
|
56
|
+
* Array of segment triangulation grid sizes where array index agreed to the segment zoom index.
|
|
57
|
+
* @public
|
|
58
|
+
* @type {Array.<number>}
|
|
59
|
+
*/
|
|
60
|
+
public gridSizeByZoom: Array<number>;
|
|
61
|
+
noDataValues: any;
|
|
62
|
+
/**
|
|
63
|
+
* Elevation tile grid size.
|
|
64
|
+
* @public
|
|
65
|
+
* @type {number}
|
|
66
|
+
*/
|
|
67
|
+
public plainGridSize: number;
|
|
68
|
+
_geoid: any;
|
|
69
|
+
_extent: any;
|
|
70
|
+
_dataType: string;
|
|
71
|
+
_maxNodeZoom: number;
|
|
72
|
+
_elevationCache: {};
|
|
73
|
+
_fetchCache: {};
|
|
74
|
+
_loader: Loader;
|
|
75
|
+
/**
|
|
76
|
+
* Rewrites elevation storage url query.
|
|
77
|
+
* @private
|
|
78
|
+
* @callback og.terrain.GlobusTerrain~_urlRewriteCallback
|
|
79
|
+
* @param {og.planetSegment.Segment} segment - Segment to load.
|
|
80
|
+
* @param {string} url - Created url.
|
|
81
|
+
* @returns {string} - Url query string.
|
|
82
|
+
*/
|
|
83
|
+
private _urlRewriteCallback;
|
|
84
|
+
clearCache(): void;
|
|
85
|
+
getGeoid(): any;
|
|
86
|
+
isBlur(segment: any): boolean;
|
|
87
|
+
getHeightAsync(lonLat: any, callback: any, zoom: any): boolean;
|
|
88
|
+
getTileCache(lonLat: any, z: any): any;
|
|
89
|
+
_getGroundHeightMerc(merc: any, tileData: any): number;
|
|
90
|
+
/**
|
|
91
|
+
* Stop loading.
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
public abortLoading(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Sets terrain data url template.
|
|
97
|
+
* @public
|
|
98
|
+
* @param {string} url - Url template.
|
|
99
|
+
* @example <caption>Default openglobus url template:</caption>:
|
|
100
|
+
* "http://earth3.openglobus.org/{z}/{y}/{x}.ddm"
|
|
101
|
+
*/
|
|
102
|
+
public setUrl(url: string): void;
|
|
103
|
+
/**
|
|
104
|
+
* Sets provider name.
|
|
105
|
+
* @public
|
|
106
|
+
* @param {string} name - Name.
|
|
107
|
+
*/
|
|
108
|
+
public setName(name: string): void;
|
|
109
|
+
isReadyToLoad(segment: any): any;
|
|
110
|
+
/**
|
|
111
|
+
* Starts to load segment data.
|
|
112
|
+
* @public
|
|
113
|
+
* @virtual
|
|
114
|
+
* @param {og.planetSegment.Segment} segment - Segment that wants a terrain data.
|
|
115
|
+
*/
|
|
116
|
+
public loadTerrain(segment: any, forceLoading: any): void;
|
|
117
|
+
/**
|
|
118
|
+
* Creates query url.
|
|
119
|
+
* @protected
|
|
120
|
+
* @virtual
|
|
121
|
+
* @param {og.planetSegment.Segment} segment -
|
|
122
|
+
* @returns {string} -
|
|
123
|
+
*/
|
|
124
|
+
protected _createUrl(segment: any): string;
|
|
125
|
+
/**
|
|
126
|
+
* Returns actual url query string.
|
|
127
|
+
* @protected
|
|
128
|
+
* @param {og.planetSegment.Segment} segment - Segment that loads image data.
|
|
129
|
+
* @returns {string} - Url string.
|
|
130
|
+
*/
|
|
131
|
+
protected _getHTTPRequestString(segment: any): string;
|
|
132
|
+
/**
|
|
133
|
+
* Sets url rewrite callback, used for custom url rewriting for every tile laoding.
|
|
134
|
+
* @public
|
|
135
|
+
* @param {og.terrain.GlobusTerrain~_urlRewriteCallback} ur - The callback that returns tile custom created url.
|
|
136
|
+
*/
|
|
137
|
+
public setUrlRewriteCallback(ur: any): void;
|
|
138
|
+
/**
|
|
139
|
+
* Converts loaded data to segment elevation data type(columr major elevation data array in meters)
|
|
140
|
+
* @public
|
|
141
|
+
* @virtual
|
|
142
|
+
* @param {*} data - Loaded elevation data.
|
|
143
|
+
* @returns {Array.<number>} -
|
|
144
|
+
*/
|
|
145
|
+
public _createHeights(data: any): Array<number>;
|
|
146
|
+
/**
|
|
147
|
+
* @protected
|
|
148
|
+
* @param {og.planetSegment.Segment} segment -
|
|
149
|
+
* @param {*} data -
|
|
150
|
+
*/
|
|
151
|
+
protected _applyElevationsData(segment: any, elevations: any): void;
|
|
152
|
+
}
|
|
153
|
+
import { Loader } from "../utils/Loader.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export class MapboxTerrain extends GlobusTerrain {
|
|
2
|
+
constructor(name: any, options: any);
|
|
3
|
+
equalizeVertices: any;
|
|
4
|
+
_imageSize: any;
|
|
5
|
+
_ctx: CanvasRenderingContext2D;
|
|
6
|
+
_createTemporalCanvas(size: any): CanvasRenderingContext2D;
|
|
7
|
+
}
|
|
8
|
+
import { GlobusTerrain } from "./GlobusTerrain.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class FontAtlas {
|
|
2
|
+
atlasesArr: any[];
|
|
3
|
+
atlasIndexes: {};
|
|
4
|
+
atlasIndexesDeferred: any[];
|
|
5
|
+
tokenImageSize: number;
|
|
6
|
+
samplerArr: number[];
|
|
7
|
+
_handler: any;
|
|
8
|
+
assignHandler(handler: any): void;
|
|
9
|
+
getFontIndex(face: any): any;
|
|
10
|
+
getFullIndex(face: any): any;
|
|
11
|
+
_applyFontDataToAtlas(atlas: any, data: any): void;
|
|
12
|
+
initFont(faceName: any, dataJson: any, imageBase64: any): void;
|
|
13
|
+
loadFont(faceName: any, srcDir: any, atlasUrl: any): void;
|
|
14
|
+
}
|