modified Sprite.js

pull request to issue #6