A helper class for building MeasuredTemplates for PF1 spells and abilities

Hierarchy (View Summary)

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>

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

    Parameters

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

      Data used to create the template

      • Optionalcolor?: string

        Template color

      • distance: number

        The distance/size of the template

      • Optionalflags?: object

        Additional flags stored on the template

      • Optionaltexture?: 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