PackOptions
이 페이지에서

PackOptions

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

Everything packModule() adds on request.

import type { PackOptions } from 'typeshade'

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

구문

interface PackOptions {
readonly console?: boolean;
readonly ir?: boolean;
readonly emit?: EmitOptions & { readonly level?: OptLevel };
}

인스턴스 속성

console선택 사항읽기 전용 boolean

Add the recorded variant, console: the WGSL that records the console.* calls.

ir선택 사항읽기 전용 boolean

Add the program as portable IR, ir, which the load-time emitter (typeshade/emit) emits again without the front end. About three times the WGSL gzipped, so on request only.

emit선택 사항읽기 전용 EmitOptions & { readonly level?: OptLevel }

Emit the program under other options than the defaults: the WGSL writer’s own (EmitOptions: parens, fp64Flavor and plugins) and an optimization level, 'O0', 'O1' or 'O2' (the default; OptLevel says what each runs). The manifest’s wgsl, its recorded variant’s wgsl, its glsl (the WebGL2 tier’s programs included) and its bindings are the ones those options emit: fp64Flavor changes the bindings too, since the 'float' flavor binds the _fp64 guard and the 'integer' one binds none. parens, fp64Flavor and plugins reach the GLSL as they reach the WGSL; level is the WGSL’s alone, since the GLSL writer has no level and writes its own optimized program. The manifest records level, parens and fp64Flavor in its emit, which the load-time emitter emits the program again under. A plugin is a function, which a manifest cannot record, so ir: true with a plugin is a TypeError: the load-time emitter could not emit the program again. A word an option does not take is a TypeError too.

함께 보기

소스

src/core/manifest.ts, 70행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고