This commit is contained in:
sagiferi
2026-10-24 13:20:55 +02:00
parent 93e06d148a
commit b33d1543fc
326 changed files with 20843 additions and 3 deletions
+146
View File
@@ -0,0 +1,146 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Capture sweep</title>
<script src="./support.js"></script>
</head>
<body>
<x-dc>
<helmet>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&amp;family=IBM+Plex+Mono:wght@400;500&amp;display=swap">
<style>
body{margin:0}
a{color:#F5B544}a:hover{color:#FFD07A}
</style>
</helmet>
<div style="width: 390px; height: 844px; position: relative; overflow: hidden; background: #0A0D13; color: #E8ECF2; font-family: 'Barlow', system-ui, sans-serif">
<svg width="390" height="610" viewBox="0 0 390 610" role="img" aria-label="Camera preview with the detected sky edge and the target for the next frame" style="position: absolute; left: 0; top: 0; display: block">
<defs>
<linearGradient id="sky" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#3B5578"></stop>
<stop offset="1" stop-color="#9DB3C9"></stop>
</linearGradient>
</defs>
<rect x="0" y="0" width="390" height="610" fill="url(#sky)"></rect>
<path d="M0 610 L0 380 L36 380 L92 316 L150 380 L174 380 C178 352 186 332 195 320 C206 290 226 252 256 244 C288 236 308 262 318 292 C328 322 342 388 362 428 L390 440 L390 610 Z" fill="#07090D"></path>
<path d="M0 380 L36 380 L92 316 L150 380 L174 380 C178 352 186 332 195 320 C206 290 226 252 256 244 C288 236 308 262 318 292 C328 322 342 388 362 428 L390 440" fill="none" stroke="{{accent}}" stroke-width="2.5" stroke-linejoin="round" stroke-dasharray="1 0"></path>
<line x1="0" y1="493" x2="390" y2="493" stroke="#FFFFFF" stroke-opacity="0.3" stroke-dasharray="2 6"></line>
<text x="382" y="487" text-anchor="end" font-family="IBM Plex Mono, ui-monospace, monospace" font-size="11" fill="#FFFFFF" fill-opacity="0.75">0°</text>
<circle cx="195" cy="300" r="30" fill="none" stroke="#FFFFFF" stroke-width="2.5"></circle>
<circle cx="{{dotX}}" cy="304" r="11" fill="{{accent}}" stroke="#07090D" stroke-width="2"></circle>
<line x1="226" y1="302" x2="{{lineX}}" y2="304" stroke="#FFFFFF" stroke-opacity="0.7" stroke-width="1.5" stroke-dasharray="3 4"></line>
</svg>
<div style="position: absolute; left: 12px; right: 12px; top: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px">
<a href="Main.dc.html" aria-label="Close survey" style="width: 44px; height: 44px; border-radius: 22px; background: rgba(10,13,19,0.72); color: #E8ECF2; display: flex; align-items: center; justify-content: center">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"></path></svg>
</a>
<div style="display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgba(10,13,19,0.72); border-radius: 14px; padding: 6px 14px">
<span style="font-size: 15px; font-weight: 600">Backyard pier</span>
<span style="font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; color: #C9D2DE">frame {{frames}} of 24</span>
</div>
<button onClick="{{undo}}" aria-label="Retake last frame" style="width: 44px; height: 44px; border-radius: 22px; border: none; background: rgba(10,13,19,0.72); color: #E8ECF2; display: flex; align-items: center; justify-content: center; padding: 0">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 14L4 9l5-5"></path><path d="M4 9h10a6 6 0 0 1 0 12h-3"></path></svg>
</button>
</div>
<div style="position: absolute; left: 20px; right: 20px; top: 106px; display: flex; flex-direction: column; gap: 4px; background: rgba(10,13,19,0.72); border-radius: 12px; padding: 8px">
<svg width="334" height="40" viewBox="0 0 334 40" role="img" aria-label="Panorama progress around 360 degrees" style="display: block">
<rect x="0" y="0" width="334" height="40" rx="4" fill="#1A2130"></rect>
<rect x="0" y="0" width="{{doneW}}" height="40" rx="4" fill="#9DB3C9" fill-opacity="0.55"></rect>
<path d="{{thumb}}" fill="#07090D"></path>
<sc-for list="{{cells}}" as="c" hint-placeholder-count="24">
<line x1="{{c.x}}" y1="0" x2="{{c.x}}" y2="40" stroke="#0A0D13" stroke-opacity="0.6" stroke-width="1"></line>
</sc-for>
<rect x="{{doneW}}" y="0" width="14" height="40" fill="none" stroke="{{accent}}" stroke-width="2"></rect>
</svg>
<div style="display: flex; justify-content: space-between; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; color: #C9D2DE">
<span>N</span><span>E</span><span>S</span><span>W</span><span>N</span>
</div>
</div>
<div style="position: absolute; left: 0; right: 0; top: 196px; display: flex; justify-content: center">
<span style="background: rgba(10,13,19,0.72); border-radius: 10px; padding: 7px 12px; font-size: 14px">{{hint}}</span>
</div>
<div style="position: absolute; left: 20px; right: 20px; top: 540px; display: flex; align-items: center; gap: 10px; background: rgba(30,26,16,0.92); border: 1px solid #4A3A16; border-radius: 12px; padding: 8px 8px 8px 12px">
<span style="flex: 1; font-size: 13px; line-height: 1.3; color: #E8ECF2">Tree reaches the frame top at 125°</span>
<button style="height: 44px; padding: 0 12px; border-radius: 10px; border: none; background: #F5B544; color: #1A1204; font-family: inherit; font-size: 14px; font-weight: 700">Add higher shot</button>
</div>
<div style="position: absolute; left: 0; right: 0; top: 610px; bottom: 0; box-sizing: border-box; padding: 14px 20px 34px; background: #0A0D13; border-top: 1px solid #1A2130; display: flex; flex-direction: column; gap: 14px">
<div style="display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px">
<div style="display: flex; flex-direction: column; gap: 2px">
<span style="font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; color: #93A0B4">HEADING</span>
<span style="font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 20px; font-weight: 500">{{heading}}</span>
</div>
<div style="display: flex; flex-direction: column; gap: 2px">
<span style="font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; color: #93A0B4">TILT</span>
<span style="font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 20px; font-weight: 500; color: #6CC3E6">+9.6°</span>
</div>
<div style="display: flex; flex-direction: column; gap: 2px">
<span style="font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; color: #93A0B4">COVERS</span>
<span style="font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 15px; font-weight: 500; line-height: 26px">−22…+42°</span>
</div>
</div>
<div style="display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 8px">
<div style="display: flex">
<button onClick="{{toggleAuto}}" aria-pressed="{{auto}}" style="{{autoStyle}}">Auto {{autoTxt}}</button>
</div>
<div style="display: flex; justify-content: center">
<button onClick="{{shoot}}" aria-label="Take frame" style="width: 80px; height: 80px; border-radius: 40px; box-sizing: border-box; border: 4px solid {{accent}}; background: transparent; padding: 5px; display: flex">
<span style="flex: 1; border-radius: 34px; background: {{accent}}"></span>
</button>
</div>
<div style="display: flex; justify-content: flex-end">
<a href="Review.dc.html" style="height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid #263042; background: #121722; color: #E8ECF2; text-decoration: none; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600">
Finish
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 5l7 7-7 7"></path></svg>
</a>
</div>
</div>
</div>
</div>
</x-dc>
<script type="text/x-dc" data-dc-script data-props='{"accent":{"editor":"color","default":"#F5B544","options":["#F5B544","#6CC3E6","#F27A54"]},"$preview":{"width":390,"height":844}}'>
class Component extends DCLogic {
constructor(props) {
super(props);
this.state = { frames: 9, auto: true };
}
renderVals() {
const accent = this.props.accent ?? '#F5B544';
const W = 334, H = 40;
const prof = [[0,12],[15,14],[30,13],[45,8],[60,4],[75,3],[90,4],[105,15],[120,26],[135,22],[150,9],[165,4],[180,5],[195,9],[210,17],[225,19],[240,16],[255,10],[270,6],[285,5],[300,7],[315,10],[330,13],[345,14],[360,12]];
const n = this.state.frames;
const doneW = n / 24 * W;
const y = (alt) => (H - (alt + 22) / 64 * H).toFixed(1);
const pts = prof.filter((p) => p[0] / 360 * W <= doneW + 0.1);
const thumb = pts.length ? 'M0 ' + H + ' ' + pts.map((p) => 'L' + (p[0] / 360 * W).toFixed(1) + ' ' + y(p[1])).join(' ') + ' L' + doneW.toFixed(1) + ' ' + y(pts[pts.length - 1][1]) + ' L' + doneW.toFixed(1) + ' ' + H + ' Z' : '';
const cells = [];
for (let i = 1; i < 24; i++) cells.push({ x: (i / 24 * W).toFixed(1) });
const auto = this.state.auto;
return {
accent: accent,
frames: Math.min(24, n + 1),
doneW: Math.min(W - 14, doneW).toFixed(1),
thumb: thumb,
cells: cells,
heading: Math.round(n * 15 - 8) + '°',
dotX: 282, lineX: 271,
hint: auto ? 'Turn right until the dot is in the circle' : 'Line up the dot, then tap the shutter',
auto: auto ? 'true' : 'false',
autoTxt: auto ? 'on' : 'off',
autoStyle: 'height: 48px; padding: 0 14px; border-radius: 14px; font-family: inherit; font-size: 15px; font-weight: 600; border: 1px solid ' + (auto ? '#6CC3E6' : '#263042') + '; background: ' + (auto ? '#12303C' : '#121722') + '; color: ' + (auto ? '#6CC3E6' : '#E8ECF2'),
toggleAuto: () => this.setState({ auto: !auto }),
shoot: () => this.setState({ frames: Math.min(23, n + 1) }),
undo: () => this.setState({ frames: Math.max(0, n - 1) })
};
}
}
</script>
</body>
</html>