1 | import { Matrix } from '@pixi/math';
|
2 | import { Filter } from '../Filter';
|
3 | import type { CLEAR_MODES } from '@pixi/constants';
|
4 | import type { Point } from '@pixi/math';
|
5 | import type { Dict } from '@pixi/utils';
|
6 | import type { IMaskTarget } from '../../mask/MaskData';
|
7 | import type { RenderTexture } from '../../renderTexture/RenderTexture';
|
8 | import type { Texture } from '../../textures/Texture';
|
9 | import type { FilterSystem } from '../FilterSystem';
|
10 | export interface ISpriteMaskTarget extends IMaskTarget {
|
11 | _texture: Texture;
|
12 | worldAlpha: number;
|
13 | anchor: Point;
|
14 | }
|
15 | export interface ISpriteMaskFilter extends Filter {
|
16 | maskSprite: IMaskTarget;
|
17 | }
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | export declare class SpriteMaskFilter extends Filter {
|
25 |
|
26 | _maskSprite: IMaskTarget;
|
27 |
|
28 | maskMatrix: Matrix;
|
29 | |
30 |
|
31 |
|
32 | constructor(sprite: IMaskTarget);
|
33 | /**
|
34 | * @param vertexSrc - The source of the vertex shader.
|
35 | * @param fragmentSrc - The source of the fragment shader.
|
36 | * @param uniforms - Custom uniforms to use to augment the built-in ones.
|
37 | */
|
38 | constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: Dict<any>);
|
39 | /**
|
40 | * Sprite mask
|
41 | * @type {PIXI.DisplayObject}
|
42 | */
|
43 | get maskSprite(): IMaskTarget;
|
44 | set maskSprite(value: IMaskTarget);
|
45 | /**
|
46 | * Applies the filter
|
47 | * @param filterManager - The renderer to retrieve the filter from
|
48 | * @param input - The input render target.
|
49 | * @param output - The target to output to.
|
50 | * @param clearMode - Should the output be cleared before rendering to it.
|
51 | */
|
52 | apply(filterManager: FilterSystem, input: RenderTexture, output: RenderTexture, clearMode: CLEAR_MODES): void;
|
53 | }
|