@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
@@ -3,9 +3,9 @@
3
3
  * @function
4
4
  * @param {number} [x] - First cvalue.
5
5
  * @param {number} [y] - Second value.
6
- * @returns {og.math.Vec2}
6
+ * @returns {math.Vec2}
7
7
  */
8
- export function vec2(x?: number, y?: number): any;
8
+ export function vec2(x?: number, y?: number): math.Vec2;
9
9
  /**
10
10
  * Class represents a 3d vector.
11
11
  * @class
@@ -26,67 +26,67 @@ export class Vec2 {
26
26
  /**
27
27
  * Returns summary vector.
28
28
  * @static
29
- * @param {og.math.Vec2} a - First vector.
30
- * @param {og.math.Vec2} b - Second vector.
31
- * @returns {og.math.Vec2} - Summary vector.
29
+ * @param {math.Vec2} a - First vector.
30
+ * @param {math.Vec2} b - Second vector.
31
+ * @returns {math.Vec2} - Summary vector.
32
32
  */
33
- static add(a: any, b: any): any;
33
+ static add(a: math.Vec2, b: math.Vec2): math.Vec2;
34
34
  /**
35
35
  * Returns two vectors subtraction.
36
36
  * @static
37
- * @param {og.math.Vec2} a - First vector.
38
- * @param {og.math.Vec2} b - Second vector.
39
- * @returns {og.math.Vec2} - Vectors subtraction.
37
+ * @param {math.Vec2} a - First vector.
38
+ * @param {math.Vec2} b - Second vector.
39
+ * @returns {math.Vec2} - Vectors subtraction.
40
40
  */
41
- static sub(a: any, b: any): any;
41
+ static sub(a: math.Vec2, b: math.Vec2): math.Vec2;
42
42
  /**
43
43
  * Returns scaled vector.
44
44
  * @static
45
- * @param {og.math.Vec2} a - Input vector.
45
+ * @param {math.Vec2} a - Input vector.
46
46
  * @param {number} scale - Scale value.
47
- * @returns {og.math.Vec2}
47
+ * @returns {math.Vec2}
48
48
  */
49
- static scale(a: any, scale: number): any;
49
+ static scale(a: math.Vec2, scale: number): math.Vec2;
50
50
  /**
51
51
  * Returns two vectors production.
52
52
  * @static
53
- * @param {og.math.Vec2} a - First vector.
54
- * @param {og.math.Vec2} b - Second vector.
55
- * @returns {og.math.Vec2}
53
+ * @param {math.Vec2} a - First vector.
54
+ * @param {math.Vec2} b - Second vector.
55
+ * @returns {math.Vec2}
56
56
  */
57
- static mul(a: any, b: any): any;
57
+ static mul(a: math.Vec2, b: math.Vec2): math.Vec2;
58
58
  /**
59
59
  * Returns vector components division product one to another.
60
60
  * @static
61
- * @param {og.math.Vec2} a - First vector.
62
- * @param {og.math.Vec2} b - Second vector.
63
- * @returns {og.math.Vec2}
61
+ * @param {math.Vec2} a - First vector.
62
+ * @param {math.Vec2} b - Second vector.
63
+ * @returns {math.Vec2}
64
64
  */
65
- static div(a: any, b: any): any;
65
+ static div(a: math.Vec2, b: math.Vec2): math.Vec2;
66
66
  /**
67
67
  * Get projection of the first vector to the second.
68
68
  * @static
69
- * @param {og.math.Vec2} b - First vector.
70
- * @param {og.math.Vec2} a - Second vector.
71
- * @returns {og.math.Vec2}
69
+ * @param {math.Vec2} b - First vector.
70
+ * @param {math.Vec2} a - Second vector.
71
+ * @returns {math.Vec2}
72
72
  */
