> ## Documentation Index
> Fetch the complete documentation index at: https://rive-docs-scripting-mesh-buffers.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VertexBuffer

Stores a list of 2D vertex positions for use with image meshes.

```lua theme={null}
local vb = VertexBuffer()
```

## Methods

### `add`

<div class="signature">
  ```lua theme={null}
  add(...Vector) -> ()
  ```
</div>

Adds one or more vertices to the buffer.

```lua theme={null}
local vb = VertexBuffer()
vb:add(Vector.xy(0, 0), Vector.xy(1, 0), Vector.xy(1, 1))
```

### `reset`

<div class="signature">
  ```lua theme={null}
  reset() -> ()
  ```
</div>

Clears all vertices from the buffer.

```lua theme={null}
local vb = VertexBuffer()
vb:reset()
```
