burme-coder-max / docs /animation_gallery.md
amkyawdev's picture
Upload folder using huggingface_hub
a7d7463 verified
|
Raw
History Blame Contribute Delete
2.05 kB
"""Documentation: Animation Gallery"""
# Animation Gallery
A showcase of all available terminal animations in Burme-Coder-Max.
---
## 1. Loading Spinner
Display a spinning indicator while waiting.
```python
from animations import Spinner
with Spinner("Loading..."):
do_something()
```
**Custom message:**
```python
spinner = Spinner("Processing your request...")
spinner.start()
# ... do work
spinner.stop()
```
---
## 2. Progress Bar
Show progress for long-running operations.
```python
from animations import ProgressBar
for i in ProgressBar(range(100), description="Downloading"):
download(i)
```
**Custom configuration:**
```python
from animations.progress_bar import ProgressBarConfig
config = ProgressBarConfig(
width=60,
fill_char="█",
empty_char="░"
)
progress = ProgressBar(
total=50,
config=config,
description="Uploading"
)
```
---
## 3. Typing Effect
Typewriter-style text animation.
```python
from animations import TypingEffect
effect = TypingEffect("Hello, World!")
effect.animate()
```
**Speed variants:**
```python
from animations import SlowTypingEffect, FastTypingEffect
SlowTypingEffect("Slow text").animate()
FastTypingEffect("Fast text").animate()
```
---
## 4. Particle Burst
Celebration effect with particles.
```python
from animations import ParticleBurst
burst = ParticleBurst(count=50)
burst.explode()
```
**Custom position:**
```python
burst = ParticleBurst(center_x=60, center_y=15)
burst.explode()
```
---
## 5. Confetti
Lightweight celebration effect.
```python
from animations.particle_effect import SimpleConfetti
confetti = SimpleConfetti(duration=2.0)
confetti.show()
```
---
## Preview Script
Run all animations:
```bash
python scripts/preview_animations.py
```
---
## Configuration
Edit animation settings in `.env`:
```bash
ANIMATION_SPEED=0.05
ANIMATION_COLOR=true
```
Or in code:
```python
from animations.config import AnimationConfig
config = AnimationConfig(speed=0.03, color_enabled=False)
spinner = Spinner(config=config)
```