DanielMartinus / Konfetti

Celebrate more with this lightweight confetti particle system 🎊
ISC License
3.18k stars 301 forks source link

New shapes #11

Closed benju69 closed 4 years ago

benju69 commented 7 years ago

I am thinking it would be nice to have more shapes :) Rectangles (not just squares), stars and long rectangles maybe (or serpentine streamers)

DanielMartinus commented 7 years ago

I'm checking what I can do about this. The goal here is not to create another particle library, there are many others which accomplish this. So I want to keep true to confetti shapes. As you mentioned, variations in rectangles and ideally serpentine streamer would be nice indeed.

Pull requests are welcome

Akshshr commented 7 years ago

Hey Daniel, Awesome work! I second this, how are the different shapes coming along?

Would like custom shapes, in best case scenario shapes loaded directly from drawables or XML shapes

DanielMartinus commented 6 years ago

@Akshshr I do not have any particular shapes to add right now. Long rectangles would be a nice first to start on because they'll do very well in a confetti particle system like this. Other shapes like serpentines I haven't give a thought on how to accomplish that yet.

ben-j69 commented 6 years ago

Why not just little stars ?

Akshshr commented 6 years ago

The smartest thing would be to support any drawable

ronakmob commented 6 years ago

It would be nice if we can set confetti image, so we can add an image of any shape.

barakhadar commented 6 years ago

I strongly agree with @Akshshr , an option to set any drawable(s) will make this project even better than it already is.

@DanielMartinus we all hope you'll give it some serious consideration. For instance, I need to set hearts and stars, others need snowflakes, emojis, and the list goes on and on... Think how many people wanted to use this great library, but eventually chose some other library (and probably not as good) just because it's missing one simple option...

DanielMartinus commented 6 years ago

Hi @barakhadar I see there's a lot of interest for this feature indeed. First I think performance of this library is really important but also simplicity of use. Because of these two reasons I started out with simple figures related to Confetti shapes in order to achieve both goals.

In order to keep the performance (which I still want to iterate on and improve) I'll try to come up with a plan to easily support Drawables in the Konfetti library.

mattprecious commented 4 years ago

@DanielMartinus, are you receptive to PRs for this? I have some ideas that won't require many changes to the library.

DanielMartinus commented 4 years ago

I've been holding back adding custom shapes to Konfetti due to the reasons mentioned earlier in this Issue. I'm super happy that @mattprecious implemented a way of adding custom shapes which doesn't affect the performance and is also very easy to use. 🎉

DanielMartinus commented 4 years ago

It has been merged and released in version 1.2.0