Goondex/internal/web/static/js/logo-animation.js
Stu Leak 2b4a2038fa Add JAV studios reference documentation and various UI improvements
- Add comprehensive JAV studios quick reference guide
- Update documentation index with JAV reference
- Add logo animation components and test files
- Update CSS styling for cards, buttons, forms, and theme
- Add utility scripts for configuration and import workflows
- Update templates and UI components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 16:36:38 -05:00

58 lines
1.6 KiB
JavaScript

// Minimal logo animation controller
class LogoAnimator {
constructor() {
this.isAnimating = false;
this.logoElement = null;
}
// Initialize with SVG element
init(svgElement) {
this.logoElement = svgElement;
this.identifyNipples();
}
// Identify nipple elements by their circular paths
identifyNipples() {
if (!this.logoElement) return;
const paths = this.logoElement.querySelectorAll('path');
let nippleIndex = 0;
paths.forEach((path) => {
const d = path.getAttribute('d');
// Look for the specific circular nipple paths in the GOONDEX_Titty.svg
if (d && d.includes('1463.5643,67.636337')) {
path.classList.add('nipple-left');
nippleIndex++;
} else if (d && d.includes('70.4489,0') && nippleIndex === 1) {
path.classList.add('nipple-right');
nippleIndex++;
}
});
}
// Start bouncing animation
startBounce() {
if (!this.logoElement || this.isAnimating) return;
this.logoElement.classList.add('goondex-logo-animated');
this.isAnimating = true;
}
// Stop animation
stopBounce() {
if (!this.logoElement) return;
this.logoElement.classList.remove('goondex-logo-animated');
this.isAnimating = false;
}
// Auto-start for loading screens
autoStart(duration = 3000) {
this.startBounce();
setTimeout(() => this.stopBounce(), duration);
}
}
// Export for use in loading screens
window.LogoAnimator = LogoAnimator;