js-confetti
js-confetti copied to clipboard
Add support for image confetti
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 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
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 :)
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
everything should be fixed now :) @loonywizard
Is there a reason why this pull request got closed? Is this not a feature that js-confetti will support?