Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration Direction

Index

Enumeration members

East

East:

None

None: = -1

North

North:

Northeast

Northeast:

Northwest

Northwest:

South

South:

Southeast

Southeast:

Southwest

Southwest:

West

West:

Type aliases

Cardinal

Cardinal: Object[number]

CardinalNames

CardinalNames: "East" | "North" | "West" | "South"

Ordinal

Ordinal: Object[number]

Valid

Valid: Cardinal | Ordinal

Variables

Const CARDINALS

CARDINALS: [East, North, West, South] = [Direction.East, Direction.North, Direction.West, Direction.South] as const

Const CARDINALS_AND_NONE

CARDINALS_AND_NONE: [None, East, North, West, South] = [Direction.None, Direction.East, Direction.North, Direction.West, Direction.South] as const

Const DIRECTIONS

DIRECTIONS: [East, North, West, South, Northwest, Northeast, Southeast, Southwest] = [...CARDINALS, ...ORDINALS] as const

Const ORDINALS

ORDINALS: [Northwest, Northeast, Southeast, Southwest] = [Direction.Northwest, Direction.Northeast, Direction.Southeast, Direction.Southwest] as const

Let x

x: Readonly<Record<Direction, Direction>>

Functions

degrees

  • 0 = East

    Parameters

    Returns number

fromDegrees

  • 0 = East

    Parameters

    • deg: number

    Returns Direction

fromRadians

  • 0 = East

    Parameters

    • rad: number

    Returns Direction

get

getByDirections

isCardinal

  • isCardinal(value: unknown): value is Cardinal
  • Parameters

    • value: unknown

    Returns value is Cardinal

isOrdinal

  • isOrdinal(value: unknown): value is Ordinal
  • Parameters

    • value: unknown

    Returns value is Ordinal

isValid

  • isValid(value: unknown): value is Valid
  • Parameters

    • value: unknown

    Returns value is Valid

radians

  • 0 = East

    Parameters

    Returns number

vector

  • Parameters

    Returns Vector2

  • Parameters

    Returns Vector3

Object literals

Const HORIZONTAL

HORIZONTAL: object

[Direction.East]

[Direction.East]: true = true

[Direction.None]

[Direction.None]: false = false

[Direction.North]

[Direction.North]: false = false

[Direction.Northeast]

[Direction.Northeast]: false = false

[Direction.Northwest]

[Direction.Northwest]: false = false

[Direction.South]

[Direction.South]: false = false

[Direction.Southeast]

[Direction.Southeast]: false = false

[Direction.Southwest]

[Direction.Southwest]: false = false

[Direction.West]

[Direction.West]: true = true

Const OPPOSITES

OPPOSITES: object

[Direction.East]

[Direction.East]: West = Direction.West as const

[Direction.None]

[Direction.None]: None = Direction.None as const

[Direction.North]

[Direction.North]: South = Direction.South as const

[Direction.Northeast]

[Direction.Northeast]: Southwest = Direction.Southwest as const

[Direction.Northwest]

[Direction.Northwest]: Southeast = Direction.Southeast as const

[Direction.South]

[Direction.South]: North = Direction.North as const

[Direction.Southeast]

[Direction.Southeast]: Northwest = Direction.Northwest as const

[Direction.Southwest]

[Direction.Southwest]: Northeast = Direction.Northeast as const

[Direction.West]

[Direction.West]: East = Direction.East as const

Const VECTORS

VECTORS: object

[Direction.East]

[Direction.East]: Vector2 = new Vector2(1, 0)

[Direction.None]

[Direction.None]: Vector2 = Vector2.ZERO

[Direction.North]

[Direction.North]: Vector2 = new Vector2(0, -1)

[Direction.Northeast]

[Direction.Northeast]: Vector2 = new Vector2(1, -1)

[Direction.Northwest]

[Direction.Northwest]: Vector2 = new Vector2(-1, -1)

[Direction.South]

[Direction.South]: Vector2 = new Vector2(0, 1)

[Direction.Southeast]

[Direction.Southeast]: Vector2 = new Vector2(1, 1)

[Direction.Southwest]

[Direction.Southwest]: Vector2 = new Vector2(-1, 1)

[Direction.West]

[Direction.West]: Vector2 = new Vector2(-1, 0)

Const VERTICAL

VERTICAL: object

[Direction.East]

[Direction.East]: false = false

[Direction.None]

[Direction.None]: false = false

[Direction.North]

[Direction.North]: true = true

[Direction.Northeast]

[Direction.Northeast]: false = false

[Direction.Northwest]

[Direction.Northwest]: false = false

[Direction.South]

[Direction.South]: true = true

[Direction.Southeast]

[Direction.Southeast]: false = false

[Direction.Southwest]

[Direction.Southwest]: false = false

[Direction.West]

[Direction.West]: false = false

Generated using TypeDoc