Methods
add
- add(v): this
Returns this
addScalar
- addScalar(scalar): this
Returns this
addScaledVector
- addScaledVector(vector, scale): this
Returns this
addVectors
- addVectors(a, b): this
Returns this
clone
- clone(): external.three.Vector
copy
- copy(v): this
Returns this
Optional
distanceTo
- distanceTo(v): number
Returns number
Optional
distanceToSquared
- distanceToSquared(v): number
Returns number
divideScalar
- divideScalar(s): this
Returns this
dot
- dot(v): number
Returns number
equals
- equals(v): boolean
Returns boolean
getComponent
- getComponent(index): number
Returns number
length
- length(): number
Returns number
lengthSq
- lengthSq(): number
Returns number
lerp
- lerp(v, alpha): this
Returns this
multiplyScalar
- multiplyScalar(s): this
Returns this
negate
- negate(): this
Returns this
normalize
- normalize(): this
Returns this
set
- set(...args): this
Returns this
setComponent
- setComponent(index, value): this
Parameters
- index: number
- value: number
Returns this
setLength
- setLength(l): this
Returns this
setScalar
- setScalar(scalar): this
Returns this
sub
- sub(v): this
Returns this
subVectors
- subVectors(a, b): this
Returns this
( interface Vector )
Abstract interface of https://github.com/mrdoob/three.js/blob/master/src/math/Vector2.js|Vector2, https://github.com/mrdoob/three.js/blob/master/src/math/Vector3.js|Vector3 and https://github.com/mrdoob/three.js/blob/master/src/math/Vector4.js|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.
Example