You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Matter.js module aliasesvarEngine=Matter.Engine,World=Matter.World,Bodies=Matter.Bodies;// create a Matter.js enginevarengine=Engine.create(document.body);// create two boxes and a groundvartrap=Bodies.trapezoid(400,10,80,80,1)varboxA=Bodies.rectangle(400,200,80,80);varboxB=Bodies.rectangle(450,50,80,80);varground=Bodies.rectangle(400,610,810,60,{isStatic: true});// add all of the bodies to the worldWorld.add(engine.world,[boxA,boxB,ground,trap]);// run the engineEngine.run(engine);
Do you need a triangle? Use Bodies.polygon with sides 3.
Otherwise, I can't see why you'd want a trapezoid with slope 1 because it doesn't generate a trapezoid. The value should be more like 0.1 to 0.5, so closing this, thanks.
I don't actually need this but i was trying to get a triangle with one side shorter and slope=1 gives me figure i was looking for. This is how i find this bug.
http://codepen.io/anon/pen/GJbZyv
The text was updated successfully, but these errors were encountered: