So I found a wave style I liked on codepen. I'm not gonna go through design my own I want to focus on the backend of my website rather then UI. But still want stunning UI. Anyways I want to know if anyone would know how to make the canvas so that it is transparent.
I have an app that I've created its a simple splash page. I just want to make it so when a user presses more info the wave moves up and allows the user to accept terms of use...
Here is a link to the code pen:
https://codepen.io/RTarson/pen/375507d01a90fd265b030abec49b78ac
/*========================================
Wave
========================================*/
$.wave = function (color, amp, height, comp) {
$.ctx.beginPath();
var sway = $.simplex.noise2D($.goff, 0) * amp;
for (var i = 0; i <= $.count; i++) {
$.xoff += $.xinc;
var x = $.cx - $.length / 2 + $.length / $.count * i,
y = height + $.simplex.noise2D($.xoff, $.yoff) * amp + sway;
$.ctx[i === 0 ? 'moveTo' : 'lineTo'](x, y);
}
$.ctx.lineTo($.w, -$.h); // -$.h - Vertically reflection
$.ctx.lineTo(0, -$.h); // -$.h - Vertically reflection
$.ctx.closePath();
$.ctx.fillStyle = color;
if (comp) {
$.ctx.globalCompositeOperation = comp;
}
$.ctx.fill();
};
Again I'm looking for how to get the canvas to display what ever is behind it. The rest is straight forward.