Added doc for BaseTexture.fromCanvas
This commit is contained in:
parent
ad7ced5407
commit
e1f8766a71
1 changed files with 10 additions and 0 deletions
|
@ -167,6 +167,16 @@ PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin, scaleMode)
|
||||||
return baseTexture;
|
return baseTexture;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function that returns a base texture based on a canvas element
|
||||||
|
* If the image is not in the base texture cache it will be created and loaded
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @method fromCanvas
|
||||||
|
* @param canvas {Canvas} The canvas element source of the texture
|
||||||
|
* @param scaleMode {Number} Should be one of the PIXI.scaleMode consts
|
||||||
|
* @return BaseTexture
|
||||||
|
*/
|
||||||
PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode)
|
PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode)
|
||||||
{
|
{
|
||||||
if(!canvas._pixiId)
|
if(!canvas._pixiId)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue