{"id":2355,"url":"https://github.com/roberthein/Ease","last_synced_at":"2025-08-06T13:31:53.211Z","repository":{"id":43308481,"uuid":"114154762","full_name":"roberthein/Ease","owner":"roberthein","description":"It's magic.","archived":false,"fork":false,"pushed_at":"2020-07-14T19:30:10.000Z","size":82220,"stargazers_count":1261,"open_issues_count":2,"forks_count":41,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-13T14:45:54.486Z","etag":null,"topics":["animation","animations","ease","easing","event","events","gyroscope","observable","observables","observe","observer","observer-pattern","scenekit","spring","spring-animation","swift","swift-5","swift5","system","uiscrollview"],"latest_commit_sha":null,"homepage":"","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/roberthein.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":"2017-12-13T18:24:55.000Z","updated_at":"2024-09-25T04:55:24.000Z","dependencies_parsed_at":"2022-07-19T08:47:44.431Z","dependency_job_id":null,"html_url":"https://github.com/roberthein/Ease","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roberthein%2FEase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roberthein%2FEase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roberthein%2FEase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roberthein%2FEase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roberthein","download_url":"https://codeload.github.com/roberthein/Ease/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228835888,"owners_count":17979168,"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":["animation","animations","ease","easing","event","events","gyroscope","observable","observables","observe","observer","observer-pattern","scenekit","spring","spring-animation","swift","swift-5","swift5","system","uiscrollview"],"created_at":"2024-01-05T20:16:11.700Z","updated_at":"2024-12-09T14:30:39.917Z","avatar_url":"https://github.com/roberthein.png","language":"Swift","funding_links":[],"categories":["UI","Libs","HarmonyOS","Swift","Animation [🔝](#readme)","Content"],"sub_categories":["Animation","Windows Manager","Other free courses"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Art/header.gif\" width=\"890\" alt=\"Ease\"/\u003e\n\u003c/p\u003e\n\n**Ease** is an event driven animation system that combines the observer pattern with custom spring animations as observers. **It's magic.**\n\n## Features\n\n- [X] Animate any value type\n- [X] Set multiple animations for a single value\n- [X] Animation trajectories update when you update the `targetValue`\n- [X] Add natural spring behavior to any value change\n- [X] Optimized for Swift 5\n- [X] Compatible with iOS 9 and up\n\n## Supported value types\n\n- CGFloat\n- CGPoint\n- CGSize\n- CGVector\n- Int\n- Float\n- Double\n- SCNVector3\n\nEasily extendible with more (custom) types.\n\n## Examples\n- \u003ca href=\"https://github.com/roberthein/Ease/tree/master/Example3D\"\u003eSceneKit Example\u003c/a\u003e👆\n- \u003ca href=\"https://github.com/roberthein/Ease/tree/master/Example\"\u003eUIKit Examples\u003c/a\u003e\n\n## How\n\nCreate your **Ease** object with an initial value\n\n```swift\nvar ease: Ease\u003cCGPoint\u003e = Ease(view.center, minimumStep: 0.001)\n```\n\nAdd your custom spring-animation(s)\n\n```swift\nease.addSpring(tension: 300, damping: 15, mass: 1) { position in\n    view.center = position\n}\n```\n\nSet the target value of your Ease object and adjust your target as often as you want\n\n```swift\nease.targetValue = gestureRecognizer.location(in: view)\n```\n\n## Memory management\n\nFor a single spring-animation you can store the returned `EaseDisposable` to a variable\n\n```swift\ndisposable = ease.addSpring(tension...\n\n```\n\nFor multiple spring-animations you can add the disposable to a `EaseDisposal` variable\n\n```swift\nease.addSpring(tension...) { }.add(to: \u0026disposal)\n```\n\nAnd always weakify `self` when referencing `self` inside your spring-animation\n\n```swift\nease.addSpring(tension...) { [weak self] position in\n```\n\n## Installation\n\nEase is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Ease'\n```\n\n## Suggestions or feedback?\n\nFeel free to create a pull request, open an issue or find [me on Twitter](https://twitter.com/roberthein).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froberthein%2FEase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froberthein%2FEase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froberthein%2FEase/lists"}