Options
All
  • Public
  • Public/Protected
  • All
Menu
abstract

Represents a Field Of View in a grid.

There's a lot of usage, a classic one is to display the visibles tiles around a player in a 2D game.

Type parameters

  • T

    Any type of data.

Hierarchy

Index

Constructors

Methods

Constructors

  • Type parameters

    • T

      Any type of data.

    Parameters

    • grid: T[][]

      The grid for which to compute the FOV.

    • lightCallbackFn: LightCallbackFn<T>

      A callback function used to determine if a cell doesn't let the "light" passes through.

    • options: Partial<FOVOptions> = ...

      The options related to the computation.

    Returns FOV<T>

Methods

  • Computes the FOV on the given position.

    Parameters

    • start: Position

      The position on which to start the computation.

    Returns FOVResult

    The FOV computation result.

Generated using TypeDoc