Howto:Serializing a Canvas to SVG: Difference between revisions

Jump to navigation Jump to search
m
Line 52: Line 52:
=== Group ===
=== Group ===
=== Map ===
=== Map ===
== Challenges ==
Overall this would work pretty well - the main challenges are coming up with a serialization scheme that nicely between canvas/svg space and that is also suitable for streaming SVG to a browser. The most difficult part however is dealing with all the edge cases where Canvas based MFDs currently tend to use all sorts of Nasal workarounds to implement FlightGear specific functionality, such as e.g. using different kinds of event handlers and/or animations driven by listeners and properties.
This is where it is going to be particularly important to come up with dedicated Canvas elements to abstract away and encapsulate these concepts, so that we can do away with huge custom Nasal blobs, and merely introduce dedicated elements for these purposes, which can be more easily mapped to a corresponding SVG element, e.g. by serializing to an <code><animate></code> tag and a corresponding piece of ECMA/JavaScript code.


== Related ==
== Related ==

Navigation menu