back
A unit vector representing the world BACK direction (0,0,-1)
down
A unit vector representing the world DOWN direction (0,-1,0)
east
A unit vector representing the world EAST direction (1,0,0) (same as RIGHT)
forward
A unit vector representing the world FORWARD direction (0,0,1)
left
A unit vector representing the world LEFT direction (-1,0,0)
north
A unit vector representing the world NORTH direction (0,0,1) (same as FORWARD)
one
A unit vector representing the value of 1 in all directions (1,1,1)
right
A unit vector representing the world RIGHT direction (1,0,0)
south
A unit vector representing the world SOUTH direction (0,0,-1) (same as BACK)
up
A unit vector representing the world UP direction (0,1,0)
west
A unit vector representing the world WEST direction (-1,0,0) (same as LEFT)
zero
A unit vector representing the value of 0 in all directions (0,0,0)
Static
addadd
Add two vectors to produce a new vector
Static
backback
A unit vector representing the world BACK direction (0,0,-1)
Static
clampclamp
Clamps the components of a vector to limits to produce a new vector
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
downdown
A unit vector representing the world DOWN direction (0,-1,0)
Static
easteast
A unit vector representing the world EAST direction (1,0,0) (same as RIGHT)
Static
equalsequals
Check the equality of two vectors
Static
floorfloor
Floor the components of a vector to produce a new vector
Static
forwardforward
A unit vector representing the world FORWARD direction (0,0,1)
Static
leftleft
A unit vector representing the world LEFT direction (-1,0,0)
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
northnorth
A unit vector representing the world NORTH direction (0,0,1) (same as FORWARD)
Static
oneone
A unit vector representing the value of 1 in all directions (1,1,1)
Static
rightright
A unit vector representing the world RIGHT direction (1,0,0)
Static
rotateXrotateX
Rotates the vector around the x axis counterclockwise (left hand rule)
Static
rotateYrotateY
Rotates the vector around the y axis counterclockwise (left hand rule)
Static
rotateZrotateZ
Rotates the vector around the z axis counterclockwise (left hand rule)
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
southsouth
A unit vector representing the world SOUTH direction (0,0,-1) (same as BACK)
Static
subtractsubtract
Subtract two vectors to produce a new vector (v1-v2)
Static
totoString
Create a string representation of a vector3
Static
upup
A unit vector representing the world UP direction (0,1,0)
Static
westwest
A unit vector representing the world WEST direction (-1,0,0) (same as LEFT)
Static
zerozero
A unit vector representing the value of 0 in all directions (0,0,0)
Assigns the values of the passed in vector to this vector. Returns itself.
cross
Computes the cross product of this and the passed in vector, returning itself.
floor
Floor the components of a vector to produce a new vector
lerp
Constructs a new vector using linear interpolation on each component from two vectors.
magnitude
The magnitude of the vector
multiply
Element-wise multiplication of two vectors together. Not to be confused with Vector3Builder.dot product or Vector3Builder.cross product
normalize
Normalizes this vector, returning itself.
rotateX
Rotates the vector around the x axis counterclockwise (left hand rule)
Angle in radians
rotateY
Rotates the vector around the y axis counterclockwise (left hand rule)
Angle in radians
rotateZ
Rotates the vector around the z axis counterclockwise (left hand rule)
Angle in radians
scale
Scales this by the passed in value, returning itself.
slerp
Constructs a new vector using spherical linear interpolation on each component from two vectors.
subtract
Subtracts the vector v from this, returning itself.
toString
Create a string representation of a vector
Optional
options: { decimals?: number; delimiter?: string }
Utilities operating on Vector3 objects.
This is a mixture of the Vector3Builder and Vector3Utils classes.