Commit graph

78 commits

Author SHA1 Message Date
Grant Sanderson
96d44bd560
Video work (#2284)
* Comment tweak

* Directly print traceback

Since the shell.showtraceback is giving some issues

* Make InteracrtiveSceneEmbed into a class

This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.

* Move remaining checkpoint_paste logic into scene_embed.py

This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.

* Change null key to be the empty string

* Ensure temporary svg paths for Text are deleted

* Remove unused dict_ops.py functions

* Remove break_into_partial_movies from file_writer configuration

* Rewrite guarantee_existence using Path

* Clean up SceneFileWriter

It had a number of vestigial functions no longer used, and some setup that could be made more organized.

* Remove --save_pngs CLI arg (which did nothing)

* Add --subdivide CLI arg

* Remove add_extension_if_not_present

* Remove get_sorted_integer_files

* Have find_file return Path

* Minor clean up

* Clean up num_tex_symbols

* Fix find_file

* Minor cleanup for extract_scene.py

* Add preview_frame_while_skipping option to scene config

* Use shell.showtraceback function

* Move keybindings to config, instead of in-place constants

* Replace DEGREES -> DEG

* Add arg to clear the cache

* Separate out full_tex_to_svg from tex_to_svg

And only cache to disk the results of full_tex_to_svg.  Otherwise, making edits to the tex_templates would not show up without clearing the cache.

* Bug fix in handling BlankScene

* Make checkpoint_states an instance variable of CheckpointManager

As per https://github.com/3b1b/manim/issues/2272

* Move resizing out of Window.focus, and into Window.init_for_scene

* Make default output directory "." instead of ""

To address https://github.com/3b1b/manim/issues/2261

* Remove input_file_path arg from SceneFileWriter

* Use Dict syntax in place of dict for config more consistently across config.py

* Simplify get_output_directory

* Swap order of preamble and additional preamble

* Minor stylistic tweak

* Have UnitInterval pass on kwargs to NumberLine

* Add simple get_dist function

* Have TracedPath always update to the stroke configuration passed in

* Have Mobject.match_points apply to all parts of data in pointlike_data_key

* Always call Mobject.update upon adding an updater

* Add Surface.uv_to_point

* Make sure Surface.set_opacity takes in a recurse option

* Update num_tex_symbols to account for \{ and \}
2024-12-26 09:35:34 -08:00
Grant Sanderson
13d4ab1eb0 Stylistic change 2023-08-15 20:40:24 -07:00
Grant Sanderson
3a05352f73 Add poly_line_length function 2023-02-16 15:02:15 -08:00
Grant Sanderson
4de0d098ea Allow cross to take an 'out' array 2023-01-17 11:35:50 -08:00
Grant Sanderson
bd2d45ebc6 Handle edge case of low ring end 2023-01-16 14:00:53 -08:00
Grant Sanderson
51efe0d18e Merge branch 'master' of github.com:3b1b/manim into video-work 2023-01-13 20:42:03 -08:00
Grant Sanderson
42909a94ac No need for np.repeat in normalize_along_axis 2023-01-13 20:34:18 -08:00
Grant Sanderson
31cc2671e5 Have line_intersects_path not assume closed path 2023-01-13 16:35:18 -08:00
Grant Sanderson
937b894826 Clean up find_intersection 2023-01-13 16:35:01 -08:00
Grant Sanderson
d2800b6c96 Make sure cross behaves as expected on 2d arrays 2023-01-13 00:05:29 -08:00
Grant Sanderson
de4a56849e Add line_intersects_path 2023-01-12 21:04:46 -08:00
LucaCappelletti94
1708fbd672 Updated tqdm to support also notebooks 2023-01-12 12:03:14 +01:00
Grant Sanderson
1a8e923ef2 Small speed ups 2023-01-12 00:40:27 -08:00
Grant Sanderson
f2859a9a8c Give default curve orientation of 1 2022-12-27 15:53:24 -08:00
Grant Sanderson
3878b8c077 Fix rotation_between_vectors 2022-12-23 10:04:27 -07:00
Grant Sanderson
baf2690d77 In rotation_between_vectors, account for the case where vectors align 2022-12-22 17:57:47 -07:00
Grant Sanderson
fca7c0609a Factor out epsilon in earclip_triangulation 2022-12-22 11:53:14 -07:00
Grant Sanderson
a4d47f64b0 Fix normalize_along_axis 2022-12-22 11:52:55 -07:00
Grant Sanderson
5b697b3782 Remove stray import 2022-12-17 17:29:39 -08:00
Grant Sanderson
97f28b34f3 Distinguish Vect3 from Vect3Array types 2022-12-17 13:16:48 -08:00
Grant Sanderson
cef6506920 Add better types + Small refactors on space_ops 2022-12-16 20:35:45 -08:00
Grant Sanderson
a39c65cb5c Fix type 2022-12-15 10:11:58 -08:00
Grant Sanderson
a2606c7e37 Make sure find_intersection returns a result matching the shape of inputs 2022-11-03 16:48:14 -07:00
Grant Sanderson
d24b8ff48f
Merge branch 'master' into master 2022-04-20 22:40:11 -07:00
Grant Sanderson
5a91c73b23 Merge branch 'master' of github.com:3b1b/manim into video-work 2022-04-14 14:40:14 -07:00
YishiMichael
9ef9961d0e
Sort imports 2022-04-12 19:19:59 +08:00
Grant Sanderson
e8ac25903e Add case for zero vectors on angle_between_vectors 2022-04-11 09:59:24 -07:00
鹤翔万里
1f32a9e674
Some fix (#1781)
* fix: reduce warning from numpy

* fix: fix ControlsExample
2022-04-07 10:50:18 +08:00
Sunkisser
c4ea794107 use tqdm to display progress bar for long running SVG triangulations 2022-03-28 03:30:10 +00:00
Sunkisser
cfba6c431f revert previous changes - we will refactor using tqdm 2022-03-28 02:55:21 +00:00
鹤翔万里
e11c5def63
style: some style fixes 2022-03-28 08:05:41 +08:00
Sunkisser
a3e4246938 use log.debug and display idx+1 2022-03-27 21:59:49 +00:00
Sunkisser
969aa82f04 user feedback for SVGs that take a while 2022-03-26 23:43:11 +00:00
Grant Sanderson
a9349057ad Merge branch 'master' of github.com:3b1b/manim into video-work 2022-03-22 11:30:25 -07:00
Grant Sanderson
7bf3615bb1 Refactor rotation methods to use scipy.spatial.transform.Rotation 2022-03-18 17:11:08 -07:00
TonyCrane
7f8216bb09
chore: replace some iterable with npt.ArrayLike 2022-02-13 15:18:04 +08:00
TonyCrane
6e292daf58
chore: add type hints to manimlib.utils 2022-02-12 23:47:23 +08:00
Grant Sanderson
407c53f97c Have rotation_between_vectors handle identical/similar vectors 2021-11-18 17:52:48 -08:00
Grant Sanderson
fbc329d7ce Small bug fix for angle_between_vectors 2021-11-17 12:49:53 -08:00
Grant Sanderson
82bd02d21f Fix angle_between_vectors, add rotation_between_vectors 2021-11-16 17:08:35 -08:00
Grant Sanderson
61aec6051a Use generator in place of list 2021-08-21 17:08:28 -07:00
Grant Sanderson
25c5aa2c65 Small stylistic cleanup 2021-08-19 09:18:48 -07:00
Grant Sanderson
8624168ed9
Merge branch 'master' into some1-video-changes 2021-07-28 07:53:04 -07:00
Grant Sanderson
a3227dda67 Small formatting fix 2021-07-28 07:29:43 -07:00
Wallbreaker5th
2ed78c6e0f Rewrite earclip_triangulation 2021-07-28 17:06:43 +08:00
Wallbreaker5th
a99ccea02c Add some comments about the temporary hack 2021-06-19 16:00:39 +08:00
Wallbreaker5th
e836c3bb42 Temporary hack for showing text correctly 2021-06-18 14:43:09 +08:00
Grant Sanderson
1727d4b86a Small hacky tweak to fix more triangulation issues 2021-02-03 17:52:11 -08:00
Grant Sanderson
c8f4c49720 Yet another triangulation fix 2021-02-03 10:07:00 -08:00
Grant Sanderson
0c6149c9dd Minor cleanup to triangulation 2021-02-02 16:43:24 -08:00