Please wait while we load the game details.
# Environment 5 — velocity_drift_3d Modular Three.js environment based on **velocity_drift_3d**: cartoony sky gradient, bright lighting, and a procedural racing track. Suitable for racing or drift games. ## Features - **Cartoony skybox** — Gradient shader (top `#88ccff`, bottom `#bbe2ff`) instead of solid background - **Lighting** — Ambient (0xcccccc, 2) + directional (0xffffff, 3.5) at (40, 250, 30) - **Procedural track** — Oval racing circuit with asphalt, curbs, grass ground - **Decorations** — Trees around the track (procedural fallback) - **gameAssets.json** — Placeholder map config for track/decorations/gates GLBs (when CDN URLs are available) ## Usage ```ts import { createEnvironment } from './index.js'; const { scene, lighting, map } = createEnvironment({ addMap: true, mapOptions: { ground: true, track: true, decorations: true }, }); // Use scene.add() for your game objects ``` ## Config `EnvConfig` in `src/config.ts`: - `skybox` — topColor, bottomColor, radius, exponent - `lighting` — ambient, directional - `track` — scale, material (roughness, metalness) - `level` — ground, track, curb colors ## Files | File | Purpose | |------|---------| | `src/config.ts` | EnvConfig (velocity_drift style) | | `src/createScene.ts` | Scene + cartoony skybox shader | | `src/createLighting.ts` | Ambient + directional lights | | `src/map.ts` | createGround, createTrack, createDecorations, createTrackMap | | `src/index.ts` | createEnvironment | | `src/main.ts` | Demo (OrbitControls, procedural track) | | `public/gameAssets.json` | Map definitions for track/decorations GLB URLs | ## Demo ```bash npm install && npm run dev ``` Opens at port 3005. Orbit camera, procedural oval track, trees, and a red box placeholder (car).