-
Notifications
You must be signed in to change notification settings - Fork 0
3.3.1 Vector
Jonas de Luna Skulberg edited this page Oct 15, 2023
·
3 revisions
-
position: InputPositionOrigin of the vector, that is, displacement off origo for the origin. -
vector: InputPositionThe actual vector that is to be defined.
-
color?: numberColor of the vector. -
normalize?: booleanWhether the vector should be normalized.
color: 0x000000,
normalize: true,
collidesWith(other: Object3D): booleandistanceTo(other: Object3D<Event>): number
-
setAngleVector(position: InputPosition)Set the angle vector. -
setNormalizedAngleVector(position: InputPosition)Set the angle vector to a normalized vector of the input. -
setOriginPoint(position: InputPosition)Set the origin point of the vector. -
normalize()Normalize the vector. -
getAngle(): numberGet the current angle. -
getX(): numberGet the current x value of the vector. -
getY(): numberGet the current y value of the vector. -
getNormalizedX(): numberGet the current x value of the vector normalized. -
getNormalizedY(): numberGet the current y value of the vector normalized.