mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
add particles.emit(...) (WIP)
This commit is contained in:
parent
9728c674fc
commit
c8187c5f25
14 changed files with 125 additions and 47 deletions
|
|
@ -11,8 +11,20 @@ struct ParticlesPreset : public Serializable {
|
|||
bool lighting = true;
|
||||
/// @brief Max distance of actually spawning particles.
|
||||
float maxDistance = 32.0f;
|
||||
/// @brief Particles spawn interval
|
||||
float spawnInterval = 0.1f;
|
||||
/// @brief Particle life time
|
||||
float lifetime = 5.0f;
|
||||
/// @brief Initial velocity
|
||||
glm::vec3 velocity {};
|
||||
/// @brief Velocity acceleration
|
||||
glm::vec3 acceleration {0.0f, -16.0f, 0.0f};
|
||||
/// @brief Random velocity magnitude applying to spawned particles.
|
||||
glm::vec3 explosion {2.0f};
|
||||
/// @brief Particle size
|
||||
glm::vec3 size {0.1f};
|
||||
/// @brief Texture name
|
||||
std::string texture = "";
|
||||
|
||||
dv::value serialize() const override;
|
||||
void deserialize(const dv::value& src) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue