-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
100 lines (97 loc) · 3.43 KB
/
Copy pathindex.html
File metadata and controls
100 lines (97 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Patterns for scroll-driven three.js chapters: smoothed progress, camera beats, staggered assembly, a quality governor, and a visibility gate." />
<title>scroll-rig</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
background: #05070d;
color: #e6e8f0;
font-family: ui-sans-serif, system-ui, "Helvetica Neue", Arial, sans-serif;
-webkit-font-smoothing: antialiased;
}
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.hero, .outro {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1.2rem;
text-align: center;
padding: 2rem;
}
.hero h1 {
font-size: clamp(2.6rem, 8vw, 6rem);
letter-spacing: 0.08em;
font-weight: 800;
}
.hero p, .outro p { color: #8a93ad; max-width: 44ch; line-height: 1.6; }
.hint {
margin-top: 2.5rem;
font-size: 0.75rem;
letter-spacing: 0.35em;
color: #6e83ff;
animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(8px); } }
#stage { height: 760vh; position: relative; }
.sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
#canvas-mount, #canvas-mount canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud {
position: absolute;
left: 1.25rem;
bottom: 1.25rem;
display: flex;
gap: 1.5rem;
font-size: 0.72rem;
letter-spacing: 0.12em;
color: #8a93ad;
background: rgba(5, 7, 13, 0.55);
border: 1px solid rgba(110, 131, 255, 0.25);
padding: 0.6rem 0.9rem;
border-radius: 6px;
backdrop-filter: blur(6px);
}
.hud b { color: #e6e8f0; font-weight: 600; }
.outro a { color: #6e83ff; text-decoration: none; }
.outro a:hover { text-decoration: underline; }
.outro small { color: #565f78; letter-spacing: 0.2em; margin-top: 2rem; }
</style>
</head>
<body>
<header class="hero">
<h1>SCROLL-RIG</h1>
<p>
Five patterns for scroll-driven three.js chapters: liquid progress,
camera beats, staggered assembly, an adaptive quality governor and a
visibility gate.
</p>
<div class="hint mono">SCROLL</div>
</header>
<section id="stage" aria-label="Scroll-driven 3D chapter">
<div class="sticky">
<div id="canvas-mount"></div>
<div class="hud mono">
<span><b id="hud-progress">0%</b></span>
<span id="hud-placed">0 / 60 placed</span>
<span id="hud-mode">APPROACH</span>
</div>
</div>
</section>
<footer class="outro">
<p>
That was one chapter, 60 instances, zero assets. See the same rig at
scale on <a href="https://intframe.com">intframe.com</a>
(chapter 06, THE MACHINE).
</p>
<p><a href="https://github.com/intframe/scroll-rig">Read the patterns on GitHub</a></p>
<small class="mono">BUILT AT INTFRAME</small>
</footer>
<script type="module" src="/src/main.ts"></script>
</body>
</html>