Sine waves in Threejs
This wave pattern is accomplished by calculating a sine wave from the centre of the PlaneGeometry through to the other vertices. For each vertex, calculate the distance from the centre point. Using that distance apply the sin to get the vertical positions of the vertex. Then use time (ts) to create the wave animation. Additionally, there are two variables size and magnitude that allow us to manipulate the vertical deviation and wave length.
npm install --global gulp-cli
: Install gulp globallynpm i
Install dependenciesgulp dev
: Build files will be output to the ‘.tmp’ directory.gulp build
: Build files will be output to the ‘deploy’ directory.gulp build
: Compile local changesgit add .
: Stage changesgit commit -m"change description"
: comment on your changesgit tag -a v1.0.0 -m "Change description"
: Add a new tagged releasegit push --follow-tags
: Push staged changes and tags