A CanvasLayer for displaying illumination visual effects

Hierarchy (View Summary)

Properties

baselineMesh: SpriteMesh = ...

The base line mesh.

darknessLevelMeshes: CachedContainer = ...

The cached container holding the illumination meshes.

filter: VisualEffectsMaskingFilter

The filter used to mask visual effects on this layer

interactiveChildren: boolean = false

Whether this event target has any children that need UI events. This can be used optimize event propagation.

lights: Container<DisplayObject> = ...

The container holding the lights.

options: { name: string } = ...

Options for this layer instance.

Accessors

  • get hasDynamicDarknessLevel(): boolean

    To know if dynamic darkness level is active on this scene.

    Returns boolean

  • get hookName(): string

    The name used by hooks to construct their hook string. Note: You should override this getter if hookName should not return the class constructor name.

    Returns string

  • get name(): string

    The canonical name of the CanvasLayer is the name of the constructor that is the immediate child of the defined baseClass for the layer type.

    Returns string

    canvas.lighting.name -> "LightingLayer"
    
  • get renderTexture(): RenderTexture

    The illumination render texture.

    Returns RenderTexture

  • get instance(): CanvasLayer

    Return a reference to the active instance of this canvas layer

    Returns CanvasLayer

  • get layerOptions(): { name: string }

    Customize behaviors of this CanvasLayer by modifying some behaviors at a class level.

    Returns { name: string }

Methods

  • Parameters

    • options: any

    Returns Promise<void>

  • Parameters

    • options: any

    Returns Promise<void>

  • Clear illumination effects container

    Returns void

  • Draw the canvas layer, rendering its internal components and returning a Promise. The Promise resolves to the drawn layer once its contents are successfully rendered.

    Parameters

    • Optionaloptions: object = {}

      Options which configure how the layer is drawn

    Returns Promise<CanvasLayer>

  • Invalidate the cached container state to trigger a render pass.

    Parameters

    • Optionalforce: boolean = false

      Force cached container invalidation?

    Returns void

  • Deconstruct data used in the current layer in preparation to re-draw the canvas

    Parameters

    • Optionaloptions: object = {}

      Options which configure how the layer is deconstructed

    Returns Promise<CanvasLayer>