Class: Vector3

Vector3

new Vector3(x, y, z)

Creates new vector3;
Parameters:
Name Type Description
x Number
y Number
z Number
Source:

Methods

add(x, y, z) → {Ayce.Vector3}

Adds values to vector
Parameters:
Name Type Description
x Number
y Number
z Number
Source:
Returns:
vector
Type
Ayce.Vector3

addVector3(v) → {Ayce.Vector3}

Adds vector
Parameters:
Name Type Description
v Ayce.Vector3
Source:
Returns:
vector
Type
Ayce.Vector3

copy() → {Ayce.Vector3}

Returns copy of vector
Source:
Returns:
vector
Type
Ayce.Vector3

copyToVector(from, to)

Copies values from one vector to another
Parameters:
Name Type Description
from Ayce.Vector3
to Ayce.Vector3
Source:

crossProduct(a) → {Ayce.Vector3}

Returns cross product
Parameters:
Name Type Description
a Ayce.Vector3
Source:
Returns:
vector
Type
Ayce.Vector3

distance(pt1, pt2) → {Number}

Returns distance between two points
Parameters:
Name Type Description
pt1 Ayce.Vector3
pt2 Ayce.Vector3
Source:
Returns:
distance
Type
Number

dotProduct(a) → {Number}

Returns dot product
Parameters:
Name Type Description
a Ayce.Vector3
Source:
Returns:
product
Type
Number

getLength() → {Number}

Returns length of vector
Source:
Returns:
length
Type
Number

multiply(x, y, z) → {Ayce.Vector3}

Multiplies vector by values
Parameters:
Name Type Description
x Number
y Number
z Number
Source:
Returns:
vector
Type
Ayce.Vector3

negate() → {Ayce.Vector3}

Negates vector
Source:
Returns:
Ayce.Vector3
Type
Ayce.Vector3

normalize() → {Ayce.Vector3}

Converts vector to unit vector
Source:
Returns:
vector
Type
Ayce.Vector3

nullVector() → {Ayce.Vector3}

Sets Vector to (0, 0, 0)
Source:
Returns:
vector
Type
Ayce.Vector3

scaleBy(s) → {Ayce.Vector3}

Scales vector by given factor
Parameters:
Name Type Description
s Number
Source:
Returns:
vector
Type
Ayce.Vector3

set(x, y, z) → {Ayce.Vector3}

Sets vector to given values
Parameters:
Name Type Description
x Number
y Number
z Number
Source:
Returns:
vector
Type
Ayce.Vector3

subtract(x, y, z) → {Ayce.Vector3}

Subtracts values off of vector
Parameters:
Name Type Description
x Number
y Number
z Number
Source:
Returns:
vector
Type
Ayce.Vector3