20,741
edits
Line 7: | Line 7: | ||
{{Nasal Navigation}} | {{Nasal Navigation}} | ||
== Motivation == | |||
The Nasal/JavaScript subset approach discussed below is about refactoring existing Canvas MFDs (or the underlying framework) so that the corresponding Nasal code becomes a valid subset of JavaScript (and vice versa) - that's just an idea that we ended up discussing behind the scenes when Torsten began his Phi/MFD (browser-based) work, because he began duplicating functionality that already existed elsewhere. The main reason being that a Canvas is just a property tree - and most elements are just textures or SVG images. In other words, it would not be that far-fetched to come up with a really tiny wrapper/subset of both, Nasal and JavaScript, that can be processed by both - part of this could be machine generated actually, i.e. dynamically compiling a simple subset of a DSL into whatever target platform is desired. | |||
The main thing this would require is what Torsten implemented already: APIs for setting/getting properties and running fgcommands, in conjunction with serving fgdata resources like textures and SVG files: [[Canvas Nasal/JavaScript Subset]]<ref>{{cite web | |||
|url = https://forum.flightgear.org/viewtopic.php?p=296457#p296457 | |||
|title = <nowiki> Re: Canvas remote drawing </nowiki> | |||
|author = <nowiki> Hooray </nowiki> | |||
|date = Oct 10th, 2016 | |||
|added = Oct 10th, 2016 | |||
|script_version = 0.40 | |||
}}</ref> | |||
== Objective == | == Objective == |