Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Downloader

{{loader}} 中的下载管线,可以下载下列类型的文件:

  1. Text
  2. Image
  3. Script
  4. Audio
  5. Binary 所有未知类型会被当做文本来下载,也可以通过 {{loader.addDownloadHandlers}} 来定制下载行为

Hierarchy

  • Downloader

Implements

Index

Constructors

constructor

Properties

Private _curConcurrent

_curConcurrent: number = 0

Private _loadQueue

_loadQueue: Array<IDownloadItem> = []

Private subPackages

subPackages: {}

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-1.2/resources/3d/engine/cocos/core/load-pipeline/pack-downloader" = PackDownloader

Methods

handleLoadQueue

  • _handleLoadQueue(): void

addHandlers

  • addHandlers(extMap: Map<string, Function>): void
  • 添加自定义支持的类型处理程序或修改现有的类型处理程序。

    Parameters

    • extMap: Map<string, Function>

      Custom supported types with corresponded handler

    Returns void

handle

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

loadSubpackage

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

    Parameters

    • name: string

      Sub package name

    • Optional completeCallback: Function

      Callback invoked when sub package loaded

    Returns void

setSubPackages

  • setSubPackages(subPackages: any): void

Generated using TypeDoc