Update index.html
Browse files- index.html +4 -21
index.html
CHANGED
|
@@ -709,31 +709,14 @@
|
|
| 709 |
let capturedImage = null;
|
| 710 |
|
| 711 |
// Initialize the application
|
|
|
|
| 712 |
document.addEventListener('DOMContentLoaded', function() {
|
| 713 |
-
|
| 714 |
-
|
| 715 |
-
canvas = document.getElementById('nail-overlay');
|
| 716 |
-
ctx = canvas.getContext('2d');
|
| 717 |
-
|
| 718 |
-
// Set up canvas size
|
| 719 |
-
updateCanvasSize();
|
| 720 |
-
window.addEventListener('resize', updateCanvasSize);
|
| 721 |
-
|
| 722 |
-
// Initialize camera
|
| 723 |
-
initCamera();
|
| 724 |
-
|
| 725 |
-
// Set up hand tracking
|
| 726 |
-
initHandTracking();
|
| 727 |
-
|
| 728 |
-
// Set up event listeners
|
| 729 |
-
setupEventListeners();
|
| 730 |
-
|
| 731 |
-
// Close tutorial
|
| 732 |
-
document.querySelector('.tutorial-btn').addEventListener('click', function() {
|
| 733 |
document.querySelector('.tutorial-overlay').style.display = 'none';
|
| 734 |
});
|
| 735 |
});
|
| 736 |
-
|
| 737 |
// Update canvas size to match video
|
| 738 |
function updateCanvasSize() {
|
| 739 |
const container = document.querySelector('.video-container');
|
|
|
|
| 709 |
let capturedImage = null;
|
| 710 |
|
| 711 |
// Initialize the application
|
| 712 |
+
// Immediately upon page load
|
| 713 |
document.addEventListener('DOMContentLoaded', function() {
|
| 714 |
+
const tutorialBtn = document.querySelector('.tutorial-btn');
|
| 715 |
+
tutorialBtn.addEventListener('click', function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 716 |
document.querySelector('.tutorial-overlay').style.display = 'none';
|
| 717 |
});
|
| 718 |
});
|
| 719 |
+
|
| 720 |
// Update canvas size to match video
|
| 721 |
function updateCanvasSize() {
|
| 722 |
const container = document.querySelector('.video-container');
|