How to use the lottie-web.setQuality function in lottie-web

To help you get started, we’ve selected a few lottie-web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Vizzuality / gfw / app / javascript / pages / topics / components / topics-slide / topics-image / component.jsx View on Github external
componentDidUpdate(prevProps) {
    const { animations } = this.props;
    const { animations: prevAnimations } = prevProps;
    if (animations && !isEqual(animations, prevAnimations)) {
      if (prevAnimations && prevAnimations.length) {
        this.destroyAnimations(prevAnimations);
      }
      lottie.setQuality(2);
      this.renderAnimations(animations);
    }
  }
github Vizzuality / gfw / app / javascript / pages / topics / components / topics-slide / topics-image / component.jsx View on Github external
componentDidMount() {
    lottie.setQuality(2);
    this.animations = {};
    const { animations } = this.props;
    if (animations && animations.length) {
      this.renderAnimations(animations);
    }
  }