code: function(frames, timestep) {
                  timestep = timestep || milliSecPerFrame;
                  while (frames-- > 0) {
                      var frameData = {
                          frame: frame++,
                          dt: timestep
                      };
                      Crafty.trigger("EnterFrame", frameData);
                      Crafty.trigger("UpdateFrame", frameData);
                      Crafty.trigger("ExitFrame", frameData);
                  }
                  Crafty.trigger("PreRender");
                  Crafty.trigger("RenderScene");
                  Crafty.trigger("PostRender");
              }
docs: @
  #Crafty.timer.simulateFrames
  @comp Crafty.timer
  @kind Method
  
  @sign public this Crafty.timer.simulateFrames(Number frames[, Number timestep])
  Advances the game state by a number of frames and draws the resulting stage at the end. Useful for tests and debugging.
  @param frames - number of frames to simulate
  @param timestep - the duration to pass each frame.  Defaults to milliSecPerFrame (20 ms) if not specified.