{"id":15527143,"url":"https://github.com/fummicc1/simpleroulette","last_synced_at":"2025-07-01T09:06:45.913Z","repository":{"id":37853254,"uuid":"267742021","full_name":"fummicc1/SimpleRoulette","owner":"fummicc1","description":"SwiftUI library to create Roulette with ease.","archived":false,"fork":false,"pushed_at":"2023-10-05T03:41:27.000Z","size":91435,"stargazers_count":23,"open_issues_count":2,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-25T11:55:36.988Z","etag":null,"topics":["chart","charts","ios","macos","roulette","roulette-animation","roulette-wheel","spm","swift","swift-package-manager","swiftui","swiftui-components"],"latest_commit_sha":null,"homepage":"https://fummicc1.github.io/SimpleRoulette/","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/fummicc1.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-29T02:01:22.000Z","updated_at":"2025-06-10T08:11:00.000Z","dependencies_parsed_at":"2022-06-22T21:21:55.199Z","dependency_job_id":"d8d19284-3109-491a-b89a-7918aede293e","html_url":"https://github.com/fummicc1/SimpleRoulette","commit_stats":{"total_commits":161,"total_committers":4,"mean_commits":40.25,"dds":"0.037267080745341574","last_synced_commit":"80a21a327ac9826c0ca5cc30652d2819ab4c458e"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/fummicc1/SimpleRoulette","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fummicc1%2FSimpleRoulette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fummicc1%2FSimpleRoulette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fummicc1%2FSimpleRoulette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fummicc1%2FSimpleRoulette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fummicc1","download_url":"https://codeload.github.com/fummicc1/SimpleRoulette/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fummicc1%2FSimpleRoulette/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933321,"owners_count":23386784,"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":["chart","charts","ios","macos","roulette","roulette-animation","roulette-wheel","spm","swift","swift-package-manager","swiftui","swiftui-components"],"created_at":"2024-10-02T11:04:38.419Z","updated_at":"2025-07-01T09:06:45.884Z","avatar_url":"https://github.com/fummicc1.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Images](https://github.com/fummicc1/SimpleRoulette/blob/main/Assets/SimpleRoulette.png)\n\n![Pod Platform](https://img.shields.io/cocoapods/p/SimpleRoulette.svg?style=flat)\n![Pod License](https://img.shields.io/cocoapods/l/SimpleRoulette.svg?style=flat)\n[![Pod Version](https://img.shields.io/cocoapods/v/SimpleRoulette.svg?style=flat)](http://cocoapods.org/pods/SimpleRoulette)\n![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)\n![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)\n\n## SimpleRoulette\n\nSimpleRoulette helps you to create customizable Roulette, with SwiftUI. (Compatible with both macOS and iOS.)\n\n## Demo\n\n### iOS\n\n\u003cimg src=\"https://user-images.githubusercontent.com/44002126/180654806-58f70b4f-9bbd-4345-b7a5-4e1ba5aebbd9.gif\" width=\"30%\"\u003e\n\n### macOS\n\n\u003cimg src=\"https://user-images.githubusercontent.com/44002126/180655023-ccb71dce-9478-4f44-a8c1-b914184e607c.gif\" width=\"30%\"\u003e\n\n## Install\n\n### Swift Package Manager\n\nCreate `Package.swift` and add dependency like the following.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/fummicc1/SimpleRoulette.git\", from: \"1.3.0\")\n    // or\n    .package(url: \"https://github.com/fummicc1/SimpleRoulette.git\", branch: \"main\")\n]\n```\n\n### Cocoapods\n\nCreate `Podfile` and add dependency like the following.\n\n```ruby\npod 'SimpleRoulette', '~\u003e 1.3'\n```\n\n### Carthage\n\nCreate `Cartfile` and add dependency like the following.\n\n```txt\ngithub \"fummicc1/SimpleRoulette\"\n```\n\n## Usage\n\n### RouletteView\n\nAll you need to know is just `RouletteView` and `PartData`.\n`RouletteView` confirms to `View`, so you can use it like the follwing.\n\n````swift\n```swift\nstruct ContentView: View {\n\n    var body: some View {\n        RouletteView(\n            parts: partDatas\n        )\n        .startOnAppear(automaticallyStopAfter: 5) { part in\n            guard let text = part.content.text else {\n                return\n            }\n            title = text\n        }\n    }\n\n    var partDatas: [PartData] {\n        [\n            PartData(\n                content: .label(\"Swift\"),\n                area: .flex(3),\n                fillColor: Color.red\n            ),\n            PartData(\n                content: .label(\"Kotlin\"),\n                area: .flex(1),\n                fillColor: Color.purple\n            ),\n            PartData(\n                content: .label(\"JavaScript\"),\n                area: .flex(2),\n                fillColor: Color.yellow\n            ),\n            PartData(\n                content: .label(\"Dart\"),\n                area: .flex(1),\n                fillColor: Color.green\n            ),\n            PartData(\n                content: .label(\"Python\"),\n                area: .flex(2),\n                fillColor: Color.blue\n            ),\n            PartData(\n                content: .label(\"C++\"),\n                area: .degree(60),\n                fillColor: Color.orange\n            ),\n        ]\n    }\n}\n````\n\n## RouletteModel\n\nIf you want to pause / restart roulette. Please use `RouletteModel` like the following.\n\n```swift\nstruct ContentView: View {\n\n    @StateObject var model: RouletteModel\n\n    var body: some View {\n        VStack {\n            RouletteView(model: model)\n        }.onAppear {\n            model.start()\n            DispatchQueue.main.asyncAfter(deadline: .now() + 3) {\n                model.pause() // you can pause\n                DispatchQueue.main.asyncAfter(deadline: .now() + 5) {\n                    model.restart() // you can restart\n                }\n            }\n        }\n    }\n}\n\n// Call ContentView\nContentView(\n    model: RouletteModel(\n        PartData(\n            content: .label(\"Swift\"),\n            area: .flex(3),\n            fillColor: Color.red\n        ),\n        PartData(\n            content: .label(\"Kotlin\"),\n            area: .flex(1),\n            fillColor: Color.purple\n        ),\n        PartData(\n            content: .label(\"JavaScript\"),\n            area: .flex(2),\n            fillColor: Color.yellow\n        ),\n        PartData(\n            content: .label(\"Dart\"),\n            area: .flex(1),\n            fillColor: Color.green\n        ),\n        PartData(\n            content: .label(\"Python\"),\n            area: .flex(2),\n            fillColor: Color.blue\n        ),\n        PartData(\n            content: .label(\"C++\"),\n            area: .degree(60),\n            fillColor: Color.orange\n        ),\n    )\n)\n```\n\n## Documentation\n\n- [Documentation](https://fummicc1.github.io/SimpleRoulette/documentation/simpleroulette)\n\n## Contributing\n\nPull requests, bug reports and feature requests are welcome 🚀\n\n## License\n\n[MIT LICENSE](https://github.com/fummicc1/SimpleRoulette/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffummicc1%2Fsimpleroulette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffummicc1%2Fsimpleroulette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffummicc1%2Fsimpleroulette/lists"}