vec3i
On this page

vec3i()

Function in Builtins

A vec3<i32> constructor, WGSL-style: vec3i(x, y, z).

import { vec3i } from 'typeshade/core/ir'

This export returns an IR node. A "use typeshade" file calls the builtin itself: vec3i()

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

Syntax

const vec3i: (...a: NodeLike[]) => Node<"vec3<i32>">

Parameters

...a NodeLike[]

Return value

Node<'vec3<i32>'>

Description

Bare number components lift to i32. The signed integer triple, such as a texel coordinate into an array texture.

Examples

Example

import { vec3i } from 'typeshade/core/ir'
const cell = vec3i(0, 0, 1) // Node<'vec3<i32>'>

In the guide

See also

Source

src/core/ir/node.ts, line 2316, at commit af54ddad5

Edit this page Report a problem