The superclass of all objects in Manim is Mobject. By inheriting this Mobject, classes such as text, shapes, graphs, and images are created. We'll cover how to deal with these classes in Chapter 05.
Prior to this, in this chapter, we will first look at common methods that all objects have. It is a common method used in all objects, so it will be efficient to know here first.
Common methods are defined in the Mobject class. There are quite a few methods in the Mobject class, and only the most used methods are selected and explained. The rest methods will be explained when needed.
The Mobject class code is in the manimlib/mobject/mobject.py file. Refer to this file for a complete list of which methods are available.
Among the common methods in Mobject, I have categorized frequently used methods according to their usage.
Category | Methods |
A. Moving | move_to, to_edge, to_corner, next_to, shift |
B. Dimensional | get_width/height, set_width/height, get_center/top/bottom/left/right |
C. Aligning | align_to, arrange, arrange_in_grid |
D. Coloring | set_color, set_color_by_gradient |
E. Status changing | scale, rotate |
F. Status | copy, save_state, restore |
[05-1-B]Dimensional methods: get_width/height/top, set_width/height
[05-1-C]Aligning methods: align_to, arrange, arrange_in_grid
[05-1-D]Coloring methods: set_color, set_color_by_gradient
[05-1-E]Shape changing methods: scale, rotate
Next: [05-1-A]Moving methods
Go To: [99] Table of Contents
'Programming > Manim Lectures' 카테고리의 다른 글
[05-1-B]Dimensional methods: get_width/height/top, set_width/height (0) | 2020.06.05 |
---|---|
[05-1-A]Moving methods (0) | 2020.06.05 |
[05]Mobject (0) | 2020.06.05 |
[04-7] Examples: Object moving animation (0) | 2020.06.01 |
[04-6] Move to relative position(shift) (0) | 2020.06.01 |