A degreaser brand's website, redesigned as a 3D dive in under three days
A degreaser brand asked for a better website. I built a React Three Fiber site where scrolling sinks you through layers of grime until its mascot rises out of the dark. The page renders from 70 KB of JavaScript, and the 3D scene loads after it.
The problem
A degreaser brand for auto-repair shops asked for a better version of its website. The old site already had an underwater theme with a cartoon mascot and a WhatsApp quote button. I wanted the new one to look nothing like a template. The brand's tagline invites you to dive in, so I took it literally: scrolling is a descent through dust, grease, burnt oil and carbon, and the mascot, which stands for the product, rises out of the dark to meet you. The hard part was weight. A full 3D scene could not delay the sales copy or block the links on top of it, and it still had to run on a phone.
What I built
- A WebGL scene fixed behind the page. It ignores pointer events, so every link and section on top stays clickable and scrolls as usual. The cursor is tracked with one window listener instead of raycasting.
- A descent driven by the scroll. The water darkens through four color stops, the fog thickens, the sunlight and the light shafts fade, and a green light from below grows. A depth gauge counts down to −3,800 m and names the layer of grime you are passing.
- The mascot: a rigged 3D model with its own swim cycle, which I play at 55% speed and tint toward the brand's lime green. It drifts toward you along a short curve and turns to follow the cursor. Near the bottom it sinks into shadow, and only its eyes, pinned to the head bone, stay bright.
- Marine snow: 500 particles on desktop and 200 on touch screens. Their fall and drift run in the vertex shader, so each frame the CPU only advances a clock.
- A fallback creature built from code. If the model file is missing or fails to load, an error boundary swaps it in and the scene is never empty.
- The sales content in the order the brand already used: the problem, the solution, four uses and the product sizes, each size with its own WhatsApp quote link. Lenis gives the scroll inertia, the menu glides to each section and a last button takes you back to the surface. The WhatsApp number and the product sizes are still placeholders.
How it works
Scroll progress and cursor position change every frame, so they live in a plain module outside React. The 3D components read it inside useFrame. The depth gauge runs its own requestAnimationFrame loop and writes to the DOM only when the meter value changes, so scrolling never sets React state. One component damps the raw scroll value and the rest read the smoothed one. A fast flick still moves the scene at a calm pace.
The 3D scene is its own chunk, loaded with React.lazy. The page's JavaScript is 70 KB gzipped and renders first. three.js and the scene code follow in a 258 KB gzipped chunk, and the 2.7 MB model file downloads after that.
I started with a bloom pass from the postprocessing library. With React Three Fiber 9 it drew into only a strip of the viewport, so I removed it. The glow behind the mascot and the glow of its eyes are additive sprites. They cost less and look the same on a phone. Antialiasing is off, since the fog and a film-grain overlay hide the edges. The pixel ratio is capped at 1.5, and drei's PerformanceMonitor drops it to 1 when the frame rate falls.
The model came with a skeleton. Copying it with scene.clone() left the bones pointing at the original, and the mesh rendered deformed at twice its size. I clone it with SkeletonUtils and measure it in its current pose, then scale it to a fixed size. On top of the swim cycle, a sway at 30% strength, injected into the vertex shader, moves each vertex by its distance from the body's center: the tips ripple and the body barely moves. The sway pushes vertices outside the model's original bounds, so I turned off frustum culling to keep it from vanishing at the screen edges.
My first versions moved the mascot along a long path tied to the scroll. People scroll fast, and it zigzagged until it looked jerky, even comic. I cut the path to one short Catmull-Rom curve with even speed, kept the mascot in view from the first screen and moved the drama into the light. Every motion and color value sits in one commented config file, so tuning the scene does not mean editing components.
Results
- 70 KB
- gzipped JavaScript for the page, which renders before the 3D scene arrives
- 258 KB
- gzipped 3D scene, loaded as a separate lazy chunk
- < 3 days
- from the first source file to the final build (Jul 10–13, 2026)
- 1,403
- lines of JavaScript and JSX across 17 source files
Who else worked on it
The mascot's 3D model and its swim animation are a third-party Sketchfab asset under CC BY 4.0, credited with a link on the page. The product copy and the colors come from the brand's flyer and its existing site. The fonts come from Google Fonts.
Full stack
React 19, Vite 6, three.js 0.180, React Three Fiber 9, drei 10, three-stdlib (SkeletonUtils), GLSL (vertex shaders via onBeforeCompile), glTF / GLB, Lenis, JavaScript (ESM), Google Fonts