Celebration.component
README.md
Celebration
Confetti and twinkling sparkles over a winner. Put it on an entity at the floor point under the shower: count pieces fall over a circle of radius metres from height metres up, in the palette colours (party, gold, silver, bronze). mode "rain" keeps them falling; "burst" fires them up once from the floor. burst() fires another burst at any time. The confetti is one mesh rewritten each frame, so it is one draw call, and it is seeded by seed so every player sees the same shower. It animates while the game plays, and in the editor too when preview is on. It needs no other components.
local e = entity.spawn("party", { position = { 0, 1.3, 0 } })
e.component.add("Celebration", { palette = "gold" })
e.component.get("Celebration"):burst()