Fracture impl

This commit is contained in:
Anuken
2021-12-08 20:19:46 -05:00
parent acb4593390
commit 36dc0e9e3e
7 changed files with 59 additions and 26 deletions

View File

@@ -1458,6 +1458,20 @@ public class Fx{
});
}),
randLifeSpark = new Effect(24f, e -> {
color(Color.white, e.color, e.fin());
stroke(e.fout() * 1.5f + 0.5f);
rand.setSeed(e.id);
for(int i = 0; i < 15; i++){
float ang = e.rotation + rand.range(9f), len = rand.random(90f * e.finpow());
e.scaled(e.lifetime * rand.random(0.5f, 1f), p -> {
v.trns(ang, len);
lineAngle(e.x + v.x, e.y + v.y, ang, p.fout() * 7f + 0.5f);
});
}
}),
//TODO just make it properly colored...
tungstenSpark = new Effect(23f, e -> {
color(Color.white, Pal.tungstenShot, e.fin());