And it could lay the foundation to a HTML/Javascript map editor. If anyone is willing to implement this I'll sure be happy to add an upload backend.
Might be interesting for a personal project. I'm not sure if it's be worthwhile, though. What could it do that a desktop version couldn't?
As desktop app it is written in C++. It can do everything (even embedding a web-browser running the dedicated HTML/JavaScript code).
But as of today HTML5 (and it's infrastructure) is extremly powerful and can do almost everything (only limited by security restrictions).
Mostly I'd think it'd be more limited, since we wouldn't be able to easily run MG to preview the map
I agree. But we have the
megaglest:// URL and we could also add something like support for base64 encoded Map files as url (then we would not even need to save the map as a file if we don't want to)
and there's performance concerns for any kind of larger operations (eg, one feature that comes to mind is treating the height levels of the map as an image and gaussian bluring this to get softer slopes). Probably not an issue at map making sizes, though, and I've done some pretty intensive stuff with JS (my current work involves WebRTC -- sharing video, audio, and screen capture).
As most browsers with good HTML5 support has very optimized code (e.g. GPU-rendering) for Canvas2D (already used in this tool) and WebGL (would be required to preview the map realtime in the browser or WYSIWYG-editing) performance should not be a too big issue. Anyway it is important to write the JavaScript
code non-blocking that you won't see the anoying 'This site is not responding'-messages (already used in this tool).
I've done some pretty intensive stuff with JS (my current work involves WebRTC -- sharing video, audio, and screen capture).
I'm not sure what could be done better in a JS version that a desktop version.
e.g. you could use your WebRTC knowledge to add an feature to collaborativly edit maps
It's probably more a question of preference than what is the technical restrictions. A great thing of JavaScript is the huge amount of small libraries that can handle stuff you do not want to develop by yourself.
There are also already HTML5 painting tools available that provide a huge amount of image editing.
http://literallycanvas.com/,
https://www.picozu.com/Ok, regarding painting it would even be better to write a plugin for GIMP
, but I hope you got my intention