Pipeline.Loader Class

Module: cc

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

  1. Images
  2. JSON
  3. Plist
  4. Audio
  5. Font
  6. 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:261
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:281
Parameters
  • extMap Object Custom supported types with corresponded handler

results matching ""

    No results matching ""