# -*- coding: utf-8 -*- """Channel UI layer (chip, progress bar and subtitles) for the videos rendered in Blender. It is rendered with --transparent and composited over the 3D, so the style comes from the same code as the Manim videos. NAME=bolapeluda CHIP=TopologĂ­a CHIPCOL=celeste manim --transparent ... It also writes out/_timeline.json, which the Blender script (to animate) and build_video.py (to place the audio) read afterwards. """ import os, sys sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from manim import * from tiktok import * PALETTE = {"ambar": AMBER, "verde": C_GREEN, "rosa": C_PINK, "celeste": C_SKY} class Overlay(TikTok): NAME = os.environ.get("NAME", "") def backdrop(self): return VGroup() # the dotted background goes separately, under the 3D def construct(self): self.prepare() chip = self.chip(os.environ.get("CHIP", ""), PALETTE[os.environ.get("CHIPCOL", "ambar")]) self.add(chip) for i in range(len(self.segs)): with self.beat(i) as b: b.wait(b.floor) self.finish() class Backdrop(TikTok): """A single frame with the dot pattern, to use as background.""" NAME = "fondo" def construct(self): self._sub = None TikTok.backdrop(self) self.wait(0.1)