From a0f63c88ec70f8058b5eef3bb5d338a61030516d Mon Sep 17 00:00:00 2001 From: Jasleen1210 <05kaur.j@gmail.com> Date: Tue, 2 Jul 2024 16:02:33 +0530 Subject: [PATCH] Added loader to gameplay Loader is of the pattern of newtons cradle. issue #200 --- about.html | 2 +- game.js | 11 ++++++- index.html | 17 ++++++++--- style.css | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 108 insertions(+), 8 deletions(-) diff --git a/about.html b/about.html index 9a40bb6..470a599 100644 --- a/about.html +++ b/about.html @@ -55,7 +55,7 @@ color: #fff; font-weight: 500; font-size: 18px; - margin-bottom: 10px; /To add spacing between bottom/ + margin-bottom: 10px; /*To add spacing between bottom*/ } .buttons a { text-decoration: none; diff --git a/game.js b/game.js index edfd442..f7a643c 100644 --- a/game.js +++ b/game.js @@ -214,11 +214,20 @@ openm=m=>{ document.getElementById(m).style.display="block"; }; play=()=>{ + const newtons_loader = document.querySelector(".backdrop"); + newtons_loader.style.display = "block"; + setTimeout(() => { + newtons_loader.style.display="0"; + setTimeout(() => { + newtons_loader.remove(); + }, 500); + }, 2000); + setTimeout(()=>{ document.querySelector(".pop-up").style.display="block"; document.querySelector(".outer").style.filter="blur(3px)"; - },500); + },3500); hintInterval = setInterval(enableHint, hintTime); finalize(); score(); diff --git a/index.html b/index.html index 887ce9d..71f946d 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ -
+