A helper class for building MeasuredTemplates for PF1 spells and abilities

Hierarchy (view full)

Constructors

  • Parameters

    • document: MeasuredTemplateDocument

      The Document instance which is represented by this object

    Returns AbilityTemplate

Properties

active: undefined | boolean

Methods

  • Activate listeners for the template preview

    Parameters

    • initialLayer: CanvasLayer<CanvasLayerOptions>

      The initially active CanvasLayer to re-activate after the workflow is complete

    Returns Promise<object>

    Returns result object

  • Creates a preview of the spell template

    Parameters

    • event: Event

      The initiating click event

    Returns Promise<object>

  • A factory method to create an AbilityTemplate instance using provided data

    Parameters

    • data: {
          color: undefined | string;
          distance: number;
          flags: undefined | object;
          texture: undefined | string;
          type:
              | "circle"
              | "rect"
              | "cone"
              | "ray";
      }

      Data used to create the template

      • color: undefined | string

        Template color

      • distance: number

        The distance/size of the template

      • flags: undefined | object

        Additional flags stored on the template

      • texture: undefined | string

        Path to template texture

      • type:
            | "circle"
            | "rect"
            | "cone"
            | "ray"

        The type of template

    Returns null | AbilityTemplate

    • The template object, or null if the data does not produce a template