ParamSpec
타입, 작성 분류
The parameter record externFn takes: a plain map from parameter name to ShaderType, in declaration order.
import type { ParamSpec } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
type ParamSpec = Record<string, ShaderType>;설명
An extern function is only ever called, never
used as a pipeline entry point, so its record carries no stage attribute and no struct
handle. FnParamSpec is the richer record fn() accepts.
예제
예제
import { externFn, f32T, vec2fT, type ParamSpec } from 'typeshade'
const WARP_PARAMS = { x: f32T, y: f32T, scale: f32T } satisfies ParamSpecexport const warp = externFn('warp', WARP_PARAMS, vec2fT)함께 보기
소스
src/core/ir/builder.ts, 59행, 커밋 c66579bf 기준