Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/caviar/src/math/mod.ts>TransformMatrix

⚡ Blazing fast, modern, Game Engine powered by WebGPU for Deno and the browser
Latest
class TransformMatrix
import { TransformMatrix } from "https://deno.land/x/caviar@2.6.9/src/math/mod.ts";

Constructors

new
TransformMatrix(
a?,
b?,
c?,
d?,
tx?,
ty?,
)

Properties

a: number
b: number
c: number
d: number
decomposedMatrix: IDecomposed
e: number
f: number
matrix: Float32Array
readonly
rotation: number
readonly
rotationNormalized: number
readonly
scaleX: number
readonly
scaleY: number
tx: number
ty: number

Methods

applyInverse(
x: number,
y: number,
output?: Vector,
): Vector
applyITRS(
x: number,
y: number,
rotation: number,
scaleX: number,
scaleY: number,
): TransformMatrix
copyToArray(dest: number[]): number[]
decomposeMatrix(): IDecomposed
getCSSMatrix(): string
getX(x: number, y: number): number
getXRound(
x: number,
y: number,
round?,
): number
getY(x: number, y: number): number
getYRound(
x: number,
y: number,
round?,
): number
multiplyWithOffset(
offsetX: number,
offsetY: number,
): TransformMatrix
rotate(angle: number): TransformMatrix
scale(x: number, y: number): TransformMatrix
setTransform(
a: number,
b: number,
c: number,
d: number,
tx: number,
ty: number,
): TransformMatrix
transform(
a: number,
b: number,
c: number,
d: number,
tx: number,
ty: number,
): TransformMatrix
transformPoint(
x: number,
y: number,
point?: IVectorLike,
): IVectorLike
translate(x: number, y: number): TransformMatrix