Unstruct
Defined in: packages/typegpu/src/data/dataTypes.ts:61
Struct schema constructed via d.unstruct function.
Useful for defining vertex buffers, as the standard layout restrictions do not apply.
Members 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”BaseData.TgpuNamable
Type Parameters
Section titled “Type Parameters”• TProps extends Record<string, BaseData> = any
Unstruct(
props): { [K in string | number | symbol]: InferRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/dataTypes.ts:65
Struct schema constructed via d.unstruct function.
Useful for defining vertex buffers, as the standard layout restrictions do not apply.
Members are not aligned in respect to their byteAlignment,
unless they are explicitly decorated with the custom align attribute
via d.align function.
Parameters
Section titled “Parameters”{ [K in string | number | symbol]: InferRecord<TProps>[K] }
Returns
Section titled “Returns”{ [K in string | number | symbol]: InferRecord<TProps>[K] }
Unstruct(): { [K in string | number | symbol]: InferRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/dataTypes.ts:66
Struct schema constructed via d.unstruct function.
Useful for defining vertex buffers, as the standard layout restrictions do not apply.
Members 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”{ [K in string | number | symbol]: InferRecord<TProps>[K] }
Properties
Section titled “Properties”[$gpuRepr]
Section titled “[$gpuRepr]”
readonly[$gpuRepr]: { [K in string | number | symbol]: InferGPURecord<TProps>[K] }
Defined in: packages/typegpu/src/data/dataTypes.ts:72
[$internal]
Section titled “[$internal]”
readonly[$internal]:true|Record<string,any>
Defined in: packages/typegpu/src/data/wgslTypes.ts:34
Inherited from
Section titled “Inherited from”[$invalidSchemaReason]
Section titled “[$invalidSchemaReason]”
readonly[$invalidSchemaReason]:"Unstructs are not host-shareable, use structs instead"
Defined in: packages/typegpu/src/data/dataTypes.ts:80
[$memIdent]
Section titled “[$memIdent]”
readonly[$memIdent]:Unstruct<{ [K in string | number | symbol]: MemIdentityRecord<TProps>[K] }>
Defined in: packages/typegpu/src/data/dataTypes.ts:73
[$repr]
Section titled “[$repr]”
readonly[$repr]: { [K in string | number | symbol]: InferRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/dataTypes.ts:71
Overrides
Section titled “Overrides”[$reprPartial]
Section titled “[$reprPartial]”
readonly[$reprPartial]:undefined| { [K in string | number | symbol]: Partial<InferPartialRecord<TProps>>[K] }
Defined in: packages/typegpu/src/data/dataTypes.ts:74
[$validVertexSchema]
Section titled “[$validVertexSchema]”
readonly[$validVertexSchema]: { [K in string | number | symbol]: IsValidVertexSchema<TProps[K]> }[keyofTProps] extendstrue?true:false
Defined in: packages/typegpu/src/data/dataTypes.ts:77
propTypes
Section titled “propTypes”
readonlypropTypes:TProps
Defined in: packages/typegpu/src/data/dataTypes.ts:68
readonlytype:"unstruct"
Defined in: packages/typegpu/src/data/dataTypes.ts:67
Overrides
Section titled “Overrides”Methods
Section titled “Methods”$name()
Section titled “$name()”$name(
label):this
Defined in: packages/typegpu/src/shared/meta.ts:83
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”TgpuNamable.$name