I am searching for a Radar wave animation similar to this one:
https://i.sstatic.net/FdO9N.jpg
After putting in significant effort with my limited knowledge of Svgs, I was able to create the left side of the desired wave successfully. However, I need some assistance adding the right side with an appropriate solution.
Note: If you have any source code or a more straightforward solution to achieve such an animation than mine, please feel free to reach out and let me know.
Note 2: I require a function to trigger the animation.
Thank you in advance.
function Wave() {
const waves = document.querySelectorAll(".radio-wave");
waves.forEach(wave => wave.classList.add('add-wave'));
const wave1 = document.querySelector(".radio-wave-1");
wave1.classList.add('add-radio-wave-1');
const wave2 = document.querySelector(".radio-wave-2");
wave2.classList.add('add-radio-wave-2');
const wave3 = document.querySelector(".radio-wave-3");
wave3.classList.add('add-radio-wave-3');
const wave4 = document.querySelector(".radio-wave-4");
wave4.classList.add('add-radio-wave-4');
const wave5 = document.querySelector(".radio-wave-5");
wave5.classList.add('add-radio-wave-5');
const wave6 = document.querySelector(".radio-wave-6");
wave6.classList.add('add-radio-wave-6');
}
setTimeout(() => Wave(), 2000);
body {
background: black;
}
.left-wave-container {
position: relative;
margin-right: 50%;
padding: 0;
font-size: 16px;
}
.radio-wave-container {
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: center;
margin: 5rem;
}
.radio-wave-container.content {
flex-flow: row nowrap;
width: 100%;
}
.radio-source {
position: absolute;
right: 2rem;
width: 2rem;
fill: #fcba03;
}
... (CSS continues) ...
@keyframes wave-6 {
0% {opacity: 0.2;}
10% {opacity: 0.3;}
20% {opacity: 0.4;}
30% {opacity: 0.5;}
40% {opacity: 0.6;}
50% {opacity: 0.7;}
60% {opacity: 0.8;}
70% {opacity: 0.9;}
80% {}
90% {}
100% {}
}
<div class="left-wave-container" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg style="position:absolute;width:0;height:0;" width="0" height="0" version="1.1">
<defs>
<symbol id="radio-wave" viewBox="0 0 100 200">
<g>
<path d="M62.5,185 Q12.5,100 62.5,15" />
</g>
</symbol>
<symbol id="radio-source" viewBox="0 0 100 100">
</symbol>
</defs>
</svg>
... (SVG elements continue) ...
</div>