Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dynamic recoloring for balloons, targets, cars, payloads, parachutes #327

Open
wants to merge 5 commits into
base: testing
Choose a base branch
from

Conversation

bismurphy
Copy link

This accomplishes the topic discussed in #326 . Now, rather than pulling in a choice of a PNG based on a color (such as parachute-red.png, parachute-blue.png, or parachute-green.png, etc), I've created a set of SVG files which are dynamically recolored at runtime in order to populate the map.

The primary goal for this is to make it easy to add new colors of objects to the map, as well as to change the design of any of the icons easily without needing to modify lots of files at once.

All of these SVGs were created by hand in a text editor. As such, they are very human-readable and very easy to modify (as opposed to if they were created in Inkscape or similar, where all the coordinates would be ugly float values).

The goal in creating the SVGs was to replicate the general look and feel of the existing icons, but not to be a pixel-perfect duplication. There is nothing to say that the existing icons were perfect, and therefore matching their exact proportions was not considered a crucial goal. Given that these are, again, easily modifiable SVG files, anyone who wishes to tweak the look of these icons should be able to do so. I'm also happy to make any tweaks if anyone puts comments on this PR.

Probably the icon that could use the most work is the car. It gets the idea across, but is lacking in detail. However, for the sake of an initial attempt at this dynamic recoloring feature, I think this PR is ready for others to consider.

Note that this feature has some small conflicts with the one in #325 , but those should be trivial to resolve if we decide to move forward with this.

I will stress that this PR is likely not in a "prime-time-ready" state, but it is a proof of concept, and all of the relevant objects are successfully being recolored dynamically, which is a great step to be able to make. I encourage anyone to clone my branch and give this a try locally, and let me know any tweaks you'd like me to make to the aesthetics.

@bismurphy bismurphy changed the title Svg recoloring Use dynamic recoloring for balloons, targets, cars, payloads, parachutes Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant