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!
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.
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!