destroy() {
    var key;
    if (this.parentNode) {
      warn('Entity can only be destroyed if detached from scenegraph.');
      return;
    }
    for (key in this.components) {
      this.components[key].destroy();
    }
  }
Clean up memory and return memory to object pools.