linearly 0.36.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/lib/esm/mat2.d.ts +1 -1
  2. package/lib/esm/mat2.d.ts.map +1 -1
  3. package/lib/esm/mat2.js +3 -2
  4. package/lib/esm/mat2d.d.ts.map +1 -1
  5. package/lib/esm/mat2d.js +4 -5
  6. package/lib/esm/mat3.d.ts.map +1 -1
  7. package/lib/esm/mat3.js +16 -15
  8. package/lib/esm/mat4.d.ts.map +1 -1
  9. package/lib/esm/mat4.js +18 -17
  10. package/lib/esm/quat.js +3 -3
  11. package/lib/esm/scalar.d.ts +6 -35
  12. package/lib/esm/scalar.d.ts.map +1 -1
  13. package/lib/esm/scalar.js +11 -53
  14. package/package.json +9 -4
  15. package/lib/cjs/common.d.ts +0 -16
  16. package/lib/cjs/common.d.ts.map +0 -1
  17. package/lib/cjs/common.js +0 -70
  18. package/lib/cjs/index.d.ts +0 -10
  19. package/lib/cjs/index.d.ts.map +0 -1
  20. package/lib/cjs/index.js +0 -22
  21. package/lib/cjs/mat2.d.ts +0 -272
  22. package/lib/cjs/mat2.d.ts.map +0 -1
  23. package/lib/cjs/mat2.js +0 -473
  24. package/lib/cjs/mat2d.d.ts +0 -329
  25. package/lib/cjs/mat2d.d.ts.map +0 -1
  26. package/lib/cjs/mat2d.js +0 -641
  27. package/lib/cjs/mat3.d.ts +0 -295
  28. package/lib/cjs/mat3.d.ts.map +0 -1
  29. package/lib/cjs/mat3.js +0 -670
  30. package/lib/cjs/mat4.d.ts +0 -532
  31. package/lib/cjs/mat4.d.ts.map +0 -1
  32. package/lib/cjs/mat4.js +0 -1576
  33. package/lib/cjs/quat.d.ts +0 -334
  34. package/lib/cjs/quat.d.ts.map +0 -1
  35. package/lib/cjs/quat.js +0 -802
  36. package/lib/cjs/scalar.d.ts +0 -501
  37. package/lib/cjs/scalar.d.ts.map +0 -1
  38. package/lib/cjs/scalar.js +0 -728
  39. package/lib/cjs/vec2.d.ts +0 -664
  40. package/lib/cjs/vec2.d.ts.map +0 -1
  41. package/lib/cjs/vec2.js +0 -1247
  42. package/lib/cjs/vec3.d.ts +0 -660
  43. package/lib/cjs/vec3.d.ts.map +0 -1
  44. package/lib/cjs/vec3.js +0 -1329
  45. package/lib/cjs/vec4.d.ts +0 -552
  46. package/lib/cjs/vec4.d.ts.map +0 -1
  47. package/lib/cjs/vec4.js +0 -1200
