[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: physics-based animator
From:       Rivo Laks <rivolaks () hot ! ee>
Date:       2008-03-13 15:03:58
Message-ID: 200803131703.58840.rivolaks () hot ! ee
[Download RAW message or body]

Ühel kenal päeval (neljapäev, 13. märts 2008) kirjutas Sebastian Kuegler:
> On Wednesday 12 March 2008 21:30:29 Riccardo Iaconelli wrote:
> > do you think it is ok to introduce an (optional?) dependency on Box2d
> > http://www.box2d.org/ for the animator
> > with physical equations? that's already a *good* engine we can use for
> > fun and profit, without having to worry
> > to implement a new one from scratch...
>
> I like the idea of having more natural animations. At the same time, I'm
> not so worried about Plasma, but about KWin. I think every single animation
> in KWin is purely linear (didn't look at the code yet, X11, OpenGL ...
> those are scary things to me ;-)).
>
> We could think of sharing that kind of stuff with KWin too, I think the
> distinction between large parts of Plasma and KWin are purely technical and
> not easily graspable from our users' POV.
>
> Did anyone actually think of making KWin use for example Plasma::Phase?
> Lubos, is that something you could support? Am I even right in stating that
> all (most?) animations in KWin are linear?
>
> I talked to Mirco Müller ("MacSlow") who is doing bling things with Cairo
> some time ago, and he basically said that linear animations feel unnatural,
> having things ease in and out makes it already feel much better. And if you
> look at the iPhone / iPod touch, I think having the KDE desktop 'obey the
> laws of physics' would make it feel a lot smoother.

Something like Plasma::Phase would be useful indeed. You're right that all 
KWin animations are currently linear. In addition to that, each effect 
currently needs to take care of the animation itself which kinda sucks.

I remember we had a discussion about that a while ago. It would be really nice 
if effect could just do something like
    window->opacity->set(0.8, 250);
to set window's opacity to 80% in 250 milliseconds.

Plasma::Phase doesn't really seem usable for KWin without some major changes 
though. It looks like it's meant only for a few different animations and only 
for usage with QGraphicsItems.
What would be more suitable for KWin (IMHO) would be some kind of (probably 
template) property class which stores current value as well as the target 
value(s) of the property. Opacity, brightness, position, scale, etc would 
then be converted into those properties so that effects can easily have them 
animated. It would also make addition of new such properties very easy as you 
wouldn't need to change any enums or similar in the property/phase/animator 
class.

Oh, and Conor is working on a "mother of all animations" plugin. I'm not sure 
what exactly it does, so Conor, could you explain a bit? Is it meant to be 
used by other plugins to make it easier to animate things or is it meant for 
users for attaching animations to different events (I think compiz has 
something similar)?

Rivo
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic