kripken / box2d.js

Port of Box2D to JavaScript using Emscripten
1.33k stars 196 forks source link

Allocating an array #5

Open unphased opened 11 years ago

unphased commented 11 years ago

How can I allocate an array in order to specify geometry (e.g. for a chain shape or polygon shape)?

Doesn't look like box2d.js was compiled with malloc.

jobtalle commented 6 years ago

Emscripten does provide memory management functions for this, they're used in embox2d-helpers.js which creates chain and polygon shapes.