Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FieldOfView

Hierarchy

  • FieldOfView

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

Private framebuffer1

framebuffer1: WebGLFramebuffer

Private framebuffer2

framebuffer2: WebGLFramebuffer

Private gl

gl: WebGLRenderingContext

maxRadius

maxRadius: number

radius

radius: number

Private renderer

Private subdivisions

subdivisions: number

Private texBlurStorage

texBlurStorage: WebGLTexture

texLight

texLight: WebGLTexture

Private texLight01

texLight01: WebGLTexture

Private texLight02

texLight02: WebGLTexture

texLightOld

texLightOld: WebGLTexture

Private viewQuadBuffer

viewQuadBuffer: WebGLBuffer

Static hBlurProgram

hBlurProgram: CompiledProgram

Static Private shaderProgram

shaderProgram: CompiledProgram

Static vBlurProgram

vBlurProgram: CompiledProgram

Methods

Private bresenham

  • bresenham(x0: number, y0: number, x1: number, y1: number): boolean
  • Parameters

    • x0: number
    • y0: number
    • x1: number
    • y1: number

    Returns boolean

canSeeTile

  • canSeeTile(tileX: number, tileY: number): boolean
  • Parameters

    • tileX: number
    • tileY: number

    Returns boolean

compute

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

    • Default value lightBlocking: boolean = true

    Returns void

computeLights

  • computeLights(): void
  • Returns void

createDebugRenderer

getBounds

  • Returns Bound2

getRadiusModifier

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

    • tileX: number
    • tileY: number

    Returns number

getSubdivisions

  • getSubdivisions(): number
  • Returns number

getTextureSize

  • getTextureSize(): number
  • Returns number

Private updateExplored

  • updateExplored(): void
  • Returns void

Static compileShaders

  • compileShaders(gl: WebGLRenderingContext): void
  • Parameters

    • gl: WebGLRenderingContext

    Returns void

Generated using TypeDoc