ManimGL is a mature, well-architected Python library for programmatic mathematical animation, using OpenGL (via ModernGL) for GPU-accelerated rendering. Originally created by Grant Sanderson (3Blue1Brown), it is the upstream predecessor to the community edition. The codebase is structured as a library with a CLI entry point (`manimgl`), and it cleanly separates concerns into animation logic, scene management, camera/frame transforms, mobject (math object) types, shader pipelines, and utility modules. The architecture centers on a scene-graph model: `Scene` objects orchestrate `Animation` instances that interpolate between `Mobject` states, while a `Camera` with a `CameraFrame` handles view/projection and feeds into a shader-based rendering pipeline. The system supports real-time interactive preview via an embedded IPython shell, video export via FFmpeg piping, and LaTeX-to-SVG conversion for text. The GLSL shader system is notably sophisticated, with custom `#INSERT` preprocessing to share code between vertex/fragment/geometry shaders for quadratic BΓ©zier rendering, fractals, and lit surfaces. Key reusable components include: a robust event-driven interactive system (event dispatcher + listeners), a disk-caching decorator for expensive computations, a deeply capable BΓ©zier/geometry math library, a flexible color system with colormaps, and a module-reload system that enables live coding. The codebase demonstrates high craftsmanship in its shader architecture, the `CameraFrame` as a fully animatable mobject, and the `TransformMatchingParts` algorithm for morphing between shapes.
This repository provides a collection of GLSL shaders for enhancing cursor effects in the Ghostty terminal. It implements various visual effects including trail effects (cursor_sweep, cursor_tail, cursor_warp) that animate cursor movement, and pulse/boom effects (sonic_boom_cursor, ripple_cursor, etc.) that trigger on cursor shape changes. Each shader is self-contained and follows Ghostty's custom shader interface, using uniforms like iCurrentCursor, iPreviousCursor, and iTime to create animated effects. The trail shaders demonstrate particular sophistication with custom signed distance function implementations for rectangles and parallelograms, easing functions, and anti-aliasing.