Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Direction

Velt's Direction utility

Hierarchy

  • Direction

Index

Constructors

constructor

  • new Direction(vector: any): Direction
  • new Direction(pitch: number, yaw: number): Direction
  • new Direction(loc: any, other: any): Direction
  • Initialize this Direction instance with a vector, a pitch and yaw, or two locations (or objects that can be casted to locations).

    Parameters

    • vector: any

    Returns Direction

  • Parameters

    • pitch: number
    • yaw: number

    Returns Direction

  • Parameters

    • loc: any
    • other: any

    Returns Direction

Methods

apply

  • apply(loc: any, amount?: number): Direction
  • Apply this direction to a given location at a given amount.

    Parameters

    • loc: any

      The location to apply to.

    • Optional amount: number

      The amount of how much to apply to that location.

    Returns Direction

clone

  • Clone this direction.

    Returns Direction

push

  • push(entity: any, speed?: number): Direction
  • Push a given entity in this direction at the given speed

    Parameters

    • entity: any

      The entity to push

    • Optional speed: number

      The speed to push them at

    Returns Direction

reverse

  • Reverse this direction.

    Returns Direction

setDirection

  • setDirection(entity: any, speed?: number): Direction
  • Set an entity's direction to this direction with a given speed.

    Parameters

    • entity: any

      The entity to change the direction of

    • Optional speed: number

      The speed to set their direction at

    Returns Direction

Generated using TypeDoc