MM56 / MM.Loader

Web worker preloader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MM.Loader

Most of the time, single threaded JavaScript preloading is just fine. But what happens when you have some complex animations during a preload ? If it runs on the UI thread, it’ll causes some troubles like freeze. MM.Loader creates a Web Worker to preload your assets with XHR and simply dispatches the response. MM.Loader was inspired by PreloadJS.

PreloadJS makes preloading assets & getting aggregate progress events easier in JavaScript. It uses XHR2 when available, and falls back to tag-based loading when not.

Demo

This demo simply preloads a large asset (16MB) to check if it causes some troubles during animations.

Compatibility

experimental

Tested in Chrome. Check on Can I use if your browser supports Web Workers.

About

Web worker preloader


Languages

Language:JavaScript 73.4%Language:HTML 26.6%