Skip to content

Instantly share code, notes, and snippets.

Created January 10, 2017 18:27
What would you like to do?
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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment