1#include "scene/components/LightComponent.h"
14 if (json.contains(
"color"))
16 auto c = json[
"color"];
17 glm::vec3 color(c.value(
"r", 1.0f), c.value(
"g", 1.0f), c.value(
"b", 1.0f));
void LoadProperties(const nlohmann::json &json) override
void SetColor(const vec3 &color)
Set the light's emission colour.
void Update(f32 deltaTime) override
No per-frame computation needed; position is queried from owner on demand.
const vec3 & GetColor() const
Returns the linear RGB colour of this light (default: white {1,1,1}).
glm::vec3 vec3
3-component float vector (e.g. world position, RGB colour, normals).
float f32
32-bit IEEE float — the standard GL scalar type.