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
function animate() { | |
// Call the requestAnimationFrame function on the animate function | |
// (thus creating an infinite loop) | |
requestAnimationFrame( animate ); | |
// Rotate the x position of the mesh by 0.03 | |
mesh.rotation.x += 0.03; | |
// Rotate the y position of the mesh by 0.02 | |
mesh.rotation.y += 0.02; | |
// Render everything using the created renderer, scene, and camera | |
renderer.render( scene, camera ); | |
} | |
init(); | |
animate(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment