motiongraphics / core /background_animations.py
karthikeya1212's picture
Upload 26 files
7782338 verified
raw
history blame
881 Bytes
# app/core/animations/background_animations.py
from pathlib import Path
from typing import Dict
def animated_gradient(svg_path: Path, working_dir: Path, task_meta: Dict) -> Dict:
scene_name = "AnimatedGradient"
scene_code = f'''
from manim import *
class {scene_name}(Scene):
def construct(self):
# TODO: animate gradient backgrounds (possibly pre-render or use many rectangles)
self.wait(0.5)
'''
return {"scene_name": scene_name, "scene_code": scene_code}
def particle_motion(svg_path: Path, working_dir: Path, task_meta: Dict) -> Dict:
scene_name = "ParticleMotion"
scene_code = f'''
from manim import *
class {scene_name}(Scene):
def construct(self):
# TODO: implement particle motions like snow or bubbles
self.wait(0.5)
'''
return {"scene_name": scene_name, "scene_code": scene_code}