سؤال

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