Academy · Lesson 4 of 6 · · 1 min read
WebGL and 3D heroes
WebGL lets a web page draw with the graphics chip. It powers 3D models, particle fields and shader effects that react to the pointer and the scroll in real time. A 3D hero earns its weight when the visitor can do something with it, like turn a product, take it apart or change its color.
By the AnimatedWebs team · Animated websites from zero
Three words you need
- WebGL is the browser feature that talks to the graphics chip.
- three.js is a popular library that makes WebGL easier: scenes, cameras, lights and models.
- Shaders are small programs that run on the graphics chip for every pixel or point. They make effects like liquid metal, caustics on water or glowing gradients.
Kinds of 3D hero
- Product you can handle. Spin it, open it, change its finish.
- Particles. Thousands of points that form shapes and reshape as you scroll.
- Shader backgrounds. Full-screen effects that move slowly behind text.
- Simulators. A small world you can drive, like a robot or a town.
Examples from the catalog
Wren & Halloway ray traces a diamond live, and you move the light. Heightwell reshapes 10,000 cubes as you scroll. Resole flips a 3D sneaker onto its sole. Liquid Chrome Audio is a free template with a raymarched chrome effect. Browse them all in the 3D hub.
Keeping 3D fast
- Load the scene after the headline and the main button are on screen.
- Cap the pixel ratio on high-density screens, often at 2.
- Pause the render loop when the canvas is off screen or the tab is hidden.
- Use fewer particles and simpler effects on phones.
- Show a still image for reduced motion, or if WebGL is not available.
let visible = true;
new IntersectionObserver(([e]) => { visible = e.isIntersecting; }).observe(canvas);
function tick() {
if (visible && !document.hidden) renderer.render(scene, camera);
requestAnimationFrame(tick);
}
tick();Questions people ask
Does every phone support WebGL?+
Nearly all modern phones do, but some devices or settings turn it off. Always have a fallback image so the page still makes sense.
Is three.js the only option?+
No. You can write raw WebGL, use other libraries or use CSS 3D transforms for simple effects. three.js is common because it saves a lot of code.
Why is my 3D page slow?+
The usual causes are large models, too many particles, full-resolution rendering on dense screens and a render loop that never stops. Fix those first.




