add(object3d) {
    if (!(object3d instanceof Object3D)) {
      throw new Error('Invalid Object3D trying to add an anchor');
    }
    // Do not allow to create an anchor for an object3d that already has one.
    if (this.object3DsToAnchors_.has(object3d)) {
      return this;
    }
    // If the object has a parent and its parent has a parent, it is very
    // likely that it may not be in world space so warn the developer.
    // NOTE: Commented out for now because if we use anchors for planes in
    // ARPlanes, they are added to a identity main parent object but does not
    // mean they are not in world space. Getting this warning at all times is
    // not optimal.
//    if (object3d.parent && object3d.parent.parent) {
//      console.warn("anchors should be added for Object3D-s in world space");
//    }
    // Calculate the model matrix of the object3d using the position and
    // quaternion of the object.
    this.scale_.set(1, 1, 1);
    this.matrix_.compose(object3d.position, object3d.quaternion, this.scale_);
    const anchor = this.vrDisplay_.addAnchor(this.matrix_.elements);
    // Store the anchor and the object3d in the structure to retrieve them
    // later on.
    this.anchorsToObject3Ds_.set(anchor, object3d);
    this.object3DsToAnchors_.set(object3d, anchor);
    return this;
  }
Assign a new anchor to an THREE.Object3D.
@param {THREE.Object3D} object3d A Three Object3D instance to create and
manage an anchor for. The current transformation (position/orientation) of
the Object3D will be used to create the anchor and this class will keep
it up to date with any tracking changes detected by the system.
IMPORTANT: The passed Object3D instance should be in world space!
@throws Error if:
- The given object3d is not an instance of Object3D.
@return {ARAnchorManager}