My goal is to create Apples activity ring sparkle effect. So I found Paul Hudson's Vortex library. There is already a spark effect, but I don't know how to create a custom one that fits my needs. I'm still quite new to SwiftUI animations. Does someone have an idea how to do it?
VortexView(createSparkle()) {
Circle()
.fill(.white)
.frame(width: 16)
.tag("circle")
}
func createSparkle() -> VortexSystem {
let system = VortexSystem(tags: ["circle"])
system.birthRate = 150
system.emissionDuration = 0.2
system.idleDuration = 0.5
system.lifespan = 1.5
system.speed = 1.5
system.speedVariation = 0.2
system.angle = .degrees(330)
system.angleRange = .degrees(30)
system.acceleration = [0, 3]
system.dampingFactor = 4
system.colors = .ramp(.white, .yellow, .yellow.opacity(0))
system.size = 0.1
system.sizeVariation = 0.1
system.stretchFactor = 8
return system
}
Vortex project: https://github.com/twostraws/Vortex