assassin-bug/framework/resonator/vendor/tsm/vec4.d.ts

55 lines
1.9 KiB
TypeScript

import mat4 from './mat4';
export default class vec4 {
get x(): number;
get y(): number;
get z(): number;
get w(): number;
get xy(): [number, number];
get xyz(): [number, number, number];
get xyzw(): [number, number, number, number];
set x(value: number);
set y(value: number);
set z(value: number);
set w(value: number);
set xy(values: [number, number]);
set xyz(values: [number, number, number]);
set xyzw(values: [number, number, number, number]);
get r(): number;
get g(): number;
get b(): number;
get a(): number;
get rg(): [number, number];
get rgb(): [number, number, number];
get rgba(): [number, number, number, number];
set r(value: number);
set g(value: number);
set b(value: number);
set a(value: number);
set rg(values: [number, number]);
set rgb(values: [number, number, number]);
set rgba(values: [number, number, number, number]);
constructor(values?: [number, number, number, number]);
private values;
static readonly zero: vec4;
static readonly one: vec4;
at(index: number): number;
reset(): void;
copy(dest?: vec4): vec4;
negate(dest?: vec4): vec4;
equals(vector: vec4, threshold?: number): boolean;
length(): number;
squaredLength(): number;
add(vector: vec4): vec4;
subtract(vector: vec4): vec4;
multiply(vector: vec4): vec4;
divide(vector: vec4): vec4;
scale(value: number, dest?: vec4): vec4;
normalize(dest?: vec4): vec4;
multiplyMat4(matrix: mat4, dest?: vec4): vec4;
static mix(vector: vec4, vector2: vec4, time: number, dest?: vec4): vec4;
static sum(vector: vec4, vector2: vec4, dest?: vec4): vec4;
static difference(vector: vec4, vector2: vec4, dest?: vec4): vec4;
static product(vector: vec4, vector2: vec4, dest?: vec4): vec4;
static quotient(vector: vec4, vector2: vec4, dest?: vec4): vec4;
}