Skip to content

Commit

Permalink
Matrix3/4: Constructor has now parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Jun 29, 2023
1 parent eb90e84 commit 6e0fd80
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
14 changes: 14 additions & 0 deletions types/three/src/math/Matrix3.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ export class Matrix3 implements Matrix {
* Creates an identity matrix.
*/
constructor();
/**
* Creates a 3x3 matrix with the given arguments in row-major order.
*/
constructor(
n11: number,
n12: number,
n13: number,
n21: number,
n22: number,
n23: number,
n31: number,
n32: number,
n33: number,
);

/**
* Array with matrix values.
Expand Down
24 changes: 24 additions & 0 deletions types/three/src/math/Matrix4.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,31 @@ export type Matrix4Tuple = [
* m.multiply( m3 );
*/
export class Matrix4 implements Matrix {
/**
* Creates an identity matrix.
*/
constructor();
/**
* Creates a 4x4 matrix with the given arguments in row-major order.
*/
constructor(
n11: number,
n12: number,
n13: number,
n14: number,
n21: number,
n22: number,
n23: number,
n24: number,
n31: number,
n32: number,
n33: number,
n34: number,
n41: number,
n42: number,
n43: number,
n44: number,
);

/**
* Array with matrix values.
Expand Down

0 comments on commit 6e0fd80

Please sign in to comment.