diff --git a/lib/DOMTransform.ts b/lib/DOMTransform.ts index 1bbffb9..e8a7caf 100644 --- a/lib/DOMTransform.ts +++ b/lib/DOMTransform.ts @@ -33,8 +33,6 @@ export class DOMTransform { this.#updateMatrices(); } - // Getters and setters for properties - get x(): number { return this.#x; } @@ -59,15 +57,6 @@ export class DOMTransform { this.#updateMatrices(); } - /** - * Updates the transformation matrices based on the current position and rotation. - */ - #updateMatrices() { - this.#transformMatrix.identity().translate(this.#x, this.#y).rotate(this.#rotation); - - this.#inverseMatrix = this.#transformMatrix.clone().invert(); - } - // Matrix accessors get matrix(): Matrix { return this.#transformMatrix; @@ -107,4 +96,13 @@ export class DOMTransform { rotation: this.rotation, }; } + + /** + * Updates the transformation matrices based on the current position and rotation. + */ + #updateMatrices() { + this.#transformMatrix.identity().translate(this.#x, this.#y).rotate(this.#rotation); + + this.#inverseMatrix = this.#transformMatrix.clone().invert(); + } }