Skip to content

Instantly share code, notes, and snippets.

@videlais
Created Jan 10, 2017
Embed
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 );
}
init();
animate();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment