Structure

ModelComponent

A collection of resources that create the visual appearance of an entity.

Declaration

struct ModelComponent

Topics

Creating a Model Component

init(mesh: MeshResource, materials: [Material])

Creates a model component from a mesh and a collection of materials.

Specifying a Mesh

var mesh: MeshResource

The mesh that defines the shape of the entity.

class MeshResource

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

Configuring the Material

var materials: [Material]

The materials used by the model.

struct SimpleMaterial

A basic material that you can apply to meshes.

struct UnlitMaterial

A simple material that doesn’t respond to lights in the scene.

struct OcclusionMaterial

An invisible material that hides objects rendered behind it.

protocol Material

A type that describes the material aspects of a mesh, like color and texture.

enum MaterialColorParameter

The color parameter applied to a material.

enum MaterialScalarParameter

The scalar parameter applied to a material.

Registering a Component Type

static func registerComponent()

Registers a new component type.

Relationships

Conforms To

See Also

Configuring the Model

var model: ModelComponent?

The model component for the model entity.

var jointNames: [String]

The names of all the joints in the model entity.

var jointTransforms: [Transform]

The relative joint transforms of the model entity.

protocol HasModel

An interface that provides meshes and materials to define the visual appearance of an entity.