API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classMatrix
Mutable 3×3 row-major affine transformation matrix used throughout the rendering and physics pipeline. Layout (row, column): ``` | a b x | | c d y | | e f z | ``` `a`/`d` are the X/Y scale + rotation cosines, `b`/`c` are the shear/rotation sines, `x`/`y` are the translation components, and `e`/`f`/`z` are the homogeneous row (typically `0, 0, 1`). All mutating methods return `this` for chaining. `Matrix.temp` is a shared scratch instance. `Matrix.identity` is a read-only identity constant.
import { Matrix } from '@codexo/exojs' Mutable 3×3 row-major affine transformation matrix used throughout the rendering and physics pipeline.
Layout (row, column): ``` | a b x | | c d y | | e f z | ``` `a`/`d` are the X/Y scale + rotation cosines, `b`/`c` are the shear/rotation sines, `x`/`y` are the translation components, and `e`/`f`/`z` are the homogeneous row (typically `0, 0, 1`).
All mutating methods return `this` for chaining. `Matrix.temp` is a shared scratch instance. `Matrix.identity` is a read-only identity constant.
new(a: number, b: number, x: number, c: number, d: number, y: number, e: number, f: number, z: number): Matrix clone(): this combine(matrix: Matrix): this copy(matrix: Matrix): this destroy(): void equals(__namedParameters: Partial<Matrix>): boolean getInverse(result: Matrix): Matrix rotate(angle: number, centerX: number, centerY: number): Matrix scale(scaleX: number, scaleY: number, centerX: number, centerY: number): Matrix set(a: number, b: number, x: number, c: number, d: number, y: number, e: number, f: number, z: number): this toArray(transpose: boolean): Float32Array translate(x: number, y: number): Matrix a: number b: number c: number d: number e: number f: number x: number y: number z: number identity: Matrix temp: Matrix