Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Matrix3

Serializable THREE.js Matrix3

Hierarchy

  • Matrix3
    • Matrix3

Index

Constructors

constructor

  • Creates an identity matrix.

    Returns Matrix3

Properties

elements

elements: number[]

Methods

clone

copy

  • Parameters

    • m: Matrix3

    Returns Matrix3

determinant

  • determinant(): number
  • Returns number

equals

  • equals(matrix: Matrix3): boolean
  • Parameters

    • matrix: Matrix3

    Returns boolean

extractBasis

  • extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix3
  • Parameters

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

    Returns Matrix3

flattenToArrayOffset

  • flattenToArrayOffset(array: number[], offset: number): number[]
  • deprecated

    Use {@link Matrix3#toArray .toArray()} instead.

    Parameters

    • array: number[]
    • offset: number

    Returns number[]

fromArray

  • fromArray(array: number[] | ArrayLike<number>, offset?: number): Matrix3
  • 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

getInverse

  • getInverse(matrix: Matrix4, throwOnDegenerate?: boolean): Matrix3
  • getInverse(matrix: Matrix): Matrix
  • deprecated

    Use {@link Matrix3#invert .invert()} instead.

    Parameters

    • matrix: Matrix4
    • Optional throwOnDegenerate: boolean

    Returns Matrix3

  • Parameters

    • matrix: Matrix

    Returns Matrix

getNormalMatrix

  • getNormalMatrix(matrix4: Matrix4): Matrix3
  • Parameters

    • matrix4: Matrix4

    Returns Matrix3

identity

  • identity(): Matrix3
  • Returns Matrix3

invert

  • invert(): Matrix3
  • Inverts this matrix in place.

    Returns Matrix3

multiply

  • multiply(m: Matrix3): Matrix3
  • Multiplies this matrix by m.

    Parameters

    • m: Matrix3

    Returns Matrix3

multiplyMatrices

  • multiplyMatrices(a: Matrix3, b: Matrix3): Matrix3
  • Sets this matrix to a x b.

    Parameters

    • a: Matrix3
    • b: Matrix3

    Returns Matrix3

multiplyScalar

  • multiplyScalar(s: number): Matrix3
  • Parameters

    • s: number

    Returns Matrix3

multiplyVector3

  • multiplyVector3(vector: Vector3): any
  • deprecated

    Use vector.applyMatrix3( matrix ) instead.

    Parameters

    • vector: Vector3

    Returns any

multiplyVector3Array

  • multiplyVector3Array(a: any): any
  • deprecated

    This method has been removed completely.

    Parameters

    • a: any

    Returns any

premultiply

  • premultiply(m: Matrix3): Matrix3
  • Parameters

    • m: Matrix3

    Returns Matrix3

rotate

  • rotate(theta: number): Matrix3
  • Parameters

    • theta: number

    Returns Matrix3

scale

  • scale(sx: number, sy: number): Matrix3
  • Parameters

    • sx: number
    • sy: number

    Returns Matrix3

set

  • set(n11: number, n12: number, n13: number, n21: number, n22: number, n23: number, n31: number, n32: number, n33: number): Matrix3
  • Parameters

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

    Returns Matrix3

setFromMatrix4

  • setFromMatrix4(m: Matrix4): Matrix3
  • Parameters

    • m: Matrix4

    Returns Matrix3

setUvTransform

  • setUvTransform(tx: number, ty: number, sx: number, sy: number, rotation: number, cx: number, cy: number): Matrix3
  • Parameters

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

    Returns Matrix3

toArray

  • toArray(array?: number[], offset?: number): number[]
  • toArray(array?: Matrix3Tuple, offset?: 0): Matrix3Tuple
  • toArray(array?: ArrayLike<number>, offset?: number): ArrayLike<number>
  • 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.

translate

  • translate(tx: number, ty: number): Matrix3
  • Parameters

    • tx: number
    • ty: number

    Returns Matrix3

transpose

  • transpose(): Matrix3
  • Transposes this matrix in place.

    Returns Matrix3

transposeIntoArray

  • transposeIntoArray(r: number[]): Matrix3
  • Transposes this matrix into the supplied array r, and returns itself.

    Parameters

    • r: number[]

    Returns Matrix3