Building a Sci-Fi Web Experience in Babylon.js + WordPress

Role: UX Designer / Frontend Dev
Tech Stack: Babylon.js, WordPress (AJAX), Custom Theme (CSS + JS)
Goal: Create a seamless, immersive sci-fi themed site where page navigation feels like moving through space, not loading a new page.


📐 Concept & UX Goals

From the outset, the experience had to feel like operating a sci-fi viewscreen. Every interaction, click, scroll and transition, should feel spatial and connected. We weren’t building a site, we were building a starship UI.

Our core UX goals:

  • Pages = Places: navigating to a new page would “move” the camera to a new area of the space scene
  • Minimal UI: reduce visual clutter to improve immersion
  • Asynchronous Loading: no full reloads, just transitions
  • Scene-Integrated Navigation: content and environment exist in the same universe

🌌 Babylon.js Scene

I started by crafting a Babylon.js space environment:

  • A static camera at (0,0,0)
  • Distant stars, planets, nebulae
  • A configurable offset vector allowed us to simulate movement through the universe by shifting the rendered positions of celestial bodies

Rather than move the camera itself (which could break large-scale visual fidelity), I updated each object’s render position based on the current offset, simulating “traveling” to content.

jsCopyEditlet renderPosition = originPosition.subtract(offset);
mesh.position.copyFrom(renderPosition);

🚀 Navigating with Offset

Each WordPress page was mapped to a specific position in space. Navigating to /about might move the scene’s offset to (5000, 0, -10000). I added smooth interpolation with easing so it felt like flying:

jsCopyEditoffset = BABYLON.Vector3.Lerp(offset, targetOffset, speed);

🔁 Asynchronous Content Loading

Using AJAX (wp_ajax in PHP), I loaded pages dynamically without reloading the scene:

  • All links intercepted via JavaScript
  • Pages loaded via jQuery.ajax
  • The HTML content (usually .entry-content) was swapped into the DOM
  • Babylon’s update loop persisted across transitions

Each request returned HTML fragments from WordPress templates (get_template_part()), not full pages.

if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
get_template_part('template-parts/content', 'page');
}
}

🧠 UX Considerations

  • Minimal layout: No bulky header or footer. Just a soft HUD-styled logo and a subtle menu tucked in the corner.
  • Focus on content: Each page block hovered in the scene like a projected panel, with thin neon borders and glowing text.
  • Consistent frame: Scene stayed loaded at all times, which made transitions feel native, not like switching pages.

💫 Design System

I defined reusable styles that mirrored Star Trek and Mass Effect interfaces:

  • Typography: Orbitron, VT323, and glowing letter shadows
  • Menu: A semi-transparent, floating “command stack” with expanding tree-like submenus
  • Page container: 3D-transformed <article> blocks that could rotate slightly with scroll to simulate perspective
  • Animations: Fade-ins, pulse highlights on hover, glint effects on logos

🔧 Challenges

  • Camera vs. Offset: Avoiding actual camera movement helped prevent precision issues at astronomical scales.
  • Dynamic Element Bindings: We had to re-bind event listeners and re-init transitions after each AJAX load.
  • Performance: Particle systems (like nebulae) required LOD toggling and distance culling to keep the experience smooth.

🧩 Tying It All Together

Every piece, navigation, animation, styling, and spatial layout feeds into one consistent UX metaphor:

You’re not browsing a website. You’re navigating a ship’s digital log interface.


✅ What’s Next

Building My First AI WordPress Agent: A Developer’s First Experiment with Local LLMs

Tired of the same repetitive tasks? Could AI actually automate the boring stuff, or is it just another overhyped tool?

I decided to build an AI-powered agent that could help manage my WordPress sites. Something that could understand context, take actions, and automate tedious dev/admin tasks I’d normally do by hand.

I want it to:

  • Receive natural language instructions (e.g. “clear all caches” or “create a blog post with these specs”)
  • Interpret what I meant, not just what I said
  • Trigger real-world actions via WordPress CLI or REST API
  • Run locally (no cloud dependencies, no vendor lock-in)

Basically: an intelligent shell script with a brain.


🧰 Tools I Used

  • 🧠 DeepSeek Coder 6.7b – A locally hosted language model running through Ollama, fast and responsive
  • 🧩 Node.js backend – Simple REST interface for prompt sending and response parsing
  • ⚙️ WordPress CLI / REST API – Execution layer for real actions
  • 🛠️ Custom instruction layer – Wrapped the LLM output with a JSON validator/parser to ensure structured commands and retry if the model was off

🧪 The Architecture

  1. Input: I send a prompt like “Can you list the 10 latest draft posts and convert them to published?”
  2. LLM Response: DeepSeek parses that into a structured JSON plan: jsonCopy{ "action": "update_posts", "params": { "status": "publish", "filter": "draft", "limit": 10 } }
  3. Validator: My wrapper checks it, retries if needed, or rejects unsafe commands
  4. Executor: Runs wp post update or REST equivalent and returns success/failure

It’s modular, secure-ish (I’m still locking it down), and after a lot of trial and effort, it is beginning to feel like magic.


🧠 What Surprised Me

  • Local LLMs can be a useful tool : With the right prompting, even a local 6.7b model is incredibly capable, however, getting the prompt format and composition right by filtering the input is most of the battle.
  • They’re also fragile: Without strong validation, they’ll give you confident nonsense. Guardrails are critical.
  • JSON output wrapping is your best friend: Teach the model to respond as a tool, not a poet, and you’ll eventually get consistent responses.

🧱 What’s Next

  • Expand it to use the REST API, to increase capabilities
  • Integrate with server-side shell tasks (upgrades, backups, etc.)
  • Maybe even let it run scheduled audits and suggest updates before I need them

🚀 Final Thoughts

This project was my first dive into applying AI in a practical way right now, and learning how to develop LLM wrappers from the ground up, without relying on cloud services. Running an intelligent local agent that speaks my language and interfaces with my tools feels like the start of a new wave of devops automation.

If you’re a developer and haven’t played with local LLMs + CLI/API integration yet… it might be time to start.

Got questions or want to build something similar? Reach out on LinkedIn or check out the repo at github.com/doctarock.

Hey, I’m Derek – I Build Stuff

Welcome to my corner of the internet.

I’m Derek Robertson—developer, systems guy, occasional designer-wrangler, and all-around problem solver. I’ve been in the game for over 25 years, turning clunky, chaotic systems into smooth, scalable digital solutions. Right now, I’m part of the crew at Buildxact, working at the intersection of SaaS, construction tech, and real-world usability.

What I Actually Do

My background spans full-stack development, content platforms, e-commerce, CMS architecture, integrations, UX optimization, DevOps, and a healthy dose of “how do we make this thing talk to that thing?” I’ve worked on cross-platform apps, internal tools, customer portals, and websites that handle millions of requests a day.

I’ve worn many hats: developer, team lead, systems designer, tech translator, bug hunter, and mentor. If you need someone who can build it, fix it, streamline it, or make sense of it — I’m your guy.

Tools of the Trade

Tech-wise, I work mostly with:

  • PHP, C#
  • JavaScript / Node.js (React)
  • SQL, GraphQL, REST APIs
  • Azure, Git, Copilot
  • Photoshop, Krita, GIMP
  • Virtualmin, CPanel

But honestly? I care more about why we’re building it than what stack it’s on.

Why It Matters

I like working on things that help real people do real work. Whether it’s helping builders quote jobs faster, making internal systems suck less, or improving onboarding flows that reduce support calls—I’m all about meaningful improvements. If we can cut steps, reduce errors, and give users more confidence in their tools, that’s a win.

What You’ll Find Here

This blog is a place for the stuff I wish more people talked about:

  • Building smarter, not bigger
  • Lessons from the field (and the dev trenches)
  • Dev workflows that actually save time
  • UX decisions from a dev’s point of view
  • And probably a few war stories along the way

Thanks for stopping by—feel free to reach out if you want to chat code, ideas, or the weird bugs that keep you up at night.

Catch you in the next post.
– Derek