-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add Rounded Corners #1795
Add Rounded Corners #1795
Conversation
Thank you very much for working on this! When the implementation is done and ready for review, could you also add a test case for this to the regression suite? You'll just need to:
The code will also need to be formatted according to Airbnb's Swift Style Guide. You can do this automatically by running Thanks! |
I also see you've only implemented this feature for the Main Thread rendering engine and not the new Core Animation rendering engine. That's fine for this PR -- I'll port this to the Core Animation rendering engine in a follow-up. |
@calda Hi! Thanks for looking at this PR! I'm having some issues with snapshot tests in LottieFiles/gradient_shapes and TypeFace/Apostrophe. It looks like they have "ty": "rd" inside of the jsons so I think this is expected. Is it possible to view the Snapshot results? |
Yup! This PR is only for the main thread engine for now. |
// RoundedCornersNode.swift | ||
// Lottie | ||
// | ||
// Created by Duolingo on 10/31/22. |
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.
You work at Duolingo? Cool!
I have a 1083 day streak learning Spanish 😄 Really love what Duolingo has been doing with Lottie lately -- cutting edge stuff. The new feature where the characters lip-sync with the text-to-speech synth honestly blew my mind. Is that using Lottie or some sort of custom lip sync renderer?
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.
Yeah! Glad you're enjoying that! I implemented that on iOS actually :D. We couldn't figure out a way to do that with Lottie so we ended up having to use a different more state-machine based animation Library
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.
So cool, awesome work! (Not surprised that isn't possible with Lottie)
Are you on Twitter? Would love to give you a follow if so -- I'm https://twitter.com/calstephens98
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.
I don't use it much for work-related stuff but gave you a follow!
Yes, there are a few ways to do this:
|
|
||
extension BezierPath { | ||
// Round corners of a single bezier | ||
func roundCorners(radius: CGFloat) -> BezierPath { |
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.
Thank you for implementing this algorithm in Swift!
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.
Thank you!
Head branch was pushed to by a user without write access
This PR resolves issue #1523:
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2022-11-02.at.12.09.03.mp4