Skip to content

romizone/teslaway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš— Tesla Self-Driving AI Simulation

Tesla Autopilot JavaScript HTML5 CSS3 Vercel
Status License Last Commit Repo Size



A real-time 3D autonomous vehicle simulation featuring LiDAR visualization, AI traffic management, and a cinematic HUD interface โ€” all rendered in pure JavaScript Canvas.


๐ŸŒ Live Demo ยท ๐Ÿ› Report Bug ยท ๐Ÿ’ก Request Feature


๐ŸŽฌ Preview

Open teslaway.vercel.app โ€” a 3-second countdown launches you straight into the simulation. No clicks needed.


โœจ Features

Feature Description
๐Ÿ›ฃ๏ธ 3D Road System Procedurally generated roads with curves, intersections, lane markings & crosswalks
๐Ÿค– AI Traffic Multiple AI-controlled vehicles with realistic behavior and tail lights
๐Ÿ“ก LiDAR Visualization Real-time 360ยฐ LiDAR sweep, point cloud rendering & 3D object mapping
๐Ÿšฆ Traffic Lights Dynamic traffic signal system with countdown timer & auto speed adjustment
๐ŸŽฏ Object Detection AI bounding boxes with distance tracking on detected vehicles
๐Ÿ–ฅ๏ธ Cinematic HUD Full heads-up display with speed, battery, sensor status & AI decisions
๐Ÿ—บ๏ธ LiDAR Minimap Circular radar-style minimap with real-time vehicle positions
๐ŸŒƒ Night Environment Starfield, moon, illuminated buildings with window lights
๐Ÿ™๏ธ City Objects Procedural buildings & trees with LiDAR point detection
โฑ๏ธ Auto Countdown 3... 2... 1... GO! Auto-starts without user interaction

๐Ÿ› ๏ธ Tech Stack

Technology Usage
JavaScript Core simulation engine & game loop
HTML5 Canvas rendering & DOM structure
CSS3 HUD layout, animations & effects
Canvas API 2D graphics & 3D perspective projection
Google Fonts Orbitron & Inter typefaces
Vercel Deployment & hosting

๐ŸŽฎ Controls

Key Action
โ†‘ Increase speed (+10 km/h)
โ†“ Decrease speed (-10 km/h)
L Toggle LiDAR system on/off

๐Ÿ“Š HUD Panels

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐ŸŸข FSD + LiDAR ACTIVE                        00:12:34  โ”‚
โ”‚                                                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”           NEURAL NETWORK        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ 8 CAM   โ”‚          + LiDAR PROCESSING     โ”‚ DETECTโ”‚  โ”‚
โ”‚  โ”‚ L LiDAR โ”‚                                 โ”‚ 98.7% โ”‚  โ”‚
โ”‚  โ”‚ R RADAR โ”‚       โ”Œโ”€ TRAFFIC SIGNAL โ”€โ”      โ”‚ 96.2% โ”‚  โ”‚
โ”‚  โ”‚ U ULTRA โ”‚       โ”‚  ๐Ÿ”ด ๐ŸŸก ๐ŸŸข  12s  โ”‚      โ”‚ 94.1% โ”‚  โ”‚
โ”‚  โ”‚ N NEURL โ”‚       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚ 99.5% โ”‚  โ”‚
โ”‚  โ”‚ G GPS   โ”‚                                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚                                           โ”‚ LiDAR360 โ”‚  โ”‚
โ”‚                                           โ”‚    ๐Ÿ”ต     โ”‚  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”  FULL SELF-DRIVING BETA         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”‚  โ”‚ 120  โ”‚  LiDAR + VISION FUSION   BATTERY โ–ˆโ–ˆโ–ˆโ–ˆโ–‘ 87%   โ”‚
โ”‚  โ”‚ KM/H โ”‚  Highway 101 N - Palo Alto, CA               โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

# Clone the repository
git clone https://github.com/romizone/teslaway-simulation.git

# Navigate to the project
cd teslaway-simulation

# Open in browser (macOS)
open index.html

# Open in browser (Linux)
xdg-open index.html

# Open in browser (Windows)
start index.html

๐Ÿ’ก No dependencies, no build step, no server needed โ€” just open the HTML file!


๐Ÿ“‚ Project Structure

teslaway-simulation/
โ”œโ”€โ”€ ๐Ÿ“„ index.html       # Complete application (HTML + CSS + JS)
โ”œโ”€โ”€ ๐Ÿ“‹ README.md        # Documentation
โ”œโ”€โ”€ ๐Ÿ“ LICENSE           # MIT License
โ””โ”€โ”€ ๐Ÿšซ .gitignore       # Git ignore rules

๐Ÿ”ฌ How It Works

๐Ÿง  AI Decision Engine

The simulation uses a procedural AI system that:

  • Generates road segments (straights, curves, intersections)
  • Manages traffic light state machines with countdown logic
  • Adjusts vehicle speed based on traffic conditions
  • Simulates object detection with confidence percentages

๐Ÿ“ก LiDAR System

  • 4 virtual sensors scanning the environment
  • Real-time point cloud visualization on road and objects
  • 360ยฐ minimap showing detected vehicles and road edges
  • Wireframe overlays on detected objects with depth mapping

๐ŸŽฅ 3D Rendering

  • Custom perspective projection engine (no libraries)
  • Depth-sorted rendering for buildings and environment
  • Dynamic lighting and fog based on distance
  • Scanline & vignette post-processing effects

๐ŸŒ Deployment

This project is deployed on Vercel with automatic deploys on push:

Deploy with Vercel


๐Ÿ“œ License

Distributed under the MIT License. See LICENSE for more information.



Made with โค๏ธ and JavaScript

Pure JS Zero Dependencies Single File

โญ Star this repo if you found it interesting!

About

๐Ÿš— Tesla Self-Driving AI Simulation โ€” Real-time 3D autonomous vehicle with LiDAR, traffic lights & cinematic HUD. Pure JavaScript Canvas. Zero dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages