Class AbstractMultiResourceAbstract

Resource that can manage several resource (items) inside. All resources need to have the same pixel size. Parent class for CubeResource and ArrayResource

Memberof

PIXI

Hierarchy (view full)

Constructors

Properties

Bound baseTexture, there can only be one.

destroyed: boolean

If resource has been destroyed.

Default

false
internal: boolean

true if resource is created by BaseTexture useful for doing cleanup with BaseTexture destroy and not cleaning up resources that were created externally.

itemDirtyIds: number[]

Dirty IDs for each part.

Collection of partial baseTextures that correspond to resources.

length: number

Number of elements in array.

src: string

The url of the resource

Accessors

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

    Returns number

  • get valid(): boolean
  • Has been validated

    Returns boolean

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

    Returns number

Methods

  • Set a baseTexture by ID

    Parameters

    Returns this

    • Instance for chaining
  • Set a resource by ID

    Parameters

    • resource: Resource
    • index: number

      Zero-based index of resource to set

    Returns this

    • Instance for chaining
  • Call when destroying resource, unbind any BaseTexture object before calling this method, as reference counts are maintained internally.

    Returns void

  • Destroy this BaseImageResource.

    Returns void

  • Load all the resources simultaneously

    Returns Promise<AbstractMultiResource>

    • When load is resolved
  • Trigger a resize event

    Parameters

    • width: number

      X dimension

    • height: number

      Y dimension

    Returns void

  • Set the style, optional to override

    Parameters

    Returns boolean

    • true is success
  • Has been updated trigger event.

    Returns void

  • Uploads the texture or returns false if it cant for some reason. Override this.

    Parameters

    Returns boolean

    • true is success
  • Abstract, used to auto-detect resource type.

    Parameters

    • _source: unknown

      The source object

    • Optional _extension: string

      The extension of source, if set

    Returns boolean

Generated using TypeDoc