Options
All
  • Public
  • Public/Protected
  • All
Menu

Module loader

Index

Variables

Const ASTC_HEADER_BLOCKDIM

ASTC_HEADER_BLOCKDIM: 3 = 3

Const ASTC_HEADER_LENGTH

ASTC_HEADER_LENGTH: 16 = 16

Const ASTC_HEADER_MAGIC

ASTC_HEADER_MAGIC: 4 = 4

Const ASTC_HEADER_SIZE_X_BEGIN

ASTC_HEADER_SIZE_X_BEGIN: 7 = 7

Const ASTC_HEADER_SIZE_Y_BEGIN

ASTC_HEADER_SIZE_Y_BEGIN: 10 = 10

Const ASTC_HEADER_SIZE_Z_BEGIN

ASTC_HEADER_SIZE_Z_BEGIN: 13 = 13

Const ASTC_MAGIC

ASTC_MAGIC: 1554098963 = 1554098963

Const ETC1_RGB_NO_MIPMAPS

ETC1_RGB_NO_MIPMAPS: 0 = 0

Const ETC2_RGBA_NO_MIPMAPS

ETC2_RGBA_NO_MIPMAPS: 3 = 3

Const ETC2_RGB_NO_MIPMAPS

ETC2_RGB_NO_MIPMAPS: 1 = 1

Const ETC_PKM_ENCODED_HEIGHT_OFFSET

ETC_PKM_ENCODED_HEIGHT_OFFSET: 10 = 10

Const ETC_PKM_ENCODED_WIDTH_OFFSET

ETC_PKM_ENCODED_WIDTH_OFFSET: 8 = 8

Const ETC_PKM_FORMAT_OFFSET

ETC_PKM_FORMAT_OFFSET: 6 = 6

Const ETC_PKM_HEADER_SIZE

ETC_PKM_HEADER_SIZE: 16 = 16

Const ETC_PKM_HEIGHT_OFFSET

ETC_PKM_HEIGHT_OFFSET: 14 = 14

Const ETC_PKM_WIDTH_OFFSET

ETC_PKM_WIDTH_OFFSET: 12 = 12

Const ExtnameRegex

ExtnameRegex: RegExp = /(\.[^.\n\\/]*)$/

Const ID

ID: "MD5Pipe" = "MD5Pipe"

Const ID

ID: "Downloader" = "Downloader"

Let ID

ID: string = "Loader"

Const ID

ID: "AssetLoader" = "AssetLoader"

Const ItemState

ItemState: any = LoadingItems.ItemState

Const PVR_HEADER_FORMAT

PVR_HEADER_FORMAT: 2 = 2

Const PVR_HEADER_HEIGHT

PVR_HEADER_HEIGHT: 6 = 6

Const PVR_HEADER_LENGTH

PVR_HEADER_LENGTH: 13 = 13

Const PVR_HEADER_MAGIC

PVR_HEADER_MAGIC: 0 = 0

Const PVR_HEADER_METADATA

PVR_HEADER_METADATA: 12 = 12

Const PVR_HEADER_MIPMAPCOUNT

PVR_HEADER_MIPMAPCOUNT: 11 = 11

Const PVR_HEADER_WIDTH

PVR_HEADER_WIDTH: 7 = 7

Const PVR_MAGIC

PVR_MAGIC: 55727696 = 55727696

Const UuidRegex

UuidRegex: RegExp = /.*[/\\][0-9a-fA-F]{2}[/\\]([0-9a-fA-F-@]{8,}).*/

Const _POOL_MAX_LENGTH

_POOL_MAX_LENGTH: 10 = 10

Const __audioSupport

__audioSupport: any = sys.__audioSupport

Let _checkedIds

_checkedIds: Array<string> = []

Let _pool

_pool: Array<LoadingItems> = []

Let _qid

_qid: number = (0|(Math.random()*998))

Let _queueDeps

_queueDeps: any = createMap(true)

Let _queues

_queues: any = createMap(true)

Const _sharedList

_sharedList: any = []

Const _sharedResources

_sharedResources: any = []

Const assetTables

assetTables: any = Object.create(null)

Const formatSupport

formatSupport: any = __audioSupport.format

Const loader

loader: CCLoader = legacyCC.loader = new CCLoader()

Singleton object of CCLoader

Let reusedArray

reusedArray: Array<any> = []

Functions

parseUrlParam

  • parseUrlParam(url: any): undefined | {}

checkCircleReference

  • checkCircleReference(owner: any, item: IItem, recursiveCall?: any): boolean

createItem

  • createItem(id: any, queueId: any): { complete: boolean; content: null; deps: null; error: null; id: any; isScene: any; queueId: any; rawUrl: undefined; states: {}; type: string; url: any; urlParam: undefined | {} }
  • Parameters

    • id: any
    • queueId: any

    Returns { complete: boolean; content: null; deps: null; error: null; id: any; isScene: any; queueId: any; rawUrl: undefined; states: {}; type: string; url: any; urlParam: undefined | {} }

    • complete: boolean
    • content: null
    • deps: null
    • error: null
    • id: any
    • isScene: any
    • queueId: any
    • rawUrl: undefined
    • states: {}
    • type: string
    • url: any
    • urlParam: undefined | {}

downloadAudio

  • downloadAudio(item: any, callback: any): undefined | Error

