Skip to content

bilalba/osmexplorer

Repository files navigation

OSM Explorer

A third-person OpenStreetMap explorer using Three.js, Rapier.js physics, and real-world elevation data.

Features

  • Real-World Mapping: Load any location from OpenStreetMap with automatic 3D building generation
  • Realistic Physics: Full physics simulation powered by Rapier.js
  • Third-Person Exploration: Smooth camera controls for immersive exploration
  • Visual Programming: Optional Blockly integration for interactive behaviors
  • Procedural Generation: Built-in layout utilities for creating custom scenes
  • Elevation Data: Real terrain elevation from online sources

Quick Start

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Visit http://localhost:5173 and explore!

Documentation

Tech Stack

  • Rendering: Three.js
  • Physics: Rapier.js (rapier3d-compat)
  • Visual Programming: Blockly
  • Build: Vite + TypeScript

Project Structure

src/
├── core/                # Three.js engine & game loop
├── ecs/                 # Entity Component System
├── physics/             # Rapier.js physics wrapper
├── camera/              # Third-person camera
├── input/               # Unified input handling
├── prefabs/             # Prefab definitions
├── scene/               # Scene utilities & examples
└── examples/osm-world-explorer/  # OSM integration

Example Scenes

Load pre-built scenes from the in-game menu:

  • Prefab Showcase - All prefabs in one location
  • Downtown District - City with buildings and streets
  • Beach Boardwalk - Coastal scene
  • City Park - Green park with trees

Or load any real-world location via OpenStreetMap!

Controls

Action Keyboard Gamepad
Move WASD/Arrows Left Stick
Jump Space A Button
Interact E X Button
Camera Mouse Right Stick

License

MIT License - see LICENSE file for details

Contributing

Contributions welcome! Please read the documentation in docs/ before submitting PRs.

Acknowledgments

  • Arnis - Inspiration for real-world map generation
  • AWS Terrain Tiles - Elevation data (Terrarium format)
  • OpenStreetMap contributors for map data
  • Three.js community
  • Rapier.js physics engine

About

A game-like world explorer based on OpenStreetMaps and three.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages