Texture.fromCanvas()

<static> fromCanvas(canvas, scaleMode) → {PIXI.Texture}

Helper function that creates a new a Texture based on the given canvas element.

Parameters
Name Type Description
canvas Canvas

The canvas element source of the texture

scaleMode Number

See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values

Returns
Source code: pixi/textures/Texture.js (Line 249)
doc_phaser
2017-02-14 11:14:53
Comments
Leave a Comment

Please login to continue.