Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck confetti #233

Open
rssfrncs opened this issue Jul 18, 2024 · 2 comments
Open

Stuck confetti #233

rssfrncs opened this issue Jul 18, 2024 · 2 comments

Comments

@rssfrncs
Copy link

Hi we've had reports on latest Chrome / Edge of the confetti sometimes getting stuck.

Screenshot below

image

Below is how we call confetti with the only dynamic config being the origin so we can place it on the screen.

confetti({
          particleCount: 30,
          spread: 360,
          decay: 0.65,
          gravity: 0.1,
          startVelocity: 30,
          ticks: 40,
          drift: 0,
          disableForReducedMotion: true,
          origin: coords
});
@ArtisArtStudio
Copy link

ArtisArtStudio commented Jul 28, 2024

I have a similar issue. After confetti starts, Chrome just freezes with no response for a couple of seconds. then gets back to normal. There is no error message or anything. My code is like this:

var end = Date.now() + (5 * 1000);

    (function frame() {

        confetti({
            particleCount: 1,
            angle: 60,
            spread: 55,
            scalar: 0.6,
            shapes: [pumpkin],
            origin: { x: 0, y:1 },
            startVelocity: 150,
            colors: ['#ff912a']
        });
        confetti({
            particleCount: 1,
            angle: 120,
            spread: 55,
            startVelocity: 150,
            origin: { x: 1, y:1},
            colors: ['#ffffff']
        });


        // keep going until we are out of time
        if (Date.now() < end) {
            requestAnimationFrame(frame);

            return;
        }

@rssfrncs
Copy link
Author

rssfrncs commented Aug 6, 2024

That sounds like a problem with your cpu utilisation but the original issue is rather the canvas is not cleared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants