Use the same requestAnimationFrame as confetti

pull/21833/head
Travis Ralston 2020-12-18 18:40:30 -07:00
parent 4ba89cc437
commit b2825e8718
1 changed files with 1 additions and 4 deletions

View File

@ -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<FireworksParticle> = [];
public isRunning: boolean;