Skip to content

dimartarmizi/threejs-procedural-terrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Procedural Terrain Engine

A vanilla JavaScript and Vite starter for a reusable Three.js procedural terrain engine.

Features

  • Procedural terrain mesh with seeded fractal noise
  • Modular terrain generator suitable for future flight, driving, and FPS game modes
  • Clean vanilla JS setup with Vite
  • Live GUI controls for terrain, fog, and lighting tuning
  • Chunked terrain tiles with render distance, wireframe mode, and runtime performance HUD

Run

npm install
npm run dev

Structure

  • src/main.js boots the app
  • src/app.js wires the scene, controls, GUI, and terrain system
  • src/core/ contains renderer, camera, scene, lighting, and state setup
  • src/systems/createTerrainSystem.js owns terrain mesh and grid updates
  • src/ui/createTerrainGui.js defines the live settings panel
  • src/terrain/ProceduralTerrain.js builds the reusable terrain mesh
  • src/terrain/noise.js provides deterministic height noise

Next steps

The current demo is intentionally small. It is a base for adding chunk streaming, biome rules, vehicle physics, flight camera modes, and world persistence.

About

Three.js Procedural Terrain is a lightweight browser-based project for generating procedural landscapes with chunked terrain, biome-driven surfaces, modular environments, and simple vegetation, built for demos and small games.

Topics

Resources

Stars

Watchers

Forks