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:
parent
2f5e304f7b
commit
8beb5d09ae
1 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue