0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-12 16:08:50 -05:00

fix issue rendering angle constraint end point

This commit is contained in:
liabru 2020-12-30 14:15:25 +00:00
parent 2f5e304f7b
commit 8beb5d09ae

View file

@ -513,17 +513,17 @@ var Mouse = require('../core/Mouse');
start = constraint.pointA;
}
if (bodyB) {
end = Vector.add(bodyB.position, constraint.pointB);
} else {
end = constraint.pointB;
}
if (constraint.render.type === 'pin') {
c.beginPath();
c.arc(start.x, start.y, 3, 0, 2 * Math.PI);
c.closePath();
} else {
if (bodyB) {
end = Vector.add(bodyB.position, constraint.pointB);
} else {
end = constraint.pointB;
}
c.beginPath();
c.moveTo(start.x, start.y);