Serializable THREE.js Matrix3

Hierarchy-Diagram

UML class diagram of Matrix3
Legend
icon for a class in the UML class diagram class

Hierarchy

  • Matrix3
    • Matrix3

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[]

Methods

  • Parameters

    • m: Matrix3

    Returns this

  • Returns number

  • Parameters

    • matrix: Matrix3

    Returns boolean

  • Parameters

    • xAxis: Vector3
    • yAxis: Vector3
    • zAxis: Vector3

    Returns Matrix3

  • Parameters

    • array: number[]
    • offset: number

    Returns number[]

    Deprecated

    Use .toArray() instead.

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

    Parameters

    • array: number[] | ArrayLike<number>

      the source array or array-like.

    • Optional offset: number

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

    Returns Matrix3

  • Parameters

    • matrix: Matrix4
    • Optional throwOnDegenerate: boolean

    Returns Matrix3

    Deprecated

    Use .invert() instead.

  • Parameters

    • matrix: Matrix

    Returns Matrix

  • Parameters

    • matrix4: Matrix4

    Returns Matrix3

  • 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

    • v: Vector2

    Returns this

  • Parameters

    • x: number
    • y: number

    Returns this

  • Multiplies this matrix by m.

    Parameters

    • m: Matrix3

    Returns Matrix3

  • Sets this matrix to a x b.

    Parameters

    • a: Matrix3
    • b: Matrix3

    Returns Matrix3

  • Parameters

    • s: number

    Returns Matrix3

  • Parameters

    • vector: Vector3

    Returns any

    Deprecated

    Use vector.applyMatrix3( matrix ) instead.

  • Parameters

    • a: any

    Returns any

    Deprecated

    This method has been removed completely.

  • Parameters

    • m: Matrix3

    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

    • m: Matrix4

    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

    • Optional array: number[]

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

    • Optional offset: number

      (optional) optional offset into the array.

    Returns number[]

    The created or provided array.

  • Parameters

    • Optional array: Matrix3Tuple
    • Optional offset: 0

    Returns Matrix3Tuple

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

    Parameters

    • Optional array: ArrayLike<number>

      array-like to store the matrix to.

    • Optional offset: 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