sprite.js implementation without node.js