Constructor
new Vector()
- Source:
- To Do:
-
It seems that this class is actually geometry independent (because of the choice of a reference frame). If so, remove for the other files the class extensions, and replace them by an
export {Vector} from './abstract.js'
Extends
Methods
applyFacing(position) → {Vector}
- Source:
Rotate the current vector by the facing component of the position. This method is geometry independent as the coordinates of the vector are given in a chosen reference frame. Only the reference frame depends on the geometry.
Parameters:
Name | Type | Description |
---|---|---|
position |
Position |
Returns:
The current vector
- Type
- Vector
applyMatrix4(m) → {Vector}
- Source:
Overload Three.js applyMatrix4
.
Indeed Three.js considers the Vector3
as a 3D point
It multiplies the vector (with an implicit 1 in the 4th dimension) and m
, and divides by perspective.
Here the data represents a vector, thus the implicit 4th coordinate is 0
Parameters:
Name | Type | Description |
---|---|---|
m |
Matrix4 | The matrix to apply |
Returns:
The current vector
- Type
- Vector
toLog() → {string}
- Source:
- Inherited From:
Add a method to Three.js Vector3. Return a human-readable version of the vector (for debugging purpose)
Returns:
- Type
- string