cleanup transform
This commit is contained in:
parent
44db3a77a2
commit
207c81e9df
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue