-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Feature request: Enable lineJoin property when drawing Graphics primitives #1637
Comments
Thick lines can be tricky in WebGL. Things like triangle orientation, sharp miters, anti-aliasing, end caps, etc all tend to complicate the code. Eventually it would be cool if there was some shared modules in this space so that ThreeJS/stackgl/etc could take advantage. If you want an easy approach that is pure WebGL (i.e. no 2D canvas), you can use the polyline-normals module. Given a set of 2D points, it will give you the normals and miter lengths for those points. From this you could create your own polygon with PIXI.Graphics. Some references in case anybody wants to tackle this: |
Thanks for the comments and links :) Unfortunately a WebGL only approach isn't an option and TBH would be OTT for my case - I'd actually far rather just render to canvas and then modularise the PIXI cacheAsBitmap code to work (I'm using PIXI to avoid dealing with WebGL ;-) !) just for my use case. Nice blog BTW but I don't agree with your comments about semi-colons ;-) |
+1 |
+1 |
TBF, it's had a v3, v4 and a v5 tag ;-) (that's honestly not a criticism guys, I'm just messing with you :) !) |
wait |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Should not be stale/closed, referenced in the documentation. |
Hi guys - I'm drawing a load of lines and I'd really like them to have a lineJoin of "miter" rather than the sharp edges that currently exist. I'm happy to just draw them to a canvas context as I'm only caching the resulting image as a bitmap anyway (so limited performance concerns) and I've seen that you already have this available when working with text so was hoping it would be a quick fix ;-)
Any more info that you need, please just ask :)
N
The text was updated successfully, but these errors were encountered: