Skip to content
Type

TransformationMatrix

Row-major 3x3 affine transformation matrix.

ts
type TransformationMatrix = [
	a: number,
	b: number,
	u: number,
	c: number,
	d: number,
	v: number,
	x: number,
	y: number,
	w: number,
];

Used by

Properties

0

ts
0: number;

1

ts
1: number;

2

ts
2: number;

3

ts
3: number;

4

ts
4: number;

5

ts
5: number;

6

ts
6: number;

7

ts
7: number;

8

ts
8: number;

length

ts
length: 9;

toString

ts
toString: () => string;

Returns a string representation of an array.

toLocaleString

ts
toLocaleString: { (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; };

Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.

pop

ts
pop: () => number | undefined;

Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.

push

ts
push: (...items: number[]) => number;

Appends new elements to the end of an array, and returns the new length of the array.

concat

ts
concat: { (...items: ConcatArray<number>[]): number[]; (...items: (number | ConcatArray<number>)[]): number[]; };

Combines two or more arrays. This method returns a new array without modifying any existing arrays.

join

ts
join: (separator?: string | undefined) => string;

Adds all the elements of an array into a string, separated by the specified separator string.

reverse

ts
reverse: () => number[];

Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array.

shift

ts
shift: () => number | undefined;

Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.

slice

ts
slice: (start?: number | undefined, end?: number | undefined) => number[];

Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array.

sort

ts
sort:
	| (compareFn?: ((a: number, b: number) => number)
	| undefined) => TransformationMatrix;

Sorts an array in place. This method mutates the array and returns a reference to the same array.

splice

ts
splice: { (start: number, deleteCount?: number | undefined): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; };

Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

unshift

ts
unshift: (...items: number[]) => number;

Inserts new elements at the start of an array, and returns the new length of the array.

indexOf

ts
indexOf: (searchElement: number, fromIndex?: number | undefined) => number;

Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

lastIndexOf

ts
lastIndexOf: (searchElement: number, fromIndex?: number | undefined) => number;

Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.

every

ts
every: { <S extends number>(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; };

Determines whether all the members of an array satisfy the specified test.

some

ts
some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean;

Determines whether the specified callback function returns true for any element of an array.

forEach

ts
forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void;

Performs the specified action for each element in an array.

map

ts
map: <U>(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[];

Calls a defined callback function on each element of an array, and returns an array that contains the results.

filter

ts
filter: { <S extends number>(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; };

Returns the elements of an array that meet the condition specified in a callback function.

reduce

ts
reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; };

Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

reduceRight

ts
reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; };

Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

find

ts
find: { <S extends number>(predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S | undefined; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number | undefined; };

Returns the value of the first element in the array where predicate is true, and undefined otherwise.

findIndex

ts
findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number;

Returns the index of the first element in the array where predicate is true, and -1 otherwise.

fill

ts
fill: (value: number, start?: number | undefined, end?: number | undefined) => TransformationMatrix;

Changes all array elements from start to end index to a static value and returns the modified array

copyWithin

ts
copyWithin: (target: number, start: number, end?: number | undefined) => TransformationMatrix;

Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

entries

ts
entries: () => ArrayIterator<[number, number]>;

Returns an iterable of key, value pairs for every entry in the array

keys

ts
keys: () => ArrayIterator<number>;

Returns an iterable of keys in the array

values

ts
values: () => ArrayIterator<number>;

Returns an iterable of values in the array

includes

ts
includes: (searchElement: number, fromIndex?: number | undefined) => boolean;

Determines whether an array includes a certain element, returning true or false as appropriate.

flatMap

ts
flatMap: <U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This | undefined) => U[];

Calls a defined callback function on each element of an array. Then, flattens the result into a new array. This is identical to a map followed by flat with depth 1.

flat

ts
flat: <A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<A, D>[];

Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

__@iterator@476

ts
__@iterator@476: () => ArrayIterator<number>;

Iterator

__@unscopables@478

ts
__@unscopables@478: {
        [K in keyof any[]]?: boolean;
    };

Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

at

ts
at: (index: number) => number | undefined;

Released under the Mozilla Public License 2.0.