( interface Vector<T> )
Abstruct interface of Vector2, Vector3 and Vector4.
Currently the members of Vector is NOT type safe because it accepts different typed vectors.
Those definitions will be changed when TypeScript innovates Generics to be type safe.
Methods
Defined in three.d.ts:3154
add(v:T):T;
Parameters
Returns
Vector
Defined in three.d.ts:3159
addVectors(a:T, b:T):T;
Parameters
Returns
Vector
public clone( ) : Vector
Defined in three.d.ts:3238
clone():T;
Returns
Vector
Defined in three.d.ts:3149
copy(v:T):T;
Parameters
Returns
Vector
public distanceTo( v: Vector ) : number
Defined in three.d.ts:3211
NOTE: Vector4 doesn't have the property.
distanceTo(v:T):number;
Parameters
Returns
number
public distanceToSquared( v: Vector ) : number
Defined in three.d.ts:3218
NOTE: Vector4 doesn't have the property.
distanceToSquared(v:T):number;
Parameters
Returns
number
public divideScalar( s: number ) : Vector
Defined in three.d.ts:3179
divideScalar(s:number):T;
Parameters
Returns
Vector
public dot( v: Vector ) : number
Defined in three.d.ts:3189
dot(v:T):T;
Parameters
Returns
number
public equals( v: Vector ) : boolean
Defined in three.d.ts:3233
equals(v:T):boolean;
Parameters
Returns
boolean
public getComponent( index: number ) : number
Defined in three.d.ts:3144
Parameters
Returns
number
public length( ) : number
Defined in three.d.ts:3199
length():number;
Returns
number
public lengthSq( ) : number
Defined in three.d.ts:3194
lengthSq():number;
Returns
number
public lerp( v: Vector , alpha: number ) : Vector
Defined in three.d.ts:3228
lerp(v:T, alpha:number):T;
Parameters
Returns
Vector
public multiplyScalar( s: number ) : Vector
Defined in three.d.ts:3174
multiplyScalar(s:number):T;
Parameters
Returns
Vector
public negate( ) : Vector
Defined in three.d.ts:3184
negate():T;
Returns
Vector
public normalize( ) : Vector
Defined in three.d.ts:3204
normalize():T;
Returns
Vector
public setComponent( index: number , value: number )
Defined in three.d.ts:3142
Parameters
index: number
value: number
public setLength( l: number ) : Vector
Defined in three.d.ts:3223
setLength(l:number):T;
Parameters
Returns
Vector
Defined in three.d.ts:3164
sub(v:T):T;
Parameters
Returns
Vector
Defined in three.d.ts:3169
subVectors(a:T, b:T):T;
Parameters
Returns
Vector