Open ahicks92 opened 5 years ago
Also if these are missing, are there other things from the preamble that we should be exporting? Might be best to check them all at once.
Yeah, emscripten now requires explicit exporting of runtime methods. We should add any of those that are mentioned in the docs as working, I guess.
Do we mention allocate
, though? That's an internal API I hope isn't used outside of core emscripten code.
And getValue/setValue are kind of slow - may be better to document using Box2D.HEAPF32
or such.
They're used in the helpers, for building chain and polygon shapes. Here.
I guess it's more of an Emscripten issue, but if there's another way to allocate arrays it's not documented well. I guess it could export C's malloc.
I see, thanks. Yeah, malloc would be a much better option to use here (faster too).
based off the helpers and the Emscripten docs, there needs to be a
Box2D.allocate
,Box2D.getValue
, andBox2D.setValue
, possibly others. Using the asm.js build these don't seem to exist anymore. This might be because I'm doing something very wrong, or because Emscripten now wants you to specify runtime methods to export (specifically that doc implies that they can get optimized out if you don't).At the moment I can move forward without this functionality. I don't know enough about Emscripten to fix this trivially, but I'll come back to it if/when I get blocked, if it's still open.