Vec3
Vector utilities.
angle
( b0, ai, bi, ci
)
static
Float
src/math/Vec3.js:163
Calculate angle between segments ab
and bc
-
b0
ArrayVec3 buffer
-
ai
IntVector index a
-
bi
IntVector index b
-
ci
IntVector index c
Returns: Float
Angle in radians
copy
( b0, ai, out
)
static
src/math/Vec3.js:56
-
b0
ArrayVec3 buffer
-
ai
IntVector index
-
out
ArrayDestination vector
create
( positions
)
static
Float32Array
src/math/Vec3.js:19
-
positions
Int | ArrayNumber of vectors or array of initial values
Returns: Float32Array
Vec3 buffer
distance
( b0, ai, bi
)
static
Float
src/math/Vec3.js:124
-
b0
ArrayVec3 buffer
-
ai
IntVector index a
-
bi
IntVector index b
Returns: Float
Distance from a to b
distanceSq
( b0, ai, bi
)
static
Float
src/math/Vec3.js:105
-
b0
ArrayVec3 buffer
-
ai
IntVector index a
-
bi
IntVector index b
Returns: Float
Squared distance from a to b
length
( b0, ai
)
static
Float
src/math/Vec3.js:89
-
b0
ArrayVec3 buffer
-
ai
IntVector index
Returns: Float
Length of vector
lengthSq
( b0, ai
)
static
Float
src/math/Vec3.js:73
-
b0
ArrayVec3 buffer
-
ai
IntVector index
Returns: Float
Squared length of vector
normalize
( b0, ai
)
static
src/math/Vec3.js:143
Normalize vector in place
-
b0
ArrayVec3 buffer
-
ai
IntVector index a
set
( b0, i, x, [y], [z]
)
static
src/math/Vec3.js:31
Set single vector in buffer
-
b0
ArrayVec3 buffer
-
i
IntVector index
-
x
Array | FloatVector or x component value
-
[y]
Float -
[z]
Float