Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit8d45df8664

README.md

ecs.Mesh

Component spec for ecs.Mesh, which maps to the native MeshInstance — the renderable mesh attached to an entity. The constructor ecs.Mesh{...} builds a value the generic ecs verbs (ecs.insert / ecs.set / ecs.get) apply. mesh takes a GPU MeshHandle obtained from meshRef:handle(); the remaining fields cover visibility, tinting, outline, morph weighting, and shadow participation.

Fields

  • mesh: MeshHandle — the GPU mesh to render.
  • visible: boolean?
  • weightInfluence: number? — morph-target weight influence.
  • tint: { number }? — {r, g, b}.
  • tintBlend: number?
  • outline: { number }? — {r, g, b}.
  • outlineIntensity: number?
  • castsShadows: boolean?
  • receivesShadows: boolean?

Usage

local handle = meshRef:handle()
ecs.insert(id, ecs.Mesh{ mesh = handle, tint = { 1, 0, 0 }, castsShadows = true })