@openglobus/og 0.11.1 → 0.11.6

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 (255) hide show
  1. package/package.json +18 -20
  2. package/src/og/Clock.js +11 -11
  3. package/src/og/Deferred.js +1 -1
  4. package/src/og/Events.js +9 -7
  5. package/src/og/Extent.js +117 -72
  6. package/src/og/Globe.js +35 -22
  7. package/src/og/ImageCanvas.js +24 -18
  8. package/src/og/Lock.js +2 -2
  9. package/src/og/LonLat.js +40 -37
  10. package/src/og/Popup.js +21 -15
  11. package/src/og/QueueArray.js +7 -3
  12. package/src/og/Rectangle.js +11 -6
  13. package/src/og/Stack.js +8 -5
  14. package/src/og/ajax.js +21 -33
  15. package/src/og/astro/astro.js +5 -5
  16. package/src/og/astro/earth.js +23 -17
  17. package/src/og/astro/jd.js +44 -39
  18. package/src/og/astro/orbit.js +20 -18
  19. package/src/og/astro/rotation.js +17 -8
  20. package/src/og/bv/Box.js +7 -3
  21. package/src/og/bv/Sphere.js +17 -9
  22. package/src/og/camera/Camera.js +137 -86
  23. package/src/og/camera/Frustum.js +30 -19
  24. package/src/og/camera/PlanetCamera.js +30 -26
  25. package/src/og/control/CompassButton.js +8 -2
  26. package/src/og/control/Control.js +13 -11
  27. package/src/og/control/DebugInfo.js +4 -1
  28. package/src/og/control/EarthCoordinates.js +62 -41
  29. package/src/og/control/EarthNavigation.js +20 -22
  30. package/src/og/control/GeoImageDragControl.js +1 -1
  31. package/src/og/control/KeyboardNavigation.js +12 -12
  32. package/src/og/control/LayerSwitcher.js +24 -23
  33. package/src/og/control/Lighting.js +1 -1
  34. package/src/og/control/MouseNavigation.js +1 -1
  35. package/src/og/control/ScaleControl.js +1 -1
  36. package/src/og/control/SegmentBoundVisualization.js +8 -9
  37. package/src/og/control/ShowFps.js +15 -10
  38. package/src/og/control/SimpleNavigation.js +8 -10
  39. package/src/og/control/Sun.js +25 -15
  40. package/src/og/control/ToggleWireframe.js +5 -5
  41. package/src/og/control/TouchNavigation.js +58 -45
  42. package/src/og/control/ZoomControl.js +41 -25
  43. package/src/og/control/index.js +4 -0
  44. package/src/og/ellipsoid/Ellipsoid.js +181 -85
  45. package/src/og/ellipsoid/wgs84.js +4 -4
  46. package/src/og/entity/BaseBillboard.js +97 -44
  47. package/src/og/entity/Billboard.js +15 -11
  48. package/src/og/entity/BillboardHandler.js +314 -64
  49. package/src/og/entity/Entity.js +106 -74
  50. package/src/og/entity/EntityCollection.js +72 -49
  51. package/src/og/entity/GeoObject.js +228 -0
  52. package/src/og/entity/GeoObjectHandler.js +910 -0
  53. package/src/og/entity/Geometry.js +29 -26
  54. package/src/og/entity/GeometryHandler.js +598 -126
  55. package/src/og/entity/Label.js +74 -40
  56. package/src/og/entity/LabelHandler.js +47 -246
  57. package/src/og/entity/LabelWorker.js +213 -0
  58. package/src/og/entity/Object3d.js +504 -0
  59. package/src/og/entity/PointCloud.js +81 -33
  60. package/src/og/entity/PointCloudHandler.js +9 -9
  61. package/src/og/entity/Polyline.js +39 -39
  62. package/src/og/entity/Ray.js +61 -28
  63. package/src/og/entity/ShapeHandler.js +1 -1
  64. package/src/og/entity/Strip.js +77 -48
  65. package/src/og/entity/StripHandler.js +27 -27
  66. package/src/og/entity/index.js +8 -16
  67. package/src/og/input/KeyboardHandler.js +107 -104
  68. package/src/og/input/MouseHandler.js +81 -78
  69. package/src/og/input/TouchHandler.js +55 -51
  70. package/src/og/layer/BaseGeoImage.js +61 -30
  71. package/src/og/layer/CanvasTiles.js +26 -24
  72. package/src/og/layer/GeoImage.js +10 -10
  73. package/src/og/layer/GeoTexture2d.js +1 -1
  74. package/src/og/layer/GeoVideo.js +3 -3
  75. package/src/og/layer/KML.js +66 -40
  76. package/src/og/layer/Layer.js +27 -17
  77. package/src/og/layer/Material.js +93 -61
  78. package/src/og/layer/Vector.js +118 -72
  79. package/src/og/layer/WMS.js +36 -19
  80. package/src/og/layer/XYZ.js +55 -48
  81. package/src/og/light/LightSource.js +47 -40
  82. package/src/og/math/Line2.js +24 -24
  83. package/src/og/math/Line3.js +103 -102
  84. package/src/og/math/Mat3.js +134 -121
  85. package/src/og/math/Mat4.js +603 -459
  86. package/src/og/math/Plane.js +21 -20
  87. package/src/og/math/Quat.js +980 -927
  88. package/src/og/math/Ray.js +195 -187
  89. package/src/og/math/Vec2.js +127 -117
  90. package/src/og/math/Vec3.js +206 -176
  91. package/src/og/math/Vec4.js +49 -53
  92. package/src/og/math/coder.js +18 -18
  93. package/src/og/math.js +12 -12
  94. package/src/og/mercator.js +11 -11
  95. package/src/og/proj/EPSG3857.js +4 -4
  96. package/src/og/proj/EPSG4326.js +4 -4
  97. package/src/og/proj/Proj.js +31 -31
  98. package/src/og/quadTree/EntityCollectionNode.js +310 -300
  99. package/src/og/quadTree/Node.js +1008 -993
  100. package/src/og/renderer/Renderer.js +768 -747
  101. package/src/og/renderer/RendererEvents.js +9 -6
  102. package/src/og/scene/Axes.js +1 -1
  103. package/src/og/scene/BaseNode.js +8 -9
  104. package/src/og/scene/Planet.js +115 -87
  105. package/src/og/scene/RenderNode.js +29 -22
  106. package/src/og/scene/SkyBox.js +1 -1
  107. package/src/og/segment/Segment.js +1886 -1878
  108. package/src/og/segment/SegmentLonLat.js +298 -268
  109. package/src/og/segment/segmentHelper.js +11 -11
  110. package/src/og/shaders/bloom.js +1 -1
  111. package/src/og/shaders/blur.js +2 -2
  112. package/src/og/shaders/depth.js +1 -1
  113. package/src/og/shaders/geoObject.js +211 -0
  114. package/src/og/shaders/label.js +1 -1
  115. package/src/og/shaders/lumFilter.js +1 -1
  116. package/src/og/shaders/pointCloud.js +42 -42
  117. package/src/og/shaders/screenFrame.js +1 -1
  118. package/src/og/shaders/shape.js +15 -21
  119. package/src/og/shaders/skybox.js +37 -37
  120. package/src/og/shaders/toneMapping.js +1 -1
  121. package/src/og/shapes/BaseShape.js +129 -57
  122. package/src/og/shapes/Icosphere.js +30 -15
  123. package/src/og/shapes/Sphere.js +13 -16
  124. package/src/og/terrain/BilTerrain.js +2 -1
  125. package/src/og/terrain/EmptyTerrain.js +2 -2
  126. package/src/og/terrain/Geoid.js +2 -2
  127. package/src/og/terrain/GlobusTerrain.js +10 -10
  128. package/src/og/terrain/MapboxTerrain.js +1 -1
  129. package/src/og/utils/GeoImageCreator.js +9 -9
  130. package/src/og/utils/Loader.js +6 -6
  131. package/src/og/utils/NormalMapCreator.js +13 -13
  132. package/src/og/utils/TerrainWorker.js +1 -1
  133. package/src/og/utils/TextureAtlas.js +20 -22
  134. package/src/og/utils/VectorTileCreator.js +5 -5
  135. package/src/og/utils/earcut.js +1 -1
  136. package/src/og/utils/shared.js +15 -15
  137. package/src/og/webgl/Framebuffer.js +101 -53
  138. package/src/og/webgl/Handler.js +125 -85
  139. package/src/og/webgl/Multisample.js +55 -27
  140. package/src/og/webgl/Program.js +80 -35
  141. package/src/og/webgl/ProgramController.js +27 -23
  142. package/src/og/webgl/callbacks.js +8 -8
  143. package/types/Clock.d.ts +6 -2
  144. package/types/Deferred.d.ts +1 -1
  145. package/types/Events.d.ts +8 -4
  146. package/types/Extent.d.ts +37 -33
  147. package/types/Globe.d.ts +15 -13
  148. package/types/ImageCanvas.d.ts +5 -3
  149. package/types/LonLat.d.ts +24 -24
  150. package/types/Popup.d.ts +4 -0
  151. package/types/QueueArray.d.ts +6 -2
  152. package/types/Rectangle.d.ts +10 -4
  153. package/types/Stack.d.ts +4 -0
  154. package/types/ajax.d.ts +1 -1
  155. package/types/astro/earth.d.ts +3 -2
  156. package/types/bv/Box.d.ts +10 -5
  157. package/types/bv/Sphere.d.ts +13 -7
  158. package/types/camera/Camera.d.ts +90 -81
  159. package/types/camera/Frustum.d.ts +26 -22
  160. package/types/camera/PlanetCamera.d.ts +49 -53
  161. package/types/control/CompassButton.d.ts +4 -4
  162. package/types/control/Control.d.ts +7 -4
  163. package/types/control/DebugInfo.d.ts +3 -4
  164. package/types/control/EarthCoordinates.d.ts +6 -6
  165. package/types/control/EarthNavigation.d.ts +42 -0
  166. package/types/control/KeyboardNavigation.d.ts +3 -4
  167. package/types/control/LayerSwitcher.d.ts +3 -5
  168. package/types/control/Lighting.d.ts +3 -3
  169. package/types/control/MouseNavigation.d.ts +47 -0
  170. package/types/control/ScaleControl.d.ts +3 -3
  171. package/types/control/ShowFps.d.ts +3 -4
  172. package/types/control/SimpleNavigation.d.ts +3 -6
  173. package/types/control/Sun.d.ts +8 -10
  174. package/types/control/ToggleWireframe.d.ts +3 -3
  175. package/types/control/TouchNavigation.d.ts +48 -0
  176. package/types/control/ZoomControl.d.ts +3 -4
  177. package/types/control/index.d.ts +3 -1
  178. package/types/ellipsoid/Ellipsoid.d.ts +47 -43
  179. package/types/ellipsoid/wgs84.d.ts +3 -2
  180. package/types/entity/BaseBillboard.d.ts +41 -34
  181. package/types/entity/Billboard.d.ts +7 -7
  182. package/types/entity/BillboardHandler.d.ts +4 -0
  183. package/types/entity/Entity.d.ts +101 -83
  184. package/types/entity/EntityCollection.d.ts +57 -43
  185. package/types/entity/GeoObject.d.ts +111 -0
  186. package/types/entity/GeoObjectHandler.d.ts +77 -0
  187. package/types/entity/Geometry.d.ts +9 -7
  188. package/types/entity/GeometryHandler.d.ts +2 -2
  189. package/types/entity/Label.d.ts +24 -29
  190. package/types/entity/LabelHandler.d.ts +9 -2
  191. package/types/entity/LabelWorker.d.ts +9 -0
  192. package/types/entity/PointCloud.d.ts +8 -8
  193. package/types/entity/PointCloudHandler.d.ts +3 -3
  194. package/types/entity/Polyline.d.ts +58 -55
  195. package/types/entity/Ray.d.ts +19 -18
  196. package/types/entity/Strip.d.ts +8 -7
  197. package/types/entity/StripHandler.d.ts +3 -3
  198. package/types/entity/index.d.ts +7 -7
  199. package/types/input/KeyboardHandler.d.ts +10 -0
  200. package/types/input/MouseHandler.d.ts +5 -0
  201. package/types/input/TouchHandler.d.ts +5 -0
  202. package/types/layer/BaseGeoImage.d.ts +23 -35
  203. package/types/layer/CanvasTiles.d.ts +15 -22
  204. package/types/layer/GeoImage.d.ts +5 -18
  205. package/types/layer/GeoVideo.d.ts +5 -30
  206. package/types/layer/KML.d.ts +20 -15
  207. package/types/layer/Layer.d.ts +326 -0
  208. package/types/layer/Material.d.ts +45 -0
  209. package/types/layer/Vector.d.ts +208 -0
  210. package/types/layer/WMS.d.ts +4 -7
  211. package/types/layer/XYZ.d.ts +19 -25
  212. package/types/light/LightSource.d.ts +54 -53
  213. package/types/math/Line2.d.ts +11 -0
  214. package/types/math/Line3.d.ts +10 -0
  215. package/types/math/Mat3.d.ts +30 -18
  216. package/types/math/Mat4.d.ts +71 -52
  217. package/types/math/Plane.d.ts +5 -4
  218. package/types/math/Quat.d.ts +379 -0
  219. package/types/math/Ray.d.ts +82 -0
  220. package/types/math/Vec2.d.ts +102 -101
  221. package/types/math/Vec3.d.ts +143 -142
  222. package/types/math/Vec4.d.ts +40 -39
  223. package/types/math/coder.d.ts +12 -11
  224. package/types/math.d.ts +8 -8
  225. package/types/mercator.d.ts +3 -3
  226. package/types/proj/EPSG3857.d.ts +3 -2
  227. package/types/proj/EPSG4326.d.ts +3 -2
  228. package/types/proj/Proj.d.ts +42 -0
  229. package/types/quadTree/EntityCollectionNode.d.ts +34 -0
  230. package/types/quadTree/Node.d.ts +61 -0
  231. package/types/renderer/Renderer.d.ts +300 -0
  232. package/types/renderer/RendererEvents.d.ts +10 -7
  233. package/types/scene/BaseNode.d.ts +9 -9
  234. package/types/scene/Planet.d.ts +131 -126
  235. package/types/scene/RenderNode.d.ts +22 -23
  236. package/types/segment/Segment.d.ts +279 -0
  237. package/types/segment/SegmentLonLat.d.ts +16 -0
  238. package/types/shaders/geoObject.d.ts +3 -0
  239. package/types/shapes/BaseShape.d.ts +43 -40
  240. package/types/shapes/Sphere.d.ts +7 -7
  241. package/types/terrain/BilTerrain.d.ts +0 -1
  242. package/types/terrain/EmptyTerrain.d.ts +4 -4
  243. package/types/terrain/GlobusTerrain.d.ts +17 -54
  244. package/types/terrain/MapboxTerrain.d.ts +0 -1
  245. package/types/utils/GeoImageCreator.d.ts +3 -2
  246. package/types/utils/TextureAtlas.d.ts +8 -8
  247. package/types/utils/shared.d.ts +25 -24
  248. package/types/webgl/Framebuffer.d.ts +5 -5
  249. package/types/webgl/Handler.d.ts +68 -43
  250. package/types/webgl/Multisample.d.ts +5 -5
  251. package/types/webgl/Program.d.ts +8 -2
  252. package/types/webgl/ProgramController.d.ts +18 -13
  253. package/src/og/inherits.js +0 -8
  254. package/src/og/utils/polylabel.js +0 -176
  255. package/types/inherits.d.ts +0 -4
