-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 code transform animation #4114
base: main
Are you sure you want to change the base?
Fix code transform animation #4114
Conversation
Hey there! Thanks for looking into this! I do like this new animation, but I am not convinced that it should be implemented like this, in a separate module with a separate class. Now that the That is:
would play the animation you have implemented here. Now, maybe passing a What do you think? |
Thank you for the feedback! I understand that the Code mobject has been updated, and I also see the distinction between Would it be okay to continue this way? |
Hi ! I think that the line numbering should also be transformed manually. Common numbers are transformed individually, new numbers are faded in and old numbers are faded out. |
Fixed #4103
I added a new
CodeTransform
function. The currentTransform
withCode
looked weird, but now it works much better.The logic is as follows:
When applying
CodeTransform
frombefore_code
toafter_code
:before_code
andafter_code
into lines and remove leading indentation.before_code
does not match, it will be removed with aFadeOut
animation. If a line inafter_code
does not match, it will be added with aFadeIn
animation. This transition is visually presented through animation.This is my first PR! Any advice or suggestions will be appreciated :)
Below are videos demonstrating the difference before and after applying the
CodeTransform
.Using
Transform
(Before)CodeAnimation.mp4
Using
CodeTransform
(After)CodeAnimation.mp4
Reviewer Checklist