(decomposed)
| 1074 | return Matrix3.from(1 - yy2 - zz2, xy2 + sz2, xz2 - sy2, xy2 - sz2, 1 - xx2 - zz2, yz2 + sx2, xz2 + sy2, yz2 - sx2, 1 - xx2 - yy2); |
| 1075 | } |
| 1076 | static fromDecomposed(decomposed) { |
| 1077 | const m = Matrix2.fromAngle(decomposed.rot).mul(decomposed.scale).toMatrix3(); |
| 1078 | m.z = decomposed.disp.extend3(1); |
| 1079 | return m; |
| 1080 | } |
| 1081 | constructor(x, y, z){ |
| 1082 | this.ptr = typeof x === "number" ? x : alloc(36); |
| 1083 | this.#internal = new Float32Array(memory.buffer, this.ptr, 9); |