Pipeline.Loader 类型

模块: cc父模块: cc

The loader pipe, it can load several types of files:

  • Images
  • JSON
  • Plist
  • Audio
  • Font
  • Cocos Creator sceneIt 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.

metadescription
定义于cocos2d/core/load-pipeline/loader.js:218
参数列表
  • extMap Object Custom supported types with corresponded handler
示例
  1. var loader = new Loader({
  2. // This will match all url with `.scene` extension or all url with `scene` type
  3. 'scene' : function (url, callback) {}
  4. });
addHandlers

Add custom supported types handler or modify existing type handler.

metadescription
定义于cocos2d/core/load-pipeline/loader.js:238
参数列表
  • extMap Object Custom supported types with corresponded handler