Canvas Nasal/JavaScript Subset: Difference between revisions

Jump to navigation Jump to search
m
Line 5: Line 5:


{{Nasal Navigation}}
{{Nasal Navigation}}
== Objective ==
Determine if it's feasible to come up with a safe subset of Nasal and JavaScript for sharing animation/update logic for SVG-based instruments that may be either implemented by the built-in Mongoose httpd or by the [[Canvas]] subsystem. Almost certainly, this would be a very restricted subset of Nasal, and even more so, of JavaScript - but there's really only a handful of functions that cannot be directly mapped to their corresponding equivalents in the other language. Internally, more complex constructs would be handled by JavaScripts '''eval()''' API or Nasal's '''compile()'''.
So this would involve a fair bit of meta programming - primarily, we'd need building blocks to deal with animated SVGs. Internally, a Canvas should then be dealt with like a SVG, i.e. no direct usage of CanvasText/CanvasPath. As long as these are set up via the SVG file and turned into a Canvas property tree, we can easily serve the same SVG file to a web browser over http.


== Background ==
== Background ==

Navigation menu