-
Notifications
You must be signed in to change notification settings - Fork 2.2k
ThreeD bug fixes #674
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
ThreeD bug fixes #674
Conversation
Nice, thanks a lot for fixing this! :) from manim import *
class Text3D3(ThreeDScene):
def construct(self):
axes = ThreeDAxes()
self.set_camera_orientation(phi=75 * DEGREES,theta=-45*DEGREES)
text3d=TextMobject("This is a 3D text")
self.add_fixed_in_frame_mobjects(text3d)
text3d.to_corner(UL)
self.add(axes) and it behaves like expected. |
Some other bugs I found while rendering my ThreeDScene's:
class Example(ThreeDScene):
def construct(self):
cube = Cube()
self.play(Animation(cube))
self.move_camera(phi=PI / 4, theta=PI / 4, frame_center=[0, 0, -2])
Fixed by changing
Finally, made addition to CameraMoveTest by adding The last commit fixes these new bugs. |
There seems to be a small differnce in the created test data and the reference data: First unmatched index is at [ 30 168]: [153 153 153 255] != [154 154 154 255]. |
@kolibril13 yeah, the test passes locally. |
ok, I will test this also locally on my machine right now. |
I'm on Windows 10 64. If you have time to make the test data and commit that would be great. I'm not sure why my side passes and yours doesn't |
def construct(self): | ||
axes = ThreeDAxes() | ||
self.set_camera_orientation(phi=75 * DEGREES, theta=-45 * DEGREES) | ||
text3d = TextMobject("This is a 3D text") |
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.
TextMobject
has been deprecated; please use Text
.
Without specifying the font to use, there is no chance this test will pass on all of our supported operating systems: different systems use different default fonts, this is my guess why the tests are failing.
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.
Good catch!
Thanks for this!
Therefore, I think it would be best if you could just update your test, @BrendanMartin.
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.
Actually, this is wrong as has been pointed out on Discord: TextMobject
was deprecated, but it is the old equivalent to what is Tex
nowadays. I have no idea why the test outputs are different in that case, unfortunately.
And one more idea: |
@kolibril13 the circle is definitely a better idea. In the test you removed |
Thanks. |
Wuhu, tests are not failing anymore! |
Thanks for the help! |
This is a fix for #569.
Added import for new location of
extract_mobject_family_members
and removedself.
from invocation in methodadd_fixed_in_frame_mobjects
.Acknowledgement