A Three.js game engine

A Unity-style workflow for the web, with GameObjects, components and a visual editor built on pure Three.js.

Pre-release. Join the waitlist for early access.

Threenity editor with Hierarchy on the left, a garden scene in the centre, component Inspector on the right and Project assets below Enlarge editor
One workspace for the scene, its GameObjects, component properties and project assets.

A familiar way to build

Work through a scene using Hierarchy, Scene and Play views, Inspector and Project. The component workflow will feel familiar if you have used Unity, with Three.js underneath.

Find an object.
Shape its behaviour.

Select a GameObject in the Hierarchy, position it in the Scene view, then work on its components in the Inspector. The panels stay together as you move from structure to detail.

Set position, rotation and scale in Transform. The selected object's MeshRenderer exposes its primitive, material and shadow controls. Add another component when the object needs more behaviour.

The garden scene's Hierarchy with a cottage GameObject selected among lights, camera, paths and building parts Enlarge Hierarchy
Hierarchy Find the GameObjects that make up your scene.
Inspector controls for a cottage GameObject: Transform, MeshRenderer, material selection, shadows and Add Component Enlarge components
Inspector Transform and component fields for the selected GameObject.
Project asset browser with search, type filter, display controls and folders for fonts, materials, palettes, prefabs and sprites Enlarge assets
Project and assets Browse project files alongside the scene you are assembling.

Keep your project
within reach

Scenes, models, materials and other project files have a home in the Project panel. Browse folders and inspect assets without leaving the editor.

Scenes and prefabs are stored as versioned JSON. Your visual workspace and the files you put in source control describe the same project.

More about the editor

Work on the details

Go beyond arranging objects. Use the editor's settings and specialised panels to tune the project, its appearance and the way it plays.

Lighting Environment panel with environment source, tint and intensity, ACES Filmic tonemapping, exposure, colour grading, shadows and fog Enlarge settings
Lighting and environment Environment intensity, exposure, colour grading, shadows and fog.

Tune light and surfaces

The Lighting panel brings environment source, tint and intensity together with tonemapping and exposure. Adjust colour grading, choose a shadow profile and configure scene fog.

Select a material to edit its colour, roughness, metalness, emissive intensity and opacity. Assign textures and control UV tiling and offset in the same Inspector.

Rendering, physics, audio and input ship as composable packs. The full capability list below shows how the pieces fit together.

Explore the engine capabilities
Material Inspector with colour picker, roughness, metalness, emissive intensity, opacity, texture slots and UV controls Enlarge materials
Materials Surface properties, texture slots and UV controls in one panel.
Build settings with Web HTML and JavaScript selected, scene inclusion and ordering, package version and output options Enlarge build settings
Build settings Choose scenes and their order, set the starting scene and configure the Web build's package, version and output.

Try the scene in Play view

Move from authoring a scene to trying it in Play view. The editor's play controls keep that feedback loop inside the workspace.

Build with components, test the result, then come back to the scene and refine it.

How the engine fits together
The safe garden sample running in Threenity's Play view with the editor interface visible Enlarge Play view
Play view Try the scene through the editor's play controls.

Beyond the renderer

Three.js gives you the renderer. Threenity adds the part you'd otherwise rebuild on every project: a GameObject + Component + scene-graph model (not ECS), a visual editor, physics, Zod-validated scene serialization, and an asset pipeline. You write behavior as Component subclasses with inspector-driven schemas; scenes and prefabs are versioned JSON. Engine capability ships as composable packs, so a game pulls in only what it needs.

Spin.ts
import {
  Component,
  type GameContext,
} from "@threenity/components-sdk";
import type { Schema } from "@threenity/core";

// schema fields appear in the Inspector
export class Spin extends Component {
  static override readonly schema: Schema = {
    speed: { type: "number", default: 1.5 },
  };

  speed = 1.5;

  override onUpdate(ctx: GameContext, dt: number) {
    this.object.rotation.y += this.speed * dt;
  }
}

Choose your building blocks

Each is its own pack — drop in what your game needs, leave the rest out.

Scene graph + components

GameObject + Component runtime on Three.js. Behavior is Component subclasses with lifecycle hooks (onStart, onUpdate, fixed-timestep fixedUpdate) and a typed event bus.

Visual editor

A full editor — Hierarchy, Inspector, and Scene view. Schema-driven inspectors are generated from each component's field definitions. Tour the editor →

Physics

Rapier3D (WASM): rigidbodies, box / sphere / capsule / mesh colliders, a kinematic character controller, and raycasts — opt-in per scene.

Scenes + assets

Scenes and prefabs are Zod-validated JSON, merge-friendly on disk, and migrated forward on load. Models, textures, and audio resolve through a manifest.

Pack ecosystem

Capabilities ship as packs: UI / HUD, world-space text, audio & mixer, player & camera controllers, input & rebinding, particles & trails, trigger zones, save / load, and more.

Ships to the web

