From 4fea266003dcc04b95d0521c22d7160f8d2f7839 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 18 Dec 2020 18:40:30 -0700 Subject: [PATCH] Use the same requestAnimationFrame as confetti --- src/effects/fireworks/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/effects/fireworks/index.ts b/src/effects/fireworks/index.ts index 15ba286503..4ca5c59fa7 100644 --- a/src/effects/fireworks/index.ts +++ b/src/effects/fireworks/index.ts @@ -67,10 +67,7 @@ export default class Fireworks implements ICanvasEffect { } private context: CanvasRenderingContext2D | null = null; - private supportsAnimationFrame = window.requestAnimationFrame || - function(callback) { - window.setTimeout(callback, 1000/60); - }; + private supportsAnimationFrame = window.requestAnimationFrame; private particles: Array = []; public isRunning: boolean;