-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (73 loc) · 2.98 KB
/
index.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta tags for character set and viewport settings -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Link to Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<!-- Page title -->
<title>Shades Skin Tone Detection</title>
<!-- Import map for module imports -->
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.160.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/",
"mindar-face-three": "https://cdn.jsdelivr.net/npm/mind-ar@1.2.5/dist/mindar-face-three.prod.js",
"@tweenjs/tween.js": "https://cdnjs.cloudflare.com/ajax/libs/tween.js/18.6.4/tween.umd.js"
}
}
</script>
<!-- Main JavaScript file -->
<script type="module" src="./js/main.js"></script>
<!-- Main CSS file -->
<link rel="stylesheet" href="./css/styles.css">
<!-- Google Fonts for Roboto -->
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<!-- Remove any existing Firebase script tags and add this instead -->
<script type="module" src="js/firebase.js"></script>
</head>
<body>
<!-- Container for AR content -->
<div id="container" style="width: 100%; height: 100%;"></div>
<!-- Hidden video element for webcam feed -->
<video id="webcam" autoplay playsinline style="display: none;"></video>
<!-- Hidden image element for captured image -->
<img id="captured-image" style="display:none; position: absolute; top: 10px; left: 10px; border: 2px solid black;" />
<!-- Button to send data to AI -->
<button id="send-to-ai" class="button">Send to AI</button>
<!-- Button row for additional actions -->
<div class="button-row">
<!-- Button to get average colors -->
<button id="get-average-colors" class="button">Get Average Colors</button>
<!-- Div to display average color -->
<div id="average-color-circle"></div>
</div>
<!-- Loading animation -->
<div id="loading-animation" class="loading-hidden">
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
</div>
<!-- Add this new div for the tone circles -->
<div id="tone-circles"></div>
<!-- Replace the existing mode-dropdown div with this -->
<div class="mode-dropdown">
<button id="mode-button" class="mode-button">
<span class="mode-button-text">Mode</span>
</button>
<div class="mode-dropdown-content">
<a href="#" class="mode-option" data-mode="wedge">
<div class="mode-option-circle"></div>
<span class="mode-option-text">Wedge</span>
</a>
<a href="#" class="mode-option" data-mode="dots">
<div class="mode-option-circle"></div>
<span class="mode-option-text">Dots</span>
</a>
</div>
</div>
</body>
</html>