@openglobus/og 0.18.0 → 0.18.2

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 (476) hide show
  1. package/README.md +8 -8
  2. package/lib/@openglobus/og.esm.js +2 -0
  3. package/lib/@openglobus/og.esm.js.map +1 -0
  4. package/lib/@openglobus/og.umd.js +2 -0
  5. package/lib/@openglobus/og.umd.js.map +1 -0
  6. package/lib/js/Clock.d.ts +106 -0
  7. package/{src/Clock.ts → lib/js/Clock.js} +31 -126
  8. package/lib/js/Deferred.d.ts +6 -0
  9. package/lib/js/Deferred.js +13 -0
  10. package/lib/js/Events.d.ts +90 -0
  11. package/{src/Events.ts → lib/js/Events.js} +29 -84
  12. package/lib/js/Extent.d.ts +145 -0
  13. package/{src/Extent.ts → lib/js/Extent.js} +74 -120
  14. package/lib/js/Globe.d.ts +132 -0
  15. package/{src/Globe.ts → lib/js/Globe.js} +61 -159
  16. package/lib/js/ImageCanvas.d.ts +128 -0
  17. package/{src/ImageCanvas.ts → lib/js/ImageCanvas.js} +24 -65
  18. package/lib/js/Lock.d.ts +15 -0
  19. package/{src/Lock.ts → lib/js/Lock.js} +7 -21
  20. package/lib/js/LonLat.d.ts +128 -0
  21. package/{src/LonLat.ts → lib/js/LonLat.js} +44 -75
  22. package/lib/js/Object3d.d.ts +49 -0
  23. package/{src/Object3d.ts → lib/js/Object3d.js} +64 -184
  24. package/lib/js/Popup.d.ts +46 -0
  25. package/{src/Popup.ts → lib/js/Popup.js} +42 -110
  26. package/lib/js/QueueArray.d.ts +16 -0
  27. package/{src/QueueArray.ts → lib/js/QueueArray.js} +12 -25
  28. package/lib/js/Rectangle.d.ts +76 -0
  29. package/{src/Rectangle.ts → lib/js/Rectangle.js} +12 -50
  30. package/lib/js/Stack.d.ts +20 -0
  31. package/{src/Stack.ts → lib/js/Stack.js} +13 -29
  32. package/lib/js/astro/astro.d.ts +39 -0
  33. package/{src/astro/astro.ts → lib/js/astro/astro.js} +2 -8
  34. package/lib/js/astro/earth.d.ts +8 -0
  35. package/{src/astro/earth.ts → lib/js/astro/earth.js} +3 -39
  36. package/lib/js/astro/jd.d.ts +234 -0
  37. package/{src/astro/jd.ts → lib/js/astro/jd.js} +55 -134
  38. package/lib/js/astro/orbit.d.ts +5 -0
  39. package/{src/astro/orbit.ts → lib/js/astro/orbit.js} +26 -39
  40. package/lib/js/astro/rotation.d.ts +2 -0
  41. package/{src/astro/rotation.ts → lib/js/astro/rotation.js} +2 -11
  42. package/lib/js/bv/Box.d.ts +32 -0
  43. package/{src/bv/Box.ts → lib/js/bv/Box.js} +7 -35
  44. package/lib/js/bv/Sphere.d.ts +37 -0
  45. package/{src/bv/Sphere.ts → lib/js/bv/Sphere.js} +6 -34
  46. package/{src/bv/index.ts → lib/js/bv/index.d.ts} +0 -1
  47. package/lib/js/bv/index.js +3 -0
  48. package/lib/js/camera/Camera.d.ts +314 -0
  49. package/{src/camera/Camera.ts → lib/js/camera/Camera.js} +77 -326
  50. package/lib/js/camera/Frustum.d.ts +139 -0
  51. package/{src/camera/Frustum.ts → lib/js/camera/Frustum.js} +66 -185
  52. package/lib/js/camera/PlanetCamera.d.ts +234 -0
  53. package/{src/camera/PlanetCamera.ts → lib/js/camera/PlanetCamera.js} +65 -338
  54. package/{src/camera/index.ts → lib/js/camera/index.d.ts} +0 -1
  55. package/lib/js/camera/index.js +3 -0
  56. package/lib/js/cons.d.ts +40 -0
  57. package/{src/cons.ts → lib/js/cons.js} +10 -22
  58. package/lib/js/control/Atmosphere.d.ts +16 -0
  59. package/{src/control/Atmosphere.ts → lib/js/control/Atmosphere.js} +33 -86
  60. package/lib/js/control/CompassButton.d.ts +16 -0
  61. package/{src/control/CompassButton.ts → lib/js/control/CompassButton.js} +18 -43
  62. package/lib/js/control/Control.d.ts +100 -0
  63. package/{src/control/Control.ts → lib/js/control/Control.js} +22 -89
  64. package/lib/js/control/DebugInfo.d.ts +25 -0
  65. package/{src/control/DebugInfo.ts → lib/js/control/DebugInfo.js} +38 -84
  66. package/lib/js/control/DrawingSwitcher.d.ts +13 -0
  67. package/{src/control/DrawingSwitcher.ts → lib/js/control/DrawingSwitcher.js} +13 -30
  68. package/lib/js/control/EarthCoordinates.d.ts +41 -0
  69. package/{src/control/EarthCoordinates.ts → lib/js/control/EarthCoordinates.js} +58 -119
  70. package/lib/js/control/EarthNavigation.d.ts +50 -0
  71. package/{src/control/EarthNavigation.ts → lib/js/control/EarthNavigation.js} +70 -161
  72. package/lib/js/control/GeoImageDragControl.d.ts +22 -0
  73. package/{src/control/GeoImageDragControl.ts → lib/js/control/GeoImageDragControl.js} +26 -49
  74. package/lib/js/control/KeyboardNavigation.d.ts +28 -0
  75. package/{src/control/KeyboardNavigation.ts → lib/js/control/KeyboardNavigation.js} +67 -92
  76. package/lib/js/control/LayerAnimation.d.ts +71 -0
  77. package/{src/control/LayerAnimation.ts → lib/js/control/LayerAnimation.js} +82 -162
  78. package/lib/js/control/LayerSwitcher.d.ts +21 -0
  79. package/{src/control/LayerSwitcher.ts → lib/js/control/LayerSwitcher.js} +16 -41
  80. package/lib/js/control/Lighting.d.ts +49 -0
  81. package/{src/control/Lighting.ts → lib/js/control/Lighting.js} +106 -219
  82. package/lib/js/control/MouseNavigation.d.ts +62 -0
  83. package/{src/control/MouseNavigation.ts → lib/js/control/MouseNavigation.js} +105 -211
  84. package/lib/js/control/MouseWheelZoomControl.d.ts +44 -0
  85. package/lib/js/control/MouseWheelZoomControl.js +181 -0
  86. package/lib/js/control/RulerSwitcher.d.ts +17 -0
  87. package/{src/control/RulerSwitcher.ts → lib/js/control/RulerSwitcher.js} +13 -28
  88. package/lib/js/control/ScaleControl.d.ts +24 -0
  89. package/lib/js/control/ScaleControl.js +91 -0
  90. package/lib/js/control/SegmentBoundVisualization.d.ts +12 -0
  91. package/lib/js/control/SegmentBoundVisualization.js +37 -0
  92. package/lib/js/control/ShowFps.d.ts +9 -0
  93. package/lib/js/control/ShowFps.js +20 -0
  94. package/lib/js/control/SimpleNavigation.d.ts +25 -0
  95. package/{src/control/SimpleNavigation.ts → lib/js/control/SimpleNavigation.js} +29 -51
  96. package/lib/js/control/SimpleSkyBackground.d.ts +15 -0
  97. package/{src/control/SimpleSkyBackground.ts → lib/js/control/SimpleSkyBackground.js} +21 -48
  98. package/lib/js/control/Sun.d.ts +33 -0
  99. package/{src/control/Sun.ts → lib/js/control/Sun.js} +34 -85
  100. package/lib/js/control/ToggleWireframe.d.ts +14 -0
  101. package/lib/js/control/ToggleWireframe.js +28 -0
  102. package/lib/js/control/TouchNavigation.d.ts +52 -0
  103. package/{src/control/TouchNavigation.ts → lib/js/control/TouchNavigation.js} +88 -193
  104. package/lib/js/control/ZoomControl.d.ts +27 -0
  105. package/{src/control/ZoomControl.ts → lib/js/control/ZoomControl.js} +25 -50
  106. package/lib/js/control/drawing/DrawingControl.d.ts +12 -0
  107. package/{src/control/drawing/DrawingControl.ts → lib/js/control/drawing/DrawingControl.js} +10 -20
  108. package/lib/js/control/drawing/LineStringDrawingScene.d.ts +15 -0
  109. package/{src/control/drawing/LineStringDrawingScene.ts → lib/js/control/drawing/LineStringDrawingScene.js} +28 -85
  110. package/lib/js/control/drawing/PolygonDrawingScene.d.ts +98 -0
  111. package/{src/control/drawing/PolygonDrawingScene.ts → lib/js/control/drawing/PolygonDrawingScene.js} +190 -388
  112. package/lib/js/control/elevationProfile/ElevationProfile.d.ts +61 -0
  113. package/{src/control/elevationProfile/ElevationProfile.ts → lib/js/control/elevationProfile/ElevationProfile.js} +56 -148
  114. package/lib/js/control/heightRuler/HeightRuler.d.ts +7 -0
  115. package/{src/control/heightRuler/HeightRuler.ts → lib/js/control/heightRuler/HeightRuler.js} +4 -9
  116. package/lib/js/control/heightRuler/HeightRulerScene.d.ts +35 -0
  117. package/{src/control/heightRuler/HeightRulerScene.ts → lib/js/control/heightRuler/HeightRulerScene.js} +47 -99
  118. package/lib/js/control/heightRuler/HeightRulerSwitcher.d.ts +6 -0
  119. package/{src/control/heightRuler/HeightRulerSwitcher.ts → lib/js/control/heightRuler/HeightRulerSwitcher.js} +2 -4
  120. package/{src/control/index.ts → lib/js/control/index.d.ts} +1 -18
  121. package/lib/js/control/index.js +28 -0
  122. package/lib/js/control/ruler/Ruler.d.ts +13 -0
  123. package/lib/js/control/ruler/Ruler.js +23 -0
  124. package/lib/js/control/ruler/RulerScene.d.ts +88 -0
  125. package/lib/js/control/ruler/RulerScene.js +324 -0
  126. package/lib/js/control/selection/Selection.d.ts +55 -0
  127. package/{src/control/selection/Selection.ts → lib/js/control/selection/Selection.js} +15 -34
  128. package/lib/js/control/selection/SelectionScene.d.ts +44 -0
  129. package/{src/control/selection/SelectionScene.ts → lib/js/control/selection/SelectionScene.js} +26 -113
  130. package/lib/js/control/timeline/TimelineControl.d.ts +18 -0
  131. package/{src/control/timeline/TimelineControl.ts → lib/js/control/timeline/TimelineControl.js} +13 -43
  132. package/lib/js/control/timeline/TimelineModel.d.ts +41 -0
  133. package/{src/control/timeline/TimelineModel.ts → lib/js/control/timeline/TimelineModel.js} +26 -74
  134. package/lib/js/control/timeline/TimelineView.d.ts +85 -0
  135. package/{src/control/timeline/TimelineView.ts → lib/js/control/timeline/TimelineView.js} +133 -281
  136. package/lib/js/control/timeline/timelineUtils.d.ts +12 -0
  137. package/lib/js/control/timeline/timelineUtils.js +112 -0
  138. package/lib/js/control/visibleExtent/Segment.d.ts +277 -0
  139. package/{src → lib/js}/control/visibleExtent/Segment.js +145 -698
  140. package/lib/js/control/visibleExtent/VisibleExtent.d.ts +5 -0
  141. package/{src → lib/js}/control/visibleExtent/VisibleExtent.js +1 -18
  142. package/lib/js/control/visibleExtent/drawnode.d.ts +7 -0
  143. package/{src/control/visibleExtent/drawnode.ts → lib/js/control/visibleExtent/drawnode.js} +1 -28
  144. package/lib/js/ellipsoid/Ellipsoid.d.ts +187 -0
  145. package/{src/ellipsoid/Ellipsoid.ts → lib/js/ellipsoid/Ellipsoid.js} +85 -267
  146. package/lib/js/ellipsoid/index.d.ts +3 -0
  147. package/lib/js/ellipsoid/index.js +3 -0
  148. package/lib/js/ellipsoid/wgs84.d.ts +6 -0
  149. package/{src/ellipsoid/wgs84.ts → lib/js/ellipsoid/wgs84.js} +1 -2
  150. package/lib/js/entity/BaseBillboard.d.ts +222 -0
  151. package/{src/entity/BaseBillboard.ts → lib/js/entity/BaseBillboard.js} +48 -165
  152. package/lib/js/entity/BaseBillboardHandler.d.ts +81 -0
  153. package/{src/entity/BaseBillboardHandler.ts → lib/js/entity/BaseBillboardHandler.js} +139 -365
  154. package/lib/js/entity/Billboard.d.ts +113 -0
  155. package/{src/entity/Billboard.ts → lib/js/entity/Billboard.js} +19 -83
  156. package/lib/js/entity/BillboardHandler.d.ts +15 -0
  157. package/{src/entity/BillboardHandler.ts → lib/js/entity/BillboardHandler.js} +27 -59
  158. package/lib/js/entity/Entity.d.ts +354 -0
  159. package/{src/entity/Entity.ts → lib/js/entity/Entity.js} +102 -374
  160. package/lib/js/entity/EntityCollection.d.ts +363 -0
  161. package/{src/entity/EntityCollection.ts → lib/js/entity/EntityCollection.js} +57 -359
  162. package/lib/js/entity/GeoObject.d.ts +138 -0
  163. package/{src/entity/GeoObject.ts → lib/js/entity/GeoObject.js} +41 -146
  164. package/lib/js/entity/GeoObjectHandler.d.ts +99 -0
  165. package/{src/entity/GeoObjectHandler.ts → lib/js/entity/GeoObjectHandler.js} +162 -423
  166. package/lib/js/entity/Geometry.d.ts +111 -0
  167. package/lib/js/entity/Geometry.js +283 -0
  168. package/lib/js/entity/GeometryHandler.d.ts +84 -0
  169. package/{src/entity/GeometryHandler.ts → lib/js/entity/GeometryHandler.js} +162 -657
  170. package/lib/js/entity/Label.d.ts +207 -0
  171. package/{src/entity/Label.ts → lib/js/entity/Label.js} +63 -165
  172. package/lib/js/entity/LabelHandler.d.ts +65 -0
  173. package/{src/entity/LabelHandler.ts → lib/js/entity/LabelHandler.js} +175 -408
  174. package/lib/js/entity/LabelWorker.d.ts +15 -0
  175. package/{src/entity/LabelWorker.ts → lib/js/entity/LabelWorker.js} +24 -45
  176. package/lib/js/entity/PointCloud.d.ts +179 -0
  177. package/{src/entity/PointCloud.ts → lib/js/entity/PointCloud.js} +65 -265
  178. package/lib/js/entity/PointCloudHandler.d.ts +42 -0
  179. package/{src/entity/PointCloudHandler.ts → lib/js/entity/PointCloudHandler.js} +19 -62
  180. package/lib/js/entity/Polyline.d.ts +337 -0
  181. package/{src/entity/Polyline.ts → lib/js/entity/Polyline.js} +289 -924
  182. package/lib/js/entity/PolylineHandler.d.ts +22 -0
  183. package/{src/entity/PolylineHandler.ts → lib/js/entity/PolylineHandler.js} +12 -37
  184. package/lib/js/entity/Ray.d.ts +133 -0
  185. package/{src/entity/Ray.ts → lib/js/entity/Ray.js} +26 -146
  186. package/lib/js/entity/RayHandler.d.ts +70 -0
  187. package/{src/entity/RayHandler.ts → lib/js/entity/RayHandler.js} +102 -342
  188. package/lib/js/entity/Strip.d.ts +127 -0
  189. package/{src/entity/Strip.ts → lib/js/entity/Strip.js} +102 -372
  190. package/lib/js/entity/StripHandler.d.ts +42 -0
  191. package/{src/entity/StripHandler.ts → lib/js/entity/StripHandler.js} +22 -74
  192. package/{src/entity/index.ts → lib/js/entity/index.d.ts} +1 -2
  193. package/lib/js/entity/index.js +11 -0
  194. package/lib/js/index.d.ts +33 -0
  195. package/lib/js/index.js +33 -0
  196. package/lib/js/input/KeyboardHandler.d.ts +33 -0
  197. package/{src/input/KeyboardHandler.ts → lib/js/input/KeyboardHandler.js} +45 -84
  198. package/lib/js/input/MouseHandler.d.ts +16 -0
  199. package/{src/input/MouseHandler.ts → lib/js/input/MouseHandler.js} +12 -36
  200. package/lib/js/input/TouchHandler.d.ts +11 -0
  201. package/{src/input/TouchHandler.ts → lib/js/input/TouchHandler.js} +11 -23
  202. package/lib/js/input/input.d.ts +3 -0
  203. package/{src/input/input.ts → lib/js/input/input.js} +1 -1
  204. package/lib/js/layer/BaseGeoImage.d.ts +145 -0
  205. package/{src/layer/BaseGeoImage.ts → lib/js/layer/BaseGeoImage.js} +70 -235
  206. package/lib/js/layer/CanvasTiles.d.ts +103 -0
  207. package/{src/layer/CanvasTiles.ts → lib/js/layer/CanvasTiles.js} +54 -146
  208. package/lib/js/layer/GeoImage.d.ts +61 -0
  209. package/{src/layer/GeoImage.ts → lib/js/layer/GeoImage.js} +24 -54
  210. package/lib/js/layer/GeoTexture2d.d.ts +17 -0
  211. package/lib/js/layer/GeoTexture2d.js +37 -0
  212. package/lib/js/layer/GeoVideo.d.ts +68 -0
  213. package/{src/layer/GeoVideo.ts → lib/js/layer/GeoVideo.js} +31 -61
  214. package/lib/js/layer/KML.d.ts +72 -0
  215. package/{src/layer/KML.ts → lib/js/layer/KML.js} +94 -138
  216. package/lib/js/layer/Layer.d.ts +401 -0
  217. package/{src/layer/Layer.ts → lib/js/layer/Layer.js} +92 -443
  218. package/lib/js/layer/Material.d.ts +34 -0
  219. package/{src/layer/Material.ts → lib/js/layer/Material.js} +9 -43
  220. package/lib/js/layer/Vector.d.ts +243 -0
  221. package/{src/layer/Vector.ts → lib/js/layer/Vector.js} +155 -426
  222. package/lib/js/layer/WMS.d.ts +75 -0
  223. package/{src/layer/WMS.ts → lib/js/layer/WMS.js} +18 -100
  224. package/lib/js/layer/XYZ.d.ts +149 -0
  225. package/{src/layer/XYZ.ts → lib/js/layer/XYZ.js} +71 -171
  226. package/lib/js/layer/index.d.ts +11 -0
  227. package/lib/js/layer/index.js +11 -0
  228. package/lib/js/light/LightSource.d.ts +174 -0
  229. package/{src/light/LightSource.ts → lib/js/light/LightSource.js} +22 -131
  230. package/lib/js/math/Line2.d.ts +11 -0
  231. package/{src/math/Line2.ts → lib/js/math/Line2.js} +5 -15
  232. package/lib/js/math/Line3.d.ts +28 -0
  233. package/lib/js/math/Line3.js +85 -0
  234. package/lib/js/math/Mat3.d.ts +77 -0
  235. package/{src/math/Mat3.ts → lib/js/math/Mat3.js} +22 -51
  236. package/lib/js/math/Mat4.d.ts +195 -0
  237. package/{src/math/Mat4.ts → lib/js/math/Mat4.js} +53 -219
  238. package/lib/js/math/Plane.d.ts +20 -0
  239. package/{src/math/Plane.ts → lib/js/math/Plane.js} +26 -40
  240. package/lib/js/math/Quat.d.ts +373 -0
  241. package/{src/math/Quat.ts → lib/js/math/Quat.js} +106 -319
  242. package/lib/js/math/Ray.d.ts +76 -0
  243. package/{src/math/Ray.ts → lib/js/math/Ray.js} +21 -66
  244. package/lib/js/math/Vec2.d.ts +310 -0
  245. package/{src/math/Vec2.ts → lib/js/math/Vec2.js} +55 -121
  246. package/lib/js/math/Vec3.d.ts +472 -0
  247. package/{src/math/Vec3.ts → lib/js/math/Vec3.js} +103 -236
  248. package/lib/js/math/Vec4.d.ts +163 -0
  249. package/{src/math/Vec4.ts → lib/js/math/Vec4.js} +23 -79
  250. package/lib/js/math/coder.d.ts +51 -0
  251. package/{src/math/coder.ts → lib/js/math/coder.js} +14 -20
  252. package/lib/js/math/index.d.ts +11 -0
  253. package/lib/js/math/index.js +11 -0
  254. package/lib/js/math.d.ts +266 -0
  255. package/{src/math.ts → lib/js/math.js} +37 -85
  256. package/lib/js/mercator.d.ts +92 -0
  257. package/{src/mercator.ts → lib/js/mercator.js} +13 -37
  258. package/lib/js/proj/EPSG3857.d.ts +9 -0
  259. package/{src/proj/EPSG3857.ts → lib/js/proj/EPSG3857.js} +0 -2
  260. package/lib/js/proj/EPSG4326.d.ts +9 -0
  261. package/{src/proj/EPSG4326.ts → lib/js/proj/EPSG4326.js} +0 -2
  262. package/lib/js/proj/Proj.d.ts +43 -0
  263. package/{src/proj/Proj.ts → lib/js/proj/Proj.js} +4 -29
  264. package/lib/js/quadTree/EPSG4326QuadTreeStrategy.d.ts +6 -0
  265. package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +17 -0
  266. package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +6 -0
  267. package/lib/js/quadTree/EarthQuadTreeStrategy.js +19 -0
  268. package/lib/js/quadTree/EntityCollectionNode.d.ts +54 -0
  269. package/{src/quadTree/EntityCollectionNode.ts → lib/js/quadTree/EntityCollectionNode.js} +83 -150
  270. package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +6 -0
  271. package/lib/js/quadTree/MarsQuadTreeStrategy.js +17 -0
  272. package/lib/js/quadTree/Node.d.ts +61 -0
  273. package/{src/quadTree/Node.ts → lib/js/quadTree/Node.js} +140 -357
  274. package/lib/js/quadTree/QuadTreeStrategy.d.ts +25 -0
  275. package/{src/quadTree/QuadTreeStrategy.ts → lib/js/quadTree/QuadTreeStrategy.js} +13 -44
  276. package/lib/js/quadTree/Wgs84QuadTreeStrategy.d.ts +6 -0
  277. package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +15 -0
  278. package/lib/js/quadTree/index.d.ts +12 -0
  279. package/lib/js/quadTree/index.js +12 -0
  280. package/lib/js/quadTree/quadTree.d.ts +40 -0
  281. package/{src/quadTree/quadTree.ts → lib/js/quadTree/quadTree.js} +0 -9
  282. package/lib/js/renderer/Renderer.d.ts +320 -0
  283. package/{src/renderer/Renderer.ts → lib/js/renderer/Renderer.js} +265 -622
  284. package/lib/js/renderer/RendererEvents.d.ts +239 -0
  285. package/{src/renderer/RendererEvents.ts → lib/js/renderer/RendererEvents.js} +158 -472
  286. package/lib/js/scene/Axes.d.ts +12 -0
  287. package/lib/js/scene/Axes.js +59 -0
  288. package/lib/js/scene/BaseNode.d.ts +61 -0
  289. package/{src/scene/BaseNode.ts → lib/js/scene/BaseNode.js} +11 -57
  290. package/lib/js/scene/Planet.d.ts +623 -0
  291. package/{src/scene/Planet.ts → lib/js/scene/Planet.js} +257 -937
  292. package/lib/js/scene/RenderNode.d.ts +150 -0
  293. package/{src/scene/RenderNode.ts → lib/js/scene/RenderNode.js} +33 -138
  294. package/lib/js/scene/SkyBox.d.ts +13 -0
  295. package/{src/scene/SkyBox.ts → lib/js/scene/SkyBox.js} +16 -37
  296. package/{src/scene/index.ts → lib/js/scene/index.d.ts} +0 -1
  297. package/lib/js/scene/index.js +5 -0
  298. package/lib/js/segment/Segment.d.ts +278 -0
  299. package/{src/segment/Segment.ts → lib/js/segment/Segment.js} +242 -913
  300. package/lib/js/segment/SegmentLonLat.d.ts +48 -0
  301. package/{src/segment/SegmentLonLat.ts → lib/js/segment/SegmentLonLat.js} +58 -132
  302. package/lib/js/segment/SegmentLonLatWgs84.d.ts +10 -0
  303. package/lib/js/segment/SegmentLonLatWgs84.js +23 -0
  304. package/lib/js/segment/Slice.d.ts +13 -0
  305. package/{src/segment/Slice.ts → lib/js/segment/Slice.js} +4 -22
  306. package/lib/js/segment/segmentHelper.d.ts +18 -0
  307. package/{src/segment/segmentHelper.ts → lib/js/segment/segmentHelper.js} +30 -88
  308. package/lib/js/shaders/atmos.d.ts +4 -0
  309. package/{src/shaders/atmos.ts → lib/js/shaders/atmos.js} +8 -26
  310. package/lib/js/shaders/billboard.d.ts +3 -0
  311. package/{src/shaders/billboard.ts → lib/js/shaders/billboard.js} +9 -18
  312. package/lib/js/shaders/bloom.d.ts +2 -0
  313. package/{src/shaders/bloom.ts → lib/js/shaders/bloom.js} +5 -8
  314. package/lib/js/shaders/blur.d.ts +3 -0
  315. package/{src/shaders/blur.ts → lib/js/shaders/blur.js} +11 -19
  316. package/lib/js/shaders/depth.d.ts +2 -0
  317. package/{src/shaders/depth.ts → lib/js/shaders/depth.js} +3 -6
  318. package/lib/js/shaders/drawnode.d.ts +8 -0
  319. package/{src/shaders/drawnode.ts → lib/js/shaders/drawnode.js} +23 -75
  320. package/lib/js/shaders/geoObject.d.ts +3 -0
  321. package/{src/shaders/geoObject.ts → lib/js/shaders/geoObject.js} +51 -63
  322. package/lib/js/shaders/label.d.ts +4 -0
  323. package/{src/shaders/label.ts → lib/js/shaders/label.js} +12 -25
  324. package/lib/js/shaders/lumFilter.d.ts +2 -0
  325. package/{src/shaders/lumFilter.ts → lib/js/shaders/lumFilter.js} +4 -7
  326. package/lib/js/shaders/pickingMask.d.ts +2 -0
  327. package/{src/shaders/pickingMask.ts → lib/js/shaders/pickingMask.js} +5 -8
  328. package/lib/js/shaders/pointCloud.d.ts +2 -0
  329. package/{src/shaders/pointCloud.ts → lib/js/shaders/pointCloud.js} +4 -7
  330. package/lib/js/shaders/polyline.d.ts +3 -0
  331. package/{src/shaders/polyline.ts → lib/js/shaders/polyline.js} +7 -22
  332. package/lib/js/shaders/ray.d.ts +2 -0
  333. package/{src/shaders/ray.ts → lib/js/shaders/ray.js} +4 -7
  334. package/lib/js/shaders/screenFrame.d.ts +2 -0
  335. package/{src/shaders/screenFrame.ts → lib/js/shaders/screenFrame.js} +5 -8
  336. package/lib/js/shaders/skybox.d.ts +2 -0
  337. package/{src/shaders/skybox.ts → lib/js/shaders/skybox.js} +10 -13
  338. package/lib/js/shaders/toneMapping.d.ts +2 -0
  339. package/{src/shaders/toneMapping.ts → lib/js/shaders/toneMapping.js} +5 -8
  340. package/lib/js/shaders/utils.d.ts +1 -0
  341. package/{src/shaders/utils.ts → lib/js/shaders/utils.js} +1 -1
  342. package/lib/js/terrain/BilTerrain.d.ts +18 -0
  343. package/{src/terrain/BilTerrain.ts → lib/js/terrain/BilTerrain.js} +21 -118
  344. package/lib/js/terrain/EmptyTerrain.d.ts +106 -0
  345. package/{src/terrain/EmptyTerrain.ts → lib/js/terrain/EmptyTerrain.js} +20 -144
  346. package/lib/js/terrain/Geoid.d.ts +33 -0
  347. package/lib/js/terrain/Geoid.js +191 -0
  348. package/lib/js/terrain/GlobusTerrain.d.ts +134 -0
  349. package/{src/terrain/GlobusTerrain.ts → lib/js/terrain/GlobusTerrain.js} +84 -241
  350. package/lib/js/terrain/MapboxTerrain.d.ts +21 -0
  351. package/{src/terrain/MapboxTerrain.ts → lib/js/terrain/MapboxTerrain.js} +46 -215
  352. package/{src/terrain/index.ts → lib/js/terrain/index.d.ts} +0 -1
  353. package/lib/js/terrain/index.js +5 -0
  354. package/lib/js/ui/Button.d.ts +32 -0
  355. package/lib/js/ui/Button.js +78 -0
  356. package/lib/js/ui/ButtonGroup.d.ts +16 -0
  357. package/lib/js/ui/ButtonGroup.js +41 -0
  358. package/lib/js/ui/Dialog.d.ts +55 -0
  359. package/lib/js/ui/Dialog.js +173 -0
  360. package/lib/js/ui/Slider.d.ts +38 -0
  361. package/lib/js/ui/Slider.js +129 -0
  362. package/lib/js/ui/ToggleButton.d.ts +20 -0
  363. package/lib/js/ui/ToggleButton.js +42 -0
  364. package/lib/js/ui/View.d.ts +37 -0
  365. package/{src/ui/View.ts → lib/js/ui/View.js} +31 -77
  366. package/lib/js/ui/icons.d.ts +1 -0
  367. package/{src/ui/icons.ts → lib/js/ui/icons.js} +1 -1
  368. package/lib/js/utils/BaseWorker.d.ts +14 -0
  369. package/{src/utils/BaseWorker.ts → lib/js/utils/BaseWorker.js} +15 -28
  370. package/lib/js/utils/FontAtlas.d.ts +82 -0
  371. package/{src/utils/FontAtlas.ts → lib/js/utils/FontAtlas.js} +46 -182
  372. package/lib/js/utils/GeoImageCreator.d.ts +34 -0
  373. package/{src/utils/GeoImageCreator.ts → lib/js/utils/GeoImageCreator.js} +34 -91
  374. package/lib/js/utils/ImagesCacheManager.d.ts +22 -0
  375. package/{src/utils/ImagesCacheManager.ts → lib/js/utils/ImagesCacheManager.js} +16 -38
  376. package/lib/js/utils/Loader.d.ts +63 -0
  377. package/lib/js/utils/Loader.js +156 -0
  378. package/lib/js/utils/NormalMapCreator.d.ts +52 -0
  379. package/{src/utils/NormalMapCreator.ts → lib/js/utils/NormalMapCreator.js} +64 -195
  380. package/lib/js/utils/PlainSegmentWorker.d.ts +24 -0
  381. package/{src/utils/PlainSegmentWorker.ts → lib/js/utils/PlainSegmentWorker.js} +24 -56
  382. package/lib/js/utils/TerrainWorker.d.ts +28 -0
  383. package/{src/utils/TerrainWorker.ts → lib/js/utils/TerrainWorker.js} +19 -56
  384. package/lib/js/utils/TextureAtlas.d.ts +113 -0
  385. package/{src/utils/TextureAtlas.ts → lib/js/utils/TextureAtlas.js} +40 -131
  386. package/lib/js/utils/VectorTileCreator.d.ts +18 -0
  387. package/{src/utils/VectorTileCreator.ts → lib/js/utils/VectorTileCreator.js} +61 -147
  388. package/lib/js/utils/colorTable.d.ts +3 -0
  389. package/{src/utils/colorTable.ts → lib/js/utils/colorTable.js} +2 -2
  390. package/lib/js/utils/earcut.d.ts +7 -0
  391. package/{src/utils/earcut.ts → lib/js/utils/earcut.js} +95 -223
  392. package/lib/js/utils/objParser.d.ts +24 -0
  393. package/{src/utils/objParser.ts → lib/js/utils/objParser.js} +38 -93
  394. package/lib/js/utils/shared.d.ts +267 -0
  395. package/{src/utils/shared.ts → lib/js/utils/shared.js} +185 -342
  396. package/lib/js/utils/units.d.ts +16 -0
  397. package/lib/js/utils/units.js +61 -0
  398. package/lib/js/webgl/BaseFramebuffer.d.ts +53 -0
  399. package/{src/webgl/BaseFramebuffer.ts → lib/js/webgl/BaseFramebuffer.js} +22 -59
  400. package/lib/js/webgl/Framebuffer.d.ts +69 -0
  401. package/{src/webgl/Framebuffer.ts → lib/js/webgl/Framebuffer.js} +30 -87
  402. package/lib/js/webgl/Handler.d.ts +473 -0
  403. package/{src/webgl/Handler.ts → lib/js/webgl/Handler.js} +175 -586
  404. package/lib/js/webgl/Multisample.d.ts +27 -0
  405. package/lib/js/webgl/Multisample.js +77 -0
  406. package/lib/js/webgl/Program.d.ts +159 -0
  407. package/{src/webgl/Program.ts → lib/js/webgl/Program.js} +73 -210
  408. package/lib/js/webgl/ProgramController.d.ts +86 -0
  409. package/{src/webgl/ProgramController.ts → lib/js/webgl/ProgramController.js} +11 -45
  410. package/{src/webgl/index.ts → lib/js/webgl/index.d.ts} +1 -8
  411. package/lib/js/webgl/index.js +6 -0
  412. package/lib/js/webgl/types.d.ts +9 -0
  413. package/{src/webgl/types.ts → lib/js/webgl/types.js} +5 -8
  414. package/lib/js/webgl/variableHandlers.d.ts +22 -0
  415. package/lib/js/webgl/variableHandlers.js +78 -0
  416. package/package.json +23 -34
  417. package/dist/@openglobus/og.esm.js +0 -2
  418. package/dist/@openglobus/og.esm.js.map +0 -1
  419. package/dist/@openglobus/og.umd.js +0 -2
  420. package/dist/@openglobus/og.umd.js.map +0 -1
  421. package/src/Deferred.ts +0 -17
  422. package/src/control/MouseWheelZoomControl.ts +0 -269
  423. package/src/control/ScaleControl.ts +0 -131
  424. package/src/control/SegmentBoundVisualization.ts +0 -50
  425. package/src/control/ShowFps.ts +0 -28
  426. package/src/control/ToggleWireframe.ts +0 -35
  427. package/src/control/ruler/Ruler.ts +0 -35
  428. package/src/control/ruler/RulerScene.ts +0 -437
  429. package/src/control/timeline/timelineUtils.ts +0 -133
  430. package/src/ellipsoid/index.ts +0 -4
  431. package/src/entity/Geometry.ts +0 -486
  432. package/src/index.ts +0 -173
  433. package/src/layer/GeoTexture2d.ts +0 -56
  434. package/src/layer/index.ts +0 -12
  435. package/src/math/Line3.ts +0 -162
  436. package/src/math/index.ts +0 -26
  437. package/src/quadTree/EPSG4326QuadTreeStrategy.ts +0 -24
  438. package/src/quadTree/EarthQuadTreeStrategy.ts +0 -28
  439. package/src/quadTree/MarsQuadTreeStrategy.ts +0 -25
  440. package/src/quadTree/Wgs84QuadTreeStrategy.ts +0 -22
  441. package/src/quadTree/index.ts +0 -14
  442. package/src/scene/Axes.ts +0 -78
  443. package/src/segment/SegmentLonLatWgs84.ts +0 -33
  444. package/src/terrain/Geoid.ts +0 -273
  445. package/src/ui/Button.ts +0 -121
  446. package/src/ui/ButtonGroup.ts +0 -63
  447. package/src/ui/Dialog.ts +0 -244
  448. package/src/ui/Slider.ts +0 -188
  449. package/src/ui/ToggleButton.ts +0 -68
  450. package/src/utils/Loader.ts +0 -247
  451. package/src/utils/units.ts +0 -78
  452. package/src/webgl/Multisample.ts +0 -153
  453. package/src/webgl/variableHandlers.ts +0 -114
  454. /package/{dist → lib}/@openglobus/og.css +0 -0
  455. /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.json +0 -0
  456. /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.ttf.cfg +0 -0
  457. /package/{dist → lib}/@openglobus/res/fonts/Karla-Bold.ttf.png +0 -0
  458. /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.json +0 -0
  459. /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.ttf.cfg +0 -0
  460. /package/{dist → lib}/@openglobus/res/fonts/Karla-Light.ttf.png +0 -0
  461. /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.json +0 -0
  462. /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.ttf.cfg +0 -0
  463. /package/{dist → lib}/@openglobus/res/fonts/Karla-Medium.ttf.png +0 -0
  464. /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.json +0 -0
  465. /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.cfg +0 -0
  466. /package/{dist → lib}/@openglobus/res/fonts/NotoSansArabic-Regular.ttf.png +0 -0
  467. /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.json +0 -0
  468. /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.ttf.cfg +0 -0
  469. /package/{dist → lib}/@openglobus/res/fonts/Roboto-Regular.ttf.png +0 -0
  470. /package/{dist → lib}/@openglobus/res/fonts/arial.js +0 -0
  471. /package/{dist → lib}/@openglobus/res/fonts/arial.json +0 -0
  472. /package/{dist → lib}/@openglobus/res/fonts/arial.ttf.cfg +0 -0
  473. /package/{dist → lib}/@openglobus/res/fonts/arial.ttf.png +0 -0
  474. /package/{dist → lib}/@openglobus/res/night-4326.png +0 -0
  475. /package/{dist → lib}/@openglobus/res/night.png +0 -0
  476. /package/{dist → lib}/@openglobus/res/spec.png +0 -0
