Permalink
Browse files

set line length based on distance

  • Loading branch information...
Jeremy Heminger Jeremy Heminger
Jeremy Heminger authored and Jeremy Heminger committed Nov 26, 2018
1 parent bad30e3 commit be34e13a372f1cb9a08d2bf39e384752efbdc48a
Showing with 1 addition and 1 deletion.
  1. +1 −1 js/gobject.js
@@ -31,7 +31,7 @@ class gObject {
if(RENDERLINES) {
ctx.beginPath();
ctx.setLineDash([1, 15]);
ctx.setLineDash([1, Math.floor(distance(this.vars.x,this.vars.y,_objects[0].get().x,_objects[0].get().y) / 10)]);
ctx.strokeStyle = '#ffffff';
ctx.moveTo(_objects[0].get().x,_objects[0].get().y);
ctx.lineTo(this.vars.x,this.vars.y);

0 comments on commit be34e13

Please sign in to comment.