Static
addadd
Add two vectors to produce a new vector
Static
clampclamp
Clamps the components of a vector to limits to produce a new vector
Optional
limits: { max?: Partial<Vector3>; min?: Partial<Vector3> }Static
crosscross
Calculate the cross product of two vectors. Returns a new vector.
Static
distancedistance
Calculate the distance between two vectors
Static
dotdot
Calculate the dot product of two vectors
Static
equalsequals
Check the equality of two vectors
Static
floorfloor
Floor the components of a vector to produce a new vector
Static
lerplerp
Constructs a new vector using linear interpolation on each component from two vectors.
Static
magnitudemagnitude
The magnitude of a vector
Static
multiplymultiply
Element-wise multiplication of two vectors together. Not to be confused with Vector3Utils.dot product or Vector3Utils.cross product
Static
normalizenormalize
Takes a vector 3 and normalizes it to a unit vector
Static
rotateXrotateX
Rotates the vector around the x axis counterclockwise (left hand rule)
Angle in radians
Static
rotateYrotateY
Rotates the vector around the y axis counterclockwise (left hand rule)
Angle in radians
Static
rotateZrotateZ
Rotates the vector around the z axis counterclockwise (left hand rule)
Angle in radians
Static
scalescale
Multiple all entries in a vector by a single scalar value producing a new vector
Static
slerpslerp
Constructs a new vector using spherical linear interpolation on each component from two vectors.
Static
subtractsubtract
Subtract two vectors to produce a new vector (v1-v2)
Static
totoString
Create a string representation of a vector3
Optional
options: { decimals?: number; delimiter?: string }
Utilities operating on Vector3 objects. All methods are static and do not modify the input objects.