{"id":2305,"url":"https://github.com/eure/Animo","last_synced_at":"2025-08-02T23:32:50.517Z","repository":{"id":56902029,"uuid":"43249303","full_name":"eure/Animo","owner":"eure","description":"Bring life to CALayers with SpriteKit-like animation builders","archived":false,"fork":false,"pushed_at":"2019-04-12T09:09:33.000Z","size":85,"stargazers_count":282,"open_issues_count":6,"forks_count":27,"subscribers_count":90,"default_branch":"master","last_synced_at":"2024-11-14T00:36:15.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-27T14:19:20.000Z","updated_at":"2024-01-29T18:13:21.000Z","dependencies_parsed_at":"2022-08-21T01:50:38.279Z","dependency_job_id":null,"html_url":"https://github.com/eure/Animo","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eure%2FAnimo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eure%2FAnimo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eure%2FAnimo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eure%2FAnimo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eure","download_url":"https://codeload.github.com/eure/Animo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503171,"owners_count":17930527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:10.381Z","updated_at":"2024-12-06T17:30:57.804Z","avatar_url":"https://github.com/eure.png","language":"Swift","funding_links":[],"categories":["UI","Libs","Animation"],"sub_categories":["Animation","Other free courses"],"readme":"# Animo\n[![Version](https://img.shields.io/cocoapods/v/Animo.svg?style=flat)](http://cocoadocs.org/docsets/Animo)\n[![Platform](https://img.shields.io/cocoapods/p/Animo.svg?style=flat)](http://cocoadocs.org/docsets/Animo)\n[![License](https://img.shields.io/cocoapods/l/Animo.svg?style=flat)](https://raw.githubusercontent.com/eure/Animo/master/LICENSE)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n\nBring life to CALayers with SpriteKit-like animation builders.\n\n![preview](https://cloud.githubusercontent.com/assets/3029684/11888561/1df51b40-a582-11e5-85c4-564a7f39ca08.gif)\n\n## Why use Animo?\nBecause declaring `CAAnimation`s (especially with `CAAnimationGroup`s) is very verbose and tedious.\n\nAnimo turns this:\n```swift\nlet positionAnimation = CABasicAnimation(keyPath: \"position\")\npositionAnimation.fromValue = NSValue(CGPoint: fromPoint)\npositionAnimation.toValue = NSValue(CGPoint: toPoint)\n\nlet colorAnimation = CABasicAnimation(keyPath: \"backgroundColor\")\ncolorAnimation.fromValue = fromColor.CGColor\ncolorAnimation.toValue = toColor.CGColor\n\nlet animationGroup = CAAnimationGroup()\nanimationGroup.animations = [positionAnimation, colorAnimation]\nanimationGroup.fillMode = kCAFillModeForwards\nanimationGroup.removedOnCompletion = false\nanimationGroup.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)\n\nsomeView.layer.addAnimation(animationGroup, forKey: \"animationGroup\")\n```\nto this:\n```\nsomeView.layer.runAnimation(\n    Animo.group(\n        Animo.move(from: fromPoint, to: toPoint, duration: 1),\n        Animo.keyPath(\"backgroundColor\", from: fromColor, to: toColor, duration: 1),\n        timingMode: .EaseInOut,\n        options: Options(fillMode: .Forwards)\n    )\n)\n```\n\n## Feature List\n- All timing modes from [http://easings.net/](http://easings.net/) are implemented.\n- Choose how to mix your animations with grouping utilities:\n    - `group(...)`\n    - `sequence(...)`\n    - `autoreverse(...)`\n    - `wait(...)`\n    - `replay(...)` and `replayForever(...)`\n- No need to box native types and struct types in `NSValue`s! Animo will do that for you for:\n    - `Int8`\n    - `Int16`\n    - `Int32`\n    - `Int64`\n    - `UInt8`\n    - `UInt16`\n    - `UInt32`\n    - `UInt64`\n    - `Int`\n    - `UInt`\n    - `CGFloat`\n    - `Double`\n    - `Float`\n    - `CGPoint`\n    - `CGSize`\n    - `CGRect`\n    - `CGAffineTransform`\n    - `CGVector`\n    - `CATransform3D`\n    - `UIEdgeInsets`\n    - `UIOffset`\n    - `NSRange`\n- No need to bother between `CGColor` and `UIColor`! Animo automatically converts the following types for you so you can just use UIKit objects all the time:\n    - `UIColor` → `CGColor`\n    - `UIImage` → `UIImage`\n    - `UIBezierPath` → `CGPath`\n- Don't bother type-casting `M_PI` anymore and just use Degrees-to-Radians (and vice-versa) extensions for `CGFloat`, `Double`, and `Float`!\n\nHere's a slightly complex animation that showcases what else you can do with Animo:\n```swift\nsomeView.layer.runAnimation(\n    Animo.sequence( // Runs a list of animations in sequence\n        Animo.wait(1), // Waits for a certain interval before running the next animation\n        Animo.replayForever( // Replays the animation endlessly\n            Animo.sequence(\n                Animo.move( // Moves the layer's position\n                    by: CGPoint(x: 100, y: 200), // \"by\", \"from\", and \"to\" arguments are supported\n                    duration: 2,\n                    timingMode: .Spring(damping: 1) // simplistic spring function that doesn't rely on physics\n                ),\n                Animo.rotateDegrees( // Rotates the layer (degrees and radians variants are supported)\n                    by: -180,\n                    duration: 1,\n                    timingMode: .EaseInOutBack\n                ),\n                Animo.autoreverse( // Auto-reverses the animation\n                    Animo.keyPath(\n                        \"cornerRadius\", // Any custom KVC key is supported as well!\n                        to: 10,\n                        duration: 1,\n                        timingMode: .EaseInOutBack\n                    )\n                ),\n                Animo.group( // Runs multiple animations together\n                    Animo.scaleX(\n                        by: 2,\n                        duration: 1,\n                        timingMode: .EaseInOutBack\n                    ),\n                    Animo.scaleY(\n                        by: 0.5,\n                        duration: 1,\n                        timingMode: .EaseInOutBack\n                    )\n                ),\n                Animo.wait(1),\n                Animo.move(\n                    by: CGPoint(x: -100, y: -200),\n                    duration: 2,\n                    timingMode: .EaseInOutBack\n                ),\n                Animo.rotateDegrees(\n                    by: 180,\n                    duration: 1,\n                    timingMode: .EaseInOutBack\n                ),\n                Animo.group(\n                    Animo.scaleX(\n                        to: 1,\n                        duration: 1,\n                        timingMode: .EaseInOutBack\n                    ),\n                    Animo.scaleY(\n                        to: 1,\n                        duration: 1,\n                        timingMode: .EaseInOutBack\n                    )\n                )\n            )\n        )\n    )\n)\n```\n\n### Install with CocoaPods\nAdd\n```\npod 'Animo'\n```\nto your `Podfile` and run `pod install`\n\n### Install with Carthage\nAdd\n```\ngithub \"eure/Animo\" \u003e= 1.2.0\n```\nto your `Cartfile` and run `carthage update`\n\n### Install as Git Submodule\nRun\n```\ngit submodule add https://github.com/eure/Animo.git \u003cdestination directory\u003e\n```\n\n#### To install as a framework:\nDrag and drop **Animo.xcodeproj** to your project.\n\n#### To include directly in your app module:\nAdd all *.swift* files to your project.\n\n\n## License\n\nAnimo is released under an MIT license. See the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feure%2FAnimo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feure%2FAnimo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feure%2FAnimo/lists"}