Preparing search index...

    A 3x3 matrix type supporting common linear algebra operations.

        const identity = new mat3();
    console.log('mat3 identity column0:', identity.column0.x, identity.column0.y, identity.column0.z);
    console.log('mat3 identity column1:', identity.column1.x, identity.column1.y, identity.column1.z);
    console.log('mat3 identity column2:', identity.column2.x, identity.column2.y, identity.column2.z);

    const custom = new mat3();
    custom.column0 = new vec3(1, 0, 0);
    custom.column1 = new vec3(0, 2, 0);
    custom.column2 = new vec3(0, 0, 3);
    console.log('Scaled mat3 diagonal:', custom.column0.x, custom.column1.y, custom.column2.z);
    Index

    Constructors

    • Constructs a new identity mat3 matrix.

      Returns mat3

    Properties

    column0: vec3

    First column vector of the matrix.

    column1: vec3

    Second column vector of the matrix.

    column2: vec3

    Third column vector of the matrix.

    description: string

    Human-readable description string for this matrix instance.

    Methods

    • Adds another mat3 to this matrix and returns the result.

      Parameters

      Returns mat3

    • Returns the scalar determinant of this matrix.

      Returns number

    • Divides this matrix by another mat3 element-wise and returns the result.

      Parameters

      Returns mat3

    • Returns true if this matrix equals the given mat3.

      Parameters

      Returns boolean

    • Returns a mat3 identity matrix.

      Returns mat3

    • Returns the inverse of this matrix.

      Returns mat3

    • Constructs a mat3 rotation matrix from a given angle or rotation value.

      Parameters

      Returns mat3

    • Multiplies this matrix by another mat3 and returns the result.

      Parameters

      Returns mat3

    • Multiplies all elements of this matrix by a scalar value and returns the result.

      Parameters

      • scalar: number

      Returns mat3

    • Subtracts another mat3 from this matrix and returns the result.

      Parameters

      Returns mat3

    • Returns a string representation of this matrix.

      Returns string

    • Returns the transpose of this matrix.

      Returns mat3

    • Returns a mat3 with all elements set to zero.

      Returns mat3