@openglobus/og 0.19.3 → 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 (312) 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} +6 -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 +16 -1
  223. package/lib/js/Object3d.js +66 -1
  224. package/lib/js/astro/jd.js +26 -26
  225. package/lib/js/camera/Frustum.d.ts +1 -1
  226. package/lib/js/camera/Frustum.js +3 -2
  227. package/lib/js/control/DebugInfo.js +19 -18
  228. package/lib/js/control/Lighting.d.ts +4 -0
  229. package/lib/js/control/Lighting.js +51 -12
  230. package/lib/js/control/SimpleSkyBackground.d.ts +2 -0
  231. package/lib/js/control/SimpleSkyBackground.js +13 -3
  232. package/lib/js/control/drawing/PolygonDrawingScene.js +2 -2
  233. package/lib/js/control/timeline/timelineUtils.js +32 -32
  234. package/lib/js/control/visibleExtent/drawnode.js +1 -1
  235. package/lib/js/entity/GeoObject.d.ts +20 -6
  236. package/lib/js/entity/GeoObject.js +44 -4
  237. package/lib/js/entity/GeoObjectHandler.d.ts +6 -1
  238. package/lib/js/entity/GeoObjectHandler.js +58 -6
  239. package/lib/js/entity/Geometry.d.ts +24 -11
  240. package/lib/js/entity/Geometry.js +17 -9
  241. package/lib/js/entity/GeometryHandler.js +5 -5
  242. package/lib/js/entity/Label.d.ts +7 -0
  243. package/lib/js/entity/Label.js +11 -0
  244. package/lib/js/entity/Polyline.d.ts +15 -7
  245. package/lib/js/entity/Polyline.js +54 -6
  246. package/lib/js/entity/Strip.d.ts +12 -0
  247. package/lib/js/entity/Strip.js +16 -0
  248. package/lib/js/entity/StripHandler.js +1 -1
  249. package/lib/js/entity/index.d.ts +10 -11
  250. package/lib/js/entity/index.js +10 -11
  251. package/lib/js/index.d.ts +5 -5
  252. package/lib/js/index.js +5 -5
  253. package/lib/js/layer/Bing.d.ts +4 -0
  254. package/lib/js/layer/Bing.js +40 -0
  255. package/lib/js/layer/GeoImage.d.ts +1 -1
  256. package/lib/js/layer/GeoVideo.d.ts +1 -1
  257. package/lib/js/layer/Layer.d.ts +1 -1
  258. package/lib/js/layer/Layer.js +2 -2
  259. package/lib/js/layer/OpenStreetMap.d.ts +4 -0
  260. package/lib/js/layer/OpenStreetMap.js +19 -0
  261. package/lib/js/layer/Vector.d.ts +3 -0
  262. package/lib/js/layer/Vector.js +3 -3
  263. package/lib/js/layer/index.d.ts +12 -11
  264. package/lib/js/layer/index.js +12 -11
  265. package/lib/js/math/Mat4.js +18 -17
  266. package/lib/js/mercator.js +2 -1
  267. package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +4 -5
  268. package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +3 -0
  269. package/lib/js/quadTree/EarthQuadTreeStrategy.js +40 -5
  270. package/lib/js/quadTree/EntityCollectionNode.d.ts +2 -2
  271. package/lib/js/quadTree/EntityCollectionNode.js +13 -14
  272. package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +5 -0
  273. package/lib/js/quadTree/MarsQuadTreeStrategy.js +31 -5
  274. package/lib/js/quadTree/Node.d.ts +2 -1
  275. package/lib/js/quadTree/Node.js +38 -28
  276. package/lib/js/quadTree/QuadTreeStrategy.d.ts +3 -0
  277. package/lib/js/quadTree/QuadTreeStrategy.js +17 -0
  278. package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +3 -3
  279. package/lib/js/renderer/Renderer.js +1 -0
  280. package/lib/js/scene/Axes.js +4 -4
  281. package/lib/js/scene/Planet.js +6 -4
  282. package/lib/js/segment/Segment.d.ts +12 -9
  283. package/lib/js/segment/Segment.js +47 -24
  284. package/lib/js/segment/SegmentLonLat.d.ts +1 -5
  285. package/lib/js/segment/SegmentLonLat.js +8 -100
  286. package/lib/js/segment/SegmentLonLatWgs84.js +5 -3
  287. package/lib/js/shaders/billboard.js +4 -4
  288. package/lib/js/shaders/drawnode.js +16 -19
  289. package/lib/js/shaders/geoObject.js +10 -11
  290. package/lib/js/shaders/ray.js +7 -3
  291. package/lib/js/terrain/BilTerrain.d.ts +1 -1
  292. package/lib/js/terrain/BilTerrain.js +7 -6
  293. package/lib/js/terrain/EmptyTerrain.d.ts +7 -0
  294. package/lib/js/terrain/EmptyTerrain.js +7 -0
  295. package/lib/js/terrain/GlobusRgbTerrain.d.ts +6 -0
  296. package/lib/js/terrain/GlobusRgbTerrain.js +25 -0
  297. package/lib/js/terrain/GlobusTerrain.d.ts +5 -5
  298. package/lib/js/terrain/GlobusTerrain.js +35 -30
  299. package/lib/js/terrain/RgbTerrain.d.ts +22 -0
  300. package/lib/js/terrain/RgbTerrain.js +415 -0
  301. package/lib/js/terrain/index.d.ts +3 -2
  302. package/lib/js/terrain/index.js +3 -2
  303. package/lib/js/ui/Color.d.ts +22 -0
  304. package/lib/js/ui/Color.js +58 -0
  305. package/lib/js/utils/GeoImageCreator.js +1 -1
  306. package/lib/js/utils/NormalMapCreator.js +1 -1
  307. package/lib/js/utils/VectorTileCreator.js +3 -3
  308. package/lib/js/utils/objParser.js +3 -3
  309. package/lib/js/utils/shared.d.ts +3 -9
  310. package/lib/js/utils/shared.js +24 -9
  311. package/package.json +26 -18
  312. package/lib/js/terrain/MapboxTerrain.js +0 -298
