(x, y, z)
| 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); |
| 1084 | if (typeof x !== "number" && x !== undefined) { |
| 1085 | this.x = x ?? Vector3.zero(); |
| 1086 | this.y = y ?? Vector3.zero(); |
| 1087 | this.z = z ?? Vector3.zero(); |
| 1088 | } |
| 1089 | } |
| 1090 | clone() { |
| 1091 | return new Matrix3(this.x, this.y, this.z); |
| 1092 | } |