Pack
이 페이지에서

Pack

인터페이스, 리플렉션 분류

The serialisable result of buildManifest: see there.

import type { Pack } from 'typeshade'
import type { Pack } from 'typeshade/runtime'

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

구문

interface Pack {
readonly schema: typeof PACK_SCHEMA;
readonly compiler: string;
readonly emit?: { readonly level?: 'O0' | 'O1' | 'O2'; readonly parens?: 'full' | 'minimal'; readonly fp64Flavor?: 'float' | 'integer'; };
readonly wgsl: string;
readonly glsl?: { readonly vertex: string; readonly fragment: string };
readonly bindings: readonly PackBinding[];
readonly vertexLayout?: GpuVertexLayout;
readonly entries: readonly PackEntry[];
readonly structs: readonly { readonly name: string; readonly fields: readonly { name: string; type: string }[]; }[];
readonly overrides: readonly PackOverride[];
readonly features: readonly string[];
readonly console?: PackConsole;
readonly ir?: PortableIr;
readonly gl?: { readonly draws: Readonly<Record<string, PackGlDraw | { readonly none: string }>>; };
}

인스턴스 속성

schema읽기 전용 typeof PACK_SCHEMA

The manifest’s schema, which a reader checks first (Rule 11.10).

compiler읽기 전용 string

The package version that wrote it.

emit선택 사항읽기 전용 { readonly level?: 'O0' | 'O1' | 'O2'; readonly parens?: 'full' | 'minimal'; readonly fp64Flavor?: 'float' | 'integer'; }

The options the program was emitted under, when the build gave any of the three a manifest can record (packModule(m, { emit }), its plugins apart, which it cannot): the optimization level, the parens and the fp64Flavor. One the build did not give is absent and stands for its default ('O2', 'full' and 'float'), and a manifest built with none has no emit. The load-time emitter emits the program again under them (Rule 11.10).

wgsl읽기 전용 string
glsl선택 사항읽기 전용 { readonly vertex: string; readonly fragment: string }
bindings읽기 전용 readonly PackBinding[]
vertexLayout선택 사항읽기 전용 GpuVertexLayout

The first vertex entry’s vertex buffer, as entries[].vertex gives each.

entries읽기 전용 readonly PackEntry[]
structs읽기 전용 readonly { readonly name: string; readonly fields: readonly { name: string; type: string }[]; }[]
overrides읽기 전용 readonly PackOverride[]
features읽기 전용 readonly string[]

The GPUFeatureNames a device must have to create the program’s pipelines.

console선택 사항읽기 전용 PackConsole
ir선택 사항읽기 전용 PortableIr

The program as portable IR, when the build asked for it: what repack() emits again. Only the package version that wrote it reads it.

gl선택 사항읽기 전용 { readonly draws: Readonly<Record<string, PackGlDraw | { readonly none: string }>>; }

What the WebGL2 tier uses: each full-screen fragment entry’s draw, or why it has none.

소스

src/core/manifest-types.ts, 161행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고