@openglobus/og 0.11.1 → 0.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/package.json +18 -20
  2. package/src/og/Clock.js +11 -11
  3. package/src/og/Deferred.js +1 -1
  4. package/src/og/Events.js +9 -7
  5. package/src/og/Extent.js +117 -72
  6. package/src/og/Globe.js +35 -22
  7. package/src/og/ImageCanvas.js +24 -18
  8. package/src/og/Lock.js +2 -2
  9. package/src/og/LonLat.js +40 -37
  10. package/src/og/Popup.js +21 -15
  11. package/src/og/QueueArray.js +7 -3
  12. package/src/og/Rectangle.js +11 -6
  13. package/src/og/Stack.js +8 -5
  14. package/src/og/ajax.js +21 -33
  15. package/src/og/astro/astro.js +5 -5
  16. package/src/og/astro/earth.js +23 -17
  17. package/src/og/astro/jd.js +44 -39
  18. package/src/og/astro/orbit.js +20 -18
  19. package/src/og/astro/rotation.js +17 -8
  20. package/src/og/bv/Box.js +7 -3
  21. package/src/og/bv/Sphere.js +17 -9
  22. package/src/og/camera/Camera.js +137 -86
  23. package/src/og/camera/Frustum.js +30 -19
  24. package/src/og/camera/PlanetCamera.js +30 -26
  25. package/src/og/control/CompassButton.js +8 -2
  26. package/src/og/control/Control.js +13 -11
  27. package/src/og/control/DebugInfo.js +4 -1
  28. package/src/og/control/EarthCoordinates.js +62 -41
  29. package/src/og/control/EarthNavigation.js +20 -22
  30. package/src/og/control/GeoImageDragControl.js +1 -1
  31. package/src/og/control/KeyboardNavigation.js +12 -12
  32. package/src/og/control/LayerSwitcher.js +24 -23
  33. package/src/og/control/Lighting.js +1 -1
  34. package/src/og/control/MouseNavigation.js +1 -1
  35. package/src/og/control/ScaleControl.js +1 -1
  36. package/src/og/control/SegmentBoundVisualization.js +8 -9
  37. package/src/og/control/ShowFps.js +15 -10
  38. package/src/og/control/SimpleNavigation.js +8 -10
  39. package/src/og/control/Sun.js +25 -15
  40. package/src/og/control/ToggleWireframe.js +5 -5
  41. package/src/og/control/TouchNavigation.js +58 -45
  42. package/src/og/control/ZoomControl.js +41 -25
  43. package/src/og/control/index.js +4 -0
  44. package/src/og/ellipsoid/Ellipsoid.js +181 -85
  45. package/src/og/ellipsoid/wgs84.js +4 -4
  46. package/src/og/entity/BaseBillboard.js +97 -44
  47. package/src/og/entity/Billboard.js +15 -11
  48. package/src/og/entity/BillboardHandler.js +314 -64
  49. package/src/og/entity/Entity.js +106 -74
  50. package/src/og/entity/EntityCollection.js +72 -49
  51. package/src/og/entity/GeoObject.js +228 -0
  52. package/src/og/entity/GeoObjectHandler.js +910 -0
  53. package/src/og/entity/Geometry.js +29 -26
  54. package/src/og/entity/GeometryHandler.js +598 -126
  55. package/src/og/entity/Label.js +74 -40
  56. package/src/og/entity/LabelHandler.js +47 -246
  57. package/src/og/entity/LabelWorker.js +213 -0
  58. package/src/og/entity/Object3d.js +504 -0
  59. package/src/og/entity/PointCloud.js +81 -33
  60. package/src/og/entity/PointCloudHandler.js +9 -9
  61. package/src/og/entity/Polyline.js +39 -39
  62. package/src/og/entity/Ray.js +61 -28
  63. package/src/og/entity/ShapeHandler.js +1 -1
  64. package/src/og/entity/Strip.js +77 -48
  65. package/src/og/entity/StripHandler.js +27 -27
  66. package/src/og/entity/index.js +8 -16
  67. package/src/og/input/KeyboardHandler.js +107 -104
  68. package/src/og/input/MouseHandler.js +81 -78
  69. package/src/og/input/TouchHandler.js +55 -51
  70. package/src/og/layer/BaseGeoImage.js +61 -30
  71. package/src/og/layer/CanvasTiles.js +26 -24
  72. package/src/og/layer/GeoImage.js +10 -10
  73. package/src/og/layer/GeoTexture2d.js +1 -1
  74. package/src/og/layer/GeoVideo.js +3 -3
  75. package/src/og/layer/KML.js +66 -40
  76. package/src/og/layer/Layer.js +27 -17
  77. package/src/og/layer/Material.js +93 -61
  78. package/src/og/layer/Vector.js +118 -72
  79. package/src/og/layer/WMS.js +36 -19
  80. package/src/og/layer/XYZ.js +55 -48
  81. package/src/og/light/LightSource.js +47 -40
  82. package/src/og/math/Line2.js +24 -24
  83. package/src/og/math/Line3.js +103 -102
  84. package/src/og/math/Mat3.js +134 -121
  85. package/src/og/math/Mat4.js +603 -459
  86. package/src/og/math/Plane.js +21 -20
  87. package/src/og/math/Quat.js +980 -927
  88. package/src/og/math/Ray.js +195 -187
  89. package/src/og/math/Vec2.js +127 -117
  90. package/src/og/math/Vec3.js +206 -176
  91. package/src/og/math/Vec4.js +49 -53
  92. package/src/og/math/coder.js +18 -18
  93. package/src/og/math.js +12 -12
  94. package/src/og/mercator.js +11 -11
  95. package/src/og/proj/EPSG3857.js +4 -4
  96. package/src/og/proj/EPSG4326.js +4 -4
  97. package/src/og/proj/Proj.js +31 -31
  98. package/src/og/quadTree/EntityCollectionNode.js +310 -300
  99. package/src/og/quadTree/Node.js +1008 -993
  100. package/src/og/renderer/Renderer.js +768 -747
  101. package/src/og/renderer/RendererEvents.js +9 -6
  102. package/src/og/scene/Axes.js +1 -1
  103. package/src/og/scene/BaseNode.js +8 -9
  104. package/src/og/scene/Planet.js +115 -87
  105. package/src/og/scene/RenderNode.js +29 -22
  106. package/src/og/scene/SkyBox.js +1 -1
  107. package/src/og/segment/Segment.js +1886 -1878
  108. package/src/og/segment/SegmentLonLat.js +298 -268
  109. package/src/og/segment/segmentHelper.js +11 -11
  110. package/src/og/shaders/bloom.js +1 -1
  111. package/src/og/shaders/blur.js +2 -2
  112. package/src/og/shaders/depth.js +1 -1
  113. package/src/og/shaders/geoObject.js +211 -0
  114. package/src/og/shaders/label.js +1 -1
  115. package/src/og/shaders/lumFilter.js +1 -1
  116. package/src/og/shaders/pointCloud.js +42 -42
  117. package/src/og/shaders/screenFrame.js +1 -1
  118. package/src/og/shaders/shape.js +15 -21
  119. package/src/og/shaders/skybox.js +37 -37
  120. package/src/og/shaders/toneMapping.js +1 -1
  121. package/src/og/shapes/BaseShape.js +129 -57
  122. package/src/og/shapes/Icosphere.js +30 -15
  123. package/src/og/shapes/Sphere.js +13 -16
  124. package/src/og/terrain/BilTerrain.js +2 -1
  125. package/src/og/terrain/EmptyTerrain.js +2 -2
  126. package/src/og/terrain/Geoid.js +2 -2
  127. package/src/og/terrain/GlobusTerrain.js +10 -10
  128. package/src/og/terrain/MapboxTerrain.js +1 -1
  129. package/src/og/utils/GeoImageCreator.js +9 -9
  130. package/src/og/utils/Loader.js +6 -6
  131. package/src/og/utils/NormalMapCreator.js +13 -13
  132. package/src/og/utils/TerrainWorker.js +1 -1
  133. package/src/og/utils/TextureAtlas.js +20 -22
  134. package/src/og/utils/VectorTileCreator.js +5 -5
  135. package/src/og/utils/earcut.js +1 -1
  136. package/src/og/utils/shared.js +15 -15
  137. package/src/og/webgl/Framebuffer.js +101 -53
  138. package/src/og/webgl/Handler.js +125 -85
  139. package/src/og/webgl/Multisample.js +55 -27
  140. package/src/og/webgl/Program.js +80 -35
  141. package/src/og/webgl/ProgramController.js +27 -23
  142. package/src/og/webgl/callbacks.js +8 -8
  143. package/types/Clock.d.ts +6 -2
  144. package/types/Deferred.d.ts +1 -1
  145. package/types/Events.d.ts +8 -4
  146. package/types/Extent.d.ts +37 -33
  147. package/types/Globe.d.ts +15 -13
  148. package/types/ImageCanvas.d.ts +5 -3
  149. package/types/LonLat.d.ts +24 -24
  150. package/types/Popup.d.ts +4 -0
  151. package/types/QueueArray.d.ts +6 -2
  152. package/types/Rectangle.d.ts +10 -4
  153. package/types/Stack.d.ts +4 -0
  154. package/types/ajax.d.ts +1 -1
  155. package/types/astro/earth.d.ts +3 -2
  156. package/types/bv/Box.d.ts +10 -5
  157. package/types/bv/Sphere.d.ts +13 -7
  158. package/types/camera/Camera.d.ts +90 -81
  159. package/types/camera/Frustum.d.ts +26 -22
  160. package/types/camera/PlanetCamera.d.ts +49 -53
  161. package/types/control/CompassButton.d.ts +4 -4
  162. package/types/control/Control.d.ts +7 -4
  163. package/types/control/DebugInfo.d.ts +3 -4
  164. package/types/control/EarthCoordinates.d.ts +6 -6
  165. package/types/control/EarthNavigation.d.ts +42 -0
  166. package/types/control/KeyboardNavigation.d.ts +3 -4
  167. package/types/control/LayerSwitcher.d.ts +3 -5
  168. package/types/control/Lighting.d.ts +3 -3
  169. package/types/control/MouseNavigation.d.ts +47 -0
  170. package/types/control/ScaleControl.d.ts +3 -3
  171. package/types/control/ShowFps.d.ts +3 -4
  172. package/types/control/SimpleNavigation.d.ts +3 -6
  173. package/types/control/Sun.d.ts +8 -10
  174. package/types/control/ToggleWireframe.d.ts +3 -3
  175. package/types/control/TouchNavigation.d.ts +48 -0
  176. package/types/control/ZoomControl.d.ts +3 -4
  177. package/types/control/index.d.ts +3 -1
  178. package/types/ellipsoid/Ellipsoid.d.ts +47 -43
  179. package/types/ellipsoid/wgs84.d.ts +3 -2
  180. package/types/entity/BaseBillboard.d.ts +41 -34
  181. package/types/entity/Billboard.d.ts +7 -7
  182. package/types/entity/BillboardHandler.d.ts +4 -0
  183. package/types/entity/Entity.d.ts +101 -83
  184. package/types/entity/EntityCollection.d.ts +57 -43
  185. package/types/entity/GeoObject.d.ts +111 -0
  186. package/types/entity/GeoObjectHandler.d.ts +77 -0
  187. package/types/entity/Geometry.d.ts +9 -7
  188. package/types/entity/GeometryHandler.d.ts +2 -2
  189. package/types/entity/Label.d.ts +24 -29
  190. package/types/entity/LabelHandler.d.ts +9 -2
  191. package/types/entity/LabelWorker.d.ts +9 -0
  192. package/types/entity/PointCloud.d.ts +8 -8
  193. package/types/entity/PointCloudHandler.d.ts +3 -3
  194. package/types/entity/Polyline.d.ts +58 -55
  195. package/types/entity/Ray.d.ts +19 -18
  196. package/types/entity/Strip.d.ts +8 -7
  197. package/types/entity/StripHandler.d.ts +3 -3
  198. package/types/entity/index.d.ts +7 -7
  199. package/types/input/KeyboardHandler.d.ts +10 -0
  200. package/types/input/MouseHandler.d.ts +5 -0
  201. package/types/input/TouchHandler.d.ts +5 -0
  202. package/types/layer/BaseGeoImage.d.ts +23 -35
  203. package/types/layer/CanvasTiles.d.ts +15 -22
  204. package/types/layer/GeoImage.d.ts +5 -18
  205. package/types/layer/GeoVideo.d.ts +5 -30
  206. package/types/layer/KML.d.ts +20 -15
  207. package/types/layer/Layer.d.ts +326 -0
  208. package/types/layer/Material.d.ts +45 -0
  209. package/types/layer/Vector.d.ts +208 -0
  210. package/types/layer/WMS.d.ts +4 -7
  211. package/types/layer/XYZ.d.ts +19 -25
  212. package/types/light/LightSource.d.ts +54 -53
  213. package/types/math/Line2.d.ts +11 -0
  214. package/types/math/Line3.d.ts +10 -0
  215. package/types/math/Mat3.d.ts +30 -18
  216. package/types/math/Mat4.d.ts +71 -52
  217. package/types/math/Plane.d.ts +5 -4
  218. package/types/math/Quat.d.ts +379 -0
  219. package/types/math/Ray.d.ts +82 -0
  220. package/types/math/Vec2.d.ts +102 -101
  221. package/types/math/Vec3.d.ts +143 -142
  222. package/types/math/Vec4.d.ts +40 -39
  223. package/types/math/coder.d.ts +12 -11
  224. package/types/math.d.ts +8 -8
  225. package/types/mercator.d.ts +3 -3
  226. package/types/proj/EPSG3857.d.ts +3 -2
  227. package/types/proj/EPSG4326.d.ts +3 -2
  228. package/types/proj/Proj.d.ts +42 -0
  229. package/types/quadTree/EntityCollectionNode.d.ts +34 -0
  230. package/types/quadTree/Node.d.ts +61 -0
  231. package/types/renderer/Renderer.d.ts +300 -0
  232. package/types/renderer/RendererEvents.d.ts +10 -7
  233. package/types/scene/BaseNode.d.ts +9 -9
  234. package/types/scene/Planet.d.ts +131 -126
  235. package/types/scene/RenderNode.d.ts +22 -23
  236. package/types/segment/Segment.d.ts +279 -0
  237. package/types/segment/SegmentLonLat.d.ts +16 -0
  238. package/types/shaders/geoObject.d.ts +3 -0
  239. package/types/shapes/BaseShape.d.ts +43 -40
  240. package/types/shapes/Sphere.d.ts +7 -7
  241. package/types/terrain/BilTerrain.d.ts +0 -1
  242. package/types/terrain/EmptyTerrain.d.ts +4 -4
  243. package/types/terrain/GlobusTerrain.d.ts +17 -54
  244. package/types/terrain/MapboxTerrain.d.ts +0 -1
  245. package/types/utils/GeoImageCreator.d.ts +3 -2
  246. package/types/utils/TextureAtlas.d.ts +8 -8
  247. package/types/utils/shared.d.ts +25 -24
  248. package/types/webgl/Framebuffer.d.ts +5 -5
  249. package/types/webgl/Handler.d.ts +68 -43
  250. package/types/webgl/Multisample.d.ts +5 -5
  251. package/types/webgl/Program.d.ts +8 -2
  252. package/types/webgl/ProgramController.d.ts +18 -13
  253. package/src/og/inherits.js +0 -8
  254. package/src/og/utils/polylabel.js +0 -176
  255. package/types/inherits.d.ts +0 -4
@@ -0,0 +1,279 @@
1
+ export const MAX_NORMAL_ZOOM: 7;
2
+ /**
3
+ * Planet segment Web Mercator tile class that stored and rendered with quad tree.
4
+ * @class
5
+ * @param {quadTree.Node} node - Segment node.
6
+ * @param {Planet} planet - Current planet scene.
7
+ * @param {Number} tileZoom - Zoom index.
8
+ * @param {Extent} extent - Segment extent.
9
+ */
10
+ export class Segment {
11
+ /**
12
+ * @param {quadTree.Node} node - Segment node.
13
+ * @param {Planet} planet - Current planet scene.
14
+ * @param {number} tileZoom - Zoom index.
15
+ * @param {Extent} extent - Segment extent.
16
+ */
17
+ constructor(node: quadTree.Node, planet: Planet, tileZoom: number, extent: Extent);
18
+ isPole: boolean;
19
+ _tileGroup: number;
20
+ _projection: import("../proj/Proj.js").Proj;
21
+ /**
22
+ * Quad tree node of the segment.
23
+ * @type {quadTree.Node}
24
+ */
25
+ node: quadTree.Node;
26
+ /**
27
+ * Planet pointer.
28
+ * @type {Planet}
29
+ */
30
+ planet: Planet;
31
+ /**
32
+ * WebGl handler pointer.
33
+ * @type {Handler}
34
+ */
35
+ handler: Handler;
36
+ /**
37
+ * Segment bounding sphere
38
+ * @type {Sphere}
39
+ */
40
+ bsphere: Sphere;
41
+ _plainRadius: number;
42
+ /**
43
+ * Segment bounding box.
44
+ * @type {Box}
45
+ */
46
+ bbox: Box;
47
+ _swNorm: any;
48
+ _nwNorm: any;
49
+ _seNorm: any;
50
+ _neNorm: any;
51
+ /**
52
+ * Geographical extent.
53
+ * @type {Extent}
54
+ */
55
+ _extent: Extent;
56
+ _extentLonLat: Extent;
57
+ /**
58
+ * Vertices grid size.
59
+ * @type {number}
60
+ */
61
+ gridSize: number;
62
+ fileGridSize: number;
63
+ /**
64
+ * Tile zoom index.
65
+ * @type {number}
66
+ */
67
+ tileZoom: number;
68
+ /**
69
+ * Horizontal tile index.
70
+ * @type {number}
71
+ */
72
+ tileX: number;
73
+ tileXE: number;
74
+ tileXW: number;
75
+ tileYN: number;
76
+ tileYS: number;
77
+ /**
78
+ * Vertical tile index.
79
+ * @type {number}
80
+ */
81
+ tileY: number;
82
+ tileIndex: string;
83
+ /**
84
+ * Texture materials array.
85
+ * @type {Array.<planetSegment.Material>}
86
+ */
87
+ materials: Array<planetSegment.Material>;
88
+ /**
89
+ * Plain segment vertices was created.
90
+ * @type {boolean}
91
+ */
92
+ plainReady: boolean;
93
+ /**
94
+ * Segment is ready to create plain vertices.
95
+ * @type {boolean}
96
+ */
97
+ initialized: boolean;
98
+ /**
99
+ * Normal map is allready made.
100
+ * @type {boolean}
101
+ */
102
+ normalMapReady: boolean;
103
+ /**
104
+ * Parent normal map is made allready(optimization parameter).
105
+ * @type {boolean}
106
+ */
107
+ parentNormalMapReady: boolean;
108
+ /**
109
+ * Terrain is allready applied flag.
110
+ * @type {boolean}
111
+ */
112
+ terrainReady: boolean;
113
+ /**
114
+ * Terrain is loading now flag.
115
+ * @type {boolean}
116
+ */
117
+ terrainIsLoading: boolean;
118
+ /**
119
+ * Terrain existing flag.
120
+ * @type {boolean}
121
+ */
122
+ terrainExists: boolean;
123
+ plainVertices: any;
124
+ plainVerticesHigh: any;
125
+ plainVerticesLow: any;
126
+ plainNormals: any;
127
+ terrainVertices: any;
128
+ terrainVerticesHigh: any;
129
+ terrainVerticesLow: any;
130
+ noDataVertices: any;
131
+ tempVertices: any;
132
+ tempVerticesHigh: any;
133
+ tempVerticesLow: any;
134
+ normalMapTexture: any;
135
+ normalMapTextureBias: Float32Array;
136
+ normalMapVertices: any;
137
+ normalMapVerticesHigh: any;
138
+ normalMapVerticesLow: any;
139
+ normalMapNormals: any;
140
+ vertexNormalBuffer: any;
141
+ vertexPositionBuffer: any;
142
+ vertexPositionBufferHigh: any;
143
+ vertexPositionBufferLow: any;
144
+ vertexTextureCoordBuffer: any;
145
+ _globalTextureCoordinates: Float32Array;
146
+ _inTheQueue: boolean;
147
+ _appliedNeighborsZoom: number[];
148
+ _renderingSlices: any[];
149
+ _indexBuffer: any;
150
+ readyToEngage: boolean;
151
+ plainProcessing: boolean;
152
+ /**
153
+ * Returns that segment good for rendering with camera by current lod ratio.
154
+ * @public
155
+ * @param {Camera} camera - Camera object.
156
+ * @returns {boolean} -
157
+ */
158
+ public acceptForRendering(camera: Camera): boolean;
159
+ /**
160
+ * Returns entity terrain point.
161
+ * @public
162
+ * @param {Entity} entity - Entity.
163
+ * @param {Vec3} res - Point coordinates.
164
+ * @param {Vec3} [normal] - Terrain point normal.
165
+ * @returns {Vec3} -
166
+ */
167
+ public getEntityTerrainPoint(entity: Entity, res: Vec3, normal?: Vec3): Vec3;
168
+ isEntityInside(e: any): boolean;
169
+ /**
170
+ * Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
171
+ * @public
172
+ * @param {Vec3} xyz - Cartesian object position.
173
+ * @param {LonLat} insideSegmentPosition - Geodetic object position.
174
+ * @param {Vec3} [res] - Result cartesian coordiantes on the terrain.
175
+ * @param {Vec3} [normal] - Terrain point normal.
176
+ * @returns {number} -
177
+ */
178
+ public getTerrainPoint(xyz: Vec3, insideSegmentPosition: LonLat, res?: Vec3, normal?: Vec3): number;
179
+ /**
180
+ * Project wgs86 to segment native projection.
181
+ * @public
182
+ * @param {LonLat} lonlat - Coordinates to project.
183
+ * @returns {LonLat} -
184
+ */
185
+ public projectNative(lonlat: LonLat): LonLat;
186
+ /**
187
+ *
188
+ * @param {boolean} forceLoading
189
+ */
190
+ loadTerrain(forceLoading: boolean): void;
191
+ /**
192
+ * Terrain obtained from server.
193
+ * @param {Float32Array} elevations - Elevation data.
194
+ */
195
+ elevationsExists(elevations: Float32Array): void;
196
+ _checkEqualization(neighborSide: any, neigborNode: any): boolean;
197
+ equalize(): void;
198
+ engage(): void;
199
+ _plainSegmentWorkerCallback(data: any): void;
200
+ _terrainWorkerCallback(data: any): void;
201
+ normalMapTexturePtr: any;
202
+ /**
203
+ * Terrain is not obtained or not exists on the server.
204
+ */
205
+ elevationsNotExists(): void;
206
+ _normalMapEdgeEqualize(side: any): void;
207
+ applyTerrain(elevations: any): void;
208
+ /**
209
+ * Delete segment gl buffers.
210
+ */
211
+ deleteBuffers(): void;
212
+ /**
213
+ * Delete materials.
214
+ */
215
+ deleteMaterials(): void;
216
+ /**
217
+ * Delete elevation data.
218
+ */
219
+ deleteElevations(): void;
220
+ /**
221
+ * Clear but not destroy segment data.
222
+ */
223
+ clearSegment(): void;
224
+ /**
225
+ * Removes cache records.
226
+ */
227
+ _freeCache(): void;
228
+ /**
229
+ * Clear and destroy all segment data.
230
+ */
231
+ destroySegment(): void;
232
+ _tileOffsetArr: any;
233
+ _visibleExtentOffsetArr: any;
234
+ _setExtentLonLat(): void;
235
+ /**
236
+ * Creates bound volumes by segment geographical extent.
237
+ */
238
+ createBoundsByExtent(): void;
239
+ createBoundsByParent(): void;
240
+ setBoundingSphere(x: any, y: any, z: any, v: any): void;
241
+ setBoundingVolume(xmin: any, ymin: any, zmin: any, xmax: any, ymax: any, zmax: any): void;
242
+ setBoundingVolume3v(vmin: any, vmax: any): void;
243
+ setBoundingVolumeArr(bounds: any): void;
244
+ createCoordsBuffers(verticesHigh: any, verticesLow: any, gridSize: any): void;
245
+ _addViewExtent(): void;
246
+ _assignTileIndexes(): void;
247
+ initialize(): void;
248
+ _assignGlobalTextureCoordinates(): void;
249
+ createPlainSegmentAsync(): void;
250
+ createPlainSegment(): void;
251
+ _createPlainVertices(): void;
252
+ /**
253
+ * Gets specific layer material.
254
+ * @public
255
+ * @param {Layer} layer - Layer object.
256
+ * @returns {planetSegment.Material} - Segment material.
257
+ */
258
+ public getMaterialByLayer(layer: Layer): planetSegment.Material;
259
+ _getLayerExtentOffset(layer: any): number[];
260
+ screenRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
261
+ heightPickingRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
262
+ colorPickingRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
263
+ depthRendering(sh: any, layerSlice: any, sliceIndex: any, defaultTexture: any, isOverlay: any): void;
264
+ _getIndexBuffer(): any;
265
+ _collectVisibleNodes(): void;
266
+ layerOverlap(layer: any): boolean;
267
+ getDefaultTexture(): any;
268
+ getExtentLonLat(): Extent;
269
+ getExtentMerc(): Extent;
270
+ getExtent(): Extent;
271
+ getNodeState(): any;
272
+ getNeighborSide(b: any): 0 | 1 | 2 | 3 | -1;
273
+ }
274
+ import { Sphere } from "../bv/Sphere.js";
275
+ import { Box } from "../bv/Box.js";
276
+ import { Extent } from "../Extent.js";
277
+ import { Vec3 } from "../math/Vec3.js";
278
+ import { LonLat } from "../LonLat.js";
279
+ import { Layer } from "../layer/Layer.js";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Planet segment Web Mercator tile class that stored and rendered with quad tree.
3
+ * @class
4
+ * @extends {Segment}
5
+ * @param {quadNode.Node} node - Quad tree segment node.
6
+ * @param {Planet} planet - Scene planet.
7
+ * @param {Number} tileZoom - Segment tile zoom index.
8
+ * @param {Extent} extent - Segment WGS84 extent.
9
+ */
10
+ export class SegmentLonLat extends Segment {
11
+ _extentMerc: Extent;
12
+ _isNorth: boolean;
13
+ normalMapNormalsRaw: Float32Array;
14
+ }
15
+ import { Segment } from "./Segment.js";
16
+ import { Extent } from "../Extent.js";
@@ -0,0 +1,3 @@
1
+ export function geo_object(): Program;
2
+ export function geo_object_picking(): Program;
3
+ import { Program } from "../webgl/Program.js";
@@ -2,10 +2,10 @@
2
2
  * Base geometry shape class.
3
3
  * @class
4
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.
5
+ * @param {Vec3} [options.position] - Shape position.
6
+ * @param {Quat} [options.orientation] - Shape orientation(rotation).
7
+ * @param {Vec3} [options.scale] - Scale vector.
8
+ * @param {Array.<number>} [options.color] - Shape RGBA color. (exactly 4 entries)
9
9
  * @param {string} [options.src] - Texture image url source.
10
10
  * @param {boolean} [options.visibility] - Shape visibility.
11
11
  */
@@ -23,27 +23,27 @@ export class BaseShape {
23
23
  /**
24
24
  * Shape position.
25
25
  * @public
26
- * @type {og.Vec3}
26
+ * @type {Vec3}
27
27
  */
28
- public position: any;
28
+ public position: Vec3;
29
29
  /**
30
30
  * Shape orientation(rotation)
31
31
  * @public
32
- * @type {og.Quat}
32
+ * @type {Quat}
33
33
  */
34
- public orientation: any;
34
+ public orientation: Quat;
35
35
  /**
36
36
  * Scale.
37
37
  * @public
38
- * @type {og.Vec3}
38
+ * @type {Vec3}
39
39
  */
40
- public scale: any;
40
+ public scale: Vec3;
41
41
  /**
42
42
  * Shape RGBA color.
43
43
  * @public
44
- * @type {Array.<number,number,number,number>}
44
+ * @type {Array.<number>} - (exactly 4 entries)
45
45
  */
46
- public color: Array<number, number, number, number>;
46
+ public color: Array<number>;
47
47
  /**
48
48
  * Shape visibility.
49
49
  * @public
@@ -103,21 +103,21 @@ export class BaseShape {
103
103
  /**
104
104
  * Scale matrix.
105
105
  * @protected
106
- * @type {og.Mat4}
106
+ * @type {Mat4}
107
107
  */
108
- protected _mxScale: any;
108
+ protected _mxScale: Mat4;
109
109
  /**
110
110
  * Translation matrix.
111
111
  * @protected
112
- * @type {og.Mat4}
112
+ * @type {Mat4}
113
113
  */
114
- protected _mxTranslation: any;
114
+ protected _mxTranslation: Mat4;
115
115
  /**
116
116
  * Model matrix.
117
117
  * @protected
118
- * @type {og.Mat4}
118
+ * @type {Mat4}
119
119
  */
120
- protected _mxModel: any;
120
+ protected _mxModel: Mat4;
121
121
  /**
122
122
  * Gl texture pointer.
123
123
  * @protected
@@ -126,27 +126,27 @@ export class BaseShape {
126
126
  /**
127
127
  * Assigned render node.
128
128
  * @protected
129
- * @type {og.scene.RenderNode}
129
+ * @type {RenderNode}
130
130
  */
131
- protected _renderNode: any;
131
+ protected _renderNode: RenderNode;
132
132
  /**
133
133
  * Assigned picking color.
134
134
  * @protected
135
- * @type {Array.<number,number,number>}
135
+ * @type {Array.<number>} - (exactly 3 entries)
136
136
  */
137
- protected _pickingColor: Array<number, number, number>;
137
+ protected _pickingColor: Array<number>;
138
138
  /**
139
139
  * Entity instance that holds this shape.
140
140
  * @protected
141
- * @type {og.Entity}
141
+ * @type {Entity}
142
142
  */
143
- protected _entity: any;
143
+ protected _entity: Entity;
144
144
  /**
145
145
  * Handler that stores and renders this shape object.
146
146
  * @protected
147
- * @type {og.ShapeHandler}
147
+ * @type {ShapeHandler}
148
148
  */
149
- protected _handler: any;
149
+ protected _handler: ShapeHandler;
150
150
  /**
151
151
  * Shape handler array index.
152
152
  * @protected
@@ -161,15 +161,15 @@ export class BaseShape {
161
161
  /**
162
162
  * Sets shape color.
163
163
  * @public
164
- * @param {Array.<number,number,number,number>} color - RGBA color values array.
164
+ * @param {Array.<number>} color - RGBA color values array. (exactly 4 entries)
165
165
  */
166
- public setColor(color: Array<number, number, number, number>): void;
166
+ public setColor(color: Array<number>): void;
167
167
  /**
168
168
  * Sets shape color.
169
169
  * @public
170
- * @param {og.Vec4} color - RGBA color vector.
170
+ * @param {Vec4} color - RGBA color vector.
171
171
  */
172
- public setColor4v(color: any): void;
172
+ public setColor4v(color: Vec4): void;
173
173
  /**
174
174
  * Sets shape opacity value.
175
175
  * @public
@@ -196,26 +196,26 @@ export class BaseShape {
196
196
  /**
197
197
  * Assign render node.
198
198
  * @public
199
- * @param {og.scene.RenderNode} renderNode - Render node to assign.
199
+ * @param {RenderNode} renderNode - Render node to assign.
200
200
  */
201
- public setRenderNode(renderNode: any): void;
201
+ public setRenderNode(renderNode: RenderNode): void;
202
202
  /**
203
203
  * Sets shape position.
204
204
  * @public
205
- * @param {og.Vec3} position - Shape position.
205
+ * @param {Vec3} position - Shape position.
206
206
  */
207
- public setPosition3v(position: any): void;
207
+ public setPosition3v(position: Vec3): void;
208
208
  /**
209
209
  * Translate shape position to vector.
210
210
  * @public
211
- * @param {og.Vec3} vec - Translation vector.
211
+ * @param {Vec3} vec - Translation vector.
212
212
  */
213
- public translate3v(vec: any): void;
213
+ public translate3v(vec: Vec3): void;
214
214
  /**
215
215
  * Sets shape scale.
216
- * @param {og.Vec3} scale - Scale vector.
216
+ * @param {Vec3} scale - Scale vector.
217
217
  */
218
- setScale3v(scale: any): void;
218
+ setScale3v(scale: Vec3): void;
219
219
  setScale(scale: any): void;
220
220
  /**
221
221
  * Removes shape from shape handler.
@@ -225,9 +225,9 @@ export class BaseShape {
225
225
  /**
226
226
  * Assign picking color.
227
227
  * @protected
228
- * @param {og.Vec3} color - Picking RGB color.
228
+ * @param {Vec3} color - Picking RGB color.
229
229
  */
230
- protected setPickingColor3v(color: any): void;
230
+ protected setPickingColor3v(color: Vec3): void;
231
231
  /**
232
232
  * Creates buffers.
233
233
  * @protected
@@ -245,3 +245,6 @@ export class BaseShape {
245
245
  public draw(): void;
246
246
  drawPicking(): void;
247
247
  }
248
+ import { Vec3 } from "../math/Vec3.js";
249
+ import { Quat } from "../math/Quat.js";
250
+ import { Mat4 } from "../math/Mat4.js";
@@ -1,19 +1,18 @@
1
1
  /**
2
2
  * @class
3
- * @extends {og.shape.BaseShape}
3
+ * @extends {BaseShape}
4
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.
5
+ * @param {Vec3} [options.position] - Sphere position.
6
+ * @param {Quat} [options.orientation] - Sphere orientation(rotation).
7
+ * @param {Vec3} [options.scale] - Scale vector.
8
+ * @param {Array.<number>} [options.color] - Sphere RGBA color. (exactly 4 entries)
9
9
  * @param {string} [options.src] - Texture image url source.
10
10
  * @param {boolean} [options.visibility] - Sphere visibility.
11
11
  * @param {number} [options.radius=100] - Sphere radius.
12
12
  * @param {number} [options.latBands=16] - Number of latitude bands.
13
13
  * @param {number} [options.lonBands=16] - Number of longitude bands.
14
14
  */
15
- export class Sphere {
16
- constructor(options: any);
15
+ export class Sphere extends BaseShape {
17
16
  /**
18
17
  * Sphere radius.
19
18
  * @protected
@@ -39,3 +38,4 @@ export class Sphere {
39
38
  */
40
39
  protected _createData(): void;
41
40
  }
41
+ import { BaseShape } from "./BaseShape.js";
@@ -1,6 +1,5 @@
1
1
  export class BilTerrain extends GlobusTerrain {
2
2
  constructor(options: any);
3
- equalizeVertices: boolean;
4
3
  _format: string;
5
4
  _layers: any;
6
5
  _imageSize: any;
@@ -40,9 +40,9 @@ export class EmptyTerrain {
40
40
  /**
41
41
  * Planet node.
42
42
  * @protected
43
- * @type {og.scene.Planet}
43
+ * @type {Planet}
44
44
  */
45
- protected _planet: any;
45
+ protected _planet: Planet;
46
46
  _geoid: any;
47
47
  isBlur(): boolean;
48
48
  set maxNodeZoom(arg: number);
@@ -53,9 +53,9 @@ export class EmptyTerrain {
53
53
  * Loads or creates segment elevation data.
54
54
  * @public
55
55
  * @virtual
56
- * @param {og.planetSegment.Segment} segment - Segment to create elevation data.
56
+ * @param {Segment} segment - Segment to create elevation data.
57
57
  */
58
- public handleSegmentTerrain(segment: any): void;
58
+ public handleSegmentTerrain(segment: Segment): void;
59
59
  isReady(): any;
60
60
  /**
61
61
  * Abstract function
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Class that loads segment elevation data, converts it to the array and passes it to the planet segment.
3
3
  * @class
4
- * @extends {og.terrain.EmptyTerrain}
4
+ * @extends {EmptyTerrain}
5
5
  * @param {string} [name=""] - Terrain provider name.
6
6
  * @param {Object} [options] - Provider options:
7
7
  * @param {number} [options.minZoom=3] - Minimal visible zoom index when terrain handler works.
@@ -15,7 +15,7 @@
15
15
  * @fires og.terrain.GlobusTerrain#load
16
16
  * @fires og.terrain.GlobusTerrain#loadend
17
17
  */
18
- export class GlobusTerrain {
18
+ export class GlobusTerrain extends EmptyTerrain {
19
19
  /**
20
20
  * @param {string} [name]
21
21
  * @param {*} [options]
@@ -24,51 +24,18 @@ export class GlobusTerrain {
24
24
  /**
25
25
  * Events handler.
26
26
  * @public
27
- * @type {og.Events}
27
+ * @type {Events}
28
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;
29
+ public events: Events;
49
30
  /**
50
31
  * Terrain source path url template.
51
32
  * @public
52
33
  * @type {string}
53
34
  */
54
35
  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
36
  noDataValues: any;
62
- /**
63
- * Elevation tile grid size.
64
- * @public
65
- * @type {number}
66
- */
67
- public plainGridSize: number;
68
- _geoid: any;
69
37
  _extent: any;
70
38
  _dataType: string;
71
- _maxNodeZoom: number;
72
39
  _elevationCache: {};
73
40
  _fetchCache: {};
74
41
  _loader: Loader;
@@ -76,22 +43,15 @@ export class GlobusTerrain {
76
43
  * Rewrites elevation storage url query.
77
44
  * @private
78
45
  * @callback og.terrain.GlobusTerrain~_urlRewriteCallback
79
- * @param {og.planetSegment.Segment} segment - Segment to load.
46
+ * @param {Segment} segment - Segment to load.
80
47
  * @param {string} url - Created url.
81
48
  * @returns {string} - Url query string.
82
49
  */
83
50
  private _urlRewriteCallback;
84
- clearCache(): void;
85
51
  getGeoid(): any;
86
- isBlur(segment: any): boolean;
87
52
  getHeightAsync(lonLat: any, callback: any, zoom: any): boolean;
88
53
  getTileCache(lonLat: any, z: any): any;
89
54
  _getGroundHeightMerc(merc: any, tileData: any): number;
90
- /**
91
- * Stop loading.
92
- * @public
93
- */
94
- public abortLoading(): void;
95
55
  /**
96
56
  * Sets terrain data url template.
97
57
  * @public
@@ -111,28 +71,29 @@ export class GlobusTerrain {
111
71
  * Starts to load segment data.
112
72
  * @public
113
73
  * @virtual
114
- * @param {og.planetSegment.Segment} segment - Segment that wants a terrain data.
74
+ * @param {Segment} segment - Segment that wants a terrain data.
75
+ * @param {boolean} forceLoading
115
76
  */
116
- public loadTerrain(segment: any, forceLoading: any): void;
77
+ public loadTerrain(segment: Segment, forceLoading: boolean): void;
117
78
  /**
118
79
  * Creates query url.
119
80
  * @protected
120
81
  * @virtual
121
- * @param {og.planetSegment.Segment} segment -
82
+ * @param {Segment} segment -
122
83
  * @returns {string} -
123
84
  */
124
- protected _createUrl(segment: any): string;
85
+ protected _createUrl(segment: Segment): string;
125
86
  /**
126
87
  * Returns actual url query string.
127
88
  * @protected
128
- * @param {og.planetSegment.Segment} segment - Segment that loads image data.
89
+ * @param {Segment} segment - Segment that loads image data.
129
90
  * @returns {string} - Url string.
130
91
  */
131
- protected _getHTTPRequestString(segment: any): string;
92
+ protected _getHTTPRequestString(segment: Segment): string;
132
93
  /**
133
94
  * Sets url rewrite callback, used for custom url rewriting for every tile laoding.
134
95
  * @public
135
- * @param {og.terrain.GlobusTerrain~_urlRewriteCallback} ur - The callback that returns tile custom created url.
96
+ * @param {GlobusTerrain~_urlRewriteCallback} ur - The callback that returns tile custom created url.
136
97
  */
137
98
  public setUrlRewriteCallback(ur: any): void;
138
99
  /**
@@ -145,9 +106,11 @@ export class GlobusTerrain {
145
106
  public _createHeights(data: any): Array<number>;
146
107
  /**
147
108
  * @protected
148
- * @param {og.planetSegment.Segment} segment -
109
+ * @param {Segment} segment -
149
110
  * @param {*} data -
150
111
  */
151
- protected _applyElevationsData(segment: any, elevations: any): void;
112
+ protected _applyElevationsData(segment: Segment, elevations: any): void;
152
113
  }
114
+ import { EmptyTerrain } from "./EmptyTerrain.js";
115
+ import { Events } from "../Events.js";
153
116
  import { Loader } from "../utils/Loader.js";