1 | import { BaseImageResource } from './BaseImageResource';
|
2 | import type { ICanvas } from '@pixi/settings';
|
3 | /**
|
4 | * @interface OffscreenCanvas
|
5 | */
|
6 | /**
|
7 | * Resource type for HTMLCanvasElement and OffscreenCanvas.
|
8 | * @memberof PIXI
|
9 | */
|
10 | export declare class CanvasResource extends BaseImageResource {
|
11 | /**
|
12 | * @param source - Canvas element to use
|
13 | */
|
14 | constructor(source: ICanvas);
|
15 | /**
|
16 | * Used to auto-detect the type of resource.
|
17 | * @param {*} source - The source object
|
18 | * boolean} `true` if source is HTMLCanvasElement or OffscreenCanvas
{ |
19 | */
|
20 | static test(source: unknown): source is OffscreenCanvas | HTMLCanvasElement;
|
21 | }
|