<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ClothMeshResource/init(positions:triangleIndices:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:22RealityFoundationCloth0C12MeshResourceC9positions15triangleIndicesACSays5SIMD3VySfGG_Says6UInt32VGtKcfc"
  },
  "title" : "init(positions:triangleIndices:)"
}
-->

# init(positions:triangleIndices:)

Creates a cloth mesh resource from the given vertex positions and triangle indices.

```
@MainActor convenience init(positions: [SIMD3<Float>], triangleIndices: [UInt32]) throws
```

## Parameters

`positions`

Positions for the vertices of the mesh.

`triangleIndices`

Indices of the vertices forming the triangle primitives of the mesh.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)