Log inGet started
Package

components.module

Newest version

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

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