Giter VIP home page Giter VIP logo

box2dweb-closure's Introduction

Original Box2D created by Erin Catto
http://www.gphysics.com
http://box2d.org/

Box2D was converted to Flash by Boris the Brave, Matt Bush, and John Nesky as Box2DFlash
http://www.box2dflash.org/

Box2DFlash was converted from Flash to Javascript by Uli Hecht as box2Dweb
http://code.google.com/p/box2dweb/

box2Dweb was modified to utilize Google Closure, as well as other bug fixes, optimizations, and tweaks by Illandril
https://github.com/illandril/box2dweb-closure

Requires Google Closure: http://code.google.com/closure/


Important changes from Box2DWeb:
 * all userData references have been removed
 * b2Body types are now in b2BodyDef
 * b2Shape types are now in each specific Shape
 * most integer parameters now assume non-null, non-undefined values (like the b2Vec2 and b2Vec3 constructors)
 * b2BodyList and b2FixtureList have been added, instead of each object acting as a node in a linked list
 * b2ContollerEdge has been replaced by b2ControllerList and b2BodyList

Anticipated future changes:
 * b2JointList (similar to b2BodyList and b2FixtureList)
 * b2ContactList (similar to replacement of b2ControllerEdge... maybe)
 * b2ContactID/Features consolidation
 * (maybe) renaming of some variables (mostly removing the m_ prefixes, but some changes to make them more clear on what they are for)
 * fixing visibility of most variables (by annotation and convention only - not by anything that would actually make them private as far as javascript is concerned)
 * moving constant values from b2Settings (and maybe other areas) to Box2D.Consts

If you are interested in a version that is Gjslint compliant, and with all warnings fixed (sometimes by making things public that are supposed to be private or protected), firecow has made a fork: https://github.com/firecow/box2dweb-closure

Notice anything else that doesn't work (especially if it did work using box2dweb)?
E-mail [email protected]

box2dweb-closure's People

Contributors

illandril avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

box2dweb-closure's Issues

Step frequency.

Hi I thought I would give this ago and with a couple of tweeks had my game ported from the stock version of box2dweb to your google version.

Would there be any reason why if I change my step frequency it looks all jittery? I am using the easel framework and have set my frame rate to 25. This works fine with the original version, but with your version it looks like it is studerring.

Setting the frame-rate to 30 minimises this to some extent but not really enough, is there something your port does differently?

Thanks for the help.

Compiler warnings.

With the new google closure compiler, you have like 700 warnings...
Mostly because private members are accessed publicly.

userdata

Wondering why you removed the get/setUserData functionality

Why Box2D.Common.Math.b2Vec2() is private?

Hi Joe,

I have small question.
Why Box2D.Common.Math.b2Vec2() is private? It used in many cases.
For example in the baseInit.js
var world = new Box2D.Dynamics.b2World(new Box2D.Common.Math.b2Vec2(0, 9.8) /* gravity /, true / allowSleep */);

Thanks,
Vlad

PS Thank you for the box2dweb-closure library.

Revolute joint motors with mass

Can't seem to get a revolute joint to move it's motor is the objects its attached to have mass. Anybody seen anything similar?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.