loonywizard / js-confetti

JS Confetti library that supports emojis 🦄 🎉 ⚡️
https://loonywizard.github.io/js-confetti/
MIT License
1.13k stars 48 forks source link

Add support for image confetti #42

Closed jasonappah closed 2 years ago

jasonappah commented 2 years ago

This PR adds support for image confetti. addConfetti now has a new optional property called images, which holds a list of objects with the following format:

interface IImage {
  src: CanvasImageSource,
  width?: number,
  height?: number,
loonywizard commented 2 years ago

@jasonappah hi! thanks a lot for your contribution

I see that this PR changes a lot of code-style formatting. I believe this is due to the reason I have not setup any linters yet 😁 I will try to find time to setup some Prettier or ESLint for the project and then I can review this PR

Also I tried to run the demo and I see that Image confettis do not rotate as normal confettis or emoji confettis do

jasonappah commented 2 years ago

Ah whoops, I completely forgot about the formatting changes. Whenever you have linting setup, let me know and I'll run it on my fork. I also forgot to get the images rotating, will do in a sec :)

loonywizard commented 2 years ago

I have just added lint-fix script to package.json and run it on the codebase #43

I will try to add lint-fix as pre-commit hook and later I will add this to CI (which I don't have at the moment), but for now you can just manually run lint-fix before git push

jasonappah commented 2 years ago

everything should be fixed now :) @loonywizard

fredrikj31 commented 1 year ago

Is there a reason why this pull request got closed? Is this not a feature that js-confetti will support?