--- name: celebration-animation-generator description: This skill generates self-contained p5.js celebration animations for educational MicroSims. Use this skill when users request creating new celebration animations, particle effects, reward animations, or visual feedback for student achievements. The skill creates a new animation JavaScript file in /docs/sims/shared/animations/ and integrates it with the animation-lib-tester MicroSim for testing. --- # Celebration Animation Generator ## Overview This skill generates self-contained p5.js celebration animation modules for the reading-for-kindergarten intelligent textbook project. Each animation is a single JavaScript file that can be copied into any MicroSim folder to provide visual celebration feedback when students complete tasks correctly. ## When to Use This Skill Use this skill when users request: - Creating a new celebration animation (e.g., "baseballs exploding", "butterflies flying") - Adding particle effects for student rewards - Generating visual feedback animations for educational games - Expanding the celebration animation library ## Workflow ### Step 1: Parse the Animation Request Extract from the user's description: 1. **Object/Shape**: What is being animated (baseballs, hearts, butterflies, etc.) 2. **Motion Pattern**: How it moves (exploding, floating, falling, zooming, etc.) 3. **Origin Point**: Where it starts (bottom center, top, sides, center, etc.) 4. **Suggested Name**: Derive a kebab-case filename (e.g., "baseball-explosion.js") ### Step 2: Generate the Animation File Create a new JavaScript file in `/docs/sims/shared/animations/` following the template pattern in `references/animation-template.md`. Key requirements: - Use a **unique particle array name** (e.g., `baseballExplosionParticles`) - Use a **unique suffix for helper functions** to avoid conflicts (e.g., `drawBaseballBE()`) - Include all four standard API functions: - `create[Name](params, speedMultiplier)` - Initialize particles - `updateAndDraw[Name]()` - Physics and rendering - `is[Name]Active()` - Check if animation is playing - `clear[Name]()` - Stop animation immediately - Support `speedMultiplier` parameter (0.5=slow, 1.0=medium, 1.8=fast) - Use the standard rainbow color palette for variety ### Step 3: Update the Animation Library Tester After creating the animation file, update `/docs/sims/animation-lib-tester/` to include the new animation: 1. **main.html**: Add a new `