Commit graph

73 commits

Author SHA1 Message Date
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
Aron Fischer
eadeb3e530 always black 2020-10-11 15:37:01 +02:00
Aron Fischer
2d6f2d0833 more docstrings 2020-10-11 15:32:27 +02:00
Aron Fischer
15bbf316cd black 2020-10-09 19:10:54 +02:00
Aron Fischer
415157a8d5 make example scene more robust 2020-10-09 19:10:06 +02:00
Aron Fischer
f9859d0eb0 Better docstrings. Move all but three templates to TexTemplateLibrary 2020-10-09 18:45:15 +02:00
Aron Fischer
6766b527ed simplified Tex Font example scene 2020-10-09 15:15:16 +02:00
Aron Fischer
c323385649 simplified example scene 2020-10-09 15:11:50 +02:00
Aron Fischer
85aa5dece4 TexTemplates without CONFIG + all Font Examples 2020-10-08 23:42:01 +02:00
Aron Fischer
700d3fa374 Simplifying the TexTemplate() system.
Recreates TexTemplate() and a few basic examples including ThreeBlueOneBrownTexTemplate()

Templates can be supplied by CLI as before.
Templates can also be specified per Tex() object
2020-10-08 16:55:42 +02:00
Syrus Dark
17b018e27b
Run black 2020-09-25 18:48:15 +05:30
Syrus Dark
47996aedba
Add python 3.6 and docs 2020-09-25 18:40:37 +05:30
Naveen
f522805acc Add new Pango only weights 2020-09-25 00:03:37 +05:30
Naveen
b1d1c19714 Run black 2020-09-24 23:00:09 +05:30
Naveen
93ae9590c2 Remove a unnecessary function 2020-09-24 22:56:51 +05:30
Syrus Dark
ae9146420d
Add arabic in Example 2020-09-23 15:10:32 +05:30
Syrus Dark
bcbd79e5ad
Rename example_scene 2020-09-23 14:46:02 +05:30
Syrus Dark
5a6e0db467
Fix a bug and format using black 2020-09-23 14:45:14 +05:30
Naveen
47ef49428f Add more examples 2020-09-23 01:45:37 +05:30
Naveen
ca41559380 Add PangoText 2020-09-23 01:26:38 +05:30
github-actions[bot]
384de0ff91
Running Black On Master (#419)
Co-authored-by: github-actions <actions@github.com>
2020-09-08 07:47:55 -04:00
Nilay
a15368035c
Add the Variable class with an example (#380)
* Add the Variable class with an example. It inherits 

* Automatically detect math/text mode

* Allow passing a Tex, MathTex, Text as label

* Update changelog with Variable class

Co-authored-by: Leo Torres <dleonardotn@gmail.com>
Co-authored-by: Aathish Sivasubrahmanian <aathish04@gmail.com>
2020-09-03 11:34:11 -04:00
Aathish Sivasubrahmanian
6df53cc9f7
Deprecate TexMobject and TextMobject in favour of MathTex and Tex (#391)
* Rename TexMobject to MathTex
Rename TextMobject to Tex
Replace all instances of TexMobject with MathTex and TextMobject with Tex.
Get rid of single-use TexSymbol.
Rename SingleStringTexMobject to SingleStringMathTex.
Add Deprecation warnings to TexMobject and TextMobject.

* Edit __all__ for tex_mobject.py

* Re-add TexSymbol by request of devs.

* Docstring Modifications by @pgbiel

Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>

* Import logger differently, by @leotrs

* Run updated Black on files changed.

Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
2020-09-02 09:20:37 +05:30