Skip to main content
All notes
3DPerformanceCSSAccessibility

How I Built a 3D Hero Without Punishing Mobile Devices

Depth, particles, and responsive motion can coexist with performance when 3D is treated as progressive enhancement instead of a requirement.

3D can make a portfolio memorable, but it can also become the reason the portfolio feels slow.

My goal was not to build the most technically complex hero. It was to create a sense of depth while keeping the content readable, the controls responsive, and the mobile experience comfortable.

Use the cheapest convincing technique

A full WebGL scene is powerful, but it is not always necessary. For a profile image, CSS perspective with rotateX, rotateY, translateZ, layered shadows, and pointer-based movement can create convincing depth at a much lower cost.

The important detail is perspective. Rotation without a perspective parent looks like a flat image being skewed. Perspective creates the visual camera that makes the movement feel three-dimensional.

Budget the background

Particles are atmosphere, so they should never compete with the main thread.

I keep the particle count controlled, reduce opacity, avoid large blur areas, and slow down movement. On smaller screens or reduced-performance mode, heavy visual layers can be hidden entirely.

The hero still works because the headline, role, description, and calls to action do not depend on the particles.

Avoid constant React state updates

Pointer motion can generate many events per second. Updating a large React component tree on every event is wasteful.

For high-frequency visual values, motion values, refs, or direct transform updates are better choices. The React state should represent meaningful UI state—not every tiny movement of the pointer.

Design a graceful fallback

A strong 3D component has three versions:

Full — pointer-responsive depth and particles. Reduced — gentle automatic movement with fewer effects. Static — a polished image with a good border, lighting, and composition.

Each version should feel intentional. Reduced motion should not look like a broken version of the design.

Measure the experience that matters

A high frame rate is useful, but the practical questions are simpler:

Can the visitor scroll immediately? Does the heading remain readable? Can the navigation be used without waiting? Does the page remain stable while assets load? Does the phone stay responsive?

The result

The most impressive 3D work is not the effect alone. It is the engineering discipline that makes the effect disappear when it would hurt the experience.