Program
Interface in Runtime
A program loaded on a runtime: its manifest and its pipelines.
import type { Program } from 'typeshade/runtime'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface Program { readonly manifest: Pack; readonly recording: boolean; compute(entry?: string, options?: { readonly constants?: Constants }): Promise<ComputePipeline>; render(state?: RenderState): Promise<RenderPipeline>;}Instance properties
manifestread onlyPackrecordingread onlybooleanWhether its entries record their
console.*calls.
Instance methods
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.
Source
src/runtime/program.ts, line 121, at commit 26de7be8