mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add 'spawn_spread' and 'spawn_shape'
This commit is contained in:
parent
86b83a5377
commit
39893ee940
4 changed files with 68 additions and 2 deletions
|
|
@ -4,6 +4,21 @@
|
|||
|
||||
#include "interfaces/Serializable.hpp"
|
||||
|
||||
enum ParticleSpawnShape {
|
||||
/// @brief Coordinates are regulary distributed within
|
||||
/// the volume of a ball.
|
||||
BALL = 0,
|
||||
/// @brief Coordinates are regulary distributed on
|
||||
/// a sphere.
|
||||
SPHERE,
|
||||
/// @brief Coordinates are uniform distributed within
|
||||
/// the volume of a box.
|
||||
BOX
|
||||
};
|
||||
|
||||
std::string to_string(ParticleSpawnShape shape);
|
||||
ParticleSpawnShape ParticleSpawnShape_from(std::string_view s);
|
||||
|
||||
struct ParticlesPreset : public Serializable {
|
||||
/// @brief Collision detection
|
||||
bool collision = true;
|
||||
|
|
@ -25,6 +40,10 @@ struct ParticlesPreset : public Serializable {
|
|||
glm::vec3 explosion {2.0f};
|
||||
/// @brief Particle size
|
||||
glm::vec3 size {0.1f};
|
||||
/// @brief Spawn spread shape
|
||||
ParticleSpawnShape spawnShape;
|
||||
/// @brief Spawn spread
|
||||
glm::vec3 spawnSpread {};
|
||||
/// @brief Texture name
|
||||
std::string texture = "";
|
||||
/// @brief Size of random sub-uv region
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue