Class Buffer<T>Abstract

An array of binary data.

Type Parameters

  • T extends ArrayBufferView

Hierarchy (View Summary)

Properties

Accessors

Methods

Properties

context: Context

The rendering context.

Accessors

  • get isHalf(): boolean
  • Whether or not this buffer contains 16-bit floating-point data if it contains floating-point data.

    Returns boolean

Methods

  • Replace the data in this buffer.

    Parameters

    • data: T

      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.

    • Optionaloffset: number

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

    • Optionallength: number

      The length of the supplied data to read.

    • OptionalisHalf: boolean

      Whether or not the data contains 16-bit floating-point data if it contains floating-point data.

    Returns void

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

    • Optional_: unknown

      An unused value.

    • Optional__: unknown

      An unused value.

    • OptionalisHalf: boolean

      Whether or not the data contains 16-bit floating-point data if it contains floating-point data.

    Returns void

  • Update a subset of the data in this buffer.

    Parameters

    • data: T

      The data to store in this buffer.

    • Optional_: unknown

      An ignored value.

    • Optionaloffset: number

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

    • Optionallength: number

      The length of the supplied data to read.

    • Optional__: unknown

      An ignored value.

    • OptionalreplaceOffset: number

      The offset in bytes to start replacing data at.

    Returns void