Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -3650,10 +3650,12 @@ void Application::exportSettings() { · 3649 unmodified lines | ||
| 3650 | 3650 | } |
| 3651 | 3651 | |
| 3652 | 3652 | |
| 3653 | − | |
| 3654 | 3653 | void Application::updateParticleSystem(float deltaTime) { |
| 3655 | 3654 | |
| 3656 | 3655 | if (!_particleSystemInitialized) { |
| 3656 | + | |
| 3657 | + const int LIFESPAN_IN_SECONDS = 100000.0f; | |
| 3658 | + const float EMIT_RATE_IN_SECONDS = 10000.0; | |
| 3657 | 3659 | // create a stable test emitter and spit out a bunch of particles |
| 3658 | 3660 | _coolDemoParticleEmitter = _particleSystem.addEmitter(); |
| 3659 | 3661 | |
| @@ -3662,9 +3664,9 @@ void Application::updateParticleSystem(float deltaTime) { · 2 unmodified lines | ||
| 3662 | 3664 | glm::vec3 particleEmitterPosition = glm::vec3(5.0f, 1.0f, 5.0f); |
| 3663 | 3665 | |
| 3664 | 3666 | _particleSystem.setEmitterPosition (_coolDemoParticleEmitter, particleEmitterPosition); |
| 3665 | − _particleSystem.setEmitterParticleLifespan(_coolDemoParticleEmitter, 100000.0f); | |
| 3667 | + _particleSystem.setEmitterParticleLifespan(_coolDemoParticleEmitter, LIFESPAN_IN_SECONDS); | |
| 3666 | 3668 | _particleSystem.setEmitterThrust (_coolDemoParticleEmitter, 0.0f); |
| 3667 | − _particleSystem.setEmitterRate (_coolDemoParticleEmitter, 10000.0); // to emit a pile o particles now | |
| 3669 | + _particleSystem.setEmitterRate (_coolDemoParticleEmitter, EMIT_RATE_IN_SECONDS); // to emit a pile o particles now | |
| 3668 | 3670 | } |
| 3669 | 3671 | |
| 3670 | 3672 | // signal that the particle system has been initialized |