( class Matrix3 implements Matrix )

Implements

Constructors

  • Creates an identity matrix.

    Returns Matrix3

  • Creates a 3x3 matrix with the given arguments in row-major order.

    Parameters

    • n11: number
    • n12: number
    • n13: number
    • n21: number
    • n22: number
    • n23: number
    • n31: number
    • n32: number
    • n33: number

    Returns Matrix3

Properties

elements: number[]

Array with matrix values.

[1, 0, 0, 0, 1, 0, 0, 0, 1]

Methods

  • clone():T;

    Returns this

  • copy(m:T):T;

    Parameters

    Returns this

  • Returns number

  • Parameters

    Returns boolean

  • Parameters

    • array: number[]
    • offset: number

    Returns number[]

    Use .toArray() instead.

  • Sets the values of this matrix from the provided array or array-like.

    Parameters

    • array: ArrayLike<number> | number[]

      the source array or array-like.

    • Optionaloffset: number

      (optional) offset into the array-like. Default is 0.

    Returns Matrix3

  • Parameters

    • matrix: Matrix4
    • OptionalthrowOnDegenerate: boolean

    Returns Matrix3

    Use .invert() instead.

  • Parameters

    Returns Matrix

  • Parameters

    Returns Matrix3

  • identity():T;

    Returns Matrix3

  • Inverts this matrix in place.

    Returns Matrix3

  • Sets this matrix as a 2D rotational transformation by theta radians. The resulting matrix will be:

    cos(θ) -sin(θ) 0
    sin(θ) cos(θ) 0
    0 0 1

    Parameters

    • theta: number

      Rotation angle in radians. Positive values rotate counterclockwise.

    Returns this

  • Parameters

    • theta: number

    Returns Matrix3

  • Sets this matrix as a 2D scale transform:

    x, 0, 0,
    0, y, 0,
    0, 0, 1

    Parameters

    • x: number

      the amount to scale in the X axis.

    • y: number

      the amount to scale in the Y axis.

    Returns this

  • Parameters

    • x: number
    • y: number

    Returns Matrix3

  • Sets this matrix as a 2D translation transform:

    1, 0, x,
    0, 1, y,
    0, 0, 1

    Parameters

    Returns this

  • Parameters

    • x: number
    • y: number

    Returns this

  • Multiplies this matrix by m.

    Parameters

    Returns Matrix3

  • Sets this matrix to a x b.

    Parameters

    Returns Matrix3

  • multiplyScalar(s:number):T;

    Parameters

    • s: number

    Returns Matrix3

  • Parameters

    Returns any

    Use vector.applyMatrix3( matrix ) instead.

  • Parameters

    • a: any

    Returns any

    This method has been removed completely.

  • Parameters

    Returns Matrix3

  • Parameters

    • theta: number

    Returns Matrix3

  • Parameters

    • sx: number
    • sy: number

    Returns Matrix3

  • Parameters

    • n11: number
    • n12: number
    • n13: number
    • n21: number
    • n22: number
    • n23: number
    • n31: number
    • n32: number
    • n33: number

    Returns Matrix3

  • Parameters

    Returns Matrix3

  • Parameters

    • tx: number
    • ty: number
    • sx: number
    • sy: number
    • rotation: number
    • cx: number
    • cy: number

    Returns Matrix3

  • Returns an array with the values of this matrix, or copies them into the provided array.

    Parameters

    • Optionalarray: number[]

      (optional) array to store the matrix to. If this is not provided, a new array will be created.

    • Optionaloffset: number

      (optional) optional offset into the array.

    Returns number[]

    The created or provided array.

  • Parameters

    Returns Matrix3Tuple

  • Copies he values of this matrix into the provided array-like.

    Parameters

    • Optionalarray: ArrayLike<number>

      array-like to store the matrix to.

    • Optionaloffset: number

      (optional) optional offset into the array-like.

    Returns ArrayLike<number>

    The provided array-like.

  • Parameters

    • tx: number
    • ty: number

    Returns Matrix3

  • Transposes this matrix in place.

    Returns Matrix3

  • Transposes this matrix into the supplied array r, and returns itself.

    Parameters

    • r: number[]

    Returns Matrix3