ComposeOptions
인터페이스, 배리언트 분류
Options for composeModule.
import type { ComposeOptions } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface ComposeOptions { readonly allowUnswapped?: boolean;}설명
The default is strict: a placeholder that receives no swap and a swap key that matches no placeholder are both errors at compose time.
Strictness matters because a placeholder left in place is easy to miss. The WGSL emitter
writes it as a bare // __placeholder: <tag> comment and the shader still compiles and
renders, while the GLSL emitter and compileModule (the same module evaluated on the
CPU in double precision) throw only when they reach it. Set allowUnswapped only when
leaving a placeholder open is deliberate.
인스턴스 속성
allowUnswapped선택 사항읽기 전용booleanLet a placeholder with no matching swap stay in the module. The WGSL emitter writes it as the comment
// __placeholder: <tag>; the GLSL emitter andcompileModulethrow when they reach it. Off by default, where an un-swapped placeholder is a compose-time error.
함께 보기
소스
src/core/passes/compose.ts, 25행, 커밋 c66579bf 기준