Contents

MeshResource

A high-level representation of a collection of vertices and edges that define a shape.

Declaration

@MainActor @preconcurrency class MeshResource

Mentioned in

Overview

Use MeshResource to create procedural geometry from built-in primitives like boxes, spheres, planes, and cylinders, or from custom mesh data. Assign a mesh resource to an entity’s ModelComponent alongside an array of Material instances to render the shape in a scene.

Check expectedMaterialCount to determine how many materials the mesh requires.

Topics

Creating a mesh resource

Creating a low level resource

Configuring the resource

Accessing resource data

Getting a bounding box

Creating a box

Creating a plane

Creating a primitive shape

Creating a text mesh resource

Creating a 3D mesh by extruding a 2D path

Creating a mesh from an anchor

Structures

Initializers

Instance Methods

Type Aliases

Type Methods

See Also

Model display