-
Notifications
You must be signed in to change notification settings - Fork 2
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
Ring/Pie improvements #22
Comments
2024-09-24.150418.mp4 |
I am considering how to render arc shape with corner rounding option like above video. But in my knowlage, maybe it needs spline to round arc's corners (but not sure). I don't want to use the spline approach for simple shapes because the distance function for splines is the heaviest and easily affects performance. So currently this update is not exactly the same as the video above. video0.mp4video1.mp4 |
About my latest update, I give up to implement exactly same as video you attached. So spline is not used, it is just implemented using round function as you mentioned. |
I changed Arc settings a bit to be similar to figma settings. Also in its current form, there is no need for Pie anymore. There's probably no need for Circle too, but for performance and compatibility reasons I'd keep it. Maybe it makes sense to make one Circle script like in figma and swap shaders. |
What's changed: |
2024-09-27.155307.mp4 |
I agree with the use of shader swaps for optimisation. And when considering the integration of circle based shapes into one. Maybe it is worth inheriting some public class SDFArc: SDFPie {}
public class SDFPie: SDFCircle {}
public class SDFCutDisk: SDFCircle {} I created a |
For pie and ring
Add start angle property
For reasons of similarity to figma, layout and animation
smth like this:
https://www.shadertoy.com/view/tlSGzG
Remove sdf arc, instead add corners rounding property to sdf ring(and rename sdf ring to arc)
2024-09-24.150027.mp4
The text was updated successfully, but these errors were encountered: