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

    Class CanvasDarknessEffects

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

    Hierarchy (View Summary)

    Index

    Properties

    options: { name: string } = ...

    Options for this layer instance.

    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>

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

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

      Returns number