Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/math/Matrix3.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { Matrix4 } from './Matrix4';
import { Vector3 } from './Vector3';

type Matrix3Tuple = [
number, number, number,
number, number, number,
number, number, number,
];

/**
* ( interface Matrix<T> )
*/
Expand Down Expand Up @@ -125,6 +131,7 @@ export class Matrix3 implements Matrix {
* @return The created or provided array.
*/
toArray( array?: number[], offset?: number ): number[];
toArray( array?: Matrix3Tuple, offset?: 0 ): Matrix3Tuple;

/**
* Copies he values of this matrix into the provided array-like.
Expand Down
9 changes: 9 additions & 0 deletions src/math/Matrix4.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import { Vector3 } from './Vector3';
import { Euler } from './Euler';
import { Quaternion } from './Quaternion';
import { Matrix } from './Matrix3';

type Matrix4Tuple = [
number, number, number, number,
number, number, number, number,
number, number, number, number,
number, number, number, number,
];

/**
* A 4x4 Matrix.
*
Expand Down Expand Up @@ -235,6 +243,7 @@ export class Matrix4 implements Matrix {
* @return The created or provided array.
*/
toArray( array?: number[], offset?: number ): number[];
toArray( array?: Matrix4Tuple, offset?: 0 ): Matrix4Tuple;

/**
* Copies he values of this matrix into the provided array-like.
Expand Down
3 changes: 3 additions & 0 deletions src/math/Vector2.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Matrix3 } from './Matrix3';
import { BufferAttribute } from './../core/BufferAttribute';

type Vector2tuple = [number, number];

/**
* ( interface Vector<T> )
*
Expand Down Expand Up @@ -427,6 +429,7 @@ export class Vector2 implements Vector {
* @return The created or provided array.
*/
toArray( array?: number[], offset?: number ): number[];
toArray( array?: Vector2tuple, offset?: 0 ): Vector2tuple;

/**
* Copies x and y into the provided array-like.
Expand Down
4 changes: 4 additions & 0 deletions src/math/Vector3.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import { Cylindrical } from './Cylindrical';
import { BufferAttribute } from './../core/BufferAttribute';
import { InterleavedBufferAttribute } from './../core/InterleavedBufferAttribute';
import { Vector } from './Vector2';

type Vector3Tuple = [number, number, number];

/**
* 3D vector.
*
Expand Down Expand Up @@ -284,6 +287,7 @@ export class Vector3 implements Vector {
* @return The created or provided array.
*/
toArray( array?: number[], offset?: number ): number[];
toArray( array?: Vector3Tuple, offset?: 0 ): Vector3Tuple;

/**
* Copies x, y and z into the provided array-like.
Expand Down
3 changes: 3 additions & 0 deletions src/math/Vector4.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Matrix3 } from './Matrix3';
import { BufferAttribute } from './../core/BufferAttribute';
import { Vector } from './Vector2';

type Vector4Tuple = [number, number, number, number];

/**
* 4D vector.
*
Expand Down Expand Up @@ -211,6 +213,7 @@ export class Vector4 implements Vector {
* @return The created or provided array.
*/
toArray( array?: number[], offset?: number ): number[];
toArray( array?: Vector4Tuple, offset?: 0 ): Vector4Tuple;

/**
* Copies x, y, z and w into the provided array-like.
Expand Down