A walkable 3D bridge deck for an original starship, built to run in a phone or desktop browser with no install.
Live version: https://claude.ai/artifact/SyjMcFGoRF6kLtFP77TPSr
Run locally: serve the folder with any static web server (for example python3 -m http.server) and open it in a browser. Opening index.html straight from disk won't work, because browsers block loading the js/ files that way. It loads three.js from a CDN, so it needs an internet connection.
The USS Defiance (EV-0408) is a Bastion-class heavy escort, an outgrowth of a compact wartime escort design, enlarged with improved engines and heavier weapons. It was built during the Hollow War for deep-space interdiction, heavy strike, and convoy escort. Motto: Steady under fire.
Everything here is original: the ship, its layout, the interface language, the insignia and the names. It is a fan-made work in the spirit of 24th-century starship design, not a copy of any studio's sets or graphics.
| Area | What you can do |
|---|---|
| Bridge | Sit at any station (helm, ops, tactical, science, engineering, comms, command chairs) and work its displays; trigger red alert; watch the viewscreen. |
| Captain's ready room | Read the captain's log at the desk, use the synthesizer, inspect the ship model, open or close the armored window shutters. |
| Officer conference room | Step through the briefing slides, read the battle honors plaque. |
| Head | Yes, the ship has a restroom. |
| Turbolift | Door and controls (other decks are not built yet). |
- Phone: drag the stick on the left to walk, drag the right side to look, tap a station when you're close to use it.
- Desktop: W A S D or the arrow keys to walk, drag with the mouse to look, click a station (or press E when it's centered) to use it, Esc to close a panel.
three.js 0.186, loaded from a CDN through an import map. There is no build step.
-
Code layout:
index.htmlholds the page, styles and a small loader. The ship's code lives injs/, one file per area, loaded in order and sharing one scope:File What it covers core.jsConstants, renderer, shared helpers, ship state materials.jsProcedural textures, reflections, material library bridge.jsBridge geometry: shell, consoles, seating, dais, viewscreen, aft wall space.jsThe space scene shown on the viewscreen rooms.jsReady room, conference room, head, window views lighting.jsBridge light rig collision.jsWalking collision screens.jsConsole screen drawing and the instrument widget kit sound.jsSynthesized ambience and interface sounds ui.jsStation panels, alerts, HUD controls.jsMovement, touch and mouse input, aiming render.jsShadows, light shafts, dust, post-processing, hero shots, frame loop -
Rendering: ACES filmic tone mapping, shadows, an environment map for reflections, bloom, and a vignette.
-
Screens: every console display is drawn live onto an HTML canvas from a shared set of widgets (tables, bar graphs, dials, plots). Only screens near the player redraw, to keep phones smooth.
-
Viewscreen: renders a separate space scene (starfield, nebula, planet, warp streaks) to a texture.
-
Collision: walls and doors are line segments, and furniture is circles. Walls also block clicks, so you can't use a panel through a wall.
-
Sound: generated in the browser with the Web Audio API. There are no sound files.
-
Hero shots: six fixed camera positions used to judge each visual stage side by side. Run
DEFIANCE_HERO(1)throughDEFIANCE_HERO(6)in the browser console, andDEFIANCE_HERO(0)to return to play. Contact sheets are indocs/.
Deck 1 is complete. Stage 0 of the visual overhaul (engine upgrade, code split, hero shots) is done. Stage 1 (lighting) is applied. Stage 2 (camera + grade) is applied. Stage 3 (materials) is applied. Stage 4 (detail) is applied. Stage 5 (lived-in) is applied. Stage 6 (photo mode) is applied. Stage 7 (sound and quality tiers) is now applied: layered positional ambience (ventilation, relays, doors, chirps) and Phone/Desktop/Cinematic quality settings. Visual overhaul complete., per docs/visual-overhaul-plan.md. The exterior model and other decks come later.