Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FieldOfView

Hierarchy

  • FieldOfView

Implements

Index

Constructors

constructor

  • new FieldOfView(gl: WebGLRenderingContext, radius: number, subdivisions?: number): FieldOfView
  • Parameters

    • gl: WebGLRenderingContext
    • radius: number
    • Default value subdivisions: number = 1

    Returns FieldOfView

Properties

blurEnabled

blurEnabled: boolean

computeOffset

computeOffset: vec2 = new Vec2([0, 0])

disabled

disabled: boolean

hBlurProgram

hBlurProgram: CompiledProgram

maxRadius

maxRadius: number

radius

radius: number

texLight

texLight: WebGLTexture

texLightOld

texLightOld: WebGLTexture

vBlurProgram

vBlurProgram: CompiledProgram

Methods

canAnyPlayerSeeTile

  • canAnyPlayerSeeTile(tileX: number, tileY: number, tileZ: number): boolean
  • Parameters

    • tileX: number
    • tileY: number
    • tileZ: number

    Returns boolean

canPlayerSeeTile

  • canPlayerSeeTile(player: IPlayer, tileX: number, tileY: number, tileZ: number): boolean
  • Parameters

    • player: IPlayer
    • tileX: number
    • tileY: number
    • tileZ: number

    Returns boolean

compileShaders

  • compileShaders(gl: WebGLRenderingContext): void
  • Parameters

    • gl: WebGLRenderingContext

    Returns void

compute

  • compute(lightBlocking?: boolean): void
  • Parameters

    • Default value lightBlocking: boolean = true

    Returns void

createDebugRenderer

getBounds

getPlayersThatSeeTile

  • getPlayersThatSeeTile(tileX: number, tileY: number, tileZ: number): IPlayer[]

getRadiusModifier

  • getRadiusModifier(tileX: number, tileY: number): number
  • Parameters

    • tileX: number
    • tileY: number

    Returns number

getSubdivisions

  • getSubdivisions(): number

getTextureSize

  • getTextureSize(): number

tickSeed

  • tickSeed(): void
  • Returns void

Generated using TypeDoc