PIXI.NodeCanvasResource
class NodeCanvasResource extends PIXI.Resource
A canvas resource using node-canvas used for images, svg, and bitmap text
Summary
Properties from NodeCanvasResource
| HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement |
|
Methods from NodeCanvasResource
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 Resource
| void |
|
| void |
|
| void |
Clean up anything, this happens when destroying is ready. |
| void |
|
| boolean |
|
| void |
|
| boolean |
|
| Promise<PIXI.Resource> |
|
Public Properties
source: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement
The source element.
Public Methods
static crossOrigin(element: HTMLImageElement | HTMLVideoElement, url: string, crossorigin: boolean | string) → {void}
Set cross origin based detecting the url and the crossorigin
| Name | Type | Attributes | Description |
|---|---|---|---|
| element | HTMLImageElement | HTMLVideoElement |
Element to apply crossOrigin |
|
| url | string |
URL to check |
|
| crossorigin | boolean | string |
<optional> |
Cross origin value to use |
| Type | Description |
|---|---|
| void |
update() → {void}
Checks if source width/height was changed, resize can cause extra baseTexture update. Triggers one update in any case.
| Type | Description |
|---|---|
| void |