
Numeric Tunnel Loader
Loaders
A scroll-driven WebGL tunnel effect that moves the viewer through an endless, image-lined vanishing-point grid for technical launches and portfolio heroes.
Grid Tunnel pulls the eye through technical space before the product story begins.
Use it for AI launches, developer tools, cybersecurity pages, and technical portfolios where kinetic depth is the opening signal. The page job is momentum: the tunnel should frame the first claim, not become a loading screen disguised as craft.
The thing to watch is scroll capture. The tunnel takes over wheel and touch input for the whole window, and it renders every frame while onscreen, which can drain attention and GPU.
import GridTunnel from "@/components/effects/grid-tunnel"; const page = () => { return ( <> <GridTunnel /> </> );}; export default page; A developer conference site can use Grid Tunnel to open its event page. Scrolling or swiping moves the visitor forward through a wireframe tunnel lined with photography from past editions, while the event name, dates, and ticket link stay fixed in HTML.
The outcome is momentum. The page frames the first claim with depth and movement before anything else is read.
A creative technologist's portfolio can use the same tunnel as an opener, choosing the rectangular or circular cross-section to match the work.
Not for low-power-first pages, dense content, dashboards, checkout, or routes where performance is the main conversion lever.
The canvas already caps DPR at 1.5 and pauses offscreen and in hidden tabs; drop DPR to 1.0 on touch/mobile, and keep texture sizes controlled, since each tunnel chunk places up to 50 image panels.
Keep meaningful content in HTML outside the canvas, which is aria-hidden. On mobile, vertical swipes drive the tunnel instead of scrolling the page, so switch to a poster if the scene cannot hold frame rate.
| Prop | Type | Default | Description |
|---|---|---|---|
numberOfGrids | number | 24 | Number of grid cells (density of the tunnel grid). |
shape | string | rectangle | Tunnel cross-section: rectangle or circle (the images curve with the circular walls). |
speed | number | 1 | Scroll and touch travel speed. |
depth | number | 1000 | Visible tunnel fog depth. |
lineColor | string | #9ca3af | Grid line color. |
backgroundColor | string | #ffffff | Tunnel background color. |
The render loop runs every frame while onscreen and each tunnel chunk carries up to 50 image panels, so the canvas caps DPR at 1.5; use 1.0 on mobile and keep images small. Lower numberOfGrids or depth on the lower tier. Verify smoothness on a phone while swiping.
Provide a still that captures the sense of depth a frame looking down the tunnel, so the fallback keeps the technical mood. HTML copy and CTA remain intact above it. The still should feel deliberate, not like a broken frame.
The tunnel only moves on scroll or touch, but its render loop runs every frame while visible, so pausing matters. It already sets the frameloop to never when offscreen or the tab is hidden and resumes on visibility. Demand rendering would also cut idle frames.
All headline and body content stays in HTML over the canvas; the tunnel is a backdrop, not a container. Don't paint any message into the moving geometry. Keep links and buttons as real DOM elements.
Choose a static backdrop when scroll-driven motion would distract from the copy, when performance is tight, or when the audience is mostly mobile. If the depth illusion isn't advancing the message, a still costs far less. Use the live tunnel only where kinetic depth is the hook.
Need a custom effect? Tell us what to create.