@@ -0,0 +1,3 @@
1
+ import { Ellipsoid } from './Ellipsoid';
2
+ import { wgs84 } from './wgs84';
3
+ export { Ellipsoid, wgs84 };
@@ -0,0 +1,3 @@
1
+ import { Ellipsoid } from './Ellipsoid';
2
+ import { wgs84 } from './wgs84';
3
+ export { Ellipsoid, wgs84 };
@@ -0,0 +1,6 @@
1
+ import { Ellipsoid } from "./Ellipsoid";
2
+ /**
3
+ * WGS84 ellipsoid object.
4
+ * @type {Ellipsoid}
5
+ */
6
+ export declare const wgs84: Ellipsoid;
@@ -1,5 +1,4 @@
1
- import {Ellipsoid} from "./Ellipsoid";
2
-
1
+ import { Ellipsoid } from "./Ellipsoid";
3
2
  /**
4
3
  * WGS84 ellipsoid object.
5
4
  * @type {Ellipsoid}
@@ -0,0 +1,222 @@
1
+ import { Entity } from "./Entity";
2
+ import { NumberArray2, Vec2 } from "../math/Vec2";
3
+ import { NumberArray3, Vec3 } from "../math/Vec3";
4
+ import { NumberArray4, Vec4 } from "../math/Vec4";
5
+ import { BaseBillboardHandler } from "./BaseBillboardHandler";
6
+ export interface IBaseBillboardParams {
7
+ position?: NumberArray3 | Vec3;
8
+ rotation?: number;
9
+ color?: string | NumberArray4 | Vec4;
10
+ alignedAxis?: NumberArray3 | Vec3;
11
+ offset?: NumberArray2 | NumberArray3 | Vec2 | Vec3;
12
+ visibility?: boolean;
13
+ }
14
+ /**
15
+ * Base prototype for billboard and label classes.
16
+ * @class
17
+ * @param {Object} [options] - Options:
18
+ * @param {Vec3|Array.<number>} [options.position] - Billboard position.
19
+ * @param {number} [options.rotation] - Screen angle rotation.
20
+ * @param {Vec4|string|Array.<number>} [options.color] - Billboard color.
21
+ * @param {Vec3|Array.<number>} [options.alignedAxis] - Billboard aligned vector.
22
+ * @param {Vec3|Array.<number>} [options.offset] - Billboard center screen offset.
23
+ * @param {boolean} [options.visibility] - Visibility.
24
+ */
25
+ declare class BaseBillboard {
26
+ static __counter__: number;
27
+ __id: number;
28
+ /**
29
+ * Billboard center cartesian position.
30
+ * @protected
31
+ * @type {Vec3}
32
+ */
33
+ protected _position: Vec3;
34
+ _positionHigh: Vec3;
35
+ _positionLow: Vec3;
36
+ /**
37
+ * Screen space rotation angle.
38
+ * @public
39
+ * @type {number}
40
+ */
41
+ _rotation: number;
42
+ /**
43
+ * RGBA color.
44
+ * @public
45
+ * @type {Vec4}
46
+ */
47
+ _color: Vec4;
48
+ /**
49
+ * Cartesian aligned axis vector.
50
+ * @protected
51
+ * @type {Vec3}
52
+ */
53
+ protected _alignedAxis: Vec3;
54
+ /**
55
+ * Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.
56
+ * @public
57
+ * @type {Vec3}
58
+ */
59
+ _offset: Vec3;
60
+ /**
61
+ * Billboard visibility.
62
+ * @protected
63
+ * @type {boolean}
64
+ */
65
+ protected _visibility: boolean;
66
+ /**
67
+ * Entity instance that holds this billboard.
68
+ * @public
69
+ * @type {Entity}
70
+ */
71
+ _entity: Entity | null;
72
+ /**
73
+ * Handler that stores and renders this billboard object.
74
+ * @public
75
+ * @type {BillboardHandler | null}
76
+ */
77
+ _handler: BaseBillboardHandler | null;
78
+ /**
79
+ * Billboard handler array index.
80
+ * @public
81
+ * @type {number}
82
+ */
83
+ _handlerIndex: number;
84
+ /**
85
+ * An indication that the object is ready to draw
86
+ * @public
87
+ * @type {number}
88
+ */
89
+ _isReady: boolean;
90
+ _lockId: number;
91
+ constructor(options?: IBaseBillboardParams);
92
+ /**
93
+ * Sets billboard position.
94
+ * @public
95
+ * @param {number} x - X coordinate.
96
+ * @param {number} y - Y coordinate.
97
+ * @param {number} z - Z coordinate.
98
+ */
99
+ setPosition(x: number, y: number, z: number): void;
100
+ /**
101
+ * Sets billboard position.
102
+ * @public
103
+ * @param {Vec3} position - Cartesian coordinates.
104
+ */
105
+ setPosition3v(position: Vec3): void;
106
+ /**
107
+ * Returns billboard position.
108
+ * @public
109
+ * @returns {Vec3}
110
+ */
111
+ getPosition(): Vec3;
112
+ /**
113
+ * Sets screen space offset.
114
+ * @public
115
+ * @param {number} x - X offset.
116
+ * @param {number} y - Y offset.
117
+ * @param {number} [z] - Z offset.
118
+ */
119
+ setOffset(x: number, y: number, z?: number): void;
120
+ /**
121
+ * Sets screen space offset.
122
+ * @public
123
+ * @param {Vec2} offset - Offset size.
124
+ */
125
+ setOffset3v(offset: Vec3): void;
126
+ /**
127
+ * Returns billboard screen space offset size.
128
+ * @public
129
+ * @returns {Vec3}
130
+ */
131
+ getOffset(): Vec3;
132
+ /**
133
+ * Sets billboard screen space rotation in radians.
134
+ * @public
135
+ * @param {number} rotation - Screen space rotation in radians.
136
+ */
137
+ setRotation(rotation: number): void;
138
+ /**
139
+ * Gets screen space rotation.
140
+ * @public
141
+ * @returns {number}
142
+ */
143
+ getRotation(): number;
144
+ /**
145
+ * Sets billboard opacity.
146
+ * @public
147
+ * @param {number} a - Billboard opacity.
148
+ */
149
+ setOpacity(a: number): void;
150
+ /**
151
+ * Sets RGBA color. Each channel from 0.0 to 1.0.
152
+ * @public
153
+ * @param {number} r - Red.
154
+ * @param {number} g - Green.
155
+ * @param {number} b - Blue.
156
+ * @param {number} a - Alpha.
157
+ */
158
+ setColor(r: number, g: number, b: number, a?: number): void;
159
+ /**
160
+ * Sets RGBA color. Each channel from 0.0 to 1.0.
161
+ * @public
162
+ * @param {Vec4} color - RGBA vector.
163
+ */
164
+ setColor4v(color: Vec4): void;
165
+ /**
166
+ * Sets billboard color.
167
+ * @public
168
+ * @param {string} color - HTML style color.
169
+ */
170
+ setColorHTML(color: string): void;
171
+ /**
172
+ * Returns RGBA color.
173
+ * @public
174
+ * @returns {Vec4}
175
+ */
176
+ getColor(): Vec4;
177
+ /**
178
+ * Sets billboard visibility.
179
+ * @public
180
+ * @param {boolean} visibility - Visibility flag.
181
+ */
182
+ setVisibility(visibility: boolean): void;
183
+ /**
184
+ * Returns billboard visibility.
185
+ * @public
186
+ * @returns {boolean}
187
+ */
188
+ getVisibility(): boolean;
189
+ /**
190
+ * Sets billboard cartesian aligned vector.
191
+ * @public
192
+ * @param {number} x - Aligned vector X coordinate.
193
+ * @param {number} y - Aligned vector Y coordinate.
194
+ * @param {number} z - Aligned vector Z coordinate.
195
+ */
196
+ setAlignedAxis(x: number, y: number, z: number): void;
197
+ /**
198
+ * Sets billboard aligned vector.
199
+ * @public
200
+ * @param {Vec3} alignedAxis - Align direction.
201
+ */
202
+ setAlignedAxis3v(alignedAxis: Vec3): void;
203
+ /**
204
+ * Returns aligned vector.
205
+ * @public
206
+ * @returns {Vec3}
207
+ */
208
+ getAlignedAxis(): Vec3;
209
+ /**
210
+ * Removes billboard from handler.
211
+ * @public
212
+ */
213
+ remove(): void;
214
+ /**
215
+ * Sets billboard picking color.
216
+ * @public
217
+ * @param {Vec3} color - Picking color.
218
+ */
219
+ setPickingColor3v(color: Vec3): void;
220
+ serializeWorkerData(workerId: number): Float32Array | null;
221
+ }
222
+ export { BaseBillboard };
@@ -1,20 +1,6 @@
1
1
  import * as utils from "../utils/shared";
2
- import {Entity} from "./Entity";
3
- import {LOCK_FREE, LOCK_UPDATE} from "./LabelWorker";
4
- import {NumberArray2, Vec2} from "../math/Vec2";
5
- import {NumberArray3, Vec3} from "../math/Vec3";
6
- import {NumberArray4, Vec4} from "../math/Vec4";
7
- import {BaseBillboardHandler} from "./BaseBillboardHandler";
8
-
9
- export interface IBaseBillboardParams {
10
- position?: NumberArray3 | Vec3;
11
- rotation?: number;
12
- color?: string | NumberArray4 | Vec4;
13
- alignedAxis?: NumberArray3 | Vec3;
14
- offset?: NumberArray2 | NumberArray3 | Vec2 | Vec3;
15
- visibility?: boolean;
16
- }
17
-
2
+ import { LOCK_FREE, LOCK_UPDATE } from "./LabelWorker";
3
+ import { Vec3 } from "../math/Vec3";
18
4
  /**
19
5
  * Base prototype for billboard and label classes.
20
6
  * @class
@@ -27,118 +13,23 @@ export interface IBaseBillboardParams {
27
13
  * @param {boolean} [options.visibility] - Visibility.
28
14
  */
29
15
  class BaseBillboard {
30
- static __counter__: number = 0;
31
- public __id: number;
32
-
33
- /**
34
- * Billboard center cartesian position.
35
- * @protected
36
- * @type {Vec3}
37
- */
38
- protected _position: Vec3;
39
-
40
- public _positionHigh: Vec3;
41
-
42
- public _positionLow: Vec3;
43
-
44
- /**
45
- * Screen space rotation angle.
46
- * @public
47
- * @type {number}
48
- */
49
- public _rotation: number;
50
-
51
- /**
52
- * RGBA color.
53
- * @public
54
- * @type {Vec4}
55
- */
56
- public _color: Vec4;
57
-
58
- /**
59
- * Cartesian aligned axis vector.
60
- * @protected
61
- * @type {Vec3}
62
- */
63
- protected _alignedAxis: Vec3;
64
-
65
- /**
66
- * Billboard center screen space offset. Where x,y - screen space offset and z - depth offset.
67
- * @public
68
- * @type {Vec3}
69
- */
70
- public _offset: Vec3;
71
-
72
- /**
73
- * Billboard visibility.
74
- * @protected
75
- * @type {boolean}
76
- */
77
- protected _visibility: boolean;
78
-
79
- /**
80
- * Entity instance that holds this billboard.
81
- * @public
82
- * @type {Entity}
83
- */
84
- public _entity: Entity | null;
85
-
86
- /**
87
- * Handler that stores and renders this billboard object.
88
- * @public
89
- * @type {BillboardHandler | null}
90
- */
91
- public _handler: BaseBillboardHandler | null;
92
-
93
- /**
94
- * Billboard handler array index.
95
- * @public
96
- * @type {number}
97
- */
98
- public _handlerIndex: number;
99
-
100
- /**
101
- * An indication that the object is ready to draw
102
- * @public
103
- * @type {number}
104
- */
105
- public _isReady: boolean;
106
-
107
- public _lockId: number;
108
-
109
- constructor(options: IBaseBillboardParams = {}) {
110
-
16
+ constructor(options = {}) {
111
17
  this.__id = BaseBillboard.__counter__++;
112
-
113
18
  this._position = utils.createVector3(options.position);
114
-
115
19
  this._positionHigh = new Vec3();
116
-
117
20
  this._positionLow = new Vec3();
118
-
119
21
  Vec3.doubleToTwoFloats(this._position, this._positionHigh, this._positionLow);
120
-
121
22
  this._rotation = options.rotation || 0;
122
-
123
23
  this._color = utils.createColorRGBA(options.color);
124
-
125
24
  this._alignedAxis = utils.createVector3(options.alignedAxis);
126
-
127
25
  this._offset = utils.createVector3(options.offset);
128
-
129
26
  this._visibility = options.visibility != undefined ? options.visibility : true;
130
-
131
27
  this._entity = null;
132
-
133
28
  this._handler = null;
134
-
135
29
  this._handlerIndex = -1;
136
-
137
30
  this._isReady = false;
138
-
139
31
  this._lockId = LOCK_FREE;
140
32
  }
141
-
142
33
  /**
143
34
  * Sets billboard position.
144
35
  * @public
@@ -146,44 +37,43 @@ class BaseBillboard {
146
37
  * @param {number} y - Y coordinate.
147
38
  * @param {number} z - Z coordinate.
148
39
  */
149
- public setPosition(x: number, y: number, z: number) {
40
+ setPosition(x, y, z) {
150
41
  this._position.x = x;
151
42
  this._position.y = y;
152
43
  this._position.z = z;
153
44
  Vec3.doubleToTwoFloats(this._position, this._positionHigh, this._positionLow);
154
45
  if (this._isReady && this._handler) {
155
46
  this._handler.setPositionArr(this._handlerIndex, this._positionHigh, this._positionLow);
156
- } else if (this._lockId !== LOCK_FREE) {
47
+ }
48
+ else if (this._lockId !== LOCK_FREE) {
157
49
  this._lockId = LOCK_UPDATE;
158
50
  }
159
51
  }
160
-
161
52
  /**
162
53
  * Sets billboard position.
163
54
  * @public
164
55
  * @param {Vec3} position - Cartesian coordinates.
165
56
  */
166
- public setPosition3v(position: Vec3) {
57
+ setPosition3v(position) {
167
58
  this._position.x = position.x;
168
59
  this._position.y = position.y;
169
60
  this._position.z = position.z;
170
61
  Vec3.doubleToTwoFloats(position, this._positionHigh, this._positionLow);
171
62
  if (this._isReady && this._handler) {
172
63
  this._handler.setPositionArr(this._handlerIndex, this._positionHigh, this._positionLow);
173
- } else if (this._lockId !== LOCK_FREE) {
64
+ }
65
+ else if (this._lockId !== LOCK_FREE) {
174
66
  this._lockId = LOCK_UPDATE;
175
67
  }
176
68
  }
177
-
178
69
  /**
179
70
  * Returns billboard position.
180
71
  * @public
181
72
  * @returns {Vec3}
182
73
  */
183
- public getPosition(): Vec3 {
74
+ getPosition() {
184
75
  return this._position;
185
76
  }
186
-
187
77
  /**
188
78
  * Sets screen space offset.
189
79
  * @public
@@ -191,76 +81,73 @@ class BaseBillboard {
191
81
  * @param {number} y - Y offset.
192
82
  * @param {number} [z] - Z offset.
193
83
  */
194
- public setOffset(x: number, y: number, z?: number) {
84
+ setOffset(x, y, z) {
195
85
  this._offset.x = x;
196
86
  this._offset.y = y;
197
87
  z != undefined && (this._offset.z = z);
198
88
  if (this._isReady && this._handler) {
199
89
  this._handler.setOffsetArr(this._handlerIndex, this._offset);
200
- } else if (this._lockId !== LOCK_FREE) {
90
+ }
91
+ else if (this._lockId !== LOCK_FREE) {
201
92
  this._lockId = LOCK_UPDATE;
202
93
  }
203
94
  }
204
-
205
95
  /**
206
96
  * Sets screen space offset.
207
97
  * @public
208
98
  * @param {Vec2} offset - Offset size.
209
99
  */
210
- public setOffset3v(offset: Vec3) {
100
+ setOffset3v(offset) {
211
101
  this.setOffset(offset.x, offset.y, offset.z);
212
102
  }
213
-
214
103
  /**
215
104
  * Returns billboard screen space offset size.
216
105
  * @public
217
106
  * @returns {Vec3}
218
107
  */
219
- public getOffset(): Vec3 {
108
+ getOffset() {
220
109
  return this._offset;
221
110
  }
222
-
223
111
  /**
224
112
  * Sets billboard screen space rotation in radians.
225
113
  * @public
226
114
  * @param {number} rotation - Screen space rotation in radians.
227
115
  */
228
- public setRotation(rotation: number) {
116
+ setRotation(rotation) {
229
117
  if (rotation !== this._rotation) {
230
118
  this._rotation = rotation;
231
119
  if (this._isReady && this._handler) {
232
120
  this._handler.setRotationArr(this._handlerIndex, rotation);
233
- } else if (this._lockId !== LOCK_FREE) {
121
+ }
122
+ else if (this._lockId !== LOCK_FREE) {
234
123
  this._lockId = LOCK_UPDATE;
235
124
  }
236
125
  }
237
126
  }
238
-
239
127
  /**
240
128
  * Gets screen space rotation.
241
129
  * @public
242
130
  * @returns {number}
243
131
  */
244
- public getRotation(): number {
132
+ getRotation() {
245
133
  return this._rotation;
246
134
  }
247
-
248
135
  /**
249
136
  * Sets billboard opacity.
250
137
  * @public
251
138
  * @param {number} a - Billboard opacity.
252
139
  */
253
- public setOpacity(a: number) {
140
+ setOpacity(a) {
254
141
  if (a !== this._color.w) {
255
142
  a != undefined && (this._color.w = a);
256
143
  if (this._isReady && this._handler) {
257
144
  this._handler.setRgbaArr(this._handlerIndex, this._color);
258
- } else if (this._lockId !== LOCK_FREE) {
145
+ }
146
+ else if (this._lockId !== LOCK_FREE) {
259
147
  this._lockId = LOCK_UPDATE;
260
148
  }
261
149
  }
262
150
  }
263
-
264
151
  /**
265
152
  * Sets RGBA color. Each channel from 0.0 to 1.0.
266
153
  * @public
@@ -269,7 +156,7 @@ class BaseBillboard {
269
156
  * @param {number} b - Blue.
270
157
  * @param {number} a - Alpha.
271
158
  */
272
- public setColor(r: number, g: number, b: number, a?: number) {
159
+ setColor(r, g, b, a) {
273
160
  if (a !== this._color.w || r !== this._color.x || g !== this._color.y || this._color.z !== b) {
274
161
  this._color.x = r;
275
162
  this._color.y = g;
@@ -277,64 +164,60 @@ class BaseBillboard {
277
164
  a != undefined && (this._color.w = a);
278
165
  if (this._isReady && this._handler) {
279
166
  this._handler.setRgbaArr(this._handlerIndex, this._color);
280
- } else if (this._lockId !== LOCK_FREE) {
167
+ }
168
+ else if (this._lockId !== LOCK_FREE) {
281
169
  this._lockId = LOCK_UPDATE;
282
170
  }
283
171
  }
284
172
  }
285
-
286
173
  /**
287
174
  * Sets RGBA color. Each channel from 0.0 to 1.0.
288
175
  * @public
289
176
  * @param {Vec4} color - RGBA vector.
290
177
  */
291
- public setColor4v(color: Vec4) {
178
+ setColor4v(color) {
292
179
  this.setColor(color.x, color.y, color.z, color.w);
293
180
  }
294
-
295
181
  /**
296
182
  * Sets billboard color.
297
183
  * @public
298
184
  * @param {string} color - HTML style color.
299
185
  */
300
- public setColorHTML(color: string) {
186
+ setColorHTML(color) {
301
187
  this.setColor4v(utils.htmlColorToRgba(color));
302
188
  }
303
-
304
189
  /**
305
190
  * Returns RGBA color.
306
191
  * @public
307
192
  * @returns {Vec4}
308
193
  */
309
- public getColor(): Vec4 {
194
+ getColor() {
310
195
  return this._color;
311
196
  }
312
-
313
197
  /**
314
198
  * Sets billboard visibility.
315
199
  * @public
316
200
  * @param {boolean} visibility - Visibility flag.
317
201
  */
318
- public setVisibility(visibility: boolean) {
202
+ setVisibility(visibility) {
319
203
  if (visibility !== this._visibility) {
320
204
  this._visibility = visibility;
321
205
  if (this._isReady && this._handler) {
322
206
  this._handler.setVisibility(this._handlerIndex, visibility);
323
- } else if (this._lockId !== LOCK_FREE) {
207
+ }
208
+ else if (this._lockId !== LOCK_FREE) {
324
209
  this._lockId = LOCK_UPDATE;
325
210
  }
326
211
  }
327
212
  }
328
-
329
213
  /**
330
214
  * Returns billboard visibility.
331
215
  * @public
332
216
  * @returns {boolean}
333
217
  */
334
- public getVisibility(): boolean {
218
+ getVisibility() {
335
219
  return this._visibility;
336
220
  }
337
-
338
221
  /**
339
222
  * Sets billboard cartesian aligned vector.
340
223
  * @public
@@ -342,60 +225,60 @@ class BaseBillboard {
342
225
  * @param {number} y - Aligned vector Y coordinate.
343
226
  * @param {number} z - Aligned vector Z coordinate.
344
227
  */
345
- public setAlignedAxis(x: number, y: number, z: number) {
228
+ setAlignedAxis(x, y, z) {
346
229
  this._alignedAxis.x = x;
347
230
  this._alignedAxis.y = y;
348
231
  this._alignedAxis.z = z;
349
232
  if (this._isReady && this._handler) {
350
233
  this._handler.setAlignedAxisArr(this._handlerIndex, this._alignedAxis);
351
- } else if (this._lockId !== LOCK_FREE) {
234
+ }
235
+ else if (this._lockId !== LOCK_FREE) {
352
236
  this._lockId = LOCK_UPDATE;
353
237
  }
354
238
  }
355
-
356
239
  /**
357
240
  * Sets billboard aligned vector.
358
241
  * @public
359
242
  * @param {Vec3} alignedAxis - Align direction.
360
243
  */
361
- public setAlignedAxis3v(alignedAxis: Vec3) {
244
+ setAlignedAxis3v(alignedAxis) {
362
245
  this.setAlignedAxis(alignedAxis.x, alignedAxis.y, alignedAxis.z);
363
246
  }
364
-
365
247
  /**
366
248
  * Returns aligned vector.
367
249
  * @public
368
250
  * @returns {Vec3}
369
251
  */
370
- public getAlignedAxis(): Vec3 {
252
+ getAlignedAxis() {
371
253
  return this._alignedAxis;
372
254
  }
373
-
374
255
  /**
375
256
  * Removes billboard from handler.
376
257
  * @public
377
258
  */
378
- public remove() {
259
+ remove() {
379
260
  this._entity = null;
380
261
  this._handler && this._handler.remove(this);
381
262
  }
382
-
383
263
  /**
384
264
  * Sets billboard picking color.
385
265
  * @public
386
266
  * @param {Vec3} color - Picking color.
387
267
  */
388
- public setPickingColor3v(color: Vec3) {
268
+ setPickingColor3v(color) {
389
269
  if (this._isReady && this._handler) {
390
270
  this._handler.setPickingColorArr(this._handlerIndex, color);
391
- } else if (this._lockId !== LOCK_FREE) {
271
+ }
272
+ else if (this._lockId !== LOCK_FREE) {
392
273
  this._lockId = LOCK_UPDATE;
393
274
  }
394
275
  }
395
-
396
- public serializeWorkerData(workerId: number): Float32Array{
397
- return new Float32Array([]);
276
+ serializeWorkerData(workerId) {
277
+ if (this._handler) {
278
+ return new Float32Array([]);
279
+ }
280
+ return null;
398
281
  }
399
282
  }
400
-
401
- export {BaseBillboard};
283
+ BaseBillboard.__counter__ = 0;
284
+ export { BaseBillboard };