Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] animation algorithm
- From: billy.reisinger at gmail.com (Billy Reisinger)
- Subject: [Javascript] animation algorithm
- Date: Mon Mar 12 19:42:10 2007
One - half of a sine wave's period traces a nice curve, close enough to the bell curve for animation easing. That would be a really simple algorithm to use. If you really want fine grained control over the easing, I suggest using a Bezier curve. If you google "Bezier curve javascript", you are likely to find a ton of resources. Heck, you can probably cut/paste something pretty readily - this is one of those oft-solved (and interesting) programming puzzles. Actually, I think i have a link.... ah: http://pupius.co.uk/ download/articles/bezier_curves/ Enjoy! On Mar 12, 2007, at 1:27 PM, Anthony Ettinger wrote: > I have a pretty simple idea to pan an element within it's parent. > > I'm having trouble coming up with an algorithm that would ease in/out > of the far left or far right position, relative to it's parent. > > I want a basic bell curve, but am having a heck of a time getting my > calculations correct. > > the variables I have to work with are positions of the mouse, the > static container element and it's width, and the position of the child > element that will be moved and it's width. > > Please help. > > -- > Anthony Ettinger > Ph: 408-656-2473 > http://chovy.dyndns.org/resume.html > http://utuxia.com/consulting > _______________________________________________ > Javascript mailing list > Javascript@xxxxxxxxxx > https://lists.LaTech.edu/mailman/listinfo/javascript
- References:
- [Javascript] animation algorithm
- From: Anthony Ettinger
- [Javascript] animation algorithm
- Prev by Date: [Javascript] animation algorithm
- Next by Date: [Javascript] ajax- demo
- Previous by thread: [Javascript] animation algorithm
- Next by thread: [Javascript] animation algorithm
- Index(es):