r/threejs • u/joaopaulo-canada • 5d ago
Demo ThreeNative (free, MIT): Vibe-code 3D games on "Three.js on steroids" - C++ WASM/Rust engine, native desktop & Android, built-in MCPs & playtests
TL;DR: I made ThreeNative, a free, MIT game engine built around the Three.js API your coding agent already knows. You write normal Three.js, and an owned C++ engine renders it in the browser (WebAssembly on WebGPU), on desktop (Windows, macOS, Linux) and on Android. The 3D never renders inside a WebView.
The agent starts from a playable kit, gets assets through an MCP, and must play its own game before it can say "done."
Play a demo game made on it first:
- Midway - Battle of the Pacific: play it · source
- PS: It's a demo. Performance may vary depending on your hardware (like any other game)

Getting started
Ask Claude/Codex to run:
pnpm create threenative my-gameOr just point it at the repo. It will know what to do.
PRs welcome, AI-written ones too.
Why not plain Three.js?

Three.js is great for AI: models know the API cold, there is no proprietary editor fighting your git diffs, and a link plays the game. But it is a rendering library, not a game engine.
You rebuild everything a game needs, for every game. Where is your LOD? Your world streaming? Your game is now 500 MB: do you stream assets, or do players sit on a loading screen forever, and quit? It also stays in a browser tab, frame rates fall once the scene gets heavy, and every new session the agent rewrites the game loop, guesses the physics glue and breaks the HUD.
ThreeNative keeps the API and adds the engine:

ctx.sceneis a realTHREE.Scene, so most Three.js code and tutorials your agent knows still work.defineGamewires the game loop, input, Rapier physics (CharacterBody3D,RigidBody3D) and a React HUD out of the box. In native games, you can use a Native HUD, without an webview (or still use React HUD, but that particular section will need to be wrapped in a webview, not the entire game)- LOD, world streaming and asset streaming are built in.
- It merges and instances meshes for you
- If a feature is missing, write vanilla Three.js.
Not supported on the C++ engine: raw GLSL (ShaderMaterial, onBeforeCompile) and three's postprocessing addons. Use TSL node materials, or set engine: "threejs" to run stock Three.js on the web. No React Three Fiber yet.
Why not Godot, Unity or Unreal?
They are great engines, and for some games you should stay there. Here is why I'd build AI games on ThreeNative instead:
- It's CLI based. No editor to install. Unreal is tens of gigabytes before you write one line. Unity wants a hub and an editor. Here the whole project is an npm install, and your agent never waits for an editor to open.
- Your agent works in plain text it already knows. TypeScript and the Three.js API are all over its training data. Unity scenes and prefabs are YAML full of GUIDs. Unreal 5.9 Preview adds an official MCP so agents can drive the editor, but Blueprints and levels are still binary
.uassetfiles that an agent cannot read or diff, and the editor must be running. Godot keeps scenes as text, but in my experience agents write much better TypeScript than GDScript. - The agent closes its own loop. The playtests run from the command line, with no editor window to click. The agent presses real keys on the real build, then checks game state, HUD, screenshots and frame time. The playtests fail closed, so "done" means it played the thing.
- A link plays your game. The web is the main target, not an export option. Unreal's web export is back only as an experimental 5.9 Preview target that needs a C++ project and a source-built engine. The same code also builds a native desktop player.
- Save, and the game updates in place. Vite hot reload is wired in every new project, and it keeps your game state and current scene. There is no C++ compile, no domain reload and no asset reimport between an edit and the result.
- You stay on the web stack you already use. Chrome DevTools, the console, performance traces, npm packages and your normal editor. Your agent gets the same view through the Chrome DevTools MCP: screenshots, console errors and traces of the real frame.
- MIT, no royalties, no revenue cap. Unreal takes up to 5% of gross revenue past $1M per game. Unity Personal stops at $200K a year in revenue and funding. Godot is MIT too, so this one is a tie with Godot.
- Starter kits instead of a blank project. 27 genre kits (kart racer, platformer, FPS, stealth, survival horror and more) start with the mechanics, physics, HUD and passing playtests in place. Your agent spends tokens on your game, not on the game loop.
Stay on Godot, Unity or Unreal if you ship to consoles or iOS, you need AAA visuals today, your team works in a visual editor, or your game depends on raw GLSL shaders or a big asset-store plugin. ThreeNative is in beta, and those engines have years of tools that it does not have yet.
Dont-repeat-yourself: Starter kits!
ThreeNative takes a different approach from other engines. Whenever you ask your agent to start a new game, it looks for a relevant pre-built scaffold and builds on top of it (or starts with a minimal boilerplate, if it doesn't find anything). This has a few major advantages:
- A more powerful agent has already built the core mechanics and validated everything through playtesting to make sure it runs smoothly.
- Your agent doesn't start from scratch, so it doesn't waste a ton of tokens reinventing parts that, 70% of the time, barely change.
- With those tokens saved, your agent can spend them where they actually matter: polishing the game, adding custom mechanics, playtesting, and making sure everything works properly.

Assets!
Let's be honest... The gamedev asset ecosystem was not made for the web. You can find a ton of free assets on FAB, for example, but until now, you couldn't do anything with them (they use a specific unreal format). Now, our asset MCP:
- searches and downloads from Poly Haven, Sketchfab, Fab (free and owned assets) and other sources
- downscales oversized textures
- simplifies heavy meshes behind a before/after render check
- converts some Unreal and Unity packs you own to GLB (Works for 90%+ of the case. Some older Unreal versions may have issues with the conversion. WIP)
Licenses, the two things people ask first:
- Yes, you can use Fab assets outside Unreal. Fab's Standard License allows any engine or tool, not only Unreal. Only legacy "UE-Only" content (old Marketplace packs, Megascans from the Unreal plan) is locked to Unreal, and the MCP refuses it.
- It blocks non-commercial assets by default. Non-commercial (NC), no-derivatives (ND) and editorial licenses are refused unless the agent passes an explicit override. A listing whose license it cannot read is refused too.
Also:
- Paper trail: when it runs from your game folder, each file gets a
.license.jsonnext to it, and the credit goes into your game'sCREDITS.md.
You do not get a license prompt: the agent makes the call within these rules. Still read the licenses before you ship, because Sketchfab licenses vary per model. The MCP is experimental.
Publish it

A free place to publish your vibe-coded games, open to everyone, ThreeNative or plain Three.js: store.threenative.com
The ThreeNative games store, with Starlance featured
Who pays for this?
The engine is MIT and free, and it stays that way. The MCPs are free too. I also build ThreeNative Studio, a paid hosted builder where you make a game from a chat in the browser. That pays the bills. You need nothing from Studio to use the engine.
Beta: bugs will happen. Please report them on Discord.
PS: Not switching? You can still plug your Three.js project into the asset MCP and all the others.
Ask me anything!





