Precise Shadowcasting Field of View calculator.
|init (lightPassesCallback, options)||Constructor.|
|compute (x, y, R, callback)||Compute.|
- init (lightPassesCallback, options)
Called with ROT.FOV.Precise:new()
- lightPassesCallback function A function with two parameters (x, y) that returns true if a map cell will allow light to pass through
- options Options
- topology int Direction for light movement Accepted values: (4 or 8)
- compute (x, y, R, callback)
Get visibility from a given point
- x int x-position of center of FOV
- y int y-position of center of FOV
- R int radius of FOV (i.e.: At most, I can see for R cells)
- callback A function that is called for every cell in view. Must accept four parameters.
- x int x-position of cell that is in view
- y int y-position of cell that is in view
- r int The cell's distance from center of FOV
- visibility number The cell's visibility rating (from 0-1). How well can you see this cell?