box2d.js
                                
                                 box2d.js copied to clipboard
                                
                                    box2d.js copied to clipboard
                            
                            
                            
                        EdgeShape
Hi, Wanted to create a b2EdgeShape, but I see that a few properties are not exposed through the JS api. I investigated it like this:
var edge = new b2EdgeShape();
console.log(edge)
There are no functions for setting m_vertex1, m_vertex2, m_hasVertex0, m_hasVertex3. These are the properties I need for now...
They are defined in the Box2D C++ code here: https://github.com/kripken/box2d.js/blob/master/Box2D_v2.2.1/Box2D/Collision/Shapes/b2EdgeShape.h#L57
Thanks for an otherwise great port, it's been working nicely for me so far!
Stefan
you need to write in .cpp library as below
b2Vec2 m_vertex0;
b2Vec2 m_vertex3;
bool m_hasVertex0;
boo m_hasVertex3;
then you have to generate code from cpp to js using tool.I hope it will work.