Options
All
  • Public
  • Public/Protected
  • All
Menu

The vision mask which contains the current line-of-sight texture.

Hierarchy

Index

Constructors

Properties

clearColor: number[] = ...
override
vision: Container

The current vision Container.

The BlurFilter which applies to the vision mask texture. This filter applies a NORMAL blend mode to the container.

filterArea: any
filters: AlphaBlurFilter[]
displayed: boolean = false

Should our Container also be displayed on screen, in addition to being drawn to the cached RenderTexture?

Accessors

  • get los(): any
  • Current LOS polygons

    Returns any

  • get fov(): any
  • Current FOV polygons

    Returns any

  • get sprite(): any
  • set sprite(sprite: any): void
  • A PIXI.Sprite or SpriteMesh which is bound to this CachedContainer. The RenderTexture from this Container is associated with the Sprite which is automatically rendered.

    Returns any

  • A PIXI.Sprite or SpriteMesh which is bound to this CachedContainer. The RenderTexture from this Container is associated with the Sprite which is automatically rendered.

    Parameters

    • sprite: any

    Returns void

  • get renderTexture(): RenderTexture
  • The primary render texture bound to this cached container.

    Returns RenderTexture

  • set alphaMode(mode: ALPHA_MODES): void
  • Set the alpha mode of the cached container render texture.

    Parameters

    • mode: ALPHA_MODES

    Returns void

Methods

  • createVision(): Container
  • Initialize the vision mask with the los and the fov graphics objects.

    Returns Container

  • detachVision(): Container
  • Detach the current vision container and return it

    Returns Container

  • draw(): Promise<void>
  • Returns Promise<void>

  • clear(): void
  • createRenderTexture([options={}]?: { renderFunction: Function; clearColor: number[] }): RenderTexture
  • Create a render texture, provide a render method and an optional clear color.

    Parameters

    • [options={}]: { renderFunction: Function; clearColor: number[] } = {}

      Optional parameters.

      • renderFunction: Function
      • clearColor: number[]

    Returns RenderTexture

    A reference to the created render texture.

  • removeRenderTexture(renderTexture: RenderTexture, destroy?: boolean): void
  • Remove a previously created render texture.

    Parameters

    • renderTexture: RenderTexture

      The render texture to remove.

    • destroy: boolean = true

    Returns void

  • destroy(options: any): void
  • render(renderer: any): void
  • #renderSecondary(renderer: Renderer): void
  • Custom rendering for secondary render textures

    Parameters

    • renderer: Renderer

      The active canvas renderer.

    Returns void

  • #bind(renderer: Renderer, tex: RenderTexture, clearColor: number[]): void
  • Bind a render texture to this renderer. Must be called after bindPrimaryBuffer and before bindInitialBuffer.

    Parameters

    • renderer: Renderer

      The active canvas renderer.

    • tex: RenderTexture

      The texture to bind.

    • clearColor: number[]

    Returns void

  • Create the BlurFilter for the VisionMask container.

    Returns AlphaBlurFilter

  • resizeRenderTexture(renderer: Renderer, rt: RenderTexture): void
  • Resize a render texture passed as a parameter with the renderer.

    Parameters

    • renderer: Renderer

      The active canvas renderer.

    • rt: RenderTexture

      The render texture to resize.

    Returns void