title: Moving a object based on its rotation in three.js
body: <p>I'm trying to move a cube in three.js based on its rotation but not sure on how to go about it.</p>
  
  <p>As of now I can rotate the cube's z-rotation with the A &amp; D keys.  And with the W key I would like it to move forward relative to its rotation.</p>
  
  <p>From 2D I would so something along the lines of:</p>
  
  <pre><code>float angle = GradToRad(obj.rotation);
  obj.x = obj.x + cos(angle) * velocity;
  obj.y = obj.y + sin(angle) * velocity;
  </code></pre>
  
  <p>Here's an image of the current implementation.
  <img src="https://i.stack.imgur.com/s7dVU.png" alt="3D Cube three.js"></p>
  
  <p>How can I apply something similar in three.js?</p>