Options
All
  • Public
  • Public/Protected
  • All
Menu

A resource that contains a number of sources.

memberof

PIXI

Hierarchy

Index

Constructors

constructor

  • Parameters

    • source: number | any[]

      Number of items in array or the collection of image URLs to use. Can also be resources, image elements, canvas, etc.

    • Optional options: ISize

    Returns ArrayResource

Properties

Protected _height

_height: number

Protected _width

_width: number

baseTexture

destroyed

destroyed: boolean

internal

internal: boolean

itemDirtyIds

itemDirtyIds: number[]

items

Readonly length

length: number

Protected onError

onError: Runner

Protected onResize

onResize: Runner

Protected onUpdate

onUpdate: Runner

Accessors

height

  • get height(): number
  • The height of the resource.

    member

    {number}

    readonly

    Returns number

valid

  • get valid(): boolean
  • Has been validated

    readonly
    member

    {boolean}

    Returns boolean

width

  • get width(): number
  • The width of the resource.

    member

    {number}

    readonly

    Returns number

Methods

addBaseTextureAt

addResourceAt

bind

destroy

  • destroy(): void
  • Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.

    Returns void

dispose

  • dispose(): void
  • Destroy this BaseImageResource

    override

    Returns void

Protected initFromArray

  • used from ArrayResource and CubeResource constructors

    Parameters

    • resources: any[]

      Can be resources, image elements, canvas, etc. , length should be same as constructor length

    • Optional options: IAutoDetectOptions

    Returns void

load

  • Load all the resources simultaneously

    override

    Returns Promise<ArrayResource>

    When load is resolved

resize

  • resize(width: number, height: number): void
  • Trigger a resize event

    Parameters

    • width: number

      X dimension

    • height: number

      Y dimension

    Returns void

style

unbind

update

  • update(): void
  • Has been updated trigger event

    Returns void

upload

Static test

  • test(_source: unknown, _extension?: string): boolean
  • Abstract, used to auto-detect resource type

    static

    Parameters

    • _source: unknown
    • Optional _extension: string

    Returns boolean

Generated using TypeDoc