@openglobus/og 0.19.4 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +3 -3
  2. package/css/og.css +18 -4
  3. package/lib/@openglobus/js/Clock.d.ts +106 -0
  4. package/lib/@openglobus/js/Deferred.d.ts +6 -0
  5. package/lib/@openglobus/js/Events.d.ts +90 -0
  6. package/lib/@openglobus/js/Extent.d.ts +145 -0
  7. package/lib/@openglobus/js/Globe.d.ts +134 -0
  8. package/lib/@openglobus/js/ImageCanvas.d.ts +128 -0
  9. package/lib/@openglobus/js/Lock.d.ts +15 -0
  10. package/lib/@openglobus/js/LonLat.d.ts +128 -0
  11. package/lib/@openglobus/js/Object3d.d.ts +64 -0
  12. package/lib/@openglobus/js/Popup.d.ts +46 -0
  13. package/lib/@openglobus/js/QueueArray.d.ts +16 -0
  14. package/lib/@openglobus/js/Rectangle.d.ts +76 -0
  15. package/lib/@openglobus/js/Stack.d.ts +20 -0
  16. package/lib/@openglobus/js/astro/astro.d.ts +39 -0
  17. package/lib/@openglobus/js/astro/earth.d.ts +8 -0
  18. package/lib/@openglobus/js/astro/jd.d.ts +234 -0
  19. package/lib/@openglobus/js/astro/orbit.d.ts +5 -0
  20. package/lib/@openglobus/js/astro/rotation.d.ts +2 -0
  21. package/lib/@openglobus/js/bv/Box.d.ts +32 -0
  22. package/lib/@openglobus/js/bv/Sphere.d.ts +37 -0
  23. package/lib/@openglobus/js/bv/index.d.ts +3 -0
  24. package/lib/@openglobus/js/camera/Camera.d.ts +314 -0
  25. package/lib/@openglobus/js/camera/Frustum.d.ts +139 -0
  26. package/lib/@openglobus/js/camera/PlanetCamera.d.ts +234 -0
  27. package/lib/@openglobus/js/camera/index.d.ts +3 -0
  28. package/lib/@openglobus/js/cons.d.ts +40 -0
  29. package/lib/@openglobus/js/control/Atmosphere.d.ts +16 -0
  30. package/lib/@openglobus/js/control/CompassButton.d.ts +16 -0
  31. package/lib/@openglobus/js/control/Control.d.ts +100 -0
  32. package/lib/@openglobus/js/control/DebugInfo.d.ts +25 -0
  33. package/lib/@openglobus/js/control/DrawingSwitcher.d.ts +13 -0
  34. package/lib/@openglobus/js/control/EarthCoordinates.d.ts +41 -0
  35. package/lib/@openglobus/js/control/EarthNavigation.d.ts +50 -0
  36. package/lib/@openglobus/js/control/GeoImageDragControl.d.ts +22 -0
  37. package/lib/@openglobus/js/control/KeyboardNavigation.d.ts +28 -0
  38. package/lib/@openglobus/js/control/LayerAnimation.d.ts +71 -0
  39. package/lib/@openglobus/js/control/LayerSwitcher.d.ts +36 -0
  40. package/lib/@openglobus/js/control/Lighting.d.ts +53 -0
  41. package/lib/@openglobus/js/control/MouseNavigation.d.ts +64 -0
  42. package/lib/@openglobus/js/control/MouseWheelZoomControl.d.ts +44 -0
  43. package/lib/@openglobus/js/control/RulerSwitcher.d.ts +17 -0
  44. package/lib/@openglobus/js/control/ScaleControl.d.ts +24 -0
  45. package/lib/@openglobus/js/control/SegmentBoundVisualization.d.ts +12 -0
  46. package/lib/@openglobus/js/control/ShowFps.d.ts +9 -0
  47. package/lib/@openglobus/js/control/SimpleNavigation.d.ts +25 -0
  48. package/lib/@openglobus/js/control/SimpleSkyBackground.d.ts +17 -0
  49. package/lib/@openglobus/js/control/Sun.d.ts +33 -0
  50. package/lib/@openglobus/js/control/ToggleWireframe.d.ts +14 -0
  51. package/lib/@openglobus/js/control/TouchNavigation.d.ts +52 -0
  52. package/lib/@openglobus/js/control/ZoomControl.d.ts +27 -0
  53. package/lib/@openglobus/js/control/drawing/DrawingControl.d.ts +12 -0
  54. package/lib/@openglobus/js/control/drawing/LineStringDrawingScene.d.ts +15 -0
  55. package/lib/@openglobus/js/control/drawing/PolygonDrawingScene.d.ts +98 -0
  56. package/lib/@openglobus/js/control/elevationProfile/ElevationProfile.d.ts +77 -0
  57. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileButtonsView.d.ts +14 -0
  58. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileControl.d.ts +33 -0
  59. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileLegend.d.ts +20 -0
  60. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileScene.d.ts +80 -0
  61. package/lib/@openglobus/js/control/elevationProfile/ElevationProfileView.d.ts +63 -0
  62. package/lib/@openglobus/js/control/elevationProfile/PointListDialog.d.ts +12 -0
  63. package/lib/@openglobus/js/control/heightRuler/HeightRuler.d.ts +7 -0
  64. package/lib/@openglobus/js/control/heightRuler/HeightRulerScene.d.ts +35 -0
  65. package/lib/@openglobus/js/control/heightRuler/HeightRulerSwitcher.d.ts +6 -0
  66. package/lib/@openglobus/js/control/index.d.ts +29 -0
  67. package/lib/@openglobus/js/control/ruler/Ruler.d.ts +13 -0
  68. package/lib/@openglobus/js/control/ruler/RulerScene.d.ts +88 -0
  69. package/lib/@openglobus/js/control/selection/Selection.d.ts +55 -0
  70. package/lib/@openglobus/js/control/selection/SelectionScene.d.ts +44 -0
  71. package/lib/@openglobus/js/control/timeline/TimelineControl.d.ts +18 -0
  72. package/lib/@openglobus/js/control/timeline/TimelineModel.d.ts +41 -0
  73. package/lib/@openglobus/js/control/timeline/TimelineView.d.ts +85 -0
  74. package/lib/@openglobus/js/control/timeline/timelineUtils.d.ts +12 -0
  75. package/lib/@openglobus/js/control/visibleExtent/drawnode.d.ts +7 -0
  76. package/lib/@openglobus/js/ellipsoid/Ellipsoid.d.ts +193 -0
  77. package/lib/@openglobus/js/ellipsoid/index.d.ts +3 -0
  78. package/lib/@openglobus/js/ellipsoid/wgs84.d.ts +6 -0
  79. package/lib/@openglobus/js/entity/BaseBillboard.d.ts +222 -0
  80. package/lib/@openglobus/js/entity/BaseBillboardHandler.d.ts +81 -0
  81. package/lib/@openglobus/js/entity/Billboard.d.ts +113 -0
  82. package/lib/@openglobus/js/entity/BillboardHandler.d.ts +15 -0
  83. package/lib/@openglobus/js/entity/Entity.d.ts +354 -0
  84. package/lib/@openglobus/js/entity/EntityCollection.d.ts +363 -0
  85. package/lib/@openglobus/js/entity/GeoObject.d.ts +152 -0
  86. package/lib/@openglobus/js/entity/GeoObjectHandler.d.ts +104 -0
  87. package/lib/@openglobus/js/entity/Geometry.d.ts +124 -0
  88. package/lib/@openglobus/js/entity/GeometryHandler.d.ts +84 -0
  89. package/lib/@openglobus/js/entity/Label.d.ts +214 -0
  90. package/lib/@openglobus/js/entity/LabelHandler.d.ts +65 -0
  91. package/lib/@openglobus/js/entity/LabelWorker.d.ts +15 -0
  92. package/lib/@openglobus/js/entity/PointCloud.d.ts +179 -0
  93. package/lib/@openglobus/js/entity/PointCloudHandler.d.ts +42 -0
  94. package/lib/@openglobus/js/entity/Polyline.d.ts +345 -0
  95. package/lib/@openglobus/js/entity/PolylineHandler.d.ts +22 -0
  96. package/lib/@openglobus/js/entity/Ray.d.ts +133 -0
  97. package/lib/@openglobus/js/entity/RayHandler.d.ts +70 -0
  98. package/lib/@openglobus/js/entity/Strip.d.ts +139 -0
  99. package/lib/@openglobus/js/entity/StripHandler.d.ts +42 -0
  100. package/lib/@openglobus/js/entity/index.d.ts +10 -0
  101. package/lib/@openglobus/js/index.d.ts +33 -0
  102. package/lib/@openglobus/js/input/KeyboardHandler.d.ts +33 -0
  103. package/lib/@openglobus/js/input/MouseHandler.d.ts +16 -0
  104. package/lib/@openglobus/js/input/TouchHandler.d.ts +11 -0
  105. package/lib/@openglobus/js/input/input.d.ts +3 -0
  106. package/lib/@openglobus/js/layer/BaseGeoImage.d.ts +145 -0
  107. package/lib/@openglobus/js/layer/Bing.d.ts +4 -0
  108. package/lib/@openglobus/js/layer/CanvasTiles.d.ts +103 -0
  109. package/lib/@openglobus/js/layer/GeoImage.d.ts +61 -0
  110. package/lib/@openglobus/js/layer/GeoTexture2d.d.ts +17 -0
  111. package/lib/@openglobus/js/layer/GeoVideo.d.ts +68 -0
  112. package/lib/@openglobus/js/layer/KML.d.ts +72 -0
  113. package/lib/@openglobus/js/layer/Layer.d.ts +415 -0
  114. package/lib/@openglobus/js/layer/Material.d.ts +34 -0
  115. package/lib/@openglobus/js/layer/OpenStreetMap.d.ts +4 -0
  116. package/lib/@openglobus/js/layer/Vector.d.ts +246 -0
  117. package/lib/@openglobus/js/layer/WMS.d.ts +75 -0
  118. package/lib/@openglobus/js/layer/XYZ.d.ts +148 -0
  119. package/lib/@openglobus/js/layer/index.d.ts +12 -0
  120. package/lib/@openglobus/js/light/LightSource.d.ts +174 -0
  121. package/lib/@openglobus/js/math/Line2.d.ts +11 -0
  122. package/lib/@openglobus/js/math/Line3.d.ts +28 -0
  123. package/lib/@openglobus/js/math/Mat3.d.ts +77 -0
  124. package/lib/@openglobus/js/math/Mat4.d.ts +195 -0
  125. package/lib/@openglobus/js/math/Plane.d.ts +20 -0
  126. package/lib/@openglobus/js/math/Quat.d.ts +373 -0
  127. package/lib/@openglobus/js/math/Ray.d.ts +76 -0
  128. package/lib/@openglobus/js/math/Vec2.d.ts +310 -0
  129. package/lib/@openglobus/js/math/Vec3.d.ts +472 -0
  130. package/lib/@openglobus/js/math/Vec4.d.ts +163 -0
  131. package/lib/@openglobus/js/math/coder.d.ts +51 -0
  132. package/lib/@openglobus/js/math/index.d.ts +11 -0
  133. package/lib/@openglobus/js/math.d.ts +266 -0
  134. package/lib/@openglobus/js/mercator.d.ts +92 -0
  135. package/lib/@openglobus/js/proj/EPSG3857.d.ts +9 -0
  136. package/lib/@openglobus/js/proj/EPSG4326.d.ts +9 -0
  137. package/lib/@openglobus/js/proj/Proj.d.ts +43 -0
  138. package/lib/@openglobus/js/quadTree/EPSG4326QuadTreeStrategy.d.ts +6 -0
  139. package/lib/@openglobus/js/quadTree/EarthQuadTreeStrategy.d.ts +9 -0
  140. package/lib/@openglobus/js/quadTree/EntityCollectionNode.d.ts +54 -0
  141. package/lib/@openglobus/js/quadTree/MarsQuadTreeStrategy.d.ts +11 -0
  142. package/lib/@openglobus/js/quadTree/Node.d.ts +80 -0
  143. package/lib/@openglobus/js/quadTree/QuadTreeStrategy.d.ts +28 -0
  144. package/lib/@openglobus/js/quadTree/Wgs84QuadTreeStrategy.d.ts +6 -0
  145. package/lib/@openglobus/js/quadTree/index.d.ts +12 -0
  146. package/lib/@openglobus/js/quadTree/quadTree.d.ts +40 -0
  147. package/lib/@openglobus/js/renderer/Renderer.d.ts +319 -0
  148. package/lib/@openglobus/js/renderer/RendererEvents.d.ts +240 -0
  149. package/lib/@openglobus/js/scene/Axes.d.ts +12 -0
  150. package/lib/@openglobus/js/scene/BaseNode.d.ts +61 -0
  151. package/lib/@openglobus/js/scene/Planet.d.ts +652 -0
  152. package/lib/@openglobus/js/scene/RenderNode.d.ts +150 -0
  153. package/lib/@openglobus/js/scene/SkyBox.d.ts +13 -0
  154. package/lib/@openglobus/js/scene/index.d.ts +5 -0
  155. package/lib/@openglobus/js/segment/Segment.d.ts +288 -0
  156. package/lib/@openglobus/js/segment/SegmentLonLat.d.ts +44 -0
  157. package/lib/@openglobus/js/segment/SegmentLonLatWgs84.d.ts +10 -0
  158. package/lib/@openglobus/js/segment/Slice.d.ts +13 -0
  159. package/lib/@openglobus/js/segment/segmentHelper.d.ts +18 -0
  160. package/lib/@openglobus/js/shaders/atmos.d.ts +4 -0
  161. package/lib/@openglobus/js/shaders/billboard.d.ts +3 -0
  162. package/lib/@openglobus/js/shaders/bloom.d.ts +2 -0
  163. package/lib/@openglobus/js/shaders/blur.d.ts +3 -0
  164. package/lib/@openglobus/js/shaders/depth.d.ts +2 -0
  165. package/lib/@openglobus/js/shaders/drawnode.d.ts +8 -0
  166. package/lib/@openglobus/js/shaders/geoObject.d.ts +3 -0
  167. package/lib/@openglobus/js/shaders/label.d.ts +4 -0
  168. package/lib/@openglobus/js/shaders/lumFilter.d.ts +2 -0
  169. package/lib/@openglobus/js/shaders/pointCloud.d.ts +2 -0
  170. package/lib/@openglobus/js/shaders/polyline.d.ts +3 -0
  171. package/lib/@openglobus/js/shaders/ray.d.ts +2 -0
  172. package/lib/@openglobus/js/shaders/screenFrame.d.ts +2 -0
  173. package/lib/@openglobus/js/shaders/skybox.d.ts +2 -0
  174. package/lib/@openglobus/js/shaders/toneMapping.d.ts +2 -0
  175. package/lib/@openglobus/js/shaders/utils.d.ts +1 -0
  176. package/lib/@openglobus/js/terrain/BilTerrain.d.ts +18 -0
  177. package/lib/@openglobus/js/terrain/EmptyTerrain.d.ts +113 -0
  178. package/lib/@openglobus/js/terrain/Geoid.d.ts +33 -0
  179. package/lib/@openglobus/js/terrain/GlobusRgbTerrain.d.ts +6 -0
  180. package/lib/@openglobus/js/terrain/GlobusTerrain.d.ts +137 -0
  181. package/lib/{js/terrain/MapboxTerrain.d.ts → @openglobus/js/terrain/RgbTerrain.d.ts} +5 -5
  182. package/lib/@openglobus/js/terrain/index.d.ts +6 -0
  183. package/lib/@openglobus/js/ui/Button.d.ts +32 -0
  184. package/lib/@openglobus/js/ui/ButtonGroup.d.ts +16 -0
  185. package/lib/@openglobus/js/ui/Color.d.ts +22 -0
  186. package/lib/@openglobus/js/ui/Dialog.d.ts +55 -0
  187. package/lib/@openglobus/js/ui/Slider.d.ts +38 -0
  188. package/lib/@openglobus/js/ui/ToggleButton.d.ts +20 -0
  189. package/lib/@openglobus/js/ui/View.d.ts +37 -0
  190. package/lib/@openglobus/js/ui/icons.d.ts +1 -0
  191. package/lib/@openglobus/js/utils/BaseWorker.d.ts +14 -0
  192. package/lib/@openglobus/js/utils/FontAtlas.d.ts +82 -0
  193. package/lib/@openglobus/js/utils/GeoImageCreator.d.ts +34 -0
  194. package/lib/@openglobus/js/utils/ImagesCacheManager.d.ts +22 -0
  195. package/lib/@openglobus/js/utils/Loader.d.ts +63 -0
  196. package/lib/@openglobus/js/utils/NormalMapCreator.d.ts +52 -0
  197. package/lib/@openglobus/js/utils/PlainSegmentWorker.d.ts +24 -0
  198. package/lib/@openglobus/js/utils/TerrainWorker.d.ts +28 -0
  199. package/lib/@openglobus/js/utils/TextureAtlas.d.ts +113 -0
  200. package/lib/@openglobus/js/utils/VectorTileCreator.d.ts +18 -0
  201. package/lib/@openglobus/js/utils/colorTable.d.ts +3 -0
  202. package/lib/@openglobus/js/utils/earcut.d.ts +7 -0
  203. package/lib/@openglobus/js/utils/objParser.d.ts +24 -0
  204. package/lib/@openglobus/js/utils/shared.d.ts +263 -0
  205. package/lib/@openglobus/js/utils/units.d.ts +16 -0
  206. package/lib/@openglobus/js/webgl/BaseFramebuffer.d.ts +53 -0
  207. package/lib/@openglobus/js/webgl/Framebuffer.d.ts +69 -0
  208. package/lib/@openglobus/js/webgl/Handler.d.ts +473 -0
  209. package/lib/@openglobus/js/webgl/Multisample.d.ts +27 -0
  210. package/lib/@openglobus/js/webgl/Program.d.ts +159 -0
  211. package/lib/@openglobus/js/webgl/ProgramController.d.ts +86 -0
  212. package/lib/@openglobus/js/webgl/index.d.ts +6 -0
  213. package/lib/@openglobus/js/webgl/types.d.ts +9 -0
  214. package/lib/@openglobus/js/webgl/variableHandlers.d.ts +22 -0
  215. package/lib/@openglobus/og.css +1 -1
  216. package/lib/@openglobus/og.esm.js +1 -1
  217. package/lib/@openglobus/og.esm.js.map +1 -1
  218. package/lib/@openglobus/og.umd.js +1 -1
  219. package/lib/@openglobus/og.umd.js.map +1 -1
  220. package/lib/js/Extent.js +2 -2
  221. package/lib/js/Globe.d.ts +1 -1
  222. package/lib/js/Object3d.d.ts +8 -1
  223. package/lib/js/Object3d.js +12 -2
  224. package/lib/js/camera/Frustum.d.ts +1 -1
  225. package/lib/js/camera/Frustum.js +3 -2
  226. package/lib/js/control/DebugInfo.js +19 -18
  227. package/lib/js/control/Lighting.d.ts +4 -0
  228. package/lib/js/control/Lighting.js +51 -12
  229. package/lib/js/control/SimpleSkyBackground.d.ts +2 -0
  230. package/lib/js/control/SimpleSkyBackground.js +13 -3
  231. package/lib/js/control/drawing/PolygonDrawingScene.js +2 -2
  232. package/lib/js/control/visibleExtent/drawnode.js +1 -1
  233. package/lib/js/entity/GeoObject.d.ts +12 -3
  234. package/lib/js/entity/GeoObject.js +34 -2
  235. package/lib/js/entity/GeoObjectHandler.d.ts +5 -0
  236. package/lib/js/entity/GeoObjectHandler.js +47 -0
  237. package/lib/js/entity/Geometry.d.ts +24 -11
  238. package/lib/js/entity/Geometry.js +17 -9
  239. package/lib/js/entity/GeometryHandler.js +5 -5
  240. package/lib/js/entity/Label.d.ts +7 -0
  241. package/lib/js/entity/Label.js +11 -0
  242. package/lib/js/entity/Polyline.d.ts +15 -7
  243. package/lib/js/entity/Polyline.js +54 -6
  244. package/lib/js/entity/Strip.d.ts +12 -0
  245. package/lib/js/entity/Strip.js +16 -0
  246. package/lib/js/entity/StripHandler.js +1 -1
  247. package/lib/js/entity/index.d.ts +10 -11
  248. package/lib/js/entity/index.js +10 -11
  249. package/lib/js/index.d.ts +5 -5
  250. package/lib/js/index.js +5 -5
  251. package/lib/js/layer/Bing.d.ts +4 -0
  252. package/lib/js/layer/Bing.js +40 -0
  253. package/lib/js/layer/GeoImage.d.ts +1 -1
  254. package/lib/js/layer/GeoVideo.d.ts +1 -1
  255. package/lib/js/layer/Layer.d.ts +1 -1
  256. package/lib/js/layer/Layer.js +2 -2
  257. package/lib/js/layer/OpenStreetMap.d.ts +4 -0
  258. package/lib/js/layer/OpenStreetMap.js +19 -0
  259. package/lib/js/layer/Vector.d.ts +3 -0
  260. package/lib/js/layer/Vector.js +3 -3
  261. package/lib/js/layer/index.d.ts +12 -11
  262. package/lib/js/layer/index.js +12 -11
  263. package/lib/js/math/Mat4.js +18 -17
  264. package/lib/js/mercator.js +2 -1
  265. package/lib/js/quadTree/EPSG4326QuadTreeStrategy.js +4 -5
  266. package/lib/js/quadTree/EarthQuadTreeStrategy.d.ts +3 -0
  267. package/lib/js/quadTree/EarthQuadTreeStrategy.js +40 -5
  268. package/lib/js/quadTree/EntityCollectionNode.d.ts +2 -2
  269. package/lib/js/quadTree/EntityCollectionNode.js +13 -14
  270. package/lib/js/quadTree/MarsQuadTreeStrategy.d.ts +5 -0
  271. package/lib/js/quadTree/MarsQuadTreeStrategy.js +31 -5
  272. package/lib/js/quadTree/Node.d.ts +2 -1
  273. package/lib/js/quadTree/Node.js +38 -28
  274. package/lib/js/quadTree/QuadTreeStrategy.d.ts +3 -0
  275. package/lib/js/quadTree/QuadTreeStrategy.js +17 -0
  276. package/lib/js/quadTree/Wgs84QuadTreeStrategy.js +3 -3
  277. package/lib/js/renderer/Renderer.js +1 -0
  278. package/lib/js/scene/Planet.js +6 -4
  279. package/lib/js/segment/Segment.d.ts +12 -9
  280. package/lib/js/segment/Segment.js +47 -24
  281. package/lib/js/segment/SegmentLonLat.d.ts +1 -5
  282. package/lib/js/segment/SegmentLonLat.js +8 -100
  283. package/lib/js/segment/SegmentLonLatWgs84.js +5 -3
  284. package/lib/js/shaders/billboard.js +4 -4
  285. package/lib/js/shaders/drawnode.js +16 -19
  286. package/lib/js/shaders/geoObject.js +4 -5
  287. package/lib/js/shaders/ray.js +7 -3
  288. package/lib/js/terrain/BilTerrain.d.ts +1 -1
  289. package/lib/js/terrain/BilTerrain.js +7 -6
  290. package/lib/js/terrain/EmptyTerrain.d.ts +7 -0
  291. package/lib/js/terrain/EmptyTerrain.js +7 -0
  292. package/lib/js/terrain/GlobusRgbTerrain.d.ts +6 -0
  293. package/lib/js/terrain/GlobusRgbTerrain.js +25 -0
  294. package/lib/js/terrain/GlobusTerrain.d.ts +5 -5
  295. package/lib/js/terrain/GlobusTerrain.js +35 -30
  296. package/lib/js/terrain/RgbTerrain.d.ts +22 -0
  297. package/lib/js/terrain/RgbTerrain.js +415 -0
  298. package/lib/js/terrain/index.d.ts +3 -2
  299. package/lib/js/terrain/index.js +3 -2
  300. package/lib/js/ui/Color.d.ts +22 -0
  301. package/lib/js/ui/Color.js +58 -0
  302. package/lib/js/utils/GeoImageCreator.js +1 -1
  303. package/lib/js/utils/NormalMapCreator.js +1 -1
  304. package/lib/js/utils/VectorTileCreator.js +3 -3
  305. package/lib/js/utils/shared.d.ts +1 -8
  306. package/lib/js/utils/shared.js +17 -8
  307. package/package.json +2 -1
  308. package/lib/js/terrain/MapboxTerrain.js +0 -305
