{"id":30788679,"url":"https://github.com/prashantkoirala465/interactive-hero-canvas-animation","last_synced_at":"2026-04-13T08:31:39.768Z","repository":{"id":311451592,"uuid":"1043745208","full_name":"prashantkoirala465/Interactive-Hero-Canvas-Animation","owner":"prashantkoirala465","description":"A sophisticated, frame-by-frame animation system for the Doze Studio website, featuring scroll-triggered animations and professional-grade JavaScript architecture.","archived":false,"fork":false,"pushed_at":"2025-08-24T14:36:10.000Z","size":46839,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-24T19:39:14.506Z","etag":null,"topics":["animation","awwwards-app-replica","awwwards-inspired","css","gsapp","html5","javascript","scrolltrigger","smooth","smooth-animations","tailwincss"],"latest_commit_sha":null,"homepage":"https://interactive-hero-canvas-animation.vercel.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prashantkoirala465.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-24T14:30:39.000Z","updated_at":"2025-08-24T14:51:07.000Z","dependencies_parsed_at":"2025-08-24T19:49:19.043Z","dependency_job_id":null,"html_url":"https://github.com/prashantkoirala465/Interactive-Hero-Canvas-Animation","commit_stats":null,"previous_names":["prashantkoirala465/interactive-hero-canvas-animation"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/prashantkoirala465/Interactive-Hero-Canvas-Animation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashantkoirala465%2FInteractive-Hero-Canvas-Animation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashantkoirala465%2FInteractive-Hero-Canvas-Animation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashantkoirala465%2FInteractive-Hero-Canvas-Animation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashantkoirala465%2FInteractive-Hero-Canvas-Animation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prashantkoirala465","download_url":"https://codeload.github.com/prashantkoirala465/Interactive-Hero-Canvas-Animation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashantkoirala465%2FInteractive-Hero-Canvas-Animation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273767868,"owners_count":25164464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","awwwards-app-replica","awwwards-inspired","css","gsapp","html5","javascript","scrolltrigger","smooth","smooth-animations","tailwincss"],"created_at":"2025-09-05T13:51:42.023Z","updated_at":"2026-04-13T08:31:39.760Z","avatar_url":"https://github.com/prashantkoirala465.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Doze Studio - Interactive Canvas Animation\n\nA sophisticated, frame-by-frame animation system for the Doze Studio website, featuring scroll-triggered animations and professional-grade JavaScript architecture.\n\n## 🚀 Project Overview\n\nThis project demonstrates advanced frontend development techniques including:\n- **Frame-by-frame animation system** with 1345+ image frames\n- **Scroll-triggered animations** using GSAP ScrollTrigger\n- **Canvas-based rendering** with proper scaling and centering\n- **Professional JavaScript architecture** following senior software engineering best practices\n\n## 📁 Project Structure\n\n```\nDoze-Studio-Practise/\n├── images/                 # Animation frames (1345+ JPEG files)\n│   ├── frame_0001.jpeg\n│   ├── frame_0002.jpeg\n│   └── ... (frame_0001.jpeg to frame_1345.jpeg)\n├── index.html             # Main HTML file\n├── script.js              # Refactored JavaScript application\n└── README.md              # This documentation\n```\n\n## 🏗️ Architecture Highlights\n\n### Modular Design\n- **IIFE (Immediately Invoked Function Expression)** for encapsulation\n- **ES6+ Class-based architecture** with `DozeStudioAnimation` class\n- **Configuration-driven approach** with centralized constants\n- **Separation of concerns** with dedicated methods for each responsibility\n\n### Professional Code Quality\n- **Comprehensive error handling** with graceful fallbacks\n- **Input validation** and boundary checking\n- **Consistent naming conventions** (camelCase, descriptive names)\n- **JSDoc documentation** for all public methods\n- **Strict mode** enforcement (`'use strict'`)\n\n### Performance Optimizations\n- **Efficient image preloading** with progress tracking\n- **Canvas optimization** with proper image smoothing\n- **Event listener management** with proper binding\n- **Memory management** through proper cleanup\n\n## 🔧 Key Features\n\n### Animation System\n- **Frame progression** synchronized with scroll position\n- **Smooth transitions** between animation states\n- **Responsive canvas rendering** with proper aspect ratio handling\n- **Scroll-triggered animations** for UI elements\n\n### Canvas Management\n- **Dynamic resizing** on window resize events\n- **Image scaling** with maintain-aspect-ratio logic\n- **Centered positioning** for optimal visual presentation\n- **High-quality rendering** with image smoothing enabled\n\n### Error Handling\n- **Graceful degradation** when dependencies are missing\n- **Comprehensive logging** for debugging and monitoring\n- **Fallback behaviors** for critical failures\n- **User-friendly error messages**\n\n## 🛠️ Technical Implementation\n\n### Dependencies\n- **GSAP (GreenSock)** - Professional animation library\n- **ScrollTrigger** - Scroll-based animation triggers\n- **Locomotive Scroll** - Smooth scrolling implementation\n- **Tailwind CSS** - Utility-first CSS framework\n\n### Browser Support\n- **Modern browsers** with ES6+ support\n- **Canvas API** compatibility\n- **CSS Grid/Flexbox** support\n- **Responsive design** principles\n\n\n### Maintainability Features\n- **Configuration constants** for easy customization\n- **Modular method structure** for easy testing\n- **Clear separation** of concerns\n- **Comprehensive documentation** with JSDoc\n- **Consistent code style** and formatting\n\n### Testing \u0026 Debugging\n- **Console logging** for development debugging\n- **Error tracking** with detailed error messages\n- **Performance monitoring** capabilities\n- **State inspection** methods for debugging\n\n## 🚀 Getting Started\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/prashantkoirala465/Interactive-Hero-Canvas-Animation\n   cd Interactive-Hero-Canvas-Animation\n   ```\n\n2. **Open in browser**\n   - Serve the files through a local web server\n   - Open `index.html` in a modern browser\n   - Ensure all image files are present in the `images/` directory\n\n3. **Development setup**\n   - Use a local development server (e.g., Live Server VS Code extension)\n   - Monitor browser console for any errors\n   - Test responsive behavior across different screen sizes\n\n## 🔍 Customization\n\n### Animation Timing\nModify the `CONFIG` object in `script.js`:\n```javascript\nconst CONFIG = {\n    FRAME_MAX_INDEX: 1345,           // Total number of frames\n    ANIMATION_SCRUB_DURATION: 3,     // Animation smoothness\n    CANVAS_SCALE_FACTOR: 0.5,       // Canvas scaling values\n    // ... other configuration options\n};\n```\n\n### Animation Sequences\nCustomize the timeline in the `buildAnimationTimeline` method:\n```javascript\ntimeline\n    .to(this.frames, this.createFrameUpdate(100), TIMELINE_LABELS.FIRST)\n    .to(SELECTORS.ANIMATE1, { opacity: 0, ease: 'linear' }, TIMELINE_LABELS.FIRST)\n    // ... add more animation sequences\n```\n\n## 📖 API Reference\n\n### Public Methods\n- `loadFrame(index)` - Manually load a specific frame\n- `getCurrentFrame()` - Get current animation state\n- `resizeCanvas()` - Force canvas resize\n\n### Event Handling\n- **Window resize** - Automatic canvas resizing\n- **Scroll events** - GSAP ScrollTrigger integration\n- **Image loading** - Progress tracking and error handling\n\n## 🎯 Performance Considerations\n\n- **Image optimization** - Ensure JPEG files are properly compressed\n- **Memory management** - Large numbers of images require careful memory handling\n- **Scroll performance** - Smooth scrolling with large content areas\n- **Canvas rendering** - Optimized for 60fps performance\n\n## 🔮 Future Enhancements\n\n- **WebGL rendering** for better performance\n- **Lazy loading** for image frames\n- **Animation presets** for different use cases\n- **Performance analytics** and monitoring\n- **Accessibility improvements** for screen readers\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 👨‍💻 Author\n\n**Prashant Koirala** \n\n---\n\n*Built with modern web technologies.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashantkoirala465%2Finteractive-hero-canvas-animation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprashantkoirala465%2Finteractive-hero-canvas-animation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashantkoirala465%2Finteractive-hero-canvas-animation/lists"}