Options
All
  • Public
  • Public/Protected
  • All
Menu

Module assetmanager

Index

Type aliases

DownloadHandler

DownloadHandler: (url: string, opitons: IDownloadParseOptions, onComplete: CompleteCallback) => void

Type declaration

    • (url: string, opitons: IDownloadParseOptions, onComplete: CompleteCallback): void
    • Parameters

      • url: string
      • opitons: IDownloadParseOptions
      • onComplete: CompleteCallback

      Returns void

IAsyncPipe

IAsyncPipe: (task: Task, done: CompleteCallbackNoData) => void

Type declaration

    • (task: Task, done: CompleteCallbackNoData): void
    • Parameters

      • task: Task
      • done: CompleteCallbackNoData

      Returns void

IPipe

ISyncPipe

ISyncPipe: (task: Task) => Error | void

Type declaration

    • (task: Task): Error | void
    • Parameters

      Returns Error | void

ParseHandler

ParseHandler: (file: any, options: IDownloadParseOptions, onComplete: CompleteCallback) => void

Type declaration

    • (file: any, options: IDownloadParseOptions, onComplete: CompleteCallback): void
    • Parameters

      • file: any
      • options: IDownloadParseOptions
      • onComplete: CompleteCallback

      Returns void

TaskCompleteCallback

TaskCompleteCallback: (err: Error | null | undefined, data: any) => void

Type declaration

    • (err: Error | null | undefined, data: any): void
    • Parameters

      • err: Error | null | undefined
      • data: any

      Returns void

TaskErrorCallback

TaskErrorCallback: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

TaskProgressCallback

TaskProgressCallback: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

Unpacker

Unpacker: (packUuid: string[], data: any, options: IDownloadParseOptions, onComplete: CompleteCallback) => void

Type declaration

    • (packUuid: string[], data: any, options: IDownloadParseOptions, onComplete: CompleteCallback): void
    • Parameters

      • packUuid: string[]
      • data: any
      • options: IDownloadParseOptions
      • onComplete: CompleteCallback

      Returns void

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 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 REGEX

REGEX: RegExp = /^(?:\w+:\/\/|\.+\/).+/

Const downloader

downloader: Downloader = new Downloader()

Const resources

resources: Bundle = new Bundle()
en

resources is a bundle and controls all asset under assets/resources

zh

resources 是一个 bundle,用于管理所有在 assets/resources 下的资源

Functions

createAudioClip

  • createAudioClip(id: string, data: HTMLAudioElement | AudioBuffer, options: IDownloadParseOptions, onComplete: CompleteCallback<AudioClip>): void

createVideoClip

  • createVideoClip(id: string, data: HTMLVideoElement, options: IDownloadParseOptions, onComplete: CompleteCallback<VideoClip>): void

Const downloadArrayBuffer

  • downloadArrayBuffer(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback): void

downloadArrayBuffer

  • downloadArrayBuffer(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback): void

downloadAudio

  • downloadAudio(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback): void

Const downloadBlob

  • downloadBlob(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback): void

Const downloadBundle

  • downloadBundle(nameOrUrl: string, options: IBundleOptions, onComplete: CompleteCallback): void

downloadDomAudio

  • downloadDomAudio(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback<HTMLAudioElement>): void

Const downloadImage

  • downloadImage(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback): void

Const downloadJson

  • downloadJson(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback<Record<string, any>>): void

Const downloadText

  • downloadText(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback): void

downloadVideo

  • downloadVideo(url: string, options: IDownloadParseOptions, onComplete: CompleteCallback): void

getASTCFormat

readBEUint16

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

Generated using TypeDoc