An open API service indexing awesome lists of open source software.

https://github.com/coder-acjhp/skpulsator

Pulse animation for SKSpriteNode
https://github.com/coder-acjhp/skpulsator

animation-effects extension pulse-animation spritekit swift-4

Last synced: 2 months ago
JSON representation

Pulse animation for SKSpriteNode

Awesome Lists containing this project

README

          

# SKPulsator


Circle pulse animation for SKSpriteNode as extension







How to use?




  • Add SKPulsator.swift file to your project

  • Call the addPulseEffect() function by adding . after your SKSpriteNode name


Example usage :




import SpriteKit
import GameplayKit

class GameScene: SKScene {

private var pulseNode: SKSpriteNode!

override func didMove(to view: SKView) {

self.backgroundColor = .white
if let node = self.childNode(withName: "anyNode") as? SKSpriteNode {
self.pulseNode = node
}

}

override func touchesBegan(_ touches: Set, with event: UIEvent?) {
self.pulseNode.repeatPulseEffectForEver(circleOfRadius: 80)

//self.pulseNode.addPulseEffect(circleOfRadius: 80, backgroundColor: .red)

}
}

##### And here is UIKit version (lightweight)

License : GNU GENERAL PUBLIC LICENSE V3