@@ -0,0 +1,37 @@
1
+ import { Vec3 } from "../math/Vec3";
2
+ import { Ellipsoid } from "../ellipsoid/Ellipsoid";
3
+ import { Extent } from "../Extent";
4
+ export type NumberArray6 = [number, number, number, number, number, number];
5
+ /**
6
+ * Bounding sphere class.
7
+ * @class
8
+ * @param {Number} [radius] - Bounding sphere radius.
9
+ * @param {Vec3} [center] - Bounding sphere coordinates.
10
+ */
11
+ declare class Sphere {
12
+ /**
13
+ * Sphere radius.
14
+ * @public
15
+ * @type {Number}
16
+ */
17
+ radius: number;
18
+ /**
19
+ * Sphere coordinates.
20
+ * @public
21
+ * @type {Vec3}
22
+ */
23
+ center: Vec3;
24
+ constructor(radius?: number, center?: Vec3);
25
+ /**
26
+ * Sets bounding sphere coordinates by the bounds array.
27
+ * @param {Array.<number>} bounds - Bounds is an array where [minX, minY, minZ, maxX, maxY, maxZ]
28
+ */
29
+ setFromBounds(bounds: NumberArray6): void;
30
+ /**
31
+ * Sets bounding sphere coordinates by ellipsoid geodetic extend.
32
+ * @param {Ellipsoid} ellipsoid - Ellipsoid.
33
+ * @param {Extent} extent - Geodetic extent.
34
+ */
35
+ setFromExtent(ellipsoid: Ellipsoid, extent: Extent): void;
36
+ }
37
+ export { Sphere };
@@ -0,0 +1,3 @@
1
+ import { Box } from './Box';
2
+ import { Sphere } from './Sphere';
3
+ export { Box, Sphere };
@@ -0,0 +1,314 @@
1
+ import { EventsHandler } from "../Events";
2
+ import { Frustum } from "./Frustum";
3
+ import { Mat3, NumberArray9 } from "../math/Mat3";
4
+ import { Mat4, NumberArray16 } from "../math/Mat4";
5
+ import { Renderer } from "../renderer/Renderer";
6
+ import { Vec2, NumberArray2 } from "../math/Vec2";
7
+ import { Vec3 } from "../math/Vec3";
8
+ type CameraEvents = ["viewchange", "moveend"];
9
+ export interface ICameraParams {
10
+ eye?: Vec3;
11
+ aspect?: number;
12
+ viewAngle?: number;
13
+ look?: Vec3;
14
+ up?: Vec3;
15
+ frustums?: NumberArray2[];
16
+ }
17
+ /**
18
+ * Camera class.
19
+ * @class
20
+ * @param {Renderer} [renderer] - Renderer uses the camera instance.
21
+ * @param {Object} [options] - Camera options:
22
+ * @param {Object} [options.name] - Camera name.
23
+ * @param {number} [options.viewAngle=47] - Camera angle of view. Default is 47.0
24
+ * @param {number} [options.near=1] - Camera near plane distance. Default is 1.0
25
+ * @param {number} [options.far=og.math.MAX] - Camera far plane distance. Default is og.math.MAX
26
+ * @param {Vec3} [options.eye=[0,0,0]] - Camera eye position. Default (0,0,0)
27
+ * @param {Vec3} [options.look=[0,0,0]] - Camera look position. Default (0,0,0)
28
+ * @param {Vec3} [options.up=[0,1,0]] - Camera eye position. Default (0,1,0)
29
+ *
30
+ * @fires EventsHandler<CameraEvents>#viewchange
31
+ * @fires EventsHandler<CameraEvents>#moveend
32
+ */
33
+ declare class Camera {
34
+ /**
35
+ * Assigned renderer
36
+ * @public
37
+ * @type {Renderer}
38
+ */
39
+ renderer: Renderer | null;
40
+ /**
41
+ * Camera events handler
42
+ * @public
43
+ * @type {Events}
44
+ */
45
+ events: EventsHandler<CameraEvents>;
46
+ /**
47
+ * Camera position.
48
+ * @public
49
+ * @type {Vec3}
50
+ */
51
+ eye: Vec3;
52
+ /**
53
+ * Camera RTE high position
54
+ * @public
55
+ * @type {Float32Array}
56
+ */
57
+ eyeHigh: Float32Array;
58
+ /**
59
+ * Camera RTE low position
60
+ * @public
61
+ * @type {Float32Array}
62
+ */
63
+ eyeLow: Float32Array;
64
+ /**
65
+ * Aspect ratio.
66
+ * @protected
67
+ * @type {Number}
68
+ */
69
+ protected _aspect: number;
70
+ /**
71
+ * Camera view angle in degrees
72
+ * @protected
73
+ * @type {Number}
74
+ */
75
+ protected _viewAngle: number;
76
+ /**
77
+ * Camera view matrix.
78
+ * @protected
79
+ * @type {Mat4}
80
+ */
81
+ protected _viewMatrix: Mat4;
82
+ /**
83
+ * Camera normal matrix.
84
+ * @protected
85
+ * @type {Mat3}
86
+ */
87
+ protected _normalMatrix: Mat3;
88
+ /**
89
+ * Camera right vector.
90
+ * @public
91
+ * @type {Vec3}
92
+ */
93
+ _r: Vec3;
94
+ /**
95
+ * Camera up vector.
96
+ * @public
97
+ * @type {Vec3}
98
+ */
99
+ _u: Vec3;
100
+ /**
101
+ * Camera backward vector.
102
+ * @public
103
+ * @type {Vec3}
104
+ */
105
+ _b: Vec3;
106
+ protected _pr: Vec3;
107
+ protected _pu: Vec3;
108
+ protected _pb: Vec3;
109
+ protected _peye: Vec3;
110
+ isMoving: boolean;
111
+ protected _tanViewAngle_hrad: number;
112
+ _tanViewAngle_hradOneByHeight: number;
113
+ protected _projSizeConst: number;
114
+ frustums: Frustum[];
115
+ frustumColors: number[];
116
+ FARTHEST_FRUSTUM_INDEX: number;
117
+ currentFrustumIndex: number;
118
+ isFirstPass: boolean;
119
+ constructor(renderer: Renderer | null, options?: ICameraParams);
120
+ checkMoveEnd(): void;
121
+ bindRenderer(renderer: Renderer): void;
122
+ /**
123
+ * Camera initialization.
124
+ * @public
125
+ * @param {Object} [options] - Camera options:
126
+ * @param {number} [options.viewAngle] - Camera angle of view.
127
+ * @param {number} [options.near] - Camera near plane distance. Default is 1.0
128
+ * @param {number} [options.far] - Camera far plane distance. Default is math.MAX
129
+ * @param {Vec3} [options.eye] - Camera eye position. Default (0,0,0)
130
+ * @param {Vec3} [options.look] - Camera look position. Default (0,0,0)
131
+ * @param {Vec3} [options.up] - Camera eye position. Default (0,1,0)
132
+ */
133
+ protected _init(options: ICameraParams): void;
134
+ getUp(): Vec3;
135
+ getDown(): Vec3;
136
+ getRight(): Vec3;
137
+ getLeft(): Vec3;
138
+ getForward(): Vec3;
139
+ getBackward(): Vec3;
140
+ /**
141
+ * Updates camera view space
142
+ * @public
143
+ * @virtual
144
+ */
145
+ update(): void;
146
+ /**
147
+ * Refresh camera matrices
148
+ * @public
149
+ */
150
+ refresh(): void;
151
+ /**
152
+ * Sets aspect ratio
153
+ * @public
154
+ * @param {Number} aspect - Camera aspect ratio
155
+ */
156
+ setAspectRatio(aspect: number): void;
157
+ /**
158
+ * Returns aspect ratio
159
+ * @public
160
+ * @returns {number} - Aspect ratio
161
+ */
162
+ getAspectRatio(): number;
163
+ /**
164
+ * Sets up camera projection
165
+ * @public
166
+ * @param {number} angle - Camera view angle
167
+ * @param {number} aspect - Screen aspect ratio
168
+ */
169
+ protected _setProj(angle: number, aspect: number): void;
170
+ /**
171
+ * Sets camera view angle in degrees
172
+ * @public
173
+ * @param {number} angle - View angle
174
+ */
175
+ setViewAngle(angle: number): void;
176
+ /**
177
+ * Gets camera view angle in degrees
178
+ * @public
179
+ * @returns {number} angle -
180
+ */
181
+ getViewAngle(): number;
182
+ get viewAngle(): number;
183
+ /**
184
+ * Sets camera to eye position
185
+ * @public
186
+ * @param {Vec3} eye - Camera position
187
+ * @param {Vec3} look - Look point
188
+ * @param {Vec3} up - Camera up vector
189
+ * @returns {Camera} - This camera
190
+ */
191
+ set(eye: Vec3, look?: Vec3, up?: Vec3): this;
192
+ /**
193
+ * Sets camera look point
194
+ * @public
195
+ * @param {Vec3} look - Look point
196
+ * @param {Vec3} [up] - Camera up vector otherwise camera current up vector(this._u)
197
+ */
198
+ look(look: Vec3, up?: Vec3): void;
199
+ /**
200
+ * Slides camera to vector d - (du, dv, dn)
201
+ * @public
202
+ * @param {number} du - delta X
203
+ * @param {number} dv - delta Y
204
+ * @param {number} dn - delta Z
205
+ */
206
+ slide(du: number, dv: number, dn: number): void;
207
+ /**
208
+ * Roll the camera to the angle in degrees
209
+ * @public
210
+ * @param {number} angle - Delta roll angle in degrees
211
+ */
212
+ roll(angle: number): void;
213
+ /**
214
+ * Pitch the camera to the angle in degrees
215
+ * @public
216
+ * @param {number} angle - Delta pitch angle in degrees
217
+ */
218
+ pitch(angle: number): void;
219
+ /**
220
+ * Yaw the camera to the angle in degrees
221
+ * @public
222
+ * @param {number} angle - Delta yaw angle in degrees
223
+ */
224
+ yaw(angle: number): void;
225
+ /**
226
+ * Returns normal vector direction to the unprojected screen point from camera eye
227
+ * @public
228
+ * @param {number} x - Screen X coordinate
229
+ * @param {number} y - Screen Y coordinate
230
+ * @returns {Vec3} - Direction vector
231
+ */
232
+ unproject(x: number, y: number): Vec3;
233
+ /**
234
+ * Gets projected 3d point to the 2d screen coordinates
235
+ * @public
236
+ * @param {Vec3} v - Cartesian 3d coordinates
237
+ * @returns {Vec2} - Screen point coordinates
238
+ */
239
+ project(v: Vec3): Vec2;
240
+ /**
241
+ * Rotates camera around center point
242
+ * @public
243
+ * @param {number} angle - Rotation angle in radians
244
+ * @param {boolean} [isArc] - If true camera up vector gets from current up vector every frame,
245
+ * otherwise up is always input parameter.
246
+ * @param {Vec3} [center] - Point that the camera rotates around
247
+ * @param {Vec3} [up] - Camera up vector
248
+ */
249
+ rotateAround(angle: number, isArc?: boolean, center?: Vec3 | null, up?: Vec3 | null): void;
250
+ /**
251
+ * Rotates camera around center point by horizontal.
252
+ * @public
253
+ * @param {number} angle - Rotation angle in radians.
254
+ * @param {boolean} [isArc] - If true camera up vector gets from current up vector every frame,
255
+ * otherwise up is always input parameter.
256
+ * @param {Vec3} [center] - Point that the camera rotates around.
257
+ * @param {Vec3} [up] - Camera up vector.
258
+ */
259
+ rotateHorizontal(angle: number, isArc?: boolean, center?: Vec3 | null, up?: Vec3 | null): void;
260
+ /**
261
+ * Rotates camera around center point by vertical.
262
+ * @param {number} angle - Rotation angle in radians.
263
+ * @param {Vec3} [center] - Point that the camera rotates around.
264
+ */
265
+ rotateVertical(angle: number, center?: Vec3): void;
266
+ /**
267
+ * Gets 3d size factor. Uses in LOD distance calculation.
268
+ * @public
269
+ * @param {Vec3} p - Far point.
270
+ * @param {Vec3} r - Far point.
271
+ * @returns {number} - Size factor.
272
+ */
273
+ projectedSize(p: Vec3, r: number): number;
274
+ /**
275
+ * Returns model matrix.
276
+ * @public
277
+ * @returns {NumberArray16} - View matrix.
278
+ */
279
+ getViewMatrix(): NumberArray16;
280
+ /**
281
+ * Returns normal matrix.
282
+ * @public
283
+ * @returns {NumberArray9} - Normal matrix.
284
+ */
285
+ getNormalMatrix(): NumberArray9;
286
+ setCurrentFrustum(k: number): void;
287
+ getCurrentFrustum(): number;
288
+ get frustum(): Frustum;
289
+ /**
290
+ * Returns projection matrix.
291
+ * @public
292
+ * @returns {Mat4} - Projection matrix.
293
+ */
294
+ getProjectionMatrix(): NumberArray16;
295
+ /**
296
+ * Returns projection and model matrix product.
297
+ * @public
298
+ * @return {Mat4} - Projection-view matrix.
299
+ */
300
+ getProjectionViewMatrix(): NumberArray16;
301
+ /**
302
+ * Returns inverse projection and model matrix product.
303
+ * @public
304
+ * @returns {Mat4} - Inverse projection-view matrix.
305
+ */
306
+ getInverseProjectionViewMatrix(): NumberArray16;
307
+ /**
308
+ * Returns inverse projection matrix.
309
+ * @public
310
+ * @returns {Mat4} - Inverse projection-view matrix.
311
+ */
312
+ getInverseProjectionMatrix(): NumberArray16;
313
+ }
314
+ export { Camera };
@@ -0,0 +1,139 @@
1
+ import { Box } from "../bv/Box";
2
+ import { Mat4, NumberArray16 } from "../math/Mat4";
3
+ import { NumberArray4 } from "../math/Vec4";
4
+ import { Sphere } from "../bv/Sphere";
5
+ import { Vec3 } from "../math/Vec3";
6
+ interface IFrustumParams {
7
+ cameraFrustumIndex?: number;
8
+ fov?: number;
9
+ aspect?: number;
10
+ near?: number;
11
+ far?: number;
12
+ }
13
+ /**
14
+ * Frustum object, part of the camera object.
15
+ * @class
16
+ * @param {*} options
17
+ */
18
+ declare class Frustum {
19
+ protected _f: [NumberArray4, NumberArray4, NumberArray4, NumberArray4, NumberArray4, NumberArray4];
20
+ /**
21
+ * Camera projection matrix.
22
+ * @protected
23
+ * @type {Mat4}
24
+ */
25
+ projectionMatrix: Mat4;
26
+ /**
27
+ * Camera inverse projection matrix.
28
+ * @protected
29
+ * @type {Mat4}
30
+ */
31
+ inverseProjectionMatrix: Mat4;
32
+ /**
33
+ * Product of projection and view matrices.
34
+ * @protected
35
+ * @type {Mat4}
36
+ */
37
+ projectionViewMatrix: Mat4;
38
+ /**
39
+ * Inverse projectionView Matrix.
40
+ * @protected
41
+ * @type {Mat4}
42
+ */
43
+ inverseProjectionViewMatrix: Mat4;
44
+ /**
45
+ * Projection frustum left value.
46
+ * @public
47
+ */
48
+ left: number;
49
+ /**
50
+ * Projection frustum right value.
51
+ * @public
52
+ */
53
+ right: number;
54
+ /**
55
+ * Projection frustum bottom value.
56
+ * @public
57
+ */
58
+ bottom: number;
59
+ /**
60
+ * Projection frustum top value.
61
+ * @public
62
+ */
63
+ top: number;
64
+ /**
65
+ * Projection frustum near value.
66
+ * @public
67
+ */
68
+ near: number;
69
+ /**
70
+ * Projection frustum far value.
71
+ * @public
72
+ */
73
+ far: number;
74
+ cameraFrustumIndex: number;
75
+ _pickingColorU: Float32Array;
76
+ constructor(options?: IFrustumParams);
77
+ getRightPlane(): NumberArray4;
78
+ getLeftPlane(): NumberArray4;
79
+ getBottomPlane(): NumberArray4;
80
+ getTopPlane(): NumberArray4;
81
+ getBackwardPlane(): NumberArray4;
82
+ getForwardPlane(): NumberArray4;
83
+ getProjectionViewMatrix(): NumberArray16;
84
+ getProjectionMatrix(): NumberArray16;
85
+ getInverseProjectionMatrix(): NumberArray16;
86
+ /**
87
+ * Sets up camera projection matrix.
88
+ * @public
89
+ * @param {number} angle - Camera's view angle.
90
+ * @param {number} aspect - Screen aspect ratio.
91
+ * @param {number} near - Near camera distance.
92
+ * @param {number} far - Far camera distance.
93
+ */
94
+ setProjectionMatrix(angle: number, aspect: number, near: number, far: number): void;
95
+ /**
96
+ * Camera's projection matrix values.
97
+ * @public
98
+ * @param {Mat4} viewMatrix - View matrix.
99
+ */
100
+ setViewMatrix(viewMatrix: Mat4): void;
101
+ /**
102
+ * Returns true if a point in the frustum.
103
+ * @public
104
+ * @param {Vec3} point - Cartesian point.
105
+ * @returns {boolean} -
106
+ */
107
+ containsPoint(point: Vec3): boolean;
108
+ /**
109
+ * Returns true if the frustum contains a bonding sphere, but bottom plane exclude.
110
+ * @public
111
+ * @param {Sphere} sphere - Bounding sphere.
112
+ * @returns {boolean} -
113
+ */
114
+ containsSphereBottomExc(sphere: Sphere): boolean;
115
+ containsSphereButtom(sphere: Sphere): boolean;
116
+ /**
117
+ * Returns true if the frustum contains a bonding sphere.
118
+ * @public
119
+ * @param {Sphere} sphere - Bounding sphere.
120
+ * @returns {boolean} -
121
+ */
122
+ containsSphere(sphere: Sphere): boolean;
123
+ /**
124
+ * Returns true if the frustum contains a bonding sphere.
125
+ * @public
126
+ * @param {Vec3} center - Sphere center.
127
+ * @param {number} radius - Sphere radius.
128
+ * @returns {boolean} -
129
+ */
130
+ containsSphere2(center: Vec3, radius: number): boolean;
131
+ /**
132
+ * Returns true if the frustum contains a bounding box.
133
+ * @public
134
+ * @param {Box} box - Bounding box.
135
+ * @returns {boolean} -
136
+ */
137
+ containsBox(box: Box): boolean;
138
+ }
139
+ export { Frustum };