Ruby On Rails, Design, Simplicity, Web 2.0, Ajax, Mac and Tons of Pizza.

Oct 25

Javascript and physic engines

Posted by Sandro Paganotti in Ruby on Rails - comments are closed digg this add to delicious

A few days ago while watching the amazing script.aculo.us combination effect demo page I thought:

A physic Engine written in Javascript could be cool?

With such a tool you could create amazing effects by setting extra physics properties to divs (like forces, frictions, etc…) or other HTML objects. This physic engine could help you create effects like a photo slideshow where the pictures falls from the top and bounch on the bottom of the page.

Other abilities could lead into adding physic effects to your GUI, as example you could have a list of elements (eg divs) one over each other with the ability to delete on of them; when this happen the elements over the deleted one could bounce realistically before stop.

The pourpose of this post is to share this thoughts with you in order to understand if could be a good idea starting the development of such a tool or if there are better alternatives. (or if all these effects are simply unnecessary).

While surfing in the past day searching for already made examples i found only this PhisicBallMenu example dated back in 2002 (no Prototype.js) and nothing more.

Waiting for your comments.

Comments

  • Kristian Frederiksen

    Posted on October 26

    I think it's definitely useful! The evolution of the Internet from static pages, to "Web Applications" requires the interface to move with it. We've seen an increase in the use of physics for feedback in "normal" GUI Applications, so why not use it on the Web? The only problem is, as with script.acolo.us it can be overdone, but that is true for any advance in technology. As for implementing it -- all thats required is some additions to the script.acolo.us effects for stuff like bouncing. Only two effects actually need to be made: gravity and spring loaded, but unlike the current use of script.acolo.us - the effects need to be applied to every element on the page EXCEPT the one being removed/added - so that complicates matters a lot, and you risk having an animation sequence run on every element on the page if you just remove one small thing. Would that bog down a browser? Probably... ;)
  • Aresch Yavari

    Posted on December 09

    I saw linerider and thought, why not doing something like this just with javascipt? I programmed linebumper. It´s not realy a physics-engine, but lets one or two balls fall and bounce around and all done with javascript. Take a look at http://www.fumpf.de/linebumper.php, maybe it's comes near to that you like to do. regards, aresch

Post a comment

Categories:

Tags:

Powered by Mephisto, Valid XHTML 1.1, Valid CSS - Supported by Wave Factory