showFlip(duration, rotateInPlace) {
    if (duration == null) { duration = 0.5; }

    // stop any running flip
    if (this._flipAction != null) {
      this.stopAction(this._flipAction);
      this._flipAction = null;

      if (duration > 0.0) {
        if (this._flippingToFront) {
          this.setXYZRotation(new cc.kmVec3(0.0, 0.0, 0.0));
        } else {
          this.setXYZRotation(new cc.kmVec3(0.0, -180.0, 0.0));
        }
      }
    }

    const flipMod = this._flippingToFront ? -1.0 : 1.0;
    const xyzRotation = new cc.kmVec3(0.0, -180.0, 0.0);

    // animate rotation
    if (duration <= 0.0) {
      const targetXYZRotation = this.getXYZRotation();
      targetXYZRotation.x += xyzRotation.x;
      targetXYZRotation.y += xyzRotation.y;
      targetXYZRotation.z += xyzRotation.z;
      this.setXYZRotation(targetXYZRotation);
    } else if (rotateInPlace) {
      this._flipAction = cc.sequence(
        XYZRotateBy.create(duration, xyzRotation.x, xyzRotation.y, xyzRotation.z).easing(cc.easeBackInOut(2.0)),
        cc.callFunc(() => {
          this._flipAction = null;
        }),
      );
      this.runAction(this._flipAction);
    } else {
      // set starting properties
      const contentSize = this.getContentSize();
      const anchorX = flipMod < 0.0 ? 0.3 : 0.7;
      const anchorY = 0.25;
      const angRotX = 40.0 * (xyzRotation.y < 0.0 ? -1.0 : 1.0);
      const angRotY = 60.0 * (xyzRotation.x < 0.0 ? -1.0 : 1.0);
      const angRotZ = 0.0;
      const originalPosition = this.getPosition();
      const originalAnchor = this.getAnchorPoint();
      const startingPosition = cc.p(
        originalPosition.x + (anchorX - 0.5) * contentSize.width * flipMod,
        originalPosition.y + (anchorY - 0.5) * contentSize.height,
      );
      const finalPosition = cc.p(
        originalPosition.x - (anchorX - 0.5) * contentSize.width * flipMod,
        originalPosition.y + (anchorY - 0.5) * contentSize.height,
      );
      const intermediatePositionA = cc.p(
        originalPosition.x - (anchorX - 0.5) * contentSize.width * flipMod * 0.5,
        originalPosition.y + (anchorY - 0.5) * contentSize.height,
      );
      const intermediatePositionB = cc.p(
        originalPosition.x + (anchorX - 0.5) * contentSize.width * flipMod,
        originalPosition.y + (anchorY - 0.5) * contentSize.height,
      );
      this.setAnchorPoint(anchorX, anchorY);
      this.setPosition(startingPosition);

      this._flipAction = cc.sequence(
        cc.spawn(
          // rotate to other side
          XYZRotateBy.create(duration, xyzRotation.x, xyzRotation.y, xyzRotation.z).easing(cc.easeCubicActionInOut()),
          // // rotate relative to motion
          // cc.sequence(
          //   SecondaryXYZRotateBy.create(duration * 0.5, angRotX, angRotY, angRotZ).easing(cc.easeInOut(3.0)),
          //   SecondaryXYZRotateBy.create(duration * 0.5, -angRotX, -angRotY, -angRotZ).easing(cc.easeInOut(3.0))
          // ),
          // move in arc
          cc.sequence(
            // cc.moveTo(duration * 0.33, intermediatePositionA).easing(cc.easeInOut(3.0)),
            // cc.moveTo(duration * 0.33, intermediatePositionB).easing(cc.easeInOut(3.0)),
            cc.moveTo(duration, finalPosition).easing(cc.easeInOut(3.0)),
            cc.callFunc(() => {
              this.setAnchorPoint(originalAnchor);
              this.setPosition(originalPosition);
            }),
          ),
          // move towards camera
          cc.sequence(
            cc.scaleTo(duration * 0.5, 0.8),
            cc.scaleTo(duration * 0.5, 1.0),
          ).easing(cc.easeCubicActionInOut()),
        ),
        cc.callFunc(() => {
          this._flipAction = null;
        }),
      );
      this.runAction(this._flipAction);
    }

    // toggle flip state
    this._flippingToFront = !this._flippingToFront;
  }
Shows card being flipped from current side to other side.
NOTE: in order to show card back, you must first call bindCardBack() and whenCardBackResourcesReady().then
@param {Number} [duration=0.5]
@param {Boolean} [rotateInPlace=false] whether to rotate in place or with movement and relative angular rotation