MeshColorMapping

ceramic.MeshColorMapping (Abstract)

Defines how colors are mapped to a mesh's geometry.

This enum controls the color mapping strategy for Mesh objects, determining whether colors are applied uniformly, per-triangle, or per-vertex. The choice affects both visual appearance and performance.

var mesh = new Mesh();

// Single color for entire mesh
mesh.colorMapping = MESH;
mesh.color = Color.RED;

// Different color per index
mesh.colorMapping = INDICES;
mesh.colors = [Color.RED, Color.GREEN, Color.BLUE]; // one per index

// Color per vertex (for gradients)
mesh.colorMapping = VERTICES;
mesh.colors = [Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW];
See: Mesh The mesh class that uses this color mapping

Metadata

Name Parameters
:hxGen -
:enum -