---
title: "vec3u(): IR builder function in typeshade/core/ir, TypeShade"
description: "vec3u, an IR builder function in typeshade/core/ir. A vec3<u32> constructor, WGSL-style: vec3u(x, y, z)."
url: https://typeshade.dev/api/vec3u/
language: en
---

# `vec3u()`

Function in Builtins

A `vec3<u32>` constructor, WGSL-style: `vec3u`(x, y, z).

`import { vec3u } from 'typeshade/core/ir'`

This export returns an IR node. A `"use typeshade"` file calls the builtin itself: [`vec3u()`](https://typeshade.dev/reference/functions/vec3u/)

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

## Syntax

```ts
const vec3u: (...a: NodeLike[]) => Node<"vec3<u32>">
```

## Parameters

**`...a` `NodeLike[]`**

## Return value

`Node<'vec3<u32>'>`

## Description

Bare number components lift to `u32`, where [`vec3`](https://typeshade.dev/api/vec3/) lifts them to `f32`. It is the type of the compute `global_invocation_id` builtin, so this is how a workgroup coordinate is built by hand.

## Examples

### Example

```ts
import { vec3u } from 'typeshade/core/ir'

const origin = vec3u(0, 0, 0)  // Node<'vec3<u32>'>
```

## In the guide

- [Values and mutation](https://typeshade.dev/guide/internals/values-and-mutation/)

## See also

- [`vec3u()`](https://typeshade.dev/reference/functions/vec3u/)
- [`vec3`](https://typeshade.dev/api/vec3/)

## Source

[`src/core/ir/node.ts`, line 2288](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L2288), at commit af54ddad5
