Underground 2 Revived
Play Need for Speed: Underground 2 (2004) in Chrome and Firefox with WebGPU graphics, Web Audio, up to 120 fps widescreen, controller support, free roam and Online races with friends. Fan project, not
翻譯準備中
ThreeNative — a small, vanilla-Three.js-first game framework for WebGPU games. Same source on web and native.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
The application framework for Three.js games — one codebase, web and native. Write ordinary three/webgpu. Ship it to the browser, Windows, macOS, Linux, and Android. ThreeNative does not replace Three.js — it is Three.js, with the game layer and the platform layer filled in. ctx.scene is a THREE.Scene, ctx.renderer is a WebGPURenderer, and every Three.js tutorial from the last decade still applies inside a ThreeNative scene. The framework owns the wiring and never the loo [README 설치·사용 부분 발췌] Quickstart檢視完整 README ↗
The application framework for Three.js games — one codebase, web and native.
Write ordinary three/webgpu. Ship it to the browser, Windows, macOS, Linux, and Android.
Quickstart · Templates · Packages · Docs ·
ThreeNative does not replace Three.js — it is Three.js, with the game layer and the platform
layer filled in. ctx.scene is a THREE.Scene, ctx.renderer is a WebGPURenderer, and every
Three.js tutorial from the last decade still applies inside a ThreeNative scene.
| Plain Three.js | ThreeNative | |
|---|---|---|
| Rendering | three/webgpu, TSL, your materials | The same three/webgpu, unchanged and unwrapped |
| Game loop, fixed timestep, dt clamp | You write it, in every project | Shipped |
| Input | Per-project key, pointer, pad and touch plumbing | One input map; ctx.input.vector("move") on every device |
| Physics and navigation | Pick a library, write the bridge | RigidBody3D, Area3D, CharacterBody3D over Rapier |
| HUD and menus | Hand-rolled DOM, or a second render loop | React 19 + Tailwind bound to game state at ~10 Hz |
| Assets | Manual copies and paths | assets/ in, hashed output and a manifest out |
| Proof it still works | Screenshots and hope | Playtest scenarios that drive a real build and assert |
| Desktop and Android | Browser only | An owned C++ runtime running the same source |
| The look | Yours | Yours — visual code is generated into src/render/, never hidden in a package |
The framework owns the wiring and never the look. Anything that decides how a frame looks — materials, lighting, tonemapping, post, camera framing — is scaffolded into your repo as ordinary Three.js you can read, edit, or delete.
pnpm create threenative my-game
cd my-game
pnpm install
pnpm dev
That is a complete game: a loop, physics, a React HUD, a playtest scenario, and a scene you can edit. Requires Node 20.19+ and a WebGPU-capable browser (WebGL2 fallback is automatic).
The real portable entry from the minimal template's src/game.ts:
import { defineGame } from "@threenative/core";
import { playtest } from "@threenative/core/playtest";
import type { IPhysicsContext } from "@threenative/physics";
import { rapier } from "@threenative/physics";
import config from "../threenative.config.js";
import { Play } from "./scenes/Play.js";
import type { GameState } from "./state.js";
const game = defineGame<GameState, IPhysicsContext>({
input: {
move: {
down: ["ArrowDown", "KeyS"],
left: ["ArrowLeft", "KeyA"],
right: ["ArrowRight", "KeyD"],
up: ["ArrowUp", "KeyW"],
},
},
plugins: [rapier(), playtest()],
render: config.renderer,
scenes: { play: Play },
start: "play",
});
export default game;
A scene is a class with three optional methods — load, enter, update. That is the whole
lifecycle.
RigidBody3D, CharacterBody3D, Area3D, CollisionShape3D —
borrowed vocabulary, so there is nothing new to learn.[!TIP] Picking the model that writes the scene. threejseval ranks AI coding agents on Three.js work — one prompt, blind arena votes on the scenes they build, Elo with cost and tokens beside each entry.
pnpm create threenative my-game --template <name>
| Template | What you start with |
|---|---|
collectathon | Hop Garden: a 3D platformer moveset (triple jump, long jump, wall kick, ledge grab, ground pound) on one island with three Sunseeds |
adventure | Lantern Vale: a 3D action-adventure with lock-on, a sword and shield, half-hearts, a push-block puzzle, a key and a locked door, and the Stone Warden |
kart | Clover Cup: a kart racer with a hop into a power-slide, three-stage mini-turbo sparks, boost pads, item boxes (burr, acorn, nitro can) and seven CPU drivers over three laps of a figure-8 |
starter (default) | A polished default project with a React HUD, physics, and a ready-to-edit scene |
minimal | The smallest project — core and physics only |
platformer | Jumping, patrols, pickups, camera follow |
action-rpg | A three-room dungeon with melee, loot, equipment, and persistence |
tower-defense | Four tower types, three upgrade levels, twelve waves and an orbital strike on a polished diorama |
racing | Three laps, checklines, rescue sectors, boost pads |
sailing | Wind, waves, buoyancy, and an ordered course |
rain | A procedural coastal storm, weather controls, and a free-fly camera |
shooter | Hitscan and projectile weapons, hunting targets, timed pickups |
snow | Deformable snow footprints, a ball that carves its own track, blizzard weather |
Details in create-threenative.
| Package | Purpose |
|---|---|
@threenative/assets | Build-time asset compile step: assets/ in, hashed outputs and a manifest out |
@threenative/core | Bootstrap, scenes, lifecycle, input, and renderer integration |
create-threenative | Scaffold a readable game project from eight templates |
@threenative/metahuman | MetaHuman head expressions — checksum-verified OpenRigLogic WASM evaluator and the binding-metadata asset contract |
@threenative/physics | Rapier-backed Godot-shaped physics and navigation |
@threenative/playtest | Browser, native, and scenario assertion harness |
@threenative/procedural-animals | Baked animal payloads, runtime poses, accepted-state following, and conservative bounds |
@threenative/runtime-native | Owned C++ host for desktop and Android |
@threenative/raw-unreal | Raw Unreal editor .uasset static-mesh loader — UE5 FMeshDescription and UE4.18 FRawMesh, no interchange conversion |
@threenative/terrain | Optional headless Strata authoring: validated recipes, baked heightfields and indexed Three.js geometry |
@threenative/three-native | The native engine's Three.js API catalog and the TypeScript sources the engine bundlers read |
@threenative/ui | React bindings for HUD and game state |
@threenative/ueformat | UEFormat v10 .uemodel parser and Three.js loader for meshes exported from Unreal packages |
threenative-animation-mcp | Inspects, attaches, edits and verifies character animation through one MCP, as build-time edits of one GLB |
threenative-engine-mcp | Offline MCP capability discovery for authoring agents |
threenative-blender-mcp | Drives an installed Blender headlessly so a downloaded .fbx becomes a loadable GLB — ships no Blender |
ThreeNative is alpha: the API is settling and versions are 0.x.
Supported targets: web, Windows, macOS, Linux and Android. iOS is not supported yet.
You sign your own game. A desktop or Android release is signed with your certificate and
keys, because the signature names the publisher of the game a player downloads. ThreeNative ships
no certificate; threenative build --mode release signs with yours. See
docs/RELEASE-SIGNING.md.
| Platform | Renderer | State |
|---|---|---|
| Web | WebGPU, WebGL2 fallback | Verified every CI run |
| Desktop (Linux, macOS, Windows) | Owned native host | Verified — 300 native frames and a non-blank capture |
| Android | Owned native host | Emulator lane runs; physical-device performance is being measured |
| iOS | — | Not supported. Experimental host code exists; no release supports it |
Every claim here is backed by a run. The current numbers live in
docs/verification/runtime-perf-state.md, and
everything the framework does not yet do well — with what is being done about it — is in one
place: docs/CURRENT-CHALLENGES.md.
The default look and frame budget follow a fresh Unreal 5.8.3 project. Each Unreal system is
ported from what its source does, never from its code, under a PRD in
docs/PRDs/Unreal/.
Every Unreal 5.8.3 system that sets the look or the frame cost, split into 380 subsystems and measured in lines of the Unreal source. Each one maps to the ThreeNative PRD that ports it.
20% done · 24% in progress · 33% not started · 16% deferred · 5% with no PRD (share of 676K Unreal lines; the tool-heavy Niagara, Landscape, World Partition, RHI and RenderCore modules are left out) · 82 open PRDs on this branch · 72 subsystems with no PRD
Pace: 118 PRD boxes ticked a week over the last 2 weeks. The port order runs waves 1-4 first, so at that pace the default look is done about Nov 17, 2026, and everything filed today about Dec 8, 2026. Scope grows as PRDs are filed, so read the dates as the earliest finish.
Select the map to open the interactive page in a browser. It lists the PRDs and gaps of every feature and the order to port them in.
docs/README.md — the map: PRDs, verification, benchmarks, strategy,
architecture, product, spikes.docs/architecture/CHARTER.md — what the framework is, what it
refuses to be, and the rules that decide both. Binding.docs/architecture/AGENT-INTERFACE.md — the surface an
authoring agent reads.CONTRIBUTING.md — what the public surface is, what
each version number promises before and after 1.0, and how a symbol gets deprecated.packages/create-threenative/README.md — templates and
the scaffold command.Contributions are welcome — issues, discussions and pull requests alike.
pnpm install --frozen-lockfile
pnpm typecheck && pnpm lint && pnpm test
Native compilation is opt-in; the default gate needs no CMake, NDK, or Xcode. There is no root
pnpm dev — run an example by name, for example pnpm --filter abyss-framework dev.
Read CONTRIBUTING.md before opening a pull request, and
AGENTS.md for the full working conventions. Everyone taking part is expected to
follow the Code of Conduct.
SECURITY.md (please do not open a public issue)MIT — see LICENSE. ThreeNative is MIT end to end, including the native runtime.
The name and logo are not covered by the MIT licence — see TRADEMARKS.md.