@lakuna/ugl
    Preparing search index...

    Class ElementBuffer

    An array of binary data to be used as an element buffer object. Must contain unsigned integers.

    Hierarchy (View Summary)

    • Buffer<Uint8Array | Uint16Array | Uint32Array>
      • ElementBuffer
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Create a buffer to be used as an element array buffer.

      Parameters

      • context: Context

        The rendering context.

      • Optionaldata:
            | number
            | Uint8Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>
            | Uint32Array<ArrayBufferLike>

        The initial data contained in this buffer or the size of this buffer's data store in bytes.

      • Optionalusage: BufferUsage

        The intended usage of the buffer.

      • Optionaloffset: number

        The index of the element to start reading the initial data at.

      • Optionallength: number

        The length of the initial data to read into the buffer.

      Returns ElementBuffer

      UnsupportedOperationError if a buffer cannot be created.

    Properties

    context: Context

    The rendering context.

    Accessors

    • get data(): Readonly<
          | Uint8Array<ArrayBufferLike>
          | Uint16Array<ArrayBufferLike>
          | Uint32Array<ArrayBufferLike>,
      >

      The data contained in this buffer.

      Returns Readonly<
          | Uint8Array<ArrayBufferLike>
          | Uint16Array<ArrayBufferLike>
          | Uint32Array<ArrayBufferLike>,
      >

    • set data(
          value: Readonly<
              | Uint8Array<ArrayBufferLike>
              | Uint16Array<ArrayBufferLike>
              | Uint32Array<ArrayBufferLike>,
          >,
      ): void

      The data contained in this buffer.

      Parameters

      • value: Readonly<
            | Uint8Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>
            | Uint32Array<ArrayBufferLike>,
        >

      Returns void

    Methods

    • Set the size of this buffer, clearing its data.

      Parameters

      • data: number

        The data to store in this buffer or the size to set this buffer's data store to in bytes.

      • Optionalusage: BufferUsage

        The intended usage of the buffer.

      Returns void

    • Replace all of or update a subset of the data in this buffer.

      Parameters

      • data:
            | VertexBuffer
            | Uint8Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>
            | Uint32Array<ArrayBufferLike>

        The data to store in this buffer or the size to set this buffer's data store to in bytes.

      • Optionalusage: BufferUsage

        The intended usage of the buffer.

      • OptionalsrcOffset: number

        The index of the element to start reading the supplied data at.

      • Optionallength: number

        The length of the supplied data to read.

      • OptionaldstOffset: number

        The offset in bytes to start replacing data at. If this value is set, a subset of the data in the buffer is updated rather than replacing all of the data in the buffer and the usage pattern of the buffer is not updated.

      Returns void