Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Loader

The loader pipe in {{loader}}, it can load several types of files:

  1. Images
  2. JSON
  3. Plist
  4. Audio
  5. Font
  6. Binary
  7. Cocos Assets It will not interfere with items of unknown type. You can pass custom supported types in the {{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
  • Add custom supported types handler or modify existing type handler.

    Parameters

    • extMap: Map<string, Function>

      Custom supported types with corresponded handler

    Returns void

handle

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

Generated using TypeDoc