modified Sprite.js