Author in the editor, then export a static build that runs in any browser — no plugin and no install for your players.

Files an agent can read

Threenity is designed so LLMs — not just people — can build games on it. The whole authoring surface is plain, documented files a model can read, reason about, and edit directly. Why AI agents work well on Threenity →

Living docs in every project

Each project ships a docs/threenity/ folder — a full capability inventory, scripting API reference, and per-pack authoring guides — kept in sync with the engine version, so a copilot always builds against the real, current API.

Plain, typed components

Behavior is ordinary TypeScript Component subclasses with schema-defined fields. No hidden magic for a model to guess — what it reads is what runs.

Human-readable scenes

Scenes and prefabs are merge-friendly JSON an agent can read, diff, and edit straight on disk — no opaque binary formats in the way.

Files are the API

Agents author by editing files; the engine is a robust reader that applies changes safely. No fragile UI-automation layer to script against.

Inside the engine today

A concrete list, not a roadmap — every item below is real code you can use right now. Packs marked Beta are opt-in and functional, but still settling.

Scene graph & component system

  • GameObject + Component runtime on Three.js — not ECS
  • Schema-driven components: inspector fields generated straight from code
  • Fixed-timestep fixedUpdate alongside variable onUpdate
  • Zod-validated, merge-friendly scene & prefab JSON with forward migrations
  • Typed event bus (ctx.events) for decoupled component messaging
  • Runtime scene-graph mutation API — spawn, reparent, activate, transform

Visual editor

  • Hierarchy, Inspector, Scene View, and Project asset panels
  • Live property editing with generated, type-safe inspector fields
  • Prefab authoring with per-instance property overrides
  • In-play runtime tuner panel (backtick hotkey) for live debug controls
  • Safe asset rename/move from the Project panel — references update automatically

Rendering

  • Built-in primitives, GLB model rendering, skinned meshes + animation state machine
  • Directional, point, spot, hemisphere lights; perspective/orthographic camera
  • Static mesh batching and screen-size LOD switching for draw-call control
  • Post-processing pipeline: bloom, SSAO, depth of field, outline, god rays, anti-aliasing
  • Selectable quality profiles (Off / Low / Medium / High)

Physics

  • Rapier3D (WASM): rigidbodies, box / sphere / capsule / mesh colliders
  • Kinematic character controller with collision-swept movement
  • Physics raycasts with collision-group and body/collider filtering
  • Named trigger zones with enter / stay / exit events — win-cells, hazards, lifts

Packs

  • UI — full HUD toolkit: Canvas, layout, Button/Text/Image/Slider/Input, scroll views, progress bars, data-binding
  • Audio — music & SFX sources, spatial audio, 4-channel mixer with persistence
  • Text — SDF world-space 3D text
  • Translate — component-driven localization / i18n
  • Controllers — first-person, third-person, top-down, fly-cam, mobile touch controls
  • VFX — data-driven particle systems and trail renderers
  • Terrain Beta — opt-in heightmap sculpting, splat texturing, grass instancing; zero bytes if unused
  • Input — action maps, keyboard/mouse and gamepad rebinding
  • Save / load — slot-based game-state saves with pluggable storage
  • Purchase — a shop-modal system with a pluggable transaction-provider registry
  • Ghosts — async multiplayer via recorded-run replay
  • Combat / Shooter — hitscan weapons, ammo, aim, and inventory building blocks

Asset pipeline

  • Manifest-driven references for models, textures, and audio
  • Dynamic runtime asset loading with per-loader caching
  • Prefab instantiation at runtime with fully rewritten per-instance identifiers

Web build & static export

  • One command bundles your project and its engine packs into a self-contained, ready-to-host build
  • Games export as static builds that run in any browser — no plugin, no install for players
  • No mandatory cloud backend — everything runs client-side by default

AI-authoring docs

  • Every project ships a living docs/threenity/ folder — full capability inventory, scripting API reference, and per-pack authoring guides
  • Kept in sync with the engine version, so AI copilots and human contributors build against the real, current API

Where Threenity is heading

Recently shipped: a merge-friendly scene format, a desktop editor, one-click static web builds, sprite atlasing & batching, and in-project AI-authoring docs. Here's what's moving next.

Now

  • One-command project scaffolding — new-project wizard & starter template
  • Move-safe asset references — GUID-based identity so moving files never breaks a scene
  • Editor collaboration polish — robust external-change sync
  • Standalone documentation site

Next

  • GPU texture compression (KTX2) for much smaller asset downloads
  • Mobile performance profiles & rendering optimization
  • Further draw-call reduction via distance culling

Later

  • Public alpha
  • Path to a stable 1.0 — API stability & migration guides

Setup is on the way.

The desktop editor is coming soon. Join the waitlist and we'll send you the download the moment it's ready.

Download the editor

Coming soon. The build is not yet public.

In the meantime:

Get early access

The desktop editor is nearly here. Drop your name and email and we'll reach out the moment early access opens.