Closed alexkirsz closed 9 years ago
Hi @Morhaus, thanks for reporting this. I haven't used Browserify, so I'm not familiar with the workflow. Can you provide some steps to reproduce this issue?
mkdir shifty-browserify-example
cd shifty-browserify-example
sudo npm install -g browserify
npm install shifty
In shifty-browserify-example/index.js
var Tweenable = require('shifty');
var tweenable = new Tweenable();
tweenable.tween({
from: { x: 0, y: 50 },
to: { x: 10, y: -30 },
duration: 1500,
easing: 'easeOutQuad',
start: function () { console.log('Off I go!'); },
finish: function () { console.log('And I\'m done!'); }
});
browserify index.js > browserified.js
Then simply include shifty-browserify-example/browserified.js
in a page and you should see the error.
Cool, thanks for the info. I will debug this when I have some time, hopefully later today.
This should be fixed in 1.3.5, let me know how it goes. Thanks again for reporting this!
No more issues for me :) Thanks!
When requiring shifty via browserify, the
root
object is set as an empty object. WhenTweenable.prototype.stop
is called, shifty throws