Vi3W
Skip to content

Guides

Making a 3D browser game with Three.js: one web studio's story

Making a Three.js game, through a web studio's story: Three.js vs game engines, GLB assets, physics, mobile performance and building models with Vi3W.

2 min read

Lines of code on a dark screen
Photo: public domain / CC0, via Openverse. Illustrative story.

Quick answer

Is Three.js good for games?

Three.js is a JavaScript 3D rendering library rather than a full game engine, but it is widely used for browser games and interactive 3D experiences. You add physics, input, audio and game logic with other libraries or your own code. It suits lightweight web games that load instantly without an install, with GLB models kept small.

Illustrative story. Pixel Harbour Interactive is a fictional company and this is a made-up scenario, written to show a realistic workflow. The people, numbers and outcomes in it are invented for illustration and are not a Vi3W customer's results. The tools, steps and Vi3W features are real.

A game that had to load in a tap

Pixel Harbour Interactive is a fictional web studio. A snack brand wanted a 3D mini-game for its campaign site: catch falling snacks in a basket, with a leaderboard and a prize draw. The catch: it had to load almost instantly from a social media link on a phone.

Three.js or a game engine?

The team compared options:

Blurred lines of code on a monitor
Photo: public domain / CC0, via Openverse.
  • Game engines with web export (Unity, Godot) produce bigger initial downloads.
  • Three.js: a lightweight rendering library, with physics and logic added as needed.

For a simple game where load time decided success, Three.js won. Our guide on 3D assets for web games covers the asset side.

Assets on a diet

Every kilobyte counted.

  • Snacks, the basket and a picnic scene (blanket, trees, a picnic table, a wicker hamper) were generated with Vi3W's text and image to 3D. The snacks came from the brand's pack shots.
  • Clean shape at low face counts, because a falling snack on a phone screen doesn't need detail.
  • Make it lighter to compress each GLB. See reducing GLB file size.
  • One shared texture atlas for the scene, to reduce downloads and draw calls.
  • Brand colours via New paint job.

The whole game's assets fit comfortably inside the studio's load budget.

Building it

  • Three.js for rendering, with the GLTFLoader for models.
  • Simple custom physics (falling objects and a basket) instead of a full physics library.
  • Touch input first, mouse second.
  • A loading screen that showed the scene progressively.

What changed

In this illustrative story, most players were in the game within a couple of seconds of tapping the link, and the brand reused the snack models for its product pages and ads.

Lessons you can steal

  • Pick the tool by load-time budget.
  • Keep models tiny and share textures.
  • Design for touch first.
  • Reuse campaign assets on the brand's site.

Make your game's props

Generate light GLB models ready for Three.js. Open Vi3W.

Frequently asked questions

is three js good for games

It's good for lightweight browser games and interactive 3D on websites, especially when instant loading matters. For larger games with complex editors, physics and tooling, an engine like Unity, Godot or PlayCanvas may be easier.

is three js a game engine

No. Three.js is a 3D rendering library. It draws scenes, cameras, lights and models; you add physics, input, audio and game logic with other libraries or your own code.

Last reviewed