package/lib/cjs/mat2.d.ts DELETED
@@ -1,272 +0,0 @@
1
- import { mat2d } from './mat2d';
2
- import { vec2 } from './vec2';
3
- /**
4
- * Represents 2D transformation excluding translation.
5
- * The format is column-major as in WebGL, so the matrix looks like this:
6
- * ```ts
7
- * [xx, xy,
8
- * yx, yy]
9
- * ```
10
- * @category Types
11
- */
12
- export type mat2 = readonly [m00: number, m01: number, m10: number, m11: number];
13
- /**
14
- * Functions for {@link mat2}, 2D transformation matrix excluding translation.
15
- * @category Modules
16
- */
17
- export declare namespace mat2 {
18
- /**
19
- * Mutable version of {@link mat2}
20
- * @category Types
21
- */
22
- type Mutable = [m00: number, m01: number, m10: number, m11: number];
23
- /**
24
- * Creates a new matrix from given elements
25
- * @category Generators
26
- */
27
- function of(m00: number, m01: number, m10: number, m11: number): mat2;
28
- /**
29
- * Creates a mutable clone of given mat2
30
- * @category Generators
31
- */
32
- function clone(a: mat2): Mutable;
33
- /**
34
- * The identity matrix of mat2.
35
- * ```ts
36
- * [1, 0,
37
- * 0, 1]
38
- * ```
39
- * @category Constants
40
- *
41
- * @shorthands
42
- * - {@link id}
43
- * - {@link ident}
44
- */
45
- const identity: mat2;
46
- /**
47
- * Alias for {@link identity}
48
- * @category Shorthands
49
- */
50
- const I: mat2;
51
- /**
52
- * Alias for {@link identity}
53
- * @category Shorthands
54
- */
55
- const id: mat2;
56
- /**
57
- * Alias for {@link identity}
58
- * @category Shorthands
59
- */
60
- const ident: mat2;
61
- /**
62
- * The mat2 filled with zeros.
63
- * @category Constants
64
- */
65
- const zero: mat2;
66
- /**
67
- * Transpose the values of a mat2
68
- */
69
- function transpose(a: mat2): mat2;
70
- /**
71
- * Inverts a mat2
72
- *
73
- * @shorthands
74
- * - {@link inv}
75
- */
76
- function invert(a: mat2): mat2 | null;
77
- /**
78
- * Alias for {@link invert}
79
- */
80
- const inv: typeof invert;
81
- /**
82
- * Calculates the adjugate of a mat2
83
- */
84
- function adjoint(a: mat2): mat2;
85
- /**
86
- * Calculates the determinant of a mat2
87
- * @returns determinant of a
88
- *
89
- * @shorthands
90
- * - {@link det}
91
- */
92
- function determinant(a: mat2): number;
93
- /**
94
- * Alias for {@link determinant}
95
- * @category Shorthands
96
- */
97
- const det: typeof determinant;
98
- /**
99
- * Multiplies given mat2's
100
- *
101
- * @shorthands
102
- * - {@link mul}
103
- */
104
- function multiply(...ms: mat2[]): mat2;
105
- /**
106
- * Alias for {@link multiply}
107
- * @category Shorthands
108
- */
109
- const mul: typeof multiply;
110
- /**
111
- * Rotates a mat2 by the given angle
112
- *
113
- * @param a the matrix to rotate
114
- * @param deg the angle to rotate the matrix by, in degrees
115
- */
116
- function rotate(a: mat2, deg: number): mat2;
117
- /**
118
- * Scales the mat2 by the dimensions in the given vec2
119
- **/
120
- function scale(a: mat2, b: vec2 | number): mat2;
121
- /**
122
- * Apply skew to the mat2d by the given angles
123
- * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skew
124
- * @param m the matrix to skew
125
- * @param deg the angles to skew the matrix by, in degrees
126
- */
127
- function skew(m: mat2, deg: vec2): mat2;
128
- /**
129
- * Creates a matrix from a given angle.
130
- * @param deg The angle to rotate the matrix by, in degrees
131
- * @category Generators
132
- *
133
- * @shorthands
134
- * - {@link rotation}
135
- */
136
- function fromRotation(deg: number): mat2;
137
- /**
138
- * Alias for {@link fromRotation}
139
- * @category Shorthands
140
- */
141
- const rotation: typeof fromRotation;
142
- /**
143
- * Creates a matrix from a vector scaling
144
- * @category Generators
145
- *
146
- * @shorthands
147
- * - {@link scaling}
148
- *
149
- */
150
- function fromScaling(v: vec2): mat2;
151
- /**
152
- * Alias for {@link fromScaling}
153
- * @category Shorthands
154
- */
155
- const scaling: typeof fromScaling;
156
- /**
157
- * Creates a matrix from a vector skew
158
- * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skew
159
- * @category Generators
160
- *
161
- * @shorthands
162
- * - {@link skewing}
163
- */
164
- function fromSkew(deg: vec2): mat2;
165
- /**
166
- * Alias for {@link fromSkew}
167
- * @category Shorthands
168
- */
169
- const skewing: typeof fromSkew;
170
- /**
171
- * Creates a matrix from given rotation, and scaling. The order of the transformations is rotation, and scaling.
172
- * @param r Rotation angle in degrees
173
- * @param s Scaling vector
174
- * @returns The matrix that represents the transformation
175
- */
176
- function fromRotScale(r?: number | null, s?: vec2 | null): number[];
177
- /**
178
- * Alias for {@link fromRotScale}
179
- * @category Shorthands
180
- */
181
- const rs: typeof fromRotScale;
182
- /**
183
- * Returns Frobenius norm of a mat2
184
- */
185
- function frob(a: mat2): number;
186
- /**
187
- * Adds given mat2's
188
- */
189
- function add(...ms: mat2[]): mat2;
190
- /**
191
- * Subtracts matrix b from matrix a
192
- *
193
- * @shorthands
194
- * - {@link sub}
195
- */
196
- function subtract(...ms: mat2[]): mat2;
197
- /**
198
- * Alias for {@link subtract}
199
- * @category Shorthands
200
- */
201
- const sub: typeof subtract;
202
- /**
203
- * Subtracts b from a
204
- */
205
- function delta(a: mat2, b: mat2): mat2;
206
- /**
207
- * Copies the values from a {@link mat2d}, omitting the translation components
208
- * @param m The matrix to copy from
209
- * @returns A newly created matrix
210
- * @category Generators
211
- */
212
- function fromMat2d(m: mat2d): mat2;
213
- /**
214
- * Multiplies each element of a mat2 by a scalar
215
- */
216
- function multiplyScalar(a: mat2, s: number): mat2;
217
- /**
218
- * Adds given mat2's after multiplying each element of the second operand by a scalar value.
219
- */
220
- function multiplyScalarAndAdd(a: mat2, b: mat2, scale: number): mat2;
221
- /**
222
- * Constrain each element to lie between min and max
223
- * @see https://thebookofshaders.com/glossary/?search=clamp
224
- */
225
- function clamp(a: mat2, min: number, max: number): mat2;
226
- /**
227
- * Clamps each element to [0, 1]
228
- */
229
- function clamp01(a: mat2): mat2;
230
- /**
231
- * Clamps each element to [-1, 1]
232
- */
233
- function clamp11(a: mat2): mat2;
234
- /**
235
- * Returns whether or not the matrices have exactly the same elements in the same position (when compared with `===`)
236
- *
237
- * @shorthands
238
- * - {@link eq}
239
- */
240
- function exactEquals(a: mat2, b: mat2): boolean;
241
- /**
242
- * Alias for {@link exactEquals}
243
- * @category Shorthands
244
- */
245
- const eq: typeof exactEquals;
246
- /**
247
- * Returns whether or not the matrices have approximately the same elements in the same position.
248
- *
249
- * @shorthands
250
- * - {@link approx}
251
- * - {@link equals}
252
- */
253
- function approxEquals(a: mat2, b: mat2): boolean;
254
- /**
255
- * Alias for {@link approxEquals}
256
- * @category Shorthands
257
- */
258
- const approx: typeof approxEquals;
259
- /**
260
- * Alias for {@link approxEquals}. This is provided for compatibility with gl-matrix.
261
- * @category Shorthands
262
- * @deprecated Use {@link approxEquals} instead
263
- */
264
- const equals: typeof approxEquals;
265
- /**
266
- * Returns a string representation of a mat2
267
- * @param m matrix to represent as a string
268
- * @param fractionDigits number of digits to appear after the decimal point
269
- */
270
- const toString: (m: mat2, fractionDigits?: number) => string;
271
- }
272
- //# sourceMappingURL=mat2.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mat2.d.ts","sourceRoot":"","sources":["../../src/mat2.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAA;AAE3B;;;;;;;;GAQG;AACH,MAAM,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;AAEhF;;;GAGG;AACH,yBAA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