old_contents: function ThreadManager (thread, compositor) {
  	this.thread = thread;
  	this.compositor = compositor;
  
      var _this = this;
  	this.thread.onmessage = function (ev) {
          _this.compositor.receiveCommands(ev.data);
      };
  }
  
  ThreadManager.prototype.update = function update (time) {
      if (this.thread.postMessage) {
          this.thread.postMessage(['FRAME', time]);
  
          var threadMessages = this.compositor.drawCommands();
          this.thread.postMessage(threadMessages);
      } else {
          this.thread.receiveCommands(['FRAME', time]);
  
          var threadMessages = this.compositor.drawCommands();
          this.thread.receiveCommands(threadMessages);
      }
      
      this.compositor.clearCommands();
  };
  
  module.exports = ThreadManager;
  
new_contents: function ThreadManager (thread, compositor) {
  	this.thread = thread;
  	this.compositor = compositor;
  
      var _this = this;
  	this.thread.onmessage = function (ev) {
          _this.compositor.receiveCommands(ev.data);
      };
      this.thread.oncommands = function (commands) {
          _this.compositor.receiveCommands(commands);
      };
  }
  
  ThreadManager.prototype.update = function update (time) {
      if (this.thread.postMessage) {
          this.thread.postMessage(['FRAME', time]);
  
          var threadMessages = this.compositor.drawCommands();
          this.thread.postMessage(threadMessages);
      } else {
          this.thread.receiveCommands(['FRAME', time]);
  
          var threadMessages = this.compositor.drawCommands();
          this.thread.receiveCommands(threadMessages);
      }
      
      this.compositor.clearCommands();
  };
  
  module.exports = ThreadManager;
  
subject: Make ThreadManager accept clock