Commit graph

32 commits

Author SHA1 Message Date
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
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
Grant Sanderson
b288d5301e Get rid of cached _has_stroke and _has_fill parameters 2024-08-19 17:27:47 -05:00
Grant Sanderson
246a010799 Add default border width to StringMobject 2023-11-06 12:33:56 -05: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
13fc8daba9 Extend StringMobject.select_unisolated_substring to work for regular expressions 2022-12-29 14:18:46 -08:00
Grant Sanderson
c7ba775845 In StringMobject.select_parts, default to using select_unisolated_substring if substring was not explicitly isolated 2022-12-28 13:39:13 -08:00
Grant Sanderson
49d4472e7e Add StringMobject.get_specified_substrings 2022-12-27 19:13:09 -08:00
Grant Sanderson
3bf5ce5776 Fix TexMobject.select_unisolated_substring for substrings with escape characters 2022-12-26 09:02:00 -07:00
Grant Sanderson
33682b7199 MTex is the new Tex, Tex is now OldTex
Global replace
Tex -> OldTex
TexText -> OldTexText
MTex -> Tex
MTexText -> TexText
2022-12-21 13:18:20 -08:00
Grant Sanderson
958c34c705 Push functionality for selecting unisolated substrings up into StringMobject 2022-12-21 12:47:48 -08:00
Grant Sanderson
6176bcd45a Add option for StringMobject to only render one svg 2022-12-20 14:32:04 -08:00
Grant Sanderson
dd662b0d12 Move Selector and Span to manimlib.typing 2022-12-20 14:29:17 -08:00
Grant Sanderson
073a62bf03 Factor rgb_to_hex, hex_to_int and int_to_hex away from StringMobject and to utils/color 2022-12-19 17:28:22 -08:00
Grant Sanderson
b2fd22c539 Small cleanups 2022-12-19 16:21:40 -08:00
Grant Sanderson
2c20a1509e Remoe height defaults form __init__args of SingleStringTex and String 2022-12-19 14:43:10 -08:00
Grant Sanderson
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
Grant Sanderson
43fd5e1aea Move custom type to manimlib.typing 2022-12-16 20:19:18 -08:00
Grant Sanderson
3b5181d1a3 Kill CONFIG in StringMobject and Text 2022-12-15 13:35:13 -08:00
Grant Sanderson
958002152e Define ManimColor type in constants 2022-12-14 10:55:32 -08:00
YishiMichael
fa1d938af1
chore: Optimize warning info 2022-09-10 23:55:52 +08:00
YishiMichael
4dfe8aff86
refactor: refactor StringMobject 2022-08-22 21:52:48 +08:00
YishiMichael
c2a75e15cc
refactor: refactor StringMobject 2022-08-22 16:55:46 +08:00
YishiMichael
19c757ec90
refactor: refactor StringMobject 2022-08-20 13:01:59 +08:00
YishiMichael
7ffc7b33f7
Refactor StringMobject and relevant classes 2022-08-07 23:57:54 +08:00
YishiMichael
28e4240475
Refactor StringMobject and relevant classes 2022-08-07 11:29:31 +08:00
YishiMichael
f434eb93e2
Refactor StringMobject and relevant classes 2022-08-07 00:50:29 +08:00
YishiMichael
093af347aa
Refactor LabelledString and relevant classes 2022-06-11 15:15:39 +08:00
YishiMichael
f0447d7739
Small refactors on StringMobject and relevant classes 2022-05-28 21:43:37 +08:00
YishiMichael
26de7c9ce5
Fix a logistic bug 2022-05-20 18:49:38 +08:00
YishiMichael
cdadaf8a8c
Rename LabelledString to StringMobject 2022-05-06 22:09:58 +08:00
Renamed from manimlib/mobject/svg/labelled_string.py (Browse further)