Skip to main content

mat3

Class

A 3x3 matrix.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Index

Constructors

Constructor

new mat3(): mat3

Returns

mat3

Properties

column0

column0: vec3

The first column of the matrix.


column1

column1: vec3

The second column of the matrix.


column2

column2: vec3

The third column of the matrix.


description

description: string

Returns a string representation of the matrix.

Methods

add()

add(mat): mat3

Returns the result of adding the two matrices together.

Parameters

ParameterType
matmat3

Returns

mat3


determinant()

determinant(): number

Returns the determinant of the matrix.

Returns

number


div()

div(mat): mat3

Returns the result of dividing the two matrices.

Parameters

ParameterType
matmat3

Returns

mat3


equal()

equal(mat): boolean

Returns whether the two matrices are equal.

Parameters

ParameterType
matmat3

Returns

boolean


identity()

static identity(): mat3

Returns the identity matrix.

Returns

mat3


inverse()

inverse(): mat3

Returns the inverse of the matrix.

Returns

mat3


makeFromRotation()

static makeFromRotation(rotation): mat3

Returns a matrix representing the specified rotation.

Parameters

ParameterType
rotationquat

Returns

mat3


mult()

mult(mat): mat3

Returns the result of multiplying the two matrices.

Parameters

ParameterType
matmat3

Returns

mat3


multiplyScalar()

multiplyScalar(scalar): mat3

Returns the result of scalar multiplying the matrix.

Parameters

ParameterType
scalarnumber

Returns

mat3


sub()

sub(mat): mat3

Returns the result of subtracting the two matrices.

Parameters

ParameterType
matmat3

Returns

mat3


toString()

toString(): string

Returns a string representation of the matrix.

Returns

string


transpose()

transpose(): mat3

Returns the transpose of this matrix.

Returns

mat3


zero()

static zero(): mat3

Returns a matrix with all zero values.

Returns

mat3