Contents
1 Overview
Apex Rush is a landscape 3D racing game made with plain JavaScript and three.js. The player follows a world tour of 4 cups with 3 tracks each, races 5 rivals over 3 laps, earns coins and stars, buys 9 cars in the garage and upgrades engine, tires and nitro in the workshop. Race and Time Trial (against a ghost of the best lap) are available, with Arcade or Pro handling.
This edition has no multiplayer, online ranking, ads or in-app purchases. Coins, cars, stars, trophies and settings are saved locally in the player's browser only.
This download includes the ready-to-host game, the full editable source, this guide and the third-party license notices.
START-HERE.txt
DOCUMENTATION.html
documentation/index.html
game/
source/
THIRD-PARTY-LICENSES/
CHANGELOG.txt
2 Install the ready-to-play game
Only the game/ folder needs to be uploaded to play.
- Extract the whole ZIP on your computer.
- Upload the contents of
game/to a folder on static hosting, using FTP or your host's file manager. - Open that folder's address in a modern browser (
http://orhttps://). The game uses relative paths and can be installed in a subfolder. - Click or tap once to start; browsers require a user gesture before playing audio. Test on the devices your players will use.
index.html by double-clicking it does not work: browsers block JavaScript modules on file://. Always open the game through a web address.
3 Requirements
- Any static web host able to serve plain files over HTTP or HTTPS.
- A current desktop or mobile browser with WebGL 2 (Chrome, Edge, Firefox, Safari on iOS 15 or newer).
- Node.js 26.13 or newer, only for the optional commands (tests, local server, build).
No database, backend language or compile step is required to host the ready-built game/ folder.
The game picks a graphics quality level automatically and lowers it on slow devices; players can also choose it in Settings.
4 Controls and how the game works
Keyboard: WASD or arrows to drive, Space to drift, Shift for nitro, C for the camera, R to go back on track, P or Esc to pause. Controller (Xbox layout): left stick or d-pad to steer, RT to accelerate, LT to brake, X to drift, RB for nitro, LB for the camera, Y to go back on track, Menu to pause. Every key and button can be changed in Settings > Keyboard & controller (defaults in source/src/comandos.js). Touch: big left and right arrows (or a floating stick, or tilt), a large accelerator, brake and nitro; braking while steering starts a drift.
Brake or use the handbrake while steering to drift. Holding a drift charges a turbo in three levels (blue, orange and purple) that fires when the car grips again; chained turbos build a combo. Nitro fills up by drifting, slipstreaming and close calls with rivals. Blue boost pads on the straights give an extra push.
Each race has 3 laps. A podium unlocks the next track of the tour. Stars per track: podium, win and fastest lap of the race. Coins come from the finishing position, drift points, lap goals, the race mission, the marked rival and the daily challenge. Winning a cup for the first time pays 500 coins.
5 Interface
Real captures from the shipped build, with numbered marks for the elements mentioned in this guide.
Marks on the screenshot
- Play: opens the world tour at the next track
- Garage: buy cars and open the workshop
- Trophies: 12 goals with progress
- Settings: sound, controls, graphics and language
- Daily challenge: a podium on the track of the day pays 200 coins
Marks on the screenshot
- The 4 cups
- Selected track; locked tracks show a padlock
- Difficulty, mode (Race or Time Trial) and handling (Arcade or Pro): each tap changes the option
- Chosen car: tap to change it in the garage
- Start the race
Marks on the screenshot
- Top speed, acceleration and grip of the car
- Workshop: engine, tires and nitro upgrades (in Pro mode the nitro row becomes the wing setting)
- Buy the car, or race with it when it is already yours
- All 9 cars with their prices
Marks on the screenshot
- Position and the gap to the cars ahead and behind
- Lap and race time
- Pause
- Track map with every car
- Nitro tank
- Speed, revs and gear
Marks on the screenshot
- Sound effects and music
- Automatic throttle and touch steering (arrows, stick or tilt)
- Graphics quality (Auto, High, Medium, Low) and the frame rate
- Interface language: each tap changes to the next of the 14 languages
6 Settings and language
Settings opens from the main menu and from the pause menu during a race. It holds sound and music, automatic throttle, touch steering (arrows, stick or tilt), graphics quality, reduced motion, the interface language (it switches instantly) and Keyboard & controller, where every key and controller button can be reassigned.
The language follows the player's browser on the first visit. Choosing another language in Settings saves it and reloads the page with the new texts. Adding ?lang= and a language code to the address forces a language (for example ?lang=de).
7 File map
| Path | What it is |
|---|---|
game/index.html
|
The page with every screen of the game; upload it together with the rest of game/. |
game/assets/
|
Images, 3D car models (modelos/), sounds and music (som/) and fonts (fonte/). |
source/src/config.js
|
Every number you may want to change: physics, cars, garage prices, tracks, cups, rivals, prizes and the English, Portuguese and Spanish texts. |
source/src/main.js
|
Main loop: controls, race flow, camera, menus and saving. |
source/src/carro.js
|
Car physics and the rival drivers. |
source/src/pista.js
|
Builds each track from its list of points (road, kerbs, walls, trees and grandstands). |
source/src/idiomas/
|
English, Portuguese and Spanish texts are in source/src/config.js; the other 11 languages are in source/src/idiomas/, one file per language with the same keys. A missing text shows in English. |
source/css/
|
Styles of every screen, in three files loaded in order. |
source/lib/
|
three.js 0.185.0, unminified (MIT license). |
8 Customize
Most changes need only source/src/config.js: car stats (CARROS), garage order and prices (GARAGEM), rivals (GRID), tracks (PISTAS, a list of points per track), cups (COPAS), prizes and every physics number in CFG. Each value has a comment explaining it.
// source/src/config.js (excerpt)
export const GARAGEM = [
{ carro: 'apex', cor: 'vermelho', preco: 0 },
{ carro: 'leve', cor: 'azul', preco: 800 },
// ...one line per car in the garage
];
Art lives in source/assets/: replace an image with another of the same size and format. Car models are .glb files in source/assets/modelos/, and the garage drawings are in source/assets/vitrine/.
After editing the source, run npm run build (or copy the changed files into game/) and upload game/ again.
Keep the bundled license notices if you keep using three.js and the bundled fonts.
9 Languages
The interface ships in 14 languages: English, Portuguese, Spanish, French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean and Chinese.
English, Portuguese and Spanish texts are in source/src/config.js; the other 11 languages are in source/src/idiomas/, one file per language with the same keys. A missing text shows in English.
10 Saved progress
Coins, cars, upgrades, stars, best laps, ghost laps, trophies and settings are saved automatically in the browser's local storage, under keys that start with apex., specific to that browser and site address.
- Clearing the browser's site data for the game's address deletes this save.
- There is no cloud save or account; progress does not transfer between devices or browsers.
Uploading a new version over an existing install keeps the saved progress.
11 Optional tools (Node.js)
The game itself does not need Node.js. These commands only help while you edit the source.
Install Node.js LTS 26.13 or newer from nodejs.org, then run these commands from the extracted source/ folder: tests of the game data, a local web server at port 5310, and the build that copies the game into dist/ (the same as game/).
npm ci
npm test
npm run dev
npm run build
There are no dependencies to install: the source is plain JavaScript with three.js included in source/lib/.
12 Updates and cache
Uploading a new version over an existing install keeps the saved progress.
Re-upload the full contents of game/, overwriting the previous files.
An old version shown in a browser tab after updating is almost always a caching issue, not a failed upload.
Clearing the cache without losing progress
Progress is stored in this browser, not on the server. Clearing cached images and files, or doing a hard reload, keeps your progress.
Computer: press Ctrl+F5 on Windows and Linux, or Cmd+Shift+R on macOS. Phone: in the browser settings, choose the option to clear cached images and files.
Do not choose cookies and site data, or clear site data, for the game's address. That deletes the local save.
13 Troubleshooting
- Blank page or endless loading: open the game through a web address, not
file://, and confirm every file fromgame/was uploaded, includinggame/assets/andgame/lib/. - No sound: audio starts only after a click, tap or key press, by browser policy; check Sound and Music in Settings.
- Low frame rate on an old phone: choose Low in Settings, or turn on Reduced motion.
- A message about WebGL 2: the browser or device is too old for 3D; update it or use another browser.
Audio needs at least one user gesture (click, tap or key press) before it can play; this is a browser requirement, not a bug in the game.
14 Frequently asked questions
Can I resell this template as-is?
Does the game need a server or database?
game/ folder is static files; progress is saved in the player's browser.Can I add a track or change the cars?
PISTAS inside source/src/config.js; add it to a cup in COPAS. Car stats, prices and colors are in CARROS and GARAGEM in the same file.Can I make it easier or harder?
DIFICULDADE and MOTOR_DIFICULDADE, and the grip, braking assist and drift numbers are in CFG, all in source/src/config.js.15 Support and licenses
License notices for three.js (MIT), the Chakra Petch font (SIL Open Font License) and the Noto Sans font (Apache License 2.0) are in THIRD-PARTY-LICENSES/.
For product support, write to the address below.
Support request
When you write to support, include the browser and device, the game version, the page address, the steps that caused the problem, a screenshot and the first error shown in the browser console. Never send passwords, payment details or secret keys.