HTML5 port from BronyLiveWallpaper