cross()
Function in Builtins
cross(a, b): 3-D cross product of two vec3<f32> values.
import { cross } from 'typeshade/core/ir'
This export returns an IR node. A "use typeshade" file calls the builtin itself: cross()
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
const cross: ( a: ReadonlyNode<"vec3<f32>">, b: ReadonlyNode<"vec3<f32>">,) => Node<"vec3<f32>">Parameters
aReadonlyNode<'vec3<f32>'>bReadonlyNode<'vec3<f32>'>
Return value
Node<'vec3<f32>'>
Targets
| Target | Support | Notes |
|---|---|---|
| WGSL (WebGPU) | Supported |
|
| GLSL ES 3.00 (WebGL2) | Supported |
|
| CPU oracle | Supported | Evaluated in |
See also
Source
src/core/ir/node.ts, line 1626, at commit af54ddad5