@openglobus/og 0.11.2 → 0.11.7

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 (273) hide show
  1. package/package.json +13 -13
  2. package/src/og/Clock.js +10 -10
  3. package/src/og/Events.js +8 -6
  4. package/src/og/Extent.js +82 -41
  5. package/src/og/Globe.js +25 -13
  6. package/src/og/ImageCanvas.js +22 -16
  7. package/src/og/LonLat.js +16 -13
  8. package/src/og/Popup.js +21 -14
  9. package/src/og/QueueArray.js +6 -2
  10. package/src/og/Rectangle.js +11 -6
  11. package/src/og/Stack.js +5 -2
  12. package/src/og/ajax.js +21 -33
  13. package/src/og/astro/astro.js +5 -5
  14. package/src/og/astro/earth.js +22 -16
  15. package/src/og/astro/jd.js +23 -18
  16. package/src/og/astro/orbit.js +13 -11
  17. package/src/og/astro/rotation.js +17 -8
  18. package/src/og/bv/Box.js +7 -3
  19. package/src/og/bv/Sphere.js +14 -11
  20. package/src/og/camera/Camera.js +51 -54
  21. package/src/og/camera/Frustum.js +29 -18
  22. package/src/og/camera/PlanetCamera.js +32 -23
  23. package/src/og/control/CompassButton.js +5 -1
  24. package/src/og/control/Control.js +12 -10
  25. package/src/og/control/DebugInfo.js +4 -1
  26. package/src/og/control/EarthCoordinates.js +54 -33
  27. package/src/og/control/KeyboardNavigation.js +10 -10
  28. package/src/og/control/LayerSwitcher.js +22 -21
  29. package/src/og/control/Lighting.js +34 -3
  30. package/src/og/control/MouseNavigation.js +1 -1
  31. package/src/og/control/ScaleControl.js +1 -1
  32. package/src/og/control/SegmentBoundVisualization.js +6 -7
  33. package/src/og/control/ShowFps.js +13 -8
  34. package/src/og/control/SimpleNavigation.js +6 -8
  35. package/src/og/control/Sun.js +25 -15
  36. package/src/og/control/ToggleWireframe.js +4 -4
  37. package/src/og/control/TouchNavigation.js +44 -33
  38. package/src/og/control/ZoomControl.js +41 -25
  39. package/src/og/ellipsoid/Ellipsoid.js +162 -66
  40. package/src/og/ellipsoid/wgs84.js +4 -4
  41. package/src/og/entity/BaseBillboard.js +100 -56
  42. package/src/og/entity/Billboard.js +14 -10
  43. package/src/og/entity/BillboardHandler.js +317 -60
  44. package/src/og/entity/Entity.js +100 -68
  45. package/src/og/entity/EntityCollection.js +70 -47
  46. package/src/og/entity/GeoObject.js +228 -0
  47. package/src/og/entity/GeoObjectHandler.js +910 -0
  48. package/src/og/entity/Geometry.js +27 -24
  49. package/src/og/entity/GeometryHandler.js +596 -124
  50. package/src/og/entity/Label.js +80 -49
  51. package/src/og/entity/LabelHandler.js +45 -244
  52. package/src/og/entity/LabelWorker.js +218 -0
  53. package/src/og/entity/Object3d.js +504 -0
  54. package/src/og/entity/PointCloud.js +80 -32
  55. package/src/og/entity/PointCloudHandler.js +8 -8
  56. package/src/og/entity/Polyline.js +16 -16
  57. package/src/og/entity/Ray.js +60 -27
  58. package/src/og/entity/Strip.js +77 -48
  59. package/src/og/entity/StripHandler.js +26 -26
  60. package/src/og/entity/index.js +8 -16
  61. package/src/og/layer/BaseGeoImage.js +54 -23
  62. package/src/og/layer/CanvasTiles.js +24 -24
  63. package/src/og/layer/GeoImage.js +9 -9
  64. package/src/og/layer/GeoVideo.js +3 -3
  65. package/src/og/layer/KML.js +63 -37
  66. package/src/og/layer/Layer.js +44 -21
  67. package/src/og/layer/Material.js +23 -20
  68. package/src/og/layer/Vector.js +114 -68
  69. package/src/og/layer/WMS.js +34 -17
  70. package/src/og/layer/XYZ.js +48 -46
  71. package/src/og/light/LightSource.js +46 -39
  72. package/src/og/math/Mat3.js +34 -22
  73. package/src/og/math/Mat4.js +603 -459
  74. package/src/og/math/Plane.js +21 -20
  75. package/src/og/math/Quat.js +182 -139
  76. package/src/og/math/Ray.js +38 -33
  77. package/src/og/math/Vec2.js +85 -75
  78. package/src/og/math/Vec3.js +142 -112
  79. package/src/og/math/Vec4.js +27 -31
  80. package/src/og/math/coder.js +10 -10
  81. package/src/og/math.js +12 -12
  82. package/src/og/proj/EPSG3857.js +4 -4
  83. package/src/og/proj/EPSG4326.js +4 -4
  84. package/src/og/proj/Proj.js +4 -6
  85. package/src/og/quadTree/Node.js +8 -8
  86. package/src/og/renderer/Renderer.js +59 -52
  87. package/src/og/renderer/RendererEvents.js +50 -27
  88. package/src/og/scene/BaseNode.js +7 -8
  89. package/src/og/scene/Planet.js +102 -103
  90. package/src/og/scene/RenderNode.js +28 -21
  91. package/src/og/segment/Segment.js +26 -21
  92. package/src/og/segment/SegmentLonLat.js +5 -5
  93. package/src/og/shaders/drawnode.js +135 -142
  94. package/src/og/shaders/geoObject.js +211 -0
  95. package/src/og/shaders/pointCloud.js +41 -41
  96. package/src/og/shaders/shape.js +12 -18
  97. package/src/og/shaders/skybox.js +36 -36
  98. package/src/og/shaders/toneMapping.js +1 -0
  99. package/src/og/shapes/BaseShape.js +126 -54
  100. package/src/og/shapes/Icosphere.js +29 -14
  101. package/src/og/shapes/Sphere.js +12 -15
  102. package/src/og/terrain/BilTerrain.js +1 -0
  103. package/src/og/terrain/EmptyTerrain.js +2 -2
  104. package/src/og/terrain/GlobusTerrain.js +9 -9
  105. package/src/og/utils/FontAtlas.js +6 -2
  106. package/src/og/utils/TextureAtlas.js +22 -24
  107. package/src/og/utils/VectorTileCreator.js +1 -3
  108. package/src/og/utils/shared.js +16 -16
  109. package/src/og/webgl/Framebuffer.js +88 -40
  110. package/src/og/webgl/Handler.js +243 -169
  111. package/src/og/webgl/Multisample.js +47 -19
  112. package/src/og/webgl/Program.js +79 -34
  113. package/src/og/webgl/ProgramController.js +17 -13
  114. package/src/og/webgl/callbacks.js +8 -8
  115. package/src/og/inherits.js +0 -8
  116. package/src/og/utils/polylabel.js +0 -176
  117. package/types/Clock.d.ts +0 -90
  118. package/types/Deferred.d.ts +0 -6
  119. package/types/Events.d.ts +0 -73
  120. package/types/Extent.d.ts +0 -166
  121. package/types/Globe.d.ts +0 -75
  122. package/types/ImageCanvas.d.ts +0 -121
  123. package/types/Lock.d.ts +0 -12
  124. package/types/LonLat.d.ts +0 -108
  125. package/types/Popup.d.ts +0 -38
  126. package/types/QueueArray.d.ts +0 -15
  127. package/types/Rectangle.d.ts +0 -74
  128. package/types/Stack.d.ts +0 -15
  129. package/types/ajax.d.ts +0 -24
  130. package/types/arial.d.ts +0 -48
  131. package/types/astro/astro.d.ts +0 -38
  132. package/types/astro/earth.d.ts +0 -6
  133. package/types/astro/jd.d.ts +0 -254
  134. package/types/bv/Box.d.ts +0 -25
  135. package/types/bv/Sphere.d.ts +0 -38
  136. package/types/bv/index.d.ts +0 -3
  137. package/types/camera/Camera.d.ts +0 -303
  138. package/types/camera/Frustum.d.ts +0 -129
  139. package/types/camera/PlanetCamera.d.ts +0 -223
  140. package/types/camera/index.d.ts +0 -3
  141. package/types/cons.d.ts +0 -40
  142. package/types/control/CompassButton.d.ts +0 -18
  143. package/types/control/Control.d.ts +0 -101
  144. package/types/control/DebugInfo.d.ts +0 -16
  145. package/types/control/EarthCoordinates.d.ts +0 -47
  146. package/types/control/EarthNavigation.d.ts +0 -42
  147. package/types/control/GeoImageDragControl.d.ts +0 -6
  148. package/types/control/KeyboardNavigation.d.ts +0 -22
  149. package/types/control/LayerSwitcher.d.ts +0 -23
  150. package/types/control/Lighting.d.ts +0 -16
  151. package/types/control/MouseNavigation.d.ts +0 -51
  152. package/types/control/ScaleControl.d.ts +0 -22
  153. package/types/control/ShowFps.d.ts +0 -12
  154. package/types/control/SimpleNavigation.d.ts +0 -28
  155. package/types/control/Sun.d.ts +0 -52
  156. package/types/control/ToggleWireframe.d.ts +0 -12
  157. package/types/control/TouchNavigation.d.ts +0 -50
  158. package/types/control/ZoomControl.d.ts +0 -28
  159. package/types/control/index.d.ts +0 -17
  160. package/types/ellipsoid/Ellipsoid.d.ts +0 -142
  161. package/types/ellipsoid/index.d.ts +0 -3
  162. package/types/ellipsoid/wgs84.d.ts +0 -5
  163. package/types/entity/BaseBillboard.d.ts +0 -208
  164. package/types/entity/Billboard.d.ts +0 -94
  165. package/types/entity/BillboardHandler.d.ts +0 -74
  166. package/types/entity/Entity.d.ts +0 -331
  167. package/types/entity/EntityCollection.d.ts +0 -303
  168. package/types/entity/Geometry.d.ts +0 -73
  169. package/types/entity/GeometryHandler.d.ts +0 -76
  170. package/types/entity/Label.d.ts +0 -194
  171. package/types/entity/LabelHandler.d.ts +0 -24
  172. package/types/entity/PointCloud.d.ts +0 -174
  173. package/types/entity/PointCloudHandler.d.ts +0 -38
  174. package/types/entity/Polyline.d.ts +0 -304
  175. package/types/entity/PolylineHandler.d.ts +0 -18
  176. package/types/entity/Ray.d.ts +0 -123
  177. package/types/entity/RayHandler.d.ts +0 -67
  178. package/types/entity/ShapeHandler.d.ts +0 -22
  179. package/types/entity/Strip.d.ts +0 -118
  180. package/types/entity/StripHandler.d.ts +0 -38
  181. package/types/entity/index.d.ts +0 -8
  182. package/types/index.core.d.ts +0 -65
  183. package/types/index.d.ts +0 -45
  184. package/types/index.webgl.d.ts +0 -7
  185. package/types/inherits.d.ts +0 -4
  186. package/types/input/KeyboardHandler.d.ts +0 -10
  187. package/types/input/MouseHandler.d.ts +0 -5
  188. package/types/input/TouchHandler.d.ts +0 -5
  189. package/types/input/input.d.ts +0 -34
  190. package/types/layer/BaseGeoImage.d.ts +0 -107
  191. package/types/layer/CanvasTiles.d.ts +0 -75
  192. package/types/layer/GeoImage.d.ts +0 -65
  193. package/types/layer/GeoTexture2d.d.ts +0 -8
  194. package/types/layer/GeoVideo.d.ts +0 -80
  195. package/types/layer/KML.d.ts +0 -58
  196. package/types/layer/Layer.d.ts +0 -321
  197. package/types/layer/Material.d.ts +0 -48
  198. package/types/layer/Vector.d.ts +0 -228
  199. package/types/layer/WMS.d.ts +0 -66
  200. package/types/layer/XYZ.d.ts +0 -130
  201. package/types/layer/index.d.ts +0 -10
  202. package/types/light/LightSource.d.ts +0 -177
  203. package/types/math/Line2.d.ts +0 -11
  204. package/types/math/Line3.d.ts +0 -10
  205. package/types/math/Mat3.d.ts +0 -63
  206. package/types/math/Mat4.d.ts +0 -173
  207. package/types/math/Plane.d.ts +0 -17
  208. package/types/math/Quat.d.ts +0 -376
  209. package/types/math/Ray.d.ts +0 -81
  210. package/types/math/Vec2.d.ts +0 -308
  211. package/types/math/Vec3.d.ts +0 -459
  212. package/types/math/Vec4.d.ts +0 -161
  213. package/types/math/coder.d.ts +0 -42
  214. package/types/math/index.d.ts +0 -11
  215. package/types/math.d.ts +0 -261
  216. package/types/mercator.d.ts +0 -92
  217. package/types/proj/EPSG3857.d.ts +0 -5
  218. package/types/proj/EPSG4326.d.ts +0 -5
  219. package/types/proj/Proj.d.ts +0 -42
  220. package/types/quadTree/EntityCollectionNode.d.ts +0 -34
  221. package/types/quadTree/Node.d.ts +0 -61
  222. package/types/quadTree/quadTree.d.ts +0 -40
  223. package/types/renderer/Renderer.d.ts +0 -296
  224. package/types/renderer/RendererEvents.d.ts +0 -230
  225. package/types/res/images.d.ts +0 -3
  226. package/types/scene/Axes.d.ts +0 -11
  227. package/types/scene/BaseNode.d.ts +0 -60
  228. package/types/scene/Planet.d.ts +0 -574
  229. package/types/scene/RenderNode.d.ts +0 -143
  230. package/types/scene/SkyBox.d.ts +0 -10
  231. package/types/scene/index.d.ts +0 -4
  232. package/types/segment/Segment.d.ts +0 -271
  233. package/types/segment/SegmentLonLat.d.ts +0 -62
  234. package/types/segment/segmentHelper.d.ts +0 -13
  235. package/types/shaders/billboard.d.ts +0 -3
  236. package/types/shaders/depth.d.ts +0 -2
  237. package/types/shaders/drawnode.d.ts +0 -7
  238. package/types/shaders/label.d.ts +0 -4
  239. package/types/shaders/pointCloud.d.ts +0 -2
  240. package/types/shaders/polyline.d.ts +0 -3
  241. package/types/shaders/ray.d.ts +0 -2
  242. package/types/shaders/screenFrame.d.ts +0 -2
  243. package/types/shaders/shape.d.ts +0 -4
  244. package/types/shaders/skybox.d.ts +0 -2
  245. package/types/shaders/toneMapping.d.ts +0 -2
  246. package/types/shapes/BaseShape.d.ts +0 -247
  247. package/types/shapes/Sphere.d.ts +0 -41
  248. package/types/terrain/BilTerrain.d.ts +0 -8
  249. package/types/terrain/EmptyTerrain.d.ts +0 -72
  250. package/types/terrain/Geoid.d.ts +0 -26
  251. package/types/terrain/GlobusTerrain.d.ts +0 -153
  252. package/types/terrain/MapboxTerrain.d.ts +0 -8
  253. package/types/terrain/index.d.ts +0 -5
  254. package/types/utils/FontAtlas.d.ts +0 -14
  255. package/types/utils/GeoImageCreator.d.ts +0 -30
  256. package/types/utils/ImagesCacheManager.d.ts +0 -10
  257. package/types/utils/Loader.d.ts +0 -25
  258. package/types/utils/NormalMapCreator.d.ts +0 -39
  259. package/types/utils/PlainSegmentWorker.d.ts +0 -10
  260. package/types/utils/TerrainWorker.d.ts +0 -9
  261. package/types/utils/TextureAtlas.d.ts +0 -111
  262. package/types/utils/VectorTileCreator.d.ts +0 -16
  263. package/types/utils/colorTable.d.ts +0 -143
  264. package/types/utils/earcut.d.ts +0 -6
  265. package/types/utils/shared.d.ts +0 -230
  266. package/types/webgl/Framebuffer.d.ts +0 -135
  267. package/types/webgl/Handler.d.ts +0 -372
  268. package/types/webgl/Multisample.d.ts +0 -89
  269. package/types/webgl/Program.d.ts +0 -155
  270. package/types/webgl/ProgramController.d.ts +0 -84
  271. package/types/webgl/callbacks.d.ts +0 -1
  272. package/types/webgl/index.d.ts +0 -6
  273. package/types/webgl/types.d.ts +0 -2
