Skip to content

Disarray

Array schema constructed via d.disarrayOf function.

Useful for defining vertex buffers. Elements in the schema are not aligned in respect to their byteAlignment, unless they are explicitly decorated with the custom align attribute via d.align function.

TElement extends BaseData = BaseData

Disarray<T>(elements): Infer<T>[]

Array schema constructed via d.disarrayOf function.

Useful for defining vertex buffers. Elements in the schema are not aligned in respect to their byteAlignment, unless they are explicitly decorated with the custom align attribute via d.align function.

T extends BaseData

Infer<T>[]

Infer<T>[]

packages/typegpu/src/data/dataTypes.ts:43

Disarray(): Infer<TElement>[]

Array schema constructed via d.disarrayOf function.

Useful for defining vertex buffers. Elements in the schema are not aligned in respect to their byteAlignment, unless they are explicitly decorated with the custom align attribute via d.align function.

Infer<TElement>[]

packages/typegpu/src/data/dataTypes.ts:44

readonly [$internal]: true | Record<string, any>

BaseData.[$internal]

packages/typegpu/src/data/wgslTypes.ts:41


readonly [$invalidSchemaReason]: "Disarrays are not host-shareable, use arrays instead"

packages/typegpu/src/data/dataTypes.ts:55


readonly [$repr]: Infer<TElement>[]

BaseData.[$repr]

packages/typegpu/src/data/dataTypes.ts:50


readonly [$reprPartial]: undefined | object[]

packages/typegpu/src/data/dataTypes.ts:51


readonly [$validVertexSchema]: IsValidVertexSchema<TElement>

packages/typegpu/src/data/dataTypes.ts:54


readonly elementCount: number

packages/typegpu/src/data/dataTypes.ts:46


readonly elementType: TElement

packages/typegpu/src/data/dataTypes.ts:47


readonly type: "disarray"

BaseData.type

packages/typegpu/src/data/dataTypes.ts:45