Minor tweaks to spark effect
All checks were successful
Build and Publish WASM version of demo / Build-And-Deploy (push) Successful in 25s
All checks were successful
Build and Publish WASM version of demo / Build-And-Deploy (push) Successful in 25s
This commit is contained in:
parent
12cddad260
commit
0bd7e4bbf8
2 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,8 @@
|
||||||
SparkEffect::SparkEffect(int count, float lifetime, Vector3 pos,
|
SparkEffect::SparkEffect(int count, float lifetime, Vector3 pos,
|
||||||
float pos_xz_variance, float radius)
|
float pos_xz_variance, float radius)
|
||||||
: sparks(), lifetime(lifetime), timer(0.0F) {
|
: sparks(), lifetime(lifetime), timer(0.0F) {
|
||||||
|
sparks.reserve(count);
|
||||||
|
|
||||||
Vector3 above_pos = pos;
|
Vector3 above_pos = pos;
|
||||||
above_pos.y += radius;
|
above_pos.y += radius;
|
||||||
for (; count > 0; --count) {
|
for (; count > 0; --count) {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
constexpr float SPARK_RADIUS = 0.03F;
|
constexpr float SPARK_RADIUS = 0.03F;
|
||||||
constexpr float SPARK_VEL_RATE = 5.0F;
|
constexpr float SPARK_VEL_RATE = 5.0F;
|
||||||
constexpr float SPARK_VEL_VARIANCE = 1.0F;
|
constexpr float SPARK_VEL_VARIANCE = 1.0F;
|
||||||
constexpr float SPARK_ACC_RATE = 10.0F;
|
constexpr float SPARK_ACC_RATE = 8.0F;
|
||||||
|
|
||||||
class SparkEffect {
|
class SparkEffect {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue