Skip to content

ryanlintott/DefibHeart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

DefibHeart

We spend a lot of time looking at heart icons but not thinking about the organ they represent. I've had my life saved by a defibrillator and I now have one with me at all times in the form of a pacemaker. I thought it would be a nice to use a defib to bring a heart animation to life.

Defib Heart

Submission for SwiftUISeries - Animations

How does it work?

  • All values are linked to a single size value so it can easily be resized.
  • I created an enum called Keyframe and cycled through the values to trigger each key of the animation in sequence. The delay parameter ensures each keyframe is appropriately staggered.
  • The beating heart at the end was a bit tricky and required a local .animation modifier to override the other animations.
  • The shapes are each drawn separately with some help from package I made called:
ShapeUp Logo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages