Canvas Nasal/JavaScript Subset: Difference between revisions

Jump to navigation Jump to search
m
mNo edit summary
Line 36: Line 36:
<syntaxhighlight lang="nasal">
<syntaxhighlight lang="nasal">
</syntaxhighlight>
</syntaxhighlight>
== Mongoose-based FGPanel ==
{{FGCquote
  |I have been dreaming of a cross-platform, simple <br/>
solution to render 2d panels on a remote device.<br/>
<br/>
I have just succeeded with my first partial implementation of a EFIS PFD <br/>
rendered in a web browser using nothing but existing web standards and a <br/>
running FlightGear instance having the internal web server enabled.<br/>
<br/>
The EFIS is created from scalable vector graphics (svg), is animated by <br/>
JavaScript and driven by properties from FlightGear over websockets.<br/>
The same svg files that are used for the FlightGear internal canvas <br/>
based instruments can also be used for the browser based display, so <br/>
both instruments (that of the 3d model and that in your browser) look <br/>
100% alike. Websocket properties are exchanged at frame rate making <br/>
animations as smooth as they can get. Because it uses SVG, instruments <br/>
are always rendered at the highest available resolution of the device <br/>
without scaling artefacts.
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32840486/
    |title=<nowiki>[Flightgear-devel] Goodbye fgpanel - hello fgpanel 2.0</nowiki>
    |author=<nowiki>Torsten Dreyer</nowiki>
    |date=<nowiki>2014-09-17</nowiki>
  }}
}}
{{FGCquote
  |It runs on any device that has a web browser. So yes, if your FlightGear <br/>
computer can run Firefox, Opera or alike you can run it on the same <br/>
computer, too.<br/>
It is not related to the "classical" way of rendering instruments within <br/>
flightgear, so everything in this area works as before.<br/>
<br/>
Probably a video is more descriptive, here is a shot of an earlier <br/>
(incomplete) version:<br/>
http://youtu.be/sYM7uiWIprc<br/>
You can see a FlightGear instance on the top right of the big monitor <br/>
and Firefox on the left showing the EFIS. Both run on the same computer.<br/>
Below the monitor are an old iPod touch (left) and a Nexus 7 (right), <br/>
both running the EFIS as a web-app in full screen mode connected over WLAN.<br/>
The EFIS in the FlightGear window is based on Canvas/Nasal. The other <br/>
EFISes are 100% Nasal free, just HTML/SVG/CSS/JavaScript
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32840980/
    |title=<nowiki>Re: [Flightgear-devel] Goodbye fgpanel - hello fgpanel 2.0</nowiki>
    |author=<nowiki>Torsten Dreyer</nowiki>
    |date=<nowiki>2014-09-17</nowiki>
  }}
}}

Navigation menu