acmi-parser 1.1.0 → 1.2.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 (56) hide show
  1. package/LICENSE +21 -0
  2. package/dist/acmi-parser.cjs +3 -2
  3. package/dist/acmi-parser.js +6093 -4191
  4. package/dist/types/acmi/acmiData.d.ts +41 -0
  5. package/dist/types/acmi/entity.d.ts +26 -0
  6. package/dist/types/acmi/frame.d.ts +17 -0
  7. package/dist/types/acmi/globalProperties.d.ts +30 -0
  8. package/dist/types/acmi/header.d.ts +7 -0
  9. package/dist/types/acmi/timeSpan.d.ts +12 -0
  10. package/dist/types/acmi/transform.d.ts +22 -0
  11. package/dist/types/index.d.ts +14 -0
  12. package/dist/types/math3d/core/classes/base/math-array.d.ts +66 -0
  13. package/dist/types/math3d/core/classes/base/matrix.d.ts +13 -0
  14. package/dist/types/math3d/core/classes/base/vector.d.ts +43 -0
  15. package/dist/types/math3d/core/classes/euler.d.ts +78 -0
  16. package/dist/types/math3d/core/classes/matrix3.d.ts +62 -0
  17. package/dist/types/math3d/core/classes/matrix4.d.ts +232 -0
  18. package/dist/types/math3d/core/classes/pose.d.ts +39 -0
  19. package/dist/types/math3d/core/classes/quaternion.d.ts +64 -0
  20. package/dist/types/math3d/core/classes/spherical-coordinates.d.ts +59 -0
  21. package/dist/types/math3d/core/classes/vector2.d.ts +54 -0
  22. package/dist/types/math3d/core/classes/vector3.d.ts +59 -0
  23. package/dist/types/math3d/core/classes/vector4.d.ts +40 -0
  24. package/dist/types/math3d/core/gl-matrix/common.d.ts +37 -0
  25. package/dist/types/math3d/core/gl-matrix/mat3.d.ts +286 -0
  26. package/dist/types/math3d/core/gl-matrix/mat4.d.ts +549 -0
  27. package/dist/types/math3d/core/gl-matrix/quat.d.ts +358 -0
  28. package/dist/types/math3d/core/gl-matrix/vec2.d.ts +362 -0
  29. package/dist/types/math3d/core/gl-matrix/vec3.d.ts +405 -0
  30. package/dist/types/math3d/core/gl-matrix/vec4.d.ts +329 -0
  31. package/dist/types/math3d/core/index.d.ts +29 -0
  32. package/dist/types/math3d/core/lib/assert.d.ts +1 -0
  33. package/dist/types/math3d/core/lib/common.d.ts +99 -0
  34. package/dist/types/math3d/core/lib/gl-matrix-extras.d.ts +6 -0
  35. package/dist/types/math3d/core/lib/math-utils.d.ts +24 -0
  36. package/dist/types/math3d/core/lib/validators.d.ts +5 -0
  37. package/dist/types/math3d/geoid/geoid.d.ts +73 -0
  38. package/dist/types/math3d/geoid/index.d.ts +2 -0
  39. package/dist/types/math3d/geoid/parse-pgm.d.ts +11 -0
  40. package/dist/types/math3d/geospatial/constants.d.ts +11 -0
  41. package/dist/types/math3d/geospatial/ellipsoid/ellipsoid.d.ts +69 -0
  42. package/dist/types/math3d/geospatial/ellipsoid/helpers/ellipsoid-transform.d.ts +4 -0
  43. package/dist/types/math3d/geospatial/ellipsoid/helpers/scale-to-geodetic-surface.d.ts +2 -0
  44. package/dist/types/math3d/geospatial/index.d.ts +2 -0
  45. package/dist/types/math3d/geospatial/type-utils.d.ts +23 -0
  46. package/dist/types/math3d/index.d.ts +4 -0
  47. package/dist/types/math3d/types/array-types.d.ts +14 -0
  48. package/dist/types/math3d/types/bigint.d.ts +20 -0
  49. package/dist/types/math3d/types/index.d.ts +2 -0
  50. package/dist/types/math3d/types/is-array.d.ts +13 -0
  51. package/dist/types/parser.d.ts +90 -0
  52. package/dist/types/trajectory/stateVector.d.ts +30 -0
  53. package/dist/types/trajectory/trajectory.d.ts +40 -0
  54. package/dist/types/trajectory/trajectorySample.d.ts +11 -0
  55. package/package.json +20 -15
  56. package/dist/types/acmi-parser.d.ts +0 -422
@@ -0,0 +1,39 @@
1
+ import { Matrix4 } from './matrix4';
2
+ import { Vector3 } from './vector3';
3
+ import { Euler } from './euler';
4
+ import { NumericArray } from '../../types';
5
+ type PoseOptions = {
6
+ position?: Readonly<NumericArray>;
7
+ orientation?: Readonly<NumericArray>;
8
+ x?: number;
9
+ y?: number;
10
+ z?: number;
11
+ roll?: number;
12
+ pitch?: number;
13
+ yaw?: number;
14
+ };
15
+ export declare class Pose {
16
+ readonly position: Vector3;
17
+ readonly orientation: Euler;
18
+ constructor({ x, y, z, roll, pitch, yaw, position, orientation, }?: PoseOptions);
19
+ get x(): number;
20
+ set x(value: number);
21
+ get y(): number;
22
+ set y(value: number);
23
+ get z(): number;
24
+ set z(value: number);
25
+ get roll(): number;
26
+ set roll(value: number);
27
+ get pitch(): number;
28
+ set pitch(value: number);
29
+ get yaw(): number;
30
+ set yaw(value: number);
31
+ getPosition(): Vector3;
32
+ getOrientation(): Euler;
33
+ equals(pose: Pose): boolean;
34
+ exactEquals(pose: Pose): boolean;
35
+ getTransformationMatrix(): Matrix4;
36
+ getTransformationMatrixFromPose(pose: Pose): Matrix4;
37
+ getTransformationMatrixToPose(pose: Pose): Matrix4;
38
+ }
39
+ export {};
@@ -0,0 +1,64 @@
1
+ import { NumericArray } from '../../types';
2
+ import { MathArray } from './base/math-array';
3
+ import { Euler } from './euler';
4
+ export declare class Quaternion extends MathArray {
5
+ constructor(x?: number | Readonly<NumericArray>, y?: number, z?: number, w?: number);
6
+ copy(array: Readonly<NumericArray>): this;
7
+ set(x: number, y: number, z: number, w: number): this;
8
+ fromObject(object: {
9
+ x: number;
10
+ y: number;
11
+ z: number;
12
+ w: number;
13
+ }): this;
14
+ /**
15
+ * Creates a quaternion from the given 3x3 rotation matrix.
16
+ * NOTE: The resultant quaternion is not normalized, so you should
17
+ * be sure to renormalize the quaternion yourself where necessary.
18
+ * @param m
19
+ * @returns
20
+ */
21
+ fromMatrix3(m: Readonly<NumericArray>): this;
22
+ fromAxisRotation(axis: Readonly<NumericArray>, rad: number): this;
23
+ fromEuler(e: Euler): this;
24
+ /** Set a quat to the identity quaternion */
25
+ identity(): this;
26
+ setAxisAngle(axis: Readonly<NumericArray>, rad: number): this;
27
+ get ELEMENTS(): number;
28
+ get x(): number;
29
+ set x(value: number);
30
+ get y(): number;
31
+ set y(value: number);
32
+ get z(): number;
33
+ set z(value: number);
34
+ get w(): number;
35
+ set w(value: number);
36
+ len(): number;
37
+ lengthSquared(): number;
38
+ dot(a: Readonly<NumericArray>): number;
39
+ rotationTo(vectorA: NumericArray, vectorB: NumericArray): this;
40
+ add(a: Readonly<NumericArray>): this;
41
+ calculateW(): this;
42
+ conjugate(): this;
43
+ invert(): this;
44
+ lerp(a: Readonly<NumericArray>, b: Readonly<NumericArray> | number, t?: number): this;
45
+ multiplyRight(a: Readonly<NumericArray>): this;
46
+ multiplyLeft(a: Readonly<NumericArray>): this;
47
+ normalize(): this;
48
+ rotateX(rad: number): this;
49
+ rotateY(rad: number): this;
50
+ rotateZ(rad: number): this;
51
+ scale(b: number): this;
52
+ slerp(target: Readonly<NumericArray>, ratio: number): this;
53
+ slerp(start: Readonly<NumericArray>, target: Readonly<NumericArray>, ratio: number): this;
54
+ slerp(params: {
55
+ start: Readonly<NumericArray>;
56
+ target: Readonly<NumericArray>;
57
+ ratio: number;
58
+ }): this;
59
+ transformVector4(vector: Readonly<NumericArray>, result?: NumericArray): NumericArray;
60
+ lengthSq(): number;
61
+ setFromAxisAngle(axis: Readonly<NumericArray>, rad: number): this;
62
+ premultiply(a: Readonly<NumericArray>): this;
63
+ multiply(a: Readonly<NumericArray>): this;
64
+ }
@@ -0,0 +1,59 @@
1
+ import { NumericArray } from '../../types';
2
+ import { Vector3 } from './vector3';
3
+ type SphericalCoordinatesOptions = {
4
+ phi?: number;
5
+ theta?: number;
6
+ radius?: number;
7
+ bearing?: number;
8
+ pitch?: number;
9
+ altitude?: number;
10
+ radiusScale?: number;
11
+ };
12
+ type FormatOptions = {
13
+ printTypes?: boolean;
14
+ };
15
+ /**
16
+ * The poles (phi) are at the positive and negative y axis.
17
+ * The equator starts at positive z.
18
+ * @link https://en.wikipedia.org/wiki/Spherical_coordinate_system
19
+ */
20
+ export declare class SphericalCoordinates {
21
+ phi: number;
22
+ theta: number;
23
+ radius: number;
24
+ radiusScale: number;
25
+ /**
26
+ * Creates a new SphericalCoordinates object
27
+ * @param options
28
+ * @param [options.phi] =0 - rotation around X (latitude)
29
+ * @param [options.theta] =0 - rotation around Y (longitude)
30
+ * @param [options.radius] =1 - Distance from center
31
+ * @param [options.bearing]
32
+ * @param [options.pitch]
33
+ * @param [options.altitude]
34
+ * @param [options.radiusScale] =1
35
+ */
36
+ constructor({ phi, theta, radius, bearing, pitch, altitude, radiusScale, }?: SphericalCoordinatesOptions);
37
+ toString(): string;
38
+ formatString({ printTypes }: FormatOptions): string;
39
+ equals(other: SphericalCoordinates): boolean;
40
+ exactEquals(other: SphericalCoordinates): boolean;
41
+ get bearing(): number;
42
+ set bearing(v: number);
43
+ get pitch(): number;
44
+ set pitch(v: number);
45
+ get longitude(): number;
46
+ get latitude(): number;
47
+ get lng(): number;
48
+ get lat(): number;
49
+ get z(): number;
50
+ set(radius: number, phi: number, theta: number): this;
51
+ clone(): SphericalCoordinates;
52
+ copy(other: SphericalCoordinates): this;
53
+ fromLngLatZ([lng, lat, z]: [number, number, number]): this;
54
+ fromVector3(v: Readonly<NumericArray>): this;
55
+ toVector3(): Vector3;
56
+ makeSafe(): this;
57
+ check(): this;
58
+ }
59
+ export {};
@@ -0,0 +1,54 @@
1
+ import { Vector } from './base/vector';
2
+ import { NumericArray } from '../../types';
3
+ /**
4
+ * Two-element vector class.
5
+ * Subclass of Array<number>
6
+ */
7
+ export declare class Vector2 extends Vector {
8
+ constructor(x?: number | Readonly<NumericArray>, y?: number);
9
+ set(x: number, y: number): this;
10
+ copy(array: Readonly<NumericArray>): this;
11
+ fromObject(object: {
12
+ x: number;
13
+ y: number;
14
+ }): this;
15
+ toObject(object: {
16
+ x?: number;
17
+ y?: number;
18
+ }): {
19
+ x: number;
20
+ y: number;
21
+ };
22
+ get ELEMENTS(): number;
23
+ /**
24
+ * Returns angle from x axis
25
+ * @returns
26
+ */
27
+ horizontalAngle(): number;
28
+ /**
29
+ * Returns angle from y axis
30
+ * @returns
31
+ */
32
+ verticalAngle(): number;
33
+ /**
34
+ * Transforms as point
35
+ * @param matrix4
36
+ * @returns
37
+ */
38
+ transform(matrix4: Readonly<NumericArray>): this;
39
+ /**
40
+ * transforms as point (4th component is implicitly 1)
41
+ * @param matrix4
42
+ * @returns
43
+ */
44
+ transformAsPoint(matrix4: Readonly<NumericArray>): this;
45
+ /**
46
+ * transforms as vector (4th component is implicitly 0, ignores translation. slightly faster)
47
+ * @param matrix4
48
+ * @returns
49
+ */
50
+ transformAsVector(matrix4: Readonly<NumericArray>): this;
51
+ transformByMatrix3(matrix3: Readonly<NumericArray>): this;
52
+ transformByMatrix2x3(matrix2x3: Readonly<NumericArray>): this;
53
+ transformByMatrix2(matrix2: Readonly<NumericArray>): this;
54
+ }
@@ -0,0 +1,59 @@
1
+ import { NumericArray } from '../../types';
2
+ import { Vector } from './base/vector';
3
+ /**
4
+ * Three-element vector class.
5
+ * Subclass of Array<number>
6
+ */
7
+ export declare class Vector3 extends Vector {
8
+ static get ZERO(): Vector3;
9
+ static get X_AXIS(): Vector3;
10
+ static get Y_AXIS(): Vector3;
11
+ static get Z_AXIS(): Vector3;
12
+ /**
13
+ * @class
14
+ * @param x
15
+ * @param y
16
+ * @param z
17
+ */
18
+ constructor(x?: number | Readonly<NumericArray>, y?: number, z?: number);
19
+ set(x: number, y: number, z: number): this;
20
+ copy(array: Readonly<NumericArray>): this;
21
+ fromObject(object: {
22
+ x: number;
23
+ y: number;
24
+ z: number;
25
+ }): this;
26
+ toObject(object: {
27
+ x?: number;
28
+ y?: number;
29
+ z?: number;
30
+ }): {
31
+ x: number;
32
+ y: number;
33
+ z: number;
34
+ };
35
+ get ELEMENTS(): number;
36
+ get z(): number;
37
+ set z(value: number);
38
+ angle(vector: Readonly<NumericArray>): number;
39
+ static cross<T extends NumericArray>(left: Readonly<NumericArray>, right: Readonly<NumericArray>, result?: T): T;
40
+ cross(vector: Readonly<NumericArray>): this;
41
+ rotateX({ radians, origin, }: {
42
+ radians: number;
43
+ origin?: Readonly<NumericArray>;
44
+ }): this;
45
+ rotateY({ radians, origin, }: {
46
+ radians: number;
47
+ origin?: Readonly<NumericArray>;
48
+ }): this;
49
+ rotateZ({ radians, origin, }: {
50
+ radians: number;
51
+ origin?: Readonly<NumericArray>;
52
+ }): this;
53
+ transform(matrix4: Readonly<NumericArray>): this;
54
+ transformAsPoint(matrix4: Readonly<NumericArray>): this;
55
+ transformAsVector(matrix4: Readonly<NumericArray>): this;
56
+ transformByMatrix3(matrix3: Readonly<NumericArray>): this;
57
+ transformByMatrix2(matrix2: Readonly<NumericArray>): this;
58
+ transformByQuaternion(quaternion: Readonly<NumericArray>): this;
59
+ }
@@ -0,0 +1,40 @@
1
+ import { NumericArray } from '../../types';
2
+ import { Vector } from './base/vector';
3
+ import { Matrix4 } from './matrix4';
4
+ /**
5
+ * Four-element vector class.
6
+ * Subclass of Array<number>
7
+ */
8
+ export declare class Vector4 extends Vector {
9
+ static get ZERO(): Vector4;
10
+ constructor(x?: number | Readonly<NumericArray>, y?: number, z?: number, w?: number);
11
+ set(x: number, y: number, z: number, w: number): this;
12
+ copy(array: Readonly<NumericArray>): this;
13
+ fromObject(object: {
14
+ x: number;
15
+ y: number;
16
+ z: number;
17
+ w: number;
18
+ }): this;
19
+ toObject(object: {
20
+ x?: number;
21
+ y?: number;
22
+ z?: number;
23
+ w?: number;
24
+ }): {
25
+ x: number;
26
+ y: number;
27
+ z: number;
28
+ w: number;
29
+ };
30
+ get ELEMENTS(): number;
31
+ get z(): number;
32
+ set z(value: number);
33
+ get w(): number;
34
+ set w(value: number);
35
+ transform(matrix4: Readonly<NumericArray>): this;
36
+ transformByMatrix3(matrix3: Readonly<NumericArray>): this;
37
+ transformByMatrix2(matrix2: Readonly<NumericArray>): this;
38
+ transformByQuaternion(quaternion: Readonly<NumericArray>): this;
39
+ applyMatrix4(m: Matrix4): this;
40
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Common utilities
3
+ * @module glMatrix
4
+ */
5
+ export declare const EPSILON = 0.000001;
6
+ export declare let ARRAY_TYPE: Float32ArrayConstructor | ArrayConstructor;
7
+ export declare const RANDOM: () => number;
8
+ export declare const ANGLE_ORDER = 0;
9
+ /**
10
+ * Symmetric round
11
+ * see https://www.npmjs.com/package/round-half-up-symmetric#user-content-detailed-background
12
+ *
13
+ * @param {Number} a value to round
14
+ */
15
+ export declare function round(a: number): number;
16
+ /**
17
+ * Sets the type of array used when creating new vectors and matrices
18
+ *
19
+ * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array
20
+ */
21
+ export declare function setMatrixArrayType(type: Float32ArrayConstructor | ArrayConstructor): void;
22
+ /**
23
+ * Convert Degree To Radian
24
+ *
25
+ * @param {Number} a Angle in Degrees
26
+ */
27
+ export declare function toRadian(a: number): number;
28
+ /**
29
+ * Tests whether or not the arguments have approximately the same value, within an absolute
30
+ * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less
31
+ * than or equal to 1.0, and a relative tolerance is used for larger values)
32
+ *
33
+ * @param {Number} a The first number to test.
34
+ * @param {Number} b The second number to test.
35
+ * @returns {Boolean} True if the numbers are approximately equal, false otherwise.
36
+ */
37
+ export declare function equals(a: number, b: number): boolean;
@@ -0,0 +1,286 @@
1
+ /**
2
+ * 3x3 Matrix
3
+ * @module mat3
4
+ */
5
+ /**
6
+ * Creates a new identity mat3
7
+ *
8
+ * @returns {mat3} a new 3x3 matrix
9
+ */
10
+ export declare function create(): any[] | Float32Array<ArrayBuffer>;
11
+ /**
12
+ * Copies the upper-left 3x3 values into the given mat3.
13
+ *
14
+ * @param {mat3} out the receiving 3x3 matrix
15
+ * @param {ReadonlyMat4} a the source 4x4 matrix
16
+ * @returns {mat3} out
17
+ */
18
+ export declare function fromMat4(out: any, a: any): any;
19
+ /**
20
+ * Creates a new mat3 initialized with values from an existing matrix
21
+ *
22
+ * @param {ReadonlyMat3} a matrix to clone
23
+ * @returns {mat3} a new 3x3 matrix
24
+ */
25
+ export declare function clone(a: any): any[] | Float32Array<ArrayBuffer>;
26
+ /**
27
+ * Copy the values from one mat3 to another
28
+ *
29
+ * @param {mat3} out the receiving matrix
30
+ * @param {ReadonlyMat3} a the source matrix
31
+ * @returns {mat3} out
32
+ */
33
+ export declare function copy(out: any, a: any): any;
34
+ /**
35
+ * Create a new mat3 with the given values
36
+ *
37
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
38
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
39
+ * @param {Number} m02 Component in column 0, row 2 position (index 2)
40
+ * @param {Number} m10 Component in column 1, row 0 position (index 3)
41
+ * @param {Number} m11 Component in column 1, row 1 position (index 4)
42
+ * @param {Number} m12 Component in column 1, row 2 position (index 5)
43
+ * @param {Number} m20 Component in column 2, row 0 position (index 6)
44
+ * @param {Number} m21 Component in column 2, row 1 position (index 7)
45
+ * @param {Number} m22 Component in column 2, row 2 position (index 8)
46
+ * @returns {mat3} A new mat3
47
+ */
48
+ export declare function fromValues(m00: any, m01: any, m02: any, m10: any, m11: any, m12: any, m20: any, m21: any, m22: any): any[] | Float32Array<ArrayBuffer>;
49
+ /**
50
+ * Set the components of a mat3 to the given values
51
+ *
52
+ * @param {mat3} out the receiving matrix
53
+ * @param {Number} m00 Component in column 0, row 0 position (index 0)
54
+ * @param {Number} m01 Component in column 0, row 1 position (index 1)
55
+ * @param {Number} m02 Component in column 0, row 2 position (index 2)
56
+ * @param {Number} m10 Component in column 1, row 0 position (index 3)
57
+ * @param {Number} m11 Component in column 1, row 1 position (index 4)
58
+ * @param {Number} m12 Component in column 1, row 2 position (index 5)
59
+ * @param {Number} m20 Component in column 2, row 0 position (index 6)
60
+ * @param {Number} m21 Component in column 2, row 1 position (index 7)
61
+ * @param {Number} m22 Component in column 2, row 2 position (index 8)
62
+ * @returns {mat3} out
63
+ */
64
+ export declare function set(out: any, m00: any, m01: any, m02: any, m10: any, m11: any, m12: any, m20: any, m21: any, m22: any): any;
65
+ /**
66
+ * Set a mat3 to the identity matrix
67
+ *
68
+ * @param {mat3} out the receiving matrix
69
+ * @returns {mat3} out
70
+ */
71
+ export declare function identity(out: any): any;
72
+ /**
73
+ * Transpose the values of a mat3
74
+ *
75
+ * @param {mat3} out the receiving matrix
76
+ * @param {ReadonlyMat3} a the source matrix
77
+ * @returns {mat3} out
78
+ */
79
+ export declare function transpose(out: any, a: any): any;
80
+ /**
81
+ * Inverts a mat3
82
+ *
83
+ * @param {mat3} out the receiving matrix
84
+ * @param {ReadonlyMat3} a the source matrix
85
+ * @returns {mat3} out
86
+ */
87
+ export declare function invert(out: any, a: any): any;
88
+ /**
89
+ * Calculates the adjugate of a mat3
90
+ *
91
+ * @param {mat3} out the receiving matrix
92
+ * @param {ReadonlyMat3} a the source matrix
93
+ * @returns {mat3} out
94
+ */
95
+ export declare function adjoint(out: any, a: any): any;
96
+ /**
97
+ * Calculates the determinant of a mat3
98
+ *
99
+ * @param {ReadonlyMat3} a the source matrix
100
+ * @returns {Number} determinant of a
101
+ */
102
+ export declare function determinant(a: any): number;
103
+ /**
104
+ * Multiplies two mat3's
105
+ *
106
+ * @param {mat3} out the receiving matrix
107
+ * @param {ReadonlyMat3} a the first operand
108
+ * @param {ReadonlyMat3} b the second operand
109
+ * @returns {mat3} out
110
+ */
111
+ export declare function multiply(out: any, a: any, b: any): any;
112
+ /**
113
+ * Translate a mat3 by the given vector
114
+ *
115
+ * @param {mat3} out the receiving matrix
116
+ * @param {ReadonlyMat3} a the matrix to translate
117
+ * @param {ReadonlyVec2} v vector to translate by
118
+ * @returns {mat3} out
119
+ */
120
+ export declare function translate(out: any, a: any, v: any): any;
121
+ /**
122
+ * Rotates a mat3 by the given angle
123
+ *
124
+ * @param {mat3} out the receiving matrix
125
+ * @param {ReadonlyMat3} a the matrix to rotate
126
+ * @param {Number} rad the angle to rotate the matrix by
127
+ * @returns {mat3} out
128
+ */
129
+ export declare function rotate(out: any, a: any, rad: any): any;
130
+ /**
131
+ * Scales the mat3 by the dimensions in the given vec2
132
+ *
133
+ * @param {mat3} out the receiving matrix
134
+ * @param {ReadonlyMat3} a the matrix to scale
135
+ * @param {ReadonlyVec2} v the vec2 to scale the matrix by
136
+ * @returns {mat3} out
137
+ **/
138
+ export declare function scale(out: any, a: any, v: any): any;
139
+ /**
140
+ * Creates a matrix from a vector translation
141
+ * This is equivalent to (but much faster than):
142
+ *
143
+ * mat3.identity(dest);
144
+ * mat3.translate(dest, dest, vec);
145
+ *
146
+ * @param {mat3} out mat3 receiving operation result
147
+ * @param {ReadonlyVec2} v Translation vector
148
+ * @returns {mat3} out
149
+ */
150
+ export declare function fromTranslation(out: any, v: any): any;
151
+ /**
152
+ * Creates a matrix from a given angle
153
+ * This is equivalent to (but much faster than):
154
+ *
155
+ * mat3.identity(dest);
156
+ * mat3.rotate(dest, dest, rad);
157
+ *
158
+ * @param {mat3} out mat3 receiving operation result
159
+ * @param {Number} rad the angle to rotate the matrix by
160
+ * @returns {mat3} out
161
+ */
162
+ export declare function fromRotation(out: any, rad: any): any;
163
+ /**
164
+ * Creates a matrix from a vector scaling
165
+ * This is equivalent to (but much faster than):
166
+ *
167
+ * mat3.identity(dest);
168
+ * mat3.scale(dest, dest, vec);
169
+ *
170
+ * @param {mat3} out mat3 receiving operation result
171
+ * @param {ReadonlyVec2} v Scaling vector
172
+ * @returns {mat3} out
173
+ */
174
+ export declare function fromScaling(out: any, v: any): any;
175
+ /**
176
+ * Copies the values from a mat2d into a mat3
177
+ *
178
+ * @param {mat3} out the receiving matrix
179
+ * @param {ReadonlyMat2d} a the matrix to copy
180
+ * @returns {mat3} out
181
+ **/
182
+ export declare function fromMat2d(out: any, a: any): any;
183
+ /**
184
+ * Calculates a 3x3 matrix from the given quaternion
185
+ *
186
+ * @param {mat3} out mat3 receiving operation result
187
+ * @param {ReadonlyQuat} q Quaternion to create matrix from
188
+ *
189
+ * @returns {mat3} out
190
+ */
191
+ export declare function fromQuat(out: any, q: any): any;
192
+ /**
193
+ * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix
194
+ *
195
+ * @param {mat3} out mat3 receiving operation result
196
+ * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from
197
+ *
198
+ * @returns {mat3} out
199
+ */
200
+ export declare function normalFromMat4(out: any, a: any): any;
201
+ /**
202
+ * Generates a 2D projection matrix with the given bounds
203
+ *
204
+ * @param {mat3} out mat3 frustum matrix will be written into
205
+ * @param {number} width Width of your gl context
206
+ * @param {number} height Height of gl context
207
+ * @returns {mat3} out
208
+ */
209
+ export declare function projection(out: any, width: any, height: any): any;
210
+ /**
211
+ * Returns a string representation of a mat3
212
+ *
213
+ * @param {ReadonlyMat3} a matrix to represent as a string
214
+ * @returns {String} string representation of the matrix
215
+ */
216
+ export declare function str(a: any): string;
217
+ /**
218
+ * Returns Frobenius norm of a mat3
219
+ *
220
+ * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of
221
+ * @returns {Number} Frobenius norm
222
+ */
223
+ export declare function frob(a: any): number;
224
+ /**
225
+ * Adds two mat3's
226
+ *
227
+ * @param {mat3} out the receiving matrix
228
+ * @param {ReadonlyMat3} a the first operand
229
+ * @param {ReadonlyMat3} b the second operand
230
+ * @returns {mat3} out
231
+ */
232
+ export declare function add(out: any, a: any, b: any): any;
233
+ /**
234
+ * Subtracts matrix b from matrix a
235
+ *
236
+ * @param {mat3} out the receiving matrix
237
+ * @param {ReadonlyMat3} a the first operand
238
+ * @param {ReadonlyMat3} b the second operand
239
+ * @returns {mat3} out
240
+ */
241
+ export declare function subtract(out: any, a: any, b: any): any;
242
+ /**
243
+ * Multiply each element of the matrix by a scalar.
244
+ *
245
+ * @param {mat3} out the receiving matrix
246
+ * @param {ReadonlyMat3} a the matrix to scale
247
+ * @param {Number} b amount to scale the matrix's elements by
248
+ * @returns {mat3} out
249
+ */
250
+ export declare function multiplyScalar(out: any, a: any, b: any): any;
251
+ /**
252
+ * Adds two mat3's after multiplying each element of the second operand by a scalar value.
253
+ *
254
+ * @param {mat3} out the receiving vector
255
+ * @param {ReadonlyMat3} a the first operand
256
+ * @param {ReadonlyMat3} b the second operand
257
+ * @param {Number} scale the amount to scale b's elements by before adding
258
+ * @returns {mat3} out
259
+ */
260
+ export declare function multiplyScalarAndAdd(out: any, a: any, b: any, scale: any): any;
261
+ /**
262
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
263
+ *
264
+ * @param {ReadonlyMat3} a The first matrix.
265
+ * @param {ReadonlyMat3} b The second matrix.
266
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
267
+ */
268
+ export declare function exactEquals(a: any, b: any): boolean;
269
+ /**
270
+ * Returns whether or not the matrices have approximately the same elements in the same position.
271
+ *
272
+ * @param {ReadonlyMat3} a The first matrix.
273
+ * @param {ReadonlyMat3} b The second matrix.
274
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
275
+ */
276
+ export declare function equals(a: any, b: any): boolean;
277
+ /**
278
+ * Alias for {@link mat3.multiply}
279
+ * @function
280
+ */
281
+ export declare const mul: typeof multiply;
282
+ /**
283
+ * Alias for {@link mat3.subtract}
284
+ * @function
285
+ */
286
+ export declare const sub: typeof subtract;