@openglobus/og 0.19.4 → 0.20.0

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 (308) hide show
  1. package/README.md +3 -3
  2. package/css/og.css +18 -4
  3. package/lib/@openglobus/js/Clock.d.ts +106 -0
  4. package/lib/@openglobus/js/Deferred.d.ts +6 -0
  5. package/lib/@openglobus/js/Events.d.ts +90 -0
  6. package/lib/@openglobus/js/Extent.d.ts +145 -0
  7. package/lib/@openglobus/js/Globe.d.ts +134 -0
  8. package/lib/@openglobus/js/ImageCanvas.d.ts +128 -0
  9. package/lib/@openglobus/js/Lock.d.ts +15 -0
  10. package/lib/@openglobus/js/LonLat.d.ts +128 -0
  11. package/lib/@openglobus/js/Object3d.d.ts +64 -0
  12. package/lib/@openglobus/js/Popup.d.ts +46 -0
  13. package/lib/@openglobus/js/QueueArray.d.ts +16 -0
  14. package/lib/@openglobus/js/Rectangle.d.ts +76 -0
  15. package/lib/@openglobus/js/Stack.d.ts +20 -0
  16. package/lib/@openglobus/js/astro/astro.d.ts +39 -0
  17. package/lib/@openglobus/js/astro/earth.d.ts +8 -0
  18. package/lib/@openglobus/js/astro/jd.d.ts +234 -0
  19. package/lib/@openglobus/js/astro/orbit.d.ts +5 -0
  20. package/lib/@openglobus/js/astro/rotation.d.ts +2 -0
  21. package/lib/@openglobus/js/bv/Box.d.ts +32 -0
  22. package/lib/@openglobus/js/bv/Sphere.d.ts +37 -0
  23. package/lib/@openglobus/js/bv/index.d.ts +3 -0
  24. package/lib/@openglobus/js/camera/Camera.d.ts +314 -0
  25. package/lib/@openglobus/js/camera/Frustum.d.ts +139 -0
  26. package/lib/@openglobus/js/camera/PlanetCamera.d.ts +234 -0
  27. package/lib/@openglobus/js/camera/index.d.ts +3 -0
  28. package/lib/@openglobus/js/cons.d.ts +40 -0
  29. package/lib/@openglobus/js/control/Atmosphere.d.ts +16 -0
  30. package/lib/@openglobus/js/control/CompassButton.d.ts +16 -0
  31. package/lib/@openglobus/js/control/Control.d.ts +100 -0
  32. package/lib/@openglobus/js/control/DebugInfo.d.ts +25 -0
  33. package/lib/@openglobus/js/control/DrawingSwitcher.d.ts +13 -0
  34. package/lib/@openglobus/js/control/EarthCoordinates.d.ts +41 -0
  35. package/lib/@openglobus/js/control/EarthNavigation.d.ts +50 -0
  36. package/lib/@openglobus/js/control/GeoImageDragControl.d.ts +22 -0
  37. package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +28 -0
  38. package/lib/@openglobus/js/control/LayerAnimation.d.ts +71 -0
  39. package/lib/@openglobus/js/control/LayerSwitcher.d.ts +36 -0
  40. package/lib/@openglobus/js/control/Lighting.d.ts +53 -0
  41. package/lib/@openglobus/js/control/MouseNavigation.d.ts +64 -0
  42. package/lib/@openglobus/js/control/MouseWheelZoomControl.d.ts +44 -0
  43. package/lib/@openglobus/js/control/RulerSwitcher.d.ts +17 -0
  44. package/lib/@openglobus/js/control/ScaleControl.d.ts +24 -0
  45. package/lib/@openglobus/js/control/SegmentBoundVisualization.d.ts +12 -0
  46. package/lib/@openglobus/js/control/ShowFps.d.ts +9 -0
  47. package/lib/@openglobus/js/control/SimpleNavigation.d.ts +25 -0
  48. package/lib/@openglobus/js/control/SimpleSkyBackground.d.ts +17 -0
  49. package/lib/@openglobus/js/control/Sun.d.ts +33 -0
  50. package/lib/@openglobus/js/control/ToggleWireframe.d.ts +14 -0
  51. package/lib/@openglobus/js/control/TouchNavigation.d.ts +52 -0
  52. package/lib/@openglobus/js/control/ZoomControl.d.ts +27 -0
  53. package/lib/@openglobus/js/control/drawing/DrawingControl.d.ts +12 -0
  54. package/lib/@openglobus/js/control/drawing/LineStringDrawingScene.d.ts +15 -0
  55. package/lib/@openglobus/js/control/drawing/PolygonDrawingScene.d.ts +98 -0
  56. package/lib/@openglobus/js/control/elevationProfile/ElevationProfile.d.ts +77 -0
  57. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +14 -0
  58. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileControl.d.ts +33 -0
  59. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileLegend.d.ts +20 -0
  60. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileScene.d.ts +80 -0
  61. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileView.d.ts +63 -0
  62. package/lib/@openglobus/js/control/elevationProfile/PointListDialog.d.ts +12 -0
  63. package/lib/@openglobus/js/control/heightRuler/HeightRuler.d.ts +7 -0
  64. package/lib/@openglobus/js/control/heightRuler/HeightRulerScene.d.ts +35 -0
  65. package/lib/@openglobus/js/control/heightRuler/HeightRulerSwitcher.d.ts +6 -0
  66. package/lib/@openglobus/js/control/index.d.ts +29 -0
  67. package/lib/@openglobus/js/control/ruler/Ruler.d.ts +13 -0
  68. package/lib/@openglobus/js/control/ruler/RulerScene.d.ts +88 -0
  69. package/lib/@openglobus/js/control/selection/Selection.d.ts +55 -0
  70. package/lib/@openglobus/js/control/selection/SelectionScene.d.ts +44 -0
  71. package/lib/@openglobus/js/control/timeline/TimelineControl.d.ts +18 -0
  72. package/lib/@openglobus/js/control/timeline/TimelineModel.d.ts +41 -0
  73. package/lib/@openglobus/js/control/timeline/TimelineView.d.ts +85 -0
  74. package/lib/@openglobus/js/control/timeline/timelineUtils.d.ts +12 -0
  75. package/lib/@openglobus/js/control/visibleExtent/drawnode.d.ts +7 -0
  76. package/lib/@openglobus/js/ellipsoid/Ellipsoid.d.ts +193 -0
  77. package/lib/@openglobus/js/ellipsoid/index.d.ts +3 -0
  78. package/lib/@openglobus/js/ellipsoid/wgs84.d.ts +6 -0
  79. package/lib/@openglobus/js/entity/BaseBillboard.d.ts +222 -0
  80. package/lib/@openglobus/js/entity/BaseBillboardHandler.d.ts +81 -0
  81. package/lib/@openglobus/js/entity/Billboard.d.ts +113 -0
  82. package/lib/@openglobus/js/entity/BillboardHandler.d.ts +15 -0
  83. package/lib/@openglobus/js/entity/Entity.d.ts +354 -0
  84. package/lib/@openglobus/js/entity/EntityCollection.d.ts +363 -0
  85. package/lib/@openglobus/js/entity/GeoObject.d.ts +152 -0
  86. package/lib/@openglobus/js/entity/GeoObjectHandler.d.ts +104 -0
  87. package/lib/@openglobus/js/entity/Geometry.d.ts +124 -0
  88. package/lib/@openglobus/js/entity/GeometryHandler.d.ts +84 -0
  89. package/lib/@openglobus/js/entity/Label.d.ts +214 -0
  90. package/lib/@openglobus/js/entity/LabelHandler.d.ts +65 -0
  91. package/lib/@openglobus/js/entity/LabelWorker.d.ts +15 -0
  92. package/lib/@openglobus/js/entity/PointCloud.d.ts +179 -0
  93. package/lib/@openglobus/js/entity/PointCloudHandler.d.ts +42 -0
  94. package/lib/@openglobus/js/entity/Polyline.d.ts +345 -0
  95. package/lib/@openglobus/js/entity/PolylineHandler.d.ts +22 -0
  96. package/lib/@openglobus/js/entity/Ray.d.ts +133 -0
  97. package/lib/@openglobus/js/entity/RayHandler.d.ts +70 -0
  98. package/lib/@openglobus/js/entity/Strip.d.ts +139 -0
  99. package/lib/@openglobus/js/entity/StripHandler.d.ts +42 -0
  100. package/lib/@openglobus/js/entity/index.d.ts +10 -0
  101. package/lib/@openglobus/js/index.d.ts +33 -0
  102. package/lib/@openglobus/js/input/KeyboardHandler.d.ts +33 -0
  103. package/lib/@openglobus/js/input/MouseHandler.d.ts +16 -0
  104. package/lib/@openglobus/js/input/TouchHandler.d.ts +11 -0
  105. package/lib/@openglobus/js/input/input.d.ts +3 -0
  106. package/lib/@openglobus/js/layer/BaseGeoImage.d.ts +145 -0
  107. package/lib/@openglobus/js/layer/Bing.d.ts +4 -0
  108. package/lib/@openglobus/js/layer/CanvasTiles.d.ts +103 -0
  109. package/lib/@openglobus/js/layer/GeoImage.d.ts +61 -0
  110. package/lib/@openglobus/js/layer/GeoTexture2d.d.ts +17 -0
  111. package/lib/@openglobus/js/layer/GeoVideo.d.ts +68 -0
  112. package/lib/@openglobus/js/layer/KML.d.ts +72 -0
  113. package/lib/@openglobus/js/layer/Layer.d.ts +415 -0
  114. package/lib/@openglobus/js/layer/Material.d.ts +34 -0
  115. package/lib/@openglobus/js/layer/OpenStreetMap.d.ts +4 -0
  116. package/lib/@openglobus/js/layer/Vector.d.ts +246 -0
  117. package/lib/@openglobus/js/layer/WMS.d.ts +75 -0
  118. package/lib/@openglobus/js/layer/XYZ.d.ts +148 -0
  119. package/lib/@openglobus/js/layer/index.d.ts +12 -0
  120. package/lib/@openglobus/js/light/LightSource.d.ts +174 -0
  121. package/lib/@openglobus/js/math/Line2.d.ts +11 -0
  122. package/lib/@openglobus/js/math/Line3.d.ts +28 -0
  123. package/lib/@openglobus/js/math/Mat3.d.ts +77 -0
  124. package/lib/@openglobus/js/math/Mat4.d.ts +195 -0
  125. package/lib/@openglobus/js/math/Plane.d.ts +20 -0
  126. package/lib/@openglobus/js/math/Quat.d.ts +373 -0
  127. package/lib/@openglobus/js/math/Ray.d.ts +76 -0
  128. package/lib/@openglobus/js/math/Vec2.d.ts +310 -0
  129. package/lib/@openglobus/js/math/Vec3.d.ts +472 -0
  130. package/lib/@openglobus/js/math/Vec4.d.ts +163 -0
  131. package/lib/@openglobus/js/math/coder.d.ts +51 -0
  132. package/lib/@openglobus/js/math/index.d.ts +11 -0
  133. package/lib/@openglobus/js/math.d.ts +266 -0
  134. package/lib/@openglobus/js/mercator.d.ts +92 -0
  135. package/lib/@openglobus/js/proj/EPSG3857.d.ts +9 -0
  136. package/lib/@openglobus/js/proj/EPSG4326.d.ts +9 -0
  137. package/lib/@openglobus/js/proj/Proj.d.ts +43 -0
  138. package/lib/@openglobus/js/quadTree/EPSG4326QuadTreeStrategy.d.ts +6 -0
  139. package/lib/@openglobus/js/quadTree/EarthQuadTreeStrategy.d.ts +9 -0
  140. package/lib/@openglobus/js/quadTree/EntityCollectionNode.d.ts +54 -0
  141. package/lib/@openglobus/js/quadTree/MarsQuadTreeStrategy.d.ts +11 -0
  142. package/lib/@openglobus/js/quadTree/Node.d.ts +80 -0
  143. package/lib/@openglobus/js/quadTree/QuadTreeStrategy.d.ts +28 -0
  144. package/lib/@openglobus/js/quadTree/Wgs84QuadTreeStrategy.d.ts +6 -0
  145. package/lib/@openglobus/js/quadTree/index.d.ts +12 -0
  146. package/lib/@openglobus/js/quadTree/quadTree.d.ts +40 -0
  147. package/lib/@openglobus/js/renderer/Renderer.d.ts +319 -0
  148. package/lib/@openglobus/js/renderer/RendererEvents.d.ts +240 -0
  149. package/lib/@openglobus/js/scene/Axes.d.ts +12 -0
  150. package/lib/@openglobus/js/scene/BaseNode.d.ts +61 -0
  151. package/lib/@openglobus/js/scene/Planet.d.ts +652 -0
  152. package/lib/@openglobus/js/scene/RenderNode.d.ts +150 -0
  153. package/lib/@openglobus/js/scene/SkyBox.d.ts +13 -0
  154. package/lib/@openglobus/js/scene/index.d.ts +5 -0
  155. package/lib/@openglobus/js/segment/Segment.d.ts +288 -0
  156. package/lib/@openglobus/js/segment/SegmentLonLat.d.ts +44 -0
  157. package/lib/@openglobus/js/segment/SegmentLonLatWgs84.d.ts +10 -0
  158. package/lib/@openglobus/js/segment/Slice.d.ts +13 -0
  159. package/lib/@openglobus/js/segment/segmentHelper.d.ts +18 -0
  160. package/lib/@openglobus/js/shaders/atmos.d.ts +4 -0
  161. package/lib/@openglobus/js/shaders/billboard.d.ts +3 -0
  162. package/lib/@openglobus/js/shaders/bloom.d.ts +2 -0
  163. package/lib/@openglobus/js/shaders/blur.d.ts +3 -0
  164. package/lib/@openglobus/js/shaders/depth.d.ts +2 -0
  165. package/lib/@openglobus/js/shaders/drawnode.d.ts +8 -0
  166. package/lib/@openglobus/js/shaders/geoObject.d.ts +3 -0
  167. package/lib/@openglobus/js/shaders/label.d.ts +4 -0
  168. package/lib/@openglobus/js/shaders/lumFilter.d.ts +2 -0
  169. package/lib/@openglobus/js/shaders/pointCloud.d.ts +2 -0
  170. package/lib/@openglobus/js/shaders/polyline.d.ts +3 -0
  171. package/lib/@openglobus/js/shaders/ray.d.ts +2 -0
  172. package/lib/@openglobus/js/shaders/screenFrame.d.ts +2 -0
  173. package/lib/@openglobus/js/shaders/skybox.d.ts +2 -0
  174. package/lib/@openglobus/js/shaders/toneMapping.d.ts +2 -0
  175. package/lib/@openglobus/js/shaders/utils.d.ts +1 -0
  176. package/lib/@openglobus/js/terrain/BilTerrain.d.ts +18 -0
  177. package/lib/@openglobus/js/terrain/EmptyTerrain.d.ts +113 -0
  178. package/lib/@openglobus/js/terrain/Geoid.d.ts +33 -0
  179. package/lib/@openglobus/js/terrain/GlobusRgbTerrain.d.ts +6 -0
  180. package/lib/@openglobus/js/terrain/GlobusTerrain.d.ts +137 -0
  181. package/lib/{js/terrain/MapboxTerrain.d.ts → @openglobus/js/terrain/RgbTerrain.d.ts} +5 -5
  182. package/lib/@openglobus/js/terrain/index.d.ts +6 -0
  183. package/lib/@openglobus/js/ui/Button.d.ts +32 -0
  184. package/lib/@openglobus/js/ui/ButtonGroup.d.ts +16 -0
  185. package/lib/@openglobus/js/ui/Color.d.ts +22 -0
  186. package/lib/@openglobus/js/ui/Dialog.d.ts +55 -0
  187. package/lib/@openglobus/js/ui/Slider.d.ts +38 -0
  188. package/lib/@openglobus/js/ui/ToggleButton.d.ts +20 -0
  189. package/lib/@openglobus/js/ui/View.d.ts +37 -0
  190. package/lib/@openglobus/js/ui/icons.d.ts +1 -0
  191. package/lib/@openglobus/js/utils/BaseWorker.d.ts +14 -0
  192. package/lib/@openglobus/js/utils/FontAtlas.d.ts +82 -0
  193. package/lib/@openglobus/js/utils/GeoImageCreator.d.ts +34 -0
  194. package/lib/@openglobus/js/utils/ImagesCacheManager.d.ts +22 -0
  195. package/lib/@openglobus/js/utils/Loader.d.ts +63 -0
  196. package/lib/@openglobus/js/utils/NormalMapCreator.d.ts +52 -0
  197. package/lib/@openglobus/js/utils/PlainSegmentWorker.d.ts +24 -0
  198. package/lib/@openglobus/js/utils/TerrainWorker.d.ts +28 -0
  199. package/lib/@openglobus/js/utils/TextureAtlas.d.ts +113 -0
  200. package/lib/@openglobus/js/utils/VectorTileCreator.d.ts +18 -0
  201. package/lib/@openglobus/js/utils/colorTable.d.ts +3 -0
  202. package/lib/@openglobus/js/utils/earcut.d.ts +7 -0
  203. package/lib/@openglobus/js/utils/objParser.d.ts +24 -0
  204. package/lib/@openglobus/js/utils/shared.d.ts +263 -0
  205. package/lib/@openglobus/js/utils/units.d.ts +16 -0
  206. package/lib/@openglobus/js/webgl/BaseFramebuffer.d.ts +53 -0
  207. package/lib/@openglobus/js/webgl/Framebuffer.d.ts +69 -0
  208. package/lib/@openglobus/js/webgl/Handler.d.ts +473 -0
  209. package/lib/@openglobus/js/webgl/Multisample.d.ts +27 -0
  210. package/lib/@openglobus/js/webgl/Program.d.ts +159 -0
  211. package/lib/@openglobus/js/webgl/ProgramController.d.ts +86 -0
  212. package/lib/@openglobus/js/webgl/index.d.ts +6 -0
  213. package/lib/@openglobus/js/webgl/types.d.ts +9 -0
  214. package/lib/@openglobus/js/webgl/variableHandlers.d.ts +22 -0
  215. package/lib/@openglobus/og.css +1 -1
  216. package/lib/@openglobus/og.esm.js +1 -1
  217. package/lib/@openglobus/og.esm.js.map +1 -1
  218. package/lib/@openglobus/og.umd.js +1 -1
  219. package/lib/@openglobus/og.umd.js.map +1 -1
  220. package/lib/js/Extent.js +2 -2
  221. package/lib/js/Globe.d.ts +1 -1
  222. package/lib/js/Object3d.d.ts +8 -1
  223. package/lib/js/Object3d.js +12 -2
  224. package/lib/js/camera/Frustum.d.ts +1 -1
  225. package/lib/js/camera/Frustum.js +3 -2
  226. package/lib/js/control/DebugInfo.js +19 -18
  227. package/lib/js/control/Lighting.d.ts +4 -0
  228. package/lib/js/control/Lighting.js +51 -12
  229. package/lib/js/control/SimpleSkyBackground.d.ts +2 -0
  230. package/lib/js/control/SimpleSkyBackground.js +13 -3
  231. package/lib/js/control/drawing/PolygonDrawingScene.js +2 -2
  232. package/lib/js/control/visibleExtent/drawnode.js +1 -1
  233. package/lib/js/entity/GeoObject.d.ts +12 -3
  234. package/lib/js/entity/GeoObject.js +34 -2
  235. package/lib/js/entity/GeoObjectHandler.d.ts +5 -0
  236. package/lib/js/entity/GeoObjectHandler.js +47 -0
  237. package/lib/js/entity/Geometry.d.ts +24 -11
  238. package/lib/js/entity/Geometry.js +17 -9
  239. package/lib/js/entity/GeometryHandler.js +5 -5
  240. package/lib/js/entity/Label.d.ts +7 -0
  241. package/lib/js/entity/Label.js +11 -0
  242. package/lib/js/entity/Polyline.d.ts +15 -7
  243. package/lib/js/entity/Polyline.js +54 -6
  244. package/lib/js/entity/Strip.d.ts +12 -0
  245. package/lib/js/entity/Strip.js +16 -0
  246. package/lib/js/entity/StripHandler.js +1 -1
  247. package/lib/js/entity/index.d.ts +10 -11
  248. package/lib/js/entity/index.js +10 -11
  249. package/lib/js/index.d.ts +5 -5
  250. package/lib/js/index.js +5 -5
  251. package/lib/js/layer/Bing.d.ts +4 -0
  252. package/lib/js/layer/Bing.js +40 -0
  253. package/lib/js/layer/GeoImage.d.ts +1 -1
  254. package/lib/js/layer/GeoVideo.d.ts +1 -1
  255. package/lib/js/layer/Layer.d.ts +1 -1
  256. package/lib/js/layer/Layer.js +2 -2
  257. package/lib/js/layer/OpenStreetMap.d.ts +4 -0
  258. package/lib/js/layer/OpenStreetMap.js +19 -0
  259. package/lib/js/layer/Vector.d.ts +3 -0
  260. package/lib/js/layer/Vector.js +3 -3
  261. package/lib/js/layer/index.d.ts +12 -11
  262. package/lib/js/layer/index.js +12 -11
  263. package/lib/js/math/Mat4.js +18 -17
  264. package/lib/js/mercator.js +2 -1
  265. package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +4 -5
  266. package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +3 -0
  267. package/lib/js/quadTree/EarthQuadTreeStrategy.js +40 -5
  268. package/lib/js/quadTree/EntityCollectionNode.d.ts +2 -2
  269. package/lib/js/quadTree/EntityCollectionNode.js +13 -14
  270. package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +5 -0
  271. package/lib/js/quadTree/MarsQuadTreeStrategy.js +31 -5
  272. package/lib/js/quadTree/Node.d.ts +2 -1
  273. package/lib/js/quadTree/Node.js +38 -28
  274. package/lib/js/quadTree/QuadTreeStrategy.d.ts +3 -0
  275. package/lib/js/quadTree/QuadTreeStrategy.js +17 -0
  276. package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +3 -3
  277. package/lib/js/renderer/Renderer.js +1 -0
  278. package/lib/js/scene/Planet.js +6 -4
  279. package/lib/js/segment/Segment.d.ts +12 -9
  280. package/lib/js/segment/Segment.js +47 -24
  281. package/lib/js/segment/SegmentLonLat.d.ts +1 -5
  282. package/lib/js/segment/SegmentLonLat.js +8 -100
  283. package/lib/js/segment/SegmentLonLatWgs84.js +5 -3
  284. package/lib/js/shaders/billboard.js +4 -4
  285. package/lib/js/shaders/drawnode.js +16 -19
  286. package/lib/js/shaders/geoObject.js +4 -5
  287. package/lib/js/shaders/ray.js +7 -3
  288. package/lib/js/terrain/BilTerrain.d.ts +1 -1
  289. package/lib/js/terrain/BilTerrain.js +7 -6
  290. package/lib/js/terrain/EmptyTerrain.d.ts +7 -0
  291. package/lib/js/terrain/EmptyTerrain.js +7 -0
  292. package/lib/js/terrain/GlobusRgbTerrain.d.ts +6 -0
  293. package/lib/js/terrain/GlobusRgbTerrain.js +25 -0
  294. package/lib/js/terrain/GlobusTerrain.d.ts +5 -5
  295. package/lib/js/terrain/GlobusTerrain.js +35 -30
  296. package/lib/js/terrain/RgbTerrain.d.ts +22 -0
  297. package/lib/js/terrain/RgbTerrain.js +415 -0
  298. package/lib/js/terrain/index.d.ts +3 -2
  299. package/lib/js/terrain/index.js +3 -2
  300. package/lib/js/ui/Color.d.ts +22 -0
  301. package/lib/js/ui/Color.js +58 -0
  302. package/lib/js/utils/GeoImageCreator.js +1 -1
  303. package/lib/js/utils/NormalMapCreator.js +1 -1
  304. package/lib/js/utils/VectorTileCreator.js +3 -3
  305. package/lib/js/utils/shared.d.ts +1 -8
  306. package/lib/js/utils/shared.js +17 -8
  307. package/package.json +2 -1
  308. package/lib/js/terrain/MapboxTerrain.js +0 -305
