API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classMatrix

@codexo/exojs / math / stable

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.

11
props
11
methods
0
events
Import
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.

Constructors 1
new(a: number, b: number, x: number, c: number, d: number, y: number, e: number, f: number, z: number): Matrix
Methods 11
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
Properties 11
a: number
b: number
c: number
d: number
e: number
f: number
x: number
y: number
z: number
identity: Matrix
temp: Matrix
Source