preloadjs
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/preloadjs package

1.0.1 • Public • Published

PreloadJS

PreloadJS is a library to make working with asset preloading easier. It provides a consistent API for loading different file types, automatic detection of XHR (XMLHttpRequest) availability with a fallback to tag-base loading, composite progress events, and a plugin model to assist with preloading in other libraries such as SoundJS.

Example

var queue = new createjs.LoadQueue(false);
queue.on("fileload", handleFileComplete);
queue.loadFile('http://createjs.com/assets/images/png/createjs-badge-dark.png');
function handleFileComplete(event) {
    document.body.appendChild(event.result);
}

Support and Resources

Built by gskinner.com, and is released for free under the MIT license, which means you can use it for almost any purpose (including commercial projects). We appreciate credit where possible, but it is not a requirement.

Classes

LoadQueue The main class that manages all preloading. Instantiate a LoadQueue instance, load a file or manifest, and track progress and complete events. Check out the docs for more information.

Dependents (2)

Package Sidebar

Install

npm i preloadjs

Weekly Downloads

235

Version

1.0.1

License

MIT

Last publish

Collaborators

  • wdamien
  • lannymcnie