Created
June 2, 2018 19:54
-
-
Save VerbalCPU/8b97614592379597abf9a16f8d363dc2 to your computer and use it in GitHub Desktop.
Particles
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> | |
<canvas class="background"></canvas> | |
<button onclick="pause()">Pause Animation</button> | |
<button onclick="resume()">Resume Animation</button> | |
</body> |
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
var particles; | |
particles = Particles.init({ | |
selector: ".background", | |
color: ["#DA0463", "#404B69", "#DBEDF3"], | |
connectParticles: true, | |
speed: 5 | |
}); | |
function pause() { | |
particles.pauseAnimation(); | |
} | |
function resume() { | |
particles.resumeAnimation(); | |
} |
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
html, | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
.background { | |
position: absolute; | |
top: 0; | |
left: 0; | |
z-index: -1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment