Skip to content

WgslStruct

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

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

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

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


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

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


readonly [$internal]: object

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

isAbstruct: boolean

BaseData.[$internal]


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

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


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

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


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

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

BaseData.[$repr]


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

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


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

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


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

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


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

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


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

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


readonly propTypes: TProps

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


readonly type: "struct"

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

BaseData.type

$name(label): this

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

string

this

TgpuNamable.$name


toString(): string

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

string

BaseData.toString