@math.gl/core 4.0.0-alpha.4 → 4.0.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.
- package/dist/gl-matrix/mat3.d.ts +36 -44
- package/dist/gl-matrix/mat3.d.ts.map +1 -1
- package/dist/gl-matrix/mat3.js.map +1 -1
- package/dist/gl-matrix/mat4.d.ts +64 -91
- package/dist/gl-matrix/mat4.d.ts.map +1 -1
- package/dist/gl-matrix/mat4.js.map +1 -1
- package/dist/gl-matrix/quat.d.ts +1 -1
- package/dist/gl-matrix/quat.d.ts.map +1 -1
- package/dist/gl-matrix/vec2.d.ts +169 -179
- package/dist/gl-matrix/vec2.d.ts.map +1 -1
- package/dist/gl-matrix/vec2.js.map +1 -1
- package/dist/gl-matrix/vec3.d.ts +74 -84
- package/dist/gl-matrix/vec3.d.ts.map +1 -1
- package/dist/gl-matrix/vec3.js.map +1 -1
- package/dist/gl-matrix/vec4.d.ts +66 -76
- package/dist/gl-matrix/vec4.d.ts.map +1 -1
- package/dist/gl-matrix/vec4.js.map +1 -1
- package/dist/index.cjs +2215 -211
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/gl-matrix/{vec2.js → vec2.ts} +100 -99
- package/src/index.ts +13 -0
- package/src/lib/gl-matrix.d.ts +2 -0
- /package/src/gl-matrix/{mat3.js → mat3.ts} +0 -0
- /package/src/gl-matrix/{mat4.js → mat4.ts} +0 -0
- /package/src/gl-matrix/{vec3.js → vec3.ts} +0 -0
- /package/src/gl-matrix/{vec4.js → vec4.ts} +0 -0
package/dist/gl-matrix/quat.d.ts
CHANGED
|
@@ -353,5 +353,5 @@ export declare const sqlerp: (out: any, a: any, b: any, c: any, d: any, t: any)
|
|
|
353
353
|
* @param {ReadonlyVec3} up the vector representing the local "up" direction
|
|
354
354
|
* @returns {quat} out
|
|
355
355
|
*/
|
|
356
|
-
export declare const setAxes: (out: any, view: any, right: any, up: any) =>
|
|
356
|
+
export declare const setAxes: (out: any, view: any, right: any, up: any) => any;
|
|
357
357
|
//# sourceMappingURL=quat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quat.d.ts","sourceRoot":"","sources":["../../src/gl-matrix/quat.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC;;;GAGG;AAEH;;;;GAIG;AACH,wBAAgB,MAAM,yBASrB;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,KAAA,OAM3B;AAED;;;;;;;;IAQI;AACJ,wBAAgB,YAAY,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA,EAAE,GAAG,KAAA,OAQ1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,QAAQ,KAAA,EAAE,CAAC,KAAA,UAcvC;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,UAI5B;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,KAAA,EAAE,CAAC,KAAA,EAAE,CAAC,KAAA,OAejC;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,GAAG,KAAA,EAAE,CAAC,KAAA,EAAE,GAAG,KAAA,OAelC;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,GAAG,KAAA,EAAE,CAAC,KAAA,EAAE,GAAG,KAAA,OAelC;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,GAAG,KAAA,EAAE,CAAC,KAAA,EAAE,GAAG,KAAA,OAelC;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,GAAG,KAAA,EAAE,CAAC,KAAA,OAUhC;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,GAAG,KAAA,EAAE,CAAC,KAAA,OAgBzB;AAED;;;;;;GAMG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GAAG,iBAAW,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,GAAG,iBAAW,CAAC;AAE5B;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,mBAAa,CAAC;AAEhC;;;;;;;GAOG;AACH,eAAO,MAAM,GAAG,iBAAW,CAAC;AAE5B;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,kBAAY,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,MAAM,oBAAc,CAAC;AAElC;;;GAGG;AACH,eAAO,MAAM,GAAG,oBAAS,CAAC;AAE1B;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,2BAAqB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,MAAM,2BAAgB,CAAC;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,uBAAiB,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,yBAAmB,CAAC;AAE5C;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,WAE1B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,mCA2BnB,CAAC;AAEL;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,2DAWf,CAAC;AAEL;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,mDAkBhB,CAAC"}
|
package/dist/gl-matrix/vec2.d.ts
CHANGED
|
@@ -5,369 +5,359 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates a new, empty vec2
|
|
7
7
|
*
|
|
8
|
-
* @returns {
|
|
8
|
+
* @returns {NumericArray} a new 2D vector
|
|
9
9
|
*/
|
|
10
|
-
export function create():
|
|
10
|
+
export declare function create(): any[] | Float32Array;
|
|
11
11
|
/**
|
|
12
12
|
* Creates a new vec2 initialized with values from an existing vector
|
|
13
13
|
*
|
|
14
|
-
* @param {
|
|
15
|
-
* @returns {
|
|
14
|
+
* @param {Readonly<NumericArray>} a vector to clone
|
|
15
|
+
* @returns {NumericArray} a new 2D vector
|
|
16
16
|
*/
|
|
17
|
-
export function clone(a:
|
|
17
|
+
export declare function clone(a: any): any[] | Float32Array;
|
|
18
18
|
/**
|
|
19
19
|
* Creates a new vec2 initialized with the given values
|
|
20
20
|
*
|
|
21
21
|
* @param {Number} x X component
|
|
22
22
|
* @param {Number} y Y component
|
|
23
|
-
* @returns {
|
|
23
|
+
* @returns {NumericArray} a new 2D vector
|
|
24
24
|
*/
|
|
25
|
-
export function fromValues(x:
|
|
25
|
+
export declare function fromValues(x: any, y: any): any[] | Float32Array;
|
|
26
26
|
/**
|
|
27
27
|
* Copy the values from one vec2 to another
|
|
28
28
|
*
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {
|
|
31
|
-
* @returns {
|
|
29
|
+
* @param {NumericArray} out the receiving vector
|
|
30
|
+
* @param {Readonly<NumericArray>} a the source vector
|
|
31
|
+
* @returns {NumericArray} out
|
|
32
32
|
*/
|
|
33
|
-
export function copy(out:
|
|
33
|
+
export declare function copy(out: any, a: any): any;
|
|
34
34
|
/**
|
|
35
35
|
* Set the components of a vec2 to the given values
|
|
36
36
|
*
|
|
37
|
-
* @param {
|
|
37
|
+
* @param {NumericArray} out the receiving vector
|
|
38
38
|
* @param {Number} x X component
|
|
39
39
|
* @param {Number} y Y component
|
|
40
|
-
* @returns {
|
|
40
|
+
* @returns {NumericArray} out
|
|
41
41
|
*/
|
|
42
|
-
export function set(out:
|
|
42
|
+
export declare function set(out: any, x: any, y: any): any;
|
|
43
43
|
/**
|
|
44
44
|
* Adds two vec2's
|
|
45
45
|
*
|
|
46
|
-
* @param {
|
|
47
|
-
* @param {
|
|
48
|
-
* @param {
|
|
49
|
-
* @returns {
|
|
46
|
+
* @param {NumericArray} out the receiving vector
|
|
47
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
48
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
49
|
+
* @returns {NumericArray} out
|
|
50
50
|
*/
|
|
51
|
-
export function add(out:
|
|
51
|
+
export declare function add(out: any, a: any, b: any): any;
|
|
52
52
|
/**
|
|
53
53
|
* Subtracts vector b from vector a
|
|
54
54
|
*
|
|
55
|
-
* @param {
|
|
56
|
-
* @param {
|
|
57
|
-
* @param {
|
|
58
|
-
* @returns {
|
|
55
|
+
* @param {NumericArray} out the receiving vector
|
|
56
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
57
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
58
|
+
* @returns {NumericArray} out
|
|
59
59
|
*/
|
|
60
|
-
export function subtract(out:
|
|
60
|
+
export declare function subtract(out: any, a: any, b: any): any;
|
|
61
61
|
/**
|
|
62
62
|
* Multiplies two vec2's
|
|
63
63
|
*
|
|
64
|
-
* @param {
|
|
65
|
-
* @param {
|
|
66
|
-
* @param {
|
|
67
|
-
* @returns {
|
|
64
|
+
* @param {NumericArray} out the receiving vector
|
|
65
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
66
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
67
|
+
* @returns {NumericArray} out
|
|
68
68
|
*/
|
|
69
|
-
export function multiply(out:
|
|
69
|
+
export declare function multiply(out: any, a: any, b: any): any;
|
|
70
70
|
/**
|
|
71
71
|
* Divides two vec2's
|
|
72
72
|
*
|
|
73
|
-
* @param {
|
|
74
|
-
* @param {
|
|
75
|
-
* @param {
|
|
76
|
-
* @returns {
|
|
73
|
+
* @param {NumericArray} out the receiving vector
|
|
74
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
75
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
76
|
+
* @returns {NumericArray} out
|
|
77
77
|
*/
|
|
78
|
-
export function divide(out:
|
|
78
|
+
export declare function divide(out: any, a: any, b: any): any;
|
|
79
79
|
/**
|
|
80
80
|
* Math.ceil the components of a vec2
|
|
81
81
|
*
|
|
82
|
-
* @param {
|
|
83
|
-
* @param {
|
|
84
|
-
* @returns {
|
|
82
|
+
* @param {NumericArray} out the receiving vector
|
|
83
|
+
* @param {Readonly<NumericArray>} a vector to ceil
|
|
84
|
+
* @returns {NumericArray} out
|
|
85
85
|
*/
|
|
86
|
-
export function ceil(out:
|
|
86
|
+
export declare function ceil(out: any, a: any): any;
|
|
87
87
|
/**
|
|
88
88
|
* Math.floor the components of a vec2
|
|
89
89
|
*
|
|
90
|
-
* @param {
|
|
91
|
-
* @param {
|
|
92
|
-
* @returns {
|
|
90
|
+
* @param {NumericArray} out the receiving vector
|
|
91
|
+
* @param {Readonly<NumericArray>} a vector to floor
|
|
92
|
+
* @returns {NumericArray} out
|
|
93
93
|
*/
|
|
94
|
-
export function floor(out:
|
|
94
|
+
export declare function floor(out: any, a: any): any;
|
|
95
95
|
/**
|
|
96
96
|
* Returns the minimum of two vec2's
|
|
97
97
|
*
|
|
98
|
-
* @param {
|
|
99
|
-
* @param {
|
|
100
|
-
* @param {
|
|
101
|
-
* @returns {
|
|
98
|
+
* @param {NumericArray} out the receiving vector
|
|
99
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
100
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
101
|
+
* @returns {NumericArray} out
|
|
102
102
|
*/
|
|
103
|
-
export function min(out:
|
|
103
|
+
export declare function min(out: any, a: any, b: any): any;
|
|
104
104
|
/**
|
|
105
105
|
* Returns the maximum of two vec2's
|
|
106
106
|
*
|
|
107
|
-
* @param {
|
|
108
|
-
* @param {
|
|
109
|
-
* @param {
|
|
110
|
-
* @returns {
|
|
107
|
+
* @param {NumericArray} out the receiving vector
|
|
108
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
109
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
110
|
+
* @returns {NumericArray} out
|
|
111
111
|
*/
|
|
112
|
-
export function max(out:
|
|
112
|
+
export declare function max(out: any, a: any, b: any): any;
|
|
113
113
|
/**
|
|
114
114
|
* symmetric round the components of a vec2
|
|
115
115
|
*
|
|
116
|
-
* @param {
|
|
117
|
-
* @param {
|
|
118
|
-
* @returns {
|
|
116
|
+
* @param {NumericArray} out the receiving vector
|
|
117
|
+
* @param {Readonly<NumericArray>} a vector to round
|
|
118
|
+
* @returns {NumericArray} out
|
|
119
119
|
*/
|
|
120
|
-
export function round(out:
|
|
120
|
+
export declare function round(out: any, a: any): any;
|
|
121
121
|
/**
|
|
122
122
|
* Scales a vec2 by a scalar number
|
|
123
123
|
*
|
|
124
|
-
* @param {
|
|
125
|
-
* @param {
|
|
124
|
+
* @param {NumericArray} out the receiving vector
|
|
125
|
+
* @param {Readonly<NumericArray>} a the vector to scale
|
|
126
126
|
* @param {Number} b amount to scale the vector by
|
|
127
|
-
* @returns {
|
|
127
|
+
* @returns {NumericArray} out
|
|
128
128
|
*/
|
|
129
|
-
export function scale(out:
|
|
129
|
+
export declare function scale(out: any, a: any, b: any): any;
|
|
130
130
|
/**
|
|
131
131
|
* Adds two vec2's after scaling the second operand by a scalar value
|
|
132
132
|
*
|
|
133
|
-
* @param {
|
|
134
|
-
* @param {
|
|
135
|
-
* @param {
|
|
133
|
+
* @param {NumericArray} out the receiving vector
|
|
134
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
135
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
136
136
|
* @param {Number} scale the amount to scale b by before adding
|
|
137
|
-
* @returns {
|
|
137
|
+
* @returns {NumericArray} out
|
|
138
138
|
*/
|
|
139
|
-
export function scaleAndAdd(out:
|
|
139
|
+
export declare function scaleAndAdd(out: any, a: any, b: any, scale: any): any;
|
|
140
140
|
/**
|
|
141
141
|
* Calculates the euclidian distance between two vec2's
|
|
142
142
|
*
|
|
143
|
-
* @param {
|
|
144
|
-
* @param {
|
|
143
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
144
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
145
145
|
* @returns {Number} distance between a and b
|
|
146
146
|
*/
|
|
147
|
-
export function distance(a:
|
|
147
|
+
export declare function distance(a: any, b: any): number;
|
|
148
148
|
/**
|
|
149
149
|
* Calculates the squared euclidian distance between two vec2's
|
|
150
150
|
*
|
|
151
|
-
* @param {
|
|
152
|
-
* @param {
|
|
151
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
152
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
153
153
|
* @returns {Number} squared distance between a and b
|
|
154
154
|
*/
|
|
155
|
-
export function squaredDistance(a:
|
|
155
|
+
export declare function squaredDistance(a: any, b: any): number;
|
|
156
156
|
/**
|
|
157
157
|
* Calculates the length of a vec2
|
|
158
158
|
*
|
|
159
|
-
* @param {
|
|
159
|
+
* @param {Readonly<NumericArray>} a vector to calculate length of
|
|
160
160
|
* @returns {Number} length of a
|
|
161
161
|
*/
|
|
162
|
-
export function length(a:
|
|
162
|
+
export declare function length(a: any): number;
|
|
163
163
|
/**
|
|
164
164
|
* Calculates the squared length of a vec2
|
|
165
165
|
*
|
|
166
|
-
* @param {
|
|
166
|
+
* @param {Readonly<NumericArray>} a vector to calculate squared length of
|
|
167
167
|
* @returns {Number} squared length of a
|
|
168
168
|
*/
|
|
169
|
-
export function squaredLength(a:
|
|
169
|
+
export declare function squaredLength(a: any): number;
|
|
170
170
|
/**
|
|
171
171
|
* Negates the components of a vec2
|
|
172
172
|
*
|
|
173
|
-
* @param {
|
|
174
|
-
* @param {
|
|
175
|
-
* @returns {
|
|
173
|
+
* @param {NumericArray} out the receiving vector
|
|
174
|
+
* @param {Readonly<NumericArray>} a vector to negate
|
|
175
|
+
* @returns {NumericArray} out
|
|
176
176
|
*/
|
|
177
|
-
export function negate(out:
|
|
177
|
+
export declare function negate(out: any, a: any): any;
|
|
178
178
|
/**
|
|
179
179
|
* Returns the inverse of the components of a vec2
|
|
180
180
|
*
|
|
181
|
-
* @param {
|
|
182
|
-
* @param {
|
|
183
|
-
* @returns {
|
|
181
|
+
* @param {NumericArray} out the receiving vector
|
|
182
|
+
* @param {Readonly<NumericArray>} a vector to invert
|
|
183
|
+
* @returns {NumericArray} out
|
|
184
184
|
*/
|
|
185
|
-
export function inverse(out:
|
|
185
|
+
export declare function inverse(out: any, a: any): any;
|
|
186
186
|
/**
|
|
187
187
|
* Normalize a vec2
|
|
188
188
|
*
|
|
189
|
-
* @param {
|
|
190
|
-
* @param {
|
|
191
|
-
* @returns {
|
|
189
|
+
* @param {NumericArray} out the receiving vector
|
|
190
|
+
* @param {Readonly<NumericArray>} a vector to normalize
|
|
191
|
+
* @returns {NumericArray} out
|
|
192
192
|
*/
|
|
193
|
-
export function normalize(out:
|
|
193
|
+
export declare function normalize(out: any, a: any): any;
|
|
194
194
|
/**
|
|
195
195
|
* Calculates the dot product of two vec2's
|
|
196
196
|
*
|
|
197
|
-
* @param {
|
|
198
|
-
* @param {
|
|
197
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
198
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
199
199
|
* @returns {Number} dot product of a and b
|
|
200
200
|
*/
|
|
201
|
-
export function dot(a:
|
|
201
|
+
export declare function dot(a: any, b: any): number;
|
|
202
202
|
/**
|
|
203
203
|
* Computes the cross product of two vec2's
|
|
204
204
|
* Note that the cross product must by definition produce a 3D vector
|
|
205
205
|
*
|
|
206
206
|
* @param {vec3} out the receiving vector
|
|
207
|
-
* @param {
|
|
208
|
-
* @param {
|
|
207
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
208
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
209
209
|
* @returns {vec3} out
|
|
210
210
|
*/
|
|
211
|
-
export function cross(out:
|
|
211
|
+
export declare function cross(out: any, a: any, b: any): any;
|
|
212
212
|
/**
|
|
213
213
|
* Performs a linear interpolation between two vec2's
|
|
214
214
|
*
|
|
215
|
-
* @param {
|
|
216
|
-
* @param {
|
|
217
|
-
* @param {
|
|
215
|
+
* @param {NumericArray} out the receiving vector
|
|
216
|
+
* @param {Readonly<NumericArray>} a the first operand
|
|
217
|
+
* @param {Readonly<NumericArray>} b the second operand
|
|
218
218
|
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
219
|
-
* @returns {
|
|
219
|
+
* @returns {NumericArray} out
|
|
220
220
|
*/
|
|
221
|
-
export function lerp(out:
|
|
221
|
+
export declare function lerp(out: any, a: any, b: any, t: any): any;
|
|
222
222
|
/**
|
|
223
223
|
* Generates a random vector with the given scale
|
|
224
224
|
*
|
|
225
|
-
* @param {
|
|
225
|
+
* @param {NumericArray} out the receiving vector
|
|
226
226
|
* @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned
|
|
227
|
-
* @returns {
|
|
227
|
+
* @returns {NumericArray} out
|
|
228
228
|
*/
|
|
229
|
-
export function random(out:
|
|
229
|
+
export declare function random(out: any, scale: any): any;
|
|
230
230
|
/**
|
|
231
231
|
* Transforms the vec2 with a mat2
|
|
232
232
|
*
|
|
233
|
-
* @param {
|
|
234
|
-
* @param {
|
|
233
|
+
* @param {NumericArray} out the receiving vector
|
|
234
|
+
* @param {Readonly<NumericArray>} a the vector to transform
|
|
235
235
|
* @param {ReadonlyMat2} m matrix to transform with
|
|
236
|
-
* @returns {
|
|
236
|
+
* @returns {NumericArray} out
|
|
237
237
|
*/
|
|
238
|
-
export function transformMat2(out:
|
|
238
|
+
export declare function transformMat2(out: any, a: any, m: any): any;
|
|
239
239
|
/**
|
|
240
240
|
* Transforms the vec2 with a mat2d
|
|
241
241
|
*
|
|
242
|
-
* @param {
|
|
243
|
-
* @param {
|
|
242
|
+
* @param {NumericArray} out the receiving vector
|
|
243
|
+
* @param {Readonly<NumericArray>} a the vector to transform
|
|
244
244
|
* @param {ReadonlyMat2d} m matrix to transform with
|
|
245
|
-
* @returns {
|
|
245
|
+
* @returns {NumericArray} out
|
|
246
246
|
*/
|
|
247
|
-
export function transformMat2d(out:
|
|
247
|
+
export declare function transformMat2d(out: any, a: any, m: any): any;
|
|
248
248
|
/**
|
|
249
249
|
* Transforms the vec2 with a mat3
|
|
250
250
|
* 3rd vector component is implicitly '1'
|
|
251
251
|
*
|
|
252
|
-
* @param {
|
|
253
|
-
* @param {
|
|
252
|
+
* @param {NumericArray} out the receiving vector
|
|
253
|
+
* @param {Readonly<NumericArray>} a the vector to transform
|
|
254
254
|
* @param {ReadonlyMat3} m matrix to transform with
|
|
255
|
-
* @returns {
|
|
255
|
+
* @returns {NumericArray} out
|
|
256
256
|
*/
|
|
257
|
-
export function transformMat3(out:
|
|
257
|
+
export declare function transformMat3(out: any, a: any, m: any): any;
|
|
258
258
|
/**
|
|
259
259
|
* Transforms the vec2 with a mat4
|
|
260
260
|
* 3rd vector component is implicitly '0'
|
|
261
261
|
* 4th vector component is implicitly '1'
|
|
262
262
|
*
|
|
263
|
-
* @param {
|
|
264
|
-
* @param {
|
|
263
|
+
* @param {NumericArray} out the receiving vector
|
|
264
|
+
* @param {Readonly<NumericArray>} a the vector to transform
|
|
265
265
|
* @param {ReadonlyMat4} m matrix to transform with
|
|
266
|
-
* @returns {
|
|
266
|
+
* @returns {NumericArray} out
|
|
267
267
|
*/
|
|
268
|
-
export function transformMat4(out:
|
|
268
|
+
export declare function transformMat4(out: any, a: any, m: any): any;
|
|
269
269
|
/**
|
|
270
270
|
* Rotate a 2D vector
|
|
271
|
-
* @param {
|
|
272
|
-
* @param {
|
|
273
|
-
* @param {
|
|
271
|
+
* @param {NumericArray} out The receiving vec2
|
|
272
|
+
* @param {Readonly<NumericArray>} a The vec2 point to rotate
|
|
273
|
+
* @param {Readonly<NumericArray>} b The origin of the rotation
|
|
274
274
|
* @param {Number} rad The angle of rotation in radians
|
|
275
|
-
* @returns {
|
|
275
|
+
* @returns {NumericArray} out
|
|
276
276
|
*/
|
|
277
|
-
export function rotate(out:
|
|
277
|
+
export declare function rotate(out: any, a: any, b: any, rad: any): any;
|
|
278
278
|
/**
|
|
279
279
|
* Get the angle between two 2D vectors
|
|
280
|
-
* @param {
|
|
281
|
-
* @param {
|
|
280
|
+
* @param {Readonly<NumericArray>} a The first operand
|
|
281
|
+
* @param {Readonly<NumericArray>} b The second operand
|
|
282
282
|
* @returns {Number} The angle in radians
|
|
283
283
|
*/
|
|
284
|
-
export function angle(a:
|
|
284
|
+
export declare function angle(a: any, b: any): number;
|
|
285
285
|
/**
|
|
286
286
|
* Set the components of a vec2 to zero
|
|
287
287
|
*
|
|
288
|
-
* @param {
|
|
289
|
-
* @returns {
|
|
288
|
+
* @param {NumericArray} out the receiving vector
|
|
289
|
+
* @returns {NumericArray} out
|
|
290
290
|
*/
|
|
291
|
-
export function zero(out:
|
|
291
|
+
export declare function zero(out: any): any;
|
|
292
292
|
/**
|
|
293
293
|
* Returns a string representation of a vector
|
|
294
294
|
*
|
|
295
|
-
* @param {
|
|
295
|
+
* @param {Readonly<NumericArray>} a vector to represent as a string
|
|
296
296
|
* @returns {String} string representation of the vector
|
|
297
297
|
*/
|
|
298
|
-
export function str(a:
|
|
298
|
+
export declare function str(a: any): string;
|
|
299
299
|
/**
|
|
300
300
|
* Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)
|
|
301
301
|
*
|
|
302
|
-
* @param {
|
|
303
|
-
* @param {
|
|
302
|
+
* @param {Readonly<NumericArray>} a The first vector.
|
|
303
|
+
* @param {Readonly<NumericArray>} b The second vector.
|
|
304
304
|
* @returns {Boolean} True if the vectors are equal, false otherwise.
|
|
305
305
|
*/
|
|
306
|
-
export function exactEquals(a:
|
|
306
|
+
export declare function exactEquals(a: any, b: any): boolean;
|
|
307
307
|
/**
|
|
308
308
|
* Returns whether or not the vectors have approximately the same elements in the same position.
|
|
309
309
|
*
|
|
310
|
-
* @param {
|
|
311
|
-
* @param {
|
|
310
|
+
* @param {Readonly<NumericArray>} a The first vector.
|
|
311
|
+
* @param {Readonly<NumericArray>} b The second vector.
|
|
312
312
|
* @returns {Boolean} True if the vectors are equal, false otherwise.
|
|
313
313
|
*/
|
|
314
|
-
export function equals(a:
|
|
314
|
+
export declare function equals(a: any, b: any): boolean;
|
|
315
315
|
/**
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* @param {ReadonlyVec2} a vector to calculate length of
|
|
319
|
-
* @returns {Number} length of a
|
|
316
|
+
* Alias for {@link vec2.length}
|
|
317
|
+
* @function
|
|
320
318
|
*/
|
|
321
|
-
export
|
|
319
|
+
export declare const len: typeof length;
|
|
322
320
|
/**
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
* @param {vec2} out the receiving vector
|
|
326
|
-
* @param {ReadonlyVec2} a the first operand
|
|
327
|
-
* @param {ReadonlyVec2} b the second operand
|
|
328
|
-
* @returns {vec2} out
|
|
321
|
+
* Alias for {@link vec2.subtract}
|
|
322
|
+
* @function
|
|
329
323
|
*/
|
|
330
|
-
export
|
|
324
|
+
export declare const sub: typeof subtract;
|
|
331
325
|
/**
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
* @param {vec2} out the receiving vector
|
|
335
|
-
* @param {ReadonlyVec2} a the first operand
|
|
336
|
-
* @param {ReadonlyVec2} b the second operand
|
|
337
|
-
* @returns {vec2} out
|
|
326
|
+
* Alias for {@link vec2.multiply}
|
|
327
|
+
* @function
|
|
338
328
|
*/
|
|
339
|
-
export
|
|
329
|
+
export declare const mul: typeof multiply;
|
|
340
330
|
/**
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
* @param {vec2} out the receiving vector
|
|
344
|
-
* @param {ReadonlyVec2} a the first operand
|
|
345
|
-
* @param {ReadonlyVec2} b the second operand
|
|
346
|
-
* @returns {vec2} out
|
|
331
|
+
* Alias for {@link vec2.divide}
|
|
332
|
+
* @function
|
|
347
333
|
*/
|
|
348
|
-
export
|
|
334
|
+
export declare const div: typeof divide;
|
|
349
335
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* @param {ReadonlyVec2} a the first operand
|
|
353
|
-
* @param {ReadonlyVec2} b the second operand
|
|
354
|
-
* @returns {Number} distance between a and b
|
|
336
|
+
* Alias for {@link vec2.distance}
|
|
337
|
+
* @function
|
|
355
338
|
*/
|
|
356
|
-
export
|
|
339
|
+
export declare const dist: typeof distance;
|
|
357
340
|
/**
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
* @param {ReadonlyVec2} a the first operand
|
|
361
|
-
* @param {ReadonlyVec2} b the second operand
|
|
362
|
-
* @returns {Number} squared distance between a and b
|
|
341
|
+
* Alias for {@link vec2.squaredDistance}
|
|
342
|
+
* @function
|
|
363
343
|
*/
|
|
364
|
-
export
|
|
344
|
+
export declare const sqrDist: typeof squaredDistance;
|
|
365
345
|
/**
|
|
366
|
-
*
|
|
346
|
+
* Alias for {@link vec2.squaredLength}
|
|
347
|
+
* @function
|
|
348
|
+
*/
|
|
349
|
+
export declare const sqrLen: typeof squaredLength;
|
|
350
|
+
/**
|
|
351
|
+
* Perform some operation over an array of vec2s.
|
|
367
352
|
*
|
|
368
|
-
* @param {
|
|
369
|
-
* @
|
|
353
|
+
* @param {Array} a the array of vectors to iterate over
|
|
354
|
+
* @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
|
|
355
|
+
* @param {Number} offset Number of elements to skip at the beginning of the array
|
|
356
|
+
* @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
|
|
357
|
+
* @param {Function} fn Function to call for each vector in the array
|
|
358
|
+
* @param {Object} [arg] additional argument to pass to fn
|
|
359
|
+
* @returns {Array} a
|
|
360
|
+
* @function
|
|
370
361
|
*/
|
|
371
|
-
export
|
|
372
|
-
export function forEach(a: any, stride: any, offset: any, count: any, fn: any, arg: any): any;
|
|
362
|
+
export declare const forEach: (a: any, stride: any, offset: any, count: any, fn: any, arg: any) => any;
|
|
373
363
|
//# sourceMappingURL=vec2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vec2.d.ts","sourceRoot":"","sources":["../../src/gl-matrix/vec2.
|
|
1
|
+
{"version":3,"file":"vec2.d.ts","sourceRoot":"","sources":["../../src/gl-matrix/vec2.ts"],"names":[],"mappings":"AAMA;;;GAGG;AAEH;;;;GAIG;AACH,wBAAgB,MAAM,yBAOrB;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,KAAA,wBA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