Back to Blog
Three.js3D InteractionPhysical MotionMini Games

3D Homepage Development Log 07: Rubik, Handheld, and a Swinging Badge

The final pass turned small props into local applications: layered Rubik turns, an in-model handheld arcade, and a finite spring-driven wall badge.

·1 min read

Once the room composition was stable, the Rubik cube, handheld, and hanging badge could support another kind of experience. Instead of approaching a reading entrance, focus temporarily turns the object into a directly manipulated local application.

Puzzle Geometry Is Also State

Rubik contains 26 independent cubies. A color-tile pointer hit records the intersection, face normal, camera basis, and current inspection quaternion, then maps screen drag to an equivalent F/R/U/B/L/D/M/E/S/X/Y/Z move. Drag outside the cubies changes only the complete inspection view. The keyboard table distinguishes uppercase base direction from lowercase inverse and presents both the initial scramble and restoration hint.

Focused Rubik puzzle with keyboard mapping and formula guidance

The handheld follows the same object-forward, room-back presentation grammar, but ends with its real screen facing the visitor. Tetris and Snake draw into a local CanvasTexture on the model. Arrow keys or WASD control play, R restarts, and exit restores the authored shelf pose.

Local mini arcade presented on the real handheld screen

Finite Physics Fits a Homepage Better Than a Permanent Loop

The badge front carries the Gothic H and “胡泽君 / Zejun Hu”; its back stores contact entrances. Focus subordinates the room and centres the badge. Pointer drag maps to two bounded swing axes, release returns through a finite damped spring, and flipping runs only while interaction is active. There is no permanent physics engine or endless RAF loop.

Focused hanging H badge

This date records the interaction framework. The next day's dedicated fix note continues with the delivered GLB orientation, real Rubik inverse formula, and drag limit. Keeping the posts separate distinguishes making an object playable from proving its coordinate logic correct.