Program
이 페이지에서

Program

인터페이스, 런타임 분류

A program loaded on a runtime: its manifest and its pipelines.

import type { Program } from 'typeshade/runtime'

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

구문

interface Program {
readonly manifest: Pack;
readonly recording: boolean;
compute(entry?: string, options?: { readonly constants?: Constants }): Promise<ComputePipeline>;
render(state?: RenderState): Promise<RenderPipeline>;
}

인스턴스 속성

manifest읽기 전용 Pack
recording읽기 전용 boolean

Whether its entries record their console.* calls.

인스턴스 메서드

compute (entry?: string, options?: { readonly constants?: Constants }): Promise<ComputePipeline>

The pipeline of a @compute entry, cached: the program’s only one when entry is omitted. options.constants sets the program’s overrides for this pipeline, as RenderState.constants does for a render pipeline (an override it leaves out takes its declared default), and two sets of values are two pipelines.

render (state?: RenderState): Promise<RenderPipeline>

The pipeline of a vertex entry and a fragment entry under state, cached. state defaults to {}: the program’s only vertex and fragment entry, and every other field at its default.

소스

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

이 페이지 편집 문제 보고