@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.

      • data:
            | number
            | Uint8Array<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>
            | Uint32Array<ArrayBufferLike> = 0

        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(): | Uint8Array<ArrayBufferLike>
      | Uint16Array<ArrayBufferLike>
      | Uint32Array<ArrayBufferLike>

      The data contained in this buffer.

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

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

      The data contained in this buffer.

      Parameters

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

      Returns void

    Methods

    • Get the data contained in this buffer.

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

      The data contained in this buffer.

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

      Parameters

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

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

      • Optionalusage: BufferUsage

        The intended use case of the buffer.

      • OptionalsrcOffset: number
      • Optionallength: number
      • OptionaldstOffset: number

      Returns void