SVG Component Opacities
in
Programming Questions
•
1 years ago
I've been trying to think of a way to make flames on a rocket flicker for a game I've been working on and I am using an SVG to store the rocket's image. The flames are actually just square components in the image and I was wondering the most efficient way to change their opacity. At first I was going to store 25 different SVG's until I realized how inefficient and slow that would be. My next Idea was to edit the SVG file while the game was running, but the process of opening editing saving and reloading the image would be very processor heavy, especially on an android device loading off and SD card (I plan on porting this to Android when I finish). I was wondering if there was a better way to do this, like just accessing the element in the SVG by ID and setting it's opacity that way if that's possible.
Any suggestions would be greatly appreciated.
Thanks!
1