CpuStruct
이 페이지에서

CpuStruct

인터페이스, CPU 오라클 분류

A struct value on the CPU: a plain object keyed by field name, holding one CpuValue per field.

import type { CpuStruct } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

interface CpuStruct {
[k: string]: CpuValue;
}

설명

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.

함께 보기

소스

src/core/cpu-runtime.ts, 53행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고