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
source

Properties inherited from Resource

boolean
destroyed = false
number
height
boolean
internal
string
src

The url of the resource

boolean
valid
number
width
number
protected _height

Internal height of the resource.

number
protected _width

Internal width of the resource.

Methods inherited from Resource

Public Properties


source NodeCanvasResource.ts:15
source: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | SVGElement

The source element.

Public Methods


crossOrigin NodeCanvasResource.ts:101
static crossOrigin(element: HTMLImageElement | HTMLVideoElement, url: string, crossorigin: boolean | string) → {void}

Set cross origin based detecting the url and the crossorigin

Parameters:
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

Returns:
Type Description
void
update NodeCanvasResource.ts:70
update() → {void}

Checks if source width/height was changed, resize can cause extra baseTexture update. Triggers one update in any case.

Returns:
Type Description
void

Powered by webdoc!