Realistic fireworks with rocket trails, colorful explosions, sparkle effects, and particle physics
// Add to your HTML
<script src="https://dadevmikey.github.io/The-Holiday-Library/NewYearsOverlay.js"></script>
// Initialize and start fireworks
const fireworks = new FireworksOverlay();
fireworks.startAnimation();
// Or customize it
const fireworks = new FireworksOverlay({
colors: ['#FF0000', '#00FF00', '#0000FF', '#FFD700'],
particleCount: 100,
interval: 500,
trailLength: 5,
sparkle: true,
rocketTrail: true
});
fireworks.startAnimation();
// Stop fireworks
fireworks.stopAnimation();
const fw = new FireworksOverlay();
fw.startAnimation();
fw.stopAnimation();
fw.toggle();
new FireworksOverlay({
colors: ['#FF0000', '#FFD700'],
particleCount: 100,
trailLength: 5,
sparkle: true,
rocketTrail: true
});
const fw = new FireworksOverlay({
startTime: '23:00',
endTime: '01:00'
});
fw.startAnimation();
new FireworksOverlay({
timeout: 30000 // 30 seconds
});