@@ -2,6 +2,14 @@ import * as utils from "../utils/shared";
2
2
  import { Extent } from "../Extent";
3
3
  import { LonLat } from "../LonLat";
4
4
  import { Vec4 } from "../math/Vec4";
5
+ export var GeometryTypeEnum;
6
+ (function (GeometryTypeEnum) {
7
+ GeometryTypeEnum[GeometryTypeEnum["POINT"] = 1] = "POINT";
8
+ GeometryTypeEnum[GeometryTypeEnum["LINESTRING"] = 2] = "LINESTRING";
9
+ GeometryTypeEnum[GeometryTypeEnum["POLYGON"] = 3] = "POLYGON";
10
+ GeometryTypeEnum[GeometryTypeEnum["MULTIPOLYGON"] = 4] = "MULTIPOLYGON";
11
+ GeometryTypeEnum[GeometryTypeEnum["MULTILINESTRING"] = 5] = "MULTILINESTRING";
12
+ })(GeometryTypeEnum || (GeometryTypeEnum = {}));
5
13
  const GeometryType = {
6
14
  POINT: 1,
7
15
  LINESTRING: 2,
@@ -33,10 +41,10 @@ class Geometry {
33
41
  this._lineIndexesHandlerIndex = -1;
34
42
  this._lineThicknessHandlerIndex = -1;
35
43
  this._lineColorsHandlerIndex = -1;
36
- this._type = (options.type && Geometry.getType(options.type)) || GeometryType.POINT;
37
- this._coordinates = [];
44
+ this._type = (options.type && Geometry.getType(options.type)) || GeometryTypeEnum.POINT;
45
+ this._coordinates = options.coordinates || [];
38
46
  this._extent = Geometry.getExtent({
39
- type: options.type || "Point",
47
+ type: options.type || "POINT",
40
48
  coordinates: options.coordinates || []
41
49
  }, this._coordinates);
42
50
  options.style = options.style || {};
@@ -70,7 +78,7 @@ class Geometry {
70
78
  static getExtent(geometryObj, outCoordinates) {
71
79
  let res = new Extent(new LonLat(180.0, 90.0), new LonLat(-180.0, -90.0));
72
80
  let t = Geometry.getType(geometryObj.type);
73
- if (t === GeometryType.POINT) {
81
+ if (t === GeometryTypeEnum.POINT) {
74
82
  let lon = geometryObj.coordinates[0], lat = geometryObj.coordinates[1];
75
83
  res.southWest.lon = lon;
76
84
  res.southWest.lat = lat;
@@ -78,7 +86,7 @@ class Geometry {
78
86
  res.northEast.lat = lat;
79
87
  outCoordinates && (outCoordinates[0] = lon) && (outCoordinates[1] = lat);
80
88
  }
81
- else if (t === GeometryType.LINESTRING) {
89
+ else if (t === GeometryTypeEnum.LINESTRING) {
82
90
  let c = geometryObj.coordinates;
83
91
  for (let i = 0; i < c.length; i++) {
84
92
  let lon = c[i][0], lat = c[i][1];
@@ -93,7 +101,7 @@ class Geometry {
93
101
  outCoordinates && (outCoordinates[i] = [lon, lat]);
94
102
  }
95
103
  }
96
- else if (t === GeometryType.POLYGON) {
104
+ else if (t === GeometryTypeEnum.POLYGON) {
97
105
  let c = geometryObj.coordinates;
98
106
  for (let i = 0; i < c.length; i++) {
99
107
  let ci = c[i];
@@ -113,7 +121,7 @@ class Geometry {
113
121
  }
114
122
  }
115
123
  }
116
- else if (t === GeometryType.MULTIPOLYGON) {
124
+ else if (t === GeometryTypeEnum.MULTIPOLYGON) {
117
125
  let p = geometryObj.coordinates;
118
126
  for (let i = 0; i < p.length; i++) {
119
127
  let pi = p[i];
@@ -137,7 +145,7 @@ class Geometry {
137
145
  }
138
146
  }
139
147
  }
140
- else if (t === GeometryType.MULTILINESTRING) {
148
+ else if (t === GeometryTypeEnum.MULTILINESTRING) {
141
149
  let c = geometryObj.coordinates;
142
150
  for (let i = 0; i < c.length; i++) {
143
151
  let ci = c[i];
@@ -280,4 +288,4 @@ class Geometry {
280
288
  }
281
289
  }
282
290
  Geometry.__counter__ = 0;
283
- export { Geometry, GeometryType };
291
+ export { Geometry };
@@ -2,7 +2,7 @@ import * as mercator from "../mercator";
2
2
  import * as quadTree from "../quadTree/quadTree";
3
3
  import { doubleToTwoFloatsV2 } from "../math/coder";
4
4
  import { Vec2 } from "../math/Vec2";
5
- import { GeometryType } from "./Geometry";
5
+ import { GeometryTypeEnum } from "./Geometry";
6
6
  import { earcut, flatten } from "../utils/earcut";
7
7
  const POLYVERTICES_BUFFER = 0;
8
8
  const POLYINDEXES_BUFFER = 1;
@@ -203,7 +203,7 @@ class GeometryHandler {
203
203
  geometry._lineVerticesHighMerc = [];
204
204
  geometry._lineVerticesLowMerc = [];
205
205
  if (geometry._coordinates[0].length) {
206
- if (geometry.type === GeometryType.POLYGON) {
206
+ if (geometry.type === GeometryTypeEnum.POLYGON) {
207
207
  let coordinates = geometry._coordinates;
208
208
  let ci = [];
209
209
  for (let j = 0; j < coordinates.length; j++) {
@@ -249,7 +249,7 @@ class GeometryHandler {
249
249
  geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
250
250
  geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
251
251
  }
252
- else if (geometry.type === GeometryType.MULTIPOLYGON) {
252
+ else if (geometry.type === GeometryTypeEnum.MULTIPOLYGON) {
253
253
  let coordinates = geometry._coordinates;
254
254
  let vertices = [], indexes = [];
255
255
  // Creates polygon stroke data
@@ -303,7 +303,7 @@ class GeometryHandler {
303
303
  geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
304
304
  geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
305
305
  }
306
- else if (geometry.type === GeometryType.LINESTRING) {
306
+ else if (geometry.type === GeometryTypeEnum.LINESTRING) {
307
307
  let coordinates = geometry._coordinates;
308
308
  let ci = new Array(coordinates.length);
309
309
  for (let j = 0; j < coordinates.length; j++) {
@@ -322,7 +322,7 @@ class GeometryHandler {
322
322
  geometry._lineColorsLength = this._lineColors.length - geometry._lineColorsHandlerIndex;
323
323
  geometry._lineThicknessLength = this._lineThickness.length - geometry._lineThicknessHandlerIndex;
324
324
  }
325
- else if (geometry.type === GeometryType.MULTILINESTRING) {
325
+ else if (geometry.type === GeometryTypeEnum.MULTILINESTRING) {
326
326
  let coordinates = geometry._coordinates;
327
327
  let ci = [];
328
328
  for (let j = 0; j < coordinates.length; j++) {
@@ -6,6 +6,7 @@ export interface ILabelParams extends IBaseBillboardParams {
6
6
  text?: string;
7
7
  face?: string;
8
8
  size?: number;
9
+ opacity?: number;
9
10
  outline?: number;
10
11
  outlineColor?: string | NumberArray4 | Vec4;
11
12
  align?: string;
@@ -91,6 +92,12 @@ declare class Label extends BaseBillboard {
91
92
  * It can't be bigger than maximum labelHandler _maxLetters value.
92
93
  */
93
94
  setText(text: string): void;
95
+ /**
96
+ * Change text direction.
97
+ * @public
98
+ * @param {boolean} isRTL - Text string.
99
+ */
100
+ setRtl(isRTL: boolean): void;
94
101
  /**
95
102
  * Gets current text string.
96
103
  * @public
@@ -63,6 +63,17 @@ class Label extends BaseBillboard {
63
63
  this._handler.setText(this._handlerIndex, text, this._fontIndex, this._align, this._isRTL);
64
64
  }
65
65
  }
66
+ /**
67
+ * Change text direction.
68
+ * @public
69
+ * @param {boolean} isRTL - Text string.
70
+ */
71
+ setRtl(isRTL) {
72
+ this._isRTL = isRTL;
73
+ if (this._isReady && this._handler) {
74
+ this._handler.setText(this._handlerIndex, this._text, this._fontIndex, this._align, this._isRTL);
75
+ }
76
+ }
66
77
  /**
67
78
  * Gets current text string.
68
79
  * @public
@@ -9,12 +9,13 @@ import { RenderNode } from "../scene/RenderNode";
9
9
  import { WebGLBufferExt } from "../webgl/Handler";
10
10
  import { TypedArray } from "../utils/shared";
11
11
  import { Ellipsoid } from "../ellipsoid/Ellipsoid";
12
- type Geodetic = LonLat | NumberArray2 | NumberArray3;
13
- type Cartesian = Vec3 | NumberArray3;
14
- type SegmentPath3vExt = Cartesian[];
15
- type SegmentPathLonLatExt = Geodetic[];
16
- type SegmentPathColor = NumberArray4[];
17
- type SegmentPathLonLat = LonLat[];
12
+ export type Geodetic = LonLat | NumberArray2 | NumberArray3;
13
+ export type Cartesian = Vec3 | NumberArray3;
14
+ export type SegmentPath3vExt = Cartesian[];
15
+ export type SegmentPathLonLatExt = Geodetic[];
16
+ export type SegmentPathColor = NumberArray4[];
17
+ export type SegmentPath3v = Vec3[];
18
+ export type SegmentPathLonLat = LonLat[];
18
19
  export interface IPolylineParams {
19
20
  altitude?: number;
20
21
  thickness?: number;
@@ -138,6 +139,7 @@ declare class Polyline {
138
139
  * @static
139
140
  */
140
141
  static appendPoint3v(path3v: SegmentPath3vExt[], point3v: Vec3, pathColors: SegmentPathColor[], color: NumberArray4, isClosed: boolean, outVerticesHigh: number[], outVerticesLow: number[], outColors: number[], outOrders: number[], outIndexes: number[], ellipsoid: Ellipsoid | null, outTransformedPathLonLat: SegmentPathLonLatExt[], outTransformedPathMerc: LonLat[][], outExtent: Extent): void;
142
+ static setPathColors(pathLonLat: SegmentPathLonLatExt[], pathColors: SegmentPathColor[], defaultColor: NumberArray4, outColors: number[]): void;
141
143
  /**
142
144
  * Appends to the line array new geodetic coordinates line data.
143
145
  * @static
@@ -224,6 +226,12 @@ declare class Polyline {
224
226
  * @param {number} opacity - Opacity.
225
227
  */
226
228
  setOpacity(opacity: number): void;
229
+ /**
230
+ * Sets Polyline thickness in screen pixels.
231
+ * @public
232
+ * @param {number} thickness - Thickness.
233
+ */
234
+ setAltitude(altitude: number): void;
227
235
  /**
228
236
  * Sets Polyline thickness in screen pixels.
229
237
  * @public
@@ -284,7 +292,7 @@ declare class Polyline {
284
292
  * @todo
285
293
  * @param {NumberArray4[][]} pathColors
286
294
  */
287
- setPathColors(pathColors: NumberArray4[][]): void;
295
+ setPathColors(pathColors: SegmentPathColor[]): void;
288
296
  /**
289
297
  * Sets polyline color
290
298
  * @param {string} htmlColor- HTML color
@@ -376,6 +376,44 @@ class Polyline {
376
376
  outColors.push(r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a);
377
377
  outOrders.push(1, -1, 2, -2);
378
378
  }
379
+ static setPathColors(pathLonLat, pathColors, defaultColor, outColors) {
380
+ for (let j = 0, len = pathLonLat.length; j < len; j++) {
381
+ var path = pathLonLat[j], pathColors_j = pathColors[j];
382
+ if (path.length === 0) {
383
+ continue;
384
+ }
385
+ let color = defaultColor;
386
+ if (pathColors_j && pathColors_j[0]) {
387
+ color = pathColors_j[0];
388
+ }
389
+ let r = color[R], g = color[G], b = color[B], a = color[A] != undefined ? color[A] : 1.0;
390
+ if (j > 0) {
391
+ outColors.push(r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a);
392
+ }
393
+ for (let i = 0, len = path.length; i < len; i++) {
394
+ var cur = path[i];
395
+ if (cur instanceof Array) {
396
+ cur = new LonLat(cur[0], cur[1], cur[2]);
397
+ }
398
+ if (pathColors_j && pathColors_j[i]) {
399
+ color = pathColors_j[i];
400
+ }
401
+ r = color[R];
402
+ g = color[G];
403
+ b = color[B];
404
+ a = color[A] != undefined ? color[A] : 1.0;
405
+ outColors.push(r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a);
406
+ }
407
+ if (pathColors_j && pathColors_j[path.length - 1]) {
408
+ color = pathColors_j[path.length - 1];
409
+ }
410
+ r = color[R];
411
+ g = color[G];
412
+ b = color[B];
413
+ a = color[A] != undefined ? color[A] : 1.0;
414
+ outColors.push(r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a);
415
+ }
416
+ }
379
417
  /**
380
418
  * Appends to the line array new geodetic coordinates line data.
381
419
  * @static
@@ -389,10 +427,10 @@ class Polyline {
389
427
  }
390
428
  if (outIndexes.length > 0) {
391
429
  index = outIndexes[outIndexes.length - 5] + 9;
392
- outIndexes.push(index, index);
430
+ outIndexes.push(index);
393
431
  }
394
432
  else {
395
- outIndexes.push(0, 0);
433
+ outIndexes.push(0);
396
434
  }
397
435
  for (let j = 0, len = pathLonLat.length; j < len; j++) {
398
436
  var path = pathLonLat[j], pathColors_j = pathColors[j];
@@ -1150,6 +1188,14 @@ class Polyline {
1150
1188
  setOpacity(opacity) {
1151
1189
  this._opacity = opacity;
1152
1190
  }
1191
+ /**
1192
+ * Sets Polyline thickness in screen pixels.
1193
+ * @public
1194
+ * @param {number} thickness - Thickness.
1195
+ */
1196
+ setAltitude(altitude) {
1197
+ this.altitude = altitude;
1198
+ }
1153
1199
  /**
1154
1200
  * Sets Polyline thickness in screen pixels.
1155
1201
  * @public
@@ -1296,10 +1342,12 @@ class Polyline {
1296
1342
  * @param {NumberArray4[][]} pathColors
1297
1343
  */
1298
1344
  setPathColors(pathColors) {
1299
- if (this._renderNode) {
1300
- //
1301
- // ...
1302
- //
1345
+ if (pathColors) {
1346
+ this._colors = [];
1347
+ this._pathColors = [].concat(pathColors);
1348
+ Polyline.setPathColors(this._pathLonLat, pathColors, this._defaultColor, this._colors);
1349
+ // Mark the colors buffer as changed
1350
+ this._changedBuffers[COLORS_BUFFER] = true;
1303
1351
  }
1304
1352
  }
1305
1353
  /**
@@ -80,6 +80,18 @@ declare class Strip {
80
80
  * @public
81
81
  */
82
82
  clear(): void;
83
+ /**
84
+ * Sets RGBA color. Each channel from 0.0 to 1.0.
85
+ * @public
86
+ * @param {Vec4} color - RGBA vector.
87
+ */
88
+ setColor4v(color: Vec4): void;
89
+ /**
90
+ * Sets strip color.
91
+ * @public
92
+ * @param {string} color - HTML style color.
93
+ */
94
+ setColorHTML(color: string): void;
83
95
  setColor(r: number, g: number, b: number, a?: number): void;
84
96
  /**
85
97
  * Set strip opacity.
@@ -88,6 +88,22 @@ class Strip {
88
88
  this._indexes = [];
89
89
  this._deleteBuffers();
90
90
  }
91
+ /**
92
+ * Sets RGBA color. Each channel from 0.0 to 1.0.
93
+ * @public
94
+ * @param {Vec4} color - RGBA vector.
95
+ */
96
+ setColor4v(color) {
97
+ this.setColor(color.x, color.y, color.z, color.w);
98
+ }
99
+ /**
100
+ * Sets strip color.
101
+ * @public
102
+ * @param {string} color - HTML style color.
103
+ */
104
+ setColorHTML(color) {
105
+ this.setColor4v(utils.htmlColorToRgba(color));
106
+ }
91
107
  setColor(r, g, b, a) {
92
108
  a = a || this.color[3];
93
109
  this.color[0] = r;
@@ -37,7 +37,7 @@ class StripHandler {
37
37
  mat4 viewMatrixRTE = viewMatrix;
38
38
  viewMatrixRTE[3] = vec4(0.0, 0.0, 0.0, 1.0);
39
39
 
40
- gl_Position = projectionMatrix * viewMatrixRTE * vec4(highDiff + lowDiff, 1.0);
40
+ gl_Position = projectionMatrix * viewMatrixRTE * vec4(highDiff * step(1.0, length(highDiff)) + lowDiff, 1.0);
41
41
  }`,
42
42
  fragmentShader: `precision highp float;
43
43
  uniform vec4 uColor;
@@ -1,11 +1,10 @@
1
- import { Billboard } from "./Billboard";
2
- import { Entity } from "./Entity";
3
- import { EntityCollection } from "./EntityCollection";
4
- import { Geometry } from "./Geometry";
5
- import { GeoObject } from "./GeoObject";
6
- import { Label } from "./Label";
7
- import { PointCloud } from "./PointCloud";
8
- import { Polyline } from "./Polyline";
9
- import { Ray } from "./Ray";
10
- import { Strip } from "./Strip";
11
- export { Billboard, Entity, EntityCollection, Geometry, GeoObject, Label, PointCloud, Polyline, Ray, Strip };
1
+ export * from "./Billboard";
2
+ export * from "./Entity";
3
+ export * from "./EntityCollection";
4
+ export * from "./Geometry";
5
+ export * from "./GeoObject";
6
+ export * from "./Label";
7
+ export * from "./PointCloud";
8
+ export * from "./Polyline";
9
+ export * from "./Ray";
10
+ export * from "./Strip";
@@ -1,11 +1,10 @@
1
- import { Billboard } from "./Billboard";
2
- import { Entity } from "./Entity";
3
- import { EntityCollection } from "./EntityCollection";
4
- import { Geometry } from "./Geometry";
5
- import { GeoObject } from "./GeoObject";
6
- import { Label } from "./Label";
7
- import { PointCloud } from "./PointCloud";
8
- import { Polyline } from "./Polyline";
9
- import { Ray } from "./Ray";
10
- import { Strip } from "./Strip";
11
- export { Billboard, Entity, EntityCollection, Geometry, GeoObject, Label, PointCloud, Polyline, Ray, Strip };
1
+ export * from "./Billboard";
2
+ export * from "./Entity";
3
+ export * from "./EntityCollection";
4
+ export * from "./Geometry";
5
+ export * from "./GeoObject";
6
+ export * from "./Label";
7
+ export * from "./PointCloud";
8
+ export * from "./Polyline";
9
+ export * from "./Ray";
10
+ export * from "./Strip";
package/lib/js/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import * as scene from './scene/index';
8
8
  import * as terrain from './terrain/index';
9
9
  import * as layer from './layer/index';
10
10
  import * as webgl from './webgl/index';
11
- import { Globe } from './Globe';
11
+ export * from './Globe';
12
12
  import { Geoid } from './terrain/Geoid';
13
13
  import { input } from './input/input';
14
14
  import { Ellipsoid, wgs84 } from './ellipsoid/index';
@@ -27,7 +27,7 @@ import { EarthQuadTreeStrategy, MarsQuadTreeStrategy, QuadTreeStrategy, quadTree
27
27
  import { Object3d } from './Object3d';
28
28
  import { Handler, Program, Framebuffer, Multisample } from './webgl/index';
29
29
  import { Control } from './control/Control';
30
- import { Entity, EntityCollection, Billboard, Geometry, Label, PointCloud, Polyline, GeoObject } from './entity/index';
31
- import { Layer, Vector, XYZ, CanvasTiles, WMS, GeoImage, GeoVideo, GeoTexture2d, KML, Material } from './layer/index';
32
- import { EmptyTerrain, GlobusTerrain, MapboxTerrain, BilTerrain } from './terrain/index';
33
- export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, terrain, layer, webgl, Framebuffer, Material, KML, Layer, XYZ, Vector, CanvasTiles, WMS, GeoImage, GeoVideo, GeoTexture2d, EmptyTerrain, GlobusTerrain, MapboxTerrain, BilTerrain, Control, Camera, Ellipsoid, Planet, PlanetCamera, Globe, LightSource, Entity, EntityCollection, Billboard, Geometry, Label, PointCloud, Polyline, Program, GeoObject, Handler, Multisample, Renderer, Clock, Events, Extent, LonLat, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d };
30
+ export * from './entity/index';
31
+ export * from './layer/index';
32
+ import { EmptyTerrain, GlobusTerrain, RgbTerrain, BilTerrain, GlobusRgbTerrain } from './terrain/index';
33
+ export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, terrain, layer, webgl, Framebuffer, EmptyTerrain, GlobusTerrain, RgbTerrain, GlobusRgbTerrain, BilTerrain, Control, Camera, Ellipsoid, Planet, PlanetCamera, LightSource, Program, Handler, Multisample, Renderer, Clock, Events, Extent, LonLat, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d };
package/lib/js/index.js CHANGED
@@ -8,7 +8,7 @@ import * as scene from './scene/index';
8
8
  import * as terrain from './terrain/index';
9
9
  import * as layer from './layer/index';
10
10
  import * as webgl from './webgl/index';
11
- import { Globe } from './Globe';
11
+ export * from './Globe';
12
12
  import { Geoid } from './terrain/Geoid';
13
13
  import { input } from './input/input';
14
14
  import { Ellipsoid, wgs84 } from './ellipsoid/index';
@@ -27,7 +27,7 @@ import { EarthQuadTreeStrategy, MarsQuadTreeStrategy, QuadTreeStrategy, quadTree
27
27
  import { Object3d } from './Object3d';
28
28
  import { Handler, Program, Framebuffer, Multisample } from './webgl/index';
29
29
  import { Control } from './control/Control';
30
- import { Entity, EntityCollection, Billboard, Geometry, Label, PointCloud, Polyline, GeoObject } from './entity/index';
31
- import { Layer, Vector, XYZ, CanvasTiles, WMS, GeoImage, GeoVideo, GeoTexture2d, KML, Material } from './layer/index';
32
- import { EmptyTerrain, GlobusTerrain, MapboxTerrain, BilTerrain } from './terrain/index';
33
- export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, terrain, layer, webgl, Framebuffer, Material, KML, Layer, XYZ, Vector, CanvasTiles, WMS, GeoImage, GeoVideo, GeoTexture2d, EmptyTerrain, GlobusTerrain, MapboxTerrain, BilTerrain, Control, Camera, Ellipsoid, Planet, PlanetCamera, Globe, LightSource, Entity, EntityCollection, Billboard, Geometry, Label, PointCloud, Polyline, Program, GeoObject, Handler, Multisample, Renderer, Clock, Events, Extent, LonLat, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d };
30
+ export * from './entity/index';
31
+ export * from './layer/index';
32
+ import { EmptyTerrain, GlobusTerrain, RgbTerrain, BilTerrain, GlobusRgbTerrain } from './terrain/index';
33
+ export { bv, jd, math, mercator, utils, input, control, scene, quadTreeStrategyType, wgs84, terrain, layer, webgl, Framebuffer, EmptyTerrain, GlobusTerrain, RgbTerrain, GlobusRgbTerrain, BilTerrain, Control, Camera, Ellipsoid, Planet, PlanetCamera, LightSource, Program, Handler, Multisample, Renderer, Clock, Events, Extent, LonLat, RenderNode, Line2, Line3, Mat3, Mat4, Plane, Quat, Ray, Vec2, Vec3, Vec4, Geoid, Popup, QuadTreeStrategy, MarsQuadTreeStrategy, EarthQuadTreeStrategy, Wgs84QuadTreeStrategy, Object3d };
@@ -0,0 +1,4 @@
1
+ import { XYZ, IXYZParams } from "./XYZ";
2
+ export declare class Bing extends XYZ {
3
+ constructor(name: string | null, options?: IXYZParams);
4
+ }
@@ -0,0 +1,40 @@
1
+ import { XYZ } from "./XYZ";
2
+ import { stringTemplate } from "../utils/shared";
3
+ function toQuadKey(x, y, z) {
4
+ var index = '';
5
+ for (let i = z; i > 0; i--) {
6
+ var b = 0;
7
+ var mask = 1 << (i - 1);
8
+ if ((x & mask) !== 0)
9
+ b++;
10
+ if ((y & mask) !== 0)
11
+ b += 2;
12
+ index += b.toString();
13
+ }
14
+ return index;
15
+ }
16
+ export class Bing extends XYZ {
17
+ constructor(name, options = {}) {
18
+ super(name || "Bing", {
19
+ iconSrc: "https://ecn.t0.tiles.virtualearth.net/tiles/a120.jpeg?n=z&g=7146",
20
+ subdomains: ['t0', 't1', 't2', 't3'],
21
+ url: "https://ecn.{s}.tiles.virtualearth.net/tiles/a{quad}.jpeg?n=z&g=7146",
22
+ isBaseLayer: true,
23
+ maxNativeZoom: 17,
24
+ defaultTextures: [{ color: "#001522" }, { color: "#E4E6F3" }],
25
+ attribution: `<div style="transform: scale(0.8); margin-top:-2px;"><a href="https://www.bing.com" target="_blank"><img style="position: relative; top: 2px;" title="Bing Imagery" src="https://sandcastle.cesium.com/CesiumUnminified/Assets/Images/bing_maps_credit.png"></a> © 2021 Microsoft Corporation</div>`,
26
+ urlRewrite: (s, u) => {
27
+ return stringTemplate(u, {
28
+ 's': this._getSubdomain(),
29
+ 'quad': toQuadKey(s.tileX, s.tileY, s.tileZoom)
30
+ });
31
+ },
32
+ specular: [0.00063, 0.00055, 0.00032],
33
+ ambient: "rgb(90,90,90)",
34
+ diffuse: "rgb(350,350,350)",
35
+ shininess: 20,
36
+ nightTextureCoefficient: 2.7,
37
+ ...options
38
+ });
39
+ }
40
+ }
@@ -1,6 +1,6 @@
1
1
  import { BaseGeoImage, IBaseGeoImageParams } from "./BaseGeoImage";
2
2
  import { Material } from "./Material";
3
- interface IGeoImageParams extends IBaseGeoImageParams {
3
+ export interface IGeoImageParams extends IBaseGeoImageParams {
4
4
  image?: HTMLImageElement | HTMLCanvasElement | ImageBitmap;
5
5
  src?: string;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import { BaseGeoImage, IBaseGeoImageParams } from "./BaseGeoImage";
2
2
  import { Material } from "./Material";
3
- interface IGeoVideoParams extends IBaseGeoImageParams {
3
+ export interface IGeoVideoParams extends IBaseGeoImageParams {
4
4
  videoElement?: HTMLVideoElement;
5
5
  src?: string;
6
6
  }
@@ -202,7 +202,7 @@ declare class Layer {
202
202
  y: number;
203
203
  z: number;
204
204
  };
205
- static getTileIndex(...arr: number[]): string;
205
+ static getTileIndex(x: number, y: number, z: number, tileGroup: number): string;
206
206
  get instanceName(): string;
207
207
  get rendererEvents(): EventsHandler<LayerEventsList>;
208
208
  set opacity(opacity: number);
@@ -165,8 +165,8 @@ class Layer {
165
165
  z: z
166
166
  };
167
167
  }
168
- static getTileIndex(...arr) {
169
- return arr.join("_");
168
+ static getTileIndex(x, y, z, tileGroup) {
169
+ return `${tileGroup}::${x}_${y}_${z}`;
170
170
  }
171
171
  get instanceName() {
172
172
  return "Layer";
@@ -0,0 +1,4 @@
1
+ import { XYZ, IXYZParams } from "./XYZ";
2
+ export declare class OpenStreetMap extends XYZ {
3
+ constructor(name: string | null, options?: IXYZParams);
4
+ }
@@ -0,0 +1,19 @@
1
+ import { XYZ } from "./XYZ";
2
+ export class OpenStreetMap extends XYZ {
3
+ constructor(name, options = {}) {
4
+ super(name || "OpenStreetMap", {
5
+ iconSrc: "https://tile.openstreetmap.org/8/138/95.png",
6
+ url: "http://tile.openstreetmap.org/{z}/{x}/{y}.png",
7
+ attribution: 'Data @ OpenStreetMap contributors, ODbL',
8
+ isBaseLayer: true,
9
+ maxNativeZoom: 19,
10
+ defaultTextures: [{ color: "#AAD3DF" }, { color: "#F2EFE9" }],
11
+ isSRGB: false,
12
+ shininess: 18,
13
+ specular: [0.00063, 0.00055, 0.00032],
14
+ ambient: [0.2, 0.2, 0.3],
15
+ diffuse: [0.9, 0.9, 0.7],
16
+ ...options
17
+ });
18
+ }
19
+ }
@@ -101,6 +101,9 @@ declare class Vector extends Layer {
101
101
  * @public
102
102
  */
103
103
  _nodeCapacity: number;
104
+ /**
105
+ * @todo: remove, or replace with node strategy
106
+ */
104
107
  protected _entityCollectionsTree: EntityCollectionNode | null;
105
108
  protected _entityCollectionsTreeNorth: EntityCollectionNodeWGS84 | null;
106
109
  protected _entityCollectionsTreeSouth: EntityCollectionNodeWGS84 | null;
@@ -449,9 +449,9 @@ class Vector extends Layer {
449
449
  */
450
450
  _createEntityCollectionsTree(entitiesForTree) {
451
451
  if (this._planet) {
452
- this._entityCollectionsTree = new EntityCollectionNode(this, quadTree.NW, null, 0, Extent.createFromArray([-20037508.34, -20037508.34, 20037508.34, 20037508.34]), this._planet, 0);
453
- this._entityCollectionsTreeNorth = new EntityCollectionNodeWGS84(this, quadTree.NW, null, 0, Extent.createFromArray([-180, mercator.MAX_LAT, 180, 90]), this._planet, 0);
454
- this._entityCollectionsTreeSouth = new EntityCollectionNodeWGS84(this, quadTree.NW, null, 0, Extent.createFromArray([-180, -90, 180, mercator.MIN_LAT]), this._planet, 0);
452
+ this._entityCollectionsTree = new EntityCollectionNode(this, quadTree.NW, null, Extent.createFromArray([-20037508.34, -20037508.34, 20037508.34, 20037508.34]), this._planet, 0);
453
+ this._entityCollectionsTreeNorth = new EntityCollectionNodeWGS84(this, quadTree.NW, null, Extent.createFromArray([-180, mercator.MAX_LAT, 180, 90]), this._planet, 0);
454
+ this._entityCollectionsTreeSouth = new EntityCollectionNodeWGS84(this, quadTree.NW, null, Extent.createFromArray([-180, -90, 180, mercator.MIN_LAT]), this._planet, 0);
455
455
  for (let i = 0, len = entitiesForTree.length; i < len; i++) {
456
456
  let entity = entitiesForTree[i];
457
457
  // north tree
@@ -1,11 +1,12 @@
1
- import { CanvasTiles } from './CanvasTiles';
2
- import { GeoImage } from './GeoImage';
3
- import { GeoTexture2d } from './GeoTexture2d';
4
- import { GeoVideo } from './GeoVideo';
5
- import { KML } from './KML';
6
- import { Layer } from './Layer';
7
- import { Vector } from './Vector';
8
- import { WMS } from './WMS';
9
- import { XYZ } from './XYZ';
10
- import { Material } from './Material';
11
- export { CanvasTiles, GeoImage, GeoTexture2d, GeoVideo, KML, Layer, Vector, WMS, XYZ, Material };
1
+ export * from './CanvasTiles';
2
+ export * from './GeoImage';
3
+ export * from './GeoTexture2d';
4
+ export * from './GeoVideo';
5
+ export * from './KML';
6
+ export * from './Layer';
7
+ export * from './Vector';
8
+ export * from './WMS';
9
+ export * from './XYZ';
10
+ export * from './Material';
11
+ export * from './OpenStreetMap';
12
+ export * from './Bing';
@@ -1,11 +1,12 @@
1
- import { CanvasTiles } from './CanvasTiles';
2
- import { GeoImage } from './GeoImage';
3
- import { GeoTexture2d } from './GeoTexture2d';
4
- import { GeoVideo } from './GeoVideo';
5
- import { KML } from './KML';
6
- import { Layer } from './Layer';
7
- import { Vector } from './Vector';
8
- import { WMS } from './WMS';
9
- import { XYZ } from './XYZ';
10
- import { Material } from './Material';
11
- export { CanvasTiles, GeoImage, GeoTexture2d, GeoVideo, KML, Layer, Vector, WMS, XYZ, Material };
1
+ export * from './CanvasTiles';
2
+ export * from './GeoImage';
3
+ export * from './GeoTexture2d';
4
+ export * from './GeoVideo';
5
+ export * from './KML';
6
+ export * from './Layer';
7
+ export * from './Vector';
8
+ export * from './WMS';
9
+ export * from './XYZ';
10
+ export * from './Material';
11
+ export * from './OpenStreetMap';
12
+ export * from './Bing';