How to use the framesync.onFrameRender 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 / renderers / index.js View on Github external
set(...args) {
    if (typeof args[1] === 'undefined') {
      const [ values ] = args;
      // Set multiple values
      for (const key in values) {
        this.setValue(key, values[key]);
      }
    } else {
      const [ key, value ] = args;
      this.setValue(key, value);
    }

    if (this.hasChanged) {
      onFrameRender(this.render);
    }

    return this;
  }