Type alias IsPositionAllowedFn

IsPositionAllowedFn: ((pos, charLayer?) => boolean)

Type declaration

    • (pos, charLayer?): boolean
    • Function to specify whether a certain position is allowed for pathfinding. If the function returns false, the tile will be consindered as blocked.

      It can be used to restrict pathfinding to specific regions.

      Beware that this method can become a performance bottleneck easily. So be careful and keep it as efficient as possible. An asymptotic runtime complexity of O(1) is recommended.

      Parameters

      • pos: Position
      • Optional charLayer: string

      Returns boolean

Generated using TypeDoc