Back to Library
Particle Effect System

Particle Effect System

by Luiz Mello

@luizmellodev
particleanimationconfettieffectcelebration

Description

Advanced particle system with confetti, hearts, stars, and custom shapes. Features physics simulation with gravity, customizable colors, sizes, velocities, and emission angles. Includes ready-to-use ConfettiButton and particle emitter modifier.

SwiftUI Code

12 files • Scroll to see all →
struct Particle: Identifiable {
    let id = UUID()
    var position: CGPoint
    var velocity: CGPoint
    var scale: CGFloat
    var rotation: Double
    var opacity: Double
    var color: Color
    var shape: ParticleShape
    var lifetime: TimeInterval
    var age: TimeInterval = 0
}
Viewing: ParticleModel.swift1 of 12