Created
March 1, 2025 03:04
-
-
Save SharpCoder/9168569e12267f9328199ac5288dec58 to your computer and use it in GitHub Desktop.
Silly Typscript is Silly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class TRS { | |
/** x transform */ | |
x: number; | |
/** y transform */ | |
y: number; | |
/** x scale */ | |
sx: number; | |
/** y scale */ | |
sy: number; | |
/** x rotation offset */ | |
tx: number; | |
/** y rotation offset */ | |
ty: number; | |
/** rotation amount in radians */ | |
rotation: number; | |
constructor({ | |
x, | |
y, | |
sx, | |
sy, | |
tx, | |
ty, | |
rotation | |
}: { | |
x: number; | |
y: number; | |
tx: number; | |
ty: number; | |
sx: number; | |
sy: number; | |
rotation: number; | |
}) { | |
this.x = x; | |
this.y = y; | |
this.tx = tx; | |
this.ty = ty; | |
this.sx = sx; | |
this.sy = sy; | |
this.rotation = rotation; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment