SkidX / tweene

JavaScript Animation Proxy
http://tweene.com
Artistic License 2.0
353 stars 29 forks source link

.to() after .set() doesn't work #16

Open ingobecker opened 9 years ago

ingobecker commented 9 years ago

I'm having the following code:

Tweene.defaultDriver = 'velocity'
Tweene.set($('#header'),{opacity: 0})
Tweene.to($('#header'), {opacity: 1}, {duration: 1000})

I'm trying to set the opacity of this element to 0 instantly and then fading it in. But the opacity seems to be 1 all the time, as if none of the operations are applied. Is this how things are supposed to work?

SkidX commented 9 years ago

Hi, thanks for the feedback. It is not supposed to work in that way. I'm currently working on a new release that will solve this kind of issues and add more features too. In the meanwhile, you can easily solve your case with a single instruction:

Tweene.fromTo($('#header'), {opacity: 0}, {opacity: 1, duration: 1000});
ingobecker commented 9 years ago

Thanks for the fast reply. I'm really looking forward for your next release. Will it include seek support?

SkidX commented 9 years ago

Exactly :)