{"id":21823792,"url":"https://github.com/buh/spiral","last_synced_at":"2025-10-17T18:13:13.969Z","repository":{"id":40582105,"uuid":"492322907","full_name":"buh/Spiral","owner":"buh","description":"Spiral is a SwiftUI shape for macOS, iOS and watchOS.","archived":false,"fork":false,"pushed_at":"2023-10-03T21:54:44.000Z","size":587,"stargazers_count":79,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T22:02:38.133Z","etag":null,"topics":["ios","ipados","macos","shape","swift","swiftui","ui-components","watchos"],"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/buh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":["https://www.buymeacoffee.com/bukhtin","https://paypal.me/bukhtin"]}},"created_at":"2022-05-14T20:52:22.000Z","updated_at":"2025-03-31T04:41:11.000Z","dependencies_parsed_at":"2024-11-27T17:37:35.297Z","dependency_job_id":"77a8f691-ef52-4cb2-aa20-ecda81ae6d6c","html_url":"https://github.com/buh/Spiral","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"850e40c04e282fec1c57c6d479e7890165079c08"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buh%2FSpiral","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buh%2FSpiral/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buh%2FSpiral/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buh%2FSpiral/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buh","download_url":"https://codeload.github.com/buh/Spiral/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248823928,"owners_count":21167339,"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":["ios","ipados","macos","shape","swift","swiftui","ui-components","watchos"],"created_at":"2024-11-27T17:37:22.066Z","updated_at":"2025-10-17T18:13:08.914Z","avatar_url":"https://github.com/buh.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"640\" alt=\"cover3\" src=\"https://user-images.githubusercontent.com/284922/168449775-50b28f1c-d303-478c-b741-89805f88b67b.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fbuh%2FSpiral%2Fbadge%3Ftype%3Dswift-versions\" /\u003e\n  \u003cimg src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fbuh%2FSpiral%2Fbadge%3Ftype%3Dplatforms\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/SwiftUI-2-blue\" /\u003e\n  \u003ca href=\"https://github.com/buh/Spiral/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/buh/Spiral\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n`Spiral` is a SwiftUI shape for macOS, iOS and watchOS.\n\nA spiral is a component that includes a point generator, `Shape` and `View` of the spiral. The point generator allows direct data to be used for particularly rare cases. The `Shape` and `View` of the spiral is designed for SwiftUI. The `Spiral` shape can be outlined or filled with the desired material. The `SpiralView' allows you to place arbitrary views at spiral points.\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Preview](#preview)\n- [Usage](#usage)\n  - [Spiral Shape](#spiral-shape)\n  - [Spiral View](#spiral-view)\n- [Documentation](https://prowork.today/Spiral/documentation/spiral)\n- [Demo App](#demo-app)\n- [Support](#support)\n- [License](#license)\n\n# Requirements\n\n- Swift 5.5+\n- Xcode 13+\n- SwiftUI 2+\n- macOS 11+\n- iOS 14+\n- watchOS 7+\n\n*Some of the requirements could be reduced if there is a demand for them.*\n\n# Installation \n\n1. In Xcode go to `File` ⟩ `Add Packages...`\n2. Search for the link below and click `Add Package`\n```\nhttps://github.com/buh/Spiral.git\n```\n3. Select to which target you want to add it and select `Add Package`\n\n# Preview\n\nhttps://user-images.githubusercontent.com/284922/168488964-d07c9434-6e3c-4738-8a5a-b34c2b6c0122.mov\n\nhttps://user-images.githubusercontent.com/284922/168489048-ab6fd895-c26b-499e-aa3e-c6368e1e2fd2.mov\n\n\u003cimg width=\"375\" alt=\"circle\" src=\"https://user-images.githubusercontent.com/284922/168489256-f7529316-46ab-455b-bd11-6870d90a93b7.jpeg\"\u003e\n\u003cimg width=\"375\" alt=\"text\" src=\"https://user-images.githubusercontent.com/284922/168489281-aaf9c62b-1347-4abd-9842-9e9a07a4fa7d.jpeg\"\u003e\n\u003cimg width=\"375\" alt=\"chart1\" src=\"https://user-images.githubusercontent.com/284922/168489302-7ae5cd1a-33a3-4396-a1b5-89eb626d41e8.jpeg\"\u003e\n\u003cimg width=\"375\" alt=\"chart2\" src=\"https://user-images.githubusercontent.com/284922/168489329-129595b3-4136-47e7-b754-184987b042b7.jpeg\"\u003e\n\n### Usage Example\n\u003cimg width=\"480\" alt=\"chart2\" src=\"https://user-images.githubusercontent.com/284922/168489399-b5c33896-b315-46d0-aa2f-dd28e732977c.jpeg\"\u003e\n\n# Usage\n\n## Spiral Shape\n\nIt has several parameters:\n- `pathType`: the type of path you want to draw.\n- `startAt`: the start angle of a spiral.\n- `endAt`: the end angle of a spiral.\n- `smoothness`: the point density which describes a spiral.\n- `offsetRadius`: spiral radius offset for each point with respect to the calculated angle and frame.\n- `offsetAngle`: angle offset of each spiral point with respect to the calculated angle and frame.\n\n\u003cimg width=\"746\" alt=\"image\" src=\"https://user-images.githubusercontent.com/284922/168490287-a263e152-8654-4e0d-85cb-d7a119f64838.png\"\u003e\n\n```swift\nvar body: some View {\n    Spiral(\n        startAt: .degrees(90),\n        endAt: .degrees(360)\n    )\n    .stroke(\n        Color.blue,\n        style: .init(lineWidth: 20, lineCap: .round, lineJoin: .round)\n    )\n}\n```\n\n## Spiral View\n\nWhen using`SpiralView`, you need to position the content based on the spiral point coordinates.\n\n```swift\nvar body: some View {\n    SpiralView(\n        startAt: .degrees(90),\n        endAt: .degrees(360)\n    ) { index, spiralPoint in\n        Text(\"Hello\")\n            .position(x: spiralPoint.point.x, y: spiralPoint.point.y)\n    }\n}\n```\n\n# Documentation\n\nYou can find the generated DocC documentation [here](https://prowork.today/Spiral/documentation/spiral).\n\n# Demo App\n\nYou can play with all the parameters in the demo app, which can be run on macOS, iPad, iPhone.\n\nThe app heavily uses the `CompactSlider`, which you can find out more about [here](https://github.com/buh/CompactSlider).\n\n# Support\n\nYou can buy me a coffee [here](https://www.buymeacoffee.com/bukhtin) ☕️\n\n# License\n\n`Spiral` is available under the [MIT license](https://github.com/buh/Spiral/blob/main/LICENSE)\n","funding_links":["https://www.buymeacoffee.com/bukhtin","https://paypal.me/bukhtin"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuh%2Fspiral","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuh%2Fspiral","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuh%2Fspiral/lists"}