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

    A filter specialized for transition effects between a source object and a target texture.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • OptionalvertexSrc: string

        The source of the vertex shader.

      • OptionalfragmentSrc: string

        The source of the fragment shader.

      • Optionaluniforms: Dict<any>

        Custom uniforms to use to augment the built-in ones.

      Returns TextureTransitionFilter

    Accessors

    • set targetTexture(targetTexture: Texture<Resource>): void

      Sampler target for this filter.

      Parameters

      • targetTexture: Texture<Resource>

      Returns void

    • get defaultUniforms(): {
          anchor: { x: number; y: number };
          backgroundColor: number[];
          filterMatrix: Matrix;
          filterMatrixInverse: Matrix;
          opaque: number;
          progress: number;
          rotation: number;
          targetTexture: null;
          targetUVMatrix: Matrix;
          tintAlpha: number[];
          type: number;
      }

      Returns {
          anchor: { x: number; y: number };
          backgroundColor: number[];
          filterMatrix: Matrix;
          filterMatrixInverse: Matrix;
          opaque: number;
          progress: number;
          rotation: number;
          targetTexture: null;
          targetUVMatrix: Matrix;
          tintAlpha: number[];
          type: number;
      }

    • get TYPES(): Readonly<
          {
              CROSSHATCH: "crosshatch";
              DOTS: "dots";
              FADE: "fade";
              GLITCH: "glitch";
              HOLE: "hole";
              HOLE_SWIRL: "holeSwirl";
              HOLOGRAM: "hologram";
              MORPH: "morph";
              SWIRL: "swirl";
              WATER_DROP: "waterDrop";
              WAVES: "waves";
              WHITE_NOISE: "whiteNoise";
              WIND: "wind";
          },
      >

      Transition types for this shader.

      Returns Readonly<
          {
              CROSSHATCH: "crosshatch";
              DOTS: "dots";
              FADE: "fade";
              GLITCH: "glitch";
              HOLE: "hole";
              HOLE_SWIRL: "holeSwirl";
              HOLOGRAM: "hologram";
              MORPH: "morph";
              SWIRL: "swirl";
              WATER_DROP: "waterDrop";
              WAVES: "waves";
              WHITE_NOISE: "whiteNoise";
              WIND: "wind";
          },
      >

    Methods

    • Parameters

      • filterManager: any
      • input: any
      • output: any
      • clear: any

      Returns void

    • Returns string

    • Returns string

    • Animate a transition from a subject SpriteMesh/PIXI.Sprite to a given texture.

      Parameters

      • subject: SpriteMesh | Sprite

        The source mesh/sprite to apply a transition.

      • texture: Texture<Resource>

        The target texture.

      • Optionaloptions: {
            duration?: number;
            easing?: string | Function;
            name?: string | symbol;
            type?: string;
        } = {}
        • Optionalduration?: number

          The animation duration

        • Optionaleasing?: string | Function

          The easing function of the animation

        • Optionalname?: string | symbol
        • Optionaltype?: string

          The transition type (default to FADE.)

      Returns Promise<boolean>

      A Promise which resolves to true once the animation has concluded or false if the animation was prematurely terminated