Canvas Draw: Difference between revisions

m (→‎Approach: https://forum.flightgear.org/search.php?st=0&sk=t&sd=d&sr=posts&keywords=canvas+animations+timers+listeners)
Line 81: Line 81:


== Animation Handling ==
== Animation Handling ==
See also: [https://forum.flightgear.org/viewtopic.php?f=71&t=23807 Canvas animations (original discussion)]


At some point, anything involving symbol/display animations (i.e. Nasal callbacks handling updates via timers and listeners) should ideally be wrapped using a corresponding set of helper classes, so that if/when more appropriate native helpers become available, such "animations" can be mapped to corresponding native code, instead of relying on hundreds of Nasal timers and listeners, which are infamous for being the most likely culprits when it comes to resource leaks.
At some point, anything involving symbol/display animations (i.e. Nasal callbacks handling updates via timers and listeners) should ideally be wrapped using a corresponding set of helper classes, so that if/when more appropriate native helpers become available, such "animations" can be mapped to corresponding native code, instead of relying on hundreds of Nasal timers and listeners, which are infamous for being the most likely culprits when it comes to resource leaks.