SKLabelNode with single-handling-chars in Swift
Sequentially bouncing zoom animation:
Shake:
SKAdvancedLabelNode is a library written in Swift to improve the actual SpriteKit SKLabelNode
class. It contains an array of each single char of your text re-builded as a SKLabelNode
with one char to permit to animate or handling a single char of your label, few chars or all chars of text. This opens up the possibilities to create CGPath
where your char comes for example from different points of screen using for example UIScreen.main.bounds.size
as reference to adjust points..
Creating a New Label Node:
- init(fontNamed: String?)
Initializes a new label object with a specified font.
- init(text: String?)
Initializes a new label object with a text string.
-
lineSpacingFactor
(to adjust space between letters) - sequentially bouncing zoom animation
- shake
- new animations
- color blend factor like
SKLabelNode
- blend mode
-
init(attributedText: NSAttributedString?)
- iOS 8.0+
- Xcode 9.2+
- Swift 4.0+
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
Add the source file SKAdvancedLabelNode.swift
to your project and use it.
// horizontal alignment : left
var advLabel = SKAdvancedLabelNode(fontNamed:"Optima-ExtraBlack")
advLabel.name = "advLabel"
advLabel.text = "labelTxt"
advLabel.fontSize = 20.0
advLabel.fontColor = .green
advLabel.horizontalAlignmentMode = .left
addChild(self.advLabel)
advLabel.position = CGPoint(x:frame.width / 2.5, y:frame.height*0.70)
advLabel.sequentiallyBouncingZoom(delay: 0.3,infinite: true)
SKAdvancedLabelNode is released under the MIT License