RIRRI'S: a rainy-night convenience store as a portfolio

Hiiiii all!! I am Iris Li and I built my portfolio in three.js: RIRRI’S, a small interactive Japanese convenience store on a rainy evening, try it hereeee: https://world.irisli.dev/

Projects sit on the shelves as products (selected work on the Deli & Sweets shelf, experiments in the ice-cream freezer, older work on the magazine rack). Picking one up opens its case study. The whole world has seasons, time of day and weather, there’s an oden warmer by the register, and a second island has a House you can walk into.

Built with three.js r169 and GSAP, no framework. A few things (hopefully can be useful to others here :))) ):

  • Draw calls on phones. The store was asking a phone for 846 draw calls a frame. I got it to 531 by merging static meshes by material and by colour (a per-vertex material index plus a uniform array of the original materials’ Color objects, so recolouring for seasons still works), checked pixel by pixel against the old build. Full method and numbers: How to Reduce Three.js Draw Calls Without Changing a Pixel

  • Proving “nothing changed.” Seeded random, a hand-driven clock, camera drift and particles paused, then a Playwright pixel diff. The same build against itself went from 1.93% differing pixels to 0.007% once everything was held still.
  • First visit. Almost all of the cold-start wait is the GPU preparing about 60 shader programs, so the new programs the merge needs are built in the background once the store is showing.

Happy to answer questions about any of it :heart_eyes: :heart_eyes: pls connect!!! The project records (plain text, for when 3D is too much) are at Projects by Iris: Apple Watch apps, AI agents and tools

3 Likes

Nice! Selecting the store is a little strange on Mobile in portrait view it seems to sometimes select the mailbox and sometimes the store.

Otherwise it’s very cool. Good job.

1 Like

Thank you for the feedback :heart_eyes: ! I am working on a fix and will update it soon. Glad you enjoyed it :slight_smile:

1 Like

Your cold-start note matches what I measured on my own scene. A ~140 KB raymarch shader compiled inside the first render() blocked the main thread for 2.7 s on an integrated GPU through ANGLE/D3D11, and compileAsync with KHR_parallel_shader_compile let the page keep responding while it compiled. One detail that matters: compile with the render target bound that the pass will actually draw into. Output color space and tone mapping are part of the program, so programs warmed against the screen are different ones and get built again on the first real frame. Are your merged programs warmed against their final targets?

1 Like

Thank you so much for sharing this! Your comment got me to take a closer look at my own rendering pipeline. I went back and checked a few things:

For the merged World meshes, yes: I was already using compileAsync with the composer’s half-float target bound, which matches the main World pass’s linear output configuration. Tone mapping happens later in OutputPass, and the merged meshes only become visible once compilation resolves.

I also found it helpful to track program links during warm-up and again on the first real frame to see which programs were actually being reused. That also helped me find a few other passes that were still compiling shaders on the first frame, and I’ve put together a plan to work through those. I haven’t got reliable before/after numbers yet, but I really appreciate you pointing this out!

Glad tracking the links turned up the stragglers. One trap I hit with passes that live outside the renderer, like a full-screen shader on its own context: reading COMPILE_STATUS or LINK_STATUS right after linkProgram makes the driver finish the work on the spot, so the parallel extension never gets to help. In my case a ~380 ms task at page change was about half waiting on that link. Polling COMPLETION_STATUS_KHR once per frame and reading LINK_STATUS only after it reports done moved that off the commit that paints the page. Which passes were still compiling on your first frame, the rain or the post chain?

You have plans to add any sound?

I’m so glad someone asked this!! Yes!! There’s a sound toggle in the top-right corner, but I have it muted by default so it doesn’t catch anyone off guard haha.

Once you turn it on, you’ll hear different ambient sounds depending on the weather, plus sound effects when you interact with things. And in the house, there’s a speaker on the left where you can pick your own music! (Switching songs is a lil tricky on mobile rn, but I’m working on a fix!)

I spent quite a bit of time on the audio too, so I’m really happy you brought it up!! :)) hope you enjoy!

1 Like

Thanks for the notes! It was mostly the post chain, plus sea/blit. Rain was already warmed up. Turns out I’d warmed those passes with the World’s lights and shadows, so the first draw needed different variants. Fixing that mismatch got rid of 11 duplicate links.

I also went back and checked the status reads after your comment. In my Chrome trace, those passes had completed before I read LINK_STATUS, so I don’t seem to be hitting the same issue there.

The shelves-as-categories idea works because people already know what a magazine rack means. We went the other way: a city where each brand is a building, and a challenge for us was keeping 320 lots readable from far away. Did you test how many projects a shelf can hold before it stops reading?

I haven’t tested the upper limit yet, so I can only speak to the current setup: there’re 6 selected projects on the deli shelf, each with a different package shape. When you select one, the camera moves closer and its project label appears, which means you don’t have to read everything from the overview. The magazine rack opens the archive as a page, so adding older work doesn’t crowd the shelf, although I still need to test how the shelf itself holds up with more projects. What ended up helping most with keeping your 320 lots readable from a distance?