Skip to content

WgslStruct

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

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

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

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


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

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


readonly [$internal]: object

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

isAbstruct: boolean

BaseData.[$internal]


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

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


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

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


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

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

BaseData.[$repr]


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

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


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

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


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

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


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

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


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

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


readonly propTypes: TProps

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


readonly type: "struct"

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

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