# Class Matrix3

Serializable THREE.js Matrix3

class

• Matrix3
• Matrix3

## Constructors

• Creates an identity matrix.

#### Returns Matrix3

• Creates a 3x3 matrix with the given arguments in row-major order.

#### Parameters

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

## Properties

elements: number[]

## Methods

• m: Matrix3

• #### Parameters

• matrix: Matrix3

• #### Parameters

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

• #### Parameters

• array: number[]
• offset: number

#### Deprecated

• 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.

• #### Parameters

• matrix: Matrix4
• `Optional` throwOnDegenerate: boolean

• #### Parameters

• matrix: Matrix

• #### Parameters

• matrix4: Matrix4

• #### Returns Matrix3

• Inverts this matrix in place.

#### Returns Matrix3

• Sets this matrix as a 2D rotational transformation by theta radians. The resulting matrix will be:

``````cos(θ) -sin(θ) 0sin(θ) cos(θ)  00      0       1
``````

#### Parameters

• theta: number

Rotation angle in radians. Positive values rotate counterclockwise.

• #### Parameters

• theta: number

#### Returns Matrix3

• Sets this matrix as a 2D scale transform:

``````x, 0, 0,0, y, 0,0, 0, 1
``````

#### Parameters

• x: number

the amount to scale in the X axis.

• y: number

the amount to scale in the Y axis.

• x: number
• y: number

#### Returns Matrix3

• Sets this matrix as a 2D translation transform:

``````1, 0, x,0, 1, y,0, 0, 1
``````

• v: Vector2

• x: number
• y: number

#### Returns this

• Multiplies this matrix by m.

• m: Matrix3

#### Returns Matrix3

• Sets this matrix to a x b.

• a: Matrix3
• b: Matrix3

• s: number

• #### Parameters

• vector: Vector3

• a: any

#### Deprecated

This method has been removed completely.

• m: Matrix3

• #### Parameters

• theta: number

• sx: number
• sy: number

• #### Parameters

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

• m: Matrix4

• #### Parameters

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

#### Returns Matrix3

• 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.

• tx: number
• ty: number

#### Returns Matrix3

• Transposes this matrix in place.

#### Returns Matrix3

• Transposes this matrix into the supplied array r, and returns itself.

#### Parameters

• r: number[]

#### Returns Matrix3

• Create a matrix from array

#### Parameters

• array: number[][]

Array

Matrix3