8 Amazing Javascript Experiments of Physic and Gravity Simulation

Written by Kevin Liew on 11 May 2010
85,807 Views • Inspirations


In this list I have gathered 8 examples/experiments that apply physics and gravity to demonstrate the power of Javascript. Few years back, all of these experiments must be done using Java or Flash, I don't think we can implement this using Javascript because of the standard and browsers.

A lot of stunning examples in this list, personally, I like the Cloth Simulation a lot, I just can't believe it's built with Javascript.

  • Cloth Simulation

    This amazing javascript experiment demonstrate the power of javascript. Few years back, this wasn't achievable and I think you only can do it with Java or flash. Pretty impressive and the creator uses javascript physics library called Processing.
  • Random Arboretum

    Yet another physic experiment that uses the javascript physic library called Processing. Everytime you click on it, it will generate a radom branch. Look at the way it shakes and move, it's really nice.
  • Box2DJS

    Box2D is an open source physics engine written primarily for games. As the name suggests, Box2D is a purely 2D engine. BOX2DJS is a Javascript port of BOX2D.
  • Ball Pool

    Start by shaking the browser, then create new balls (click on empty space), move some others (drag) and reset the screen (double click). Stunning gravity and physic demonstration!
  • Google Gravity

    What will happen when we put gravity on every single elements in Google's homepage?
  • Wavy Scrollbars

    A very creative use of scrollbar to simulate wave effect. Best view with chrome, firefox is a bit laggy.
  • Waterfall

    Balls falling on an hidden random terrain. This experiment is using physic simulation trought the library box2djs.
  • physicSketch

    When you draw something on a canvas, it starts moving under the Newtonian law.
Join the discussion

Comments will be moderated and rel="nofollow" will be added to all links. You can wrap your coding with [code][/code] to make use of built-in syntax highlighter.

Mehdi Mousavi 14 years ago
Absolutely coooool....
web firenze 14 years ago
very funny javascript ;-)
Lars 14 years ago
really exciting examples!
Brian Melancon 14 years ago
FYI, Processing is a programming language based on Java, not Javascript. The first two examples are nice physics demos, but are examples of Processing.
Sumeet Chawla 14 years ago
Really cool experiments. You should have tried to build some game out of these :P
Maeshiro 14 years ago
The first two examples use java applets not javascript, unfortunately ...
kevin Admin 14 years ago
arr... didnt realize the first two were made with Java...! sorry for that :p
vinit pratap singh 14 years ago
nice one.. love it... like it
mohit 14 years ago

nice collection. I am a visiting first time this site and i think its awesome..
visit this site movies.ewebtutorial.com
Vinh Khoa 14 years ago
The cloth one is awesome, but the google gravity made me literally laughing! It's so funny to see google "fail" although it never will :-)
JavaScript Countdown Timer 14 years ago
that's all cool & great js simulations, thank you very much for sharing.

Can you give me favor to <a href="http://www.javascriptbank.com/submit/">share this post</a> on my JavaScript library?

Awaiting your response. Thank
bubbles 14 years ago
nice one.
love it.
like it.
samson 14 years ago
Nice and awesome roundup, it shows the next level of design..