uxebu / bonsai

BonsaiJS is a graphics library and renderer
http://bonsaijs.org
Other
1.96k stars 189 forks source link

Default animate easing function is linear #68

Open pvdz opened 12 years ago

pvdz commented 12 years ago

This seems to be a regression. Either way, I think it makes more sense if the default easing function was in fact an easing function. It's currently linear.

padolsey commented 12 years ago

AFAICT, linear has always been the default. There is no regression. We can discuss changing the default though. What default would you recommend?

pvdz commented 12 years ago

Any function that actually eases, I guess. Have no preference and maybe I'm dead wrong here so I'd like others to chime in here too.

basecode commented 12 years ago

I wouldn't change it because, 1) "linear" is a function and 2) CSS and I guess all other libraries have linear as default.

davidaurelio commented 12 years ago
* {
  transition-function: default; /* cubic-bezier(0.25, 0.1, 0.25, 1) */
}
basecode commented 12 years ago

@davidaurelio proved me wrong. Indeed, transition-timing-function's initial value is "ease".

padolsey commented 12 years ago

The default CSS transition, if it is truly cubic-bezier(0.25, 0.1, 0.25, 1) looks like this: http://cubic-bezier.com/#.25,.1,.25,1

All the JS libs seem to use slightly different defaults. jQuery's default seems to be sineOut, for example.

I'm not sure which default we should use.

davidaurelio commented 12 years ago

Do we have a helper for cubic bezier based timing functions? cubic bezier curves depend on t (time), which is “progress on the curve”. Calculating y from x can only be done approximately. Somebody already ported the code from webkit