淡淡的疯
wxtool.postMsgToOpenDataContext({
state: 'init',
openId: GlobalData.getInstance().openId
});
this.rank = new Laya.Sprite();
this.box_rank.addChild(this.rank);
Laya.Browser.window.sharedCanvas.width = this.box_rank.width;
Laya.Browser.window.sharedCanvas.height = this.box_rank.height;
//alwaysChange = true不好用了 手动刷新
Laya.timer.loop(50, this, () => {
var texture2D = new Laya.Texture2D();
texture2D.loadImageSource(Laya.Browser.window.sharedCanvas, true);
var texture = new Laya.Texture(texture2D);
//texture.bitmap.alwaysChange = true;
this.rank.graphics.clear();
this.rank.graphics.drawTexture(texture, 0, 0, texture.width, texture.height);
});
alwaysChange = true不好用了 需要手动循环绘制才能正常画出来