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읽기 전용Packrecording읽기 전용booleanWhether its entries record their
console.*calls.
인스턴스 메서드
compute(entry?: string, options?: { readonly constants?: Constants }): Promise<ComputePipeline>The pipeline of a
@computeentry, cached: the program’s only one whenentryis omitted.options.constantssets the program’s overrides for this pipeline, asRenderState.constantsdoes 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.statedefaults to{}: the program’s only vertex and fragment entry, and every other field at its default.
소스
src/runtime/program.ts, 121행, 커밋 c66579bf 기준