@math.gl/core 3.6.3 → 4.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/dist/classes/base/math-array.d.ts +5 -4
  2. package/dist/classes/base/math-array.d.ts.map +1 -1
  3. package/dist/{esm/classes → classes}/base/math-array.js +8 -3
  4. package/dist/classes/base/math-array.js.map +1 -0
  5. package/dist/classes/base/matrix.d.ts +2 -2
  6. package/dist/classes/base/matrix.d.ts.map +1 -1
  7. package/dist/{esm/classes → classes}/base/matrix.js +4 -4
  8. package/dist/classes/base/matrix.js.map +1 -0
  9. package/dist/classes/base/vector.d.ts +2 -2
  10. package/dist/classes/base/vector.d.ts.map +1 -1
  11. package/dist/{esm/classes → classes}/base/vector.js +4 -4
  12. package/dist/classes/base/vector.js.map +1 -0
  13. package/dist/classes/euler.d.ts +4 -4
  14. package/dist/classes/euler.d.ts.map +1 -1
  15. package/dist/{esm/classes → classes}/euler.js +6 -6
  16. package/dist/classes/euler.js.map +1 -0
  17. package/dist/classes/matrix3.d.ts +5 -2
  18. package/dist/classes/matrix3.d.ts.map +1 -1
  19. package/dist/{esm/classes → classes}/matrix3.js +20 -20
  20. package/dist/classes/matrix3.js.map +1 -0
  21. package/dist/classes/matrix4.d.ts +2 -2
  22. package/dist/classes/matrix4.d.ts.map +1 -1
  23. package/dist/{esm/classes → classes}/matrix4.js +27 -27
  24. package/dist/classes/matrix4.js.map +1 -0
  25. package/dist/classes/pose.d.ts +4 -4
  26. package/dist/classes/pose.d.ts.map +1 -1
  27. package/dist/{esm/classes → classes}/pose.js +4 -4
  28. package/dist/classes/pose.js.map +1 -0
  29. package/dist/classes/quaternion.d.ts +2 -2
  30. package/dist/classes/quaternion.d.ts.map +1 -1
  31. package/dist/{esm/classes → classes}/quaternion.js +26 -26
  32. package/dist/classes/quaternion.js.map +1 -0
  33. package/dist/classes/spherical-coordinates.d.ts +2 -2
  34. package/dist/classes/spherical-coordinates.d.ts.map +1 -1
  35. package/dist/{esm/classes → classes}/spherical-coordinates.js +5 -5
  36. package/dist/classes/spherical-coordinates.js.map +1 -0
  37. package/dist/classes/vector2.d.ts +2 -2
  38. package/dist/classes/vector2.d.ts.map +1 -1
  39. package/dist/{esm/classes → classes}/vector2.js +10 -10
  40. package/dist/classes/vector2.js.map +1 -0
  41. package/dist/classes/vector3.d.ts +2 -2
  42. package/dist/classes/vector3.d.ts.map +1 -1
  43. package/dist/{esm/classes → classes}/vector3.js +14 -14
  44. package/dist/classes/vector3.js.map +1 -0
  45. package/dist/classes/vector4.d.ts +3 -3
  46. package/dist/classes/vector4.d.ts.map +1 -1
  47. package/dist/{esm/classes → classes}/vector4.js +8 -8
  48. package/dist/classes/vector4.js.map +1 -0
  49. package/dist/gl-matrix/common.d.ts +38 -0
  50. package/dist/gl-matrix/common.d.ts.map +1 -0
  51. package/dist/gl-matrix/common.js +19 -0
  52. package/dist/gl-matrix/common.js.map +1 -0
  53. package/dist/gl-matrix/mat3.d.ts +295 -0
  54. package/dist/gl-matrix/mat3.d.ts.map +1 -0
  55. package/dist/gl-matrix/mat3.js +489 -0
  56. package/dist/gl-matrix/mat3.js.map +1 -0
  57. package/dist/gl-matrix/mat4.d.ts +577 -0
  58. package/dist/gl-matrix/mat4.d.ts.map +1 -0
  59. package/dist/gl-matrix/mat4.js +1455 -0
  60. package/dist/gl-matrix/mat4.js.map +1 -0
  61. package/dist/gl-matrix/quat.d.ts +357 -0
  62. package/dist/gl-matrix/quat.d.ts.map +1 -0
  63. package/dist/gl-matrix/quat.js +315 -0
  64. package/dist/gl-matrix/quat.js.map +1 -0
  65. package/dist/gl-matrix/vec2.d.ts +373 -0
  66. package/dist/gl-matrix/vec2.d.ts.map +1 -0
  67. package/dist/gl-matrix/vec2.js +257 -0
  68. package/dist/gl-matrix/vec2.js.map +1 -0
  69. package/dist/gl-matrix/vec3.d.ts +416 -0
  70. package/dist/gl-matrix/vec3.d.ts.map +1 -0
  71. package/dist/gl-matrix/vec3.js +384 -0
  72. package/dist/gl-matrix/vec3.js.map +1 -0
  73. package/dist/gl-matrix/vec4.d.ts +340 -0
  74. package/dist/gl-matrix/vec4.d.ts.map +1 -0
  75. package/dist/gl-matrix/vec4.js +334 -0
  76. package/dist/gl-matrix/vec4.js.map +1 -0
  77. package/dist/gl-matrix/wip/index.d.ts +5 -0
  78. package/dist/gl-matrix/wip/index.d.ts.map +1 -0
  79. package/dist/gl-matrix/wip/index.js +12 -0
  80. package/dist/gl-matrix/wip/index.js.map +1 -0
  81. package/dist/gl-matrix/wip/mat2.d.ts +229 -0
  82. package/dist/gl-matrix/wip/mat2.d.ts.map +1 -0
  83. package/dist/gl-matrix/wip/mat2.js +208 -0
  84. package/dist/gl-matrix/wip/mat2.js.map +1 -0
  85. package/dist/gl-matrix/wip/mat2d.d.ts +244 -0
  86. package/dist/gl-matrix/wip/mat2d.d.ts.map +1 -0
  87. package/dist/gl-matrix/wip/mat2d.js +251 -0
  88. package/dist/gl-matrix/wip/mat2d.js.map +1 -0
  89. package/dist/gl-matrix/wip/quat2.d.ts +352 -0
  90. package/dist/gl-matrix/wip/quat2.d.ts.map +1 -0
  91. package/dist/gl-matrix/wip/quat2.js +482 -0
  92. package/dist/gl-matrix/wip/quat2.js.map +1 -0
  93. package/dist/gl-matrix/wip/types.d.js +2 -0
  94. package/dist/{esm/lib/gl-matrix.d.js.map → gl-matrix/wip/types.d.js.map} +1 -1
  95. package/dist/index.cjs +3788 -0
  96. package/dist/index.d.ts +15 -14
  97. package/dist/index.d.ts.map +1 -1
  98. package/dist/index.js +17 -0
  99. package/dist/index.js.map +1 -0
  100. package/dist/lib/assert.d.ts +1 -1
  101. package/dist/lib/assert.d.ts.map +1 -1
  102. package/dist/lib/assert.js +6 -0
  103. package/dist/lib/assert.js.map +1 -0
  104. package/dist/lib/common.d.ts +10 -5
  105. package/dist/lib/common.d.ts.map +1 -1
  106. package/dist/{esm/lib → lib}/common.js +11 -9
  107. package/dist/lib/common.js.map +1 -0
  108. package/dist/lib/gl-matrix-extras.js.map +1 -0
  109. package/dist/lib/math-utils.d.ts +24 -27
  110. package/dist/lib/math-utils.d.ts.map +1 -1
  111. package/dist/lib/math-utils.js +25 -0
  112. package/dist/lib/math-utils.js.map +1 -0
  113. package/dist/lib/validators.d.ts +1 -1
  114. package/dist/lib/validators.d.ts.map +1 -1
  115. package/dist/{esm/lib → lib}/validators.js +2 -2
  116. package/dist/lib/validators.js.map +1 -0
  117. package/package.json +6 -6
  118. package/src/classes/base/math-array.ts +16 -8
  119. package/src/classes/base/matrix.ts +7 -4
  120. package/src/classes/base/vector.ts +4 -4
  121. package/src/classes/euler.ts +9 -8
  122. package/src/classes/matrix3.ts +37 -24
  123. package/src/classes/matrix4.ts +48 -29
  124. package/src/classes/pose.ts +4 -4
  125. package/src/classes/quaternion.ts +54 -32
  126. package/src/classes/spherical-coordinates.ts +5 -4
  127. package/src/classes/vector2.ts +13 -9
  128. package/src/classes/vector3.ts +26 -12
  129. package/src/classes/vector4.ts +14 -10
  130. package/src/gl-matrix/common.js +58 -0
  131. package/src/gl-matrix/mat3.js +842 -0
  132. package/src/gl-matrix/mat4.js +2169 -0
  133. package/src/gl-matrix/quat.ts +789 -0
  134. package/src/gl-matrix/vec2.js +629 -0
  135. package/src/gl-matrix/vec3.js +827 -0
  136. package/src/gl-matrix/vec4.js +675 -0
  137. package/src/gl-matrix/wip/index.js +15 -0
  138. package/src/gl-matrix/wip/mat2.js +442 -0
  139. package/src/gl-matrix/wip/mat2d.js +505 -0
  140. package/src/gl-matrix/wip/quat2.ts +886 -0
  141. package/src/gl-matrix/wip/types.d.ts +93 -0
  142. package/src/index.ts +16 -14
  143. package/src/lib/assert.ts +1 -1
  144. package/src/lib/common.ts +31 -19
  145. package/src/lib/math-utils.ts +24 -26
  146. package/src/lib/validators.ts +3 -3
  147. package/dist/es5/classes/base/math-array.js +0 -348
  148. package/dist/es5/classes/base/math-array.js.map +0 -1
  149. package/dist/es5/classes/base/matrix.js +0 -108
  150. package/dist/es5/classes/base/matrix.js.map +0 -1
  151. package/dist/es5/classes/base/vector.js +0 -210
  152. package/dist/es5/classes/base/vector.js.map +0 -1
  153. package/dist/es5/classes/euler.js +0 -654
  154. package/dist/es5/classes/euler.js.map +0 -1
  155. package/dist/es5/classes/matrix3.js +0 -284
  156. package/dist/es5/classes/matrix3.js.map +0 -1
  157. package/dist/es5/classes/matrix4.js +0 -574
  158. package/dist/es5/classes/matrix4.js.map +0 -1
  159. package/dist/es5/classes/pose.js +0 -159
  160. package/dist/es5/classes/pose.js.map +0 -1
  161. package/dist/es5/classes/quaternion.js +0 -323
  162. package/dist/es5/classes/quaternion.js.map +0 -1
  163. package/dist/es5/classes/spherical-coordinates.js +0 -208
  164. package/dist/es5/classes/spherical-coordinates.js.map +0 -1
  165. package/dist/es5/classes/vector2.js +0 -156
  166. package/dist/es5/classes/vector2.js.map +0 -1
  167. package/dist/es5/classes/vector3.js +0 -213
  168. package/dist/es5/classes/vector3.js.map +0 -1
  169. package/dist/es5/classes/vector4.js +0 -185
  170. package/dist/es5/classes/vector4.js.map +0 -1
  171. package/dist/es5/docs/README.md +0 -0
  172. package/dist/es5/index.js +0 -236
  173. package/dist/es5/index.js.map +0 -1
  174. package/dist/es5/lib/assert.js +0 -13
  175. package/dist/es5/lib/assert.js.map +0 -1
  176. package/dist/es5/lib/common.js +0 -255
  177. package/dist/es5/lib/common.js.map +0 -1
  178. package/dist/es5/lib/gl-matrix-extras.js +0 -61
  179. package/dist/es5/lib/gl-matrix-extras.js.map +0 -1
  180. package/dist/es5/lib/gl-matrix.d.js +0 -2
  181. package/dist/es5/lib/math-utils.js +0 -34
  182. package/dist/es5/lib/math-utils.js.map +0 -1
  183. package/dist/es5/lib/validators.js +0 -53
  184. package/dist/es5/lib/validators.js.map +0 -1
  185. package/dist/esm/classes/base/math-array.js.map +0 -1
  186. package/dist/esm/classes/base/matrix.js.map +0 -1
  187. package/dist/esm/classes/base/vector.js.map +0 -1
  188. package/dist/esm/classes/euler.js.map +0 -1
  189. package/dist/esm/classes/matrix3.js.map +0 -1
  190. package/dist/esm/classes/matrix4.js.map +0 -1
  191. package/dist/esm/classes/pose.js.map +0 -1
  192. package/dist/esm/classes/quaternion.js.map +0 -1
  193. package/dist/esm/classes/spherical-coordinates.js.map +0 -1
  194. package/dist/esm/classes/vector2.js.map +0 -1
  195. package/dist/esm/classes/vector3.js.map +0 -1
  196. package/dist/esm/classes/vector4.js.map +0 -1
  197. package/dist/esm/docs/README.md +0 -0
  198. package/dist/esm/index.js +0 -16
  199. package/dist/esm/index.js.map +0 -1
  200. package/dist/esm/lib/assert.js +0 -6
  201. package/dist/esm/lib/assert.js.map +0 -1
  202. package/dist/esm/lib/common.js.map +0 -1
  203. package/dist/esm/lib/gl-matrix-extras.js.map +0 -1
  204. package/dist/esm/lib/math-utils.js +0 -27
  205. package/dist/esm/lib/math-utils.js.map +0 -1
  206. package/dist/esm/lib/validators.js.map +0 -1
  207. package/src/docs/README.md +0 -0
  208. /package/dist/{esm/lib → lib}/gl-matrix-extras.js +0 -0
  209. /package/dist/{esm/lib → lib}/gl-matrix.d.js +0 -0
  210. /package/dist/{es5/lib → lib}/gl-matrix.d.js.map +0 -0
