PIXI.CanvasResource
class CanvasResource extends PIXI.BaseImageResource
Resource type for HTMLCanvasElement.
Constructor
new PIXI.CanvasResource(source: HTMLCanvasElement) → {}
Name | Type | Description |
---|---|---|
source | HTMLCanvasElement |
Canvas element to use |
Summary
Methods from CanvasResource
boolean |
|
Properties inherited from BaseImageResource
HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement |
|
Properties inherited from Resource
boolean |
|
number |
|
boolean |
|
string |
The url of the resource |
boolean |
|
number |
|
number |
Internal height of the resource. |
number |
Internal width of the resource. |
Methods inherited from BaseImageResource
void |
Destroy this BaseImageResource |
void |
|
boolean |
|
Methods inherited from Resource
void |
|
void |
|
void |
|
boolean |
|
void |
|
Promise<PIXI.Resource> |
|
Public Methods
static test(source: unknown) → {boolean}
Used to auto-detect the type of resource.
Name | Type | Description |
---|---|---|
source | unknown |
The source object |
Type | Description |
---|---|
boolean |
|