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

Hierarchy (view full)

Properties

#requirePadding: boolean = false

If this filter requires padding (according to type)

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

The default uniforms used by the filter

Type declaration

  • tintAlpha: number[]
  • targetTexture: any
  • progress: number
  • rotation: number
  • anchor: {
        x: number;
        y: number;
    }
    • x: number
    • y: number
  • type: number
  • filterMatrix: any
  • filterMatrixInverse: any
  • targetUVMatrix: any
vertexShader: string = ...

The vertex shader which renders this filter.

fragmentShader: string = ...

The fragment shader which renders this filter.

#TYPE_NUMBER_TO_STRING: readonly string[] = ...

Maps the type number to its string.

#TYPE_STRING_TO_NUMBER: Readonly<{
    [type: string]: number;
}> = ...

Maps the type string to its number.

Type declaration

  • [type: string]: number
#PADDED_TYPES: readonly string[] = ...

Types that requires padding

Accessors

  • set targetTexture(targetTexture): void
  • Sampler target for this filter.

    Parameters

    • targetTexture: Texture

    Returns void

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

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

Methods

  • Parameters

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

    Returns void

    Inherit Doc

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

    Parameters

    • subject: any

      The source mesh/sprite to apply a transition.

    • texture: Texture

      The target texture.

    • Optional options: {
          type: string;
          name: string | symbol;
          duration: number;
          easing: string | Function;
      } = {}
      • type: string

        The transition type (default to FADE.)

      • name: string | symbol

        The name of the CanvasAnimation.

      • duration: number

        The animation duration

      • easing: string | Function

        The easing function of the animation

    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

    • Optional initialUniforms: object = {}

      Initial uniform values which override filter defaults

    Returns AbstractBaseFilter

    The constructed AbstractFilter instance.