{"id":2368,"url":"https://github.com/dbukowski/Disintegrate","last_synced_at":"2025-08-03T00:31:57.458Z","repository":{"id":56908576,"uuid":"141423472","full_name":"dbukowski/Disintegrate","owner":"dbukowski","description":"Disintegration animation inspired by THAT thing Thanos did at the end of Avengers: Infinity War.","archived":false,"fork":false,"pushed_at":"2019-01-07T06:32:03.000Z","size":43685,"stargazers_count":75,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T02:16:15.531Z","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/dbukowski.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":"2018-07-18T11:07:08.000Z","updated_at":"2024-09-19T22:24:38.000Z","dependencies_parsed_at":"2022-08-21T03:50:20.965Z","dependency_job_id":null,"html_url":"https://github.com/dbukowski/Disintegrate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbukowski%2FDisintegrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbukowski%2FDisintegrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbukowski%2FDisintegrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbukowski%2FDisintegrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbukowski","download_url":"https://codeload.github.com/dbukowski/Disintegrate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510708,"owners_count":17931752,"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:12.084Z","updated_at":"2024-12-06T18:30:30.851Z","avatar_url":"https://github.com/dbukowski.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Animation"],"readme":"# Disintegrate\n\n[![CI Status](https://img.shields.io/travis/dbukowski/Disintegrate.svg?style=flat)](https://travis-ci.org/dbukowski/Disintegrate)\n[![Version](https://img.shields.io/cocoapods/v/Disintegrate.svg?style=flat)](https://cocoapods.org/pods/Disintegrate)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](https://img.shields.io/cocoapods/l/Disintegrate.svg?style=flat)](https://cocoapods.org/pods/Disintegrate)\n[![Platform](https://img.shields.io/cocoapods/p/Disintegrate.svg?style=flat)](https://cocoapods.org/pods/Disintegrate)\n\nDisintegrate is a small library providing an animation inspired by how our favorite heroes disappeared at the end of Avengers: Infinity War.\nThe view or layer that you use it on is divided into small triangles, which then move into one direction and fade away. You can customize the estimated number of triangles and the direction they will move to.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cdiv\u003e\n  \u003cimg src=\"Assets/disintegrationDemoLabel.gif\" width=\"25%\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"Assets/disintegrationDemo.gif\" width=\"25%\"\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\n  \u003cimg src=\"Assets/disintegrationDemoBigImage.gif\" width=\"25%\"\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n- [Usage](#usage)\n- [Installation](#installation)\n- [Example](#example)\n- [Requirements](#requirements)\n- [Author](#author)\n- [License](#license)\n\n## Usage\n\nDisintegrate adds a single method to both UIView and CALayer classes.\n```swift\nfunc disintegrate(direction: DisintegrationDirection = DisintegrationDirection.random(),\n                  estimatedTrianglesCount: Int = 66,\n                  completion: (() -\u003e ())? = nil)\n```\nThe animation can be customized by two parameters:\n* `direction` - direction in which the triangle particles will move. By default, the direction is chosen randomly from the set of 8 available options: up, down, left, right, upper left, upper right, lower left and lower right.\n* `estimatedTrianglesCount` - estimated number of triangle particles. Specifying it allows you to adjust the performance of the animation to your needs. For example, if you know that you want to use it on a smaller view, you can divide it into more triangles. Keep in mind, that it is only an estimate, and the final count of the triangles will also depend on the exact size of the view or the layer. This parameter does have an empirically chosen default value, so you don't have to specify it.\n\nAdditionally, you can specify a completion block that will be executed when the animation finishes.\n\nHere are some examples of using Disintegrate:\n```swift\navatarImageView.disintegrate()\ncancelButton.disintegrate(direction: .upperLeft)\ngradientLayer.disintegrate(estimatedTrianglesCount: 100)\nerrorLabel.disintegrate(direction: .down, estimatedTrianglesCount: 200) {\n    print(\"Error label animation finished.\")\n}\n```\n\n## Installation\n\n### CocoaPods\n\nDisintegrate is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Disintegrate'\n```\n\n### Carthage\n\nTo integrate Disintegrate into your Xcode project using Carthage, specify it in your Cartfile:\n```ruby\ngithub \"dbukowski/Disintegrate\" ~\u003e 0.2.0\n```\nRun carthage update to build the framework and drag the built Disintegrate.framework into your Xcode project.\n\n### Manually\n\nAlternatively, you can simply copy the 3 files from `Disintegrate/Classes` directory.\n\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\nDisintegrate requires iOS 8.0 or later.\n\n## Author\n\nMaintained by Maciej Mastalerz, maciej.mastalerz@gmail.com\n\nCreated by Dariusz Bukowski, dariusz.m.bukowski@gmail.com\n\n## License\n\nDisintegrate is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbukowski%2FDisintegrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbukowski%2FDisintegrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbukowski%2FDisintegrate/lists"}