Created
March 3, 2019 20:04
-
-
Save izumiikezaki/c43098733dc5a7e33a18dad5687b1ec1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const divNum = 12;//波の分割数 | |
const waveNum = 1;//波の数 | |
function planeAnim(){ | |
for (var i = 0; i < planeGeo.vertices.length; i++) { | |
if(Math.floor(i/(divNum+1))==1){//列ごとに処理 | |
planeGeo.vertices[i].y=Math.sin((clock.getElapsedTime()+(i/6))*2)*10; | |
}else{ | |
planeGeo.vertices[i].y=Math.sin((clock.getElapsedTime()+(i/6))*2)*20; | |
} | |
} | |
planeGeo.verticesNeedUpdate=true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment