Part of a fork of @toji's
gl-matrix split into smaller pieces: this
package contains glMatrix.vec3.
Will load all of the module's functionality and expose it on a single object. Note that any of the methods may also be required directly from their files.
For example, the following are equivalent:
var scale = require('gl-vec3').scale
var scale = require('gl-vec3/scale')- add()
- angle()
- clone()
- copy()
- create()
- cross()
- distance()
- divide()
- dot()
- forEach()
- fromValues()
- inverse()
- length()
- lerp()
- max()
- min()
- multiply()
- negate()
- normalize()
- random()
- rotateX()
- rotateY()
- rotateZ()
- scale()
- scaleAndAdd()
- set()
- squaredDistance()
- squaredLength()
- subtract()
- transformMat3()
- transformMat4()
- transformQuat()
Adds two vec3's
Get the angle between two 3D vectors
Creates a new vec3 initialized with values from an existing vector
Copy the values from one vec3 to another
Creates a new, empty vec3
Computes the cross product of two vec3's
Calculates the euclidian distance between two vec3's
Divides two vec3's
Calculates the dot product of two vec3's
Perform some operation over an array of vec3s.
Creates a new vec3 initialized with the given values
Returns the inverse of the components of a vec3
Calculates the length of a vec3
Performs a linear interpolation between two vec3's
Returns the maximum of two vec3's
Returns the minimum of two vec3's
Multiplies two vec3's
Negates the components of a vec3
Normalize a vec3
Generates a random vector with the given scale
Rotate a 3D vector around the x-axis
Rotate a 3D vector around the y-axis
Rotate a 3D vector around the z-axis
Scales a vec3 by a scalar number
Adds two vec3's after scaling the second operand by a scalar value
Set the components of a vec3 to the given values
Calculates the squared euclidian distance between two vec3's
Calculates the squared length of a vec3
Subtracts vector b from vector a
Transforms the vec3 with a mat3.
Transforms the vec3 with a mat4. 4th vector component is implicitly '1'
Transforms the vec3 with a quat
zlib. See LICENSE.md for details.
