I need to simulate any object (, even a or a single dot .) to make some movements inside the browser screen. For example, I need to simulate an object falling from the top of the screen to the bottom using the g force, 9.8 m/s^2 . I know I can use left/top position of the object and the gravity function s = s0 + v0t + at^2/2 But I want to know if there is some javascript library to deal with this.

Thank you so much.

有帮助吗?

解决方案

For the animations you can use jQuery.animate

For gravity specifically, you'll most likely need to find or write an easing function.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top