How to use the velocity-animate.RegisterEffect function in velocity-animate

To help you get started, we’ve selected a few velocity-animate 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 aurelia / animator-velocity / dist / native-modules / aurelia-animator-velocity.js View on Github external
VelocityAnimator.prototype.registerEffect = function registerEffect(name, props) {
    if (name[0] === ':') {
      if (typeof props === 'string') {
        this.effects[name] = props;
      } else {
        throw new Error('second parameter must be a string when registering aliases');
      }
    } else {
      velocity.RegisterEffect(name, props);
    }
    return this;
  };
github aurelia / animator-velocity / dist / es2015 / aurelia-animator-velocity.js View on Github external
registerEffect(name, props) {
    if (name[0] === ':') {
      if (typeof props === 'string') {
        this.effects[name] = props;
      } else {
        throw new Error('second parameter must be a string when registering aliases');
      }
    } else {
      velocity.RegisterEffect(name, props);
    }
    return this;
  }
github aurelia / animator-velocity / dist / aurelia-animator-velocity.js View on Github external
registerEffect(name:string, props: Object): VelocityAnimator {
    if (name[0] === ':') {
      if (typeof props === 'string') {
        this.effects[name] = props;
      } else {
        throw new Error('second parameter must be a string when registering aliases');
      }
    } else {
      velocity.RegisterEffect(name, props); //eslint-disable-line
    }
    return this;
  }
github aurelia / animator-velocity / src / animator.js View on Github external
registerEffect(name:string, props: Object): VelocityAnimator {
    if (name[0] === ':') {
      if (typeof props === 'string') {
        this.effects[name] = props;
      } else {
        throw new Error('second parameter must be a string when registering aliases');
      }
    } else {
      velocity.RegisterEffect(name, props); //eslint-disable-line
    }
    return this;
  }