3D on a website is easy to get wrong in two opposite ways. Some sites add a spinning model because it looks impressive in a pitch, and the page then takes several seconds to become usable on a mid-range phone. Others avoid 3D entirely because "it will be slow", and miss a genuinely useful tool for showing a product or telling a story.
We use Three.js on client sites and on our own. The Buddhiworks homepage has a 3D hero built with React Three Fiber. The Zelnex catalogue page has a field of floating capsules that reacts to the cursor, and our own 3D studio, ZYRA Studio, is where we try out motion and 3D presentation ideas before they go near a client build. This is the checklist we use to make sure the 3D earns its place without costing the business visitors.
First, decide what the 3D is for
Before any code, write one sentence: "The 3D on this page helps the visitor ___." If you cannot fill the blank with something other than "be impressed", the page probably does not need it.
Good answers we have seen:
- It shows the product from every side, when photos cannot (jewellery, furniture, machinery, packaging).
- It carries a story that would otherwise be a wall of text, such as a manufacturing process in stages.
- It gives a brand a recognisable signature, as long as it stays in the background and the content stays readable.
The answer decides the budget. A product viewer is the main content and may justify a larger download. A background effect should be tiny and should never block anything.
Keep 3D off the critical path
The single most important rule: the page must be fully readable and usable before the 3D loads. In a Next.js App Router project, that means:
const Scene = dynamic(() => import("@/components/Scene"), {
ssr: false,
loading: () => <div className="h-[480px]" aria-hidden />,
});
ssr: falsestops the server trying to render WebGL, which it cannot do anyway.- The dynamic import puts Three.js in its own chunk, so it is not part of the JavaScript every page needs to start.
- The
loadingplaceholder has the same size as the final canvas. This prevents layout shift when the scene appears.
Your headline, copy and call to action should be ordinary server-rendered HTML. If the Largest Contentful Paint element on your page is a WebGL canvas, the page will usually score poorly, and on a slow connection the visitor sees nothing useful for too long.
Watch the bundle, not just the model
Three.js itself is a substantial library. React Three Fiber and its helper libraries add more. Before blaming the 3D model, check what you actually ship:
- Run
next buildand look at the route sizes it prints. If the size of your homepage jumped after adding a scene, check that the scene is really dynamically imported. - Import only what you use. Helper libraries make it tempting to pull in a full environment, post-processing and controls for a scene that needs one light and one mesh.
- In
next.config.js,experimental.optimizePackageImportscan help tree-shake large packages that re-export many modules.
Make models small before they reach the browser
When there is a model file, it is usually the largest single download on the page. The usual steps:
- Export as glTF/GLB, the format Three.js handles best.
- Reduce the polygon count to what the camera actually shows. A model built for a print render often has far more detail than a 600-pixel canvas can display.
- Compress geometry with Draco or Meshopt, and compress textures, for example with KTX2 / Basis. Texture size is often the bigger win.
- Bake lighting into textures where you can, so the scene needs fewer real-time lights and shadows.
- Load the model after the page is interactive, and show a poster image until it is ready.
For many brand and background effects you do not need a model at all. Simple geometry (spheres, capsules, particles) generated in code downloads almost nothing.
Render less, and stop when nobody is looking
A 3D scene that renders 60 frames a second forever drains phone batteries and heats laptops. The best scenes do less:
- Pause when off-screen. Use an
IntersectionObserverto stop the render loop when the canvas scrolls out of view. - Render on demand for scenes that only change on interaction. React Three Fiber supports
frameloop="demand". - Cap the device pixel ratio. A
dprof[1, 2]avoids rendering at 3x on high-density phones, which can multiply the work with little visible benefit. - Use fewer, simpler materials. Physically based materials with several lights cost much more than a basic material with baked colour.
- Reduce particle counts on small screens. A field of hundreds of objects that looks rich on a desktop is often unnoticeable on a phone, and costs the same.
Respect motion preferences and accessibility
Some visitors have asked their operating system to reduce motion, often for medical reasons. Read the prefers-reduced-motion media query and show a still frame or a static image instead.
Also remember that a canvas is invisible to screen readers and search engines. Anything important in the scene (a product name, a key message, a process step) must also exist as real text on the page. Add aria-hidden to purely decorative canvases.
Have a fallback for devices that cannot cope
WebGL is widely supported, but not everywhere, and low-power devices may struggle. A sensible fallback chain:
- If WebGL is not available, show the poster image.
- If the device reports very little memory or few CPU cores, consider the poster image too.
- If the scene errors, catch it with an error boundary so the rest of the page still works.
The visitor should never see a blank box or a broken page because their device could not run your effect.
Measure on a real mid-range phone
Desktop development machines hide problems. Before launch, open the page on a mid-range Android phone on mobile data, and run Lighthouse in mobile mode. The numbers to watch:
- Largest Contentful Paint: the hero text or image should be the LCP element, not the canvas.
- Cumulative Layout Shift: should stay near zero if the canvas space is reserved.
- Interaction to Next Paint: a heavy render loop on the main thread can make buttons feel sluggish.
Real-user data from the Chrome UX Report in Search Console matters more than a single lab test, so check it again a few weeks after launch. Our Core Web Vitals checklist for Next.js App Router covers these metrics in more detail.
A short checklist
- Write down what the 3D is for. If the answer is "to impress", reconsider.
- Server-render the content; load the scene with
next/dynamicandssr: false. - Reserve the canvas size to avoid layout shift.
- Compress models and textures; prefer generated geometry for background effects.
- Pause when off-screen, cap the pixel ratio, render on demand where you can.
- Honour
prefers-reduced-motionand provide a poster fallback. - Test on a real mid-range phone before launch.
3D done this way feels like part of the brand rather than an obstacle. If you are planning an interactive site and want a second opinion on where 3D will help and where it will not, send us a note.