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

Hierarchy (View Summary)

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

Properties

defaultUniforms: {
    anchor: { x: number; y: number };
    filterMatrix: Matrix;
    filterMatrixInverse: Matrix;
    progress: number;
    rotation: number;
    targetTexture: null;
    targetUVMatrix: Matrix;
    tintAlpha: number[];
    type: number;
} = ...

The default uniforms used by the filter

fragmentShader: string = ...

The fragment shader which renders this filter.

vertexShader: string = ...

The vertex shader which renders this filter.

Accessors

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

    Sampler target for this filter.

    Parameters

    • targetTexture: Texture<Resource>

    Returns void

  • 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

  • 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

  • A factory method for creating the filter using its defined default values.

    Parameters

    • OptionalinitialUniforms: object = {}

      Initial uniform values which override filter defaults

    Returns AbstractBaseFilter

    The constructed AbstractFilter instance.