Used to compute alignment when dealing with arrays of Struct

Hierarchy (view full)

Constructors

Properties

arrayLength: number

Initial length of the input buffer binding array

numElements: number

Total number of elements (i.e. arrayLength divided by buffer layout number of elements

arrayStride: number

Number of bytes in the ArrayBuffer between two elements startOffset

name: string

The name of the BufferElement

type: string

The WGSL variable type of the BufferElement

key: string

The key of the BufferElement

bufferLayout: BufferLayout

BufferLayout used to fill the buffer binding array at the right offsets

Object defining exactly at which place a binding should be inserted into the buffer binding array

view?: TypedArray

Array containing the BufferElement values

setValue: ((value) => void)

Function assigned to set the view values

Type declaration

    • (value): void
    • Function assigned to set the view values

      Parameters

      Returns void

viewSetFunction: ((byteOffset, value, littleEndian?) => void) | ((byteOffset, value, littleEndian?) => void) | ((byteOffset, value, littleEndian?) => void) | ((byteOffset, value, littleEndian?) => void)

Corresponding DataView set function based on view type

Type declaration

    • (byteOffset, value, littleEndian?): void
    • Parameters

      • byteOffset: number
      • value: number
      • Optional littleEndian: boolean

      Returns void

Type declaration

    • (byteOffset, value, littleEndian?): void
    • Parameters

      • byteOffset: number
      • value: number
      • Optional littleEndian: boolean

      Returns void

Type declaration

    • (byteOffset, value, littleEndian?): void
    • Parameters

      • byteOffset: number
      • value: number
      • Optional littleEndian: boolean

      Returns void

Type declaration

    • (byteOffset, value, littleEndian?): void
    • Parameters

      • byteOffset: number
      • value: number
      • Optional littleEndian: boolean

      Returns void

Accessors

Methods