Comments (8)
When looping through Bodies, .ptr
resulted in an error. I had to use Box2D.getPointer(body) !== 0
from box2d.js.
Bit of a hack, but this seems to work:
for(var edge = this.body.GetContactList(); edge.ptr !== 0; edge = edge.get_next()) {}
from box2d.js.
I have the same problem....
from box2d.js.
Calling GetNext()
on a body results in the same problem. A loop like the following will never exit:
for (var body = world.GetBodyList(); body; body = body.GetNext()) {
// stuff
}
from box2d.js.
Nice, thanks!
from box2d.js.
Yes, you are correct. And you've already discovered the workaround. Since there is a workaround, this issue is quite superficial. Just a heads up however, there are many deeper issues with this port which make it unusable for any non-experimental purposes. Box2DWeb is more reliable presently, albeit slightly older.
On 2013-06-30, at 5:16 PM, bunnyhero [email protected] wrote:
When looping through Bodies, .ptr resulted in an error. I had to use Box2D.getPointer(body) !== 0
—
Reply to this email directly or view it on GitHub.
from box2d.js.
Hi,
I also like the syntax better of this port. What other deeper issues there? I would prefer to include this port with RaptorGL instead of Box2DWeb. I'm happy to help out if you can give me some pointers.
Cheers
Laszlo
http://twitter.com/LZAntal
On Jun 30, 2013, at 8:16 PM, Jonathan Commins [email protected] wrote:
Yes, you are correct. And you've already discovered the workaround. Since there is a workaround, this issue is quite superficial. Just a heads up however, there are many deeper issues with this port which make it unusable for any non-experimental purposes. Box2DWeb is more reliable presently, albeit slightly older.
On 2013-06-30, at 5:16 PM, bunnyhero [email protected] wrote:
When looping through Bodies, .ptr resulted in an error. I had to use Box2D.getPointer(body) !== 0
—
Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHub.
from box2d.js.
A bunch of functions do not properly return values. For example, body.GetMassData()
returns an error always. In fact the b2MassData
class is not bound, and thus is not available for use. This is not the issue however, because even if you were to use embind to make the class available, the function still does not appear to return valid data. Other important functionality like b2Manifold
used when listening for collisions is also broken. There are actually quite a few classes which have not been bound. But who knows, maybe you won't need them...
On 2013-07-02, at 11:47 AM, lzantal [email protected] wrote:
Hi,
I also like the syntax better of this port. What other deeper issues there? I would prefer to include this port with RaptorGL instead of Box2DWeb. I'm happy to help out if you can give me some pointers.
Cheers
Laszlo
http://twitter.com/LZAntalOn Jun 30, 2013, at 8:16 PM, Jonathan Commins [email protected] wrote:
Yes, you are correct. And you've already discovered the workaround. Since there is a workaround, this issue is quite superficial. Just a heads up however, there are many deeper issues with this port which make it unusable for any non-experimental purposes. Box2DWeb is more reliable presently, albeit slightly older.
On 2013-06-30, at 5:16 PM, bunnyhero [email protected] wrote:
When looping through Bodies, .ptr resulted in an error. I had to use Box2D.getPointer(body) !== 0
—
Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHub.
from box2d.js.
Related Issues (20)
- b2Vec2 won't free HOT 2
- Unable to build latest on macOS Mojave with [email protected] HOT 5
- High Gravity jitter HOT 1
- missing runtime methods for allocating arrays HOT 4
- box2d.wasm.html test faild with [email protected] build HOT 2
- is there typescript declaration file (d.ts) for this project? HOT 2
- Box2d 2.4.0
- Box2D 2.4.0 HOT 8
- Node server side implementation
- How does this work with webpack? HOT 1
- May I ask why the calculation results are different on the ios and android platforms HOT 2
- vue how to use it
- vue hao to use it
- why is not show?
- why now show debugdraw
- could i have more simple demos about the box2djs ,and where can i see the API about box2djs
- How to build? I want to build the debug version of javascript file
- Position not getting what is set
- Uncaught (in promise) cannot construct a b2Draw, no constructor in IDL
- Memory won't free HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box2d.js.