Class: Vec3
new Vec3(Number, Number, Number)
Parameters:
| Name |
Type |
Description |
Number |
|
x |
Number |
|
y |
Number |
|
z |
- Source:
Members
-
<static> this.x
-
Properties:
| Name |
Type |
Description |
Number |
|
x |
- Source:
-
<static> this.y
-
Properties:
| Name |
Type |
Description |
Number |
|
y |
- Source:
-
<static> this.z
-
Properties:
| Name |
Type |
Description |
Number |
|
z |
- Source:
Methods
-
<static> add(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
this
-
<static> clamp(Vec3, Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
min |
Vec3 |
|
max |
- Source:
Returns:
this
-
<static> clone()
-
- Source:
Returns:
Vec3
-
<static> copy(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
this
-
<static> cross(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
Number
-
<static> div(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
this
-
<static> dot(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
Number
-
<static> fromArray(Array)
-
Parameters:
| Name |
Type |
Description |
Array |
|
array |
- Source:
Returns:
this
-
<static> fromJSON(Object)
-
Parameters:
| Name |
Type |
Description |
Object |
|
json |
- Source:
Returns:
this
-
<static> fromVec2(Vec2)
-
Parameters:
| Name |
Type |
Description |
Vec2 |
|
v |
- Source:
Returns:
this
-
<static> fromVec4(Vec4)
-
Parameters:
| Name |
Type |
Description |
Vec4 |
|
v |
- Source:
Returns:
this
-
<static> inverse()
-
- Source:
Returns:
this
-
<static> inverseVec(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
this
-
<static> length()
-
- Source:
Returns:
Number
-
<static> lengthSq()
-
- Source:
Returns:
Number
-
<static> lerp(Vec3, Number)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
Number |
|
x |
- Source:
Returns:
Vec3
-
<static> max(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
this
-
<static> min(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
this
-
<static> mul(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
this
-
<static> normalize()
-
- Source:
Returns:
this
-
<static> positionFromMat4(Mat4)
-
Parameters:
| Name |
Type |
Description |
Mat4 |
|
m |
- Source:
Returns:
this
-
<static> sadd(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
s |
- Source:
Returns:
this
-
<static> scaleFromMat3(Mat3)
-
Parameters:
| Name |
Type |
Description |
Mat3 |
|
m |
- Source:
Returns:
this
-
<static> scaleFromMat4(Mat4)
-
Parameters:
| Name |
Type |
Description |
Mat4 |
|
m |
- Source:
Returns:
this
-
<static> sdiv(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
s |
- Source:
Returns:
this
-
<static> set(Number, Number, Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
x |
Number |
|
y |
Number |
|
z |
- Source:
Returns:
this
-
<static> setLength(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
length |
- Source:
Returns:
Vec3
-
<static> smul(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
s |
- Source:
Returns:
this
-
<static> ssub(Number)
-
Parameters:
| Name |
Type |
Description |
Number |
|
s |
- Source:
Returns:
this
-
<static> sub(Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
other |
- Source:
Returns:
this
-
<static> toArray()
-
- Source:
Returns:
Array
-
<static> toJSON()
-
- Source:
Returns:
Object
-
<static> toString()
-
- Source:
Returns:
String
-
-
Parameters:
| Name |
Type |
Description |
Mat3 |
|
m |
- Source:
Returns:
this
-
-
Parameters:
| Name |
Type |
Description |
Mat4 |
|
m |
- Source:
Returns:
this
-
-
Parameters:
| Name |
Type |
Description |
Quat |
|
q |
- Source:
Returns:
this
-
<static> vadd(Vec3, Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
a |
Vec3 |
|
b |
- Source:
Returns:
this
-
<static> vcross(Vec3, Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
a |
Vec3 |
|
b |
- Source:
Returns:
Number
-
<static> vdiv(Vec3, Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
a |
Vec3 |
|
b |
- Source:
Returns:
this
-
<static> vdot(Vec3, Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
a |
Vec3 |
|
b |
- Source:
Returns:
Number
-
<static> vlerp(Vec3, Vec3, Number)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
a |
Vec3 |
|
b |
Number |
|
x |
- Source:
Returns:
Vec3
-
<static> vmul(Vec3, Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
a |
Vec3 |
|
b |
- Source:
Returns:
this
-
<static> vsub(Vec3, Vec3)
-
Parameters:
| Name |
Type |
Description |
Vec3 |
|
a |
Vec3 |
|
b |
- Source:
Returns:
this