14 entt::meta_factory<light_component>{}
15 .type(
"light_component"_hs)
35 try_save(ar, ser20::make_nvp(
"light", obj.get_light()));
43 try_load(ar, ser20::make_nvp(
"light", l));
65 entt::meta_factory<skylight_component::sky_mode>{}
71 .data<skylight_component::sky_mode::standard>(
"standard"_hs)
76 .data<skylight_component::sky_mode::perez>(
"perez"_hs)
81 .data<skylight_component::sky_mode::skybox>(
"skybox"_hs)
88 entt::meta_factory<skylight_component>{}
89 .type(
"skylight_component"_hs)
105 .data<&skylight_component::set_turbidity, &skylight_component::get_turbidity>(
"turbidity"_hs)
111 entt::attribute{
"tooltip",
"Adjusts the clarity of the atmosphere. Lower values (1.9) result in a clear, blue sky, while higher values (up to 10) create a hazy, diffused appearance with more scattering of light.."},
114 .data<&skylight_component::set_cubemap, &skylight_component::get_cubemap>(
"cubemap"_hs)
124 try_save(ar, ser20::make_nvp(
"mode", obj.get_mode()));
125 try_save(ar, ser20::make_nvp(
"turbidity", obj.get_turbidity()));
126 try_save(ar, ser20::make_nvp(
"cubemap", obj.get_cubemap()));
134 if(
try_load(ar, ser20::make_nvp(
"mode", mode)))
140 if(
try_load(ar, ser20::make_nvp(
"turbidity", turbidity)))
142 obj.set_turbidity(turbidity);
146 if(
try_load(ar, ser20::make_nvp(
"cubemap", cubemap)))
148 obj.set_cubemap(cubemap);
Class that contains core light data, used for rendering and other purposes.
void set_light(const light &l)
Sets the light object.
auto get_light() const -> const light &
Gets the light object.
Class that contains sky light data.
void set_mode(const sky_mode &mode)
Sets the sky mode.
auto get_mode() const noexcept -> const sky_mode &
Gets the current sky mode.
sky_mode
Enumeration for sky modes.
attributes::value_type attribute
std::map< std::string, meta_any > attributes
auto property_predicate(property_predicate_t predicate) -> property_predicate_t
BinaryInputArchive iarchive_binary_t
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
Represents a handle to an asset, providing access and management functions.
Struct representing a light.