add 'global_up_vector' setting

This commit is contained in:
MihailRis 2024-11-05 01:41:17 +03:00
parent 60c9fedb55
commit 87663e597b
2 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,7 @@ dv::value ParticlesPreset::serialize() const {
root["collision"] = collision;
root["lighting"] = lighting;
root["max_distance"] = maxDistance;
root["global_up_vector"] = globalUpVector;
root["spawn_interval"] = spawnInterval;
root["lifetime"] = lifetime;
root["lifetime_spread"] = lifetimeSpread;
@ -51,6 +52,7 @@ void ParticlesPreset::deserialize(const dv::value& src) {
src.at("texture").get(texture);
src.at("collision").get(collision);
src.at("lighting").get(lighting);
src.at("global_up_vector").get(globalUpVector);
src.at("max_distance").get(maxDistance);
src.at("spawn_interval").get(spawnInterval);
src.at("lifetime").get(lifetime);

View File

@ -24,6 +24,8 @@ struct ParticlesPreset : public Serializable {
bool collision = true;
/// @brief Apply lighting
bool lighting = true;
/// @brief Use global up vector instead of camera-dependent one
bool globalUpVector = false;
/// @brief Max distance of actually spawning particles.
float maxDistance = 16.0f;
/// @brief Particles spawn interval