I want to throw an object like a swipe gesture in mobile. So create a circular object, User clicks on the object and drags the mouse with left mouse click pressed (The object stays at the same place as of now). When User removes his finger from the left click of mouse, it calculates the the speed with which user has dragged the mouse and the place where he removes his finger and then the circle follows a trajectory path accordingly. It should come down eventually and only stop when it hits the base of the div.
There should be another object, a rectangle somewhere 300 pixels above the circle. It should be able to collide with the circle. If the user somehow lands the circle on the rectangle, the circle should rest there.
So basically think of it this way that you are trying to land an object over a platform like in games with swiping. The object jumps with the swipe and if it does not land on the platform, It comes down on the ground again.
Pretty simple right.