Skip to content

WgslStruct

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

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.

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:1231

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] }

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

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

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] }

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

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


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

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


readonly [$internal]: object

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

isAbstruct: boolean

BaseData.[$internal]


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

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


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

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


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

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

BaseData.[$repr]


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

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


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

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


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

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


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

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


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

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


readonly propTypes: TProps

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


readonly type: "struct"

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

BaseData.type

$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.