Skip to content

Instantly share code, notes, and snippets.

@nbriz
Last active November 22, 2018 03:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save nbriz/90cabdeb21ea2510c5ae to your computer and use it in GitHub Desktop.
Save nbriz/90cabdeb21ea2510c5ae to your computer and use it in GitHub Desktop.
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