Sprite loading working both in native and HTML5