Live: https://recent-waterlily-jsx.julius.site
A Mirror Cube is mechanically a Rubik’s Cube, but every one of the 26 pieces is a different size and all faces are the same mirrored gold/silver or maybe some custom colors. You solve it by shape rather than colour.
The part that took the most thought is the geometry. It’s tempting to model the unequal layers by putting the cut planes at unequal positions, but that breaks the puzzle: a 90° turn about X maps (y, z) → (−z, y), so the cut planes on Y and Z have to map onto each other or you can’t turn twice in a row. The cuts are symmetric at ±0.5 on every axis. The unequal layer widths come from offsetting the outer shell by 0.3 from the mechanism centre instead, which gives layer thicknesses of 0.7 / 1.0 / 1.3. So the centre of the visible cube is not the centre of rotation, which is correct and slightly unintuitive.
A consequence is that pieces can’t snap to a world grid. Each cubie group sits permanently at the origin and a turn is a pure quaternion rotation, with logical coordinates tracked separately and permuted on completion. Layer selection reads those coords, never world position. That’s what lets a thick piece rotate into a thin layer’s slot and stick out past the original silhouette. The solved bounding box is 3.0 units; after 30 scramble moves it grows to about 3.6.
Tiles are only generated on faces that are outward-facing when solved, 54 total, each a thin RoundedBoxGeometry standing slightly proud of a near-black body. Scrambling therefore exposes the black internal faces the way the real toy does.
Lighting is a procedural studio scene built in code and baked with PMREMGenerator, no external HDRI, so there are no asset requests. Background stays dark while the environment map does the reflection work. RenderPass → UnrealBloomPass (strength 0.35) → OutputPass.
Interaction: drag a tile to turn its layer, drag the background to orbit, and U D L R F B M E S with shift to reverse. Four metal finishes and a quality preset in the settings panel.
Feedback welcome, particularly on the tile material and whether the reflections read correctly on other GPUs
1 Like

