gameforge - v0.1.12
    Preparing search index...

    Class BlobResourceAbstract

    Resource that fetches texture data over the network and stores it in a buffer.

    PIXI

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _height: number

    Internal height of the resource.

    _width: number

    Internal width of the resource.

    buffer: null | ViewableBuffer

    The viewable buffer on the data.

    The data of this resource.

    destroyed: boolean

    If resource has been destroyed.

    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.

    loaded: boolean
    origin: null | string

    The URL of the texture file.

    src: string

    The url of the resource

    unpackAlignment: 1 | 2 | 4 | 8

    The alignment of the rows in the data.

    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

    • Bind to a parent BaseTexture

      Parameters

      Returns void

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

      Returns void

    • Destroy and don't use after this.

      Returns void

    • Parameters

      • _data: ArrayBuffer

      Returns void

    • 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
    • Unbind to a parent BaseTexture

      Parameters

      Returns void

    • Has been updated trigger event.

      Returns void

    • Upload the texture to the GPU.

      Parameters

      Returns boolean

      • true is success
    • Used to auto-detect the type of resource.

      Parameters

      • source: unknown

        The source object

      Returns source is BufferType

      true if buffer source