Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CreateJS/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.
https://github.com/CreateJS/PreloadJS
Last synced: about 1 month ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/CreateJS/PreloadJS
- Owner: CreateJS
- License: mit
- Created: 2012-02-21T18:48:33.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2023-07-24T16:54:01.000Z (over 1 year ago)
- Last Synced: 2024-10-23T09:48:35.338Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://createjs.com/
- Size: 35.4 MB
- Stars: 2,875
- Watchers: 124
- Forks: 763
- Open Issues: 66
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-game-engine-dev - PreloadJS - Preloading assets w/progress events. (Libraries / JavaScript)
- awesome-star-libs - CreateJS / PreloadJS
README
# 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](http://www.createjs.com/soundjs/).## Example
```javascript
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
* Find examples and more information at the [PreloadJS web site](http://www.preloadjs.com/)
* Read the [documentation](http://createjs.com/docs/preloadjs/)
* Discuss, share projects, and interact with other users on [reddit](http://www.reddit.com/r/createjs/).
* Ask technical questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/preloadjs).
* File verified bugs or formal feature requests using Issues on [GitHub](https://github.com/createjs/PreloadJS/issues).
* Have a look at the included [examples](https://github.com/CreateJS/PreloadJS/tree/master/examples) and
[API documentation](http://createjs.com/docs/preloadjs/) for more in-depth information.Built by [gskinner.com](http://www.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](http://createjs.com/docs/preloadjs/) for more information.