Basic 3x3 matrix class used for matrix calculations.

Note that like three.js, the constructor and set method take arguments in row-major order, while internally they are stored in the elements array in column-major order.

Constructors

  • Mat3 constructor

    Parameters

    • elements: Float32Array = ...

      initial array to use, default to identity matrix

    Returns Mat3

Properties

type: string

The type of the Mat3

elements: Float32Array

Our matrix array

Methods

  • Sets the matrix from 9 numbers

    Parameters

    • n11: number

      number

    • n12: number

      number

    • n13: number

      number

    • n21: number

      number

    • n22: number

      number

    • n23: number

      number

    • n31: number

      number

    • n32: number

      number

    • n33: number

      number

    Returns Mat3

    • this Mat3 after being set
  • Sets the Mat3 values from an array

    Parameters

    • array: number[] | Float32Array = ...

      array to use

    Returns Mat3

    • this Mat3 after being set