SMIL:Animation Model: Difference between revisions

Jump to navigation Jump to search
m
m (Updated links)
m (→‎nsSMILAnimationRegistry: -- small edits)
Line 9: Line 9:
== nsSMILAnimationRegistry ==
== nsSMILAnimationRegistry ==


This class acts as the single point of registry in both the animation and timing model. The appropriate nsSMILTimedElement and nsISMILComposable objects would be passed in along with perhaps the target attribute (for getAnimValue lookups as described next).
This class acts as the single point of registry in both the animation and [[SVGDev::Timing Model|:Timing Model]]. The appropriate nsSMILTimedElement and nsISMILComposable objects would be passed in along with perhaps the target attribute (for <tt>getAnimValue</tt> lookups as described next).


The <tt>getAnimValue</tt> method is to support the mode of interaction originally proposed by Alex (sorry no link). The main difference is that instead of having the compositor apply the new animation (presentation) value to the animated attribute--which breaks encapsulation a little, the animated attribute fetches its animated value from the animation registry during redraw (the animated value itself is still calculated in the regular way, i.e. as part of the traversal of the nsSMILTimedElements). This is a quick hashtable lookup and probably not a big performance penalty. This is the approach I used in my [http://brian.sol1.net/svg/ last prototype].
The <tt>getAnimValue()</tt> method is to support the mode of interaction originally proposed by Alex (sorry no link). The main difference is that instead of having the compositor apply the new animation (presentation) value to the animated attribute, the animated attribute fetches its animated value from the animation registry during redraw (the animated value itself is still calculated in the regular way, i.e. as part of the traversal of the nsSMILTimedElements). This is a quick hashtable lookup and probably not a big performance penalty. This is the approach I used in my [http://brian.sol1.net/svg/ last prototype].


It doesn't matter which approach we use from the point of view of this model however. If we stick with applying the animation attribute from the compositor, we can simply remove the <tt>getAnimValue</tt> method from this class and the nsSMILCompositor.
It doesn't matter which approach we use from the point of view of this model however. If we stick with applying the animation attribute from the compositor, we can simply remove the <tt>getAnimValue</tt> method from this class and the nsSMILCompositor.
Confirmed users
166

edits

Navigation menu