mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
171 lines
4.6 KiB
HTML
171 lines
4.6 KiB
HTML
<!doctype html>
|
|
<html lang="ja">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>bezier-kit — examples</title>
|
|
<meta
|
|
name="description"
|
|
content="bezier-kit: interactive demos for a zero-dependency 2D/3D cubic-bezier TypeScript library"
|
|
/>
|
|
<style>
|
|
:root {
|
|
color-scheme: dark;
|
|
}
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
min-height: 100vh;
|
|
background: #0b0d12;
|
|
color: #eaeaea;
|
|
font-family:
|
|
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo,
|
|
sans-serif;
|
|
line-height: 1.6;
|
|
}
|
|
main {
|
|
max-width: 880px;
|
|
margin: 0 auto;
|
|
padding: 48px 24px;
|
|
}
|
|
h1 {
|
|
margin: 0 0 8px;
|
|
font-size: 32px;
|
|
letter-spacing: -0.02em;
|
|
}
|
|
h1 code {
|
|
color: #66d9ef;
|
|
background: transparent;
|
|
padding: 0;
|
|
}
|
|
.lead {
|
|
margin: 0 0 32px;
|
|
color: #9aa1ae;
|
|
font-size: 16px;
|
|
}
|
|
.links {
|
|
display: flex;
|
|
gap: 16px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 48px;
|
|
}
|
|
.links a {
|
|
color: #66d9ef;
|
|
text-decoration: none;
|
|
border: 1px solid #2a2f3b;
|
|
padding: 6px 12px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
transition: background 0.15s;
|
|
}
|
|
.links a:hover {
|
|
background: #141821;
|
|
}
|
|
h2 {
|
|
margin: 32px 0 16px;
|
|
font-size: 18px;
|
|
color: #9aa1ae;
|
|
font-weight: 500;
|
|
letter-spacing: 0.02em;
|
|
text-transform: uppercase;
|
|
}
|
|
.demos {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
gap: 20px;
|
|
}
|
|
.card {
|
|
background: #141821;
|
|
border: 1px solid #1f2430;
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
transition:
|
|
border-color 0.15s,
|
|
transform 0.15s;
|
|
display: block;
|
|
}
|
|
.card:hover {
|
|
border-color: #4ecdc4;
|
|
transform: translateY(-2px);
|
|
}
|
|
.card-title {
|
|
margin: 0 0 4px;
|
|
font-size: 18px;
|
|
color: #66d9ef;
|
|
}
|
|
.card-meta {
|
|
margin: 0 0 12px;
|
|
font-size: 12px;
|
|
color: #707684;
|
|
font-family: 'SF Mono', Menlo, monospace;
|
|
}
|
|
.card-desc {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
color: #c5c9d3;
|
|
}
|
|
code {
|
|
background: #141821;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-family: 'SF Mono', Menlo, monospace;
|
|
font-size: 0.9em;
|
|
}
|
|
footer {
|
|
margin-top: 64px;
|
|
padding-top: 24px;
|
|
border-top: 1px solid #1f2430;
|
|
color: #707684;
|
|
font-size: 13px;
|
|
}
|
|
footer a {
|
|
color: #9aa1ae;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<h1><code>bezier-kit</code></h1>
|
|
<p class="lead">
|
|
A zero-dependency TypeScript library for cubic bezier curves. Works with both 2D and 3D through the same API —
|
|
morphing, splitting, arc-length queries, and path generation.
|
|
</p>
|
|
|
|
<div class="links">
|
|
<a href="https://github.com/sumisonic/bezier-kit">GitHub</a>
|
|
<a href="https://github.com/sumisonic/bezier-kit#readme">README</a>
|
|
</div>
|
|
|
|
<h2>Interactive demos</h2>
|
|
<div class="demos">
|
|
<a class="card" href="./canvas-morph/">
|
|
<h3 class="card-title">canvas-morph</h3>
|
|
<p class="card-meta">React · Canvas 2D</p>
|
|
<p class="card-desc">
|
|
Interpolate between two randomly generated 2D bezier paths with <code>createPathInterpolator</code>, then
|
|
split and separate the halves with <code>createPathSplitter</code> using color coding and offset.
|
|
</p>
|
|
</a>
|
|
<a class="card" href="./threejs-tube/">
|
|
<h3 class="card-title">threejs-tube</h3>
|
|
<p class="card-meta">React · @react-three/fiber · 3D</p>
|
|
<p class="card-desc">
|
|
Build a 3D curve from random points with <code>fromCatmullRom<Point3D></code>, render it as a
|
|
<code>THREE.TubeGeometry</code>, and visualize morphing and splitting in 3D space.
|
|
</p>
|
|
</a>
|
|
</div>
|
|
|
|
<footer>
|
|
<p>
|
|
MIT © <a href="https://github.com/sumisonic">sumisonic</a> ·
|
|
<a href="https://github.com/sumisonic/bezier-kit/blob/main/LICENSE">LICENSE</a>
|
|
</p>
|
|
</footer>
|
|
</main>
|
|
</body>
|
|
</html>
|