Geometry
인터페이스, 런타임 분류
What a draw draws: count vertices, instances times, from the vertex buffer the manifest lays out.
import type { Geometry } from 'typeshade/runtime'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface Geometry { readonly count: number; readonly instances?: number; readonly vertices?: ArrayBufferView | object; readonly indices?: Uint16Array | Uint32Array | { readonly buffer: object; readonly format: 'uint16' | 'uint32' };}설명
A typed array is uploaded at the draw; a GPUBuffer is bound as is.
인스턴스 속성
count읽기 전용numberHow many vertices, or indices when
indicesis given.instances선택 사항읽기 전용numberHow many instances: 1 when omitted.
vertices선택 사항읽기 전용ArrayBufferView | objectThe vertex buffer, laid out as the manifest’s vertex entry reads it (its
@locationinputs, tightly packed): a typed array, uploaded at each draw, or the host’sGPUBuffer. Omitted for a vertex entry with no@locationinput, such as a full-screen triangle drawn fromvertex_index.indices선택 사항읽기 전용Uint16Array | Uint32Array | { readonly buffer: object; readonly format: 'uint16' | 'uint32' }The index buffer: a
Uint16ArrayorUint32Array, uploaded at each draw, or{ buffer, format }, the host’sGPUBufferbound as it is.
소스
src/runtime/program.ts, 104행, 커밋 c66579bf 기준