Skip to content

Commit 394d142

Browse files
authored
Merge pull request #47 from Pragya79645/master
create bug function removed
2 parents 601cc98 + 299fd14 commit 394d142

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

โ€Žscript.jsโ€Ž

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -768,32 +768,7 @@ function embarkOnAdventure() {
768768
}, 3000);
769769
createBugs();
770770
}
771-
function createBugs() {
772-
const numberOfBugs = 5000;
773-
const bugs = ['๐Ÿœ', '๐Ÿž', '๐Ÿ•ท๏ธ', '๐Ÿ', '๐Ÿฆ—', '๐Ÿ•ธ๏ธ', '๐Ÿ›'];
774-
775-
for (let i = 0; i < numberOfBugs; i++) {
776-
const bug = document.createElement('span');
777-
const randomBug = bugs[Math.floor(Math.random() * bugs.length)];
778-
bug.textContent = randomBug;
779-
bug.classList.add('bug');
780-
bug.style.position = 'absolute';
781-
bug.style.fontSize = '24px';
782-
bug.style.left = Math.random() * 100 + 'vw';
783-
bug.style.top = Math.random() * 100 + 'vh';
784-
bug.style.transition = 'transform 5s linear';
785-
786-
document.body.appendChild(bug);
787771

788-
setTimeout(() => {
789-
bug.style.transform = `translateY(100vh)`;
790-
}, 100);
791-
792-
setTimeout(() => {
793-
bug.remove();
794-
}, 6000);
795-
}
796-
}
797772
function startRotation() {
798773
const gridDiv = document.querySelector(".grid");
799774

0 commit comments

Comments
ย (0)