0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-23 09:26:51 -05:00
This commit is contained in:
Martti Laine 2016-11-12 13:31:50 +02:00
parent 422c1e4dff
commit 74de894ed9

View file

@ -385,10 +385,12 @@ var Vector = require('../geometry/Vector');
c.lineTo(constraint.pointB.x, constraint.pointB.y); c.lineTo(constraint.pointB.x, constraint.pointB.y);
} }
if (constraint.render.lineWidth) {
c.lineWidth = constraint.render.lineWidth; c.lineWidth = constraint.render.lineWidth;
c.strokeStyle = constraint.render.strokeStyle; c.strokeStyle = constraint.render.strokeStyle;
c.stroke(); c.stroke();
} }
}
}; };
/** /**
@ -523,16 +525,20 @@ var Vector = require('../geometry/Vector');
if (!options.wireframes) { if (!options.wireframes) {
c.fillStyle = part.render.fillStyle; c.fillStyle = part.render.fillStyle;
if (part.render.lineWidth) {
c.lineWidth = part.render.lineWidth; c.lineWidth = part.render.lineWidth;
c.strokeStyle = part.render.strokeStyle; c.strokeStyle = part.render.strokeStyle;
c.stroke();
}
c.fill(); c.fill();
} else { } else {
c.lineWidth = 1; c.lineWidth = 1;
c.strokeStyle = '#bbb'; c.strokeStyle = '#bbb';
}
c.stroke(); c.stroke();
} }
}
c.globalAlpha = 1; c.globalAlpha = 1;
} }