@openglobus/og 0.18.0 → 0.18.1

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} +82 -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} +101 -373
  160. package/lib/js/entity/EntityCollection.d.ts +364 -0
  161. package/{src/entity/EntityCollection.ts → lib/js/entity/EntityCollection.js} +51 -353
  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} +62 -164
  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 +244 -0
  221. package/{src/layer/Vector.ts → lib/js/layer/Vector.js} +147 -418
  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 +311 -0
  283. package/{src/renderer/Renderer.ts → lib/js/renderer/Renderer.js} +169 -611
  284. package/lib/js/renderer/RendererEvents.d.ts +237 -0
  285. package/{src/renderer/RendererEvents.ts → lib/js/renderer/RendererEvents.js} +134 -471
  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} +251 -935
  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} +82 -239
  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} +45 -181
  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} +184 -341
  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
@@ -1,486 +0,0 @@
1
- import * as utils from "../utils/shared";
2
- import {Entity} from "./Entity";
3
- import {Extent} from "../Extent";
4
- import {GeometryHandler} from "./GeometryHandler";
5
- import {LonLat} from "../LonLat";
6
- import {NumberArray4, Vec4} from "../math/Vec4";
7
- import {NumberArray2} from "../math/Vec2";
8
- import {NumberArray3} from "../math/Vec3";
9
-
10
- const GeometryType: Record<string, number> = {
11
- POINT: 1,
12
- LINESTRING: 2,
13
- POLYGON: 3,
14
- MULTIPOLYGON: 4,
15
- MULTILINESTRING: 5
16
- };
17
-
18
- export type CoordinatesType = NumberArray2 | NumberArray3;
19
- // {
20
- // "type": "Point",
21
- // "coordinates": [100.0, 0.0]
22
- // }
23
- export type IPointCoordinates = CoordinatesType;
24
-
25
- // {
26
- // "type": "LineString",
27
- // "coordinates": [
28
- // [100.0, 0.0],
29
- // [101.0, 1.0]
30
- // ]
31
- // }
32
- export type ILineStringCoordinates = CoordinatesType[];
33
-
34
- // No holes
35
- // {
36
- // "type": "Polygon",
37
- // "coordinates": [
38
- // [
39
- // [100.0, 0.0],
40
- // [101.0, 0.0],
41
- // [101.0, 1.0],
42
- // [100.0, 1.0],
43
- // [100.0, 0.0]
44
- // ]
45
- // ]
46
- // }
47
- //
48
- // With holes:
49
- // {
50
- // "type": "Polygon",
51
- // "coordinates": [
52
- // [
53
- // [100.0, 0.0],
54
- // [101.0, 0.0],
55
- // [101.0, 1.0],
56
- // [100.0, 1.0],
57
- // [100.0, 0.0]
58
- // ],
59
- // [
60
- // [100.8, 0.8],
61
- // [100.8, 0.2],
62
- // [100.2, 0.2],
63
- // [100.2, 0.8],
64
- // [100.8, 0.8]
65
- // ]
66
- // ]
67
- // }
68
- export type IPolygonCoordinates = CoordinatesType[][];
69
-
70
- // {
71
- // "type": "MultiLineString",
72
- // "coordinates": [
73
- // [
74
- // [100.0, 0.0],
75
- // [101.0, 1.0]
76
- // ],
77
- // [
78
- // [102.0, 2.0],
79
- // [103.0, 3.0]
80
- // ]
81
- // ]
82
- // }
83
- export type IMultiLineStringCoordinates = ILineStringCoordinates[];
84
-
85
- // {
86
- // "type": "MultiPolygon",
87
- // "coordinates": [
88
- // [
89
- // [
90
- // [102.0, 2.0],
91
- // [103.0, 2.0],
92
- // [103.0, 3.0],
93
- // [102.0, 3.0],
94
- // [102.0, 2.0]
95
- // ]
96
- // ],
97
- // [
98
- // [
99
- // [100.0, 0.0],
100
- // [101.0, 0.0],
101
- // [101.0, 1.0],
102
- // [100.0, 1.0],
103
- // [100.0, 0.0]
104
- // ],
105
- // [
106
- // [100.2, 0.2],
107
- // [100.2, 0.8],
108
- // [100.8, 0.8],
109
- // [100.8, 0.2],
110
- // [100.2, 0.2]
111
- // ]
112
- // ]
113
- // ]
114
- // }
115
- export type IMultiPolygonCoordinates = IPolygonCoordinates[];
116
-
117
- export type IGeometryCoordinates =
118
- IPointCoordinates |
119
- IPolygonCoordinates |
120
- IMultiPolygonCoordinates |
121
- ILineStringCoordinates |
122
- IMultiLineStringCoordinates;
123
-
124
- interface IGeometry {
125
- type: string;
126
- coordinates: IGeometryCoordinates;
127
- }
128
-
129
- interface IGeometryStyle {
130
- fillColor?: string | NumberArray4 | Vec4;
131
- lineColor?: string | NumberArray4 | Vec4;
132
- strokeColor?: string | NumberArray4 | Vec4;
133
- lineWidth?: number;
134
- strokeWidth?: number;
135
- }
136
-
137
- interface IGeometryStyleInternal {
138
- fillColor: Vec4;
139
- lineColor: Vec4;
140
- strokeColor: Vec4;
141
- lineWidth: number;
142
- strokeWidth: number;
143
- }
144
-
145
- export interface IGeometryParams {
146
- type?: string;
147
- coordinates?: IGeometryCoordinates;
148
- style?: IGeometryStyle;
149
- visibility?: boolean;
150
- }
151
-
152
- class Geometry {
153
- static __counter__: number = 0;
154
-
155
- public __id: number;
156
-
157
- /**
158
- * Entity instance that holds this geometry.
159
- * @public
160
- * @type {Entity}
161
- */
162
- public _entity: Entity | null;
163
-
164
- public _handler: GeometryHandler | null;
165
- public _handlerIndex: number;
166
-
167
- // Polygon
168
- public _polyVerticesHighMerc: number[];
169
- public _polyVerticesLowMerc: number[];
170
- public _polyVerticesLength: number;
171
- public _polyIndexesLength: number;
172
- public _polyVerticesHandlerIndex: number;
173
- public _polyIndexesHandlerIndex: number;
174
-
175
- // Line(Linestring and polygon's stroke(s)
176
- public _lineVerticesHighMerc: number[];
177
- public _lineVerticesLowMerc: number[];
178
- public _lineVerticesLength: number;
179
- public _lineOrdersLength: number;
180
- public _lineIndexesLength: number;
181
- public _lineColorsLength: number;
182
- public _lineThicknessLength: number;
183
- public _lineVerticesHandlerIndex: number;
184
- public _lineOrdersHandlerIndex: number;
185
- public _lineIndexesHandlerIndex: number;
186
- public _lineThicknessHandlerIndex: number;
187
- public _lineColorsHandlerIndex: number;
188
- protected _type: number;
189
- public _coordinates: IGeometryCoordinates;
190
- protected _extent: Extent;
191
- public _style: IGeometryStyleInternal;
192
- protected _visibility: boolean;
193
- public _pickingReady: boolean;
194
-
195
- constructor(options: IGeometryParams = {}) {
196
-
197
- this.__id = Geometry.__counter__++;
198
-
199
- this._entity = null;
200
-
201
- this._handler = null;
202
- this._handlerIndex = -1;
203
-
204
- this._polyVerticesHighMerc = [];
205
- this._polyVerticesLowMerc = [];
206
- this._polyVerticesLength = -1;
207
- this._polyIndexesLength = -1;
208
- this._polyVerticesHandlerIndex = -1;
209
- this._polyIndexesHandlerIndex = -1;
210
-
211
- this._lineVerticesHighMerc = [];
212
- this._lineVerticesLowMerc = [];
213
- this._lineVerticesLength = -1;
214
- this._lineOrdersLength = -1;
215
- this._lineIndexesLength = -1;
216
- this._lineColorsLength = -1;
217
- this._lineThicknessLength = -1;
218
- this._lineVerticesHandlerIndex = -1;
219
- this._lineOrdersHandlerIndex = -1;
220
- this._lineIndexesHandlerIndex = -1;
221
- this._lineThicknessHandlerIndex = -1;
222
- this._lineColorsHandlerIndex = -1;
223
-
224
- this._type = (options.type && Geometry.getType(options.type)) || GeometryType.POINT;
225
- this._coordinates = [];
226
- this._extent = Geometry.getExtent({
227
- type: options.type || "Point",
228
- coordinates: options.coordinates || []
229
- },
230
- this._coordinates
231
- );
232
-
233
- options.style = options.style || {};
234
-
235
- this._style = {
236
- fillColor: utils.createColorRGBA(options.style.fillColor, new Vec4(0.19, 0.62, 0.85, 0.4)),
237
- lineColor: utils.createColorRGBA(options.style.lineColor, new Vec4(0.19, 0.62, 0.85, 1)),
238
- strokeColor: utils.createColorRGBA(options.style.strokeColor, new Vec4(1, 1, 1, 0.95)),
239
- lineWidth: options.style.lineWidth || 3,
240
- strokeWidth: options.style.strokeWidth || 0
241
- };
242
-
243
- this._visibility = options.visibility || true;
244
-
245
- // optimization flag for picking mask rendering pass
246
- this._pickingReady = false;
247
- }
248
-
249
- public get id(): number {
250
- return this.__id;
251
- }
252
-
253
- public get type(): number {
254
- return this._type;
255
- }
256
-
257
- static getType(typeStr: string): number {
258
- return GeometryType[typeStr.toUpperCase()];
259
- }
260
-
261
- /**
262
- * Returns geometry extent.
263
- @static
264
- @param {IGeometry} geometryObj - GeoJSON style geometry feature.
265
- @param {IGeometryCoordinates} outCoordinates - Geometry feature coordinates clone.
266
- @returns {Extent} -
267
- */
268
- static getExtent(geometryObj: IGeometry, outCoordinates: IGeometryCoordinates): Extent {
269
- let res = new Extent(new LonLat(180.0, 90.0), new LonLat(-180.0, -90.0));
270
- let t = Geometry.getType(geometryObj.type);
271
-
272
- if (t === GeometryType.POINT) {
273
- let lon: number = geometryObj.coordinates[0] as number,
274
- lat: number = geometryObj.coordinates[1] as number;
275
- res.southWest.lon = lon;
276
- res.southWest.lat = lat;
277
- res.northEast.lon = lon;
278
- res.northEast.lat = lat;
279
- outCoordinates && (outCoordinates[0] = lon) && (outCoordinates[1] = lat);
280
- } else if (t === GeometryType.LINESTRING) {
281
- let c: ILineStringCoordinates = geometryObj.coordinates as ILineStringCoordinates;
282
- for (let i = 0; i < c.length; i++) {
283
- let lon = c[i][0],
284
- lat = c[i][1];
285
- if (lon < res.southWest.lon) res.southWest.lon = lon;
286
- if (lat < res.southWest.lat) res.southWest.lat = lat;
287
- if (lon > res.northEast.lon) res.northEast.lon = lon;
288
- if (lat > res.northEast.lat) res.northEast.lat = lat;
289
- outCoordinates && ((outCoordinates as ILineStringCoordinates)[i] = [lon, lat]);
290
- }
291
- } else if (t === GeometryType.POLYGON) {
292
- let c: IPolygonCoordinates = geometryObj.coordinates as IPolygonCoordinates;
293
- for (let i = 0; i < c.length; i++) {
294
- let ci: CoordinatesType[] = c[i];
295
- outCoordinates && (outCoordinates[i] = []);
296
- for (let j = 0; j < ci.length; j++) {
297
- let cij = ci[j];
298
- let lon = cij[0],
299
- lat = cij[1];
300
- if (lon < res.southWest.lon) res.southWest.lon = lon;
301
- if (lat < res.southWest.lat) res.southWest.lat = lat;
302
- if (lon > res.northEast.lon) res.northEast.lon = lon;
303
- if (lat > res.northEast.lat) res.northEast.lat = lat;
304
- outCoordinates && ((outCoordinates as IPolygonCoordinates)[i][j] = [lon, lat]);
305
- }
306
- }
307
- } else if (t === GeometryType.MULTIPOLYGON) {
308
- let p = geometryObj.coordinates;
309
- for (let i = 0; i < p.length; i++) {
310
- let pi: IPolygonCoordinates = p[i] as IPolygonCoordinates;
311
- outCoordinates && (outCoordinates[i] = []);
312
- for (let j = 0; j < pi.length; j++) {
313
- let pij: CoordinatesType[] = pi[j];
314
- outCoordinates && ((outCoordinates as IMultiPolygonCoordinates)[i][j] = []);
315
- for (let k = 0; k < pij.length; k++) {
316
- let pijk = pij[k];
317
- let lon = pijk[0],
318
- lat = pijk[1];
319
- if (lon < res.southWest.lon) res.southWest.lon = lon;
320
- if (lat < res.southWest.lat) res.southWest.lat = lat;
321
- if (lon > res.northEast.lon) res.northEast.lon = lon;
322
- if (lat > res.northEast.lat) res.northEast.lat = lat;
323
- outCoordinates && ((outCoordinates as IMultiPolygonCoordinates)[i][j][k] = [lon, lat]);
324
- }
325
- }
326
- }
327
- } else if (t === GeometryType.MULTILINESTRING) {
328
- let c = geometryObj.coordinates;
329
- for (let i = 0; i < c.length; i++) {
330
- let ci: ILineStringCoordinates = c[i] as ILineStringCoordinates;
331
- outCoordinates && (outCoordinates[i] = []);
332
- for (let j = 0; j < ci.length; j++) {
333
- let cij = ci[j];
334
- let lon = cij[0],
335
- lat = cij[1];
336
- if (lon < res.southWest.lon) res.southWest.lon = lon;
337
- if (lat < res.southWest.lat) res.southWest.lat = lat;
338
- if (lon > res.northEast.lon) res.northEast.lon = lon;
339
- if (lat > res.northEast.lat) res.northEast.lat = lat;
340
- outCoordinates && ((outCoordinates as IMultiLineStringCoordinates)[i][j] = [lon, lat]);
341
- }
342
- }
343
- } else {
344
- res.southWest.lon = res.southWest.lat = res.northEast.lon = res.northEast.lat = 0.0;
345
- outCoordinates && (outCoordinates[0] = 0) && (outCoordinates[1] = 0);
346
- }
347
-
348
- return res;
349
- }
350
-
351
- /**
352
- * @todo ASAP need test for this method
353
- * @param geoJson
354
- * @returns {Geometry}
355
- */
356
- public setGeometry(geoJson: IGeometry): Geometry {
357
- let h = this._handler;
358
- if (h) {
359
- this.remove();
360
- this._type = Geometry.getType(geoJson.type || "Point");
361
- this._extent = Geometry.getExtent(geoJson, this._coordinates);
362
- h.add(this);
363
- }
364
- return this;
365
- }
366
-
367
- public setFillColor(r: number, g: number, b: number, a: number = 1.0): Geometry {
368
- let c = this._style.fillColor;
369
- if ((c.w === 0.0 && a !== 0.0) || (c.w !== 0.0 && a === 0.0)) {
370
- this._pickingReady = false;
371
- }
372
- c.x = r;
373
- c.y = g;
374
- c.z = b;
375
- c.w = a;
376
- this._handler && this._handler.setPolyColorArr(this, c);
377
- return this;
378
- }
379
-
380
- public overlaps(extent: Extent): boolean {
381
- return this._extent.overlaps(extent);
382
- }
383
-
384
- public setFillColor4v(rgba: Vec4): Geometry {
385
- return this.setFillColor(rgba.x, rgba.y, rgba.z, rgba.w);
386
- }
387
-
388
- public setStrokeColor(r: number, g: number, b: number, a: number = 1.0): Geometry {
389
- let c = this._style.strokeColor;
390
- if ((c.w === 0.0 && a !== 0.0) || (c.w !== 0.0 && a === 0.0)) {
391
- this._pickingReady = false;
392
- }
393
- c.x = r;
394
- c.y = g;
395
- c.z = b;
396
- c.w = a;
397
- this._handler && this._handler.setLineStrokeColorArr(this, c);
398
- return this;
399
- }
400
-
401
- public setLineColor(r: number, g: number, b: number, a: number = 1.0): Geometry {
402
- let c = this._style.lineColor;
403
- if ((c.w === 0.0 && a !== 0.0) || (c.w !== 0.0 && a === 0.0)) {
404
- this._pickingReady = false;
405
- }
406
- c.x = r;
407
- c.y = g;
408
- c.z = b;
409
- c.w = a;
410
- this._handler && this._handler.setLineColorArr(this, c);
411
- return this;
412
- }
413
-
414
- public setStrokeColor4v(rgba: Vec4): Geometry {
415
- return this.setStrokeColor(rgba.x, rgba.y, rgba.z, rgba.w);
416
- }
417
-
418
- public setLineColor4v(rgba: Vec4): Geometry {
419
- return this.setLineColor(rgba.x, rgba.y, rgba.z, rgba.w);
420
- }
421
-
422
- public setStrokeOpacity(opacity: number): Geometry {
423
- let c = this._style.strokeColor;
424
- c.w = opacity;
425
- return this.setStrokeColor(c.x, c.y, c.z, opacity);
426
- }
427
-
428
- public setLineOpacity(opacity: number): Geometry {
429
- let c = this._style.lineColor;
430
- c.w = opacity;
431
- return this.setLineColor(c.x, c.y, c.z, opacity);
432
- }
433
-
434
- public setStrokeWidth(width: number): Geometry {
435
- this._style.strokeWidth = width;
436
- this._pickingReady = false;
437
- this._handler && this._handler.setLineStrokeArr(this, width);
438
- return this;
439
- }
440
-
441
- public bringToFront(): Geometry {
442
- this._handler && this._handler.bringToFront(this);
443
- return this;
444
- }
445
-
446
- public setLineWidth(width: number): Geometry {
447
- this._style.lineWidth = width;
448
- this._pickingReady = false;
449
- this._handler && this._handler.setLineThicknessArr(this, width);
450
- return this;
451
- }
452
-
453
- public setFillOpacity(opacity: number): Geometry {
454
- let c = this._style.fillColor;
455
- if ((c.w === 0.0 && opacity !== 0.0) || (c.w !== 0.0 && opacity === 0.0)) {
456
- this._pickingReady = false;
457
- }
458
- c.w = opacity;
459
- this._handler && this._handler.setPolyColorArr(this, c);
460
- return this;
461
- }
462
-
463
- public setVisibility(visibility: boolean): Geometry {
464
- this._visibility = visibility;
465
- this._handler && this._handler.setGeometryVisibility(this);
466
- return this;
467
- }
468
-
469
- public getVisibility(): boolean {
470
- return this._visibility;
471
- }
472
-
473
- public remove() {
474
- this._handler && this._handler.remove(this);
475
- }
476
-
477
- public getExtent(): Extent {
478
- return this._extent.clone();
479
- }
480
-
481
- public getType(): number {
482
- return this._type;
483
- }
484
- }
485
-
486
- export {Geometry, GeometryType};
package/src/index.ts DELETED
@@ -1,173 +0,0 @@
1
- import * as jd from './astro/jd';
2
- import * as math from './math';
3
- import * as mercator from './mercator';
4
- import * as utils from './utils/shared';
5
- import * as bv from './bv/index';
6
- import * as control from './control/index';
7
- import * as scene from './scene/index';
8
- import * as terrain from './terrain/index';
9
- import * as layer from './layer/index';
10
- import * as webgl from './webgl/index';
11
-
12
- import {Globe} from './Globe';
13
-
14
- import {Geoid} from './terrain/Geoid';
15
-
16
- import {input} from './input/input';
17
-
18
- import {
19
- Ellipsoid,
20
- wgs84
21
- } from './ellipsoid/index';
22
-
23
- import {
24
- Camera,
25
- PlanetCamera
26
- } from './camera/index';
27
-
28
- import {
29
- Line2,
30
- Line3,
31
- Mat3,
32
- Mat4,
33
- Plane,
34
- Quat,
35
- Ray,
36
- Vec2,
37
- Vec3,
38
- Vec4
39
- } from './math/index';
40
-
41
- import {Renderer} from './renderer/Renderer';
42
- import {LightSource} from './light/LightSource';
43
- import {Clock} from './Clock';
44
- import {Events} from './Events';
45
- import {Extent} from './Extent';
46
- import {LonLat} from './LonLat';
47
- import {RenderNode} from './scene/RenderNode';
48
- import {Planet} from './scene/Planet';
49
- import {Popup} from './Popup';
50
-
51
- import {
52
- EarthQuadTreeStrategy,
53
- MarsQuadTreeStrategy,
54
- QuadTreeStrategy,
55
- quadTreeStrategyType,
56
- Wgs84QuadTreeStrategy
57
- } from './quadTree/index';
58
-
59
- import {Object3d} from './Object3d';
60
-
61
- import {
62
- Handler,
63
- Program,
64
- Framebuffer,
65
- Multisample
66
- } from './webgl/index';
67
-
68
- import {
69
- Control
70
- } from './control/Control';
71
-
72
- import {
73
- Entity,
74
- EntityCollection,
75
- Billboard,
76
- Geometry,
77
- Label,
78
- PointCloud,
79
- Polyline,
80
- GeoObject
81
- } from './entity/index';
82
-
83
- import {
84
- Layer,
85
- Vector,
86
- XYZ,
87
- CanvasTiles,
88
- WMS,
89
- GeoImage,
90
- GeoVideo,
91
- GeoTexture2d,
92
- KML,
93
- Material
94
- } from './layer/index';
95
-
96
- import {
97
- EmptyTerrain,
98
- GlobusTerrain,
99
- MapboxTerrain,
100
- BilTerrain
101
- } from './terrain/index';
102
-
103
- export {
104
- bv,
105
- jd,
106
- math,
107
- mercator,
108
- utils,
109
- input,
110
- control,
111
- scene,
112
- quadTreeStrategyType,
113
- wgs84,
114
- terrain,
115
- layer,
116
- webgl,
117
- Framebuffer,
118
- Material,
119
- KML,
120
- Layer,
121
- XYZ,
122
- Vector,
123
- CanvasTiles,
124
- WMS,
125
- GeoImage,
126
- GeoVideo,
127
- GeoTexture2d,
128
- EmptyTerrain,
129
- GlobusTerrain,
130
- MapboxTerrain,
131
- BilTerrain,
132
- Control,
133
- Camera,
134
- Ellipsoid,
135
- Planet,
136
- PlanetCamera,
137
- Globe,
138
- LightSource,
139
- Entity,
140
- EntityCollection,
141
- Billboard,
142
- Geometry,
143
- Label,
144
- PointCloud,
145
- Polyline,
146
- Program,
147
- GeoObject,
148
- Handler,
149
- Multisample,
150
- Renderer,
151
- Clock,
152
- Events,
153
- Extent,
154
- LonLat,
155
- RenderNode,
156
- Line2,
157
- Line3,
158
- Mat3,
159
- Mat4,
160
- Plane,
161
- Quat,
162
- Ray,
163
- Vec2,
164
- Vec3,
165
- Vec4,
166
- Geoid,
167
- Popup,
168
- QuadTreeStrategy,
169
- MarsQuadTreeStrategy,
170
- EarthQuadTreeStrategy,
171
- Wgs84QuadTreeStrategy,
172
- Object3d
173
- };
@@ -1,56 +0,0 @@
1
- import {BaseGeoImage, IBaseGeoImageParams} from './BaseGeoImage';
2
- import {Material} from "../layer/Material";
3
- import {nextHighestPowerOfTwo} from '../math';
4
- import {WebGLTextureExt} from "../webgl/Handler";
5
-
6
- interface IGeoTexture2dParams extends IBaseGeoImageParams {
7
- texture?: WebGLTextureExt;
8
- frameWidth?: number;
9
- frameHeight?: number;
10
- }
11
-
12
- class GeoTexture2d extends BaseGeoImage {
13
- constructor(name: string | null, options: IGeoTexture2dParams = {}) {
14
- super(name, options);
15
-
16
- this._sourceTexture = options.texture || null;
17
-
18
- if (options.texture) {
19
- this._sourceReady = true;
20
- this._sourceCreated = true;
21
- }
22
-
23
- this._frameWidth = options.frameWidth != undefined ? nextHighestPowerOfTwo(options.frameWidth!) : 256;
24
- this._frameHeight = options.frameHeight != undefined ? nextHighestPowerOfTwo(options.frameHeight!) : 256;
25
-
26
- this._animate = true;
27
- }
28
-
29
- public override get instanceName(): string {
30
- return "GeoTexture2d";
31
- }
32
-
33
- public override loadMaterial(material: Material) {
34
- this._planet!._geoImageCreator.add(this);
35
- }
36
-
37
- public bindTexture(texture: WebGLTextureExt) {
38
- this._sourceReady = true;
39
- this._sourceCreated = true;
40
- this._sourceTexture = texture;
41
- }
42
-
43
- public setSize(width: number, height: number) {
44
- this._frameWidth = width;
45
- this._frameHeight = height;
46
- this._frameCreated = false;
47
- }
48
-
49
- public override abortMaterialLoading(material: Material) {
50
- this._creationProceeding = false;
51
- material.isLoading = false;
52
- material.isReady = false;
53
- }
54
- }
55
-
56
- export {GeoTexture2d};