var IndexView = (function(_super){
this.angle;
this.draw;
this.box;
this.circle;
function IndexView(){
IndexView.super(this);
this.angle = 0;
Laya.timer.loop(200,this,this.loadProgress)
var Sprite = Laya.Sprite;
this.box = new Sprite();
this.box.cacheAs = "bitmap";
this.box.pos(0,0);
this.say.addChild(this.box);
this.draw = new Sprite();
this.box.addChild(this.draw);
this.draw.graphics.drawPie(this.say.width/2, this.say.height/2, this.say.width/2+9,0,this.angle, "#ffffff");
this.circle = new Sprite();
this.circle.graphics.drawCircle(this.say.width/2, this.say.height/2, this.say.width/2, "#00ffff");
this.circle.blendMode = "destination-out";
}
Laya.class(IndexView,"IndexView",_super);
IndexView.prototype.loadProgress = function(){
this.box.addChild(this.circle);
if(this.angle <= 360){
this.angle+=12;
this.draw.graphics.drawPie(this.say.width/2, this.say.height/2, this.say.width/2+9,0,this.angle, "#ffffff");
}else{
this.draw.graphics.clear();
this.circle.graphics.clear();
}
}
return IndexView;
}
)(IndexUI);
关于clear的问题是你自己的逻辑问题导致的,按照上面的改下即可,锯齿是webGL的问题,我们正在解决,尽快修复!