Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FieldOfView

Hierarchy

  • FieldOfView

Implements

Index

Constructors

constructor

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

    • gl: WebGL2RenderingContext
    • radius: number
    • maxRadius: number
    • Default value subdivisions: number = 1

    Returns FieldOfView

Properties

blurEnabled

blurEnabled: boolean

computeOffset

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

disabled

disabled: boolean

maxRadius

maxRadius: number

radius

radius: number

texLight

texLight: WebGLTexture

texLightOld

texLightOld: WebGLTexture

Static hBlurProgram

hBlurProgram: CompiledProgram

Static vBlurProgram

vBlurProgram: CompiledProgram

Methods

canASeeB

  • canASeeB(aX: number, aY: number, aZ: number, bX: number, bY: number, bZ: number, lightLevel?: number): boolean
  • Parameters

    • aX: number
    • aY: number
    • aZ: number
    • bX: number
    • bY: number
    • bZ: number
    • Optional lightLevel: number

    Returns boolean

compute

  • compute(force?: boolean): boolean
  • Parameters

    • Optional force: boolean

    Returns boolean

createDebugRenderer

getBounds

  • Parameters

    • player: IPlayer
    • Default value radius: number = this.radius

    Returns Bound3

getSubdivisions

  • getSubdivisions(): number

getTextureSize

  • getTextureSize(): number

tickSeed

  • tickSeed(): void
  • Returns void

updateRadius

  • updateRadius(radius: number, maxRadius: number): void
  • Parameters

    • radius: number
    • maxRadius: number

    Returns void

Static compileShaders

  • compileShaders(gl: WebGL2RenderingContext): void
  • Parameters

    • gl: WebGL2RenderingContext

    Returns void

Generated using TypeDoc