CpuStruct
Interface in CPU oracle
A struct value on the CPU: a plain object keyed by field name, holding one CpuValue per field.
import type { CpuStruct } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface CpuStruct { [k: string]: CpuValue;}Description
Calling a struct constructor in shader code
(MyStruct(a, b, …)) produces one with its fields in declaration order; a struct-typed
var starts as an empty object and gains fields as they are assigned. The type carries
no struct identity of its own: the field set is whatever the declaring struct listed,
and the caller checks it structurally.
See also
Source
src/core/cpu-runtime.ts, line 53, at commit 26de7be8