Commit graph

461 commits

Author SHA1 Message Date
Grant Sanderson
f4737828f6
Video work (#2326)
* Only use -no-pdf for xelatex rendering

* Instead of tracking du and dv points on surface, track points off the surface in the normal direction

This means that surface shading will not necessarily work well for arbitrary transformations of the surface. But the existing solution was flimsy anyway, and caused annoying issues with singularity points.

* Have density of anchor points on arcs depend on arc length

* Allow for specifying true normals and orientation of Sphere

* Change miter threshold on stroke shader

* Add get_start_and_end to DashedLine

* Add min_total_width option to DecimalNumber

* Have BackgroundRectangle.set_style absorb (and ignore) added configuration

Note, this feels suboptimal

* Add LineBrace

* Update font_size adjustment in Tex

* Add scale_factor parameter to BulletedList.fade_all_but

* Minor import tweaks

* Add play_sound
2025-03-20 12:00:35 -07:00
jkjkil4
be7d93cf40
Fix path arc handling for SVGMobject when a matrix transform is present in the SVG (#2322) 2025-03-20 11:59:06 -07:00
Grant Sanderson
db421e3981
Video work (#2318)
* Only use -no-pdf for xelatex rendering

* Instead of tracking du and dv points on surface, track points off the surface in the normal direction

This means that surface shading will not necessarily work well for arbitrary transformations of the surface. But the existing solution was flimsy anyway, and caused annoying issues with singularity points.

* Have density of anchor points on arcs depend on arc length

* Allow for specifying true normals and orientation of Sphere

* Change miter threshold on stroke shader

* Add get_start_and_end to DashedLine

* Add min_total_width option to DecimalNumber

* Have BackgroundRectangle.set_style absorb (and ignore) added configuration

Note, this feels suboptimal

* Add LineBrace

* Update font_size adjustment in Tex
2025-02-26 07:52:59 -08:00
Varniex
24eefef5bf
Automatically identify the class name based on the specified line number. (#2280)
* identify the scene name based on the line number

* resolving a minor bug in string_mobject

* removing bug of string validation

* Update manimlib/default_config.yml

Co-authored-by: Splines <37160523+Splines@users.noreply.github.com>

* Update manimlib/extract_scene.py

Co-authored-by: Splines <37160523+Splines@users.noreply.github.com>

* update search scene names

---------

Co-authored-by: Splines <37160523+Splines@users.noreply.github.com>
2024-12-28 07:18:32 -08:00
Grant Sanderson
744e695340
Misc. clean up (#2269)
* 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
2024-12-12 08:39:54 -08:00
Grant Sanderson
0b350e248b Change global_attrs back to global_config in Text 2024-12-11 10:18:05 -06:00
Grant Sanderson
fce92347fa Replace get_global_config() with manim_config, and make it an addict Dict 2024-12-11 09:50:17 -06:00
Grant Sanderson
4a6a125739 Change "style" in default config to "text"
Some checks are pending
docs / build up document and deploy (push) Waiting to run
2024-12-11 08:30:31 -06:00
Grant Sanderson
d5c36de3c5 DEFAULT_MOBJECT_TO_MOBJECT_BUFFER -> DEFAULT_MOBJECT_TO_MOBJECT_BUFF
Some checks are pending
docs / build up document and deploy (push) Waiting to run
And likewise DEFAULT_MOBJECT_TO_MOBJECT_BUFFER -> DEFAULT_MOBJECT_TO_MOBJECT_BUFF
2024-12-10 19:23:15 -06:00
Varniex
c51a84a6ee Fixing a Cairo Bug (Windows OS) 2024-12-11 00:10:06 +05:30
Grant Sanderson
94f6f0aa96
Cleaner local caching of Tex/Text data, and partially cleaned up configuration (#2259)
* Remove print("Reloading...")

* Change where exception mode is set, to be quieter

* Add default fallback monitor for when no monitors are detected

* Have StringMobject work with svg strings rather than necessarily writing to file

Change SVGMobject to allow taking in a string of svg code as an input

* Add caching functionality, and have Tex and Text both use it for saved svg strings

* Clean up tex_file_writing

* Get rid of get_tex_dir and get_text_dir

* Allow for a configurable cache location

* Make caching on disk a decorator, and update implementations for Tex and Text mobjects

* Remove stray prints

* Clean up how configuration is handled

In principle, all we need here is that manim looks to the default_config.yaml file, and updates it based on any local configuration files, whether in the current working directory or as specified by a CLI argument.

* Make the default size for hash_string an option

* Remove utils/customization.py

* Remove stray prints

* Consolidate camera configuration

This is still not optimal, but at least makes clearer the way that importing from constants.py kicks off some of the configuration code.

* Factor out configuration to be passed into a scene vs. that used to run a scene

* Use newer extract_scene.main interface

* Add clarifying message to note what exactly is being reloaded

* Minor clean up

* Minor clean up

* If it's worth caching to disk, then might as well do so in memory too during development

* No longer any need for custom hash_seeds in Tex and Text

* Remove display_during_execution

* Get rid of (no longer used) mobject_data directory reference

* Remove get_downloads_dir reference from register_font

* Update where downloads go

* Easier use of subdirectories in configuration

* Add new pip requirements
2024-12-05 14:51:14 -08:00
Varniex
5d3f730824
Cleaning up some imports + Minor Bug fixed in VectorField (#2253)
* cleaning up imports

* sample_points -> sample_coords
2024-12-05 14:42:46 -08:00
Grant Sanderson
e19ceaaff0 Have TexMobject keep track of font_size 2024-11-25 11:02:54 -07:00
Grant Sanderson
bddd9c35ea Tiny formatting 2024-10-01 13:04:50 -05:00
Grant Sanderson
499803159c Remove methods and tracking associated with triangulation and non-winding fill 2024-08-23 14:08:56 -05:00
Grant Sanderson
487c714d9b Remove stray new line 2024-08-23 13:56:16 -05:00
Grant Sanderson
eea8416d57 Default to allowing null lines, except for SVGPaths 2024-08-21 14:44:33 -05:00
Grant Sanderson
b288d5301e Get rid of cached _has_stroke and _has_fill parameters 2024-08-19 17:27:47 -05:00
Grant Sanderson
7565e936fa Better bubble flipping 2024-03-25 19:10:16 -03:00
Grant Sanderson
1d6aa47933 Reimplement SpeechBubble and ThoughtBubble 2024-03-21 14:36:17 -03:00
Grant Sanderson
7e6a37d499 Typo fix: make_number_changable -> make_number_changeable 2024-03-21 10:03:41 -03:00
Grant Sanderson
712fa30174 Ensure Brace.get_tex uses buff key word arg 2024-02-21 12:25:43 -08:00
Grant Sanderson
246a010799 Add default border width to StringMobject 2023-11-06 12:33:56 -05:00
Grant Sanderson
63f6e9d84f Add Dartboard 2023-06-10 09:21:57 -07:00
Grant Sanderson
de8e9e5ec1 Fix error with setting bubble direction 2023-03-14 10:35:04 -07:00
Grant Sanderson
a79d4a862f Keep track of dots in DieFace 2023-02-24 08:22:24 -05:00
Grant Sanderson
0cf9a35367 Have SVG subdivide intersections if winding fill is not a default 2023-02-02 11:28:20 -08:00
Grant Sanderson
f2d71e6521 Don't rotate Laptop into place 2023-01-31 09:20:05 -08:00
Grant Sanderson
68255b1c9a Remove references to no-longer-need path_string_config 2023-01-28 17:53:40 -08:00
Grant Sanderson
31b937a7f1 Remove no-longer necessary PathString configuration 2023-01-28 13:19:06 -08:00
Grant Sanderson
8d72340501 Remove some references to triangulation 2023-01-28 12:43:56 -08:00
Grant Sanderson
ab57b0acf0 Ensure positive orientation on all SVG, not just PathStrings 2023-01-26 21:00:07 -08:00
Grant Sanderson
05dd399270 Ensure svgs have positive orientation by default 2023-01-26 12:04:58 -08:00
Grant Sanderson
346d252451 Don't save triangulation, but do orient svg paths positively 2023-01-24 21:33:00 -08:00
Grant Sanderson
8ce5dc7e84 Add DieFace to drawings.py 2023-01-23 11:53:30 -08:00
Grant Sanderson
c3cd64f68c Package reflectiveness, gloss and shadow into a single uniform "shading" 2023-01-16 19:33:57 -08:00
Grant Sanderson
ae99c8cd2e Go back to use_simple_quadratic_approx being set at the Text level 2023-01-13 14:08:29 -08:00
Grant Sanderson
108bb3da44 Have SVGs default to use_simple_quadratic_approx 2023-01-13 08:16:46 -08:00
Grant Sanderson
c8a77a352f Fix Piano 2023-01-13 00:24:19 -08:00
Grant Sanderson
2c6e8692ce Add condition for calling subdivide_intersections 2023-01-12 23:45:26 -08:00
Grant Sanderson
f39fd92e9e Add condition to account for end of string 2023-01-12 21:24:27 -08:00
Grant Sanderson
f0edc6628b Push default of use_simple_quadratic_approx being True to Text 2023-01-12 21:24:03 -08:00
Grant Sanderson
9f1ab09749 Make usage of simpler quadratic approximations an option for VMobject 2023-01-12 21:06:35 -08:00
Grant Sanderson
9778c3e085 Remove no-longer necessary correction for path ends 2023-01-12 18:29:44 -08:00
Grant Sanderson
64578df603 Don't save SVG Path data to file
It's more trouble than it's worth
2023-01-12 13:23:48 -08:00
Grant Sanderson
86b756ab1f No need for subdividing sharp curves 2023-01-11 14:20:20 -08:00
Grant Sanderson
3aa9eb6372 Add String.get_symbol_substrings and Tex.get_symbol_substrings 2022-12-30 15:07:41 -08:00
Grant Sanderson
7895a2cfee No need to immediately compute triangulation for SVG paths 2022-12-29 20:51:00 -08:00
Grant Sanderson
0f9adbf91c Add Tex.make_number_changable 2022-12-29 18:52:00 -08:00
Grant Sanderson
2dbb9367c4 Default to removing null curves 2022-12-29 15:40:32 -08:00