Files
dusk/assets/entity/test.lua
T
2026-04-14 16:36:50 -05:00

14 lines
428 B
Lua

module('entity')
module('entityposition')
module('entitymaterial')
module('glm')
module('color')
-- Position
local posComp = entityAddComponent(ENTITY_ID, COMPONENT_TYPE_POSITION)
entityPositionSetPosition(ENTITY_ID, posComp, vec3(1, 2, 3))
-- Material
local matComp = entityAddComponent(ENTITY_ID, COMPONENT_TYPE_MATERIAL)
local material = entityMaterialGetShaderMaterial(ENTITY_ID, matComp)
material.unlit.color = COLOR_BLUE