Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Loader

{{loader}} 中的解析加载管线,可以解析加载下列类型的资源:

  1. Images
  2. JSON
  3. Plist
  4. Audio
  5. Font
  6. Binary
  7. Cocos Assets 所有未知类型不会被处理,也可以通过 {{loader.addLoadHandlers}} 来定制加载行为

Hierarchy

  • Loader

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • newLoader(extMap?: any): Loader

Properties

async

async: boolean = true

Private extMap

extMap: object

id

id: string = ID

pipeline

pipeline: Pipeline | null = null

Static ID

ID: string = ID

Methods

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): any

Generated using TypeDoc