Skip to content
Back to the lab

three.js + inertial drag

A 3D desk you can drag to spin

A 3D desk model from the old portfolio: it turns to face the front on entry, the screens slowly change brightness, and after a drag it keeps turning with inertia.

Source · GitHub

The original model was 8.5 MB; gltf-transform (Draco + 1024px WebP) brought it down to 1.1 MB, and the Draco decoder is self-hosted. It loads only when it enters the viewport, renders at 30 fps while idle and at full rate during a drag, and is not loaded at all under Save-Data. The wheel controls zoom only in the area directly over the desk; elsewhere the page scrolls as usual. The two arrows at the lower right turn it an eighth of a circle per press, for keyboards and touch screens.

“Gaming Desktop PC” by Yolala1232 · Sketchfab · CC-BY-4.0

Source

Source files on GitHub:

Back to the lab