Skip to content

Instantly share code, notes, and snippets.

@RxET
Last active March 20, 2018 03:59
Show Gist options
  • Save RxET/ea1c33612ccafce739e2250510ac98f3 to your computer and use it in GitHub Desktop.
Save RxET/ea1c33612ccafce739e2250510ac98f3 to your computer and use it in GitHub Desktop.
Three.js or There’s a hypercube in my timeline and I can’t get out
function animate() {
//keep calling our animate function to keep the motion flowing
requestAnimationFrame( animate );
//finally render our scene
renderer.render( scene, camera );
//give our box a little twist
box.rotation.x += 0.01;
box.rotation.y += 0.01;
//and update our camera controls for each frame
controls.update();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment