ponent);
      return component;
    }
    removeComponent(component) {
      removeArrayElement(this.components, component);
    }
    getComponent(ComponentType) {
      return this.components.find(c => c instanceof ComponentType);
    }
    update() {
      for (const component of this.components) {
        component.update();
      }
    }
  }

  // Base for all components
  class Component {
    constructor(gameObject) {
      this.gameObject = gameObject;
    }
    update() {
    }
  }

  class Camera