Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Resource

Hierarchy

  • Resource

Index

Constructors

constructor

  • Parameters

    • name: string
    • url: string | string[]
    • Optional options: LoaderOptions

    Returns Resource

Properties

Protected _boundComplete

_boundComplete: Function

Protected _boundOnError

_boundOnError: Function

Protected _boundOnProgress

_boundOnProgress: Function

Protected _boundXdrOnTimeout

_boundXdrOnTimeout: Function

Protected _boundXhrOnAbort

_boundXhrOnAbort: Function

Protected _boundXhrOnError

_boundXhrOnError: Function

Protected _boundXhrOnLoad

_boundXhrOnLoad: Function

Protected _dequeue

_dequeue: Function

Protected _flags

_flags: number

Protected _onLoadBinding

_onLoadBinding: Function

children

children: Resource[]

crossOrigin

crossOrigin: boolean | string

data

data: any

error

error: Error

extension

extension: string

isComplete

isComplete: boolean

isDataUrl

isDataUrl: boolean

isLoading

isLoading: boolean

loadType

loadType: number

metadata

metadata: any

name

name: string

onAfterMiddleware

onAfterMiddleware: MiniSignal

onComplete

onComplete: MiniSignal

onProgress

onProgress: MiniSignal

onStart

onStart: MiniSignal

progressChunk

progressChunk: number

spineAtlas

spineAtlas: any

spineData

spineData: any

texture

texture: Texture

Optional textures

type

type: number

url

url: string

xhr

xhr: XMLHttpRequest | null

xhrType

xhrType: string

Static EMPTY_GIF

EMPTY_GIF: string

Static LOAD_TYPE

LOAD_TYPE: object

Type declaration

  • AUDIO: number
  • IMAGE: number
  • VIDEO: number
  • XHR: number

Static STATUS_FLAGS

STATUS_FLAGS: object

Type declaration

  • COMPLETE: number
  • DATA_URL: number
  • LOADING: number
  • NONE: number

Static TYPE

TYPE: object

Type declaration

  • AUDIO: number
  • IMAGE: number
  • JSON: number
  • TEXT: number
  • UNKNOWN: number
  • VIDEO: number
  • XML: number

Static XHR_RESPONSE_TYPE

XHR_RESPONSE_TYPE: object

Type declaration

  • BLOB: string
  • BUFFER: string
  • DEFAULT: string
  • DOCUMENT: string
  • JSON: string
  • TEXT: string

Methods

Protected _createSource

  • _createSource(type: string, url: string, mime?: string): HTMLSourceElement
  • Parameters

    • type: string
    • url: string
    • Optional mime: string

    Returns HTMLSourceElement

Protected _determineCrossOrigin

  • _determineCrossOrigin(url: string, loc: any): string
  • Parameters

    • url: string
    • loc: any

    Returns string

Protected _determineLoadType

  • _determineLoadType(): number
  • Returns number

Protected _determineXhrType

  • _determineXhrType(): number
  • Returns number

Protected _getExtension

  • _getExtension(): string
  • Returns string

Protected _getMimeXhrType

  • _getMimeXhrType(type: number): string
  • Parameters

    • type: number

    Returns string

Protected _hasFlag

  • _hasFlag(flag: number): boolean
  • Parameters

    • flag: number

    Returns boolean

Protected _loadElement

  • _loadElement(type: string): void
  • Parameters

    • type: string

    Returns void

Protected _loadSourceElement

  • _loadSourceElement(type: string): void
  • Parameters

    • type: string

    Returns void

Protected _loadXdr

  • _loadXdr(): void
  • Returns void

Protected _loadXhr

  • _loadXhr(): void
  • Returns void

Protected _onError

  • _onError(event?: any): void
  • Parameters

    • Optional event: any

    Returns void

Protected _onProgress

  • _onProgress(event?: any): void
  • Parameters

    • Optional event: any

    Returns void

Protected _setFlag

  • _setFlag(flag: number, value: boolean): void
  • Parameters

    • flag: number
    • value: boolean

    Returns void

Protected _xdrOnTimeout

  • _xdrOnTimeout(): void
  • Returns void

Protected _xhrOnAbort

  • _xhrOnAbort(): void
  • Returns void

Protected _xhrOnError

  • _xhrOnError(): void
  • Returns void

Protected _xhrOnLoad

  • _xhrOnLoad(): void
  • Returns void

abort

  • abort(message?: string): void
  • Parameters

    • Optional message: string

    Returns void

complete

  • complete(): void
  • Returns void

load

  • load(cb?: Function): void
  • Parameters

    • Optional cb: Function

    Returns void

Static setExtensionLoadType

  • setExtensionLoadType(extname: string, loadType: number): void
  • Parameters

    • extname: string
    • loadType: number

    Returns void

Static setExtensionXhrType

  • setExtensionXhrType(extname: string, xhrType: string): void
  • Parameters

    • extname: string
    • xhrType: string

    Returns void

Generated using TypeDoc