StealThis .dev

Three.js Scroll Camera Narrative

Narrative scene where scroll progress drives camera chapter rails.

Open in Lab
threejscamerascrollwebgl
Targets: JS HTML

Code

:root { --bg:#03060d; --text:#eef4ff; --muted:#c1d0e7; --accent:#8fe8ff; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family:"Avenir Next","Segoe UI",sans-serif; }
#scene { position:fixed; inset:0; z-index:0; }
.topbar { position:fixed; inset:0 0 auto 0; z-index:30; display:flex; justify-content:space-between; align-items:center; padding:.75rem 1rem; background:rgba(0,0,0,.28); backdrop-filter: blur(8px); }
.topbar a { color:var(--accent); text-decoration:none; font-weight:700; }
button { border:1px solid rgba(255,255,255,.25); border-radius:999px; padding:.45rem .8rem; background:rgba(255,255,255,.07); color:var(--text); cursor:pointer; }
main { position:relative; z-index:10; }
.panel { min-height:88vh; width:min(920px,92%); margin:0 auto; display:grid; align-content:center; gap:.7rem; border-bottom:1px solid rgba(255,255,255,.12); }
.label { margin:0; color:var(--accent); text-transform:uppercase; letter-spacing:.1em; }
h1,h2,p { margin:0; }
h1 { font-size: clamp(2rem, 7vw, 4.2rem); }
p { color:var(--muted); max-width:62ch; }

Three.js Scroll Camera Narrative

Narrative scene where scroll progress drives camera chapter rails.

Source

  • Repository: libs-gen
  • Original demo id: 13-threejs-scroll-camera-narrative

Notes

Narrative scene where scroll progress drives camera chapter rails.