The first component of the vector.
The second component of the vector.
The third component of the vector.
Static ReadonlyBACKA constant vector set to [0, 0, 1].
Static ReadonlyDOWNA constant vector set to [0, -1, 0].
Static ReadonlyFORWARDA constant vector set to [0, 0, -1].
Static ReadonlyHALFA constant vector set to [0.5, 0.5, 0.5].
Static ReadonlyLEFTA constant vector set to [-1, 0, 0].
Static ReadonlyONEA constant vector set to [1, 1, 1].
Static ReadonlyRIGHTA constant vector set to [1, 0, 0].
Static ReadonlyUPA constant vector set to [0, 1, 0].
Static ReadonlyZEROA constant vector set to [0, 0, 0].
Adds a number to each element of a vector.
The number to add.
Self for chaining.
Returns an identical copy of the specified 3-dimensional vector.
A 3-dimensional vector containing the result of the cloning.
Returns the distance between the two specified 3-dimensional vectors.
The second 3-dimensional vector to test.
The distance between the two vectors.
Divides each element of a vector by a number.
The number to divide by.
Self for chaining.
Returns the result of a dot product operation performed on the two specified 3-dimensional vectors.
The second 3-dimensional vector operand of the dot product.
The result of the dot product operation.
Reports whether two vectors are equal.
The vector to compare to the specified vector.
True if the vectors are equal and false otherwise.
Reports whether two vectors are equal using an absolute error tolerance.
The vector to be compared against.
Optionalepsilon: number = 1e-6The maximum difference between each component of the two vectors. Defaults to 1e-6.
True if the vectors are equal and false otherwise.
Set the values of the vector from an array.
The array to set the vector values from.
Optionaloffset: number = 0The zero-based index at which to start copying elements from the array. Default is 0.
Self for chaining.
Returns the result of a linear interpolation between two specified 3-dimensional vectors.
The 3-dimensional to interpolate from.
The 3-dimensional to interpolate to.
The value controlling the point of interpolation. Between 0 and 1, the linear interpolant will occur on a straight line between lhs and rhs. Outside of this range, the linear interpolant will occur on a ray extrapolated from this line.
Self for chaining.
Multiplies each element of a vector by a number.
The number to multiply by.
Self for chaining.
Sets the specified 3-dimensional vector to the supplied numerical values.
The value to set on the first component of the vector.
The value to set on the second component of the vector.
The value to set on the third component of the vector.
Self for chaining.
Subtracts a number from each element of a vector.
The number to subtract.
Self for chaining.
Optionalarr: number[]The array to populate with the vector's number components. If not specified, a new array is created.
Optionaloffset: numberThe zero-based index at which to start copying elements to the array. Default is 0.
The vector as an array.
The array to populate with the vector's number components. If not specified, a new array is created.
Optionaloffset: numberThe zero-based index at which to start copying elements to the array. Default is 0.
The vector as an array.
3-dimensional vector.