Skip to content

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.

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.

{ [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: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.

{ [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:1288


readonly [$internal]: true

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

BaseData.[$internal]


readonly [$invalidSchemaReason]: SwapNever<{ [K in string | number | symbol]: ExtractInvalidSchemaError<TProps[K], `in struct property ’${K & string}’ — `> }[keyof TProps], undefined>

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


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

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


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

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

BaseData.[$repr]


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

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


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

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


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

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


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

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


readonly propTypes: TProps

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


readonly type: "struct"

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

BaseData.type

$name(label): this

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

string

this

TgpuNamable.$name