Spaces:
Running
Running
Deploy Deep Analog web app
Browse files- .gitattributes +47 -0
- static/index.html +159 -1
- static/lab/01_edo400.jpg +3 -0
- static/lab/01_fuji400.jpg +3 -0
- static/lab/01_gold400.jpg +3 -0
- static/lab/01_showa.jpg +3 -0
- static/lab/01_vision3.jpg +3 -0
- static/lab/02_edo400.jpg +3 -0
- static/lab/02_fuji400.jpg +3 -0
- static/lab/02_gold400.jpg +3 -0
- static/lab/02_showa.jpg +3 -0
- static/lab/02_vision3.jpg +3 -0
- static/lab/03_edo400.jpg +3 -0
- static/lab/03_fuji400.jpg +3 -0
- static/lab/03_gold400.jpg +3 -0
- static/lab/03_showa.jpg +3 -0
- static/lab/03_vision3.jpg +3 -0
- static/lab/04_edo400.jpg +3 -0
- static/lab/04_fuji400.jpg +3 -0
- static/lab/04_gold400.jpg +3 -0
- static/lab/04_showa.jpg +3 -0
- static/lab/04_vision3.jpg +3 -0
- static/lab/05_edo400.jpg +3 -0
- static/lab/05_fuji400.jpg +3 -0
- static/lab/05_gold400.jpg +3 -0
- static/lab/05_showa.jpg +3 -0
- static/lab/05_vision3.jpg +3 -0
- static/lab/06_edo400.jpg +3 -0
- static/lab/06_fuji400.jpg +3 -0
- static/lab/06_gold400.jpg +3 -0
- static/lab/06_showa.jpg +3 -0
- static/lab/06_vision3.jpg +3 -0
- static/lab/07_edo400.jpg +3 -0
- static/lab/07_fuji400.jpg +3 -0
- static/lab/07_gold400.jpg +3 -0
- static/lab/07_showa.jpg +3 -0
- static/lab/07_vision3.jpg +3 -0
- static/lab/input_01.jpg +3 -0
- static/lab/input_02.jpg +3 -0
- static/lab/input_03.jpg +3 -0
- static/lab/input_04.jpg +3 -0
- static/lab/input_05.jpg +3 -0
- static/lab/input_06.jpg +3 -0
- static/lab/input_07.jpg +3 -0
- static/lab/ref_edo400.jpg +3 -0
- static/lab/ref_fuji400.jpg +3 -0
- static/lab/ref_gold400.jpg +3 -0
- static/lab/ref_showa.jpg +3 -0
- static/lab/ref_vision3.jpg +3 -0
.gitattributes
CHANGED
|
@@ -1 +1,48 @@
|
|
| 1 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
static/lab/01_edo400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
static/lab/01_fuji400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
static/lab/01_gold400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
static/lab/01_showa.jpg filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
static/lab/01_vision3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
static/lab/02_edo400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
static/lab/02_fuji400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
static/lab/02_gold400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
static/lab/02_showa.jpg filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
static/lab/02_vision3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
static/lab/03_edo400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
static/lab/03_fuji400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
static/lab/03_gold400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
static/lab/03_showa.jpg filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
static/lab/03_vision3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
static/lab/04_edo400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
static/lab/04_fuji400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
static/lab/04_gold400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
static/lab/04_showa.jpg filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
static/lab/04_vision3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
static/lab/05_edo400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
static/lab/05_fuji400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
static/lab/05_gold400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
static/lab/05_showa.jpg filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
static/lab/05_vision3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
static/lab/06_edo400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
static/lab/06_fuji400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
static/lab/06_gold400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
static/lab/06_showa.jpg filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
static/lab/06_vision3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
static/lab/07_edo400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
static/lab/07_fuji400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
static/lab/07_gold400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
static/lab/07_showa.jpg filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
static/lab/07_vision3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
static/lab/input_01.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
static/lab/input_02.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
static/lab/input_03.jpg filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
static/lab/input_04.jpg filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
static/lab/input_05.jpg filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
static/lab/input_06.jpg filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
static/lab/input_07.jpg filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
static/lab/ref_edo400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
static/lab/ref_fuji400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
static/lab/ref_gold400.jpg filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
static/lab/ref_showa.jpg filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
static/lab/ref_vision3.jpg filter=lfs diff=lfs merge=lfs -text
|
static/index.html
CHANGED
|
@@ -296,6 +296,35 @@
|
|
| 296 |
}
|
| 297 |
.try-btn:hover { background: var(--accent); color: #17110a; }
|
| 298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
/* ---------- privacy modal ---------- */
|
| 300 |
#privacyModal {
|
| 301 |
position: fixed; inset: 0; z-index: 950;
|
|
@@ -402,9 +431,11 @@
|
|
| 402 |
<div class="demo-step"><b>1</b> Pick a reference — any film look you love</div>
|
| 403 |
<img id="demoRefImg" alt="Reference film still">
|
| 404 |
<div class="demo-note">Still from <i>Happy Together</i> (1997), dir. Wong Kar-wai — shown for demonstration.</div>
|
|
|
|
|
|
|
| 405 |
</div>
|
| 406 |
<div>
|
| 407 |
-
<div class="demo-step"><b>
|
| 408 |
<div class="compare" id="demoCompare">
|
| 409 |
<img class="base-img" id="demoResultImg" alt="Rendered result">
|
| 410 |
<img class="top-img" id="demoTargetImg" alt="Original photo">
|
|
@@ -421,6 +452,28 @@
|
|
| 421 |
</div>
|
| 422 |
</section>
|
| 423 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
<footer>
|
| 425 |
Deep Analog — open-set film emulation · research preview.<br>
|
| 426 |
Your images are processed in memory and never stored. <a class="privacy-link" id="privacyOpen2">How privacy works here</a>.
|
|
@@ -1165,6 +1218,7 @@
|
|
| 1165 |
const probe = new Image();
|
| 1166 |
probe.onload = () => {
|
| 1167 |
$('demoRefImg').src = paths.ref;
|
|
|
|
| 1168 |
$('demoTargetImg').src = paths.target;
|
| 1169 |
$('demoResultImg').src = paths.result;
|
| 1170 |
$('demoSection').style.display = 'block';
|
|
@@ -1191,6 +1245,110 @@
|
|
| 1191 |
probe.src = paths.ref;
|
| 1192 |
})();
|
| 1193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1194 |
// ------------------------------------------------ privacy modal
|
| 1195 |
['privacyOpen', 'privacyOpen2'].forEach(id => {
|
| 1196 |
const el = $(id);
|
|
|
|
| 296 |
}
|
| 297 |
.try-btn:hover { background: var(--accent); color: #17110a; }
|
| 298 |
|
| 299 |
+
/* ---------- film lab ---------- */
|
| 300 |
+
.lab-films { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
|
| 301 |
+
@media (max-width: 820px) { .lab-films { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
|
| 302 |
+
.film-card {
|
| 303 |
+
background: var(--bg-3); border: 1.5px solid var(--line); border-radius: 11px;
|
| 304 |
+
overflow: hidden; cursor: pointer; transition: border-color .15s, transform .1s;
|
| 305 |
+
}
|
| 306 |
+
.film-card:hover { transform: translateY(-2px); }
|
| 307 |
+
.film-card.sel { border-color: var(--accent); }
|
| 308 |
+
.film-card .thumb { width: 100%; height: 76px; object-fit: cover; display: block; }
|
| 309 |
+
.film-card .meta { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
|
| 310 |
+
.film-card .canister { flex: 0 0 auto; }
|
| 311 |
+
.film-card a.stock {
|
| 312 |
+
font-size: 11.5px; font-weight: 600; line-height: 1.35; color: var(--text);
|
| 313 |
+
text-decoration: none; border-bottom: 1px dotted var(--text-dim);
|
| 314 |
+
}
|
| 315 |
+
.film-card a.stock:hover { color: var(--accent); border-color: var(--accent); }
|
| 316 |
+
.film-card a.stock .ext { color: var(--text-dim); font-size: 10px; }
|
| 317 |
+
.lab-inputs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
|
| 318 |
+
.lab-inputs img {
|
| 319 |
+
width: 86px; height: 58px; object-fit: cover; border-radius: 7px;
|
| 320 |
+
border: 1.5px solid var(--line); cursor: pointer; opacity: .75;
|
| 321 |
+
transition: opacity .15s, border-color .15s;
|
| 322 |
+
}
|
| 323 |
+
.lab-inputs img:hover { opacity: 1; }
|
| 324 |
+
.lab-inputs img.sel { border-color: var(--accent); opacity: 1; }
|
| 325 |
+
.lab-caption { font-size: 12px; color: var(--text-dim); margin: 0 0 10px; }
|
| 326 |
+
.lab-caption b { color: var(--accent); font-weight: 600; }
|
| 327 |
+
|
| 328 |
/* ---------- privacy modal ---------- */
|
| 329 |
#privacyModal {
|
| 330 |
position: fixed; inset: 0; z-index: 950;
|
|
|
|
| 431 |
<div class="demo-step"><b>1</b> Pick a reference — any film look you love</div>
|
| 432 |
<img id="demoRefImg" alt="Reference film still">
|
| 433 |
<div class="demo-note">Still from <i>Happy Together</i> (1997), dir. Wong Kar-wai — shown for demonstration.</div>
|
| 434 |
+
<div class="demo-step" style="margin-top:18px"><b>2</b> Add your own photo — the input</div>
|
| 435 |
+
<img id="demoInputImg" alt="Input photo" style="width:100%;border-radius:8px;display:block">
|
| 436 |
</div>
|
| 437 |
<div>
|
| 438 |
+
<div class="demo-step"><b>3</b> Get it rendered in that look. Drag the divider to compare.</div>
|
| 439 |
<div class="compare" id="demoCompare">
|
| 440 |
<img class="base-img" id="demoResultImg" alt="Rendered result">
|
| 441 |
<img class="top-img" id="demoTargetImg" alt="Original photo">
|
|
|
|
| 452 |
</div>
|
| 453 |
</section>
|
| 454 |
|
| 455 |
+
<section class="demo" id="labSection" style="display:none">
|
| 456 |
+
<h2>Film lab — explore the looks</h2>
|
| 457 |
+
<div class="demo-card">
|
| 458 |
+
<div class="demo-step" style="margin-bottom:12px">Pick a film stock — click its name for the full story of that emulsion</div>
|
| 459 |
+
<div class="lab-films" id="labFilms"></div>
|
| 460 |
+
<div class="demo-step" style="margin-bottom:10px">Pick a photo</div>
|
| 461 |
+
<div class="lab-inputs" id="labInputs"></div>
|
| 462 |
+
<p class="lab-caption" id="labCaption"></p>
|
| 463 |
+
<div class="compare" id="labCompare">
|
| 464 |
+
<img class="base-img" alt="Rendered">
|
| 465 |
+
<img class="top-img" alt="Original">
|
| 466 |
+
<div class="divider"></div>
|
| 467 |
+
<span class="cmp-label" style="left:12px">RENDERED</span>
|
| 468 |
+
<span class="cmp-label" style="right:12px">ORIGINAL</span>
|
| 469 |
+
</div>
|
| 470 |
+
<div class="demo-actions">
|
| 471 |
+
<button class="try-btn" id="tryLabBtn">Open this pair in the app →</button>
|
| 472 |
+
<span style="font-size:12px;color:var(--text-dim)">predicts the LUT live from this reference</span>
|
| 473 |
+
</div>
|
| 474 |
+
</div>
|
| 475 |
+
</section>
|
| 476 |
+
|
| 477 |
<footer>
|
| 478 |
Deep Analog — open-set film emulation · research preview.<br>
|
| 479 |
Your images are processed in memory and never stored. <a class="privacy-link" id="privacyOpen2">How privacy works here</a>.
|
|
|
|
| 1218 |
const probe = new Image();
|
| 1219 |
probe.onload = () => {
|
| 1220 |
$('demoRefImg').src = paths.ref;
|
| 1221 |
+
$('demoInputImg').src = paths.target;
|
| 1222 |
$('demoTargetImg').src = paths.target;
|
| 1223 |
$('demoResultImg').src = paths.result;
|
| 1224 |
$('demoSection').style.display = 'block';
|
|
|
|
| 1245 |
probe.src = paths.ref;
|
| 1246 |
})();
|
| 1247 |
|
| 1248 |
+
// ------------------------------------------------ film lab
|
| 1249 |
+
// Interactive gallery over the pre-rendered experiment set
|
| 1250 |
+
// (static/lab/*). Each stock links to a full introduction page.
|
| 1251 |
+
(function initLab() {
|
| 1252 |
+
const FILMS = [
|
| 1253 |
+
{ id: 'vision3', name: 'Kodak Vision3 250D 5207', short: '250D',
|
| 1254 |
+
label: '#E8B23A', text: '#181205',
|
| 1255 |
+
url: 'https://www.kodak.com/en/motion/product/camera-films/250d-5207-7207/' },
|
| 1256 |
+
{ id: 'gold400', name: 'Kodak Gold 400', short: 'GOLD 400',
|
| 1257 |
+
label: '#F2C230', text: '#181205',
|
| 1258 |
+
url: 'https://en.wikipedia.org/wiki/Kodak_Gold' },
|
| 1259 |
+
{ id: 'fuji400', name: 'Fujifilm 400', short: 'FUJI 400',
|
| 1260 |
+
label: '#1A9E60', text: '#04160c',
|
| 1261 |
+
url: 'https://www.fujifilm.com/us/en/consumer/films/consumer-film/fujifilm-400' },
|
| 1262 |
+
{ id: 'edo400', name: 'Escura Edo Ukiyo-e 400', short: 'EDO 400',
|
| 1263 |
+
label: '#2C3D5C', text: '#dfe6f2',
|
| 1264 |
+
url: 'https://www.pandacamera.com/products/escura-%E6%B1%9F%E6%88%B6-%E6%B5%AE%E4%B8%96%E7%B9%AA-edo-ukiyo-e-400-iso-24exp-135-35mm-color-negative-film' },
|
| 1265 |
+
{ id: 'showa', name: 'Escura Showa 400', short: 'SHOWA',
|
| 1266 |
+
label: '#A8503A', text: '#f7e8e2',
|
| 1267 |
+
url: 'https://www.pandacamera.com/products/escura-showa-400-iso-30exp-135-35mm-color-negative-film' },
|
| 1268 |
+
];
|
| 1269 |
+
const INPUTS = [
|
| 1270 |
+
['01', 'Tokyo alley'], ['02', 'Bicycle corridor'], ['03', 'Asakusa & Skytree'],
|
| 1271 |
+
['04', 'Rainy night, NYC'], ['05', 'Window still life'], ['06', 'Portrait at the bar'],
|
| 1272 |
+
['07', 'Pond reflection'],
|
| 1273 |
+
];
|
| 1274 |
+
let film = FILMS[0], input = INPUTS[0];
|
| 1275 |
+
|
| 1276 |
+
function canisterSvg(f) {
|
| 1277 |
+
return '<svg class="canister" width="34" height="46" viewBox="0 0 34 46" aria-hidden="true">' +
|
| 1278 |
+
'<rect x="11" y="1" width="12" height="5" rx="1.5" fill="#4a4a52"/>' +
|
| 1279 |
+
'<rect x="8" y="5" width="18" height="3" rx="1" fill="#333338"/>' +
|
| 1280 |
+
'<rect x="3" y="8" width="28" height="36" rx="4" fill="#232328"/>' +
|
| 1281 |
+
'<rect x="3" y="14" width="28" height="22" fill="' + f.label + '"/>' +
|
| 1282 |
+
'<text x="17" y="27" text-anchor="middle" font-size="6.5" font-weight="700" ' +
|
| 1283 |
+
'font-family="ui-monospace,Menlo,monospace" fill="' + f.text + '">' + f.short + '</text>' +
|
| 1284 |
+
'<text x="17" y="33.5" text-anchor="middle" font-size="4.6" ' +
|
| 1285 |
+
'font-family="ui-monospace,Menlo,monospace" fill="' + f.text + '" opacity="0.75">35mm · C-41</text>' +
|
| 1286 |
+
'<rect x="3" y="40" width="28" height="4" rx="2" fill="#333338"/></svg>';
|
| 1287 |
+
}
|
| 1288 |
+
|
| 1289 |
+
function refresh(resetDivider) {
|
| 1290 |
+
document.querySelectorAll('#labFilms .film-card').forEach((el, i) =>
|
| 1291 |
+
el.classList.toggle('sel', FILMS[i] === film));
|
| 1292 |
+
document.querySelectorAll('#labInputs img').forEach((el, i) =>
|
| 1293 |
+
el.classList.toggle('sel', INPUTS[i] === input));
|
| 1294 |
+
const cmp = $('labCompare');
|
| 1295 |
+
cmp.querySelector('.base-img').src = 'static/lab/' + input[0] + '_' + film.id + '.jpg';
|
| 1296 |
+
cmp.querySelector('.top-img').src = 'static/lab/input_' + input[0] + '.jpg';
|
| 1297 |
+
$('labCaption').innerHTML = '<b>' + input[1] + '</b> rendered as <b>' + film.name + '</b>';
|
| 1298 |
+
}
|
| 1299 |
+
|
| 1300 |
+
function build() {
|
| 1301 |
+
const filmsBox = $('labFilms');
|
| 1302 |
+
FILMS.forEach(f => {
|
| 1303 |
+
const card = document.createElement('div');
|
| 1304 |
+
card.className = 'film-card';
|
| 1305 |
+
card.innerHTML =
|
| 1306 |
+
'<img class="thumb" alt="" src="static/lab/ref_' + f.id + '.jpg">' +
|
| 1307 |
+
'<div class="meta">' + canisterSvg(f) +
|
| 1308 |
+
'<a class="stock" target="_blank" rel="noopener">' + f.name +
|
| 1309 |
+
' <span class="ext">↗</span></a></div>';
|
| 1310 |
+
const a = card.querySelector('a.stock');
|
| 1311 |
+
a.href = f.url;
|
| 1312 |
+
a.title = 'About ' + f.name;
|
| 1313 |
+
a.addEventListener('click', e => e.stopPropagation());
|
| 1314 |
+
card.addEventListener('click', () => { film = f; refresh(); });
|
| 1315 |
+
filmsBox.appendChild(card);
|
| 1316 |
+
});
|
| 1317 |
+
const inputsBox = $('labInputs');
|
| 1318 |
+
INPUTS.forEach(inp => {
|
| 1319 |
+
const im = document.createElement('img');
|
| 1320 |
+
im.src = 'static/lab/input_' + inp[0] + '.jpg';
|
| 1321 |
+
im.alt = inp[1]; im.title = inp[1];
|
| 1322 |
+
im.addEventListener('click', () => { input = inp; refresh(); });
|
| 1323 |
+
inputsBox.appendChild(im);
|
| 1324 |
+
});
|
| 1325 |
+
initCompare($('labCompare'));
|
| 1326 |
+
refresh();
|
| 1327 |
+
|
| 1328 |
+
$('tryLabBtn').addEventListener('click', async () => {
|
| 1329 |
+
try {
|
| 1330 |
+
$('tryLabBtn').textContent = 'Loading…';
|
| 1331 |
+
const [rb, tb] = await Promise.all([
|
| 1332 |
+
fetch('static/lab/ref_' + film.id + '.jpg').then(r => r.blob()),
|
| 1333 |
+
fetch('static/lab/input_' + input[0] + '.jpg').then(r => r.blob()),
|
| 1334 |
+
]);
|
| 1335 |
+
refFile = new File([rb], film.id + '-reference.jpg', { type: 'image/jpeg' });
|
| 1336 |
+
tgtFile = new File([tb], 'photo.jpg', { type: 'image/jpeg' });
|
| 1337 |
+
fillZone('refZone', refFile, () => { refFile = null; clearZone('refZone'); update(); });
|
| 1338 |
+
fillZone('tgtZone', tgtFile, () => { tgtFile = null; clearZone('tgtZone'); update(); });
|
| 1339 |
+
update();
|
| 1340 |
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
| 1341 |
+
} finally {
|
| 1342 |
+
$('tryLabBtn').textContent = 'Open this pair in the app →';
|
| 1343 |
+
}
|
| 1344 |
+
});
|
| 1345 |
+
}
|
| 1346 |
+
|
| 1347 |
+
const probe = new Image();
|
| 1348 |
+
probe.onload = () => { $('labSection').style.display = 'block'; build(); };
|
| 1349 |
+
probe.src = 'static/lab/ref_vision3.jpg';
|
| 1350 |
+
})();
|
| 1351 |
+
|
| 1352 |
// ------------------------------------------------ privacy modal
|
| 1353 |
['privacyOpen', 'privacyOpen2'].forEach(id => {
|
| 1354 |
const el = $(id);
|
static/lab/01_edo400.jpg
ADDED
|
Git LFS Details
|
static/lab/01_fuji400.jpg
ADDED
|
Git LFS Details
|
static/lab/01_gold400.jpg
ADDED
|
Git LFS Details
|
static/lab/01_showa.jpg
ADDED
|
Git LFS Details
|
static/lab/01_vision3.jpg
ADDED
|
Git LFS Details
|
static/lab/02_edo400.jpg
ADDED
|
Git LFS Details
|
static/lab/02_fuji400.jpg
ADDED
|
Git LFS Details
|
static/lab/02_gold400.jpg
ADDED
|
Git LFS Details
|
static/lab/02_showa.jpg
ADDED
|
Git LFS Details
|
static/lab/02_vision3.jpg
ADDED
|
Git LFS Details
|
static/lab/03_edo400.jpg
ADDED
|
Git LFS Details
|
static/lab/03_fuji400.jpg
ADDED
|
Git LFS Details
|
static/lab/03_gold400.jpg
ADDED
|
Git LFS Details
|
static/lab/03_showa.jpg
ADDED
|
Git LFS Details
|
static/lab/03_vision3.jpg
ADDED
|
Git LFS Details
|
static/lab/04_edo400.jpg
ADDED
|
Git LFS Details
|
static/lab/04_fuji400.jpg
ADDED
|
Git LFS Details
|
static/lab/04_gold400.jpg
ADDED
|
Git LFS Details
|
static/lab/04_showa.jpg
ADDED
|
Git LFS Details
|
static/lab/04_vision3.jpg
ADDED
|
Git LFS Details
|
static/lab/05_edo400.jpg
ADDED
|
Git LFS Details
|
static/lab/05_fuji400.jpg
ADDED
|
Git LFS Details
|
static/lab/05_gold400.jpg
ADDED
|
Git LFS Details
|
static/lab/05_showa.jpg
ADDED
|
Git LFS Details
|
static/lab/05_vision3.jpg
ADDED
|
Git LFS Details
|
static/lab/06_edo400.jpg
ADDED
|
Git LFS Details
|
static/lab/06_fuji400.jpg
ADDED
|
Git LFS Details
|
static/lab/06_gold400.jpg
ADDED
|
Git LFS Details
|
static/lab/06_showa.jpg
ADDED
|
Git LFS Details
|
static/lab/06_vision3.jpg
ADDED
|
Git LFS Details
|
static/lab/07_edo400.jpg
ADDED
|
Git LFS Details
|
static/lab/07_fuji400.jpg
ADDED
|
Git LFS Details
|
static/lab/07_gold400.jpg
ADDED
|
Git LFS Details
|
static/lab/07_showa.jpg
ADDED
|
Git LFS Details
|
static/lab/07_vision3.jpg
ADDED
|
Git LFS Details
|
static/lab/input_01.jpg
ADDED
|
Git LFS Details
|
static/lab/input_02.jpg
ADDED
|
Git LFS Details
|
static/lab/input_03.jpg
ADDED
|
Git LFS Details
|
static/lab/input_04.jpg
ADDED
|
Git LFS Details
|
static/lab/input_05.jpg
ADDED
|
Git LFS Details
|
static/lab/input_06.jpg
ADDED
|
Git LFS Details
|
static/lab/input_07.jpg
ADDED
|
Git LFS Details
|
static/lab/ref_edo400.jpg
ADDED
|
Git LFS Details
|
static/lab/ref_fuji400.jpg
ADDED
|
Git LFS Details
|
static/lab/ref_gold400.jpg
ADDED
|
Git LFS Details
|
static/lab/ref_showa.jpg
ADDED
|
Git LFS Details
|
static/lab/ref_vision3.jpg
ADDED
|
Git LFS Details
|