> For the complete documentation index, see [llms.txt](https://docs.lightact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lightact.com/layers-and-layouts/layer-layouts/variables.md).

# Variables

There are 2 categories of variables:

* **Layer variables**: accessible only within one layer
* **Global variables**: accessible throughout LightAct and also WebUI.

Regardless of this category they have some things in common.

## All variables hold data or content

<div align="left"><figure><img src="/files/sFggxaSY2rAHpCcbgyjR" alt=""><figcaption></figcaption></figure></div>

For example, every variable can hold only one type of a information. When we say information, we mean either data (a number, for example) or texture (also referred as content).

Below are 2 examples:

<div align="left"><figure><img src="/files/D0Chz4p8aYRx3Cq6qTsL" alt=""><figcaption></figcaption></figure></div>

*Resolution* variable always holds 2 whole numbers (integer) representing **resolution**.

<div align="left"><figure><img src="/files/HqQel8tOM8yrpuUPRyK8" alt=""><figcaption></figcaption></figure></div>

*Texture* variable holds a **texture**.

### Types of variables

Each variable type therefore holds a different type of data. The list is explained below:

<table><thead><tr><th>Variable type</th><th width="341">Description</th><th>Example</th></tr></thead><tbody><tr><td><strong>Float</strong></td><td>Number with a decimal point</td><td>1.6314</td></tr><tr><td><strong>Integer</strong></td><td>Whole number</td><td>5</td></tr><tr><td><strong>Boolean</strong></td><td>True or false (represented as a checkbox)</td><td>True</td></tr><tr><td><strong>String</strong></td><td>Text</td><td>Hello world!</td></tr><tr><td><strong>Color</strong></td><td>RGBA representation of color where 0 is 0 and 1 is full</td><td>[1.0,1.0,1.0,1.0] (white)</td></tr><tr><td><strong>Texture</strong></td><td>A pointer to a texture in the VRAM of the GPU</td><td><img src="/files/v8oeNflqM4PD7CG8yz6n" alt="" data-size="original"></td></tr><tr><td><strong>OpenCV</strong></td><td>An image for computer vision processing</td><td><img src="/files/4B1c91qAxkBjuBAyTQKn" alt="" data-size="original"></td></tr><tr><td><strong>Vec2</strong></td><td>A vector of 2 floats</td><td>[1.231, 10.231]</td></tr><tr><td><strong>Vec3</strong></td><td>A vector of 3 floats</td><td>[543.12,-1.231,5.000]</td></tr><tr><td><strong>Vec2 array</strong></td><td>An array of Vec2</td><td>NA</td></tr><tr><td><strong>Vec3 array</strong></td><td>An array of Vec2</td><td>NA</td></tr><tr><td><strong>Transform</strong></td><td>A vector of: Vec3 representing Position, Vec3 representing Rotation, Vec3 representing Scale</td><td>NA</td></tr><tr><td><strong>Transform array</strong></td><td>An array of transforms</td><td>NA</td></tr><tr><td><strong>Resolution</strong></td><td>A vector of 2 integers representing resolution</td><td>[1920,1080]</td></tr><tr><td><strong>Timecode</strong></td><td>A HMSF representation of time</td><td>[00:02:12:32]</td></tr><tr><td><strong>Canvas</strong></td><td>A reference to a canvas (obsolete)</td><td>NA</td></tr><tr><td><strong>Mapping</strong></td><td>A reference to a mapping</td><td>NA</td></tr><tr><td><strong>Viewport object</strong></td><td>A reference to a viewport object</td><td>NA</td></tr><tr><td><strong>LA Object</strong></td><td>A reference to all kinds of objects in LightAct: Timeline, Section, Layer, Marker, Video output</td><td>NA</td></tr><tr><td><strong>Device</strong></td><td>A reference to a Device node</td><td>NA</td></tr><tr><td><strong>Camera properties</strong></td><td>An array of values representing properties of a camera: Position, Rotation, FOV, Aspect ratio, Near clip, Far clip</td><td>NA</td></tr><tr><td><strong>Asset</strong></td><td>A reference to an Asset. There are several types: Video, 3D model, Audio, Notch block, Unreal, TouchDesigner component</td><td>NA</td></tr><tr><td><strong>Event</strong></td><td>A Lifeline type</td><td>NA</td></tr></tbody></table>

## All variables can be referenced in Layouts

<div align="left"><img src="/files/yPvZb1Fi8X7sK58z57Kg" alt=""></div>

Almost every variable type has a corresponding connection type represented by the same color. These connections serve to pass the value of the variable between different nodes in the Layout.
