Whenever I had a spare moment, I built small samples of interactions I wanted to try, the way you jot ideas down in a notebook. None of them made it into a real product, so I gave them a room of their own.
Interaction Library is a small room drawn in Three.js. Every notebook on the shelf holds one sample. Point at one and a live preview rises above the shelf. Click, and the notebook comes out, turns to face you and opens, with the sample already running on its right-hand page. Click the page and the sample fills the screen.
There are eleven samples so far, each named for one movement of the hand, like Drag, Skew, Zoom, Throw and Strum. The photos in them are my own, from everyday life. The room has a few small things of its own too. The lamp has a pull cord, the window's sky follows your local time, and the clock on the bookcase keeps the real time.
Three things I learned building it
Let the parts of a movement overlap. My first version opened a notebook in steps. Pull it out, turn it, open the cover. It looked mechanical. Now each part has a window inside one 1.6-second move, and the windows overlap, so nothing waits its turn.
// windows as shares of one 1.6 s move, shelf to open spread
const OUT = { tip: [0, 0.34], turn: [0.2, 0.9], open: [0.28, 1] };
// p runs from 0 to 1 over the move
const win = ([a, b]) => easeInOut(clamp((p - a) / (b - a), 0, 1));
book.quaternion.slerpQuaternions(onShelf, facingYou, win(OUT.turn));
cover.rotation.y = -openAngle * win(OUT.open);
Keep the frame of the click light. Opening a notebook writes both of its pages into canvas textures. Uploading them in the frame of the click took about 5 ms, or 12 ms at a larger size, a big share of one frame. Now they wait in a queue and go to the GPU one per frame.
// in the render loop
if (queue.length) renderer.initTexture(queue.shift());
A WebGL page can still be a web page. Arrow keys move along the shelf, Enter opens a notebook and Esc steps back. prefers-reduced-motion stills the idle movement, and the page carries a plain HTML version with real links for screen readers and search engines. Lighthouse gives it 100 for accessibility, best practices and SEO, on desktop and on phones.
Stack
Three.js for the room and five of the samples, Canvas 2D for five more, and DOM transforms with GSAP for Drag, all in plain JavaScript. Phones get a lighter room with a smaller shadow map, and a sample is only built when its notebook is touched.
Try it at library.jjangik.kr.
Which one feels best under your hand? I'd love to hear.

Top comments (4)
The overlapping-windows idea is lovely — treating the 1.6s move as one gesture instead of three steps is exactly the kind of detail that makes an interaction feel physical rather than scripted. One question: with prefers-reduced-motion on, do you skip the notebook opening animation entirely, or shorten it to a simple fade? I am curious how you keep the room navigable by keyboard when the motion is reduced, since the shelf position is part of the experience.
Thanks! With reduced motion, the opening stays as it is, since moving from the shelf to the page is how you get around the room. What stops is the motion that's only for show, like the lamp's sway, the mobile and the view leaning after the cursor. The clock also turns half way round instead of two and a half times. The keyboard works the same either way. Arrows move along the shelf, Enter opens a notebook and Esc steps back.
The overlapping timing windows idea stuck with me — 1.6 seconds with tip, turn, and open all running on overlapping windows instead of in sequence explains why the motion feels hand-made rather than mechanical. I also liked that you kept the click frame light by queuing the canvas textures one per frame instead of uploading both at once. Of the eleven, which sample was hardest to get feeling right under the hand — was it one of the throw or strum gestures, or did Drag with GSAP take more tuning than the Three.js ones?
It was Bend, the one I put the most work into early on. The photos have to bend more or less with how hard you scroll, and getting that bend to feel right was the hard part. It's also where the whole project started. I first planned it as the front page, a list that bends as you scroll, before it went onto the shelf as one of the samples. So it's the one I remember most.