How to use the framesync.cancelOnFrameUpdate function in framesync

To help you get started, we’ve selected a few framesync 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 Popmotion / popmotion / src / actions / rx.js View on Github external
    stop: () => cancelOnFrameUpdate(nextFrame)
  };
github Popmotion / popmotion / src / actions / index.js View on Github external
stop() {
    const { onStop, _onStop, passive } = this.props;

    if (!passive) {
      this._isActive = false;
      cancelOnFrameUpdate(this.scheduledUpdate);
    }

    if (this.onStop) this.onStop();
    if (onStop) onStop(this);
    if (_onStop) _onStop(this);

    return this;
  }