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

Serialization #36

Open
yang opened this issue Oct 10, 2017 · 1 comment
Open

Serialization #36

yang opened this issue Oct 10, 2017 · 1 comment
Milestone

Comments

@yang
Copy link

yang commented Oct 10, 2017

Thanks for the nice library!

Any advice on how to accurately serialize the state of a planck World? Simply iterating over all bodies/fixtures and copying their positions/velocities/vertices/etc. doesn't work for collisions in progress, etc. There are also a few Function objects in the object hierarchy, hindering more straightforward serialization mechanisms. (FWIW, serialization is something that libraries like matter.js do support out-of-the-box.) Thanks!

@yang yang changed the title Hints on serialization Serialization Oct 10, 2017
@shakiba
Copy link
Collaborator

shakiba commented Nov 20, 2017

I'm not sure it is possible to correctly serialize when a collision is in progress. Box2D classes have dump function which I did not rewrite in JS, but a similar mechanism is probably the solution.

@shakiba shakiba added this to the v2.0 milestone Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants