Skip to main content

Function: getBufferConfiguration()

getBufferConfiguration(targetBufferType, length, options): object

Creates a target buffer configuration based on the provided options.

Parameters

targetBufferType: PixelDataTypedArrayString

The type of the target buffer.

length: number

The length of the target buffer.

options = {}

Options for the target buffer.

options.isVolumeBuffer?: boolean

Returns

object

An object containing the number of bytes and the TypedArray constructor for the target buffer.

numBytes

numBytes: number

TypedArrayConstructor()

TypedArrayConstructor: (length) => PixelDataTypedArray

Parameters

length: number

Returns

PixelDataTypedArray

Defined in

packages/core/src/utilities/getBufferConfiguration.ts:49