Options
All
  • Public
  • Public/Protected
  • All
Menu

External module loader

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

LoadCompleteCallback

LoadCompleteCallback: function

Type declaration

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

      • error: Error | null | undefined
      • Optional asset: T

      Returns void

LoadProgressCallback

LoadProgressCallback: function

Type declaration

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

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

      Returns void

Variables

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: "AssetLoader" = "AssetLoader"

Let ID

ID: string = "Loader"

Const ID

ID: "Downloader" = "Downloader"

Const ItemState

ItemState: any = LoadingItems.ItemState

Let MissingClass

MissingClass: any

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 _canvasContext

_canvasContext: CanvasRenderingContext2D | null = null

Let _checkedIds

_checkedIds: Array<string> = []

Let fontFaces

fontFaces: object

Type declaration

Let _intervalId

_intervalId: number = -1

Let _loadingFonts

_loadingFonts: Array<IFontLoadHandle> = []

Let _noCacheRex

_noCacheRex: RegExp = /\?/

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 _testString

_testString: "BES bswy:->@123丁ぁᄁ" = "BES bswy:->@123丁ぁᄁ"

Let _timeout

_timeout: number = 3000

Let _tmpInfo

_tmpInfo: any = null

Const assetTables

assetTables: any = Object.create(null)

Const formatSupport

formatSupport: any = __audioSupport.format

Let globalUnpackers

globalUnpackers: object

Type declaration

Const loader

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

Let packIndices

packIndices: object

Type declaration

Let plistParser

plistParser: PlistParser = new PlistParser()
type

{PlistParser}

name

plistParser A Plist Parser

Let reusedArray

reusedArray: Array<any> = []

Let useNativeCheck

useNativeCheck: (Anonymous function) = (function () {let nativeCheck;return function () {if (!nativeCheck) {if (!!window.FontFace) {var match = /Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var safari10Match = /OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent) && /Apple/.exec(window.navigator.vendor);if (match) {nativeCheck = parseInt(match[1], 10) > 42;}else if (safari10Match) {nativeCheck = false;}else {nativeCheck = true;}} else {nativeCheck = false;}}return nativeCheck;}})()

Let uuidToPack

uuidToPack: object

Type declaration

Functions

checkFontLoaded

  • _checkFontLoaded(): void

doLoadNewPack

  • doLoadNewPack(uuid: any, packUuid: any, packedJson: any): any

doPreload

  • doPreload(packUuid: any, packJson: any): void

getFontFamily

  • getFontFamily(fontHandle: any): any

loadNewPack

  • loadNewPack(uuid: any, packUuid: any, callback: any): void

parseUrlParam

  • parseUrlParam(url: any): undefined | object

selectLoadedPack

  • selectLoadedPack(packUuids: any): any

autoRelease

  • autoRelease(oldSceneAssets: any, nextSceneAssets: any, persistNodes: any): void

canDeferredLoad

  • canDeferredLoad(asset: any, item: any, isScene: any): any

checkCircleReference

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

createItem

  • createItem(id: any, queueId: any): object
  • Parameters

    • id: any
    • queueId: any

    Returns object

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

decompressJson

  • decompressJson(data: any, keys: any): null

default

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

doCheckCouldRelease

  • doCheckCouldRelease(releasedKey: any, refOwnerItem: any, caches: any): void

downloadAudio

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

downloadBinary

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

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

error

  • error(uuid: any, packUuid: any): Error

flow

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

getDependsRecursively

  • getDependsRecursively(key: any): string[]

getItemDesc

  • getItemDesc(item: any): string

getResWithUrl

  • getResWithUrl(res: any): any
  • 通过使用 uuid 查找资源的真实 url 来转换资源,否则将使用 uuid 或原始 url 作为其 url
    所以可以保证结果中会有 url

    Parameters

    • res: any

    Returns any

getUuidFromURL

  • getUuidFromURL(url: any): any

getXMLHttpRequest

  • getXMLHttpRequest(): any

initPacks

  • initPacks(packs: any): void

isIdValid

  • isIdValid(id: any): boolean

isMatchByWord

  • isMatchByWord(path: any, test: any): boolean

isSceneObj

  • isSceneObj(json: any): boolean

load

  • load(item: any, callback: any): any
  • Parameters

    • item: any
    • callback: any

    Returns any

    When returns undefined, the requested item is not in any pack, when returns null, the item is in a loading pack, when item json exists, it will return the result directly.

loadAudioAsAsset

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

loadBinary

  • loadBinary(item: any): any

loadDepends

  • loadDepends(pipeline: any, item: any, asset: any, depends: any, callback: any): void

loadDomAudio

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

loadFont

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

loadImage

  • loadImage(item: any): any

loadJSON

  • loadJSON(item: any): any

loadNothing

  • loadNothing(): null

loadPKMTex

  • loadPKMTex(item: any): Error | object

loadPVRTex

  • loadPVRTex(item: any): Error | object

loadPlist

  • loadPlist(item: any): any

loadUuid

  • loadUuid(item: any, callback: any): void | Error

loadWebAudio

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

nativeCheckFontLoaded

  • nativeCheckFontLoaded(start: any, font: any, callback: any): void

parseDepends

  • parseDepends(item: any, asset: any, tdInfo: any, deferredLoadRawAssetsInRuntime: any): any

parseDepends

  • parseDepends(key: any, parsed: any): void

readBEUint16

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

skip

  • skip(): null

urlAppendTimestamp

  • urlAppendTimestamp(url: any): any

visitAsset

  • visitAsset(asset: any, excludeMap: any): void

visitComponent

  • visitComponent(comp: any, excludeMap: any): void

visitNode

  • visitNode(node: any, excludeMap: any): void

Object literals

Const info

info: object

raw

raw: boolean = false

url

url: null = null

Let defaultMap

defaultMap: object

ExportJson

ExportJson: loadJSON = loadJSON

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

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
class

url

static

Private _rawAssets

_rawAssets: string = ""

The base url of raw assets.

property

{Object} _rawAssets

readonly

init

  • init(assets: any): void

normalize

  • normalize(url: any): any

raw

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

    Parameters

    • url: any

    Returns any

Generated using TypeDoc