@BlackWolf: I'll upload a new version and send you the link.
Library will get a new toy - In-System-Maps in 3D.
The initial idea was to improve mission briefings. Reading through a lot of text ("Find this, go there, do that and return to us.") is a little bit a thing of the 90th. We can do more - so I'm currently working on it to get some visual interesting stuff for the dull bits. There is still some work left, but I want to show you some of the features even if it's only a sneak preview.
The way it works:
A script passes an object to the Map-Script. Lib_Starmap creates a missionScreen and places the objects based on real world coordinates and assigns textures. Up to 12 elements can be shown (either standard objects like the sun, planet, mainStation, etc or custom). The object positions are scaled down for display. Far out positions beyond a hardcoded point are compressed, so it will still work even if AddOns like DistantSuns are used. The next step is to zoom the whole thing to fit in the screen. And finally it can be animated (optional) to give a visual impression of the things the player should know. The animations can contain text, sounds and movements. The created objects are just planes using a billboard vertex shader, so they will always point to the player. Standard objects like secondary stations, carriers, beacons will use a color-scheme, custom objects can use this scheme as well.
But the mechanism allows inflight usage as well. This is specially interesting for missions. The script creates a visualEffect for it and tracks marked objects to update positions on the map. If they slip away (exploded, removed or jumped) they are cleaned from the map. The map disables itself on red alert and enables itself again when things have settled. The orientation of the map is bound to the compass, so you can control it easily to see it from different angles. The visualEffect gets removed on docking/dying/jumping.
Both maps (missionScreen and inflight) will work in interstellarSpace as well, so it is possible to get back to the [0,0,0] position, which was hard before (through using the FPS display). The maps are not accessible through equipment or interface handling - they have to be called by script. And the calling script decides what kind of elements will be shown. Usage for scripts is easy - for a standard setup it's only one line of code!
The inflight map will create some garbage collection if the map is actually shown, but not if it's disabled, because all positioning and vector-math is bypassed. So I think it's not a tool for general usage - I'll see if I can reduce it even further.
On my todo-list is a method to add content to active maps for the script which has setup the map, callbacks from the missionScreen, some standard setups and more short keys for standard objects. Currently Lib_Starmap is around 7 KB, so if we end <10 KB it's a good thing.