vec2u()
Function in Builtins
A vec2<u32> constructor, WGSL-style: vec2u(x, y).
import { vec2u } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
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'
const pick = vec2u(0, 0) // Node<'vec2<u32>'>In the guide
See also
Source
src/core/ir/node.ts, line 2533, at commit 26de7be8