Canvas Nasal/JavaScript Subset: Difference between revisions

Jump to navigation Jump to search
m
→‎Canvas: http://forum.flightgear.org/viewtopic.php?f=6&t=24125&p=219119&hilit=subset+javascript#p219119
m (→‎Canvas: http://forum.flightgear.org/viewtopic.php?f=6&t=24490&p=226881&hilit=subset+javascript#p226881)
m (→‎Canvas: http://forum.flightgear.org/viewtopic.php?f=6&t=24125&p=219119&hilit=subset+javascript#p219119)
Line 13: Line 13:


== Canvas ==
== Canvas ==
=== Animations ===
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