November 7, 2026 · 4 min read
A 3D sneaker store you can walk through, built with React Three Fiber
For a university project I swapped the product list for the inside of a 3D store built with React Three Fiber: first person, mouse look, sections that build themselves from the database, and a couple of drei traps.
In this post
In Information Technologies, part of a diploma course at UDABOL, the assignment was to design a few tables in Supabase, build an API for them and show the data. The usual answer is a product table with buttons. I took it to Aeternum, a second-hand sneaker and clothing shop, and instead of a table I built a store you walk through.
The data is fictional: the demo doesn’t touch the real shop’s database.

Version one: “it’s great, but it doesn’t look like a store”
The first version put the products on shelves floating in space. It looked good in a screenshot, but the shelves overlapped and you couldn’t tell where anything was. It didn’t feel like a store.
The second one I designed like a real store: walls, a front window, shoe shelves at the back, clothing rails along the sides, a table of caps, a podium with the featured pair, a checkout, fitting rooms with a mirror, plants, poufs and a neon sign. Each section has a sign with its product count.
The sections come from the database
What I like most about the project is that the 3D depends on the data, not the other way round. The categories table has a tipo field (shoes, t-shirt, hoodie, jacket, trousers or cap), and that field decides where each product goes:
- shoes → the back shelves;
- clothes → the rails on the side walls;
- caps → the table in the middle.
If a category is added tomorrow, its section builds itself. A sold-out product turns transparent. And the models (sneakers, t-shirts, hoodies, jackets, trousers and caps) are built from extruded Three.js shapes, without downloading any 3D files, in each product’s color from the database.
Walking and looking like in Minecraft
The player moves with WASD or the arrow keys and bumps into walls and furniture: every piece of furniture has a collision box.
To look around, at first you had to drag. It worked, but it felt awkward. I switched to pointer lock: you click the scene, the browser captures the mouse, and looking around feels as natural as in Minecraft. Esc releases it.
With the mouse captured there’s no cursor, so there’s a crosshair in the middle. Every three frames a ray goes from the crosshair into the products; if it hits one, it gets highlighted, and clicking opens its card (size, stock, condition and price) and releases the mouse. One detail: that same click immediately captured the mouse again. Now a click on a product is flagged and ignored for 300 ms.
There’s also a “what are you looking for?” search that walks you to the product and marks it with an arrow, and a minimap with your position.

Traps
The first empty <Html>. drei has an <Html> component to put HTML inside the scene (price tags, for example). With drei 10 and React 19, the first one to mount was always empty. It wasn’t StrictMode or Suspense. The practical fix was a sacrificial <Html> with a <span> at the start of the scene: the first one is lost and the rest work.
The streaks on the sneaker. To taper the sneaker toward the toe, I deformed an extruded geometry. That left streaks, because the cap is made of long triangles and the lighting interpolated badly across them. Subdividing the geometry left cracks at the seams. What worked was computing the normals by hand, from the derivative of the function that tapers the shape.
A slider that ate the arrow keys. Mouse sensitivity and walking speed are set with sliders. If one stayed focused, the arrows moved the slider instead of the player. Now sliders drop focus when you let go and the keys ignore them.
What I learned
- A 3D scene needs the rules of the place it represents: thinking of it as a store (sections, a path, signs) made it readable.
- Generating the 3D from the data lets the demo grow without touching the scene.
- Pointer lock completely changes how moving in first person feels.
- When a library fails in a strange but reproducible way, a practical, documented workaround is worth more than an afternoon of debugging.
The store is at aeternum-3d.rossmel.com and the code on GitHub.