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