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
- Host: GitHub
- URL: https://github.com/coder-acjhp/skpulsator
- Owner: Coder-ACJHP
- License: gpl-3.0
- Created: 2018-09-17T20:25:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-03T12:22:36.000Z (almost 7 years ago)
- Last Synced: 2025-03-13T13:14:05.004Z (12 months ago)
- Topics: animation-effects, extension, pulse-animation, spritekit, swift-4
- Language: Swift
- Size: 641 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 GameplayKitclass 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