@openglobus/og 0.10.4 → 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.
Files changed (172) hide show
  1. package/css/og.css +1 -1
  2. package/package.json +11 -9
  3. package/src/og/Extent.js +274 -273
  4. package/src/og/Globe.js +11 -3
  5. package/src/og/LonLat.js +152 -146
  6. package/src/og/Popup.js +2 -1
  7. package/src/og/camera/PlanetCamera.js +112 -38
  8. package/src/og/control/EarthNavigation.js +259 -0
  9. package/src/og/control/MouseNavigation.js +68 -40
  10. package/src/og/entity/EntityCollection.js +1 -1
  11. package/src/og/entity/LabelHandler.js +366 -74
  12. package/src/og/entity/Polyline.js +3 -2
  13. package/src/og/layer/CanvasTiles.js +32 -30
  14. package/src/og/layer/KML.js +159 -0
  15. package/src/og/layer/Vector.js +5 -0
  16. package/src/og/layer/index.js +2 -1
  17. package/src/og/math/Vec2.js +448 -448
  18. package/src/og/math/Vec3.js +759 -757
  19. package/src/og/math/Vec4.js +216 -215
  20. package/src/og/quadTree/Node.js +67 -13
  21. package/src/og/renderer/RendererEvents.js +21 -16
  22. package/src/og/scene/Planet.js +25 -10
  23. package/src/og/segment/Segment.js +3 -3
  24. package/src/og/segment/SegmentLonLat.js +7 -0
  25. package/src/og/terrain/GlobusTerrain.js +4 -0
  26. package/src/og/utils/FontAtlas.js +1 -0
  27. package/src/og/utils/GeoImageCreator.js +123 -121
  28. package/src/og/utils/Loader.js +81 -80
  29. package/src/og/utils/NormalMapCreator.js +320 -318
  30. package/src/og/utils/VectorTileCreator.js +251 -250
  31. package/src/og/webgl/Framebuffer.js +265 -264
  32. package/src/og/webgl/Handler.js +1022 -1001
  33. package/src/og/webgl/Multisample.js +169 -168
  34. package/src/og/webgl/ProgramController.js +113 -112
  35. package/types/Clock.d.ts +90 -0
  36. package/types/Deferred.d.ts +6 -0
  37. package/types/Events.d.ts +73 -0
  38. package/types/Extent.d.ts +162 -0
  39. package/types/Globe.d.ts +80 -0
  40. package/types/ImageCanvas.d.ts +121 -0
  41. package/types/Lock.d.ts +12 -0
  42. package/types/LonLat.d.ts +108 -0
  43. package/types/Popup.d.ts +38 -0
  44. package/types/QueueArray.d.ts +15 -0
  45. package/types/Rectangle.d.ts +74 -0
  46. package/types/Stack.d.ts +15 -0
  47. package/types/ajax.d.ts +24 -0
  48. package/types/arial.d.ts +48 -0
  49. package/types/astro/astro.d.ts +38 -0
  50. package/types/astro/earth.d.ts +6 -0
  51. package/types/astro/jd.d.ts +254 -0
  52. package/types/bv/Box.d.ts +25 -0
  53. package/types/bv/Sphere.d.ts +32 -0
  54. package/types/bv/index.d.ts +3 -0
  55. package/types/camera/Camera.d.ts +303 -0
  56. package/types/camera/Frustum.d.ts +129 -0
  57. package/types/camera/PlanetCamera.d.ts +222 -0
  58. package/types/camera/index.d.ts +3 -0
  59. package/types/cons.d.ts +40 -0
  60. package/types/control/CompassButton.d.ts +17 -0
  61. package/types/control/Control.d.ts +101 -0
  62. package/types/control/DebugInfo.d.ts +16 -0
  63. package/types/control/EarthCoordinates.d.ts +47 -0
  64. package/types/control/GeoImageDragControl.d.ts +6 -0
  65. package/types/control/KeyboardNavigation.d.ts +22 -0
  66. package/types/control/LayerSwitcher.d.ts +23 -0
  67. package/types/control/Lighting.d.ts +16 -0
  68. package/types/control/ScaleControl.d.ts +22 -0
  69. package/types/control/ShowFps.d.ts +12 -0
  70. package/types/control/SimpleNavigation.d.ts +28 -0
  71. package/types/control/Sun.d.ts +52 -0
  72. package/types/control/ToggleWireframe.d.ts +12 -0
  73. package/types/control/ZoomControl.d.ts +28 -0
  74. package/types/control/index.d.ts +15 -0
  75. package/types/ellipsoid/Ellipsoid.d.ts +142 -0
  76. package/types/ellipsoid/index.d.ts +3 -0
  77. package/types/ellipsoid/wgs84.d.ts +5 -0
  78. package/types/entity/BaseBillboard.d.ts +208 -0
  79. package/types/entity/Billboard.d.ts +94 -0
  80. package/types/entity/BillboardHandler.d.ts +74 -0
  81. package/types/entity/Entity.d.ts +330 -0
  82. package/types/entity/EntityCollection.d.ts +303 -0
  83. package/types/entity/Geometry.d.ts +72 -0
  84. package/types/entity/GeometryHandler.d.ts +76 -0
  85. package/types/entity/Label.d.ts +194 -0
  86. package/types/entity/LabelHandler.d.ts +24 -0
  87. package/types/entity/PointCloud.d.ts +174 -0
  88. package/types/entity/PointCloudHandler.d.ts +38 -0
  89. package/types/entity/Polyline.d.ts +303 -0
  90. package/types/entity/PolylineHandler.d.ts +18 -0
  91. package/types/entity/Ray.d.ts +123 -0
  92. package/types/entity/RayHandler.d.ts +67 -0
  93. package/types/entity/ShapeHandler.d.ts +22 -0
  94. package/types/entity/Strip.d.ts +118 -0
  95. package/types/entity/StripHandler.d.ts +38 -0
  96. package/types/entity/index.d.ts +8 -0
  97. package/types/index.core.d.ts +65 -0
  98. package/types/index.d.ts +45 -0
  99. package/types/index.webgl.d.ts +7 -0
  100. package/types/inherits.d.ts +4 -0
  101. package/types/input/input.d.ts +34 -0
  102. package/types/layer/BaseGeoImage.d.ts +106 -0
  103. package/types/layer/CanvasTiles.d.ts +75 -0
  104. package/types/layer/GeoImage.d.ts +65 -0
  105. package/types/layer/GeoTexture2d.d.ts +8 -0
  106. package/types/layer/GeoVideo.d.ts +80 -0
  107. package/types/layer/KML.d.ts +58 -0
  108. package/types/layer/WMS.d.ts +66 -0
  109. package/types/layer/XYZ.d.ts +126 -0
  110. package/types/layer/index.d.ts +10 -0
  111. package/types/light/LightSource.d.ts +177 -0
  112. package/types/math/Mat3.d.ts +53 -0
  113. package/types/math/Mat4.d.ts +157 -0
  114. package/types/math/Plane.d.ts +17 -0
  115. package/types/math/Vec2.d.ts +308 -0
  116. package/types/math/Vec3.d.ts +459 -0
  117. package/types/math/Vec4.d.ts +161 -0
  118. package/types/math/coder.d.ts +42 -0
  119. package/types/math/index.d.ts +11 -0
  120. package/types/math.d.ts +261 -0
  121. package/types/mercator.d.ts +92 -0
  122. package/types/proj/EPSG3857.d.ts +5 -0
  123. package/types/proj/EPSG4326.d.ts +5 -0
  124. package/types/quadTree/quadTree.d.ts +40 -0
  125. package/types/renderer/RendererEvents.d.ts +230 -0
  126. package/types/res/images.d.ts +3 -0
  127. package/types/scene/Axes.d.ts +11 -0
  128. package/types/scene/BaseNode.d.ts +60 -0
  129. package/types/scene/Planet.d.ts +572 -0
  130. package/types/scene/RenderNode.d.ts +143 -0
  131. package/types/scene/SkyBox.d.ts +10 -0
  132. package/types/scene/index.d.ts +4 -0
  133. package/types/segment/segmentHelper.d.ts +13 -0
  134. package/types/shaders/billboard.d.ts +3 -0
  135. package/types/shaders/depth.d.ts +2 -0
  136. package/types/shaders/drawnode.d.ts +7 -0
  137. package/types/shaders/label.d.ts +4 -0
  138. package/types/shaders/pointCloud.d.ts +2 -0
  139. package/types/shaders/polyline.d.ts +3 -0
  140. package/types/shaders/ray.d.ts +2 -0
  141. package/types/shaders/screenFrame.d.ts +2 -0
  142. package/types/shaders/shape.d.ts +4 -0
  143. package/types/shaders/skybox.d.ts +2 -0
  144. package/types/shaders/toneMapping.d.ts +2 -0
  145. package/types/shapes/BaseShape.d.ts +247 -0
  146. package/types/shapes/Sphere.d.ts +41 -0
  147. package/types/terrain/BilTerrain.d.ts +8 -0
  148. package/types/terrain/EmptyTerrain.d.ts +72 -0
  149. package/types/terrain/Geoid.d.ts +26 -0
  150. package/types/terrain/GlobusTerrain.d.ts +153 -0
  151. package/types/terrain/MapboxTerrain.d.ts +8 -0
  152. package/types/terrain/index.d.ts +5 -0
  153. package/types/utils/FontAtlas.d.ts +14 -0
  154. package/types/utils/GeoImageCreator.d.ts +29 -0
  155. package/types/utils/ImagesCacheManager.d.ts +10 -0
  156. package/types/utils/Loader.d.ts +25 -0
  157. package/types/utils/NormalMapCreator.d.ts +39 -0
  158. package/types/utils/PlainSegmentWorker.d.ts +10 -0
  159. package/types/utils/TerrainWorker.d.ts +9 -0
  160. package/types/utils/TextureAtlas.d.ts +111 -0
  161. package/types/utils/VectorTileCreator.d.ts +16 -0
  162. package/types/utils/colorTable.d.ts +143 -0
  163. package/types/utils/earcut.d.ts +6 -0
  164. package/types/utils/shared.d.ts +230 -0
  165. package/types/webgl/Framebuffer.d.ts +135 -0
  166. package/types/webgl/Handler.d.ts +372 -0
  167. package/types/webgl/Multisample.d.ts +89 -0
  168. package/types/webgl/Program.d.ts +155 -0
  169. package/types/webgl/ProgramController.d.ts +84 -0
  170. package/types/webgl/callbacks.d.ts +1 -0
  171. package/types/webgl/index.d.ts +6 -0
  172. 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,4 @@
1
+ import { Planet } from "./Planet";
2
+ import { Axes } from "./Axes";
3
+ import { SkyBox } from "./SkyBox";
4
+ export { Planet, Axes, SkyBox };
@@ -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,3 @@
1
+ export function billboardPicking(): Program;
2
+ export function billboard_screen(): Program;
3
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function depth(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -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,4 @@
1
+ export function label_webgl2(): Program;
2
+ export function labelPicking(): Program;
3
+ export function label_screen(): Program;
4
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function pointCloud(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,3 @@
1
+ export function polyline_screen(): Program;
2
+ export function polyline_picking(): Program;
3
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function rayScreen(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function screenFrame(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,4 @@
1
+ export function shape_wl(): Program;
2
+ export function shape_nl(): Program;
3
+ export function shape_picking(): Program;
4
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function skybox(): Program;
2
+ import { Program } from "../webgl/Program.js";
@@ -0,0 +1,2 @@
1
+ export function toneMapping(): Program;
2
+ 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,8 @@
1
+ export class BilTerrain extends GlobusTerrain {
2
+ constructor(options: any);
3
+ equalizeVertices: boolean;
4
+ _format: string;
5
+ _layers: any;
6
+ _imageSize: any;
7
+ }
8
+ import { GlobusTerrain } from "./GlobusTerrain.js";
@@ -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,5 @@
1
+ import { EmptyTerrain } from "./EmptyTerrain";
2
+ import { GlobusTerrain } from "./GlobusTerrain";
3
+ import { MapboxTerrain } from "./MapboxTerrain";
4
+ import { BilTerrain } from "./BilTerrain";
5
+ export { EmptyTerrain, GlobusTerrain, MapboxTerrain, BilTerrain };
@@ -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
+ }