Canvas development: Difference between revisions

Jump to navigation Jump to search
Line 972: Line 972:


=== Serializing a Canvas to SVG (brainstorming) ===
=== Serializing a Canvas to SVG (brainstorming) ===
{{See also|Howto:Serializing a Canvas to SVG}}
<!--
{{WIP}}
{{WIP}}
 
-->
{{Note|For now this is just a brainstorming to explore possible ways to better integrate the recent mongoose/httpd work with Canvas-based efforts like Gijs' [[NavDisplay]] or  PFD - i.e. the idea is to see if we can come up with a consistent framework that would allow a Canvas-based display/MFD (or any instrument) to be rendered in a browser, updated asynchronously via AJAX. Currently, the focus is on serializing an existing Canvas by iterating over all elements and turning each CanvasElement into its SVG equivalent (e.g. svg image, raster image or text). That alone would mean that we could serve a static image of the canvas, animations and updates would then be handled by a shim layer that is based on a safe subset of both, Nasal and JavaScript. The long-term idea is to allow MFDs like the [[NavDisplay]] to be served to, and viewed by, a browser. }}  
{{Note|For now this is just a brainstorming to explore possible ways to better integrate the recent mongoose/httpd work with Canvas-based efforts like Gijs' [[NavDisplay]] or  PFD - i.e. the idea is to see if we can come up with a consistent framework that would allow a Canvas-based display/MFD (or any instrument) to be rendered in a browser, updated asynchronously via AJAX. Currently, the focus is on serializing an existing Canvas by iterating over all elements and turning each CanvasElement into its SVG equivalent (e.g. svg image, raster image or text). That alone would mean that we could serve a static image of the canvas, animations and updates would then be handled by a shim layer that is based on a safe subset of both, Nasal and JavaScript. The long-term idea is to allow MFDs like the [[NavDisplay]] to be served to, and viewed by, a browser. }}  


Line 1,066: Line 1,068:


Thinking about it, a canvas is already a "tree" due to the property tree, i.e. very much analogous to a SVG DOM, so I don't think that the to represent/serialize a canvas to a SVG that uses special URLs to address certain elements would be all that far-fetched eventually
Thinking about it, a canvas is already a "tree" due to the property tree, i.e. very much analogous to a SVG DOM, so I don't think that the to represent/serialize a canvas to a SVG that uses special URLs to address certain elements would be all that far-fetched eventually


=== Supporting Cameras ===
=== Supporting Cameras ===

Navigation menu