title: Logo animation using SpriteKit
body: <p>I'm trying to animate a logo that looks like a heartbeat (the following image is not mine, just so you get the idea) : </p>
  
  <p><a href="https://i.stack.imgur.com/2yS0d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2yS0d.png" alt="enter image description here"></a></p>
  
  <p>What I would like is an animation (about 1 second) where this heartbeat draws from left to right.</p>
  
  <p>What I've done so far: 
  - I designed the logo under Sketch 3
  - I created about 30 different images named image[i] that represent the different steps</p>
  
  <p>My code: (in init method to preload the textures)</p>
  
  <pre><code>let logo = SKSpriteNode(imageNamed: "image1")
  let logoAnimation: SKAction
  var textures:[SKTexture] = []
  for i in 1...25 {
      textures.append(SKTexture(imageNamed: "image\(i)"))
  }
  logoAnimation = SKAction.animateWithTextures(textures,
                                                     timePerFrame: 0.1)
  </code></pre>
  
  <p>And inside didMoveToView : </p>
  
  <pre><code>logo.runAction(logoAnimation)
  </code></pre>
  
  <p>But the animation looks kind of bad, laggy...</p>
  
  <p>Is this because I added too many frames ? Or not enough ? Is there a better way to create this kind of animation ?</p>
  
  <p>Thanks for your help</p>