Skip to content

Instantly share code, notes, and snippets.

@SharpCoder
Created March 1, 2025 03:04
Show Gist options
  • Save SharpCoder/9168569e12267f9328199ac5288dec58 to your computer and use it in GitHub Desktop.
Save SharpCoder/9168569e12267f9328199ac5288dec58 to your computer and use it in GitHub Desktop.
Silly Typscript is Silly
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