title: Units of Three.JS, Calculating Rotation & Orbit Speeds
body: <p>I'm trying to build a to scale model of the solar system. I wanted to see if someone could explain to me how the rotation speed works. Here's the important piece:</p>
  
  <pre><code>objects[index].rotation.y += calculateRotationSpeed(value.radius,value.revolution) * delta;
  </code></pre>
  
  <p>How does the rotation speed relate to actual time? So if you have a speed of 1, is that a movement of 1 px per millisecond? Or if you have a speed of 0.1, is that less that a px a second?</p>
  
  <p>Basically I'm trying to calculate the correct rotation speed for the planets given their radius and amount of hours in a day. So if you were on earth, it would complete 1 rotation in 24 hours. Here's the function that I wrote that's doing the calculation now:</p>
  
  <pre><code>/* In a day */
  function calculateRotationSpeed(radius,hrs,delta) {
      var cir = findCircumference(radius);
      if(delta) {
          var d = delta;
      } else {
          var d = 1;
      }
      var ms = hrs2ms(hrs) * d;
      var pxPerMS = km2px(cir) / ms;
      return pxPerMS;
  }
  </code></pre>
  
  <p>I gave it a try and it still seems to be moving too fast. I also need something similar to calculate orbit speeds. </p>