Skip to content

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.

  • BaseData.TgpuNamable.GPUCallable<[Prettify<InferRecord<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.

{ [K in string | number | symbol]: InferRecord<TProps>[K] }

{ [K in string | number | symbol]: InferRecord<TProps>[K] }

optional [$gpuCallableStrictSignature]: GPUCallableStrictSignature

Defined in: packages/typegpu/src/types.ts:484

GPUCallable.[$gpuCallableStrictSignature]


readonly [$gpuRepr]: { [K in string | number | symbol]: InferGPURecord<TProps>[K] }

Defined in: packages/typegpu/src/data/wgslTypes.ts:1252


readonly [$inRepr]: { [K in string | number | symbol]: InferInputRecord<TProps>[K] }

Defined in: packages/typegpu/src/data/wgslTypes.ts:1251


readonly [$internal]: object

Defined in: packages/typegpu/src/data/wgslTypes.ts:1241

isAbstruct: boolean

BaseData.[$internal]


readonly **[{K & string}’ — `> }[keyof TProps], undefined>

Defined in: packages/typegpu/src/data/wgslTypes.ts:1256


readonly [$memIdent]: WgslStruct<{ [K in string | number | symbol]: MemIdentityRecord<TProps>[K] }>

Defined in: packages/typegpu/src/data/wgslTypes.ts:1253


readonly [$repr]: { [K in string | number | symbol]: InferRecord<TProps>[K] }

Defined in: packages/typegpu/src/data/wgslTypes.ts:1250

BaseData.[$repr]


readonly [$reprPartial]: { [K in string | number | symbol]: Partial<InferPartialRecord<TProps>>[K] } | undefined

Defined in: packages/typegpu/src/data/wgslTypes.ts:1254


readonly [$reprPatch]: { [K in string | number | symbol]: Partial<InferPatchRecord<TProps>>[K] } | undefined

Defined in: packages/typegpu/src/data/wgslTypes.ts:1255


readonly [$validStorageSchema]: { [K in string | number | symbol]: IsValidStorageSchema<TProps[K]> }[keyof TProps] extends true ? true : false

Defined in: packages/typegpu/src/data/wgslTypes.ts:1265


readonly [$validUniformSchema]: { [K in string | number | symbol]: IsValidUniformSchema<TProps[K]> }[keyof TProps] extends true ? true : false

Defined in: packages/typegpu/src/data/wgslTypes.ts:1270


readonly [$validVertexSchema]: { [K in string | number | symbol]: IsValidVertexSchema<TProps[K]> }[keyof TProps] extends true ? true : false

Defined in: packages/typegpu/src/data/wgslTypes.ts:1275


readonly propTypes: TProps

Defined in: packages/typegpu/src/data/wgslTypes.ts:1245


readonly type: "struct"

Defined in: packages/typegpu/src/data/wgslTypes.ts:1244

BaseData.type

[$gpuCallable](ctx, args): Snippet

Defined in: packages/typegpu/src/types.ts:483

ResolutionCtx

readonly [Snippet | undefined]

Snippet

GPUCallable.[$gpuCallable]


$name(label): this

Defined in: packages/typegpu/src/shared/meta.ts:44

string

this

TgpuNamable.$name


toString(): string

Defined in: packages/typegpu/src/data/wgslTypes.ts:49

string

BaseData.toString

© Software Mansion 2026. All trademarks and copyrights belong to their respective owners. Read about our Privacy Policy.