73
- static proj_b_to_a(b: any, a: any): any;
73
+ static proj_b_to_a(b: math.Vec2, a: math.Vec2): math.Vec2;
74
74
  /**
75
75
  * Gets angle between two vectors.
76
76
  * @static
77
- * @param {og.math.Vec2} a - First vector.
78
- * @param {og.math.Vec2} b - Second vector.
77
+ * @param {math.Vec2} a - First vector.
78
+ * @param {math.Vec2} b - Second vector.
79
79
  * @returns {number}
80
80
  */
81
- static angle(a: any, b: any): number;
81
+ static angle(a: math.Vec2, b: math.Vec2): number;
82
82
  /**
83
83
  * Makes vectors normalized and orthogonal to each other.
84
84
  * @static
85
- * @param {og.math.Vec2} normal - Normal vector.
86
- * @param {og.math.Vec2} tangent - Tangent vector.
87
- * @returns {og.math.Vec2}
85
+ * @param {math.Vec2} normal - Normal vector.
86
+ * @param {math.Vec2} tangent - Tangent vector.
87
+ * @returns {math.Vec2}
88
88
  */
89
- static orthoNormalize(normal: any, tangent: any): any;
89
+ static orthoNormalize(normal: math.Vec2, tangent: math.Vec2): math.Vec2;
90
90
  static get LERP_DELTA(): number;
91
91
  constructor(x: any, y: any);
92
92
  /**
@@ -102,28 +102,28 @@ export class Vec2 {
102
102
  /**
103
103
  * Converts to 3d vector, third value is 0.0.
104
104
  * @public
105
- * @returns {og.Vec3}
105
+ * @returns {Vec3}
106
106
  */
107
- public toVector3(): any;
107
+ public toVector3(): Vec3;
108
108
  /**
109
109
  * Returns clone vector.
110
110
  * @public
111
- * @returns {og.math.Vec2}
111
+ * @returns {math.Vec2}
112
112
  */
113
- public clone(): any;
113
+ public clone(): math.Vec2;
114
114
  /**
115
115
  * Compares with vector. Returns true if it equals another.
116
116
  * @public
117
- * @param {og.math.Vec2} p - Vector to compare.
117
+ * @param {math.Vec2} p - Vector to compare.
118
118
  * @returns {boolean}
119
119
  */
120
- public equal(p: any): boolean;
120
+ public equal(p: math.Vec2): boolean;
121
121
  /**
122
122
  * Copy input vector's values.
123
- * @param {og.math.Vec2} point2 - Vector to copy.
124
- * @returns {og.math.Vec2}
123
+ * @param {math.Vec2} point2 - Vector to copy.
124
+ * @returns {math.Vec2}
125
125
  */
126
- copy(point2: any): any;
126
+ copy(point2: math.Vec2): math.Vec2;
127
127
  /**
128
128
  * Gets vector's length.
129
129
  * @public
@@ -139,170 +139,171 @@ export class Vec2 {
139
139
  /**
140
140
  * Adds vector to the current.
141
141
  * @public
142
- * @param {og.math.Vec2}
143
- * @returns {og.math.Vec2}
142
+ * @param {math.Vec2}
143
+ * @returns {math.Vec2}
144
144
  */
145
- public addA(v: any): any;
145
+ public addA(v: any): math.Vec2;
146
146
  /**
147
147
  * Summarize two vectors.
148
148
  * @public
149
- * @param {og.math.Vec2}
150
- * @returns {og.math.Vec2}
149
+ * @param {math.Vec2}
150
+ * @returns {math.Vec2}
151
151
  */
152
- public add(v: any): any;
152
+ public add(v: any): math.Vec2;
153
153
  /**
154
154
  * Subtract vector from the current where results saved on the current instance.
155
155
  * @public
156
- * @param {og.math.Vec2} v - Subtract vector.
157
- * @returns {og.math.Vec2}
156
+ * @param {math.Vec2} v - Subtract vector.
157
+ * @returns {math.Vec2}
158
158
  */
159
- public subA(v: any): any;
159
+ public subA(v: math.Vec2): math.Vec2;
160
160
  /**
161
161
  * Subtract vector from the current.
162
162
  * @public
163
- * @param {og.math.Vec2} v - Subtract vector.
164
- * @returns {og.math.Vec2}
163
+ * @param {math.Vec2} v - Subtract vector.
164
+ * @returns {math.Vec2}
165
165
  */
166
- public sub(v: any): any;
166
+ public sub(v: math.Vec2): math.Vec2;
167
167
  /**
168
168
  * Scale current vector.
169
169
  * @public
170
170
  * @param {number} scale - Scale value.
171
- * @returns {og.math.Vec2}
171
+ * @returns {math.Vec2}
172
172
  */
173
- public scale(scale: number): any;
173
+ public scale(scale: number): math.Vec2;
174
174
  /**
175
175
  * Scale current vector to another instance.
176
176
  * @public
177
177
  * @param {number} scale - Scale value.
178
- * @returns {og.math.Vec2}
178
+ * @returns {math.Vec2}
179
179
  */
180
- public scaleTo(scale: number): any;
180
+ public scaleTo(scale: number): math.Vec2;
181
181
  /**
182
182
  * Multiply current vector object to another and store result in the current instance.
183
183
  * @public
184
- * @param {og.math.Vec2} vec - Multiply vector.
185
- * @returns {og.math.Vec2}
184
+ * @param {math.Vec2} vec - Multiply vector.
185
+ * @returns {math.Vec2}
186
186
  */
187
- public mulA(vec: any): any;
187
+ public mulA(vec: math.Vec2): math.Vec2;
188
188
  /**
189
189
  * Multiply current vector object to another and returns new vector instance.
190
190
  * @public
191
- * @param {og.math.Vec2} vec - Multiply vector.
192
- * @returns {og.math.Vec2}
191
+ * @param {math.Vec2} vec - Multiply vector.
192
+ * @returns {math.Vec2}
193
193
  */
194
- public mul(vec: any): any;
194
+ public mul(vec: math.Vec2): math.Vec2;
195
195
  /**
196
196
  * Divide current vector's components to another. Results stores in the current vector object.
197
197
  * @public
198
- * @param {og.math.Vec2}
199
- * @returns {og.math.Vec2}
198
+ * @param {math.Vec2}
199
+ * @returns {math.Vec2}
200
200
  */
201
- public divA(vec: any): any;
201
+ public divA(vec: any): math.Vec2;
202
202
  /**
203
203
  * Gets vectors dot production.
204
204
  * @public
205
- * @param {og.math.Vec2} v - Another vector.
205
+ * @param {math.Vec2} v - Another vector.
206
206
  * @returns {number}
207
207
  */
208
- public dot(v: any): number;
208
+ public dot(v: math.Vec2): number;
209
209
  /**
210
210
  * Gets vectors dot production.
211
211
  * @public
212
- * @param {Array.<number,number>} arr - Array vector.
212
+ * @param {Array.<number>} arr - Array vector. (exactly 2 entries)
213
213
  * @returns {number}
214
214
  */
215
- public dotArr(arr: Array<number, number>): number;
215
+ public dotArr(arr: Array<number>): number;
216
216
  /**
217
217
  * Gets vectors cross production.
218
218
  * @public
219
- * @param {og.math.Vec2} v - Another vector.
220
- * @returns {og.math.Vec2}
219
+ * @param {math.Vec2} v - Another vector.
220
+ * @returns {math.Vec2}
221
221
  */
222
- public cross(v: any): any;
222
+ public cross(v: math.Vec2): math.Vec2;
223
223
  /**
224
224
  * Sets vector to zero.
225
225
  * @public
226
- * @returns {og.math.Vec2}
226
+ * @returns {math.Vec2}
227
227
  */
228
- public clear(): any;
228
+ public clear(): math.Vec2;
229
229
  /**
230
230
  * Returns normalized vector.
231
231
  * @public
232
- * @returns {og.math.Vec2}
232
+ * @returns {math.Vec2}
233
233
  */
234
- public normal(): any;
234
+ public normal(): math.Vec2;
235
235
  /**
236
236
  * Normalize current vector.
237
237
  * @public
238
- * @returns {og.math.Vec2}
238
+ * @returns {math.Vec2}
239
239
  */
