js-confetti icon indicating copy to clipboard operation
js-confetti copied to clipboard

Add support for image confetti

Open jasonappah opened this issue 2 years ago • 4 comments

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,

jasonappah avatar Dec 19 '21 01:12 jasonappah

@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

loonywizard avatar Dec 19 '21 16:12 loonywizard

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 :)

jasonappah avatar Dec 20 '21 03:12 jasonappah

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

loonywizard avatar Dec 20 '21 09:12 loonywizard

everything should be fixed now :) @loonywizard

jasonappah avatar Dec 23 '21 17:12 jasonappah

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

fredrikj31 avatar Oct 13 '22 11:10 fredrikj31