jeremyckahn/shifty — pull request #58 by ZainManji (2014-11-18 02:13:06+00:00)
Title: Protected config variable from mutation by adding clone function

When creating a Tweenable object and then trying to seek, the config which was initially passed into the Tweenable object's constructor get's mutated by the timeoutHandler function. It was causing my seeks to be inconsistent.

I added a clone function to make sure the config's from and to property doesn't get mutated.

e.g.
var config = {from: {opacity: 0}, to: {opacity:1}, duration 100};
var tween = new Tweenable(duration);
tween.seek(20); //Config get's changed to {from: {opacity: 0.2}, to: {opacity:1}, duration 100};
tween.seek(60); //Config get's changed to {from: {opacity: 0.6}, to: {opacity:1}, duration 100};