240
- public normalize(): any;
240
+ public normalize(): math.Vec2;
241
241
  /**
242
242
  * Converts vector to a number array.
243
243
  * @public
244
- * @returns {Array.<number,number>}
244
+ * @returns {Array.<number>} - (exactly 2 entries)
245
245
  */
246
- public toVec(): Array<number, number>;
246
+ public toVec(): Array<number>;
247
247
  /**
248
248
  * Gets distance to point.
249
249
  * @public
250
- * @param {og.math.Vec2} p - Distant point.
250
+ * @param {math.Vec2} p - Distant point.
251
251
  * @returns {number}
252
252
  */
253
- public distance(p: any): number;
253
+ public distance(p: math.Vec2): number;
254
254
  /**
255
255
  * Sets vector's values.
256
256
  * @public
257
257
  * @param {number} x - Value X.
258
258
  * @param {number} y - Value Y.
259
- * @returns {og.math.Vec2}
259
+ * @returns {math.Vec2}
260
260
  */
261
- public set(x: number, y: number): any;
261
+ public set(x: number, y: number): math.Vec2;
262
262
  /**
263
263
  * Negate current vector.
264
264
  * @public
265
- * @returns {og.math.Vec2}
265
+ * @returns {math.Vec2}
266
266
  */
267
- public negate(): any;
267
+ public negate(): math.Vec2;
268
268
  /**
269
269
  * Negate current vector to another instance.
270
270
  * @public
271
- * @returns {og.math.Vec2}
271
+ * @returns {math.Vec2}
272
272
  */
273
- public negateTo(): any;
273
+ public negateTo(): math.Vec2;
274
274
  /**
275
275
  * Gets projected point coordinates of the current vector on the ray.
276
276
  * @public
277
- * @param {og.math.Vec2} pos - Ray position.
278
- * @param {og.math.Vec2} direction - Ray direction.
279
- * @returns {og.math.Vec2}
277
+ * @param {math.Vec2} pos - Ray position.
278
+ * @param {math.Vec2} direction - Ray direction.
279
+ * @returns {math.Vec2}
280
280
  */
281
- public projToRay(pos: any, direction: any): any;
281
+ public projToRay(pos: math.Vec2, direction: math.Vec2): math.Vec2;
282
282
  /**
283
283
  * Gets angle between two vectors.
284
284
  * @public
285
- * @param {og.math.Vec2} a - Another vector.
285
+ * @param {math.Vec2} a - Another vector.
286
286
  * @returns {number}
287
287
  */
288
- public angle(a: any): number;
288
+ public angle(a: math.Vec2): number;
289
289
  /**
290
290
  * Returns two vectors linear interpolation.
291
291
  * @public
292
- * @param {og.math.Vec2} v2 - End vector.
292
+ * @param {math.Vec2} v2 - End vector.
293
293
  * @param {number} l - Interpolate value.
294
- * @returns {og.math.Vec2}
294
+ * @returns {math.Vec2}
295
295
  */
296
- public lerp(v1: any, v2: any, l: number): any;
296
+ public lerp(v1: any, v2: math.Vec2, l: number): math.Vec2;
297
297
  /**
298
298
  * Spherically interpolates between two vectors.
299
299
  * Interpolates between current and v2 vector by amount t. The difference between this and linear interpolation (aka, "lerp") is that
300
300
  * the vectors are treated as directions rather than points in space. The direction of the returned vector is interpolated
301
301
  * by the angle and its magnitude is interpolated between the magnitudes of from and to.
302
302
  * @public
303
- * @param {og.math.Vec2} v2 -
303
+ * @param {math.Vec2} v2 -
304
304
  * @param {number} t - The parameter t is clamped to the range [0, 1].
305
- * @returns {og.math.Vec2}
305
+ * @returns {math.Vec2}
306
306
  */
307
- public slerp(v2: any, t: number): any;
307
+ public slerp(v2: math.Vec2, t: number): math.Vec2;
308
308
  }
309
+ import { Vec3 } from "./Vec3.js";