-
Notifications
You must be signed in to change notification settings - Fork 7
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
As a project developer, I want to be able to render the world to a canvas using a function #23
Comments
Yes, I've thought about this too, back when I started this project. It wasn't easily possible then though. Can't remember the exact problems I faced. But I will take another look when I find some time. |
I've just released @box2d/debug-draw, check the documentation here: |
@8Observer8 It seems npm had some issue installing. Have you tried just running Edit: Nevermind, you installed version 0.10 of the core library, but you didn't install Try running |
Just FYI, anything with an |
I thought it would be like in C++. But okay, it's better than nothing. Thank you. |
The testbed is neat at all, but its only useful for proof of concepts. It also doesnt seem to be exposed anywhere. Which means anyone working on their own project will be unable to visualize their world unless they copypaste all their files into the testbed website.
What I'd prefer is a function to call that renders a world to canvas. (The original box2d.js has this, but that project is old and throws errors in modern environments. The dev also doesnt publish to npm despite having git updates)
I'd like something where I can run everything in a functional way in places that I control:
I'm looking through the code, but it seems impossible to figure out how to get this working. I know the functionality is there given that the testbed works. But I dont understand why its not easily available.
I dont particularly care how the api looks.
bounds
,strokeColor
, andstrokeSize
are good enough for me.box2d.js has a class structure that probably works decently: https://github.com/kripken/box2d.js/#using-debug-draw
The text was updated successfully, but these errors were encountered: