Cocos Creator API

1.5.x

Cocos Creator is the game engine for the future.

Pipeline.Downloader

Module: cc
Parent Module: cc

The downloader pipe, it can download several types of files:

  1. Text
  2. Image
  3. Script
  4. Audio
  5. Assets All unknown type will be downloaded as plain text. You can pass custom supported types in the constructor.

Methods

constructor
(
  • extMap
)

Constructor of Downloader, you can pass custom supported types.

name type description
extMap Object

Custom supported types with corresponded handler

examples:

var downloader = new Downloader({
     // This will match all url with .scene extension or all url with scene type
     'scene' : function (url, callback) {}
 });

addHandlers
(
  • extMap
)

Add custom supported types handler or modify existing type handler.

name type description
extMap Object

Custom supported types with corresponded handler

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index