title: How to add/remove objects with time in Three.js
body: <p>I want to add and remove objects with a period. For example, i have an array which includes 50 objects. I want to add the object with a period while removing the previous one, like creating an object stream. First i tried with setTimeout and setInterval functions but they didn't work (both inside and outside render function). Then i tried this;</p>
  
  <pre><code>function render(){
      controls.update(clock.getDelta());
      renderer.render( scene, camera);
      i = i+1;
      if (i % 2 == 0){
          if (i % 300 == 0){
              remove(lights);
          }
          else
          {   scene.add(lights[(i/2)]);
          }
      }
  }
  </code></pre>
  
  <p>It works but it does not start adding process with first object. I also tried getElapsedtime() instead of iterating i, but this time it only adds the first object. Is there any more effective time controlled method that i can use for this?</p>
  
  <p>Thanks a lot. </p>