Constructors
constructor
- new Vector3(x?: number, y?: number, z?: number): Vector3
Parameters
Optional
x: numberOptional
y: numberOptional
z: number
Properties
Readonly
isVector3
isVector3: true
x
x: number
y
y: number
z
z: number
Methods
[iterator]
- "[iterator]"(): Generator<number, void>
Returns Generator<number, void>
abs
- abs(): this
Returns this
add
- add(v: Vector3): this
Returns this
addScalar
- addScalar(s: number): this
Returns this
addScaledVector
- addScaledVector(v: Vector3, s: number): this
Returns this
addVectors
- addVectors(a: Vector3, b: Vector3): this
Returns this
angleTo
- angleTo(v: Vector3): number
Returns number
applyAxisAngle
- applyAxisAngle(axis: Vector3, angle: number): this
Returns this
applyEuler
- applyEuler(euler: Euler): this
Returns this
applyMatrix3
- applyMatrix3(m: Matrix3): this
Returns this
applyMatrix4
- applyMatrix4(m: Matrix4): this
Returns this
applyNormalMatrix
- applyNormalMatrix(m: Matrix3): this
Returns this
applyQuaternion
- applyQuaternion(q: Quaternion): this
Returns this
ceil
- ceil(): this
Returns this
clamp
- clamp(min: Vector3, max: Vector3): this
Returns this
clampLength
- clampLength(min: number, max: number): this
Returns this
clampScalar
- clampScalar(minVal: number, maxVal: number): this
Parameters
- minVal: number
- maxVal: number
Returns this
clone
- clone(): Vector3
copy
- copy(v: Vector3): this
Returns this
cross
- cross(v: Vector3): this
Returns this
crossVectors
- crossVectors(a: Vector3, b: Vector3): this
Returns this
distanceTo
- distanceTo(v: Vector3): number
Returns number
distanceToSquared
- distanceToSquared(v: Vector3): number
Returns number
divide
- divide(v: Vector3): this
Returns this
divideScalar
- divideScalar(scalar: number): this
Returns this
dot
- dot(v: Vector3): number
Returns number
equals
- equals(v: Vector3): boolean
Returns boolean
floor
- floor(): this
Returns this
fromArray
- fromArray(array: number[], offset?: number): this
Parameters
- array: number[]
Optional
offset: number
Returns this
getComponent
- getComponent(index: number): number
Returns number
length
- length(): number
Returns number
lengthSq
- lengthSq(): number
Returns number
lerp
- lerp(v: Vector3, alpha: number): this
Returns this
lerpVectors
- lerpVectors(v1: Vector3, v2: Vector3, alpha: number): this
Returns this
manhattanDistanceTo
- manhattanDistanceTo(v: Vector3): number
Returns number
manhattanLength
- manhattanLength(): number
Returns number
max
- max(v: Vector3): this
Returns this
min
- min(v: Vector3): this
Returns this
multiply
- multiply(v: Vector3): this
Returns this
multiplyScalar
- multiplyScalar(scalar: number): this
Returns this
multiplyVectors
- multiplyVectors(a: Vector3, b: Vector3): this
Returns this
negate
- negate(): this
Returns this
normalize
- normalize(): this
Returns this
projectOnPlane
- projectOnPlane(planeNormal: Vector3): this
Returns this
projectOnVector
- projectOnVector(v: Vector3): this
Returns this
random
- random(): this
Returns this
randomDirection
- randomDirection(): this
Returns this
reflect
- reflect(normal: Vector3): this
Returns this
round
- round(): this
Returns this
roundToZero
- roundToZero(): this
Returns this
set
- set(x: number, y: number, z: number): this
Parameters
- x: number
- y: number
- z: number
Returns this
setComponent
- setComponent(index: number, value: number): this
Parameters
- index: number
- value: number
Returns this
setFromCylindricalCoords
- setFromCylindricalCoords(radius: number, theta: number, y: number): this
Parameters
- radius: number
- theta: number
- y: number
Returns this
setFromEuler
- setFromEuler(e: Euler): this
Returns this
setFromMatrix3Column
- setFromMatrix3Column(m: Matrix3, index: number): this
Returns this
setFromMatrixColumn
- setFromMatrixColumn(m: Matrix4, index: number): this
Returns this
setFromMatrixPosition
- setFromMatrixPosition(m: Matrix4): this
Returns this
setFromMatrixScale
- setFromMatrixScale(m: Matrix4): this
Returns this
setFromSphericalCoords
- setFromSphericalCoords(radius: number, phi: number, theta: number): this
Parameters
- radius: number
- phi: number
- theta: number
Returns this
setLength
- setLength(length: number): this
Returns this
setScalar
- setScalar(scalar: number): this
Returns this
setX
- setX(x: number): this
Returns this
setY
- setY(y: number): this
Returns this
setZ
- setZ(z: number): this
Returns this
sub
- sub(v: Vector3): this
Returns this
subScalar
- subScalar(s: number): this
Returns this
subVectors
- subVectors(a: Vector3, b: Vector3): this
Returns this
toArray
- toArray(array?: number[], offset?: number): number[]
Parameters
Optional
array: number[]Optional
offset: number
Returns number[]
transformDirection
- transformDirection(m: Matrix4): this
Returns this