pixi的图片处理
pixi的图片处理
var texture = PIXI.Texture.fromImage('sprite.png');var sprite = new PIXI.Sprite(texture);var texture2 = new PIXI.Texture(texture, new PIXI.Rectangle(10, 10, 50, 50));sprite.setTexture(texture2);
var img = new Image();img.src = 'my/url/image.png';var base = new PIXI.BaseTexture(img), texture = new PIXI.Texture(base);// return you the texture
"http://www.test.17zuoye.net/wordstock/wordimg/web/good.jpg"