Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit8d45df8664

README.md

ecs.Material

Component spec for ecs.Material, which maps to the native MaterialRef — the material bound to an entity's mesh. The single field material takes a GPU MaterialHandle obtained from materialRef:handle(). The constructor ecs.Material{...} builds a value the generic ecs verbs (ecs.insert / ecs.set / ecs.get) apply.

Fields

  • material: MaterialHandle — the GPU material to apply.

Usage

local handle = materialRef:handle()
ecs.insert(id, ecs.Material{ material = handle })