Gravity: Animate page elements using the laws of physics

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Videos Videos   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2012-07-25 (3 years ago) RSS 2.0 feedStarStarStarStar 77%Total: 602 This week: 1All time: 25 This week: 42Down
Version License JavaScript version Categories  
gravity 1.0BSD License1.0Animation
Description Author  

This object can animate HTML page elements using the laws of physics.

It uses the Box2DWeb library to animate given page elements so they move, rotate and collide according to laws of physics.

The gravity acceleration and direction is a configurable options. Given callback functions may be invoked when objects collide. Objects speed and rotation may be affected when the user drags them using the mouse pointer.

Each page element be made static or animated. Animated page elements may include the respective children elements. The elements' friction and density properties can also be configured.

Picture of Arturs Sosins
  Performance   Level  
Name: Arturs Sosins <contact>
Classes: 50 packages by
Country: Latvia Latvia
Age: 28
All time rank: 1
Week rank: 4 Down1 in Latvia Latvia Equal
Innovation award
Innovation award
Nominee: 7x

Winner: 5x

  • Apply physics to HTML elements
  Files folder image Files  
File Role Description
Plain text file gravity.js Class Main class source
Plain text file gravity.packed.js Class Main class packed
Plain text file Box2dWeb-2.1.a.3.min.js Class Box2dWeb library
Accessible without login Plain text file dragging_example.html Example Applying physics to form and dragging objects
Accessible without login Plain text file example.html Example Multiple elements, torque and impulse
Accessible without login Plain text file simple_example.html Example 1 static and 1 dynamic objects

 Version Control Unique User Downloads Download Rankings  
 0%Total:602All time:25
 This week:1This week:42Down
User Ratings User Comments (3)  
 All time
awesome work !
3 years ago (MacFly)
You are genius an Physicist.
3 years ago (Nerudo)
Once again Arturs does a superb job.
3 years ago (Ron Bigus)