We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6679b9c commit 87fbf51Copy full SHA for 87fbf51
1 file changed
demo/js/Demo.js
@@ -137,6 +137,7 @@
137
138
size = 150;
139
x = 400;
140
+ y = 300;
141
142
var partC = Bodies.circle(x, y, 30),
143
partD = Bodies.circle(x + size, y, 30),
@@ -147,7 +148,13 @@
147
148
parts: [partC, partD, partE, partF]
149
});
150
- World.add(_world, [compoundBodyA, compoundBodyB]);
151
+ var constraint = Constraint.create({
152
+ pointA: { x: 400, y: 100 },
153
+ bodyB: compoundBodyB,
154
+ pointB: { x: 0, y: -50 }
155
+ });
156
+
157
+ World.add(_world, [compoundBodyA, compoundBodyB, constraint]);
158
159
var renderOptions = _engine.render.options;
160
renderOptions.showAxes = true;
0 commit comments