async _animateHeldViseme()

in src/core/LipsyncFeature.js [411:459]


  async _animateHeldViseme(
    layerName,
    animName,
    visemeName,
    peakWeight,
    decayWeight,
    blendInTime,
    holdTime,
    blendOutTime,
    easingFn
  ) {
    // Animate towards the peak value
    const startPromise = this._host.AnimationFeature.setAnimationBlendWeight(
      layerName,
      animName,
      visemeName,
      peakWeight,
      blendInTime,
      easingFn
    );

    await startPromise;

    if (!startPromise.canceled) {
      // Animate towards the decay value if there was no weight interruption
      const holdPromise = this._host.AnimationFeature.setAnimationBlendWeight(
        layerName,
        animName,
        visemeName,
        decayWeight,
        holdTime,
        easingFn
      );

      await holdPromise;

      if (!holdPromise.canceled) {
        // Animate back to zero if there was no weight interruption
        this._host.AnimationFeature.setAnimationBlendWeight(
          layerName,
          animName,
          visemeName,
          0,
          blendOutTime,
          easingFn
        );
      }
    }
  }