Emscripten Bindings: How to create an accessible C/C++ array from Javascript?
问题 I am using box2d and attempting to create a chain shape. In order to create a chain shape or polygon shape I must pass an array of vectors in order to specify the geometry. I do not see any documentation to help me accomplish this, and the notes about bindings here don't go into any detail about arrays. How can I construct an array? 回答1: I have solved this problem by using these (as yet undocumented) emscripten features. Note that I am accessing the functions and values (like ALLOC_STACK and