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

  • Parameters

    • Optional extMap: any

    Returns Downloader

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
  • Returns 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
  • Parameters

    • item: any
    • callback: any

    Returns undefined

loadSubpackage

  • loadSubpackage(name: any, completeCallback: any): void
  • 通过子包名加载子包代码。

    method

    loadSubpackage

    Parameters

    • name: any

      Subpackage name

    • completeCallback: any

    Returns void

Generated using TypeDoc