Skip to content

WgslStruct

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

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

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

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


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

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


readonly [$internal]: object

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

isAbstruct: boolean

BaseData.[$internal]


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

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


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

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


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

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

BaseData.[$repr]


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

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


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

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


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

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


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

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


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

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


readonly propTypes: TProps

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


readonly type: "struct"

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

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