Log inGet started
Package

ecs.module

Newest version

This package holds more than this page lists. See all of its files in its world.

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 })