Live demo Explore freely — changes are disabled and everything resets daily. Try the staff panel
← All work
3D Art

Prism Cube

A stylised 3×3 puzzle cube built procedurally and shipped as a lightweight glTF model you can spin right in the browser.

GLB · 40 KB

Prism Cube is a small study in procedural modelling. Every cubelet, sticker and bevel gap is generated from code, so the whole model weighs in at around 40 KB and loads instantly.

What to try

  • Drag to orbit around the cube.
  • Scroll or pinch to zoom in on the sticker insets.
  • Open fullscreen to see the soft studio lighting.

The palette borrows the studio colours: teal, cyan and violet on a deep navy plastic body.

Code

Python Placing the cubelets 11 lines
SIZE, GAP = 0.3, 0.025

for x in (-1, 0, 1):
    for y in (-1, 0, 1):
        for z in (-1, 0, 1):
            centre = [x * (SIZE + GAP), y * (SIZE + GAP), z * (SIZE + GAP)]
            for axis in range(3):
                for sign in (1, -1):
                    add_face(centre, axis, sign, BODY_COLOUR)
                    if (x, y, z)[axis] == sign:  # outer face gets a sticker
                        add_sticker(centre, axis, sign, FACE_COLOURS[axis, sign])