vec2u()
Function in Builtins
A vec2<u32> constructor, WGSL-style: vec2u(x, y).
import { vec2u } from 'typeshade/core/ir'
This export returns an IR node. A "use typeshade" file calls the builtin itself: vec2u()
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
const vec2u: (...a: NodeLike[]) => Node<"vec2<u32>">Parameters
...aNodeLike[]
Return value
Node<'vec2<u32>'>
Description
Bare number components lift to u32,
where vec2 lifts them to f32. For unsigned pairs such as a pick-buffer coordinate.
Examples
Example
import { vec2u } from 'typeshade/core/ir'
const pick = vec2u(0, 0) // Node<'vec2<u32>'>In the guide
See also
Source
src/core/ir/node.ts, line 2258, at commit af54ddad5