Skip to content

An advanced version of the official SpriteKit SKLabelNode with handling and animation of each single char

License

Notifications You must be signed in to change notification settings

aornano/SKAdvancedLabelNode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SKAdvancedLabelNode

SKLabelNode with single-handling-chars in Swift

Language Build Status Platform License

Sequentially bouncing zoom animation:

sequentially bouncing zoom animation

Shake:

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..

Features

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

ToDo

  • new animations
  • color blend factor like SKLabelNode
  • blend mode
  • init(attributedText: NSAttributedString?)

Requirements

  • iOS 8.0+
  • Xcode 9.2+
  • Swift 4.0+

Communication

  • 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.

Installation

Add the source file SKAdvancedLabelNode.swift to your project and use it.

Usage

// 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)

License

SKAdvancedLabelNode is released under the MIT License

About

An advanced version of the official SpriteKit SKLabelNode with handling and animation of each single char

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages