Spaces:
Sleeping
Sleeping
Ship gallery assets as LFS tar (fix broken images)
Browse files- static/index.html +36 -56
static/index.html
CHANGED
|
@@ -277,46 +277,39 @@
|
|
| 277 |
}
|
| 278 |
.look-card.film .ov .can-btn2:hover { transform: scale(1.15); }
|
| 279 |
|
| 280 |
-
/*
|
| 281 |
-
#processBtn
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
#
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
}
|
| 299 |
-
#
|
| 300 |
-
|
| 301 |
-
#
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
58% { transform: scaleY(1); }
|
| 307 |
-
100% { transform: scaleY(0); }
|
| 308 |
-
}
|
| 309 |
-
@keyframes sflash {
|
| 310 |
-
0%, 26% { opacity: 0; }
|
| 311 |
-
40% { opacity: .85; }
|
| 312 |
-
62% { opacity: .12; }
|
| 313 |
-
100% { opacity: 0; }
|
| 314 |
-
}
|
| 315 |
-
@keyframes sring {
|
| 316 |
-
0%, 30% { opacity: 0; transform: scale(.4); }
|
| 317 |
-
45% { opacity: 1; }
|
| 318 |
-
100% { opacity: 0; transform: scale(1.6); }
|
| 319 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
|
| 321 |
/* extracted parameters panel (anatomy, under the 3D LUT) */
|
| 322 |
.param-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
|
|
@@ -819,7 +812,7 @@
|
|
| 819 |
</div>
|
| 820 |
|
| 821 |
<div class="action">
|
| 822 |
-
<button id="processBtn" disabled>Extract the look</button>
|
| 823 |
<div class="status" id="status"><div class="filmloader" aria-hidden="true"><span></span><span></span><span></span><span></span><span></span></div><span id="statusText"></span></div>
|
| 824 |
</div>
|
| 825 |
|
|
@@ -1075,7 +1068,7 @@
|
|
| 1075 |
function update() {
|
| 1076 |
$('processBtn').disabled = !refFile;
|
| 1077 |
$('controls').classList.toggle('visible', !!tgtFile);
|
| 1078 |
-
$('
|
| 1079 |
}
|
| 1080 |
|
| 1081 |
// ------------------------------------------------ sliders
|
|
@@ -1088,25 +1081,12 @@
|
|
| 1088 |
});
|
| 1089 |
|
| 1090 |
// ------------------------------------------------ process
|
| 1091 |
-
const shutterFx = document.createElement('div');
|
| 1092 |
-
shutterFx.id = 'shutterFx';
|
| 1093 |
-
shutterFx.setAttribute('aria-hidden', 'true');
|
| 1094 |
-
shutterFx.innerHTML =
|
| 1095 |
-
'<div class="sc t"></div><div class="sc b"></div>' +
|
| 1096 |
-
'<div class="sflash"></div><div class="sring"></div>';
|
| 1097 |
-
document.body.appendChild(shutterFx);
|
| 1098 |
-
|
| 1099 |
function shutterSnap() {
|
| 1100 |
const btn = $('processBtn');
|
| 1101 |
btn.classList.remove('snap');
|
| 1102 |
-
|
| 1103 |
-
void shutterFx.offsetWidth;
|
| 1104 |
btn.classList.add('snap');
|
| 1105 |
-
|
| 1106 |
-
setTimeout(() => {
|
| 1107 |
-
btn.classList.remove('snap');
|
| 1108 |
-
shutterFx.classList.remove('go');
|
| 1109 |
-
}, 700);
|
| 1110 |
}
|
| 1111 |
|
| 1112 |
$('processBtn').addEventListener('click', () => {
|
|
|
|
| 277 |
}
|
| 278 |
.look-card.film .ov .can-btn2:hover { transform: scale(1.15); }
|
| 279 |
|
| 280 |
+
/* process button: hover = shine sweep + aperture turn; click = shutter snap */
|
| 281 |
+
#processBtn {
|
| 282 |
+
display: inline-flex; align-items: center; gap: 10px;
|
| 283 |
+
position: relative; overflow: hidden;
|
| 284 |
+
}
|
| 285 |
+
#processBtn .ap {
|
| 286 |
+
flex: 0 0 auto;
|
| 287 |
+
transition: transform .55s cubic-bezier(.3,1.5,.4,1);
|
| 288 |
+
}
|
| 289 |
+
#processBtn:hover:not(:disabled) .ap { transform: rotate(120deg); }
|
| 290 |
+
#processBtn::before {
|
| 291 |
+
content: ""; position: absolute; top: -4px; bottom: -4px;
|
| 292 |
+
width: 42%; left: -60%;
|
| 293 |
+
background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent);
|
| 294 |
+
transform: skewX(-18deg);
|
| 295 |
+
pointer-events: none;
|
| 296 |
+
}
|
| 297 |
+
#processBtn:hover:not(:disabled)::before { animation: shine .75s ease; }
|
| 298 |
+
@keyframes shine { to { left: 135%; } }
|
| 299 |
+
#processBtn.snap { animation: pressScale .45s cubic-bezier(.2,.7,.2,1); }
|
| 300 |
+
@keyframes pressScale { 0% { transform: scale(1); } 30% { transform: scale(.93); } 100% { transform: scale(1); } }
|
| 301 |
+
#processBtn.snap .ap { animation: apSpin .5s cubic-bezier(.55,0,.3,1); }
|
| 302 |
+
@keyframes apSpin {
|
| 303 |
+
0% { transform: rotate(0) scale(1); }
|
| 304 |
+
45% { transform: rotate(180deg) scale(.45); }
|
| 305 |
+
100% { transform: rotate(360deg) scale(1); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 306 |
}
|
| 307 |
+
#processBtn.snap::after {
|
| 308 |
+
content: ""; position: absolute; inset: 0;
|
| 309 |
+
background: #fff; opacity: 0; pointer-events: none;
|
| 310 |
+
animation: btnflash .45s ease-out;
|
| 311 |
+
}
|
| 312 |
+
@keyframes btnflash { 0% { opacity: 0; } 28% { opacity: .8; } 100% { opacity: 0; } }
|
| 313 |
|
| 314 |
/* extracted parameters panel (anatomy, under the 3D LUT) */
|
| 315 |
.param-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
|
|
|
|
| 812 |
</div>
|
| 813 |
|
| 814 |
<div class="action">
|
| 815 |
+
<button id="processBtn" disabled><svg class="ap" width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="m14.31 8 5.74 9.94M9.69 8h11.48M7.38 12l5.74-9.94M9.69 16 3.95 6.06M14.31 16H2.83m13.79-4-5.74 9.94"/></svg><span id="processLabel">Extract the look</span></button>
|
| 816 |
<div class="status" id="status"><div class="filmloader" aria-hidden="true"><span></span><span></span><span></span><span></span><span></span></div><span id="statusText"></span></div>
|
| 817 |
</div>
|
| 818 |
|
|
|
|
| 1068 |
function update() {
|
| 1069 |
$('processBtn').disabled = !refFile;
|
| 1070 |
$('controls').classList.toggle('visible', !!tgtFile);
|
| 1071 |
+
$('processLabel').textContent = tgtFile ? 'Render my photo' : 'Extract the look';
|
| 1072 |
}
|
| 1073 |
|
| 1074 |
// ------------------------------------------------ sliders
|
|
|
|
| 1081 |
});
|
| 1082 |
|
| 1083 |
// ------------------------------------------------ process
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1084 |
function shutterSnap() {
|
| 1085 |
const btn = $('processBtn');
|
| 1086 |
btn.classList.remove('snap');
|
| 1087 |
+
void btn.offsetWidth;
|
|
|
|
| 1088 |
btn.classList.add('snap');
|
| 1089 |
+
setTimeout(() => btn.classList.remove('snap'), 520);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1090 |
}
|
| 1091 |
|
| 1092 |
$('processBtn').addEventListener('click', () => {
|