remove unused var

This commit is contained in:
nurjinn jafar 2020-08-24 11:29:46 +02:00
parent 77de63bf4b
commit 03b2a529ef

View file

@ -34,7 +34,7 @@ const confetti = {
"rgba(238,130,238,", "rgba(152,251,152,", "rgba(70,130,180,", "rgba(238,130,238,", "rgba(152,251,152,", "rgba(70,130,180,",
"rgba(244,164,96,", "rgba(210,105,30,", "rgba(220,20,60,"]; "rgba(244,164,96,", "rgba(210,105,30,", "rgba(220,20,60,"];
let streamingConfetti = false; let streamingConfetti = false;
let animationTimer = null; // let animationTimer = null;
let lastFrameTime = Date.now(); let lastFrameTime = Date.now();
let particles = []; let particles = [];
let waveAngle = 0; let waveAngle = 0;
@ -55,7 +55,7 @@ const confetti = {
function runAnimation() { function runAnimation() {
if (particles.length === 0) { if (particles.length === 0) {
context.clearRect(0, 0, window.innerWidth, window.innerHeight); context.clearRect(0, 0, window.innerWidth, window.innerHeight);
animationTimer = null; //animationTimer = null;
} else { } else {
const now = Date.now(); const now = Date.now();
const delta = now - lastFrameTime; const delta = now - lastFrameTime;
@ -65,7 +65,7 @@ const confetti = {
drawParticles(context); drawParticles(context);
lastFrameTime = now - (delta % confetti.frameInterval); lastFrameTime = now - (delta % confetti.frameInterval);
} }
animationTimer = requestAnimationFrame(runAnimation); requestAnimationFrame(runAnimation);
} }
} }