mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
Better align docs description of configuration with the updated format
This commit is contained in:
@ -8,38 +8,35 @@ they are only used inside manim.
|
|||||||
Frame and pixel shape
|
Frame and pixel shape
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
These values will be determined based on the ``camera`` configuration in default_config.yml or custom_config.yml
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
ASPECT_RATIO = 16.0 / 9.0
|
ASPECT_RATIO
|
||||||
FRAME_HEIGHT = 8.0
|
FRAME_HEIGHT
|
||||||
FRAME_WIDTH = FRAME_HEIGHT * ASPECT_RATIO
|
FRAME_WIDTH
|
||||||
FRAME_Y_RADIUS = FRAME_HEIGHT / 2
|
FRAME_Y_RADIUS
|
||||||
FRAME_X_RADIUS = FRAME_WIDTH / 2
|
FRAME_X_RADIUS
|
||||||
|
|
||||||
DEFAULT_PIXEL_HEIGHT = 1080
|
DEFAULT_PIXEL_HEIGHT
|
||||||
DEFAULT_PIXEL_WIDTH = 1920
|
DEFAULT_PIXEL_WIDTH
|
||||||
DEFAULT_FPS = 30
|
DEFAULT_FPS
|
||||||
|
|
||||||
Buffs
|
Buffs
|
||||||
-----
|
-----
|
||||||
|
|
||||||
.. code-block:: python
|
These values will be determined based on the ``size`` configuration in default_config.yml or custom_config.yml
|
||||||
|
|
||||||
SMALL_BUFF = 0.1
|
|
||||||
MED_SMALL_BUFF = 0.25
|
|
||||||
MED_LARGE_BUFF = 0.5
|
|
||||||
LARGE_BUFF = 1
|
|
||||||
|
|
||||||
DEFAULT_MOBJECT_TO_EDGE_BUFF = MED_LARGE_BUFF # Distance between object and edge
|
|
||||||
DEFAULT_MOBJECT_TO_MOBJECT_BUFF = MED_SMALL_BUFF # Distance between objects
|
|
||||||
|
|
||||||
Run times
|
|
||||||
---------
|
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
DEFAULT_POINTWISE_FUNCTION_RUN_TIME = 3.0
|
SMALL_BUFF
|
||||||
DEFAULT_WAIT_TIME = 1.0
|
MED_SMALL_BUFF
|
||||||
|
MED_LARGE_BUFF
|
||||||
|
LARGE_BUFF
|
||||||
|
|
||||||
|
DEFAULT_MOBJECT_TO_EDGE_BUFF
|
||||||
|
DEFAULT_MOBJECT_TO_MOBJECT_BUFF
|
||||||
|
|
||||||
Coordinates
|
Coordinates
|
||||||
-----------
|
-----------
|
||||||
@ -89,16 +86,11 @@ Text
|
|||||||
OBLIQUE = "OBLIQUE"
|
OBLIQUE = "OBLIQUE"
|
||||||
BOLD = "BOLD"
|
BOLD = "BOLD"
|
||||||
|
|
||||||
Stroke width
|
|
||||||
------------
|
|
||||||
|
|
||||||
.. code-block:: python
|
|
||||||
|
|
||||||
DEFAULT_STROKE_WIDTH = 4
|
|
||||||
|
|
||||||
Colours
|
Colours
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
Color constants are determined based on the ``color`` configuration in default_config.yml or custom_config.yml
|
||||||
|
|
||||||
Here are the preview of default colours. (Modified from
|
Here are the preview of default colours. (Modified from
|
||||||
`elteoremadebeethoven <https://elteoremadebeethoven.github.io/manim_3feb_docs.github.io/html/_static/colors/colors.html>`_)
|
`elteoremadebeethoven <https://elteoremadebeethoven.github.io/manim_3feb_docs.github.io/html/_static/colors/colors.html>`_)
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@ custom_config
|
|||||||
running file under the ``output`` path, and save the output (``images/``
|
running file under the ``output`` path, and save the output (``images/``
|
||||||
or ``videos/``) in it.
|
or ``videos/``) in it.
|
||||||
|
|
||||||
|
- ``base``
|
||||||
|
The root directory that will hold files, such as video files manim renders,
|
||||||
|
or image resources that it pulls from
|
||||||
|
|
||||||
- ``output``
|
- ``output``
|
||||||
Output file path, the videos will be saved in the ``videos/`` folder under it,
|
Output file path, the videos will be saved in the ``videos/`` folder under it,
|
||||||
and the pictures will be saved in the ``images/`` folder under it.
|
and the pictures will be saved in the ``images/`` folder under it.
|
||||||
@ -66,34 +70,62 @@ custom_config
|
|||||||
The directory for storing sound files to be used in ``Scene.add_sound()`` (
|
The directory for storing sound files to be used in ``Scene.add_sound()`` (
|
||||||
including ``.wav`` and ``.mp3``).
|
including ``.wav`` and ``.mp3``).
|
||||||
|
|
||||||
- ``temporary_storage``
|
- ``cache``
|
||||||
The directory for storing temporarily generated cache files, including
|
The directory for storing temporarily generated cache files, including
|
||||||
``Tex`` cache, ``Text`` cache and storage of object points.
|
``Tex`` cache, ``Text`` cache and storage of object points.
|
||||||
|
|
||||||
``tex``
|
|
||||||
|
``window``
|
||||||
|
----------
|
||||||
|
|
||||||
|
- ``position_string``
|
||||||
|
The relative position of the playback window on the display (two characters,
|
||||||
|
the first character means upper(U) / middle(O) / lower(D), the second character
|
||||||
|
means left(L) / middle(O) / right(R)).
|
||||||
|
|
||||||
|
- ``monitor_index``
|
||||||
|
If using multiple monitors, which one should the window show up in?
|
||||||
|
|
||||||
|
- ``full_screen``
|
||||||
|
Should the preview window be full screen. If not, it defaults to half the screen
|
||||||
|
|
||||||
|
- ``position``
|
||||||
|
This is an option to more manually set the default window position, in pixel
|
||||||
|
coordinates, e.g. (500, 300)
|
||||||
|
|
||||||
|
- ``size``
|
||||||
|
Option to more manually set the default window size, in pixel coordinates,
|
||||||
|
e.g. (1920, 1080)
|
||||||
|
|
||||||
|
|
||||||
|
``camera``
|
||||||
|
----------
|
||||||
|
|
||||||
|
- ``resolution``
|
||||||
|
Resolution to render at, e.g. (1920, 1080)
|
||||||
|
|
||||||
|
- ``background_color``
|
||||||
|
Default background color of scenes
|
||||||
|
|
||||||
|
- ``fps``
|
||||||
|
Framerate
|
||||||
|
|
||||||
|
- ``background_opacity``
|
||||||
|
Opacity of the background
|
||||||
|
|
||||||
|
|
||||||
|
``file_writer``
|
||||||
|
---------------
|
||||||
|
Configuration specifying how files are written, e.g. what ffmpeg parameters to use
|
||||||
|
|
||||||
|
|
||||||
|
``scene``
|
||||||
-------
|
-------
|
||||||
|
Some default configuration for the Scene class
|
||||||
|
|
||||||
- ``executable``
|
|
||||||
The executable program used to compile LaTeX (``latex`` or ``xelatex -no-pdf``
|
|
||||||
is recommended)
|
|
||||||
|
|
||||||
- ``template_file``
|
``text``
|
||||||
LaTeX template used, in ``manimlib/tex_templates``
|
-------
|
||||||
|
|
||||||
- ``intermediate_filetype``
|
|
||||||
The type of intermediate vector file generated after compilation (``dvi`` if
|
|
||||||
``latex`` is used, ``xdv`` if ``xelatex`` is used)
|
|
||||||
|
|
||||||
- ``text_to_replace``
|
|
||||||
The text to be replaced in the template (needn't to change)
|
|
||||||
|
|
||||||
``universal_import_line``
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
Import line that need to execute when entering interactive mode directly.
|
|
||||||
|
|
||||||
``style``
|
|
||||||
---------
|
|
||||||
|
|
||||||
- ``font``
|
- ``font``
|
||||||
Default font of Text
|
Default font of Text
|
||||||
@ -101,57 +133,44 @@ Import line that need to execute when entering interactive mode directly.
|
|||||||
- ``text_alignment``
|
- ``text_alignment``
|
||||||
Default text alignment for LaTeX
|
Default text alignment for LaTeX
|
||||||
|
|
||||||
- ``background_color``
|
``tex``
|
||||||
Default background color
|
|
||||||
|
|
||||||
``window_position``
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
The relative position of the playback window on the display (two characters,
|
|
||||||
the first character means upper(U) / middle(O) / lower(D), the second character
|
|
||||||
means left(L) / middle(O) / right(R)).
|
|
||||||
|
|
||||||
``window_monitor``
|
|
||||||
------------------
|
|
||||||
|
|
||||||
The number of the monitor you want the preview window to pop up on. (default is 0)
|
|
||||||
|
|
||||||
``full_screen``
|
|
||||||
---------------
|
|
||||||
|
|
||||||
Whether open the window in full screen. (default is false)
|
|
||||||
|
|
||||||
``break_into_partial_movies``
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
If this is set to ``True``, then many small files will be written corresponding
|
|
||||||
to each ``Scene.play`` and ``Scene.wait`` call, and these files will then be combined
|
|
||||||
to form the full scene.
|
|
||||||
|
|
||||||
Sometimes video-editing is made easier when working with the broken up scene, which
|
|
||||||
effectively has cuts at all the places you might want.
|
|
||||||
|
|
||||||
``camera_resolutions``
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
Export resolutions
|
|
||||||
|
|
||||||
- ``low``
|
|
||||||
Low resolutions (default is 480p)
|
|
||||||
|
|
||||||
- ``medium``
|
|
||||||
Medium resolutions (default is 720p)
|
|
||||||
|
|
||||||
- ``high``
|
|
||||||
High resolutions (default is 1080p)
|
|
||||||
|
|
||||||
- ``ultra_high``
|
|
||||||
Ultra high resolutions (default is 4K)
|
|
||||||
|
|
||||||
- ``default_resolutions``
|
|
||||||
Default resolutions (one of the above four, default is high)
|
|
||||||
|
|
||||||
``fps``
|
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Export frame rate. (default is 30)
|
- ``template``
|
||||||
|
Which configuration from the manimlib/tex_template.yml file should be used
|
||||||
|
to determine the latex compiler to use, and what preamble to include for
|
||||||
|
rendering tex.
|
||||||
|
|
||||||
|
|
||||||
|
``sizes``
|
||||||
|
---------
|
||||||
|
|
||||||
|
Valuess for various constants used in manimm to specify distances, like the height
|
||||||
|
of the frame, the value of SMALL_BUFF, LARGE_BUFF, etc.
|
||||||
|
|
||||||
|
|
||||||
|
``colors``
|
||||||
|
----------
|
||||||
|
|
||||||
|
Color pallete to use, determining values of color constants like RED, BLUE_E, TEAL, etc.
|
||||||
|
|
||||||
|
``loglevel``
|
||||||
|
------------
|
||||||
|
|
||||||
|
Can be DEBUG / INFO / WARNING / ERROR / CRITICAL
|
||||||
|
|
||||||
|
|
||||||
|
``universal_import_line``
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Import line that need to execute when entering interactive mode directly.
|
||||||
|
|
||||||
|
|
||||||
|
``ignore_manimlib_modules_on_reload``
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
When calling ``reload`` during the interactive mode, imported modules are
|
||||||
|
by default reloaded, in case the user writing a scene which pulls from various
|
||||||
|
other files they have written. By default, modules withinn the manim library will
|
||||||
|
be ignored, but one developing manim may want to set this to be False so that
|
||||||
|
edits to the library are reloaded as well.
|
||||||
|
Reference in New Issue
Block a user