Commit graph

95 commits

Author SHA1 Message Date
Louis GERARD
a1bb04947a
Fix Microsoft typo in TexFontTemplateLibrary scene in example_scenes/advanced_tex_fonts.py (#4305)
Co-authored-by: Louis Pierre Jean Gerard <louis_global@fasoo.com>
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
2025-06-23 21:15:39 -04:00
Aarush Deshpande
74f79a42b6
Use Ruff pygrep rules (#3923)
* Add config for ruff pygrep

* Fix pygrep linting errors
2024-09-01 17:55:22 +02:00
Aarush Deshpande
1097ed9692
Standardize docstrings with ruff pydocstyle rules (#3881)
Used Ruff rules for `pydocstyle` to standardize docstring formatting.

* Add config for ruff pydocstyle

* Safe fixes from ruff

* Unsafe fixes from ruff
2024-09-01 08:03:38 -04:00
adeshpande
24025b60d5
pre-commit change to ruff (#3779)
* pre-commit change to ruff

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixes

* astral-sh ruff bump

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-22 12:03:23 -04:00
pre-commit-ci[bot]
1aee37bfb5
[pre-commit.ci] pre-commit autoupdate (#3332)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.6.0)
- [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2)
- [github.com/asottile/pyupgrade: v3.10.1 → v3.15.2](https://github.com/asottile/pyupgrade/compare/v3.10.1...v3.15.2)
- [github.com/psf/black: 23.7.0 → 24.4.0](https://github.com/psf/black/compare/23.7.0...24.4.0)
- [github.com/asottile/blacken-docs: 1.15.0 → 1.16.0](https://github.com/asottile/blacken-docs/compare/1.15.0...1.16.0)
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0)
- [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.5.1...v1.9.0)
- [github.com/codespell-project/codespell: v2.2.5 → v2.2.6](https://github.com/codespell-project/codespell/compare/v2.2.5...v2.2.6)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* make smoothererstep readable again, avoid overlong line

* zoom_value more readable

* fix blacken-docs touching .github

* fix codespell setup, remove unnecessary file, fix some typos

* flake8: ignore E704, triggered by overload

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update docs/source/tutorials/quickstart.rst

* more flake fixes

* try to make blacken-docs happy

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2024-04-24 13:11:03 +02:00
szchixy
27d53606d4
fix line_join to joint_type in example_scenes/basic.py (#3510) 2023-12-09 20:57:32 +01:00
Alexander Vázquez
388504307a
Implemented :class:.LineJointTypes for both Cairo and OpenGL renderer (#3016)
* LineJoins added

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added joint type enum, refactored proposed implementation

* added test for joint types

* added documentation

* let LineJointType.AUTO be rendered like before

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update added example in basic.py to reflect changed implementation

* fix RTD build

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* moved rendered example in documentation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2022-11-13 16:14:55 -07:00
NotWearingPants
206db54af5
Migrate more os.path to pathlib in tests (#2991)
* Migrate more `os.path` to `pathlib` in tests

* Convert test fixtures to pathlib

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix mypy errors in tests

* migrate another pathlib instance

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2022-10-26 19:51:38 +02:00
Dan Walsh
0bc593a8a0
Add SpiralIn Animation (#2404)
* Added a cool animation.

* Added Spiral Effect

* Added SpiralIn to logo.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Made a better example to show how to use SpiralIn.

* Added docstring

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removed SpiralInExample.py, and moved my example into basic.py with its friends.

* Update manim/animation/creation.py

Gotcha, yeah. I like this.

Co-authored-by: GameDungeon <60719255+GameDungeon@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixing docstring

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update manim/animation/creation.py

Co-authored-by: Darylgolden <darylgolden@gmail.com>

* imported TAU from constants.py.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Got rid of redundant, weird factor of 8 multiplication which was confusing. Now default value is 8.

* Added the ability to modify the opacity effect at the beginning.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Something is still wrong with opacity in this commit, but it's a step forward...

* Fixed the opacity issues. Seems I have to re-save the mobject state immediately after restoring it every time.

* Added fade_in_fraction to basic.py so people learning how to use it can understand the usage a bit better.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: danielkwalsh <dan@crossnokaye.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: GameDungeon <60719255+GameDungeon@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
2022-03-12 21:32:22 +08:00
Michael McNeil Forbes
99b11da9c5
Added `media_embed` config option to control whether media in Jupyter notebooks is embedded (#2442)
* feat: Added --embed option to %%manim ManimMagic.

* feat: Change to --embed and also embed Images

* Update manim/utils/ipython_magic.py

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Initial attempt to make media_embed a general config option

* fixed issues raised in code review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove unused import

* actually remove unused import

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Michael McNeil Forbes <michael.forbes+python@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-23 09:35:39 +00:00
Darylgolden
0c1c74bf63
Cache view matrix for :class:~.OpenGLCamera (#2516)
* Cache view matrix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add backport for old versions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix import

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-05 03:31:21 +00:00
GameDungeon
daf23c9d10
Upgraded typehints (#2429)
* Future Annotations

* Delete template_twitter_post.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed broken RTD

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-20 12:26:21 +08:00
GameDungeon
c4217731e0
Added MyPy Support (#1972)
* MyPy Support

* MyPy Hook

* Removing MyPy Hook

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Delete __init__.pyi

* Delete color.pyi

* Update .mypy.ini

Co-authored-by: Christopher Besch <christopher.besch@gmx.de>

* changes

* quick fix

* MyPy Hook

* MyPy Hook

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christopher Besch <christopher.besch@gmx.de>
2022-01-03 19:41:07 +08:00
GameDungeon
f993ee02ea
Fixed Flake8 (#2410)
* Auto Type

* Revert "Auto Type"

This reverts commit a458905369.

* Fixed Flake
2022-01-01 07:59:28 +08:00
GameDungeon
94821c10d8
Flake8 Changes + Fixing Warnings (#1968)
* Warning Removal

* Flake Stuff

* HotFix

* Docs Fix

* I'm Dumb

* Docs Fix 2

* Fixing Github Requests

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* quick fix

* Add Deprecation Warning

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Weird Pre Commit Stuff

* Quick Fix

* Quick Fix

* Fix

* Flake Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-09-03 13:45:48 -04:00
Laith Bahodi
223c2f86d0
Drop redundant OpenGL files and add metaclass support for Surface (#1843)
* replace old with new

* dropped redundant files

* replace examples in example_Scenes

* replace opengl_ in test

* ammend __init__

* opengl_compatibilty for Surface

* make resolution a tuple for opengl compat

* resolution changes in opengl.py

* rework sphere and enable dual renderer for 3d shapes

* adjust res for Torus

* actually drop file

* flip cairo_sphere resolution

* changes

* render each submobject individually

* make BraceLabel appear

* remove if config.renderer==opengl from mobject.py

* rewrite tests

* properly deprecate ParametricSurface

* revert rendering each submobject individually

* initialize OpenGLRenderer in Scene if config.renderer is opengl

* fix bases when config.renderer is changed

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* actually push test

* remove unused bounding_box + data from mobject.py

* overwrite tests

* use #1899 to switch renderer at runtime to make tests work

* attempt at fixing tests

* add renderer=cairo at the end of the test??

* rewrite failing test

* remove self.attr = self.attr for bracelabel

* remove accidental line in test

* remove unecessary bloat and make set_fill_by_value dual compatible

* update to remove deprecation warning

* add ParametricSurface to __all__

* deprecate ParametricSurface

* change some examples

* adjust docs

Co-authored-by: Darylgolden <darylgolden@gmail.com>

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
2021-08-30 20:35:25 +00:00
Laith Bahodi
f7ed88008b
Add font_size parameter for Tex and Text mobjects. (#1694)
* refactor numbers.py, numbers.py now uses font_size, adjust constants in tex_mobject.py and text_mobject, remove uses of number_scale_value in favour of font_size

* adjust PolarPlane to use font_size instead of scaling

* some of the docs have been changed to use font_size, adjust constant and add font_size to markup text

* accurate scale factors

* code mobject compatibility with font_size

* number_line now takes font_size

* make tests work

* cleanup

* deprecated test raised error, fixed

* typing for NumberLine

* fix misbehaving test

* actually fix set_value

* use native font_size scaling for text_mobject.py

* add constant and adjust BraceLabel

* fix change_label

* drop scale_factor for Title

* add some supers

* maybe fixes import issues

* numberplanetest

* the merge conflict is over and the tests run

* add test for tex_size

* some changes to the docs

* properly deprecate instead of removing

* move deprecations to __init__

* drop the config

* deprecate number_Scale_value

* update version number for deprecation

* adjust test precision

* if TYPE_CHECKING check

* adjust Using Text

* add font_size parameters for numberline and fix bug with decimal_number_config

* make set_value work with opengl

* make kwarg

* fix typo

* another typo

* change dates

* add font_size property for tex_mobjects

* _font_size instead of font_size (prep for prop)

* accidental bugfix, handle separately)

* generalize text2svg

* add font_size property for text_mobject.py

* add check for greater than 0

* Attribute error in dd_labels

* str for attr in hasattr

* rewrite and fix tests

* remove debugging print

* fix error when self.height ==0

* Apply suggestions from code review

Co-authored-by: Darylgolden <darylgolden@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* revert accidental @deprecated change

* fix error in line_spacing

* slight fixes

* use private attribute when checking for font_size in add_labels()

* raise a Value error when font_size < 0 + improve docs

* Apply suggestions from code review

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* deprecate azimuth_label_scale and use more descriptive deprecation message

* wrong number of dots for an import

* add font_size property for decimalmobject

* return to using public attribute

* remove redundant constant

* add comment

Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2021-08-26 20:16:55 -04:00
Christian Clauss
66d26380e5
Upgrade to modern Python syntax (#1956)
* Upgrade to modern Python syntax

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-08-24 20:28:55 +08:00
Devin Neal
3ee3ea1a3e
Rewrite stroke and fill shaders (#1716)
Rewrite vectorized mobject shaders to be compatible with transformation matrices.
2021-06-30 00:49:55 -07:00
Devin Neal
e326a7b611
Add dearpygui integration (#1553)
* Add dearpygui integration

* Rename MobjectTest -> GuiTest

* flake8

* Guard against dearpygui import

* Add manim.gui

* Guard against dearpygui import in gui.py

* Add __init__.py

* Add flag for GUI

* Default to boolean

* Fix problem when scene isn't specified

* Add gui_location flag

* poetry lock

* Fix test

* Update manim/gui/gui.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/_config/default.cfg

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Update manim/cli/render/global_options.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>

* Review comments

* Update pyproject.toml

Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Add __all__ to shader.py

* Add utils import to opengl/__init__.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>
2021-06-12 18:53:37 -07:00
Jason Villanueva
7651119b5f
Fixed OpenGL examples for MacOS (#1634) 2021-06-05 18:04:53 +05:30
Anton Ballmaier
15261ea65b
Fading module enhancements (#1454)
* finish draft implementation
* use @wrapss to remove docs problems
* reduce complexity and add doc deprecation
* Docs deprecated_params
* add decoratos to __init__
* Add decorators to documentation
* Finish detailed docs
* Apply suggestions from code review
Co-authored-by: Naveen M K <naveen@syrusdark.website>

* change since/until/message param docs
* Mark get_callable_info and deprecation_text_component as private
* change how until is included in warning messages
* Add The to parameter descriptions
* make params docs more readable
* make redirections docs clearer
* update dependency list
* order dependencies
* update examples
* fix dependency problem
* fix duplicate problem
* change decorator version
* updated lock file
* enhance function / method separation
* fix typo and double underscores
* rename message_ and replacement_
* Change warning to custom admonition
* remove [] as default parameters
* Remove "" around type
* fix bug and move to inspect
* doc string => docstring
* rename to deprecate
* change module docstring
* change to deprecation.py
* remove tests again
* Rename decorators.py to deprecate.py
* Update poetry.lock
* Test if deprecated class outputs the correct warning when used
* Rename deprecate to deprecation
* Shorten conditional for msg, since, util
* Specify decorator arguments in test
* Add tests for since and until as arguments
* Add test for msg argument for class
* Add test for replacement argument for class
* Remove unneeded docstring in deprecated class
* Add test for deprecate method, no args
* Update docstring examples, move deprecated method outside class
* Add test for method in class, since and message args
* Add test for deprecating nested class
* Add test for deprecated method in nested class
* Test deprecation of nested function
* Test param deprecation, only params argument
* Test deprecation of single method param
* Rename single param test method name
* Fix deprecated_params docstring whitespace
* Test parameter redirection using tuple
* Update warning msgs in deprecated_params docstring
* Test parameter redirection using lambda function
* Test param redirection from many to one
* Test param redirection from one to many
* Update Top.foo to deprecate with message
* FadeIn & FadeOut overhaul and deprecations
* Adjust examples
* Add docs
* Add simple example
* handle empty docstrings
* Update poetry.lock
* Deprecate ShowCreation using decorator to test the docs
* Test docstrings
* add examples
* Update example_scenes/basic.py

Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>
Co-authored-by: Ricky Chon <rickychon99@gmail.com>
Co-authored-by: Laith Bahodi <70682032+hydrobeam@users.noreply.github.com>
2021-05-15 16:23:47 +02:00
Devin Neal
684065fa90
Shader mobject (#1462)
* Add Scene.embed_2

* Don't overwrite Scene methods

* Checks

* Remove extra test

* Add docstring

* Allow rerunning the same Scene

* Allow rerunning with file changes

* Found how to kill terminal thread

* Allow for skipping part of a preview

* Add warning

* break out of the loop if no rerun is requested

* Add test shader code

* Port a shader from shadertoy

* Save in-progress work

* Add Shader and Mesh classes

* Rotation matrices

* #INSERT -> #include

* Render with Mesh instead of render groups

* Add mesh updaters and FullscreenQuad

* Beginning OrbitControls

* OribitControls working

* Attempt using a symmetric perpective projection

* Fix OrbitControls and perspective projection

* Remove unecessary changes

* Add docstring for RerunSceneHandler

* Move OrbitControls into Scene, simplify examples

* Modification to matrix code, converting attributes to homogeneous coords

* Add better camera controls

* Check depth test

* Debug some shaders

* Cleanup for PR

* Address pre-commit checks

* Review comments

* iterdir
2021-05-06 18:52:20 -07:00
Nikhil Garuda
257647864c
Change of Complier and Output format (#1363)
The Complier and Output format of class InCodeTexTemplate has been changed to the defaults (latex and .dvi)
2021-04-19 00:58:21 -07:00
kolibril13
2b6b2cddcc
Added example jupyter notebook into the examples folders (#1029)
* example notebook

* removed cell output

* added jupyter/ folder to gitignore

* added link to binder in documentation

* Update docs/source/installation.rst

* updated binder links in readme

* Update example_scenes/manim_jupyter_example.ipynb

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Update example_scenes/manim_jupyter_example.ipynb

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Update docs/source/installation.rst

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* added config.media_width = "10vw"

* updated notebook to latest version

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
2021-04-08 10:36:18 +02:00
Jason Villanueva
1e049d8bd2
Fixed flake8 errors and removed linter/formatter workflows (#1278)
* Fixed flake8 in files outside of manim/manim

* Removed linter/formatter workflows

* Small update to pre-commit in contributing guideline

* Better English/grammar in doc
2021-04-07 06:14:14 -07:00
Naveen M K
dcb90a8656
Format Imports using Isort (#1178)
* Format imports using Isort.
Add a check for pull requests.

Signed-off-by: Naveen M K <naveen@syrusdark.website>

* CI: update check's name
2021-04-03 13:45:12 +05:30
Jason Villanueva
a87bb28484
Refactored the Command Line Interface to use Click + Cloup instead of Argparse (#1013)
* Added click dependency and command structure

* Refactored code for separation of concerns

* Shortened plugins command to plugin, added render options

* first draft for render -h

* First successful render using click

* Cleaned main

* Moved flush_cache to option, ran black

* Removed argparse logic, scattered print statements

* corrected tests, all passing

* merge upstream

* fixed test with click's clirunner

* Fixed doctest configuration.rst

* Temporarily add in main_utils

* Removed main_utils.parse_args, used ManimConfig.digest_args

* fixed progress bar

* Fix jupyter

* black

* Fixed incorrectly merged merge conflict

* updated README command.png image

* updated configuration.rst expected output

* Fixed test_plugins and config_file expected type

* Refixed the jupyter fix

* Apply 3/5 suggestions

Remove stray print

Improve readability of test code

Added module docs for the subcommands

* Updated `main` to `manim` for tests

* Forced `file` positional argument to be Path type

* Fixed main -> manim

* Added libpango to linux dependency

* Updated poetry.lock

* Changed configuration.rst test

* Fixed test_a_flag test

minor space issue

added media_width to configuration.rst

* Fixed fps flag in Cairo rendering

* Fixed more outdated rst in sphinx docs

Removed default for fps option, always overwrote quality

Fixed doctest control_data

* Fixed more incorrect rst orderings

* Update tests/test_commands.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Added suggestions

* Removed unused imports

* Reverted entry point back to main

* Update manim/_config/default.cfg

Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

* Adjusted ipython_magic's call to the entry_point

* Converted frame_rate to int if integer

* run black

* Fixed doctest

* Fixed issue with command name from CliRunner

* Fixed multiple video windows opening from upstream merge

* to black or not to black

* Added deprecation warning to render subcommand

* warning instead of warn

* Applied Naveen's suggestions

* Made `manim render` show the help page

* Update manim/cli/render/commands.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Update manim/cli/cfg/commands.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Update manim/cli/cfg/commands.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Update manim/cli/plugins/commands.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Addressed some style changes

* add back in write_to_movie temporarily for OpenGL support

* Removed sound flag, deprecated use_opengl_renderer, added renderer option

* revert webgl_renderer_path removal

* Fixed cfg export

Fixed readme usage of CLI

* Flake8/black

* Fixed bug in setting renderer choice

* Removed log message due to default option

Removed default option of background color

Fixed write_to_movie flag default

* Fix log_to_file tests

* Make '-c' option for config_file, not background_color

* print colored version always

* Remove -v = --version shorthand, conflicts with verbosity

* Use subprocess.run instead of Click's CliRunner for stdout

* Refactor cli/render to use Cloup instead of click-option-group

1) There's a new file for each option group
2) render is now a cloup.Command, not a Group

Fixed issue when an animation is cached, manim can't merge the partial movie files. (#1192)

* fixed issue

* fixed tests

* Update manim/renderer/cairo_renderer.py

Co-authored-by: Darylgolden <darylgolden@gmail.com>

* added tests

* imrpoved test

* fixed logic

* added new test

* check if the file has been outputed

* added test when caching is enabled

* fixed tests on windows

* black

* Update manim/renderer/cairo_renderer.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Update tests/assert_utils.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

Co-authored-by: KingWampy <9156604+WampyCakes@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>

Added :ref_methods: to the manim directive (#1209)

* fix manim_directive for methods

* added ref_methods to Angle example

* black

* added new ref_methods references

* sort out ref_functions vs ref_methods in examples.rst

Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

Fixed issue when an animation is cached, manim can't merge the partial movie files. (#1192)

* fixed issue

* fixed tests

* Update manim/renderer/cairo_renderer.py

Co-authored-by: Darylgolden <darylgolden@gmail.com>

* added tests

* imrpoved test

* fixed logic

* added new test

* check if the file has been outputed

* added test when caching is enabled

* fixed tests on windows

* black

* Update manim/renderer/cairo_renderer.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

* Update tests/assert_utils.py

Co-authored-by: Naveen M K <naveen@syrusdark.website>

Co-authored-by: KingWampy <9156604+WampyCakes@users.noreply.github.com>
Co-authored-by: Darylgolden <darylgolden@gmail.com>
Co-authored-by: Naveen M K <naveen@syrusdark.website>

Added :ref_methods: to the manim directive (#1209)

* fix manim_directive for methods

* added ref_methods to Angle example

* black

* added new ref_methods references

* sort out ref_functions vs ref_methods in examples.rst

Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>

Fixed unnecessary args dict

* Fixed bug that changed caching hashing result

* Revert doctest logic for fps filename output

Co-authored-by: Naveen M K <naveen@syrusdark.website>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Gianluca Gippetto <gianluca.gippetto@gmail.com>
2021-04-01 23:53:07 -07:00
Mark Miller
39d432e2cd Revert "Merge :class:~.OpenGLMobject and :class:~.Mobject (#1167)"
This reverts commit e18db42ae1.
2021-03-29 07:59:22 -07:00
Darylgolden
28abd477d7
Replace links to the latest version of the documentation to the stable version (#1177)
* Replace latest links with stable links

* Change link in PR template back to latest
2021-03-26 20:49:22 +01:00
Mohammad Al-Fetyani
e18db42ae1
Merge :class:~.OpenGLMobject and :class:~.Mobject (#1167)
* Update mobject.py

* 2 test failed

* Update mobject.py

* fix set_rgba_array

* finish

* no errors with cairo so far

* SurfaceExample partially works

* SquareToCircle works

* Update opengl_mobject.py

* SurfaceExample works without  Textures

* More updates

* all opengl examples work pefectly

* Update opengl_surface.py

* fix test case

* fix flake8 and refactor code

* remove all OpenGLMobject related code

* add functions from OpenGL

* remove comments

* Fix bug
2021-03-26 12:11:25 -07:00
Lionel Ray
39351b0202
Deprecation: Deprecated ShowCreation in favor of Create, added logger warning (#1124)
* Deprecated ShowCreation in favor of Create

* Fixed Black formatting and logger error

* Fixed relative import issue of logger

* Renamed CreateThen.. calls to previous names

* Fixed __all__ classes, fixed Create inheritance

* Update manim/animation/creation.py

Move logger warning to class initializer

Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>

Co-authored-by: Jason Villanueva <a@jsonvillanueva.com>
2021-03-23 16:13:59 +01:00
Devin Neal
a75d551baf Add Scene.embed() 2021-03-12 19:12:23 -08:00
Devin Neal
79fc67faf8 Add comment to opengl example 2021-03-07 19:40:45 -08:00
Devin Neal
5e726c025a Add example_scenes/opengl.py 2021-03-01 19:43:03 -08:00
Devin Neal
63184f840a Port all of SurfaceExample 2021-02-26 19:47:41 -08:00
Devin Neal
4246483978 Port geometry.py up to DashedLine 2021-02-21 00:42:38 -08:00
Devin Neal
bbd52a35f6 Basic Arc Animation 2021-02-19 23:07:36 -08:00
Devin Neal
448d10b590 Animate Arc with OpenGL 2021-02-19 20:41:01 -08:00
friedkeenan
3ad385a168
Enhancement: Migrate width/height/depth to properties (#1024)
* Migrate width/height/depth to properties

* Fix examples

* Fix typos

* Import manim for doctests

* Expect Square for doctests

* Improve docs for width/height/depth properties
2021-02-14 12:33:12 +01:00
KingWampy
554f829848
Enhancement: Add manim version to CLI output, append version name for generated gif+png, add version to metadata of rendered videos (#984)
* Initial commit

* black formatting

* Changes

* Test to see if it works

* Changes

* Update manim_directive.py

* Update manim_directive.py

* Update manim_directive.py

* Update manim_directive.py

* Update scene_file_writer.py

* Always forget black..

* Change path separator

* Changes

* Add blank line in option block

* Update scene_file_writer.py

* Update metadata messages

* No longer add version to video names

* Fix test_dash_as_filename

* Update __init__.py
2021-02-10 16:56:05 +01:00
kolibril13
691db1e461
Run proofreading over the whole library (#890) 2021-01-01 17:59:12 +01:00
Devin Neal
ffd8b42d26
Add .animate attribute to mobjects (#881)
Adds a .animate attribute to mobjects to be used to animate methods.
2020-12-30 05:56:38 -08:00
Aron
247cdeecf6
Update Docs Url (#832)
* Changed manimce links in the docs to docs.manim.community, replaced manimce with manim where applicable

* black is extra finicky today

Co-authored-by: Aron Fischer <cobordism@github, co-bordism@gitlab>
2020-12-07 09:59:21 +05:30
Devin Neal
3b6519a586
Restore examples/basic.py (#560)
* Restore examples/basic.py

* Update example_scenes/basic.py

Co-authored-by: kolibril13 <44469195+kolibril13@users.noreply.github.com>

* Update example_scenes/basic.py

Co-authored-by: kolibril13 <44469195+kolibril13@users.noreply.github.com>

* Format basic.py

* Update example_scenes/basic.py

Co-authored-by: kolibril13 <44469195+kolibril13@users.noreply.github.com>

* Format basic.py

* Remove extra comment

Co-authored-by: kolibril13 <44469195+kolibril13@users.noreply.github.com>
2020-10-18 14:19:13 +02:00
Leo Torres
24d52672ba
Merge pull request #538 from ManimCommunity/one_more_example_chapter
Added neat projects from example_scenes folder
2020-10-14 21:42:40 -04:00
kolibril13
64d398ab4d # removed neat_projects.rst
and renamed shapes_images_positions.rst
2020-10-13 15:50:22 +02:00
kolibril13
e0d62d7388
Move pangoText example from example script to Docs (#533)
* moved pangoText example to docs

* Update text_mobject.py

* Update text_mobject.py

fix docsting
2020-10-12 18:09:33 +02:00
Aron Fischer
38096897e9 quick fix 2020-10-12 17:18:42 +02:00
Aron Fischer
34df8900f3 more docstrings 2020-10-12 16:26:12 +02:00