@@ -2,7 +2,7 @@
2
2
  * PointCloud object.
3
3
  * @class
4
4
  * @param {*} [options] - Point cloud options:
5
- * @param {Array.<Array.<number,number,number,number,number,number,number,*>>} [options.points] - Points cartesian coordinates array,
5
+ * @param {Array.<Array.<number>>} [options.points] - Points cartesian coordinates array,
6
6
  * where first three is cartesian coordinates, next fourth is a RGBA color, and last is an point properties.
7
7
  * @param {number} [options.pointSize] - Point screen size in pixels.
8
8
  * @param {number} [options.pickingDistance] - Point border picking size in screen pixels.
@@ -50,13 +50,13 @@ export class PointCloud {
50
50
  /**
51
51
  * Parent collection render node.
52
52
  * @private
53
- * @type {og.scene.RenderNode}
53
+ * @type {RenderNode}
54
54
  */
55
55
  private _renderNode;
56
56
  /**
57
57
  * Entity instance that holds this point cloud.
58
58
  * @private
59
- * @type {og.Entity}
59
+ * @type {Entity}
60
60
  */
61
61
  private _entity;
62
62
  /**
@@ -89,7 +89,7 @@ export class PointCloud {
89
89
  /**
90
90
  * Handler that stores and renders this object.
91
91
  * @private
92
- * @type {og.PointCloudHandler}
92
+ * @type {PointCloudHandler}
93
93
  */
94
94
  private _handler;
95
95
  _handlerIndex: number;
@@ -120,9 +120,9 @@ export class PointCloud {
120
120
  /**
121
121
  * Assign rendering scene node.
122
122
  * @public
123
- * @param {og.scene.RenderNode} renderNode - Assigned render node.
123
+ * @param {RenderNode} renderNode - Assigned render node.
124
124
  */
125
- public setRenderNode(renderNode: any): void;
125
+ public setRenderNode(renderNode: RenderNode): void;
126
126
  /**
127
127
  * Removes from entity.
128
128
  * @public
@@ -131,11 +131,11 @@ export class PointCloud {
131
131
  /**
132
132
  * Adds points to render.
133
133
  * @public
134
- * @param {Array.<Array<number,number,number,number,number,number,number,*>>} points - Point cloud array.
134
+ * @param {Array.<Array<number>>} points - Point cloud array.
135
135
  * @example
136
136
  * var points = [[0, 0, 0, 255, 255, 255, 255, { 'name': 'White point' }], [100, 100, 0, 255, 0, 0, 255, { 'name': 'Red point' }]];
137
137
  */
138
- public setPoints(points: Array<Array<number, number, number, number, number, number, number, any>>): void;
138
+ public setPoints(points: Array<Array<number>>): void;
139
139
  setPointPosition(index: any, x: any, y: any, z: any): void;
140
140
  setPointColor(index: any, r: any, g: any, b: any, a: any): void;
141
141
  addPoints(points: any): void;
@@ -11,19 +11,19 @@ export class PointCloudHandler {
11
11
  /**
12
12
  * Parent collection
13
13
  * @private
14
- * @type {og.EntityCollection}
14
+ * @type {EntityCollection}
15
15
  */
16
16
  private _entityCollection;
17
17
  /**
18
18
  * Renderer
19
19
  * @private
20
- * @type {og.Renderer}
20
+ * @type {Renderer}
21
21
  */
22
22
  private _renderer;
23
23
  /**
24
24
  * Point cloud array
25
25
  * @private
26
- * @type {Array.<og.PointCloud>}
26
+ * @type {Array.<PointCloud>}
27
27
  */
28
28
  private _pointClouds;
29
29
  __staticId: number;
@@ -4,63 +4,63 @@
4
4
  * @param {Object} [options] - Polyline options:
5
5
  * @param {number} [options.thickness] - Thickness in screen pixels 1.5 is default.
6
6
  * @param {Number} [options.altitude] - Relative to ground layers altitude value.
7
- * @param {og.Vec4} [options.color] - RGBA color.
7
+ * @param {Vec4} [options.color] - RGBA color.
8
8
  * @param {Boolean} [options.opacity] - Line opacity.
9
9
  * @param {Boolean} [options.visibility] - Polyline visibility. True default.
10
10
  * @param {Boolean} [options.isClosed] - Closed geometry type identificator.
11
- * @param {Array.<Array.<number,number,number>>} [options.pathLonLat] - Polyline geodetic coordinates array.
12
- * @param {Array.<Array.<number,number,number>>} [options.path3v] - LinesString cartesian coordinates array. [[0,0,0], [1,1,1],...]
13
- * @param {Array.<Array.<number,number,number, number>>} [options.pathColors] - Coordinates color. [[1,0,0,1], [0,1,0,1],...] for right and green colors.
11
+ * @param {Array.<Array.<number>>} [options.pathLonLat] - Polyline geodetic coordinates array. [[0,0,0], [1,1,1],...]
12
+ * @param {Array.<Array.<number>>} [options.path3v] - LinesString cartesian coordinates array. [[0,0,0], [1,1,1],...]
13
+ * @param {Array.<Array.<number>>} [options.pathColors] - Coordinates color. [[1,0,0,1], [0,1,0,1],...] for right and green colors.
14
14
  */
15
15
  export class Polyline {
16
16
  static set _staticCounter(arg: any);
17
17
  static get _staticCounter(): any;
18
18
  /**
19
19
  * Appends to the line array new cartesian coordinates line data.
20
- * @param {Array.<Array.<number, number, number>>} path3v - Line coordinates path array.
20
+ * @param {Array.<Array.<number>>} path3v - Line coordinates path array. [[0,0,0], [1,1,1],...]
21
21
  * @param {Boolean} isClosed - Identificator for the closed line data creation.
22
22
  * @param {Number[]} outVertices - Out vertices data array.
23
23
  * @param {Number[]} outOrders - Out vertices orders data array.
24
24
  * @param {Number[]} outIndexes - Out vertices indexes data array.
25
- * @param {og.Ellipsoid} [ellipsoid] - Ellipsoid to coordinates transformation.
26
- * @param {Array.<Array.<og.LonLat>>} [outTransformedPathLonLat] - Geodetic coordinates out array.
27
- * @param {Array.<Array.<og.LonLat>>} [outPath3v] - Cartesian coordinates out array.
28
- * @param {Array.<Array.<og.LonLat>>} [outTransformedPathMerc] - Mercator coordinates out array.
29
- * @param {og.Extent} [outExtent] - Geodetic line extent.
25
+ * @param {Ellipsoid} [ellipsoid] - Ellipsoid to coordinates transformation.
26
+ * @param {Array.<Array.<LonLat>>} [outTransformedPathLonLat] - Geodetic coordinates out array.
27
+ * @param {Array.<Array.<LonLat>>} [outPath3v] - Cartesian coordinates out array.
28
+ * @param {Array.<Array.<LonLat>>} [outTransformedPathMerc] - Mercator coordinates out array.
29
+ * @param {Extent} [outExtent] - Geodetic line extent.
30
30
  * @param {Array} [outColors]
31
31
  * @static
32
32
  */
33
- static appendLineData3v(path3v: Array<Array<number, number, number>>, pathColors: any, defaultColor: any, isClosed: boolean, outVerticesHigh: any, outVerticesLow: any, outOrders: number[], outIndexes: number[], ellipsoid?: any, outTransformedPathLonLat?: Array<Array<any>>, outPath3v?: Array<Array<any>>, outTransformedPathMerc?: Array<Array<any>>, outExtent?: any, outColors?: any[]): void;
33
+ static appendLineData3v(path3v: Array<Array<number>>, pathColors: any, defaultColor: any, isClosed: boolean, outVerticesHigh: any, outVerticesLow: any, outOrders: number[], outIndexes: number[], ellipsoid?: Ellipsoid, outTransformedPathLonLat?: Array<Array<LonLat>>, outPath3v?: Array<Array<LonLat>>, outTransformedPathMerc?: Array<Array<LonLat>>, outExtent?: Extent, outColors?: any[]): void;
34
34
  /**
35
35
  * Appends to the line new cartesian coordinates point data.
36
- * @param {Array.<Array.<number, number, number>>} path3v - Line coordinates path array.
36
+ * @param {Array.<Array.<number>>} path3v - Line coordinates path array. [[0,0,0], [1,1,1],...]
37
37
  * @param {Boolean} isClosed - Identificator for the closed line data creation.
38
38
  * @param {Number[]} outVertices - Out vertices data array.
39
39
  * @param {Number[]} outOrders - Out vertices orders data array.
40
40
  * @param {Number[]} outIndexes - Out vertices indexes data array.
41
- * @param {og.Ellipsoid} [ellipsoid] - Ellipsoid to coordinates transformation.
42
- * @param {Array.<Array.<og.LonLat>>} [outTransformedPathLonLat] - Geodetic coordinates out array.
43
- * @param {Array.<Array.<og.LonLat>>} [outPath3v] - Cartesian coordinates out array.
44
- * @param {Array.<Array.<og.LonLat>>} [outTransformedPathMerc] - Mercator coordinates out array.
45
- * @param {og.Extent} [outExtent] - Geodetic line extent.
41
+ * @param {Ellipsoid} [ellipsoid] - Ellipsoid to coordinates transformation.
42
+ * @param {Array.<Array.<LonLat>>} [outTransformedPathLonLat] - Geodetic coordinates out array.
43
+ * @param {Array.<Array.<LonLat>>} [outPath3v] - Cartesian coordinates out array.
44
+ * @param {Array.<Array.<LonLat>>} [outTransformedPathMerc] - Mercator coordinates out array.
45
+ * @param {Extent} [outExtent] - Geodetic line extent.
46
46
  * @static
47
47
  */
48
- static appendPoint3v(path3v: Array<Array<number, number, number>>, point3v: any, pathColors: any, color: any, isClosed: boolean, outVerticesHigh: any, outVerticesLow: any, outColors: any, outOrders: number[], outIndexes: number[], ellipsoid?: any, outTransformedPathLonLat?: Array<Array<any>>, outTransformedPathMerc?: Array<Array<any>>, outExtent?: any): void;
48
+ static appendPoint3v(path3v: Array<Array<number>>, point3v: any, pathColors: any, color: any, isClosed: boolean, outVerticesHigh: any, outVerticesLow: any, outColors: any, outOrders: number[], outIndexes: number[], ellipsoid?: Ellipsoid, outTransformedPathLonLat?: Array<Array<LonLat>>, outTransformedPathMerc?: Array<Array<LonLat>>, outExtent?: Extent): void;
49
49
  /**
50
50
  * Appends to the line array new geodetic coordinates line data.
51
- * @param {Array.<Array.<number, number, number>>} pathLonLat - Line geodetic coordinates path array.
51
+ * @param {Array.<Array.<number>>} pathLonLat - Line geodetic coordinates path array. [[0,0,0], [1,1,1],...]
52
52
  * @param {Boolean} isClosed - Identificator for the closed line data creation.
53
53
  * @param {Number[]} outVertices - Out vertices data array.
54
54
  * @param {Number[]} outOrders - Out vertices orders data array.
55
55
  * @param {Number[]} outIndexes - Out indexes data array.
56
- * @param {og.Ellipsoid} ellipsoid - Ellipsoid to coordinates transformation.
57
- * @param {Array.<Array.<Number, Number, Number>>} outTransformedPathCartesian - Cartesian coordinates out array.
58
- * @param {Array.<Array.<og.LonLat>>} outPathLonLat - Geographic coordinates out array.
59
- * @param {Array.<Array.<og.LonLat>>} outTransformedPathMerc - Mercator coordinates out array.
60
- * @param {og.Extent} outExtent - Geodetic line extent.
56
+ * @param {Ellipsoid} ellipsoid - Ellipsoid to coordinates transformation.
57
+ * @param {Array.<Array.<number>>} outTransformedPathCartesian - Cartesian coordinates out array. [[0,0,0], [1,1,1],...]
58
+ * @param {Array.<Array.<LonLat>>} outPathLonLat - Geographic coordinates out array.
59
+ * @param {Array.<Array.<LonLat>>} outTransformedPathMerc - Mercator coordinates out array.
60
+ * @param {Extent} outExtent - Geodetic line extent.
61
61
  * @static
62
62
  */
63
- static appendLineDataLonLat(pathLonLat: Array<Array<number, number, number>>, pathColors: any, defaultColor: any, isClosed: boolean, outVerticesHigh: any, outVerticesLow: any, outOrders: number[], outIndexes: number[], ellipsoid: any, outTransformedPathCartesian: Array<Array<number, number, number>>, outPathLonLat: Array<Array<any>>, outTransformedPathMerc: Array<Array<any>>, outExtent: any, outColors: any): void;
63
+ static appendLineDataLonLat(pathLonLat: Array<Array<number>>, pathColors: any, defaultColor: any, isClosed: boolean, outVerticesHigh: any, outVerticesLow: any, outOrders: number[], outIndexes: number[], ellipsoid: Ellipsoid, outTransformedPathCartesian: Array<Array<number>>, outPathLonLat: Array<Array<LonLat>>, outTransformedPathMerc: Array<Array<LonLat>>, outExtent: Extent, outColors: any): void;
64
64
  constructor(options: any);
65
65
  /**
66
66
  * Object unic identifier.
@@ -79,9 +79,9 @@ export class Polyline {
79
79
  /**
80
80
  * Polyline RGBA color.
81
81
  * @public
82
- * @type {Array<Number,Number,Number,Number>}
82
+ * @type {Array<number>} - (exactly 4 entries)
83
83
  */
84
- public _defaultColor: Array<number, number, number, number>;
84
+ public _defaultColor: Array<number>;
85
85
  /**
86
86
  * Polyline visibility.
87
87
  * @public
@@ -97,29 +97,29 @@ export class Polyline {
97
97
  /**
98
98
  * Polyline cartesian coordinates.
99
99
  * @private
100
- * @type {Array.<og.Vec3>}
100
+ * @type {Array.<Vec3>}
101
101
  */
102
102
  private _path3v;
103
103
  _pathLengths: any[];
104
104
  /**
105
105
  * Polyline geodetic degrees coordiantes.
106
106
  * @private
107
- * @type {Array.<og.LonLat>}
107
+ * @type {Array.<LonLat>}
108
108
  */
109
109
  private _pathLonLat;
110
110
  /**
111
111
  * Polyline geodetic mercator coordinates.
112
112
  * @private
113
- * @type {Array.<og.LonLat>}
113
+ * @type {Array.<LonLat>}
114
114
  */
115
115
  private _pathLonLatMerc;
116
116
  _pathColors: any;
117
117
  /**
118
118
  * Polyline geodetic extent.
119
119
  * @protected
120
- * @type {og.Extent}
120
+ * @type {Extent}
121
121
  */
122
- protected _extent: any;
122
+ protected _extent: Extent;
123
123
  _verticesHigh: any[];
124
124
  _verticesLow: any[];
125
125
  _orders: any[];
@@ -135,13 +135,13 @@ export class Polyline {
135
135
  /**
136
136
  * Entity instance that holds this Polyline.
137
137
  * @private
138
- * @type {og.Entity}
138
+ * @type {Entity}
139
139
  */
140
140
  private _entity;
141
141
  /**
142
142
  * Handler that stores and renders this Polyline object.
143
143
  * @private
144
- * @type {og.PolylineHandler}
144
+ * @type {PolylineHandler}
145
145
  */
146
146
  private _handler;
147
147
  _handlerIndex: number;
@@ -152,13 +152,13 @@ export class Polyline {
152
152
  * @protected
153
153
  * @param {pg.math.Vector3[]} path3v - Cartesian coordinates.
154
154
  */
155
- protected _setEqualPath3v(path3v: any[]): void;
155
+ protected _setEqualPath3v(path3v: pg.math.Vector3[]): void;
156
156
  /**
157
157
  * Sets polyline with geodetic coordinates.
158
158
  * @protected
159
- * @param {og.LonLat[]} pathLonLat - Geodetic polyline path coordinates.
159
+ * @param {LonLat[]} pathLonLat - Geodetic polyline path coordinates.
160
160
  */
161
- protected _setEqualPathLonLat(pathLonLat: any[]): void;
161
+ protected _setEqualPathLonLat(pathLonLat: LonLat[]): void;
162
162
  setPointLonLat(lonlat: any, index: any, segmentIndex: any): void;
163
163
  setPoint3v(coordinates: any, index: any, segmentIndex: any, skipLonLat: any): void;
164
164
  _resizePathLengths(index?: number): void;
@@ -168,23 +168,23 @@ export class Polyline {
168
168
  /**
169
169
  * Adds a new cartesian point in the end of the path in a last line segment.
170
170
  * @public
171
- * @param {og.Vec3} point3v - New coordinate.
171
+ * @param {Vec3} point3v - New coordinate.
172
172
  */
173
- public appendPoint3v(point3v: any, color: any, skipEllipsoid: any): void;
173
+ public appendPoint3v(point3v: Vec3, color: any, skipEllipsoid: any): void;
174
174
  /**
175
175
  * Adds a new cartesian point in the end of the path.
176
176
  * @public
177
- * @param {og.Vec3} point3v - New coordinate.
177
+ * @param {Vec3} point3v - New coordinate.
178
178
  * @param {number} [multiLineIndex=0] - Path part index, first by default.
179
179
  */
180
- public addPoint3v(point3v: any, multiLineIndex?: number): void;
180
+ public addPoint3v(point3v: Vec3, multiLineIndex?: number): void;
181
181
  /**
182
182
  * Adds a new geodetic point in the end of the path.
183
183
  * @public
184
- * @param {og.LonLat} lonLat - New coordinate.
184
+ * @param {LonLat} lonLat - New coordinate.
185
185
  * @param {number} [multiLineIndex=0] - Path part index, first by default.
186
186
  */
187
- public addPointLonLat(lonLat: any, multiLineIndex?: number): void;
187
+ public addPointLonLat(lonLat: LonLat, multiLineIndex?: number): void;
188
188
  /**
189
189
  * Clear Polyline object data.
190
190
  * @public
@@ -224,9 +224,9 @@ export class Polyline {
224
224
  /**
225
225
  * Assign with render node.
226
226
  * @public
227
- * @param {og.scene.RenderNode} renderNode -
227
+ * @param {RenderNode} renderNode -
228
228
  */
229
- public setRenderNode(renderNode: any): void;
229
+ public setRenderNode(renderNode: RenderNode): void;
230
230
  /**
231
231
  * @protected
232
232
  */
@@ -242,36 +242,36 @@ export class Polyline {
242
242
  /**
243
243
  * Returns polyline geodetic extent.
244
244
  * @public
245
- * @returns {og.Extent} - Geodetic extent
245
+ * @returns {Extent} - Geodetic extent
246
246
  */
247
- public getExtent(): any;
247
+ public getExtent(): Extent;
248
248
  /**
249
249
  * Returns path cartesian coordinates.
250
- * @return {Array.<og.Vec3>} Polyline path.
250
+ * @return {Array.<Vec3>} Polyline path.
251
251
  */
252
- getPath3v(): Array<any>;
252
+ getPath3v(): Array<Vec3>;
253
253
  /**
254
254
  * Returns geodetic path coordinates.
255
- * @return {Array.<og.LonLat>} Polyline path.
255
+ * @return {Array.<LonLat>} Polyline path.
256
256
  */
257
- getPathLonLat(): Array<any>;
257
+ getPathLonLat(): Array<LonLat>;
258
258
  getPathColors(): any;
259
259
  setPathColors(pathColors: any): void;
260
260
  setColorHTML(htmlColor: any): void;
261
261
  /**
262
262
  * Sets geodetic coordinates.
263
263
  * @public
264
- * @param {Array.<Array.<number,number,number>>} pathLonLat - Polyline path cartesian coordinates.
264
+ * @param {Array.<Array.<number>>} pathLonLat - Polyline path cartesian coordinates. (exactly 3 entries)
265
265
  * @param {Boolean} [forceEqual=false] - Makes assigning faster for size equal coordinates array.
266
266
  */
267
- public setPathLonLat(pathLonLat: Array<Array<number, number, number>>, forceEqual?: boolean): void;
267
+ public setPathLonLat(pathLonLat: Array<Array<number>>, forceEqual?: boolean): void;
268
268
  /**
269
269
  * Sets Polyline cartesian coordinates.
270
270
  * @public
271
- * @param {Array.<Array.<number,number,number>>} path3v - Polyline path cartesian coordinates.
271
+ * @param {Array.<Array.<number>>} path3v - Polyline path cartesian coordinates. (exactly 3 entries)
272
272
  * @param {Boolean} [forceEqual=false] - Makes assigning faster for size equal coordinates array.
273
273
  */
274
- public setPath3v(path3v: Array<Array<number, number, number>>, pathColors: any, forceEqual?: boolean): void;
274
+ public setPath3v(path3v: Array<Array<number>>, pathColors: any, forceEqual?: boolean): void;
275
275
  draw(): void;
276
276
  drawPicking(): void;
277
277
  /**
@@ -301,3 +301,6 @@ export class Polyline {
301
301
  protected _createIndexBuffer(): void;
302
302
  _createColorsBuffer(): void;
303
303
  }
304
+ import { Extent } from "../Extent.js";
305
+ import { LonLat } from "../LonLat.js";
306
+ import { Vec3 } from "../math/Vec3.js";
@@ -2,10 +2,10 @@
2
2
  * Ray class.
3
3
  * @class
4
4
  * @param {Object} [options] - Options:
5
- * @param {og.Vec3|Array.<number>} [options.startPosition] - Ray start point position.
6
- * @param {og.Vec3|Array.<number>} [options.endPosition] - Ray end point position.
7
- * @param {og.Vec3|Array.<number>} [options.startColor] - Ray start point color.
8
- * @param {og.Vec3|Array.<number>} [options.endColor] - Ray end point color.
5
+ * @param {Vec3|Array.<number>} [options.startPosition] - Ray start point position.
6
+ * @param {Vec3|Array.<number>} [options.endPosition] - Ray end point position.
7
+ * @param {Vec3|Array.<number>} [options.startColor] - Ray start point color.
8
+ * @param {Vec3|Array.<number>} [options.endColor] - Ray end point color.
9
9
  * @param {boolean} [options.visibility] - Visibility.
10
10
  */
11
11
  export class Ray {
@@ -37,15 +37,15 @@ export class Ray {
37
37
  /**
38
38
  * Entity instance that holds this billboard.
39
39
  * @protected
40
- * @type {og.Entity}
40
+ * @type {Entity}
41
41
  */
42
- protected _entity: any;
42
+ protected _entity: Entity;
43
43
  /**
44
44
  * Handler that stores and renders this billboard object.
45
45
  * @protected
46
- * @type {og.BillboardHandler}
46
+ * @type {BillboardHandler}
47
47
  */
48
- protected _handler: any;
48
+ protected _handler: BillboardHandler;
49
49
  /**
50
50
  * Billboard handler array index.
51
51
  * @protected
@@ -63,9 +63,9 @@ export class Ray {
63
63
  /**
64
64
  * Sets ray start position.
65
65
  * @public
66
- * @param {og.Vec3} position - Cartesian coordinates.
66
+ * @param {Vec3} position - Cartesian coordinates.
67
67
  */
68
- public setStartPosition3v(position: any): void;
68
+ public setStartPosition3v(position: Vec3): void;
69
69
  /**
70
70
  * Sets ray end position.
71
71
  * @public
@@ -77,9 +77,9 @@ export class Ray {
77
77
  /**
78
78
  * Sets ray end position.
79
79
  * @public
80
- * @param {og.Vec3} position - Cartesian coordinates.
80
+ * @param {Vec3} position - Cartesian coordinates.
81
81
  */
82
- public setEndPosition3v(position: any): void;
82
+ public setEndPosition3v(position: Vec3): void;
83
83
  setLength(length: any): void;
84
84
  setThickness(thickness: any): void;
85
85
  setColors4v(startColor: any, endColor: any): void;
@@ -87,15 +87,15 @@ export class Ray {
87
87
  /**
88
88
  * Returns ray start position.
89
89
  * @public
90
- * @returns {og.Vec3}
90
+ * @returns {Vec3}
91
91
  */
92
- public getStartPosition(): any;
92
+ public getStartPosition(): Vec3;
93
93
  /**
94
94
  * Returns ray end position.
95
95
  * @public
96
- * @returns {og.Vec3}
96
+ * @returns {Vec3}
97
97
  */
98
- public getEndPosition(): any;
98
+ public getEndPosition(): Vec3;
99
99
  /**
100
100
  * Sets billboard visibility.
101
101
  * @public
@@ -116,8 +116,9 @@ export class Ray {
116
116
  /**
117
117
  * Sets billboard picking color.
118
118
  * @public
119
- * @param {og.Vec3} color - Picking color.
119
+ * @param {Vec3} color - Picking color.
120
120
  */
121
- public setPickingColor3v(color: any): void;
121
+ public setPickingColor3v(color: Vec3): void;
122
122
  }
123
123
  import { Vec3 } from "../math/Vec3.js";
124
+ import { Entity } from "./Entity.js";
@@ -35,13 +35,13 @@ export class Strip {
35
35
  /**
36
36
  * Parent collection render node.
37
37
  * @private
38
- * @type {og.scene.RenderNode}
38
+ * @type {RenderNode}
39
39
  */
40
40
  private _renderNode;
41
41
  /**
42
42
  * Entity instance that holds this strip.
43
43
  * @private
44
- * @type {og.Entity}
44
+ * @type {Entity}
45
45
  */
46
46
  private _entity;
47
47
  _verticesHighBuffer: any;
@@ -56,16 +56,16 @@ export class Strip {
56
56
  /**
57
57
  * Handler that stores and renders this object.
58
58
  * @private
59
- * @type {og.StripHandler}
59
+ * @type {StripHandler}
60
60
  */
61
61
  private _handler;
62
62
  _handlerIndex: number;
63
63
  /**
64
64
  * Assign picking color.
65
65
  * @protected
66
- * @param {og.Vec3} color - Picking RGB color.
66
+ * @param {Vec3} color - Picking RGB color.
67
67
  */
68
- protected setPickingColor3v(color: any): void;
68
+ protected setPickingColor3v(color: Vec3): void;
69
69
  /**
70
70
  * Clears object
71
71
  * @public
@@ -91,9 +91,9 @@ export class Strip {
91
91
  /**
92
92
  * Assign rendering scene node.
93
93
  * @public
94
- * @param {og.scene.RenderNode} renderNode - Assigned render node.
94
+ * @param {RenderNode} renderNode - Assigned render node.
95
95
  */
96
- public setRenderNode(renderNode: any): void;
96
+ public setRenderNode(renderNode: RenderNode): void;
97
97
  /**
98
98
  * Removes from entity.
99
99
  * @public
@@ -116,3 +116,4 @@ export class Strip {
116
116
  setPath(path: any): void;
117
117
  insertEdge3v(p0: any, p1: any, index: any): void;
118
118
  }
119
+ import { Vec3 } from "../math/Vec3.js";
@@ -11,19 +11,19 @@ export class StripHandler {
11
11
  /**
12
12
  * Parent collection
13
13
  * @private
14
- * @type {og.EntityCollection}
14
+ * @type {EntityCollection}
15
15
  */
16
16
  private _entityCollection;
17
17
  /**
18
18
  * Renderer
19
19
  * @private
20
- * @type {og.Renderer}
20
+ * @type {Renderer}
21
21
  */
22
22
  private _renderer;
23
23
  /**
24
24
  * Point cloud array
25
25
  * @private
26
- * @type {Array.<og.Strip>}
26
+ * @type {Array.<Strip>}
27
27
  */
28
28
  private _strips;
29
29
  __staticId: number;
@@ -1,8 +1,8 @@
1
- import { Entity } from "./Entity";
2
- import { EntityCollection } from "./EntityCollection";
3
- import { Billboard } from "./Billboard";
4
- import { Geometry } from "./Geometry";
5
- import { Label } from "./Label";
6
- import { PointCloud } from "./PointCloud";
7
- import { Polyline } from "./Polyline";
1
+ import { Entity } from "./Entity.js";
2
+ import { EntityCollection } from "./EntityCollection.js";
3
+ import { Billboard } from "./Billboard.js";
4
+ import { Geometry } from "./Geometry.js";
5
+ import { Label } from "./Label.js";
6
+ import { PointCloud } from "./PointCloud.js";
7
+ import { Polyline } from "./Polyline.js";
8
8
  export { Entity, EntityCollection, Billboard, Geometry, Label, PointCloud, Polyline };
@@ -0,0 +1,10 @@
1
+ export class KeyboardHandler {
2
+ removeEvent: (events: any, callback: any) => void;
3
+ setActivity: (activity: any) => void;
4
+ releaseKeys: () => void;
5
+ addEvent: (event: any, sender: any, callback: any, keyCode: any, priority: any) => void;
6
+ isKeyPressed: (keyCode: any) => any;
7
+ handleKeyDown: () => void;
8
+ handleKeyUp: () => void;
9
+ handleEvents: () => void;
10
+ }
@@ -0,0 +1,5 @@
1
+ export class MouseHandler {
2
+ constructor(htmlObject: any);
3
+ _htmlObject: any;
4
+ setEvent(event: any, sender: any, callback: any): void;
5
+ }
@@ -0,0 +1,5 @@
1
+ export class TouchHandler {
2
+ constructor(htmlObject: any);
3
+ _htmlObject: any;
4
+ setEvent(event: any, sender: any, callback: any): void;
5
+ }