Skip to content

WgslStruct

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

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

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

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


readonly [$internal]: object

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

isAbstruct: boolean

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


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

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


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

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

BaseData.[$repr]


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

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


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

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


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

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


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

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


readonly propTypes: TProps

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


readonly type: "struct"

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

BaseData.type

$name(label): this

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

string

this

TgpuNamable.$name