@@ -0,0 +1,150 @@
1
+ import { BaseNode } from "./BaseNode";
2
+ import { Renderer } from "../renderer/Renderer";
3
+ import { LightSource } from "../light/LightSource";
4
+ import { EntityCollection } from "../entity/EntityCollection";
5
+ /**
6
+ * Render node is a logical part of a render mechanism. Represents scene rendering.
7
+ * For example one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc.
8
+ * Each render node has own model view space defined with matrices(scale, rotation, translation, transformation).
9
+ * There are collections of light sources, entities and so on in the node.
10
+ * Access to the node is renderer.renderNodes["Earth"]
11
+ * @class
12
+ * @extends {BaseNode}
13
+ * @param {string} name - Node name.
14
+ */
15
+ declare class RenderNode extends BaseNode {
16
+ /**
17
+ * Renderer that calls frame() callback.
18
+ * @public
19
+ * @type {Renderer}
20
+ */
21
+ renderer: Renderer | null;
22
+ drawMode: number;
23
+ /** Show rendering.
24
+ * @public
25
+ */
26
+ show: boolean;
27
+ protected _isActive: boolean;
28
+ childNodes: RenderNode[];
29
+ /**
30
+ * Lighting calculations.
31
+ * @public
32
+ * @type {boolean}
33
+ */
34
+ lightEnabled: boolean;
35
+ /**
36
+ * Point light array.
37
+ * @public
38
+ * @type {Array.<LightSource>}
39
+ */
40
+ _lights: LightSource[];
41
+ _lightsNames: string[];
42
+ _lightsPositions: number[];
43
+ _lightsParamsv: number[];
44
+ _lightsParamsf: number[];
45
+ /**
46
+ * Entity collection array.
47
+ * @public
48
+ * @type {Array.<EntityCollection>}
49
+ */
50
+ entityCollections: EntityCollection[];
51
+ protected _pickingId: number;
52
+ constructor(name?: string);
53
+ /**
54
+ * Adds node to the current hierarchy.
55
+ * @public
56
+ * @type {RenderNode}
57
+ */
58
+ addNode(node: RenderNode): void;
59
+ /**
60
+ * Assign render node with renderer.
61
+ * @public
62
+ * @param {Renderer} renderer - Render node's renderer.
63
+ */
64
+ assign(renderer: Renderer): void;
65
+ initialize(): void;
66
+ init(): void;
67
+ onremove(): void;
68
+ remove(): void;
69
+ /**
70
+ * Adds entity collection.
71
+ * @public
72
+ * @param {EntityCollection} entityCollection - Entity collection.
73
+ * @param {boolean} [isHidden] - If it's true that this collection has specific rendering.
74
+ * @returns {RenderNode} -
75
+ */
76
+ addEntityCollection(entityCollection: EntityCollection, isHidden?: boolean): RenderNode;
77
+ /**
78
+ * Removes entity collection.
79
+ * @public
80
+ * @param {EntityCollection} entityCollection - Entity collection for remove.
81
+ */
82
+ removeEntityCollection(entityCollection: EntityCollection): void;
83
+ /**
84
+ * Adds point light source.
85
+ * @public
86
+ * @param {LightSource} light - Light source.
87
+ * @returns {RenderNode}
88
+ */
89
+ addLight(light: LightSource): RenderNode;
90
+ /**
91
+ * Gets light object by its name.
92
+ * @public
93
+ * @param {string} name - Point light name.
94
+ * @returns {LightSource}
95
+ */
96
+ getLightByName(name: string): LightSource | undefined;
97
+ /**
98
+ * Removes light source.
99
+ * @public
100
+ * @param {LightSource} light - Light source object.
101
+ */
102
+ removeLight(light: LightSource): void;
103
+ /**
104
+ * Calls render frame node's callback. Used in renderer.
105
+ * @public
106
+ */
107
+ preDrawNode(): void;
108
+ /**
109
+ * Calls render frame node's callback. Used in renderer.
110
+ * @public
111
+ */
112
+ drawNode(): void;
113
+ /**
114
+ * Gets render node activity.
115
+ * @public
116
+ * @returns {Boolean} -
117
+ */
118
+ isActive(): boolean;
119
+ /**
120
+ * Rendering activation.
121
+ * @public
122
+ * @param {boolean} isActive - Activation flag.
123
+ */
124
+ setActive(isActive: boolean): void;
125
+ /**
126
+ * Sets draw mode
127
+ * @public
128
+ * @param {Number} mode - Draw mode, such as gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.LINES etc.
129
+ */
130
+ setDrawMode(mode: number): void;
131
+ /**
132
+ * IMPORTANT: This function have to be called manually in each render node frame callback, before drawing scene geometry.
133
+ * @public
134
+ */
135
+ transformLights(): void;
136
+ updateBillboardsTexCoords(): void;
137
+ frame(): void;
138
+ preFrame(): void;
139
+ protected _preDrawNodes(): void;
140
+ protected _drawNodes(): void;
141
+ drawEntityCollections(ec: EntityCollection[]): void;
142
+ /**
143
+ * Draw entity collections picking frame.
144
+ * @public
145
+ * @param {Array<EntityCollection>} ec - Entity collection array.
146
+ */
147
+ drawPickingEntityCollections(ec: EntityCollection[]): void;
148
+ protected _entityCollectionPickingCallback(): void;
149
+ }
150
+ export { RenderNode };
@@ -0,0 +1,13 @@
1
+ import { RenderNode } from './RenderNode';
2
+ import { WebGLBufferExt, WebGLTextureExt, Texture3DParams } from "../webgl/Handler";
3
+ declare class SkyBox extends RenderNode {
4
+ params: Texture3DParams;
5
+ vertexPositionBuffer: WebGLBufferExt | null;
6
+ texture: WebGLTextureExt | null;
7
+ constructor(params: Texture3DParams);
8
+ static createDefault(RESOURCES_URL: string): SkyBox;
9
+ init(): void;
10
+ frame(): void;
11
+ protected _createBuffers(): void;
12
+ }
13
+ export { SkyBox };
@@ -0,0 +1,5 @@
1
+ import { Axes } from "./Axes";
2
+ import { Planet } from "./Planet";
3
+ import { SkyBox } from "./SkyBox";
4
+ import { RenderNode } from "./RenderNode";
5
+ export { Planet, Axes, SkyBox, RenderNode };
@@ -0,0 +1,288 @@
1
+ import { Box } from "../bv/Box";
2
+ import { Extent } from "../Extent";
3
+ import { Entity } from "../entity/Entity";
4
+ import { TypedArray } from "../utils/shared";
5
+ import { Handler, WebGLBufferExt, WebGLTextureExt } from "../webgl/Handler";
6
+ import { ITerrainWorkerData } from "../utils/TerrainWorker";
7
+ import { Layer } from "../layer/Layer";
8
+ import { LonLat } from "../LonLat";
9
+ import { Material } from "../layer/Material";
10
+ import { Node } from "../quadTree/Node";
11
+ import { Planet } from "../scene/Planet";
12
+ import { PlanetCamera } from "../camera/PlanetCamera";
13
+ import { Program } from "../webgl/Program";
14
+ import { Proj } from "../proj/Proj";
15
+ import { NumberArray6, Sphere } from "../bv/Sphere";
16
+ import { Slice } from "./Slice";
17
+ import { Vec3 } from "../math/Vec3";
18
+ import { IPlainSegmentWorkerData } from "../utils/PlainSegmentWorker";
19
+ export declare function getTileCellIndex(coordinate: number, tileSize: number, worldEdge: number): number;
20
+ export declare function getTileCellExtent(x: number, y: number, z: number, worldExtent: Extent): Extent;
21
+ export declare const TILEGROUP_COMMON = 0;
22
+ export declare const TILEGROUP_NORTH = 20;
23
+ export declare const TILEGROUP_SOUTH = 300;
24
+ export declare function getTileGroupByLat(lat: number, maxLat?: number): number;
25
+ /**
26
+ * Planet segment Web Mercator tile class that stored and rendered with a quad-tree.
27
+ * @class
28
+ * @param {Node} node - Segment node.
29
+ * @param {Planet} planet - Planet scene.
30
+ * @param {number} tileZoom - Zoom index.
31
+ * @param {Extent} extent - Segment extent.
32
+ */
33
+ declare class Segment {
34
+ _isNorth?: boolean;
35
+ isPole: boolean;
36
+ _tileGroup: number;
37
+ _projection: Proj;
38
+ elevationData: TypedArray | null;
39
+ /**
40
+ * Quad tree node of the segment.
41
+ * @type {Node}
42
+ */
43
+ node: Node;
44
+ /**
45
+ * Planet pointer.
46
+ * @type {Planet}
47
+ */
48
+ planet: Planet;
49
+ /**
50
+ * WebGl handler pointer.
51
+ * @type {Handler}
52
+ */
53
+ handler: Handler;
54
+ /**
55
+ * Segment bounding sphere
56
+ * @type {Sphere}
57
+ */
58
+ bsphere: Sphere;
59
+ _plainRadius: number;
60
+ /**
61
+ * Segment bounding box.
62
+ * @type {Box}
63
+ */
64
+ bbox: Box;
65
+ _sw: Vec3;
66
+ _nw: Vec3;
67
+ _se: Vec3;
68
+ _ne: Vec3;
69
+ centerNormal: Vec3;
70
+ /**
71
+ * Geographical extent.
72
+ * @type {Extent}
73
+ */
74
+ _extent: Extent;
75
+ _extentMerc: Extent;
76
+ _extentLonLat: Extent;
77
+ /**
78
+ * Vertices grid size.
79
+ * @type {number}
80
+ */
81
+ gridSize: number;
82
+ fileGridSize: number;
83
+ /**
84
+ * Tile zoom index.
85
+ * @type {number}
86
+ */
87
+ tileZoom: number;
88
+ /**
89
+ * Equals to pow(2, tileZoom).
90
+ * @type {number}
91
+ */
92
+ powTileZoom: number;
93
+ /**
94
+ * Horizontal tile index.
95
+ * @type {number}
96
+ */
97
+ tileX: number;
98
+ tileXE: number;
99
+ tileXW: number;
100
+ tileYN: number;
101
+ tileYS: number;
102
+ /**
103
+ * Vertical tile index.
104
+ * @type {number}
105
+ */
106
+ tileY: number;
107
+ tileIndex: string;
108
+ /**
109
+ * Texture materials array.
110
+ * @type {Array.<Material>}
111
+ *
112
+ * @toso: Check it should be Map<number, Material> instead of array
113
+ *
114
+ */
115
+ materials: Material[];
116
+ /**
117
+ * Plain segment vertices was created.
118
+ * @type {boolean}
119
+ */
120
+ plainReady: boolean;
121
+ /**
122
+ * Segment is ready to create plain vertices.
123
+ * @type {boolean}
124
+ */
125
+ initialized: boolean;
126
+ /**
127
+ * Normal map is allready made.
128
+ * @type {boolean}
129
+ */
130
+ normalMapReady: boolean;
131
+ /**
132
+ * Terrain is allready applied flag.
133
+ * @type {boolean}
134
+ */
135
+ terrainReady: boolean;
136
+ /**
137
+ * Terrain is loading now flag.
138
+ * @type {boolean}
139
+ */
140
+ terrainIsLoading: boolean;
141
+ /**
142
+ * Terrain existing flag.
143
+ * @type {boolean}
144
+ */
145
+ terrainExists: boolean;
146
+ /**
147
+ * Means that tree passage reach the segment, and the segment terrain is ready.
148
+ * @type {boolean}
149
+ */
150
+ passReady: boolean;
151
+ plainVertices: Float64Array | null;
152
+ plainVerticesHigh: Float32Array | null;
153
+ plainVerticesLow: Float32Array | null;
154
+ plainNormals: Float32Array | null;
155
+ terrainVertices: Float64Array | null;
156
+ terrainVerticesHigh: Float32Array | null;
157
+ terrainVerticesLow: Float32Array | null;
158
+ noDataVertices: Uint8Array | null;
159
+ tempVertices: Float64Array | null;
160
+ tempVerticesHigh: Float32Array | null;
161
+ tempVerticesLow: Float32Array | null;
162
+ normalMapTexture: WebGLTextureExt | null;
163
+ normalMapTextureBias: Float32Array;
164
+ normalMapVertices: Float64Array | null;
165
+ normalMapVerticesHigh: Float32Array | null;
166
+ normalMapVerticesLow: Float32Array | null;
167
+ normalMapNormals: Float32Array | null;
168
+ vertexNormalBuffer: WebGLBufferExt | null;
169
+ vertexPositionBuffer: WebGLBufferExt | null;
170
+ vertexPositionBufferHigh: WebGLBufferExt | null;
171
+ vertexPositionBufferLow: WebGLBufferExt | null;
172
+ vertexTextureCoordBuffer: WebGLBufferExt | null;
173
+ _globalTextureCoordinates: Float32Array;
174
+ _inTheQueue: boolean;
175
+ _appliedNeighborsZoom: [number, number, number, number];
176
+ _slices: Slice[];
177
+ _indexBuffer: WebGLBufferExt | null;
178
+ readyToEngage: boolean;
179
+ plainProcessing: boolean;
180
+ normalMapTexturePtr: WebGLTextureExt | null;
181
+ _transitionOpacity: number;
182
+ _transitionTimestamp: number;
183
+ constructor(node: Node, planet: Planet, tileZoom: number, extent: Extent);
184
+ checkZoom(): boolean;
185
+ /**
186
+ * Returns entity terrain point.
187
+ * @public
188
+ * @param {Entity} entity - Entity.
189
+ * @param {Vec3} res - Point coordinates.
190
+ * @returns {Vec3} -
191
+ */
192
+ getEntityTerrainPoint(entity: Entity, res: Vec3): number;
193
+ getInsideLonLat(obj: Entity | PlanetCamera): LonLat;
194
+ isEntityInside(entity: Entity): boolean;
195
+ /**
196
+ * Returns distance from object to terrain coordinates and terrain point that calculates out in the res parameter.
197
+ * @public
198
+ * @param {Vec3} xyz - Cartesian object position.
199
+ * @param {LonLat} insideSegmentPosition - Geodetic object position.
200
+ * @param {Vec3} [res] - Result cartesian coordinates on the terrain.
201
+ * @returns {number} -
202
+ */
203
+ getTerrainPoint(xyz: Vec3, insideSegmentPosition: LonLat, res: Vec3): number;
204
+ /**
205
+ * Project wgs86 to segment native projection.
206
+ * @public
207
+ * @param {LonLat} lonlat - Coordinates to project.
208
+ * @returns {LonLat} -
209
+ */
210
+ projectNative(lonlat: LonLat): LonLat;
211
+ loadTerrain(forceLoading?: boolean): void;
212
+ /**
213
+ * Terrain obtained from server.
214
+ * @param {Float32Array} elevations - Elevation data.
215
+ */
216
+ elevationsExists(elevations: number[] | TypedArray): void;
217
+ /**
218
+ * Keep plain elevation segment for rendering
219
+ *
220
+ * 'this.tileZoom <= this.planet.terrain.maxZoom' it means, that the segment is plain
221
+ *
222
+ */
223
+ elevationsNotExists(): void;
224
+ protected _checkEqualization(neighborSide: number, neigborNode: Node): boolean;
225
+ equalize(): void;
226
+ engage(): void;
227
+ _terrainWorkerCallback(data: ITerrainWorkerData): void;
228
+ _normalMapEdgeEqualize(side: number): void;
229
+ applyTerrain(elevations?: number[] | TypedArray | null): void;
230
+ deleteBuffers(): void;
231
+ deleteMaterials(): void;
232
+ deleteElevations(): void;
233
+ clearSegment(): void;
234
+ childrenInitialized(): boolean;
235
+ destroySegment(): void;
236
+ /**
237
+ * @todo: looks like it could be simplified in Segment contructor
238
+ */
239
+ _setExtentLonLat(): void;
240
+ protected _createExtentNormals(): void;
241
+ createBoundsByExtent(): void;
242
+ createBoundsByParent(): void;
243
+ setBoundingSphere(x: number, y: number, z: number, v: Vec3): void;
244
+ setBoundingVolume(xmin: number, ymin: number, zmin: number, xmax: number, ymax: number, zmax: number): void;
245
+ setBoundingVolume3v(vmin: Vec3, vmax: Vec3): void;
246
+ setBoundingVolumeArr(bounds: NumberArray6): void;
247
+ createCoordsBuffers(verticesHigh: Float32Array, verticesLow: Float32Array, gridSize: number): void;
248
+ _addViewExtent(): void;
249
+ protected _assignTileIndexes(): void;
250
+ initialize(): void;
251
+ protected _assignGlobalTextureCoordinates(): void;
252
+ createPlainSegmentAsync(): void;
253
+ _plainSegmentWorkerCallback(data: IPlainSegmentWorkerData): void;
254
+ createPlainSegment(): void;
255
+ protected _projToDeg(lon: number, lat: number): LonLat;
256
+ protected _createPlainVertices(): void;
257
+ /**
258
+ * Gets specific layer material.
259
+ * @public
260
+ * @param {Layer} layer - Layer object.
261
+ * @returns {Material | undefined} - Segment material.
262
+ */
263
+ getMaterialByLayer(layer: Layer): Material | undefined;
264
+ /**
265
+ * @param layer
266
+ * @protected
267
+ *
268
+ * @todo siplify layer._extentMerc in this.getLayerExtent(layer)
269
+ *
270
+ */
271
+ protected _getLayerExtentOffset(layer: Layer): [number, number, number, number];
272
+ initSlice(sliceIndex: number): Slice;
273
+ screenRendering(sh: Program, layerSlice: Layer[], sliceIndex: number, defaultTexture?: WebGLTextureExt | null, isOverlay?: boolean, forcedOpacity?: number): void;
274
+ heightPickingRendering(sh: Program, layerSlice: Layer[]): void;
275
+ increaseTransitionOpacity(): void;
276
+ fadingTransitionOpacity(): void;
277
+ colorPickingRendering(sh: Program, layerSlice: Layer[], sliceIndex: number, defaultTexture?: WebGLTextureExt | null, isOverlay?: boolean): void;
278
+ depthRendering(sh: Program, layerSlice: Layer[]): void;
279
+ protected _getIndexBuffer(): WebGLBufferExt;
280
+ _collectVisibleNodes(): void;
281
+ layerOverlap(layer: Layer): boolean;
282
+ getDefaultTexture(): WebGLTextureExt | null;
283
+ getExtentLonLat(): Extent;
284
+ getExtentMerc(): Extent;
285
+ getExtent(): Extent;
286
+ getNeighborSide(b: Segment): 0 | 1 | 2 | 3 | -1;
287
+ }
288
+ export { Segment };
@@ -0,0 +1,44 @@
1
+ import { Extent } from "../Extent";
2
+ import { Layer } from "../layer/Layer";
3
+ import { Node } from "../quadTree/Node";
4
+ import { Planet } from "../scene/Planet";
5
+ import { Segment } from "./Segment";
6
+ import { LonLat } from "../LonLat";
7
+ import { Entity } from "../entity/Entity";
8
+ import { PlanetCamera } from "../camera/PlanetCamera";
9
+ import { WebGLTextureExt } from "../webgl/Handler";
10
+ export declare const POLE_PIECE_SIZE: number;
11
+ /**
12
+ * Planet segment Web Mercator tile class that stored and rendered with quad tree.
13
+ * @class
14
+ * @extends {Segment}
15
+ */
16
+ declare class SegmentLonLat extends Segment {
17
+ constructor(node: Node, planet: Planet, tileZoom: number, extent: Extent);
18
+ _setExtentLonLat(): void;
19
+ projectNative(coords: LonLat): LonLat;
20
+ getInsideLonLat(obj: Entity | PlanetCamera): LonLat;
21
+ protected _getMaxZoom(): number;
22
+ checkZoom(): boolean;
23
+ protected _assignTileIndexes(): void;
24
+ protected _assignTileXIndexes(extent: Extent): void;
25
+ protected _assignTileYIndexes(extent: Extent): void;
26
+ protected _projToDeg(lon: number, lat: number): LonLat;
27
+ protected _assignGlobalTextureCoordinates(): void;
28
+ /**
29
+ * @todo: replace to the strategy
30
+ */
31
+ _collectVisibleNodes(): void;
32
+ /**
33
+ * @param layer
34
+ * @protected
35
+ *
36
+ * @todo simplify layer._extentMerc in layer.getNativeExtent(this)
37
+ *
38
+ */
39
+ protected _getLayerExtentOffset(layer: Layer): [number, number, number, number];
40
+ layerOverlap(layer: Layer): boolean;
41
+ getDefaultTexture(): WebGLTextureExt | null;
42
+ getExtentLonLat(): Extent;
43
+ }
44
+ export { SegmentLonLat };
@@ -0,0 +1,10 @@
1
+ import { Extent } from "../Extent";
2
+ import { Node } from "../quadTree/Node";
3
+ import { Planet } from "../scene/Planet";
4
+ import { SegmentLonLat } from "./SegmentLonLat";
5
+ export declare class SegmentLonLatWgs84 extends SegmentLonLat {
6
+ constructor(node: Node, planet: Planet, tileZoom: number, extent: Extent);
7
+ protected _getMaxZoom(): number;
8
+ protected _assignTileYIndexes(extent: Extent): void;
9
+ protected _assignTileXIndexes(extent: Extent): void;
10
+ }
@@ -0,0 +1,13 @@
1
+ import { Layer } from "../layer/Layer";
2
+ import { Segment } from "./Segment";
3
+ import { Material } from "../layer/Material";
4
+ declare class Slice {
5
+ segment: Segment;
6
+ layers: Layer[];
7
+ tileOffsetArr: Float32Array;
8
+ layerOpacityArr: Float32Array;
9
+ constructor(segment: Segment);
10
+ clear(): void;
11
+ append(layer: Layer, material: Material): void;
12
+ }
13
+ export { Slice };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @module og/segment/SegmentHelper
3
+ */
4
+ type IndexTypeArray = Uint32Array;
5
+ type IndexesTable = [IndexTypeArray[][], IndexTypeArray[][], IndexTypeArray[][], IndexTypeArray[][]];
6
+ declare class SegmentHelper {
7
+ protected _maxGridSize: number;
8
+ centerIndexesTable: IndexTypeArray[];
9
+ skirtsIndexesTable: IndexesTable;
10
+ constructor(maxGridSize?: number);
11
+ get maxGridSize(): number;
12
+ init(): void;
13
+ setMaxGridSize(gridSize: number): void;
14
+ createSegmentIndexes(size: number, sidesSizes: [number, number, number, number]): Uint32Array;
15
+ initTextureCoordsTable(pow: number): Uint16Array[];
16
+ }
17
+ export declare function getInstance(): SegmentHelper;
18
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare const COMMON = "\n \n \n float getLerpValue(in float min, in float max, in float between)\n {\n return (clamp(between, min, max) - min) / (max - min);\n }\n \n vec3 aces(vec3 color) \n {\n float a = 2.51;\n float b = 0.03;\n float c = 2.43;\n float d = 0.59;\n float e = 0.14;\n return clamp((color * (a * color + b)) / (color * (c * color + d ) + e), 0.0, 1.0);\n }\n \n bool intersectSphere(vec3 rayOrigin, vec3 rayDirection, float radius, inout float t1, inout float t2) \n {\n float b = dot(rayDirection, rayOrigin);\n float c = dot(rayOrigin, rayOrigin) - radius * radius;\n float d = b * b - c;\n if (d < 0.0) {\n return false;\n }\n t1 = -b - sqrt(d);\n t2 = -b + sqrt(d);\n return true;\n }\n \n bool intersectSphere(vec3 rayOrigin, vec3 rayDirection, float radius, inout float t) \n {\n float b = dot(rayDirection, rayOrigin);\n float c = dot(rayOrigin, rayOrigin) - radius * radius;\n float d = b * b - c;\n if (d < 0.0) {\n return false;\n }\n t = -b - sqrt(d);\n return true;\n }\n \n bool intersectEllipsoid( in vec3 ro, in vec3 rd, in vec3 ra, inout float t )\n {\n vec3 ocn = ro/ra;\n vec3 rdn = rd/ra;\n float a = dot( rdn, rdn );\n float b = dot( ocn, rdn );\n float c = dot( ocn, ocn );\n float h = b*b - a*(c-1.0);\n \n if (h < 0.0) \n { \n return false; \n }\n \n t = (-b-sqrt(h))/a;\n \n return true;\n }\n \n bool intersectEllipsoid( in vec3 ro, in vec3 rd, in vec3 ra, inout float t1, inout float t2)\n {\n vec3 ocn = ro/ra;\n vec3 rdn = rd/ra;\n float a = dot( rdn, rdn );\n float b = dot( ocn, rdn );\n float c = dot( ocn, ocn );\n float h = b*b - a*(c-1.0);\n \n if (h < 0.0) \n { \n return false; \n }\n \n h = sqrt(h);\n t1 = (-b-h)/a;\n t2 = (-b+h)/a;\n \n return true;\n }\n \n vec3 normalEllipsoid( in vec3 pos, in vec3 ra )\n {\n return normalize( pos/(ra*ra) );\n }\n\n \n #define PI 3.1415926538\n #define ATMOS_HEIGHT 100000.0\n #define RAYLEIGH_SCALE 0.08\n #define MIE_SCALE 0.012\n \n #define SAMPLE_COUNT 16\n #define SQRT_SAMPLE_COUNT 4\n \n const float GROUND_ALBEDO = 0.05 / PI;\n\n // Sphere\n const float BOTTOM_RADIUS = 6356752.3142451793;\n const float TOP_RADIUS = 6356752.3142451793 + ATMOS_HEIGHT;\n \n // Ellipsoid\n const vec3 bottomRadii = vec3(6378137.0, 6378137.0, 6356752.3142451793); \n const vec3 topRadii = bottomRadii + ATMOS_HEIGHT;\n \n const vec3 SPHERE_TO_ELLIPSOID_SCALE = vec3(BOTTOM_RADIUS) / bottomRadii; \n \n const vec2 rayleighMieHeights = vec2(RAYLEIGH_SCALE, MIE_SCALE) * ATMOS_HEIGHT;\n \n const vec3 rayleighScatteringCoefficient = vec3(5.802, 13.558, 33.100) * 1e-6;\n \n const float mieScatteringCoefficient = 3.996e-06;\n const float mieExtinctionCoefficient = 4.440e-06;\n const vec3 ozoneAbsorptionCoefficient = vec3(0.650, 1.881, 0.085) * 1e-6;\n \n const float SUN_ANGULAR_RADIUS = 0.004685;\n const float SUN_INTENSITY = 1.0; \n \n vec3 sunWithBloom(vec3 rayDir, vec3 sunDir) \n {\n float minSunCosTheta = cos(SUN_ANGULAR_RADIUS); \n float cosTheta = dot(rayDir, sunDir);\n if (cosTheta >= minSunCosTheta) return vec3(1.0); \n float offset = minSunCosTheta - cosTheta;\n float gaussianBloom = exp(-offset*15000.0)*0.7;\n float invBloom = 1.0/(0.09 + offset*200.0)*0.01;\n return vec3(gaussianBloom + invBloom);\n }\n \n float rayleighPhase(float angle) \n {\n return 3.0 / (16.0 * PI) * (1.0 + (angle * angle));\n }\n \n float miePhase(float angle) \n {\n float g = 0.8;\n return 3.0 / (8.0 * PI) * ((1.0 - g * g) * (1.0 + angle * angle)) / ((2.0 + g * g) * pow(1.0 + g * g - 2.0 * g * angle, 1.5));\n }\n \n vec3 opticalDepth(float height, float angle) \n {\n vec3 rayOrigin = vec3(0.0, BOTTOM_RADIUS + height, 0.0);\n vec3 rayDirection = vec3(sqrt(1.0 - angle * angle), angle, 0.0);\n float t1, t2;\n intersectSphere(rayOrigin, rayDirection, TOP_RADIUS, t1, t2);\n float segmentLength = t2 / float(SAMPLE_COUNT);\n \n float t = segmentLength * 0.5;\n vec3 opticalDepth = vec3(0.0);\n \n for (int i = 0; i < SAMPLE_COUNT; i++) \n {\n vec3 position = rayOrigin + t * rayDirection;\n float height = length(position) - BOTTOM_RADIUS;\n opticalDepth.xy += exp(-height / rayleighMieHeights) * segmentLength;\n \n // density of the ozone layer is modeled as a triangular \n // function that is 30 km wide and centered at 25 km altitude\n opticalDepth.z += (1.0 - min(abs(height - 25e3) / 15e3, 1.0)) * segmentLength; \n t += segmentLength;\n }\n \n return opticalDepth;\n }\n \n vec3 transmittance(float height, float angle) \n {\n vec3 opticalDepth = opticalDepth(height, angle);\n return exp(-(rayleighScatteringCoefficient * opticalDepth.x + mieExtinctionCoefficient * opticalDepth.y + ozoneAbsorptionCoefficient * opticalDepth.z));\n }";
3
+ export declare function transmittance(): Program;
4
+ export declare function scattering(): Program;
@@ -0,0 +1,3 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function billboardPicking(): Program;
3
+ export declare function billboard_screen(): Program;
@@ -0,0 +1,2 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function bloom(): Program;
@@ -0,0 +1,3 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function buildKernel(sigma: number): number[];
3
+ export declare function blur(): Program;
@@ -0,0 +1,2 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function depth(): Program;
@@ -0,0 +1,8 @@
1
+ import { Program } from "../webgl/Program";
2
+ export declare function drawnode_screen_nl(): Program;
3
+ export declare function drawnode_screen_wl_webgl1NoAtmos(): Program;
4
+ export declare function drawnode_screen_wl_webgl2NoAtmos(): Program;
5
+ export declare function drawnode_screen_wl_webgl2Atmos(): Program;
6
+ export declare function drawnode_colorPicking(): Program;
7
+ export declare function drawnode_heightPicking(): Program;
8
+ export declare function drawnode_depth(): Program;
@@ -0,0 +1,3 @@
1
+ import { Program } from "../webgl/Program";
2
+ export declare const geo_object: () => Program;
3
+ export declare const geo_object_picking: () => Program;
@@ -0,0 +1,4 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function label_webgl2(): Program;
3
+ export declare function label_screen(): Program;
4
+ export declare function labelPicking(): Program;
@@ -0,0 +1,2 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function lumFilter(): Program;
@@ -0,0 +1,2 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function pointCloud(): Program;
@@ -0,0 +1,3 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function polyline_screen(): Program;
3
+ export declare function polyline_picking(): Program;
@@ -0,0 +1,2 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function rayScreen(): Program;
@@ -0,0 +1,2 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function screenFrame(): Program;
@@ -0,0 +1,2 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function skybox(): Program;
@@ -0,0 +1,2 @@
1
+ import { Program } from '../webgl/Program';
2
+ export declare function toneMapping(): Program;
@@ -0,0 +1 @@
1
+ export declare const UTILS = "\n float getLerpValue(in float min, in float max, in float between)\n {\n return (clamp(between, min, max) - min) / (max - min);\n }\n \n vec3 aces(vec3 color) \n {\n float a = 2.51;\n float b = 0.03;\n float c = 2.43;\n float d = 0.59;\n float e = 0.14;\n return clamp((color * (a * color + b)) / (color * (c * color + d ) + e), 0.0, 1.0);\n }\n \n bool intersectSphere(vec3 rayOrigin, vec3 rayDirection, float radius, inout float t1, inout float t2) \n {\n float b = dot(rayDirection, rayOrigin);\n float c = dot(rayOrigin, rayOrigin) - radius * radius;\n float d = b * b - c;\n if (d < 0.0) {\n return false;\n }\n t1 = -b - sqrt(d);\n t2 = -b + sqrt(d);\n return true;\n }\n \n bool intersectSphere(vec3 rayOrigin, vec3 rayDirection, float radius, inout float t) \n {\n float b = dot(rayDirection, rayOrigin);\n float c = dot(rayOrigin, rayOrigin) - radius * radius;\n float d = b * b - c;\n if (d < 0.0) {\n return false;\n }\n t = -b - sqrt(d);\n return true;\n }\n \n bool intersectEllipsoid( in vec3 ro, in vec3 rd, in vec3 ra, inout float t )\n {\n vec3 ocn = ro/ra;\n vec3 rdn = rd/ra;\n float a = dot( rdn, rdn );\n float b = dot( ocn, rdn );\n float c = dot( ocn, ocn );\n float h = b*b - a*(c-1.0);\n \n if (h < 0.0) \n { \n return false; \n }\n \n t = (-b-sqrt(h))/a;\n \n return true;\n }\n \n bool intersectEllipsoid( in vec3 ro, in vec3 rd, in vec3 ra, inout float t1, inout float t2)\n {\n vec3 ocn = ro/ra;\n vec3 rdn = rd/ra;\n float a = dot( rdn, rdn );\n float b = dot( ocn, rdn );\n float c = dot( ocn, ocn );\n float h = b*b - a*(c-1.0);\n \n if (h < 0.0) \n { \n return false; \n }\n \n h = sqrt(h);\n t1 = (-b-h)/a;\n t2 = (-b+h)/a;\n \n return true;\n }\n \n vec3 normalEllipsoid( in vec3 pos, in vec3 ra )\n {\n return normalize( pos/(ra*ra) );\n }\n";
@@ -0,0 +1,18 @@
1
+ import { GlobusTerrain, IGlobusTerrainParams } from "./GlobusTerrain";
2
+ import { Segment } from "../segment/Segment";
3
+ import { Extent } from "../Extent";
4
+ import { TypedArray } from "../utils/shared";
5
+ interface IBilTerrainParams extends IGlobusTerrainParams {
6
+ layers?: string;
7
+ imageSize?: number;
8
+ }
9
+ declare class BilTerrain extends GlobusTerrain {
10
+ protected _format: string;
11
+ protected _layers: string;
12
+ protected _imageSize: number;
13
+ constructor(options?: IBilTerrainParams);
14
+ isBlur(segment: Segment): boolean;
15
+ protected _createUrl(segment: Segment): string;
16
+ protected _createHeights(data: number[], segment: Segment | null, tileGroup: number, tileX: number, tileY: number, tileZoom: number, extent: Extent, preventChildren: boolean): TypedArray | number[];
17
+ }
18
+ export { BilTerrain };