你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
cuixueying
赞同来自: gls_laybox
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);
gls_laybox
赞同来自:
要回复问题请先登录
2 个回复
cuixueying
赞同来自: gls_laybox
var IndexView = (function(_super){
关于clear的问题是你自己的逻辑问题导致的,按照上面的改下即可,锯齿是webGL的问题,我们正在解决,尽快修复!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);
gls_laybox
赞同来自: