templates¶
- import_template_string_cosmo(module_name: str)[source]¶
Import a chosen template to standardize styling for string cosmology visualizations.
This function loads a predefined color and styling template that will be applied to all subsequent string_cosmo objects created in the scene. It helps maintain visual consistency across string theory and cosmology animations.
- Parameters:
module_name (str) – Name of the template to import. Must be one of the allowed templates.
- Raises:
ModuleNotFoundError – If the specified template module cannot be found.
Note
This function should be called before defining your Scene class to ensure the template is properly loaded before any string_cosmo objects are created.
- Available templates:
"cosmic_dawn""quantum_dusk""dark_energy""green_mint""blue_ice""red_autumn""beamer_blue""beamer_green""default_template"(fallback)
Example usage:
from manim_string_cosmo import * import_template_string_cosmo('cosmic_dawn') class MyScene(Scene): def construct(self): # Your string_cosmo objects will now use the selected template pass