3b1b-manim/documentation/custom_config.html

381 lines
20 KiB
HTML
Raw Normal View History

<!doctype html>
<html class="no-js">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Changelog" href="../development/changelog.html" /><link rel="prev" title="constants" href="constants.html" />
<link rel="shortcut icon" href="../_static/icon.png"/><meta name="generator" content="sphinx-3.0.3, furo 2020.10.05.beta9"/>
<title>custom_config - manim documentation</title>
<link rel="stylesheet" href="../_static/copybutton.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/manim-kindergarten/CDN@master/manimgl_assets/custom.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/manim-kindergarten/CDN@master/manimgl_assets/colors.css" />
<link rel="stylesheet" href="../_static/styles/default.css?899a6674daa4e2e207225a56">
<link rel="stylesheet" href="../_static/pygments.css?899a6674daa4e2e207225a56">
<style>
:root {
--color-code-background: #f8f8f8;
--color-code-foreground: #000000;
}
</style>
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script><script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js" defer></script>
<script src="../_static/language_data.js" defer></script>
<script src="../_static/clipboard.min.js"></script>
<script src="../_static/copybutton.js"></script><script src="../_static/scripts/main.js?899a6674daa4e2e207225a56"></script></head>
<body dir="">
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-toc" viewBox="0 0 24 24">
<title>Contents</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke-width="1.5" stroke="#101010" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z"/>
<line x1="4" y1="6" x2="20" y2="6" />
<line x1="10" y1="12" x2="20" y2="12" />
<line x1="6" y1="18" x2="20" y2="18" />
</svg>
</symbol>
<symbol id="svg-menu" viewBox="0 0 24 24">
<title>Menu</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-menu">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
<title>Expand</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-chevron-right">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</symbol>
</svg>
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
<label class="overlay sidebar-overlay" for="__navigation"></label>
<label class="overlay toc-overlay" for="__toc"></label>
<div class="page">
<header class="mobile-header">
<label class="header-left nav-overlay-icon" for="__navigation">
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
</label>
<div class="header-center"><div class="brand">manim documentation</div></div>
<div class="header-right"></div>
</header>
<aside class="sidebar-drawer">
<div class="sidebar-container">
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="../index.html">
<div class="sidebar-logo-container">
<img class="sidebar-logo" src="../_static/transparent_graph.png" alt="Logo"/>
</div>
</a><form class="sidebar-search-container" method="get" action="../search.html">
<input class="sidebar-search" placeholder="Search" name="q">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form><div class="sidebar-tree sidebar-scroll">
<p><span class="caption-text">Getting Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../getting_started/installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started/quickstart.html">Quick Start</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started/configuration.html">CLI flags and configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started/example_scenes.html">Example Scenes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started/structure.html">Manims structure</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started/whatsnew.html">Whats new</a></li>
</ul>
<p><span class="caption-text">Documentation</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="constants.html">constants</a></li>
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">custom_config</a></li>
</ul>
<p><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../development/changelog.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../development/contributing.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../development/about.html">About</a></li>
</ul>
</div>
</div>
</div>
</aside>
<main class="main">
<div class="content">
<article role="main">
<label class="toc-overlay-icon" for="__toc">
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
<section id="custom-config">
<h1>custom_config<a class="headerlink" href="#custom-config" title="Permalink to this headline"></a></h1>
<section id="directories">
<h2><code class="docutils literal notranslate"><span class="pre">directories</span></code><a class="headerlink" href="#directories" title="Permalink to this headline"></a></h2>
<ul>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">mirror_module_path</span></code></dt><dd><p>(<code class="docutils literal notranslate"><span class="pre">True</span></code> or <code class="docutils literal notranslate"><span class="pre">False</span></code>) Whether to create a folder named the name of the
running file under the <code class="docutils literal notranslate"><span class="pre">output</span></code> path, and save the output (<code class="docutils literal notranslate"><span class="pre">images/</span></code>
or <code class="docutils literal notranslate"><span class="pre">videos/</span></code>) in it.</p>
</dd>
</dl>
</li>
<li><dl>
<dt><code class="docutils literal notranslate"><span class="pre">output</span></code></dt><dd><p>Output file path, the videos will be saved in the <code class="docutils literal notranslate"><span class="pre">videos/</span></code> folder under it,
and the pictures will be saved in the <code class="docutils literal notranslate"><span class="pre">images/</span></code> folder under it.</p>
<p>For example, if you set <code class="docutils literal notranslate"><span class="pre">output</span></code> to <code class="docutils literal notranslate"><span class="pre">"/.../manim/output"</span></code> and
<code class="docutils literal notranslate"><span class="pre">mirror_module_path</span></code> to <code class="docutils literal notranslate"><span class="pre">False</span></code>, then you exported <code class="docutils literal notranslate"><span class="pre">Scene1</span></code> in the code
file and saved the last frame, then the final directory structure will be like:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span> manim/
├── manimlib/
│ ├── animation/
│ ├── ...
│ ├── default_config.yml
│ └── window.py
├── output/
│ ├── images
<span class="hll"> │ │ └── Scene1.png
</span> │ └── videos
<span class="hll"> │ └── Scene1.mp4
</span> ├── code.py
└── custom_config.yml
</pre></div>
</div>
<p>But if you set <code class="docutils literal notranslate"><span class="pre">mirror_module_path</span></code> to <code class="docutils literal notranslate"><span class="pre">True</span></code>, the directory structure will be:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span> manim/
├── manimlib/
│ ├── animation/
│ ├── ...
│ ├── default_config.yml
│ └── window.py
├── output/
<span class="hll"> │ └── code/
</span> │ ├── images
│ │ └── Scene1.png
│ └── videos
│ └── Scene1.mp4
├── code.py
└── custom_config.yml
</pre></div>
</div>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">raster_images</span></code></dt><dd><p>The directory for storing raster images to be used in the code (including
<code class="docutils literal notranslate"><span class="pre">.jpg</span></code>, <code class="docutils literal notranslate"><span class="pre">.jpeg</span></code>, <code class="docutils literal notranslate"><span class="pre">.png</span></code> and <code class="docutils literal notranslate"><span class="pre">.gif</span></code>), which will be read by <code class="docutils literal notranslate"><span class="pre">ImageMobject</span></code>.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">vector_images</span></code></dt><dd><p>The directory for storing vector images to be used in the code (including
<code class="docutils literal notranslate"><span class="pre">.svg</span></code> and <code class="docutils literal notranslate"><span class="pre">.xdv</span></code>), which will be read by <code class="docutils literal notranslate"><span class="pre">SVGMobject</span></code>.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">sounds</span></code></dt><dd><p>The directory for storing sound files to be used in <code class="docutils literal notranslate"><span class="pre">Scene.add_sound()</span></code> (
including <code class="docutils literal notranslate"><span class="pre">.wav</span></code> and <code class="docutils literal notranslate"><span class="pre">.mp3</span></code>).</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">temporary_storage</span></code></dt><dd><p>The directory for storing temporarily generated cache files, including
<code class="docutils literal notranslate"><span class="pre">Tex</span></code> cache, <code class="docutils literal notranslate"><span class="pre">Text</span></code> cache and storage of object points.</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="tex">
<h2><code class="docutils literal notranslate"><span class="pre">tex</span></code><a class="headerlink" href="#tex" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">executable</span></code></dt><dd><p>The executable program used to compile LaTeX (<code class="docutils literal notranslate"><span class="pre">latex</span></code> or <code class="docutils literal notranslate"><span class="pre">xelatex</span> <span class="pre">-no-pdf</span></code>
is recommended)</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">template_file</span></code></dt><dd><p>LaTeX template used, in <code class="docutils literal notranslate"><span class="pre">manimlib/tex_templates</span></code></p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">intermediate_filetype</span></code></dt><dd><p>The type of intermediate vector file generated after compilation (<code class="docutils literal notranslate"><span class="pre">dvi</span></code> if
<code class="docutils literal notranslate"><span class="pre">latex</span></code> is used, <code class="docutils literal notranslate"><span class="pre">xdv</span></code> if <code class="docutils literal notranslate"><span class="pre">xelatex</span></code> is used)</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">text_to_replace</span></code></dt><dd><p>The text to be replaced in the template (neednt to change)</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="universal-import-line">
<h2><code class="docutils literal notranslate"><span class="pre">universal_import_line</span></code><a class="headerlink" href="#universal-import-line" title="Permalink to this headline"></a></h2>
<p>Import line that need to execute when entering interactive mode directly.</p>
</section>
<section id="style">
<h2><code class="docutils literal notranslate"><span class="pre">style</span></code><a class="headerlink" href="#style" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">font</span></code></dt><dd><p>Default font of Text</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">text_alignment</span></code></dt><dd><p>Default text alignment for LaTeX</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">background_color</span></code></dt><dd><p>Default background color</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="window-position">
<h2><code class="docutils literal notranslate"><span class="pre">window_position</span></code><a class="headerlink" href="#window-position" title="Permalink to this headline"></a></h2>
<p>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)).</p>
</section>
<section id="window-monitor">
<h2><code class="docutils literal notranslate"><span class="pre">window_monitor</span></code><a class="headerlink" href="#window-monitor" title="Permalink to this headline"></a></h2>
<p>The number of the monitor you want the preview window to pop up on. (default is 0)</p>
</section>
<section id="full-screen">
<h2><code class="docutils literal notranslate"><span class="pre">full_screen</span></code><a class="headerlink" href="#full-screen" title="Permalink to this headline"></a></h2>
<p>Whether open the window in full screen. (default is false)</p>
</section>
<section id="break-into-partial-movies">
<h2><code class="docutils literal notranslate"><span class="pre">break_into_partial_movies</span></code><a class="headerlink" href="#break-into-partial-movies" title="Permalink to this headline"></a></h2>
<p>If this is set to <code class="docutils literal notranslate"><span class="pre">True</span></code>, then many small files will be written corresponding
to each <code class="docutils literal notranslate"><span class="pre">Scene.play</span></code> and <code class="docutils literal notranslate"><span class="pre">Scene.wait</span></code> call, and these files will then be combined
to form the full scene.</p>
<p>Sometimes video-editing is made easier when working with the broken up scene, which
effectively has cuts at all the places you might want.</p>
</section>
<section id="camera-resolutions">
<h2><code class="docutils literal notranslate"><span class="pre">camera_resolutions</span></code><a class="headerlink" href="#camera-resolutions" title="Permalink to this headline"></a></h2>
<p>Export resolutions</p>
<ul class="simple">
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">low</span></code></dt><dd><p>Low resolutions (default is 480p)</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">medium</span></code></dt><dd><p>Medium resolutions (default is 720p)</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">high</span></code></dt><dd><p>High resolutions (default is 1080p)</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">ultra_high</span></code></dt><dd><p>Ultra high resolutions (default is 4K)</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">default_resolutions</span></code></dt><dd><p>Default resolutions (one of the above four, default is high)</p>
</dd>
</dl>
</li>
</ul>
</section>
<section id="fps">
<h2><code class="docutils literal notranslate"><span class="pre">fps</span></code><a class="headerlink" href="#fps" title="Permalink to this headline"></a></h2>
<p>Export frame rate. (default is 30)</p>
</section>
</section>
</article>
<footer>
<div class="related-pages">
<a class="next-page" href="../development/changelog.html">
<div class="page-info">
<div class="context">
<span>Next</span>
</div>
<div class="title">Changelog</div>
</div>
<svg><use href="#svg-arrow-right"></use></svg>
</a>
<a class="prev-page" href="constants.html">
<svg><use href="#svg-arrow-right"></use></svg>
<div class="page-info">
<div class="context">
<span>Previous</span>
</div>
<div class="title">constants</div>
</div>
</a>
</div>
<div class="related-information">
<span class="copyright">Copyright &copy; - This document has been placed in the public domain.</span> |
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using
<a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
<a href="https://github.com/pradyunsg/furo">Furo theme</a>.
</div>
</footer>
</div>
<aside class="toc-drawer">
<div class="toc-sticky toc-scroll">
<div class="toc-title-container">
<span class="toc-title">
Contents
</span>
</div>
<div class="toc-tree">
<ul>
<li><a class="reference internal" href="#">custom_config</a><ul>
<li><a class="reference internal" href="#directories"><code class="docutils literal notranslate"><span class="pre">directories</span></code></a></li>
<li><a class="reference internal" href="#tex"><code class="docutils literal notranslate"><span class="pre">tex</span></code></a></li>
<li><a class="reference internal" href="#universal-import-line"><code class="docutils literal notranslate"><span class="pre">universal_import_line</span></code></a></li>
<li><a class="reference internal" href="#style"><code class="docutils literal notranslate"><span class="pre">style</span></code></a></li>
<li><a class="reference internal" href="#window-position"><code class="docutils literal notranslate"><span class="pre">window_position</span></code></a></li>
<li><a class="reference internal" href="#window-monitor"><code class="docutils literal notranslate"><span class="pre">window_monitor</span></code></a></li>
<li><a class="reference internal" href="#full-screen"><code class="docutils literal notranslate"><span class="pre">full_screen</span></code></a></li>
<li><a class="reference internal" href="#break-into-partial-movies"><code class="docutils literal notranslate"><span class="pre">break_into_partial_movies</span></code></a></li>
<li><a class="reference internal" href="#camera-resolutions"><code class="docutils literal notranslate"><span class="pre">camera_resolutions</span></code></a></li>
<li><a class="reference internal" href="#fps"><code class="docutils literal notranslate"><span class="pre">fps</span></code></a></li>
</ul>
</li>
</ul>
</div>
</div>
</aside>
</main>
</div>
</body>
</html>