14 lines
429 B
Lua
14 lines
429 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 = colorBlue() |