Claude Opus 5.5
index.html
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>土谷大地</title>
<style>
:root { --wall: #1b1917; --cloth: #2b3238; --mid: #b9ad8f; --gold: #9a8450; --rod: #3a2a1e; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--wall); }
body {
display: grid; place-items: center; padding: 3vh 16px 5vh;
background: radial-gradient(120% 90% at 50% 18%, #2a2723 0%, var(--wall) 62%, #100f0e 100%);
font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif; color: #8d8474;
}
/* 掛軸:天地・中廻し・一文字。寸法はすべて本紙の高さ --ph から割り出す */
.jiku { --ph: min(67vh, 128vw); display: inline-flex; flex-direction: column; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55)); cursor: zoom-in; }
.jiku.zoom { --ph: min(1900px, 126vw); cursor: zoom-out; }
.hassou { height: calc(var(--ph) * .012); background: linear-gradient(#5a4433, var(--rod)); border-radius: 2px; }
.cloth {
padding: calc(var(--ph) * .14) calc(var(--ph) * .045) calc(var(--ph) * .09);
background:
repeating-linear-gradient(90deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px),
repeating-linear-gradient(0deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px), var(--cloth);
}
.mid {
padding: calc(var(--ph) * .05) calc(var(--ph) * .03) calc(var(--ph) * .036);
background:
repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 7px),
repeating-linear-gradient(-45deg, rgba(0, 0, 0, .035) 0 2px, transparent 2px 7px), var(--mid);
}
.ichimonji { height: calc(var(--ph) * .017); background: repeating-linear-gradient(90deg, #b39a5e 0 5px, var(--gold) 5px 10px); }
canvas { display: block; height: var(--ph); width: calc(var(--ph) * 2 / 3); background: #f3eddc; }
.jiku-rod { height: calc(var(--ph) * .026); margin: 0 calc(var(--ph) * -.016); background: linear-gradient(#57402f, var(--rod) 55%, #20160f); border-radius: 6px; }
.bar { position: fixed; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 12px; letter-spacing: .3em; pointer-events: none; transition: opacity 1.2s; }
.bar button { pointer-events: auto; margin-left: 1.5em; font: inherit; letter-spacing: .2em; color: inherit; background: none; border: 1px solid #4a443b; padding: 3px 10px; cursor: pointer; }
.bar button:hover { color: #d8cfbc; border-color: #8d8474; }
</style>
</head>
<body>
<div class="jiku" id="jiku" title="クリックで拡大">
<div class="hassou"></div>
<div class="cloth">
<div class="mid">
<div class="ichimonji"></div>
<canvas id="c" aria-label="水墨画「土谷大地」"></canvas>
<div class="ichimonji"></div>
</div>
</div>
<div class="jiku-rod"></div>
</div>
<div class="bar"><span id="step"></span><button id="save" hidden>PNG で保存</button></div>
<script src="sumi.js"></script>
<script>
// ?scale=1.5 で大きく、?seed=n で筆の揺らぎを変える
const q = new URLSearchParams(location.search);
const seed = q.get('seed');
const p = Sumi.create({ scale: Math.min(3, +q.get('scale') || 1), seed: seed == null ? undefined : +seed });
const cv = document.getElementById('c'), ctx = cv.getContext('2d');
cv.width = p.W; cv.height = p.H;
const img = ctx.createImageData(p.W, p.H), label = document.getElementById('step'), save = document.getElementById('save');
const show = () => { p.composite(img.data); ctx.putImageData(img, 0, 0); };
let i = 0;
if (q.has('fast')) { // 工程を見せずに一気に描く
while (i < p.steps.length) p.run(i++);
show(); save.hidden = false;
} else (function next() {
if (i >= p.steps.length) { label.textContent = ''; save.hidden = false; return; }
label.textContent = p.steps[i];
// ラベルを描かせてから一工程ぶん筆を入れる
requestAnimationFrame(() => setTimeout(() => { p.run(i++); show(); setTimeout(next, 420); }, 0));
})();
document.getElementById('jiku').onclick = (e) => e.currentTarget.classList.toggle('zoom');
save.onclick = () => cv.toBlob((b) => {
const a = document.createElement('a');
a.href = URL.createObjectURL(b); a.download = '土谷大地.png'; a.click();
setTimeout(() => URL.revokeObjectURL(a.href), 5000);
});
</script>
</body>
</html>