[]用ide打包后的图片,Texture显示不出来?
Sprite和Image可以显示出来,Texture报错、、、说找不到图片
代码 :
Laya.loader.load([{url: "comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded));
function onLoaded(){
var aa = new Sprite();
Laya.stage.addChild(aa);
var texture = new Laya.Texture();
texture.load('comp/zzw.png' );
setTimeout( function(){
aa.graphics.drawTexture(texture,0,0);
}, 1000 )
}
3Q
代码 :
Laya.loader.load([{url: "comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded));
function onLoaded(){
var aa = new Sprite();
Laya.stage.addChild(aa);
var texture = new Laya.Texture();
texture.load('comp/zzw.png' );
setTimeout( function(){
aa.graphics.drawTexture(texture,0,0);
}, 1000 )
}
3Q
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Laya_XS
赞同来自: qq408896436
Laya.loader.load([{url: "comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded));
function onLoaded(){
var aa = new Sprite();
Laya.stage.addChild(aa);
var texture = Loader.getRes('comp/zzw.png');
setTimeout( function(){
aa.graphics.drawTexture(texture,0,0);
}, 1000 )
}