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"
手机扫一扫
移动阅读更方便
你可能感兴趣的文章