From pathfinding to custom sky shaders, here is how our Saturday code club brought our website’s stories to life.
What starts as a simple idea at Saturday code club rarely stays simple for long. Our goal this weekend was straightforward: build a clean, lightweight way to showcase articles and photography on our WordPress site. Instead of making yet another grid of thumbnails, we asked, “What if we built an actual room you could walk around in?”
After all, if we’re a virtual program, why not have a virtual gallery space too! A few hours, plenty of coffee, and a bunch of JavaScript later, we had a full 3D exhibition hall running right inside a WordPress shortcode.
To keep things fast and avoid loading bulky game engines, we built the entire environment in vanilla JavaScript powered by Three.js. Rather than hardcoding images, the gallery fetches our actual WordPress posts, measures each photo’s aspect ratio, builds a custom 3D frame around it, and mounts it onto the gallery walls without overlapping corners or doorways. Clicking any piece slides open a clean reading panel with the photo’s caption, a decoded excerpt, and a direct link to the full story.
Getting movement to feel natural on both laptops and phones was half the fun. On desktop, you can use classic WASD keys with adjustable walking speeds, or click anywhere on the floor to stroll over to a specific spot. Under the hood, we wrote a lightweight pathfinder on a half-meter grid paired with a line-of-sight click detector. That combination stops visitors from accidentally clicking through walls into adjacent rooms while letting them tap a spot on the floor or exterior sidewalk and smoothly navigate around benches and columns.
On mobile, we tapped into the phone’s built-in gyroscope, so visitors can physically tilt and turn their phone to look around the room hands-free.
Try It!
This version, which is a bit rough, works best in a browser like Chrome.
Adding some Atmosphere!
Of course, we couldn’t resist adding a few atmospheric extras once the walls were up. Outside the gallery windows, we built a custom shader sky dome that cycles smoothly from daylight through dusk into night, complete with drifting clouds, stars, a moon, and multi-wave northern lights that ripple and dance overhead after dark.
We also added a toggleable flashlight beam attached to the camera for late-night browsing, a quick return-to-entrance button if you wander too far outside, and a streaming background audio player that politely waits for you to hit play instead of auto-blaring when the page loads.
The best part of a project like this isn’t just that it works—it’s seeing how a bit of math and JavaScript can turn flat web pages into a place you genuinely want to explore. Between debugging why the northern lights looked like stiff vertical bars at first and testing the phone-tilt controls by spinning around in our chairs, it reminded us why we show up on Saturdays in the first place.
It’s not perfect. We’ll admit that. We weren’t trying to make a masterpiece. This was yet another of our fun weekend experiments. But we did have a ball of fun. And if you do try it out, we would very much like to know what you think, so contact us and let us know!
