第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

繪制??l(fā)光效果時(shí),畫面變得十分不流暢,怎么辦?

我用shadowColor和shadowBlur來(lái)增加??陌l(fā)光效果,但加上后游戲性能出現(xiàn)了很大的問(wèn)題,畫面不流暢。為了把海葵發(fā)光效果設(shè)置提到循環(huán)外,嘗試另開(kāi)一個(gè)canvas畫海葵,但還是很卡。不知道有沒(méi)有人做??男Ч?,關(guān)于這個(gè)問(wèn)題有沒(méi)有什么解決思路呢?

附 Ane的draw方法

AneObj.prototype.draw = function ?() {

ctx2.save();

ctx2.globalAlpha = 0.6 ;

ctx2.strokeStyle = "#3b154e";

ctx2.lineCap = "round";

ctx2.lineWidth = 20;

// ctx2.shadowColor = "#fff";

// ctx2.shadowBlur = 3;

this.alpha += deltaTime * 0.0015;

var l = Math.sin(this.alpha);

for (var i = this.num; i > 0; i--) {

ctx2.beginPath();

ctx2.moveTo(this.rootx[i], can_h);

this.headx[i] = this.rootx[i] + l * this.amp[i];

ctx2.quadraticCurveTo(this.rootx[i], this.heady[i]+50 ,this.headx[i] , this.heady[i]);

ctx2.stroke();

};

ctx2.restore();

};


正在回答

1 回答

for(var i=0; i<this.num; i++){

if(this.alive[i]){

//draw

this.r[i] += deltaTime*0.04;

if(this.r[i]>50){

this.alive[i] = false;

continue;

}

var alpha = 1 - this.r[i]/50;

ctx1.beginPath();

ctx1.arc(this.x[i], this.y[i], this.r[i], 0, Math.PI*2);

ctx1.closePath();

ctx1.strokeStyle = "rgba(255, 255, 255,"+ alpha +")";

ctx1.stroke();

}

}


0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

繪制??l(fā)光效果時(shí),畫面變得十分不流暢,怎么辦?

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)