simibac / confettiswiftui Goto Github PK
View Code? Open in Web Editor NEWSwiftUI Package for Configurable Confetti Animation ๐
License: MIT License
SwiftUI Package for Configurable Confetti Animation ๐
License: MIT License
Is there a possibility to have a layover that just lets rain down a continuous stream of confetti across the with of a view? (As opposed to letting the confetti originate from an object on screen like a button or so.)
In Package.swift
this line forces you to choose either "Embed and Sign" or not to code sign when including ConfettiSwiftUI into an app (in Xcode):
type: .dynamic
This line isn't really needed.
I discovered this when attempting to build one of my apps with Xcode Cloud. Here's the error you get during the archive process:
ITMS-90334: Invalid Code Signature Identifier. The identifier "ConfettiSwiftUI-55554944d4fbc3d9c42f38d3b8bfbbc8cd81fa38" in your code signature for "ConfettiSwiftUI" must match its Bundle Identifier "ConfettiSwiftUI"
Repeat configuration is a bit misleading.
Seems like 0 repetitions should not produce any confetti?
Did I miss something?
code:
.confettiCannon(counter: $counter, repetitions: 3, repetitionInterval: 0.7)
produces 3 repeats
code:
.confettiCannon(counter: $counter, repetitions: 3, repetitionInterval: 0.7)
produces 4 repeats
every time repeats count greater by '1' than expected
use any repetitions value in Repeat Configuration and compare with result.
even in README
.confettiCannon(counter: $counter, repetitions: 3, repetitionInterval: 0.7)
produces 4 repeats
Priority | Points | Date |
---|---|---|
MEDIUM* | x | YYYY-MM-DD |
* LOW | MEDIUM | HIGH
As a ROLE, I want to ...GOAL, in order to ...BENEFIT
Is there a way to use SF Symbols in ConfettiSwiftUI? I tried embedding in Text but that did not work. Thanks.
...mention related issues and/or user stories...
Expect the device behavior to match the watchOS simulator behavior.
While the animation plays correctly in the watchOS Simulator, once it's running on the device it seems to just freeze the main thread.
Will be great to change counter: Binding<Int>
to trigger: Binding<Any>
where Any
can by generic parameter or really Any
.
I'm sure that it's reasonable because:
Binding<Int>
enforces user to have binding of this type only, specially for this caseThere should appear the number of confetti I decide
it takes too long to render the number I have chosen. and either they do not render, or they are delayed, and then disappear suddenly during animation.
num:
Hey Simon, cool project! In the README file you mention "Installation" and "Usage," yet legally no one can use this project in an app on the App Store because you hold the copyright. Could you put a LICENSE file in the repository to permit usage? I recommend the MIT open source license as it is the most popular in the Swift community and widely compatible. Thanks!
if you scroll out the cannon view, the next time you scroll it in, the cannon breaks
Animation stops when app goes to background or completes successfully while in background
"Fatal error: Index out of range," on line 134, "animate[value-1].toggle()"
value in this statement is 0 leading to "index out of range"
I am using the confetti in RsyncUI for new users. If a new user chooses a function before the confetti is completed the app crashes. If I just remove the confetti from the FirstTime view RsyncUI works as expected. It seems like there is a bug within the confetti which causes to take down the macOS app when closing the confetti before it is completed.
I try to add an emoji which is recieved by an APN:
@State private var receivedEmoji: String = "๐"
@State private var cannonEmoji: String = "๐ฅฅ"
[...]
VStack {
[...]
.onChange(of: receivedEmoji) { newValue in
animationCounter += 1
cannonEmoji = newValue
print("Emoji \(cannonEmoji)") <--- here it prints the recieved emoji and not the initialized one.
}
// .animation(.easeInOut(duration: 0.5), value: sortedActions)
ConfettiCannon(counter: $animationCounter ,confettis: [.text(cannonEmoji)], confettiSize: 20)
.text(cannonEmoji)
allways fires the coconut (๐ฅฅ) - which looks also great. :D
How can I solve this?
Hi!
Using ConfettigSwiftUI on iOS and love it there. But while porting the app on visionOS, I noticed that the confettis started to flicker
Tried changing the background, in case this has something to do with the Material
, and also tried setting the .offset(z:)
, but nothing helped yet.
Any idea what could cause this?
This is my code for the confettis:
.confettiCannon( counter: $confettiCounter, num: 200, confettis: [ .shape(.circle) ], colors: confettiColors, openingAngle: Angle(degrees: 0), closingAngle: Angle(degrees: 360), radius: 200 )
Thanks!
ConfettiCannon(counter: $counter, num: 200, repetitions: 3, repetitionInterval: 3)
This is shown on console:
ignoring singular matrix: ProjectionTransform(m11: 1.0, m12: 0.0, m13: 0.0, m21: -0.5, m22: -0.5, m23: -0.1, m31: 2.5, m32: 7.5, m33: 1.5)
ignoring singular matrix: ProjectionTransform(m11: 1.0, m12: 0.0, m13: 0.0, m21: 0.5, m22: 0.5, m23: 0.1, m31: -2.5, m32: 2.5, m33: 0.5)
Right now the library does not allow for the change of ConfettiConfig while it is presented. It will only change it if the view is rerendered. But rerendering is also not desired in some cases because it causes the current animation to stop.
Please provide a way of changing ConfettiConfig without tearing down the view. Thanks!
Describe the expected behaviour.
The popped out confetti should slowly rain down
Describe the actual behaviour.
The popped out confetti fastly rains down
I am using this in combination with https://github.com/joogps/SlideOverCard. The library is the problem, because I tried it already on my Home Screen and there it worked fine. I would like to ask if you could tell me a solution :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.