title: THREEJS how do you rotate around an objects local axis
body: <p>I am having a hard time understanding how the local axis rotation works in ThreeJS. I saw this <a href="https://stackoverflow.com/questions/37657560/rotate-around-local-axis">Rotate around local axis</a> answer and it is not working quite the way I expected.</p>
  
  <p>If I create a a cylinder and rotate it</p>
  
  <pre><code>const geometry = new THREE.CylinderBufferGeometry( 10, 10, 20 );
  geometry.rotateX(Math.PI/2)
  </code></pre>
  
  <p>How do I then rotate the cylinder along its long axis?</p>
  
  <p>I expect this to do the job: <code>geometry.rotateY(Math.PI/5)</code> but that appears to be rotating it around the world axis. I want to just rotate it around the local axis to make it look the same as if I had done</p>
  
  <pre><code>geometry.rotateY(Math.PI/5)
  geometry.rotateX(Math.PI/2)
  </code></pre>
  
  <p>Can anyone help explain how to rotate around the objects internal axis?</p>
  
  <p>What actually happens:
  <a href="https://jsfiddle.net/h20hnn3n/46/" rel="nofollow noreferrer">https://jsfiddle.net/h20hnn3n/46/</a></p>
  
  <p>What I want it to look like:
  <a href="https://jsfiddle.net/81j6g2ms/1/" rel="nofollow noreferrer">https://jsfiddle.net/81j6g2ms/1/</a></p>
  
  <p>My use case requires me to rotate around the X and arbitrary amount first and then I need to rotate around the old Y axis, so it would be great if I could do it in this order</p>
  
  <p>Edit:
  It appears that it matters whether you rotate the geometry vs a mesh. Shouldn't it be equivalent to do it either way?</p>
  
  <p>I'm really confused why this doesn't act the same way: <a href="https://jsfiddle.net/10L8se71/2/" rel="nofollow noreferrer">https://jsfiddle.net/10L8se71/2/</a></p>