Options
All
  • Public
  • Public/Protected
  • All
Menu

The depth mask which contains a mapping of elevation. Needed to know if we must render objects according to depth.

Hierarchy

Index

Constructors

Properties

roofs: Container

Container in which roofs are rendered with depth data.

clearColor: number[] = ...
override
displayed: boolean = false

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

Methods

  • 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

  • #createDepth(): void
  • Initialize the depth mask with the roofs container and token graphics.

    Returns void

  • #createRoofsContainer(): Container
  • Create the roofs container.

    Returns Container

  • 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

Accessors

  • 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