chsxf/CiderKit.Tween
A pure Swift tweening library that complies with Swift 6 Strict Concurrency
Planned Features and Improvements
- [ ]
SpriteKitspecialized tweens (in progress) - [ ] Bridge to
SKAction - [ ] watchOS Support
- [X] String specialized tweens (between two strings, with scrambled text, etc.)
- [X] Loops
- [X] Sequences
Getting Started
Full documentation | Sample Project
CiderKit.Tween makes heavy use of AsyncStreams. Here is a short usage sample:
import CiderKit_Tween
// Create a linear tween that goes from 0 to 100 linearly over a period of 5 seconds
let tween = Float.tween(from: 0, to: 100, duration: 5)
// ...
Task {
for await updatedValue in tween.onUpdate {
print(updatedValue) // Will print values as the tween updates
}
}Installation with Swift Package Manager
CiderKit.Tween is available through Swift Package Manager.
As a Package Dependency
To install it, simply add the dependency to your Package.swift file:
dependencies: [
.package(url: "https://github.com/chsxf/CiderKit.Tween.git", from: "0.5.0"),
],
targets: [
.target(name: "YourTarget", dependencies: ["CiderKit.Tween"]),
]As a Project Dependency in Xcode
- In Xcode, select File > Add Packages... and enter
https://github.com/chsxf/CiderKit.Tween.gitin the search field (top-right). - Then select Up to Next Major Version as the Dependency Rule with
0.5.0in the associated text field. - Then select the project of your choice in the Add to Project list.
- Finally, click the Add Package button.
Support
Development on CiderKit.Tween is still active.
However, support is not guaranteed in any way. Pull requests or issues are welcomed but you may wait for some time before getting any answer.
License
Unless stated otherwise, all source code and assets are distributed under the MIT License.
Package Metadata
Repository: chsxf/CiderKit.Tween
Homepage: https://chsxf.github.io/CiderKit.Tween/documentation/ciderkit_tween/
Stars: 11
Forks: 0
Open issues: 1
Default branch: main
Primary language: swift
License: MIT
Topics: gamedev, spritekit, swift, swift6, tween
README: README.md