update opacity for SVG animation