@@ -1,574 +0,0 @@
1
- /**
2
- * Main class for rendering planet
3
- * @class
4
- * @extends {og.scene.RenderNode}
5
- * @param {string} name - Planet name(Earth by default)
6
- * @param {og.Ellipsoid} ellipsoid - Planet ellipsoid(WGS84 by default)
7
- * @param {Number} [maxGridSize=128] - Segment maximal grid size
8
- * @fires og.scene.Planet#draw
9
- * @fires og.scene.Planet#layeradd
10
- * @fires og.scene.Planet#baselayerchange
11
- * @fires og.scene.Planet#layerremove
12
- * @fires og.scene.Planet#layervisibilitychange
13
- * @fires og.scene.Planet#geoimageadd
14
- */
15
- export class Planet {
16
- static getBearingNorthRotationQuat(cartesian: any): any;
17
- constructor(options?: {});
18
- /**
19
- * @public
20
- * @type {og.Ellipsoid}
21
- */
22
- public ellipsoid: any;
23
- /**
24
- * @public
25
- * @type {Boolean}
26
- */
27
- public lightEnabled: boolean;
28
- /**
29
- * Squared ellipsoid radius.
30
- * @protected
31
- * @type {number}
32
- */
33
- protected _planetRadius2: number;
34
- /**
35
- * All layers array.
36
- * @public
37
- * @type {Array.<og.Layer>}
38
- */
39
- public layers: Array<any>;
40
- /**
41
- * Current visible imagery tile layers array.
42
- * @public
43
- * @type {Array.<og.Layer>}
44
- */
45
- public visibleTileLayers: Array<any>;
46
- /**
47
- * Current visible vector layers array.
48
- * @protected
49
- * @type {Array.<og.layer.Vector>}
50
- */
51
- protected visibleVectorLayers: Array<any>;
52
- _visibleTileLayerSlices: any[];
53
- /**
54
- * Vector layers visible nodes with collections.
55
- * @protected
56
- * @type {Array.<og.EntityCollection>}
57
- */
58
- protected _frustumEntityCollections: Array<any>;
59
- /**
60
- * There is only one base layer on the globe when layer.isBaseLayer is true.
61
- * @public
62
- * @type {og.Layer}
63
- */
64
- public baseLayer: any;
65
- /**
66
- * Terrain provider.
67
- * @public
68
- * @type {og.terrain.Terrain}
69
- */
70
- public terrain: any;
71
- /**
72
- * Camera is this.renderer.activeCamera pointer.
73
- * @public
74
- * @type {og.PlanetCamera}
75
- */
76
- public camera: any;
77
- _minAltitude: any;
78
- _maxAltitude: any;
79
- /**
80
- * Screen mouse pointer projected to planet cartesian position.
81
- * @public
82
- * @type {og.Vec3}
83
- */
84
- public mousePositionOnEarth: any;
85
- emptyTexture: any;
86
- transparentTexture: any;
87
- defaultTexture: any;
88
- /**
89
- * Current visible minimal zoom index planet segment.
90
- * @public
91
- * @type {number}
92
- */
93
- public minCurrZoom: number;
94
- /**
95
- * Current visible maximal zoom index planet segment.
96
- * @public
97
- * @type {number}
98
- */
99
- public maxCurrZoom: number;
100
- _viewExtent: any;
101
- /**
102
- * @protected
103
- */
104
- protected _createdNodesCount: number;
105
- /**
106
- * Planet's segments collected for rendering frame.
107
- * @protected
108
- * @type {og.quadTree.Node}
109
- */
110
- protected _renderedNodes: any;
111
- _renderedNodesInFrustum: any[];
112
- /**
113
- * Created nodes cache
114
- * @protected
115
- * @type {og.quadTree.Node}
116
- */
117
- protected _quadTreeNodesCacheMerc: any;
118
- /**
119
- * Current visible mercator segments tree nodes array.
120
- * @protected
121
- * @type {og.quadTree.Node}
122
- */
123
- protected _visibleNodes: any;
124
- /**
125
- * Current visible north pole nodes tree nodes array.
126
- * @protected
127
- * @type {og.quadTree.Node}
128
- */
129
- protected _visibleNodesNorth: any;
130
- /**
131
- * Current visible south pole nodes tree nodes array.
132
- * @protected
133
- * @type {og.quadTree.Node}
134
- */
135
- protected _visibleNodesSouth: any;
136
- /**
137
- * Layers activity lock.
138
- * @public
139
- * @type {og.idle.Lock}
140
- */
141
- public layerLock: any;
142
- /**
143
- * Terrain providers activity lock.
144
- * @public
145
- * @type {og.idle.Lock}
146
- */
147
- public terrainLock: any;
148
- /**
149
- * Layer's transparent colors.
150
- * @protected
151
- */
152
- protected _tcolorArr: any[];
153
- /**
154
- * Height scale factor. 1 - is normal elevation scale.
155
- * @protected
156
- * @type {number}
157
- */
158
- protected _heightFactor: number;
159
- /**
160
- * Precomputed indexes array for differrent grid size segments.
161
- * @protected
162
- * @type {Array.<Array.<number>>}
163
- */
164
- protected _indexesCache: Array<Array<number>>;
165
- _indexesCacheToRemove: any[];
166
- _indexesCacheToRemoveCounter: number;
167
- /**
168
- * Precomputed texture coordinates buffers for differrent grid size segments.
169
- * @protected
170
- * @type {Array.<Array.<number>>}
171
- */
172
- protected _textureCoordsBufferCache: Array<Array<number>>;
173
- /**
174
- * Framebuffer for relief. Is null when WEBGL_draw_buffers extension initialized.
175
- * @protected
176
- * @type {Object}
177
- */
178
- protected _heightPickingFramebuffer: any;
179
- /**
180
- * Mercator grid tree.
181
- * @protected
182
- * @type {og.quadTree.Node}
183
- */
184
- protected _quadTree: any;
185
- /**
186
- * North grid tree.
187
- * @protected
188
- * @type {og.quadTree.Node}
189
- */
190
- protected _quadTreeNorth: any;
191
- /**
192
- * South grid tree.
193
- * @protected
194
- * @type {og.quadTree.Node}
195
- */
196
- protected _quadTreeSouth: any;
197
- /**
198
- * Night glowing gl texture.
199
- * @protected
200
- */
201
- protected _nightTexture: any;
202
- /**
203
- * Specular mask gl texture.
204
- * @protected
205
- */
206
- protected _specularTexture: any;
207
- /**
208
- * True for rendering night glowing texture.
209
- * @protected
210
- * @type {boolean}
211
- */
212
- protected _useNightTexture: boolean;
213
- /**
214
- * True for rendering specular mask texture.
215
- * @protected
216
- * @type {boolean}
217
- */
218
- protected _useSpecularTexture: boolean;
219
- _maxGridSize: number;
220
- /**
221
- * Segment multiple textures size.(4 - convinient value for the most devices)
222
- * @const
223
- * @public
224
- */
225
- public SLICE_SIZE: number;
226
- SLICE_SIZE_4: number;
227
- SLICE_SIZE_3: number;
228
- /**
229
- * Level of the visible segment detalization.
230
- * @public
231
- * @type {number}
232
- */
233
- public _lodRatio: number;
234
- _maxLodRatio: number;
235
- _minLodRatio: number;
236
- _diffuseMaterialArr: Float32Array;
237
- _ambientMaterialArr: Float32Array;
238
- _specularMaterialArr: Float32Array;
239
- _tileOffsetArr: Float32Array;
240
- _visibleExtentOffsetArr: Float32Array;
241
- _transparentColorArr: Float32Array;
242
- _pickingColorArr: Float32Array;
243
- _samplerArr: Int32Array;
244
- _pickingMaskArr: Int32Array;
245
- /**
246
- * GeoImage creator.
247
- * @protected
248
- * @type{og.utils.GeoImageCreator}
249
- */
250
- protected _geoImageCreator: any;
251
- _vectorTileCreator: VectorTileCreator;
252
- _normalMapCreator: NormalMapCreator;
253
- _terrainWorker: TerrainWorker;
254
- _plainSegmentWorker: PlainSegmentWorker;
255
- _tileLoader: Loader;
256
- _memKey: Key;
257
- _distBeforeMemClear: number;
258
- _prevCamEye: Vec3;
259
- _initialized: boolean;
260
- always: any[];
261
- _renderCompleted: boolean;
262
- /**
263
- * Add the given control to the renderer of the planet scene.
264
- * @param {og.control.Control} control - Control.
265
- */
266
- addControl(control: any): void;
267
- setRatioLod(maxLod: any, minLod: any): void;
268
- /**
269
- * Add the given controls array to the renderer of the planet.
270
- * @param {Array.<og.control.Control>} cArr - Control array.
271
- */
272
- addControls(cArr: Array<any>): void;
273
- /**
274
- * Return layer by it name
275
- * @param {string} name - Name of the layer. og.Layer.prototype.name
276
- * @public
277
- * @returns {og.Layer} -
278
- */
279
- public getLayerByName(name: string): any;
280
- /**
281
- * Adds the given layer to the planet.
282
- * @param {og.Layer} layer - Layer object.
283
- * @public
284
- */
285
- public addLayer(layer: any): void;
286
- /**
287
- * Dispatch layer visibility changing event.
288
- * @param {og.Layer} layer - Changed layer.
289
- * @protected
290
- */
291
- protected _onLayerVisibilityChanged(layer: any): void;
292
- /**
293
- * Adds the given layers array to the planet.
294
- * @param {Array.<og.Layer>} layers - Layers array.
295
- * @public
296
- */
297
- public addLayers(layers: Array<any>): void;
298
- /**
299
- * Removes the given layer from the planet.
300
- * @param {og.Layer} layer - Layer to remove.
301
- * @return {og.Layer|undefined} The removed layer or undefined if the layer was not found.
302
- * @public
303
- */
304
- public removeLayer(layer: any): any | undefined;
305
- /**
306
- *
307
- * @protected
308
- * @param {og.Layer} layer - Material layer.
309
- */
310
- protected _clearLayerMaterial(layer: any): void;
311
- /**
312
- * Get the collection of layers associated with this planet.
313
- * @return {Array.<og.Layer>} Layers array.
314
- * @public
315
- */
316
- public getLayers(): Array<any>;
317
- /**
318
- * Sets base layer coverage to the planet.
319
- * @param {og.Layer} layer - Layer object.
320
- * @public
321
- */
322
- public setBaseLayer(layer: any): void;
323
- /**
324
- * Sets elevation scale. 1.0 is default.
325
- * @param {number} factor - Elevation scale.
326
- */
327
- setHeightFactor(factor: number): void;
328
- /**
329
- * Gets elevation scale.
330
- * @returns {number} Terrain elevation scale
331
- */
332
- getHeightFactor(): number;
333
- /**
334
- * Sets terrain provider
335
- * @public
336
- * @param {og.terrain.Terrain} terrain - Terrain provider.
337
- */
338
- public setTerrain(terrain: any): void;
339
- _renderCompletedActivated: boolean;
340
- /**
341
- * @virtual
342
- * @protected
343
- */
344
- protected _initializeShaders(): void;
345
- /**
346
- * @virtual
347
- * @public
348
- */
349
- public init(): void;
350
- drawMode: any;
351
- clearIndexesCache(): void;
352
- _preRender(): void;
353
- /**
354
- * Creates default textures first for nirth pole and whole globe and second for south pole.
355
- * @public
356
- * @param{Object} param0 -
357
- * @param{Object} param1 -
358
- */
359
- public createDefaultTextures(param0: any, param1: any): void;
360
- /**
361
- * Updates attribution lists
362
- * @public
363
- */
364
- public updateAttributionsList(): void;
365
- /**
366
- * Updates visible layers.
367
- * @public
368
- */
369
- public updateVisibleLayers(): void;
370
- /**
371
- * Sort visible layer - preparing for rendering.
372
- * @protected
373
- */
374
- protected _sortLayers(): void;
375
- _clearRenderedNodeList(): void;
376
- /**
377
- * Collects visible quad nodes.
378
- * @protected
379
- */
380
- protected _collectRenderNodes(): void;
381
- _nodeCounterError_: number;
382
- _globalPreDraw(): void;
383
- /**
384
- * Render node callback.
385
- * @public
386
- */
387
- public frame(): void;
388
- _checkRendercompleted(): void;
389
- /**
390
- * @protected
391
- */
392
- protected _renderScreenNodesPASS(): void;
393
- _skipPreRender: boolean;
394
- /**
395
- * @protected
396
- */
397
- protected _renderHeightPickingFramebufferPASS(): void;
398
- /**
399
- * @protected
400
- */
401
- protected _renderColorPickingFramebufferPASS(): void;
402
- /**
403
- * @protected
404
- */
405
- protected _renderDepthFramebufferPASS(): void;
406
- _collectVectorLayerCollections(): void;
407
- /**
408
- * Vector layers picking pass.
409
- * @protected
410
- */
411
- protected _frustumEntityCollectionPickingCallback(): void;
412
- /**
413
- * Starts clear memory thread.
414
- * @public
415
- */
416
- public memClear(): void;
417
- /**
418
- * Returns ray vector hit ellipsoid coordinates.
419
- * If the ray doesn't hit ellipsoit returns null.
420
- * @public
421
- * @param {og.Ray} ray - Ray 3d.
422
- * @returns {og.Vec3} -
423
- */
424
- public getRayIntersectionEllipsoid(ray: any): any;
425
- /**
426
- * Returns 2d screen coordanates projection point to the planet ellipsoid 3d coordinates.
427
- * @public
428
- * @param {og.math.Pixel} px - 2D sreen coordinates.
429
- * @returns {og.Vec3} -
430
- */
431
- public getCartesianFromPixelEllipsoid(px: any): any;
432
- /**
433
- * Returns 2d screen coordanates projection point to the planet ellipsoid geographical coordinates.
434
- * @public
435
- * @param {og.math.Pixel} px - 2D screen coordinates.
436
- * @returns {LonLat} -
437
- */
438
- public getLonLatFromPixelEllipsoid(px: any): LonLat;
439
- /**
440
- * Returns 3d cartesian coordinates on the relief planet by mouse cursor
441
- * position or null if mouse cursor is outside the planet.
442
- * @public
443
- * @param {Boolean} [force=false] - Force framebuffer rendering.
444
- * @returns {og.Vec3} -
445
- */
446
- public getCartesianFromMouseTerrain(force?: boolean): any;
447
- /**
448
- * Returns 3d cartesian coordinates on the relief planet by 2d screen coordinates.
449
- * position or null if input coordinates is outside the planet.
450
- * @public
451
- * @param {og.Vec2} px - Pixel screen 2d coordinates.
452
- * @param {Boolean} [force=false] - Force framebuffer rendering.
453
- * @returns {og.Vec3} -
454
- */
455
- public getCartesianFromPixelTerrain(px: any, force?: boolean): any;
456
- /**
457
- * Returns geographical coordinates on the relief planet by 2d screen coordinates.
458
- * position or null if input coordinates is outside the planet.
459
- * @public
460
- * @param {og.Vec2} px - Pixel screen 2d coordinates.
461
- * @param {Boolean} [force=false] - Force framebuffer rendering.
462
- * @returns {LonLat} -
463
- */
464
- public getLonLatFromPixelTerrain(px: any, force?: boolean): LonLat;
465
- /**
466
- * Returns projected 2d screen coordinates by 3d cartesian coordiantes.
467
- * @public
468
- * @param {og.Vec3} coords - Cartesian coordinates.
469
- * @returns {og.Vec2} -
470
- */
471
- public getPixelFromCartesian(coords: any): any;
472
- /**
473
- * Returns projected 2d screen coordinates by geographical coordinates.
474
- * @public
475
- * @param {LonLat} lonlat - Geographical coordinates.
476
- * @returns {og.Vec2} -
477
- */
478
- public getPixelFromLonLat(lonlat: LonLat): any;
479
- /**
480
- * Returns distance from active camera to the the planet ellipsoid
481
- * coordiantes unprojected by 2d screen coordiantes, or null if screen coordinates outside the planet.
482
- * @public
483
- * @param {og.Vec2} px - Screen coordinates.
484
- * @returns {number} -
485
- */
486
- public getDistanceFromPixelEllipsoid(px: any): number;
487
- /**
488
- * Returns distance from active camera to the the relief planet coordiantes unprojected
489
- * by 2d screen coordiantes, or null if screen coordinates outside the planet.
490
- * If screen coordinates inside the planet but relief is not exists in the
491
- * point than function returns distance to the planet ellipsoid.
492
- * @public
493
- * @param {og.Vec2} px - Screen coordinates.
494
- * @param {Boolean} [force=false] - Force framebuffer rendering.
495
- * @returns {number} -
496
- */
497
- public getDistanceFromPixel(px: any): number;
498
- /**
499
- * Sets camera to the planet geographical extent.
500
- * @public
501
- * @param {og.Extent} extent - Geographical extent.
502
- */
503
- public viewExtent(extent: any): void;
504
- /**
505
- * Sets camera to the planet geographical extent.
506
- * @public
507
- * @param {Array.<number>} extentArr - Geographical extent array, (exactly 4 entries)
508
- * where index 0 - southwest longitude, 1 - latitude southwest, 2 - longitude northeast, 3 - latitude northeast.
509
- */
510
- public viewExtentArr(extentArr: Array<number>): void;
511
- /**
512
- * Gets current viewing geographical extent.
513
- * @public
514
- * @returns {og.Extent} -
515
- */
516
- public getViewExtent(): any;
517
- /**
518
- * Sets camera to the planet geographical position.
519
- * @public
520
- * @param {LonLat} lonlat - New geographical position.
521
- * @param {og.Vec3} [up] - Camera UP vector.
522
- */
523
- public viewLonLat(lonlat: LonLat, up?: any): void;
524
- /**
525
- * Fly camera to the planet geographical extent.
526
- * @public
527
- * @param {og.Extent} extent - Geographical extent.
528
- * @param {Number} [height] - Height on the end of the flight route.
529
- * @param {og.Vec3} [up] - Camera UP vector on the end of a flying.
530
- * @param {Number} [ampl] - Altitude amplitude factor.
531
- * @param {cameraCallback} [startCallback] - Callback that calls after flying when flying is finished.
532
- * @param {cameraCallback} [completeCallback] - Callback that calls befor the flying begins.
533
- */
534
- public flyExtent(extent: any, height?: number, up?: any, ampl?: number, completeCallback?: any, startCallback?: any): void;
535
- /**
536
- * Fly camera to the new point.
537
- * @public
538
- * @param {og.Vec3} cartesian - Fly coordiantes.
539
- * @param {og.Vec3} [look] - Camera "look at" point.
540
- * @param {og.Vec3} [up] - Camera UP vector on the end of a flying.
541
- * @param {Number} [ampl] - Altitude amplitude factor.
542
- * @param [completeCallback]
543
- * @param [startCallback]
544
- * @param [frameCallback]
545
- */
546
- public flyCartesian(cartesian: any, look?: any, up?: any, ampl?: number, completeCallback?: any, startCallback?: any, frameCallback?: any): void;
547
- /**
548
- * Fly camera to the new geographical position.
549
- * @public
550
- * @param {LonLat} lonlat - Fly geographical coordiantes.
551
- * @param {og.Vec3} [look] - Camera "look at" point on the end of a flying.
552
- * @param {og.Vec3} [up] - Camera UP vector on the end of a flying.
553
- * @param {Number} [ampl] - Altitude amplitude factor.
554
- * @param [completeCallback]
555
- * @param [startCallback]
556
- * @param [frameCallback]
557
- */
558
- public flyLonLat(lonlat: LonLat, look?: any, up?: any, ampl?: number, completeCallback?: any, startCallback?: any, frameCallback?: any): void;
559
- /**
560
- * Breaks the flight.
561
- * @public
562
- */
563
- public stopFlying(): void;
564
- updateBillboardsTexCoords(): void;
565
- getEntityTerrainPoint(entity: any, res: any): any;
566
- }
567
- import { VectorTileCreator } from "../utils/VectorTileCreator.js";
568
- import { NormalMapCreator } from "../utils/NormalMapCreator.js";
569
- import { TerrainWorker } from "../utils/TerrainWorker.js";
570
- import { PlainSegmentWorker } from "../utils/PlainSegmentWorker.js";
571
- import { Loader } from "../utils/Loader.js";
572
- import { Key } from "../Lock.js";
573
- import { Vec3 } from "../math/index.js";
574
- import { LonLat } from "../LonLat.js";
@@ -1,143 +0,0 @@
1
- /**
2
- * Render node is a logical part of a render mechanism. Represents scene rendering.
3
- * Forexample one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc.
4
- * Each render node has own model view space defined with matrices(scale, rotation, translation, transformation).
5
- * There are collections of ligh sources, entities and so on in the node.
6
- * Access to the node is renderer.renderNodes["Earth"]
7
- * @class
8
- * @extends {og.RenderNode}
9
- * @param {string} name - Node name.
10
- */
11
- export class RenderNode {
12
- constructor(name: any);
13
- /**
14
- * Renderer that calls frame() callback.
15
- * @public
16
- * @type {og.Renderer}
17
- */
18
- public renderer: any;
19
- drawMode: number;
20
- /** Show rendering.
21
- * @public
22
- */
23
- public show: boolean;
24
- _isActive: boolean;
25
- /**
26
- * Lighting calculations.
27
- * @public
28
- * @type {boolean}
29
- */
30
- public lightEnabled: boolean;
31
- /**
32
- * Point light array.
33
- * @private
34
- * @type {Array.<og.LightSource>}
35
- */
36
- private _lights;
37
- _lightsTransformedPositions: any[];
38
- _lightsParamsv: any[];
39
- _lightsParamsf: any[];
40
- _lightsNames: any[];
41
- /**
42
- * Entity collection array.
43
- * @public
44
- * @type {Array.<og.EntityCollection>}
45
- */
46
- public entityCollections: Array<any>;
47
- _pickingId: number;
48
- events: Events;
49
- /**
50
- * Adds node to the current hierarchy.
51
- * @public
52
- * @type {og.RenderNode}
53
- */
54
- public addNode(node: any): void;
55
- /**
56
- * Assign render node with renderer.
57
- * @public
58
- * @param {og.Renderer} renderer - Redner node's renderer.
59
- */
60
- public assign(renderer: any): void;
61
- onremove(): void;
62
- remove(): void;
63
- /**
64
- * Adds entity collection.
65
- * @public
66
- * @param {og.EntityCollection} entityCollection - Entity collection.
67
- * @param {boolean} [isHidden] - If it's true that this collection has specific rendering.
68
- * @returns {og.scene.RenderNode} -
69
- */
70
- public addEntityCollection(entityCollection: any, isHidden?: boolean): any;
71
- /**
72
- * Removes entity collection.
73
- * @public
74
- * @param {og.EntityCollection} entityCollection - Entity collection for remove.
75
- */
76
- public removeEntityCollection(entityCollection: any): void;
77
- /**
78
- * Adds point light source.
79
- * @public
80
- * @param {og.LightSource} light - Light source.
81
- * @returns {og.scene.RenderNode}
82
- */
83
- public addLight(light: any): any;
84
- /**
85
- * Gets light object by its name.
86
- * @public
87
- * @param {string} name - Point light name.
88
- * @returns {og.LightSource}
89
- */
90
- public getLightByName(name: string): any;
91
- /**
92
- * Removes light source.
93
- * @public
94
- * @param {og.LightSource} light - Light source object.
95
- */
96
- public removeLight(light: any): void;
97
- /**
98
- * Calls render frame node's callback. Used in renderer.
99
- * @public
100
- */
101
- public drawNode(frustum: any, frustumIndex: any): void;
102
- /**
103
- * Gets render node activity.
104
- * @public
105
- * @returns {Boolean} -
106
- */
107
- public isActive(): boolean;
108
- /**
109
- * Rendering activation.
110
- * @public
111
- * @param {boolean} isActive - Activation flag.
112
- */
113
- public setActive(isActive: boolean): void;
114
- /**
115
- * Sets draw mode
116
- * @public
117
- * @param {Number} mode - Draw mode, such as gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.LINES etc.
118
- */
119
- public setDrawMode(mode: number): void;
120
- /**
121
- * IMPORTANT: This function have to be called manualy in each render node frame callback, before drawing scene geometry.
122
- * @public
123
- */
124
- public transformLights(): void;
125
- updateBillboardsTexCoords(): void;
126
- /**
127
- * @private
128
- */
129
- private _drawNodes;
130
- drawEntityCollections(ec: any): void;
131
- /**
132
- * Draw entity collections picking frame.
133
- * @public
134
- * @param {Array<og.EntityCollection>} ec - Entity collection array.
135
- */
136
- public drawPickingEntityCollections(ec: Array<any>): void;
137
- /**
138
- * Picking entity frame callback
139
- * @private
140
- */
141
- private _entityCollectionPickingCallback;
142
- }
143
- import { Events } from "../Events.js";