Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Struct · Ara

MeshRenderer

Draws geometry at the entity's interpolated world transform.

public struct MeshRenderer : IComponent<MeshRenderer>

Properties

TypeIndex

public static uint TypeIndex { get; }

Stable engine component index.

Fields

Shape

public MeshShape Shape;

Procedural shape, drawn when model is empty.

Default: "box".

Size

public Vector3 Size;

Shape size: box extents, sphere/capsule diameter in x and capsule height in y, plane extents in x and z.

Unit: m. Range: [0.0001, ∞]. Default: [1,1,1].

Model

public string Model;

Imported model (@path#id of a glTF/FBX source). Its meshes are drawn instead of the shape; skinned meshes follow this entity's Animator.

Default: null.

Node

public string Node;

Source node name or numeric glTF index. name:3 selects a numeric name. The drawable subtree retains source rotation/scale and restores its pivot to the entity origin. Absent selects the complete default scene.

Default: null.

Primitive

public uint? Primitive;

Zero-based primitive within the selected subtree (or whole model).

Default: null.

MaterialOverrides

public PrimitiveMaterialOverride[] MaterialOverrides;

Native material assets by subtree-local primitive slot; omitted slots use the model.

Default: [].

Color

public Color Color;

Linear base color multiplier and opacity.

Default: [1,1,1,1].

Roughness

public float Roughness;

Perceptual roughness.

Range: [0, 1]. Default: 0.6.

Metallic

public float Metallic;

Metalness.

Range: [0, 1]. Default: 0.

Emissive

public Vector3 Emissive;

Default procedural radiance, or an RGB emission multiplier with a model/material asset. Models treat zero RGB as neutral; use emissiveEnabled to switch them off.

HDR colour; values may exceed one. Default: [0,0,0].

EmissiveEnabled

public bool EmissiveEnabled;

Enables emission without modifying the source model or its materials.

Default: true.

EmissiveStrength

public float EmissiveStrength;

Emission multiplier, applied once after the source or overridden factor.

Range: [0, ∞]. Default: 1.

EmissiveFactor

public Vector3? EmissiveFactor;

Optional linear RGB replacement for the source emissive factor, useful for lamps.

HDR colour; values may exceed one. Range: [0, ∞]. Default: null.

EmissiveMaterials

public string[] EmissiveMaterials;

Source material names or numeric indices affected by emissiveFactor. Empty targets all; name:3 disambiguates a numeric material name.

Default: [].

Methods

Access

public static ref MeshRenderer Access(Entity entity, bool write);

No description yet.

Insert

public static void Insert(in Commands commands, Entity entity, in MeshRenderer value);

No description yet.

Contains

public static bool Contains(Entity entity);

No description yet.