Web-native game engine

A Unity-style component engine for the web, on pure Three.js.

GameObject, Component, and scene graph — the Unity workflow you already know, no retraining.

Built on Three.js Physics by Rapier Games export to the web

What it is

The engine adds the productivity layer Three.js leaves out.

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;
  }
}

Key features

Real subsystems, already in the engine.

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.

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.

AI-native

Built for AI agents to read and write.

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.

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.

Capabilities

Everything shipped in 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

Inside the editor

The editor, up close.

Real panels from a real project running on Threenity — not mockups.

Roadmap

Threenity is under active, steady development.

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

Get started

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 — build not yet public
In the meantime:

Early access

Get notified when Threenity opens up.

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