Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

_lightPasses

_lightPasses: LightPassesCallback

_options

_options: Options

Methods

_castVisibility

  • _castVisibility(startX: number, startY: number, row: number, visSlopeStart: number, visSlopeEnd: number, radius: number, xx: number, xy: number, yx: number, yy: number, callback: VisibilityCallback): void
  • Actually calculates the visibility

    Parameters

    • startX: number

      The starting X coordinate

    • startY: number

      The starting Y coordinate

    • row: number

      The row to render

    • visSlopeStart: number

      The slope to start at

    • visSlopeEnd: number

      The slope to end at

    • radius: number

      The radius to reach out to

    • xx: number
    • xy: number
    • yx: number
    • yy: number
    • callback: VisibilityCallback

      The callback to use when we hit a block that is visible

    Returns void

_getCircle

  • _getCircle(cx: number, cy: number, r: number): number[][]
  • Return all neighbors in a concentric ring

    Parameters

    • cx: number

      center-x

    • cy: number

      center-y

    • r: number

      range

    Returns number[][]

_renderOctant

  • _renderOctant(x: number, y: number, octant: number[], R: number, callback: VisibilityCallback): void

compute

compute180

  • compute180(x: number, y: number, R: number, dir: number, callback: VisibilityCallback): void
  • Compute visibility for a 180-degree arc

    Parameters

    • x: number
    • y: number
    • R: number

      Maximum visibility radius

    • dir: number

      Direction to look in (expressed in a ROT.DIRS value);

    • callback: VisibilityCallback

    Returns void

compute90

  • compute90(x: number, y: number, R: number, dir: number, callback: VisibilityCallback): void
  • Compute visibility for a 90-degree arc

    Parameters

    • x: number
    • y: number
    • R: number

      Maximum visibility radius

    • dir: number

      Direction to look in (expressed in a ROT.DIRS value);

    • callback: VisibilityCallback

    Returns void

Generated using TypeDoc