@@ -0,0 +1,416 @@
1
+ /**
2
+ * 3 Dimensional Vector
3
+ * @module vec3
4
+ */
5
+ /**
6
+ * Creates a new, empty vec3
7
+ *
8
+ * @returns {vec3} a new 3D vector
9
+ */
10
+ export function create(): vec3;
11
+ /**
12
+ * Creates a new vec3 initialized with values from an existing vector
13
+ *
14
+ * @param {ReadonlyVec3} a vector to clone
15
+ * @returns {vec3} a new 3D vector
16
+ */
17
+ export function clone(a: ReadonlyVec3): vec3;
18
+ /**
19
+ * Calculates the length of a vec3
20
+ *
21
+ * @param {ReadonlyVec3} a vector to calculate length of
22
+ * @returns {Number} length of a
23
+ */
24
+ export function length(a: ReadonlyVec3): number;
25
+ /**
26
+ * Creates a new vec3 initialized with the given values
27
+ *
28
+ * @param {Number} x X component
29
+ * @param {Number} y Y component
30
+ * @param {Number} z Z component
31
+ * @returns {vec3} a new 3D vector
32
+ */
33
+ export function fromValues(x: number, y: number, z: number): vec3;
34
+ /**
35
+ * Copy the values from one vec3 to another
36
+ *
37
+ * @param {vec3} out the receiving vector
38
+ * @param {ReadonlyVec3} a the source vector
39
+ * @returns {vec3} out
40
+ */
41
+ export function copy(out: vec3, a: ReadonlyVec3): vec3;
42
+ /**
43
+ * Set the components of a vec3 to the given values
44
+ *
45
+ * @param {vec3} out the receiving vector
46
+ * @param {Number} x X component
47
+ * @param {Number} y Y component
48
+ * @param {Number} z Z component
49
+ * @returns {vec3} out
50
+ */
51
+ export function set(out: vec3, x: number, y: number, z: number): vec3;
52
+ /**
53
+ * Adds two vec3's
54
+ *
55
+ * @param {vec3} out the receiving vector
56
+ * @param {ReadonlyVec3} a the first operand
57
+ * @param {ReadonlyVec3} b the second operand
58
+ * @returns {vec3} out
59
+ */
60
+ export function add(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
61
+ /**
62
+ * Subtracts vector b from vector a
63
+ *
64
+ * @param {vec3} out the receiving vector
65
+ * @param {ReadonlyVec3} a the first operand
66
+ * @param {ReadonlyVec3} b the second operand
67
+ * @returns {vec3} out
68
+ */
69
+ export function subtract(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
70
+ /**
71
+ * Multiplies two vec3's
72
+ *
73
+ * @param {vec3} out the receiving vector
74
+ * @param {ReadonlyVec3} a the first operand
75
+ * @param {ReadonlyVec3} b the second operand
76
+ * @returns {vec3} out
77
+ */
78
+ export function multiply(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
79
+ /**
80
+ * Divides two vec3's
81
+ *
82
+ * @param {vec3} out the receiving vector
83
+ * @param {ReadonlyVec3} a the first operand
84
+ * @param {ReadonlyVec3} b the second operand
85
+ * @returns {vec3} out
86
+ */
87
+ export function divide(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
88
+ /**
89
+ * Math.ceil the components of a vec3
90
+ *
91
+ * @param {vec3} out the receiving vector
92
+ * @param {ReadonlyVec3} a vector to ceil
93
+ * @returns {vec3} out
94
+ */
95
+ export function ceil(out: vec3, a: ReadonlyVec3): vec3;
96
+ /**
97
+ * Math.floor the components of a vec3
98
+ *
99
+ * @param {vec3} out the receiving vector
100
+ * @param {ReadonlyVec3} a vector to floor
101
+ * @returns {vec3} out
102
+ */
103
+ export function floor(out: vec3, a: ReadonlyVec3): vec3;
104
+ /**
105
+ * Returns the minimum of two vec3's
106
+ *
107
+ * @param {vec3} out the receiving vector
108
+ * @param {ReadonlyVec3} a the first operand
109
+ * @param {ReadonlyVec3} b the second operand
110
+ * @returns {vec3} out
111
+ */
112
+ export function min(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
113
+ /**
114
+ * Returns the maximum of two vec3's
115
+ *
116
+ * @param {vec3} out the receiving vector
117
+ * @param {ReadonlyVec3} a the first operand
118
+ * @param {ReadonlyVec3} b the second operand
119
+ * @returns {vec3} out
120
+ */
121
+ export function max(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
122
+ /**
123
+ * symmetric round the components of a vec3
124
+ *
125
+ * @param {vec3} out the receiving vector
126
+ * @param {ReadonlyVec3} a vector to round
127
+ * @returns {vec3} out
128
+ */
129
+ export function round(out: vec3, a: ReadonlyVec3): vec3;
130
+ /**
131
+ * Scales a vec3 by a scalar number
132
+ *
133
+ * @param {vec3} out the receiving vector
134
+ * @param {ReadonlyVec3} a the vector to scale
135
+ * @param {Number} b amount to scale the vector by
136
+ * @returns {vec3} out
137
+ */
138
+ export function scale(out: vec3, a: ReadonlyVec3, b: number): vec3;
139
+ /**
140
+ * Adds two vec3's after scaling the second operand by a scalar value
141
+ *
142
+ * @param {vec3} out the receiving vector
143
+ * @param {ReadonlyVec3} a the first operand
144
+ * @param {ReadonlyVec3} b the second operand
145
+ * @param {Number} scale the amount to scale b by before adding
146
+ * @returns {vec3} out
147
+ */
148
+ export function scaleAndAdd(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, scale: number): vec3;
149
+ /**
150
+ * Calculates the euclidian distance between two vec3's
151
+ *
152
+ * @param {ReadonlyVec3} a the first operand
153
+ * @param {ReadonlyVec3} b the second operand
154
+ * @returns {Number} distance between a and b
155
+ */
156
+ export function distance(a: ReadonlyVec3, b: ReadonlyVec3): number;
157
+ /**
158
+ * Calculates the squared euclidian distance between two vec3's
159
+ *
160
+ * @param {ReadonlyVec3} a the first operand
161
+ * @param {ReadonlyVec3} b the second operand
162
+ * @returns {Number} squared distance between a and b
163
+ */
164
+ export function squaredDistance(a: ReadonlyVec3, b: ReadonlyVec3): number;
165
+ /**
166
+ * Calculates the squared length of a vec3
167
+ *
168
+ * @param {ReadonlyVec3} a vector to calculate squared length of
169
+ * @returns {Number} squared length of a
170
+ */
171
+ export function squaredLength(a: ReadonlyVec3): number;
172
+ /**
173
+ * Negates the components of a vec3
174
+ *
175
+ * @param {vec3} out the receiving vector
176
+ * @param {ReadonlyVec3} a vector to negate
177
+ * @returns {vec3} out
178
+ */
179
+ export function negate(out: vec3, a: ReadonlyVec3): vec3;
180
+ /**
181
+ * Returns the inverse of the components of a vec3
182
+ *
183
+ * @param {vec3} out the receiving vector
184
+ * @param {ReadonlyVec3} a vector to invert
185
+ * @returns {vec3} out
186
+ */
187
+ export function inverse(out: vec3, a: ReadonlyVec3): vec3;
188
+ /**
189
+ * Normalize a vec3
190
+ *
191
+ * @param {vec3} out the receiving vector
192
+ * @param {ReadonlyVec3} a vector to normalize
193
+ * @returns {vec3} out
194
+ */
195
+ export function normalize(out: vec3, a: ReadonlyVec3): vec3;
196
+ /**
197
+ * Calculates the dot product of two vec3's
198
+ *
199
+ * @param {ReadonlyVec3} a the first operand
200
+ * @param {ReadonlyVec3} b the second operand
201
+ * @returns {Number} dot product of a and b
202
+ */
203
+ export function dot(a: ReadonlyVec3, b: ReadonlyVec3): number;
204
+ /**
205
+ * Computes the cross product of two vec3's
206
+ *
207
+ * @param {vec3} out the receiving vector
208
+ * @param {ReadonlyVec3} a the first operand
209
+ * @param {ReadonlyVec3} b the second operand
210
+ * @returns {vec3} out
211
+ */
212
+ export function cross(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
213
+ /**
214
+ * Performs a linear interpolation between two vec3's
215
+ *
216
+ * @param {vec3} out the receiving vector
217
+ * @param {ReadonlyVec3} a the first operand
218
+ * @param {ReadonlyVec3} b the second operand
219
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
220
+ * @returns {vec3} out
221
+ */
222
+ export function lerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: number): vec3;
223
+ /**
224
+ * Performs a spherical linear interpolation between two vec3's
225
+ *
226
+ * @param {vec3} out the receiving vector
227
+ * @param {ReadonlyVec3} a the first operand
228
+ * @param {ReadonlyVec3} b the second operand
229
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
230
+ * @returns {vec3} out
231
+ */
232
+ export function slerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: number): vec3;
233
+ /**
234
+ * Performs a hermite interpolation with two control points
235
+ *
236
+ * @param {vec3} out the receiving vector
237
+ * @param {ReadonlyVec3} a the first operand
238
+ * @param {ReadonlyVec3} b the second operand
239
+ * @param {ReadonlyVec3} c the third operand
240
+ * @param {ReadonlyVec3} d the fourth operand
241
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
242
+ * @returns {vec3} out
243
+ */
244
+ export function hermite(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: number): vec3;
245
+ /**
246
+ * Performs a bezier interpolation with two control points
247
+ *
248
+ * @param {vec3} out the receiving vector
249
+ * @param {ReadonlyVec3} a the first operand
250
+ * @param {ReadonlyVec3} b the second operand
251
+ * @param {ReadonlyVec3} c the third operand
252
+ * @param {ReadonlyVec3} d the fourth operand
253
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
254
+ * @returns {vec3} out
255
+ */
256
+ export function bezier(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: number): vec3;
257
+ /**
258
+ * Generates a random vector with the given scale
259
+ *
260
+ * @param {vec3} out the receiving vector
261
+ * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned
262
+ * @returns {vec3} out
263
+ */
264
+ export function random(out: vec3, scale?: number): vec3;
265
+ /**
266
+ * Transforms the vec3 with a mat4.
267
+ * 4th vector component is implicitly '1'
268
+ *
269
+ * @param {vec3} out the receiving vector
270
+ * @param {ReadonlyVec3} a the vector to transform
271
+ * @param {ReadonlyMat4} m matrix to transform with
272
+ * @returns {vec3} out
273
+ */
274
+ export function transformMat4(out: vec3, a: ReadonlyVec3, m: ReadonlyMat4): vec3;
275
+ /**
276
+ * Transforms the vec3 with a mat3.
277
+ *
278
+ * @param {vec3} out the receiving vector
279
+ * @param {ReadonlyVec3} a the vector to transform
280
+ * @param {ReadonlyMat3} m the 3x3 matrix to transform with
281
+ * @returns {vec3} out
282
+ */
283
+ export function transformMat3(out: vec3, a: ReadonlyVec3, m: ReadonlyMat3): vec3;
284
+ /**
285
+ * Transforms the vec3 with a quat
286
+ * Can also be used for dual quaternions. (Multiply it with the real part)
287
+ *
288
+ * @param {vec3} out the receiving vector
289
+ * @param {ReadonlyVec3} a the vector to transform
290
+ * @param {ReadonlyQuat} q quaternion to transform with
291
+ * @returns {vec3} out
292
+ */
293
+ export function transformQuat(out: vec3, a: ReadonlyVec3, q: ReadonlyQuat): vec3;
294
+ /**
295
+ * Rotate a 3D vector around the x-axis
296
+ * @param {vec3} out The receiving vec3
297
+ * @param {ReadonlyVec3} a The vec3 point to rotate
298
+ * @param {ReadonlyVec3} b The origin of the rotation
299
+ * @param {Number} rad The angle of rotation in radians
300
+ * @returns {vec3} out
301
+ */
302
+ export function rotateX(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: number): vec3;
303
+ /**
304
+ * Rotate a 3D vector around the y-axis
305
+ * @param {vec3} out The receiving vec3
306
+ * @param {ReadonlyVec3} a The vec3 point to rotate
307
+ * @param {ReadonlyVec3} b The origin of the rotation
308
+ * @param {Number} rad The angle of rotation in radians
309
+ * @returns {vec3} out
310
+ */
311
+ export function rotateY(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: number): vec3;
312
+ /**
313
+ * Rotate a 3D vector around the z-axis
314
+ * @param {vec3} out The receiving vec3
315
+ * @param {ReadonlyVec3} a The vec3 point to rotate
316
+ * @param {ReadonlyVec3} b The origin of the rotation
317
+ * @param {Number} rad The angle of rotation in radians
318
+ * @returns {vec3} out
319
+ */
320
+ export function rotateZ(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: number): vec3;
321
+ /**
322
+ * Get the angle between two 3D vectors
323
+ * @param {ReadonlyVec3} a The first operand
324
+ * @param {ReadonlyVec3} b The second operand
325
+ * @returns {Number} The angle in radians
326
+ */
327
+ export function angle(a: ReadonlyVec3, b: ReadonlyVec3): number;
328
+ /**
329
+ * Set the components of a vec3 to zero
330
+ *
331
+ * @param {vec3} out the receiving vector
332
+ * @returns {vec3} out
333
+ */
334
+ export function zero(out: vec3): vec3;
335
+ /**
336
+ * Returns a string representation of a vector
337
+ *
338
+ * @param {ReadonlyVec3} a vector to represent as a string
339
+ * @returns {String} string representation of the vector
340
+ */
341
+ export function str(a: ReadonlyVec3): string;
342
+ /**
343
+ * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)
344
+ *
345
+ * @param {ReadonlyVec3} a The first vector.
346
+ * @param {ReadonlyVec3} b The second vector.
347
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
348
+ */
349
+ export function exactEquals(a: ReadonlyVec3, b: ReadonlyVec3): boolean;
350
+ /**
351
+ * Returns whether or not the vectors have approximately the same elements in the same position.
352
+ *
353
+ * @param {ReadonlyVec3} a The first vector.
354
+ * @param {ReadonlyVec3} b The second vector.
355
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
356
+ */
357
+ export function equals(a: ReadonlyVec3, b: ReadonlyVec3): boolean;
358
+ /**
359
+ * Subtracts vector b from vector a
360
+ *
361
+ * @param {vec3} out the receiving vector
362
+ * @param {ReadonlyVec3} a the first operand
363
+ * @param {ReadonlyVec3} b the second operand
364
+ * @returns {vec3} out
365
+ */
366
+ export function sub(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
367
+ /**
368
+ * Multiplies two vec3's
369
+ *
370
+ * @param {vec3} out the receiving vector
371
+ * @param {ReadonlyVec3} a the first operand
372
+ * @param {ReadonlyVec3} b the second operand
373
+ * @returns {vec3} out
374
+ */
375
+ export function mul(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
376
+ /**
377
+ * Divides two vec3's
378
+ *
379
+ * @param {vec3} out the receiving vector
380
+ * @param {ReadonlyVec3} a the first operand
381
+ * @param {ReadonlyVec3} b the second operand
382
+ * @returns {vec3} out
383
+ */
384
+ export function div(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
385
+ /**
386
+ * Calculates the euclidian distance between two vec3's
387
+ *
388
+ * @param {ReadonlyVec3} a the first operand
389
+ * @param {ReadonlyVec3} b the second operand
390
+ * @returns {Number} distance between a and b
391
+ */
392
+ export function dist(a: ReadonlyVec3, b: ReadonlyVec3): number;
393
+ /**
394
+ * Calculates the squared euclidian distance between two vec3's
395
+ *
396
+ * @param {ReadonlyVec3} a the first operand
397
+ * @param {ReadonlyVec3} b the second operand
398
+ * @returns {Number} squared distance between a and b
399
+ */
400
+ export function sqrDist(a: ReadonlyVec3, b: ReadonlyVec3): number;
401
+ /**
402
+ * Calculates the length of a vec3
403
+ *
404
+ * @param {ReadonlyVec3} a vector to calculate length of
405
+ * @returns {Number} length of a
406
+ */
407
+ export function len(a: ReadonlyVec3): number;
408
+ /**
409
+ * Calculates the squared length of a vec3
410
+ *
411
+ * @param {ReadonlyVec3} a vector to calculate squared length of
412
+ * @returns {Number} squared length of a
413
+ */
414
+ export function sqrLen(a: ReadonlyVec3): number;
415
+ export function forEach(a: any, stride: any, offset: any, count: any, fn: any, arg: any): any;
416
+ //# sourceMappingURL=vec3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec3.d.ts","sourceRoot":"","sources":["../../src/gl-matrix/vec3.js"],"names":[],"mappings":"AAKA;;;GAGG;AAEH;;;;GAIG;AACH,0BAFa,IAAI,CAUhB;AAED;;;;;GAKG;AACH,yBAHW,YAAY,GACV,IAAI,CAQhB;AAED;;;;;GAKG;AACH,0BAHW,YAAY,UAQtB;AAED;;;;;;;GAOG;AACH,6DAFa,IAAI,CAQhB;AAED;;;;;;GAMG;AACH,0BAJW,IAAI,KACJ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;;;GAQG;AACH,yBANW,IAAI,oCAIF,IAAI,CAOhB;AAED;;;;;;;GAOG;AACH,yBALW,IAAI,KACJ,YAAY,KACZ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;;GAOG;AACH,8BALW,IAAI,KACJ,YAAY,KACZ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;;GAOG;AACH,8BALW,IAAI,KACJ,YAAY,KACZ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;;GAOG;AACH,4BALW,IAAI,KACJ,YAAY,KACZ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;GAMG;AACH,0BAJW,IAAI,KACJ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;GAMG;AACH,2BAJW,IAAI,KACJ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;;GAOG;AACH,yBALW,IAAI,KACJ,YAAY,KACZ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;;GAOG;AACH,yBALW,IAAI,KACJ,YAAY,KACZ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;GAMG;AACH,2BAJW,IAAI,KACJ,YAAY,GACV,IAAI,CAOhB;AAED;;;;;;;GAOG;AACH,2BALW,IAAI,KACJ,YAAY,cAEV,IAAI,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