Celebration Animations Library¶
Self-contained celebration animations for educational MicroSims. Each animation is a single JavaScript file that can be copied into any MicroSim folder.
Available Animations¶
| File | Animation | Description |
|---|---|---|
book-burst.js |
Book Burst | Colorful closed books shooting upward |
yellow-stars.js |
Yellow Stars | Classic golden stars floating upward |
rainbow-sparkle-burst.js |
Rainbow Sparkle Burst | Colorful sparkles exploding from center |
happy-star-sprinkle.js |
Happy Star Sprinkle | Smiling stars with faces falling down |
alphabet-fireworks.js |
Alphabet Fireworks | Letters shooting up and exploding |
super-reader-confetti.js |
Super Reader Confetti | Rectangular confetti tumbling down |
magic-book-bloom.js |
Magic Book Bloom | Glowing particles blooming outward |
giggle-glitter-pop.js |
Giggle Glitter Pop | Bouncy circles that pop into sparkles |
storytime-spark-shower.js |
Storytime Spark Shower | Colorful sparks falling like rain |
bright-buddy-balloons.js |
Bright Buddy Balloons | Colorful balloons floating upward |
reading-rocket-zoom.js |
Reading Rocket Zoom | Rockets zooming across with flame trails |
baseball-explosion.js |
Baseball Explosion | Baseballs exploding upward with red stitching |
flying-frisbees.js |
Flying Frisbees | Colorful frisbees flying upward with spin |
soccer-explosion.js |
Soccer Explosion | Soccer balls exploding upward with pentagon pattern |
celebration-sounds.js |
Sound Effects | Optional audio feedback utilities |
Quick Start¶
1. Copy the animation file(s) you need¶
2. Include in your main.html¶
3. Trigger the animation in your game¶
API Reference¶
Each animation file provides these functions:
| Function | Purpose |
|---|---|
create[Name](x, y, speedMultiplier) |
Start the animation at position (x, y) |
updateAndDraw[Name]() |
Update physics and render particles |
is[Name]Active() |
Returns true if animation is still playing |
clear[Name]() |
Immediately stop and clear all particles |
Speed Multiplier¶
All animations accept an optional speedMultiplier parameter:
- 0.5 = Slow (animations last ~4 seconds)
- 1.0 = Medium/Default (animations last ~2 seconds)
- 1.8 = Fast (animations last ~1 second)
Animation Details¶
Book Burst¶
Yellow Stars¶
Rainbow Sparkle Burst¶
Happy Star Sprinkle¶
Alphabet Fireworks¶
Super Reader Confetti¶
Magic Book Bloom¶
Giggle Glitter Pop¶
Storytime Spark Shower¶
Bright Buddy Balloons¶
Reading Rocket Zoom¶
Baseball Explosion¶
Flying Frisbees¶
Soccer Explosion¶
Sound Effects (Optional)¶
Include celebration-sounds.js for audio feedback:
Example: Multiple Animations¶
You can use multiple animations in the same MicroSim:
Testing¶
Use the Celebration Animation Tester MicroSim to preview all animations and experiment with different speeds.
File Sizes¶
Each animation file is approximately 80-120 lines (~3-4 KB), making them lightweight to include.
| File | Lines | Size |
|---|---|---|
| book-burst.js | ~115 | ~3.5 KB |
| yellow-stars.js | ~90 | ~2.8 KB |
| rainbow-sparkle-burst.js | ~95 | ~3.0 KB |
| happy-star-sprinkle.js | ~110 | ~3.4 KB |
| alphabet-fireworks.js | ~120 | ~3.8 KB |
| super-reader-confetti.js | ~85 | ~2.6 KB |
| magic-book-bloom.js | ~90 | ~2.8 KB |
| giggle-glitter-pop.js | ~130 | ~4.0 KB |
| storytime-spark-shower.js | ~100 | ~3.2 KB |
| bright-buddy-balloons.js | ~95 | ~3.0 KB |
| reading-rocket-zoom.js | ~115 | ~3.6 KB |
| baseball-explosion.js | ~120 | ~3.8 KB |
| flying-frisbees.js | ~110 | ~3.4 KB |
| soccer-explosion.js | ~120 | ~3.8 KB |
| celebration-sounds.js | ~120 | ~3.5 KB |