Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Downloader

Constructor of Downloader, you can pass custom supported types.

method

constructor

param

Custom supported types with corresponded handler

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

Hierarchy

  • Downloader

Implements

Index

Constructors

constructor

Properties

Private _curConcurrent

_curConcurrent: number = 0

Private _loadQueue

_loadQueue: Array<IDownloadItem> = []

Private subpackages

subpackages: object

Type declaration

async

async: boolean = true

Private extMap

extMap: object

id

id: string = ID

pipeline

pipeline: Pipeline | null = null

Static ID

ID: string = ID

Static PackDownloader

PackDownloader: "E:/workCode/editor-3d/resources/3d/engine/cocos/core/load-pipeline/pack-downloader" = PackDownloader

Methods

handleLoadQueue

  • _handleLoadQueue(): void

addHandlers

  • addHandlers(extMap: any): void
  • 添加自定义支持的类型处理程序或修改现有的类型处理程序。

    method

    addHandlers

    Parameters

    • extMap: any

      Custom supported types with corresponded handler

    Returns void

handle

  • handle(item: any, callback: any): undefined

loadSubpackage

  • loadSubpackage(name: any, completeCallback: any): void

Generated using TypeDoc