mirror of
https://github.com/liabru/matter-js.git
synced 2025-02-01 18:24:54 -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;
|
start = constraint.pointA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bodyB) {
|
||||||
|
end = Vector.add(bodyB.position, constraint.pointB);
|
||||||
|
} else {
|
||||||
|
end = constraint.pointB;
|
||||||
|
}
|
||||||
|
|
||||||
if (constraint.render.type === 'pin') {
|
if (constraint.render.type === 'pin') {
|
||||||
c.beginPath();
|
c.beginPath();
|
||||||
c.arc(start.x, start.y, 3, 0, 2 * Math.PI);
|
c.arc(start.x, start.y, 3, 0, 2 * Math.PI);
|
||||||
c.closePath();
|
c.closePath();
|
||||||
} else {
|
} else {
|
||||||
if (bodyB) {
|
|
||||||
end = Vector.add(bodyB.position, constraint.pointB);
|
|
||||||
} else {
|
|
||||||
end = constraint.pointB;
|
|
||||||
}
|
|
||||||
|
|
||||||
c.beginPath();
|
c.beginPath();
|
||||||
c.moveTo(start.x, start.y);
|
c.moveTo(start.x, start.y);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue