Files
makeCAD/pelican-bicycle.html
T
likang 678058c940
CI / Select checks (push) Has been cancelled
CI / Format and repository checks (push) Has been cancelled
CI / Compile RISC-V (manual) (push) Has been cancelled
Docker / image (push) Has been cancelled
Generated files / Regenerate and commit (push) Has been cancelled
Kernel rig / Select the rig areas (push) Has been cancelled
Lists / Design format changes merge cleanly (push) Has been cancelled
Lists / Lists are sorted one item per line (push) Has been cancelled
Packaging lint / lint (push) Has been cancelled
Pages / build (push) Has been cancelled
CI / Dependency advisories (push) Has been cancelled
CI / Quick compile (push) Has been cancelled
CI / Native Linux Clippy (push) Has been cancelled
CI / Build tests (push) Has been cancelled
CI / Native Linux tests (push) Has been cancelled
CI / GPU path tests (1/4) (push) Has been cancelled
CI / GPU path tests (2/4) (push) Has been cancelled
CI / GPU path tests (3/4) (push) Has been cancelled
CI / GPU path tests (4/4) (push) Has been cancelled
CI / Action matrix (1/16) (push) Has been cancelled
CI / Action matrix (10/16) (push) Has been cancelled
CI / Action matrix (11/16) (push) Has been cancelled
CI / Action matrix (12/16) (push) Has been cancelled
CI / Action matrix (13/16) (push) Has been cancelled
CI / Action matrix (14/16) (push) Has been cancelled
CI / Action matrix (15/16) (push) Has been cancelled
CI / Action matrix (16/16) (push) Has been cancelled
CI / Action matrix (2/16) (push) Has been cancelled
CI / Action matrix (3/16) (push) Has been cancelled
CI / Action matrix (4/16) (push) Has been cancelled
CI / Action matrix (5/16) (push) Has been cancelled
CI / Action matrix (6/16) (push) Has been cancelled
CI / Action matrix (7/16) (push) Has been cancelled
CI / Action matrix (8/16) (push) Has been cancelled
CI / Action matrix (9/16) (push) Has been cancelled
CI / Action matrix determinism (push) Has been cancelled
CI / Property tests (many cases) (push) Has been cancelled
CI / Doc tests (push) Has been cancelled
CI / Reference tests (push) Has been cancelled
CI / Windows D3D12 FXC shaders (push) Has been cancelled
CI / Windows app startup (push) Has been cancelled
CI / ci (push) Has been cancelled
CI / Compile WebAssembly (push) Has been cancelled
CI / Nightly alert (push) Has been cancelled
Kernel rig / Build the CLI (push) Has been cancelled
Kernel rig / Kernel rig (${{ matrix.shard }}) (push) Has been cancelled
Kernel rig / kernel-rig (push) Has been cancelled
Pages / deploy (push) Has been cancelled
优化skill
2026-11-16 11:32:34 +08:00

434 lines
28 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#f8f6ef">
<meta name="description" content="An original SVG animation of a very relaxed pelican riding a bicycle along the coast.">
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='9' fill='%23f8f6ef'/%3E%3Ccircle cx='16' cy='16' r='8' fill='%23bb4f32'/%3E%3C/svg%3E">
<title>The coastal ride — A little motion</title>
<style>
:root {
color-scheme: light;
--paper: #f8f6ef;
--ink: #293e3c;
--muted: #63706a;
--line: #dcded3;
--orange: #bb4f32;
--sky: #e3eee7;
--sea: #a4c4bb;
--sea-light: #bfd5ca;
--sand: #eee4ca;
--road: #e4d7b8;
--sun: #e9b66d;
--bike: #cf674c;
--white: #fcfaf0;
--feather: #d4ddd3;
--bill: #edb45b;
--pouch: #e9a17b;
}
* { box-sizing: border-box; }
body {
margin: 0;
min-width: 280px;
background: var(--paper);
color: var(--ink);
font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
-webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; touch-action: manipulation; }
button:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; }
.page { width: min(1192px, calc(100% - 96px)); margin: 0 auto; }
.masthead {
display: flex; justify-content: space-between; align-items: center;
padding: 30px 0 24px; border-bottom: 1px solid var(--line); gap: 24px;
}
.wordmark { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 650; letter-spacing: -.5px; }
.brand-mark { width: 24px; height: 24px; color: var(--orange); }
.edition { font-size: 11px; letter-spacing: 1.9px; text-transform: uppercase; color: var(--muted); }
.intro { text-align: center; padding: 42px 0 31px; }
.eyebrow { margin: 0 0 13px; font-size: 10px; letter-spacing: 2.7px; font-weight: 600; color: var(--muted); }
h1 { margin: 0; font: 400 clamp(35px, 4.1vw, 57px)/1.14 Georgia, "Times New Roman", serif; letter-spacing: -2px; text-wrap: balance; }
h1 em { font-weight: 400; color: var(--orange); }
.subtitle { margin: 14px 0 0; font-size: 14px; color: var(--muted); letter-spacing: .1px; }
.scene {
position: relative; overflow: hidden; margin: 0;
border: 1px solid #ced9cc; border-radius: 18px; background: var(--sky);
}
.scene > svg { display: block; width: 100%; aspect-ratio: 2 / 1; }
.scene-label {
position: absolute; z-index: 1; top: 25px; left: 29px;
display: flex; align-items: center; gap: 9px;
font-size: 10px; letter-spacing: 1.8px; font-weight: 600;
}
.scene-label span { width: 5px; height: 5px; background: var(--ink); border-radius: 50%; }
.weather { left: auto; right: 29px; color: #50675d; font-weight: 400; letter-spacing: 1px; }
.scene-note { position: absolute; right: 28px; bottom: 22px; font: italic 15px Georgia, serif; color: #57604d; }
.console {
display: flex; align-items: center; justify-content: space-between;
padding: 21px 0; gap: 20px; border-bottom: 1px solid var(--line);
}
.caption { display: flex; gap: 16px; align-items: center; }
.number { font: 400 29px Georgia, serif; color: #7c8a7f; }
.caption-title { font-size: 13px; font-weight: 600; }
.status { margin-top: 5px; font-size: 11px; color: var(--muted); }
.status::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: #578067; vertical-align: 1px; }
[data-paused="true"] .status::before { background: #ad794c; }
.controls { display: flex; align-items: center; gap: 24px; }
.play-button {
display: flex; align-items: center; justify-content: center; gap: 9px;
min-width: 131px; min-height: 44px; padding: 10px 18px;
background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
border-radius: 99px; font-size: 12px; font-weight: 500; cursor: pointer;
transition: background .18s, transform .18s;
}
.play-button:hover { background: #415b53; }
.play-button:active { transform: scale(.97); }
.play-button svg { width: 14px; height: 14px; }
.play-icon { display: none; }
[data-paused="true"] .play-icon { display: block; }
[data-paused="true"] .pause-icon { display: none; }
.speed-control { display: flex; gap: 3px; align-items: center; }
.speed-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); margin-right: 10px; }
.speed-control button {
min-width: 44px; min-height: 44px; padding: 8px; cursor: pointer;
border-radius: 50%; border: 1px solid transparent; background: transparent;
font-size: 11px; transition: background .18s, border-color .18s;
}
.speed-control button:hover { background: #e9ecdf; }
.speed-control button[aria-pressed="true"] { border-color: #bec9b9; background: #e9ecdf; font-weight: 600; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 19px 0 26px; font-size: 10px; color: var(--muted); letter-spacing: .35px; }
kbd { font: inherit; border: 1px solid #d4d8cd; border-radius: 4px; padding: 2px 5px; margin-right: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.outline { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fine { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1600px) { .intro { padding-top: 54px; padding-bottom: 39px; } }
@media (max-width: 760px) {
.page { width: calc(100% - 40px); }
.masthead { padding: 23px 0 20px; }
.edition { font-size: 9px; letter-spacing: 1px; }
.intro { padding: 33px 0 25px; }
h1 { font-size: 41px; letter-spacing: -1.8px; }
.console { flex-wrap: wrap; gap: 18px; }
.controls { gap: 12px; }
.speed-label { display: none; }
}
@media (max-width: 540px) {
.page { width: calc(100% - 32px); }
.wordmark { font-size: 14px; gap: 8px; }
.edition { font-size: 8px; max-width: 95px; text-align: right; line-height: 1.6; }
.eyebrow { font-size: 8px; letter-spacing: 1.65px; }
h1 { font-size: 38px; }
.subtitle { font-size: 12px; }
.scene { border-radius: 13px; }
.scene > svg { aspect-ratio: 1.1; }
.scene-label { top: 18px; left: 18px; font-size: 8px; letter-spacing: 1.3px; }
.weather { display: none; }
.scene-note { bottom: 17px; right: 18px; font-size: 13px; }
.console { padding: 18px 0; }
.caption { gap: 12px; }
.controls { width: 100%; justify-content: space-between; }
.play-button { min-width: 137px; }
.speed-control { gap: 8px; }
footer { font-size: 9px; line-height: 1.6; }
.keyboard-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
</style>
</head>
<body>
<main class="page" id="ride" data-paused="false">
<header class="masthead">
<div class="wordmark">
<svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="4" fill="currentColor"/><g stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M12 1v3m0 16v3M1 12h3m16 0h3M4.2 4.2l2.1 2.1m11.4 11.4 2.1 2.1M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1"/></g></svg>
a little motion
</div>
<div class="edition">Small scenes. Simple joys.</div>
</header>
<section class="intro" aria-labelledby="page-title">
<p class="eyebrow">A PELICAN, TWO WHEELS &amp; A SEA BREEZE</p>
<h1 id="page-title">Taking the <em>scenic</em> route.</h1>
<p class="subtitle">Nowhere to be. A lovely way to get there.</p>
</section>
<figure class="scene" aria-label="The coastal ride animation">
<div class="scene-label" aria-hidden="true"><span></span> THE COASTAL LOOP</div>
<div class="scene-label weather" aria-hidden="true">24°C &nbsp; / &nbsp; SEA BREEZE</div>
<svg id="landscape" viewBox="0 0 1200 600" role="img" aria-labelledby="scene-title scene-description">
<title id="scene-title">A pelican on a bicycle</title>
<desc id="scene-description">A white pelican with a long golden bill, a green cap and a rust-red scarf pedals a coral bicycle along a sunny coastal path. Its webbed feet follow the pedals, the wheels turn, and clouds, waves and coastal grasses drift past.</desc>
<defs>
<g id="cloud" fill="var(--white)"><path d="M0 21C0 12 9 6 18 9 22-8 46-7 52 9 65 1 81 9 79 21Z"/></g>
<g id="grass" fill="none" stroke-linecap="round" stroke-width="2.3"><path d="M0 0Q-3-21-17-30M0 0Q-1-35 8-44M0 0Q8-24 21-29"/><path d="M-17-30l-5-3m30-11 1-5m12 20 5-2"/></g>
<g id="gull" fill="none" stroke="#6b8579" stroke-width="2.3" stroke-linecap="round"><path d="M-17 3Q-7-7 0 2 7-7 17 3"/></g>
<g id="coast-strip">
<path d="M0 335Q110 307 220 331T460 335 700 325 940 330 1200 335V400H0Z" fill="#bdd0b9"/>
<path d="M0 354Q160 325 310 351T620 346 910 350 1200 354V409H0Z" fill="#d5ddc3"/>
<path d="M88 338v-32m-12 6 12-12 12 12" fill="none" stroke="#9bb69d" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<g id="wave-strip" fill="none" stroke="#e1e9da" stroke-width="2" stroke-linecap="round">
<path d="M35 311h79m43 0h17m130 12h91m-8-24h45m136 16h114m80-13h51m76 22h91m143-15h90m53 13h42"/>
</g>
<g id="road-strip" fill="none" stroke="#f7eed6" stroke-width="3" stroke-linecap="round">
<path d="M20 477h39m96 0h42m105 0h34m104 0h42m105 0h34m105 0h42m105 0h34m105 0h42m105 0h34m105 0h42"/>
</g>
<g id="verge-strip">
<use href="#grass" transform="translate(142 536) scale(1.1)" stroke="#819978"/>
<use href="#grass" transform="translate(947 527) scale(.8)" stroke="#819978"/>
<use href="#grass" transform="translate(1127 563) scale(1.2)" stroke="#9ba87b"/>
<path d="M322 536h18m-9 5h26m389-11h14m23 4h9" stroke="#c8bd98" stroke-width="2" stroke-linecap="round"/>
<ellipse cx="386" cy="514" rx="6" ry="3" fill="#c2b899"/><ellipse cx="861" cy="555" rx="9" ry="4" fill="#c2b899"/>
<g transform="translate(112 535)"><path d="M0 0v-16m0 3-8-6m8 2 7-7" fill="none" stroke="#819978" stroke-width="2"/><circle cx="-9" cy="-20" r="3" fill="#ca7953"/><circle cx="8" cy="-25" r="3" fill="#ca7953"/></g>
</g>
<g id="wheel-spokes" fill="none" stroke="#8c9a8b" stroke-width="1.6">
<path d="M0-85V85M-85 0H85M-60.1-60.1 60.1 60.1M-60.1 60.1 60.1-60.1M-32.5-78.5 32.5 78.5M-78.5-32.5 78.5 32.5M-78.5 32.5 78.5-32.5M-32.5 78.5 32.5-78.5"/>
<circle r="86" stroke="#899789" stroke-width="2"/>
<path d="M-5-83h10" stroke="var(--white)" stroke-width="5" stroke-linecap="round"/>
</g>
</defs>
<path fill="var(--sky)" d="M0 0h1200v600H0Z"/>
<circle cx="946" cy="145" r="49" fill="var(--sun)"/>
<circle cx="946" cy="145" r="62" fill="none" stroke="#d7dbc0" stroke-width="1"/>
<g id="clouds" opacity=".85"><use href="#cloud" x="174" y="137"/><use href="#cloud" transform="translate(687 81) scale(.7)"/><use href="#cloud" transform="translate(1103 195) scale(.6)"/><use href="#cloud" x="1374" y="137"/><use href="#cloud" transform="translate(1887 81) scale(.7)"/><use href="#cloud" transform="translate(2303 195) scale(.6)"/></g>
<g id="gulls"><use href="#gull" transform="translate(866 215) scale(.65)"/><use href="#gull" transform="translate(1020 232) scale(.45)"/><use href="#gull" transform="translate(301 227) scale(.55)"/></g>
<path d="M0 294Q260 290 600 294T1200 294V385H0Z" fill="var(--sea)"/>
<path d="M0 291Q260 287 600 291T1200 291" fill="none" stroke="#8faf9f" stroke-width="1.5"/>
<g id="waves"><use href="#wave-strip"/><use href="#wave-strip" x="1200"/></g>
<g id="coast"><use href="#coast-strip"/><use href="#coast-strip" x="1200"/></g>
<path d="M0 379Q330 363 600 378T1200 379V600H0Z" fill="var(--sand)"/>
<path d="M0 424Q300 415 600 424T1200 424V495Q900 486 600 495T0 495Z" fill="var(--road)"/>
<path d="M0 414Q300 405 600 414T1200 414" fill="none" stroke="#f9f2dd" stroke-width="3"/>
<g id="road"><use href="#road-strip"/><use href="#road-strip" x="1200"/></g>
<ellipse id="ground-shadow" cx="588" cy="527" rx="217" ry="11" fill="#56634b" opacity=".11"/>
<g id="cyclist">
<!-- The wheel centers, crank and feet share one coordinate system. -->
<g transform="translate(430 430)">
<circle r="95" fill="#faf4df" fill-opacity=".4" stroke="var(--ink)" stroke-width="8"/>
<circle r="89" fill="none" stroke="#f9f1dc" stroke-width="4"/>
<g id="rear-wheel"><use href="#wheel-spokes"/></g>
<circle r="6" fill="var(--ink)"/>
</g>
<g transform="translate(760 430)">
<circle r="95" fill="#faf4df" fill-opacity=".4" stroke="var(--ink)" stroke-width="8"/>
<circle r="89" fill="none" stroke="#f9f1dc" stroke-width="4"/>
<g id="front-wheel"><use href="#wheel-spokes"/></g>
<circle r="6" fill="var(--ink)"/>
</g>
<g id="back-leg" class="outline" stroke-width="3">
<path id="back-leg-shape" d="M533 264 507 363 555 410" fill="none" stroke="#bd8749" stroke-width="10"/>
<g id="back-foot" transform="translate(555 410)"><path d="M-15-5 3-8 25 2 9 7-15 4Z" fill="#c78b4a" stroke-width="2.5"/><path d="M4-5 13 3m-7-2 3 6" fill="none" stroke="#925f3b" stroke-width="1.5"/></g>
</g>
<g id="back-pedal"><path d="M539 427h24" stroke="#53645a" stroke-width="6" stroke-linecap="round"/></g>
<!-- Coral step-through bicycle, drawn with original vector paths. -->
<path d="M335 414A97 97 0 0 1 509 371M681 374A97 97 0 0 1 853 409" fill="none" stroke="#7e9483" stroke-width="5" stroke-linecap="round"/>
<path d="M430 430 527 315 580 425 430 430M527 315 705 321 580 425M705 321 760 430" fill="none" stroke="var(--ink)" stroke-width="12" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M430 430 527 315 580 425 430 430M527 315 705 321 580 425M705 321 760 430" fill="none" stroke="var(--bike)" stroke-width="7" stroke-linejoin="round" stroke-linecap="round"/>
<path d="M527 315 512 277M705 321 694 279Q691 266 707 260L729 255" fill="none" stroke="var(--ink)" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="m716 259 19-5" fill="none" stroke="#9d6849" stroke-width="9" stroke-linecap="round"/>
<path d="M488 276Q513 270 539 275L539 282Q515 290 491 284Z" fill="#895e47" class="outline" stroke-width="2.5"/>
<path d="M704 271Q741 274 735 333" fill="none" stroke="#526a5c" stroke-width="1.5"/>
<circle cx="713" cy="262" r="6" fill="var(--bill)" stroke="var(--ink)" stroke-width="2"/>
<path d="M430 418h150a12 12 0 0 1 0 24H430a12 12 0 0 1 0-24Z" fill="var(--paper)" stroke="#82917e" stroke-width="2"/>
<path id="chain" d="M430 423h150a7 7 0 0 1 0 14H430a7 7 0 0 1 0-14Z" fill="none" stroke="#8f9c86" stroke-width="1.5" stroke-dasharray="2 5"/>
<circle cx="580" cy="425" r="23" fill="#718374" stroke="var(--ink)" stroke-width="2.5"/>
<circle cx="580" cy="425" r="16" fill="#cbd1b8" stroke="#344d42" stroke-width="1.5"/>
<g id="crank" transform="rotate(0 580 425)"><path d="M551 425h58" stroke="var(--ink)" stroke-width="5" stroke-linecap="round"/><circle cx="580" cy="425" r="5" fill="var(--paper)" stroke="var(--ink)" stroke-width="2"/></g>
<g id="front-leg" class="outline">
<path id="front-leg-shape" d="M533 264 501 363 609 425" fill="none" stroke="#e6a54e" stroke-width="11"/>
<path id="leg-highlight" d="M533 264 501 363 609 425" fill="none" stroke="#f3c374" stroke-width="4"/>
<g id="front-foot" transform="translate(609 425)"><path d="M-16-6 3-9 27 2 10 8-16 4Z" fill="var(--bill)" stroke-width="2.5"/><path d="M3-6 14 3M4-1 10 7" fill="none" stroke="#b17b38" stroke-width="1.5"/></g>
</g>
<path id="front-pedal" d="M597 432h25" stroke="var(--ink)" stroke-width="6" stroke-linecap="round"/>
<g id="pelican">
<path d="M443 239Q407 221 387 226L406 244 391 247Q415 269 448 263Z" fill="var(--feather)" class="outline"/>
<path d="M555 239C580 217 568 181 583 151C573 137 573 117 584 101C599 80 632 81 648 100C666 118 656 140 636 145C624 148 612 141 607 134C604 153 623 187 614 214C606 242 581 259 558 265Z" fill="var(--white)" class="outline"/>
<path d="M584 152Q584 187 594 201T580 239" fill="none" stroke="var(--feather)" stroke-width="12" stroke-linecap="round"/>
<path d="M412 245C428 229 436 197 465 184C497 167 533 179 552 200C580 223 579 259 550 275C509 296 450 280 427 267Z" fill="var(--white)" class="outline"/>
<path d="M420 252Q466 285 515 271Q540 263 551 248C538 279 484 295 443 270Z" fill="var(--feather)"/>
<path d="M444 230Q479 205 521 226Q540 238 543 254Q503 276 463 257Z" fill="#e9ece0" class="outline" stroke-width="2.5"/>
<path d="M460 237Q488 225 514 241M464 248Q486 240 507 250" class="fine" stroke="#a1b0a0" stroke-width="2"/>
<path d="M535 220C562 221 584 242 612 254L688 267Q700 265 703 273Q700 282 687 281L612 275C582 272 557 258 541 246Z" fill="var(--white)" class="outline" stroke-width="2.5"/>
<path d="m683 270 7 7m-15-7 7 8" class="fine" stroke-width="1.5"/>
<!-- The long bill and hanging throat pouch define the pelican silhouette. -->
<path d="M641 119 805 126Q785 144 758 151C711 181 664 165 641 131Z" fill="var(--pouch)" class="outline" stroke-width="2.5"/>
<path d="M644 105Q718 110 808 125L814 132Q727 136 644 127Z" fill="var(--bill)" class="outline" stroke-width="2.5"/>
<path d="M653 118 795 128" fill="none" stroke="#fff0bb" stroke-width="3" stroke-linecap="round"/>
<path d="M652 138Q684 161 727 154" fill="none" stroke="#c98261" stroke-width="2" stroke-linecap="round"/>
<circle cx="632" cy="109" r="8" fill="#e4c986"/>
<circle cx="633" cy="109" r="4" fill="var(--ink)"/>
<circle cx="634" cy="107.5" r="1.2" fill="var(--white)"/>
<path d="M624 96q8-4 14 0" class="fine" stroke-width="2"/>
<path d="M584 101Q584 78 608 77Q630 77 640 95L649 100Q611 94 584 101Z" fill="#789888" class="outline" stroke-width="2.5"/>
<path d="M589 96Q621 89 656 98Q653 105 636 103" fill="#9bb39b" class="outline" stroke-width="2.5"/>
<path d="M609 80q-6 7-5 14" fill="none" stroke="#527765" stroke-width="2"/>
<circle cx="608" cy="77" r="3.5" fill="var(--ink)"/>
<path id="scarf-tail" d="M590 168C562 169 550 145 519 154L528 167 514 173C545 166 559 190 588 181Z" fill="var(--bike)" stroke="var(--ink)" stroke-width="2.5" stroke-linejoin="round"/>
<path d="M581 157Q594 166 610 158L614 170Q596 181 582 171Z" fill="var(--bike)" class="outline" stroke-width="2.5"/>
<path d="M585 165q9 6 18 2" fill="none" stroke="#e8906a" stroke-width="2"/>
<path d="M584 166q-12-7-10 4t12 6" fill="var(--bike)" class="outline" stroke-width="2"/>
</g>
</g>
<g id="verge"><use href="#verge-strip"/><use href="#verge-strip" x="1200"/></g>
<g opacity=".35" fill="none" stroke="#fff9e7" stroke-width="1.5" stroke-linecap="round"><path d="M51 553h40m-18 8h17m956-67h25m-12 7h30"/></g>
</svg>
<div class="scene-note" aria-hidden="true">a good day to take it slow.</div>
<figcaption class="sr-only">An original, looping SVG coastal cycling scene. Use the controls below to pause the ride or change its speed.</figcaption>
</figure>
<section class="console" aria-label="Animation controls">
<div class="caption"><span class="number" aria-hidden="true">01</span><div><div class="caption-title">The coastal ride</div><div class="status" id="status" role="status" aria-live="polite">Just cruising along</div></div></div>
<div class="controls">
<button class="play-button" id="play-toggle" type="button" aria-controls="landscape" aria-keyshortcuts="Space">
<svg class="pause-icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M5 3v10M11 3v10" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/></svg>
<svg class="play-icon" viewBox="0 0 16 16" aria-hidden="true"><path d="m5 2 9 6-9 6Z" fill="currentColor"/></svg>
<span id="play-label">Pause ride</span>
</button>
<div class="speed-control" role="group" aria-label="Animation speed">
<span class="speed-label" aria-hidden="true">Pace</span>
<button type="button" data-speed="0.5" aria-pressed="false" aria-label="Half speed">0.5×</button>
<button type="button" data-speed="1" aria-pressed="true" aria-label="Normal speed">1×</button>
<button type="button" data-speed="1.5" aria-pressed="false" aria-label="One and a half speed">1.5×</button>
</div>
</div>
</section>
<footer><span>Made of vectors &amp; a little imagination.</span><span class="keyboard-hint"><kbd>space</kbd> to pause &amp; wander</span><span>Enjoy the little things.</span></footer>
<noscript><p>This scene is drawn entirely in SVG. Enable JavaScript to start the bicycle animation and use the controls.</p></noscript>
</main>
<script>
(() => {
'use strict';
const byId = (id) => document.getElementById(id);
const parts = Object.fromEntries([
'ride', 'landscape', 'clouds', 'gulls', 'waves', 'coast', 'road', 'verge',
'cyclist', 'pelican', 'rear-wheel', 'front-wheel', 'crank', 'chain',
'front-leg-shape', 'back-leg-shape', 'leg-highlight', 'front-foot',
'back-foot', 'front-pedal', 'back-pedal',
'scarf-tail', 'ground-shadow', 'play-toggle', 'play-label', 'status'
].map((id) => [id, byId(id)]));
const speedButtons = [...document.querySelectorAll('[data-speed]')];
const motionPreference = window.matchMedia('(prefers-reduced-motion: reduce)');
const smallScreen = window.matchMedia('(max-width: 540px)');
let playing = !motionPreference.matches;
let speed = 1;
let elapsed = 0;
let previousTime = null;
let frameId = null;
const set = (id, name, value) => parts[id].setAttribute(name, value);
const move = (id, x, y = 0) => set(id, 'transform', `translate(${x.toFixed(3)} ${y.toFixed(3)})`);
const scroll = (id, distance) => move(id, -(distance % 1200));
// Solve the two leg segments so each webbed foot stays on its pedal.
function legPath(hip, foot) {
const upper = 112;
const lower = 110;
const dx = foot.x - hip.x;
const dy = foot.y - hip.y;
const distance = Math.max(.001, Math.hypot(dx, dy));
const cosine = (upper * upper + distance * distance - lower * lower) / (2 * upper * distance);
const angle = Math.atan2(dy, dx) + Math.acos(Math.max(-1, Math.min(1, cosine)));
const knee = { x: hip.x + Math.cos(angle) * upper, y: hip.y + Math.sin(angle) * upper };
return `M${hip.x} ${hip.y}L${knee.x.toFixed(3)} ${knee.y.toFixed(3)}L${foot.x.toFixed(3)} ${foot.y.toFixed(3)}`;
}
function render(t) {
const phase = t * 2.5;
const degrees = phase * 180 / Math.PI;
const bob = Math.sin(phase * 2) * 1.1;
const birdBob = Math.sin(phase * 2 - .5) * 1.7;
move('cyclist', 0, bob);
move('pelican', 0, birdBob);
set('rear-wheel', 'transform', `rotate(${t * 200})`);
set('front-wheel', 'transform', `rotate(${t * 200})`);
set('crank', 'transform', `rotate(${degrees} 580 425)`);
set('chain', 'stroke-dashoffset', (-t * 24).toFixed(3));
const front = { x: 580 + Math.cos(phase) * 29, y: 425 + Math.sin(phase) * 29 };
const back = { x: 580 - Math.cos(phase) * 29, y: 425 - Math.sin(phase) * 29 };
const hip = { x: 533, y: 264 + birdBob };
const frontPath = legPath(hip, front);
set('front-leg-shape', 'd', frontPath);
set('leg-highlight', 'd', frontPath);
set('back-leg-shape', 'd', legPath(hip, back));
move('front-foot', front.x, front.y - 5);
move('back-foot', back.x, back.y - 5);
set('front-pedal', 'd', `M${front.x - 12} ${front.y + 2}h25`);
// The rear arm is already part of the rotating crank; only its platform translates.
set('back-pedal', 'transform', `translate(${back.x - 551} ${back.y - 425})`);
set('ground-shadow', 'rx', (217 - bob * .8).toFixed(3));
const flutter = Math.sin(t * 5.5) * 5;
set('scarf-tail', 'd', `M590 168C562 ${169 + flutter} 550 ${145 - flutter} 519 ${154 + flutter}L528 ${167 + flutter} 514 ${173 + flutter}C545 ${166 + flutter} 559 ${190 - flutter} 588 181Z`);
scroll('clouds', t * 9);
scroll('waves', t * 34);
scroll('coast', t * 53);
scroll('road', t * (200 * Math.PI / 180 * 95));
scroll('verge', t * (200 * Math.PI / 180 * 95));
move('gulls', Math.sin(t * .55) * 9, Math.sin(t * 1.2) * 3);
}
function updateControls() {
parts.ride.dataset.paused = String(!playing);
parts['play-label'].textContent = playing ? 'Pause ride' : 'Resume ride';
parts.status.textContent = playing ? 'Just cruising along' : 'Taking in the view';
}
function tick(timestamp) {
frameId = null;
if (!playing || document.hidden) { previousTime = null; return; }
if (previousTime !== null) elapsed += Math.min((timestamp - previousTime) / 1000, .08) * speed;
previousTime = timestamp;
render(elapsed);
frameId = window.requestAnimationFrame(tick);
}
function schedule() {
if (playing && !document.hidden && frameId === null) frameId = window.requestAnimationFrame(tick);
}
function setPlaying(value) {
playing = value;
previousTime = null;
if (frameId !== null) window.cancelAnimationFrame(frameId);
frameId = null;
updateControls();
schedule();
}
parts['play-toggle'].addEventListener('click', () => setPlaying(!playing));
speedButtons.forEach((button) => button.addEventListener('click', () => {
speed = Number(button.dataset.speed);
speedButtons.forEach((item) => item.setAttribute('aria-pressed', String(item === button)));
}));
document.addEventListener('keydown', (event) => {
if (event.code === 'Space' && !event.repeat && !event.altKey && !event.ctrlKey && !event.metaKey &&
(event.target === document.body || event.target === document.documentElement)) {
event.preventDefault();
setPlaying(!playing);
}
});
document.addEventListener('visibilitychange', () => {
previousTime = null;
if (document.hidden && frameId !== null) { window.cancelAnimationFrame(frameId); frameId = null; }
schedule();
});
motionPreference.addEventListener('change', (event) => { if (event.matches) setPlaying(false); });
function updateViewBox() { set('landscape', 'viewBox', smallScreen.matches ? '280 0 660 600' : '0 0 1200 600'); }
smallScreen.addEventListener('change', updateViewBox);
updateViewBox();
render(0);
updateControls();
schedule();
})();
</script>
</body>
</html>