1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Use the same requestAnimationFrame as confetti

This commit is contained in:
Travis Ralston
2020-12-18 18:40:30 -07:00
parent ec92be4ec4
commit 4fea266003

View File

@@ -67,10 +67,7 @@ export default class Fireworks implements ICanvasEffect {
} }
private context: CanvasRenderingContext2D | null = null; private context: CanvasRenderingContext2D | null = null;
private supportsAnimationFrame = window.requestAnimationFrame || private supportsAnimationFrame = window.requestAnimationFrame;
function(callback) {
window.setTimeout(callback, 1000/60);
};
private particles: Array<FireworksParticle> = []; private particles: Array<FireworksParticle> = [];
public isRunning: boolean; public isRunning: boolean;