zhengjiajia
@339:this.itemSpr = new Laya.Sprite;
this.itemSpr.name = 'mySprite';
// this.itemSpr.cacheAs = 'normal';
this.itemSpr.cacheAsBitmap = false;
this.addChild(this.itemSpr);
//卡马克
for (var i: number = 0; i < 15; i++) {
var attItem: HeadItem = new HeadItem;
attItem.x = i * this.OFF_X;
this.itemList.push(attItem);
this.itemSpr.addChild(attItem);
}
let maskSp:Laya.Sprite = new Laya.Sprite;
maskSp.graphics.drawRect(0,0,760,140,'#ffffff');
this.itemSpr.mask = maskSp;
测试 在无mask的情况下不会报错 开启mask之后 cacheAs失效 导致了强制缓存 抛出警告 警告累积一段时间报错