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.
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”• 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.
Type Parameters
Section titled “Type Parameters”• T extends BaseData
Parameters
Section titled “Parameters”elements
Section titled “elements”Infer<T>[]
Returns
Section titled “Returns”Infer<T>[]
Defined in
Section titled “Defined in”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.
Returns
Section titled “Returns”Infer<TElement>[]
Defined in
Section titled “Defined in”packages/typegpu/src/data/dataTypes.ts:44
Properties
Section titled “Properties”[$internal]
Section titled “[$internal]”
readonly[$internal]:true|Record<string,any>
Inherited from
Section titled “Inherited from”Defined in
Section titled “Defined in”packages/typegpu/src/data/wgslTypes.ts:41
[$invalidSchemaReason]
Section titled “[$invalidSchemaReason]”
readonly[$invalidSchemaReason]:"Disarrays are not host-shareable, use arrays instead"
Defined in
Section titled “Defined in”packages/typegpu/src/data/dataTypes.ts:55
[$repr]
Section titled “[$repr]”
readonly[$repr]:Infer<TElement>[]
Overrides
Section titled “Overrides”Defined in
Section titled “Defined in”packages/typegpu/src/data/dataTypes.ts:50
[$reprPartial]
Section titled “[$reprPartial]”
readonly[$reprPartial]:undefined|object[]
Defined in
Section titled “Defined in”packages/typegpu/src/data/dataTypes.ts:51
[$validVertexSchema]
Section titled “[$validVertexSchema]”
readonly[$validVertexSchema]:IsValidVertexSchema<TElement>
Defined in
Section titled “Defined in”packages/typegpu/src/data/dataTypes.ts:54
elementCount
Section titled “elementCount”
readonlyelementCount:number
Defined in
Section titled “Defined in”packages/typegpu/src/data/dataTypes.ts:46
elementType
Section titled “elementType”
readonlyelementType:TElement
Defined in
Section titled “Defined in”packages/typegpu/src/data/dataTypes.ts:47
readonlytype:"disarray"