Domanda

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.

È stato utile?

Soluzione

For the animations you can use jQuery.animate

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top