-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix arrows requiring a radius to be visible #1720
Conversation
.. that is the immediately user-facing problem this solves. But in fact it makes the line renderer a bit more predictable: Previously, line caps would extend the line. Now they stay within the bounds of the previously determined line positions!
oops. not actually the same length yet on all combination. Thanks for pointing that out @nikolausWest 😅 |
For arrow tips I think it makes sense that the end-point is at the tip. For rounded ends I find it more intuitive that the end-point is in the center of the hemisphere. That way one can easily combine multiple capsules together into a smooth line-strip with concentric hemispheres. |
I actually broke rectangles I noticed a bit too late. I have now an option to configure the outward extensibility which addresses both that issue and your comment :) |
…arrows have a rounded base with outwards extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I think the code could be simplified quite a bit!
thanks for the input! Most of the stuff suggested doesn't work as-is because of some detail (typically on how cap triangles are flagged) but that does stress the point that this got a bit too hard to follow again. I'll try to make it simpler! |
a39c36a
to
a8787dc
Compare
Fixes #1708
.. that is the immediately user-facing problem this solves. But in trying to solve this properly I had to make the line renderer a bit more predictable: Previously, line caps would extend the line. Now they stay within the bounds of the previously determined line positions!
2D Demo before - note how caps make the lines longer:
and after - all the same length now:
rounded rectangles are still rounded (requires outward extending the rounded cap):
What an outline around it looks like (clock example):
Checklist