Skip to main content

Vector4

Vector4

Kind: global class

new Vector4([x], [y], [z], [w])

ParamTypeDefault
[x]Number0
[y]Number0
[z]Number0
[w]Number0

vector4.readFromArray(array, offset)

Kind: instance method of Vector4

ParamTypeDefault
arrayArray.<number>
offsetnumber0

vector4.writeToArray(array, offset)

Kind: instance method of Vector4

ParamTypeDefault
arrayArray.<number>
offsetnumber0

vector4.set(x, y, z, w) ⇒ Vector4

Kind: instance method of Vector4

ParamType
xNumber
yNumber
zNumber
wNumber

vector4.multiplyVector3(v3)

Kind: instance method of Vector4

ParamType
v3Vector3

vector4.multiplyScalar(value) ⇒ Vector4

Kind: instance method of Vector4

ParamType
valueNumber

vector4._applyMatrix4(a0, a1, a2, a3, b0, b1, b2, b3, c0, c1, c2, c3, d0, d1, d2, d3) ⇒ Vector4

Kind: instance method of Vector4
Returns: Vector4 - this

ParamType
a0number
a1number
a2number
a3number
b0number
b1number
b2number
b3number
c0number
c1number
c2number
c3number
d0number
d1number
d2number
d3number

vector4.dot(other) ⇒ number

Kind: instance method of Vector4

ParamType
otherVector4

vector4.add3(v3) ⇒ Vector4

Add XYZ components from another vector

Kind: instance method of Vector4

ParamType
v3Vector3 | Vector4

vector4.threeApplyMatrix4(m) ⇒ Vector4

Kind: instance method of Vector4
Returns: Vector4 - this

ParamType
mMatrix4

vector4.copy(vec4) ⇒ Vector4

Kind: instance method of Vector4

ParamType
vec4Vector4

vector4.clone() ⇒ Vector4

Kind: instance method of Vector4

vector4.applyQuaternion(q)

Kind: instance method of Vector4

ParamType
qQuaternion

vector4.equals(vec4) ⇒ boolean

Kind: instance method of Vector4

ParamType
vec4Vector4

vector4.hash() ⇒ number

Kind: instance method of Vector4

vector4.lerpVectors(v0, v1, f)

Kind: instance method of Vector4

ParamTypeDescription
v0Vector4
v1Vector4
fNumberinterpolation fraction

vector4.toArray(result)

Kind: instance method of Vector4

ParamType
resultArray.<number>

vector4.asArray() ⇒ Array.<number>

Kind: instance method of Vector4

vector4.setFromArray(data, offset)

Kind: instance method of Vector4

ParamType
dataArray.<number>
offsetnumber

vector4.toBinaryBuffer(buffer)

Kind: instance method of Vector4

ParamType
bufferBinaryBuffer

vector4.fromBinaryBuffer(buffer)

Kind: instance method of Vector4

ParamType
bufferBinaryBuffer

Vector4.lerp(v0, v1, f, result)

Kind: static method of Vector4

ParamTypeDescription
v0Vector4
v1Vector4
fNumberinterpolation fraction
resultVector4