Skip to content

Instantly share code, notes, and snippets.

@alsedi
Created September 1, 2016 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alsedi/ddbe88d940089f7c90bc944b861e62f3 to your computer and use it in GitHub Desktop.
Save alsedi/ddbe88d940089f7c90bc944b861e62f3 to your computer and use it in GitHub Desktop.
func animate() {
if shapes.count == 0 {
generateShapes()
}
for i in 0..<shapes.count {
let delay = (i % 2 == 0) ? Double(i+1)/5.5 : Double(i+1)/5.505
shapes[i].animate(duration: 5.0, delay: delay)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment