vec3
On this page

vec3()

Function in Builtins

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

import { vec3 } from 'typeshade'

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

Syntax

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

Parameters

...a NodeLike[]

Return value

Node<'vec3<f32>'>

Description

Bare number components lift to f32.

Examples

Example

import { vec3 } from 'typeshade'
const rgb = vec3(1, 0, 0) // Node<'vec3<f32>'>

In the guide

Source

src/core/ir/node.ts, line 2504, at commit 26de7be8

Edit this page Report a problem