Jordon Baade •
When Heavy Is Worth It — Three.js, WebGL, and the Wow Factor
Sometimes a flat page is not enough. You can optimize every CSS animation and lazy-load every image, and the result is still a page that feels like a brochure. Some projects need more than that.
In Part 1, we laid out the performance spectrum — the idea that every visual effect has a cost and the job is to spend wisely. In Part 2, we covered the lightweight end: CSS transitions, scroll-driven animations, and intersection observer tricks that cost almost nothing. This post is about the other end. The mid and heavy tiers. The tools you reach for when you are consciously choosing to spend Lighthouse points because the payoff is worth it.
These tools are not free. They add real JavaScript, real GPU load, and real milliseconds to your page. The question is never "is this fast?" The question is "is this worth what it costs?"
GSAP ScrollTrigger: the sweet spot for scroll storytelling
GSAP core plus the ScrollTrigger plugin comes in at roughly 45KB gzipped. Both are free for commercial use. That is not trivial, but it is not catastrophic either — it is about the same weight as a single hero image.
What you get for those 45KB is a category of animation that lighter tools simply cannot do. Pinned sections that lock in place while the user scrolls through content. Scrub-controlled timelines where the animation progress is tied directly to scroll position. Horizontal scroll driven by vertical scrolling. SVG path draw effects that trace along as you move down the page. CSS transitions can fade things in and slide things around, but they have no concept of "how far has the user scrolled?" That is what ScrollTrigger solves.
We built a scroll-driven showcase to demonstrate this in practice. The animations are tied to scroll position, not time. You scroll forward, the animation plays forward. You scroll back, it reverses. That connection between user input and visual response is what makes scroll-driven content feel alive rather than canned.
The typical Total Blocking Time impact is 20 to 50 milliseconds on mobile for script parse and eval. On desktop, you will barely notice it. On a slow mobile device, it is measurable but not painful. To keep it that way: defer the script, register the ScrollTrigger plugin only after DOMContentLoaded, and scope your ScrollTrigger instances to the sections that actually need them instead of applying them globally.
The verdict: GSAP is the sweet spot for scroll-driven storytelling. The cost is real but modest, and what you get back — pinned sections, scrubbed animations, horizontal scroll — is impossible any other way.
Three.js: when you need actual 3D
Three.js is a different weight class entirely. The core library plus OrbitControls comes in at roughly 180KB gzipped, loaded as ES modules from a CDN via import maps. No bundler overhead, but still a substantial amount of JavaScript the browser has to download, parse, and compile before a single triangle renders.
What it enables is also in a different class. Interactive 3D scenes. Particle systems with thousands of points responding to user input. Custom vertex and fragment shaders. Orbit controls that let users rotate and zoom into objects. Real-time lighting and shadows. We built four showcases to explore different use cases: a spinning globe, morphing geometry, a product configurator, and a terrain flythrough. Nothing else on the web platform does what these demos do.
But the cost is significant in three specific ways.
First, Total Blocking Time. Expect 50 to 150 milliseconds on mobile just for module eval. This is the biggest hit — the browser has to parse and compile a significant chunk of JavaScript before anything shows up. On desktop with a fast CPU, it is quick. On a mid-range Android phone, you feel it.
Second, Largest Contentful Paint. The canvas element is blank until Three.js initializes its renderer, builds the scene graph, and renders the first frame. That delays first meaningful paint. On a fast connection, you are looking at 200 to 400 milliseconds of blank canvas. On a 3G connection, it is measured in seconds.
Third, GPU load. A Three.js scene runs a continuous requestAnimationFrame loop. Even when the scene looks idle, the GPU is redrawing every frame. On mobile devices, that means real battery drain. Users will not blame your site — they will just notice their phone got warm.
Mitigation makes the difference between a responsible use of Three.js and a reckless one. We halve particle and vertex counts on mobile. We cap the pixel ratio at 1.5x on mobile devices (2x on desktop) to reduce the number of pixels the GPU has to shade. We pass powerPreference: 'low-power' to the WebGL context on mobile to hint the browser toward the integrated GPU. And critically, we lazy-initialize the 3D scene when it scrolls into view. If the Three.js section is below the fold, there is no reason to start the render loop on page load and burn resources the user has not asked for yet.
Raw WebGL shaders: maximum control, minimum JavaScript
Sometimes you want GPU-driven visuals without the weight of a library. Raw WebGL means writing the GLSL yourself and setting up the WebGL context by hand. No abstraction layer, no scene graph, no convenience methods. Just you, some shader code, and a canvas.
The JavaScript footprint is tiny — 3 to 5KB for the setup boilerplate plus your shader strings. Compare that to Three.js at 180KB. But the cost shifts from CPU to GPU. The browser barely has to parse any JavaScript, so Total Blocking Time is near zero. The GPU, however, is doing all the heavy lifting. On integrated mobile GPUs, a complex fragment shader with multiple noise octaves and lots of branching can drop frames fast.
We built a shader showcase to demonstrate this approach. Raw WebGL shaders are best for backgrounds, hover effects, and page transitions — situations where the shader runs on a single full-screen quad and there is no 3D geometry to manage. If you need orbiting cameras, mesh loading, and scene management, that is what Three.js abstracts. Rewriting those abstractions from scratch is not a good use of anyone's time.
Mitigation for raw shaders is GPU-focused. Render at lower resolution on mobile using a ResizeObserver to adjust the canvas backing size. Simplify the shader math — fewer noise octaves, fewer texture lookups, simpler branching. And throttle the requestAnimationFrame loop or pause it entirely when the canvas is not in the viewport. A shader burning GPU cycles off-screen is pure waste.
When to say yes
Heavy tools earn their cost in specific situations. Not every page. Not most pages. But these pages.
Hero sections where the first impression is the conversion. A SaaS landing page hero with a morphing 3D shape tells the visitor "we are technically sophisticated" before they read a single word. For developer tools, technical platforms, and design agencies, that visual credibility converts.
Product configurators where 3D interaction reduces returns. Furniture, automotive, jewelry — customers who can rotate a 3D model, change materials, and see the product from every angle convert at two to three times the rate of those looking at flat photos. The extra seconds of load time pay for themselves in fewer returns and higher confidence at checkout.
Interactive showcases and demos. This is literally what we built. The page is the product. If you are demonstrating a technical capability, a flat mockup undercuts the message. The demo has to be real.
Conference and event sites where memorability is the KPI. Nobody is searching Google for your annual conference page. They already have the link. Lighthouse ranking does not matter. What matters is that the page feels like an event, not a flyer.
Short-lived campaign pages. A product launch page that lives for six weeks does not need to compound SEO value. It needs to make an impression, capture leads, and get out of the way. Spend the Lighthouse points. The page will be gone before Google fully indexes it anyway.
When to say no
Heavy effects hurt more than they help in equally specific situations.
E-commerce product listing pages. Every 100 milliseconds of load delay costs roughly one percent in conversion. These pages need to load fast and rank high. Do not put a Three.js scene on a page where users are trying to find a product and buy it. Speed is the feature.
Content-heavy pages. Blogs, documentation, help centers, FAQ pages. The content is the experience. A spinning 3D background behind a blog post is not impressive — it is distracting. These pages should load instantly and stay out of the reader's way.
Mobile-first audiences on slow networks. If your analytics show 40 percent or more of your traffic comes from mobile devices on 3G or 4G connections, heavy JavaScript is a wall between your user and your content. A 180KB library that takes seconds to parse on their device is not a visual enhancement. It is a bounce.
Any page where organic search ranking is the primary traffic source. Lighthouse performance is a ranking signal. It is not the only signal, but it compounds over time. Spending 100 Lighthouse points on a Three.js hero on your main landing page means ranking lower for every query that page targets. On a page that depends on organic traffic, those points are not yours to spend.
Spend your budget where it counts
The best developers do not avoid heavy tools. They know exactly when to reach for them. A developer who refuses to use Three.js because "performance matters" is leaving impact on the table. A developer who drops Three.js on every page because "it looks cool" is costing their clients real conversions.
The performance spectrum is not about being fast at all costs. It is about treating your Lighthouse budget the way you treat any other budget — spending it where the return is highest and keeping costs low everywhere else. Put the 3D hero on your showcase page. Keep your product listings lean. Use GSAP for the pages that need scroll-driven storytelling. Use CSS transitions for everything else.
That is the framework. If you want the full picture from lightweight to heavy, start with Part 1 where we lay out the complete spectrum. And if you are trying to figure out where your site should land on that spectrum, we are happy to look at it with you.