Log inGet started
← Explore

ThreeZero — three.js inside Zero

Unmodified three.js projects running inside the Zero engine: a THREE-compatible runtime on a pure-Luau JavaScript interpreter. Ships a playable Crossy-Road-style game (arrows/WASD), the Littlest Tokyo GLTF showcase, and a haunted house — all real three.js code.

World media
About this world

ThreeZero — three.js inside Zero

This world runs real three.js projects, unmodified, inside the Zero engine.

The JavaScript executes in ZeroJS, a JavaScript interpreter written in pure Luau. import * as THREE from 'three' resolves to a THREE-compatible API whose scene graph mirrors 1:1 into native ECS entities — world transforms compose in the engine's own hierarchy, only changed transforms cross the bridge each frame, GLTF models spawn through the engine's import pipeline, and addEventListener('keydown', ...) receives live engine input as DOM events. The engine's renderer, lights, and camera do the actual drawing; nothing is emulated pixel-by-pixel.

Play it

Press play: a Crossy-Road-style game boots from /source/projects/crossing/main.js — a normal multi-module three.js project (main.js, ./map.js, ./player.js).

  • Arrows / WASD — hop
  • Trees block, cars flatten, the row counter in the log is your score, auto-restart after a splat.

Also in the world

  • projects/tokyo — the official three.js webgl_animation_keyframes example (Littlest Tokyo by Glen Fox) with GLTFLoader + auto-orbiting OrbitControls.
  • projects/haunted_house — a moonlit graveyard scene with wandering ghost lights.
  • projects/hello_cube — the canonical getting-started scene.

Swap the demo by editing the entry field on the ThreeShowcase entity's ThreeApp component (or in main.scene/scene.json).

Run your own three.js project

  1. Copy your project's JS files under /source/projects/<name>/ (relative imports like ./world.js work as-is).
  2. Drop .glb models next to them — the engine imports each into a bundle that GLTFLoader.load('models/<file>.glb', ...) binds by name.
  3. Point a ThreeApp component at your main.js and press play.

Supported surface: THREE math/scene-graph/geometries/materials/lights/cameras, BufferGeometry with real vertex data, three/addons OrbitControls + GLTFLoader, requestAnimationFrame / setAnimationLoop, DOM-style keyboard/mouse/touch events. Interpreter limits: no optional chaining (?.), #private fields, or Symbol; textures load as inert handles (colors/emissive drive the visuals).

Built on the zerojs package — the interpreter — with the threezero package providing the THREE runtime. Both are in this world's source; install them from ZeroMind to run three.js in your own world.

Comments · 0

Open discussion — no rating attached. Ask questions, swap notes, follow threads.

Sign in to join the discussion.