Options
All
  • Public
  • Public/Protected
  • All
Menu

Module loader

Index

Type aliases

LoadCompleteCallback

LoadCompleteCallback<T>: (error: Error | null, asset: T) => void

Type parameters

  • T

Type declaration

    • (error: Error | null, asset: T): void
    • Parameters

      • error: Error | null
      • asset: T

      Returns void

LoadDirCompleteCallback

LoadDirCompleteCallback<T>: (error: Error | null, asset: T[], urls: string[]) => void

Type parameters

  • T

Type declaration

    • (error: Error | null, asset: T[], urls: string[]): void
    • Parameters

      • error: Error | null
      • asset: T[]
      • urls: string[]

      Returns void

LoadProgressCallback

LoadProgressCallback: (completedCount: number, totalCount: number, item: any) => void

Type declaration

    • (completedCount: number, totalCount: number, item: any): void
    • Parameters

      • completedCount: number
      • totalCount: number
      • item: any

      Returns void

Variables

Const AudioFmts

AudioFmts: string[] = ['.mp3', '.ogg', '.wav', '.m4a']

Const ImageFmts

ImageFmts: string[] = ['.png', '.jpg', '.bmp', '.jpeg', '.gif', '.ico', '.tiff', '.webp', '.image', '.pvr', '.pkm', '.astc']

Const _autoRelease

_autoRelease: _autoRelease = releaseManager._autoRelease

Const loader

loader: CCLoader = new CCLoader()
deprecated

since 3.0, loader is deprecated, please use assetManager instead

Const url

url: {}
static
deprecated

since v3.0 cc.url is deprecated

Type declaration

Functions

GetTrue

  • GetTrue(): boolean

Object literals

Const AssetLibrary

AssetLibrary: object

/** 管理项目中加载/卸载资源的资源库。

static
deprecated

since v3.0 AssetLibrary is deprecated, please backup your project and upgrade to assetManager

init

  • init(options: Record<string, any>): void
  • en

    init the asset library

    zh

    初始化 AssetLibrary。

    method

    init

    deprecated

    AssetLibrary.init is deprecated, please use assetManager.init instead

    Parameters

    • options: Record<string, any>

    Returns void

loadAsset

  • loadAsset(uuid: string, callback: CompleteCallback, options?: any): void
  • 加载资源。

    deprecated

    since v3.0 AssetLibrary.loadAsset is deprecated, please use assetManager.loadAny instead

    Parameters

    • uuid: string
    • callback: CompleteCallback

      加载完成后执行的回调函数。

    • Optional options: any

    Returns void

Const md5Pipe

md5Pipe: object

transformURL

  • transformURL(url: string): string

Generated using TypeDoc