> 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="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-ecf989e0bcfd8b79e54478bf59ed83f34d67bb51%2Fimage.png?alt=media" 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="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2FvFqQQe59ZmPzkhotrTzn%2Fimage.png?alt=media&amp;token=1b2356c8-9841-43ba-8e07-7a792423b7f8" alt=""><figcaption></figcaption></figure></div>

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

<div align="left"><figure><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2FlNKaigdsPV6bIRVCZGzA%2Fimage.png?alt=media&amp;token=9cb8273b-435a-43e7-8780-c0896b1c7c18" 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="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fa7ETv841hcVIYQMgDsva%2Fimage.png?alt=media&amp;token=f2ec633d-acf0-42e9-bcb4-de9aee4f0e23" alt="" data-size="original"></td></tr><tr><td><strong>OpenCV</strong></td><td>An image for computer vision processing</td><td><img src="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Ft2qIcLf2LaffiN8CpLs1%2Fimage.png?alt=media&amp;token=136a830a-e709-4586-b4eb-8ab7e16e0a52" 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="https://3312042618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVaJpWJhPbmscipukhh%2Fuploads%2Fgit-blob-0fe8a76b4bfb2d39f25bb60f1c9c6aacacdd3edd%2FVariableClors.png?alt=media" 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.
