This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="canvas"> | |
<div id="clap" class="clap-container"> | |
<i class="clap-icon fa fa-hand-paper-o"></i> | |
</div> | |
<div id="clicker" class="click-counter"> | |
<span class="counter"></span> | |
</div> | |
<div id="sonar-clap" class="clap-container-sonar"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="clock"> | |
<div class="meter"></div> | |
<div class="center"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="canvas"> | |
<div id="totalCounter" class="total-counter"></div> | |
<div id="clap" class="clap-container"> | |
<i class="clap-icon fa fa-hand-paper-o"></i> | |
</div> | |
<div id="clicker" class="click-counter"> | |
<span class="counter"></span> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple 8 points(coordinates x y) Square 200px by 200px | |
// with points equally spread along the corners and middle of each | |
// Square side (right model) | |
clip-path: polygon( | |
0 0, | |
100px 0, | |
200px 0, | |
200px 100px, | |
200px 200px, | |
100px 200px, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A Four Cornered Star (8 points in total, 4 outter, 4 inner) | |
clip-path: polygon( | |
0 0, | |
100px 50px, | |
200px 0, | |
150px 100px, | |
200px 200px, | |
100px 150px, | |
0 200px, | |
50px 100px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Octagon - 8 equally spread corners | |
clip-path: polygon( | |
30% 0%, | |
70% 0%, | |
100% 30%, | |
100% 70%, | |
70% 100%, | |
30% 100%, | |
0% 70%, | |
0% 30% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Basic keyframes 4-star to octagon and back animation | |
$four-points-star: 42.5% 32.5%, 70% 0%, 67.5% 42.5%, 100% 70%, 57.5% 67.5%, 30% 100%, 32.5% 58.5%, 0% 30%; | |
$octagon: 30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%; | |
@keyframes fourStarToOcatgonAndBack { | |
0% { clip-path: polygon($four-points-star); } | |
50% { clip-path: polygon($octagon); } | |
100% { clip-path: polygon($four-points-star); } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Get a random floating point number between `min` and `max` */ | |
function getRandomFloat(min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
/* Get a random integer between `min` and `max` | |
- Inclusive(both min and max) due to -> (max - min + 1) | |
*/ | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1) + min); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@keyframes donut-spin { | |
0% { | |
transform: rotate(0deg); | |
} | |
100% { | |
transform: rotate(360deg); | |
} | |
} | |
@keyframes donut-spin-reverse { | |
0% { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 0; | |
overflow: hidden; | |
} |