Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing link to original author's GitHub page #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
## Overview ##

This is a port of _Box2DFlash_ 2.1a to JavaScript. [We developed](http://hecht-software.de/projekte/forschung/) an ActionScript 3 -to- JavaScript compiler to generate the code.

There already exists a port to JavaScript called _Box2dJs_, but it's not up-to-date and you have to import a big amount of JavaScript files in every project, whereas my version is stored in a single file.

The _Box2D_ physics engine was developed by Erin Catto (visit http://www.gphysics.com for further information)

## Live Demo ##

<div>
<wiki:gadget url="http://box2dweb.googlecode.com/svn/trunk/demo-google-gadget.xml?v=5" height="420" width="620" border="0" /><br>
</div>

## Usage ##

You can read the documentation for _Box2dFlash_, since nearly everything is organized the same way.
http://www.box2dflash.org/docs/2.1a/reference/

The _b2DebugDraw_ takes a canvas-context instead of a Sprite:
```
## Overview ##
This is a port of _Box2DFlash_ 2.1a to JavaScript. [We developed](http://hecht-software.de/projekte/forschung/) an ActionScript 3 -to- JavaScript compiler to generate the code.
There already exists a port to JavaScript called _Box2dJs_, but it's not up-to-date and you have to import a big amount of JavaScript files in every project, whereas my version is stored in a single file.
The _Box2D_ physics engine was developed by [Erin Catto](https://github.com/erincatto).
## Live Demo ##
<div>
<wiki:gadget url="http://box2dweb.googlecode.com/svn/trunk/demo-google-gadget.xml?v=5" height="420" width="620" border="0" /><br>
</div>
## Usage ##
You can read the documentation for _Box2dFlash_, since nearly everything is organized the same way.
http://www.box2dflash.org/docs/2.1a/reference/
The _b2DebugDraw_ takes a canvas-context instead of a Sprite:
```
var debugDraw = new Box2D.Dynamics.b2DebugDraw;
debugDraw.SetSprite(document.GetElementsByTagName("canvas")[0].getContext("2d"));
```

## Graphics ##

Please notice that Box2dWeb is a physics engine. The graphics in the demo are generated by the b2DebugDraw-class, which is only available for debugging purposes.
If you want to apply the computed coordinates to real graphics you should use a graphics library such as [IvanK](http://lib.ivank.net/) developed by Ivan Kuckir. The website of _IvanK_ even contains a Box2dWeb example: http://lib.ivank.net/index.php?p=demos&d=box2D
```
## Graphics ##
Please notice that Box2dWeb is a physics engine. The graphics in the demo are generated by the b2DebugDraw-class, which is only available for debugging purposes.
If you want to apply the computed coordinates to real graphics you should use a graphics library such as [IvanK](http://lib.ivank.net/) developed by Ivan Kuckir. The website of _IvanK_ even contains a Box2dWeb example: http://lib.ivank.net/index.php?p=demos&d=box2D