---
title: "init(elements:indices:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/meshbuffer/init(elements:indices:)"
---

# init(elements:indices:)

Create buffer from an array of element values and an array of indices into that value array.

## Declaration

```swift
init(elements: [Element], indices: [UInt32])
```
