WgslStruct
Defined in: packages/typegpu/src/data/wgslTypes.ts:1234
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.GPUCallable<[Prettify<InferRecord<TProps>>]>
Type Parameters
Section titled “Type Parameters”TProps
Section titled “TProps”TProps extends Record<string, BaseData> = Record<string, BaseData>
WgslStruct(
props?): { [K in string | number | symbol]: InferRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/wgslTypes.ts:1247
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”props?
Section titled “props?”{ [K in string | number | symbol]: InferRecord<TProps>[K] }
Returns
Section titled “Returns”{ [K in string | number | symbol]: InferRecord<TProps>[K] }
Properties
Section titled “Properties”[$gpuCallableStrictSignature]?
Section titled “[$gpuCallableStrictSignature]?”
optional[$gpuCallableStrictSignature]:GPUCallableStrictSignature
Defined in: packages/typegpu/src/types.ts:484
Inherited from
Section titled “Inherited from”GPUCallable.[$gpuCallableStrictSignature]
[$gpuRepr]
Section titled “[$gpuRepr]”
readonly[$gpuRepr]: { [K in string | number | symbol]: InferGPURecord<TProps>[K] }
Defined in: packages/typegpu/src/data/wgslTypes.ts:1252
[$inRepr]
Section titled “[$inRepr]”
readonly[$inRepr]: { [K in string | number | symbol]: InferInputRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/wgslTypes.ts:1251
[$internal]
Section titled “[$internal]”
readonly[$internal]:object
Defined in: packages/typegpu/src/data/wgslTypes.ts:1241
isAbstruct
Section titled “isAbstruct”isAbstruct:
boolean
Overrides
Section titled “Overrides”[$invalidSchemaReason]
Section titled “[$invalidSchemaReason]”
readonly**[{K & string}’ — `> }[keyof TProps],undefined>
Defined in: packages/typegpu/src/data/wgslTypes.ts:1256
[$memIdent]
Section titled “[$memIdent]”
readonly[$memIdent]:WgslStruct<{ [K in string | number | symbol]: MemIdentityRecord<TProps>[K] }>
Defined in: packages/typegpu/src/data/wgslTypes.ts:1253
[$repr]
Section titled “[$repr]”
readonly[$repr]: { [K in string | number | symbol]: InferRecord<TProps>[K] }
Defined in: packages/typegpu/src/data/wgslTypes.ts:1250
Overrides
Section titled “Overrides”[$reprPartial]
Section titled “[$reprPartial]”
readonly[$reprPartial]: { [K in string | number | symbol]: Partial<InferPartialRecord<TProps>>[K] } |undefined
Defined in: packages/typegpu/src/data/wgslTypes.ts:1254
[$reprPatch]
Section titled “[$reprPatch]”
readonly[$reprPatch]: { [K in string | number | symbol]: Partial<InferPatchRecord<TProps>>[K] } |undefined
Defined in: packages/typegpu/src/data/wgslTypes.ts:1255
[$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:1265
[$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:1270
[$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:1275
propTypes
Section titled “propTypes”
readonlypropTypes:TProps
Defined in: packages/typegpu/src/data/wgslTypes.ts:1245
readonlytype:"struct"
Defined in: packages/typegpu/src/data/wgslTypes.ts:1244
Overrides
Section titled “Overrides”Methods
Section titled “Methods”[$gpuCallable]()
Section titled “[$gpuCallable]()”[$gpuCallable](
ctx,args):Snippet
Defined in: packages/typegpu/src/types.ts:483
Parameters
Section titled “Parameters”ResolutionCtx
readonly [Snippet | undefined]
Returns
Section titled “Returns”Snippet
Inherited from
Section titled “Inherited from”GPUCallable.[$gpuCallable]
$name()
Section titled “$name()”$name(
label):this
Defined in: packages/typegpu/src/shared/meta.ts:44
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”TgpuNamable.$name
toString()
Section titled “toString()”toString():
string
Defined in: packages/typegpu/src/data/wgslTypes.ts:49
Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”© Software Mansion 2026. All trademarks and copyrights belong to their respective owners. Read about our Privacy Policy.