@flighthq/geometry 0.1.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 (125) hide show
  1. package/dist/aabb.d.ts +88 -0
  2. package/dist/aabb.d.ts.map +1 -0
  3. package/dist/aabb.js +230 -0
  4. package/dist/aabb.js.map +1 -0
  5. package/dist/boundingSphere.d.ts +62 -0
  6. package/dist/boundingSphere.d.ts.map +1 -0
  7. package/dist/boundingSphere.js +188 -0
  8. package/dist/boundingSphere.js.map +1 -0
  9. package/dist/capsule.d.ts +38 -0
  10. package/dist/capsule.d.ts.map +1 -0
  11. package/dist/capsule.js +215 -0
  12. package/dist/capsule.js.map +1 -0
  13. package/dist/frustum.d.ts +49 -0
  14. package/dist/frustum.d.ts.map +1 -0
  15. package/dist/frustum.js +149 -0
  16. package/dist/frustum.js.map +1 -0
  17. package/dist/index.d.ts +25 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +25 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/matrix.d.ts +152 -0
  22. package/dist/matrix.d.ts.map +1 -0
  23. package/dist/matrix.js +488 -0
  24. package/dist/matrix.js.map +1 -0
  25. package/dist/matrix3.d.ts +63 -0
  26. package/dist/matrix3.d.ts.map +1 -0
  27. package/dist/matrix3.js +408 -0
  28. package/dist/matrix3.js.map +1 -0
  29. package/dist/matrix3Pool.d.ts +6 -0
  30. package/dist/matrix3Pool.d.ts.map +1 -0
  31. package/dist/matrix3Pool.js +26 -0
  32. package/dist/matrix3Pool.js.map +1 -0
  33. package/dist/matrix4.d.ts +238 -0
  34. package/dist/matrix4.d.ts.map +1 -0
  35. package/dist/matrix4.js +931 -0
  36. package/dist/matrix4.js.map +1 -0
  37. package/dist/matrix4Pool.d.ts +6 -0
  38. package/dist/matrix4Pool.d.ts.map +1 -0
  39. package/dist/matrix4Pool.js +26 -0
  40. package/dist/matrix4Pool.js.map +1 -0
  41. package/dist/matrixPool.d.ts +6 -0
  42. package/dist/matrixPool.d.ts.map +1 -0
  43. package/dist/matrixPool.js +26 -0
  44. package/dist/matrixPool.js.map +1 -0
  45. package/dist/obb.d.ts +44 -0
  46. package/dist/obb.d.ts.map +1 -0
  47. package/dist/obb.js +248 -0
  48. package/dist/obb.js.map +1 -0
  49. package/dist/plane.d.ts +66 -0
  50. package/dist/plane.d.ts.map +1 -0
  51. package/dist/plane.js +140 -0
  52. package/dist/plane.js.map +1 -0
  53. package/dist/quaternion.d.ts +128 -0
  54. package/dist/quaternion.d.ts.map +1 -0
  55. package/dist/quaternion.js +508 -0
  56. package/dist/quaternion.js.map +1 -0
  57. package/dist/quaternionPool.d.ts +6 -0
  58. package/dist/quaternionPool.d.ts.map +1 -0
  59. package/dist/quaternionPool.js +29 -0
  60. package/dist/quaternionPool.js.map +1 -0
  61. package/dist/ray3d.d.ts +69 -0
  62. package/dist/ray3d.d.ts.map +1 -0
  63. package/dist/ray3d.js +264 -0
  64. package/dist/ray3d.js.map +1 -0
  65. package/dist/rectangle.d.ts +56 -0
  66. package/dist/rectangle.d.ts.map +1 -0
  67. package/dist/rectangle.js +235 -0
  68. package/dist/rectangle.js.map +1 -0
  69. package/dist/rectanglePool.d.ts +6 -0
  70. package/dist/rectanglePool.d.ts.map +1 -0
  71. package/dist/rectanglePool.js +29 -0
  72. package/dist/rectanglePool.js.map +1 -0
  73. package/dist/typedarray.d.ts +4 -0
  74. package/dist/typedarray.d.ts.map +1 -0
  75. package/dist/typedarray.js +25 -0
  76. package/dist/typedarray.js.map +1 -0
  77. package/dist/vector2.d.ts +130 -0
  78. package/dist/vector2.d.ts.map +1 -0
  79. package/dist/vector2.js +250 -0
  80. package/dist/vector2.js.map +1 -0
  81. package/dist/vector2Pool.d.ts +6 -0
  82. package/dist/vector2Pool.d.ts.map +1 -0
  83. package/dist/vector2Pool.js +20 -0
  84. package/dist/vector2Pool.js.map +1 -0
  85. package/dist/vector3.d.ts +220 -0
  86. package/dist/vector3.d.ts.map +1 -0
  87. package/dist/vector3.js +380 -0
  88. package/dist/vector3.js.map +1 -0
  89. package/dist/vector3Pool.d.ts +6 -0
  90. package/dist/vector3Pool.d.ts.map +1 -0
  91. package/dist/vector3Pool.js +28 -0
  92. package/dist/vector3Pool.js.map +1 -0
  93. package/dist/vector4.d.ts +180 -0
  94. package/dist/vector4.d.ts.map +1 -0
  95. package/dist/vector4.js +333 -0
  96. package/dist/vector4.js.map +1 -0
  97. package/dist/vector4Pool.d.ts +6 -0
  98. package/dist/vector4Pool.d.ts.map +1 -0
  99. package/dist/vector4Pool.js +29 -0
  100. package/dist/vector4Pool.js.map +1 -0
  101. package/package.json +38 -0
  102. package/src/aabb.test.ts +341 -0
  103. package/src/boundingSphere.test.ts +247 -0
  104. package/src/capsule.test.ts +157 -0
  105. package/src/frustum.test.ts +160 -0
  106. package/src/matrix.test.ts +1111 -0
  107. package/src/matrix3.test.ts +752 -0
  108. package/src/matrix3Pool.test.ts +73 -0
  109. package/src/matrix4.test.ts +1627 -0
  110. package/src/matrix4Pool.test.ts +71 -0
  111. package/src/matrixPool.test.ts +69 -0
  112. package/src/obb.test.ts +183 -0
  113. package/src/plane.test.ts +225 -0
  114. package/src/quaternion.test.ts +531 -0
  115. package/src/quaternionPool.test.ts +64 -0
  116. package/src/ray3d.test.ts +297 -0
  117. package/src/rectangle.test.ts +982 -0
  118. package/src/rectanglePool.test.ts +71 -0
  119. package/src/typedarray.test.ts +118 -0
  120. package/src/vector2.test.ts +958 -0
  121. package/src/vector2Pool.test.ts +65 -0
  122. package/src/vector3.test.ts +749 -0
  123. package/src/vector3Pool.test.ts +68 -0
  124. package/src/vector4.test.ts +660 -0
  125. package/src/vector4Pool.test.ts +71 -0
@@ -0,0 +1,152 @@
1
+ import type { Matrix, Matrix3Like, Matrix4Like, MatrixLike, RectangleLike, Vector2Like, Vector3Like } from '@flighthq/types';
2
+ export declare function cloneMatrix(source: Readonly<MatrixLike>): Matrix;
3
+ export declare function copyMatrix(out: MatrixLike, source: Readonly<MatrixLike>): void;
4
+ /**
5
+ * Copies a column from a vector. The z component will be ignored (3x2 matrix).
6
+ */
7
+ export declare function copyMatrixColumnFromVector3(out: MatrixLike, column: number, source: Readonly<Vector3Like>): void;
8
+ /**
9
+ * Copies a column to a vector. The z component will use identity values.
10
+ */
11
+ export declare function copyMatrixColumnToVector3(out: Vector3Like, column: number, source: Readonly<MatrixLike>): void;
12
+ /**
13
+ * Copies a row from a vector. The third row (row 2) will be ignored (3x2 matrix).
14
+ */
15
+ export declare function copyMatrixRowFromVector3(out: MatrixLike, row: number, source: Readonly<Vector3Like>): void;
16
+ /**
17
+ * Copies a row to a vector. The third row will use identity values (3x2 matrix).
18
+ */
19
+ export declare function copyMatrixRowToVector3(out: Vector3Like, row: number, source: Readonly<MatrixLike>): void;
20
+ export declare function createGradientTransformMatrix(width: number, height: number, rotation?: number, tx?: number, ty?: number): Matrix;
21
+ /**
22
+ * An Matrix object represents two-dimensional coordinate space.
23
+ * It is a 2x3 matrix, with a, b, c, d for a two-dimensional transform,
24
+ * and tx, ty for translation.
25
+ *
26
+ * [ a b tx ]
27
+ * [ c d ty ]
28
+ *
29
+ * @see Vector2
30
+ * @see Vector3
31
+ * @see Rectangle
32
+ */
33
+ export declare function createMatrix(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number): Matrix;
34
+ export declare function createTransformMatrix(scaleX: number, scaleY: number, rotation?: number, tx?: number, ty?: number): Matrix;
35
+ export declare function equalsMatrix(a: Readonly<MatrixLike> | null | undefined, b: Readonly<MatrixLike> | null | undefined, compareTranslation?: boolean): boolean;
36
+ /**
37
+ * Computes the inverse of a 2D affine matrix and writes it to out.
38
+ *
39
+ * Translation (tx, ty) is applied after the linear transformation (scale/rotation/shear) is inverted.
40
+ */
41
+ export declare function inverseMatrix(out: MatrixLike, source: Readonly<MatrixLike>): void;
42
+ /**
43
+ * Use an inverse of the source matrix to transform
44
+ * a given point, including translation.
45
+ * @see inverseMatrixTransformPointXY
46
+ */
47
+ export declare function inverseMatrixTransformPoint(out: Vector2Like, matrix: Readonly<MatrixLike>, point: Readonly<Vector2Like>): void;
48
+ export declare function inverseMatrixTransformPointXY(out: Vector2Like, source: Readonly<MatrixLike>, x: number, y: number): void;
49
+ /**
50
+ * Use an inverse of the source matrix to transform
51
+ * a given point, excluding translation.
52
+ * @see inverseMatrixTransformPointXY
53
+ */
54
+ export declare function inverseMatrixTransformVector(out: Vector2Like, matrix: Readonly<MatrixLike>, vector: Readonly<Vector2Like>): void;
55
+ export declare function inverseMatrixTransformVectorXY(out: Vector2Like, source: Readonly<MatrixLike>, x: number, y: number): void;
56
+ /**
57
+ * Transforms an axis-aligned bounding box defined by two opposite corners
58
+ * (ax, ay) and (bx, by) into a world-space axis-aligned bounding box.
59
+ *
60
+ * The input points may be in any order (min/max not required).
61
+ *
62
+ * This accounts for translation, rotation, scaling, and skew
63
+ * from the source matrix.
64
+ **/
65
+ export declare function matrixTransformBounds(out: RectangleLike, source: Readonly<MatrixLike>, ax: number, ay: number, bx: number, by: number): void;
66
+ export declare function matrixTransformBoundsVector2(out: RectangleLike, matrix: Readonly<MatrixLike>, a: Readonly<Vector2Like>, b: Readonly<Vector2Like>): void;
67
+ /**
68
+ * Transforms a point using the given matrix.
69
+ * @see matrixTransformPointXY
70
+ */
71
+ export declare function matrixTransformPoint(out: Vector2Like, matrix: Readonly<MatrixLike>, point: Readonly<Vector2Like>): void;
72
+ /**
73
+ * Transforms an (x, y) point using the given matrix.
74
+ */
75
+ export declare function matrixTransformPointXY(out: Vector2Like, source: Readonly<MatrixLike>, x: number, y: number): void;
76
+ /**
77
+ * Applies a point transform to each corner of a rectangle and updates it
78
+ * to the axis-aligned bounding box of the transformed rectangle.
79
+ *
80
+ * This accounts for translation, rotation, scaling, and skew
81
+ * from the given matrix.
82
+ *
83
+ * @see matrixTransformBounds
84
+ * @see matrixTransformBounds
85
+ **/
86
+ export declare function matrixTransformRectangle(out: RectangleLike, matrix: Readonly<MatrixLike>, source: Readonly<RectangleLike>): void;
87
+ /**
88
+ * Given a point in the pretransform coordinate space, returns the
89
+ * coordinates of that point after the transformation occurs. Unlike the
90
+ * standard transformation applied using the `matrixTransformPoint()`
91
+ * method, the `matrixTransformVector()` method's transformation
92
+ * does not consider the translation parameters `tx` and
93
+ * `ty`.
94
+ * @see matrixTransformVectorXY
95
+ **/
96
+ export declare function matrixTransformVector(out: Vector2Like, matrix: Readonly<MatrixLike>, vector: Readonly<Vector2Like>): void;
97
+ export declare function matrixTransformVectorXY(out: Vector2Like, source: Readonly<MatrixLike>, x: number, y: number): void;
98
+ /**
99
+ * Multiplies a by b and writes the result to out.
100
+ *
101
+ * out = a * b
102
+ */
103
+ export declare function multiplyMatrix(out: MatrixLike, a: Readonly<MatrixLike>, b: Readonly<MatrixLike>): void;
104
+ /**
105
+ * Applies a rotation transformation to the given Matrix object
106
+ * and writes the result to out.
107
+ *
108
+ * This is a 2x2 rotation, it will not rotate
109
+ **/
110
+ export declare function rotateMatrix(out: MatrixLike, source: Readonly<MatrixLike>, theta: number): void;
111
+ /**
112
+ * Applies a scaling transformation to the matrix. The _x_ axis is
113
+ * multiplied by `sx`, and the _y_ axis it is multiplied by `sy`.
114
+ **/
115
+ export declare function scaleMatrix(out: MatrixLike, source: Readonly<MatrixLike>, sx: number, sy: number): void;
116
+ /**
117
+ * Creates the specific style of matrix expected by the
118
+ * `appendShapeBeginGradientFill()` and `appendShapeLineGradientStyle()`
119
+ * helpers. Width and height are scaled to a `scaleX`/`scaleY`
120
+ * pair and the `tx`/`ty` values are offset by half the width and height.
121
+ **/
122
+ export declare function setGradientTransformMatrix(out: MatrixLike, width: number, height: number, rotation?: number, tx?: number, ty?: number): void;
123
+ export declare function setMatrix(out: MatrixLike, a: number, b: number, c: number, d: number, tx: number, ty: number): void;
124
+ export declare function setMatrixFromFloat32Array(out: MatrixLike, offset: number, source: Readonly<Float32Array>): void;
125
+ export declare function setMatrixFromMatrix3(out: MatrixLike, source: Readonly<Matrix3Like>): void;
126
+ export declare function setMatrixFromMatrix4(out: MatrixLike, source: Readonly<Matrix4Like>): void;
127
+ /**
128
+ * Sets each matrix property to a value that causes a null
129
+ * transformation. An object transformed by applying an identity matrix
130
+ * will be identical to the original.
131
+ * After calling the `identity()` method, the resulting matrix has the
132
+ * following properties: `a`=1, `b`=0, `c`=0, `d`=1, `tx`=0, `ty`=0.
133
+ **/
134
+ export declare function setMatrixIdentity(out: MatrixLike): void;
135
+ /**
136
+ * Using `setTransform()` lets you obtain the same matrix as
137
+ * if you applied `identity()`, `rotate()`, `scale()`, and
138
+ * `translate()` in succession.
139
+ **/
140
+ export declare function setTransformMatrix(out: MatrixLike, scaleX: number, scaleY: number, rotation?: number, tx?: number, ty?: number): void;
141
+ /**
142
+ * Translates the matrix along the _x_ and _y_ axes, as specified
143
+ * by the `dx` and `dy` parameters.
144
+ **/
145
+ export declare function translateMatrix(out: MatrixLike, source: Readonly<MatrixLike>, dx: number, dy: number): void;
146
+ /**
147
+ * Transforms a vector, then translates by the result.
148
+ */
149
+ export declare function translateMatrixByVector(out: MatrixLike, matrix: Readonly<MatrixLike>, vector: Readonly<Vector2Like>): void;
150
+ export declare function translateMatrixByVectorXY(out: MatrixLike, source: Readonly<MatrixLike>, x: number, y: number): void;
151
+ export declare function writeMatrixToFloat32Array(out: Float32Array, offset: number, source: Readonly<MatrixLike>): void;
152
+ //# sourceMappingURL=matrix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../src/matrix.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,WAAW,EACX,WAAW,EACX,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAEzB,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,MAAM,CAIhE;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,GAA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AAG,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAG3G;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,QAEnH;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,QAG5G;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,IAAI,CAO/G"}
package/dist/matrix.js ADDED
@@ -0,0 +1,488 @@
1
+ import { createEntity } from '@flighthq/entity';
2
+ export function cloneMatrix(source) {
3
+ const m = createMatrix();
4
+ copyMatrix(m, source);
5
+ return m;
6
+ }
7
+ export function copyMatrix(out, source) {
8
+ setMatrix(out, source.a, source.b, source.c, source.d, source.tx, source.ty);
9
+ }
10
+ /**
11
+ * Copies a column from a vector. The z component will be ignored (3x2 matrix).
12
+ */
13
+ export function copyMatrixColumnFromVector3(out, column, source) {
14
+ if (column > 2) {
15
+ throw new RangeError('Column ' + column + ' out of bounds (2)');
16
+ }
17
+ else if (column === 0) {
18
+ out.a = source.x;
19
+ out.b = source.y;
20
+ }
21
+ else if (column === 1) {
22
+ out.c = source.x;
23
+ out.d = source.y;
24
+ }
25
+ else {
26
+ out.tx = source.x;
27
+ out.ty = source.y;
28
+ }
29
+ }
30
+ /**
31
+ * Copies a column to a vector. The z component will use identity values.
32
+ */
33
+ export function copyMatrixColumnToVector3(out, column, source) {
34
+ if (column > 2) {
35
+ throw new RangeError('Column ' + column + ' out of bounds (2)');
36
+ }
37
+ else if (column === 0) {
38
+ out.x = source.a;
39
+ out.y = source.b;
40
+ out.z = 0;
41
+ }
42
+ else if (column === 1) {
43
+ out.x = source.c;
44
+ out.y = source.d;
45
+ out.z = 0;
46
+ }
47
+ else {
48
+ out.x = source.tx;
49
+ out.y = source.ty;
50
+ out.z = 1;
51
+ }
52
+ }
53
+ /**
54
+ * Copies a row from a vector. The third row (row 2) will be ignored (3x2 matrix).
55
+ */
56
+ export function copyMatrixRowFromVector3(out, row, source) {
57
+ if (row > 2) {
58
+ throw new RangeError('Row ' + row + ' out of bounds (2)');
59
+ }
60
+ else if (row === 0) {
61
+ out.a = source.x;
62
+ out.c = source.y;
63
+ out.tx = source.z;
64
+ }
65
+ else if (row === 1) {
66
+ out.b = source.x;
67
+ out.d = source.y;
68
+ out.ty = source.z;
69
+ }
70
+ }
71
+ /**
72
+ * Copies a row to a vector. The third row will use identity values (3x2 matrix).
73
+ */
74
+ export function copyMatrixRowToVector3(out, row, source) {
75
+ if (row > 2) {
76
+ throw new RangeError('Row ' + row + ' out of bounds (2)');
77
+ }
78
+ else if (row === 0) {
79
+ out.x = source.a;
80
+ out.y = source.c;
81
+ out.z = source.tx;
82
+ }
83
+ else if (row === 1) {
84
+ out.x = source.b;
85
+ out.y = source.d;
86
+ out.z = source.ty;
87
+ }
88
+ else {
89
+ out.x = 0;
90
+ out.y = 0;
91
+ out.z = 1;
92
+ }
93
+ }
94
+ export function createGradientTransformMatrix(width, height, rotation = 0, tx = 0, ty = 0) {
95
+ const out = createMatrix();
96
+ setGradientTransformMatrix(out, width, height, rotation, tx, ty);
97
+ return out;
98
+ }
99
+ /**
100
+ * An Matrix object represents two-dimensional coordinate space.
101
+ * It is a 2x3 matrix, with a, b, c, d for a two-dimensional transform,
102
+ * and tx, ty for translation.
103
+ *
104
+ * [ a b tx ]
105
+ * [ c d ty ]
106
+ *
107
+ * @see Vector2
108
+ * @see Vector3
109
+ * @see Rectangle
110
+ */
111
+ export function createMatrix(a, b, c, d, tx, ty) {
112
+ return createEntity({ a: a ?? 1, b: b ?? 0, c: c ?? 0, d: d ?? 1, tx: tx ?? 0, ty: ty ?? 0 });
113
+ }
114
+ export function createTransformMatrix(scaleX, scaleY, rotation = 0, tx = 0, ty = 0) {
115
+ const out = createMatrix();
116
+ setTransformMatrix(out, scaleX, scaleY, rotation, tx, ty);
117
+ return out;
118
+ }
119
+ export function equalsMatrix(a, b, compareTranslation = true) {
120
+ if (a === b)
121
+ return true;
122
+ if (!a || !b)
123
+ return false;
124
+ return ((!compareTranslation || (a.tx === b.tx && a.ty === b.ty)) &&
125
+ a.a === b.a &&
126
+ a.b === b.b &&
127
+ a.c === b.c &&
128
+ a.d === b.d);
129
+ }
130
+ /**
131
+ * Computes the inverse of a 2D affine matrix and writes it to out.
132
+ *
133
+ * Translation (tx, ty) is applied after the linear transformation (scale/rotation/shear) is inverted.
134
+ */
135
+ export function inverseMatrix(out, source) {
136
+ const a = source.a;
137
+ const b = source.b;
138
+ const c = source.c;
139
+ const d = source.d;
140
+ const tx = source.tx;
141
+ const ty = source.ty;
142
+ const det = a * d - c * b;
143
+ if (det === 0) {
144
+ out.a = out.b = out.c = out.d = 0;
145
+ out.tx = -tx;
146
+ out.ty = -ty;
147
+ }
148
+ else {
149
+ const invDet = 1 / det;
150
+ const outA = d * invDet;
151
+ const outB = -b * invDet;
152
+ const outC = -c * invDet;
153
+ const outD = a * invDet;
154
+ out.a = outA;
155
+ out.b = outB;
156
+ out.c = outC;
157
+ out.d = outD;
158
+ out.tx = -(outA * tx + outC * ty);
159
+ out.ty = -(outB * tx + outD * ty);
160
+ }
161
+ }
162
+ /**
163
+ * Use an inverse of the source matrix to transform
164
+ * a given point, including translation.
165
+ * @see inverseMatrixTransformPointXY
166
+ */
167
+ export function inverseMatrixTransformPoint(out, matrix, point) {
168
+ inverseMatrixTransformPointXY(out, matrix, point.x, point.y);
169
+ }
170
+ export function inverseMatrixTransformPointXY(out, source, x, y) {
171
+ const norm = source.a * source.d - source.b * source.c;
172
+ if (norm === 0) {
173
+ out.x = -source.tx;
174
+ out.y = -source.ty;
175
+ }
176
+ else {
177
+ const px = (1.0 / norm) * (source.c * (source.ty - y) + source.d * (x - source.tx));
178
+ out.y = (1.0 / norm) * (source.a * (y - source.ty) + source.b * (source.tx - x));
179
+ out.x = px;
180
+ }
181
+ }
182
+ /**
183
+ * Use an inverse of the source matrix to transform
184
+ * a given point, excluding translation.
185
+ * @see inverseMatrixTransformPointXY
186
+ */
187
+ export function inverseMatrixTransformVector(out, matrix, vector) {
188
+ inverseMatrixTransformVectorXY(out, matrix, vector.x, vector.y);
189
+ }
190
+ export function inverseMatrixTransformVectorXY(out, source, x, y) {
191
+ const norm = source.a * source.d - source.b * source.c;
192
+ if (norm === 0) {
193
+ out.x = 0;
194
+ out.y = 0;
195
+ }
196
+ else {
197
+ const px = (1.0 / norm) * (source.d * x - source.c * y);
198
+ out.y = (1.0 / norm) * (-source.b * x + source.a * y);
199
+ out.x = px;
200
+ }
201
+ }
202
+ /**
203
+ * Transforms an axis-aligned bounding box defined by two opposite corners
204
+ * (ax, ay) and (bx, by) into a world-space axis-aligned bounding box.
205
+ *
206
+ * The input points may be in any order (min/max not required).
207
+ *
208
+ * This accounts for translation, rotation, scaling, and skew
209
+ * from the source matrix.
210
+ **/
211
+ export function matrixTransformBounds(out, source, ax, ay, bx, by) {
212
+ const { a, b, c, d } = source;
213
+ // Fast path for empty rectangles (0x0 size)
214
+ if (ax === bx && ay === by) {
215
+ out.x = source.tx;
216
+ out.y = source.ty;
217
+ out.width = 0;
218
+ out.height = 0;
219
+ return;
220
+ }
221
+ let tx0 = a * ax + c * ay;
222
+ let tx1 = tx0;
223
+ let ty0 = b * ax + d * ay;
224
+ let ty1 = ty0;
225
+ let tx = a * bx + c * ay;
226
+ let ty = b * bx + d * ay;
227
+ if (tx < tx0)
228
+ tx0 = tx;
229
+ if (ty < ty0)
230
+ ty0 = ty;
231
+ if (tx > tx1)
232
+ tx1 = tx;
233
+ if (ty > ty1)
234
+ ty1 = ty;
235
+ tx = a * bx + c * by;
236
+ ty = b * bx + d * by;
237
+ if (tx < tx0)
238
+ tx0 = tx;
239
+ if (ty < ty0)
240
+ ty0 = ty;
241
+ if (tx > tx1)
242
+ tx1 = tx;
243
+ if (ty > ty1)
244
+ ty1 = ty;
245
+ tx = a * ax + c * by;
246
+ ty = b * ax + d * by;
247
+ if (tx < tx0)
248
+ tx0 = tx;
249
+ if (ty < ty0)
250
+ ty0 = ty;
251
+ if (tx > tx1)
252
+ tx1 = tx;
253
+ if (ty > ty1)
254
+ ty1 = ty;
255
+ out.x = tx0 + source.tx;
256
+ out.y = ty0 + source.ty;
257
+ out.width = tx1 - tx0;
258
+ out.height = ty1 - ty0;
259
+ }
260
+ export function matrixTransformBoundsVector2(out, matrix, a, b) {
261
+ matrixTransformBounds(out, matrix, a.x, a.y, b.x, b.y);
262
+ }
263
+ /**
264
+ * Transforms a point using the given matrix.
265
+ * @see matrixTransformPointXY
266
+ */
267
+ export function matrixTransformPoint(out, matrix, point) {
268
+ matrixTransformPointXY(out, matrix, point.x, point.y);
269
+ }
270
+ /**
271
+ * Transforms an (x, y) point using the given matrix.
272
+ */
273
+ export function matrixTransformPointXY(out, source, x, y) {
274
+ out.x = x * source.a + y * source.c + source.tx;
275
+ out.y = x * source.b + y * source.d + source.ty;
276
+ }
277
+ /**
278
+ * Applies a point transform to each corner of a rectangle and updates it
279
+ * to the axis-aligned bounding box of the transformed rectangle.
280
+ *
281
+ * This accounts for translation, rotation, scaling, and skew
282
+ * from the given matrix.
283
+ *
284
+ * @see matrixTransformBounds
285
+ * @see matrixTransformBounds
286
+ **/
287
+ export function matrixTransformRectangle(out, matrix, source) {
288
+ matrixTransformBounds(out, matrix, source.x, source.y, source.x + source.width, source.y + source.height);
289
+ }
290
+ /**
291
+ * Given a point in the pretransform coordinate space, returns the
292
+ * coordinates of that point after the transformation occurs. Unlike the
293
+ * standard transformation applied using the `matrixTransformPoint()`
294
+ * method, the `matrixTransformVector()` method's transformation
295
+ * does not consider the translation parameters `tx` and
296
+ * `ty`.
297
+ * @see matrixTransformVectorXY
298
+ **/
299
+ export function matrixTransformVector(out, matrix, vector) {
300
+ matrixTransformVectorXY(out, matrix, vector.x, vector.y);
301
+ }
302
+ export function matrixTransformVectorXY(out, source, x, y) {
303
+ out.x = x * source.a + y * source.c;
304
+ out.y = x * source.b + y * source.d;
305
+ }
306
+ /**
307
+ * Multiplies a by b and writes the result to out.
308
+ *
309
+ * out = a * b
310
+ */
311
+ export function multiplyMatrix(out, a, b) {
312
+ const a1 = a.a, b1 = a.b, tx1 = a.tx, c1 = a.c, d1 = a.d, ty1 = a.ty;
313
+ const a2 = b.a, b2 = b.b, tx2 = b.tx, c2 = b.c, d2 = b.d, ty2 = b.ty;
314
+ out.a = a1 * a2 + c1 * b2;
315
+ out.b = b1 * a2 + d1 * b2;
316
+ out.tx = a1 * tx2 + c1 * ty2 + tx1;
317
+ out.c = a1 * c2 + c1 * d2;
318
+ out.d = b1 * c2 + d1 * d2;
319
+ out.ty = b1 * tx2 + d1 * ty2 + ty1;
320
+ }
321
+ /**
322
+ * Applies a rotation transformation to the given Matrix object
323
+ * and writes the result to out.
324
+ *
325
+ * This is a 2x2 rotation, it will not rotate
326
+ **/
327
+ export function rotateMatrix(out, source, theta) {
328
+ /**
329
+ Rotate object "after" other transforms
330
+
331
+ [ a b tx ][ ma mb mtx ]
332
+ [ c d ty ][ mc md mty ]
333
+ [ 0 0 1 ][ 0 0 1 ]
334
+
335
+ ma = md = cos
336
+ mb = sin
337
+ mc = -sin
338
+ mtx = my = 0
339
+ **/
340
+ const cos = Math.cos(theta);
341
+ const sin = Math.sin(theta);
342
+ var a1 = source.a * cos - source.b * sin;
343
+ out.b = source.a * sin + source.b * cos;
344
+ out.a = a1;
345
+ var c1 = source.c * cos - source.d * sin;
346
+ out.d = source.c * sin + source.d * cos;
347
+ out.c = c1;
348
+ var tx1 = source.tx * cos - source.ty * sin;
349
+ out.ty = source.tx * sin + source.ty * cos;
350
+ out.tx = tx1;
351
+ }
352
+ /**
353
+ * Applies a scaling transformation to the matrix. The _x_ axis is
354
+ * multiplied by `sx`, and the _y_ axis it is multiplied by `sy`.
355
+ **/
356
+ export function scaleMatrix(out, source, sx, sy) {
357
+ /*
358
+ Scale object "after" other transforms
359
+
360
+ [ a b 0 ][ sx 0 0 ]
361
+ [ c d 0 ][ 0 sy 0 ]
362
+ [ tx ty 1 ][ 0 0 1 ]
363
+ **/
364
+ out.a = source.a * sx;
365
+ out.b = source.b * sy;
366
+ out.c = source.c * sx;
367
+ out.d = source.d * sy;
368
+ out.tx = source.tx * sx;
369
+ out.ty = source.ty * sy;
370
+ }
371
+ /**
372
+ * Creates the specific style of matrix expected by the
373
+ * `appendShapeBeginGradientFill()` and `appendShapeLineGradientStyle()`
374
+ * helpers. Width and height are scaled to a `scaleX`/`scaleY`
375
+ * pair and the `tx`/`ty` values are offset by half the width and height.
376
+ **/
377
+ export function setGradientTransformMatrix(out, width, height, rotation = 0, tx = 0, ty = 0) {
378
+ out.a = width / 1638.4;
379
+ out.d = height / 1638.4;
380
+ // rotation is clockwise
381
+ if (rotation !== 0) {
382
+ const cos = Math.cos(rotation);
383
+ const sin = Math.sin(rotation);
384
+ out.b = sin * out.d;
385
+ out.c = -sin * out.a;
386
+ out.a *= cos;
387
+ out.d *= cos;
388
+ }
389
+ else {
390
+ out.b = 0;
391
+ out.c = 0;
392
+ }
393
+ out.tx = tx + width / 2;
394
+ out.ty = ty + height / 2;
395
+ }
396
+ export function setMatrix(out, a, b, c, d, tx, ty) {
397
+ out.a = a;
398
+ out.b = b;
399
+ out.c = c;
400
+ out.d = d;
401
+ out.tx = tx;
402
+ out.ty = ty;
403
+ }
404
+ export function setMatrixFromFloat32Array(out, offset, source) {
405
+ out.a = source[offset];
406
+ out.b = source[offset + 1];
407
+ out.c = source[offset + 2];
408
+ out.d = source[offset + 3];
409
+ out.tx = source[offset + 4];
410
+ out.ty = source[offset + 5];
411
+ }
412
+ export function setMatrixFromMatrix3(out, source) {
413
+ const m = source.m;
414
+ setMatrix(out, m[0], m[1], m[3], m[4], m[2], m[5]);
415
+ }
416
+ export function setMatrixFromMatrix4(out, source) {
417
+ const s = source.m;
418
+ out.a = s[0];
419
+ out.b = s[4];
420
+ out.tx = s[12];
421
+ out.c = s[1];
422
+ out.d = s[5];
423
+ out.ty = s[13];
424
+ }
425
+ /**
426
+ * Sets each matrix property to a value that causes a null
427
+ * transformation. An object transformed by applying an identity matrix
428
+ * will be identical to the original.
429
+ * After calling the `identity()` method, the resulting matrix has the
430
+ * following properties: `a`=1, `b`=0, `c`=0, `d`=1, `tx`=0, `ty`=0.
431
+ **/
432
+ export function setMatrixIdentity(out) {
433
+ setMatrix(out, 1, 0, 0, 1, 0, 0);
434
+ }
435
+ /**
436
+ * Using `setTransform()` lets you obtain the same matrix as
437
+ * if you applied `identity()`, `rotate()`, `scale()`, and
438
+ * `translate()` in succession.
439
+ **/
440
+ export function setTransformMatrix(out, scaleX, scaleY, rotation = 0, tx = 0, ty = 0) {
441
+ // identity ();
442
+ // rotate (rotation);
443
+ // scale (scaleX, scaleY);
444
+ // translate (tx, ty);
445
+ if (rotation !== 0) {
446
+ const cos = Math.cos(rotation);
447
+ const sin = Math.sin(rotation);
448
+ out.a = cos * scaleX;
449
+ out.b = sin * scaleY;
450
+ out.c = -sin * scaleX;
451
+ out.d = cos * scaleY;
452
+ }
453
+ else {
454
+ out.a = scaleX;
455
+ out.b = 0;
456
+ out.c = 0;
457
+ out.d = scaleY;
458
+ }
459
+ out.tx = tx;
460
+ out.ty = ty;
461
+ }
462
+ /**
463
+ * Translates the matrix along the _x_ and _y_ axes, as specified
464
+ * by the `dx` and `dy` parameters.
465
+ **/
466
+ export function translateMatrix(out, source, dx, dy) {
467
+ out.tx = source.tx + dx;
468
+ out.ty = source.ty + dy;
469
+ }
470
+ /**
471
+ * Transforms a vector, then translates by the result.
472
+ */
473
+ export function translateMatrixByVector(out, matrix, vector) {
474
+ translateMatrixByVectorXY(out, matrix, vector.x, vector.y);
475
+ }
476
+ export function translateMatrixByVectorXY(out, source, x, y) {
477
+ out.tx = source.tx + source.a * x + source.c * y;
478
+ out.ty = source.ty + source.b * x + source.d * y;
479
+ }
480
+ export function writeMatrixToFloat32Array(out, offset, source) {
481
+ out[offset] = source.a;
482
+ out[offset + 1] = source.b;
483
+ out[offset + 2] = source.c;
484
+ out[offset + 3] = source.d;
485
+ out[offset + 4] = source.tx;
486
+ out[offset + 5] = source.ty;
487
+ }
488
+ //# sourceMappingURL=matrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matrix.js","sourceRoot":"","sources":["../src/matrix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAWhD,MAAM,UAAU,WAAW,CAAC,MAA4B;IACtD,MAAM,CAAC,GAAG,YAAY,EAAE,CAAC;IACzB,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACtB,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAe,EAAE,MAA4B;IACtE,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAe,EAAE,MAAc,EAAE,MAA6B;IACxG,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QACf,MAAM,IAAI,UAAU,CAAC,SAAS,GAAG,MAAM,GAAG,oBAAoB,CAAC,CAAC;IAClE,CAAC;SAAM,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;QACjB,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;IAC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