Spaces:
Running
Running
File size: 1,045 Bytes
7efb2bf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | document.addEventListener('DOMContentLoaded', function() {
const captureBtn = document.getElementById('capture-btn');
const switchCameraBtn = document.getElementById('switch-camera');
const galleryBtn = document.getElementById('gallery-btn');
// Capture button animation
captureBtn.addEventListener('click', function() {
this.classList.add('animate-pulse');
setTimeout(() => {
this.classList.remove('animate-pulse');
alert('Photo captured! 📸');
}, 500);
});
// Switch camera functionality
switchCameraBtn.addEventListener('click', function() {
this.classList.add('animate-spin');
setTimeout(() => {
this.classList.remove('animate-spin');
alert('Switched camera! 🔄');
}, 1000);
});
// Gallery button
galleryBtn.addEventListener('click', function() {
alert('Opening gallery... 🖼️');
});
// Simulate camera access
console.log('CameraSnap initialized!');
}); |