Pipeline.Loader
Class
Module: cc
The loader pipe, it can load several types of files:
- Images
- JSON
- Plist
- Audio
- Font
- Cocos Creator scene It will not interfere with items of unknown type. You can pass custom supported types in the constructor.
Index
Methods
constructor
Constructor of Loader, you can pass custom supported types.addHandlers
Add custom supported types handler or modify existing type handler.
Details
Methods
constructor
Constructor of Loader, you can pass custom supported types.
meta | description |
---|---|
Defined in | cocos2d/core/load-pipeline/loader.js:262 |
Parameters
extMap
Object Custom supported types with corresponded handler
Examples
var loader = new Loader({
// This will match all url with `.scene` extension or all url with `scene` type
'scene' : function (url, callback) {}
});
addHandlers
Add custom supported types handler or modify existing type handler.
meta | description |
---|---|
Defined in | cocos2d/core/load-pipeline/loader.js:282 |
Parameters
extMap
Object Custom supported types with corresponded handler