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
<svg width="80" height="50"> | |
<circle id="lc" cx="10" cy="25" r="10"/> | |
<circle id="cc" cx="40" cy="25" r="10"/> | |
<circle id="rc" cx="70" cy="25" r="10"/> | |
</svg> | |
<script> | |
const animate = () => { | |
lc.setAttribute('cy', centreY + amplitude * Math.sin(time)); | |
cc.setAttribute('cy', centreY + amplitude * Math.sin(time - 1)); |