Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FieldOfView

Hierarchy

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: Vector2 = Vector2.ZERO

disabled

disabled: boolean

Readonly event

event: IEventEmitter<this, IFieldOfViewEvents> = new EventEmitter<this, E>(this)

maxRadius

maxRadius: number

radius

radius: number

texLight

texLight: WebGLTexture | undefined

texLightOld

texLightOld: WebGLTexture | undefined

transitionProgress

transitionProgress: number = 1

Static hBlurProgram

hBlurProgram: CompiledProgram

Static vBlurProgram

vBlurProgram: CompiledProgram

Methods

canASeeB

  • canASeeB(type: CanASeeBType, sourceEntity: Entity | undefined, aX: number, aY: number, aZ: number, bX: number, bY: number, bZ: number): boolean
  • Parameters

    • type: CanASeeBType
    • sourceEntity: Entity | undefined
    • aX: number
    • aY: number
    • aZ: number
    • bX: number
    • bY: number
    • bZ: number

    Returns boolean

compute

  • compute(timeStamp: number, force?: undefined | false | true): void
  • Parameters

    • timeStamp: number
    • Optional force: undefined | false | true

    Returns void

createDebugRenderer

getBounds

  • Parameters

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

    Returns IBound3

getSubdivisions

  • getSubdivisions(): number

getTextureSize

  • getTextureSize(): number

markAsExplored

  • Parameters

    Returns boolean

resetGl

  • resetGl(gl: WebGL2RenderingContext): void
  • Parameters

    • gl: WebGL2RenderingContext

    Returns void

resetTransitionProgress

  • resetTransitionProgress(): void

tickSeed

  • tickSeed(): void
  • Returns void

updateRadius

  • updateRadius(player?: any): void
  • Parameters

    • Default value player: any = localPlayer

    Returns void

updateTransitionProgress

  • updateTransitionProgress(timeStamp: number): boolean

Static createShaders

  • createShaders(gl: WebGL2RenderingContext): void
  • Parameters

    • gl: WebGL2RenderingContext

    Returns void

Static linkShaders

  • Returns Promise<void>

Generated using TypeDoc