2D Physics and HTML5

If you were wondering how to add two-dimensional physics to your program by using Javascript, then there is a place that has a proverbial seat waiting for you.  There are codes for the minified version, concatenated version, or a library of BOX2D Javascript waiting for you there.  However, in order to download the code sufficiently, there are other versions of Box2D JS that you may also have to download.  All the links that you need are at the site though, so you don’t have to do any searching for them. 

There are many explanations that walk you through the processes.  So if you are a new programmer, all of the “why” questions that you may have brought with you will be answered.  The author goes into detail about how Javascript works to create the functions that you will eventually see.  In addition, the author also breaks down how the program will behave after something occurs, so you have an idea of what will happen after adding the code. 

The author also gives suggestions on picking browsers for the 2D Physics.  The reasons why a particular browser is given, so that you have all of the information that you need, and can make an educated choice as you see fit. 

So if you were having a code writer’s block about adding two-dimensional physics to objects of your HTML5 canvas element, just go to BOX 2D JS and peruse the library, or simply view the demo.  The codes are all there for you to follow and use if you please.


About Jim Happer

A code friendly place! View all posts by Jim Happer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: