<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)
Please login to continue.