[]代码和ide编辑器添加遮罩浏览器警告
请问下这段代码有什么问题?
let s: Laya.Sprite = new Laya.Sprite();
s.graphics.drawRect(10, 10, 580, 470, "#000000");
s.pos(0,0);
console.log("=mask container=>>", s.width, s.height)//打印出是0,0
this.scrollContainer.mask = s;//scrollContainer是一个有宽高的Box,为什么打印出的s的宽高是0,0,只要设置了mask,chrorme就会警告cache bitmap size larger than 2048,cache ignored
let s: Laya.Sprite = new Laya.Sprite();
s.graphics.drawRect(10, 10, 580, 470, "#000000");
s.pos(0,0);
console.log("=mask container=>>", s.width, s.height)//打印出是0,0
this.scrollContainer.mask = s;//scrollContainer是一个有宽高的Box,为什么打印出的s的宽高是0,0,只要设置了mask,chrorme就会警告cache bitmap size larger than 2048,cache ignored
没有找到相关结果
已邀请:
要回复问题请先登录
2 个回复
Laya_XS
赞同来自:
ljy328803417
赞同来自: