StructLayout
인터페이스, 리플렉션 분류
A struct's complete byte layout: its total size and align plus one FieldLayout per field, in declaration order.
import type { StructLayout } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface StructLayout { readonly name: string; readonly size: number; readonly align: number; readonly fields: readonly FieldLayout[];}설명
wgslLayout produces one for a standalone struct;
reflect produces one for every struct bound in a module, under std140 for a
uniform binding and std430 for a storage binding (see LayoutKind). size is
already rounded up to align, which under std140 is itself rounded to 16, so it is also
the element stride of an array of this struct.
인스턴스 속성
name읽기 전용stringsize읽기 전용numberalign읽기 전용numberfields읽기 전용readonly FieldLayout[]
함께 보기
소스
src/core/reflect.ts, 242행, 커밋 c66579bf 기준