Fixed two bugs in drawLine that causes it to never use WebGl #39
Closed
Jesper-FRVR
started this conversation in
General
Replies: 2 comments
-
sry for not making a pull request ... but I've never figured it out :( and thanks for a great library btw <3 |
Beta Was this translation helpful? Give feedback.
0 replies
-
thanks, i got it fixed! the =glEnable isn't necessary because it will eventually default to that in drawTile, but the extra 0,s was definitely a bug. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
function drawLine(posA, posB, thickness=.1, color, useWebGL=glEnable)
{
const halfDelta = vec2((posB.x - posA.x)/2, (posB.y - posA.y)/2);
const size = vec2(thickness, halfDelta.length()*2);
drawRect(posA.add(halfDelta), size, color, halfDelta.angle(), useWebGL);
}
Beta Was this translation helpful? Give feedback.
All reactions