Re: [clutter] Animations
On Mon, 2009-05-25 at 14:46 +0200, Jonas Bonn wrote: Hi, I had a short discussion with ebassi on #clutter... we decided I would send an email detailing what I feel are some weaknesses in the Animation API/implementation. Thanks for considering this; my thoughts follow: An Animation currently keeps track of: timeline mode duration loop I agree that the Animation properties should not go out of sync with the underlying objects. personally, my take is that the Animation should: - cache the values in case the Alpha and/or the Timeline instances are not present, or if they are being replaced - proxy the values otherwise which is basically what are you proposing, except that I wouldn't remove the loop, duration and mode variables from AnimationPrivate. the behaviour of the Animation class would then match these invariants: - set_mode() + no alpha set: create an alpha (without a timeline) + alpha set: set the mode - set_duration(): + no alpha set: create an alpha, then a timeline + alpha set: get the timeline of the alpha, set duration - set_loop() + same as set_duration() - get_mode() - get_duration() - get_loop() + no alpha or no timeline are set: return the cached values + alpha or timeline set: return the alpha or timeline values for the set_alpha() and set_timeline() we need some more hand-holding, because we depend on instances to make the animation machinery work: - set_alpha(): + no alpha set and passed NULL, create alpha (without a timeline) + no alpha set and passed !NULL, own the alpha and use its timeline + alpha set and passed NULL, create alpha and reuse the timeline from the old alpha + alpha set and passed !NULL, own the alpha and use its timeline - set_timeline() + no alpha set and passed NULL: create alpha and timeline using stored values, and assign the timeline to the alpha + no alpha set and passed !NULL: create alpha and assign passed timeline to the alpha + alpha set and passed NULL: create timeline using stored values and assign it to the alpha + alpha set and passed !NULL: assign timeline to the alpha - get_alpha() + no alpha set: create an alpha using the stored values, with no timeline + alpha set: return alpha - get_timeline() + return the timeline assigned to the alpha in short: the Alpha should be available as soon as: - :mode, :duration or :loop are set - get_alpha() or get_timeline() are called while the Timeline will be available as soon as: - :duration or :loop are set I'll document this properly before the 1.0 release. I hope this makes some sense and I look forward to your comments. I'm happy to provide clarification where things are less than clear. thanks for your feedback! ciao, Emmanuele. -- Emmanuele Bassi, Senior Engineer| emmanuele.ba...@intel.com Intel Open Source Technology Center | http://oss.intel.com -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com
Re: [clutter] Animations
On Mon, 2009-05-25 at 21:14 +0300, Veli Ogla Sungutay wrote: I agree with you. This is how we deal with animations in Flash/Flex world with TWEENER. Tweener requires that the toolkit knows how to deal with the animation updates and has a system to integrate tweener updates within the paint cycle. Actually Tweener provides an interface, it's language agnostic, and can be ported to C and Clutter if necessary. there is very little that Clutter does not offer already, in terms of what Tweener provides. if at all. I know, for instance, that gnome-shell is using Tweener, but has replaced the FrameTicker with a Clutter Timeline instance running at 60fps. in theory, with 1.0, this won't work since a Timeline is not a timeout anymore but simply something that computes the intervals and emits the frame-changed signal whenever the redraw cycle is ready to begin. once 1.0 lands they will probably have to change to using a paint function to update all the tweening. or drop tweener and use the Animation API. ciao, Emmanuele. -- Emmanuele Bassi, Senior Engineer| emmanuele.ba...@intel.com Intel Open Source Technology Center | http://oss.intel.com -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com
Re: [clutter] ideas for a opacity dissolving text
i'd put simply a background colored image with gradual alpha channel over the text box edge. btw. one of the most wanted features by designers in Clutter is probably the technique to produce image-based clipping masks. this feature would fit to your case as well... kris. On Sun, May 24, 2009 at 5:58 PM, Reid van Melle rvanme...@gmail.com wrote: I'm trying to produce a dissolving text effect near a clipping edge, so that the text appears to fade-out as it approaches the edge. Can anybody point me in the right direction for the best way to produce this type of effect in clutter/cogl? It looks like the fog effect in clutter may do something related, but it appears to be purely based on z-index. Is there an easy way for me to shoe-horn this to my purposes. Alternately, I found a openGL example with a linear fog effect on the x-axis... is this a better model? - Reid -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com
Re: [clutter] ideas for a opacity dissolving text
Thanks for the suggestion. Not as fancy of a solution as I might have hoped for:) but I'm sure if works just fine... and quick and easy to implement. - Reid On 27-May-09, at 2:54 PM, Kristjan Vaga wrote: i'd put simply a background colored image with gradual alpha channel over the text box edge. btw. one of the most wanted features by designers in Clutter is probably the technique to produce image-based clipping masks. this feature would fit to your case as well... kris. On Sun, May 24, 2009 at 5:58 PM, Reid van Melle rvanme...@gmail.com wrote: I'm trying to produce a dissolving text effect near a clipping edge, so that the text appears to fade-out as it approaches the edge. Can anybody point me in the right direction for the best way to produce this type of effect in clutter/cogl? It looks like the fog effect in clutter may do something related, but it appears to be purely based on z- index. Is there an easy way for me to shoe-horn this to my purposes. Alternately, I found a openGL example with a linear fog effect on the x-axis... is this a better model? - Reid -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com