Added cross origin and scaleMode to Sprite.fromImage

This commit is contained in:
Mat Groves 2014-02-10 19:53:23 +00:00
parent 46226d05e2
commit 78d45b2399

View file

@ -465,8 +465,8 @@ PIXI.Sprite.fromFrame = function(frameId)
* @param imageId {String} The image url of the texture * @param imageId {String} The image url of the texture
* @return {Sprite} A new Sprite using a texture from the texture cache matching the image id * @return {Sprite} A new Sprite using a texture from the texture cache matching the image id
*/ */
PIXI.Sprite.fromImage = function(imageId) PIXI.Sprite.fromImage = function(imageId, crossorigin, scaleMode)
{ {
var texture = PIXI.Texture.fromImage(imageId); var texture = PIXI.Texture.fromImage(imageId, crossorigin, scaleMode);
return new PIXI.Sprite(texture); return new PIXI.Sprite(texture);
}; };