vec3
Type
A three-component vector of f32.
The signature and the sentence under each name are the compiler's own text at commit 26de7be8.
Syntax
interface vec3 { readonly [vecTag]: readonly ['f32', 3] [index: number]: f32 x: f32 y: f32 z: f32 r: f32 g: f32 b: f32 …}The … line stands for 234 more members, the swizzles. A swizzle reads two to four components as a new vector of the same element type. The components come in any order and may repeat, and their letters come from one set, xyzw or rgba.
Examples
hello-vsin.shade.tshello-uniform-struct.shade.tshello-camera.shade.tstextured-quad.shade.tscube-env.shade.tscube-array-gather.shade.tspalette-const.shade.tsarray-literal-ramp.shade.tsnormal-matrix.shade.tsfp64-lane-stripes.shade.tsbitfield-bands.shade.tsblock-scope.shade.tspick-composite.shade.tscutout.shade.tsdefault-args.shade.tsbit-bump.shade.tspacking-bitcast.shade.tsclosures.shade.tsarray-methods.shade.tspath-tracer.shade.tscapsule-corp-namek-class.shade.tsray-class.shade.tsshape-inheritance.shade.tsmixin-surface.shade.tsgeneric-class.shade.tsclass-builder.shade.tsrt-renderer-class.shade.tshillshade-twin.shade.tsplasma-twin.shade.tsjulia-twin.shade.tsmandelbrot-twin.shade.tskaleidoscope-twin.shade.tsvoronoi-twin.shade.tsfp64-checker-plane-twin.shade.tsfp64-julia-twin.shade.tsfp64-burning-ship-twin.shade.tsfp64-newton-twin.shade.ts