Lens Scripting API

    Class mat4

    A 4x4 matrix.

    Index

    Constructors

    • Creates a new mat4, defaulting to identity values.

      Returns mat4

    Properties

    column0: vec4

    The first column of the matrix.

    column1: vec4

    The second column of the matrix.

    column2: vec4

    The third column of the matrix.

    column3: vec4

    The fourth column of the matrix.

    description: string

    Returns a string representation of the matrix.

    Methods

    • Returns the result of adding the two matrices together.

      Parameters

      Returns mat4

    • Returns the two matrices multiplied component-wise.

      Parameters

      Returns mat4

    • Returns a new matrix with translation translation, rotation rotation, and scale scale.

      Parameters

      Returns mat4

    • Returns the determinant of the matrix.

      Returns number

    • Returns the result of dividing the two matrices.

      Parameters

      Returns mat4

    • Returns whether the two matrices are equal.

      Parameters

      Returns boolean

    • Returns an euler angle representation of this matrix's rotation, in radians.

      Returns vec3

    • Returns an euler angle representation of this matrix's rotation, in radians.

      Returns vec3

    • Returns a new matrix with the specified euler angles (in radians).

      Parameters

      Returns mat4

    • Returns a new matrix with euler angles euler (in radians).

      Parameters

      Returns mat4

    • Returns a new matrix with x euler angle xAngle (in radians).

      Parameters

      • xAngle: number

      Returns mat4

    • Returns a new matrix with y euler angle yAngle (in radians).

      Parameters

      • yAngle: number

      Returns mat4

    • Returns a new matrix with z euler angle zAngle (in radians).

      Parameters

      • zAngle: number

      Returns mat4

    • Returns a new matrix with rotation rotation.

      Parameters

      Returns mat4

    • Returns a new matrix with scale scale.

      Parameters

      Returns mat4

    • Returns a new matrix with the translation translation.

      Parameters

      Returns mat4

    • Returns a new matrix with the yaw, pitch, and roll radians found in yawPitchRoll.

      Parameters

      Returns mat4

    • Returns the identity matrix.

      Returns mat4

    • Returns the inverse of the matrix.

      Returns mat4

    • Returns the result of multiplying the two matrices.

      Parameters

      Returns mat4

    • Returns the direction vector multiplied by this matrix.

      Parameters

      Returns vec3

    • Returns the point point multiplied by this matrix.

      Parameters

      Returns vec3

    • Returns the result of scalar multiplying the matrix.

      Parameters

      • scalar: number

      Returns mat4

    • Returns the vector multiplied by this matrix.

      Parameters

      Returns vec4

    • Returns a new matrix generated using the provided arguments.

      Parameters

      • left: number
      • right: number
      • bottom: number
      • top: number
      • zNear: number
      • zFar: number

      Returns mat4

    • Returns the outer product of the two matrices.

      Parameters

      Returns mat4

    • Returns a new matrix generated using the provided arguments.

      Parameters

      • fovY: number
      • aspect: number
      • zNear: number
      • zFar: number

      Returns mat4

    • Returns the result of subtracting the two matrices.

      Parameters

      Returns mat4

    • Returns a string representation of the matrix.

      Returns string

    • Returns the transpose of this matrix.

      Returns mat4

    • Returns a matrix with all zero values.

      Returns mat4

    MMNEPVFCICPMFPCPTTAAATR