Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions MorphLoader/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Morph Loader</title>
<style>
body {
background-color: rgb(38, 40, 58);
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}

.box {
width: 40px;
height: 40px;
background: white;
border-radius: 50%;
position: relative;
animation: magicMorph 4s ease-in-out infinite;
box-shadow:
0 0 25px rgba(255, 255, 255, 0.6),
0 0 50px rgba(100, 200, 255, 0.4);
transform: translateZ(0);
will-change: transform, border-radius;
}

@keyframes magicMorph {
/* Start state */
0%, 20% {
transform: translateX(0) rotate(0deg) scale(1);
border-radius: 50%;
}

/* Forward transition */
22% {
transform: translateX(20px) rotate(45deg) scale(1.075);
border-radius: 45%;
}

24% {
transform: translateX(40px) rotate(90deg) scale(1.15);
border-radius: 40%;
}

26% {
transform: translateX(60px) rotate(135deg) scale(1.225);
border-radius: 35%;
}

28% {
transform: translateX(80px) rotate(180deg) scale(1.3);
border-radius: 30%;
}

30% {
transform: translateX(100px) rotate(225deg) scale(1.375);
border-radius: 25%;
}

32% {
transform: translateX(120px) rotate(270deg) scale(1.45);
border-radius: 20%;
}

34% {
transform: translateX(140px) rotate(315deg) scale(1.525);
border-radius: 15%;
}

36% {
transform: translateX(160px) rotate(360deg) scale(1.6);
border-radius: 10%;
}

/* End state */
36%, 60% {
transform: translateX(160px) rotate(360deg) scale(1.6);
border-radius: 10%;
}

/* Backward transition */
62% {
transform: translateX(140px) rotate(315deg) scale(1.525);
border-radius: 15%;
}

64% {
transform: translateX(120px) rotate(270deg) scale(1.45);
border-radius: 20%;
}

66% {
transform: translateX(100px) rotate(225deg) scale(1.375);
border-radius: 25%;
}

68% {
transform: translateX(80px) rotate(180deg) scale(1.3);
border-radius: 30%;
}

70% {
transform: translateX(60px) rotate(135deg) scale(1.225);
border-radius: 35%;
}

72% {
transform: translateX(40px) rotate(90deg) scale(1.15);
border-radius: 40%;
}

74% {
transform: translateX(20px) rotate(45deg) scale(1.075);
border-radius: 45%;
}

76% {
transform: translateX(0) rotate(0deg) scale(1);
border-radius: 50%;
}

/* Back to start state */
76%, 100% {
transform: translateX(0) rotate(0deg) scale(1);
border-radius: 50%;
}
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
Binary file added MorphLoader/morphLoader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Please be aware that the demos may exhibit significant accessibility issues, suc
- [Mobile Menu Off Canvas](#mobile-menu-off-canvas)
- [Modal/Popup](#modalpopup)
- [Mondrian Composition](#mondrian-composition)
- [Morph Loader](#morph-loader)
- [Mouse Tracking](#mouse-tracking)
- [Multi Step Checkout](#multi-step-checkout)
- [NavBar](#navbar)
Expand Down Expand Up @@ -489,6 +490,14 @@ Your browser does not support the video tag.

---

## <a id="morph-loader"></a>Morph Loader

[<img src="images/morphLoader.gif" height="230" title="Morph Loader Demo">](./MorphLoader/index.html)

**[⬆ back to top](#quick-links)**

---

## <a id="compassloader"></a>Compass Loader

[<img src="images/CompassLoader.gif" height="230" title="Demo">](<[https://codepen.io/eduardoboucas/pen/BNyKwO](https://codepen.io/Aman-Pathan-the-typescripter/pen/dyaPmrE)>)
Expand Down
Binary file added images/morphLoader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.