addComponent(component) {
    if (component instanceof BaseSpriteComponent) {
      const id = component.getId();
      if (id != null && !this.getComponentById(id)) {
        this._componentsById[id] = component;

        // handle component type
        if (component instanceof CompositePass) {
          this._renderCmd.addCompositePass(component);
        }
      }
    }
  }
Adds a component to this sprite. Components must have unique ids.
@param component