Geometry
이 페이지에서

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읽기 전용 number

How many vertices, or indices when indices is given.

instances선택 사항읽기 전용 number

How many instances: 1 when omitted.

vertices선택 사항읽기 전용 ArrayBufferView | object

The vertex buffer, laid out as the manifest’s vertex entry reads it (its @location inputs, tightly packed): a typed array, uploaded at each draw, or the host’s GPUBuffer. Omitted for a vertex entry with no @location input, such as a full-screen triangle drawn from vertex_index.

indices선택 사항읽기 전용 Uint16Array | Uint32Array | { readonly buffer: object; readonly format: 'uint16' | 'uint32' }

The index buffer: a Uint16Array or Uint32Array, uploaded at each draw, or { buffer, format }, the host’s GPUBuffer bound as it is.

소스

src/runtime/program.ts, 104행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고