128 Commits

Author SHA1 Message Date
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
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
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
499803159c Remove methods and tracking associated with triangulation and non-winding fill 2024-08-23 14:08:56 -05:00
487c714d9b Remove stray new line 2024-08-23 13:56:16 -05:00
eea8416d57 Default to allowing null lines, except for SVGPaths 2024-08-21 14:44:33 -05:00
0cf9a35367 Have SVG subdivide intersections if winding fill is not a default 2023-02-02 11:28:20 -08:00
31b937a7f1 Remove no-longer necessary PathString configuration 2023-01-28 13:19:06 -08:00
8d72340501 Remove some references to triangulation 2023-01-28 12:43:56 -08:00
ab57b0acf0 Ensure positive orientation on all SVG, not just PathStrings 2023-01-26 21:00:07 -08:00
05dd399270 Ensure svgs have positive orientation by default 2023-01-26 12:04:58 -08:00
346d252451 Don't save triangulation, but do orient svg paths positively 2023-01-24 21:33:00 -08:00
ae99c8cd2e Go back to use_simple_quadratic_approx being set at the Text level 2023-01-13 14:08:29 -08:00
108bb3da44 Have SVGs default to use_simple_quadratic_approx 2023-01-13 08:16:46 -08:00
2c6e8692ce Add condition for calling subdivide_intersections 2023-01-12 23:45:26 -08:00
f39fd92e9e Add condition to account for end of string 2023-01-12 21:24:27 -08:00
f0edc6628b Push default of use_simple_quadratic_approx being True to Text 2023-01-12 21:24:03 -08:00
9f1ab09749 Make usage of simpler quadratic approximations an option for VMobject 2023-01-12 21:06:35 -08:00
9778c3e085 Remove no-longer necessary correction for path ends 2023-01-12 18:29:44 -08:00
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
7895a2cfee No need to immediately compute triangulation for SVG paths 2022-12-29 20:51:00 -08:00
2dbb9367c4 Default to removing null curves 2022-12-29 15:40:32 -08:00
4bc7e3a8f2 Remove redundant long_line specification 2022-12-29 15:40:18 -08:00
7f203d1611 Remove triangulation cachine 2022-12-23 13:33:07 -07:00
9c106eb873 Add option for StringMobject to only render a single svg
Then set as the default behavior for MTex and Text
2022-12-20 14:31:17 -08:00
71c9144952 Use io.BytesIO rather than writing to a temp file 2022-12-19 16:03:16 -08:00
ef64b90ed3 Allow for default height/width of SVGMobject specified as class variables 2022-12-19 14:42:04 -08:00
c96cdf43a1 Make sure mutability of dict arguments won't cause problems
One could argue that a pattern of "arg: dict | None = None" followed by "self.param = arg or dict()" is better, but that would make for an inconsistent pattern in cases where the default argument is not None.
2022-12-18 09:38:28 -08:00
1f0427d685 Add height as attribute to SVGMobject 2022-12-17 13:17:12 -08:00
5625f63ca2 Clean up SVG.__Init__ and fix style issue 2022-12-16 20:59:02 -08:00
43fd5e1aea Move custom type to manimlib.typing 2022-12-16 20:19:18 -08:00
c55374245d Kill config in svg_mobject 2022-12-15 12:48:06 -08:00
4a575afdde chore: Remove unused namespace constants 2022-09-07 13:23:02 +08:00
ae115d9992 refactor: Remove expansion of <use> elements 2022-09-07 13:19:08 +08:00
eadf611f1e fix: fix an incorrect typing 2022-08-22 22:05:33 +08:00
93265c7341 Remove a twice-defined method 2022-05-30 10:19:52 +08:00
a73bd5d4fe Fix popping bug 2022-05-29 16:48:30 +08:00
97ac8c9953 Expand use elements 2022-05-29 16:26:40 +08:00
f0447d7739 Small refactors on StringMobject and relevant classes 2022-05-28 21:43:37 +08:00
22a3bef670 Resolve conflicts 2022-05-28 12:40:29 +08:00
1596356385 Reuse hash_string function 2022-05-22 10:29:20 +08:00
d9475a6860 Remove unnecessary imports 2022-04-23 10:16:48 -07:00
cbb7e69f68 Refactor LabelledString and relevant classes 2022-04-18 18:47:57 +08:00
9ef9961d0e Sort imports 2022-04-12 19:19:59 +08:00
93f8d3f1ca Some refactors on LabelledString 2022-04-06 22:38:33 +08:00
9ac1805e7e Refactor MTex 2022-03-26 20:52:28 +08:00
4a03d196a6 Adjust typings 2022-03-23 13:34:30 +08:00
519e2f4f1e Adjust some typings 2022-03-23 12:21:40 +08:00
f690164087 Merge branch 'master' into master 2022-03-22 11:00:33 -07:00
e5ce0ca286 Reorganize methods 2022-03-22 20:46:35 +08:00