Create a gist now

Instantly share code, notes, and snippets.

@nbriz /rotatingMesh.js Secret
Last active Dec 18, 2015

What would you like to do?
rotating mesh snippet for threejs_playGnd
/* ------------------- INSTRUCTIONS -----
to rotate a mesh
add the code below to your draw() function
mess with the numbers to change the speed
-------------------------------------- */
mesh.rotation.x = Date.now() * 0.0005;
mesh.rotation.y = Date.now() * 0.0002;
mesh.rotation.z = Date.now() * 0.001;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment