Pipeline.Loader
类型
模块: 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.
索引
方法
constructor
Constructor of Loader, you can pass custom supported types.addHandlers
Add custom supported types handler or modify existing type handler.
Details
方法
constructor
Constructor of Loader, you can pass custom supported types.
meta | description |
---|---|
定义于 | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/load-pipeline/loader.js:123 |
参数列表
extMap
Object Custom supported types with corresponded handler
示例
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 |
---|---|
定义于 | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/load-pipeline/loader.js:143 |
参数列表
extMap
Object Custom supported types with corresponded handler