Thorsten wrote in Tue Jul 10, 2018 5:20 pm:Having said that, the display should probably be ported to canvas anyway, so the 'correct' approach would be to learn canvas and do the avionics using that kit, because it's much more flexible and better behaved with the renderer...
There are currently -again- plans being discussed to port the legacy HUD/2D panels code to use the Canvas system -that's the kind of work that would probably benefit from a similar set of building blocks (think animation routines to encapsulate timer/listener handling):
https://sourceforge.net/p/flightgear/ma ... /36401971/If/when this is tackled, a new set of Canvas frameworks/APIs or dedicated Canvas "elements" may emerge over time, that would also facilitate implementing similar features, without necessarily having to go through tons of custom Nasal stuff.
Conceptually, all that is needed is the equivalent of svg.nas (i.e. a Nasal space XML parser) that maps XML tags to certain Canvas elements and the corresponding Nasal callbacks.
Of course, it's not going to be as complicated as svg.nas, because all the parser has to do is understand PropertyList/XML files - as per io.nas