Thread: TFT Map Maker
View Single Post
Old 11-01-2019, 07:18 AM   #229
Shadekeep
 
Shadekeep's Avatar
 
Join Date: Aug 2018
Location: Aerlith
Default Re: TFT Map Maker

Quote:
Originally Posted by kenfoote View Post
Ignorant question: I haven't looked at your code, nor have I worked with SVG outside of Inkscape and such, but it sounds like you are using saved SVG files? Is that correct? Since SVG is an XML format, would loading the SVG map elements via code (classes?) work? You wouldn't have to load any local image files. Like I said, ignorant question.
No, it's a good one, and pretty much the solution I have been working on. At the moment I am turning the SVG files into Base64 encoded strings and loading them from a secondary Javascript file. I have written a simple HTML form page that lets one load images and convert them to the file source on the fly, too. The main issue I am working on now is that the SVG images have to be preformatted to a specific size before loading, so that they fit the hexes correctly. If I can determine a way to intelligently resize any image from the source to this size then I will do so. Otherwise I will likely provide a template file that folks will need to fit their custom SVGs to.
__________________
Shadekeep - TFT Tools & Adventures
Shadekeep is offline   Reply With Quote