Skip to content

Instantly share code, notes, and snippets.

@nbriz
Last active November 22, 2018 03:18
Embed
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