Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Class CanvasBackgroundAlterationEffects

    A layer of background alteration effects which change the appearance of the primary group render texture.

    Hierarchy (View Summary)

    Index

    Properties

    interactiveChildren: boolean = false

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

    lighting: Container<DisplayObject>

    A collection of effects which provide other background alterations.

    options: { name: string } = ...

    Options for this layer instance.

    vision: Container<DisplayObject>

    A collection of effects which provide background vision alterations.

    visionPreferred: Container<DisplayObject>

    A collection of effects which provide background preferred vision alterations.

    Accessors

    • 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 instance(): CanvasLayer

      Return a reference to the active instance of this canvas layer

      Returns CanvasLayer

    • get layerOptions(): { name: string; zIndex: number }

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

      Returns { name: string; zIndex: number }

    Methods

    • Parameters

      • options: any

      Returns Promise<void>

    • Parameters

      • options: any

      Returns Promise<void>

    • Clear background alteration effects vision and lighting containers

      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>

    • Get the zIndex that should be used for ordering this layer vertically relative to others in the same Container.

      Returns number

    • 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>