Repository navigation
Releases: BigTsung/SwiftUI-Motion-Library
Release list
0.6.0 · Swift 6 ready, tidier API
Swift 6 ready, and a more consistent API.
.package(url: "https://github.com/BigTsung/SwiftUI-Motion-Library", from: "0.6.0")Swift 6
Effects copied into an app that uses the Swift 6 language mode (with or without MainActor default isolation) failed to compile with "conformance … crosses into main actor-isolated code". Every path(in:) and animatableData is now nonisolated, and all 129 copyable effects compile in Swift 5, Swift 6, and Swift 6 with MainActor default isolation.
⚠️ Breaking: speed is now always a multiplier
speed: 1 is the default pace, 2 twice as fast, 0.5 half as fast. These effects used absolute units before. If you passed speed: to one of them, divide your value by the old default:
| Effect | Old default (unit) | New value = old ÷ |
|---|---|---|
MarqueeText |
40 (pt/s) | 40 |
MarqueeWall |
24 (pt/s) | 24 |
CircularText |
20 (°/s) | 20 |
Flock |
90 (pt/s) | 90 |
ParticleField |
14 (pt/s) | 14 |
Starfield |
0.35 | 0.35 |
RetroGrid |
0.8 (rows/s) | 0.8 |
WarpTunnel |
1.2 (rings/s) | 1.2 |
WeightWaveText |
0.6 (waves/s) | 0.6 |
TopographicLines |
0.12 | 0.12 |
AuroraBackground |
0.4 | 0.4 |
VoronoiCells |
0.6 | 0.6 |
For example MarqueeText(title, speed: 60) becomes MarqueeText(title, speed: 1.5). If you never passed speed:, nothing changes.
Renamed (old names still work, with a deprecation warning and a fix-it)
| Before | After |
|---|---|
StatusButton(…, tint:) |
StatusButton(…, color:) |
HoldToConfirmButton(…, fillColor:) |
HoldToConfirmButton(…, color:) |
RainOnGlass(tint:) |
RainOnGlass(color:) |
SlidingTabs(…, tint:) |
SlidingTabs(…, color:) |
.liquid(tint:), LiquidToggleStyle(tint:) |
.liquid(color:), LiquidToggleStyle(color:) |
NetworkBackground(interactive:) |
NetworkBackground(isInteractive:) |
.burst(…, isEnabled:) |
.burst(…, isActive:) |
.inkBleed(from:) |
.inkBleed(origin:) |
TypewriterText(…, interval: .milliseconds(60)) |
TypewriterText(…, interval: 0.06) (seconds) |
MotionButtonStatus |
StatusButton.Status |
SwipeDirection |
SwipeCardDirection |
The deprecated names will be removed in 1.0.
Localised button titles
StatusButton, DownloadButton, SlideToConfirm and HoldToConfirmButton take a LocalizedStringKey (looked up in your app's strings) or any String, like SwiftUI's Button.
Also
- README: animated hero mosaic at the top, plus a social preview image (
Docs/social-preview.png). - Fixed three README GIFs that were recorded frozen (holographic card, like button, liquid toggle); the recorder now fails on a frozen GIF.
繁體中文摘要
- 支援 Swift 6:直接複製到 Swift 6 App 的效果,現在都能直接編譯,包含預設 MainActor 隔離的專案。
⚠️ 破壞性變更:speed一律改為倍率(1 = 預設速度)。如果你曾經對上表 12 個效果傳入speed:,請把原本的數值除以表中的舊預設值。沒傳過就不受影響。- 名稱統一:顏色參數一律叫
color,另有幾個參數和型別改名。舊名稱仍然可以用,只會出現 deprecated 警告,Xcode 可以一鍵修正;1.0 時會移除。 - 按鈕標題支援多語系:可以傳
LocalizedStringKey或String。
0.5.0
27 new effects, and every effect can now be copied into an app on its own.
New effects
- Text: Liquid Fill Text
- Button: Pull Cord
- Card & Group: Island Pill, Hover Lift, Marquee Wall, Photo Develop
- Background: Network, Topographic Lines, Day & Night Sky
- Number: Contribution Grid, Analog Clock
- Particle & 3D: Flock, Ink Trail, Rain on Glass, Orbits
- Transition: Ink Bleed, Zoom Blur
- Shader (
MotionShaders): Disintegrate, Genie, Glass Lens, Swirl, Kaleidoscope, Halftone, Dither, Thermal Vision, Flag Wave, Voronoi Cells
Copy without the package
- Helpers shared by several effects moved to
Sources/MotionLibrary/Support/, so each effect compiles from its own file plus the helpers listed for it. - The README,
llms.txt,llms-full.txt, the Agent Skill, the catalog JSON (files) and the MCP server list the extra files each effect needs. Scripts/check-standalone.shchecks that every effect compiles from just those files.
Other changes
- README: every effect links to its source, long API names no longer push the grid off the page, and there's a ready-to-paste prompt for AI assistants.
- Install with
from:a version instead of themainbranch.
.package(url: "https://github.com/BigTsung/SwiftUI-Motion-Library", from: "0.5.0")新增 27 個效果(包含 10 個 Metal 著色器),並且每個效果現在都能單獨複製到 App 裡使用:共用的 helper 移到 Support/,文件會列出每個效果需要一起複製的檔案。
0.4.0
The first tagged release: 118 motion effects in 9 categories, each with a live demo, usage code and an AI prompt.
Highlights
- Effects for text, buttons, cards, shapes, backgrounds, numbers, particles & 3D and transitions, all pure SwiftUI with zero dependencies.
MotionShaders, an optional product with Metal shader effects: water ripple, pixellate, chromatic aberration, CRT, heat haze, noise dissolve.MotionGallery, a browser UI to filter effects by component and trigger, replay them and copy their code.- Reduce Motion support for everything that loops or moves a lot.
- For AI coding tools:
llms.txt,llms-full.txt, an Agent Skill, a Cursor rule and an MCP server, all generated from the catalog. - An iOS demo app with full-screen scroll examples and UI tests.
.package(url: "https://github.com/BigTsung/SwiftUI-Motion-Library", from: "0.4.0")第一個正式版本:9 個類別共 118 個動態效果,每個都有即時 Demo、用法程式碼和 AI 提示詞。純 SwiftUI、零依賴,另有選用的 Metal 著色器效果和 Gallery 瀏覽介面。