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