I am trying this code :-
class CameraFocusing(Scene):
def construct(self):
s = Square(color=YELLOW).move_to(np.array([-4,0,0]))
c = Circle().move_to(np.array([4,0,0]))
self.add(s,c)
self.wait(3)
self.camera.frame_center = s.get_center()
self.wait(3)
self.play(self.camera.frame.animate.shift(8 * RIGHT))
self.wait(2)
type here
if __name__ == "__main__":
config.pixel_height = 720
config.pixel_width = 1280
config.frame_height = 7.0
config.frame_width = 7.0
config.frame_center = [-4, 0, 0]
config.background_color = BLACK
config.pixel_height = 720
config.pixel_width = 1280
config.save_as_gif = True
config.quality = "medium"
config.media_height = 7.0
config.media_width = 7.0
scene = CameraFocusing()
scene.render()
but whenever i am trying to execute this, i get this Attribute error:-
AttributeError: 'Camera' object has no attribute 'frame'