WebStrafe is a browser-based Three.js surf sandbox inspired by classic CS:GO/CS2 bhop + surf servers.
The focus is movement feel: bunnyhop timing, air-strafe speed gain, and surf ramp flow.
- Source-style kinematic movement controller
- Fixed-timestep simulation at
128 Hz - Surf/ground/air mode handling with ramp clipping + slide move
- Map manifest system with BVH collision against static triangle meshes
- First-person viewmodel pipeline (separate render scene/camera)
- Knife/glove loadout presets with animation ranges
- Run timer + finish detection to lowest platform
- Online leaderboard submission by player name
- Multiplayer presence with remote player models (T/CT by loadout preset)
- Debug HUD for movement, slope, collision and surf state
- Node.js 20+
- npm
npm install
npm run devnpm run dev starts both:
- Vite client (
http://localhost:5173) - Multiplayer/leaderboard server (
http://localhost:8787)
npm run test
npm run buildW/A/S/D: moveMouse: lookSpace: jumpR: reset to spawn- Run timer resets on
R F: inspectLMB/RMB: knife attacksEsc: unlock pointer / return to menu
src/app/- runtime orchestration and main game loopsrc/movement/- movement math + controller + movement testssrc/world/- map loading, spawn resolution, BVH collisionsrc/ui/- menu + HUDsrc/cosmetics/- viewmodel rendering + cosmetic animation/material systemssrc/network/- leaderboard API + multiplayer socket clientsrc/multiplayer/- remote player model renderingserver/- secure leaderboard + websocket multiplayer backendtools/- offline conversion/generation scripts
- Map/knife metadata lives in:
public/maps/manifest.jsonpublic/cosmetics/manifest.json
- Conversion pipeline docs:
tools/README.md
surf_skyworld_xby EVAI (Creative Commons Attribution)- Knife animations by DJMaesen (Creative Commons Attribution)
CTM_SAS | CS2 Agent Modelby Alex (Creative Commons Attribution)PHOENIX | CS2 Agent Modelby Alex (Creative Commons Attribution)- Knife swing sound effects by Joseph SARDIN from BigSoundBank (
Sword through the air 2,Sword that cuts 3, plus two additional swipe variants) - Valve/CS2 proprietary audio is not bundled in this repo; drop-in replacement files can be placed in
public/audio/.
Planning to host in a containerized setup is straightforward.
For future Docker hosting, a simple static Vite build served via Nginx or Caddy is a good starting point:
npm run build- Serve
dist/as static files - Ensure correct SPA/static routing and asset cache headers