GLB and AI Agents: How to Control 3D Models Through Code

GLB models can store geometry, materials, textures, and animations in one file. Here’s why controlling their parts with AI agents and three.js caught my attention.

Avatar photoOleksii Strokan2 min read
GLB and AI Agents: How to Control 3D Models Through Code

Lately, I’ve been running into more and more interesting examples of AI agents working with 3D graphics and animation.

Usually, when people talk about 3D, you immediately think of Blender, complex editors, and hours of working with models. But it turns out that for certain tasks, a much simpler approach works fine.

Recently, I paid attention to the GLB format.

What Makes GLB Interesting

GLB is a binary format based on glTF 2.0. A single file can store geometry, materials, textures, the scene structure, and animations.

What is particularly interesting is that a model can consist of separate, named elements.

For example, if we have a 3D model of some device, an AI agent can use code to find specific parts, change their positions, rotate them, hide them, or animate them.

To render it in the browser, you can use three.js, which supports GLB via GLTFLoader.

This creates a pretty interesting workflow:

  1. The agent creates or loads a 3D scene.
  2. It controls its elements using JavaScript.
  3. It displays the result in the browser.
  4. It checks the image and makes adjustments if necessary.

Of course, this doesn't mean Blender is no longer needed. Creating a high-quality, complex model from scratch is a separate task on its own.

Why I Find This Interesting

I experiment a lot with AI agents and am constantly looking for new ways to apply them in web development.

Interactive 3D illustrations can be useful for product presentations, explaining complex processes, or demonstrating how various pieces of equipment work.

And I like the very idea of controlling such graphics programmatically.

Instead of manually repositioning every object in an editor, you can describe to the agent what needs to happen and then check the result directly in the browser.

Naturally, I suspect that during early experiments, fixing things will take just as much time as making the animation itself 🙂

But these are precisely the kinds of tools I enjoy exploring. Let's see how well this approach actually works in practice.

Let's build together

Have a project or idea in mind?

From high-converting websites, landing pages, and speed optimization to custom plugins, APIs, and AI tools — I handle the engineering end-to-end.

  • Custom WordPress systems
  • Plugins, APIs and integrations
  • AI-powered products
  • Long-term support

Have a project or idea in mind?

    Tell me what you’d like to create and how you imagine it.

    I’ll reply within a few hours.