Constructors
constructor
- new Vector4(x?, y?, z?, w?): Vector4
Parameters
Optional
x: numberOptional
y: numberOptional
z: numberOptional
w: number
Properties
height
height: number
Readonly
isVector4
isVector4
w
w: number
width
width: number
x
x: number
y
y: number
z
z: number
Methods
[iterator]
- [iterator](): Iterator<number, any, undefined>
Returns Iterator<number, any, undefined>
add
- add(v): this
Returns this
addScalar
- addScalar(scalar): this
Returns this
addScaledVector
- addScaledVector(v, s): this
Returns this
addVectors
- addVectors(a, b): this
Returns this
applyMatrix4
- applyMatrix4(m): this
Returns this
ceil
- ceil(): this
Returns this
clamp
- clamp(min, max): this
Returns this
clampScalar
- clampScalar(min, max): this
Returns this
clone
- clone(): this
Returns this
copy
- copy(v): this
Returns this
divide
- divide(v): this
Returns this
divideScalar
- divideScalar(s): this
Returns this
dot
- dot(v): number
Returns number
equals
- equals(v): boolean
Returns boolean
floor
- floor(): this
Returns this
fromArray
- fromArray(array, offset?): this
Parameters
- array: number[] | ArrayLike<number>
Optional
offset: number
Returns this
fromBufferAttribute
- fromBufferAttribute(attribute, index): this
Returns this
getComponent
- getComponent(index): number
Returns number
length
- length(): number
Returns number
lengthSq
- lengthSq(): number
Returns number
lerp
- lerp(v, alpha): this
Returns this
lerpVectors
- lerpVectors(v1, v2, alpha): this
Returns this
manhattanLength
- manhattanLength(): number
Returns number
max
- max(v): this
Returns this
min
- min(v): this
Returns this
multiply
- multiply(v): this
Returns this
multiplyScalar
- multiplyScalar(s): this
Returns this
negate
- negate(): this
Returns this
normalize
- normalize(): this
Returns this
random
- random(): this
Returns this
round
- round(): this
Returns this
roundToZero
- roundToZero(): this
Returns this
set
- set(x, y, z, w): this
Parameters
- x: number
- y: number
- z: number
- w: number
Returns this
setAxisAngleFromQuaternion
- setAxisAngleFromQuaternion(q): this
Returns this
setAxisAngleFromRotationMatrix
- setAxisAngleFromRotationMatrix(m): this
Returns this
setComponent
- setComponent(index, value): this
Parameters
- index: number
- value: number
Returns this
setFromMatrixPosition
- setFromMatrixPosition(m): this
Returns this
setLength
- setLength(length): this
Returns this
setScalar
- setScalar(scalar): this
Returns this
setW
- setW(w): this
Returns this
setX
- setX(x): this
Returns this
setY
- setY(y): this
Returns this
setZ
- setZ(z): this
Returns this
sub
- sub(v): this
Returns this
subScalar
- subScalar(s): this
Returns this
subVectors
- subVectors(a, b): this
Returns this
4D vector.