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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

為什么我的??胹in 漂浮物用的cos才可以保持一致

為什么我的海葵用sin 漂浮物用的cos才可以保持一致

miracle__fu 2016-03-11 16:35:08
/*main部分代碼,定義了delta,在gameloop()中有如下代碼*/delta += Math.PI * deltaTime * 0.0003;/*??糠执a*/??? for(var i = 0; i < this.num; i++)?? ?{?? ??? ?ctx2.beginPath();?? ??? ?ctx2.moveTo(this.x[i],canHeight);?? ??? ?//ctx2.lineTo(this.x[i], canHeight-this.len[i]);?? ??? ?var deltaX = Math.sin(delta);//[-1,1]?? ??? ?//console.log("dust delta:"+delta);?? ??? ?this.headX[i] = this.x[i] + deltaX * this.amp[i];?? ??? ?ctx2.quadraticCurveTo(this.x[i], canHeight - this.len[i] / 3, this.headX[i], canHeight - this.len[i]);?? ??? ?//console.log("x1: " + this.x[i] + " y1: " + (canHeight - this.len[i] / 2) + " x2: " + (this.x[i] + deltaX) + " y2: " + (canHeight - this.len[i]));?? ??? ??? ??? ?ctx2.stroke();?? ?}/*漂浮物部分代碼*/??? var deltaX = Math.cos(delta);//[-1,1]?? ?//console.log("dust delta:"+delta);?? ?for(var i = 0; i < this.num; i++)?? ?{?? ??? ?this.x[i] += deltaX * this.amp[i];?? ??? ?var id = this.dustCount[i];?? ??? ?ctx1.drawImage(this.img[id], this.x[i], this.y[i]);?? ??? ?//console.log("img: "+ this.dustCount[i]);?? ?}
查看完整描述

目前暫無(wú)任何回答

  • 0 回答
  • 0 關(guān)注
  • 1091 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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