downloadImage

  • downloadImage(item: any, callback: any, isCrossOrigin: any, img: any): any

downloadScript

  • downloadScript(item: any, callback: any, isAsync?: any): void

downloadUuid

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

flow

  • flow(pipe: any, item: any): void

getASTCFormat

getResWithUrl

  • getResWithUrl(res: any): any

getUuidFromURL

  • getUuidFromURL(url: any): any

getXMLHttpRequest

  • getXMLHttpRequest(): any

isIdValid

  • isIdValid(id: any): boolean

loadASTCTex

  • loadASTCTex(item: any): Error | { _compressed: boolean; _data: Uint8Array; format: PixelFormat; height: number; width: number }

loadAudioAsAsset

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

loadBinary

  • loadBinary(item: any): any

loadDomAudio

  • loadDomAudio(item: any, callback: any): void

loadImage

  • loadImage(item: any): any

loadJSON

  • loadJSON(item: any): any

loadNothing

  • loadNothing(): null

loadPKMTex

  • loadPKMTex(item: any): Error | { _compressed: boolean; _data: Uint8Array; height: number; width: number }

loadPVRTex

  • loadPVRTex(item: any): Error | { _compressed: boolean; _data: Uint8Array; height: number; width: number }

loadPlist

  • loadPlist(item: any): any

loadWebAudio

  • loadWebAudio(item: any, callback: any): void

readBEUint16

  • readBEUint16(header: any, offset: any): number

skip

  • skip(): null

Object literals

Const info

info: object

raw

raw: boolean = false

url

url: null = null

Let defaultMap

defaultMap: object

ExportJson

ExportJson: loadJSON = loadJSON

astc

astc: loadASTCTex = loadASTCTex

bin

bin: loadBinary = loadBinary

binary

binary: loadBinary = loadBinary

bmp

bmp: loadImage = loadImage

default

default: loadNothing = loadNothing

eot

eot: loadFont = loadFont

fire

fire: loadUuid = loadUuid

font

font: loadFont = loadFont

gif

gif: loadImage = loadImage

ico

ico: loadImage = loadImage

image

image: loadImage = loadImage

jpeg

jpeg: loadImage = loadImage

jpg

jpg: loadImage = loadImage

json

json: loadJSON = loadJSON

m4a

m4a: loadAudioAsAsset = loadAudioAsAsset

mp3

mp3: loadAudioAsAsset = loadAudioAsAsset

ogg

ogg: loadAudioAsAsset = loadAudioAsAsset

pkm

pkm: loadPKMTex = loadPKMTex

plist

plist: loadPlist = loadPlist

png

png: loadImage = loadImage

prefab

prefab: loadUuid = loadUuid

pvr

pvr: loadPVRTex = loadPVRTex

scene

scene: loadUuid = loadUuid

svg

svg: loadFont = loadFont

tiff

tiff: loadImage = loadImage

ttc

ttc: loadFont = loadFont

ttf

ttf: loadFont = loadFont

uuid

uuid: loadUuid = loadUuid

wav

wav: loadAudioAsAsset = loadAudioAsAsset

webp

webp: loadImage = loadImage

woff

woff: loadFont = loadFont

Let defaultMap

defaultMap: object

ExportJson

ExportJson: default = downloadText

astc

astc: downloadBinary = downloadBinary

atlas

atlas: default = downloadText

bin

bin: downloadBinary = downloadBinary

binary

binary: downloadBinary = downloadBinary

bmp

bmp: downloadImage = downloadImage

default

default: default = downloadText

eot

eot: skip = skip

fnt

fnt: default = downloadText

font

font: skip = skip

fsh

fsh: default = downloadText

gif

gif: downloadImage = downloadImage

ico

ico: downloadImage = downloadImage

image

image: downloadImage = downloadImage

jpeg

jpeg: downloadImage = downloadImage

jpg

jpg: downloadImage = downloadImage

js

js: downloadScript = downloadScript

json

json: default = downloadText

m4a

m4a: downloadAudio = downloadAudio

mp3

mp3: downloadAudio = downloadAudio

ogg

ogg: downloadAudio = downloadAudio

pkm

pkm: downloadBinary = downloadBinary

plist

plist: default = downloadText

png

png: downloadImage = downloadImage

pvr

pvr: downloadBinary = downloadBinary

svg

svg: skip = skip

tiff

tiff: downloadImage = downloadImage

tmx

tmx: default = downloadText

tsx

tsx: default = downloadText

ttc

ttc: skip = skip

ttf

ttf: skip = skip

txt

txt: default = downloadText

uuid

uuid: downloadUuid = downloadUuid

vsh

vsh: default = downloadText

wav

wav: downloadAudio = downloadAudio

webp

webp: downloadImage = downloadImage

woff

woff: skip = skip

xml

xml: default = downloadText

Let url

url: object
static

Private _rawAssets

_rawAssets: string = ""

The base url of raw assets.

readonly

init

  • init(assets: any): void

normalize

  • normalize(url: any): any

raw

  • raw(url: any): string
  • Returns the url of raw assets, you will only need this if the raw asset is inside the "resources" folder.

    method

    raw

    example

    {@link cocos/core/platform/url/raw.js}

    Parameters

    • url: any

    Returns string

Generated using TypeDoc