Canvas Nasal/JavaScript Subset: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 16: Line 16:
== Canvas ==
== Canvas ==
=== Animations ===
=== Animations ===
{{FGCquote
|1= You would probably want to use something like SVG/SMIL to serve animated vector images, so would not even need to use HTML5/Canvas to recreate every instrument.
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=196315#p196315
  | title  = <nowiki>Re: Virtual Panel/Control from Web Browser</nowiki>
  | author = <nowiki>Hooray</nowiki>
  | date  = Dec 16th, 2013
  | added  = Dec 16th, 2013
  | script_version = 0.25
  }}
}}
For animations, it would make sense to come up with a subset of JavaScript and Nasal which wrappers to hide the differences between the browser and fgfs, i.e. by wrapping props.nas/maketimer and building an animation framework on top of this safe subset. That way, we could allow people to create MFDs/instruments in Inkscape and a restricted subset of JavaScript/Nasal, which would mean that we could collaborate and grow a shared library of instruments that would be useful to both "front-ends".
For animations, it would make sense to come up with a subset of JavaScript and Nasal which wrappers to hide the differences between the browser and fgfs, i.e. by wrapping props.nas/maketimer and building an animation framework on top of this safe subset. That way, we could allow people to create MFDs/instruments in Inkscape and a restricted subset of JavaScript/Nasal, which would mean that we could collaborate and grow a shared library of instruments that would be useful to both "front-ends".
=== MFDs ===
=== MFDs ===
Before any significant amount of time is spent on re-implementing functionality available available on Gijs' ND, I'd suggest to seriously consider collaborating whenever possible - all the artwork and animation logic can be easily made platform-agnostic, i.e. there's nothing Android/FlightGear or Canvas-specific about updating a SVG element and animating/transforming it. To make this work, you would merely need to use a tiny subset of JavaScript and Nasal and add a few of helper functions as wrappers for platform-specific functionality (think property tree access) - TorstenD has already written most of the code required for this as part of his mongoose work.
Before any significant amount of time is spent on re-implementing functionality available available on Gijs' ND, I'd suggest to seriously consider collaborating whenever possible - all the artwork and animation logic can be easily made platform-agnostic, i.e. there's nothing Android/FlightGear or Canvas-specific about updating a SVG element and animating/transforming it. To make this work, you would merely need to use a tiny subset of JavaScript and Nasal and add a few of helper functions as wrappers for platform-specific functionality (think property tree access) - TorstenD has already written most of the code required for this as part of his mongoose work.

Navigation menu