gameforge - v0.1.12
    Preparing search index...

    Class Buffer

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

    PIXI

    Index

    Constructors

    • Parameters

      • Optionaldata: IArrayBuffer

        the data to store in the buffer.

      • Optional_static: boolean

        true for static buffer

      • Optionalindex: boolean

        true for index buffer

      Returns Buffer

    Properties

    _updateID: number

    The data in the buffer, as a typed array

    disposeRunner: Runner
    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: boolean): 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

      • Optionaldata: 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.