Created
September 29, 2021 08:05
-
-
Save Pavracer/1aebfc6cf23e735f1f7268637a38fe7a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js'></script> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> | |
<script src='https://rawgit.com/peacepostman/wavify/master/wavify.js'></script> | |
<script> | |
/* | |
* Wavify | |
* Jquery Plugin to make some nice waves | |
* by peacepostman @ potion | |
*/ | |
(function($) { | |
jQuery.fn.wavify = function(options) { | |
if ("function" !== typeof wavify) { | |
console.error( | |
"wavify is not a function. Be sure to include 'wavify.js' before you include 'jquery.wavify.js'." | |
); | |
throw "Error: wavify is not a function"; | |
} | |
return wavify(this, options); | |
}; | |
})(jQuery); | |
</script> | |
<style> | |
html, body { | |
height: 65%; | |
width: 100%; | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; | |
} | |
.wave { | |
position: absolute; | |
left:0; | |
right:0; | |
top:0; | |
bottom:0; | |
z-index: 1; | |
opacity:10%; | |
} | |
.wave + .wave { | |
z-index: 2; | |
} | |
</style> | |
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg" class="wave"><defs></defs><path id="feel-the-wave-one" d=""> </path></svg> | |
<script> | |
var wave1 = $('#feel-the-wave-one').wavify({ | |
height: 100, | |
bones: 4, | |
amplitude: 20, | |
color: '#ff0000', | |
speed: .15 | |
}); | |
</script> | |
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg" class="wave"><defs></defs><path id="feel-the-wave-two" d=""> </path></svg> | |
<script> | |
var wave2 = $('#feel-the-wave-two').wavify({ | |
height: 100, | |
bones: 3, | |
amplitude: 20, | |
color: '#00ff00', | |
speed: .25 | |
}); | |
</script> | |
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg" class="wave"><defs></defs><path id="feel-the-wave-three" d=""> </path></svg> | |
<script> | |
var wave3 = $('#feel-the-wave-three').wavify({ | |
height: 100, | |
bones: 5, | |
amplitude: 20, | |
color: '#0000ff', | |
speed: .2 | |
}); | |
</script> | |
<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg" class="wave"><defs></defs><path id="feel-the-wave-four" d=""> </path></svg> | |
<script> | |
var wave4 = $('#feel-the-wave-four').wavify({ | |
height: 100, | |
bones: 7, | |
amplitude: 20, | |
color: '#000000', | |
speed: .1 | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment