from manim import *
class FixedTextDemo(ThreeDScene):
    def construct(self):
        self.set_camera_orientation(phi=70 * DEGREES, theta=35 * DEGREES)
        axes = ThreeDAxes(x_length=7, y_length=7, z_length=5)
        text = Text("固定在相机帧中的文本", font="STLiti", font_size=30, color=YELLOW).to_corner(UL)
        self.add_fixed_in_frame_mobjects(text)
        self.play(FadeIn(axes), FadeIn(text), run_time=1.2)
        self.move_camera(phi=55 * DEGREES, theta=-30 * DEGREES, run_time=2.6)
        self.wait(2.0)
