{"id":25390512,"url":"https://github.com/vikill33/confettiwithspriteview","last_synced_at":"2025-08-03T13:08:47.307Z","repository":{"id":225269882,"uuid":"765497807","full_name":"VIkill33/ConfettiWithSpriteView","owner":"VIkill33","description":"A swift confetti view created with SpriteKit.","archived":false,"fork":false,"pushed_at":"2024-03-02T08:49:23.000Z","size":37,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-20T14:19:27.927Z","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/VIkill33.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}},"created_at":"2024-03-01T03:09:03.000Z","updated_at":"2024-03-19T01:52:18.000Z","dependencies_parsed_at":"2024-03-01T05:47:29.038Z","dependency_job_id":null,"html_url":"https://github.com/VIkill33/ConfettiWithSpriteView","commit_stats":null,"previous_names":["vikill33/confettiwithspriteview"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FConfettiWithSpriteView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FConfettiWithSpriteView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FConfettiWithSpriteView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FConfettiWithSpriteView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VIkill33","download_url":"https://codeload.github.com/VIkill33/ConfettiWithSpriteView/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239007912,"owners_count":19567006,"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":"2025-02-15T14:55:50.458Z","updated_at":"2025-02-15T14:55:51.233Z","avatar_url":"https://github.com/VIkill33.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfettiWithSpriteView\n\nA SwiftUI confetti modifier created by SpriteKit. Easily to use and custom in SwiftUI.\n\u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/badge/iOS-14.0%2B-blue\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/watchOS-6.0%2B-green\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/visionOS-1.0%2B-red\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/-SwiftUI-orange\" /\u003e\n\u003c/p\u003e\n\n- [Preview](#preview)\n- [Installation](#installation)\n- [Usage](#usage)\n  * [Parameters](#parameters)\n- [How does it work](#how_does_it_work)\n\n## Preview\n\u003cimg src=\"https://github.com/VIkill33/ConfettiWithSpriteView/assets/78488529/c4c32903-e5a4-4695-8834-6f5352c29ca6\" width=\"200\" height=\"433\"\u003e\n\n## Installation\nIn Xcode go to `File -\u003e Swift Packages -\u003e Add Package Dependency` \nand paste in the repo's url: \n\n`https://github.com/VIkill33/ConfettiWithSpriteView.git`\n\nOr you can download the code of this repo, then `Add Local...` in Xcode, and open the folder of the repo.\n\n## Usage\n- Import this package after you installed by `import ConfettiWithSpriteKit`\n- Use the modifier like(check it out in DemoAPP inside this package)\n```swift\nstruct ContentView: View {\n    \n    @State private var startConfetti = false\n    \n    var body: some View {\n        ZStack {\n            Button(\"Start/Stop\") {\n                startConfetti.toggle()\n            }\n            .confetti(start: $startConfetti)\n        }\n    }\n}\n```\nWhen you change the passed var `startConfetti` to `true`, confetti will play above your modified view(confetti will NOT handle touch events and will pass them to views underit), and `false` will stop emitting more confetti.\n\nThe var need to be changed to `false` then `true` to retrigger the confetti.\n\n### Parameters\nYou can custom colors and images of confetti.\n\nAll descriptions about parameters were written in comment in source code:\n```swift\n    /// - Parameters:\n    ///   - start: A binding to a boolean value that controls the emission of confetti.\n    ///   - angle: The angle at which the confetti will be emitted, measured in radians. Default is pi/2 (90 degrees).\n    ///   - colors: An array of `UIColor` values representing the colors of the confetti. Default includes red, green, system teal, yellow, orange, and purple.\n    ///   - size: The size of each confetti piece. Default is 25x25 points.\n    ///   - scale: The initial scale of the confetti particles. Default is 0.3.\n    ///   - numToEmitRange: A closed range of integers specifying the number of particles to emit. Default range is 10 to 20.\n    ///   - images: An array of `UIImage` objects representing the images for the confetti. Default includes a ribbon image.\n```\n## How does it work\nIt use `SKEmitterNode` in SpriteKit to emit particles, which are ribbons in this package defaultly. Particles of `SKEmitterNode` behave similarly to `CAEmitterLayer`'s. This repo is also an example about how to create SKEmitterNodes **programmaticaly**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikill33%2Fconfettiwithspriteview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikill33%2Fconfettiwithspriteview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikill33%2Fconfettiwithspriteview/lists"}