A wrapper for data so that it can be used and uploaded by WebGL

Memberof

PIXI

Constructors

  • Parameters

    • Optional data: IArrayBuffer

      the data to store in the buffer.

    • Optional _static: boolean

      true for static buffer

    • Optional index: boolean

      true for index buffer

    Returns Buffer

Properties

_updateID: number

The data in the buffer, as a typed array

disposeRunner: Runner<any, any[]>
id: number
static: boolean

The type of buffer this is, one of:

  • ELEMENT_ARRAY_BUFFER - used as an index buffer
  • ARRAY_BUFFER - used as an attribute buffer
  • UNIFORM_BUFFER - used as a uniform buffer (if available)

Accessors

  • get index(): boolean
  • Returns boolean

  • set index(value): void
  • Flags whether this is an index buffer.

    Index buffers are of type ELEMENT_ARRAY_BUFFER. Note that setting this property to false will make the buffer of type ARRAY_BUFFER.

    For backwards compatibility.

    Parameters

    • value: boolean

    Returns void

Methods

  • Destroys the buffer.

    Returns void

  • Disposes WebGL resources that are connected to this geometry.

    Returns void

  • Flags this buffer as requiring an upload to the GPU.

    Parameters

    • Optional data: number[] | IArrayBuffer

      the data to update in the buffer.

    Returns void

  • Helper function that creates a buffer based on an array or TypedArray

    Parameters

    • data: number[] | IArrayBuffer

      the TypedArray that the buffer will store. If this is a regular Array it will be converted to a Float32Array.

    Returns Buffer

    • A new Buffer based on the data provided.

Generated using TypeDoc