작성
export 48개
셰이더를 쓰는 빌더입니다. 모듈과 함수, 변수, 제어 흐름을 여기 있는 호출로 선언합니다.
시그니처, 설명, 예제는 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
-
Break함수 - Push a break; onto the innermost scope, exiting the nearest enclosing Loop outright, under the same nesting rule as Continue: an If nested inside the loop is not itself a break boundary.
-
Builder클래스 - The statement collector every fn() body writes into.
-
Call함수 - Push a call as a statement onto the innermost scope, kept for its effect and nothing else.
-
compile함수 - Compile TypeShade TypeScript source into the module and generated shader outputs.
-
CompileOptions인터페이스 - How one compile() call is set up.
-
CompileResult인터페이스 - What compile() returns.
-
compileTsSource함수 - Compile a TypeScript source string through the TypeShade authoring pipeline.
-
CompileTsSourceOptions인터페이스 - Options controlling compilation of a TypeShade TypeScript source string.
-
CompileTsSourceResult인터페이스 - The result of compiling a TypeShade TypeScript source string, including IR and optional WGSL.
-
condExpr함수 - N-arm value dispatch on conditions, the first true condition winning: condExpr([[c0, () => e0], [c1, () => e1]], () => eN).
-
constExpr함수 - Author a module-level constant from an IR value expression: the form for a constant that is not a plain scalar.
-
ConstExprDecl인터페이스 - What constExpr returns: the ConstDecl itself, so it drops straight into module, carrying node, the typed reference to read the constant through at call sites.
-
Continue함수 - Push a continue; onto the innermost scope, skipping to the next iteration of the nearest enclosing loop.
-
Discard함수 - Push a discard; onto the innermost scope.
-
externFn함수 - Forward-declare a callable whose real definition (fn(...)) is authored somewhere else, or built later than the caller's own module-load time (see ExternFn).
-
ExternFn타입 - A typed call-only handle for a function whose definition is provided elsewhere: the forward-declaration counterpart to fn().
-
externVar함수 - Declare a host-provided global: the variable counterpart of externFn.
-
ExternVarHandle인터페이스 - The pair externVar returns: the read node, and the declaration to hand module().
-
findUseTypeshadeDirective함수 - Scan the top-level statements of a SourceFile and return the first "use typeshade"; directive, or undefined if none is present.
-
fn함수 - Author a function. One call covers a plain helper and a @vertex, @fragment or @compute entry point.
-
FnHandle타입 - The type fn() returns: a typed, callable handle that is also a FuncDecl.
-
FnParamSpec타입 - The parameter record fn() accepts.
-
hasUseTypeshadeDirective함수 - True when the SourceFile contains at least one top-level "use typeshade".
-
If함수 - Author if (cond) { body } over the innermost active scope.
-
IfChain클래스 - The chain object Builder.if and If(/api/if/) return, so .elif(...) and .else(...) read top to bottom in authored order.
-
ifExpr함수 - Two-arm value dispatch on a condition: ifExpr(cond, () => a, () => b).
-
isTypeshadeSource함수 - Return whether a TypeScript source string opts into TypeShade with the "use typeshade" directive.
-
isUseTypeshadeDirective함수 - Returns true when node is a top-level "use typeshade"; statement.
-
Let함수 - Bind a value to an immutable local, emitting let name = expr; into the innermost active scope.
-
Loop함수 - Author a C-style for loop over the innermost active scope.
-
matchEnum함수 - Exhaustive integer dispatch over an enumU32: matchEnum(kind, Kind, { Line: () => …, Fill: () => …, … }).
-
matchExpr함수 - A typed multi-arm dispatch over a scalar scrutinee, the expression form of switch (scrutinee) { case v0: r0; …; default: dflt }.
-
module함수 - Assemble a module from its declarations.
-
ModuleParts인터페이스 - The input shape module accepts: a Partial<ModuleDecl> whose funcs also takes a key-named record as an alternative to the array, and whose uses derives structs, bindings and consts from declarator handles.
-
overrideConst함수 - Declare a pipeline specialization constant: one value that is fixed when a pipeline is created, later than module build and earlier than the draw.
-
OverrideHandle인터페이스 - The pair overrideConst returns for a pipeline specialization constant: .node reads the value, opaque to the optimizer, in any expression or branch condition, and .decl goes into module.
-
ParamSpec타입 - The parameter record externFn takes: a plain map from parameter name to ShaderType, in declaration order.
-
rawStmt함수 - Author a raw statement, the escape hatch that splices verbatim text into a function body.
-
reduce함수 - Fold a value over a C-style loop: the value-returning spelling of the var acc = init; for (...) { acc = f(acc, i) } accumulator.
-
Return함수 - Push an explicit return value; onto the innermost scope.
-
ReturnIf함수 - Guard clause: if (cond) { return value; }, the explicit early return that reads as "return value if cond".
-
Switch함수 - Open a switch (scrut) chain: Switch(scrut).case(n, body)….default(body).
-
SwitchChain클래스 - switch (scrut) { case n: …; default: … } as a chainable statement builder, mirroring the If(…).elif(…).else(…) surface so integer dispatch reads the familiar imperative way: declare a Var(/api/var/) holding the default, then assign it inside the case arms.
-
TsCompilerDiagnostic인터페이스 - A source diagnostic produced while TypeShade analyzes or compiles TypeScript shader code.
-
USE_TYPESHADE상수 - The exact string the directive must carry.
-
UsesHandle타입 - A declarator handle accepted by module({ uses }): anything that carries its own declaration or binding.
-
Var함수 - Declare a mutable local and return the node that reads and writes it.
-
when함수 - Dispatch a value on a condition, returning the value instead of mutating a var.