Skip to content

Instantly share code, notes, and snippets.

@jeremyckahn
Last active December 22, 2015 22:39
Show Gist options
  • Select an option

  • Save jeremyckahn/6541630 to your computer and use it in GitHub Desktop.

Select an option

Save jeremyckahn/6541630 to your computer and use it in GitHub Desktop.
Some API sketching for Bezier support in Shifty.

Shifty Bezier API

Tweenable.setBezierFunction('bezier-linear', 0.250, 0.250, 0.750, 0.750);

var tweenable = new Tweenable();
tweenable.tween({ from: {x:1}, to: {x:10}, easing: 'bezier-linear', duration: 1000});

Tweenable.interpolate({x:1}, {x:10}, 0.5, 'bezier-linear'); // 5

Tweenable.unsetBezierFunction('bezier-linear');

Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment