@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,195 @@
1
+ import { Mat3 } from "./Mat3";
2
+ import { Vec3 } from "./Vec3";
3
+ import { Vec4 } from "./Vec4";
4
+ export type NumberArray16 = [
5
+ number,
6
+ number,
7
+ number,
8
+ number,
9
+ number,
10
+ number,
11
+ number,
12
+ number,
13
+ number,
14
+ number,
15
+ number,
16
+ number,
17
+ number,
18
+ number,
19
+ number,
20
+ number
21
+ ];
22
+ /**
23
+ * Class represents a 4x4 matrix.
24
+ * @class
25
+ */
26
+ export declare class Mat4 {
27
+ /**
28
+ * A 4x4 matrix, index-able as a column-major order array.
29
+ * @public
30
+ * @type {Array.<number>}
31
+ */
32
+ _m: NumberArray16;
33
+ constructor();
34
+ /**
35
+ * Returns identity matrix instance.
36
+ * @static
37
+ * @returns {Mat4} -
38
+ */
39
+ static identity(): Mat4;
40
+ /**
41
+ * Sets column-major order array matrix.
42
+ * @public
43
+ * @param {Array.<number>} m - Matrix array.
44
+ * @returns {Mat4} -
45
+ */
46
+ set(m: NumberArray16): Mat4;
47
+ /**
48
+ * Duplicates a Matrix3 instance.
49
+ * @public
50
+ * @returns {Mat4} -
51
+ */
52
+ clone(): Mat4;
53
+ /**
54
+ * Copy matrix.
55
+ * @public
56
+ * @param {Mat4} a - Matrix to copy.
57
+ * @return {Mat4}
58
+ */
59
+ copy(a: Mat4): Mat4;
60
+ /**
61
+ * Converts to 3x3 matrix.
62
+ * @public
63
+ * @returns {Mat3} -
64
+ */
65
+ toMatrix3(): Mat3;
66
+ /**
67
+ * Multiply to 3d vector.
68
+ * @public
69
+ * @param {Vec3} p - 3d vector.
70
+ * @returns {Vec3} -
71
+ */
72
+ mulVec3(p: Vec3): Vec3;
73
+ /**
74
+ * Multiply to 4d vector.
75
+ * @public
76
+ * @param {Vec4} p - 4d vector.
77
+ * @returns {Vec4} -
78
+ */
79
+ mulVec4(p: Vec4): Vec4;
80
+ /**
81
+ * Creates an inverse 3x3 matrix of the current.
82
+ * @public
83
+ * @returns {Mat3} -
84
+ */
85
+ toInverseMatrix3(): Mat3 | undefined;
86
+ /**
87
+ * Creates an inverse matrix of the current.
88
+ * @public
89
+ * @returns {Mat4} -
90
+ */
91
+ inverseTo(res?: Mat4): Mat4;
92
+ /**
93
+ * Creates a transposed matrix of the current.
94
+ * @public
95
+ * @returns {Mat4} -
96
+ */
97
+ transposeTo(): Mat4;
98
+ /**
99
+ * Sets matrix to identity.
100
+ * @public
101
+ * @returns {Mat4} -
102
+ */
103
+ setIdentity(): Mat4;
104
+ /**
105
+ * Computes the product of two matrices.
106
+ * @public
107
+ * @param {Mat4} mx - Matrix to multiply.
108
+ * @returns {Mat4} -
109
+ */
110
+ mul(mx: Mat4): Mat4;
111
+ /**
112
+ * Add translation vector to the current matrix.
113
+ * @public
114
+ * @param {Vec3} v - Translate vector.
115
+ * @returns {Mat4} -
116
+ */
117
+ translate(v: Vec3): Mat4;
118
+ /**
119
+ * Sets translation matrix to the position.
120
+ * @public
121
+ * @param {Vec3} v - Translate to position.
122
+ * @returns {Mat4} -
123
+ */
124
+ translateToPosition(v: Vec3): Mat4;
125
+ /**
126
+ * Rotate current matrix around the aligned axis and angle.
127
+ * @public
128
+ * @param {Vec3} u - Aligned axis.
129
+ * @param {number} angle - Aligned axis angle in radians.
130
+ * @returns {Mat4} -
131
+ */
132
+ rotate(u: Vec3, angle: number): Mat4;
133
+ /**
134
+ * Sets current rotation matrix around the aligned axis and angle.
135
+ * @public
136
+ * @param {Vec3} u - Aligned axis.
137
+ * @param {number} angle - Aligned axis angle in radians.
138
+ * @returns {Mat4} -
139
+ */
140
+ setRotation(u: Vec3, angle: number): Mat4;
141
+ /**
142
+ * Gets the rotation matrix from one vector to another.
143
+ * @public
144
+ * @param {Vec3} a - First vector.
145
+ * @param {Vec3} b - Second vector.
146
+ * @returns {Mat4} -
147
+ */
148
+ rotateBetweenVectors(a: Vec3, b: Vec3): Mat4;
149
+ /**
150
+ * Scale current matrix to the vector values.
151
+ * @public
152
+ * @param {Vec3} v - Scale vector.
153
+ * @returns {Mat4} -
154
+ */
155
+ scale(v: Vec3): Mat4;
156
+ /**
157
+ * Sets perspective projection matrix frustum values.
158
+ * @public
159
+ * @param {number} left -
160
+ * @param {number} right -
161
+ * @param {number} bottom -
162
+ * @param {number} top -
163
+ * @param {number} near -
164
+ * @param {number} far -
165
+ * @returns {Mat4} -
166
+ */
167
+ setPerspective(left: number, right: number, bottom: number, top: number, near: number, far: number): Mat4;
168
+ /**
169
+ * Creates current orthographic projection matrix.
170
+ * @public
171
+ * @param {number} left -
172
+ * @param {number} right -
173
+ * @param {number} bottom -
174
+ * @param {number} top -
175
+ * @param {number} near -
176
+ * @param {number} far -
177
+ * @return {Mat4} -
178
+ */
179
+ setOrtho(left: number, right: number, bottom: number, top: number, near: number, far: number): Mat4;
180
+ /**
181
+ * Sets current rotation matrix by euler's angles.
182
+ * @public
183
+ * @param {number} ax - Rotation angle in radians around X axis.
184
+ * @param {number} ay - Rotation angle in radians around Y axis.
185
+ * @param {number} az - Rotation angle in radians around Z axis.
186
+ * @returns {Mat4} -
187
+ */
188
+ eulerToMatrix(ax: number, ay: number, az: number): Mat4;
189
+ }
190
+ /**
191
+ * Mat4 factory.
192
+ * @static
193
+ * @returns {Mat4} -
194
+ */
195
+ export declare function mat4(): Mat4;
@@ -0,0 +1,20 @@
1
+ import { Vec3 } from "./Vec3";
2
+ import { Line3 } from "./Line3";
3
+ /**
4
+ * Plane class.
5
+ * @constructor
6
+ * @param {Vec3} [p] - Plane point.
7
+ * @param {Vec3} [n] - Planet normal.
8
+ */
9
+ declare class Plane {
10
+ p: Vec3;
11
+ n: Vec3;
12
+ constructor(p: Vec3, n: Vec3);
13
+ set(p: Vec3, n: Vec3): void;
14
+ getNormal(): Vec3;
15
+ distance(p: Vec3): number;
16
+ getProjection(v: Vec3, def?: Vec3): Vec3;
17
+ getProjectionPoint(p: Vec3, vh?: Vec3): Vec3;
18
+ getIntersection(Pn1: Plane, Pn2: Plane, L: Line3): number;
19
+ }
20
+ export { Plane };
@@ -0,0 +1,373 @@
1
+ import { Vec3 } from "./Vec3";
2
+ import { Mat4 } from "./Mat4";
3
+ import { Mat3 } from "./Mat3";
4
+ /**
5
+ * A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.
6
+ * @constructor
7
+ * @param {Number} [x=0.0] The X component.
8
+ * @param {Number} [y=0.0] The Y component.
9
+ * @param {Number} [z=0.0] The Z component.
10
+ * @param {Number} [w=0.0] The W component.
11
+ */
12
+ export declare class Quat {
13
+ /**
14
+ * The X component.
15
+ * @public
16
+ * @type {Number}
17
+ * @default 0.0
18
+ */
19
+ x: number;
20
+ /**
21
+ * The Y component.
22
+ * @public
23
+ * @type {Number}
24
+ * @default 0.0
25
+ */
26
+ y: number;
27
+ /**
28
+ * The Z component.
29
+ * @public
30
+ * @type {Number}
31
+ * @default 0.0
32
+ */
33
+ z: number;
34
+ /**
35
+ * The W component.
36
+ * @public
37
+ * @type {Number}
38
+ * @default 0.0
39
+ */
40
+ w: number;
41
+ constructor(x?: number, y?: number, z?: number, w?: number);
42
+ /**
43
+ * Identity Quat.
44
+ * @const
45
+ * @type {Quat}
46
+ */
47
+ static get IDENTITY(): Quat;
48
+ /**
49
+ * Returns a Quat represents rotation around X axis.
50
+ * @static
51
+ * @param {number} a - The angle in radians to rotate around the axis.
52
+ * @returns {Quat} -
53
+ */
54
+ static xRotation(a: number): Quat;
55
+ /**
56
+ * Returns a Quat represents rotation around Y axis.
57
+ * @static
58
+ * @param {number} a - The angle in radians to rotate around the axis.
59
+ * @returns {Quat} -
60
+ */
61
+ static yRotation(a: number): Quat;
62
+ /**
63
+ * Returns a Quat represents rotation around Z axis.
64
+ * @static
65
+ * @param {number} a - The angle in radians to rotate around the axis.
66
+ * @returns {Quat} -
67
+ */
68
+ static zRotation(a: number): Quat;
69
+ /**
70
+ * Computes a Quat representing a rotation around an axis.
71
+ * @static
72
+ * @param {Vec3} axis - The axis of rotation.
73
+ * @param {number} [angle=0.0] The angle in radians to rotate around the axis.
74
+ * @returns {Quat} -
75
+ */
76
+ static axisAngleToQuat(axis: Vec3, angle?: number): Quat;
77
+ /**
78
+ * Computes a rotation from the given heading and up vector.
79
+ * @static
80
+ * @param {Vec3} forward - Heading target coordinates.
81
+ * @param {Vec3} up - Up vector.
82
+ * @returns {Quat} -
83
+ */
84
+ static getLookRotation(forward: Vec3, up: Vec3): Quat;
85
+ /**
86
+ * Computes a Quat from source point heading to the destination point.
87
+ * @static
88
+ * @param {Vec3} sourcePoint - Source coordinate.
89
+ * @param {Vec3} destPoint - Destination coordinate.
90
+ * @returns {Quat} -
91
+ */
92
+ static getLookAtSourceDest(sourcePoint: Vec3, destPoint: Vec3): Quat;
93
+ /**
94
+ * Compute rotation between two vectors.
95
+ * @static
96
+ * @param {Vec3} u - First vector.
97
+ * @param {Vec3} v - Second vector.
98
+ * @returns {Quat} -
99
+ */
100
+ static getRotationBetweenVectors(u: Vec3, v: Vec3): Quat;
101
+ /**
102
+ * Compute rotation between two vectors.
103
+ * @static
104
+ * @param {Vec3} u - First vector.
105
+ * @param {Vec3} v - Second vector.
106
+ * @param {Quat} res
107
+ * @returns {Quat} -
108
+ */
109
+ static getRotationBetweenVectorsRes(u: Vec3, v: Vec3, res: Quat): Quat;
110
+ /**
111
+ * Compute rotation between two vectors with around vector up
112
+ * for exactly opposite vectors. If vectors exactly in the same
113
+ * direction as returns identity Quat.
114
+ * @static
115
+ * @param {Vec3} source - First vector.
116
+ * @param {Vec3} dest - Second vector.
117
+ * @param {Vec3} up - Up vector.
118
+ * @returns {Quat} -
119
+ */
120
+ static getRotationBetweenVectorsUp(source: Vec3, dest: Vec3, up: Vec3): Quat;
121
+ /**
122
+ * Returns true if the components are zero.
123
+ * @public
124
+ * @returns {boolean} -
125
+ */
126
+ isZero(): boolean;
127
+ /**
128
+ * Clear Quat. Sets zeroes.
129
+ * @public
130
+ * @returns {Quat} -
131
+ */
132
+ clear(): Quat;
133
+ /**
134
+ * Sets Quat values.
135
+ * @public
136
+ * @param {Number} [x=0.0] The X component.
137
+ * @param {Number} [y=0.0] The Y component.
138
+ * @param {Number} [z=0.0] The Z component.
139
+ * @param {Number} [w=0.0] The W component.
140
+ * @returns {Quat} -
141
+ */
142
+ set(x: number, y: number, z: number, w: number): Quat;
143
+ /**
144
+ * Copy Quat values.
145
+ * @public
146
+ * @param {Quat} q - Copy Quat.
147
+ * @returns {Quat} -
148
+ */
149
+ copy(q: Quat): Quat;
150
+ /**
151
+ * Set current Quat instance to identity Quat.
152
+ * @public
153
+ * @returns {Quat} -
154
+ */
155
+ setIdentity(): Quat;
156
+ /**
157
+ * Duplicates a Quat instance.
158
+ * @public
159
+ * @returns {Quat} -
160
+ */
161
+ clone(): Quat;
162
+ /**
163
+ * Computes the componentwise sum of two Quats.
164
+ * @public
165
+ * @param {Quat} q - Quat to add.
166
+ * @returns {Quat} -
167
+ */
168
+ add(q: Quat): Quat;
169
+ /**
170
+ * Computes the componentwise difference of two Quats.
171
+ * @public
172
+ * @param {Quat} q - Quat to subtract.
173
+ * @returns {Quat} -
174
+ */
175
+ sub(q: Quat): Quat;
176
+ /**
177
+ * Multiplies the provided Quat componentwise by the provided scalar.
178
+ * @public
179
+ * @param {Number} scale - The scalar to multiply with.
180
+ * @returns {Quat} -
181
+ */
182
+ scaleTo(scale: number): Quat;
183
+ /**
184
+ * Multiplies the provided Quat componentwise.
185
+ * @public
186
+ * @param {Number} scale - The scalar to multiply with.
187
+ * @returns {Quat} -
188
+ */
189
+ scale(scale: number): Quat;
190
+ /**
191
+ * Converts Quat values to array.
192
+ * @public
193
+ * @returns {Array.<number>} - (exactly 4 entries)
194
+ */
195
+ toVec(): [number, number, number, number];
196
+ /**
197
+ * Sets current quaternion by spherical coordinates.
198
+ * @public
199
+ * @param {number} lat - Latitude.
200
+ * @param {number} lon - Longitude.
201
+ * @param {number} angle - Angle in radians.
202
+ * @returns {Quat} -
203
+ */
204
+ setFromSphericalCoords(lat: number, lon: number, angle: number): Quat;
205
+ /**
206
+ * Sets rotation with the given heading and up vectors.
207
+ * @static
208
+ * @param {Vec3} forward - Heading target coordinates.
209
+ * @param {Vec3} up - Up vector.
210
+ * @returns {Quat} -
211
+ */
212
+ setLookRotation(forward: Vec3, up: Vec3): Quat;
213
+ /**
214
+ * Gets spherical coordinates.
215
+ * @public
216
+ * @returns {Object} Returns object with latitude, longitude and alpha.
217
+ */
218
+ toSphericalCoords(): any;
219
+ /**
220
+ * Sets current Quat representing a rotation around an axis.
221
+ * @public
222
+ * @param {Vec3} axis - The axis of rotation.
223
+ * @param {number} angle The angle in radians to rotate around the axis.
224
+ * @returns {Quat} -
225
+ */
226
+ setFromAxisAngle(axis: Vec3, angle: number): Quat;
227
+ /**
228
+ * Returns axis and angle of the current Quat.
229
+ * @public
230
+ * @returns {Object} -
231
+ */
232
+ getAxisAngle(): any;
233
+ /**
234
+ * Sets current Quat by Euler's angles.
235
+ * @public
236
+ * @param {number} pitch - Pitch angle in degrees.
237
+ * @param {number} yaw - Yaw angle in degrees.
238
+ * @param {number} roll - Roll angle in degrees.
239
+ * @returns {Quat} -
240
+ */
241
+ setFromEulerAngles(pitch: number, yaw: number, roll: number): Quat;
242
+ /**
243
+ * Returns Euler's angles of the current Quat.
244
+ * @public
245
+ * @returns {Object} -
246
+ */
247
+ getEulerAngles(): any;
248
+ /**
249
+ * Computes a Quat from the provided 4x4 matrix instance.
250
+ * @public
251
+ * @param {Mat4} mx - The rotation matrix.
252
+ * @returns {Quat} -
253
+ */
254
+ setFromMatrix4(mx: Mat4): Quat;
255
+ /**
256
+ * Converts current Quat to the rotation 4x4 matrix.
257
+ * @public
258
+ * @params {Mat4} [out] - Output matrix
259
+ * @returns {Mat4} -
260
+ */
261
+ getMat4(out?: Mat4): Mat4;
262
+ /**
263
+ * Converts current Quat to the rotation 3x3 matrix.
264
+ * @public
265
+ * @returns {Mat3} -
266
+ * @todo NOT TESTED
267
+ */
268
+ getMat3(): Mat3;
269
+ /**
270
+ * Returns quaternion and vector production.
271
+ * @public
272
+ * @param {Vec3} v - 3d Vector.
273
+ * @returns {Vec3} -
274
+ */
275
+ mulVec3(v: Vec3): Vec3;
276
+ /**
277
+ * Computes the product of two Quats.
278
+ * @public
279
+ * @param {Quat} q - Quat to multiply.
280
+ * @returns {Quat} -
281
+ */
282
+ mul(q: Quat): Quat;
283
+ /**
284
+ * Computes the product of two Quats.
285
+ * @public
286
+ * @param {Quat} q - Quat to multiply.
287
+ * @returns {Quat} -
288
+ */
289
+ mulA(q: Quat): Quat;
290
+ /**
291
+ * Gets the conjugate of the Quat.
292
+ * @public
293
+ * @returns {Quat} -
294
+ */
295
+ conjugate(): Quat;
296
+ /**
297
+ * Computes the inverse of the Quat.
298
+ * @public
299
+ * @returns {Quat} -
300
+ */
301
+ inverse(): Quat;
302
+ /**
303
+ * Computes a magnitude of the Quat.
304
+ * @public
305
+ * @returns {number} -
306
+ */
307
+ magnitude(): number;
308
+ /**
309
+ * Computes a squared magnitude of the Quat.
310
+ * @public
311
+ * @returns {number} -
312
+ */
313
+ magnitude2(): number;
314
+ /**
315
+ * Computes the dot (scalar) product of two Quats.
316
+ * @public
317
+ * @param {Quat} q - Second quaternion.
318
+ * @returns {number} -
319
+ */
320
+ dot(q: Quat): number;
321
+ /**
322
+ * Current Quat normalization.
323
+ * @public
324
+ * @returns {Quat} -
325
+ */
326
+ normalize(): Quat;
327
+ /**
328
+ * Compares two Quats.
329
+ * @public
330
+ * @param {Quat} q - Second quaternion.
331
+ * @returns {Boolean} -
332
+ */
333
+ isEqual(q: Quat): boolean;
334
+ /**
335
+ * Performs a spherical linear interpolation between two Quats.
336
+ * @public
337
+ * @param {Quat} b - The end rotation Quat.
338
+ * @param {number} t - interpolation amount between the two Quats.
339
+ * @returns {Quat} -
340
+ */
341
+ slerp(b: Quat, t: number): Quat;
342
+ /**
343
+ * Returns a roll angle in radians.
344
+ * @public
345
+ * @param {Boolean} [reprojectAxis] -
346
+ * @returns {Number} -
347
+ */
348
+ getRoll(reprojectAxis?: boolean): number;
349
+ /**
350
+ * Returns a pitch angle in radians.
351
+ * @public
352
+ * @param {Boolean} [reprojectAxis] -
353
+ * @returns {number} -
354
+ */
355
+ getPitch(reprojectAxis?: boolean): number;
356
+ /**
357
+ * Returns a yaw angle in radians.
358
+ * @public
359
+ * @param {Boolean} [reprojectAxis] -
360
+ * @returns {number} -
361
+ */
362
+ getYaw(reprojectAxis?: boolean): number;
363
+ }
364
+ /**
365
+ * Creates Quat instance.
366
+ * @function
367
+ * @param {Number} [x=0.0] The X component.
368
+ * @param {Number} [y=0.0] The Y component.
369
+ * @param {Number} [z=0.0] The Z component.
370
+ * @param {Number} [w=0.0] The W component.
371
+ * @returns {Quat} -
372
+ */
373
+ export declare function quat(x?: number, y?: number, z?: number, w?: number): Quat;
@@ -0,0 +1,76 @@
1
+ import { Box } from "../bv/Box";
2
+ import { Sphere } from "../bv/Sphere";
3
+ import { Vec3 } from "./Vec3";
4
+ /**
5
+ * Represents a ray that extends infinitely from the provided origin in the provided direction.
6
+ * @class
7
+ * @param {Vec3} origin - The origin of the ray.
8
+ * @param {Vec3} direction - The direction of the ray.
9
+ */
10
+ export declare class Ray {
11
+ /**
12
+ * The origin of the ray.
13
+ * @public
14
+ * @type {Vec3}
15
+ */
16
+ origin: Vec3;
17
+ /**
18
+ * The direction of the ray.
19
+ * @public
20
+ * @type {Vec3}
21
+ */
22
+ direction: Vec3;
23
+ constructor(origin?: Vec3, direction?: Vec3);
24
+ /** @const */
25
+ static get OUTSIDE(): number;
26
+ /** @const */
27
+ static get INSIDE(): number;
28
+ /** @const */
29
+ static get INPLANE(): number;
30
+ /** @const */
31
+ static get AWAY(): number;
32
+ /**
33
+ * Sets a ray parameters.
34
+ * @public
35
+ * @param {Vec3} origin - The origin of the ray.
36
+ * @param {Vec3} direction - The direction of the ray.
37
+ * @returns {Ray}
38
+ */
39
+ set(origin: Vec3, direction: Vec3): Ray;
40
+ /**
41
+ * Computes the point along the ray on the distance.
42
+ * @public
43
+ * @param {number} distance - Point distance.
44
+ * @returns {Vec3}
45
+ */
46
+ getPoint(distance: number): Vec3;
47
+ /**
48
+ * Returns ray hit a triange result.
49
+ * @public
50
+ * @param {Vec3} v0 - First triangle corner coordinate.
51
+ * @param {Vec3} v1 - Second triangle corner coordinate.
52
+ * @param {Vec3} v2 - Third triangle corner coordinate.
53
+ * @param {Vec3} res - Hit point object pointer that stores hit result.
54
+ * @returns {number} - Hit code, could 0 - og.Ray.OUTSIDE, 1 - og.Ray.INSIDE,
55
+ * 2 - og.Ray.INPLANE and 3 - og.Ray.AWAY(ray goes away from triangle).
56
+ */
57
+ hitTriangle(v0: Vec3, v1: Vec3, v2: Vec3, res: Vec3): number;
58
+ /**
59
+ * Gets a ray hit a plane result. If the ray cross the plane returns 1 - og.Ray.INSIDE otherwise returns 0 - og.Ray.OUTSIDE.
60
+ * @public
61
+ * @param {Vec3} v0 - First plane point.
62
+ * @param {Vec3} v1 - Second plane point.
63
+ * @param {Vec3} v2 - Third plane point.
64
+ * @param {Vec3} res - Hit point object pointer that stores hit result.
65
+ * @returns {number}
66
+ */
67
+ hitPlane(v0: Vec3, v1: Vec3, v2: Vec3, res: Vec3): number;
68
+ /**
69
+ * Returns a ray hit sphere coordiante. If there isn't hit returns null.
70
+ * @public
71
+ * @param {Sphere} sphere - Sphere object.
72
+ * @returns {Vec3}
73
+ */
74
+ hitSphere(sphere: Sphere): Vec3 | null;
75
+ hitBox(box: Box): void;
76
+ }