1 | import { Rectangle } from '@pixi/math';
|
2 | import { RenderTexture } from './RenderTexture';
|
3 | import type { MSAA_QUALITY } from '@pixi/constants';
|
4 | import type { ExtensionMetadata } from '@pixi/extensions';
|
5 | import type { IRenderableObject, IRenderer } from '../IRenderer';
|
6 | import type { ISystem } from '../system/ISystem';
|
7 | import type { IBaseTextureOptions } from '../textures/BaseTexture';
|
8 | export interface IGenerateTextureOptions extends IBaseTextureOptions {
|
9 | |
10 |
|
11 |
|
12 |
|
13 | region?: Rectangle;
|
14 |
|
15 | resolution?: number;
|
16 |
|
17 | multisample?: MSAA_QUALITY;
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export declare class GenerateTextureSystem implements ISystem {
|
24 |
|
25 | static extension: ExtensionMetadata;
|
26 | renderer: IRenderer;
|
27 | private readonly _tempMatrix;
|
28 | constructor(renderer: IRenderer);
|
29 | /**
|
30 | * A Useful function that returns a texture of the display object that can then be used to create sprites
|
31 | * This can be quite useful if your displayObject is complicated and needs to be reused multiple times.
|
32 | * @param displayObject - The displayObject the object will be generated from.
|
33 | * @param {IGenerateTextureOptions} options - Generate texture options.
|
34 | * @param {PIXI.Rectangle} options.region - The region of the displayObject, that shall be rendered,
|
35 | * if no region is specified, defaults to the local bounds of the displayObject.
|
36 | * @param {number} [options.resolution] - If not given, the renderer's resolution is used.
|
37 | * @param {PIXI.MSAA_QUALITY} [options.multisample] - If not given, the renderer's multisample is used.
|
38 | * @returns a shiny new texture of the display object passed in
|
39 | */
|
40 | generateTexture(displayObject: IRenderableObject, options?: IGenerateTextureOptions): RenderTexture;
|
41 | destroy(): void;
|
42 | }
|