WgslStruct
Defined in: packages/typegpu/src/data/wgslTypes.ts:1276
Struct schema constructed via d.struct
function.
Responsible for handling reading and writing struct values
between binary and JS representation. Takes into account
the byteAlignment
requirement of its members.
Extends
Section titled “Extends”BaseData
.TgpuNamable
Type Parameters
Section titled “Type Parameters”• TProps extends Record
<string
, BaseData
> = any
WgslStruct(
props
): { [K in string | number | symbol]: InferRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/wgslTypes.ts:1283
Struct schema constructed via d.struct
function.
Responsible for handling reading and writing struct values
between binary and JS representation. Takes into account
the byteAlignment
requirement of its members.
Parameters
Section titled “Parameters”{ [K in string | number | symbol]: InferRecord<TProps>[K] }
Returns
Section titled “Returns”{ [K in string | number | symbol]: InferRecord<TProps>[K] }
WgslStruct(): { [K in string | number | symbol]: InferRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/wgslTypes.ts:1284
Struct schema constructed via d.struct
function.
Responsible for handling reading and writing struct values
between binary and JS representation. Takes into account
the byteAlignment
requirement of its members.
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/wgslTypes.ts:1288
[$internal]
Section titled “[$internal]”
readonly
[$internal]:true
Defined in: packages/typegpu/src/data/wgslTypes.ts:32
Inherited from
Section titled “Inherited from”[$invalidSchemaReason]
Section titled “[$invalidSchemaReason]”
readonly
[$invalidSchemaReason]:SwapNever
<{ [K in string | number | symbol]: ExtractInvalidSchemaError<TProps[K], `in struct property ’${K & string}’ — `> }[keyofTProps
],undefined
>
Defined in: packages/typegpu/src/data/wgslTypes.ts:1293
[$memIdent]
Section titled “[$memIdent]”
readonly
[$memIdent]:WgslStruct
<{ [K in string | number | symbol]: MemIdentityRecord<TProps>[K] }>
Defined in: packages/typegpu/src/data/wgslTypes.ts:1289
[$repr]
Section titled “[$repr]”
readonly
[$repr]: { [K in string | number | symbol]: InferRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/wgslTypes.ts:1287
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/wgslTypes.ts:1290
[$validStorageSchema]
Section titled “[$validStorageSchema]”
readonly
[$validStorageSchema]: { [K in string | number | symbol]: IsValidStorageSchema<TProps[K]> }[keyofTProps
] extendstrue
?true
:false
Defined in: packages/typegpu/src/data/wgslTypes.ts:1302
[$validUniformSchema]
Section titled “[$validUniformSchema]”
readonly
[$validUniformSchema]: { [K in string | number | symbol]: IsValidUniformSchema<TProps[K]> }[keyofTProps
] extendstrue
?true
:false
Defined in: packages/typegpu/src/data/wgslTypes.ts:1305
[$validVertexSchema]
Section titled “[$validVertexSchema]”
readonly
[$validVertexSchema]: { [K in string | number | symbol]: IsValidVertexSchema<TProps[K]> }[keyofTProps
] extendstrue
?true
:false
Defined in: packages/typegpu/src/data/wgslTypes.ts:1308
propTypes
Section titled “propTypes”
readonly
propTypes:TProps
Defined in: packages/typegpu/src/data/wgslTypes.ts:1281
readonly
type:"struct"
Defined in: packages/typegpu/src/data/wgslTypes.ts:1280
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